2026-07-20 16:05:17 +00:00
// Module ID: 1624
2026-07-25 08:10:48 +00:00
// Function ID: 18089
2026-07-20 16:05:17 +00:00
// Name: isAffineMatrixFlat
2026-07-23 10:11:24 +00:00
// Dependencies: [57, 1593]
2026-07-20 16:05:17 +00:00
// Module 1624 (isAffineMatrixFlat)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray" ;
const require = arg1 ;
2026-07-20 16:05:17 +00:00
let closure _3 = { code : "function isAffineMatrixFlat_Pnpm_matrixUtilsTsx1(x){return Array.isArray(x)&&x.length===16&&x.every(function(element){return typeof element==='number'&&!isNaN(element);});}" } ;
2026-07-23 10:11:24 +00:00
const tmp2 = ( ( ) => {
export function isAffineMatrixFlat ( arr ) {
2026-07-20 16:05:17 +00:00
let isArray = Array . isArray ( arr ) ;
if ( isArray ) {
isArray = 16 === arr . length ;
}
if ( isArray ) {
isArray = arr . every ( ( arg0 ) => {
let tmp = "number" === typeof arg0 ;
if ( tmp ) {
const _isNaN = isNaN ;
tmp = ! isNaN ( arg0 ) ;
}
return tmp ;
} ) ;
}
return isArray ;
}
isAffineMatrixFlat . _ _closure = { } ;
isAffineMatrixFlat . _ _workletHash = 7766400476414 ;
isAffineMatrixFlat . _ _initData = closure _3 ;
return isAffineMatrixFlat ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
let closure _4 = tmp2 ;
2026-07-20 16:05:17 +00:00
let closure _5 = { code : "function isAffineMatrix_Pnpm_matrixUtilsTsx2(x){return Array.isArray(x)&&x.length===4&&x.every(function(row){return Array.isArray(row)&&row.length===4&&row.every(function(element){return typeof element==='number'&&!isNaN(element);});});}" } ;
2026-07-23 10:11:24 +00:00
let tmp3 = ( ( ) => {
export function isAffineMatrix ( arr ) {
2026-07-20 16:05:17 +00:00
let isArray = Array . isArray ( arr ) ;
if ( isArray ) {
isArray = 4 === arr . length ;
}
if ( isArray ) {
isArray = arr . every ( ( arr ) => {
let isArray = Array . isArray ( arr ) ;
if ( isArray ) {
isArray = 4 === arr . length ;
}
if ( isArray ) {
isArray = arr . every ( ( arg0 ) => {
let tmp = "number" === typeof arg0 ;
if ( tmp ) {
const _isNaN = isNaN ;
tmp = ! isNaN ( arg0 ) ;
}
return tmp ;
} ) ;
}
return isArray ;
} ) ;
}
return isArray ;
}
isAffineMatrix . _ _closure = { } ;
isAffineMatrix . _ _workletHash = 3452211777657 ;
isAffineMatrix . _ _initData = closure _5 ;
return isAffineMatrix ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
let closure _6 = tmp3 ;
2026-07-20 16:05:17 +00:00
let closure _7 = { code : "function flatten_Pnpm_matrixUtilsTsx3(matrix){return matrix.flat();}" } ;
2026-07-23 10:11:24 +00:00
const tmp4 = ( ( ) => {
export function flatten ( arr ) {
2026-07-20 16:05:17 +00:00
return arr . flat ( ) ;
}
flatten . _ _closure = { } ;
flatten . _ _workletHash = 9900628528512 ;
flatten . _ _initData = closure _7 ;
return flatten ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
let closure _8 = tmp4 ;
2026-07-20 16:05:17 +00:00
let closure _9 = { code : "function unflatten_Pnpm_matrixUtilsTsx4(m){return[[m[0],m[1],m[2],m[3]],[m[4],m[5],m[6],m[7]],[m[8],m[9],m[10],m[11]],[m[12],m[13],m[14],m[15]]];}" } ;
2026-07-23 10:11:24 +00:00
const tmp5 = ( ( ) => {
export function unflatten ( arg0 ) {
2026-07-20 16:05:17 +00:00
const items = [ arg0 [ 0 ] , arg0 [ 1 ] , arg0 [ 2 ] , arg0 [ 3 ] ] ;
const items1 = [ items , , , ] ;
const items2 = [ arg0 [ 4 ] , arg0 [ 5 ] , arg0 [ 6 ] , arg0 [ 7 ] ] ;
items1 [ 1 ] = items2 ;
const items3 = [ arg0 [ 8 ] , arg0 [ 9 ] , arg0 [ 10 ] , arg0 [ 11 ] ] ;
items1 [ 2 ] = items3 ;
const items4 = [ arg0 [ 12 ] , arg0 [ 13 ] , arg0 [ 14 ] , arg0 [ 15 ] ] ;
items1 [ 3 ] = items4 ;
return items1 ;
}
unflatten . _ _closure = { } ;
unflatten . _ _workletHash = 17503333305803 ;
unflatten . _ _initData = closure _9 ;
return unflatten ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
let closure _10 = tmp5 ;
2026-07-20 16:05:17 +00:00
let closure _11 = { code : "function maybeFlattenMatrix_Pnpm_matrixUtilsTsx5(matrix){const{isAffineMatrix,flatten}=this.__closure;return isAffineMatrix(matrix)?flatten(matrix):matrix;}" } ;
2026-07-23 10:11:24 +00:00
let closure _12 = ( ( ) => {
2026-07-20 16:05:17 +00:00
function maybeFlattenMatrix ( arg0 ) {
let tmp = arg0 ;
2026-07-23 10:11:24 +00:00
if ( outer1 _6 ( arg0 ) ) {
tmp = outer1 _8 ( arg0 ) ;
2026-07-20 16:05:17 +00:00
}
return tmp ;
}
2026-07-23 10:11:24 +00:00
maybeFlattenMatrix . _ _closure = { isAffineMatrix : closure _6 , flatten : closure _8 } ;
2026-07-20 16:05:17 +00:00
maybeFlattenMatrix . _ _workletHash = 13544286880330 ;
maybeFlattenMatrix . _ _initData = closure _11 ;
return maybeFlattenMatrix ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _13 = { code : "function multiplyMatrices_Pnpm_matrixUtilsTsx6(a,b){return[[a[0][0]*b[0][0]+a[0][1]*b[1][0]+a[0][2]*b[2][0]+a[0][3]*b[3][0],a[0][0]*b[0][1]+a[0][1]*b[1][1]+a[0][2]*b[2][1]+a[0][3]*b[3][1],a[0][0]*b[0][2]+a[0][1]*b[1][2]+a[0][2]*b[2][2]+a[0][3]*b[3][2],a[0][0]*b[0][3]+a[0][1]*b[1][3]+a[0][2]*b[2][3]+a[0][3]*b[3][3]],[a[1][0]*b[0][0]+a[1][1]*b[1][0]+a[1][2]*b[2][0]+a[1][3]*b[3][0],a[1][0]*b[0][1]+a[1][1]*b[1][1]+a[1][2]*b[2][1]+a[1][3]*b[3][1],a[1][0]*b[0][2]+a[1][1]*b[1][2]+a[1][2]*b[2][2]+a[1][3]*b[3][2],a[1][0]*b[0][3]+a[1][1]*b[1][3]+a[1][2]*b[2][3]+a[1][3]*b[3][3]],[a[2][0]*b[0][0]+a[2][1]*b[1][0]+a[2][2]*b[2][0]+a[2][3]*b[3][0],a[2][0]*b[0][1]+a[2][1]*b[1][1]+a[2][2]*b[2][1]+a[2][3]*b[3][1],a[2][0]*b[0][2]+a[2][1]*b[1][2]+a[2][2]*b[2][2]+a[2][3]*b[3][2],a[2][0]*b[0][3]+a[2][1]*b[1][3]+a[2][2]*b[2][3]+a[2][3]*b[3][3]],[a[3][0]*b[0][0]+a[3][1]*b[1][0]+a[3][2]*b[2][0]+a[3][3]*b[3][0],a[3][0]*b[0][1]+a[3][1]*b[1][1]+a[3][2]*b[2][1]+a[3][3]*b[3][1],a[3][0]*b[0][2]+a[3][1]*b[1][2]+a[3][2]*b[2][2]+a[3][3]*b[3][2],a[3][0]*b[0][3]+a[3][1]*b[1][3]+a[3][2]*b[2][3]+a[3][3]*b[3][3]]];}" } ;
let closure _14 = { code : "function subtractMatrices_Pnpm_matrixUtilsTsx7(maybeFlatA,maybeFlatB){const{isAffineMatrixFlat,maybeFlattenMatrix,unflatten}=this.__closure;const isFlatOnStart=isAffineMatrixFlat(maybeFlatA);const a=maybeFlattenMatrix(maybeFlatA);const b=maybeFlattenMatrix(maybeFlatB);const c=a.map(function(_,i){return a[i]-b[i];});return isFlatOnStart?c:unflatten(c);}" } ;
let closure _15 = { code : "function addMatrices_Pnpm_matrixUtilsTsx8(maybeFlatA,maybeFlatB){const{isAffineMatrixFlat,maybeFlattenMatrix,unflatten}=this.__closure;const isFlatOnStart=isAffineMatrixFlat(maybeFlatA);const a=maybeFlattenMatrix(maybeFlatA);const b=maybeFlattenMatrix(maybeFlatB);const c=a.map(function(_,i){return a[i]+b[i];});return isFlatOnStart?c:unflatten(c);}" } ;
2026-07-23 10:11:24 +00:00
let tmp6 = ( ( ) => {
export function multiplyMatrices ( arg0 , ar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] + arg0 [ 3 ] [ 3 ] * arg1 [ 3 ] [ 0 ] , arg0 [ 3 ] [ 0 ] * arg1 [ 0 ] [ 1 ] + arg0 [ 3 ] [ 1 ] * arg1 [ 1 ] [ 1 ] + arg0 [ 3 ] [ 2 ] * arg1 [ 2 ] [ 1 ] + arg0 [ 3 ] [ 3 ] * arg1 [ 3 ] [ 1 ] , arg0 [ 3 ] [ 0 ] * arg1 [ 0 ] [ 2 ] + arg0 [ 3 ] [ 1 ] * arg1 [ 1 ] [ 2 ] + arg0 [ 3 ] [ 2 ] * arg1 [ 2 ] [ 2 ] + arg0 [ 3 ] [ 3 ] * arg1 [ 3 ] [ 2 ] , arg0 [ 3 ] [ 0 ] * arg1 [ 0 ] [ 3 ] + arg0 [ 3 ] [ 1 ] * arg1 [ 1 ] [ 3 ] + arg0 [ 3 ] [ 2 ] * arg1 [ 2 ] [ 3 ] + arg0 [ 3 ] [ 3 ] * arg1 [ 3 ] [ 3 ] ] ;
items1 [ 3 ] = items4 ;
return items1 ;
}
multiplyMatrices . _ _closure = { } ;
multiplyMatrices . _ _workletHash = 4575994159882 ;
multiplyMatrices . _ _initData = closure _13 ;
return multiplyMatrices ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _16 = { code : "function scaleMatrix_Pnpm_matrixUtilsTsx9(maybeFlatA,scalar){const{isAffineMatrixFlat,maybeFlattenMatrix,unflatten}=this.__closure;const isFlatOnStart=isAffineMatrixFlat(maybeFlatA);const a=maybeFlattenMatrix(maybeFlatA);const b=a.map(function(x){return x*scalar;});return isFlatOnStart?b:unflatten(b);}" } ;
2026-07-23 10:11:24 +00:00
let tmp7 = ( ( ) => {
export function subtractMatrices ( arg0 , arg1 ) {
const arr = outer1 _12 ( arg0 ) ;
let closure _1 = outer1 _12 ( arg1 ) ;
const mapped = arr . map ( ( arg0 , arg1 ) => arr [ arg1 ] - table [ arg1 ] ) ;
2026-07-20 16:05:17 +00:00
let tmp3 = mapped ;
if ( ! tmp ) {
2026-07-23 10:11:24 +00:00
tmp3 = outer1 _10 ( mapped ) ;
2026-07-20 16:05:17 +00:00
}
return tmp3 ;
}
2026-07-23 10:11:24 +00:00
subtractMatrices . _ _closure = { isAffineMatrixFlat : closure _4 , maybeFlattenMatrix : closure _12 , unflatten : closure _10 } ;
2026-07-20 16:05:17 +00:00
subtractMatrices . _ _workletHash = 12538691088788 ;
subtractMatrices . _ _initData = closure _14 ;
return subtractMatrices ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _17 = { code : "function getRotationMatrix_Pnpm_matrixUtilsTsx10(angle,axis='z'){const cos=Math.cos(angle);const sin=Math.sin(angle);switch(axis){case'z':return[[cos,sin,0,0],[-sin,cos,0,0],[0,0,1,0],[0,0,0,1]];case'y':return[[cos,0,-sin,0],[0,1,0,0],[sin,0,cos,0],[0,0,0,1]];case'x':return[[1,0,0,0],[0,cos,sin,0],[0,-sin,cos,0],[0,0,0,1]];}}" } ;
2026-07-23 10:11:24 +00:00
let tmp8 = ( ( ) => {
export function addMatrices ( arg0 , arg1 ) {
const arr = outer1 _12 ( arg0 ) ;
let closure _1 = outer1 _12 ( arg1 ) ;
const mapped = arr . map ( ( arg0 , arg1 ) => arr [ arg1 ] + table [ arg1 ] ) ;
2026-07-20 16:05:17 +00:00
let tmp3 = mapped ;
if ( ! tmp ) {
2026-07-23 10:11:24 +00:00
tmp3 = outer1 _10 ( mapped ) ;
2026-07-20 16:05:17 +00:00
}
return tmp3 ;
}
2026-07-23 10:11:24 +00:00
addMatrices . _ _closure = { isAffineMatrixFlat : closure _4 , maybeFlattenMatrix : closure _12 , unflatten : closure _10 } ;
2026-07-20 16:05:17 +00:00
addMatrices . _ _workletHash = 17429737879880 ;
addMatrices . _ _initData = closure _15 ;
return addMatrices ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _18 = { code : "function norm3d_Pnpm_matrixUtilsTsx11(x,y,z){return Math.sqrt(x*x+y*y+z*z);}" } ;
2026-07-23 10:11:24 +00:00
let tmp9 = ( ( ) => {
export function scaleMatrix ( arg0 , arg1 ) {
let closure _0 = arg1 ;
const tmp = outer1 _4 ( arg0 ) ;
const mapped = outer1 _12 ( arg0 ) . map ( ( arg0 ) => arg0 * closure _0 ) ;
2026-07-20 16:05:17 +00:00
let tmp3 = mapped ;
if ( ! tmp ) {
2026-07-23 10:11:24 +00:00
tmp3 = outer1 _10 ( mapped ) ;
2026-07-20 16:05:17 +00:00
}
return tmp3 ;
}
2026-07-23 10:11:24 +00:00
scaleMatrix . _ _closure = { isAffineMatrixFlat : closure _4 , maybeFlattenMatrix : closure _12 , unflatten : closure _10 } ;
2026-07-20 16:05:17 +00:00
scaleMatrix . _ _workletHash = 11907224908685 ;
scaleMatrix . _ _initData = closure _16 ;
return scaleMatrix ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
let closure _19 = ( ( ) => {
2026-07-20 16:05:17 +00:00
function norm3d ( arg0 , arg1 , arg2 ) {
return Math . sqrt ( arg0 * arg0 + arg1 * arg1 + arg2 * arg2 ) ;
}
norm3d . _ _closure = { } ;
norm3d . _ _workletHash = 3613705554848 ;
norm3d . _ _initData = closure _18 ;
return norm3d ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _20 = { code : "function transposeMatrix_Pnpm_matrixUtilsTsx12(matrix){const{flatten}=this.__closure;const m=flatten(matrix);return[[m[0],m[4],m[8],m[12]],[m[1],m[5],m[9],m[13]],[m[2],m[6],m[10],m[14]],[m[3],m[7],m[11],m[15]]];}" } ;
2026-07-23 10:11:24 +00:00
let closure _21 = ( ( ) => {
2026-07-20 16:05:17 +00:00
function transposeMatrix ( arg0 ) {
2026-07-23 10:11:24 +00:00
const tmp = outer1 _8 ( arg0 ) ;
2026-07-20 16:05:17 +00:00
const items = [ tmp [ 0 ] , tmp [ 4 ] , tmp [ 8 ] , tmp [ 12 ] ] ;
const items1 = [ items , , , ] ;
const items2 = [ tmp [ 1 ] , tmp [ 5 ] , tmp [ 9 ] , tmp [ 13 ] ] ;
items1 [ 1 ] = items2 ;
const items3 = [ tmp [ 2 ] , tmp [ 6 ] , tmp [ 10 ] , tmp [ 14 ] ] ;
items1 [ 2 ] = items3 ;
const items4 = [ tmp [ 3 ] , tmp [ 7 ] , tmp [ 11 ] , tmp [ 15 ] ] ;
items1 [ 3 ] = items4 ;
return items1 ;
}
2026-07-23 10:11:24 +00:00
transposeMatrix . _ _closure = { flatten : closure _8 } ;
2026-07-20 16:05:17 +00:00
transposeMatrix . _ _workletHash = 17306716053169 ;
transposeMatrix . _ _initData = closure _20 ;
return transposeMatrix ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _22 = { code : "function assertVectorsHaveEqualLengths_Pnpm_matrixUtilsTsx13(a,b){const{__DEV__}=this.__closure;if(__DEV__&&a.length!==b.length){throw new ReanimatedError(\"Cannot calculate inner product of two vectors of different lengths. Length of \"+a.toString()+\" is \"+a.length+\" and length of \"+b.toString()+\" is \"+b.length+\".\");}}" } ;
2026-07-23 10:11:24 +00:00
let closure _23 = ( ( ) => {
2026-07-20 16:05:17 +00:00
function assertVectorsHaveEqualLengths ( arg0 , arg1 ) {
}
assertVectorsHaveEqualLengths . _ _closure = { _ _DEV _ _ : false } ;
assertVectorsHaveEqualLengths . _ _workletHash = 14349158134583 ;
assertVectorsHaveEqualLengths . _ _initData = closure _22 ;
return assertVectorsHaveEqualLengths ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _24 = { code : "function innerProduct_Pnpm_matrixUtilsTsx14(a,b){const{assertVectorsHaveEqualLengths}=this.__closure;assertVectorsHaveEqualLengths(a,b);return a.reduce(function(acc,_,i){return acc+a[i]*b[i];},0);}" } ;
2026-07-23 10:11:24 +00:00
let closure _25 = ( ( ) => {
2026-07-20 16:05:17 +00:00
function innerProduct ( arr ) {
2026-07-23 10:11:24 +00:00
let closure _0 = arr ;
let closure _1 = arg1 ;
outer1 _23 ( arr , arg1 ) ;
return arr . reduce ( ( arg0 , arg1 , arg2 ) => arg0 + arr [ arg2 ] * table [ arg2 ] , 0 ) ;
2026-07-20 16:05:17 +00:00
}
innerProduct . _ _closure = { assertVectorsHaveEqualLengths : closure _23 } ;
innerProduct . _ _workletHash = 6022428100775 ;
innerProduct . _ _initData = closure _24 ;
return innerProduct ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _26 = { code : "function projection_Pnpm_matrixUtilsTsx15(u,a){const{assertVectorsHaveEqualLengths,innerProduct}=this.__closure;assertVectorsHaveEqualLengths(u,a);const s=innerProduct(u,a)/innerProduct(u,u);return u.map(function(e){return e*s;});}" } ;
2026-07-23 10:11:24 +00:00
let closure _27 = ( ( ) => {
2026-07-20 16:05:17 +00:00
function projection ( arr ) {
2026-07-23 10:11:24 +00:00
outer1 _23 ( arr , arg1 ) ;
let closure _0 = outer1 _25 ( arr , arg1 ) / outer1 _25 ( arr , arr ) ;
2026-07-20 16:05:17 +00:00
return arr . map ( ( arg0 ) => arg0 * closure _0 ) ;
}
projection . _ _closure = { assertVectorsHaveEqualLengths : closure _23 , innerProduct : closure _25 } ;
projection . _ _workletHash = 12191208971941 ;
projection . _ _initData = closure _26 ;
return projection ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _28 = { code : "function subtractVectors_Pnpm_matrixUtilsTsx16(a,b){const{assertVectorsHaveEqualLengths}=this.__closure;assertVectorsHaveEqualLengths(a,b);return a.map(function(_,i){return a[i]-b[i];});}" } ;
2026-07-23 10:11:24 +00:00
let closure _29 = ( ( ) => {
2026-07-20 16:05:17 +00:00
function subtractVectors ( arr ) {
2026-07-23 10:11:24 +00:00
let closure _0 = arr ;
let closure _1 = arg1 ;
outer1 _23 ( arr , arg1 ) ;
return arr . map ( ( arg0 , arg1 ) => arr [ arg1 ] - table [ arg1 ] ) ;
2026-07-20 16:05:17 +00:00
}
subtractVectors . _ _closure = { assertVectorsHaveEqualLengths : closure _23 } ;
subtractVectors . _ _workletHash = 9047017498478 ;
subtractVectors . _ _initData = closure _28 ;
return subtractVectors ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _30 = { code : "function scaleVector_Pnpm_matrixUtilsTsx17(u,a){return u.map(function(e){return e*a;});}" } ;
2026-07-23 10:11:24 +00:00
let closure _31 = ( ( ) => {
2026-07-20 16:05:17 +00:00
function scaleVector ( arr ) {
2026-07-23 10:11:24 +00:00
let closure _0 = arg1 ;
return arr . map ( ( arg0 ) => arg0 * closure _0 ) ;
2026-07-20 16:05:17 +00:00
}
scaleVector . _ _closure = { } ;
scaleVector . _ _workletHash = 11236256734309 ;
scaleVector . _ _initData = closure _30 ;
return scaleVector ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _32 = { code : "function gramSchmidtAlgorithm_Pnpm_matrixUtilsTsx18(matrix){const{subtractVectors,projection,scaleVector,innerProduct,transposeMatrix}=this.__closure;const[a0,a1,a2,a3]=matrix;const u0=a0;const u1=subtractVectors(a1,projection(u0,a1));const u2=subtractVectors(subtractVectors(a2,projection(u0,a2)),projection(u1,a2));const u3=subtractVectors(subtractVectors(subtractVectors(a3,projection(u0,a3)),projection(u1,a3)),projection(u2,a3));const[e0,e1,e2,e3]=[u0,u1,u2,u3].map(function(u){return scaleVector(u,1/Math.sqrt(innerProduct(u,u)));});const rotationMatrix=[[e0[0],e1[0],e2[0],e3[0]],[e0[1],e1[1],e2[1],e3[1]],[e0[2],e1[2],e2[2],e3[2]],[e0[3],e1[3],e2[3],e3[3]]];const skewMatrix=[[innerProduct(e0,a0),innerProduct(e0,a1),innerProduct(e0,a2),innerProduct(e0,a3)],[0,innerProduct(e1,a1),innerProduct(e1,a2),innerProduct(e1,a3)],[0,0,innerProduct(e2,a2),innerProduct(e2,a3)],[0,0,0,innerProduct(e3,a3)]];return{rotationMatrix:transposeMatrix(rotationMatrix),skewMatrix:transposeMatrix(skewMatrix)};}" } ;
2026-07-23 10:11:24 +00:00
let closure _33 = ( ( ) => {
2026-07-20 16:05:17 +00:00
function gramSchmidtAlgorithm ( arg0 ) {
let tmp12 ;
let tmp13 ;
let tmp14 ;
let tmp15 ;
2026-07-23 10:11:24 +00:00
const tmp = outer1 _2 ( arg0 , 4 ) ;
2026-07-20 16:05:17 +00:00
const first = tmp [ 0 ] ;
2026-07-23 10:11:24 +00:00
const tmp6 = outer1 _29 ( tmp [ 1 ] , outer1 _27 ( first , tmp [ 1 ] ) ) ;
const tmp8 = outer1 _29 ( outer1 _29 ( tmp [ 2 ] , outer1 _27 ( first , tmp [ 2 ] ) ) , outer1 _27 ( tmp6 , tmp [ 2 ] ) ) ;
2026-07-20 16:05:17 +00:00
const items = [ first , tmp6 , tmp8 , ] ;
2026-07-23 10:11:24 +00:00
const tmp7 = outer1 _29 ( tmp [ 2 ] , outer1 _27 ( first , tmp [ 2 ] ) ) ;
const tmp9 = outer1 _29 ( tmp [ 3 ] , outer1 _27 ( first , tmp [ 3 ] ) ) ;
items [ 3 ] = outer1 _29 ( outer1 _29 ( outer1 _29 ( tmp [ 3 ] , outer1 _27 ( first , tmp [ 3 ] ) ) , outer1 _27 ( tmp6 , tmp [ 3 ] ) ) , outer1 _27 ( tmp8 , tmp [ 3 ] ) ) ;
const tmp10 = outer1 _29 ( outer1 _29 ( tmp [ 3 ] , outer1 _27 ( first , tmp [ 3 ] ) ) , outer1 _27 ( tmp6 , tmp [ 3 ] ) ) ;
[ tmp12 , tmp13 , tmp14 , tmp15 ] = outer1 _2 ( items . map ( ( arg0 ) => outer2 _31 ( arg0 , 1 / Math . sqrt ( outer2 _25 ( arg0 , arg0 ) ) ) ) , 4 ) ;
2026-07-20 16:05:17 +00:00
const items1 = [ tmp12 [ 0 ] , tmp13 [ 0 ] , tmp14 [ 0 ] , tmp15 [ 0 ] ] ;
const items2 = [ items1 , , , ] ;
const items3 = [ tmp12 [ 1 ] , tmp13 [ 1 ] , tmp14 [ 1 ] , tmp15 [ 1 ] ] ;
items2 [ 1 ] = items3 ;
const items4 = [ tmp12 [ 2 ] , tmp13 [ 2 ] , tmp14 [ 2 ] , tmp15 [ 2 ] ] ;
items2 [ 2 ] = items4 ;
const items5 = [ tmp12 [ 3 ] , tmp13 [ 3 ] , tmp14 [ 3 ] , tmp15 [ 3 ] ] ;
items2 [ 3 ] = items5 ;
2026-07-23 10:11:24 +00:00
const items6 = [ outer1 _25 ( tmp12 , first ) , outer1 _25 ( tmp12 , tmp [ 1 ] ) , outer1 _25 ( tmp12 , tmp [ 2 ] ) , outer1 _25 ( tmp12 , tmp [ 3 ] ) ] ;
2026-07-20 16:05:17 +00:00
const items7 = [ items6 , , , ] ;
2026-07-23 10:11:24 +00:00
const items8 = [ 0 , outer1 _25 ( tmp13 , tmp [ 1 ] ) , outer1 _25 ( tmp13 , tmp [ 2 ] ) , outer1 _25 ( tmp13 , tmp [ 3 ] ) ] ;
2026-07-20 16:05:17 +00:00
items7 [ 1 ] = items8 ;
2026-07-23 10:11:24 +00:00
const items9 = [ 0 , 0 , outer1 _25 ( tmp14 , tmp [ 2 ] ) , outer1 _25 ( tmp14 , tmp [ 3 ] ) ] ;
2026-07-20 16:05:17 +00:00
items7 [ 2 ] = items9 ;
2026-07-23 10:11:24 +00:00
const items10 = [ 0 , 0 , 0 , outer1 _25 ( tmp15 , tmp [ 3 ] ) ] ;
2026-07-20 16:05:17 +00:00
items7 [ 3 ] = items10 ;
2026-07-23 10:11:24 +00:00
const tmp11 = outer1 _2 ( items . map ( ( arg0 ) => outer2 _31 ( arg0 , 1 / Math . sqrt ( outer2 _25 ( arg0 , arg0 ) ) ) ) , 4 ) ;
return { rotationMatrix : outer1 _21 ( items2 ) , skewMatrix : outer1 _21 ( items7 ) } ;
2026-07-20 16:05:17 +00:00
}
gramSchmidtAlgorithm . _ _closure = { subtractVectors : closure _29 , projection : closure _27 , scaleVector : closure _31 , innerProduct : closure _25 , transposeMatrix : closure _21 } ;
gramSchmidtAlgorithm . _ _workletHash = 1839555089531 ;
gramSchmidtAlgorithm . _ _initData = closure _32 ;
return gramSchmidtAlgorithm ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _34 = { code : "function decomposeMatrix_Pnpm_matrixUtilsTsx19(unknownTypeMatrix){const{maybeFlattenMatrix,norm3d,gramSchmidtAlgorithm}=this.__closure;const matrix=maybeFlattenMatrix(unknownTypeMatrix);if(matrix[15]===0){throw new ReanimatedError('Invalid transform matrix.');}matrix.forEach(function(_,i){return matrix[i]/=matrix[15];});const translationMatrix=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[matrix[12],matrix[13],matrix[14],1]];const sx=matrix[15]*norm3d(matrix[0],matrix[4],matrix[8]);const sy=matrix[15]*norm3d(matrix[1],matrix[5],matrix[9]);const sz=matrix[15]*norm3d(matrix[2],matrix[6],matrix[10]);const scaleMatrix=[[sx,0,0,0],[0,sy,0,0],[0,0,sz,0],[0,0,0,1]];const rotationAndSkewMatrix=[[matrix[0]/sx,matrix[1]/sx,matrix[2]/sx,0],[matrix[4]/sy,matrix[5]/sy,matrix[6]/sy,0],[matrix[8]/sz,matrix[9]/sz,matrix[10]/sz,0],[0,0,0,1]];const{rotationMatrix:rotationMatrix,skewMatrix:skewMatrix}=gramSchmidtAlgorithm(rotationAndSkewMatrix);return{translationMatrix:translationMatrix,scaleMatrix:scaleMatrix,rotationMatrix:rotationMatrix,skewMatrix:skewMatrix};}" } ;
2026-07-23 10:11:24 +00:00
let tmp11 = ( ( ) => {
export function decomposeMatrix ( arg0 ) {
const arr = outer1 _12 ( arg0 ) ;
2026-07-20 16:05:17 +00:00
if ( 0 === arr [ 15 ] ) {
2026-07-23 10:11:24 +00:00
const ReanimatedError = outer1 _0 ( outer1 _1 [ 1 ] ) . ReanimatedError ;
2026-07-20 16:05:17 +00:00
const prototype = ReanimatedError . prototype ;
const reanimatedError = new ReanimatedError ( "Invalid transform matrix." ) ;
throw reanimatedError ;
} else {
const item = arr . forEach ( ( arg0 , arg1 ) => {
const result = arr [ arg1 ] / arr [ 15 ] ;
arr [ arg1 ] = result ;
return result ;
} ) ;
2026-07-23 10:11:24 +00:00
const items = [ [ 1 , 0 , 0 , 0 ] , [ 0 , 1 , 0 , 0 ] , [ 0 , 0 , 1 , 0 ] , ] ;
2026-07-20 16:05:17 +00:00
const items1 = [ arr [ 12 ] , arr [ 13 ] , arr [ 14 ] , 1 ] ;
items [ 3 ] = items1 ;
2026-07-23 10:11:24 +00:00
let result = arr [ 15 ] * outer1 _19 ( arr [ 0 ] , arr [ 4 ] , arr [ 8 ] ) ;
const result1 = arr [ 15 ] * outer1 _19 ( arr [ 1 ] , arr [ 5 ] , arr [ 9 ] ) ;
const result2 = arr [ 15 ] * outer1 _19 ( arr [ 2 ] , arr [ 6 ] , arr [ 10 ] ) ;
2026-07-20 16:05:17 +00:00
const items2 = [ result , 0 , 0 , 0 ] ;
const items3 = [ items2 , , , ] ;
2026-07-23 10:11:24 +00:00
const items4 = [ 0 , result1 , 0 , 0 ] ;
2026-07-20 16:05:17 +00:00
items3 [ 1 ] = items4 ;
2026-07-23 10:11:24 +00:00
const items5 = [ 0 , 0 , result2 , 0 ] ;
2026-07-20 16:05:17 +00:00
items3 [ 2 ] = items5 ;
2026-07-23 10:11:24 +00:00
items3 [ 3 ] = [ 0 , 0 , 0 , 1 ] ;
2026-07-20 16:05:17 +00:00
const items6 = [ arr [ 0 ] / result , arr [ 1 ] / result , arr [ 2 ] / result , 0 ] ;
const items7 = [ items6 , , , ] ;
const items8 = [ arr [ 4 ] / result1 , arr [ 5 ] / result1 , arr [ 6 ] / result1 , 0 ] ;
items7 [ 1 ] = items8 ;
const items9 = [ arr [ 8 ] / result2 , arr [ 9 ] / result2 , arr [ 10 ] / result2 , 0 ] ;
items7 [ 2 ] = items9 ;
2026-07-23 10:11:24 +00:00
items7 [ 3 ] = [ 0 , 0 , 0 , 1 ] ;
2026-07-20 16:05:17 +00:00
const obj = { translationMatrix : items , scaleMatrix : items3 } ;
2026-07-23 10:11:24 +00:00
( { rotationMatrix : obj . rotationMatrix , skewMatrix : obj . skewMatrix } = outer1 _33 ( items7 ) ) ;
2026-07-20 16:05:17 +00:00
return obj ;
}
}
decomposeMatrix . _ _closure = { maybeFlattenMatrix : closure _12 , norm3d : closure _19 , gramSchmidtAlgorithm : closure _33 } ;
decomposeMatrix . _ _workletHash = 244684068165 ;
decomposeMatrix . _ _initData = closure _34 ;
return decomposeMatrix ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
let closure _35 = tmp11 ;
2026-07-20 16:05:17 +00:00
let closure _36 = { code : "function decomposeMatrixIntoMatricesAndAngles_Pnpm_matrixUtilsTsx20(matrix){const{decomposeMatrix}=this.__closure;const{scaleMatrix:scaleMatrix,rotationMatrix:rotationMatrix,translationMatrix:translationMatrix,skewMatrix:skewMatrix}=decomposeMatrix(matrix);const sinRy=-rotationMatrix[0][2];const ry=Math.asin(sinRy);let rx;let rz;if(sinRy===1||sinRy===-1){rz=0;rx=Math.atan2(sinRy*rotationMatrix[0][1],sinRy*rotationMatrix[0][2]);}else{rz=Math.atan2(rotationMatrix[0][1],rotationMatrix[0][0]);rx=Math.atan2(rotationMatrix[1][2],rotationMatrix[2][2]);}return{scaleMatrix:scaleMatrix,rotationMatrix:rotationMatrix,translationMatrix:translationMatrix,skewMatrix:skewMatrix,rx:rx||0,ry:ry||0,rz:rz||0};}" } ;
2026-07-23 10:11:24 +00:00
export const getRotationMatrix = ( ( ) => {
2026-07-20 16:05:17 +00:00
function getRotationMatrix ( result , arg1 ) {
let str = "z" ;
if ( arguments . length > 1 ) {
str = "z" ;
if ( undefined !== arguments [ 1 ] ) {
str = arguments [ 1 ] ;
}
}
const cosResult = Math . cos ( result ) ;
const sinResult = Math . sin ( result ) ;
if ( "z" === str ) {
const items = [ cosResult , sinResult , 0 , 0 ] ;
const items1 = [ items , , , ] ;
const items2 = [ - sinResult , cosResult , 0 , 0 ] ;
items1 [ 1 ] = items2 ;
2026-07-23 10:11:24 +00:00
items1 [ 2 ] = [ 0 , 0 , 1 , 0 ] ;
items1 [ 3 ] = [ 0 , 0 , 0 , 1 ] ;
2026-07-20 16:05:17 +00:00
return items1 ;
} else if ( "y" === str ) {
const items3 = [ cosResult , 0 , - sinResult , 0 ] ;
2026-07-23 10:11:24 +00:00
const items4 = [ items3 , [ 0 , 1 , 0 , 0 ] , , ] ;
2026-07-20 16:05:17 +00:00
const items5 = [ sinResult , 0 , cosResult , 0 ] ;
items4 [ 2 ] = items5 ;
2026-07-23 10:11:24 +00:00
items4 [ 3 ] = [ 0 , 0 , 0 , 1 ] ;
2026-07-20 16:05:17 +00:00
return items4 ;
} else if ( "x" === str ) {
2026-07-23 10:11:24 +00:00
const items6 = [ [ 1 , 0 , 0 , 0 ] , , , ] ;
const items7 = [ 0 , cosResult , sinResult , 0 ] ;
2026-07-20 16:05:17 +00:00
items6 [ 1 ] = items7 ;
2026-07-23 10:11:24 +00:00
const items8 = [ 0 , - sinResult , cosResult , 0 ] ;
2026-07-20 16:05:17 +00:00
items6 [ 2 ] = items8 ;
2026-07-23 10:11:24 +00:00
items6 [ 3 ] = [ 0 , 0 , 0 , 1 ] ;
2026-07-20 16:05:17 +00:00
return items6 ;
}
}
getRotationMatrix . _ _closure = { } ;
getRotationMatrix . _ _workletHash = 14367317296086 ;
getRotationMatrix . _ _initData = closure _17 ;
return getRotationMatrix ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
export const decomposeMatrixIntoMatricesAndAngles = ( ( ) => {
2026-07-20 16:05:17 +00:00
function decomposeMatrixIntoMatricesAndAngles ( toValue ) {
let scaleMatrix ;
let skewMatrix ;
let translationMatrix ;
2026-07-23 10:11:24 +00:00
const tmp = outer1 _35 ( toValue ) ;
2026-07-20 16:05:17 +00:00
const rotationMatrix = tmp . rotationMatrix ;
( { scaleMatrix , translationMatrix , skewMatrix } = tmp ) ;
let num = Math . asin ( tmp2 ) ;
if ( 1 !== - rotationMatrix [ 0 ] [ 2 ] ) {
if ( - 1 !== tmp2 ) {
const _Math = Math ;
let num3 = Math . atan2 ( rotationMatrix [ 0 ] [ 1 ] , rotationMatrix [ 0 ] [ 0 ] ) ;
const _Math2 = Math ;
let num4 = Math . atan2 ( rotationMatrix [ 1 ] [ 2 ] , rotationMatrix [ 2 ] [ 2 ] ) ;
}
const obj = { scaleMatrix , rotationMatrix , translationMatrix , skewMatrix } ;
if ( ! num4 ) {
num4 = 0 ;
}
obj . rx = num4 ;
if ( ! num ) {
num = 0 ;
}
obj . ry = num ;
if ( ! num3 ) {
num3 = 0 ;
}
obj . rz = num3 ;
return obj ;
}
num4 = Math . atan2 ( tmp2 * rotationMatrix [ 0 ] [ 1 ] , tmp2 * rotationMatrix [ 0 ] [ 2 ] ) ;
num3 = 0 ;
}
2026-07-23 10:11:24 +00:00
decomposeMatrixIntoMatricesAndAngles . _ _closure = { decomposeMatrix : closure _35 } ;
2026-07-20 16:05:17 +00:00
decomposeMatrixIntoMatricesAndAngles . _ _workletHash = 633682731757 ;
decomposeMatrixIntoMatricesAndAngles . _ _initData = closure _36 ;
return decomposeMatrixIntoMatricesAndAngles ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;