!function(t,e){"object"==typeofexports&&"undefined"!=typeofmodule?e(exports):"function"==typeofdefine&&define.amd?define(["exports"],e):e((t="undefined"!=typeofglobalThis?globalThis:t||self).THREE={})}(this,(function(t){"use strict";conste="130",n=100,i=300,r=301,s=302,a=303,o=304,l=306,c=307,h=1e3,u=1001,d=1002,p=1003,m=1004,f=1005,g=1006,v=1007,y=1008,x=1009,_=1012,b=1014,M=1015,w=1016,S=1020,T=1022,E=1023,A=1026,L=1027,R=33776,C=33777,P=33778,D=33779,I=35840,N=35841,B=35842,z=35843,F=37492,O=37496,H=2300,U=2301,G=2302,k=2400,V=2401,W=2402,j=2500,q=2501,X=3e3,Y=3001,J=3007,Z=3002,Q=3004,K=3005,$=3006,tt=7680,et=35044,nt=35048,it="300 es";classrt{addEventListener(t,e){void0===this._listeners&&(this._listeners={});constn=this._listeners;void0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)}hasEventListener(t,e){if(void0===this._listeners)return!1;constn=this._listeners;returnvoid0!==n[t]&&-1!==n[t].indexOf(e)}removeEventListener(t,e){if(void0===this._listeners)return;constn=this._listeners[t];if(void0!==n){constt=n.indexOf(e);-1!==t&&n.splice(t,1)}}dispatchEvent(t){if(void0===this._listeners)return;conste=this._listeners[t.type];if(void0!==e){t.target=this;constn=e.slice(0);for(lete=0,i=n.length;e<i;e++)n[e].call(this,t);t.target=null}}}constst=[];for(lett=0;t<256;t++)st[t]=(t<16?"0":"")+t.toString(16);letat=1234567;constot=Math.PI/180,lt=180/Math.PI;functionct(){constt=4294967295*Math.random()|0,e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(st[255&t]+st[t>>8&255]+st[t>>16&255]+st[t>>24&255]+"-"+st[255&e]+st[e>>8&255]+"-"+st[e>>16&15|64]+st[e>>24&255]+"-"+st[63&n|128]+st[n>>8&255]+"-"+st[n>>16&255]+st[n>>24&255]+st[255&i]+st[i>>8&255]+st[i>>16&255]+st[i>>24&255]).toUpperCase()}functionht(t,e,n){returnMath.max(e,Math.min(n,t))}functionut(t,e){return(t%e+e)%e}functiondt(t,e,n){return(1-n)*t+n*e}functionpt(t){return0==(t&t-1)&&0!==t}functionmt(t){returnMath.pow(2,Math.ceil(Math.log(t)/Math.LN2))}functionft(t){returnMath.pow(2,Math.floor(Math.log(t)/Math.LN2))}vargt=Object.freeze({__proto__:null,DEG2RAD:ot,RAD2DEG:lt,generateUUID:ct,clamp:ht,euclideanModulo:ut,mapLinear:function(t,e,n,i,r){returni+(t-e)*(r-i)/(n-e)},inverseLerp:function(t,e,n){returnt!==e?(n-t)/(e-t):0},lerp:dt,damp:function(t,e,n,i){returndt(t,e,1-Math.exp(-n*i))},pingpong:function(t,e=1){returne-Math.abs(ut(t,2*e)-e)},smoothstep:function(t,e,n){returnt<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){returnt<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){returnt+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){returnt+Math.random()*(e-t)},randFloatSpread:function(t){returnt*(.5-Math.random())},seededRandom:function(t){returnvoid0!==t&&(at=t%2147483647),at=16807*at%2147483647,(at-1)/2147483646},degToRad:function(t){returnt*ot},radToDeg:function(t){returnt*lt},isPowerOfTwo:pt,ceilPowerOfTwo:mt,floorPowerOfTwo:ft,setQuaternionFromProperEuler:function(t,e,n,i,r){consts=Math.cos,a=Math.sin,o=s(n/2),l=a(n/2),c=s((e+i)/2),h=a((e+i)/2),u=s((e-i)/2),d=a((e-i)/2),p=s((i-e)/2),m=a((i-e)/2);switch(r){case"XYX":t.set(o*h,l*u,l*d,o*c);break;case"YZY":t.set(l*d,o*h,l*u,o*c);break;case"ZXZ":t.set(l*u,l*d,o*h,o*c);break;case"XZX":t.set(o*h,l*m,l*p,o*c);break;case"YXY":t.set(l*p,o*h,l*m,o*c);break;case"ZYZ":t.set(l*m,l*p,o*h,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}});classvt{constructor(t=0,e=0){this.x=t,this.y=e}getwidth(){returnthis.x}setwidth(t){this.x=t}getheight(){returnthis.y}setheight(t){this.y=t}set(t,e){returnthis.x=t,this.y=e,this}setScalar(t){returnthis.x=t,this.y=t,this}setX(t){returnthis.x=t,this}setY(t){returnthis.y=t,this}setComponent(t,e){switch(t){case0:this.x=e;break;case1:this.y=e;break;default:thrownewError("index is out of range: "+t)}returnthis}getComponent(t){switch(t){case0:returnthis.x;case1:returnthis.y;default:thrownewError("index is out of range: "+t)}}clone(){returnnewthis.constructor(thi