园林绿化
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.
 
 
 
 

28 lines
20 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 E}from"./chunk-N6SIW7ZL.js";import{a as S,b as y}from"./chunk-K35RPNUR.js";import{e as z}from"./chunk-RTRJ3LVQ.js";var m=class o{constructor(n,c,e){this.x=n??0,this.y=c??0,this.z=e??0}static fromSpherical(n,c){y.typeOf.object("spherical",n),z(c)||(c=new o);let e=n.clock,t=n.cone,f=n.magnitude??1,O=f*Math.sin(t);return c.x=O*Math.cos(e),c.y=O*Math.sin(e),c.z=f*Math.cos(t),c}static fromElements(n,c,e,t){return z(t)?(t.x=n,t.y=c,t.z=e,t):new o(n,c,e)}static clone(n,c){if(z(n))return z(c)?(c.x=n.x,c.y=n.y,c.z=n.z,c):new o(n.x,n.y,n.z)}static pack(n,c,e){return y.typeOf.object("value",n),y.defined("array",c),e=e??0,c[e++]=n.x,c[e++]=n.y,c[e]=n.z,c}static unpack(n,c,e){return y.defined("array",n),c=c??0,z(e)||(e=new o),e.x=n[c++],e.y=n[c++],e.z=n[c],e}static packArray(n,c){y.defined("array",n);let e=n.length,t=e*3;if(!z(c))c=new Array(t);else{if(!Array.isArray(c)&&c.length!==t)throw new S("If result is a typed array, it must have exactly array.length * 3 elements");c.length!==t&&(c.length=t)}for(let f=0;f<e;++f)o.pack(n[f],c,f*3);return c}static unpackArray(n,c){if(y.defined("array",n),y.typeOf.number.greaterThanOrEquals("array.length",n.length,3),n.length%3!==0)throw new S("array length must be a multiple of 3.");let e=n.length;z(c)?c.length=e/3:c=new Array(e/3);for(let t=0;t<e;t+=3){let f=t/3;c[f]=o.unpack(n,t,c[f])}return c}static maximumComponent(n){return y.typeOf.object("cartesian",n),Math.max(n.x,n.y,n.z)}static minimumComponent(n){return y.typeOf.object("cartesian",n),Math.min(n.x,n.y,n.z)}static minimumByComponent(n,c,e){return y.typeOf.object("first",n),y.typeOf.object("second",c),y.typeOf.object("result",e),e.x=Math.min(n.x,c.x),e.y=Math.min(n.y,c.y),e.z=Math.min(n.z,c.z),e}static maximumByComponent(n,c,e){return y.typeOf.object("first",n),y.typeOf.object("second",c),y.typeOf.object("result",e),e.x=Math.max(n.x,c.x),e.y=Math.max(n.y,c.y),e.z=Math.max(n.z,c.z),e}static clamp(n,c,e,t){y.typeOf.object("value",n),y.typeOf.object("min",c),y.typeOf.object("max",e),y.typeOf.object("result",t);let f=E.clamp(n.x,c.x,e.x),O=E.clamp(n.y,c.y,e.y),b=E.clamp(n.z,c.z,e.z);return t.x=f,t.y=O,t.z=b,t}static magnitudeSquared(n){return y.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y+n.z*n.z}static magnitude(n){return Math.sqrt(o.magnitudeSquared(n))}static distance(n,c){return y.typeOf.object("left",n),y.typeOf.object("right",c),o.subtract(n,c,k),o.magnitude(k)}static distanceSquared(n,c){return y.typeOf.object("left",n),y.typeOf.object("right",c),o.subtract(n,c,k),o.magnitudeSquared(k)}static normalize(n,c){y.typeOf.object("cartesian",n),y.typeOf.object("result",c);let e=o.magnitude(n);if(c.x=n.x/e,c.y=n.y/e,c.z=n.z/e,isNaN(c.x)||isNaN(c.y)||isNaN(c.z))throw new S("normalized result is not a number");return c}static dot(n,c){return y.typeOf.object("left",n),y.typeOf.object("right",c),n.x*c.x+n.y*c.y+n.z*c.z}static multiplyComponents(n,c,e){return y.typeOf.object("left",n),y.typeOf.object("right",c),y.typeOf.object("result",e),e.x=n.x*c.x,e.y=n.y*c.y,e.z=n.z*c.z,e}static divideComponents(n,c,e){return y.typeOf.object("left",n),y.typeOf.object("right",c),y.typeOf.object("result",e),e.x=n.x/c.x,e.y=n.y/c.y,e.z=n.z/c.z,e}static add(n,c,e){return y.typeOf.object("left",n),y.typeOf.object("right",c),y.typeOf.object("result",e),e.x=n.x+c.x,e.y=n.y+c.y,e.z=n.z+c.z,e}static subtract(n,c,e){return y.typeOf.object("left",n),y.typeOf.object("right",c),y.typeOf.object("result",e),e.x=n.x-c.x,e.y=n.y-c.y,e.z=n.z-c.z,e}static multiplyByScalar(n,c,e){return y.typeOf.object("cartesian",n),y.typeOf.number("scalar",c),y.typeOf.object("result",e),e.x=n.x*c,e.y=n.y*c,e.z=n.z*c,e}static divideByScalar(n,c,e){return y.typeOf.object("cartesian",n),y.typeOf.number("scalar",c),y.typeOf.object("result",e),e.x=n.x/c,e.y=n.y/c,e.z=n.z/c,e}static negate(n,c){return y.typeOf.object("cartesian",n),y.typeOf.object("result",c),c.x=-n.x,c.y=-n.y,c.z=-n.z,c}static abs(n,c){return y.typeOf.object("cartesian",n),y.typeOf.object("result",c),c.x=Math.abs(n.x),c.y=Math.abs(n.y),c.z=Math.abs(n.z),c}static lerp(n,c,e,t){return y.typeOf.object("start",n),y.typeOf.object("end",c),y.typeOf.number("t",e),y.typeOf.object("result",t),o.multiplyByScalar(c,e,P),t=o.multiplyByScalar(n,1-e,t),o.add(P,t,t)}static angleBetween(n,c){y.typeOf.object("left",n),y.typeOf.object("right",c),o.normalize(n,U),o.normalize(c,L);let e=o.dot(U,L),t=o.magnitude(o.cross(U,L,U));return Math.atan2(t,e)}static mostOrthogonalAxis(n,c){y.typeOf.object("cartesian",n),y.typeOf.object("result",c);let e=o.normalize(n,H);return o.abs(e,e),e.x<=e.y?e.x<=e.z?c=o.clone(o.UNIT_X,c):c=o.clone(o.UNIT_Z,c):e.y<=e.z?c=o.clone(o.UNIT_Y,c):c=o.clone(o.UNIT_Z,c),c}static projectVector(n,c,e){y.defined("a",n),y.defined("b",c),y.defined("result",e);let t=o.dot(n,c)/o.dot(c,c);return o.multiplyByScalar(c,t,e)}static equals(n,c){return n===c||z(n)&&z(c)&&n.x===c.x&&n.y===c.y&&n.z===c.z}static equalsArray(n,c,e){return n.x===c[e]&&n.y===c[e+1]&&n.z===c[e+2]}static equalsEpsilon(n,c,e,t){return n===c||z(n)&&z(c)&&E.equalsEpsilon(n.x,c.x,e,t)&&E.equalsEpsilon(n.y,c.y,e,t)&&E.equalsEpsilon(n.z,c.z,e,t)}static cross(n,c,e){y.typeOf.object("left",n),y.typeOf.object("right",c),y.typeOf.object("result",e);let t=n.x,f=n.y,O=n.z,b=c.x,j=c.y,h=c.z,w=f*h-O*j,M=O*b-t*h,d=t*j-f*b;return e.x=w,e.y=M,e.z=d,e}static midpoint(n,c,e){return y.typeOf.object("left",n),y.typeOf.object("right",c),y.typeOf.object("result",e),e.x=(n.x+c.x)*.5,e.y=(n.y+c.y)*.5,e.z=(n.z+c.z)*.5,e}static fromDegrees(n,c,e,t,f){return y.typeOf.number("longitude",n),y.typeOf.number("latitude",c),n=E.toRadians(n),c=E.toRadians(c),o.fromRadians(n,c,e,t,f)}static fromRadians(n,c,e,t,f){y.typeOf.number("longitude",n),y.typeOf.number("latitude",c),e=e??0;let O=z(t)?t.radiiSquared:o._ellipsoidRadiiSquared,b=Math.cos(c);A.x=b*Math.cos(n),A.y=b*Math.sin(n),A.z=Math.sin(c),A=o.normalize(A,A),o.multiplyComponents(O,A,T);let j=Math.sqrt(o.dot(A,T));return T=o.divideByScalar(T,j,T),A=o.multiplyByScalar(A,e,A),z(f)||(f=new o),o.add(T,A,f)}static fromDegreesArray(n,c,e){if(y.defined("coordinates",n),n.length<2||n.length%2!==0)throw new S("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;z(e)?e.length=t/2:e=new Array(t/2);for(let f=0;f<t;f+=2){let O=n[f],b=n[f+1],j=f/2;e[j]=o.fromDegrees(O,b,0,c,e[j])}return e}static fromRadiansArray(n,c,e){if(y.defined("coordinates",n),n.length<2||n.length%2!==0)throw new S("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;z(e)?e.length=t/2:e=new Array(t/2);for(let f=0;f<t;f+=2){let O=n[f],b=n[f+1],j=f/2;e[j]=o.fromRadians(O,b,0,c,e[j])}return e}static fromDegreesArrayHeights(n,c,e){if(y.defined("coordinates",n),n.length<3||n.length%3!==0)throw new S("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;z(e)?e.length=t/3:e=new Array(t/3);for(let f=0;f<t;f+=3){let O=n[f],b=n[f+1],j=n[f+2],h=f/3;e[h]=o.fromDegrees(O,b,j,c,e[h])}return e}static fromRadiansArrayHeights(n,c,e){if(y.defined("coordinates",n),n.length<3||n.length%3!==0)throw new S("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;z(e)?e.length=t/3:e=new Array(t/3);for(let f=0;f<t;f+=3){let O=n[f],b=n[f+1],j=n[f+2],h=f/3;e[h]=o.fromRadians(O,b,j,c,e[h])}return e}clone(n){return o.clone(this,n)}equals(n){return o.equals(this,n)}equalsEpsilon(n,c,e){return o.equalsEpsilon(this,n,c,e)}toString(){return`(${this.x}, ${this.y}, ${this.z})`}};m.fromCartesian4=m.clone;m.packedLength=3;m.fromArray=m.unpack;var k=new m,P=new m,U=new m,L=new m,H=new m,A=new m,T=new m;m._ellipsoidRadiiSquared=new m(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);m.ZERO=Object.freeze(new m(0,0,0));m.ONE=Object.freeze(new m(1,1,1));m.UNIT_X=Object.freeze(new m(1,0,0));m.UNIT_Y=Object.freeze(new m(0,1,0));m.UNIT_Z=Object.freeze(new m(0,0,1));var R=m;function p(o,n,c,e,t,f,O,b,j){this[0]=o??0,this[1]=e??0,this[2]=O??0,this[3]=n??0,this[4]=t??0,this[5]=b??0,this[6]=c??0,this[7]=f??0,this[8]=j??0}p.packedLength=9;p.pack=function(o,n,c){return y.typeOf.object("value",o),y.defined("array",n),c=c??0,n[c++]=o[0],n[c++]=o[1],n[c++]=o[2],n[c++]=o[3],n[c++]=o[4],n[c++]=o[5],n[c++]=o[6],n[c++]=o[7],n[c++]=o[8],n};p.unpack=function(o,n,c){return y.defined("array",o),n=n??0,z(c)||(c=new p),c[0]=o[n++],c[1]=o[n++],c[2]=o[n++],c[3]=o[n++],c[4]=o[n++],c[5]=o[n++],c[6]=o[n++],c[7]=o[n++],c[8]=o[n++],c};p.packArray=function(o,n){y.defined("array",o);let c=o.length,e=c*9;if(!z(n))n=new Array(e);else{if(!Array.isArray(n)&&n.length!==e)throw new S("If result is a typed array, it must have exactly array.length * 9 elements");n.length!==e&&(n.length=e)}for(let t=0;t<c;++t)p.pack(o[t],n,t*9);return n};p.unpackArray=function(o,n){if(y.defined("array",o),y.typeOf.number.greaterThanOrEquals("array.length",o.length,9),o.length%9!==0)throw new S("array length must be a multiple of 9.");let c=o.length;z(n)?n.length=c/9:n=new Array(c/9);for(let e=0;e<c;e+=9){let t=e/9;n[t]=p.unpack(o,e,n[t])}return n};p.clone=function(o,n){if(z(o))return z(n)?(n[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=o[3],n[4]=o[4],n[5]=o[5],n[6]=o[6],n[7]=o[7],n[8]=o[8],n):new p(o[0],o[3],o[6],o[1],o[4],o[7],o[2],o[5],o[8])};p.fromArray=p.unpack;p.fromColumnMajorArray=function(o,n){return y.defined("values",o),p.clone(o,n)};p.fromRowMajorArray=function(o,n){return y.defined("values",o),z(n)?(n[0]=o[0],n[1]=o[3],n[2]=o[6],n[3]=o[1],n[4]=o[4],n[5]=o[7],n[6]=o[2],n[7]=o[5],n[8]=o[8],n):new p(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8])};p.fromQuaternion=function(o,n){y.typeOf.object("quaternion",o);let c=o.x*o.x,e=o.x*o.y,t=o.x*o.z,f=o.x*o.w,O=o.y*o.y,b=o.y*o.z,j=o.y*o.w,h=o.z*o.z,w=o.z*o.w,M=o.w*o.w,d=c-O-h+M,i=2*(e-w),N=2*(t+j),q=2*(e+w),C=-c+O-h+M,Z=2*(b-f),W=2*(t-j),X=2*(b+f),a=-c-O+h+M;return z(n)?(n[0]=d,n[1]=q,n[2]=W,n[3]=i,n[4]=C,n[5]=X,n[6]=N,n[7]=Z,n[8]=a,n):new p(d,i,N,q,C,Z,W,X,a)};p.fromHeadingPitchRoll=function(o,n){y.typeOf.object("headingPitchRoll",o);let c=Math.cos(-o.pitch),e=Math.cos(-o.heading),t=Math.cos(o.roll),f=Math.sin(-o.pitch),O=Math.sin(-o.heading),b=Math.sin(o.roll),j=c*e,h=-t*O+b*f*e,w=b*O+t*f*e,M=c*O,d=t*e+b*f*O,i=-b*e+t*f*O,N=-f,q=b*c,C=t*c;return z(n)?(n[0]=j,n[1]=M,n[2]=N,n[3]=h,n[4]=d,n[5]=q,n[6]=w,n[7]=i,n[8]=C,n):new p(j,h,w,M,d,i,N,q,C)};p.fromScale=function(o,n){return y.typeOf.object("scale",o),z(n)?(n[0]=o.x,n[1]=0,n[2]=0,n[3]=0,n[4]=o.y,n[5]=0,n[6]=0,n[7]=0,n[8]=o.z,n):new p(o.x,0,0,0,o.y,0,0,0,o.z)};p.fromUniformScale=function(o,n){return y.typeOf.number("scale",o),z(n)?(n[0]=o,n[1]=0,n[2]=0,n[3]=0,n[4]=o,n[5]=0,n[6]=0,n[7]=0,n[8]=o,n):new p(o,0,0,0,o,0,0,0,o)};p.fromCrossProduct=function(o,n){return y.typeOf.object("vector",o),z(n)?(n[0]=0,n[1]=o.z,n[2]=-o.y,n[3]=-o.z,n[4]=0,n[5]=o.x,n[6]=o.y,n[7]=-o.x,n[8]=0,n):new p(0,-o.z,o.y,o.z,0,-o.x,-o.y,o.x,0)};p.fromRotationX=function(o,n){y.typeOf.number("angle",o);let c=Math.cos(o),e=Math.sin(o);return z(n)?(n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=c,n[5]=e,n[6]=0,n[7]=-e,n[8]=c,n):new p(1,0,0,0,c,-e,0,e,c)};p.fromRotationY=function(o,n){y.typeOf.number("angle",o);let c=Math.cos(o),e=Math.sin(o);return z(n)?(n[0]=c,n[1]=0,n[2]=-e,n[3]=0,n[4]=1,n[5]=0,n[6]=e,n[7]=0,n[8]=c,n):new p(c,0,e,0,1,0,-e,0,c)};p.fromRotationZ=function(o,n){y.typeOf.number("angle",o);let c=Math.cos(o),e=Math.sin(o);return z(n)?(n[0]=c,n[1]=e,n[2]=0,n[3]=-e,n[4]=c,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new p(c,-e,0,e,c,0,0,0,1)};p.toArray=function(o,n){return y.typeOf.object("matrix",o),z(n)?(n[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=o[3],n[4]=o[4],n[5]=o[5],n[6]=o[6],n[7]=o[7],n[8]=o[8],n):[o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8]]};p.getElementIndex=function(o,n){return y.typeOf.number.greaterThanOrEquals("row",n,0),y.typeOf.number.lessThanOrEquals("row",n,2),y.typeOf.number.greaterThanOrEquals("column",o,0),y.typeOf.number.lessThanOrEquals("column",o,2),o*3+n};p.getColumn=function(o,n,c){y.typeOf.object("matrix",o),y.typeOf.number.greaterThanOrEquals("index",n,0),y.typeOf.number.lessThanOrEquals("index",n,2),y.typeOf.object("result",c);let e=n*3,t=o[e],f=o[e+1],O=o[e+2];return c.x=t,c.y=f,c.z=O,c};p.setColumn=function(o,n,c,e){y.typeOf.object("matrix",o),y.typeOf.number.greaterThanOrEquals("index",n,0),y.typeOf.number.lessThanOrEquals("index",n,2),y.typeOf.object("cartesian",c),y.typeOf.object("result",e),e=p.clone(o,e);let t=n*3;return e[t]=c.x,e[t+1]=c.y,e[t+2]=c.z,e};p.getRow=function(o,n,c){y.typeOf.object("matrix",o),y.typeOf.number.greaterThanOrEquals("index",n,0),y.typeOf.number.lessThanOrEquals("index",n,2),y.typeOf.object("result",c);let e=o[n],t=o[n+3],f=o[n+6];return c.x=e,c.y=t,c.z=f,c};p.setRow=function(o,n,c,e){return y.typeOf.object("matrix",o),y.typeOf.number.greaterThanOrEquals("index",n,0),y.typeOf.number.lessThanOrEquals("index",n,2),y.typeOf.object("cartesian",c),y.typeOf.object("result",e),e=p.clone(o,e),e[n]=c.x,e[n+3]=c.y,e[n+6]=c.z,e};var I=new R;p.setScale=function(o,n,c){y.typeOf.object("matrix",o),y.typeOf.object("scale",n),y.typeOf.object("result",c);let e=p.getScale(o,I),t=n.x/e.x,f=n.y/e.y,O=n.z/e.z;return c[0]=o[0]*t,c[1]=o[1]*t,c[2]=o[2]*t,c[3]=o[3]*f,c[4]=o[4]*f,c[5]=o[5]*f,c[6]=o[6]*O,c[7]=o[7]*O,c[8]=o[8]*O,c};var J=new R;p.setUniformScale=function(o,n,c){y.typeOf.object("matrix",o),y.typeOf.number("scale",n),y.typeOf.object("result",c);let e=p.getScale(o,J),t=n/e.x,f=n/e.y,O=n/e.z;return c[0]=o[0]*t,c[1]=o[1]*t,c[2]=o[2]*t,c[3]=o[3]*f,c[4]=o[4]*f,c[5]=o[5]*f,c[6]=o[6]*O,c[7]=o[7]*O,c[8]=o[8]*O,c};var D=new R;p.getScale=function(o,n){return y.typeOf.object("matrix",o),y.typeOf.object("result",n),n.x=R.magnitude(R.fromElements(o[0],o[1],o[2],D)),n.y=R.magnitude(R.fromElements(o[3],o[4],o[5],D)),n.z=R.magnitude(R.fromElements(o[6],o[7],o[8],D)),n};var V=new R;p.getMaximumScale=function(o){return p.getScale(o,V),R.maximumComponent(V)};var K=new R;p.setRotation=function(o,n,c){y.typeOf.object("matrix",o),y.typeOf.object("result",c);let e=p.getScale(o,K);return c[0]=n[0]*e.x,c[1]=n[1]*e.x,c[2]=n[2]*e.x,c[3]=n[3]*e.y,c[4]=n[4]*e.y,c[5]=n[5]*e.y,c[6]=n[6]*e.z,c[7]=n[7]*e.z,c[8]=n[8]*e.z,c};var Q=new R;p.getRotation=function(o,n){y.typeOf.object("matrix",o),y.typeOf.object("result",n);let c=p.getScale(o,Q);return n[0]=o[0]/c.x,n[1]=o[1]/c.x,n[2]=o[2]/c.x,n[3]=o[3]/c.y,n[4]=o[4]/c.y,n[5]=o[5]/c.y,n[6]=o[6]/c.z,n[7]=o[7]/c.z,n[8]=o[8]/c.z,n};p.multiply=function(o,n,c){y.typeOf.object("left",o),y.typeOf.object("right",n),y.typeOf.object("result",c);let e=o[0]*n[0]+o[3]*n[1]+o[6]*n[2],t=o[1]*n[0]+o[4]*n[1]+o[7]*n[2],f=o[2]*n[0]+o[5]*n[1]+o[8]*n[2],O=o[0]*n[3]+o[3]*n[4]+o[6]*n[5],b=o[1]*n[3]+o[4]*n[4]+o[7]*n[5],j=o[2]*n[3]+o[5]*n[4]+o[8]*n[5],h=o[0]*n[6]+o[3]*n[7]+o[6]*n[8],w=o[1]*n[6]+o[4]*n[7]+o[7]*n[8],M=o[2]*n[6]+o[5]*n[7]+o[8]*n[8];return c[0]=e,c[1]=t,c[2]=f,c[3]=O,c[4]=b,c[5]=j,c[6]=h,c[7]=w,c[8]=M,c};p.add=function(o,n,c){return y.typeOf.object("left",o),y.typeOf.object("right",n),y.typeOf.object("result",c),c[0]=o[0]+n[0],c[1]=o[1]+n[1],c[2]=o[2]+n[2],c[3]=o[3]+n[3],c[4]=o[4]+n[4],c[5]=o[5]+n[5],c[6]=o[6]+n[6],c[7]=o[7]+n[7],c[8]=o[8]+n[8],c};p.subtract=function(o,n,c){return y.typeOf.object("left",o),y.typeOf.object("right",n),y.typeOf.object("result",c),c[0]=o[0]-n[0],c[1]=o[1]-n[1],c[2]=o[2]-n[2],c[3]=o[3]-n[3],c[4]=o[4]-n[4],c[5]=o[5]-n[5],c[6]=o[6]-n[6],c[7]=o[7]-n[7],c[8]=o[8]-n[8],c};p.multiplyByVector=function(o,n,c){y.typeOf.object("matrix",o),y.typeOf.object("cartesian",n),y.typeOf.object("result",c);let e=n.x,t=n.y,f=n.z,O=o[0]*e+o[3]*t+o[6]*f,b=o[1]*e+o[4]*t+o[7]*f,j=o[2]*e+o[5]*t+o[8]*f;return c.x=O,c.y=b,c.z=j,c};p.multiplyByScalar=function(o,n,c){return y.typeOf.object("matrix",o),y.typeOf.number("scalar",n),y.typeOf.object("result",c),c[0]=o[0]*n,c[1]=o[1]*n,c[2]=o[2]*n,c[3]=o[3]*n,c[4]=o[4]*n,c[5]=o[5]*n,c[6]=o[6]*n,c[7]=o[7]*n,c[8]=o[8]*n,c};p.multiplyByScale=function(o,n,c){return y.typeOf.object("matrix",o),y.typeOf.object("scale",n),y.typeOf.object("result",c),c[0]=o[0]*n.x,c[1]=o[1]*n.x,c[2]=o[2]*n.x,c[3]=o[3]*n.y,c[4]=o[4]*n.y,c[5]=o[5]*n.y,c[6]=o[6]*n.z,c[7]=o[7]*n.z,c[8]=o[8]*n.z,c};p.multiplyByUniformScale=function(o,n,c){return y.typeOf.object("matrix",o),y.typeOf.number("scale",n),y.typeOf.object("result",c),c[0]=o[0]*n,c[1]=o[1]*n,c[2]=o[2]*n,c[3]=o[3]*n,c[4]=o[4]*n,c[5]=o[5]*n,c[6]=o[6]*n,c[7]=o[7]*n,c[8]=o[8]*n,c};p.negate=function(o,n){return y.typeOf.object("matrix",o),y.typeOf.object("result",n),n[0]=-o[0],n[1]=-o[1],n[2]=-o[2],n[3]=-o[3],n[4]=-o[4],n[5]=-o[5],n[6]=-o[6],n[7]=-o[7],n[8]=-o[8],n};p.transpose=function(o,n){y.typeOf.object("matrix",o),y.typeOf.object("result",n);let c=o[0],e=o[3],t=o[6],f=o[1],O=o[4],b=o[7],j=o[2],h=o[5],w=o[8];return n[0]=c,n[1]=e,n[2]=t,n[3]=f,n[4]=O,n[5]=b,n[6]=j,n[7]=h,n[8]=w,n};function G(o){let n=0;for(let c=0;c<9;++c){let e=o[c];n+=e*e}return Math.sqrt(n)}var Y=[1,0,0],g=[2,2,1];function v(o){let n=0;for(let c=0;c<3;++c){let e=o[p.getElementIndex(g[c],Y[c])];n+=2*e*e}return Math.sqrt(n)}function _(o,n){let c=E.EPSILON15,e=0,t=1;for(let h=0;h<3;++h){let w=Math.abs(o[p.getElementIndex(g[h],Y[h])]);w>e&&(t=h,e=w)}let f=1,O=0,b=Y[t],j=g[t];if(Math.abs(o[p.getElementIndex(j,b)])>c){let h=o[p.getElementIndex(j,j)],w=o[p.getElementIndex(b,b)],M=o[p.getElementIndex(j,b)],d=(h-w)/2/M,i;d<0?i=-1/(-d+Math.sqrt(1+d*d)):i=1/(d+Math.sqrt(1+d*d)),f=1/Math.sqrt(1+i*i),O=i*f}return n=p.clone(p.IDENTITY,n),n[p.getElementIndex(b,b)]=n[p.getElementIndex(j,j)]=f,n[p.getElementIndex(j,b)]=O,n[p.getElementIndex(b,j)]=-O,n}var B=new p,F=new p;p.computeEigenDecomposition=function(o,n){y.typeOf.object("matrix",o);let c=E.EPSILON20,e=10,t=0,f=0;z(n)||(n={});let O=n.unitary=p.clone(p.IDENTITY,n.unitary),b=n.diagonal=p.clone(o,n.diagonal),j=c*G(b);for(;f<e&&v(b)>j;)_(b,B),p.transpose(B,F),p.multiply(b,B,b),p.multiply(F,b,b),p.multiply(O,B,O),++t>2&&(++f,t=0);return n};p.abs=function(o,n){return y.typeOf.object("matrix",o),y.typeOf.object("result",n),n[0]=Math.abs(o[0]),n[1]=Math.abs(o[1]),n[2]=Math.abs(o[2]),n[3]=Math.abs(o[3]),n[4]=Math.abs(o[4]),n[5]=Math.abs(o[5]),n[6]=Math.abs(o[6]),n[7]=Math.abs(o[7]),n[8]=Math.abs(o[8]),n};p.determinant=function(o){y.typeOf.object("matrix",o);let n=o[0],c=o[3],e=o[6],t=o[1],f=o[4],O=o[7],b=o[2],j=o[5],h=o[8];return n*(f*h-j*O)+t*(j*e-c*h)+b*(c*O-f*e)};p.inverse=function(o,n){y.typeOf.object("matrix",o),y.typeOf.object("result",n);let c=o[0],e=o[1],t=o[2],f=o[3],O=o[4],b=o[5],j=o[6],h=o[7],w=o[8],M=p.determinant(o);if(Math.abs(M)<=E.EPSILON15)throw new S("matrix is not invertible");n[0]=O*w-h*b,n[1]=h*t-e*w,n[2]=e*b-O*t,n[3]=j*b-f*w,n[4]=c*w-j*t,n[5]=f*t-c*b,n[6]=f*h-j*O,n[7]=j*e-c*h,n[8]=c*O-f*e;let d=1/M;return p.multiplyByScalar(n,d,n)};var x=new p;p.inverseTranspose=function(o,n){return y.typeOf.object("matrix",o),y.typeOf.object("result",n),p.inverse(p.transpose(o,x),n)};p.equals=function(o,n){return o===n||z(o)&&z(n)&&o[0]===n[0]&&o[1]===n[1]&&o[2]===n[2]&&o[3]===n[3]&&o[4]===n[4]&&o[5]===n[5]&&o[6]===n[6]&&o[7]===n[7]&&o[8]===n[8]};p.equalsEpsilon=function(o,n,c){return c=c??0,o===n||z(o)&&z(n)&&Math.abs(o[0]-n[0])<=c&&Math.abs(o[1]-n[1])<=c&&Math.abs(o[2]-n[2])<=c&&Math.abs(o[3]-n[3])<=c&&Math.abs(o[4]-n[4])<=c&&Math.abs(o[5]-n[5])<=c&&Math.abs(o[6]-n[6])<=c&&Math.abs(o[7]-n[7])<=c&&Math.abs(o[8]-n[8])<=c};p.IDENTITY=Object.freeze(new p(1,0,0,0,1,0,0,0,1));p.ZERO=Object.freeze(new p(0,0,0,0,0,0,0,0,0));p.COLUMN0ROW0=0;p.COLUMN0ROW1=1;p.COLUMN0ROW2=2;p.COLUMN1ROW0=3;p.COLUMN1ROW1=4;p.COLUMN1ROW2=5;p.COLUMN2ROW0=6;p.COLUMN2ROW1=7;p.COLUMN2ROW2=8;Object.defineProperties(p.prototype,{length:{get:function(){return p.packedLength}}});p.prototype.clone=function(o){return p.clone(this,o)};p.prototype.equals=function(o){return p.equals(this,o)};p.equalsArray=function(o,n,c){return o[0]===n[c]&&o[1]===n[c+1]&&o[2]===n[c+2]&&o[3]===n[c+3]&&o[4]===n[c+4]&&o[5]===n[c+5]&&o[6]===n[c+6]&&o[7]===n[c+7]&&o[8]===n[c+8]};p.prototype.equalsEpsilon=function(o,n){return p.equalsEpsilon(this,o,n)};p.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})
(${this[1]}, ${this[4]}, ${this[7]})
(${this[2]}, ${this[5]}, ${this[8]})`};var pn=p;var $={};$.EMPTY_OBJECT=Object.freeze({});$.EMPTY_ARRAY=Object.freeze([]);var On=$;export{R as a,pn as b,On as c};