园林绿化
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

29 lines
27 KiB

/**
* @license
* Cesium - https://github.com/CesiumGS/cesium
* Version 1.140.0
*
* Copyright 2011-2022 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
*/
import{a as z1}from"./chunk-422SYBQS.js";import{a as L,b as u,c as j1}from"./chunk-XXWWJ3QU.js";import{a as F}from"./chunk-N6SIW7ZL.js";import{a as g,b as p}from"./chunk-K35RPNUR.js";import{e as U}from"./chunk-RTRJ3LVQ.js";var P=class c{constructor(n,o,y,O){this.x=n??0,this.y=o??0,this.z=y??0,this.w=O??0}static fromElements(n,o,y,O,f){return U(f)?(f.x=n,f.y=o,f.z=y,f.w=O,f):new c(n,o,y,O)}static fromColor(n,o){return p.typeOf.object("color",n),U(o)?(o.x=n.red,o.y=n.green,o.z=n.blue,o.w=n.alpha,o):new c(n.red,n.green,n.blue,n.alpha)}static clone(n,o){if(U(n))return U(o)?(o.x=n.x,o.y=n.y,o.z=n.z,o.w=n.w,o):new c(n.x,n.y,n.z,n.w)}static pack(n,o,y){return p.typeOf.object("value",n),p.defined("array",o),y=y??0,o[y++]=n.x,o[y++]=n.y,o[y++]=n.z,o[y]=n.w,o}static unpack(n,o,y){return p.defined("array",n),o=o??0,U(y)||(y=new c),y.x=n[o++],y.y=n[o++],y.z=n[o++],y.w=n[o],y}static packArray(n,o){p.defined("array",n);let y=n.length,O=y*4;if(!U(o))o=new Array(O);else{if(!Array.isArray(o)&&o.length!==O)throw new g("If result is a typed array, it must have exactly array.length * 4 elements");o.length!==O&&(o.length=O)}for(let f=0;f<y;++f)c.pack(n[f],o,f*4);return o}static unpackArray(n,o){if(p.defined("array",n),p.typeOf.number.greaterThanOrEquals("array.length",n.length,4),n.length%4!==0)throw new g("array length must be a multiple of 4.");let y=n.length;U(o)?o.length=y/4:o=new Array(y/4);for(let O=0;O<y;O+=4){let f=O/4;o[f]=c.unpack(n,O,o[f])}return o}static maximumComponent(n){return p.typeOf.object("cartesian",n),Math.max(n.x,n.y,n.z,n.w)}static minimumComponent(n){return p.typeOf.object("cartesian",n),Math.min(n.x,n.y,n.z,n.w)}static minimumByComponent(n,o,y){return p.typeOf.object("first",n),p.typeOf.object("second",o),p.typeOf.object("result",y),y.x=Math.min(n.x,o.x),y.y=Math.min(n.y,o.y),y.z=Math.min(n.z,o.z),y.w=Math.min(n.w,o.w),y}static maximumByComponent(n,o,y){return p.typeOf.object("first",n),p.typeOf.object("second",o),p.typeOf.object("result",y),y.x=Math.max(n.x,o.x),y.y=Math.max(n.y,o.y),y.z=Math.max(n.z,o.z),y.w=Math.max(n.w,o.w),y}static clamp(n,o,y,O){p.typeOf.object("value",n),p.typeOf.object("min",o),p.typeOf.object("max",y),p.typeOf.object("result",O);let f=F.clamp(n.x,o.x,y.x),w=F.clamp(n.y,o.y,y.y),j=F.clamp(n.z,o.z,y.z),z=F.clamp(n.w,o.w,y.w);return O.x=f,O.y=w,O.z=j,O.w=z,O}static magnitudeSquared(n){return p.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y+n.z*n.z+n.w*n.w}static magnitude(n){return Math.sqrt(c.magnitudeSquared(n))}static distance(n,o){return p.typeOf.object("left",n),p.typeOf.object("right",o),c.subtract(n,o,l),c.magnitude(l)}static distanceSquared(n,o){return p.typeOf.object("left",n),p.typeOf.object("right",o),c.subtract(n,o,l),c.magnitudeSquared(l)}static normalize(n,o){p.typeOf.object("cartesian",n),p.typeOf.object("result",o);let y=c.magnitude(n);if(o.x=n.x/y,o.y=n.y/y,o.z=n.z/y,o.w=n.w/y,isNaN(o.x)||isNaN(o.y)||isNaN(o.z)||isNaN(o.w))throw new g("normalized result is not a number");return o}static dot(n,o){return p.typeOf.object("left",n),p.typeOf.object("right",o),n.x*o.x+n.y*o.y+n.z*o.z+n.w*o.w}static multiplyComponents(n,o,y){return p.typeOf.object("left",n),p.typeOf.object("right",o),p.typeOf.object("result",y),y.x=n.x*o.x,y.y=n.y*o.y,y.z=n.z*o.z,y.w=n.w*o.w,y}static divideComponents(n,o,y){return p.typeOf.object("left",n),p.typeOf.object("right",o),p.typeOf.object("result",y),y.x=n.x/o.x,y.y=n.y/o.y,y.z=n.z/o.z,y.w=n.w/o.w,y}static add(n,o,y){return p.typeOf.object("left",n),p.typeOf.object("right",o),p.typeOf.object("result",y),y.x=n.x+o.x,y.y=n.y+o.y,y.z=n.z+o.z,y.w=n.w+o.w,y}static subtract(n,o,y){return p.typeOf.object("left",n),p.typeOf.object("right",o),p.typeOf.object("result",y),y.x=n.x-o.x,y.y=n.y-o.y,y.z=n.z-o.z,y.w=n.w-o.w,y}static multiplyByScalar(n,o,y){return p.typeOf.object("cartesian",n),p.typeOf.number("scalar",o),p.typeOf.object("result",y),y.x=n.x*o,y.y=n.y*o,y.z=n.z*o,y.w=n.w*o,y}static divideByScalar(n,o,y){return p.typeOf.object("cartesian",n),p.typeOf.number("scalar",o),p.typeOf.object("result",y),y.x=n.x/o,y.y=n.y/o,y.z=n.z/o,y.w=n.w/o,y}static negate(n,o){return p.typeOf.object("cartesian",n),p.typeOf.object("result",o),o.x=-n.x,o.y=-n.y,o.z=-n.z,o.w=-n.w,o}static abs(n,o){return p.typeOf.object("cartesian",n),p.typeOf.object("result",o),o.x=Math.abs(n.x),o.y=Math.abs(n.y),o.z=Math.abs(n.z),o.w=Math.abs(n.w),o}static lerp(n,o,y,O){return p.typeOf.object("start",n),p.typeOf.object("end",o),p.typeOf.number("t",y),p.typeOf.object("result",O),c.multiplyByScalar(o,y,h1),O=c.multiplyByScalar(n,1-y,O),c.add(h1,O,O)}static mostOrthogonalAxis(n,o){p.typeOf.object("cartesian",n),p.typeOf.object("result",o);let y=c.normalize(n,E1);return c.abs(y,y),y.x<=y.y?y.x<=y.z?y.x<=y.w?o=c.clone(c.UNIT_X,o):o=c.clone(c.UNIT_W,o):y.z<=y.w?o=c.clone(c.UNIT_Z,o):o=c.clone(c.UNIT_W,o):y.y<=y.z?y.y<=y.w?o=c.clone(c.UNIT_Y,o):o=c.clone(c.UNIT_W,o):y.z<=y.w?o=c.clone(c.UNIT_Z,o):o=c.clone(c.UNIT_W,o),o}static equals(n,o){return n===o||U(n)&&U(o)&&n.x===o.x&&n.y===o.y&&n.z===o.z&&n.w===o.w}static equalsArray(n,o,y){return n.x===o[y]&&n.y===o[y+1]&&n.z===o[y+2]&&n.w===o[y+3]}static equalsEpsilon(n,o,y,O){return n===o||U(n)&&U(o)&&F.equalsEpsilon(n.x,o.x,y,O)&&F.equalsEpsilon(n.y,o.y,y,O)&&F.equalsEpsilon(n.z,o.z,y,O)&&F.equalsEpsilon(n.w,o.w,y,O)}clone(n){return c.clone(this,n)}equals(n){return c.equals(this,n)}equalsEpsilon(n,o,y){return c.equalsEpsilon(this,n,o,y)}toString(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`}static packFloat(n,o){return p.typeOf.number("value",n),U(o)||(o=new c),b1[0]=n,R1?(o.x=D[0],o.y=D[1],o.z=D[2],o.w=D[3]):(o.x=D[3],o.y=D[2],o.z=D[1],o.w=D[0]),o}static unpackFloat(n){return p.typeOf.object("packedFloat",n),R1?(D[0]=n.x,D[1]=n.y,D[2]=n.z,D[3]=n.w):(D[0]=n.w,D[1]=n.z,D[2]=n.y,D[3]=n.x),b1[0]}};P.packedLength=4;P.fromArray=P.unpack;var l=new P,h1=new P,E1=new P;P.ZERO=Object.freeze(new P(0,0,0,0));P.ONE=Object.freeze(new P(1,1,1,1));P.UNIT_X=Object.freeze(new P(1,0,0,0));P.UNIT_Y=Object.freeze(new P(0,1,0,0));P.UNIT_Z=Object.freeze(new P(0,0,1,0));P.UNIT_W=Object.freeze(new P(0,0,0,1));var b1=new Float32Array(1),D=new Uint8Array(b1.buffer),U1=new Uint32Array([287454020]),S1=new Uint8Array(U1.buffer),R1=S1[0]===68,r=P;function b(c,n,o,y,O,f,w,j,z,h,R,M,T,C,q,N){this[0]=c??0,this[1]=O??0,this[2]=z??0,this[3]=T??0,this[4]=n??0,this[5]=f??0,this[6]=h??0,this[7]=C??0,this[8]=o??0,this[9]=w??0,this[10]=R??0,this[11]=q??0,this[12]=y??0,this[13]=j??0,this[14]=M??0,this[15]=N??0}b.packedLength=16;b.pack=function(c,n,o){return p.typeOf.object("value",c),p.defined("array",n),o=o??0,n[o++]=c[0],n[o++]=c[1],n[o++]=c[2],n[o++]=c[3],n[o++]=c[4],n[o++]=c[5],n[o++]=c[6],n[o++]=c[7],n[o++]=c[8],n[o++]=c[9],n[o++]=c[10],n[o++]=c[11],n[o++]=c[12],n[o++]=c[13],n[o++]=c[14],n[o]=c[15],n};b.unpack=function(c,n,o){return p.defined("array",c),n=n??0,U(o)||(o=new b),o[0]=c[n++],o[1]=c[n++],o[2]=c[n++],o[3]=c[n++],o[4]=c[n++],o[5]=c[n++],o[6]=c[n++],o[7]=c[n++],o[8]=c[n++],o[9]=c[n++],o[10]=c[n++],o[11]=c[n++],o[12]=c[n++],o[13]=c[n++],o[14]=c[n++],o[15]=c[n],o};b.packArray=function(c,n){p.defined("array",c);let o=c.length,y=o*16;if(!U(n))n=new Array(y);else{if(!Array.isArray(n)&&n.length!==y)throw new g("If result is a typed array, it must have exactly array.length * 16 elements");n.length!==y&&(n.length=y)}for(let O=0;O<o;++O)b.pack(c[O],n,O*16);return n};b.unpackArray=function(c,n){if(p.defined("array",c),p.typeOf.number.greaterThanOrEquals("array.length",c.length,16),c.length%16!==0)throw new g("array length must be a multiple of 16.");let o=c.length;U(n)?n.length=o/16:n=new Array(o/16);for(let y=0;y<o;y+=16){let O=y/16;n[O]=b.unpack(c,y,n[O])}return n};b.clone=function(c,n){if(U(c))return U(n)?(n[0]=c[0],n[1]=c[1],n[2]=c[2],n[3]=c[3],n[4]=c[4],n[5]=c[5],n[6]=c[6],n[7]=c[7],n[8]=c[8],n[9]=c[9],n[10]=c[10],n[11]=c[11],n[12]=c[12],n[13]=c[13],n[14]=c[14],n[15]=c[15],n):new b(c[0],c[4],c[8],c[12],c[1],c[5],c[9],c[13],c[2],c[6],c[10],c[14],c[3],c[7],c[11],c[15])};b.fromArray=b.unpack;b.fromColumnMajorArray=function(c,n){return p.defined("values",c),b.clone(c,n)};b.fromRowMajorArray=function(c,n){return p.defined("values",c),U(n)?(n[0]=c[0],n[1]=c[4],n[2]=c[8],n[3]=c[12],n[4]=c[1],n[5]=c[5],n[6]=c[9],n[7]=c[13],n[8]=c[2],n[9]=c[6],n[10]=c[10],n[11]=c[14],n[12]=c[3],n[13]=c[7],n[14]=c[11],n[15]=c[15],n):new b(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15])};b.fromRotationTranslation=function(c,n,o){return p.typeOf.object("rotation",c),n=n??L.ZERO,U(o)?(o[0]=c[0],o[1]=c[1],o[2]=c[2],o[3]=0,o[4]=c[3],o[5]=c[4],o[6]=c[5],o[7]=0,o[8]=c[6],o[9]=c[7],o[10]=c[8],o[11]=0,o[12]=n.x,o[13]=n.y,o[14]=n.z,o[15]=1,o):new b(c[0],c[3],c[6],n.x,c[1],c[4],c[7],n.y,c[2],c[5],c[8],n.z,0,0,0,1)};b.fromTranslationQuaternionRotationScale=function(c,n,o,y){p.typeOf.object("translation",c),p.typeOf.object("rotation",n),p.typeOf.object("scale",o),U(y)||(y=new b);let O=o.x,f=o.y,w=o.z,j=n.x*n.x,z=n.x*n.y,h=n.x*n.z,R=n.x*n.w,M=n.y*n.y,T=n.y*n.z,C=n.y*n.w,q=n.z*n.z,N=n.z*n.w,E=n.w*n.w,S=j-M-q+E,d=2*(z-N),A=2*(h+C),W=2*(z+N),$=-j+M-q+E,Z=2*(T-R),B=2*(h-C),Y=2*(T+R),k=-j-M+q+E;return y[0]=S*O,y[1]=W*O,y[2]=B*O,y[3]=0,y[4]=d*f,y[5]=$*f,y[6]=Y*f,y[7]=0,y[8]=A*w,y[9]=Z*w,y[10]=k*w,y[11]=0,y[12]=c.x,y[13]=c.y,y[14]=c.z,y[15]=1,y};b.fromTranslationRotationScale=function(c,n){return p.typeOf.object("translationRotationScale",c),b.fromTranslationQuaternionRotationScale(c.translation,c.rotation,c.scale,n)};b.fromTranslation=function(c,n){return p.typeOf.object("translation",c),b.fromRotationTranslation(u.IDENTITY,c,n)};b.fromScale=function(c,n){return p.typeOf.object("scale",c),U(n)?(n[0]=c.x,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=c.y,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=c.z,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new b(c.x,0,0,0,0,c.y,0,0,0,0,c.z,0,0,0,0,1)};b.fromUniformScale=function(c,n){return p.typeOf.number("scale",c),U(n)?(n[0]=c,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=c,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=c,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new b(c,0,0,0,0,c,0,0,0,0,c,0,0,0,0,1)};b.fromRotation=function(c,n){return p.typeOf.object("rotation",c),U(n)||(n=new b),n[0]=c[0],n[1]=c[1],n[2]=c[2],n[3]=0,n[4]=c[3],n[5]=c[4],n[6]=c[5],n[7]=0,n[8]=c[6],n[9]=c[7],n[10]=c[8],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n};var m=new L,e=new L,a=new L;b.fromCamera=function(c,n){p.typeOf.object("camera",c);let o=c.position,y=c.direction,O=c.up;p.typeOf.object("camera.position",o),p.typeOf.object("camera.direction",y),p.typeOf.object("camera.up",O),L.normalize(y,m),L.normalize(L.cross(m,O,e),e),L.normalize(L.cross(e,m,a),a);let f=e.x,w=e.y,j=e.z,z=m.x,h=m.y,R=m.z,M=a.x,T=a.y,C=a.z,q=o.x,N=o.y,E=o.z,S=f*-q+w*-N+j*-E,d=M*-q+T*-N+C*-E,A=z*q+h*N+R*E;return U(n)?(n[0]=f,n[1]=M,n[2]=-z,n[3]=0,n[4]=w,n[5]=T,n[6]=-h,n[7]=0,n[8]=j,n[9]=C,n[10]=-R,n[11]=0,n[12]=S,n[13]=d,n[14]=A,n[15]=1,n):new b(f,w,j,S,M,T,C,d,-z,-h,-R,A,0,0,0,1)};b.computePerspectiveFieldOfView=function(c,n,o,y,O){p.typeOf.number.greaterThan("fovY",c,0),p.typeOf.number.lessThan("fovY",c,Math.PI),p.typeOf.number.greaterThan("near",o,0),p.typeOf.number.greaterThan("far",y,0),p.typeOf.object("result",O);let w=1/Math.tan(c*.5),j=w/n,z=(y+o)/(o-y),h=2*y*o/(o-y);return O[0]=j,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=w,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[10]=z,O[11]=-1,O[12]=0,O[13]=0,O[14]=h,O[15]=0,O};b.computeOrthographicOffCenter=function(c,n,o,y,O,f,w){p.typeOf.number("left",c),p.typeOf.number("right",n),p.typeOf.number("bottom",o),p.typeOf.number("top",y),p.typeOf.number("near",O),p.typeOf.number("far",f),p.typeOf.object("result",w);let j=1/(n-c),z=1/(y-o),h=1/(f-O),R=-(n+c)*j,M=-(y+o)*z,T=-(f+O)*h;return j*=2,z*=2,h*=-2,w[0]=j,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=z,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=h,w[11]=0,w[12]=R,w[13]=M,w[14]=T,w[15]=1,w};b.computePerspectiveOffCenter=function(c,n,o,y,O,f,w){p.typeOf.number("left",c),p.typeOf.number("right",n),p.typeOf.number("bottom",o),p.typeOf.number("top",y),p.typeOf.number("near",O),p.typeOf.number("far",f),p.typeOf.object("result",w);let j=2*O/(n-c),z=2*O/(y-o),h=(n+c)/(n-c),R=(y+o)/(y-o),M=-(f+O)/(f-O),T=-1,C=-2*f*O/(f-O);return w[0]=j,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=z,w[6]=0,w[7]=0,w[8]=h,w[9]=R,w[10]=M,w[11]=T,w[12]=0,w[13]=0,w[14]=C,w[15]=0,w};b.computeInfinitePerspectiveOffCenter=function(c,n,o,y,O,f){p.typeOf.number("left",c),p.typeOf.number("right",n),p.typeOf.number("bottom",o),p.typeOf.number("top",y),p.typeOf.number("near",O),p.typeOf.object("result",f);let w=2*O/(n-c),j=2*O/(y-o),z=(n+c)/(n-c),h=(y+o)/(y-o),R=-1,M=-1,T=-2*O;return f[0]=w,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=j,f[6]=0,f[7]=0,f[8]=z,f[9]=h,f[10]=R,f[11]=M,f[12]=0,f[13]=0,f[14]=T,f[15]=0,f};b.computeViewportTransformation=function(c,n,o,y){U(y)||(y=new b),c=c??j1.EMPTY_OBJECT;let O=c.x??0,f=c.y??0,w=c.width??0,j=c.height??0;n=n??0,o=o??1;let z=w*.5,h=j*.5,R=(o-n)*.5,M=z,T=h,C=R,q=O+z,N=f+h,E=n+R,S=1;return y[0]=M,y[1]=0,y[2]=0,y[3]=0,y[4]=0,y[5]=T,y[6]=0,y[7]=0,y[8]=0,y[9]=0,y[10]=C,y[11]=0,y[12]=q,y[13]=N,y[14]=E,y[15]=S,y};b.computeView=function(c,n,o,y,O){return p.typeOf.object("position",c),p.typeOf.object("direction",n),p.typeOf.object("up",o),p.typeOf.object("right",y),p.typeOf.object("result",O),O[0]=y.x,O[1]=o.x,O[2]=-n.x,O[3]=0,O[4]=y.y,O[5]=o.y,O[6]=-n.y,O[7]=0,O[8]=y.z,O[9]=o.z,O[10]=-n.z,O[11]=0,O[12]=-L.dot(y,c),O[13]=-L.dot(o,c),O[14]=L.dot(n,c),O[15]=1,O};b.toArray=function(c,n){return p.typeOf.object("matrix",c),U(n)?(n[0]=c[0],n[1]=c[1],n[2]=c[2],n[3]=c[3],n[4]=c[4],n[5]=c[5],n[6]=c[6],n[7]=c[7],n[8]=c[8],n[9]=c[9],n[10]=c[10],n[11]=c[11],n[12]=c[12],n[13]=c[13],n[14]=c[14],n[15]=c[15],n):[c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15]]};b.getElementIndex=function(c,n){return p.typeOf.number.greaterThanOrEquals("row",n,0),p.typeOf.number.lessThanOrEquals("row",n,3),p.typeOf.number.greaterThanOrEquals("column",c,0),p.typeOf.number.lessThanOrEquals("column",c,3),c*4+n};b.getColumn=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.number.greaterThanOrEquals("index",n,0),p.typeOf.number.lessThanOrEquals("index",n,3),p.typeOf.object("result",o);let y=n*4,O=c[y],f=c[y+1],w=c[y+2],j=c[y+3];return o.x=O,o.y=f,o.z=w,o.w=j,o};b.setColumn=function(c,n,o,y){p.typeOf.object("matrix",c),p.typeOf.number.greaterThanOrEquals("index",n,0),p.typeOf.number.lessThanOrEquals("index",n,3),p.typeOf.object("cartesian",o),p.typeOf.object("result",y),y=b.clone(c,y);let O=n*4;return y[O]=o.x,y[O+1]=o.y,y[O+2]=o.z,y[O+3]=o.w,y};b.getRow=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.number.greaterThanOrEquals("index",n,0),p.typeOf.number.lessThanOrEquals("index",n,3),p.typeOf.object("result",o);let y=c[n],O=c[n+4],f=c[n+8],w=c[n+12];return o.x=y,o.y=O,o.z=f,o.w=w,o};b.setRow=function(c,n,o,y){return p.typeOf.object("matrix",c),p.typeOf.number.greaterThanOrEquals("index",n,0),p.typeOf.number.lessThanOrEquals("index",n,3),p.typeOf.object("cartesian",o),p.typeOf.object("result",y),y=b.clone(c,y),y[n]=o.x,y[n+4]=o.y,y[n+8]=o.z,y[n+12]=o.w,y};b.setTranslation=function(c,n,o){return p.typeOf.object("matrix",c),p.typeOf.object("translation",n),p.typeOf.object("result",o),o[0]=c[0],o[1]=c[1],o[2]=c[2],o[3]=c[3],o[4]=c[4],o[5]=c[5],o[6]=c[6],o[7]=c[7],o[8]=c[8],o[9]=c[9],o[10]=c[10],o[11]=c[11],o[12]=n.x,o[13]=n.y,o[14]=n.z,o[15]=c[15],o};var d1=new L;b.setScale=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("scale",n),p.typeOf.object("result",o);let y=b.getScale(c,d1),O=n.x/y.x,f=n.y/y.y,w=n.z/y.z;return o[0]=c[0]*O,o[1]=c[1]*O,o[2]=c[2]*O,o[3]=c[3],o[4]=c[4]*f,o[5]=c[5]*f,o[6]=c[6]*f,o[7]=c[7],o[8]=c[8]*w,o[9]=c[9]*w,o[10]=c[10]*w,o[11]=c[11],o[12]=c[12],o[13]=c[13],o[14]=c[14],o[15]=c[15],o};var A1=new L;b.setUniformScale=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.number("scale",n),p.typeOf.object("result",o);let y=b.getScale(c,A1),O=n/y.x,f=n/y.y,w=n/y.z;return o[0]=c[0]*O,o[1]=c[1]*O,o[2]=c[2]*O,o[3]=c[3],o[4]=c[4]*f,o[5]=c[5]*f,o[6]=c[6]*f,o[7]=c[7],o[8]=c[8]*w,o[9]=c[9]*w,o[10]=c[10]*w,o[11]=c[11],o[12]=c[12],o[13]=c[13],o[14]=c[14],o[15]=c[15],o};var w1=new L;b.getScale=function(c,n){return p.typeOf.object("matrix",c),p.typeOf.object("result",n),n.x=L.magnitude(L.fromElements(c[0],c[1],c[2],w1)),n.y=L.magnitude(L.fromElements(c[4],c[5],c[6],w1)),n.z=L.magnitude(L.fromElements(c[8],c[9],c[10],w1)),n};var M1=new L;b.getMaximumScale=function(c){return b.getScale(c,M1),L.maximumComponent(M1)};var L1=new L;b.setRotation=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("result",o);let y=b.getScale(c,L1);return o[0]=n[0]*y.x,o[1]=n[1]*y.x,o[2]=n[2]*y.x,o[3]=c[3],o[4]=n[3]*y.y,o[5]=n[4]*y.y,o[6]=n[5]*y.y,o[7]=c[7],o[8]=n[6]*y.z,o[9]=n[7]*y.z,o[10]=n[8]*y.z,o[11]=c[11],o[12]=c[12],o[13]=c[13],o[14]=c[14],o[15]=c[15],o};var W1=new L;b.getRotation=function(c,n){p.typeOf.object("matrix",c),p.typeOf.object("result",n);let o=b.getScale(c,W1);return n[0]=c[0]/o.x,n[1]=c[1]/o.x,n[2]=c[2]/o.x,n[3]=c[4]/o.y,n[4]=c[5]/o.y,n[5]=c[6]/o.y,n[6]=c[8]/o.z,n[7]=c[9]/o.z,n[8]=c[10]/o.z,n};b.multiply=function(c,n,o){p.typeOf.object("left",c),p.typeOf.object("right",n),p.typeOf.object("result",o);let y=c[0],O=c[1],f=c[2],w=c[3],j=c[4],z=c[5],h=c[6],R=c[7],M=c[8],T=c[9],C=c[10],q=c[11],N=c[12],E=c[13],S=c[14],d=c[15],A=n[0],W=n[1],$=n[2],Z=n[3],B=n[4],Y=n[5],k=n[6],V=n[7],Q=n[8],H=n[9],J=n[10],G=n[11],K=n[12],I=n[13],_=n[14],v=n[15],t=y*A+j*W+M*$+N*Z,x=O*A+z*W+T*$+E*Z,i=f*A+h*W+C*$+S*Z,s=w*A+R*W+q*$+d*Z,n1=y*B+j*Y+M*k+N*V,c1=O*B+z*Y+T*k+E*V,o1=f*B+h*Y+C*k+S*V,y1=w*B+R*Y+q*k+d*V,p1=y*Q+j*H+M*J+N*G,O1=O*Q+z*H+T*J+E*G,f1=f*Q+h*H+C*J+S*G,X=w*Q+R*H+q*J+d*G,T1=y*K+j*I+M*_+N*v,C1=O*K+z*I+T*_+E*v,N1=f*K+h*I+C*_+S*v,q1=w*K+R*I+q*_+d*v;return o[0]=t,o[1]=x,o[2]=i,o[3]=s,o[4]=n1,o[5]=c1,o[6]=o1,o[7]=y1,o[8]=p1,o[9]=O1,o[10]=f1,o[11]=X,o[12]=T1,o[13]=C1,o[14]=N1,o[15]=q1,o};b.add=function(c,n,o){return p.typeOf.object("left",c),p.typeOf.object("right",n),p.typeOf.object("result",o),o[0]=c[0]+n[0],o[1]=c[1]+n[1],o[2]=c[2]+n[2],o[3]=c[3]+n[3],o[4]=c[4]+n[4],o[5]=c[5]+n[5],o[6]=c[6]+n[6],o[7]=c[7]+n[7],o[8]=c[8]+n[8],o[9]=c[9]+n[9],o[10]=c[10]+n[10],o[11]=c[11]+n[11],o[12]=c[12]+n[12],o[13]=c[13]+n[13],o[14]=c[14]+n[14],o[15]=c[15]+n[15],o};b.subtract=function(c,n,o){return p.typeOf.object("left",c),p.typeOf.object("right",n),p.typeOf.object("result",o),o[0]=c[0]-n[0],o[1]=c[1]-n[1],o[2]=c[2]-n[2],o[3]=c[3]-n[3],o[4]=c[4]-n[4],o[5]=c[5]-n[5],o[6]=c[6]-n[6],o[7]=c[7]-n[7],o[8]=c[8]-n[8],o[9]=c[9]-n[9],o[10]=c[10]-n[10],o[11]=c[11]-n[11],o[12]=c[12]-n[12],o[13]=c[13]-n[13],o[14]=c[14]-n[14],o[15]=c[15]-n[15],o};b.multiplyTransformation=function(c,n,o){p.typeOf.object("left",c),p.typeOf.object("right",n),p.typeOf.object("result",o);let y=c[0],O=c[1],f=c[2],w=c[4],j=c[5],z=c[6],h=c[8],R=c[9],M=c[10],T=c[12],C=c[13],q=c[14],N=n[0],E=n[1],S=n[2],d=n[4],A=n[5],W=n[6],$=n[8],Z=n[9],B=n[10],Y=n[12],k=n[13],V=n[14],Q=y*N+w*E+h*S,H=O*N+j*E+R*S,J=f*N+z*E+M*S,G=y*d+w*A+h*W,K=O*d+j*A+R*W,I=f*d+z*A+M*W,_=y*$+w*Z+h*B,v=O*$+j*Z+R*B,t=f*$+z*Z+M*B,x=y*Y+w*k+h*V+T,i=O*Y+j*k+R*V+C,s=f*Y+z*k+M*V+q;return o[0]=Q,o[1]=H,o[2]=J,o[3]=0,o[4]=G,o[5]=K,o[6]=I,o[7]=0,o[8]=_,o[9]=v,o[10]=t,o[11]=0,o[12]=x,o[13]=i,o[14]=s,o[15]=1,o};b.multiplyByMatrix3=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("rotation",n),p.typeOf.object("result",o);let y=c[0],O=c[1],f=c[2],w=c[4],j=c[5],z=c[6],h=c[8],R=c[9],M=c[10],T=n[0],C=n[1],q=n[2],N=n[3],E=n[4],S=n[5],d=n[6],A=n[7],W=n[8],$=y*T+w*C+h*q,Z=O*T+j*C+R*q,B=f*T+z*C+M*q,Y=y*N+w*E+h*S,k=O*N+j*E+R*S,V=f*N+z*E+M*S,Q=y*d+w*A+h*W,H=O*d+j*A+R*W,J=f*d+z*A+M*W;return o[0]=$,o[1]=Z,o[2]=B,o[3]=0,o[4]=Y,o[5]=k,o[6]=V,o[7]=0,o[8]=Q,o[9]=H,o[10]=J,o[11]=0,o[12]=c[12],o[13]=c[13],o[14]=c[14],o[15]=c[15],o};b.multiplyByTranslation=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("translation",n),p.typeOf.object("result",o);let y=n.x,O=n.y,f=n.z,w=y*c[0]+O*c[4]+f*c[8]+c[12],j=y*c[1]+O*c[5]+f*c[9]+c[13],z=y*c[2]+O*c[6]+f*c[10]+c[14];return o[0]=c[0],o[1]=c[1],o[2]=c[2],o[3]=c[3],o[4]=c[4],o[5]=c[5],o[6]=c[6],o[7]=c[7],o[8]=c[8],o[9]=c[9],o[10]=c[10],o[11]=c[11],o[12]=w,o[13]=j,o[14]=z,o[15]=c[15],o};b.multiplyByScale=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("scale",n),p.typeOf.object("result",o);let y=n.x,O=n.y,f=n.z;return y===1&&O===1&&f===1?b.clone(c,o):(o[0]=y*c[0],o[1]=y*c[1],o[2]=y*c[2],o[3]=c[3],o[4]=O*c[4],o[5]=O*c[5],o[6]=O*c[6],o[7]=c[7],o[8]=f*c[8],o[9]=f*c[9],o[10]=f*c[10],o[11]=c[11],o[12]=c[12],o[13]=c[13],o[14]=c[14],o[15]=c[15],o)};b.multiplyByUniformScale=function(c,n,o){return p.typeOf.object("matrix",c),p.typeOf.number("scale",n),p.typeOf.object("result",o),o[0]=c[0]*n,o[1]=c[1]*n,o[2]=c[2]*n,o[3]=c[3],o[4]=c[4]*n,o[5]=c[5]*n,o[6]=c[6]*n,o[7]=c[7],o[8]=c[8]*n,o[9]=c[9]*n,o[10]=c[10]*n,o[11]=c[11],o[12]=c[12],o[13]=c[13],o[14]=c[14],o[15]=c[15],o};b.multiplyByVector=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("cartesian",n),p.typeOf.object("result",o);let y=n.x,O=n.y,f=n.z,w=n.w,j=c[0]*y+c[4]*O+c[8]*f+c[12]*w,z=c[1]*y+c[5]*O+c[9]*f+c[13]*w,h=c[2]*y+c[6]*O+c[10]*f+c[14]*w,R=c[3]*y+c[7]*O+c[11]*f+c[15]*w;return o.x=j,o.y=z,o.z=h,o.w=R,o};b.multiplyByPointAsVector=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("cartesian",n),p.typeOf.object("result",o);let y=n.x,O=n.y,f=n.z,w=c[0]*y+c[4]*O+c[8]*f,j=c[1]*y+c[5]*O+c[9]*f,z=c[2]*y+c[6]*O+c[10]*f;return o.x=w,o.y=j,o.z=z,o};b.multiplyByPoint=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("cartesian",n),p.typeOf.object("result",o);let y=n.x,O=n.y,f=n.z,w=c[0]*y+c[4]*O+c[8]*f+c[12],j=c[1]*y+c[5]*O+c[9]*f+c[13],z=c[2]*y+c[6]*O+c[10]*f+c[14];return o.x=w,o.y=j,o.z=z,o};b.multiplyByScalar=function(c,n,o){return p.typeOf.object("matrix",c),p.typeOf.number("scalar",n),p.typeOf.object("result",o),o[0]=c[0]*n,o[1]=c[1]*n,o[2]=c[2]*n,o[3]=c[3]*n,o[4]=c[4]*n,o[5]=c[5]*n,o[6]=c[6]*n,o[7]=c[7]*n,o[8]=c[8]*n,o[9]=c[9]*n,o[10]=c[10]*n,o[11]=c[11]*n,o[12]=c[12]*n,o[13]=c[13]*n,o[14]=c[14]*n,o[15]=c[15]*n,o};b.negate=function(c,n){return p.typeOf.object("matrix",c),p.typeOf.object("result",n),n[0]=-c[0],n[1]=-c[1],n[2]=-c[2],n[3]=-c[3],n[4]=-c[4],n[5]=-c[5],n[6]=-c[6],n[7]=-c[7],n[8]=-c[8],n[9]=-c[9],n[10]=-c[10],n[11]=-c[11],n[12]=-c[12],n[13]=-c[13],n[14]=-c[14],n[15]=-c[15],n};b.transpose=function(c,n){p.typeOf.object("matrix",c),p.typeOf.object("result",n);let o=c[1],y=c[2],O=c[3],f=c[6],w=c[7],j=c[11];return n[0]=c[0],n[1]=c[4],n[2]=c[8],n[3]=c[12],n[4]=o,n[5]=c[5],n[6]=c[9],n[7]=c[13],n[8]=y,n[9]=f,n[10]=c[10],n[11]=c[14],n[12]=O,n[13]=w,n[14]=j,n[15]=c[15],n};b.abs=function(c,n){return p.typeOf.object("matrix",c),p.typeOf.object("result",n),n[0]=Math.abs(c[0]),n[1]=Math.abs(c[1]),n[2]=Math.abs(c[2]),n[3]=Math.abs(c[3]),n[4]=Math.abs(c[4]),n[5]=Math.abs(c[5]),n[6]=Math.abs(c[6]),n[7]=Math.abs(c[7]),n[8]=Math.abs(c[8]),n[9]=Math.abs(c[9]),n[10]=Math.abs(c[10]),n[11]=Math.abs(c[11]),n[12]=Math.abs(c[12]),n[13]=Math.abs(c[13]),n[14]=Math.abs(c[14]),n[15]=Math.abs(c[15]),n};b.equals=function(c,n){return c===n||U(c)&&U(n)&&c[12]===n[12]&&c[13]===n[13]&&c[14]===n[14]&&c[0]===n[0]&&c[1]===n[1]&&c[2]===n[2]&&c[4]===n[4]&&c[5]===n[5]&&c[6]===n[6]&&c[8]===n[8]&&c[9]===n[9]&&c[10]===n[10]&&c[3]===n[3]&&c[7]===n[7]&&c[11]===n[11]&&c[15]===n[15]};b.equalsEpsilon=function(c,n,o){return o=o??0,c===n||U(c)&&U(n)&&Math.abs(c[0]-n[0])<=o&&Math.abs(c[1]-n[1])<=o&&Math.abs(c[2]-n[2])<=o&&Math.abs(c[3]-n[3])<=o&&Math.abs(c[4]-n[4])<=o&&Math.abs(c[5]-n[5])<=o&&Math.abs(c[6]-n[6])<=o&&Math.abs(c[7]-n[7])<=o&&Math.abs(c[8]-n[8])<=o&&Math.abs(c[9]-n[9])<=o&&Math.abs(c[10]-n[10])<=o&&Math.abs(c[11]-n[11])<=o&&Math.abs(c[12]-n[12])<=o&&Math.abs(c[13]-n[13])<=o&&Math.abs(c[14]-n[14])<=o&&Math.abs(c[15]-n[15])<=o};b.getTranslation=function(c,n){return p.typeOf.object("matrix",c),p.typeOf.object("result",n),n.x=c[12],n.y=c[13],n.z=c[14],n};b.getMatrix3=function(c,n){return p.typeOf.object("matrix",c),p.typeOf.object("result",n),n[0]=c[0],n[1]=c[1],n[2]=c[2],n[3]=c[4],n[4]=c[5],n[5]=c[6],n[6]=c[8],n[7]=c[9],n[8]=c[10],n};var $1=new u,Z1=new u,B1=new r,Y1=new r(0,0,0,1);b.inverse=function(c,n){p.typeOf.object("matrix",c),p.typeOf.object("result",n);let o=c[0],y=c[4],O=c[8],f=c[12],w=c[1],j=c[5],z=c[9],h=c[13],R=c[2],M=c[6],T=c[10],C=c[14],q=c[3],N=c[7],E=c[11],S=c[15],d=T*S,A=C*E,W=M*S,$=C*N,Z=M*E,B=T*N,Y=R*S,k=C*q,V=R*E,Q=T*q,H=R*N,J=M*q,G=d*j+$*z+Z*h-(A*j+W*z+B*h),K=A*w+Y*z+Q*h-(d*w+k*z+V*h),I=W*w+k*j+H*h-($*w+Y*j+J*h),_=B*w+V*j+J*z-(Z*w+Q*j+H*z),v=A*y+W*O+B*f-(d*y+$*O+Z*f),t=d*o+k*O+V*f-(A*o+Y*O+Q*f),x=$*o+Y*y+J*f-(W*o+k*y+H*f),i=Z*o+Q*y+H*O-(B*o+V*y+J*O);d=O*h,A=f*z,W=y*h,$=f*j,Z=y*z,B=O*j,Y=o*h,k=f*w,V=o*z,Q=O*w,H=o*j,J=y*w;let s=d*N+$*E+Z*S-(A*N+W*E+B*S),n1=A*q+Y*E+Q*S-(d*q+k*E+V*S),c1=W*q+k*N+H*S-($*q+Y*N+J*S),o1=B*q+V*N+J*E-(Z*q+Q*N+H*E),y1=W*T+B*C+A*M-(Z*C+d*M+$*T),p1=V*C+d*R+k*T-(Y*T+Q*C+A*R),O1=Y*M+J*C+$*R-(H*C+W*R+k*M),f1=H*T+Z*R+Q*M-(V*M+J*T+B*R),X=o*G+y*K+O*I+f*_;if(Math.abs(X)<F.EPSILON21){if(u.equalsEpsilon(b.getMatrix3(c,$1),Z1,F.EPSILON7)&&r.equals(b.getRow(c,3,B1),Y1))return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-c[12],n[13]=-c[13],n[14]=-c[14],n[15]=1,n;throw new z1("matrix is not invertible because its determinate is zero.")}return X=1/X,n[0]=G*X,n[1]=K*X,n[2]=I*X,n[3]=_*X,n[4]=v*X,n[5]=t*X,n[6]=x*X,n[7]=i*X,n[8]=s*X,n[9]=n1*X,n[10]=c1*X,n[11]=o1*X,n[12]=y1*X,n[13]=p1*X,n[14]=O1*X,n[15]=f1*X,n};b.inverseTransformation=function(c,n){p.typeOf.object("matrix",c),p.typeOf.object("result",n);let o=c[0],y=c[1],O=c[2],f=c[4],w=c[5],j=c[6],z=c[8],h=c[9],R=c[10],M=c[12],T=c[13],C=c[14],q=-o*M-y*T-O*C,N=-f*M-w*T-j*C,E=-z*M-h*T-R*C;return n[0]=o,n[1]=f,n[2]=z,n[3]=0,n[4]=y,n[5]=w,n[6]=h,n[7]=0,n[8]=O,n[9]=j,n[10]=R,n[11]=0,n[12]=q,n[13]=N,n[14]=E,n[15]=1,n};var k1=new b;b.inverseTranspose=function(c,n){return p.typeOf.object("matrix",c),p.typeOf.object("result",n),b.inverse(b.transpose(c,k1),n)};b.IDENTITY=Object.freeze(new b(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1));b.ZERO=Object.freeze(new b(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));b.COLUMN0ROW0=0;b.COLUMN0ROW1=1;b.COLUMN0ROW2=2;b.COLUMN0ROW3=3;b.COLUMN1ROW0=4;b.COLUMN1ROW1=5;b.COLUMN1ROW2=6;b.COLUMN1ROW3=7;b.COLUMN2ROW0=8;b.COLUMN2ROW1=9;b.COLUMN2ROW2=10;b.COLUMN2ROW3=11;b.COLUMN3ROW0=12;b.COLUMN3ROW1=13;b.COLUMN3ROW2=14;b.COLUMN3ROW3=15;Object.defineProperties(b.prototype,{length:{get:function(){return b.packedLength}}});b.prototype.clone=function(c){return b.clone(this,c)};b.prototype.equals=function(c){return b.equals(this,c)};b.equalsArray=function(c,n,o){return c[0]===n[o]&&c[1]===n[o+1]&&c[2]===n[o+2]&&c[3]===n[o+3]&&c[4]===n[o+4]&&c[5]===n[o+5]&&c[6]===n[o+6]&&c[7]===n[o+7]&&c[8]===n[o+8]&&c[9]===n[o+9]&&c[10]===n[o+10]&&c[11]===n[o+11]&&c[12]===n[o+12]&&c[13]===n[o+13]&&c[14]===n[o+14]&&c[15]===n[o+15]};b.prototype.equalsEpsilon=function(c,n){return b.equalsEpsilon(this,c,n)};b.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var m1=b;export{r as a,m1 as b};