@loaders.gl/tile-converter 3.3.0-alpha.6 → 3.3.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/3d-tiles-attributes-worker.d.ts +2 -2
- package/dist/3d-tiles-attributes-worker.d.ts.map +1 -1
- package/dist/3d-tiles-attributes-worker.js +2 -2
- package/dist/3d-tiles-attributes-worker.js.map +2 -2
- package/dist/converter-cli.js +15 -2
- package/dist/converter.min.js +20 -20
- package/dist/dist.min.js +263 -415
- package/dist/es5/3d-tiles-attributes-worker.js +1 -1
- package/dist/es5/converter-cli.js +9 -3
- package/dist/es5/converter-cli.js.map +1 -1
- package/dist/es5/deps-installer/deps-installer.js +1 -1
- package/dist/es5/i3s-attributes-worker.js +1 -1
- package/dist/es5/i3s-converter/helpers/coordinate-converter.js +7 -6
- package/dist/es5/i3s-converter/helpers/coordinate-converter.js.map +1 -1
- package/dist/es5/i3s-converter/i3s-converter.js +27 -25
- package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/es5/pgm-loader.js +1 -1
- package/dist/esm/3d-tiles-attributes-worker.js +1 -1
- package/dist/esm/converter-cli.js +9 -3
- package/dist/esm/converter-cli.js.map +1 -1
- package/dist/esm/deps-installer/deps-installer.js +1 -1
- package/dist/esm/i3s-attributes-worker.js +1 -1
- package/dist/esm/i3s-converter/helpers/coordinate-converter.js +7 -6
- package/dist/esm/i3s-converter/helpers/coordinate-converter.js.map +1 -1
- package/dist/esm/i3s-converter/i3s-converter.js +10 -7
- package/dist/esm/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/i3s-attributes-worker.d.ts +2 -2
- package/dist/i3s-attributes-worker.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/coordinate-converter.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/coordinate-converter.js +8 -6
- package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
- package/dist/i3s-converter/i3s-converter.js +9 -7
- package/dist/i3s-converter/types.d.ts +6 -6
- package/dist/i3s-converter/types.d.ts.map +1 -1
- package/dist/lib/utils/write-queue.d.ts +1 -1
- package/dist/lib/utils/write-queue.d.ts.map +1 -1
- package/package.json +15 -15
- package/src/converter-cli.ts +16 -2
- package/src/i3s-converter/helpers/coordinate-converter.ts +8 -6
- package/src/i3s-converter/i3s-converter.ts +17 -7
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var hs=Object.create;var Yr=Object.defineProperty,ds=Object.defineProperties,ps=Object.getOwnPropertyDescriptor,vs=Object.getOwnPropertyDescriptors,ms=Object.getOwnPropertyNames,Cn=Object.getOwnPropertySymbols,gs=Object.getPrototypeOf,In=Object.prototype.hasOwnProperty,ys=Object.prototype.propertyIsEnumerable;var Wn=(e,r,t)=>r in e?Yr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Q=(e,r)=>{for(var t in r||(r={}))In.call(r,t)&&Wn(e,t,r[t]);if(Cn)for(var t of Cn(r))ys.call(r,t)&&Wn(e,t,r[t]);return e},Bn=(e,r)=>ds(e,vs(r)),Ms=e=>Yr(e,"__esModule",{value:!0});var S=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var xs=(e,r,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of ms(r))!In.call(e,a)&&a!=="default"&&Yr(e,a,{get:()=>r[a],enumerable:!(t=ps(r,a))||t.enumerable});return e},Fn=e=>xs(Ms(Yr(e!=null?hs(gs(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var V=S((qd,Or)=>{function Cs(e){return e&&e.__esModule?e:{default:e}}Or.exports=Cs,Or.exports.__esModule=!0,Or.exports.default=Or.exports});var se=S((Ed,Oe)=>{function Ut(e){return Oe.exports=Ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Oe.exports.__esModule=!0,Oe.exports.default=Oe.exports,Ut(e)}Oe.exports=Ut,Oe.exports.__esModule=!0,Oe.exports.default=Oe.exports});var $=S((Ld,Tr)=>{function Is(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}Tr.exports=Is,Tr.exports.__esModule=!0,Tr.exports.default=Tr.exports});var J=S((Nd,kr)=>{function Zn(e,r){for(var t=0;t<r.length;t++){var a=r[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Ws(e,r,t){return r&&Zn(e.prototype,r),t&&Zn(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}kr.exports=Ws,kr.exports.__esModule=!0,kr.exports.default=kr.exports});var Xn=S((Cd,Te)=>{function Vt(e,r){return Te.exports=Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,n){return a.__proto__=n,a},Te.exports.__esModule=!0,Te.exports.default=Te.exports,Vt(e,r)}Te.exports=Vt,Te.exports.__esModule=!0,Te.exports.default=Te.exports});var oe=S((Id,Rr)=>{var Bs=Xn();function Fs(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&Bs(e,r)}Rr.exports=Fs,Rr.exports.__esModule=!0,Rr.exports.default=Rr.exports});var Qn=S((Wd,Ar)=>{function Ds(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Ar.exports=Ds,Ar.exports.__esModule=!0,Ar.exports.default=Ar.exports});var ce=S((Bd,Pr)=>{var zs=se().default,Ys=Qn();function Gs(e,r){if(r&&(zs(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ys(e)}Pr.exports=Gs,Pr.exports.__esModule=!0,Pr.exports.default=Pr.exports});var ue=S((Fd,ke)=>{function jt(e){return ke.exports=jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ke.exports.__esModule=!0,ke.exports.default=ke.exports,jt(e)}ke.exports=jt,ke.exports.__esModule=!0,ke.exports.default=ke.exports});var Zr=S(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.default=Us;function Us(e,r){if(!e)throw new Error("math.gl assertion ".concat(r))}});var ve=S(D=>{"use strict";var $n=V();Object.defineProperty(D,"__esModule",{value:!0});D.configure=Xs;D.formatValue=Qs;D.isArray=je;D.clone=$s;D.toRadians=Js;D.toDegrees=Hs;D.radians=Hn;D.degrees=Kn;D.sin=Ks;D.cos=eo;D.tan=ro;D.asin=to;D.acos=no;D.atan=ao;D.clamp=io;D.lerp=ea;D.equals=ra;D.exactEquals=ta;D.withEpsilon=so;D.config=void 0;var Jn=$n(se()),Vs=$n(Zr()),js=1/Math.PI*180,Zs=1/180*Math.PI,H={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};D.config=H;function Xs(e){for(var r in e)(0,Vs.default)(r in H),H[r]=e[r];return H}function Qs(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.precision,a=t===void 0?H.precision:t;return e=oo(e),"".concat(parseFloat(e.toPrecision(a)))}function je(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $s(e){return"clone"in e?e.clone():e.slice()}function Js(e){return Hn(e)}function Hs(e){return Kn(e)}function Hn(e,r){return Re(e,function(t){return t*Zs},r)}function Kn(e,r){return Re(e,function(t){return t*js},r)}function Ks(e,r){return Re(e,function(t){return Math.sin(t)},r)}function eo(e,r){return Re(e,function(t){return Math.cos(t)},r)}function ro(e,r){return Re(e,function(t){return Math.tan(t)},r)}function to(e,r){return Re(e,function(t){return Math.asin(t)},r)}function no(e,r){return Re(e,function(t){return Math.acos(t)},r)}function ao(e,r){return Re(e,function(t){return Math.atan(t)},r)}function io(e,r,t){return Re(e,function(a){return Math.max(r,Math.min(t,a))})}function ea(e,r,t){return je(e)?e.map(function(a,n){return ea(a,r[n],t)}):t*r+(1-t)*e}function ra(e,r,t){var a=H.EPSILON;t&&(H.EPSILON=t);try{if(e===r)return!0;if(je(e)&&je(r)){if(e.length!==r.length)return!1;for(var n=0;n<e.length;++n)if(!ra(e[n],r[n]))return!1;return!0}return e&&e.equals?e.equals(r):r&&r.equals?r.equals(e):typeof e=="number"&&typeof r=="number"?Math.abs(e-r)<=H.EPSILON*Math.max(1,Math.abs(e),Math.abs(r)):!1}finally{H.EPSILON=a}}function ta(e,r){if(e===r)return!0;if(e&&(0,Jn.default)(e)==="object"&&r&&(0,Jn.default)(r)==="object"){if(e.constructor!==r.constructor)return!1;if(e.exactEquals)return e.exactEquals(r)}if(je(e)&&je(r)){if(e.length!==r.length)return!1;for(var t=0;t<e.length;++t)if(!ta(e[t],r[t]))return!1;return!0}return!1}function so(e,r){var t=H.EPSILON;H.EPSILON=e;var a;try{a=r()}finally{H.EPSILON=t}return a}function oo(e){return Math.round(e/H.EPSILON)*H.EPSILON}function co(e){return e.clone?e.clone():new Array(e.length)}function Re(e,r,t){if(je(e)){var a=e;t=t||co(a);for(var n=0;n<t.length&&n<a.length;++n)t[n]=r(e[n],n,t);return t}return r(e)}});var qr=S(Xr=>{"use strict";var Sr=V();Object.defineProperty(Xr,"__esModule",{value:!0});Xr.default=void 0;var uo=Sr($()),lo=Sr(J()),fo=Sr(oe()),ho=Sr(ce()),na=Sr(ue()),wr=ve();function po(e){var r=vo();return function(){var a=(0,na.default)(e),n;if(r){var i=(0,na.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,ho.default)(this,n)}}function vo(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mo(e){function r(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return r.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e,r}var go=function(e){(0,fo.default)(t,e);var r=po(t);function t(){return(0,uo.default)(this,t),r.apply(this,arguments)}return(0,lo.default)(t,[{key:"clone",value:function(){return new this.constructor().copy(this)}},{key:"fromArray",value:function(n){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=0;s<this.ELEMENTS;++s)this[s]=n[s+i];return this.check()}},{key:"toArray",value:function(){for(var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=0;s<this.ELEMENTS;++s)n[i+s]=this[s];return n}},{key:"from",value:function(n){return Array.isArray(n)?this.copy(n):this.fromObject(n)}},{key:"to",value:function(n){return n===this?this:(0,wr.isArray)(n)?this.toArray(n):this.toObject(n)}},{key:"toTarget",value:function(n){return n?this.to(n):this}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(wr.config)}},{key:"formatString",value:function(n){for(var i="",s=0;s<this.ELEMENTS;++s)i+=(s>0?", ":"")+(0,wr.formatValue)(this[s],n);return"".concat(n.printTypes?this.constructor.name:"","[").concat(i,"]")}},{key:"equals",value:function(n){if(!n||this.length!==n.length)return!1;for(var i=0;i<this.ELEMENTS;++i)if(!(0,wr.equals)(this[i],n[i]))return!1;return!0}},{key:"exactEquals",value:function(n){if(!n||this.length!==n.length)return!1;for(var i=0;i<this.ELEMENTS;++i)if(this[i]!==n[i])return!1;return!0}},{key:"negate",value:function(){for(var n=0;n<this.ELEMENTS;++n)this[n]=-this[n];return this.check()}},{key:"lerp",value:function(n,i,s){if(s===void 0)return this.lerp(this,n,i);for(var o=0;o<this.ELEMENTS;++o){var c=n[o];this[o]=c+s*(i[o]-c)}return this.check()}},{key:"min",value:function(n){for(var i=0;i<this.ELEMENTS;++i)this[i]=Math.min(n[i],this[i]);return this.check()}},{key:"max",value:function(n){for(var i=0;i<this.ELEMENTS;++i)this[i]=Math.max(n[i],this[i]);return this.check()}},{key:"clamp",value:function(n,i){for(var s=0;s<this.ELEMENTS;++s)this[s]=Math.min(Math.max(this[s],n[s]),i[s]);return this.check()}},{key:"add",value:function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];for(var o=0,c=i;o<c.length;o++)for(var u=c[o],l=0;l<this.ELEMENTS;++l)this[l]+=u[l];return this.check()}},{key:"subtract",value:function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];for(var o=0,c=i;o<c.length;o++)for(var u=c[o],l=0;l<this.ELEMENTS;++l)this[l]-=u[l];return this.check()}},{key:"scale",value:function(n){if(typeof n=="number")for(var i=0;i<this.ELEMENTS;++i)this[i]*=n;else for(var s=0;s<this.ELEMENTS&&s<n.length;++s)this[s]*=n[s];return this.check()}},{key:"multiplyByScalar",value:function(n){for(var i=0;i<this.ELEMENTS;++i)this[i]*=n;return this.check()}},{key:"check",value:function(){if(wr.config.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var n=this.length===this.ELEMENTS,i=0;i<this.ELEMENTS;++i)n=n&&Number.isFinite(this[i]);return n}},{key:"sub",value:function(n){return this.subtract(n)}},{key:"setScalar",value:function(n){for(var i=0;i<this.ELEMENTS;++i)this[i]=n;return this.check()}},{key:"addScalar",value:function(n){for(var i=0;i<this.ELEMENTS;++i)this[i]+=n;return this.check()}},{key:"subScalar",value:function(n){return this.addScalar(-n)}},{key:"multiplyScalar",value:function(n){for(var i=0;i<this.ELEMENTS;++i)this[i]*=n;return this.check()}},{key:"divideScalar",value:function(n){return this.multiplyByScalar(1/n)}},{key:"clampScalar",value:function(n,i){for(var s=0;s<this.ELEMENTS;++s)this[s]=Math.min(Math.max(this[s],n),i);return this.check()}},{key:"elements",get:function(){return this}}]),t}(mo(Array));Xr.default=go});var me=S(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.validateVector=aa;nr.checkNumber=Mo;nr.checkVector=xo;nr.deprecated=bo;var yo=ve();function aa(e,r){if(e.length!==r)return!1;for(var t=0;t<e.length;++t)if(!Number.isFinite(e[t]))return!1;return!0}function Mo(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function xo(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";if(yo.config.debug&&!aa(e,r))throw new Error("math.gl: ".concat(t," some fields set to invalid numbers'"));return e}var ia={};function bo(e,r){ia[e]||(ia[e]=!0,console.warn("".concat(e," has been removed in version ").concat(r,", see upgrade guide for more information")))}});var $r=S(Qr=>{"use strict";var Ze=V();Object.defineProperty(Qr,"__esModule",{value:!0});Qr.default=void 0;var _o=Ze($()),Oo=Ze(J()),To=Ze(oe()),ko=Ze(ce()),sa=Ze(ue()),Ro=Ze(qr()),Er=me(),oa=Ze(Zr());function Ao(e){var r=Po();return function(){var a=(0,sa.default)(e),n;if(r){var i=(0,sa.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,ko.default)(this,n)}}function Po(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var So=function(e){(0,To.default)(t,e);var r=Ao(t);function t(){return(0,_o.default)(this,t),r.apply(this,arguments)}return(0,Oo.default)(t,[{key:"x",get:function(){return this[0]},set:function(n){this[0]=(0,Er.checkNumber)(n)}},{key:"y",get:function(){return this[1]},set:function(n){this[1]=(0,Er.checkNumber)(n)}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var n=0,i=0;i<this.ELEMENTS;++i)n+=this[i]*this[i];return n}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(n){return Math.sqrt(this.distanceSquared(n))}},{key:"distanceSquared",value:function(n){for(var i=0,s=0;s<this.ELEMENTS;++s){var o=this[s]-n[s];i+=o*o}return(0,Er.checkNumber)(i)}},{key:"dot",value:function(n){for(var i=0,s=0;s<this.ELEMENTS;++s)i+=this[s]*n[s];return(0,Er.checkNumber)(i)}},{key:"normalize",value:function(){var n=this.magnitude();if(n!==0)for(var i=0;i<this.ELEMENTS;++i)this[i]/=n;return this.check()}},{key:"multiply",value:function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];for(var o=0,c=i;o<c.length;o++)for(var u=c[o],l=0;l<this.ELEMENTS;++l)this[l]*=u[l];return this.check()}},{key:"divide",value:function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];for(var o=0,c=i;o<c.length;o++)for(var u=c[o],l=0;l<this.ELEMENTS;++l)this[l]/=u[l];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(n){return this.distance(n)}},{key:"distanceToSquared",value:function(n){return this.distanceSquared(n)}},{key:"getComponent",value:function(n){return(0,oa.default)(n>=0&&n<this.ELEMENTS,"index is out of range"),(0,Er.checkNumber)(this[n])}},{key:"setComponent",value:function(n,i){return(0,oa.default)(n>=0&&n<this.ELEMENTS,"index is out of range"),this[n]=i,this.check()}},{key:"addVectors",value:function(n,i){return this.copy(n).add(i)}},{key:"subVectors",value:function(n,i){return this.copy(n).subtract(i)}},{key:"multiplyVectors",value:function(n,i){return this.copy(n).multiply(i)}},{key:"addScaledVector",value:function(n,i){return this.add(new this.constructor(n).multiplyScalar(i))}}]),t}(Ro.default);Qr.default=So});var Xe=S(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.setMatrixArrayType=qo;ne.toRadian=Lo;ne.equals=No;ne.RANDOM=ne.ARRAY_TYPE=ne.EPSILON=void 0;var ca=1e-6;ne.EPSILON=ca;var ua=typeof Float32Array!="undefined"?Float32Array:Array;ne.ARRAY_TYPE=ua;var wo=Math.random;ne.RANDOM=wo;function qo(e){ne.ARRAY_TYPE=ua=e}var Eo=Math.PI/180;function Lo(e){return e*Eo}function No(e,r){return Math.abs(e-r)<=ca*Math.max(1,Math.abs(e),Math.abs(r))}Math.hypot||(Math.hypot=function(){for(var e=0,r=arguments.length;r--;)e+=arguments[r]*arguments[r];return Math.sqrt(e)})});var Hr=S(R=>{"use strict";function Jr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Jr=function(t){return typeof t}:Jr=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jr(e)}Object.defineProperty(R,"__esModule",{value:!0});R.create=fa;R.clone=Io;R.fromValues=Wo;R.copy=Bo;R.set=Fo;R.add=Do;R.subtract=ha;R.multiply=da;R.divide=pa;R.ceil=zo;R.floor=Yo;R.min=Go;R.max=Uo;R.round=Vo;R.scale=jo;R.scaleAndAdd=Zo;R.distance=va;R.squaredDistance=ma;R.length=ga;R.squaredLength=ya;R.negate=Xo;R.inverse=Qo;R.normalize=$o;R.dot=Jo;R.cross=Ho;R.lerp=Ko;R.random=ec;R.transformMat2=rc;R.transformMat2d=tc;R.transformMat3=nc;R.transformMat4=ac;R.rotate=ic;R.angle=sc;R.zero=oc;R.str=cc;R.exactEquals=uc;R.equals=lc;R.forEach=R.sqrLen=R.sqrDist=R.dist=R.div=R.mul=R.sub=R.len=void 0;var Qe=Co(Xe());function la(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(la=function(n){return n?t:r})(e)}function Co(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||Jr(e)!=="object"&&typeof e!="function")return{default:e};var t=la(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function fa(){var e=new Qe.ARRAY_TYPE(2);return Qe.ARRAY_TYPE!=Float32Array&&(e[0]=0,e[1]=0),e}function Io(e){var r=new Qe.ARRAY_TYPE(2);return r[0]=e[0],r[1]=e[1],r}function Wo(e,r){var t=new Qe.ARRAY_TYPE(2);return t[0]=e,t[1]=r,t}function Bo(e,r){return e[0]=r[0],e[1]=r[1],e}function Fo(e,r,t){return e[0]=r,e[1]=t,e}function Do(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e}function ha(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e}function da(e,r,t){return e[0]=r[0]*t[0],e[1]=r[1]*t[1],e}function pa(e,r,t){return e[0]=r[0]/t[0],e[1]=r[1]/t[1],e}function zo(e,r){return e[0]=Math.ceil(r[0]),e[1]=Math.ceil(r[1]),e}function Yo(e,r){return e[0]=Math.floor(r[0]),e[1]=Math.floor(r[1]),e}function Go(e,r,t){return e[0]=Math.min(r[0],t[0]),e[1]=Math.min(r[1],t[1]),e}function Uo(e,r,t){return e[0]=Math.max(r[0],t[0]),e[1]=Math.max(r[1],t[1]),e}function Vo(e,r){return e[0]=Math.round(r[0]),e[1]=Math.round(r[1]),e}function jo(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e}function Zo(e,r,t,a){return e[0]=r[0]+t[0]*a,e[1]=r[1]+t[1]*a,e}function va(e,r){var t=r[0]-e[0],a=r[1]-e[1];return Math.hypot(t,a)}function ma(e,r){var t=r[0]-e[0],a=r[1]-e[1];return t*t+a*a}function ga(e){var r=e[0],t=e[1];return Math.hypot(r,t)}function ya(e){var r=e[0],t=e[1];return r*r+t*t}function Xo(e,r){return e[0]=-r[0],e[1]=-r[1],e}function Qo(e,r){return e[0]=1/r[0],e[1]=1/r[1],e}function $o(e,r){var t=r[0],a=r[1],n=t*t+a*a;return n>0&&(n=1/Math.sqrt(n)),e[0]=r[0]*n,e[1]=r[1]*n,e}function Jo(e,r){return e[0]*r[0]+e[1]*r[1]}function Ho(e,r,t){var a=r[0]*t[1]-r[1]*t[0];return e[0]=e[1]=0,e[2]=a,e}function Ko(e,r,t,a){var n=r[0],i=r[1];return e[0]=n+a*(t[0]-n),e[1]=i+a*(t[1]-i),e}function ec(e,r){r=r||1;var t=Qe.RANDOM()*2*Math.PI;return e[0]=Math.cos(t)*r,e[1]=Math.sin(t)*r,e}function rc(e,r,t){var a=r[0],n=r[1];return e[0]=t[0]*a+t[2]*n,e[1]=t[1]*a+t[3]*n,e}function tc(e,r,t){var a=r[0],n=r[1];return e[0]=t[0]*a+t[2]*n+t[4],e[1]=t[1]*a+t[3]*n+t[5],e}function nc(e,r,t){var a=r[0],n=r[1];return e[0]=t[0]*a+t[3]*n+t[6],e[1]=t[1]*a+t[4]*n+t[7],e}function ac(e,r,t){var a=r[0],n=r[1];return e[0]=t[0]*a+t[4]*n+t[12],e[1]=t[1]*a+t[5]*n+t[13],e}function ic(e,r,t,a){var n=r[0]-t[0],i=r[1]-t[1],s=Math.sin(a),o=Math.cos(a);return e[0]=n*o-i*s+t[0],e[1]=n*s+i*o+t[1],e}function sc(e,r){var t=e[0],a=e[1],n=r[0],i=r[1],s=Math.sqrt(t*t+a*a)*Math.sqrt(n*n+i*i),o=s&&(t*n+a*i)/s;return Math.acos(Math.min(Math.max(o,-1),1))}function oc(e){return e[0]=0,e[1]=0,e}function cc(e){return"vec2("+e[0]+", "+e[1]+")"}function uc(e,r){return e[0]===r[0]&&e[1]===r[1]}function lc(e,r){var t=e[0],a=e[1],n=r[0],i=r[1];return Math.abs(t-n)<=Qe.EPSILON*Math.max(1,Math.abs(t),Math.abs(n))&&Math.abs(a-i)<=Qe.EPSILON*Math.max(1,Math.abs(a),Math.abs(i))}var fc=ga;R.len=fc;var hc=ha;R.sub=hc;var dc=da;R.mul=dc;var pc=pa;R.div=pc;var vc=va;R.dist=vc;var mc=ma;R.sqrDist=mc;var gc=ya;R.sqrLen=gc;var yc=function(){var e=fa();return function(r,t,a,n,i,s){var o,c;for(t||(t=2),a||(a=0),n?c=Math.min(n*t+a,r.length):c=r.length,o=a;o<c;o+=t)e[0]=r[o],e[1]=r[o+1],i(e,e,s),r[o]=e[0],r[o+1]=e[1];return r}}();R.forEach=yc});var ar=S($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.vec2_transformMat4AsVector=Mc;$e.vec3_transformMat4AsVector=xc;$e.vec3_transformMat2=bc;$e.vec4_transformMat2=_c;$e.vec4_transformMat3=Oc;function Mc(e,r,t){var a=r[0],n=r[1],i=t[3]*a+t[7]*n||1;return e[0]=(t[0]*a+t[4]*n)/i,e[1]=(t[1]*a+t[5]*n)/i,e}function xc(e,r,t){var a=r[0],n=r[1],i=r[2],s=t[3]*a+t[7]*n+t[11]*i||1;return e[0]=(t[0]*a+t[4]*n+t[8]*i)/s,e[1]=(t[1]*a+t[5]*n+t[9]*i)/s,e[2]=(t[2]*a+t[6]*n+t[10]*i)/s,e}function bc(e,r,t){var a=r[0],n=r[1];return e[0]=t[0]*a+t[2]*n,e[1]=t[1]*a+t[3]*n,e[2]=r[2],e}function _c(e,r,t){var a=r[0],n=r[1];return e[0]=t[0]*a+t[2]*n,e[1]=t[1]*a+t[3]*n,e[2]=r[2],e[3]=r[3],e}function Oc(e,r,t){var a=r[0],n=r[1],i=r[2];return e[0]=t[0]*a+t[3]*n+t[6]*i,e[1]=t[1]*a+t[4]*n+t[7]*i,e[2]=t[2]*a+t[5]*n+t[8]*i,e[3]=r[3],e}});var ba=S(rt=>{"use strict";var ir=V(),Tc=se();Object.defineProperty(rt,"__esModule",{value:!0});rt.default=void 0;var kc=ir($()),Rc=ir(J()),Ac=ir(oe()),Pc=ir(ce()),Ma=ir(ue()),Sc=ir($r()),Xt=ve(),Kr=me(),et=qc(Hr()),wc=ar();function xa(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(xa=function(n){return n?t:r})(e)}function qc(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||Tc(e)!=="object"&&typeof e!="function")return{default:e};var t=xa(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Ec(e){var r=Lc();return function(){var a=(0,Ma.default)(e),n;if(r){var i=(0,Ma.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,Pc.default)(this,n)}}function Lc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Nc=function(e){(0,Ac.default)(t,e);var r=Ec(t);function t(){var a,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(0,kc.default)(this,t),a=r.call(this,2),(0,Xt.isArray)(n)&&arguments.length===1?a.copy(n):(Xt.config.debug&&((0,Kr.checkNumber)(n),(0,Kr.checkNumber)(i)),a[0]=n,a[1]=i),a}return(0,Rc.default)(t,[{key:"set",value:function(n,i){return this[0]=n,this[1]=i,this.check()}},{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this.check()}},{key:"fromObject",value:function(n){return Xt.config.debug&&((0,Kr.checkNumber)(n.x),(0,Kr.checkNumber)(n.y)),this[0]=n.x,this[1]=n.y,this.check()}},{key:"toObject",value:function(n){return n.x=this[0],n.y=this[1],n}},{key:"ELEMENTS",get:function(){return 2}},{key:"horizontalAngle",value:function(){return Math.atan2(this.y,this.x)}},{key:"verticalAngle",value:function(){return Math.atan2(this.x,this.y)}},{key:"transform",value:function(n){return this.transformAsPoint(n)}},{key:"transformAsPoint",value:function(n){return et.transformMat4(this,this,n),this.check()}},{key:"transformAsVector",value:function(n){return(0,wc.vec2_transformMat4AsVector)(this,this,n),this.check()}},{key:"transformByMatrix3",value:function(n){return et.transformMat3(this,this,n),this.check()}},{key:"transformByMatrix2x3",value:function(n){return et.transformMat2d(this,this,n),this.check()}},{key:"transformByMatrix2",value:function(n){return et.transformMat2(this,this,n),this.check()}}]),t}(Sc.default);rt.default=Nc});var Le=S(O=>{"use strict";function tt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?tt=function(t){return typeof t}:tt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(e)}Object.defineProperty(O,"__esModule",{value:!0});O.create=Oa;O.clone=Ic;O.length=Ta;O.fromValues=Wc;O.copy=Bc;O.set=Fc;O.add=Dc;O.subtract=ka;O.multiply=Ra;O.divide=Aa;O.ceil=zc;O.floor=Yc;O.min=Gc;O.max=Uc;O.round=Vc;O.scale=jc;O.scaleAndAdd=Zc;O.distance=Pa;O.squaredDistance=Sa;O.squaredLength=wa;O.negate=Xc;O.inverse=Qc;O.normalize=$c;O.dot=qa;O.cross=Jc;O.lerp=Hc;O.hermite=Kc;O.bezier=eu;O.random=ru;O.transformMat4=tu;O.transformMat3=nu;O.transformQuat=au;O.rotateX=iu;O.rotateY=su;O.rotateZ=ou;O.angle=cu;O.zero=uu;O.str=lu;O.exactEquals=fu;O.equals=hu;O.forEach=O.sqrLen=O.len=O.sqrDist=O.dist=O.div=O.mul=O.sub=void 0;var Ae=Cc(Xe());function _a(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_a=function(n){return n?t:r})(e)}function Cc(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||tt(e)!=="object"&&typeof e!="function")return{default:e};var t=_a(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Oa(){var e=new Ae.ARRAY_TYPE(3);return Ae.ARRAY_TYPE!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function Ic(e){var r=new Ae.ARRAY_TYPE(3);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}function Ta(e){var r=e[0],t=e[1],a=e[2];return Math.hypot(r,t,a)}function Wc(e,r,t){var a=new Ae.ARRAY_TYPE(3);return a[0]=e,a[1]=r,a[2]=t,a}function Bc(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}function Fc(e,r,t,a){return e[0]=r,e[1]=t,e[2]=a,e}function Dc(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e[2]=r[2]+t[2],e}function ka(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e[2]=r[2]-t[2],e}function Ra(e,r,t){return e[0]=r[0]*t[0],e[1]=r[1]*t[1],e[2]=r[2]*t[2],e}function Aa(e,r,t){return e[0]=r[0]/t[0],e[1]=r[1]/t[1],e[2]=r[2]/t[2],e}function zc(e,r){return e[0]=Math.ceil(r[0]),e[1]=Math.ceil(r[1]),e[2]=Math.ceil(r[2]),e}function Yc(e,r){return e[0]=Math.floor(r[0]),e[1]=Math.floor(r[1]),e[2]=Math.floor(r[2]),e}function Gc(e,r,t){return e[0]=Math.min(r[0],t[0]),e[1]=Math.min(r[1],t[1]),e[2]=Math.min(r[2],t[2]),e}function Uc(e,r,t){return e[0]=Math.max(r[0],t[0]),e[1]=Math.max(r[1],t[1]),e[2]=Math.max(r[2],t[2]),e}function Vc(e,r){return e[0]=Math.round(r[0]),e[1]=Math.round(r[1]),e[2]=Math.round(r[2]),e}function jc(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e}function Zc(e,r,t,a){return e[0]=r[0]+t[0]*a,e[1]=r[1]+t[1]*a,e[2]=r[2]+t[2]*a,e}function Pa(e,r){var t=r[0]-e[0],a=r[1]-e[1],n=r[2]-e[2];return Math.hypot(t,a,n)}function Sa(e,r){var t=r[0]-e[0],a=r[1]-e[1],n=r[2]-e[2];return t*t+a*a+n*n}function wa(e){var r=e[0],t=e[1],a=e[2];return r*r+t*t+a*a}function Xc(e,r){return e[0]=-r[0],e[1]=-r[1],e[2]=-r[2],e}function Qc(e,r){return e[0]=1/r[0],e[1]=1/r[1],e[2]=1/r[2],e}function $c(e,r){var t=r[0],a=r[1],n=r[2],i=t*t+a*a+n*n;return i>0&&(i=1/Math.sqrt(i)),e[0]=r[0]*i,e[1]=r[1]*i,e[2]=r[2]*i,e}function qa(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]}function Jc(e,r,t){var a=r[0],n=r[1],i=r[2],s=t[0],o=t[1],c=t[2];return e[0]=n*c-i*o,e[1]=i*s-a*c,e[2]=a*o-n*s,e}function Hc(e,r,t,a){var n=r[0],i=r[1],s=r[2];return e[0]=n+a*(t[0]-n),e[1]=i+a*(t[1]-i),e[2]=s+a*(t[2]-s),e}function Kc(e,r,t,a,n,i){var s=i*i,o=s*(2*i-3)+1,c=s*(i-2)+i,u=s*(i-1),l=s*(3-2*i);return e[0]=r[0]*o+t[0]*c+a[0]*u+n[0]*l,e[1]=r[1]*o+t[1]*c+a[1]*u+n[1]*l,e[2]=r[2]*o+t[2]*c+a[2]*u+n[2]*l,e}function eu(e,r,t,a,n,i){var s=1-i,o=s*s,c=i*i,u=o*s,l=3*i*o,f=3*c*s,h=c*i;return e[0]=r[0]*u+t[0]*l+a[0]*f+n[0]*h,e[1]=r[1]*u+t[1]*l+a[1]*f+n[1]*h,e[2]=r[2]*u+t[2]*l+a[2]*f+n[2]*h,e}function ru(e,r){r=r||1;var t=Ae.RANDOM()*2*Math.PI,a=Ae.RANDOM()*2-1,n=Math.sqrt(1-a*a)*r;return e[0]=Math.cos(t)*n,e[1]=Math.sin(t)*n,e[2]=a*r,e}function tu(e,r,t){var a=r[0],n=r[1],i=r[2],s=t[3]*a+t[7]*n+t[11]*i+t[15];return s=s||1,e[0]=(t[0]*a+t[4]*n+t[8]*i+t[12])/s,e[1]=(t[1]*a+t[5]*n+t[9]*i+t[13])/s,e[2]=(t[2]*a+t[6]*n+t[10]*i+t[14])/s,e}function nu(e,r,t){var a=r[0],n=r[1],i=r[2];return e[0]=a*t[0]+n*t[3]+i*t[6],e[1]=a*t[1]+n*t[4]+i*t[7],e[2]=a*t[2]+n*t[5]+i*t[8],e}function au(e,r,t){var a=t[0],n=t[1],i=t[2],s=t[3],o=r[0],c=r[1],u=r[2],l=n*u-i*c,f=i*o-a*u,h=a*c-n*o,d=n*h-i*f,p=i*l-a*h,m=a*f-n*l,v=s*2;return l*=v,f*=v,h*=v,d*=2,p*=2,m*=2,e[0]=o+l+d,e[1]=c+f+p,e[2]=u+h+m,e}function iu(e,r,t,a){var n=[],i=[];return n[0]=r[0]-t[0],n[1]=r[1]-t[1],n[2]=r[2]-t[2],i[0]=n[0],i[1]=n[1]*Math.cos(a)-n[2]*Math.sin(a),i[2]=n[1]*Math.sin(a)+n[2]*Math.cos(a),e[0]=i[0]+t[0],e[1]=i[1]+t[1],e[2]=i[2]+t[2],e}function su(e,r,t,a){var n=[],i=[];return n[0]=r[0]-t[0],n[1]=r[1]-t[1],n[2]=r[2]-t[2],i[0]=n[2]*Math.sin(a)+n[0]*Math.cos(a),i[1]=n[1],i[2]=n[2]*Math.cos(a)-n[0]*Math.sin(a),e[0]=i[0]+t[0],e[1]=i[1]+t[1],e[2]=i[2]+t[2],e}function ou(e,r,t,a){var n=[],i=[];return n[0]=r[0]-t[0],n[1]=r[1]-t[1],n[2]=r[2]-t[2],i[0]=n[0]*Math.cos(a)-n[1]*Math.sin(a),i[1]=n[0]*Math.sin(a)+n[1]*Math.cos(a),i[2]=n[2],e[0]=i[0]+t[0],e[1]=i[1]+t[1],e[2]=i[2]+t[2],e}function cu(e,r){var t=e[0],a=e[1],n=e[2],i=r[0],s=r[1],o=r[2],c=Math.sqrt(t*t+a*a+n*n),u=Math.sqrt(i*i+s*s+o*o),l=c*u,f=l&&qa(e,r)/l;return Math.acos(Math.min(Math.max(f,-1),1))}function uu(e){return e[0]=0,e[1]=0,e[2]=0,e}function lu(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function fu(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]}function hu(e,r){var t=e[0],a=e[1],n=e[2],i=r[0],s=r[1],o=r[2];return Math.abs(t-i)<=Ae.EPSILON*Math.max(1,Math.abs(t),Math.abs(i))&&Math.abs(a-s)<=Ae.EPSILON*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(n-o)<=Ae.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))}var du=ka;O.sub=du;var pu=Ra;O.mul=pu;var vu=Aa;O.div=vu;var mu=Pa;O.dist=mu;var gu=Sa;O.sqrDist=gu;var yu=Ta;O.len=yu;var Mu=wa;O.sqrLen=Mu;var xu=function(){var e=Oa();return function(r,t,a,n,i,s){var o,c;for(t||(t=3),a||(a=0),n?c=Math.min(n*t+a,r.length):c=r.length,o=a;o<c;o+=t)e[0]=r[o],e[1]=r[o+1],e[2]=r[o+2],i(e,e,s),r[o]=e[0],r[o+1]=e[1],r[o+2]=e[2];return r}}();O.forEach=xu});var it=S(at=>{"use strict";var sr=V(),bu=se();Object.defineProperty(at,"__esModule",{value:!0});at.default=void 0;var _u=sr($()),Ou=sr(J()),Tu=sr(oe()),ku=sr(ce()),Ea=sr(ue()),Ru=sr($r()),Qt=ve(),Je=me(),Ne=Au(Le()),La=ar();function Na(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(Na=function(n){return n?t:r})(e)}function Au(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||bu(e)!=="object"&&typeof e!="function")return{default:e};var t=Na(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Pu(e){var r=Su();return function(){var a=(0,Ea.default)(e),n;if(r){var i=(0,Ea.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,ku.default)(this,n)}}function Su(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var $t=[0,0,0],nt,wu=function(e){(0,Tu.default)(t,e);var r=Pu(t);function t(){var a,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return(0,_u.default)(this,t),a=r.call(this,-0,-0,-0),arguments.length===1&&(0,Qt.isArray)(n)?a.copy(n):(Qt.config.debug&&((0,Je.checkNumber)(n),(0,Je.checkNumber)(i),(0,Je.checkNumber)(s)),a[0]=n,a[1]=i,a[2]=s),a}return(0,Ou.default)(t,[{key:"set",value:function(n,i,s){return this[0]=n,this[1]=i,this[2]=s,this.check()}},{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this.check()}},{key:"fromObject",value:function(n){return Qt.config.debug&&((0,Je.checkNumber)(n.x),(0,Je.checkNumber)(n.y),(0,Je.checkNumber)(n.z)),this[0]=n.x,this[1]=n.y,this[2]=n.z,this.check()}},{key:"toObject",value:function(n){return n.x=this[0],n.y=this[1],n.z=this[2],n}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(n){this[2]=(0,Je.checkNumber)(n)}},{key:"angle",value:function(n){return Ne.angle(this,n)}},{key:"cross",value:function(n){return Ne.cross(this,this,n),this.check()}},{key:"rotateX",value:function(n){var i=n.radians,s=n.origin,o=s===void 0?$t:s;return Ne.rotateX(this,this,o,i),this.check()}},{key:"rotateY",value:function(n){var i=n.radians,s=n.origin,o=s===void 0?$t:s;return Ne.rotateY(this,this,o,i),this.check()}},{key:"rotateZ",value:function(n){var i=n.radians,s=n.origin,o=s===void 0?$t:s;return Ne.rotateZ(this,this,o,i),this.check()}},{key:"transform",value:function(n){return this.transformAsPoint(n)}},{key:"transformAsPoint",value:function(n){return Ne.transformMat4(this,this,n),this.check()}},{key:"transformAsVector",value:function(n){return(0,La.vec3_transformMat4AsVector)(this,this,n),this.check()}},{key:"transformByMatrix3",value:function(n){return Ne.transformMat3(this,this,n),this.check()}},{key:"transformByMatrix2",value:function(n){return(0,La.vec3_transformMat2)(this,this,n),this.check()}},{key:"transformByQuaternion",value:function(n){return Ne.transformQuat(this,this,n),this.check()}}],[{key:"ZERO",get:function(){return nt||(nt=new t(0,0,0),Object.freeze(nt)),nt}}]),t}(Ru.default);at.default=wu});var Ht=S(ot=>{"use strict";var or=V(),qu=se();Object.defineProperty(ot,"__esModule",{value:!0});ot.default=void 0;var Eu=or($()),Lu=or(J()),Nu=or(oe()),Cu=or(ce()),Ca=or(ue()),Iu=or($r()),Jt=ve(),ge=me(),Ia=Wu(Le()),Wa=ar();function Ba(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(Ba=function(n){return n?t:r})(e)}function Wu(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||qu(e)!=="object"&&typeof e!="function")return{default:e};var t=Ba(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Bu(e){var r=Fu();return function(){var a=(0,Ca.default)(e),n;if(r){var i=(0,Ca.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,Cu.default)(this,n)}}function Fu(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var st,Du=function(e){(0,Nu.default)(t,e);var r=Bu(t);function t(){var a,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return(0,Eu.default)(this,t),a=r.call(this,-0,-0,-0,-0),(0,Jt.isArray)(n)&&arguments.length===1?a.copy(n):(Jt.config.debug&&((0,ge.checkNumber)(n),(0,ge.checkNumber)(i),(0,ge.checkNumber)(s),(0,ge.checkNumber)(o)),a[0]=n,a[1]=i,a[2]=s,a[3]=o),a}return(0,Lu.default)(t,[{key:"set",value:function(n,i,s,o){return this[0]=n,this[1]=i,this[2]=s,this[3]=o,this.check()}},{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this[3]=n[3],this.check()}},{key:"fromObject",value:function(n){return Jt.config.debug&&((0,ge.checkNumber)(n.x),(0,ge.checkNumber)(n.y),(0,ge.checkNumber)(n.z),(0,ge.checkNumber)(n.w)),this[0]=n.x,this[1]=n.y,this[2]=n.z,this[3]=n.w,this}},{key:"toObject",value:function(n){return n.x=this[0],n.y=this[1],n.z=this[2],n.w=this[3],n}},{key:"ELEMENTS",get:function(){return 4}},{key:"z",get:function(){return this[2]},set:function(n){this[2]=(0,ge.checkNumber)(n)}},{key:"w",get:function(){return this[3]},set:function(n){this[3]=(0,ge.checkNumber)(n)}},{key:"transform",value:function(n){return Ia.transformMat4(this,this,n),this.check()}},{key:"transformByMatrix3",value:function(n){return(0,Wa.vec4_transformMat3)(this,this,n),this.check()}},{key:"transformByMatrix2",value:function(n){return(0,Wa.vec4_transformMat2)(this,this,n),this.check()}},{key:"transformByQuaternion",value:function(n){return Ia.transformQuat(this,this,n),this.check()}},{key:"applyMatrix4",value:function(n){return n.transform(this,this),this}}],[{key:"ZERO",get:function(){return st||(st=new t(0,0,0,0),Object.freeze(st)),st}}]),t}(Iu.default);ot.default=Du});var Kt=S(ct=>{"use strict";var cr=V();Object.defineProperty(ct,"__esModule",{value:!0});ct.default=void 0;var zu=cr($()),Yu=cr(J()),Gu=cr(oe()),Uu=cr(ce()),Fa=cr(ue()),Vu=cr(qr()),ju=me(),Zu=ve();function Xu(e){var r=Qu();return function(){var a=(0,Fa.default)(e),n;if(r){var i=(0,Fa.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,Uu.default)(this,n)}}function Qu(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var $u=function(e){(0,Gu.default)(t,e);var r=Xu(t);function t(){return(0,zu.default)(this,t),r.apply(this,arguments)}return(0,Yu.default)(t,[{key:"toString",value:function(){var n="[";if(Zu.config.printRowMajor){n+="row-major:";for(var i=0;i<this.RANK;++i)for(var s=0;s<this.RANK;++s)n+=" ".concat(this[s*this.RANK+i])}else{n+="column-major:";for(var o=0;o<this.ELEMENTS;++o)n+=" ".concat(this[o])}return n+="]",n}},{key:"getElementIndex",value:function(n,i){return i*this.RANK+n}},{key:"getElement",value:function(n,i){return this[i*this.RANK+n]}},{key:"setElement",value:function(n,i,s){return this[i*this.RANK+n]=(0,ju.checkNumber)(s),this}},{key:"getColumn",value:function(n){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Array(this.RANK).fill(-0),s=n*this.RANK,o=0;o<this.RANK;++o)i[o]=this[s+o];return i}},{key:"setColumn",value:function(n,i){for(var s=n*this.RANK,o=0;o<this.RANK;++o)this[s+o]=i[o];return this}}]),t}(Vu.default);ct.default=$u});var en=S(q=>{"use strict";function ut(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ut=function(t){return typeof t}:ut=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ut(e)}Object.defineProperty(q,"__esModule",{value:!0});q.create=Hu;q.fromMat4=Ku;q.clone=el;q.copy=rl;q.fromValues=tl;q.set=nl;q.identity=al;q.transpose=il;q.invert=sl;q.adjoint=ol;q.determinant=cl;q.multiply=za;q.translate=ul;q.rotate=ll;q.scale=fl;q.fromTranslation=hl;q.fromRotation=dl;q.fromScaling=pl;q.fromMat2d=vl;q.fromQuat=ml;q.normalFromMat4=gl;q.projection=yl;q.str=Ml;q.frob=xl;q.add=bl;q.subtract=Ya;q.multiplyScalar=_l;q.multiplyScalarAndAdd=Ol;q.exactEquals=Tl;q.equals=kl;q.sub=q.mul=void 0;var ee=Ju(Xe());function Da(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(Da=function(n){return n?t:r})(e)}function Ju(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||ut(e)!=="object"&&typeof e!="function")return{default:e};var t=Da(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Hu(){var e=new ee.ARRAY_TYPE(9);return ee.ARRAY_TYPE!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function Ku(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[4],e[4]=r[5],e[5]=r[6],e[6]=r[8],e[7]=r[9],e[8]=r[10],e}function el(e){var r=new ee.ARRAY_TYPE(9);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r}function rl(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e}function tl(e,r,t,a,n,i,s,o,c){var u=new ee.ARRAY_TYPE(9);return u[0]=e,u[1]=r,u[2]=t,u[3]=a,u[4]=n,u[5]=i,u[6]=s,u[7]=o,u[8]=c,u}function nl(e,r,t,a,n,i,s,o,c,u){return e[0]=r,e[1]=t,e[2]=a,e[3]=n,e[4]=i,e[5]=s,e[6]=o,e[7]=c,e[8]=u,e}function al(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function il(e,r){if(e===r){var t=r[1],a=r[2],n=r[5];e[1]=r[3],e[2]=r[6],e[3]=t,e[5]=r[7],e[6]=a,e[7]=n}else e[0]=r[0],e[1]=r[3],e[2]=r[6],e[3]=r[1],e[4]=r[4],e[5]=r[7],e[6]=r[2],e[7]=r[5],e[8]=r[8];return e}function sl(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=r[4],o=r[5],c=r[6],u=r[7],l=r[8],f=l*s-o*u,h=-l*i+o*c,d=u*i-s*c,p=t*f+a*h+n*d;return p?(p=1/p,e[0]=f*p,e[1]=(-l*a+n*u)*p,e[2]=(o*a-n*s)*p,e[3]=h*p,e[4]=(l*t-n*c)*p,e[5]=(-o*t+n*i)*p,e[6]=d*p,e[7]=(-u*t+a*c)*p,e[8]=(s*t-a*i)*p,e):null}function ol(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=r[4],o=r[5],c=r[6],u=r[7],l=r[8];return e[0]=s*l-o*u,e[1]=n*u-a*l,e[2]=a*o-n*s,e[3]=o*c-i*l,e[4]=t*l-n*c,e[5]=n*i-t*o,e[6]=i*u-s*c,e[7]=a*c-t*u,e[8]=t*s-a*i,e}function cl(e){var r=e[0],t=e[1],a=e[2],n=e[3],i=e[4],s=e[5],o=e[6],c=e[7],u=e[8];return r*(u*i-s*c)+t*(-u*n+s*o)+a*(c*n-i*o)}function za(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3],o=r[4],c=r[5],u=r[6],l=r[7],f=r[8],h=t[0],d=t[1],p=t[2],m=t[3],v=t[4],g=t[5],b=t[6],y=t[7],M=t[8];return e[0]=h*a+d*s+p*u,e[1]=h*n+d*o+p*l,e[2]=h*i+d*c+p*f,e[3]=m*a+v*s+g*u,e[4]=m*n+v*o+g*l,e[5]=m*i+v*c+g*f,e[6]=b*a+y*s+M*u,e[7]=b*n+y*o+M*l,e[8]=b*i+y*c+M*f,e}function ul(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3],o=r[4],c=r[5],u=r[6],l=r[7],f=r[8],h=t[0],d=t[1];return e[0]=a,e[1]=n,e[2]=i,e[3]=s,e[4]=o,e[5]=c,e[6]=h*a+d*s+u,e[7]=h*n+d*o+l,e[8]=h*i+d*c+f,e}function ll(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3],o=r[4],c=r[5],u=r[6],l=r[7],f=r[8],h=Math.sin(t),d=Math.cos(t);return e[0]=d*a+h*s,e[1]=d*n+h*o,e[2]=d*i+h*c,e[3]=d*s-h*a,e[4]=d*o-h*n,e[5]=d*c-h*i,e[6]=u,e[7]=l,e[8]=f,e}function fl(e,r,t){var a=t[0],n=t[1];return e[0]=a*r[0],e[1]=a*r[1],e[2]=a*r[2],e[3]=n*r[3],e[4]=n*r[4],e[5]=n*r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e}function hl(e,r){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=r[0],e[7]=r[1],e[8]=1,e}function dl(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=-t,e[4]=a,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function pl(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=r[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function vl(e,r){return e[0]=r[0],e[1]=r[1],e[2]=0,e[3]=r[2],e[4]=r[3],e[5]=0,e[6]=r[4],e[7]=r[5],e[8]=1,e}function ml(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=t+t,o=a+a,c=n+n,u=t*s,l=a*s,f=a*o,h=n*s,d=n*o,p=n*c,m=i*s,v=i*o,g=i*c;return e[0]=1-f-p,e[3]=l-g,e[6]=h+v,e[1]=l+g,e[4]=1-u-p,e[7]=d-m,e[2]=h-v,e[5]=d+m,e[8]=1-u-f,e}function gl(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=r[4],o=r[5],c=r[6],u=r[7],l=r[8],f=r[9],h=r[10],d=r[11],p=r[12],m=r[13],v=r[14],g=r[15],b=t*o-a*s,y=t*c-n*s,M=t*u-i*s,T=a*c-n*o,_=a*u-i*o,I=n*u-i*c,L=l*m-f*p,N=l*v-h*p,w=l*g-d*p,W=f*v-h*m,C=f*g-d*m,B=h*g-d*v,P=b*B-y*C+M*W+T*w-_*N+I*L;return P?(P=1/P,e[0]=(o*B-c*C+u*W)*P,e[1]=(c*w-s*B-u*N)*P,e[2]=(s*C-o*w+u*L)*P,e[3]=(n*C-a*B-i*W)*P,e[4]=(t*B-n*w+i*N)*P,e[5]=(a*w-t*C-i*L)*P,e[6]=(m*I-v*_+g*T)*P,e[7]=(v*M-p*I-g*y)*P,e[8]=(p*_-m*M+g*b)*P,e):null}function yl(e,r,t){return e[0]=2/r,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/t,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function Ml(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function xl(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function bl(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e[2]=r[2]+t[2],e[3]=r[3]+t[3],e[4]=r[4]+t[4],e[5]=r[5]+t[5],e[6]=r[6]+t[6],e[7]=r[7]+t[7],e[8]=r[8]+t[8],e}function Ya(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e[2]=r[2]-t[2],e[3]=r[3]-t[3],e[4]=r[4]-t[4],e[5]=r[5]-t[5],e[6]=r[6]-t[6],e[7]=r[7]-t[7],e[8]=r[8]-t[8],e}function _l(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e[3]=r[3]*t,e[4]=r[4]*t,e[5]=r[5]*t,e[6]=r[6]*t,e[7]=r[7]*t,e[8]=r[8]*t,e}function Ol(e,r,t,a){return e[0]=r[0]+t[0]*a,e[1]=r[1]+t[1]*a,e[2]=r[2]+t[2]*a,e[3]=r[3]+t[3]*a,e[4]=r[4]+t[4]*a,e[5]=r[5]+t[5]*a,e[6]=r[6]+t[6]*a,e[7]=r[7]+t[7]*a,e[8]=r[8]+t[8]*a,e}function Tl(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]&&e[4]===r[4]&&e[5]===r[5]&&e[6]===r[6]&&e[7]===r[7]&&e[8]===r[8]}function kl(e,r){var t=e[0],a=e[1],n=e[2],i=e[3],s=e[4],o=e[5],c=e[6],u=e[7],l=e[8],f=r[0],h=r[1],d=r[2],p=r[3],m=r[4],v=r[5],g=r[6],b=r[7],y=r[8];return Math.abs(t-f)<=ee.EPSILON*Math.max(1,Math.abs(t),Math.abs(f))&&Math.abs(a-h)<=ee.EPSILON*Math.max(1,Math.abs(a),Math.abs(h))&&Math.abs(n-d)<=ee.EPSILON*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-p)<=ee.EPSILON*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(s-m)<=ee.EPSILON*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(o-v)<=ee.EPSILON*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(c-g)<=ee.EPSILON*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(u-b)<=ee.EPSILON*Math.max(1,Math.abs(u),Math.abs(b))&&Math.abs(l-y)<=ee.EPSILON*Math.max(1,Math.abs(l),Math.abs(y))}var Rl=za;q.mul=Rl;var Al=Ya;q.sub=Al});var Va=S(ht=>{"use strict";var ur=V(),Pl=se();Object.defineProperty(ht,"__esModule",{value:!0});ht.default=void 0;var Sl=ur($()),wl=ur(J()),ql=ur(oe()),El=ur(ce()),Ga=ur(ue()),Ll=ur(Kt()),Nl=me(),Cl=ar(),ye=rn(en()),Il=rn(Hr()),Wl=rn(Le());function Ua(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(Ua=function(n){return n?t:r})(e)}function rn(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||Pl(e)!=="object"&&typeof e!="function")return{default:e};var t=Ua(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Bl(e){var r=Fl();return function(){var a=(0,Ga.default)(e),n;if(r){var i=(0,Ga.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,El.default)(this,n)}}function Fl(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var tn;(function(e){e[e.COL0ROW0=0]="COL0ROW0",e[e.COL0ROW1=1]="COL0ROW1",e[e.COL0ROW2=2]="COL0ROW2",e[e.COL1ROW0=3]="COL1ROW0",e[e.COL1ROW1=4]="COL1ROW1",e[e.COL1ROW2=5]="COL1ROW2",e[e.COL2ROW0=6]="COL2ROW0",e[e.COL2ROW1=7]="COL2ROW1",e[e.COL2ROW2=8]="COL2ROW2"})(tn||(tn={}));var Dl=Object.freeze([1,0,0,0,1,0,0,0,1]),nn=function(e){(0,ql.default)(t,e);var r=Bl(t);function t(a){for(var n,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return(0,Sl.default)(this,t),n=r.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(a)?n.copy(a):s.length>0?n.copy([a].concat(s)):n.identity(),n}return(0,wl.default)(t,[{key:"ELEMENTS",get:function(){return 9}},{key:"RANK",get:function(){return 3}},{key:"INDICES",get:function(){return tn}},{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this[3]=n[3],this[4]=n[4],this[5]=n[5],this[6]=n[6],this[7]=n[7],this[8]=n[8],this.check()}},{key:"identity",value:function(){return this.copy(Dl)}},{key:"fromObject",value:function(n){return this.check()}},{key:"fromQuaternion",value:function(n){return ye.fromQuat(this,n),this.check()}},{key:"set",value:function(n,i,s,o,c,u,l,f,h){return this[0]=n,this[1]=i,this[2]=s,this[3]=o,this[4]=c,this[5]=u,this[6]=l,this[7]=f,this[8]=h,this.check()}},{key:"setRowMajor",value:function(n,i,s,o,c,u,l,f,h){return this[0]=n,this[1]=o,this[2]=l,this[3]=i,this[4]=c,this[5]=f,this[6]=s,this[7]=u,this[8]=h,this.check()}},{key:"determinant",value:function(){return ye.determinant(this)}},{key:"transpose",value:function(){return ye.transpose(this,this),this.check()}},{key:"invert",value:function(){return ye.invert(this,this),this.check()}},{key:"multiplyLeft",value:function(n){return ye.multiply(this,n,this),this.check()}},{key:"multiplyRight",value:function(n){return ye.multiply(this,this,n),this.check()}},{key:"rotate",value:function(n){return ye.rotate(this,this,n),this.check()}},{key:"scale",value:function(n){return Array.isArray(n)?ye.scale(this,this,n):ye.scale(this,this,[n,n]),this.check()}},{key:"translate",value:function(n){return ye.translate(this,this,n),this.check()}},{key:"transform",value:function(n,i){var s;switch(n.length){case 2:s=Il.transformMat3(i||[-0,-0],n,this);break;case 3:s=Wl.transformMat3(i||[-0,-0,-0],n,this);break;case 4:s=(0,Cl.vec4_transformMat3)(i||[-0,-0,-0,-0],n,this);break;default:throw new Error("Illegal vector")}return(0,Nl.checkVector)(s,n.length),s}},{key:"transformVector",value:function(n,i){return this.transform(n,i)}},{key:"transformVector2",value:function(n,i){return this.transform(n,i)}},{key:"transformVector3",value:function(n,i){return this.transform(n,i)}}],[{key:"IDENTITY",get:function(){return Yl()}},{key:"ZERO",get:function(){return zl()}}]),t}(Ll.default);ht.default=nn;var lt,ft;function zl(){return lt||(lt=new nn([0,0,0,0,0,0,0,0,0]),Object.freeze(lt)),lt}function Yl(){return ft||(ft=new nn,Object.freeze(ft)),ft}});var ei=S(k=>{"use strict";function dt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dt=function(t){return typeof t}:dt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dt(e)}Object.defineProperty(k,"__esModule",{value:!0});k.create=Ul;k.clone=Vl;k.copy=jl;k.fromValues=Zl;k.set=Xl;k.identity=Za;k.transpose=Ql;k.invert=$l;k.adjoint=Jl;k.determinant=Hl;k.multiply=Xa;k.translate=Kl;k.scale=ef;k.rotate=rf;k.rotateX=tf;k.rotateY=nf;k.rotateZ=af;k.fromTranslation=sf;k.fromScaling=of;k.fromRotation=cf;k.fromXRotation=uf;k.fromYRotation=lf;k.fromZRotation=ff;k.fromRotationTranslation=Qa;k.fromQuat2=hf;k.getTranslation=df;k.getScaling=$a;k.getRotation=pf;k.fromRotationTranslationScale=vf;k.fromRotationTranslationScaleOrigin=mf;k.fromQuat=gf;k.frustum=yf;k.perspectiveNO=Ja;k.perspectiveZO=xf;k.perspectiveFromFieldOfView=bf;k.orthoNO=Ha;k.orthoZO=Of;k.lookAt=Tf;k.targetTo=kf;k.str=Rf;k.frob=Af;k.add=Pf;k.subtract=Ka;k.multiplyScalar=Sf;k.multiplyScalarAndAdd=wf;k.exactEquals=qf;k.equals=Ef;k.sub=k.mul=k.ortho=k.perspective=void 0;var F=Gl(Xe());function ja(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(ja=function(n){return n?t:r})(e)}function Gl(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||dt(e)!=="object"&&typeof e!="function")return{default:e};var t=ja(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Ul(){var e=new F.ARRAY_TYPE(16);return F.ARRAY_TYPE!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function Vl(e){var r=new F.ARRAY_TYPE(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}function jl(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}function Zl(e,r,t,a,n,i,s,o,c,u,l,f,h,d,p,m){var v=new F.ARRAY_TYPE(16);return v[0]=e,v[1]=r,v[2]=t,v[3]=a,v[4]=n,v[5]=i,v[6]=s,v[7]=o,v[8]=c,v[9]=u,v[10]=l,v[11]=f,v[12]=h,v[13]=d,v[14]=p,v[15]=m,v}function Xl(e,r,t,a,n,i,s,o,c,u,l,f,h,d,p,m,v){return e[0]=r,e[1]=t,e[2]=a,e[3]=n,e[4]=i,e[5]=s,e[6]=o,e[7]=c,e[8]=u,e[9]=l,e[10]=f,e[11]=h,e[12]=d,e[13]=p,e[14]=m,e[15]=v,e}function Za(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Ql(e,r){if(e===r){var t=r[1],a=r[2],n=r[3],i=r[6],s=r[7],o=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=a,e[9]=i,e[11]=r[14],e[12]=n,e[13]=s,e[14]=o}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}function $l(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=r[4],o=r[5],c=r[6],u=r[7],l=r[8],f=r[9],h=r[10],d=r[11],p=r[12],m=r[13],v=r[14],g=r[15],b=t*o-a*s,y=t*c-n*s,M=t*u-i*s,T=a*c-n*o,_=a*u-i*o,I=n*u-i*c,L=l*m-f*p,N=l*v-h*p,w=l*g-d*p,W=f*v-h*m,C=f*g-d*m,B=h*g-d*v,P=b*B-y*C+M*W+T*w-_*N+I*L;return P?(P=1/P,e[0]=(o*B-c*C+u*W)*P,e[1]=(n*C-a*B-i*W)*P,e[2]=(m*I-v*_+g*T)*P,e[3]=(h*_-f*I-d*T)*P,e[4]=(c*w-s*B-u*N)*P,e[5]=(t*B-n*w+i*N)*P,e[6]=(v*M-p*I-g*y)*P,e[7]=(l*I-h*M+d*y)*P,e[8]=(s*C-o*w+u*L)*P,e[9]=(a*w-t*C-i*L)*P,e[10]=(p*_-m*M+g*b)*P,e[11]=(f*M-l*_-d*b)*P,e[12]=(o*N-s*W-c*L)*P,e[13]=(t*W-a*N+n*L)*P,e[14]=(m*y-p*T-v*b)*P,e[15]=(l*T-f*y+h*b)*P,e):null}function Jl(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=r[4],o=r[5],c=r[6],u=r[7],l=r[8],f=r[9],h=r[10],d=r[11],p=r[12],m=r[13],v=r[14],g=r[15];return e[0]=o*(h*g-d*v)-f*(c*g-u*v)+m*(c*d-u*h),e[1]=-(a*(h*g-d*v)-f*(n*g-i*v)+m*(n*d-i*h)),e[2]=a*(c*g-u*v)-o*(n*g-i*v)+m*(n*u-i*c),e[3]=-(a*(c*d-u*h)-o*(n*d-i*h)+f*(n*u-i*c)),e[4]=-(s*(h*g-d*v)-l*(c*g-u*v)+p*(c*d-u*h)),e[5]=t*(h*g-d*v)-l*(n*g-i*v)+p*(n*d-i*h),e[6]=-(t*(c*g-u*v)-s*(n*g-i*v)+p*(n*u-i*c)),e[7]=t*(c*d-u*h)-s*(n*d-i*h)+l*(n*u-i*c),e[8]=s*(f*g-d*m)-l*(o*g-u*m)+p*(o*d-u*f),e[9]=-(t*(f*g-d*m)-l*(a*g-i*m)+p*(a*d-i*f)),e[10]=t*(o*g-u*m)-s*(a*g-i*m)+p*(a*u-i*o),e[11]=-(t*(o*d-u*f)-s*(a*d-i*f)+l*(a*u-i*o)),e[12]=-(s*(f*v-h*m)-l*(o*v-c*m)+p*(o*h-c*f)),e[13]=t*(f*v-h*m)-l*(a*v-n*m)+p*(a*h-n*f),e[14]=-(t*(o*v-c*m)-s*(a*v-n*m)+p*(a*c-n*o)),e[15]=t*(o*h-c*f)-s*(a*h-n*f)+l*(a*c-n*o),e}function Hl(e){var r=e[0],t=e[1],a=e[2],n=e[3],i=e[4],s=e[5],o=e[6],c=e[7],u=e[8],l=e[9],f=e[10],h=e[11],d=e[12],p=e[13],m=e[14],v=e[15],g=r*s-t*i,b=r*o-a*i,y=r*c-n*i,M=t*o-a*s,T=t*c-n*s,_=a*c-n*o,I=u*p-l*d,L=u*m-f*d,N=u*v-h*d,w=l*m-f*p,W=l*v-h*p,C=f*v-h*m;return g*C-b*W+y*w+M*N-T*L+_*I}function Xa(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3],o=r[4],c=r[5],u=r[6],l=r[7],f=r[8],h=r[9],d=r[10],p=r[11],m=r[12],v=r[13],g=r[14],b=r[15],y=t[0],M=t[1],T=t[2],_=t[3];return e[0]=y*a+M*o+T*f+_*m,e[1]=y*n+M*c+T*h+_*v,e[2]=y*i+M*u+T*d+_*g,e[3]=y*s+M*l+T*p+_*b,y=t[4],M=t[5],T=t[6],_=t[7],e[4]=y*a+M*o+T*f+_*m,e[5]=y*n+M*c+T*h+_*v,e[6]=y*i+M*u+T*d+_*g,e[7]=y*s+M*l+T*p+_*b,y=t[8],M=t[9],T=t[10],_=t[11],e[8]=y*a+M*o+T*f+_*m,e[9]=y*n+M*c+T*h+_*v,e[10]=y*i+M*u+T*d+_*g,e[11]=y*s+M*l+T*p+_*b,y=t[12],M=t[13],T=t[14],_=t[15],e[12]=y*a+M*o+T*f+_*m,e[13]=y*n+M*c+T*h+_*v,e[14]=y*i+M*u+T*d+_*g,e[15]=y*s+M*l+T*p+_*b,e}function Kl(e,r,t){var a=t[0],n=t[1],i=t[2],s,o,c,u,l,f,h,d,p,m,v,g;return r===e?(e[12]=r[0]*a+r[4]*n+r[8]*i+r[12],e[13]=r[1]*a+r[5]*n+r[9]*i+r[13],e[14]=r[2]*a+r[6]*n+r[10]*i+r[14],e[15]=r[3]*a+r[7]*n+r[11]*i+r[15]):(s=r[0],o=r[1],c=r[2],u=r[3],l=r[4],f=r[5],h=r[6],d=r[7],p=r[8],m=r[9],v=r[10],g=r[11],e[0]=s,e[1]=o,e[2]=c,e[3]=u,e[4]=l,e[5]=f,e[6]=h,e[7]=d,e[8]=p,e[9]=m,e[10]=v,e[11]=g,e[12]=s*a+l*n+p*i+r[12],e[13]=o*a+f*n+m*i+r[13],e[14]=c*a+h*n+v*i+r[14],e[15]=u*a+d*n+g*i+r[15]),e}function ef(e,r,t){var a=t[0],n=t[1],i=t[2];return e[0]=r[0]*a,e[1]=r[1]*a,e[2]=r[2]*a,e[3]=r[3]*a,e[4]=r[4]*n,e[5]=r[5]*n,e[6]=r[6]*n,e[7]=r[7]*n,e[8]=r[8]*i,e[9]=r[9]*i,e[10]=r[10]*i,e[11]=r[11]*i,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}function rf(e,r,t,a){var n=a[0],i=a[1],s=a[2],o=Math.hypot(n,i,s),c,u,l,f,h,d,p,m,v,g,b,y,M,T,_,I,L,N,w,W,C,B,P,j;return o<F.EPSILON?null:(o=1/o,n*=o,i*=o,s*=o,c=Math.sin(t),u=Math.cos(t),l=1-u,f=r[0],h=r[1],d=r[2],p=r[3],m=r[4],v=r[5],g=r[6],b=r[7],y=r[8],M=r[9],T=r[10],_=r[11],I=n*n*l+u,L=i*n*l+s*c,N=s*n*l-i*c,w=n*i*l-s*c,W=i*i*l+u,C=s*i*l+n*c,B=n*s*l+i*c,P=i*s*l-n*c,j=s*s*l+u,e[0]=f*I+m*L+y*N,e[1]=h*I+v*L+M*N,e[2]=d*I+g*L+T*N,e[3]=p*I+b*L+_*N,e[4]=f*w+m*W+y*C,e[5]=h*w+v*W+M*C,e[6]=d*w+g*W+T*C,e[7]=p*w+b*W+_*C,e[8]=f*B+m*P+y*j,e[9]=h*B+v*P+M*j,e[10]=d*B+g*P+T*j,e[11]=p*B+b*P+_*j,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}function tf(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[4],s=r[5],o=r[6],c=r[7],u=r[8],l=r[9],f=r[10],h=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=i*n+u*a,e[5]=s*n+l*a,e[6]=o*n+f*a,e[7]=c*n+h*a,e[8]=u*n-i*a,e[9]=l*n-s*a,e[10]=f*n-o*a,e[11]=h*n-c*a,e}function nf(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],s=r[1],o=r[2],c=r[3],u=r[8],l=r[9],f=r[10],h=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n-u*a,e[1]=s*n-l*a,e[2]=o*n-f*a,e[3]=c*n-h*a,e[8]=i*a+u*n,e[9]=s*a+l*n,e[10]=o*a+f*n,e[11]=c*a+h*n,e}function af(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],s=r[1],o=r[2],c=r[3],u=r[4],l=r[5],f=r[6],h=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n+u*a,e[1]=s*n+l*a,e[2]=o*n+f*a,e[3]=c*n+h*a,e[4]=u*n-i*a,e[5]=l*n-s*a,e[6]=f*n-o*a,e[7]=h*n-c*a,e}function sf(e,r){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function of(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function cf(e,r,t){var a=t[0],n=t[1],i=t[2],s=Math.hypot(a,n,i),o,c,u;return s<F.EPSILON?null:(s=1/s,a*=s,n*=s,i*=s,o=Math.sin(r),c=Math.cos(r),u=1-c,e[0]=a*a*u+c,e[1]=n*a*u+i*o,e[2]=i*a*u-n*o,e[3]=0,e[4]=a*n*u-i*o,e[5]=n*n*u+c,e[6]=i*n*u+a*o,e[7]=0,e[8]=a*i*u+n*o,e[9]=n*i*u-a*o,e[10]=i*i*u+c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function uf(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function lf(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ff(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Qa(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3],o=a+a,c=n+n,u=i+i,l=a*o,f=a*c,h=a*u,d=n*c,p=n*u,m=i*u,v=s*o,g=s*c,b=s*u;return e[0]=1-(d+m),e[1]=f+b,e[2]=h-g,e[3]=0,e[4]=f-b,e[5]=1-(l+m),e[6]=p+v,e[7]=0,e[8]=h+g,e[9]=p-v,e[10]=1-(l+d),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function hf(e,r){var t=new F.ARRAY_TYPE(3),a=-r[0],n=-r[1],i=-r[2],s=r[3],o=r[4],c=r[5],u=r[6],l=r[7],f=a*a+n*n+i*i+s*s;return f>0?(t[0]=(o*s+l*a+c*i-u*n)*2/f,t[1]=(c*s+l*n+u*a-o*i)*2/f,t[2]=(u*s+l*i+o*n-c*a)*2/f):(t[0]=(o*s+l*a+c*i-u*n)*2,t[1]=(c*s+l*n+u*a-o*i)*2,t[2]=(u*s+l*i+o*n-c*a)*2),Qa(e,r,t),e}function df(e,r){return e[0]=r[12],e[1]=r[13],e[2]=r[14],e}function $a(e,r){var t=r[0],a=r[1],n=r[2],i=r[4],s=r[5],o=r[6],c=r[8],u=r[9],l=r[10];return e[0]=Math.hypot(t,a,n),e[1]=Math.hypot(i,s,o),e[2]=Math.hypot(c,u,l),e}function pf(e,r){var t=new F.ARRAY_TYPE(3);$a(t,r);var a=1/t[0],n=1/t[1],i=1/t[2],s=r[0]*a,o=r[1]*n,c=r[2]*i,u=r[4]*a,l=r[5]*n,f=r[6]*i,h=r[8]*a,d=r[9]*n,p=r[10]*i,m=s+l+p,v=0;return m>0?(v=Math.sqrt(m+1)*2,e[3]=.25*v,e[0]=(f-d)/v,e[1]=(h-c)/v,e[2]=(o-u)/v):s>l&&s>p?(v=Math.sqrt(1+s-l-p)*2,e[3]=(f-d)/v,e[0]=.25*v,e[1]=(o+u)/v,e[2]=(h+c)/v):l>p?(v=Math.sqrt(1+l-s-p)*2,e[3]=(h-c)/v,e[0]=(o+u)/v,e[1]=.25*v,e[2]=(f+d)/v):(v=Math.sqrt(1+p-s-l)*2,e[3]=(o-u)/v,e[0]=(h+c)/v,e[1]=(f+d)/v,e[2]=.25*v),e}function vf(e,r,t,a){var n=r[0],i=r[1],s=r[2],o=r[3],c=n+n,u=i+i,l=s+s,f=n*c,h=n*u,d=n*l,p=i*u,m=i*l,v=s*l,g=o*c,b=o*u,y=o*l,M=a[0],T=a[1],_=a[2];return e[0]=(1-(p+v))*M,e[1]=(h+y)*M,e[2]=(d-b)*M,e[3]=0,e[4]=(h-y)*T,e[5]=(1-(f+v))*T,e[6]=(m+g)*T,e[7]=0,e[8]=(d+b)*_,e[9]=(m-g)*_,e[10]=(1-(f+p))*_,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function mf(e,r,t,a,n){var i=r[0],s=r[1],o=r[2],c=r[3],u=i+i,l=s+s,f=o+o,h=i*u,d=i*l,p=i*f,m=s*l,v=s*f,g=o*f,b=c*u,y=c*l,M=c*f,T=a[0],_=a[1],I=a[2],L=n[0],N=n[1],w=n[2],W=(1-(m+g))*T,C=(d+M)*T,B=(p-y)*T,P=(d-M)*_,j=(1-(h+g))*_,he=(v+b)*_,de=(p+y)*I,Ye=(v-b)*I,Ge=(1-(h+m))*I;return e[0]=W,e[1]=C,e[2]=B,e[3]=0,e[4]=P,e[5]=j,e[6]=he,e[7]=0,e[8]=de,e[9]=Ye,e[10]=Ge,e[11]=0,e[12]=t[0]+L-(W*L+P*N+de*w),e[13]=t[1]+N-(C*L+j*N+Ye*w),e[14]=t[2]+w-(B*L+he*N+Ge*w),e[15]=1,e}function gf(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=t+t,o=a+a,c=n+n,u=t*s,l=a*s,f=a*o,h=n*s,d=n*o,p=n*c,m=i*s,v=i*o,g=i*c;return e[0]=1-f-p,e[1]=l+g,e[2]=h-v,e[3]=0,e[4]=l-g,e[5]=1-u-p,e[6]=d+m,e[7]=0,e[8]=h+v,e[9]=d-m,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function yf(e,r,t,a,n,i,s){var o=1/(t-r),c=1/(n-a),u=1/(i-s);return e[0]=i*2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*c,e[6]=0,e[7]=0,e[8]=(t+r)*o,e[9]=(n+a)*c,e[10]=(s+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=s*i*2*u,e[15]=0,e}function Ja(e,r,t,a,n){var i=1/Math.tan(r/2),s;return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,n!=null&&n!==1/0?(s=1/(a-n),e[10]=(n+a)*s,e[14]=2*n*a*s):(e[10]=-1,e[14]=-2*a),e}var Mf=Ja;k.perspective=Mf;function xf(e,r,t,a,n){var i=1/Math.tan(r/2),s;return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,n!=null&&n!==1/0?(s=1/(a-n),e[10]=n*s,e[14]=n*a*s):(e[10]=-1,e[14]=-a),e}function bf(e,r,t,a){var n=Math.tan(r.upDegrees*Math.PI/180),i=Math.tan(r.downDegrees*Math.PI/180),s=Math.tan(r.leftDegrees*Math.PI/180),o=Math.tan(r.rightDegrees*Math.PI/180),c=2/(s+o),u=2/(n+i);return e[0]=c,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((s-o)*c*.5),e[9]=(n-i)*u*.5,e[10]=a/(t-a),e[11]=-1,e[12]=0,e[13]=0,e[14]=a*t/(t-a),e[15]=0,e}function Ha(e,r,t,a,n,i,s){var o=1/(r-t),c=1/(a-n),u=1/(i-s);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*o,e[13]=(n+a)*c,e[14]=(s+i)*u,e[15]=1,e}var _f=Ha;k.ortho=_f;function Of(e,r,t,a,n,i,s){var o=1/(r-t),c=1/(a-n),u=1/(i-s);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=u,e[11]=0,e[12]=(r+t)*o,e[13]=(n+a)*c,e[14]=i*u,e[15]=1,e}function Tf(e,r,t,a){var n,i,s,o,c,u,l,f,h,d,p=r[0],m=r[1],v=r[2],g=a[0],b=a[1],y=a[2],M=t[0],T=t[1],_=t[2];return Math.abs(p-M)<F.EPSILON&&Math.abs(m-T)<F.EPSILON&&Math.abs(v-_)<F.EPSILON?Za(e):(l=p-M,f=m-T,h=v-_,d=1/Math.hypot(l,f,h),l*=d,f*=d,h*=d,n=b*h-y*f,i=y*l-g*h,s=g*f-b*l,d=Math.hypot(n,i,s),d?(d=1/d,n*=d,i*=d,s*=d):(n=0,i=0,s=0),o=f*s-h*i,c=h*n-l*s,u=l*i-f*n,d=Math.hypot(o,c,u),d?(d=1/d,o*=d,c*=d,u*=d):(o=0,c=0,u=0),e[0]=n,e[1]=o,e[2]=l,e[3]=0,e[4]=i,e[5]=c,e[6]=f,e[7]=0,e[8]=s,e[9]=u,e[10]=h,e[11]=0,e[12]=-(n*p+i*m+s*v),e[13]=-(o*p+c*m+u*v),e[14]=-(l*p+f*m+h*v),e[15]=1,e)}function kf(e,r,t,a){var n=r[0],i=r[1],s=r[2],o=a[0],c=a[1],u=a[2],l=n-t[0],f=i-t[1],h=s-t[2],d=l*l+f*f+h*h;d>0&&(d=1/Math.sqrt(d),l*=d,f*=d,h*=d);var p=c*h-u*f,m=u*l-o*h,v=o*f-c*l;return d=p*p+m*m+v*v,d>0&&(d=1/Math.sqrt(d),p*=d,m*=d,v*=d),e[0]=p,e[1]=m,e[2]=v,e[3]=0,e[4]=f*v-h*m,e[5]=h*p-l*v,e[6]=l*m-f*p,e[7]=0,e[8]=l,e[9]=f,e[10]=h,e[11]=0,e[12]=n,e[13]=i,e[14]=s,e[15]=1,e}function Rf(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function Af(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function Pf(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e[2]=r[2]+t[2],e[3]=r[3]+t[3],e[4]=r[4]+t[4],e[5]=r[5]+t[5],e[6]=r[6]+t[6],e[7]=r[7]+t[7],e[8]=r[8]+t[8],e[9]=r[9]+t[9],e[10]=r[10]+t[10],e[11]=r[11]+t[11],e[12]=r[12]+t[12],e[13]=r[13]+t[13],e[14]=r[14]+t[14],e[15]=r[15]+t[15],e}function Ka(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e[2]=r[2]-t[2],e[3]=r[3]-t[3],e[4]=r[4]-t[4],e[5]=r[5]-t[5],e[6]=r[6]-t[6],e[7]=r[7]-t[7],e[8]=r[8]-t[8],e[9]=r[9]-t[9],e[10]=r[10]-t[10],e[11]=r[11]-t[11],e[12]=r[12]-t[12],e[13]=r[13]-t[13],e[14]=r[14]-t[14],e[15]=r[15]-t[15],e}function Sf(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e[3]=r[3]*t,e[4]=r[4]*t,e[5]=r[5]*t,e[6]=r[6]*t,e[7]=r[7]*t,e[8]=r[8]*t,e[9]=r[9]*t,e[10]=r[10]*t,e[11]=r[11]*t,e[12]=r[12]*t,e[13]=r[13]*t,e[14]=r[14]*t,e[15]=r[15]*t,e}function wf(e,r,t,a){return e[0]=r[0]+t[0]*a,e[1]=r[1]+t[1]*a,e[2]=r[2]+t[2]*a,e[3]=r[3]+t[3]*a,e[4]=r[4]+t[4]*a,e[5]=r[5]+t[5]*a,e[6]=r[6]+t[6]*a,e[7]=r[7]+t[7]*a,e[8]=r[8]+t[8]*a,e[9]=r[9]+t[9]*a,e[10]=r[10]+t[10]*a,e[11]=r[11]+t[11]*a,e[12]=r[12]+t[12]*a,e[13]=r[13]+t[13]*a,e[14]=r[14]+t[14]*a,e[15]=r[15]+t[15]*a,e}function qf(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]&&e[4]===r[4]&&e[5]===r[5]&&e[6]===r[6]&&e[7]===r[7]&&e[8]===r[8]&&e[9]===r[9]&&e[10]===r[10]&&e[11]===r[11]&&e[12]===r[12]&&e[13]===r[13]&&e[14]===r[14]&&e[15]===r[15]}function Ef(e,r){var t=e[0],a=e[1],n=e[2],i=e[3],s=e[4],o=e[5],c=e[6],u=e[7],l=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],v=e[14],g=e[15],b=r[0],y=r[1],M=r[2],T=r[3],_=r[4],I=r[5],L=r[6],N=r[7],w=r[8],W=r[9],C=r[10],B=r[11],P=r[12],j=r[13],he=r[14],de=r[15];return Math.abs(t-b)<=F.EPSILON*Math.max(1,Math.abs(t),Math.abs(b))&&Math.abs(a-y)<=F.EPSILON*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(n-M)<=F.EPSILON*Math.max(1,Math.abs(n),Math.abs(M))&&Math.abs(i-T)<=F.EPSILON*Math.max(1,Math.abs(i),Math.abs(T))&&Math.abs(s-_)<=F.EPSILON*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(o-I)<=F.EPSILON*Math.max(1,Math.abs(o),Math.abs(I))&&Math.abs(c-L)<=F.EPSILON*Math.max(1,Math.abs(c),Math.abs(L))&&Math.abs(u-N)<=F.EPSILON*Math.max(1,Math.abs(u),Math.abs(N))&&Math.abs(l-w)<=F.EPSILON*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(f-W)<=F.EPSILON*Math.max(1,Math.abs(f),Math.abs(W))&&Math.abs(h-C)<=F.EPSILON*Math.max(1,Math.abs(h),Math.abs(C))&&Math.abs(d-B)<=F.EPSILON*Math.max(1,Math.abs(d),Math.abs(B))&&Math.abs(p-P)<=F.EPSILON*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(m-j)<=F.EPSILON*Math.max(1,Math.abs(m),Math.abs(j))&&Math.abs(v-he)<=F.EPSILON*Math.max(1,Math.abs(v),Math.abs(he))&&Math.abs(g-de)<=F.EPSILON*Math.max(1,Math.abs(g),Math.abs(de))}var Lf=Xa;k.mul=Lf;var Nf=Ka;k.sub=Nf});var vt=S(A=>{"use strict";function pt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pt=function(t){return typeof t}:pt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pt(e)}Object.defineProperty(A,"__esModule",{value:!0});A.create=ti;A.clone=If;A.fromValues=Wf;A.copy=Bf;A.set=Ff;A.add=Df;A.subtract=ni;A.multiply=ai;A.divide=ii;A.ceil=zf;A.floor=Yf;A.min=Gf;A.max=Uf;A.round=Vf;A.scale=jf;A.scaleAndAdd=Zf;A.distance=si;A.squaredDistance=oi;A.length=ci;A.squaredLength=ui;A.negate=Xf;A.inverse=Qf;A.normalize=$f;A.dot=Jf;A.cross=Hf;A.lerp=Kf;A.random=eh;A.transformMat4=rh;A.transformQuat=th;A.zero=nh;A.str=ah;A.exactEquals=ih;A.equals=sh;A.forEach=A.sqrLen=A.len=A.sqrDist=A.dist=A.div=A.mul=A.sub=void 0;var ae=Cf(Xe());function ri(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(ri=function(n){return n?t:r})(e)}function Cf(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||pt(e)!=="object"&&typeof e!="function")return{default:e};var t=ri(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function ti(){var e=new ae.ARRAY_TYPE(4);return ae.ARRAY_TYPE!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function If(e){var r=new ae.ARRAY_TYPE(4);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}function Wf(e,r,t,a){var n=new ae.ARRAY_TYPE(4);return n[0]=e,n[1]=r,n[2]=t,n[3]=a,n}function Bf(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e}function Ff(e,r,t,a,n){return e[0]=r,e[1]=t,e[2]=a,e[3]=n,e}function Df(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e[2]=r[2]+t[2],e[3]=r[3]+t[3],e}function ni(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e[2]=r[2]-t[2],e[3]=r[3]-t[3],e}function ai(e,r,t){return e[0]=r[0]*t[0],e[1]=r[1]*t[1],e[2]=r[2]*t[2],e[3]=r[3]*t[3],e}function ii(e,r,t){return e[0]=r[0]/t[0],e[1]=r[1]/t[1],e[2]=r[2]/t[2],e[3]=r[3]/t[3],e}function zf(e,r){return e[0]=Math.ceil(r[0]),e[1]=Math.ceil(r[1]),e[2]=Math.ceil(r[2]),e[3]=Math.ceil(r[3]),e}function Yf(e,r){return e[0]=Math.floor(r[0]),e[1]=Math.floor(r[1]),e[2]=Math.floor(r[2]),e[3]=Math.floor(r[3]),e}function Gf(e,r,t){return e[0]=Math.min(r[0],t[0]),e[1]=Math.min(r[1],t[1]),e[2]=Math.min(r[2],t[2]),e[3]=Math.min(r[3],t[3]),e}function Uf(e,r,t){return e[0]=Math.max(r[0],t[0]),e[1]=Math.max(r[1],t[1]),e[2]=Math.max(r[2],t[2]),e[3]=Math.max(r[3],t[3]),e}function Vf(e,r){return e[0]=Math.round(r[0]),e[1]=Math.round(r[1]),e[2]=Math.round(r[2]),e[3]=Math.round(r[3]),e}function jf(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e[3]=r[3]*t,e}function Zf(e,r,t,a){return e[0]=r[0]+t[0]*a,e[1]=r[1]+t[1]*a,e[2]=r[2]+t[2]*a,e[3]=r[3]+t[3]*a,e}function si(e,r){var t=r[0]-e[0],a=r[1]-e[1],n=r[2]-e[2],i=r[3]-e[3];return Math.hypot(t,a,n,i)}function oi(e,r){var t=r[0]-e[0],a=r[1]-e[1],n=r[2]-e[2],i=r[3]-e[3];return t*t+a*a+n*n+i*i}function ci(e){var r=e[0],t=e[1],a=e[2],n=e[3];return Math.hypot(r,t,a,n)}function ui(e){var r=e[0],t=e[1],a=e[2],n=e[3];return r*r+t*t+a*a+n*n}function Xf(e,r){return e[0]=-r[0],e[1]=-r[1],e[2]=-r[2],e[3]=-r[3],e}function Qf(e,r){return e[0]=1/r[0],e[1]=1/r[1],e[2]=1/r[2],e[3]=1/r[3],e}function $f(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=t*t+a*a+n*n+i*i;return s>0&&(s=1/Math.sqrt(s)),e[0]=t*s,e[1]=a*s,e[2]=n*s,e[3]=i*s,e}function Jf(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3]}function Hf(e,r,t,a){var n=t[0]*a[1]-t[1]*a[0],i=t[0]*a[2]-t[2]*a[0],s=t[0]*a[3]-t[3]*a[0],o=t[1]*a[2]-t[2]*a[1],c=t[1]*a[3]-t[3]*a[1],u=t[2]*a[3]-t[3]*a[2],l=r[0],f=r[1],h=r[2],d=r[3];return e[0]=f*u-h*c+d*o,e[1]=-(l*u)+h*s-d*i,e[2]=l*c-f*s+d*n,e[3]=-(l*o)+f*i-h*n,e}function Kf(e,r,t,a){var n=r[0],i=r[1],s=r[2],o=r[3];return e[0]=n+a*(t[0]-n),e[1]=i+a*(t[1]-i),e[2]=s+a*(t[2]-s),e[3]=o+a*(t[3]-o),e}function eh(e,r){r=r||1;var t,a,n,i,s,o;do t=ae.RANDOM()*2-1,a=ae.RANDOM()*2-1,s=t*t+a*a;while(s>=1);do n=ae.RANDOM()*2-1,i=ae.RANDOM()*2-1,o=n*n+i*i;while(o>=1);var c=Math.sqrt((1-s)/o);return e[0]=r*t,e[1]=r*a,e[2]=r*n*c,e[3]=r*i*c,e}function rh(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3];return e[0]=t[0]*a+t[4]*n+t[8]*i+t[12]*s,e[1]=t[1]*a+t[5]*n+t[9]*i+t[13]*s,e[2]=t[2]*a+t[6]*n+t[10]*i+t[14]*s,e[3]=t[3]*a+t[7]*n+t[11]*i+t[15]*s,e}function th(e,r,t){var a=r[0],n=r[1],i=r[2],s=t[0],o=t[1],c=t[2],u=t[3],l=u*a+o*i-c*n,f=u*n+c*a-s*i,h=u*i+s*n-o*a,d=-s*a-o*n-c*i;return e[0]=l*u+d*-s+f*-c-h*-o,e[1]=f*u+d*-o+h*-s-l*-c,e[2]=h*u+d*-c+l*-o-f*-s,e[3]=r[3],e}function nh(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function ah(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function ih(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]}function sh(e,r){var t=e[0],a=e[1],n=e[2],i=e[3],s=r[0],o=r[1],c=r[2],u=r[3];return Math.abs(t-s)<=ae.EPSILON*Math.max(1,Math.abs(t),Math.abs(s))&&Math.abs(a-o)<=ae.EPSILON*Math.max(1,Math.abs(a),Math.abs(o))&&Math.abs(n-c)<=ae.EPSILON*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(i-u)<=ae.EPSILON*Math.max(1,Math.abs(i),Math.abs(u))}var oh=ni;A.sub=oh;var ch=ai;A.mul=ch;var uh=ii;A.div=uh;var lh=si;A.dist=lh;var fh=oi;A.sqrDist=fh;var hh=ci;A.len=hh;var dh=ui;A.sqrLen=dh;var ph=function(){var e=ti();return function(r,t,a,n,i,s){var o,c;for(t||(t=4),a||(a=0),n?c=Math.min(n*t+a,r.length):c=r.length,o=a;o<c;o+=t)e[0]=r[o],e[1]=r[o+1],e[2]=r[o+2],e[3]=r[o+3],i(e,e,s),r[o]=e[0],r[o+1]=e[1],r[o+2]=e[2],r[o+3]=e[3];return r}}();A.forEach=ph});var ln=S(Mt=>{"use strict";var lr=V(),vh=se();Object.defineProperty(Mt,"__esModule",{value:!0});Mt.default=void 0;var mh=lr($()),gh=lr(J()),yh=lr(oe()),Mh=lr(ce()),li=lr(ue()),xh=lr(Kt()),an=me(),fi=ar(),Z=mt(ei()),bh=mt(Hr()),_h=mt(Le()),Oh=mt(vt());function hi(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(hi=function(n){return n?t:r})(e)}function mt(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||vh(e)!=="object"&&typeof e!="function")return{default:e};var t=hi(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Th(e){var r=kh();return function(){var a=(0,li.default)(e),n;if(r){var i=(0,li.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,Mh.default)(this,n)}}function kh(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var sn;(function(e){e[e.COL0ROW0=0]="COL0ROW0",e[e.COL0ROW1=1]="COL0ROW1",e[e.COL0ROW2=2]="COL0ROW2",e[e.COL0ROW3=3]="COL0ROW3",e[e.COL1ROW0=4]="COL1ROW0",e[e.COL1ROW1=5]="COL1ROW1",e[e.COL1ROW2=6]="COL1ROW2",e[e.COL1ROW3=7]="COL1ROW3",e[e.COL2ROW0=8]="COL2ROW0",e[e.COL2ROW1=9]="COL2ROW1",e[e.COL2ROW2=10]="COL2ROW2",e[e.COL2ROW3=11]="COL2ROW3",e[e.COL3ROW0=12]="COL3ROW0",e[e.COL3ROW1=13]="COL3ROW1",e[e.COL3ROW2=14]="COL3ROW2",e[e.COL3ROW3=15]="COL3ROW3"})(sn||(sn={}));var Rh=45*Math.PI/180,Ah=1,on=.1,cn=500,Ph=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),un=function(e){(0,yh.default)(t,e);var r=Th(t);function t(a){var n;return(0,mh.default)(this,t),n=r.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(a)?n.copy(a):n.identity(),n}return(0,gh.default)(t,[{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}},{key:"INDICES",get:function(){return sn}},{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this[3]=n[3],this[4]=n[4],this[5]=n[5],this[6]=n[6],this[7]=n[7],this[8]=n[8],this[9]=n[9],this[10]=n[10],this[11]=n[11],this[12]=n[12],this[13]=n[13],this[14]=n[14],this[15]=n[15],this.check()}},{key:"set",value:function(n,i,s,o,c,u,l,f,h,d,p,m,v,g,b,y){return this[0]=n,this[1]=i,this[2]=s,this[3]=o,this[4]=c,this[5]=u,this[6]=l,this[7]=f,this[8]=h,this[9]=d,this[10]=p,this[11]=m,this[12]=v,this[13]=g,this[14]=b,this[15]=y,this.check()}},{key:"setRowMajor",value:function(n,i,s,o,c,u,l,f,h,d,p,m,v,g,b,y){return this[0]=n,this[1]=c,this[2]=h,this[3]=v,this[4]=i,this[5]=u,this[6]=d,this[7]=g,this[8]=s,this[9]=l,this[10]=p,this[11]=b,this[12]=o,this[13]=f,this[14]=m,this[15]=y,this.check()}},{key:"toRowMajor",value:function(n){return n[0]=this[0],n[1]=this[4],n[2]=this[8],n[3]=this[12],n[4]=this[1],n[5]=this[5],n[6]=this[9],n[7]=this[13],n[8]=this[2],n[9]=this[6],n[10]=this[10],n[11]=this[14],n[12]=this[3],n[13]=this[7],n[14]=this[11],n[15]=this[15],n}},{key:"identity",value:function(){return this.copy(Ph)}},{key:"fromObject",value:function(n){return this.check()}},{key:"fromQuaternion",value:function(n){return Z.fromQuat(this,n),this.check()}},{key:"frustum",value:function(n){var i=n.left,s=n.right,o=n.bottom,c=n.top,u=n.near,l=u===void 0?on:u,f=n.far,h=f===void 0?cn:f;return h===1/0?qh(this,i,s,o,c,l):Z.frustum(this,i,s,o,c,l,h),this.check()}},{key:"lookAt",value:function(n){var i=n.eye,s=n.center,o=s===void 0?[0,0,0]:s,c=n.up,u=c===void 0?[0,1,0]:c;return Z.lookAt(this,i,o,u),this.check()}},{key:"ortho",value:function(n){var i=n.left,s=n.right,o=n.bottom,c=n.top,u=n.near,l=u===void 0?on:u,f=n.far,h=f===void 0?cn:f;return Z.ortho(this,i,s,o,c,l,h),this.check()}},{key:"orthographic",value:function(n){var i=n.fovy,s=i===void 0?Rh:i,o=n.aspect,c=o===void 0?Ah:o,u=n.focalDistance,l=u===void 0?1:u,f=n.near,h=f===void 0?on:f,d=n.far,p=d===void 0?cn:d;di(s);var m=s/2,v=l*Math.tan(m),g=v*c;return this.ortho({left:-g,right:g,bottom:-v,top:v,near:h,far:p})}},{key:"perspective",value:function(n){var i=n.fovy,s=i===void 0?45*Math.PI/180:i,o=n.aspect,c=o===void 0?1:o,u=n.near,l=u===void 0?.1:u,f=n.far,h=f===void 0?500:f;return di(s),Z.perspective(this,s,c,l,h),this.check()}},{key:"determinant",value:function(){return Z.determinant(this)}},{key:"getScale",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[-0,-0,-0];return n[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),n[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),n[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),n}},{key:"getTranslation",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[-0,-0,-0];return n[0]=this[12],n[1]=this[13],n[2]=this[14],n}},{key:"getRotation",value:function(n,i){n=n||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],i=i||[-0,-0,-0];var s=this.getScale(i),o=1/s[0],c=1/s[1],u=1/s[2];return n[0]=this[0]*o,n[1]=this[1]*c,n[2]=this[2]*u,n[3]=0,n[4]=this[4]*o,n[5]=this[5]*c,n[6]=this[6]*u,n[7]=0,n[8]=this[8]*o,n[9]=this[9]*c,n[10]=this[10]*u,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}},{key:"getRotationMatrix3",value:function(n,i){n=n||[-0,-0,-0,-0,-0,-0,-0,-0,-0],i=i||[-0,-0,-0];var s=this.getScale(i),o=1/s[0],c=1/s[1],u=1/s[2];return n[0]=this[0]*o,n[1]=this[1]*c,n[2]=this[2]*u,n[3]=this[4]*o,n[4]=this[5]*c,n[5]=this[6]*u,n[6]=this[8]*o,n[7]=this[9]*c,n[8]=this[10]*u,n}},{key:"transpose",value:function(){return Z.transpose(this,this),this.check()}},{key:"invert",value:function(){return Z.invert(this,this),this.check()}},{key:"multiplyLeft",value:function(n){return Z.multiply(this,n,this),this.check()}},{key:"multiplyRight",value:function(n){return Z.multiply(this,this,n),this.check()}},{key:"rotateX",value:function(n){return Z.rotateX(this,this,n),this.check()}},{key:"rotateY",value:function(n){return Z.rotateY(this,this,n),this.check()}},{key:"rotateZ",value:function(n){return Z.rotateZ(this,this,n),this.check()}},{key:"rotateXYZ",value:function(n){return this.rotateX(n[0]).rotateY(n[1]).rotateZ(n[2])}},{key:"rotateAxis",value:function(n,i){return Z.rotate(this,this,n,i),this.check()}},{key:"scale",value:function(n){return Z.scale(this,this,Array.isArray(n)?n:[n,n,n]),this.check()}},{key:"translate",value:function(n){return Z.translate(this,this,n),this.check()}},{key:"transform",value:function(n,i){return n.length===4?(i=Oh.transformMat4(i||[-0,-0,-0,-0],n,this),(0,an.checkVector)(i,4),i):this.transformAsPoint(n,i)}},{key:"transformAsPoint",value:function(n,i){var s=n.length,o;switch(s){case 2:o=bh.transformMat4(i||[-0,-0],n,this);break;case 3:o=_h.transformMat4(i||[-0,-0,-0],n,this);break;default:throw new Error("Illegal vector")}return(0,an.checkVector)(o,n.length),o}},{key:"transformAsVector",value:function(n,i){var s;switch(n.length){case 2:s=(0,fi.vec2_transformMat4AsVector)(i||[-0,-0],n,this);break;case 3:s=(0,fi.vec3_transformMat4AsVector)(i||[-0,-0,-0],n,this);break;default:throw new Error("Illegal vector")}return(0,an.checkVector)(s,n.length),s}},{key:"transformPoint",value:function(n,i){return this.transformAsPoint(n,i)}},{key:"transformVector",value:function(n,i){return this.transformAsPoint(n,i)}},{key:"transformDirection",value:function(n,i){return this.transformAsVector(n,i)}},{key:"makeRotationX",value:function(n){return this.identity().rotateX(n)}},{key:"makeTranslation",value:function(n,i,s){return this.identity().translate([n,i,s])}}],[{key:"IDENTITY",get:function(){return wh()}},{key:"ZERO",get:function(){return Sh()}}]),t}(xh.default);Mt.default=un;var gt,yt;function Sh(){return gt||(gt=new un([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(gt)),gt}function wh(){return yt||(yt=new un,Object.freeze(yt)),yt}function di(e){if(e>Math.PI*2)throw Error("expected radians")}function qh(e,r,t,a,n,i){var s=2*i/(t-r),o=2*i/(n-a),c=(t+r)/(t-r),u=(n+a)/(n-a),l=-1,f=-1,h=-2*i;return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=c,e[9]=u,e[10]=l,e[11]=f,e[12]=0,e[13]=0,e[14]=h,e[15]=0,e}});var Ti=S(x=>{"use strict";function xt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xt=function(t){return typeof t}:xt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xt(e)}Object.defineProperty(x,"__esModule",{value:!0});x.create=fn;x.identity=Lh;x.setAxisAngle=vi;x.getAxisAngle=Nh;x.getAngle=Ch;x.multiply=mi;x.rotateX=Ih;x.rotateY=Wh;x.rotateZ=Bh;x.calculateW=Fh;x.exp=gi;x.ln=yi;x.pow=Dh;x.slerp=_t;x.random=zh;x.invert=Yh;x.conjugate=Gh;x.fromMat3=Mi;x.fromEuler=Uh;x.str=Vh;x.setAxes=x.sqlerp=x.rotationTo=x.equals=x.exactEquals=x.normalize=x.sqrLen=x.squaredLength=x.len=x.length=x.lerp=x.dot=x.scale=x.mul=x.add=x.set=x.copy=x.fromValues=x.clone=void 0;var He=bt(Xe()),Eh=bt(en()),Pe=bt(Le()),re=bt(vt());function pi(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(pi=function(n){return n?t:r})(e)}function bt(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||xt(e)!=="object"&&typeof e!="function")return{default:e};var t=pi(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function fn(){var e=new He.ARRAY_TYPE(4);return He.ARRAY_TYPE!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Lh(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function vi(e,r,t){t=t*.5;var a=Math.sin(t);return e[0]=a*r[0],e[1]=a*r[1],e[2]=a*r[2],e[3]=Math.cos(t),e}function Nh(e,r){var t=Math.acos(r[3])*2,a=Math.sin(t/2);return a>He.EPSILON?(e[0]=r[0]/a,e[1]=r[1]/a,e[2]=r[2]/a):(e[0]=1,e[1]=0,e[2]=0),t}function Ch(e,r){var t=bi(e,r);return Math.acos(2*t*t-1)}function mi(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3],o=t[0],c=t[1],u=t[2],l=t[3];return e[0]=a*l+s*o+n*u-i*c,e[1]=n*l+s*c+i*o-a*u,e[2]=i*l+s*u+a*c-n*o,e[3]=s*l-a*o-n*c-i*u,e}function Ih(e,r,t){t*=.5;var a=r[0],n=r[1],i=r[2],s=r[3],o=Math.sin(t),c=Math.cos(t);return e[0]=a*c+s*o,e[1]=n*c+i*o,e[2]=i*c-n*o,e[3]=s*c-a*o,e}function Wh(e,r,t){t*=.5;var a=r[0],n=r[1],i=r[2],s=r[3],o=Math.sin(t),c=Math.cos(t);return e[0]=a*c-i*o,e[1]=n*c+s*o,e[2]=i*c+a*o,e[3]=s*c-n*o,e}function Bh(e,r,t){t*=.5;var a=r[0],n=r[1],i=r[2],s=r[3],o=Math.sin(t),c=Math.cos(t);return e[0]=a*c+n*o,e[1]=n*c-a*o,e[2]=i*c+s*o,e[3]=s*c-i*o,e}function Fh(e,r){var t=r[0],a=r[1],n=r[2];return e[0]=t,e[1]=a,e[2]=n,e[3]=Math.sqrt(Math.abs(1-t*t-a*a-n*n)),e}function gi(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=Math.sqrt(t*t+a*a+n*n),o=Math.exp(i),c=s>0?o*Math.sin(s)/s:0;return e[0]=t*c,e[1]=a*c,e[2]=n*c,e[3]=o*Math.cos(s),e}function yi(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=Math.sqrt(t*t+a*a+n*n),o=s>0?Math.atan2(s,i)/s:0;return e[0]=t*o,e[1]=a*o,e[2]=n*o,e[3]=.5*Math.log(t*t+a*a+n*n+i*i),e}function Dh(e,r,t){return yi(e,r),xi(e,e,t),gi(e,e),e}function _t(e,r,t,a){var n=r[0],i=r[1],s=r[2],o=r[3],c=t[0],u=t[1],l=t[2],f=t[3],h,d,p,m,v;return d=n*c+i*u+s*l+o*f,d<0&&(d=-d,c=-c,u=-u,l=-l,f=-f),1-d>He.EPSILON?(h=Math.acos(d),p=Math.sin(h),m=Math.sin((1-a)*h)/p,v=Math.sin(a*h)/p):(m=1-a,v=a),e[0]=m*n+v*c,e[1]=m*i+v*u,e[2]=m*s+v*l,e[3]=m*o+v*f,e}function zh(e){var r=He.RANDOM(),t=He.RANDOM(),a=He.RANDOM(),n=Math.sqrt(1-r),i=Math.sqrt(r);return e[0]=n*Math.sin(2*Math.PI*t),e[1]=n*Math.cos(2*Math.PI*t),e[2]=i*Math.sin(2*Math.PI*a),e[3]=i*Math.cos(2*Math.PI*a),e}function Yh(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=t*t+a*a+n*n+i*i,o=s?1/s:0;return e[0]=-t*o,e[1]=-a*o,e[2]=-n*o,e[3]=i*o,e}function Gh(e,r){return e[0]=-r[0],e[1]=-r[1],e[2]=-r[2],e[3]=r[3],e}function Mi(e,r){var t=r[0]+r[4]+r[8],a;if(t>0)a=Math.sqrt(t+1),e[3]=.5*a,a=.5/a,e[0]=(r[5]-r[7])*a,e[1]=(r[6]-r[2])*a,e[2]=(r[1]-r[3])*a;else{var n=0;r[4]>r[0]&&(n=1),r[8]>r[n*3+n]&&(n=2);var i=(n+1)%3,s=(n+2)%3;a=Math.sqrt(r[n*3+n]-r[i*3+i]-r[s*3+s]+1),e[n]=.5*a,a=.5/a,e[3]=(r[i*3+s]-r[s*3+i])*a,e[i]=(r[i*3+n]+r[n*3+i])*a,e[s]=(r[s*3+n]+r[n*3+s])*a}return e}function Uh(e,r,t,a){var n=.5*Math.PI/180;r*=n,t*=n,a*=n;var i=Math.sin(r),s=Math.cos(r),o=Math.sin(t),c=Math.cos(t),u=Math.sin(a),l=Math.cos(a);return e[0]=i*c*l-s*o*u,e[1]=s*o*l+i*c*u,e[2]=s*c*u-i*o*l,e[3]=s*c*l+i*o*u,e}function Vh(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var jh=re.clone;x.clone=jh;var Zh=re.fromValues;x.fromValues=Zh;var Xh=re.copy;x.copy=Xh;var Qh=re.set;x.set=Qh;var $h=re.add;x.add=$h;var Jh=mi;x.mul=Jh;var xi=re.scale;x.scale=xi;var bi=re.dot;x.dot=bi;var Hh=re.lerp;x.lerp=Hh;var _i=re.length;x.length=_i;var Kh=_i;x.len=Kh;var Oi=re.squaredLength;x.squaredLength=Oi;var e0=Oi;x.sqrLen=e0;var hn=re.normalize;x.normalize=hn;var r0=re.exactEquals;x.exactEquals=r0;var t0=re.equals;x.equals=t0;var n0=function(){var e=Pe.create(),r=Pe.fromValues(1,0,0),t=Pe.fromValues(0,1,0);return function(a,n,i){var s=Pe.dot(n,i);return s<-.999999?(Pe.cross(e,r,n),Pe.len(e)<1e-6&&Pe.cross(e,t,n),Pe.normalize(e,e),vi(a,e,Math.PI),a):s>.999999?(a[0]=0,a[1]=0,a[2]=0,a[3]=1,a):(Pe.cross(e,n,i),a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=1+s,hn(a,a))}}();x.rotationTo=n0;var a0=function(){var e=fn(),r=fn();return function(t,a,n,i,s,o){return _t(e,a,s,o),_t(r,n,i,o),_t(t,e,r,2*o*(1-o)),t}}();x.sqlerp=a0;var i0=function(){var e=Eh.create();return function(r,t,a,n){return e[0]=a[0],e[3]=a[1],e[6]=a[2],e[1]=n[0],e[4]=n[1],e[7]=n[2],e[2]=-t[0],e[5]=-t[1],e[8]=-t[2],hn(r,Mi(r,e))}}();x.setAxes=i0});var dn=S(Ot=>{"use strict";var Ke=V(),s0=se();Object.defineProperty(Ot,"__esModule",{value:!0});Ot.default=void 0;var o0=Ke($()),c0=Ke(J()),u0=Ke(oe()),l0=Ke(ce()),ki=Ke(ue()),f0=Ke(qr()),Lr=me(),h0=Ke(Ht()),G=Ai(Ti()),d0=Ai(vt());function Ri(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(Ri=function(n){return n?t:r})(e)}function Ai(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||s0(e)!=="object"&&typeof e!="function")return{default:e};var t=Ri(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function p0(e){var r=v0();return function(){var a=(0,ki.default)(e),n;if(r){var i=(0,ki.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,l0.default)(this,n)}}function v0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var m0=[0,0,0,1],g0=function(e){(0,u0.default)(t,e);var r=p0(t);function t(){var a,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;return(0,o0.default)(this,t),a=r.call(this,-0,-0,-0,-0),Array.isArray(n)&&arguments.length===1?a.copy(n):a.set(n,i,s,o),a}return(0,c0.default)(t,[{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this[3]=n[3],this.check()}},{key:"set",value:function(n,i,s,o){return this[0]=n,this[1]=i,this[2]=s,this[3]=o,this.check()}},{key:"fromObject",value:function(n){return this[0]=n.x,this[1]=n.y,this[2]=n.z,this[3]=n.w,this.check()}},{key:"fromMatrix3",value:function(n){return G.fromMat3(this,n),this.check()}},{key:"fromAxisRotation",value:function(n,i){return G.setAxisAngle(this,n,i),this.check()}},{key:"identity",value:function(){return G.identity(this),this.check()}},{key:"setAxisAngle",value:function(n,i){return this.fromAxisRotation(n,i)}},{key:"ELEMENTS",get:function(){return 4}},{key:"x",get:function(){return this[0]},set:function(n){this[0]=(0,Lr.checkNumber)(n)}},{key:"y",get:function(){return this[1]},set:function(n){this[1]=(0,Lr.checkNumber)(n)}},{key:"z",get:function(){return this[2]},set:function(n){this[2]=(0,Lr.checkNumber)(n)}},{key:"w",get:function(){return this[3]},set:function(n){this[3]=(0,Lr.checkNumber)(n)}},{key:"len",value:function(){return G.length(this)}},{key:"lengthSquared",value:function(){return G.squaredLength(this)}},{key:"dot",value:function(n){return G.dot(this,n)}},{key:"rotationTo",value:function(n,i){return G.rotationTo(this,n,i),this.check()}},{key:"add",value:function(n){return G.add(this,this,n),this.check()}},{key:"calculateW",value:function(){return G.calculateW(this,this),this.check()}},{key:"conjugate",value:function(){return G.conjugate(this,this),this.check()}},{key:"invert",value:function(){return G.invert(this,this),this.check()}},{key:"lerp",value:function(n,i,s){return s===void 0?this.lerp(this,n,i):(G.lerp(this,n,i,s),this.check())}},{key:"multiplyRight",value:function(n){return G.multiply(this,this,n),this.check()}},{key:"multiplyLeft",value:function(n){return G.multiply(this,n,this),this.check()}},{key:"normalize",value:function(){var n=this.len(),i=n>0?1/n:0;return this[0]=this[0]*i,this[1]=this[1]*i,this[2]=this[2]*i,this[3]=this[3]*i,n===0&&(this[3]=1),this.check()}},{key:"rotateX",value:function(n){return G.rotateX(this,this,n),this.check()}},{key:"rotateY",value:function(n){return G.rotateY(this,this,n),this.check()}},{key:"rotateZ",value:function(n){return G.rotateZ(this,this,n),this.check()}},{key:"scale",value:function(n){return G.scale(this,this,n),this.check()}},{key:"slerp",value:function(n,i,s){var o,c,u;switch(arguments.length){case 1:var l=n,f=l.start;o=f===void 0?m0:f,c=l.target,u=l.ratio;break;case 2:o=this,c=n,u=i;break;default:o=n,c=i,u=s}return G.slerp(this,o,c,u),this.check()}},{key:"transformVector4",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new h0.default;return d0.transformQuat(i,n,this),(0,Lr.checkVector)(i,4)}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"setFromAxisAngle",value:function(n,i){return this.setAxisAngle(n,i)}},{key:"premultiply",value:function(n){return this.multiplyLeft(n)}},{key:"multiply",value:function(n){return this.multiplyRight(n)}}]),t}(f0.default);Ot.default=g0});var Pi=S((sp,Nr)=>{function y0(e){if(Array.isArray(e))return e}Nr.exports=y0,Nr.exports.__esModule=!0,Nr.exports.default=Nr.exports});var Si=S((op,Cr)=>{function M0(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var a=[],n=!0,i=!1,s,o;try{for(t=t.call(e);!(n=(s=t.next()).done)&&(a.push(s.value),!(r&&a.length===r));n=!0);}catch(c){i=!0,o=c}finally{try{!n&&t.return!=null&&t.return()}finally{if(i)throw o}}return a}}Cr.exports=M0,Cr.exports.__esModule=!0,Cr.exports.default=Cr.exports});var wi=S((cp,Ir)=>{function x0(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}Ir.exports=x0,Ir.exports.__esModule=!0,Ir.exports.default=Ir.exports});var Ei=S((up,Wr)=>{var qi=wi();function b0(e,r){if(!!e){if(typeof e=="string")return qi(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return qi(e,r)}}Wr.exports=b0,Wr.exports.__esModule=!0,Wr.exports.default=Wr.exports});var Li=S((lp,Br)=>{function _0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}Br.exports=_0,Br.exports.__esModule=!0,Br.exports.default=Br.exports});var Tt=S((fp,Fr)=>{var O0=Pi(),T0=Si(),k0=Ei(),R0=Li();function A0(e,r){return O0(e)||T0(e,r)||k0(e,r)||R0()}Fr.exports=A0,Fr.exports.__esModule=!0,Fr.exports.default=Fr.exports});var kt=S((hp,Dr)=>{function P0(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}Dr.exports=P0,Dr.exports.__esModule=!0,Dr.exports.default=Dr.exports});var Ii=S(At=>{"use strict";var zr=V(),S0=se();Object.defineProperty(At,"__esModule",{value:!0});At.default=void 0;var w0=zr(Tt()),q0=zr($()),E0=zr(J()),Rt=zr(kt()),L0=zr(it()),X=ve(),N0=C0(Le());function Ni(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(Ni=function(n){return n?t:r})(e)}function C0(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||S0(e)!=="object"&&typeof e!="function")return{default:e};var t=Ni(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}var Ci=1e-6,I0=6371e3,W0=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=r.phi,a=t===void 0?0:t,n=r.theta,i=n===void 0?0:n,s=r.radius,o=s===void 0?1:s,c=r.bearing,u=r.pitch,l=r.altitude,f=r.radiusScale,h=f===void 0?I0:f;(0,q0.default)(this,e),(0,Rt.default)(this,"phi",void 0),(0,Rt.default)(this,"theta",void 0),(0,Rt.default)(this,"radius",void 0),(0,Rt.default)(this,"radiusScale",void 0),this.phi=a,this.theta=i,this.radius=o||l||1,this.radiusScale=h||1,c!==void 0&&(this.bearing=c),u!==void 0&&(this.pitch=u),this.check()}return(0,E0.default)(e,[{key:"toString",value:function(){return this.formatString(X.config)}},{key:"formatString",value:function(t){var a=t.printTypes,n=a===void 0?!1:a,i=X.formatValue;return"".concat(n?"Spherical":"","[rho:").concat(i(this.radius),",theta:").concat(i(this.theta),",phi:").concat(i(this.phi),"]")}},{key:"equals",value:function(t){return(0,X.equals)(this.radius,t.radius)&&(0,X.equals)(this.theta,t.theta)&&(0,X.equals)(this.phi,t.phi)}},{key:"exactEquals",value:function(t){return this.radius===t.radius&&this.theta===t.theta&&this.phi===t.phi}},{key:"bearing",get:function(){return 180-(0,X.degrees)(this.phi)},set:function(t){this.phi=Math.PI-(0,X.radians)(t)}},{key:"pitch",get:function(){return(0,X.degrees)(this.theta)},set:function(t){this.theta=(0,X.radians)(t)}},{key:"longitude",get:function(){return(0,X.degrees)(this.phi)}},{key:"latitude",get:function(){return(0,X.degrees)(this.theta)}},{key:"lng",get:function(){return(0,X.degrees)(this.phi)}},{key:"lat",get:function(){return(0,X.degrees)(this.theta)}},{key:"z",get:function(){return(this.radius-1)*this.radiusScale}},{key:"set",value:function(t,a,n){return this.radius=t,this.phi=a,this.theta=n,this.check()}},{key:"clone",value:function(){return new e().copy(this)}},{key:"copy",value:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this.check()}},{key:"fromLngLatZ",value:function(t){var a=(0,w0.default)(t,3),n=a[0],i=a[1],s=a[2];return this.radius=1+s/this.radiusScale,this.phi=(0,X.radians)(i),this.theta=(0,X.radians)(n),this.check()}},{key:"fromVector3",value:function(t){return this.radius=N0.length(t),this.radius>0&&(this.theta=Math.atan2(t[0],t[1]),this.phi=Math.acos((0,X.clamp)(t[2]/this.radius,-1,1))),this.check()}},{key:"toVector3",value:function(){return new L0.default(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}},{key:"makeSafe",value:function(){return this.phi=Math.max(Ci,Math.min(Math.PI-Ci,this.phi)),this}},{key:"check",value:function(){if(!Number.isFinite(this.phi)||!Number.isFinite(this.theta)||!(this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}}]),e}();At.default=W0});var pn=S(St=>{"use strict";var Ce=V();Object.defineProperty(St,"__esModule",{value:!0});St.default=void 0;var B0=Ce(Tt()),F0=Ce($()),D0=Ce(J()),z0=Ce(oe()),Y0=Ce(ce()),Wi=Ce(ue()),G0=Ce(qr()),Bi=Ce(dn()),fr=ve(),ie=me();function U0(e){var r=V0();return function(){var a=(0,Wi.default)(e),n;if(r){var i=(0,Wi.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,Y0.default)(this,n)}}function V0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Pt="Unknown Euler angle order",hr=.99999,U;(function(e){e[e.ZYX=0]="ZYX",e[e.YXZ=1]="YXZ",e[e.XZY=2]="XZY",e[e.ZXY=3]="ZXY",e[e.YZX=4]="YZX",e[e.XYZ=5]="XYZ"})(U||(U={}));var j0=function(e){(0,z0.default)(t,e);var r=U0(t);function t(){var a,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t.DefaultOrder;if((0,F0.default)(this,t),a=r.call(this,-0,-0,-0,-0),arguments.length>0&&Array.isArray(arguments[0])){var c;(c=a).fromVector3.apply(c,arguments)}else a.set(n,i,s,o);return a}return(0,D0.default)(t,[{key:"ELEMENTS",get:function(){return 4}},{key:"fromQuaternion",value:function(n){var i=(0,B0.default)(n,4),s=i[0],o=i[1],c=i[2],u=i[3],l=o*o,f=-2*(l+c*c)+1,h=2*(s*o+u*c),d=-2*(s*c-u*o),p=2*(o*c+u*s),m=-2*(s*s+l)+1;d=d>1?1:d,d=d<-1?-1:d;var v=Math.atan2(p,m),g=Math.asin(d),b=Math.atan2(h,f);return this.set(v,g,b,t.RollPitchYaw)}},{key:"fromObject",value:function(n){throw new Error("not implemented")}},{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this[3]=Number.isFinite(n[3])||this.order,this.check()}},{key:"set",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3?arguments[3]:void 0;return this[0]=n,this[1]=i,this[2]=s,this[3]=Number.isFinite(o)?o:this[3],this.check()}},{key:"validate",value:function(){return Z0(this[3])&&Number.isFinite(this[0])&&Number.isFinite(this[1])&&Number.isFinite(this[2])}},{key:"toArray",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return n[i]=this[0],n[i+1]=this[1],n[i+2]=this[2],n}},{key:"toArray4",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return n[i]=this[0],n[i+1]=this[1],n[i+2]=this[2],n[i+3]=this[3],n}},{key:"toVector3",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[-0,-0,-0];return n[0]=this[0],n[1]=this[1],n[2]=this[2],n}},{key:"x",get:function(){return this[0]},set:function(n){this[0]=(0,ie.checkNumber)(n)}},{key:"y",get:function(){return this[1]},set:function(n){this[1]=(0,ie.checkNumber)(n)}},{key:"z",get:function(){return this[2]},set:function(n){this[2]=(0,ie.checkNumber)(n)}},{key:"alpha",get:function(){return this[0]},set:function(n){this[0]=(0,ie.checkNumber)(n)}},{key:"beta",get:function(){return this[1]},set:function(n){this[1]=(0,ie.checkNumber)(n)}},{key:"gamma",get:function(){return this[2]},set:function(n){this[2]=(0,ie.checkNumber)(n)}},{key:"phi",get:function(){return this[0]},set:function(n){this[0]=(0,ie.checkNumber)(n)}},{key:"theta",get:function(){return this[1]},set:function(n){this[1]=(0,ie.checkNumber)(n)}},{key:"psi",get:function(){return this[2]},set:function(n){this[2]=(0,ie.checkNumber)(n)}},{key:"roll",get:function(){return this[0]},set:function(n){this[0]=(0,ie.checkNumber)(n)}},{key:"pitch",get:function(){return this[1]},set:function(n){this[1]=(0,ie.checkNumber)(n)}},{key:"yaw",get:function(){return this[2]},set:function(n){this[2]=(0,ie.checkNumber)(n)}},{key:"order",get:function(){return this[3]},set:function(n){this[3]=X0(n)}},{key:"fromVector3",value:function(n,i){return this.set(n[0],n[1],n[2],Number.isFinite(i)?i:this[3])}},{key:"fromArray",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this[0]=n[0+i],this[1]=n[1+i],this[2]=n[2+i],n[3]!==void 0&&(this[3]=n[3]),this.check()}},{key:"fromRollPitchYaw",value:function(n,i,s){return this.set(n,i,s,U.ZYX)}},{key:"fromRotationMatrix",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.DefaultOrder;return this._fromRotationMatrix(n,i),this.check()}},{key:"getRotationMatrix",value:function(n){return this._getRotationMatrix(n)}},{key:"getQuaternion",value:function(){var n=new Bi.default;switch(this[4]){case U.XYZ:return n.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);case U.YXZ:return n.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);case U.ZXY:return n.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);case U.ZYX:return n.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);case U.YZX:return n.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);case U.XZY:return n.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);default:throw new Error(Pt)}}},{key:"_fromRotationMatrix",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.DefaultOrder,s=n[0],o=n[4],c=n[8],u=n[1],l=n[5],f=n[9],h=n[2],d=n[6],p=n[10];switch(i=i||this[3],i){case t.XYZ:this[1]=Math.asin((0,fr.clamp)(c,-1,1)),Math.abs(c)<hr?(this[0]=Math.atan2(-f,p),this[2]=Math.atan2(-o,s)):(this[0]=Math.atan2(d,l),this[2]=0);break;case t.YXZ:this[0]=Math.asin(-(0,fr.clamp)(f,-1,1)),Math.abs(f)<hr?(this[1]=Math.atan2(c,p),this[2]=Math.atan2(u,l)):(this[1]=Math.atan2(-h,s),this[2]=0);break;case t.ZXY:this[0]=Math.asin((0,fr.clamp)(d,-1,1)),Math.abs(d)<hr?(this[1]=Math.atan2(-h,p),this[2]=Math.atan2(-o,l)):(this[1]=0,this[2]=Math.atan2(u,s));break;case t.ZYX:this[1]=Math.asin(-(0,fr.clamp)(h,-1,1)),Math.abs(h)<hr?(this[0]=Math.atan2(d,p),this[2]=Math.atan2(u,s)):(this[0]=0,this[2]=Math.atan2(-o,l));break;case t.YZX:this[2]=Math.asin((0,fr.clamp)(u,-1,1)),Math.abs(u)<hr?(this[0]=Math.atan2(-f,l),this[1]=Math.atan2(-h,s)):(this[0]=0,this[1]=Math.atan2(c,p));break;case t.XZY:this[2]=Math.asin(-(0,fr.clamp)(o,-1,1)),Math.abs(o)<hr?(this[0]=Math.atan2(d,l),this[1]=Math.atan2(c,s)):(this[0]=Math.atan2(-f,p),this[1]=0);break;default:throw new Error(Pt)}return this[3]=i,this}},{key:"_getRotationMatrix",value:function(n){var i=n||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],s=this.x,o=this.y,c=this.z,u=Math.cos(s),l=Math.cos(o),f=Math.cos(c),h=Math.sin(s),d=Math.sin(o),p=Math.sin(c);switch(this[3]){case t.XYZ:{var m=u*f,v=u*p,g=h*f,b=h*p;i[0]=l*f,i[4]=-l*p,i[8]=d,i[1]=v+g*d,i[5]=m-b*d,i[9]=-h*l,i[2]=b-m*d,i[6]=g+v*d,i[10]=u*l;break}case t.YXZ:{var y=l*f,M=l*p,T=d*f,_=d*p;i[0]=y+_*h,i[4]=T*h-M,i[8]=u*d,i[1]=u*p,i[5]=u*f,i[9]=-h,i[2]=M*h-T,i[6]=_+y*h,i[10]=u*l;break}case t.ZXY:{var I=l*f,L=l*p,N=d*f,w=d*p;i[0]=I-w*h,i[4]=-u*p,i[8]=N+L*h,i[1]=L+N*h,i[5]=u*f,i[9]=w-I*h,i[2]=-u*d,i[6]=h,i[10]=u*l;break}case t.ZYX:{var W=u*f,C=u*p,B=h*f,P=h*p;i[0]=l*f,i[4]=B*d-C,i[8]=W*d+P,i[1]=l*p,i[5]=P*d+W,i[9]=C*d-B,i[2]=-d,i[6]=h*l,i[10]=u*l;break}case t.YZX:{var j=u*l,he=u*d,de=h*l,Ye=h*d;i[0]=l*f,i[4]=Ye-j*p,i[8]=de*p+he,i[1]=p,i[5]=u*f,i[9]=-h*f,i[2]=-d*f,i[6]=he*p+de,i[10]=j-Ye*p;break}case t.XZY:{var Ge=u*l,En=u*d,Ln=h*l,Nn=h*d;i[0]=l*f,i[4]=-p,i[8]=d*f,i[1]=Ge*p+Nn,i[5]=u*f,i[9]=En*p-Ln,i[2]=Ln*p-En,i[6]=h*f,i[10]=Nn*p+Ge;break}default:throw new Error(Pt)}return i[3]=0,i[7]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i}},{key:"toQuaternion",value:function(){var n=Math.cos(this.yaw*.5),i=Math.sin(this.yaw*.5),s=Math.cos(this.roll*.5),o=Math.sin(this.roll*.5),c=Math.cos(this.pitch*.5),u=Math.sin(this.pitch*.5),l=n*s*c+i*o*u,f=n*o*c-i*s*u,h=n*s*u+i*o*c,d=i*s*c-n*o*u;return new Bi.default(f,h,d,l)}}],[{key:"ZYX",get:function(){return U.ZYX}},{key:"YXZ",get:function(){return U.YXZ}},{key:"XZY",get:function(){return U.XZY}},{key:"ZXY",get:function(){return U.ZXY}},{key:"YZX",get:function(){return U.YZX}},{key:"XYZ",get:function(){return U.XYZ}},{key:"RollPitchYaw",get:function(){return U.ZYX}},{key:"DefaultOrder",get:function(){return U.ZYX}},{key:"RotationOrders",get:function(){return U}},{key:"rotationOrder",value:function(n){return U[n]}}]),t}(G0.default);St.default=j0;function Z0(e){return e>=0&&e<6}function X0(e){if(e<0&&e>=6)throw new Error(Pt);return e}});var zi=S(wt=>{"use strict";var dr=V();Object.defineProperty(wt,"__esModule",{value:!0});wt.default=void 0;var Q0=dr($()),$0=dr(J()),Fi=dr(kt()),vn=dr(ln()),Di=dr(it()),mn=dr(pn()),J0=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=r.x,a=t===void 0?0:t,n=r.y,i=n===void 0?0:n,s=r.z,o=s===void 0?0:s,c=r.roll,u=c===void 0?0:c,l=r.pitch,f=l===void 0?0:l,h=r.yaw,d=h===void 0?0:h,p=r.position,m=r.orientation;(0,Q0.default)(this,e),(0,Fi.default)(this,"position",void 0),(0,Fi.default)(this,"orientation",void 0),Array.isArray(p)&&p.length===3?this.position=new Di.default(p):this.position=new Di.default(a,i,o),Array.isArray(m)&&m.length===4?this.orientation=new mn.default(m,m[3]):this.orientation=new mn.default(u,f,d,mn.default.RollPitchYaw)}return(0,$0.default)(e,[{key:"x",get:function(){return this.position.x},set:function(t){this.position.x=t}},{key:"y",get:function(){return this.position.y},set:function(t){this.position.y=t}},{key:"z",get:function(){return this.position.z},set:function(t){this.position.z=t}},{key:"roll",get:function(){return this.orientation.roll},set:function(t){this.orientation.roll=t}},{key:"pitch",get:function(){return this.orientation.pitch},set:function(t){this.orientation.pitch=t}},{key:"yaw",get:function(){return this.orientation.yaw},set:function(t){this.orientation.yaw=t}},{key:"getPosition",value:function(){return this.position}},{key:"getOrientation",value:function(){return this.orientation}},{key:"equals",value:function(t){return t?this.position.equals(t.position)&&this.orientation.equals(t.orientation):!1}},{key:"exactEquals",value:function(t){return t?this.position.exactEquals(t.position)&&this.orientation.exactEquals(t.orientation):!1}},{key:"getTransformationMatrix",value:function(){var t=Math.sin(this.roll),a=Math.sin(this.pitch),n=Math.sin(this.yaw),i=Math.cos(this.roll),s=Math.cos(this.pitch),o=Math.cos(this.yaw);return new vn.default().setRowMajor(o*s,-n*i+o*a*t,n*t+o*a*i,this.x,n*s,o*i+n*a*t,-o*t+n*a*i,this.y,-a,s*t,s*i,this.z,0,0,0,1)}},{key:"getTransformationMatrixFromPose",value:function(t){return new vn.default().multiplyRight(this.getTransformationMatrix()).multiplyRight(t.getTransformationMatrix().invert())}},{key:"getTransformationMatrixToPose",value:function(t){return new vn.default().multiplyRight(t.getTransformationMatrix()).multiplyRight(this.getTransformationMatrix().invert())}}]),e}();wt.default=J0});var Yi=S(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.default=void 0;var H0={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,PI_OVER_TWO:Math.PI/2,PI_OVER_FOUR:Math.PI/4,PI_OVER_SIX:Math.PI/6,TWO_PI:Math.PI*2};qt.default=H0});var pr=S(E=>{"use strict";var le=V();Object.defineProperty(E,"__esModule",{value:!0});Object.defineProperty(E,"Vector2",{enumerable:!0,get:function(){return K0.default}});Object.defineProperty(E,"Vector3",{enumerable:!0,get:function(){return e1.default}});Object.defineProperty(E,"Vector4",{enumerable:!0,get:function(){return r1.default}});Object.defineProperty(E,"Matrix3",{enumerable:!0,get:function(){return t1.default}});Object.defineProperty(E,"Matrix4",{enumerable:!0,get:function(){return n1.default}});Object.defineProperty(E,"Quaternion",{enumerable:!0,get:function(){return a1.default}});Object.defineProperty(E,"SphericalCoordinates",{enumerable:!0,get:function(){return Gi.default}});Object.defineProperty(E,"_SphericalCoordinates",{enumerable:!0,get:function(){return Gi.default}});Object.defineProperty(E,"Pose",{enumerable:!0,get:function(){return Ui.default}});Object.defineProperty(E,"_Pose",{enumerable:!0,get:function(){return Ui.default}});Object.defineProperty(E,"Euler",{enumerable:!0,get:function(){return Vi.default}});Object.defineProperty(E,"_Euler",{enumerable:!0,get:function(){return Vi.default}});Object.defineProperty(E,"_MathUtils",{enumerable:!0,get:function(){return i1.default}});Object.defineProperty(E,"assert",{enumerable:!0,get:function(){return s1.default}});Object.defineProperty(E,"config",{enumerable:!0,get:function(){return Y.config}});Object.defineProperty(E,"configure",{enumerable:!0,get:function(){return Y.configure}});Object.defineProperty(E,"formatValue",{enumerable:!0,get:function(){return Y.formatValue}});Object.defineProperty(E,"isArray",{enumerable:!0,get:function(){return Y.isArray}});Object.defineProperty(E,"clone",{enumerable:!0,get:function(){return Y.clone}});Object.defineProperty(E,"equals",{enumerable:!0,get:function(){return Y.equals}});Object.defineProperty(E,"exactEquals",{enumerable:!0,get:function(){return Y.exactEquals}});Object.defineProperty(E,"toRadians",{enumerable:!0,get:function(){return Y.toRadians}});Object.defineProperty(E,"toDegrees",{enumerable:!0,get:function(){return Y.toDegrees}});Object.defineProperty(E,"radians",{enumerable:!0,get:function(){return Y.radians}});Object.defineProperty(E,"degrees",{enumerable:!0,get:function(){return Y.degrees}});Object.defineProperty(E,"sin",{enumerable:!0,get:function(){return Y.sin}});Object.defineProperty(E,"cos",{enumerable:!0,get:function(){return Y.cos}});Object.defineProperty(E,"tan",{enumerable:!0,get:function(){return Y.tan}});Object.defineProperty(E,"asin",{enumerable:!0,get:function(){return Y.asin}});Object.defineProperty(E,"acos",{enumerable:!0,get:function(){return Y.acos}});Object.defineProperty(E,"atan",{enumerable:!0,get:function(){return Y.atan}});Object.defineProperty(E,"clamp",{enumerable:!0,get:function(){return Y.clamp}});Object.defineProperty(E,"lerp",{enumerable:!0,get:function(){return Y.lerp}});Object.defineProperty(E,"withEpsilon",{enumerable:!0,get:function(){return Y.withEpsilon}});var K0=le(ba()),e1=le(it()),r1=le(Ht()),t1=le(Va()),n1=le(ln()),a1=le(dn()),Gi=le(Ii()),Ui=le(zi()),Vi=le(pn()),i1=le(Yi()),s1=le(Zr()),Y=ve()});var xn=S(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.WGS84_CONSTANTS=xe.WGS84_RADIUS_Z=xe.WGS84_RADIUS_Y=xe.WGS84_RADIUS_X=void 0;var Ie=6378137;xe.WGS84_RADIUS_X=Ie;var We=6378137;xe.WGS84_RADIUS_Y=We;var Be=6356752314245179e-9;xe.WGS84_RADIUS_Z=Be;var h1={radii:[Ie,We,Be],radiiSquared:[Ie*Ie,We*We,Be*Be],oneOverRadii:[1/Ie,1/We,1/Be],oneOverRadiiSquared:[1/(Ie*Ie),1/(We*We),1/(Be*Be)],maximumRadius:Math.max(Ie,We,Be),centerToleranceSquared:.1};xe.WGS84_CONSTANTS=h1});var On=S(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.fromCartographic=bn;we.fromCartographicToRadians=p1;we.fromCartographicToDegrees=v1;we.toCartographic=_n;we.toCartographicFromRadians=m1;we.toCartographicFromDegrees=g1;we.isWGS84=y1;var Se=pr(),ji=xn();function vr(e){return e}var d1=new Se.Vector3;function bn(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vr;return"longitude"in e?(r[0]=t(e.longitude),r[1]=t(e.latitude),r[2]=e.height):"x"in e?(r[0]=t(e.x),r[1]=t(e.y),r[2]=e.z):(r[0]=t(e[0]),r[1]=t(e[1]),r[2]=e[2]),r}function p1(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return bn(e,r,Se.config._cartographicRadians?vr:Se.toRadians)}function v1(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return bn(e,r,Se.config._cartographicRadians?Se.toDegrees:vr)}function _n(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vr;return"longitude"in r?(r.longitude=t(e[0]),r.latitude=t(e[1]),r.height=e[2]):"x"in r?(r.x=t(e[0]),r.y=t(e[1]),r.z=e[2]):(r[0]=t(e[0]),r[1]=t(e[1]),r[2]=e[2]),r}function m1(e,r){return _n(e,r,Se.config._cartographicRadians?vr:Se.toDegrees)}function g1(e,r){return _n(e,r,Se.config._cartographicRadians?Se.toRadians:vr)}function y1(e){if(!e)return!1;d1.from(e);var r=ji.WGS84_CONSTANTS.oneOverRadiiSquared,t=ji.WGS84_CONSTANTS.centerToleranceSquared,a=e[0]*e[0]*r[0],n=e[1]*e[1]*r[1],i=e[2]*e[2]*r[2];return Math.abs(a+n+i-1)<t}});var Zi=S(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.default=b1;var Et=pr(),mr=new Et.Vector3,M1=new Et.Vector3,x1=new Et.Vector3;function b1(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],a=r.oneOverRadii,n=r.oneOverRadiiSquared,i=r.centerToleranceSquared;mr.from(e);var s=mr.x,o=mr.y,c=mr.z,u=a.x,l=a.y,f=a.z,h=s*s*u*u,d=o*o*l*l,p=c*c*f*f,m=h+d+p,v=Math.sqrt(1/m);if(!!Number.isFinite(v)){var g=M1;if(g.copy(e).scale(v),m<i)return g.to(t);var b=n.x,y=n.y,M=n.z,T=x1;T.set(g.x*b*2,g.y*y*2,g.z*M*2);var _=(1-v)*mr.len()/(.5*T.len()),I=0,L,N,w,W;do{_-=I,L=1/(1+_*b),N=1/(1+_*y),w=1/(1+_*M);var C=L*L,B=N*N,P=w*w,j=C*L,he=B*N,de=P*w;W=h*C+d*B+p*P-1;var Ye=h*j*b+d*he*y+p*de*M,Ge=-2*Ye;I=W/Ge}while(Math.abs(W)>Et._MathUtils.EPSILON12);return mr.scale([L,N,w]).to(t)}}});var $i=S(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.default=R1;var te=pr(),Xi=1e-14,_1=new te.Vector3,Qi={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},kn={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},qe={east:new te.Vector3,north:new te.Vector3,up:new te.Vector3,west:new te.Vector3,south:new te.Vector3,down:new te.Vector3},O1=new te.Vector3,T1=new te.Vector3,k1=new te.Vector3;function R1(e,r,t,a,n,i){var s=Qi[r]&&Qi[r][t];(0,te.assert)(s&&(!a||a===s));var o,c,u,l=_1.copy(n),f=(0,te.equals)(l.x,0,Xi)&&(0,te.equals)(l.y,0,Xi);if(f){var h=Math.sign(l.z);o=O1.fromArray(kn[r]),r!=="east"&&r!=="west"&&o.scale(h),c=T1.fromArray(kn[t]),t!=="east"&&t!=="west"&&c.scale(h),u=k1.fromArray(kn[a]),a!=="east"&&a!=="west"&&u.scale(h)}else{var d=qe.up,p=qe.east,m=qe.north;p.set(-l.y,l.x,0).normalize(),e.geodeticSurfaceNormal(l,d),m.copy(d).cross(p);var v=qe.down,g=qe.west,b=qe.south;v.copy(d).scale(-1),g.copy(p).scale(-1),b.copy(m).scale(-1),o=qe[r],c=qe[t],u=qe[a]}return i[0]=o.x,i[1]=o.y,i[2]=o.z,i[3]=0,i[4]=c.x,i[5]=c.y,i[6]=c.z,i[7]=0,i[8]=u.x,i[9]=u.y,i[10]=u.z,i[11]=0,i[12]=l.x,i[13]=l.y,i[14]=l.z,i[15]=1,i}});var ts=S(Ct=>{"use strict";var gr=V(),A1=se();Object.defineProperty(Ct,"__esModule",{value:!0});Ct.default=void 0;var P1=gr(Tt()),S1=gr($()),w1=gr(J()),be=gr(kt()),z=pr(),Ji=E1(Le()),An=xn(),Hi=On(),q1=gr(Zi()),Ki=gr($i());function es(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(es=function(n){return n?t:r})(e)}function E1(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||A1(e)!=="object"&&typeof e!="function")return{default:e};var t=es(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}var Lt=new z.Vector3,rs=new z.Vector3,L1=new z.Vector3,fe=new z.Vector3,N1=new z.Vector3,Nt=new z.Vector3,Pn=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;(0,S1.default)(this,e),(0,be.default)(this,"radii",void 0),(0,be.default)(this,"radiiSquared",void 0),(0,be.default)(this,"radiiToTheFourth",void 0),(0,be.default)(this,"oneOverRadii",void 0),(0,be.default)(this,"oneOverRadiiSquared",void 0),(0,be.default)(this,"minimumRadius",void 0),(0,be.default)(this,"maximumRadius",void 0),(0,be.default)(this,"centerToleranceSquared",z._MathUtils.EPSILON1),(0,be.default)(this,"squaredXOverSquaredZ",void 0),(0,z.assert)(r>=0),(0,z.assert)(t>=0),(0,z.assert)(a>=0),this.radii=new z.Vector3(r,t,a),this.radiiSquared=new z.Vector3(r*r,t*t,a*a),this.radiiToTheFourth=new z.Vector3(r*r*r*r,t*t*t*t,a*a*a*a),this.oneOverRadii=new z.Vector3(r===0?0:1/r,t===0?0:1/t,a===0?0:1/a),this.oneOverRadiiSquared=new z.Vector3(r===0?0:1/(r*r),t===0?0:1/(t*t),a===0?0:1/(a*a)),this.minimumRadius=Math.min(r,t,a),this.maximumRadius=Math.max(r,t,a),this.radiiSquared.z!==0&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}return(0,w1.default)(e,[{key:"equals",value:function(t){return this===t||Boolean(t&&this.radii.equals(t.radii))}},{key:"toString",value:function(){return this.radii.toString()}},{key:"cartographicToCartesian",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0],n=rs,i=L1,s=(0,P1.default)(t,3),o=s[2];this.geodeticSurfaceNormalCartographic(t,n),i.copy(this.radiiSquared).scale(n);var c=Math.sqrt(n.dot(i));return i.scale(1/c),n.scale(o),i.add(n),i.to(a)}},{key:"cartesianToCartographic",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];Nt.from(t);var n=this.scaleToGeodeticSurface(Nt,fe);if(!!n){var i=this.geodeticSurfaceNormal(n,rs),s=N1;s.copy(Nt).subtract(n);var o=Math.atan2(i.y,i.x),c=Math.asin(i.z),u=Math.sign(Ji.dot(s,Nt))*Ji.length(s);return(0,Hi.toCartographicFromRadians)([o,c,u],a)}}},{key:"eastNorthUpToFixedFrame",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new z.Matrix4;return(0,Ki.default)(this,"east","north","up",t,a)}},{key:"localFrameToFixedFrame",value:function(t,a,n,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new z.Matrix4;return(0,Ki.default)(this,t,a,n,i,s)}},{key:"geocentricSurfaceNormal",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return Lt.from(t).normalize().to(a)}},{key:"geodeticSurfaceNormalCartographic",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0],n=(0,Hi.fromCartographicToRadians)(t),i=n[0],s=n[1],o=Math.cos(s);return Lt.set(o*Math.cos(i),o*Math.sin(i),Math.sin(s)).normalize(),Lt.to(a)}},{key:"geodeticSurfaceNormal",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return Lt.from(t).scale(this.oneOverRadiiSquared).normalize().to(a)}},{key:"scaleToGeodeticSurface",value:function(t,a){return(0,q1.default)(t,this,a)}},{key:"scaleToGeocentricSurface",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];fe.from(t);var n=fe.x,i=fe.y,s=fe.z,o=this.oneOverRadiiSquared,c=1/Math.sqrt(n*n*o.x+i*i*o.y+s*s*o.z);return fe.multiplyScalar(c).to(a)}},{key:"transformPositionToScaledSpace",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return fe.from(t).scale(this.oneOverRadii).to(a)}},{key:"transformPositionFromScaledSpace",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return fe.from(t).scale(this.radii).to(a)}},{key:"getSurfaceNormalIntersectionWithZAxis",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,0];(0,z.assert)((0,z.equals)(this.radii.x,this.radii.y,z._MathUtils.EPSILON15)),(0,z.assert)(this.radii.z>0),fe.from(t);var i=fe.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(i)>=this.radii.z-a))return fe.set(0,0,i).to(n)}}]),e}();Ct.default=Pn;(0,be.default)(Pn,"WGS84",new Pn(An.WGS84_RADIUS_X,An.WGS84_RADIUS_Y,An.WGS84_RADIUS_Z))});var ns=S(It=>{"use strict";var C1=V();Object.defineProperty(It,"__esModule",{value:!0});Object.defineProperty(It,"Ellipsoid",{enumerable:!0,get:function(){return I1.default}});Object.defineProperty(It,"isWGS84",{enumerable:!0,get:function(){return W1.isWGS84}});var I1=C1(ts()),W1=On()});function Bt(e,r=!0,t){let a=t||new Set;if(e){if(Dn(e))a.add(e);else if(Dn(e.buffer))a.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let n in e)Bt(e[n],r,a)}}return t===void 0?Array.from(a):[]}function Dn(e){return e?e instanceof ArrayBuffer||typeof MessagePort!="undefined"&&e instanceof MessagePort||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas:!1}function Ue(){let parentPort;try{eval("globalThis.parentPort = require('worker_threads').parentPort"),parentPort=globalThis.parentPort}catch{}return parentPort}var Ft=new Map,K=class{static inWorkerThread(){return typeof self!="undefined"||Boolean(Ue())}static set onmessage(r){function t(n){let i=Ue(),{type:s,payload:o}=i?n:n.data;r(s,o)}let a=Ue();a?(a.on("message",t),a.on("exit",()=>console.debug("Node worker closing"))):globalThis.onmessage=t}static addEventListener(r){let t=Ft.get(r);t||(t=n=>{if(!bs(n))return;let i=Ue(),{type:s,payload:o}=i?n:n.data;r(s,o)}),Ue()?console.error("not implemented"):globalThis.addEventListener("message",t)}static removeEventListener(r){let t=Ft.get(r);Ft.delete(r),Ue()?console.error("not implemented"):globalThis.removeEventListener("message",t)}static postMessage(r,t){let a={source:"loaders.gl",type:r,payload:t},n=Bt(t),i=Ue();i?i.postMessage(a,n):globalThis.postMessage(a,n)}};function bs(e){let{type:r,data:t}=e;return r==="message"&&t&&typeof t.source=="string"&&t.source.startsWith("loaders.gl")}var Gr=class{constructor(){this._values=[],this._settlers=[],this._closed=!1}[Symbol.asyncIterator](){return this}push(r){return this.enqueue(r)}enqueue(r){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");let t=this._settlers.shift();r instanceof Error?t.reject(r):t.resolve({value:r})}else this._values.push(r)}close(){for(;this._settlers.length>0;)this._settlers.shift().resolve({done:!0});this._closed=!0}next(){if(this._values.length>0){let r=this._values.shift();return r instanceof Error?Promise.reject(r):Promise.resolve({done:!1,value:r})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0,value:void 0})}return new Promise((r,t)=>{this._settlers.push({resolve:r,reject:t})})}};var _s=0,Ur,zn;function Dt(e,r){if(!K.inWorkerThread())return;let t={process:Os};K.onmessage=async(a,n)=>{try{switch(a){case"process":if(!e)throw new Error("Worker does not support atomic processing");let i=await e(n.input,n.options||{},t);K.postMessage("done",{result:i});break;case"process-in-batches":if(!r)throw new Error("Worker does not support batched processing");Ur=new Gr,zn=n.options||{};let s=r(Ur,zn,t);for await(let o of s)K.postMessage("output-batch",{result:o});K.postMessage("done",{});break;case"input-batch":Ur.push(n.input);break;case"input-done":Ur.close();break;default:}}catch(i){let s=i instanceof Error?i.message:"";K.postMessage("error",{error:s})}}}function Os(e,r={}){return new Promise((t,a)=>{let n=_s++,i=(o,c)=>{if(c.id===n)switch(o){case"done":K.removeEventListener(i),t(c.result);break;case"error":K.removeEventListener(i),a(c.error);break;default:}};K.addEventListener(i);let s={id:n,input:e,options:r};K.postMessage("process",s)})}function Ee(e,r){if(!e)throw new Error(r||"loader assertion failed.")}function _e(e,r){return Ee(e>=0),Ee(r>0),e+(r-1)&~(r-1)}function zt(e,r,t){let a;if(e instanceof ArrayBuffer)a=new Uint8Array(e);else{let n=e.byteOffset,i=e.byteLength;a=new Uint8Array(e.buffer||e.arrayBuffer,n,i)}return r.set(a,t),t+_e(a.byteLength,4)}function Vr(e,r,t,a){let n=_e(t.byteLength,a),i=n-t.byteLength;if(e){let s=new Uint8Array(e.buffer,e.byteOffset+r,t.byteLength),o=new Uint8Array(t);s.set(o);for(let c=0;c<i;++c)e.setUint8(r+t.byteLength+c,32)}return r+=n,r}function rr(e,r,t,a){let i=new TextEncoder().encode(t);return r=Vr(e,r,i,a),r}function Yt(e,r){let t=e.length,n=Math.ceil(t/r)*r-t,i="";for(let s=0;s<n;++s)i+=" ";return e+i}function tr(e,r,t,a){if(e)for(let n=0;n<a;n++)e.setUint8(r+n,t.charCodeAt(n));return r+a}function Mr(e,r,t,a){if(e)for(let n=0;n<a;n++)e.setUint8(r+n,t[n]);return r+a}function jr(e,r,t){if(r.encodeSync)return r.encodeSync(e,t);throw new Error("Writer could not synchronously encode data")}var Yn="3.3.0-alpha.6";var pe=!1,xr=!0;function Gt(e){let r=br(e);return Ts(r)||As(r)||ks(r)||Rs(r)}function Ts(e){let r=br(e);return r.byteLength>=24&&r.getUint32(0,pe)===2303741511?{mimeType:"image/png",width:r.getUint32(16,pe),height:r.getUint32(20,pe)}:null}function ks(e){let r=br(e);return r.byteLength>=10&&r.getUint32(0,pe)===1195984440?{mimeType:"image/gif",width:r.getUint16(6,xr),height:r.getUint16(8,xr)}:null}function Rs(e){let r=br(e);return r.byteLength>=14&&r.getUint16(0,pe)===16973&&r.getUint32(2,xr)===r.byteLength?{mimeType:"image/bmp",width:r.getUint32(18,xr),height:r.getUint32(22,xr)}:null}function As(e){let r=br(e);if(!(r.byteLength>=3&&r.getUint16(0,pe)===65496&&r.getUint8(2)===255))return null;let{tableMarkers:a,sofMarkers:n}=Ps(),i=2;for(;i+9<r.byteLength;){let s=r.getUint16(i,pe);if(n.has(s))return{mimeType:"image/jpeg",height:r.getUint16(i+5,pe),width:r.getUint16(i+7,pe)};if(!a.has(s))return null;i+=2,i+=r.getUint16(i,pe)}return null}function Ps(){let e=new Set([65499,65476,65484,65501,65534]);for(let t=65504;t<65520;++t)e.add(t);let r=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:r}}function br(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}function Ve(e,r){if(!e)throw new Error(r||"assert failed: gltf")}var Gn=["SCALAR","VEC2","VEC3","VEC4"],Ss=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],ws=new Map(Ss),qs={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Es={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Ls={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Un(e){return Gn[e-1]||Gn[0]}function Vn(e){let r=ws.get(e.constructor);if(!r)throw new Error("Illegal typed array");return r}function jn(e,r){let t=Ls[e.componentType],a=qs[e.type],n=Es[e.componentType],i=e.count*a,s=e.count*a*n;return Ve(s>=0&&s<=r.byteLength),{ArrayType:t,length:i,byteLength:s}}var Ns={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]},_r=class{constructor(r){this.gltf=r||{json:Q({},Ns),buffers:[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(r){return this.json[r]}getExtraData(r){return(this.json.extras||{})[r]}getExtension(r){let t=this.getUsedExtensions().find(n=>n===r),a=this.json.extensions||{};return t?a[r]||!0:null}getRequiredExtension(r){return this.getRequiredExtensions().find(a=>a===r)?this.getExtension(r):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getObjectExtension(r,t){return(r.extensions||{})[t]}getScene(r){return this.getObject("scenes",r)}getNode(r){return this.getObject("nodes",r)}getSkin(r){return this.getObject("skins",r)}getMesh(r){return this.getObject("meshes",r)}getMaterial(r){return this.getObject("materials",r)}getAccessor(r){return this.getObject("accessors",r)}getTexture(r){return this.getObject("textures",r)}getSampler(r){return this.getObject("samplers",r)}getImage(r){return this.getObject("images",r)}getBufferView(r){return this.getObject("bufferViews",r)}getBuffer(r){return this.getObject("buffers",r)}getObject(r,t){if(typeof t=="object")return t;let a=this.json[r]&&this.json[r][t];if(!a)throw new Error(`glTF file error: Could not find ${r}[${t}]`);return a}getTypedArrayForBufferView(r){r=this.getBufferView(r);let t=r.buffer,a=this.gltf.buffers[t];Ve(a);let n=(r.byteOffset||0)+a.byteOffset;return new Uint8Array(a.arrayBuffer,n,r.byteLength)}getTypedArrayForAccessor(r){r=this.getAccessor(r);let t=this.getBufferView(r.bufferView),n=this.getBuffer(t.buffer).data,{ArrayType:i,length:s}=jn(r,t),o=t.byteOffset+r.byteOffset;return new i(n,o,s)}getTypedArrayForImageData(r){r=this.getAccessor(r);let t=this.getBufferView(r.bufferView),n=this.getBuffer(t.buffer).data,i=t.byteOffset||0;return new Uint8Array(n,i,t.byteLength)}addApplicationData(r,t){return this.json[r]=t,this}addExtraData(r,t){return this.json.extras=this.json.extras||{},this.json.extras[r]=t,this}addObjectExtension(r,t,a){return r.extensions=r.extensions||{},r.extensions[t]=a,this.registerUsedExtension(t),this}setObjectExtension(r,t,a){let n=r.extensions||{};n[t]=a}removeObjectExtension(r,t){let a=r.extensions||{},n=a[t];return delete a[t],n}addExtension(r,t={}){return Ve(t),this.json.extensions=this.json.extensions||{},this.json.extensions[r]=t,this.registerUsedExtension(r),t}addRequiredExtension(r,t={}){return Ve(t),this.addExtension(r,t),this.registerRequiredExtension(r),t}registerUsedExtension(r){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(t=>t===r)||this.json.extensionsUsed.push(r)}registerRequiredExtension(r){this.registerUsedExtension(r),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(t=>t===r)||this.json.extensionsRequired.push(r)}removeExtension(r){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,r),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,r),this.json.extensions&&delete this.json.extensions[r]}setDefaultScene(r){this.json.scene=r}addScene(r){let{nodeIndices:t}=r;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}addNode(r){let{meshIndex:t,matrix:a}=r;this.json.nodes=this.json.nodes||[];let n={mesh:t};return a&&(n.matrix=a),this.json.nodes.push(n),this.json.nodes.length-1}addMesh(r){let{attributes:t,indices:a,material:n,mode:i=4}=r,o={primitives:[{attributes:this._addAttributes(t),mode:i}]};if(a){let c=this._addIndices(a);o.primitives[0].indices=c}return Number.isFinite(n)&&(o.primitives[0].material=n),this.json.meshes=this.json.meshes||[],this.json.meshes.push(o),this.json.meshes.length-1}addPointCloud(r){let a={primitives:[{attributes:this._addAttributes(r),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(a),this.json.meshes.length-1}addImage(r,t){let a=Gt(r),n=t||(a==null?void 0:a.mimeType),s={bufferView:this.addBufferView(r),mimeType:n};return this.json.images=this.json.images||[],this.json.images.push(s),this.json.images.length-1}addBufferView(r){let t=r.byteLength;Ve(Number.isFinite(t)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(r);let a={buffer:0,byteOffset:this.byteLength,byteLength:t};return this.byteLength+=_e(t,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(a),this.json.bufferViews.length-1}addAccessor(r,t){let a={bufferView:r,type:Un(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(a),this.json.accessors.length-1}addBinaryBuffer(r,t={size:3}){let a=this.addBufferView(r),n={min:t.min,max:t.max};(!n.min||!n.max)&&(n=this._getAccessorMinMax(r,t.size));let i={size:t.size,componentType:Vn(r),count:Math.round(r.length/t.size),min:n.min,max:n.max};return this.addAccessor(a,Object.assign(i,t))}addTexture(r){let{imageIndex:t}=r,a={source:t};return this.json.textures=this.json.textures||[],this.json.textures.push(a),this.json.textures.length-1}addMaterial(r){return this.json.materials=this.json.materials||[],this.json.materials.push(r),this.json.materials.length-1}createBinaryChunk(){var i,s;this.gltf.buffers=[];let r=this.byteLength,t=new ArrayBuffer(r),a=new Uint8Array(t),n=0;for(let o of this.sourceBuffers||[])n=zt(o,a,n);((s=(i=this.json)==null?void 0:i.buffers)==null?void 0:s[0])?this.json.buffers[0].byteLength=r:this.json.buffers=[{byteLength:r}],this.gltf.binary=t,this.sourceBuffers=[t]}_removeStringFromArray(r,t){let a=!0;for(;a;){let n=r.indexOf(t);n>-1?r.splice(n,1):a=!1}}_addAttributes(r={}){let t={};for(let a in r){let n=r[a],i=this._getGltfAttributeName(a),s=this.addBinaryBuffer(n.value,n);t[i]=s}return t}_addIndices(r){return this.addBinaryBuffer(r,{size:1})}_getGltfAttributeName(r){switch(r.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return r}}_getAccessorMinMax(r,t){let a={min:null,max:null};if(r.length<t)return a;a.min=[],a.max=[];let n=r.subarray(0,t);for(let i of n)a.min.push(i),a.max.push(i);for(let i=t;i<r.length;i+=t)for(let s=0;s<t;s++)a.min[0+s]=Math.min(a.min[0+s],r[i+s]),a.max[0+s]=Math.max(a.max[0+s],r[i+s]);return a}};var o1=1179937895,c1=1313821514,u1=5130562,Me=!0;function gn(e,r,t=0,a={}){let{magic:n=o1,version:i=2,json:s={},binary:o}=e,c=t;r&&(r.setUint32(t+0,n,Me),r.setUint32(t+4,i,Me),r.setUint32(t+8,0,Me));let u=t+8;t+=12;let l=t;r&&(r.setUint32(t+0,0,Me),r.setUint32(t+4,c1,Me)),t+=8;let f=JSON.stringify(s);if(t=rr(r,t,f,4),r){let h=t-l-8;r.setUint32(l+0,h,Me)}if(o){let h=t;if(r&&(r.setUint32(t+0,0,Me),r.setUint32(t+4,u1,Me)),t+=8,t=Vr(r,t,o,4),r){let d=t-h-8;r.setUint32(h+0,d,Me)}}if(r){let h=t-c;r.setUint32(u,h,Me)}return t}function yn(e,r,t,a){return l1(e),gn(e,r,t,a)}function l1(e,{firstBuffer:r=0}={}){if(e.buffers&&e.buffers.length>r)throw new Error("encodeGLTF: multiple buffers not yet implemented")}var Mn={name:"glTF",id:"gltf",module:"gltf",version:Yn,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,encodeSync:f1,options:{gltf:{}}};function f1(e,r={}){let{byteOffset:t=0}=r,a=yn(e,null,t,r),n=new ArrayBuffer(a),i=new DataView(n);return yn(e,i,t,r),n}var as="3.3.0-alpha.6";var yr={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect",GLTF:"glTF"},Cp=Object.keys(yr),Fe={BATCHED_MODEL:[98,51,100,109],INSTANCED_MODEL:[105,51,100,109],POINT_CLOUD:[112,110,116,115],COMPOSITE:[99,109,112,116]};function De(e,r,t){let a=12;if(!r)return t+a;let{magic:n,version:i=1,byteLength:s=12}=e;return Ee(Array.isArray(n)&&Number.isFinite(i)&&Number.isFinite(s)),r.setUint8(t+0,n[0]),r.setUint8(t+1,n[1]),r.setUint8(t+2,n[2]),r.setUint8(t+3,n[3]),r.setUint32(t+4,i,!0),r.setUint32(t+8,s,!0),t+=a,t}function ze(e,r,t){!e||e.setUint32(r+8,t,!0)}function is(e,r,t,a,n){e=Q({magic:Fe.COMPOSITE,tiles:[]},e);let i=t;t+=De(e,r,t),r&&r.setUint32(t,e.tiles.length,!0),t+=4;for(let s=0;s<e.tiles.length;++s)t+=n(e.tiles[s],r,t,a);return ze(r,i,t-i),t}function ss(e,r,t,a){let{featuresLength:n=0,batchTable:i}=e,s={BATCH_LENGTH:n},o=JSON.stringify(s),c=i?JSON.stringify(i):"",u=_e(o.length,8),l=c?_e(c.length,8):0;e=Q({magic:Fe.BATCHED_MODEL},e);let f=t;t=De(e,r,t),r&&(r.setUint32(12,u,!0),r.setUint32(16,0,!0),r.setUint32(20,l,!0),r.setUint32(24,0,!0)),t+=16,t=rr(r,t,o,8),i&&(t=rr(r,t,c,8));let h=e.gltfEncoded;return h&&(t=Mr(r,t,h,h.byteLength)),ze(r,f,t-f),t}function os(e,r,t,a){let{featuresLength:n=1,gltfFormat:i=1,gltfUri:s=""}=e,o=s.length,c={INSTANCES_LENGTH:n,POSITION:new Array(n*3).fill(0)},u=JSON.stringify(c),l=u.length;e=Q({magic:Fe.INSTANCED_MODEL},e);let f=t;return t=De(e,r,0),r&&(r.setUint32(12,l,!0),r.setUint32(16,0,!0),r.setUint32(20,0,!0),r.setUint32(24,0,!0),r.setUint32(28,i,!0)),t+=20,t+=tr(r,t,u,l),t+=tr(r,t,s,o),ze(r,f,t-f),t}var B1={POINTS_LENGTH:1,POSITIONS:{byteOffset:0}};function cs(e,r,t,a){let{featureTableJson:n=B1}=e,i=JSON.stringify(n);i=Yt(i,4);let{featureTableJsonByteLength:s=i.length}=e,o=new ArrayBuffer(12),c=o.byteLength;e=Q({magic:Fe.POINT_CLOUD},e);let u=t;return t+=De(e,r,0),r&&(r.setUint32(t+0,s,!0),r.setUint32(t+4,c,!0),r.setUint32(t+8,0,!0),r.setUint32(t+12,0,!0)),t+=16,t+=tr(r,t,i,s),t+=Mr(r,t,o,c),ze(r,u,t-u),t}function Sn(e,r){let t=wn(e,null,0,r),a=new ArrayBuffer(t),n=new DataView(a);return wn(e,n,0,r),a}function wn(e,r,t,a){switch(Ee(typeof e.type=="string"),e.type){case yr.COMPOSITE:return is(e,r,t,a,wn);case yr.POINT_CLOUD:return cs(e,r,t,a);case yr.BATCHED_3D_MODEL:return ss(e,r,t,a);case yr.INSTANCED_3D_MODEL:return os(e,r,t,a);default:throw new Error("3D Tiles: unknown tile type")}}var qn={name:"3D Tile",id:"3d-tiles",module:"3d-tiles",version:as,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],encodeSync:F1,binary:!0,options:{["3d-tiles"]:{}}};function F1(e,r){return Sn(e,r)}var er=Fn(pr()),ls=Fn(ns());function us(e,r){let t=new Float32Array(e.length),a=z1(r);for(let n=0;n<e.length;n+=2){let i=e.subarray(n,n+2),s=a.slice(n*2,n*2+4),o=D1([i[0],i[1]]),c=[s[2]-s[0],s[3]-s[1]],u=[o[0]*c[0],o[1]*c[1]],l=[u[0]+s[0],u[1]+s[1]];t[n]=l[0],t[n+1]=l[1]}return t}function D1(e){return[e[0]-Math.floor(e[0]),e[1]-Math.floor(e[1])]}function z1(e){let r=65535,t=[];for(let a=0;a<e.length;a++)t[a]=e[a]/r;return t}var Y1=new er.Matrix4([1,0,0,0,0,0,-1,0,0,1,0,0,0,0,0,1]),fs=new er.Vector3,Wt=class{async convert(r,t=null){let a=await this.buildGltf(r,t);return jr({gltfEncoded:new Uint8Array(a),type:"b3dm",featuresLength:this._getFeaturesLength(t),batchTable:t},qn)}async buildGltf(r,t){let{tileContent:a,textureFormat:n}=r,{material:i,attributes:s,indices:o,cartesianOrigin:c,cartographicOrigin:u,modelMatrix:l}=a,f=new _r,h=await this._addI3sTextureToGltf(a,n,f),d=this._convertI3sMaterialToGltfMaterial(i,h),p=f.addMaterial(d),m=s.positions,v=m.value;s.uvRegions&&s.texCoords&&(s.texCoords.value=us(s.texCoords.value,s.uvRegions.value)),s.positions.value=this._normalizePositions(v,c,u,l),this._createBatchIds(a,t),s.normals&&!this._checkNormals(s.normals.value)&&delete s.normals;let g=o||this._generateSynteticIndices(v.length/m.size),b=f.addMesh({attributes:s,indices:g,material:p,mode:4}),y=this._generateTransformMatrix(c),M=f.addNode({meshIndex:b,matrix:y}),T=f.addScene({nodeIndices:[M]});return f.setDefaultScene(T),f.createBinaryChunk(),jr(f.gltf,Mn)}async _addI3sTextureToGltf(r,t,a){let{texture:n,material:i,attributes:s}=r,o=null,c=n;if(!n&&i&&(c=i.pbrMetallicRoughness&&i.pbrMetallicRoughness.baseColorTexture&&i.pbrMetallicRoughness.baseColorTexture.texture.source.image),c){let u=this._deduceMimeTypeFromFormat(t),l=a.addImage(c,u);o=a.addTexture({imageIndex:l}),delete s.colors}return o}_normalizePositions(r,t,a,n){let i=new Float32Array(r.length);for(let s=0;s<r.length;s+=3){let o=r.subarray(s,s+3),c=new er.Vector3(t),u=new er.Vector3(Array.from(o)).transform(n).add(a);ls.Ellipsoid.WGS84.cartographicToCartesian(u,fs),u=fs.subtract(c),i.set(u,s)}return i}_generateTransformMatrix(r){return new er.Matrix4().translate(r).multiplyLeft(Y1)}_createBatchIds(r,t){let{featureIds:a}=r,{OBJECTID:n}=t||{};if(!(!a||!n)){for(let i=0;i<a.length;i++){let s=a[i],o=n.indexOf(s);a[i]=o}r.attributes._BATCHID={size:1,byteOffset:0,value:a}}}_generateSynteticIndices(r){let t=new Uint32Array(r);for(let a=0;a<r;a++)t.set([a],a);return t}_deduceMimeTypeFromFormat(r){switch(r){case"jpg":return"image/jpeg";case"png":return"image/png";case"ktx2":return"image/ktx2";default:return console.warn(`Unexpected texture format in I3S: ${r}`),"image/jpeg"}}_convertI3sMaterialToGltfMaterial(r,t){let a=t!==null;return r?(t!==null&&(r=this._setGltfTexture(r,t)),r):(r={alphaMode:"OPAQUE",doubleSided:!1,pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1}},a?r.pbrMetallicRoughness.baseColorTexture={index:t,texCoord:0}:r.pbrMetallicRoughness.baseColorFactor=[1,1,1,1],r)}_setGltfTexture(r,t){let a=Bn(Q({},r),{pbrMetallicRoughness:Q({},r.pbrMetallicRoughness)});return r.pbrMetallicRoughness&&r.pbrMetallicRoughness.baseColorTexture?a.pbrMetallicRoughness.baseColorTexture={index:t,texCoord:0}:r.emissiveTexture?a.emissiveTexture={index:t,texCoord:0}:r.pbrMetallicRoughness&&r.pbrMetallicRoughness.metallicRoughnessTexture?a.pbrMetallicRoughness.metallicRoughnessTexture={index:t,texCoord:0}:r.normalTexture?a.normalTexture={index:t,texCoord:0}:r.occlusionTexture&&(a.occlusionTexture={index:t,texCoord:0}),a}_getFeaturesLength(r){if(!r)return 0;let t=Object.keys(r)[0];return t?r[t].length:0}_checkNormals(r){return r.find(t=>t)}};var G1=new Wt;Dt(async(e,r={})=>G1.convert(e,r.featureAttributes));
|
|
1
|
+
var hs=Object.create;var Yr=Object.defineProperty,ds=Object.defineProperties,ps=Object.getOwnPropertyDescriptor,vs=Object.getOwnPropertyDescriptors,ms=Object.getOwnPropertyNames,Cn=Object.getOwnPropertySymbols,gs=Object.getPrototypeOf,In=Object.prototype.hasOwnProperty,ys=Object.prototype.propertyIsEnumerable;var Wn=(e,r,t)=>r in e?Yr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Q=(e,r)=>{for(var t in r||(r={}))In.call(r,t)&&Wn(e,t,r[t]);if(Cn)for(var t of Cn(r))ys.call(r,t)&&Wn(e,t,r[t]);return e},Bn=(e,r)=>ds(e,vs(r)),Ms=e=>Yr(e,"__esModule",{value:!0});var S=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var xs=(e,r,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of ms(r))!In.call(e,a)&&a!=="default"&&Yr(e,a,{get:()=>r[a],enumerable:!(t=ps(r,a))||t.enumerable});return e},Dn=e=>xs(Ms(Yr(e!=null?hs(gs(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var V=S((qd,Or)=>{function Cs(e){return e&&e.__esModule?e:{default:e}}Or.exports=Cs,Or.exports.__esModule=!0,Or.exports.default=Or.exports});var se=S((Ed,Oe)=>{function Gt(e){return Oe.exports=Gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Oe.exports.__esModule=!0,Oe.exports.default=Oe.exports,Gt(e)}Oe.exports=Gt,Oe.exports.__esModule=!0,Oe.exports.default=Oe.exports});var $=S((Ld,Tr)=>{function Is(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}Tr.exports=Is,Tr.exports.__esModule=!0,Tr.exports.default=Tr.exports});var J=S((Nd,kr)=>{function Zn(e,r){for(var t=0;t<r.length;t++){var a=r[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Ws(e,r,t){return r&&Zn(e.prototype,r),t&&Zn(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}kr.exports=Ws,kr.exports.__esModule=!0,kr.exports.default=kr.exports});var Xn=S((Cd,Te)=>{function Vt(e,r){return Te.exports=Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,n){return a.__proto__=n,a},Te.exports.__esModule=!0,Te.exports.default=Te.exports,Vt(e,r)}Te.exports=Vt,Te.exports.__esModule=!0,Te.exports.default=Te.exports});var oe=S((Id,Rr)=>{var Bs=Xn();function Ds(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&Bs(e,r)}Rr.exports=Ds,Rr.exports.__esModule=!0,Rr.exports.default=Rr.exports});var Qn=S((Wd,Ar)=>{function Fs(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Ar.exports=Fs,Ar.exports.__esModule=!0,Ar.exports.default=Ar.exports});var ce=S((Bd,Pr)=>{var zs=se().default,Ys=Qn();function Us(e,r){if(r&&(zs(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ys(e)}Pr.exports=Us,Pr.exports.__esModule=!0,Pr.exports.default=Pr.exports});var ue=S((Dd,ke)=>{function jt(e){return ke.exports=jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ke.exports.__esModule=!0,ke.exports.default=ke.exports,jt(e)}ke.exports=jt,ke.exports.__esModule=!0,ke.exports.default=ke.exports});var Zr=S(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.default=Gs;function Gs(e,r){if(!e)throw new Error("math.gl assertion ".concat(r))}});var ve=S(F=>{"use strict";var $n=V();Object.defineProperty(F,"__esModule",{value:!0});F.configure=Xs;F.formatValue=Qs;F.isArray=je;F.clone=$s;F.toRadians=Js;F.toDegrees=Hs;F.radians=Hn;F.degrees=Kn;F.sin=Ks;F.cos=eo;F.tan=ro;F.asin=to;F.acos=no;F.atan=ao;F.clamp=io;F.lerp=ea;F.equals=ra;F.exactEquals=ta;F.withEpsilon=so;F.config=void 0;var Jn=$n(se()),Vs=$n(Zr()),js=1/Math.PI*180,Zs=1/180*Math.PI,H={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};F.config=H;function Xs(e){for(var r in e)(0,Vs.default)(r in H),H[r]=e[r];return H}function Qs(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.precision,a=t===void 0?H.precision:t;return e=oo(e),"".concat(parseFloat(e.toPrecision(a)))}function je(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $s(e){return"clone"in e?e.clone():e.slice()}function Js(e){return Hn(e)}function Hs(e){return Kn(e)}function Hn(e,r){return Re(e,function(t){return t*Zs},r)}function Kn(e,r){return Re(e,function(t){return t*js},r)}function Ks(e,r){return Re(e,function(t){return Math.sin(t)},r)}function eo(e,r){return Re(e,function(t){return Math.cos(t)},r)}function ro(e,r){return Re(e,function(t){return Math.tan(t)},r)}function to(e,r){return Re(e,function(t){return Math.asin(t)},r)}function no(e,r){return Re(e,function(t){return Math.acos(t)},r)}function ao(e,r){return Re(e,function(t){return Math.atan(t)},r)}function io(e,r,t){return Re(e,function(a){return Math.max(r,Math.min(t,a))})}function ea(e,r,t){return je(e)?e.map(function(a,n){return ea(a,r[n],t)}):t*r+(1-t)*e}function ra(e,r,t){var a=H.EPSILON;t&&(H.EPSILON=t);try{if(e===r)return!0;if(je(e)&&je(r)){if(e.length!==r.length)return!1;for(var n=0;n<e.length;++n)if(!ra(e[n],r[n]))return!1;return!0}return e&&e.equals?e.equals(r):r&&r.equals?r.equals(e):typeof e=="number"&&typeof r=="number"?Math.abs(e-r)<=H.EPSILON*Math.max(1,Math.abs(e),Math.abs(r)):!1}finally{H.EPSILON=a}}function ta(e,r){if(e===r)return!0;if(e&&(0,Jn.default)(e)==="object"&&r&&(0,Jn.default)(r)==="object"){if(e.constructor!==r.constructor)return!1;if(e.exactEquals)return e.exactEquals(r)}if(je(e)&&je(r)){if(e.length!==r.length)return!1;for(var t=0;t<e.length;++t)if(!ta(e[t],r[t]))return!1;return!0}return!1}function so(e,r){var t=H.EPSILON;H.EPSILON=e;var a;try{a=r()}finally{H.EPSILON=t}return a}function oo(e){return Math.round(e/H.EPSILON)*H.EPSILON}function co(e){return e.clone?e.clone():new Array(e.length)}function Re(e,r,t){if(je(e)){var a=e;t=t||co(a);for(var n=0;n<t.length&&n<a.length;++n)t[n]=r(e[n],n,t);return t}return r(e)}});var qr=S(Xr=>{"use strict";var Sr=V();Object.defineProperty(Xr,"__esModule",{value:!0});Xr.default=void 0;var uo=Sr($()),lo=Sr(J()),fo=Sr(oe()),ho=Sr(ce()),na=Sr(ue()),wr=ve();function po(e){var r=vo();return function(){var a=(0,na.default)(e),n;if(r){var i=(0,na.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,ho.default)(this,n)}}function vo(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mo(e){function r(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return r.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e,r}var go=function(e){(0,fo.default)(t,e);var r=po(t);function t(){return(0,uo.default)(this,t),r.apply(this,arguments)}return(0,lo.default)(t,[{key:"clone",value:function(){return new this.constructor().copy(this)}},{key:"fromArray",value:function(n){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=0;s<this.ELEMENTS;++s)this[s]=n[s+i];return this.check()}},{key:"toArray",value:function(){for(var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=0;s<this.ELEMENTS;++s)n[i+s]=this[s];return n}},{key:"from",value:function(n){return Array.isArray(n)?this.copy(n):this.fromObject(n)}},{key:"to",value:function(n){return n===this?this:(0,wr.isArray)(n)?this.toArray(n):this.toObject(n)}},{key:"toTarget",value:function(n){return n?this.to(n):this}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(wr.config)}},{key:"formatString",value:function(n){for(var i="",s=0;s<this.ELEMENTS;++s)i+=(s>0?", ":"")+(0,wr.formatValue)(this[s],n);return"".concat(n.printTypes?this.constructor.name:"","[").concat(i,"]")}},{key:"equals",value:function(n){if(!n||this.length!==n.length)return!1;for(var i=0;i<this.ELEMENTS;++i)if(!(0,wr.equals)(this[i],n[i]))return!1;return!0}},{key:"exactEquals",value:function(n){if(!n||this.length!==n.length)return!1;for(var i=0;i<this.ELEMENTS;++i)if(this[i]!==n[i])return!1;return!0}},{key:"negate",value:function(){for(var n=0;n<this.ELEMENTS;++n)this[n]=-this[n];return this.check()}},{key:"lerp",value:function(n,i,s){if(s===void 0)return this.lerp(this,n,i);for(var o=0;o<this.ELEMENTS;++o){var c=n[o];this[o]=c+s*(i[o]-c)}return this.check()}},{key:"min",value:function(n){for(var i=0;i<this.ELEMENTS;++i)this[i]=Math.min(n[i],this[i]);return this.check()}},{key:"max",value:function(n){for(var i=0;i<this.ELEMENTS;++i)this[i]=Math.max(n[i],this[i]);return this.check()}},{key:"clamp",value:function(n,i){for(var s=0;s<this.ELEMENTS;++s)this[s]=Math.min(Math.max(this[s],n[s]),i[s]);return this.check()}},{key:"add",value:function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];for(var o=0,c=i;o<c.length;o++)for(var u=c[o],l=0;l<this.ELEMENTS;++l)this[l]+=u[l];return this.check()}},{key:"subtract",value:function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];for(var o=0,c=i;o<c.length;o++)for(var u=c[o],l=0;l<this.ELEMENTS;++l)this[l]-=u[l];return this.check()}},{key:"scale",value:function(n){if(typeof n=="number")for(var i=0;i<this.ELEMENTS;++i)this[i]*=n;else for(var s=0;s<this.ELEMENTS&&s<n.length;++s)this[s]*=n[s];return this.check()}},{key:"multiplyByScalar",value:function(n){for(var i=0;i<this.ELEMENTS;++i)this[i]*=n;return this.check()}},{key:"check",value:function(){if(wr.config.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var n=this.length===this.ELEMENTS,i=0;i<this.ELEMENTS;++i)n=n&&Number.isFinite(this[i]);return n}},{key:"sub",value:function(n){return this.subtract(n)}},{key:"setScalar",value:function(n){for(var i=0;i<this.ELEMENTS;++i)this[i]=n;return this.check()}},{key:"addScalar",value:function(n){for(var i=0;i<this.ELEMENTS;++i)this[i]+=n;return this.check()}},{key:"subScalar",value:function(n){return this.addScalar(-n)}},{key:"multiplyScalar",value:function(n){for(var i=0;i<this.ELEMENTS;++i)this[i]*=n;return this.check()}},{key:"divideScalar",value:function(n){return this.multiplyByScalar(1/n)}},{key:"clampScalar",value:function(n,i){for(var s=0;s<this.ELEMENTS;++s)this[s]=Math.min(Math.max(this[s],n),i);return this.check()}},{key:"elements",get:function(){return this}}]),t}(mo(Array));Xr.default=go});var me=S(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.validateVector=aa;nr.checkNumber=Mo;nr.checkVector=xo;nr.deprecated=bo;var yo=ve();function aa(e,r){if(e.length!==r)return!1;for(var t=0;t<e.length;++t)if(!Number.isFinite(e[t]))return!1;return!0}function Mo(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function xo(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";if(yo.config.debug&&!aa(e,r))throw new Error("math.gl: ".concat(t," some fields set to invalid numbers'"));return e}var ia={};function bo(e,r){ia[e]||(ia[e]=!0,console.warn("".concat(e," has been removed in version ").concat(r,", see upgrade guide for more information")))}});var $r=S(Qr=>{"use strict";var Ze=V();Object.defineProperty(Qr,"__esModule",{value:!0});Qr.default=void 0;var _o=Ze($()),Oo=Ze(J()),To=Ze(oe()),ko=Ze(ce()),sa=Ze(ue()),Ro=Ze(qr()),Er=me(),oa=Ze(Zr());function Ao(e){var r=Po();return function(){var a=(0,sa.default)(e),n;if(r){var i=(0,sa.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,ko.default)(this,n)}}function Po(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var So=function(e){(0,To.default)(t,e);var r=Ao(t);function t(){return(0,_o.default)(this,t),r.apply(this,arguments)}return(0,Oo.default)(t,[{key:"x",get:function(){return this[0]},set:function(n){this[0]=(0,Er.checkNumber)(n)}},{key:"y",get:function(){return this[1]},set:function(n){this[1]=(0,Er.checkNumber)(n)}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var n=0,i=0;i<this.ELEMENTS;++i)n+=this[i]*this[i];return n}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(n){return Math.sqrt(this.distanceSquared(n))}},{key:"distanceSquared",value:function(n){for(var i=0,s=0;s<this.ELEMENTS;++s){var o=this[s]-n[s];i+=o*o}return(0,Er.checkNumber)(i)}},{key:"dot",value:function(n){for(var i=0,s=0;s<this.ELEMENTS;++s)i+=this[s]*n[s];return(0,Er.checkNumber)(i)}},{key:"normalize",value:function(){var n=this.magnitude();if(n!==0)for(var i=0;i<this.ELEMENTS;++i)this[i]/=n;return this.check()}},{key:"multiply",value:function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];for(var o=0,c=i;o<c.length;o++)for(var u=c[o],l=0;l<this.ELEMENTS;++l)this[l]*=u[l];return this.check()}},{key:"divide",value:function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];for(var o=0,c=i;o<c.length;o++)for(var u=c[o],l=0;l<this.ELEMENTS;++l)this[l]/=u[l];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(n){return this.distance(n)}},{key:"distanceToSquared",value:function(n){return this.distanceSquared(n)}},{key:"getComponent",value:function(n){return(0,oa.default)(n>=0&&n<this.ELEMENTS,"index is out of range"),(0,Er.checkNumber)(this[n])}},{key:"setComponent",value:function(n,i){return(0,oa.default)(n>=0&&n<this.ELEMENTS,"index is out of range"),this[n]=i,this.check()}},{key:"addVectors",value:function(n,i){return this.copy(n).add(i)}},{key:"subVectors",value:function(n,i){return this.copy(n).subtract(i)}},{key:"multiplyVectors",value:function(n,i){return this.copy(n).multiply(i)}},{key:"addScaledVector",value:function(n,i){return this.add(new this.constructor(n).multiplyScalar(i))}}]),t}(Ro.default);Qr.default=So});var Xe=S(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.setMatrixArrayType=qo;ne.toRadian=Lo;ne.equals=No;ne.RANDOM=ne.ARRAY_TYPE=ne.EPSILON=void 0;var ca=1e-6;ne.EPSILON=ca;var ua=typeof Float32Array!="undefined"?Float32Array:Array;ne.ARRAY_TYPE=ua;var wo=Math.random;ne.RANDOM=wo;function qo(e){ne.ARRAY_TYPE=ua=e}var Eo=Math.PI/180;function Lo(e){return e*Eo}function No(e,r){return Math.abs(e-r)<=ca*Math.max(1,Math.abs(e),Math.abs(r))}Math.hypot||(Math.hypot=function(){for(var e=0,r=arguments.length;r--;)e+=arguments[r]*arguments[r];return Math.sqrt(e)})});var Hr=S(R=>{"use strict";function Jr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Jr=function(t){return typeof t}:Jr=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jr(e)}Object.defineProperty(R,"__esModule",{value:!0});R.create=fa;R.clone=Io;R.fromValues=Wo;R.copy=Bo;R.set=Do;R.add=Fo;R.subtract=ha;R.multiply=da;R.divide=pa;R.ceil=zo;R.floor=Yo;R.min=Uo;R.max=Go;R.round=Vo;R.scale=jo;R.scaleAndAdd=Zo;R.distance=va;R.squaredDistance=ma;R.length=ga;R.squaredLength=ya;R.negate=Xo;R.inverse=Qo;R.normalize=$o;R.dot=Jo;R.cross=Ho;R.lerp=Ko;R.random=ec;R.transformMat2=rc;R.transformMat2d=tc;R.transformMat3=nc;R.transformMat4=ac;R.rotate=ic;R.angle=sc;R.zero=oc;R.str=cc;R.exactEquals=uc;R.equals=lc;R.forEach=R.sqrLen=R.sqrDist=R.dist=R.div=R.mul=R.sub=R.len=void 0;var Qe=Co(Xe());function la(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(la=function(n){return n?t:r})(e)}function Co(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||Jr(e)!=="object"&&typeof e!="function")return{default:e};var t=la(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function fa(){var e=new Qe.ARRAY_TYPE(2);return Qe.ARRAY_TYPE!=Float32Array&&(e[0]=0,e[1]=0),e}function Io(e){var r=new Qe.ARRAY_TYPE(2);return r[0]=e[0],r[1]=e[1],r}function Wo(e,r){var t=new Qe.ARRAY_TYPE(2);return t[0]=e,t[1]=r,t}function Bo(e,r){return e[0]=r[0],e[1]=r[1],e}function Do(e,r,t){return e[0]=r,e[1]=t,e}function Fo(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e}function ha(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e}function da(e,r,t){return e[0]=r[0]*t[0],e[1]=r[1]*t[1],e}function pa(e,r,t){return e[0]=r[0]/t[0],e[1]=r[1]/t[1],e}function zo(e,r){return e[0]=Math.ceil(r[0]),e[1]=Math.ceil(r[1]),e}function Yo(e,r){return e[0]=Math.floor(r[0]),e[1]=Math.floor(r[1]),e}function Uo(e,r,t){return e[0]=Math.min(r[0],t[0]),e[1]=Math.min(r[1],t[1]),e}function Go(e,r,t){return e[0]=Math.max(r[0],t[0]),e[1]=Math.max(r[1],t[1]),e}function Vo(e,r){return e[0]=Math.round(r[0]),e[1]=Math.round(r[1]),e}function jo(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e}function Zo(e,r,t,a){return e[0]=r[0]+t[0]*a,e[1]=r[1]+t[1]*a,e}function va(e,r){var t=r[0]-e[0],a=r[1]-e[1];return Math.hypot(t,a)}function ma(e,r){var t=r[0]-e[0],a=r[1]-e[1];return t*t+a*a}function ga(e){var r=e[0],t=e[1];return Math.hypot(r,t)}function ya(e){var r=e[0],t=e[1];return r*r+t*t}function Xo(e,r){return e[0]=-r[0],e[1]=-r[1],e}function Qo(e,r){return e[0]=1/r[0],e[1]=1/r[1],e}function $o(e,r){var t=r[0],a=r[1],n=t*t+a*a;return n>0&&(n=1/Math.sqrt(n)),e[0]=r[0]*n,e[1]=r[1]*n,e}function Jo(e,r){return e[0]*r[0]+e[1]*r[1]}function Ho(e,r,t){var a=r[0]*t[1]-r[1]*t[0];return e[0]=e[1]=0,e[2]=a,e}function Ko(e,r,t,a){var n=r[0],i=r[1];return e[0]=n+a*(t[0]-n),e[1]=i+a*(t[1]-i),e}function ec(e,r){r=r||1;var t=Qe.RANDOM()*2*Math.PI;return e[0]=Math.cos(t)*r,e[1]=Math.sin(t)*r,e}function rc(e,r,t){var a=r[0],n=r[1];return e[0]=t[0]*a+t[2]*n,e[1]=t[1]*a+t[3]*n,e}function tc(e,r,t){var a=r[0],n=r[1];return e[0]=t[0]*a+t[2]*n+t[4],e[1]=t[1]*a+t[3]*n+t[5],e}function nc(e,r,t){var a=r[0],n=r[1];return e[0]=t[0]*a+t[3]*n+t[6],e[1]=t[1]*a+t[4]*n+t[7],e}function ac(e,r,t){var a=r[0],n=r[1];return e[0]=t[0]*a+t[4]*n+t[12],e[1]=t[1]*a+t[5]*n+t[13],e}function ic(e,r,t,a){var n=r[0]-t[0],i=r[1]-t[1],s=Math.sin(a),o=Math.cos(a);return e[0]=n*o-i*s+t[0],e[1]=n*s+i*o+t[1],e}function sc(e,r){var t=e[0],a=e[1],n=r[0],i=r[1],s=Math.sqrt(t*t+a*a)*Math.sqrt(n*n+i*i),o=s&&(t*n+a*i)/s;return Math.acos(Math.min(Math.max(o,-1),1))}function oc(e){return e[0]=0,e[1]=0,e}function cc(e){return"vec2("+e[0]+", "+e[1]+")"}function uc(e,r){return e[0]===r[0]&&e[1]===r[1]}function lc(e,r){var t=e[0],a=e[1],n=r[0],i=r[1];return Math.abs(t-n)<=Qe.EPSILON*Math.max(1,Math.abs(t),Math.abs(n))&&Math.abs(a-i)<=Qe.EPSILON*Math.max(1,Math.abs(a),Math.abs(i))}var fc=ga;R.len=fc;var hc=ha;R.sub=hc;var dc=da;R.mul=dc;var pc=pa;R.div=pc;var vc=va;R.dist=vc;var mc=ma;R.sqrDist=mc;var gc=ya;R.sqrLen=gc;var yc=function(){var e=fa();return function(r,t,a,n,i,s){var o,c;for(t||(t=2),a||(a=0),n?c=Math.min(n*t+a,r.length):c=r.length,o=a;o<c;o+=t)e[0]=r[o],e[1]=r[o+1],i(e,e,s),r[o]=e[0],r[o+1]=e[1];return r}}();R.forEach=yc});var ar=S($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.vec2_transformMat4AsVector=Mc;$e.vec3_transformMat4AsVector=xc;$e.vec3_transformMat2=bc;$e.vec4_transformMat2=_c;$e.vec4_transformMat3=Oc;function Mc(e,r,t){var a=r[0],n=r[1],i=t[3]*a+t[7]*n||1;return e[0]=(t[0]*a+t[4]*n)/i,e[1]=(t[1]*a+t[5]*n)/i,e}function xc(e,r,t){var a=r[0],n=r[1],i=r[2],s=t[3]*a+t[7]*n+t[11]*i||1;return e[0]=(t[0]*a+t[4]*n+t[8]*i)/s,e[1]=(t[1]*a+t[5]*n+t[9]*i)/s,e[2]=(t[2]*a+t[6]*n+t[10]*i)/s,e}function bc(e,r,t){var a=r[0],n=r[1];return e[0]=t[0]*a+t[2]*n,e[1]=t[1]*a+t[3]*n,e[2]=r[2],e}function _c(e,r,t){var a=r[0],n=r[1];return e[0]=t[0]*a+t[2]*n,e[1]=t[1]*a+t[3]*n,e[2]=r[2],e[3]=r[3],e}function Oc(e,r,t){var a=r[0],n=r[1],i=r[2];return e[0]=t[0]*a+t[3]*n+t[6]*i,e[1]=t[1]*a+t[4]*n+t[7]*i,e[2]=t[2]*a+t[5]*n+t[8]*i,e[3]=r[3],e}});var ba=S(rt=>{"use strict";var ir=V(),Tc=se();Object.defineProperty(rt,"__esModule",{value:!0});rt.default=void 0;var kc=ir($()),Rc=ir(J()),Ac=ir(oe()),Pc=ir(ce()),Ma=ir(ue()),Sc=ir($r()),Xt=ve(),Kr=me(),et=qc(Hr()),wc=ar();function xa(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(xa=function(n){return n?t:r})(e)}function qc(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||Tc(e)!=="object"&&typeof e!="function")return{default:e};var t=xa(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Ec(e){var r=Lc();return function(){var a=(0,Ma.default)(e),n;if(r){var i=(0,Ma.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,Pc.default)(this,n)}}function Lc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Nc=function(e){(0,Ac.default)(t,e);var r=Ec(t);function t(){var a,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(0,kc.default)(this,t),a=r.call(this,2),(0,Xt.isArray)(n)&&arguments.length===1?a.copy(n):(Xt.config.debug&&((0,Kr.checkNumber)(n),(0,Kr.checkNumber)(i)),a[0]=n,a[1]=i),a}return(0,Rc.default)(t,[{key:"set",value:function(n,i){return this[0]=n,this[1]=i,this.check()}},{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this.check()}},{key:"fromObject",value:function(n){return Xt.config.debug&&((0,Kr.checkNumber)(n.x),(0,Kr.checkNumber)(n.y)),this[0]=n.x,this[1]=n.y,this.check()}},{key:"toObject",value:function(n){return n.x=this[0],n.y=this[1],n}},{key:"ELEMENTS",get:function(){return 2}},{key:"horizontalAngle",value:function(){return Math.atan2(this.y,this.x)}},{key:"verticalAngle",value:function(){return Math.atan2(this.x,this.y)}},{key:"transform",value:function(n){return this.transformAsPoint(n)}},{key:"transformAsPoint",value:function(n){return et.transformMat4(this,this,n),this.check()}},{key:"transformAsVector",value:function(n){return(0,wc.vec2_transformMat4AsVector)(this,this,n),this.check()}},{key:"transformByMatrix3",value:function(n){return et.transformMat3(this,this,n),this.check()}},{key:"transformByMatrix2x3",value:function(n){return et.transformMat2d(this,this,n),this.check()}},{key:"transformByMatrix2",value:function(n){return et.transformMat2(this,this,n),this.check()}}]),t}(Sc.default);rt.default=Nc});var Le=S(O=>{"use strict";function tt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?tt=function(t){return typeof t}:tt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(e)}Object.defineProperty(O,"__esModule",{value:!0});O.create=Oa;O.clone=Ic;O.length=Ta;O.fromValues=Wc;O.copy=Bc;O.set=Dc;O.add=Fc;O.subtract=ka;O.multiply=Ra;O.divide=Aa;O.ceil=zc;O.floor=Yc;O.min=Uc;O.max=Gc;O.round=Vc;O.scale=jc;O.scaleAndAdd=Zc;O.distance=Pa;O.squaredDistance=Sa;O.squaredLength=wa;O.negate=Xc;O.inverse=Qc;O.normalize=$c;O.dot=qa;O.cross=Jc;O.lerp=Hc;O.hermite=Kc;O.bezier=eu;O.random=ru;O.transformMat4=tu;O.transformMat3=nu;O.transformQuat=au;O.rotateX=iu;O.rotateY=su;O.rotateZ=ou;O.angle=cu;O.zero=uu;O.str=lu;O.exactEquals=fu;O.equals=hu;O.forEach=O.sqrLen=O.len=O.sqrDist=O.dist=O.div=O.mul=O.sub=void 0;var Ae=Cc(Xe());function _a(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_a=function(n){return n?t:r})(e)}function Cc(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||tt(e)!=="object"&&typeof e!="function")return{default:e};var t=_a(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Oa(){var e=new Ae.ARRAY_TYPE(3);return Ae.ARRAY_TYPE!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function Ic(e){var r=new Ae.ARRAY_TYPE(3);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}function Ta(e){var r=e[0],t=e[1],a=e[2];return Math.hypot(r,t,a)}function Wc(e,r,t){var a=new Ae.ARRAY_TYPE(3);return a[0]=e,a[1]=r,a[2]=t,a}function Bc(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}function Dc(e,r,t,a){return e[0]=r,e[1]=t,e[2]=a,e}function Fc(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e[2]=r[2]+t[2],e}function ka(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e[2]=r[2]-t[2],e}function Ra(e,r,t){return e[0]=r[0]*t[0],e[1]=r[1]*t[1],e[2]=r[2]*t[2],e}function Aa(e,r,t){return e[0]=r[0]/t[0],e[1]=r[1]/t[1],e[2]=r[2]/t[2],e}function zc(e,r){return e[0]=Math.ceil(r[0]),e[1]=Math.ceil(r[1]),e[2]=Math.ceil(r[2]),e}function Yc(e,r){return e[0]=Math.floor(r[0]),e[1]=Math.floor(r[1]),e[2]=Math.floor(r[2]),e}function Uc(e,r,t){return e[0]=Math.min(r[0],t[0]),e[1]=Math.min(r[1],t[1]),e[2]=Math.min(r[2],t[2]),e}function Gc(e,r,t){return e[0]=Math.max(r[0],t[0]),e[1]=Math.max(r[1],t[1]),e[2]=Math.max(r[2],t[2]),e}function Vc(e,r){return e[0]=Math.round(r[0]),e[1]=Math.round(r[1]),e[2]=Math.round(r[2]),e}function jc(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e}function Zc(e,r,t,a){return e[0]=r[0]+t[0]*a,e[1]=r[1]+t[1]*a,e[2]=r[2]+t[2]*a,e}function Pa(e,r){var t=r[0]-e[0],a=r[1]-e[1],n=r[2]-e[2];return Math.hypot(t,a,n)}function Sa(e,r){var t=r[0]-e[0],a=r[1]-e[1],n=r[2]-e[2];return t*t+a*a+n*n}function wa(e){var r=e[0],t=e[1],a=e[2];return r*r+t*t+a*a}function Xc(e,r){return e[0]=-r[0],e[1]=-r[1],e[2]=-r[2],e}function Qc(e,r){return e[0]=1/r[0],e[1]=1/r[1],e[2]=1/r[2],e}function $c(e,r){var t=r[0],a=r[1],n=r[2],i=t*t+a*a+n*n;return i>0&&(i=1/Math.sqrt(i)),e[0]=r[0]*i,e[1]=r[1]*i,e[2]=r[2]*i,e}function qa(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]}function Jc(e,r,t){var a=r[0],n=r[1],i=r[2],s=t[0],o=t[1],c=t[2];return e[0]=n*c-i*o,e[1]=i*s-a*c,e[2]=a*o-n*s,e}function Hc(e,r,t,a){var n=r[0],i=r[1],s=r[2];return e[0]=n+a*(t[0]-n),e[1]=i+a*(t[1]-i),e[2]=s+a*(t[2]-s),e}function Kc(e,r,t,a,n,i){var s=i*i,o=s*(2*i-3)+1,c=s*(i-2)+i,u=s*(i-1),l=s*(3-2*i);return e[0]=r[0]*o+t[0]*c+a[0]*u+n[0]*l,e[1]=r[1]*o+t[1]*c+a[1]*u+n[1]*l,e[2]=r[2]*o+t[2]*c+a[2]*u+n[2]*l,e}function eu(e,r,t,a,n,i){var s=1-i,o=s*s,c=i*i,u=o*s,l=3*i*o,f=3*c*s,h=c*i;return e[0]=r[0]*u+t[0]*l+a[0]*f+n[0]*h,e[1]=r[1]*u+t[1]*l+a[1]*f+n[1]*h,e[2]=r[2]*u+t[2]*l+a[2]*f+n[2]*h,e}function ru(e,r){r=r||1;var t=Ae.RANDOM()*2*Math.PI,a=Ae.RANDOM()*2-1,n=Math.sqrt(1-a*a)*r;return e[0]=Math.cos(t)*n,e[1]=Math.sin(t)*n,e[2]=a*r,e}function tu(e,r,t){var a=r[0],n=r[1],i=r[2],s=t[3]*a+t[7]*n+t[11]*i+t[15];return s=s||1,e[0]=(t[0]*a+t[4]*n+t[8]*i+t[12])/s,e[1]=(t[1]*a+t[5]*n+t[9]*i+t[13])/s,e[2]=(t[2]*a+t[6]*n+t[10]*i+t[14])/s,e}function nu(e,r,t){var a=r[0],n=r[1],i=r[2];return e[0]=a*t[0]+n*t[3]+i*t[6],e[1]=a*t[1]+n*t[4]+i*t[7],e[2]=a*t[2]+n*t[5]+i*t[8],e}function au(e,r,t){var a=t[0],n=t[1],i=t[2],s=t[3],o=r[0],c=r[1],u=r[2],l=n*u-i*c,f=i*o-a*u,h=a*c-n*o,d=n*h-i*f,p=i*l-a*h,m=a*f-n*l,v=s*2;return l*=v,f*=v,h*=v,d*=2,p*=2,m*=2,e[0]=o+l+d,e[1]=c+f+p,e[2]=u+h+m,e}function iu(e,r,t,a){var n=[],i=[];return n[0]=r[0]-t[0],n[1]=r[1]-t[1],n[2]=r[2]-t[2],i[0]=n[0],i[1]=n[1]*Math.cos(a)-n[2]*Math.sin(a),i[2]=n[1]*Math.sin(a)+n[2]*Math.cos(a),e[0]=i[0]+t[0],e[1]=i[1]+t[1],e[2]=i[2]+t[2],e}function su(e,r,t,a){var n=[],i=[];return n[0]=r[0]-t[0],n[1]=r[1]-t[1],n[2]=r[2]-t[2],i[0]=n[2]*Math.sin(a)+n[0]*Math.cos(a),i[1]=n[1],i[2]=n[2]*Math.cos(a)-n[0]*Math.sin(a),e[0]=i[0]+t[0],e[1]=i[1]+t[1],e[2]=i[2]+t[2],e}function ou(e,r,t,a){var n=[],i=[];return n[0]=r[0]-t[0],n[1]=r[1]-t[1],n[2]=r[2]-t[2],i[0]=n[0]*Math.cos(a)-n[1]*Math.sin(a),i[1]=n[0]*Math.sin(a)+n[1]*Math.cos(a),i[2]=n[2],e[0]=i[0]+t[0],e[1]=i[1]+t[1],e[2]=i[2]+t[2],e}function cu(e,r){var t=e[0],a=e[1],n=e[2],i=r[0],s=r[1],o=r[2],c=Math.sqrt(t*t+a*a+n*n),u=Math.sqrt(i*i+s*s+o*o),l=c*u,f=l&&qa(e,r)/l;return Math.acos(Math.min(Math.max(f,-1),1))}function uu(e){return e[0]=0,e[1]=0,e[2]=0,e}function lu(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function fu(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]}function hu(e,r){var t=e[0],a=e[1],n=e[2],i=r[0],s=r[1],o=r[2];return Math.abs(t-i)<=Ae.EPSILON*Math.max(1,Math.abs(t),Math.abs(i))&&Math.abs(a-s)<=Ae.EPSILON*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(n-o)<=Ae.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))}var du=ka;O.sub=du;var pu=Ra;O.mul=pu;var vu=Aa;O.div=vu;var mu=Pa;O.dist=mu;var gu=Sa;O.sqrDist=gu;var yu=Ta;O.len=yu;var Mu=wa;O.sqrLen=Mu;var xu=function(){var e=Oa();return function(r,t,a,n,i,s){var o,c;for(t||(t=3),a||(a=0),n?c=Math.min(n*t+a,r.length):c=r.length,o=a;o<c;o+=t)e[0]=r[o],e[1]=r[o+1],e[2]=r[o+2],i(e,e,s),r[o]=e[0],r[o+1]=e[1],r[o+2]=e[2];return r}}();O.forEach=xu});var it=S(at=>{"use strict";var sr=V(),bu=se();Object.defineProperty(at,"__esModule",{value:!0});at.default=void 0;var _u=sr($()),Ou=sr(J()),Tu=sr(oe()),ku=sr(ce()),Ea=sr(ue()),Ru=sr($r()),Qt=ve(),Je=me(),Ne=Au(Le()),La=ar();function Na(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(Na=function(n){return n?t:r})(e)}function Au(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||bu(e)!=="object"&&typeof e!="function")return{default:e};var t=Na(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Pu(e){var r=Su();return function(){var a=(0,Ea.default)(e),n;if(r){var i=(0,Ea.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,ku.default)(this,n)}}function Su(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var $t=[0,0,0],nt,wu=function(e){(0,Tu.default)(t,e);var r=Pu(t);function t(){var a,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return(0,_u.default)(this,t),a=r.call(this,-0,-0,-0),arguments.length===1&&(0,Qt.isArray)(n)?a.copy(n):(Qt.config.debug&&((0,Je.checkNumber)(n),(0,Je.checkNumber)(i),(0,Je.checkNumber)(s)),a[0]=n,a[1]=i,a[2]=s),a}return(0,Ou.default)(t,[{key:"set",value:function(n,i,s){return this[0]=n,this[1]=i,this[2]=s,this.check()}},{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this.check()}},{key:"fromObject",value:function(n){return Qt.config.debug&&((0,Je.checkNumber)(n.x),(0,Je.checkNumber)(n.y),(0,Je.checkNumber)(n.z)),this[0]=n.x,this[1]=n.y,this[2]=n.z,this.check()}},{key:"toObject",value:function(n){return n.x=this[0],n.y=this[1],n.z=this[2],n}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(n){this[2]=(0,Je.checkNumber)(n)}},{key:"angle",value:function(n){return Ne.angle(this,n)}},{key:"cross",value:function(n){return Ne.cross(this,this,n),this.check()}},{key:"rotateX",value:function(n){var i=n.radians,s=n.origin,o=s===void 0?$t:s;return Ne.rotateX(this,this,o,i),this.check()}},{key:"rotateY",value:function(n){var i=n.radians,s=n.origin,o=s===void 0?$t:s;return Ne.rotateY(this,this,o,i),this.check()}},{key:"rotateZ",value:function(n){var i=n.radians,s=n.origin,o=s===void 0?$t:s;return Ne.rotateZ(this,this,o,i),this.check()}},{key:"transform",value:function(n){return this.transformAsPoint(n)}},{key:"transformAsPoint",value:function(n){return Ne.transformMat4(this,this,n),this.check()}},{key:"transformAsVector",value:function(n){return(0,La.vec3_transformMat4AsVector)(this,this,n),this.check()}},{key:"transformByMatrix3",value:function(n){return Ne.transformMat3(this,this,n),this.check()}},{key:"transformByMatrix2",value:function(n){return(0,La.vec3_transformMat2)(this,this,n),this.check()}},{key:"transformByQuaternion",value:function(n){return Ne.transformQuat(this,this,n),this.check()}}],[{key:"ZERO",get:function(){return nt||(nt=new t(0,0,0),Object.freeze(nt)),nt}}]),t}(Ru.default);at.default=wu});var Ht=S(ot=>{"use strict";var or=V(),qu=se();Object.defineProperty(ot,"__esModule",{value:!0});ot.default=void 0;var Eu=or($()),Lu=or(J()),Nu=or(oe()),Cu=or(ce()),Ca=or(ue()),Iu=or($r()),Jt=ve(),ge=me(),Ia=Wu(Le()),Wa=ar();function Ba(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(Ba=function(n){return n?t:r})(e)}function Wu(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||qu(e)!=="object"&&typeof e!="function")return{default:e};var t=Ba(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Bu(e){var r=Du();return function(){var a=(0,Ca.default)(e),n;if(r){var i=(0,Ca.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,Cu.default)(this,n)}}function Du(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var st,Fu=function(e){(0,Nu.default)(t,e);var r=Bu(t);function t(){var a,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return(0,Eu.default)(this,t),a=r.call(this,-0,-0,-0,-0),(0,Jt.isArray)(n)&&arguments.length===1?a.copy(n):(Jt.config.debug&&((0,ge.checkNumber)(n),(0,ge.checkNumber)(i),(0,ge.checkNumber)(s),(0,ge.checkNumber)(o)),a[0]=n,a[1]=i,a[2]=s,a[3]=o),a}return(0,Lu.default)(t,[{key:"set",value:function(n,i,s,o){return this[0]=n,this[1]=i,this[2]=s,this[3]=o,this.check()}},{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this[3]=n[3],this.check()}},{key:"fromObject",value:function(n){return Jt.config.debug&&((0,ge.checkNumber)(n.x),(0,ge.checkNumber)(n.y),(0,ge.checkNumber)(n.z),(0,ge.checkNumber)(n.w)),this[0]=n.x,this[1]=n.y,this[2]=n.z,this[3]=n.w,this}},{key:"toObject",value:function(n){return n.x=this[0],n.y=this[1],n.z=this[2],n.w=this[3],n}},{key:"ELEMENTS",get:function(){return 4}},{key:"z",get:function(){return this[2]},set:function(n){this[2]=(0,ge.checkNumber)(n)}},{key:"w",get:function(){return this[3]},set:function(n){this[3]=(0,ge.checkNumber)(n)}},{key:"transform",value:function(n){return Ia.transformMat4(this,this,n),this.check()}},{key:"transformByMatrix3",value:function(n){return(0,Wa.vec4_transformMat3)(this,this,n),this.check()}},{key:"transformByMatrix2",value:function(n){return(0,Wa.vec4_transformMat2)(this,this,n),this.check()}},{key:"transformByQuaternion",value:function(n){return Ia.transformQuat(this,this,n),this.check()}},{key:"applyMatrix4",value:function(n){return n.transform(this,this),this}}],[{key:"ZERO",get:function(){return st||(st=new t(0,0,0,0),Object.freeze(st)),st}}]),t}(Iu.default);ot.default=Fu});var Kt=S(ct=>{"use strict";var cr=V();Object.defineProperty(ct,"__esModule",{value:!0});ct.default=void 0;var zu=cr($()),Yu=cr(J()),Uu=cr(oe()),Gu=cr(ce()),Da=cr(ue()),Vu=cr(qr()),ju=me(),Zu=ve();function Xu(e){var r=Qu();return function(){var a=(0,Da.default)(e),n;if(r){var i=(0,Da.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,Gu.default)(this,n)}}function Qu(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var $u=function(e){(0,Uu.default)(t,e);var r=Xu(t);function t(){return(0,zu.default)(this,t),r.apply(this,arguments)}return(0,Yu.default)(t,[{key:"toString",value:function(){var n="[";if(Zu.config.printRowMajor){n+="row-major:";for(var i=0;i<this.RANK;++i)for(var s=0;s<this.RANK;++s)n+=" ".concat(this[s*this.RANK+i])}else{n+="column-major:";for(var o=0;o<this.ELEMENTS;++o)n+=" ".concat(this[o])}return n+="]",n}},{key:"getElementIndex",value:function(n,i){return i*this.RANK+n}},{key:"getElement",value:function(n,i){return this[i*this.RANK+n]}},{key:"setElement",value:function(n,i,s){return this[i*this.RANK+n]=(0,ju.checkNumber)(s),this}},{key:"getColumn",value:function(n){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Array(this.RANK).fill(-0),s=n*this.RANK,o=0;o<this.RANK;++o)i[o]=this[s+o];return i}},{key:"setColumn",value:function(n,i){for(var s=n*this.RANK,o=0;o<this.RANK;++o)this[s+o]=i[o];return this}}]),t}(Vu.default);ct.default=$u});var en=S(q=>{"use strict";function ut(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ut=function(t){return typeof t}:ut=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ut(e)}Object.defineProperty(q,"__esModule",{value:!0});q.create=Hu;q.fromMat4=Ku;q.clone=el;q.copy=rl;q.fromValues=tl;q.set=nl;q.identity=al;q.transpose=il;q.invert=sl;q.adjoint=ol;q.determinant=cl;q.multiply=za;q.translate=ul;q.rotate=ll;q.scale=fl;q.fromTranslation=hl;q.fromRotation=dl;q.fromScaling=pl;q.fromMat2d=vl;q.fromQuat=ml;q.normalFromMat4=gl;q.projection=yl;q.str=Ml;q.frob=xl;q.add=bl;q.subtract=Ya;q.multiplyScalar=_l;q.multiplyScalarAndAdd=Ol;q.exactEquals=Tl;q.equals=kl;q.sub=q.mul=void 0;var ee=Ju(Xe());function Fa(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(Fa=function(n){return n?t:r})(e)}function Ju(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||ut(e)!=="object"&&typeof e!="function")return{default:e};var t=Fa(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Hu(){var e=new ee.ARRAY_TYPE(9);return ee.ARRAY_TYPE!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function Ku(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[4],e[4]=r[5],e[5]=r[6],e[6]=r[8],e[7]=r[9],e[8]=r[10],e}function el(e){var r=new ee.ARRAY_TYPE(9);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r}function rl(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e}function tl(e,r,t,a,n,i,s,o,c){var u=new ee.ARRAY_TYPE(9);return u[0]=e,u[1]=r,u[2]=t,u[3]=a,u[4]=n,u[5]=i,u[6]=s,u[7]=o,u[8]=c,u}function nl(e,r,t,a,n,i,s,o,c,u){return e[0]=r,e[1]=t,e[2]=a,e[3]=n,e[4]=i,e[5]=s,e[6]=o,e[7]=c,e[8]=u,e}function al(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function il(e,r){if(e===r){var t=r[1],a=r[2],n=r[5];e[1]=r[3],e[2]=r[6],e[3]=t,e[5]=r[7],e[6]=a,e[7]=n}else e[0]=r[0],e[1]=r[3],e[2]=r[6],e[3]=r[1],e[4]=r[4],e[5]=r[7],e[6]=r[2],e[7]=r[5],e[8]=r[8];return e}function sl(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=r[4],o=r[5],c=r[6],u=r[7],l=r[8],f=l*s-o*u,h=-l*i+o*c,d=u*i-s*c,p=t*f+a*h+n*d;return p?(p=1/p,e[0]=f*p,e[1]=(-l*a+n*u)*p,e[2]=(o*a-n*s)*p,e[3]=h*p,e[4]=(l*t-n*c)*p,e[5]=(-o*t+n*i)*p,e[6]=d*p,e[7]=(-u*t+a*c)*p,e[8]=(s*t-a*i)*p,e):null}function ol(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=r[4],o=r[5],c=r[6],u=r[7],l=r[8];return e[0]=s*l-o*u,e[1]=n*u-a*l,e[2]=a*o-n*s,e[3]=o*c-i*l,e[4]=t*l-n*c,e[5]=n*i-t*o,e[6]=i*u-s*c,e[7]=a*c-t*u,e[8]=t*s-a*i,e}function cl(e){var r=e[0],t=e[1],a=e[2],n=e[3],i=e[4],s=e[5],o=e[6],c=e[7],u=e[8];return r*(u*i-s*c)+t*(-u*n+s*o)+a*(c*n-i*o)}function za(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3],o=r[4],c=r[5],u=r[6],l=r[7],f=r[8],h=t[0],d=t[1],p=t[2],m=t[3],v=t[4],g=t[5],b=t[6],y=t[7],M=t[8];return e[0]=h*a+d*s+p*u,e[1]=h*n+d*o+p*l,e[2]=h*i+d*c+p*f,e[3]=m*a+v*s+g*u,e[4]=m*n+v*o+g*l,e[5]=m*i+v*c+g*f,e[6]=b*a+y*s+M*u,e[7]=b*n+y*o+M*l,e[8]=b*i+y*c+M*f,e}function ul(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3],o=r[4],c=r[5],u=r[6],l=r[7],f=r[8],h=t[0],d=t[1];return e[0]=a,e[1]=n,e[2]=i,e[3]=s,e[4]=o,e[5]=c,e[6]=h*a+d*s+u,e[7]=h*n+d*o+l,e[8]=h*i+d*c+f,e}function ll(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3],o=r[4],c=r[5],u=r[6],l=r[7],f=r[8],h=Math.sin(t),d=Math.cos(t);return e[0]=d*a+h*s,e[1]=d*n+h*o,e[2]=d*i+h*c,e[3]=d*s-h*a,e[4]=d*o-h*n,e[5]=d*c-h*i,e[6]=u,e[7]=l,e[8]=f,e}function fl(e,r,t){var a=t[0],n=t[1];return e[0]=a*r[0],e[1]=a*r[1],e[2]=a*r[2],e[3]=n*r[3],e[4]=n*r[4],e[5]=n*r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e}function hl(e,r){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=r[0],e[7]=r[1],e[8]=1,e}function dl(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=-t,e[4]=a,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function pl(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=r[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function vl(e,r){return e[0]=r[0],e[1]=r[1],e[2]=0,e[3]=r[2],e[4]=r[3],e[5]=0,e[6]=r[4],e[7]=r[5],e[8]=1,e}function ml(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=t+t,o=a+a,c=n+n,u=t*s,l=a*s,f=a*o,h=n*s,d=n*o,p=n*c,m=i*s,v=i*o,g=i*c;return e[0]=1-f-p,e[3]=l-g,e[6]=h+v,e[1]=l+g,e[4]=1-u-p,e[7]=d-m,e[2]=h-v,e[5]=d+m,e[8]=1-u-f,e}function gl(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=r[4],o=r[5],c=r[6],u=r[7],l=r[8],f=r[9],h=r[10],d=r[11],p=r[12],m=r[13],v=r[14],g=r[15],b=t*o-a*s,y=t*c-n*s,M=t*u-i*s,T=a*c-n*o,_=a*u-i*o,I=n*u-i*c,L=l*m-f*p,N=l*v-h*p,w=l*g-d*p,W=f*v-h*m,C=f*g-d*m,B=h*g-d*v,P=b*B-y*C+M*W+T*w-_*N+I*L;return P?(P=1/P,e[0]=(o*B-c*C+u*W)*P,e[1]=(c*w-s*B-u*N)*P,e[2]=(s*C-o*w+u*L)*P,e[3]=(n*C-a*B-i*W)*P,e[4]=(t*B-n*w+i*N)*P,e[5]=(a*w-t*C-i*L)*P,e[6]=(m*I-v*_+g*T)*P,e[7]=(v*M-p*I-g*y)*P,e[8]=(p*_-m*M+g*b)*P,e):null}function yl(e,r,t){return e[0]=2/r,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/t,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function Ml(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function xl(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function bl(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e[2]=r[2]+t[2],e[3]=r[3]+t[3],e[4]=r[4]+t[4],e[5]=r[5]+t[5],e[6]=r[6]+t[6],e[7]=r[7]+t[7],e[8]=r[8]+t[8],e}function Ya(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e[2]=r[2]-t[2],e[3]=r[3]-t[3],e[4]=r[4]-t[4],e[5]=r[5]-t[5],e[6]=r[6]-t[6],e[7]=r[7]-t[7],e[8]=r[8]-t[8],e}function _l(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e[3]=r[3]*t,e[4]=r[4]*t,e[5]=r[5]*t,e[6]=r[6]*t,e[7]=r[7]*t,e[8]=r[8]*t,e}function Ol(e,r,t,a){return e[0]=r[0]+t[0]*a,e[1]=r[1]+t[1]*a,e[2]=r[2]+t[2]*a,e[3]=r[3]+t[3]*a,e[4]=r[4]+t[4]*a,e[5]=r[5]+t[5]*a,e[6]=r[6]+t[6]*a,e[7]=r[7]+t[7]*a,e[8]=r[8]+t[8]*a,e}function Tl(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]&&e[4]===r[4]&&e[5]===r[5]&&e[6]===r[6]&&e[7]===r[7]&&e[8]===r[8]}function kl(e,r){var t=e[0],a=e[1],n=e[2],i=e[3],s=e[4],o=e[5],c=e[6],u=e[7],l=e[8],f=r[0],h=r[1],d=r[2],p=r[3],m=r[4],v=r[5],g=r[6],b=r[7],y=r[8];return Math.abs(t-f)<=ee.EPSILON*Math.max(1,Math.abs(t),Math.abs(f))&&Math.abs(a-h)<=ee.EPSILON*Math.max(1,Math.abs(a),Math.abs(h))&&Math.abs(n-d)<=ee.EPSILON*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-p)<=ee.EPSILON*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(s-m)<=ee.EPSILON*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(o-v)<=ee.EPSILON*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(c-g)<=ee.EPSILON*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(u-b)<=ee.EPSILON*Math.max(1,Math.abs(u),Math.abs(b))&&Math.abs(l-y)<=ee.EPSILON*Math.max(1,Math.abs(l),Math.abs(y))}var Rl=za;q.mul=Rl;var Al=Ya;q.sub=Al});var Va=S(ht=>{"use strict";var ur=V(),Pl=se();Object.defineProperty(ht,"__esModule",{value:!0});ht.default=void 0;var Sl=ur($()),wl=ur(J()),ql=ur(oe()),El=ur(ce()),Ua=ur(ue()),Ll=ur(Kt()),Nl=me(),Cl=ar(),ye=rn(en()),Il=rn(Hr()),Wl=rn(Le());function Ga(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(Ga=function(n){return n?t:r})(e)}function rn(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||Pl(e)!=="object"&&typeof e!="function")return{default:e};var t=Ga(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Bl(e){var r=Dl();return function(){var a=(0,Ua.default)(e),n;if(r){var i=(0,Ua.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,El.default)(this,n)}}function Dl(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var tn;(function(e){e[e.COL0ROW0=0]="COL0ROW0",e[e.COL0ROW1=1]="COL0ROW1",e[e.COL0ROW2=2]="COL0ROW2",e[e.COL1ROW0=3]="COL1ROW0",e[e.COL1ROW1=4]="COL1ROW1",e[e.COL1ROW2=5]="COL1ROW2",e[e.COL2ROW0=6]="COL2ROW0",e[e.COL2ROW1=7]="COL2ROW1",e[e.COL2ROW2=8]="COL2ROW2"})(tn||(tn={}));var Fl=Object.freeze([1,0,0,0,1,0,0,0,1]),nn=function(e){(0,ql.default)(t,e);var r=Bl(t);function t(a){for(var n,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return(0,Sl.default)(this,t),n=r.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(a)?n.copy(a):s.length>0?n.copy([a].concat(s)):n.identity(),n}return(0,wl.default)(t,[{key:"ELEMENTS",get:function(){return 9}},{key:"RANK",get:function(){return 3}},{key:"INDICES",get:function(){return tn}},{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this[3]=n[3],this[4]=n[4],this[5]=n[5],this[6]=n[6],this[7]=n[7],this[8]=n[8],this.check()}},{key:"identity",value:function(){return this.copy(Fl)}},{key:"fromObject",value:function(n){return this.check()}},{key:"fromQuaternion",value:function(n){return ye.fromQuat(this,n),this.check()}},{key:"set",value:function(n,i,s,o,c,u,l,f,h){return this[0]=n,this[1]=i,this[2]=s,this[3]=o,this[4]=c,this[5]=u,this[6]=l,this[7]=f,this[8]=h,this.check()}},{key:"setRowMajor",value:function(n,i,s,o,c,u,l,f,h){return this[0]=n,this[1]=o,this[2]=l,this[3]=i,this[4]=c,this[5]=f,this[6]=s,this[7]=u,this[8]=h,this.check()}},{key:"determinant",value:function(){return ye.determinant(this)}},{key:"transpose",value:function(){return ye.transpose(this,this),this.check()}},{key:"invert",value:function(){return ye.invert(this,this),this.check()}},{key:"multiplyLeft",value:function(n){return ye.multiply(this,n,this),this.check()}},{key:"multiplyRight",value:function(n){return ye.multiply(this,this,n),this.check()}},{key:"rotate",value:function(n){return ye.rotate(this,this,n),this.check()}},{key:"scale",value:function(n){return Array.isArray(n)?ye.scale(this,this,n):ye.scale(this,this,[n,n]),this.check()}},{key:"translate",value:function(n){return ye.translate(this,this,n),this.check()}},{key:"transform",value:function(n,i){var s;switch(n.length){case 2:s=Il.transformMat3(i||[-0,-0],n,this);break;case 3:s=Wl.transformMat3(i||[-0,-0,-0],n,this);break;case 4:s=(0,Cl.vec4_transformMat3)(i||[-0,-0,-0,-0],n,this);break;default:throw new Error("Illegal vector")}return(0,Nl.checkVector)(s,n.length),s}},{key:"transformVector",value:function(n,i){return this.transform(n,i)}},{key:"transformVector2",value:function(n,i){return this.transform(n,i)}},{key:"transformVector3",value:function(n,i){return this.transform(n,i)}}],[{key:"IDENTITY",get:function(){return Yl()}},{key:"ZERO",get:function(){return zl()}}]),t}(Ll.default);ht.default=nn;var lt,ft;function zl(){return lt||(lt=new nn([0,0,0,0,0,0,0,0,0]),Object.freeze(lt)),lt}function Yl(){return ft||(ft=new nn,Object.freeze(ft)),ft}});var ei=S(k=>{"use strict";function dt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dt=function(t){return typeof t}:dt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dt(e)}Object.defineProperty(k,"__esModule",{value:!0});k.create=Gl;k.clone=Vl;k.copy=jl;k.fromValues=Zl;k.set=Xl;k.identity=Za;k.transpose=Ql;k.invert=$l;k.adjoint=Jl;k.determinant=Hl;k.multiply=Xa;k.translate=Kl;k.scale=ef;k.rotate=rf;k.rotateX=tf;k.rotateY=nf;k.rotateZ=af;k.fromTranslation=sf;k.fromScaling=of;k.fromRotation=cf;k.fromXRotation=uf;k.fromYRotation=lf;k.fromZRotation=ff;k.fromRotationTranslation=Qa;k.fromQuat2=hf;k.getTranslation=df;k.getScaling=$a;k.getRotation=pf;k.fromRotationTranslationScale=vf;k.fromRotationTranslationScaleOrigin=mf;k.fromQuat=gf;k.frustum=yf;k.perspectiveNO=Ja;k.perspectiveZO=xf;k.perspectiveFromFieldOfView=bf;k.orthoNO=Ha;k.orthoZO=Of;k.lookAt=Tf;k.targetTo=kf;k.str=Rf;k.frob=Af;k.add=Pf;k.subtract=Ka;k.multiplyScalar=Sf;k.multiplyScalarAndAdd=wf;k.exactEquals=qf;k.equals=Ef;k.sub=k.mul=k.ortho=k.perspective=void 0;var D=Ul(Xe());function ja(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(ja=function(n){return n?t:r})(e)}function Ul(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||dt(e)!=="object"&&typeof e!="function")return{default:e};var t=ja(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Gl(){var e=new D.ARRAY_TYPE(16);return D.ARRAY_TYPE!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function Vl(e){var r=new D.ARRAY_TYPE(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}function jl(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}function Zl(e,r,t,a,n,i,s,o,c,u,l,f,h,d,p,m){var v=new D.ARRAY_TYPE(16);return v[0]=e,v[1]=r,v[2]=t,v[3]=a,v[4]=n,v[5]=i,v[6]=s,v[7]=o,v[8]=c,v[9]=u,v[10]=l,v[11]=f,v[12]=h,v[13]=d,v[14]=p,v[15]=m,v}function Xl(e,r,t,a,n,i,s,o,c,u,l,f,h,d,p,m,v){return e[0]=r,e[1]=t,e[2]=a,e[3]=n,e[4]=i,e[5]=s,e[6]=o,e[7]=c,e[8]=u,e[9]=l,e[10]=f,e[11]=h,e[12]=d,e[13]=p,e[14]=m,e[15]=v,e}function Za(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Ql(e,r){if(e===r){var t=r[1],a=r[2],n=r[3],i=r[6],s=r[7],o=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=a,e[9]=i,e[11]=r[14],e[12]=n,e[13]=s,e[14]=o}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}function $l(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=r[4],o=r[5],c=r[6],u=r[7],l=r[8],f=r[9],h=r[10],d=r[11],p=r[12],m=r[13],v=r[14],g=r[15],b=t*o-a*s,y=t*c-n*s,M=t*u-i*s,T=a*c-n*o,_=a*u-i*o,I=n*u-i*c,L=l*m-f*p,N=l*v-h*p,w=l*g-d*p,W=f*v-h*m,C=f*g-d*m,B=h*g-d*v,P=b*B-y*C+M*W+T*w-_*N+I*L;return P?(P=1/P,e[0]=(o*B-c*C+u*W)*P,e[1]=(n*C-a*B-i*W)*P,e[2]=(m*I-v*_+g*T)*P,e[3]=(h*_-f*I-d*T)*P,e[4]=(c*w-s*B-u*N)*P,e[5]=(t*B-n*w+i*N)*P,e[6]=(v*M-p*I-g*y)*P,e[7]=(l*I-h*M+d*y)*P,e[8]=(s*C-o*w+u*L)*P,e[9]=(a*w-t*C-i*L)*P,e[10]=(p*_-m*M+g*b)*P,e[11]=(f*M-l*_-d*b)*P,e[12]=(o*N-s*W-c*L)*P,e[13]=(t*W-a*N+n*L)*P,e[14]=(m*y-p*T-v*b)*P,e[15]=(l*T-f*y+h*b)*P,e):null}function Jl(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=r[4],o=r[5],c=r[6],u=r[7],l=r[8],f=r[9],h=r[10],d=r[11],p=r[12],m=r[13],v=r[14],g=r[15];return e[0]=o*(h*g-d*v)-f*(c*g-u*v)+m*(c*d-u*h),e[1]=-(a*(h*g-d*v)-f*(n*g-i*v)+m*(n*d-i*h)),e[2]=a*(c*g-u*v)-o*(n*g-i*v)+m*(n*u-i*c),e[3]=-(a*(c*d-u*h)-o*(n*d-i*h)+f*(n*u-i*c)),e[4]=-(s*(h*g-d*v)-l*(c*g-u*v)+p*(c*d-u*h)),e[5]=t*(h*g-d*v)-l*(n*g-i*v)+p*(n*d-i*h),e[6]=-(t*(c*g-u*v)-s*(n*g-i*v)+p*(n*u-i*c)),e[7]=t*(c*d-u*h)-s*(n*d-i*h)+l*(n*u-i*c),e[8]=s*(f*g-d*m)-l*(o*g-u*m)+p*(o*d-u*f),e[9]=-(t*(f*g-d*m)-l*(a*g-i*m)+p*(a*d-i*f)),e[10]=t*(o*g-u*m)-s*(a*g-i*m)+p*(a*u-i*o),e[11]=-(t*(o*d-u*f)-s*(a*d-i*f)+l*(a*u-i*o)),e[12]=-(s*(f*v-h*m)-l*(o*v-c*m)+p*(o*h-c*f)),e[13]=t*(f*v-h*m)-l*(a*v-n*m)+p*(a*h-n*f),e[14]=-(t*(o*v-c*m)-s*(a*v-n*m)+p*(a*c-n*o)),e[15]=t*(o*h-c*f)-s*(a*h-n*f)+l*(a*c-n*o),e}function Hl(e){var r=e[0],t=e[1],a=e[2],n=e[3],i=e[4],s=e[5],o=e[6],c=e[7],u=e[8],l=e[9],f=e[10],h=e[11],d=e[12],p=e[13],m=e[14],v=e[15],g=r*s-t*i,b=r*o-a*i,y=r*c-n*i,M=t*o-a*s,T=t*c-n*s,_=a*c-n*o,I=u*p-l*d,L=u*m-f*d,N=u*v-h*d,w=l*m-f*p,W=l*v-h*p,C=f*v-h*m;return g*C-b*W+y*w+M*N-T*L+_*I}function Xa(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3],o=r[4],c=r[5],u=r[6],l=r[7],f=r[8],h=r[9],d=r[10],p=r[11],m=r[12],v=r[13],g=r[14],b=r[15],y=t[0],M=t[1],T=t[2],_=t[3];return e[0]=y*a+M*o+T*f+_*m,e[1]=y*n+M*c+T*h+_*v,e[2]=y*i+M*u+T*d+_*g,e[3]=y*s+M*l+T*p+_*b,y=t[4],M=t[5],T=t[6],_=t[7],e[4]=y*a+M*o+T*f+_*m,e[5]=y*n+M*c+T*h+_*v,e[6]=y*i+M*u+T*d+_*g,e[7]=y*s+M*l+T*p+_*b,y=t[8],M=t[9],T=t[10],_=t[11],e[8]=y*a+M*o+T*f+_*m,e[9]=y*n+M*c+T*h+_*v,e[10]=y*i+M*u+T*d+_*g,e[11]=y*s+M*l+T*p+_*b,y=t[12],M=t[13],T=t[14],_=t[15],e[12]=y*a+M*o+T*f+_*m,e[13]=y*n+M*c+T*h+_*v,e[14]=y*i+M*u+T*d+_*g,e[15]=y*s+M*l+T*p+_*b,e}function Kl(e,r,t){var a=t[0],n=t[1],i=t[2],s,o,c,u,l,f,h,d,p,m,v,g;return r===e?(e[12]=r[0]*a+r[4]*n+r[8]*i+r[12],e[13]=r[1]*a+r[5]*n+r[9]*i+r[13],e[14]=r[2]*a+r[6]*n+r[10]*i+r[14],e[15]=r[3]*a+r[7]*n+r[11]*i+r[15]):(s=r[0],o=r[1],c=r[2],u=r[3],l=r[4],f=r[5],h=r[6],d=r[7],p=r[8],m=r[9],v=r[10],g=r[11],e[0]=s,e[1]=o,e[2]=c,e[3]=u,e[4]=l,e[5]=f,e[6]=h,e[7]=d,e[8]=p,e[9]=m,e[10]=v,e[11]=g,e[12]=s*a+l*n+p*i+r[12],e[13]=o*a+f*n+m*i+r[13],e[14]=c*a+h*n+v*i+r[14],e[15]=u*a+d*n+g*i+r[15]),e}function ef(e,r,t){var a=t[0],n=t[1],i=t[2];return e[0]=r[0]*a,e[1]=r[1]*a,e[2]=r[2]*a,e[3]=r[3]*a,e[4]=r[4]*n,e[5]=r[5]*n,e[6]=r[6]*n,e[7]=r[7]*n,e[8]=r[8]*i,e[9]=r[9]*i,e[10]=r[10]*i,e[11]=r[11]*i,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}function rf(e,r,t,a){var n=a[0],i=a[1],s=a[2],o=Math.hypot(n,i,s),c,u,l,f,h,d,p,m,v,g,b,y,M,T,_,I,L,N,w,W,C,B,P,j;return o<D.EPSILON?null:(o=1/o,n*=o,i*=o,s*=o,c=Math.sin(t),u=Math.cos(t),l=1-u,f=r[0],h=r[1],d=r[2],p=r[3],m=r[4],v=r[5],g=r[6],b=r[7],y=r[8],M=r[9],T=r[10],_=r[11],I=n*n*l+u,L=i*n*l+s*c,N=s*n*l-i*c,w=n*i*l-s*c,W=i*i*l+u,C=s*i*l+n*c,B=n*s*l+i*c,P=i*s*l-n*c,j=s*s*l+u,e[0]=f*I+m*L+y*N,e[1]=h*I+v*L+M*N,e[2]=d*I+g*L+T*N,e[3]=p*I+b*L+_*N,e[4]=f*w+m*W+y*C,e[5]=h*w+v*W+M*C,e[6]=d*w+g*W+T*C,e[7]=p*w+b*W+_*C,e[8]=f*B+m*P+y*j,e[9]=h*B+v*P+M*j,e[10]=d*B+g*P+T*j,e[11]=p*B+b*P+_*j,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}function tf(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[4],s=r[5],o=r[6],c=r[7],u=r[8],l=r[9],f=r[10],h=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=i*n+u*a,e[5]=s*n+l*a,e[6]=o*n+f*a,e[7]=c*n+h*a,e[8]=u*n-i*a,e[9]=l*n-s*a,e[10]=f*n-o*a,e[11]=h*n-c*a,e}function nf(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],s=r[1],o=r[2],c=r[3],u=r[8],l=r[9],f=r[10],h=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n-u*a,e[1]=s*n-l*a,e[2]=o*n-f*a,e[3]=c*n-h*a,e[8]=i*a+u*n,e[9]=s*a+l*n,e[10]=o*a+f*n,e[11]=c*a+h*n,e}function af(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],s=r[1],o=r[2],c=r[3],u=r[4],l=r[5],f=r[6],h=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n+u*a,e[1]=s*n+l*a,e[2]=o*n+f*a,e[3]=c*n+h*a,e[4]=u*n-i*a,e[5]=l*n-s*a,e[6]=f*n-o*a,e[7]=h*n-c*a,e}function sf(e,r){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function of(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function cf(e,r,t){var a=t[0],n=t[1],i=t[2],s=Math.hypot(a,n,i),o,c,u;return s<D.EPSILON?null:(s=1/s,a*=s,n*=s,i*=s,o=Math.sin(r),c=Math.cos(r),u=1-c,e[0]=a*a*u+c,e[1]=n*a*u+i*o,e[2]=i*a*u-n*o,e[3]=0,e[4]=a*n*u-i*o,e[5]=n*n*u+c,e[6]=i*n*u+a*o,e[7]=0,e[8]=a*i*u+n*o,e[9]=n*i*u-a*o,e[10]=i*i*u+c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function uf(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function lf(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ff(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Qa(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3],o=a+a,c=n+n,u=i+i,l=a*o,f=a*c,h=a*u,d=n*c,p=n*u,m=i*u,v=s*o,g=s*c,b=s*u;return e[0]=1-(d+m),e[1]=f+b,e[2]=h-g,e[3]=0,e[4]=f-b,e[5]=1-(l+m),e[6]=p+v,e[7]=0,e[8]=h+g,e[9]=p-v,e[10]=1-(l+d),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function hf(e,r){var t=new D.ARRAY_TYPE(3),a=-r[0],n=-r[1],i=-r[2],s=r[3],o=r[4],c=r[5],u=r[6],l=r[7],f=a*a+n*n+i*i+s*s;return f>0?(t[0]=(o*s+l*a+c*i-u*n)*2/f,t[1]=(c*s+l*n+u*a-o*i)*2/f,t[2]=(u*s+l*i+o*n-c*a)*2/f):(t[0]=(o*s+l*a+c*i-u*n)*2,t[1]=(c*s+l*n+u*a-o*i)*2,t[2]=(u*s+l*i+o*n-c*a)*2),Qa(e,r,t),e}function df(e,r){return e[0]=r[12],e[1]=r[13],e[2]=r[14],e}function $a(e,r){var t=r[0],a=r[1],n=r[2],i=r[4],s=r[5],o=r[6],c=r[8],u=r[9],l=r[10];return e[0]=Math.hypot(t,a,n),e[1]=Math.hypot(i,s,o),e[2]=Math.hypot(c,u,l),e}function pf(e,r){var t=new D.ARRAY_TYPE(3);$a(t,r);var a=1/t[0],n=1/t[1],i=1/t[2],s=r[0]*a,o=r[1]*n,c=r[2]*i,u=r[4]*a,l=r[5]*n,f=r[6]*i,h=r[8]*a,d=r[9]*n,p=r[10]*i,m=s+l+p,v=0;return m>0?(v=Math.sqrt(m+1)*2,e[3]=.25*v,e[0]=(f-d)/v,e[1]=(h-c)/v,e[2]=(o-u)/v):s>l&&s>p?(v=Math.sqrt(1+s-l-p)*2,e[3]=(f-d)/v,e[0]=.25*v,e[1]=(o+u)/v,e[2]=(h+c)/v):l>p?(v=Math.sqrt(1+l-s-p)*2,e[3]=(h-c)/v,e[0]=(o+u)/v,e[1]=.25*v,e[2]=(f+d)/v):(v=Math.sqrt(1+p-s-l)*2,e[3]=(o-u)/v,e[0]=(h+c)/v,e[1]=(f+d)/v,e[2]=.25*v),e}function vf(e,r,t,a){var n=r[0],i=r[1],s=r[2],o=r[3],c=n+n,u=i+i,l=s+s,f=n*c,h=n*u,d=n*l,p=i*u,m=i*l,v=s*l,g=o*c,b=o*u,y=o*l,M=a[0],T=a[1],_=a[2];return e[0]=(1-(p+v))*M,e[1]=(h+y)*M,e[2]=(d-b)*M,e[3]=0,e[4]=(h-y)*T,e[5]=(1-(f+v))*T,e[6]=(m+g)*T,e[7]=0,e[8]=(d+b)*_,e[9]=(m-g)*_,e[10]=(1-(f+p))*_,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function mf(e,r,t,a,n){var i=r[0],s=r[1],o=r[2],c=r[3],u=i+i,l=s+s,f=o+o,h=i*u,d=i*l,p=i*f,m=s*l,v=s*f,g=o*f,b=c*u,y=c*l,M=c*f,T=a[0],_=a[1],I=a[2],L=n[0],N=n[1],w=n[2],W=(1-(m+g))*T,C=(d+M)*T,B=(p-y)*T,P=(d-M)*_,j=(1-(h+g))*_,he=(v+b)*_,de=(p+y)*I,Ye=(v-b)*I,Ue=(1-(h+m))*I;return e[0]=W,e[1]=C,e[2]=B,e[3]=0,e[4]=P,e[5]=j,e[6]=he,e[7]=0,e[8]=de,e[9]=Ye,e[10]=Ue,e[11]=0,e[12]=t[0]+L-(W*L+P*N+de*w),e[13]=t[1]+N-(C*L+j*N+Ye*w),e[14]=t[2]+w-(B*L+he*N+Ue*w),e[15]=1,e}function gf(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=t+t,o=a+a,c=n+n,u=t*s,l=a*s,f=a*o,h=n*s,d=n*o,p=n*c,m=i*s,v=i*o,g=i*c;return e[0]=1-f-p,e[1]=l+g,e[2]=h-v,e[3]=0,e[4]=l-g,e[5]=1-u-p,e[6]=d+m,e[7]=0,e[8]=h+v,e[9]=d-m,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function yf(e,r,t,a,n,i,s){var o=1/(t-r),c=1/(n-a),u=1/(i-s);return e[0]=i*2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*c,e[6]=0,e[7]=0,e[8]=(t+r)*o,e[9]=(n+a)*c,e[10]=(s+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=s*i*2*u,e[15]=0,e}function Ja(e,r,t,a,n){var i=1/Math.tan(r/2),s;return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,n!=null&&n!==1/0?(s=1/(a-n),e[10]=(n+a)*s,e[14]=2*n*a*s):(e[10]=-1,e[14]=-2*a),e}var Mf=Ja;k.perspective=Mf;function xf(e,r,t,a,n){var i=1/Math.tan(r/2),s;return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,n!=null&&n!==1/0?(s=1/(a-n),e[10]=n*s,e[14]=n*a*s):(e[10]=-1,e[14]=-a),e}function bf(e,r,t,a){var n=Math.tan(r.upDegrees*Math.PI/180),i=Math.tan(r.downDegrees*Math.PI/180),s=Math.tan(r.leftDegrees*Math.PI/180),o=Math.tan(r.rightDegrees*Math.PI/180),c=2/(s+o),u=2/(n+i);return e[0]=c,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((s-o)*c*.5),e[9]=(n-i)*u*.5,e[10]=a/(t-a),e[11]=-1,e[12]=0,e[13]=0,e[14]=a*t/(t-a),e[15]=0,e}function Ha(e,r,t,a,n,i,s){var o=1/(r-t),c=1/(a-n),u=1/(i-s);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*o,e[13]=(n+a)*c,e[14]=(s+i)*u,e[15]=1,e}var _f=Ha;k.ortho=_f;function Of(e,r,t,a,n,i,s){var o=1/(r-t),c=1/(a-n),u=1/(i-s);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=u,e[11]=0,e[12]=(r+t)*o,e[13]=(n+a)*c,e[14]=i*u,e[15]=1,e}function Tf(e,r,t,a){var n,i,s,o,c,u,l,f,h,d,p=r[0],m=r[1],v=r[2],g=a[0],b=a[1],y=a[2],M=t[0],T=t[1],_=t[2];return Math.abs(p-M)<D.EPSILON&&Math.abs(m-T)<D.EPSILON&&Math.abs(v-_)<D.EPSILON?Za(e):(l=p-M,f=m-T,h=v-_,d=1/Math.hypot(l,f,h),l*=d,f*=d,h*=d,n=b*h-y*f,i=y*l-g*h,s=g*f-b*l,d=Math.hypot(n,i,s),d?(d=1/d,n*=d,i*=d,s*=d):(n=0,i=0,s=0),o=f*s-h*i,c=h*n-l*s,u=l*i-f*n,d=Math.hypot(o,c,u),d?(d=1/d,o*=d,c*=d,u*=d):(o=0,c=0,u=0),e[0]=n,e[1]=o,e[2]=l,e[3]=0,e[4]=i,e[5]=c,e[6]=f,e[7]=0,e[8]=s,e[9]=u,e[10]=h,e[11]=0,e[12]=-(n*p+i*m+s*v),e[13]=-(o*p+c*m+u*v),e[14]=-(l*p+f*m+h*v),e[15]=1,e)}function kf(e,r,t,a){var n=r[0],i=r[1],s=r[2],o=a[0],c=a[1],u=a[2],l=n-t[0],f=i-t[1],h=s-t[2],d=l*l+f*f+h*h;d>0&&(d=1/Math.sqrt(d),l*=d,f*=d,h*=d);var p=c*h-u*f,m=u*l-o*h,v=o*f-c*l;return d=p*p+m*m+v*v,d>0&&(d=1/Math.sqrt(d),p*=d,m*=d,v*=d),e[0]=p,e[1]=m,e[2]=v,e[3]=0,e[4]=f*v-h*m,e[5]=h*p-l*v,e[6]=l*m-f*p,e[7]=0,e[8]=l,e[9]=f,e[10]=h,e[11]=0,e[12]=n,e[13]=i,e[14]=s,e[15]=1,e}function Rf(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function Af(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function Pf(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e[2]=r[2]+t[2],e[3]=r[3]+t[3],e[4]=r[4]+t[4],e[5]=r[5]+t[5],e[6]=r[6]+t[6],e[7]=r[7]+t[7],e[8]=r[8]+t[8],e[9]=r[9]+t[9],e[10]=r[10]+t[10],e[11]=r[11]+t[11],e[12]=r[12]+t[12],e[13]=r[13]+t[13],e[14]=r[14]+t[14],e[15]=r[15]+t[15],e}function Ka(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e[2]=r[2]-t[2],e[3]=r[3]-t[3],e[4]=r[4]-t[4],e[5]=r[5]-t[5],e[6]=r[6]-t[6],e[7]=r[7]-t[7],e[8]=r[8]-t[8],e[9]=r[9]-t[9],e[10]=r[10]-t[10],e[11]=r[11]-t[11],e[12]=r[12]-t[12],e[13]=r[13]-t[13],e[14]=r[14]-t[14],e[15]=r[15]-t[15],e}function Sf(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e[3]=r[3]*t,e[4]=r[4]*t,e[5]=r[5]*t,e[6]=r[6]*t,e[7]=r[7]*t,e[8]=r[8]*t,e[9]=r[9]*t,e[10]=r[10]*t,e[11]=r[11]*t,e[12]=r[12]*t,e[13]=r[13]*t,e[14]=r[14]*t,e[15]=r[15]*t,e}function wf(e,r,t,a){return e[0]=r[0]+t[0]*a,e[1]=r[1]+t[1]*a,e[2]=r[2]+t[2]*a,e[3]=r[3]+t[3]*a,e[4]=r[4]+t[4]*a,e[5]=r[5]+t[5]*a,e[6]=r[6]+t[6]*a,e[7]=r[7]+t[7]*a,e[8]=r[8]+t[8]*a,e[9]=r[9]+t[9]*a,e[10]=r[10]+t[10]*a,e[11]=r[11]+t[11]*a,e[12]=r[12]+t[12]*a,e[13]=r[13]+t[13]*a,e[14]=r[14]+t[14]*a,e[15]=r[15]+t[15]*a,e}function qf(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]&&e[4]===r[4]&&e[5]===r[5]&&e[6]===r[6]&&e[7]===r[7]&&e[8]===r[8]&&e[9]===r[9]&&e[10]===r[10]&&e[11]===r[11]&&e[12]===r[12]&&e[13]===r[13]&&e[14]===r[14]&&e[15]===r[15]}function Ef(e,r){var t=e[0],a=e[1],n=e[2],i=e[3],s=e[4],o=e[5],c=e[6],u=e[7],l=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],v=e[14],g=e[15],b=r[0],y=r[1],M=r[2],T=r[3],_=r[4],I=r[5],L=r[6],N=r[7],w=r[8],W=r[9],C=r[10],B=r[11],P=r[12],j=r[13],he=r[14],de=r[15];return Math.abs(t-b)<=D.EPSILON*Math.max(1,Math.abs(t),Math.abs(b))&&Math.abs(a-y)<=D.EPSILON*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(n-M)<=D.EPSILON*Math.max(1,Math.abs(n),Math.abs(M))&&Math.abs(i-T)<=D.EPSILON*Math.max(1,Math.abs(i),Math.abs(T))&&Math.abs(s-_)<=D.EPSILON*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(o-I)<=D.EPSILON*Math.max(1,Math.abs(o),Math.abs(I))&&Math.abs(c-L)<=D.EPSILON*Math.max(1,Math.abs(c),Math.abs(L))&&Math.abs(u-N)<=D.EPSILON*Math.max(1,Math.abs(u),Math.abs(N))&&Math.abs(l-w)<=D.EPSILON*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(f-W)<=D.EPSILON*Math.max(1,Math.abs(f),Math.abs(W))&&Math.abs(h-C)<=D.EPSILON*Math.max(1,Math.abs(h),Math.abs(C))&&Math.abs(d-B)<=D.EPSILON*Math.max(1,Math.abs(d),Math.abs(B))&&Math.abs(p-P)<=D.EPSILON*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(m-j)<=D.EPSILON*Math.max(1,Math.abs(m),Math.abs(j))&&Math.abs(v-he)<=D.EPSILON*Math.max(1,Math.abs(v),Math.abs(he))&&Math.abs(g-de)<=D.EPSILON*Math.max(1,Math.abs(g),Math.abs(de))}var Lf=Xa;k.mul=Lf;var Nf=Ka;k.sub=Nf});var vt=S(A=>{"use strict";function pt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pt=function(t){return typeof t}:pt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pt(e)}Object.defineProperty(A,"__esModule",{value:!0});A.create=ti;A.clone=If;A.fromValues=Wf;A.copy=Bf;A.set=Df;A.add=Ff;A.subtract=ni;A.multiply=ai;A.divide=ii;A.ceil=zf;A.floor=Yf;A.min=Uf;A.max=Gf;A.round=Vf;A.scale=jf;A.scaleAndAdd=Zf;A.distance=si;A.squaredDistance=oi;A.length=ci;A.squaredLength=ui;A.negate=Xf;A.inverse=Qf;A.normalize=$f;A.dot=Jf;A.cross=Hf;A.lerp=Kf;A.random=eh;A.transformMat4=rh;A.transformQuat=th;A.zero=nh;A.str=ah;A.exactEquals=ih;A.equals=sh;A.forEach=A.sqrLen=A.len=A.sqrDist=A.dist=A.div=A.mul=A.sub=void 0;var ae=Cf(Xe());function ri(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(ri=function(n){return n?t:r})(e)}function Cf(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||pt(e)!=="object"&&typeof e!="function")return{default:e};var t=ri(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function ti(){var e=new ae.ARRAY_TYPE(4);return ae.ARRAY_TYPE!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function If(e){var r=new ae.ARRAY_TYPE(4);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}function Wf(e,r,t,a){var n=new ae.ARRAY_TYPE(4);return n[0]=e,n[1]=r,n[2]=t,n[3]=a,n}function Bf(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e}function Df(e,r,t,a,n){return e[0]=r,e[1]=t,e[2]=a,e[3]=n,e}function Ff(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e[2]=r[2]+t[2],e[3]=r[3]+t[3],e}function ni(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e[2]=r[2]-t[2],e[3]=r[3]-t[3],e}function ai(e,r,t){return e[0]=r[0]*t[0],e[1]=r[1]*t[1],e[2]=r[2]*t[2],e[3]=r[3]*t[3],e}function ii(e,r,t){return e[0]=r[0]/t[0],e[1]=r[1]/t[1],e[2]=r[2]/t[2],e[3]=r[3]/t[3],e}function zf(e,r){return e[0]=Math.ceil(r[0]),e[1]=Math.ceil(r[1]),e[2]=Math.ceil(r[2]),e[3]=Math.ceil(r[3]),e}function Yf(e,r){return e[0]=Math.floor(r[0]),e[1]=Math.floor(r[1]),e[2]=Math.floor(r[2]),e[3]=Math.floor(r[3]),e}function Uf(e,r,t){return e[0]=Math.min(r[0],t[0]),e[1]=Math.min(r[1],t[1]),e[2]=Math.min(r[2],t[2]),e[3]=Math.min(r[3],t[3]),e}function Gf(e,r,t){return e[0]=Math.max(r[0],t[0]),e[1]=Math.max(r[1],t[1]),e[2]=Math.max(r[2],t[2]),e[3]=Math.max(r[3],t[3]),e}function Vf(e,r){return e[0]=Math.round(r[0]),e[1]=Math.round(r[1]),e[2]=Math.round(r[2]),e[3]=Math.round(r[3]),e}function jf(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e[3]=r[3]*t,e}function Zf(e,r,t,a){return e[0]=r[0]+t[0]*a,e[1]=r[1]+t[1]*a,e[2]=r[2]+t[2]*a,e[3]=r[3]+t[3]*a,e}function si(e,r){var t=r[0]-e[0],a=r[1]-e[1],n=r[2]-e[2],i=r[3]-e[3];return Math.hypot(t,a,n,i)}function oi(e,r){var t=r[0]-e[0],a=r[1]-e[1],n=r[2]-e[2],i=r[3]-e[3];return t*t+a*a+n*n+i*i}function ci(e){var r=e[0],t=e[1],a=e[2],n=e[3];return Math.hypot(r,t,a,n)}function ui(e){var r=e[0],t=e[1],a=e[2],n=e[3];return r*r+t*t+a*a+n*n}function Xf(e,r){return e[0]=-r[0],e[1]=-r[1],e[2]=-r[2],e[3]=-r[3],e}function Qf(e,r){return e[0]=1/r[0],e[1]=1/r[1],e[2]=1/r[2],e[3]=1/r[3],e}function $f(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=t*t+a*a+n*n+i*i;return s>0&&(s=1/Math.sqrt(s)),e[0]=t*s,e[1]=a*s,e[2]=n*s,e[3]=i*s,e}function Jf(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3]}function Hf(e,r,t,a){var n=t[0]*a[1]-t[1]*a[0],i=t[0]*a[2]-t[2]*a[0],s=t[0]*a[3]-t[3]*a[0],o=t[1]*a[2]-t[2]*a[1],c=t[1]*a[3]-t[3]*a[1],u=t[2]*a[3]-t[3]*a[2],l=r[0],f=r[1],h=r[2],d=r[3];return e[0]=f*u-h*c+d*o,e[1]=-(l*u)+h*s-d*i,e[2]=l*c-f*s+d*n,e[3]=-(l*o)+f*i-h*n,e}function Kf(e,r,t,a){var n=r[0],i=r[1],s=r[2],o=r[3];return e[0]=n+a*(t[0]-n),e[1]=i+a*(t[1]-i),e[2]=s+a*(t[2]-s),e[3]=o+a*(t[3]-o),e}function eh(e,r){r=r||1;var t,a,n,i,s,o;do t=ae.RANDOM()*2-1,a=ae.RANDOM()*2-1,s=t*t+a*a;while(s>=1);do n=ae.RANDOM()*2-1,i=ae.RANDOM()*2-1,o=n*n+i*i;while(o>=1);var c=Math.sqrt((1-s)/o);return e[0]=r*t,e[1]=r*a,e[2]=r*n*c,e[3]=r*i*c,e}function rh(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3];return e[0]=t[0]*a+t[4]*n+t[8]*i+t[12]*s,e[1]=t[1]*a+t[5]*n+t[9]*i+t[13]*s,e[2]=t[2]*a+t[6]*n+t[10]*i+t[14]*s,e[3]=t[3]*a+t[7]*n+t[11]*i+t[15]*s,e}function th(e,r,t){var a=r[0],n=r[1],i=r[2],s=t[0],o=t[1],c=t[2],u=t[3],l=u*a+o*i-c*n,f=u*n+c*a-s*i,h=u*i+s*n-o*a,d=-s*a-o*n-c*i;return e[0]=l*u+d*-s+f*-c-h*-o,e[1]=f*u+d*-o+h*-s-l*-c,e[2]=h*u+d*-c+l*-o-f*-s,e[3]=r[3],e}function nh(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function ah(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function ih(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]}function sh(e,r){var t=e[0],a=e[1],n=e[2],i=e[3],s=r[0],o=r[1],c=r[2],u=r[3];return Math.abs(t-s)<=ae.EPSILON*Math.max(1,Math.abs(t),Math.abs(s))&&Math.abs(a-o)<=ae.EPSILON*Math.max(1,Math.abs(a),Math.abs(o))&&Math.abs(n-c)<=ae.EPSILON*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(i-u)<=ae.EPSILON*Math.max(1,Math.abs(i),Math.abs(u))}var oh=ni;A.sub=oh;var ch=ai;A.mul=ch;var uh=ii;A.div=uh;var lh=si;A.dist=lh;var fh=oi;A.sqrDist=fh;var hh=ci;A.len=hh;var dh=ui;A.sqrLen=dh;var ph=function(){var e=ti();return function(r,t,a,n,i,s){var o,c;for(t||(t=4),a||(a=0),n?c=Math.min(n*t+a,r.length):c=r.length,o=a;o<c;o+=t)e[0]=r[o],e[1]=r[o+1],e[2]=r[o+2],e[3]=r[o+3],i(e,e,s),r[o]=e[0],r[o+1]=e[1],r[o+2]=e[2],r[o+3]=e[3];return r}}();A.forEach=ph});var ln=S(Mt=>{"use strict";var lr=V(),vh=se();Object.defineProperty(Mt,"__esModule",{value:!0});Mt.default=void 0;var mh=lr($()),gh=lr(J()),yh=lr(oe()),Mh=lr(ce()),li=lr(ue()),xh=lr(Kt()),an=me(),fi=ar(),Z=mt(ei()),bh=mt(Hr()),_h=mt(Le()),Oh=mt(vt());function hi(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(hi=function(n){return n?t:r})(e)}function mt(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||vh(e)!=="object"&&typeof e!="function")return{default:e};var t=hi(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function Th(e){var r=kh();return function(){var a=(0,li.default)(e),n;if(r){var i=(0,li.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,Mh.default)(this,n)}}function kh(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var sn;(function(e){e[e.COL0ROW0=0]="COL0ROW0",e[e.COL0ROW1=1]="COL0ROW1",e[e.COL0ROW2=2]="COL0ROW2",e[e.COL0ROW3=3]="COL0ROW3",e[e.COL1ROW0=4]="COL1ROW0",e[e.COL1ROW1=5]="COL1ROW1",e[e.COL1ROW2=6]="COL1ROW2",e[e.COL1ROW3=7]="COL1ROW3",e[e.COL2ROW0=8]="COL2ROW0",e[e.COL2ROW1=9]="COL2ROW1",e[e.COL2ROW2=10]="COL2ROW2",e[e.COL2ROW3=11]="COL2ROW3",e[e.COL3ROW0=12]="COL3ROW0",e[e.COL3ROW1=13]="COL3ROW1",e[e.COL3ROW2=14]="COL3ROW2",e[e.COL3ROW3=15]="COL3ROW3"})(sn||(sn={}));var Rh=45*Math.PI/180,Ah=1,on=.1,cn=500,Ph=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),un=function(e){(0,yh.default)(t,e);var r=Th(t);function t(a){var n;return(0,mh.default)(this,t),n=r.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(a)?n.copy(a):n.identity(),n}return(0,gh.default)(t,[{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}},{key:"INDICES",get:function(){return sn}},{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this[3]=n[3],this[4]=n[4],this[5]=n[5],this[6]=n[6],this[7]=n[7],this[8]=n[8],this[9]=n[9],this[10]=n[10],this[11]=n[11],this[12]=n[12],this[13]=n[13],this[14]=n[14],this[15]=n[15],this.check()}},{key:"set",value:function(n,i,s,o,c,u,l,f,h,d,p,m,v,g,b,y){return this[0]=n,this[1]=i,this[2]=s,this[3]=o,this[4]=c,this[5]=u,this[6]=l,this[7]=f,this[8]=h,this[9]=d,this[10]=p,this[11]=m,this[12]=v,this[13]=g,this[14]=b,this[15]=y,this.check()}},{key:"setRowMajor",value:function(n,i,s,o,c,u,l,f,h,d,p,m,v,g,b,y){return this[0]=n,this[1]=c,this[2]=h,this[3]=v,this[4]=i,this[5]=u,this[6]=d,this[7]=g,this[8]=s,this[9]=l,this[10]=p,this[11]=b,this[12]=o,this[13]=f,this[14]=m,this[15]=y,this.check()}},{key:"toRowMajor",value:function(n){return n[0]=this[0],n[1]=this[4],n[2]=this[8],n[3]=this[12],n[4]=this[1],n[5]=this[5],n[6]=this[9],n[7]=this[13],n[8]=this[2],n[9]=this[6],n[10]=this[10],n[11]=this[14],n[12]=this[3],n[13]=this[7],n[14]=this[11],n[15]=this[15],n}},{key:"identity",value:function(){return this.copy(Ph)}},{key:"fromObject",value:function(n){return this.check()}},{key:"fromQuaternion",value:function(n){return Z.fromQuat(this,n),this.check()}},{key:"frustum",value:function(n){var i=n.left,s=n.right,o=n.bottom,c=n.top,u=n.near,l=u===void 0?on:u,f=n.far,h=f===void 0?cn:f;return h===1/0?qh(this,i,s,o,c,l):Z.frustum(this,i,s,o,c,l,h),this.check()}},{key:"lookAt",value:function(n){var i=n.eye,s=n.center,o=s===void 0?[0,0,0]:s,c=n.up,u=c===void 0?[0,1,0]:c;return Z.lookAt(this,i,o,u),this.check()}},{key:"ortho",value:function(n){var i=n.left,s=n.right,o=n.bottom,c=n.top,u=n.near,l=u===void 0?on:u,f=n.far,h=f===void 0?cn:f;return Z.ortho(this,i,s,o,c,l,h),this.check()}},{key:"orthographic",value:function(n){var i=n.fovy,s=i===void 0?Rh:i,o=n.aspect,c=o===void 0?Ah:o,u=n.focalDistance,l=u===void 0?1:u,f=n.near,h=f===void 0?on:f,d=n.far,p=d===void 0?cn:d;di(s);var m=s/2,v=l*Math.tan(m),g=v*c;return this.ortho({left:-g,right:g,bottom:-v,top:v,near:h,far:p})}},{key:"perspective",value:function(n){var i=n.fovy,s=i===void 0?45*Math.PI/180:i,o=n.aspect,c=o===void 0?1:o,u=n.near,l=u===void 0?.1:u,f=n.far,h=f===void 0?500:f;return di(s),Z.perspective(this,s,c,l,h),this.check()}},{key:"determinant",value:function(){return Z.determinant(this)}},{key:"getScale",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[-0,-0,-0];return n[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),n[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),n[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),n}},{key:"getTranslation",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[-0,-0,-0];return n[0]=this[12],n[1]=this[13],n[2]=this[14],n}},{key:"getRotation",value:function(n,i){n=n||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],i=i||[-0,-0,-0];var s=this.getScale(i),o=1/s[0],c=1/s[1],u=1/s[2];return n[0]=this[0]*o,n[1]=this[1]*c,n[2]=this[2]*u,n[3]=0,n[4]=this[4]*o,n[5]=this[5]*c,n[6]=this[6]*u,n[7]=0,n[8]=this[8]*o,n[9]=this[9]*c,n[10]=this[10]*u,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}},{key:"getRotationMatrix3",value:function(n,i){n=n||[-0,-0,-0,-0,-0,-0,-0,-0,-0],i=i||[-0,-0,-0];var s=this.getScale(i),o=1/s[0],c=1/s[1],u=1/s[2];return n[0]=this[0]*o,n[1]=this[1]*c,n[2]=this[2]*u,n[3]=this[4]*o,n[4]=this[5]*c,n[5]=this[6]*u,n[6]=this[8]*o,n[7]=this[9]*c,n[8]=this[10]*u,n}},{key:"transpose",value:function(){return Z.transpose(this,this),this.check()}},{key:"invert",value:function(){return Z.invert(this,this),this.check()}},{key:"multiplyLeft",value:function(n){return Z.multiply(this,n,this),this.check()}},{key:"multiplyRight",value:function(n){return Z.multiply(this,this,n),this.check()}},{key:"rotateX",value:function(n){return Z.rotateX(this,this,n),this.check()}},{key:"rotateY",value:function(n){return Z.rotateY(this,this,n),this.check()}},{key:"rotateZ",value:function(n){return Z.rotateZ(this,this,n),this.check()}},{key:"rotateXYZ",value:function(n){return this.rotateX(n[0]).rotateY(n[1]).rotateZ(n[2])}},{key:"rotateAxis",value:function(n,i){return Z.rotate(this,this,n,i),this.check()}},{key:"scale",value:function(n){return Z.scale(this,this,Array.isArray(n)?n:[n,n,n]),this.check()}},{key:"translate",value:function(n){return Z.translate(this,this,n),this.check()}},{key:"transform",value:function(n,i){return n.length===4?(i=Oh.transformMat4(i||[-0,-0,-0,-0],n,this),(0,an.checkVector)(i,4),i):this.transformAsPoint(n,i)}},{key:"transformAsPoint",value:function(n,i){var s=n.length,o;switch(s){case 2:o=bh.transformMat4(i||[-0,-0],n,this);break;case 3:o=_h.transformMat4(i||[-0,-0,-0],n,this);break;default:throw new Error("Illegal vector")}return(0,an.checkVector)(o,n.length),o}},{key:"transformAsVector",value:function(n,i){var s;switch(n.length){case 2:s=(0,fi.vec2_transformMat4AsVector)(i||[-0,-0],n,this);break;case 3:s=(0,fi.vec3_transformMat4AsVector)(i||[-0,-0,-0],n,this);break;default:throw new Error("Illegal vector")}return(0,an.checkVector)(s,n.length),s}},{key:"transformPoint",value:function(n,i){return this.transformAsPoint(n,i)}},{key:"transformVector",value:function(n,i){return this.transformAsPoint(n,i)}},{key:"transformDirection",value:function(n,i){return this.transformAsVector(n,i)}},{key:"makeRotationX",value:function(n){return this.identity().rotateX(n)}},{key:"makeTranslation",value:function(n,i,s){return this.identity().translate([n,i,s])}}],[{key:"IDENTITY",get:function(){return wh()}},{key:"ZERO",get:function(){return Sh()}}]),t}(xh.default);Mt.default=un;var gt,yt;function Sh(){return gt||(gt=new un([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(gt)),gt}function wh(){return yt||(yt=new un,Object.freeze(yt)),yt}function di(e){if(e>Math.PI*2)throw Error("expected radians")}function qh(e,r,t,a,n,i){var s=2*i/(t-r),o=2*i/(n-a),c=(t+r)/(t-r),u=(n+a)/(n-a),l=-1,f=-1,h=-2*i;return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=c,e[9]=u,e[10]=l,e[11]=f,e[12]=0,e[13]=0,e[14]=h,e[15]=0,e}});var Ti=S(x=>{"use strict";function xt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xt=function(t){return typeof t}:xt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xt(e)}Object.defineProperty(x,"__esModule",{value:!0});x.create=fn;x.identity=Lh;x.setAxisAngle=vi;x.getAxisAngle=Nh;x.getAngle=Ch;x.multiply=mi;x.rotateX=Ih;x.rotateY=Wh;x.rotateZ=Bh;x.calculateW=Dh;x.exp=gi;x.ln=yi;x.pow=Fh;x.slerp=_t;x.random=zh;x.invert=Yh;x.conjugate=Uh;x.fromMat3=Mi;x.fromEuler=Gh;x.str=Vh;x.setAxes=x.sqlerp=x.rotationTo=x.equals=x.exactEquals=x.normalize=x.sqrLen=x.squaredLength=x.len=x.length=x.lerp=x.dot=x.scale=x.mul=x.add=x.set=x.copy=x.fromValues=x.clone=void 0;var He=bt(Xe()),Eh=bt(en()),Pe=bt(Le()),re=bt(vt());function pi(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(pi=function(n){return n?t:r})(e)}function bt(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||xt(e)!=="object"&&typeof e!="function")return{default:e};var t=pi(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function fn(){var e=new He.ARRAY_TYPE(4);return He.ARRAY_TYPE!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Lh(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function vi(e,r,t){t=t*.5;var a=Math.sin(t);return e[0]=a*r[0],e[1]=a*r[1],e[2]=a*r[2],e[3]=Math.cos(t),e}function Nh(e,r){var t=Math.acos(r[3])*2,a=Math.sin(t/2);return a>He.EPSILON?(e[0]=r[0]/a,e[1]=r[1]/a,e[2]=r[2]/a):(e[0]=1,e[1]=0,e[2]=0),t}function Ch(e,r){var t=bi(e,r);return Math.acos(2*t*t-1)}function mi(e,r,t){var a=r[0],n=r[1],i=r[2],s=r[3],o=t[0],c=t[1],u=t[2],l=t[3];return e[0]=a*l+s*o+n*u-i*c,e[1]=n*l+s*c+i*o-a*u,e[2]=i*l+s*u+a*c-n*o,e[3]=s*l-a*o-n*c-i*u,e}function Ih(e,r,t){t*=.5;var a=r[0],n=r[1],i=r[2],s=r[3],o=Math.sin(t),c=Math.cos(t);return e[0]=a*c+s*o,e[1]=n*c+i*o,e[2]=i*c-n*o,e[3]=s*c-a*o,e}function Wh(e,r,t){t*=.5;var a=r[0],n=r[1],i=r[2],s=r[3],o=Math.sin(t),c=Math.cos(t);return e[0]=a*c-i*o,e[1]=n*c+s*o,e[2]=i*c+a*o,e[3]=s*c-n*o,e}function Bh(e,r,t){t*=.5;var a=r[0],n=r[1],i=r[2],s=r[3],o=Math.sin(t),c=Math.cos(t);return e[0]=a*c+n*o,e[1]=n*c-a*o,e[2]=i*c+s*o,e[3]=s*c-i*o,e}function Dh(e,r){var t=r[0],a=r[1],n=r[2];return e[0]=t,e[1]=a,e[2]=n,e[3]=Math.sqrt(Math.abs(1-t*t-a*a-n*n)),e}function gi(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=Math.sqrt(t*t+a*a+n*n),o=Math.exp(i),c=s>0?o*Math.sin(s)/s:0;return e[0]=t*c,e[1]=a*c,e[2]=n*c,e[3]=o*Math.cos(s),e}function yi(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=Math.sqrt(t*t+a*a+n*n),o=s>0?Math.atan2(s,i)/s:0;return e[0]=t*o,e[1]=a*o,e[2]=n*o,e[3]=.5*Math.log(t*t+a*a+n*n+i*i),e}function Fh(e,r,t){return yi(e,r),xi(e,e,t),gi(e,e),e}function _t(e,r,t,a){var n=r[0],i=r[1],s=r[2],o=r[3],c=t[0],u=t[1],l=t[2],f=t[3],h,d,p,m,v;return d=n*c+i*u+s*l+o*f,d<0&&(d=-d,c=-c,u=-u,l=-l,f=-f),1-d>He.EPSILON?(h=Math.acos(d),p=Math.sin(h),m=Math.sin((1-a)*h)/p,v=Math.sin(a*h)/p):(m=1-a,v=a),e[0]=m*n+v*c,e[1]=m*i+v*u,e[2]=m*s+v*l,e[3]=m*o+v*f,e}function zh(e){var r=He.RANDOM(),t=He.RANDOM(),a=He.RANDOM(),n=Math.sqrt(1-r),i=Math.sqrt(r);return e[0]=n*Math.sin(2*Math.PI*t),e[1]=n*Math.cos(2*Math.PI*t),e[2]=i*Math.sin(2*Math.PI*a),e[3]=i*Math.cos(2*Math.PI*a),e}function Yh(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],s=t*t+a*a+n*n+i*i,o=s?1/s:0;return e[0]=-t*o,e[1]=-a*o,e[2]=-n*o,e[3]=i*o,e}function Uh(e,r){return e[0]=-r[0],e[1]=-r[1],e[2]=-r[2],e[3]=r[3],e}function Mi(e,r){var t=r[0]+r[4]+r[8],a;if(t>0)a=Math.sqrt(t+1),e[3]=.5*a,a=.5/a,e[0]=(r[5]-r[7])*a,e[1]=(r[6]-r[2])*a,e[2]=(r[1]-r[3])*a;else{var n=0;r[4]>r[0]&&(n=1),r[8]>r[n*3+n]&&(n=2);var i=(n+1)%3,s=(n+2)%3;a=Math.sqrt(r[n*3+n]-r[i*3+i]-r[s*3+s]+1),e[n]=.5*a,a=.5/a,e[3]=(r[i*3+s]-r[s*3+i])*a,e[i]=(r[i*3+n]+r[n*3+i])*a,e[s]=(r[s*3+n]+r[n*3+s])*a}return e}function Gh(e,r,t,a){var n=.5*Math.PI/180;r*=n,t*=n,a*=n;var i=Math.sin(r),s=Math.cos(r),o=Math.sin(t),c=Math.cos(t),u=Math.sin(a),l=Math.cos(a);return e[0]=i*c*l-s*o*u,e[1]=s*o*l+i*c*u,e[2]=s*c*u-i*o*l,e[3]=s*c*l+i*o*u,e}function Vh(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var jh=re.clone;x.clone=jh;var Zh=re.fromValues;x.fromValues=Zh;var Xh=re.copy;x.copy=Xh;var Qh=re.set;x.set=Qh;var $h=re.add;x.add=$h;var Jh=mi;x.mul=Jh;var xi=re.scale;x.scale=xi;var bi=re.dot;x.dot=bi;var Hh=re.lerp;x.lerp=Hh;var _i=re.length;x.length=_i;var Kh=_i;x.len=Kh;var Oi=re.squaredLength;x.squaredLength=Oi;var e0=Oi;x.sqrLen=e0;var hn=re.normalize;x.normalize=hn;var r0=re.exactEquals;x.exactEquals=r0;var t0=re.equals;x.equals=t0;var n0=function(){var e=Pe.create(),r=Pe.fromValues(1,0,0),t=Pe.fromValues(0,1,0);return function(a,n,i){var s=Pe.dot(n,i);return s<-.999999?(Pe.cross(e,r,n),Pe.len(e)<1e-6&&Pe.cross(e,t,n),Pe.normalize(e,e),vi(a,e,Math.PI),a):s>.999999?(a[0]=0,a[1]=0,a[2]=0,a[3]=1,a):(Pe.cross(e,n,i),a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=1+s,hn(a,a))}}();x.rotationTo=n0;var a0=function(){var e=fn(),r=fn();return function(t,a,n,i,s,o){return _t(e,a,s,o),_t(r,n,i,o),_t(t,e,r,2*o*(1-o)),t}}();x.sqlerp=a0;var i0=function(){var e=Eh.create();return function(r,t,a,n){return e[0]=a[0],e[3]=a[1],e[6]=a[2],e[1]=n[0],e[4]=n[1],e[7]=n[2],e[2]=-t[0],e[5]=-t[1],e[8]=-t[2],hn(r,Mi(r,e))}}();x.setAxes=i0});var dn=S(Ot=>{"use strict";var Ke=V(),s0=se();Object.defineProperty(Ot,"__esModule",{value:!0});Ot.default=void 0;var o0=Ke($()),c0=Ke(J()),u0=Ke(oe()),l0=Ke(ce()),ki=Ke(ue()),f0=Ke(qr()),Lr=me(),h0=Ke(Ht()),U=Ai(Ti()),d0=Ai(vt());function Ri(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(Ri=function(n){return n?t:r})(e)}function Ai(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||s0(e)!=="object"&&typeof e!="function")return{default:e};var t=Ri(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}function p0(e){var r=v0();return function(){var a=(0,ki.default)(e),n;if(r){var i=(0,ki.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,l0.default)(this,n)}}function v0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var m0=[0,0,0,1],g0=function(e){(0,u0.default)(t,e);var r=p0(t);function t(){var a,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;return(0,o0.default)(this,t),a=r.call(this,-0,-0,-0,-0),Array.isArray(n)&&arguments.length===1?a.copy(n):a.set(n,i,s,o),a}return(0,c0.default)(t,[{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this[3]=n[3],this.check()}},{key:"set",value:function(n,i,s,o){return this[0]=n,this[1]=i,this[2]=s,this[3]=o,this.check()}},{key:"fromObject",value:function(n){return this[0]=n.x,this[1]=n.y,this[2]=n.z,this[3]=n.w,this.check()}},{key:"fromMatrix3",value:function(n){return U.fromMat3(this,n),this.check()}},{key:"fromAxisRotation",value:function(n,i){return U.setAxisAngle(this,n,i),this.check()}},{key:"identity",value:function(){return U.identity(this),this.check()}},{key:"setAxisAngle",value:function(n,i){return this.fromAxisRotation(n,i)}},{key:"ELEMENTS",get:function(){return 4}},{key:"x",get:function(){return this[0]},set:function(n){this[0]=(0,Lr.checkNumber)(n)}},{key:"y",get:function(){return this[1]},set:function(n){this[1]=(0,Lr.checkNumber)(n)}},{key:"z",get:function(){return this[2]},set:function(n){this[2]=(0,Lr.checkNumber)(n)}},{key:"w",get:function(){return this[3]},set:function(n){this[3]=(0,Lr.checkNumber)(n)}},{key:"len",value:function(){return U.length(this)}},{key:"lengthSquared",value:function(){return U.squaredLength(this)}},{key:"dot",value:function(n){return U.dot(this,n)}},{key:"rotationTo",value:function(n,i){return U.rotationTo(this,n,i),this.check()}},{key:"add",value:function(n){return U.add(this,this,n),this.check()}},{key:"calculateW",value:function(){return U.calculateW(this,this),this.check()}},{key:"conjugate",value:function(){return U.conjugate(this,this),this.check()}},{key:"invert",value:function(){return U.invert(this,this),this.check()}},{key:"lerp",value:function(n,i,s){return s===void 0?this.lerp(this,n,i):(U.lerp(this,n,i,s),this.check())}},{key:"multiplyRight",value:function(n){return U.multiply(this,this,n),this.check()}},{key:"multiplyLeft",value:function(n){return U.multiply(this,n,this),this.check()}},{key:"normalize",value:function(){var n=this.len(),i=n>0?1/n:0;return this[0]=this[0]*i,this[1]=this[1]*i,this[2]=this[2]*i,this[3]=this[3]*i,n===0&&(this[3]=1),this.check()}},{key:"rotateX",value:function(n){return U.rotateX(this,this,n),this.check()}},{key:"rotateY",value:function(n){return U.rotateY(this,this,n),this.check()}},{key:"rotateZ",value:function(n){return U.rotateZ(this,this,n),this.check()}},{key:"scale",value:function(n){return U.scale(this,this,n),this.check()}},{key:"slerp",value:function(n,i,s){var o,c,u;switch(arguments.length){case 1:var l=n,f=l.start;o=f===void 0?m0:f,c=l.target,u=l.ratio;break;case 2:o=this,c=n,u=i;break;default:o=n,c=i,u=s}return U.slerp(this,o,c,u),this.check()}},{key:"transformVector4",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new h0.default;return d0.transformQuat(i,n,this),(0,Lr.checkVector)(i,4)}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"setFromAxisAngle",value:function(n,i){return this.setAxisAngle(n,i)}},{key:"premultiply",value:function(n){return this.multiplyLeft(n)}},{key:"multiply",value:function(n){return this.multiplyRight(n)}}]),t}(f0.default);Ot.default=g0});var Pi=S((sp,Nr)=>{function y0(e){if(Array.isArray(e))return e}Nr.exports=y0,Nr.exports.__esModule=!0,Nr.exports.default=Nr.exports});var Si=S((op,Cr)=>{function M0(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var a=[],n=!0,i=!1,s,o;try{for(t=t.call(e);!(n=(s=t.next()).done)&&(a.push(s.value),!(r&&a.length===r));n=!0);}catch(c){i=!0,o=c}finally{try{!n&&t.return!=null&&t.return()}finally{if(i)throw o}}return a}}Cr.exports=M0,Cr.exports.__esModule=!0,Cr.exports.default=Cr.exports});var wi=S((cp,Ir)=>{function x0(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}Ir.exports=x0,Ir.exports.__esModule=!0,Ir.exports.default=Ir.exports});var Ei=S((up,Wr)=>{var qi=wi();function b0(e,r){if(!!e){if(typeof e=="string")return qi(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return qi(e,r)}}Wr.exports=b0,Wr.exports.__esModule=!0,Wr.exports.default=Wr.exports});var Li=S((lp,Br)=>{function _0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}Br.exports=_0,Br.exports.__esModule=!0,Br.exports.default=Br.exports});var Tt=S((fp,Dr)=>{var O0=Pi(),T0=Si(),k0=Ei(),R0=Li();function A0(e,r){return O0(e)||T0(e,r)||k0(e,r)||R0()}Dr.exports=A0,Dr.exports.__esModule=!0,Dr.exports.default=Dr.exports});var kt=S((hp,Fr)=>{function P0(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}Fr.exports=P0,Fr.exports.__esModule=!0,Fr.exports.default=Fr.exports});var Ii=S(At=>{"use strict";var zr=V(),S0=se();Object.defineProperty(At,"__esModule",{value:!0});At.default=void 0;var w0=zr(Tt()),q0=zr($()),E0=zr(J()),Rt=zr(kt()),L0=zr(it()),X=ve(),N0=C0(Le());function Ni(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(Ni=function(n){return n?t:r})(e)}function C0(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||S0(e)!=="object"&&typeof e!="function")return{default:e};var t=Ni(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}var Ci=1e-6,I0=6371e3,W0=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=r.phi,a=t===void 0?0:t,n=r.theta,i=n===void 0?0:n,s=r.radius,o=s===void 0?1:s,c=r.bearing,u=r.pitch,l=r.altitude,f=r.radiusScale,h=f===void 0?I0:f;(0,q0.default)(this,e),(0,Rt.default)(this,"phi",void 0),(0,Rt.default)(this,"theta",void 0),(0,Rt.default)(this,"radius",void 0),(0,Rt.default)(this,"radiusScale",void 0),this.phi=a,this.theta=i,this.radius=o||l||1,this.radiusScale=h||1,c!==void 0&&(this.bearing=c),u!==void 0&&(this.pitch=u),this.check()}return(0,E0.default)(e,[{key:"toString",value:function(){return this.formatString(X.config)}},{key:"formatString",value:function(t){var a=t.printTypes,n=a===void 0?!1:a,i=X.formatValue;return"".concat(n?"Spherical":"","[rho:").concat(i(this.radius),",theta:").concat(i(this.theta),",phi:").concat(i(this.phi),"]")}},{key:"equals",value:function(t){return(0,X.equals)(this.radius,t.radius)&&(0,X.equals)(this.theta,t.theta)&&(0,X.equals)(this.phi,t.phi)}},{key:"exactEquals",value:function(t){return this.radius===t.radius&&this.theta===t.theta&&this.phi===t.phi}},{key:"bearing",get:function(){return 180-(0,X.degrees)(this.phi)},set:function(t){this.phi=Math.PI-(0,X.radians)(t)}},{key:"pitch",get:function(){return(0,X.degrees)(this.theta)},set:function(t){this.theta=(0,X.radians)(t)}},{key:"longitude",get:function(){return(0,X.degrees)(this.phi)}},{key:"latitude",get:function(){return(0,X.degrees)(this.theta)}},{key:"lng",get:function(){return(0,X.degrees)(this.phi)}},{key:"lat",get:function(){return(0,X.degrees)(this.theta)}},{key:"z",get:function(){return(this.radius-1)*this.radiusScale}},{key:"set",value:function(t,a,n){return this.radius=t,this.phi=a,this.theta=n,this.check()}},{key:"clone",value:function(){return new e().copy(this)}},{key:"copy",value:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this.check()}},{key:"fromLngLatZ",value:function(t){var a=(0,w0.default)(t,3),n=a[0],i=a[1],s=a[2];return this.radius=1+s/this.radiusScale,this.phi=(0,X.radians)(i),this.theta=(0,X.radians)(n),this.check()}},{key:"fromVector3",value:function(t){return this.radius=N0.length(t),this.radius>0&&(this.theta=Math.atan2(t[0],t[1]),this.phi=Math.acos((0,X.clamp)(t[2]/this.radius,-1,1))),this.check()}},{key:"toVector3",value:function(){return new L0.default(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}},{key:"makeSafe",value:function(){return this.phi=Math.max(Ci,Math.min(Math.PI-Ci,this.phi)),this}},{key:"check",value:function(){if(!Number.isFinite(this.phi)||!Number.isFinite(this.theta)||!(this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}}]),e}();At.default=W0});var pn=S(St=>{"use strict";var Ce=V();Object.defineProperty(St,"__esModule",{value:!0});St.default=void 0;var B0=Ce(Tt()),D0=Ce($()),F0=Ce(J()),z0=Ce(oe()),Y0=Ce(ce()),Wi=Ce(ue()),U0=Ce(qr()),Bi=Ce(dn()),fr=ve(),ie=me();function G0(e){var r=V0();return function(){var a=(0,Wi.default)(e),n;if(r){var i=(0,Wi.default)(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return(0,Y0.default)(this,n)}}function V0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Pt="Unknown Euler angle order",hr=.99999,G;(function(e){e[e.ZYX=0]="ZYX",e[e.YXZ=1]="YXZ",e[e.XZY=2]="XZY",e[e.ZXY=3]="ZXY",e[e.YZX=4]="YZX",e[e.XYZ=5]="XYZ"})(G||(G={}));var j0=function(e){(0,z0.default)(t,e);var r=G0(t);function t(){var a,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t.DefaultOrder;if((0,D0.default)(this,t),a=r.call(this,-0,-0,-0,-0),arguments.length>0&&Array.isArray(arguments[0])){var c;(c=a).fromVector3.apply(c,arguments)}else a.set(n,i,s,o);return a}return(0,F0.default)(t,[{key:"ELEMENTS",get:function(){return 4}},{key:"fromQuaternion",value:function(n){var i=(0,B0.default)(n,4),s=i[0],o=i[1],c=i[2],u=i[3],l=o*o,f=-2*(l+c*c)+1,h=2*(s*o+u*c),d=-2*(s*c-u*o),p=2*(o*c+u*s),m=-2*(s*s+l)+1;d=d>1?1:d,d=d<-1?-1:d;var v=Math.atan2(p,m),g=Math.asin(d),b=Math.atan2(h,f);return this.set(v,g,b,t.RollPitchYaw)}},{key:"fromObject",value:function(n){throw new Error("not implemented")}},{key:"copy",value:function(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this[3]=Number.isFinite(n[3])||this.order,this.check()}},{key:"set",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3?arguments[3]:void 0;return this[0]=n,this[1]=i,this[2]=s,this[3]=Number.isFinite(o)?o:this[3],this.check()}},{key:"validate",value:function(){return Z0(this[3])&&Number.isFinite(this[0])&&Number.isFinite(this[1])&&Number.isFinite(this[2])}},{key:"toArray",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return n[i]=this[0],n[i+1]=this[1],n[i+2]=this[2],n}},{key:"toArray4",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return n[i]=this[0],n[i+1]=this[1],n[i+2]=this[2],n[i+3]=this[3],n}},{key:"toVector3",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[-0,-0,-0];return n[0]=this[0],n[1]=this[1],n[2]=this[2],n}},{key:"x",get:function(){return this[0]},set:function(n){this[0]=(0,ie.checkNumber)(n)}},{key:"y",get:function(){return this[1]},set:function(n){this[1]=(0,ie.checkNumber)(n)}},{key:"z",get:function(){return this[2]},set:function(n){this[2]=(0,ie.checkNumber)(n)}},{key:"alpha",get:function(){return this[0]},set:function(n){this[0]=(0,ie.checkNumber)(n)}},{key:"beta",get:function(){return this[1]},set:function(n){this[1]=(0,ie.checkNumber)(n)}},{key:"gamma",get:function(){return this[2]},set:function(n){this[2]=(0,ie.checkNumber)(n)}},{key:"phi",get:function(){return this[0]},set:function(n){this[0]=(0,ie.checkNumber)(n)}},{key:"theta",get:function(){return this[1]},set:function(n){this[1]=(0,ie.checkNumber)(n)}},{key:"psi",get:function(){return this[2]},set:function(n){this[2]=(0,ie.checkNumber)(n)}},{key:"roll",get:function(){return this[0]},set:function(n){this[0]=(0,ie.checkNumber)(n)}},{key:"pitch",get:function(){return this[1]},set:function(n){this[1]=(0,ie.checkNumber)(n)}},{key:"yaw",get:function(){return this[2]},set:function(n){this[2]=(0,ie.checkNumber)(n)}},{key:"order",get:function(){return this[3]},set:function(n){this[3]=X0(n)}},{key:"fromVector3",value:function(n,i){return this.set(n[0],n[1],n[2],Number.isFinite(i)?i:this[3])}},{key:"fromArray",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this[0]=n[0+i],this[1]=n[1+i],this[2]=n[2+i],n[3]!==void 0&&(this[3]=n[3]),this.check()}},{key:"fromRollPitchYaw",value:function(n,i,s){return this.set(n,i,s,G.ZYX)}},{key:"fromRotationMatrix",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.DefaultOrder;return this._fromRotationMatrix(n,i),this.check()}},{key:"getRotationMatrix",value:function(n){return this._getRotationMatrix(n)}},{key:"getQuaternion",value:function(){var n=new Bi.default;switch(this[4]){case G.XYZ:return n.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);case G.YXZ:return n.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);case G.ZXY:return n.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);case G.ZYX:return n.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);case G.YZX:return n.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);case G.XZY:return n.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);default:throw new Error(Pt)}}},{key:"_fromRotationMatrix",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.DefaultOrder,s=n[0],o=n[4],c=n[8],u=n[1],l=n[5],f=n[9],h=n[2],d=n[6],p=n[10];switch(i=i||this[3],i){case t.XYZ:this[1]=Math.asin((0,fr.clamp)(c,-1,1)),Math.abs(c)<hr?(this[0]=Math.atan2(-f,p),this[2]=Math.atan2(-o,s)):(this[0]=Math.atan2(d,l),this[2]=0);break;case t.YXZ:this[0]=Math.asin(-(0,fr.clamp)(f,-1,1)),Math.abs(f)<hr?(this[1]=Math.atan2(c,p),this[2]=Math.atan2(u,l)):(this[1]=Math.atan2(-h,s),this[2]=0);break;case t.ZXY:this[0]=Math.asin((0,fr.clamp)(d,-1,1)),Math.abs(d)<hr?(this[1]=Math.atan2(-h,p),this[2]=Math.atan2(-o,l)):(this[1]=0,this[2]=Math.atan2(u,s));break;case t.ZYX:this[1]=Math.asin(-(0,fr.clamp)(h,-1,1)),Math.abs(h)<hr?(this[0]=Math.atan2(d,p),this[2]=Math.atan2(u,s)):(this[0]=0,this[2]=Math.atan2(-o,l));break;case t.YZX:this[2]=Math.asin((0,fr.clamp)(u,-1,1)),Math.abs(u)<hr?(this[0]=Math.atan2(-f,l),this[1]=Math.atan2(-h,s)):(this[0]=0,this[1]=Math.atan2(c,p));break;case t.XZY:this[2]=Math.asin(-(0,fr.clamp)(o,-1,1)),Math.abs(o)<hr?(this[0]=Math.atan2(d,l),this[1]=Math.atan2(c,s)):(this[0]=Math.atan2(-f,p),this[1]=0);break;default:throw new Error(Pt)}return this[3]=i,this}},{key:"_getRotationMatrix",value:function(n){var i=n||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],s=this.x,o=this.y,c=this.z,u=Math.cos(s),l=Math.cos(o),f=Math.cos(c),h=Math.sin(s),d=Math.sin(o),p=Math.sin(c);switch(this[3]){case t.XYZ:{var m=u*f,v=u*p,g=h*f,b=h*p;i[0]=l*f,i[4]=-l*p,i[8]=d,i[1]=v+g*d,i[5]=m-b*d,i[9]=-h*l,i[2]=b-m*d,i[6]=g+v*d,i[10]=u*l;break}case t.YXZ:{var y=l*f,M=l*p,T=d*f,_=d*p;i[0]=y+_*h,i[4]=T*h-M,i[8]=u*d,i[1]=u*p,i[5]=u*f,i[9]=-h,i[2]=M*h-T,i[6]=_+y*h,i[10]=u*l;break}case t.ZXY:{var I=l*f,L=l*p,N=d*f,w=d*p;i[0]=I-w*h,i[4]=-u*p,i[8]=N+L*h,i[1]=L+N*h,i[5]=u*f,i[9]=w-I*h,i[2]=-u*d,i[6]=h,i[10]=u*l;break}case t.ZYX:{var W=u*f,C=u*p,B=h*f,P=h*p;i[0]=l*f,i[4]=B*d-C,i[8]=W*d+P,i[1]=l*p,i[5]=P*d+W,i[9]=C*d-B,i[2]=-d,i[6]=h*l,i[10]=u*l;break}case t.YZX:{var j=u*l,he=u*d,de=h*l,Ye=h*d;i[0]=l*f,i[4]=Ye-j*p,i[8]=de*p+he,i[1]=p,i[5]=u*f,i[9]=-h*f,i[2]=-d*f,i[6]=he*p+de,i[10]=j-Ye*p;break}case t.XZY:{var Ue=u*l,En=u*d,Ln=h*l,Nn=h*d;i[0]=l*f,i[4]=-p,i[8]=d*f,i[1]=Ue*p+Nn,i[5]=u*f,i[9]=En*p-Ln,i[2]=Ln*p-En,i[6]=h*f,i[10]=Nn*p+Ue;break}default:throw new Error(Pt)}return i[3]=0,i[7]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i}},{key:"toQuaternion",value:function(){var n=Math.cos(this.yaw*.5),i=Math.sin(this.yaw*.5),s=Math.cos(this.roll*.5),o=Math.sin(this.roll*.5),c=Math.cos(this.pitch*.5),u=Math.sin(this.pitch*.5),l=n*s*c+i*o*u,f=n*o*c-i*s*u,h=n*s*u+i*o*c,d=i*s*c-n*o*u;return new Bi.default(f,h,d,l)}}],[{key:"ZYX",get:function(){return G.ZYX}},{key:"YXZ",get:function(){return G.YXZ}},{key:"XZY",get:function(){return G.XZY}},{key:"ZXY",get:function(){return G.ZXY}},{key:"YZX",get:function(){return G.YZX}},{key:"XYZ",get:function(){return G.XYZ}},{key:"RollPitchYaw",get:function(){return G.ZYX}},{key:"DefaultOrder",get:function(){return G.ZYX}},{key:"RotationOrders",get:function(){return G}},{key:"rotationOrder",value:function(n){return G[n]}}]),t}(U0.default);St.default=j0;function Z0(e){return e>=0&&e<6}function X0(e){if(e<0&&e>=6)throw new Error(Pt);return e}});var zi=S(wt=>{"use strict";var dr=V();Object.defineProperty(wt,"__esModule",{value:!0});wt.default=void 0;var Q0=dr($()),$0=dr(J()),Di=dr(kt()),vn=dr(ln()),Fi=dr(it()),mn=dr(pn()),J0=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=r.x,a=t===void 0?0:t,n=r.y,i=n===void 0?0:n,s=r.z,o=s===void 0?0:s,c=r.roll,u=c===void 0?0:c,l=r.pitch,f=l===void 0?0:l,h=r.yaw,d=h===void 0?0:h,p=r.position,m=r.orientation;(0,Q0.default)(this,e),(0,Di.default)(this,"position",void 0),(0,Di.default)(this,"orientation",void 0),Array.isArray(p)&&p.length===3?this.position=new Fi.default(p):this.position=new Fi.default(a,i,o),Array.isArray(m)&&m.length===4?this.orientation=new mn.default(m,m[3]):this.orientation=new mn.default(u,f,d,mn.default.RollPitchYaw)}return(0,$0.default)(e,[{key:"x",get:function(){return this.position.x},set:function(t){this.position.x=t}},{key:"y",get:function(){return this.position.y},set:function(t){this.position.y=t}},{key:"z",get:function(){return this.position.z},set:function(t){this.position.z=t}},{key:"roll",get:function(){return this.orientation.roll},set:function(t){this.orientation.roll=t}},{key:"pitch",get:function(){return this.orientation.pitch},set:function(t){this.orientation.pitch=t}},{key:"yaw",get:function(){return this.orientation.yaw},set:function(t){this.orientation.yaw=t}},{key:"getPosition",value:function(){return this.position}},{key:"getOrientation",value:function(){return this.orientation}},{key:"equals",value:function(t){return t?this.position.equals(t.position)&&this.orientation.equals(t.orientation):!1}},{key:"exactEquals",value:function(t){return t?this.position.exactEquals(t.position)&&this.orientation.exactEquals(t.orientation):!1}},{key:"getTransformationMatrix",value:function(){var t=Math.sin(this.roll),a=Math.sin(this.pitch),n=Math.sin(this.yaw),i=Math.cos(this.roll),s=Math.cos(this.pitch),o=Math.cos(this.yaw);return new vn.default().setRowMajor(o*s,-n*i+o*a*t,n*t+o*a*i,this.x,n*s,o*i+n*a*t,-o*t+n*a*i,this.y,-a,s*t,s*i,this.z,0,0,0,1)}},{key:"getTransformationMatrixFromPose",value:function(t){return new vn.default().multiplyRight(this.getTransformationMatrix()).multiplyRight(t.getTransformationMatrix().invert())}},{key:"getTransformationMatrixToPose",value:function(t){return new vn.default().multiplyRight(t.getTransformationMatrix()).multiplyRight(this.getTransformationMatrix().invert())}}]),e}();wt.default=J0});var Yi=S(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.default=void 0;var H0={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,PI_OVER_TWO:Math.PI/2,PI_OVER_FOUR:Math.PI/4,PI_OVER_SIX:Math.PI/6,TWO_PI:Math.PI*2};qt.default=H0});var pr=S(E=>{"use strict";var le=V();Object.defineProperty(E,"__esModule",{value:!0});Object.defineProperty(E,"Vector2",{enumerable:!0,get:function(){return K0.default}});Object.defineProperty(E,"Vector3",{enumerable:!0,get:function(){return e1.default}});Object.defineProperty(E,"Vector4",{enumerable:!0,get:function(){return r1.default}});Object.defineProperty(E,"Matrix3",{enumerable:!0,get:function(){return t1.default}});Object.defineProperty(E,"Matrix4",{enumerable:!0,get:function(){return n1.default}});Object.defineProperty(E,"Quaternion",{enumerable:!0,get:function(){return a1.default}});Object.defineProperty(E,"SphericalCoordinates",{enumerable:!0,get:function(){return Ui.default}});Object.defineProperty(E,"_SphericalCoordinates",{enumerable:!0,get:function(){return Ui.default}});Object.defineProperty(E,"Pose",{enumerable:!0,get:function(){return Gi.default}});Object.defineProperty(E,"_Pose",{enumerable:!0,get:function(){return Gi.default}});Object.defineProperty(E,"Euler",{enumerable:!0,get:function(){return Vi.default}});Object.defineProperty(E,"_Euler",{enumerable:!0,get:function(){return Vi.default}});Object.defineProperty(E,"_MathUtils",{enumerable:!0,get:function(){return i1.default}});Object.defineProperty(E,"assert",{enumerable:!0,get:function(){return s1.default}});Object.defineProperty(E,"config",{enumerable:!0,get:function(){return Y.config}});Object.defineProperty(E,"configure",{enumerable:!0,get:function(){return Y.configure}});Object.defineProperty(E,"formatValue",{enumerable:!0,get:function(){return Y.formatValue}});Object.defineProperty(E,"isArray",{enumerable:!0,get:function(){return Y.isArray}});Object.defineProperty(E,"clone",{enumerable:!0,get:function(){return Y.clone}});Object.defineProperty(E,"equals",{enumerable:!0,get:function(){return Y.equals}});Object.defineProperty(E,"exactEquals",{enumerable:!0,get:function(){return Y.exactEquals}});Object.defineProperty(E,"toRadians",{enumerable:!0,get:function(){return Y.toRadians}});Object.defineProperty(E,"toDegrees",{enumerable:!0,get:function(){return Y.toDegrees}});Object.defineProperty(E,"radians",{enumerable:!0,get:function(){return Y.radians}});Object.defineProperty(E,"degrees",{enumerable:!0,get:function(){return Y.degrees}});Object.defineProperty(E,"sin",{enumerable:!0,get:function(){return Y.sin}});Object.defineProperty(E,"cos",{enumerable:!0,get:function(){return Y.cos}});Object.defineProperty(E,"tan",{enumerable:!0,get:function(){return Y.tan}});Object.defineProperty(E,"asin",{enumerable:!0,get:function(){return Y.asin}});Object.defineProperty(E,"acos",{enumerable:!0,get:function(){return Y.acos}});Object.defineProperty(E,"atan",{enumerable:!0,get:function(){return Y.atan}});Object.defineProperty(E,"clamp",{enumerable:!0,get:function(){return Y.clamp}});Object.defineProperty(E,"lerp",{enumerable:!0,get:function(){return Y.lerp}});Object.defineProperty(E,"withEpsilon",{enumerable:!0,get:function(){return Y.withEpsilon}});var K0=le(ba()),e1=le(it()),r1=le(Ht()),t1=le(Va()),n1=le(ln()),a1=le(dn()),Ui=le(Ii()),Gi=le(zi()),Vi=le(pn()),i1=le(Yi()),s1=le(Zr()),Y=ve()});var xn=S(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.WGS84_CONSTANTS=xe.WGS84_RADIUS_Z=xe.WGS84_RADIUS_Y=xe.WGS84_RADIUS_X=void 0;var Ie=6378137;xe.WGS84_RADIUS_X=Ie;var We=6378137;xe.WGS84_RADIUS_Y=We;var Be=6356752314245179e-9;xe.WGS84_RADIUS_Z=Be;var h1={radii:[Ie,We,Be],radiiSquared:[Ie*Ie,We*We,Be*Be],oneOverRadii:[1/Ie,1/We,1/Be],oneOverRadiiSquared:[1/(Ie*Ie),1/(We*We),1/(Be*Be)],maximumRadius:Math.max(Ie,We,Be),centerToleranceSquared:.1};xe.WGS84_CONSTANTS=h1});var On=S(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.fromCartographic=bn;we.fromCartographicToRadians=p1;we.fromCartographicToDegrees=v1;we.toCartographic=_n;we.toCartographicFromRadians=m1;we.toCartographicFromDegrees=g1;we.isWGS84=y1;var Se=pr(),ji=xn();function vr(e){return e}var d1=new Se.Vector3;function bn(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vr;return"longitude"in e?(r[0]=t(e.longitude),r[1]=t(e.latitude),r[2]=e.height):"x"in e?(r[0]=t(e.x),r[1]=t(e.y),r[2]=e.z):(r[0]=t(e[0]),r[1]=t(e[1]),r[2]=e[2]),r}function p1(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return bn(e,r,Se.config._cartographicRadians?vr:Se.toRadians)}function v1(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return bn(e,r,Se.config._cartographicRadians?Se.toDegrees:vr)}function _n(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vr;return"longitude"in r?(r.longitude=t(e[0]),r.latitude=t(e[1]),r.height=e[2]):"x"in r?(r.x=t(e[0]),r.y=t(e[1]),r.z=e[2]):(r[0]=t(e[0]),r[1]=t(e[1]),r[2]=e[2]),r}function m1(e,r){return _n(e,r,Se.config._cartographicRadians?vr:Se.toDegrees)}function g1(e,r){return _n(e,r,Se.config._cartographicRadians?Se.toRadians:vr)}function y1(e){if(!e)return!1;d1.from(e);var r=ji.WGS84_CONSTANTS.oneOverRadiiSquared,t=ji.WGS84_CONSTANTS.centerToleranceSquared,a=e[0]*e[0]*r[0],n=e[1]*e[1]*r[1],i=e[2]*e[2]*r[2];return Math.abs(a+n+i-1)<t}});var Zi=S(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.default=b1;var Et=pr(),mr=new Et.Vector3,M1=new Et.Vector3,x1=new Et.Vector3;function b1(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],a=r.oneOverRadii,n=r.oneOverRadiiSquared,i=r.centerToleranceSquared;mr.from(e);var s=mr.x,o=mr.y,c=mr.z,u=a.x,l=a.y,f=a.z,h=s*s*u*u,d=o*o*l*l,p=c*c*f*f,m=h+d+p,v=Math.sqrt(1/m);if(!!Number.isFinite(v)){var g=M1;if(g.copy(e).scale(v),m<i)return g.to(t);var b=n.x,y=n.y,M=n.z,T=x1;T.set(g.x*b*2,g.y*y*2,g.z*M*2);var _=(1-v)*mr.len()/(.5*T.len()),I=0,L,N,w,W;do{_-=I,L=1/(1+_*b),N=1/(1+_*y),w=1/(1+_*M);var C=L*L,B=N*N,P=w*w,j=C*L,he=B*N,de=P*w;W=h*C+d*B+p*P-1;var Ye=h*j*b+d*he*y+p*de*M,Ue=-2*Ye;I=W/Ue}while(Math.abs(W)>Et._MathUtils.EPSILON12);return mr.scale([L,N,w]).to(t)}}});var $i=S(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.default=R1;var te=pr(),Xi=1e-14,_1=new te.Vector3,Qi={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},kn={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},qe={east:new te.Vector3,north:new te.Vector3,up:new te.Vector3,west:new te.Vector3,south:new te.Vector3,down:new te.Vector3},O1=new te.Vector3,T1=new te.Vector3,k1=new te.Vector3;function R1(e,r,t,a,n,i){var s=Qi[r]&&Qi[r][t];(0,te.assert)(s&&(!a||a===s));var o,c,u,l=_1.copy(n),f=(0,te.equals)(l.x,0,Xi)&&(0,te.equals)(l.y,0,Xi);if(f){var h=Math.sign(l.z);o=O1.fromArray(kn[r]),r!=="east"&&r!=="west"&&o.scale(h),c=T1.fromArray(kn[t]),t!=="east"&&t!=="west"&&c.scale(h),u=k1.fromArray(kn[a]),a!=="east"&&a!=="west"&&u.scale(h)}else{var d=qe.up,p=qe.east,m=qe.north;p.set(-l.y,l.x,0).normalize(),e.geodeticSurfaceNormal(l,d),m.copy(d).cross(p);var v=qe.down,g=qe.west,b=qe.south;v.copy(d).scale(-1),g.copy(p).scale(-1),b.copy(m).scale(-1),o=qe[r],c=qe[t],u=qe[a]}return i[0]=o.x,i[1]=o.y,i[2]=o.z,i[3]=0,i[4]=c.x,i[5]=c.y,i[6]=c.z,i[7]=0,i[8]=u.x,i[9]=u.y,i[10]=u.z,i[11]=0,i[12]=l.x,i[13]=l.y,i[14]=l.z,i[15]=1,i}});var ts=S(Ct=>{"use strict";var gr=V(),A1=se();Object.defineProperty(Ct,"__esModule",{value:!0});Ct.default=void 0;var P1=gr(Tt()),S1=gr($()),w1=gr(J()),be=gr(kt()),z=pr(),Ji=E1(Le()),An=xn(),Hi=On(),q1=gr(Zi()),Ki=gr($i());function es(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(es=function(n){return n?t:r})(e)}function E1(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||A1(e)!=="object"&&typeof e!="function")return{default:e};var t=es(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}var Lt=new z.Vector3,rs=new z.Vector3,L1=new z.Vector3,fe=new z.Vector3,N1=new z.Vector3,Nt=new z.Vector3,Pn=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;(0,S1.default)(this,e),(0,be.default)(this,"radii",void 0),(0,be.default)(this,"radiiSquared",void 0),(0,be.default)(this,"radiiToTheFourth",void 0),(0,be.default)(this,"oneOverRadii",void 0),(0,be.default)(this,"oneOverRadiiSquared",void 0),(0,be.default)(this,"minimumRadius",void 0),(0,be.default)(this,"maximumRadius",void 0),(0,be.default)(this,"centerToleranceSquared",z._MathUtils.EPSILON1),(0,be.default)(this,"squaredXOverSquaredZ",void 0),(0,z.assert)(r>=0),(0,z.assert)(t>=0),(0,z.assert)(a>=0),this.radii=new z.Vector3(r,t,a),this.radiiSquared=new z.Vector3(r*r,t*t,a*a),this.radiiToTheFourth=new z.Vector3(r*r*r*r,t*t*t*t,a*a*a*a),this.oneOverRadii=new z.Vector3(r===0?0:1/r,t===0?0:1/t,a===0?0:1/a),this.oneOverRadiiSquared=new z.Vector3(r===0?0:1/(r*r),t===0?0:1/(t*t),a===0?0:1/(a*a)),this.minimumRadius=Math.min(r,t,a),this.maximumRadius=Math.max(r,t,a),this.radiiSquared.z!==0&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}return(0,w1.default)(e,[{key:"equals",value:function(t){return this===t||Boolean(t&&this.radii.equals(t.radii))}},{key:"toString",value:function(){return this.radii.toString()}},{key:"cartographicToCartesian",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0],n=rs,i=L1,s=(0,P1.default)(t,3),o=s[2];this.geodeticSurfaceNormalCartographic(t,n),i.copy(this.radiiSquared).scale(n);var c=Math.sqrt(n.dot(i));return i.scale(1/c),n.scale(o),i.add(n),i.to(a)}},{key:"cartesianToCartographic",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];Nt.from(t);var n=this.scaleToGeodeticSurface(Nt,fe);if(!!n){var i=this.geodeticSurfaceNormal(n,rs),s=N1;s.copy(Nt).subtract(n);var o=Math.atan2(i.y,i.x),c=Math.asin(i.z),u=Math.sign(Ji.dot(s,Nt))*Ji.length(s);return(0,Hi.toCartographicFromRadians)([o,c,u],a)}}},{key:"eastNorthUpToFixedFrame",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new z.Matrix4;return(0,Ki.default)(this,"east","north","up",t,a)}},{key:"localFrameToFixedFrame",value:function(t,a,n,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new z.Matrix4;return(0,Ki.default)(this,t,a,n,i,s)}},{key:"geocentricSurfaceNormal",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return Lt.from(t).normalize().to(a)}},{key:"geodeticSurfaceNormalCartographic",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0],n=(0,Hi.fromCartographicToRadians)(t),i=n[0],s=n[1],o=Math.cos(s);return Lt.set(o*Math.cos(i),o*Math.sin(i),Math.sin(s)).normalize(),Lt.to(a)}},{key:"geodeticSurfaceNormal",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return Lt.from(t).scale(this.oneOverRadiiSquared).normalize().to(a)}},{key:"scaleToGeodeticSurface",value:function(t,a){return(0,q1.default)(t,this,a)}},{key:"scaleToGeocentricSurface",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];fe.from(t);var n=fe.x,i=fe.y,s=fe.z,o=this.oneOverRadiiSquared,c=1/Math.sqrt(n*n*o.x+i*i*o.y+s*s*o.z);return fe.multiplyScalar(c).to(a)}},{key:"transformPositionToScaledSpace",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return fe.from(t).scale(this.oneOverRadii).to(a)}},{key:"transformPositionFromScaledSpace",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return fe.from(t).scale(this.radii).to(a)}},{key:"getSurfaceNormalIntersectionWithZAxis",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,0];(0,z.assert)((0,z.equals)(this.radii.x,this.radii.y,z._MathUtils.EPSILON15)),(0,z.assert)(this.radii.z>0),fe.from(t);var i=fe.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(i)>=this.radii.z-a))return fe.set(0,0,i).to(n)}}]),e}();Ct.default=Pn;(0,be.default)(Pn,"WGS84",new Pn(An.WGS84_RADIUS_X,An.WGS84_RADIUS_Y,An.WGS84_RADIUS_Z))});var ns=S(It=>{"use strict";var C1=V();Object.defineProperty(It,"__esModule",{value:!0});Object.defineProperty(It,"Ellipsoid",{enumerable:!0,get:function(){return I1.default}});Object.defineProperty(It,"isWGS84",{enumerable:!0,get:function(){return W1.isWGS84}});var I1=C1(ts()),W1=On()});function Bt(e,r=!0,t){let a=t||new Set;if(e){if(Fn(e))a.add(e);else if(Fn(e.buffer))a.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let n in e)Bt(e[n],r,a)}}return t===void 0?Array.from(a):[]}function Fn(e){return e?e instanceof ArrayBuffer||typeof MessagePort!="undefined"&&e instanceof MessagePort||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas:!1}function Ge(){let parentPort;try{eval("globalThis.parentPort = require('worker_threads').parentPort"),parentPort=globalThis.parentPort}catch{}return parentPort}var Dt=new Map,K=class{static inWorkerThread(){return typeof self!="undefined"||Boolean(Ge())}static set onmessage(r){function t(n){let i=Ge(),{type:s,payload:o}=i?n:n.data;r(s,o)}let a=Ge();a?(a.on("message",t),a.on("exit",()=>console.debug("Node worker closing"))):globalThis.onmessage=t}static addEventListener(r){let t=Dt.get(r);t||(t=n=>{if(!bs(n))return;let i=Ge(),{type:s,payload:o}=i?n:n.data;r(s,o)}),Ge()?console.error("not implemented"):globalThis.addEventListener("message",t)}static removeEventListener(r){let t=Dt.get(r);Dt.delete(r),Ge()?console.error("not implemented"):globalThis.removeEventListener("message",t)}static postMessage(r,t){let a={source:"loaders.gl",type:r,payload:t},n=Bt(t),i=Ge();i?i.postMessage(a,n):globalThis.postMessage(a,n)}};function bs(e){let{type:r,data:t}=e;return r==="message"&&t&&typeof t.source=="string"&&t.source.startsWith("loaders.gl")}var Ur=class{constructor(){this._values=[],this._settlers=[],this._closed=!1}[Symbol.asyncIterator](){return this}push(r){return this.enqueue(r)}enqueue(r){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");let t=this._settlers.shift();r instanceof Error?t.reject(r):t.resolve({value:r})}else this._values.push(r)}close(){for(;this._settlers.length>0;)this._settlers.shift().resolve({done:!0});this._closed=!0}next(){if(this._values.length>0){let r=this._values.shift();return r instanceof Error?Promise.reject(r):Promise.resolve({done:!1,value:r})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0,value:void 0})}return new Promise((r,t)=>{this._settlers.push({resolve:r,reject:t})})}};var _s=0,Gr,zn;function Ft(e,r){if(!K.inWorkerThread())return;let t={process:Os};K.onmessage=async(a,n)=>{try{switch(a){case"process":if(!e)throw new Error("Worker does not support atomic processing");let i=await e(n.input,n.options||{},t);K.postMessage("done",{result:i});break;case"process-in-batches":if(!r)throw new Error("Worker does not support batched processing");Gr=new Ur,zn=n.options||{};let s=r(Gr,zn,t);for await(let o of s)K.postMessage("output-batch",{result:o});K.postMessage("done",{});break;case"input-batch":Gr.push(n.input);break;case"input-done":Gr.close();break;default:}}catch(i){let s=i instanceof Error?i.message:"";K.postMessage("error",{error:s})}}}function Os(e,r={}){return new Promise((t,a)=>{let n=_s++,i=(o,c)=>{if(c.id===n)switch(o){case"done":K.removeEventListener(i),t(c.result);break;case"error":K.removeEventListener(i),a(c.error);break;default:}};K.addEventListener(i);let s={id:n,input:e,options:r};K.postMessage("process",s)})}function Ee(e,r){if(!e)throw new Error(r||"loader assertion failed.")}function _e(e,r){return Ee(e>=0),Ee(r>0),e+(r-1)&~(r-1)}function zt(e,r,t){let a;if(e instanceof ArrayBuffer)a=new Uint8Array(e);else{let n=e.byteOffset,i=e.byteLength;a=new Uint8Array(e.buffer||e.arrayBuffer,n,i)}return r.set(a,t),t+_e(a.byteLength,4)}function Vr(e,r,t,a){let n=_e(t.byteLength,a),i=n-t.byteLength;if(e){let s=new Uint8Array(e.buffer,e.byteOffset+r,t.byteLength),o=new Uint8Array(t);s.set(o);for(let c=0;c<i;++c)e.setUint8(r+t.byteLength+c,32)}return r+=n,r}function rr(e,r,t,a){let i=new TextEncoder().encode(t);return r=Vr(e,r,i,a),r}function Yt(e,r){let t=e.length,n=Math.ceil(t/r)*r-t,i="";for(let s=0;s<n;++s)i+=" ";return e+i}function tr(e,r,t,a){if(e)for(let n=0;n<a;n++)e.setUint8(r+n,t.charCodeAt(n));return r+a}function Mr(e,r,t,a){if(e)for(let n=0;n<a;n++)e.setUint8(r+n,t[n]);return r+a}function jr(e,r,t){if(r.encodeSync)return r.encodeSync(e,t);throw new Error("Writer could not synchronously encode data")}var Yn="3.3.0-alpha.8";var pe=!1,xr=!0;function Ut(e){let r=br(e);return Ts(r)||As(r)||ks(r)||Rs(r)}function Ts(e){let r=br(e);return r.byteLength>=24&&r.getUint32(0,pe)===2303741511?{mimeType:"image/png",width:r.getUint32(16,pe),height:r.getUint32(20,pe)}:null}function ks(e){let r=br(e);return r.byteLength>=10&&r.getUint32(0,pe)===1195984440?{mimeType:"image/gif",width:r.getUint16(6,xr),height:r.getUint16(8,xr)}:null}function Rs(e){let r=br(e);return r.byteLength>=14&&r.getUint16(0,pe)===16973&&r.getUint32(2,xr)===r.byteLength?{mimeType:"image/bmp",width:r.getUint32(18,xr),height:r.getUint32(22,xr)}:null}function As(e){let r=br(e);if(!(r.byteLength>=3&&r.getUint16(0,pe)===65496&&r.getUint8(2)===255))return null;let{tableMarkers:a,sofMarkers:n}=Ps(),i=2;for(;i+9<r.byteLength;){let s=r.getUint16(i,pe);if(n.has(s))return{mimeType:"image/jpeg",height:r.getUint16(i+5,pe),width:r.getUint16(i+7,pe)};if(!a.has(s))return null;i+=2,i+=r.getUint16(i,pe)}return null}function Ps(){let e=new Set([65499,65476,65484,65501,65534]);for(let t=65504;t<65520;++t)e.add(t);let r=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:r}}function br(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}function Ve(e,r){if(!e)throw new Error(r||"assert failed: gltf")}var Un=["SCALAR","VEC2","VEC3","VEC4"],Ss=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],ws=new Map(Ss),qs={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Es={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Ls={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Gn(e){return Un[e-1]||Un[0]}function Vn(e){let r=ws.get(e.constructor);if(!r)throw new Error("Illegal typed array");return r}function jn(e,r){let t=Ls[e.componentType],a=qs[e.type],n=Es[e.componentType],i=e.count*a,s=e.count*a*n;return Ve(s>=0&&s<=r.byteLength),{ArrayType:t,length:i,byteLength:s}}var Ns={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]},_r=class{constructor(r){this.gltf=r||{json:Q({},Ns),buffers:[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(r){return this.json[r]}getExtraData(r){return(this.json.extras||{})[r]}getExtension(r){let t=this.getUsedExtensions().find(n=>n===r),a=this.json.extensions||{};return t?a[r]||!0:null}getRequiredExtension(r){return this.getRequiredExtensions().find(a=>a===r)?this.getExtension(r):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(r,t){return(r.extensions||{})[t]}getScene(r){return this.getObject("scenes",r)}getNode(r){return this.getObject("nodes",r)}getSkin(r){return this.getObject("skins",r)}getMesh(r){return this.getObject("meshes",r)}getMaterial(r){return this.getObject("materials",r)}getAccessor(r){return this.getObject("accessors",r)}getTexture(r){return this.getObject("textures",r)}getSampler(r){return this.getObject("samplers",r)}getImage(r){return this.getObject("images",r)}getBufferView(r){return this.getObject("bufferViews",r)}getBuffer(r){return this.getObject("buffers",r)}getObject(r,t){if(typeof t=="object")return t;let a=this.json[r]&&this.json[r][t];if(!a)throw new Error(`glTF file error: Could not find ${r}[${t}]`);return a}getTypedArrayForBufferView(r){r=this.getBufferView(r);let t=r.buffer,a=this.gltf.buffers[t];Ve(a);let n=(r.byteOffset||0)+a.byteOffset;return new Uint8Array(a.arrayBuffer,n,r.byteLength)}getTypedArrayForAccessor(r){r=this.getAccessor(r);let t=this.getBufferView(r.bufferView),n=this.getBuffer(t.buffer).data,{ArrayType:i,length:s}=jn(r,t),o=t.byteOffset+r.byteOffset;return new i(n,o,s)}getTypedArrayForImageData(r){r=this.getAccessor(r);let t=this.getBufferView(r.bufferView),n=this.getBuffer(t.buffer).data,i=t.byteOffset||0;return new Uint8Array(n,i,t.byteLength)}addApplicationData(r,t){return this.json[r]=t,this}addExtraData(r,t){return this.json.extras=this.json.extras||{},this.json.extras[r]=t,this}addObjectExtension(r,t,a){return r.extensions=r.extensions||{},r.extensions[t]=a,this.registerUsedExtension(t),this}setObjectExtension(r,t,a){let n=r.extensions||{};n[t]=a}removeObjectExtension(r,t){let a=r.extensions||{},n=a[t];return delete a[t],n}addExtension(r,t={}){return Ve(t),this.json.extensions=this.json.extensions||{},this.json.extensions[r]=t,this.registerUsedExtension(r),t}addRequiredExtension(r,t={}){return Ve(t),this.addExtension(r,t),this.registerRequiredExtension(r),t}registerUsedExtension(r){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(t=>t===r)||this.json.extensionsUsed.push(r)}registerRequiredExtension(r){this.registerUsedExtension(r),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(t=>t===r)||this.json.extensionsRequired.push(r)}removeExtension(r){if(!this.getExtension(r))return;this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,r),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,r),this.json.extensions&&delete this.json.extensions[r],Array.isArray(this.json.extensionsRemoved)||(this.json.extensionsRemoved=[]);let t=this.json.extensionsRemoved;t.includes(r)||t.push(r)}setDefaultScene(r){this.json.scene=r}addScene(r){let{nodeIndices:t}=r;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}addNode(r){let{meshIndex:t,matrix:a}=r;this.json.nodes=this.json.nodes||[];let n={mesh:t};return a&&(n.matrix=a),this.json.nodes.push(n),this.json.nodes.length-1}addMesh(r){let{attributes:t,indices:a,material:n,mode:i=4}=r,o={primitives:[{attributes:this._addAttributes(t),mode:i}]};if(a){let c=this._addIndices(a);o.primitives[0].indices=c}return Number.isFinite(n)&&(o.primitives[0].material=n),this.json.meshes=this.json.meshes||[],this.json.meshes.push(o),this.json.meshes.length-1}addPointCloud(r){let a={primitives:[{attributes:this._addAttributes(r),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(a),this.json.meshes.length-1}addImage(r,t){let a=Ut(r),n=t||(a==null?void 0:a.mimeType),s={bufferView:this.addBufferView(r),mimeType:n};return this.json.images=this.json.images||[],this.json.images.push(s),this.json.images.length-1}addBufferView(r){let t=r.byteLength;Ve(Number.isFinite(t)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(r);let a={buffer:0,byteOffset:this.byteLength,byteLength:t};return this.byteLength+=_e(t,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(a),this.json.bufferViews.length-1}addAccessor(r,t){let a={bufferView:r,type:Gn(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(a),this.json.accessors.length-1}addBinaryBuffer(r,t={size:3}){let a=this.addBufferView(r),n={min:t.min,max:t.max};(!n.min||!n.max)&&(n=this._getAccessorMinMax(r,t.size));let i={size:t.size,componentType:Vn(r),count:Math.round(r.length/t.size),min:n.min,max:n.max};return this.addAccessor(a,Object.assign(i,t))}addTexture(r){let{imageIndex:t}=r,a={source:t};return this.json.textures=this.json.textures||[],this.json.textures.push(a),this.json.textures.length-1}addMaterial(r){return this.json.materials=this.json.materials||[],this.json.materials.push(r),this.json.materials.length-1}createBinaryChunk(){var i,s;this.gltf.buffers=[];let r=this.byteLength,t=new ArrayBuffer(r),a=new Uint8Array(t),n=0;for(let o of this.sourceBuffers||[])n=zt(o,a,n);((s=(i=this.json)==null?void 0:i.buffers)==null?void 0:s[0])?this.json.buffers[0].byteLength=r:this.json.buffers=[{byteLength:r}],this.gltf.binary=t,this.sourceBuffers=[t]}_removeStringFromArray(r,t){let a=!0;for(;a;){let n=r.indexOf(t);n>-1?r.splice(n,1):a=!1}}_addAttributes(r={}){let t={};for(let a in r){let n=r[a],i=this._getGltfAttributeName(a),s=this.addBinaryBuffer(n.value,n);t[i]=s}return t}_addIndices(r){return this.addBinaryBuffer(r,{size:1})}_getGltfAttributeName(r){switch(r.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return r}}_getAccessorMinMax(r,t){let a={min:null,max:null};if(r.length<t)return a;a.min=[],a.max=[];let n=r.subarray(0,t);for(let i of n)a.min.push(i),a.max.push(i);for(let i=t;i<r.length;i+=t)for(let s=0;s<t;s++)a.min[0+s]=Math.min(a.min[0+s],r[i+s]),a.max[0+s]=Math.max(a.max[0+s],r[i+s]);return a}};var o1=1179937895,c1=1313821514,u1=5130562,Me=!0;function gn(e,r,t=0,a={}){let{magic:n=o1,version:i=2,json:s={},binary:o}=e,c=t;r&&(r.setUint32(t+0,n,Me),r.setUint32(t+4,i,Me),r.setUint32(t+8,0,Me));let u=t+8;t+=12;let l=t;r&&(r.setUint32(t+0,0,Me),r.setUint32(t+4,c1,Me)),t+=8;let f=JSON.stringify(s);if(t=rr(r,t,f,4),r){let h=t-l-8;r.setUint32(l+0,h,Me)}if(o){let h=t;if(r&&(r.setUint32(t+0,0,Me),r.setUint32(t+4,u1,Me)),t+=8,t=Vr(r,t,o,4),r){let d=t-h-8;r.setUint32(h+0,d,Me)}}if(r){let h=t-c;r.setUint32(u,h,Me)}return t}function yn(e,r,t,a){return l1(e),gn(e,r,t,a)}function l1(e,{firstBuffer:r=0}={}){if(e.buffers&&e.buffers.length>r)throw new Error("encodeGLTF: multiple buffers not yet implemented")}var Mn={name:"glTF",id:"gltf",module:"gltf",version:Yn,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,encodeSync:f1,options:{gltf:{}}};function f1(e,r={}){let{byteOffset:t=0}=r,a=yn(e,null,t,r),n=new ArrayBuffer(a),i=new DataView(n);return yn(e,i,t,r),n}var as="3.3.0-alpha.8";var yr={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect",GLTF:"glTF"},Cp=Object.keys(yr),De={BATCHED_MODEL:[98,51,100,109],INSTANCED_MODEL:[105,51,100,109],POINT_CLOUD:[112,110,116,115],COMPOSITE:[99,109,112,116]};function Fe(e,r,t){let a=12;if(!r)return t+a;let{magic:n,version:i=1,byteLength:s=12}=e;return Ee(Array.isArray(n)&&Number.isFinite(i)&&Number.isFinite(s)),r.setUint8(t+0,n[0]),r.setUint8(t+1,n[1]),r.setUint8(t+2,n[2]),r.setUint8(t+3,n[3]),r.setUint32(t+4,i,!0),r.setUint32(t+8,s,!0),t+=a,t}function ze(e,r,t){!e||e.setUint32(r+8,t,!0)}function is(e,r,t,a,n){e=Q({magic:De.COMPOSITE,tiles:[]},e);let i=t;t+=Fe(e,r,t),r&&r.setUint32(t,e.tiles.length,!0),t+=4;for(let s=0;s<e.tiles.length;++s)t+=n(e.tiles[s],r,t,a);return ze(r,i,t-i),t}function ss(e,r,t,a){let{featuresLength:n=0,batchTable:i}=e,s={BATCH_LENGTH:n},o=JSON.stringify(s),c=i?JSON.stringify(i):"",u=_e(o.length,8),l=c?_e(c.length,8):0;e=Q({magic:De.BATCHED_MODEL},e);let f=t;t=Fe(e,r,t),r&&(r.setUint32(12,u,!0),r.setUint32(16,0,!0),r.setUint32(20,l,!0),r.setUint32(24,0,!0)),t+=16,t=rr(r,t,o,8),i&&(t=rr(r,t,c,8));let h=e.gltfEncoded;return h&&(t=Mr(r,t,h,h.byteLength)),ze(r,f,t-f),t}function os(e,r,t,a){let{featuresLength:n=1,gltfFormat:i=1,gltfUri:s=""}=e,o=s.length,c={INSTANCES_LENGTH:n,POSITION:new Array(n*3).fill(0)},u=JSON.stringify(c),l=u.length;e=Q({magic:De.INSTANCED_MODEL},e);let f=t;return t=Fe(e,r,0),r&&(r.setUint32(12,l,!0),r.setUint32(16,0,!0),r.setUint32(20,0,!0),r.setUint32(24,0,!0),r.setUint32(28,i,!0)),t+=20,t+=tr(r,t,u,l),t+=tr(r,t,s,o),ze(r,f,t-f),t}var B1={POINTS_LENGTH:1,POSITIONS:{byteOffset:0}};function cs(e,r,t,a){let{featureTableJson:n=B1}=e,i=JSON.stringify(n);i=Yt(i,4);let{featureTableJsonByteLength:s=i.length}=e,o=new ArrayBuffer(12),c=o.byteLength;e=Q({magic:De.POINT_CLOUD},e);let u=t;return t+=Fe(e,r,0),r&&(r.setUint32(t+0,s,!0),r.setUint32(t+4,c,!0),r.setUint32(t+8,0,!0),r.setUint32(t+12,0,!0)),t+=16,t+=tr(r,t,i,s),t+=Mr(r,t,o,c),ze(r,u,t-u),t}function Sn(e,r){let t=wn(e,null,0,r),a=new ArrayBuffer(t),n=new DataView(a);return wn(e,n,0,r),a}function wn(e,r,t,a){switch(Ee(typeof e.type=="string"),e.type){case yr.COMPOSITE:return is(e,r,t,a,wn);case yr.POINT_CLOUD:return cs(e,r,t,a);case yr.BATCHED_3D_MODEL:return ss(e,r,t,a);case yr.INSTANCED_3D_MODEL:return os(e,r,t,a);default:throw new Error("3D Tiles: unknown tile type")}}var qn={name:"3D Tile",id:"3d-tiles",module:"3d-tiles",version:as,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],encodeSync:D1,binary:!0,options:{["3d-tiles"]:{}}};function D1(e,r){return Sn(e,r)}var er=Dn(pr()),ls=Dn(ns());function us(e,r){let t=new Float32Array(e.length),a=z1(r);for(let n=0;n<e.length;n+=2){let i=e.subarray(n,n+2),s=a.slice(n*2,n*2+4),o=F1([i[0],i[1]]),c=[s[2]-s[0],s[3]-s[1]],u=[o[0]*c[0],o[1]*c[1]],l=[u[0]+s[0],u[1]+s[1]];t[n]=l[0],t[n+1]=l[1]}return t}function F1(e){return[e[0]-Math.floor(e[0]),e[1]-Math.floor(e[1])]}function z1(e){let r=65535,t=[];for(let a=0;a<e.length;a++)t[a]=e[a]/r;return t}var Y1=new er.Matrix4([1,0,0,0,0,0,-1,0,0,1,0,0,0,0,0,1]),fs=new er.Vector3,Wt=class{async convert(r,t=null){let a=await this.buildGltf(r,t);return jr({gltfEncoded:new Uint8Array(a),type:"b3dm",featuresLength:this._getFeaturesLength(t),batchTable:t},qn)}async buildGltf(r,t){let{tileContent:a,textureFormat:n}=r,{material:i,attributes:s,indices:o,cartesianOrigin:c,cartographicOrigin:u,modelMatrix:l}=a,f=new _r,h=await this._addI3sTextureToGltf(a,n,f),d=this._convertI3sMaterialToGltfMaterial(i,h),p=f.addMaterial(d),m=s.positions,v=m.value;s.uvRegions&&s.texCoords&&(s.texCoords.value=us(s.texCoords.value,s.uvRegions.value)),s.positions.value=this._normalizePositions(v,c,u,l),this._createBatchIds(a,t),s.normals&&!this._checkNormals(s.normals.value)&&delete s.normals;let g=o||this._generateSynteticIndices(v.length/m.size),b=f.addMesh({attributes:s,indices:g,material:p,mode:4}),y=this._generateTransformMatrix(c),M=f.addNode({meshIndex:b,matrix:y}),T=f.addScene({nodeIndices:[M]});return f.setDefaultScene(T),f.createBinaryChunk(),jr(f.gltf,Mn)}async _addI3sTextureToGltf(r,t,a){let{texture:n,material:i,attributes:s}=r,o=null,c=n;if(!n&&i&&(c=i.pbrMetallicRoughness&&i.pbrMetallicRoughness.baseColorTexture&&i.pbrMetallicRoughness.baseColorTexture.texture.source.image),c){let u=this._deduceMimeTypeFromFormat(t),l=a.addImage(c,u);o=a.addTexture({imageIndex:l}),delete s.colors}return o}_normalizePositions(r,t,a,n){let i=new Float32Array(r.length);for(let s=0;s<r.length;s+=3){let o=r.subarray(s,s+3),c=new er.Vector3(t),u=new er.Vector3(Array.from(o)).transform(n).add(a);ls.Ellipsoid.WGS84.cartographicToCartesian(u,fs),u=fs.subtract(c),i.set(u,s)}return i}_generateTransformMatrix(r){return new er.Matrix4().translate(r).multiplyLeft(Y1)}_createBatchIds(r,t){let{featureIds:a}=r,{OBJECTID:n}=t||{};if(!(!a||!n)){for(let i=0;i<a.length;i++){let s=a[i],o=n.indexOf(s);a[i]=o}r.attributes._BATCHID={size:1,byteOffset:0,value:a}}}_generateSynteticIndices(r){let t=new Uint32Array(r);for(let a=0;a<r;a++)t.set([a],a);return t}_deduceMimeTypeFromFormat(r){switch(r){case"jpg":return"image/jpeg";case"png":return"image/png";case"ktx2":return"image/ktx2";default:return console.warn(`Unexpected texture format in I3S: ${r}`),"image/jpeg"}}_convertI3sMaterialToGltfMaterial(r,t){let a=t!==null;return r?(t!==null&&(r=this._setGltfTexture(r,t)),r):(r={alphaMode:"OPAQUE",doubleSided:!1,pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1}},a?r.pbrMetallicRoughness.baseColorTexture={index:t,texCoord:0}:r.pbrMetallicRoughness.baseColorFactor=[1,1,1,1],r)}_setGltfTexture(r,t){let a=Bn(Q({},r),{pbrMetallicRoughness:Q({},r.pbrMetallicRoughness)});return r.pbrMetallicRoughness&&r.pbrMetallicRoughness.baseColorTexture?a.pbrMetallicRoughness.baseColorTexture={index:t,texCoord:0}:r.emissiveTexture?a.emissiveTexture={index:t,texCoord:0}:r.pbrMetallicRoughness&&r.pbrMetallicRoughness.metallicRoughnessTexture?a.pbrMetallicRoughness.metallicRoughnessTexture={index:t,texCoord:0}:r.normalTexture?a.normalTexture={index:t,texCoord:0}:r.occlusionTexture&&(a.occlusionTexture={index:t,texCoord:0}),a}_getFeaturesLength(r){if(!r)return 0;let t=Object.keys(r)[0];return t?r[t].length:0}_checkNormals(r){return r.find(t=>t)}};var U1=new Wt;Ft(async(e,r={})=>U1.convert(e,r.featureAttributes));
|
|
3
3
|
//# sourceMappingURL=3d-tiles-attributes-worker.js.map
|