@netless/app-slide 0.0.2 → 0.0.3

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/main.iife.js CHANGED
@@ -1,16 +1,16 @@
1
- (()=>{var eR=Object.defineProperty;var oS=Object.getOwnPropertySymbols;var tR=Object.prototype.hasOwnProperty,nR=Object.prototype.propertyIsEnumerable;var sS=(Xr,zn,fr)=>zn in Xr?eR(Xr,zn,{enumerable:!0,configurable:!0,writable:!0,value:fr}):Xr[zn]=fr,aS=(Xr,zn)=>{for(var fr in zn||(zn={}))tR.call(zn,fr)&&sS(Xr,fr,zn[fr]);if(oS)for(var fr of oS(zn))nR.call(zn,fr)&&sS(Xr,fr,zn[fr]);return Xr};var sR=function(Xr){"use strict";var zn=function(I){var O={};function v(b){if(O[b])return O[b].exports;var q=O[b]={i:b,l:!1,exports:{}};return I[b].call(q.exports,q,q.exports,v),q.l=!0,q.exports}return v.m=I,v.c=O,v.d=function(b,q,B){v.o(b,q)||Object.defineProperty(b,q,{enumerable:!0,get:B})},v.r=function(b){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(b,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(b,"__esModule",{value:!0})},v.t=function(b,q){if(1&q&&(b=v(b)),8&q||4&q&&typeof b=="object"&&b&&b.__esModule)return b;var B=Object.create(null);if(v.r(B),Object.defineProperty(B,"default",{enumerable:!0,value:b}),2&q&&typeof b!="string")for(var ie in b)v.d(B,ie,function(k){return b[k]}.bind(null,ie));return B},v.n=function(b){var q=b&&b.__esModule?function(){return b.default}:function(){return b};return v.d(q,"a",q),q},v.o=function(b,q){return Object.prototype.hasOwnProperty.call(b,q)},v.p="",v(v.s=27)}([function(I,O,v){var b=Object.prototype.hasOwnProperty,q="~";function B(){}function ie(K,le,Ee){this.fn=K,this.context=le,this.once=Ee||!1}function k(K,le,Ee,Xe,Fe){if(typeof Ee!="function")throw new TypeError("The listener must be a function");var S=new ie(Ee,Xe||K,Fe),A=q?q+le:le;return K._events[A]?K._events[A].fn?K._events[A]=[K._events[A],S]:K._events[A].push(S):(K._events[A]=S,K._eventsCount++),K}function oe(K,le){--K._eventsCount==0?K._events=new B:delete K._events[le]}function X(){this._events=new B,this._eventsCount=0}Object.create&&(B.prototype=Object.create(null),new B().__proto__||(q=!1)),X.prototype.eventNames=function(){var K,le,Ee=[];if(this._eventsCount===0)return Ee;for(le in K=this._events)b.call(K,le)&&Ee.push(q?le.slice(1):le);return Object.getOwnPropertySymbols?Ee.concat(Object.getOwnPropertySymbols(K)):Ee},X.prototype.listeners=function(K){var le=q?q+K:K,Ee=this._events[le];if(!Ee)return[];if(Ee.fn)return[Ee.fn];for(var Xe=0,Fe=Ee.length,S=new Array(Fe);Xe<Fe;Xe++)S[Xe]=Ee[Xe].fn;return S},X.prototype.listenerCount=function(K){var le=q?q+K:K,Ee=this._events[le];return Ee?Ee.fn?1:Ee.length:0},X.prototype.emit=function(K,le,Ee,Xe,Fe,S){var A=q?q+K:K;if(!this._events[A])return!1;var L,j,D=this._events[A],z=arguments.length;if(D.fn){switch(D.once&&this.removeListener(K,D.fn,void 0,!0),z){case 1:return D.fn.call(D.context),!0;case 2:return D.fn.call(D.context,le),!0;case 3:return D.fn.call(D.context,le,Ee),!0;case 4:return D.fn.call(D.context,le,Ee,Xe),!0;case 5:return D.fn.call(D.context,le,Ee,Xe,Fe),!0;case 6:return D.fn.call(D.context,le,Ee,Xe,Fe,S),!0}for(j=1,L=new Array(z-1);j<z;j++)L[j-1]=arguments[j];D.fn.apply(D.context,L)}else{var W,ee=D.length;for(j=0;j<ee;j++)switch(D[j].once&&this.removeListener(K,D[j].fn,void 0,!0),z){case 1:D[j].fn.call(D[j].context);break;case 2:D[j].fn.call(D[j].context,le);break;case 3:D[j].fn.call(D[j].context,le,Ee);break;case 4:D[j].fn.call(D[j].context,le,Ee,Xe);break;default:if(!L)for(W=1,L=new Array(z-1);W<z;W++)L[W-1]=arguments[W];D[j].fn.apply(D[j].context,L)}}return!0},X.prototype.on=function(K,le,Ee){return k(this,K,le,Ee,!1)},X.prototype.once=function(K,le,Ee){return k(this,K,le,Ee,!0)},X.prototype.removeListener=function(K,le,Ee,Xe){var Fe=q?q+K:K;if(!this._events[Fe])return this;if(!le)return oe(this,Fe),this;var S=this._events[Fe];if(S.fn)S.fn!==le||Xe&&!S.once||Ee&&S.context!==Ee||oe(this,Fe);else{for(var A=0,L=[],j=S.length;A<j;A++)(S[A].fn!==le||Xe&&!S[A].once||Ee&&S[A].context!==Ee)&&L.push(S[A]);L.length?this._events[Fe]=L.length===1?L[0]:L:oe(this,Fe)}return this},X.prototype.removeAllListeners=function(K){var le;return K?(le=q?q+K:K,this._events[le]&&oe(this,le)):(this._events=new B,this._eventsCount=0),this},X.prototype.off=X.prototype.removeListener,X.prototype.addListener=X.prototype.on,X.prefixed=q,X.EventEmitter=X,I.exports=X},function(I,O,v){(function(b,q){var B;/**
1
+ (()=>{var eR=Object.defineProperty;var oS=Object.getOwnPropertySymbols;var tR=Object.prototype.hasOwnProperty,nR=Object.prototype.propertyIsEnumerable;var sS=(Xr,zn,fr)=>zn in Xr?eR(Xr,zn,{enumerable:!0,configurable:!0,writable:!0,value:fr}):Xr[zn]=fr,aS=(Xr,zn)=>{for(var fr in zn||(zn={}))tR.call(zn,fr)&&sS(Xr,fr,zn[fr]);if(oS)for(var fr of oS(zn))nR.call(zn,fr)&&sS(Xr,fr,zn[fr]);return Xr};var sR=function(Xr){"use strict";var zn=function(I){var L={};function v(b){if(L[b])return L[b].exports;var q=L[b]={i:b,l:!1,exports:{}};return I[b].call(q.exports,q,q.exports,v),q.l=!0,q.exports}return v.m=I,v.c=L,v.d=function(b,q,B){v.o(b,q)||Object.defineProperty(b,q,{enumerable:!0,get:B})},v.r=function(b){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(b,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(b,"__esModule",{value:!0})},v.t=function(b,q){if(1&q&&(b=v(b)),8&q||4&q&&typeof b=="object"&&b&&b.__esModule)return b;var B=Object.create(null);if(v.r(B),Object.defineProperty(B,"default",{enumerable:!0,value:b}),2&q&&typeof b!="string")for(var ie in b)v.d(B,ie,function(k){return b[k]}.bind(null,ie));return B},v.n=function(b){var q=b&&b.__esModule?function(){return b.default}:function(){return b};return v.d(q,"a",q),q},v.o=function(b,q){return Object.prototype.hasOwnProperty.call(b,q)},v.p="",v(v.s=27)}([function(I,L,v){var b=Object.prototype.hasOwnProperty,q="~";function B(){}function ie(K,le,Ee){this.fn=K,this.context=le,this.once=Ee||!1}function k(K,le,Ee,Xe,Fe){if(typeof Ee!="function")throw new TypeError("The listener must be a function");var S=new ie(Ee,Xe||K,Fe),A=q?q+le:le;return K._events[A]?K._events[A].fn?K._events[A]=[K._events[A],S]:K._events[A].push(S):(K._events[A]=S,K._eventsCount++),K}function oe(K,le){--K._eventsCount==0?K._events=new B:delete K._events[le]}function X(){this._events=new B,this._eventsCount=0}Object.create&&(B.prototype=Object.create(null),new B().__proto__||(q=!1)),X.prototype.eventNames=function(){var K,le,Ee=[];if(this._eventsCount===0)return Ee;for(le in K=this._events)b.call(K,le)&&Ee.push(q?le.slice(1):le);return Object.getOwnPropertySymbols?Ee.concat(Object.getOwnPropertySymbols(K)):Ee},X.prototype.listeners=function(K){var le=q?q+K:K,Ee=this._events[le];if(!Ee)return[];if(Ee.fn)return[Ee.fn];for(var Xe=0,Fe=Ee.length,S=new Array(Fe);Xe<Fe;Xe++)S[Xe]=Ee[Xe].fn;return S},X.prototype.listenerCount=function(K){var le=q?q+K:K,Ee=this._events[le];return Ee?Ee.fn?1:Ee.length:0},X.prototype.emit=function(K,le,Ee,Xe,Fe,S){var A=q?q+K:K;if(!this._events[A])return!1;var O,V,D=this._events[A],z=arguments.length;if(D.fn){switch(D.once&&this.removeListener(K,D.fn,void 0,!0),z){case 1:return D.fn.call(D.context),!0;case 2:return D.fn.call(D.context,le),!0;case 3:return D.fn.call(D.context,le,Ee),!0;case 4:return D.fn.call(D.context,le,Ee,Xe),!0;case 5:return D.fn.call(D.context,le,Ee,Xe,Fe),!0;case 6:return D.fn.call(D.context,le,Ee,Xe,Fe,S),!0}for(V=1,O=new Array(z-1);V<z;V++)O[V-1]=arguments[V];D.fn.apply(D.context,O)}else{var W,ee=D.length;for(V=0;V<ee;V++)switch(D[V].once&&this.removeListener(K,D[V].fn,void 0,!0),z){case 1:D[V].fn.call(D[V].context);break;case 2:D[V].fn.call(D[V].context,le);break;case 3:D[V].fn.call(D[V].context,le,Ee);break;case 4:D[V].fn.call(D[V].context,le,Ee,Xe);break;default:if(!O)for(W=1,O=new Array(z-1);W<z;W++)O[W-1]=arguments[W];D[V].fn.apply(D[V].context,O)}}return!0},X.prototype.on=function(K,le,Ee){return k(this,K,le,Ee,!1)},X.prototype.once=function(K,le,Ee){return k(this,K,le,Ee,!0)},X.prototype.removeListener=function(K,le,Ee,Xe){var Fe=q?q+K:K;if(!this._events[Fe])return this;if(!le)return oe(this,Fe),this;var S=this._events[Fe];if(S.fn)S.fn!==le||Xe&&!S.once||Ee&&S.context!==Ee||oe(this,Fe);else{for(var A=0,O=[],V=S.length;A<V;A++)(S[A].fn!==le||Xe&&!S[A].once||Ee&&S[A].context!==Ee)&&O.push(S[A]);O.length?this._events[Fe]=O.length===1?O[0]:O:oe(this,Fe)}return this},X.prototype.removeAllListeners=function(K){var le;return K?(le=q?q+K:K,this._events[le]&&oe(this,le)):(this._events=new B,this._eventsCount=0),this},X.prototype.off=X.prototype.removeListener,X.prototype.addListener=X.prototype.on,X.prefixed=q,X.EventEmitter=X,I.exports=X},function(I,L,v){(function(b,q){var B;/**
2
2
  * @license
3
3
  * Lodash <https://lodash.com/>
4
4
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
5
5
  * Released under MIT license <https://lodash.com/license>
6
6
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
7
7
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
8
- */(function(){var ie="Expected a function",k="__lodash_placeholder__",oe=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],X="[object Arguments]",K="[object Array]",le="[object Boolean]",Ee="[object Date]",Xe="[object Error]",Fe="[object Function]",S="[object GeneratorFunction]",A="[object Map]",L="[object Number]",j="[object Object]",D="[object RegExp]",z="[object Set]",W="[object String]",ee="[object Symbol]",et="[object WeakMap]",ft="[object ArrayBuffer]",$e="[object DataView]",ae="[object Float32Array]",Ce="[object Float64Array]",Ie="[object Int8Array]",H="[object Int16Array]",be="[object Int32Array]",Me="[object Uint8Array]",Oe="[object Uint16Array]",Se="[object Uint32Array]",Ue=/\b__p \+= '';/g,qe=/\b(__p \+=) '' \+/g,at=/(__e\(.*?\)|\b__t\)) \+\n'';/g,rt=/&(?:amp|lt|gt|quot|#39);/g,Qt=/[&<>"']/g,lt=RegExp(rt.source),en=RegExp(Qt.source),Bt=/<%-([\s\S]+?)%>/g,Vt=/<%([\s\S]+?)%>/g,bt=/<%=([\s\S]+?)%>/g,Dn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wn=/^\w*$/,gn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zn=/[\\^$.*+?()[\]{}|]/g,yn=RegExp(Zn.source),li=/^\s+/,Bi=/\s/,Ci=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ji=/\{\n\/\* \[wrapped with (.+)\] \*/,Lr=/,? & /,Dp=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ul=/[()=,{}\[\]\/\s]/,Np=/\\(\\)?/g,Fp=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,co=/\w*$/,Bp=/^[-+]0x[0-9a-f]+$/i,Up=/^0b[01]+$/i,kp=/^\[object .+?Constructor\]$/,Gp=/^0o[0-7]+$/i,Hp=/^(?:0|[1-9]\d*)$/,Iu=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zo=/($^)/,hl=/['\n\r\u2028\u2029\\]/g,cl="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",dl="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",va="[\\ud800-\\udfff]",_a="["+dl+"]",Vo="["+cl+"]",gi="\\d+",pl="[\\u2700-\\u27bf]",Jn="[a-z\\xdf-\\xf6\\xf8-\\xff]",fl="[^\\ud800-\\udfff"+dl+gi+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",bc="\\ud83c[\\udffb-\\udfff]",ml="[^\\ud800-\\udfff]",wc="(?:\\ud83c[\\udde6-\\uddff]){2}",$n="[\\ud800-\\udbff][\\udc00-\\udfff]",jo="[A-Z\\xc0-\\xd6\\xd8-\\xde]",zp="(?:"+Jn+"|"+fl+")",Ms="(?:"+jo+"|"+fl+")",Vp="(?:"+Vo+"|"+bc+")?",Wo="[\\ufe0e\\ufe0f]?"+Vp+("(?:\\u200d(?:"+[ml,wc,$n].join("|")+")[\\ufe0e\\ufe0f]?"+Vp+")*"),jp="(?:"+[pl,wc,$n].join("|")+")"+Wo,Wp="(?:"+[ml+Vo+"?",Vo,wc,$n,va].join("|")+")",gl=RegExp("['\u2019]","g"),Xp=RegExp(Vo,"g"),As=RegExp(bc+"(?="+bc+")|"+Wp+Wo,"g"),po=RegExp([jo+"?"+Jn+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[_a,jo,"$"].join("|")+")",Ms+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[_a,jo+zp,"$"].join("|")+")",jo+"?"+zp+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",jo+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gi,jp].join("|"),"g"),Ps=RegExp("[\\u200d\\ud800-\\udfff"+cl+"\\ufe0e\\ufe0f]"),Yp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qp=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Zp=-1,dn={};dn[ae]=dn[Ce]=dn[Ie]=dn[H]=dn[be]=dn[Me]=dn["[object Uint8ClampedArray]"]=dn[Oe]=dn[Se]=!0,dn[X]=dn[K]=dn[ft]=dn[le]=dn[$e]=dn[Ee]=dn[Xe]=dn[Fe]=dn[A]=dn[L]=dn[j]=dn[D]=dn[z]=dn[W]=dn[et]=!1;var _n={};_n[X]=_n[K]=_n[ft]=_n[$e]=_n[le]=_n[Ee]=_n[ae]=_n[Ce]=_n[Ie]=_n[H]=_n[be]=_n[A]=_n[L]=_n[j]=_n[D]=_n[z]=_n[W]=_n[ee]=_n[Me]=_n["[object Uint8ClampedArray]"]=_n[Oe]=_n[Se]=!0,_n[Xe]=_n[Fe]=_n[et]=!1;var fo={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tr=parseFloat,Jp=parseInt,Tc=typeof b=="object"&&b&&b.Object===Object&&b,$p=typeof self=="object"&&self&&self.Object===Object&&self,Nn=Tc||$p||Function("return this")(),Cs=O&&!O.nodeType&&O,ya=Cs&&typeof q=="object"&&q&&!q.nodeType&&q,Sc=ya&&ya.exports===Cs,Lu=Sc&&Tc.process,nr=function(){try{var we=ya&&ya.require&&ya.require("util").types;return we||Lu&&Lu.binding&&Lu.binding("util")}catch{}}(),Ec=nr&&nr.isArrayBuffer,Mc=nr&&nr.isDate,Ou=nr&&nr.isMap,Du=nr&&nr.isRegExp,Nu=nr&&nr.isSet,Fu=nr&&nr.isTypedArray;function Ui(we,je,Ze){switch(Ze.length){case 0:return we.call(je);case 1:return we.call(je,Ze[0]);case 2:return we.call(je,Ze[0],Ze[1]);case 3:return we.call(je,Ze[0],Ze[1],Ze[2])}return we.apply(je,Ze)}function Ac(we,je,Ze,ct){for(var wt=-1,$t=we==null?0:we.length;++wt<$t;){var Vn=we[wt];je(ct,Vn,Ze(Vn),we)}return ct}function Wi(we,je){for(var Ze=-1,ct=we==null?0:we.length;++Ze<ct&&je(we[Ze],Ze,we)!==!1;);return we}function Pc(we,je){for(var Ze=we==null?0:we.length;Ze--&&je(we[Ze],Ze,we)!==!1;);return we}function Cc(we,je){for(var Ze=-1,ct=we==null?0:we.length;++Ze<ct;)if(!je(we[Ze],Ze,we))return!1;return!0}function qr(we,je){for(var Ze=-1,ct=we==null?0:we.length,wt=0,$t=[];++Ze<ct;){var Vn=we[Ze];je(Vn,Ze,we)&&($t[wt++]=Vn)}return $t}function xa(we,je){return!!(we==null?0:we.length)&&Rs(we,je,0)>-1}function Bu(we,je,Ze){for(var ct=-1,wt=we==null?0:we.length;++ct<wt;)if(Ze(je,we[ct]))return!0;return!1}function Tn(we,je){for(var Ze=-1,ct=we==null?0:we.length,wt=Array(ct);++Ze<ct;)wt[Ze]=je(we[Ze],Ze,we);return wt}function mo(we,je){for(var Ze=-1,ct=je.length,wt=we.length;++Ze<ct;)we[wt+Ze]=je[Ze];return we}function Uu(we,je,Ze,ct){var wt=-1,$t=we==null?0:we.length;for(ct&&$t&&(Ze=we[++wt]);++wt<$t;)Ze=je(Ze,we[wt],wt,we);return Ze}function Kp(we,je,Ze,ct){var wt=we==null?0:we.length;for(ct&&wt&&(Ze=we[--wt]);wt--;)Ze=je(Ze,we[wt],wt,we);return Ze}function ku(we,je){for(var Ze=-1,ct=we==null?0:we.length;++Ze<ct;)if(je(we[Ze],Ze,we))return!0;return!1}var Qp=Gu("length");function Rc(we,je,Ze){var ct;return Ze(we,function(wt,$t,Vn){if(je(wt,$t,Vn))return ct=$t,!1}),ct}function vl(we,je,Ze,ct){for(var wt=we.length,$t=Ze+(ct?1:-1);ct?$t--:++$t<wt;)if(je(we[$t],$t,we))return $t;return-1}function Rs(we,je,Ze){return je==je?function(ct,wt,$t){for(var Vn=$t-1,ir=ct.length;++Vn<ir;)if(ct[Vn]===wt)return Vn;return-1}(we,je,Ze):vl(we,Ic,Ze)}function ef(we,je,Ze,ct){for(var wt=Ze-1,$t=we.length;++wt<$t;)if(ct(we[wt],je))return wt;return-1}function Ic(we){return we!=we}function Lc(we,je){var Ze=we==null?0:we.length;return Ze?zu(we,je)/Ze:NaN}function Gu(we){return function(je){return je==null?void 0:je[we]}}function Hu(we){return function(je){return we==null?void 0:we[je]}}function Oc(we,je,Ze,ct,wt){return wt(we,function($t,Vn,ir){Ze=ct?(ct=!1,$t):je(Ze,$t,Vn,ir)}),Ze}function zu(we,je){for(var Ze,ct=-1,wt=we.length;++ct<wt;){var $t=je(we[ct]);$t!==void 0&&(Ze=Ze===void 0?$t:Ze+$t)}return Ze}function Vu(we,je){for(var Ze=-1,ct=Array(we);++Ze<we;)ct[Ze]=je(Ze);return ct}function Dc(we){return we&&we.slice(0,Yo(we)+1).replace(li,"")}function Xi(we){return function(je){return we(je)}}function ju(we,je){return Tn(je,function(Ze){return we[Ze]})}function ba(we,je){return we.has(je)}function Nc(we,je){for(var Ze=-1,ct=we.length;++Ze<ct&&Rs(je,we[Ze],0)>-1;);return Ze}function Fc(we,je){for(var Ze=we.length;Ze--&&Rs(je,we[Ze],0)>-1;);return Ze}function tf(we,je){for(var Ze=we.length,ct=0;Ze--;)we[Ze]===je&&++ct;return ct}var nf=Hu({\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"}),rf=Hu({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function of(we){return"\\"+fo[we]}function Is(we){return Ps.test(we)}function Wu(we){var je=-1,Ze=Array(we.size);return we.forEach(function(ct,wt){Ze[++je]=[wt,ct]}),Ze}function Bc(we,je){return function(Ze){return we(je(Ze))}}function go(we,je){for(var Ze=-1,ct=we.length,wt=0,$t=[];++Ze<ct;){var Vn=we[Ze];Vn!==je&&Vn!==k||(we[Ze]=k,$t[wt++]=Ze)}return $t}function Xo(we){var je=-1,Ze=Array(we.size);return we.forEach(function(ct){Ze[++je]=ct}),Ze}function _l(we){var je=-1,Ze=Array(we.size);return we.forEach(function(ct){Ze[++je]=[ct,ct]}),Ze}function vo(we){return Is(we)?function(je){for(var Ze=As.lastIndex=0;As.test(je);)++Ze;return Ze}(we):Qp(we)}function wi(we){return Is(we)?function(je){return je.match(As)||[]}(we):function(je){return je.split("")}(we)}function Yo(we){for(var je=we.length;je--&&Bi.test(we.charAt(je)););return je}var yl=Hu({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Ls=function we(je){var Ze,ct=(je=je==null?Nn:Ls.defaults(Nn.Object(),je,Ls.pick(Nn,qp))).Array,wt=je.Date,$t=je.Error,Vn=je.Function,ir=je.Math,xn=je.Object,xl=je.RegExp,Uc=je.String,Yi=je.TypeError,bl=ct.prototype,kc=Vn.prototype,mr=xn.prototype,wl=je["__core-js_shared__"],Xu=kc.toString,un=mr.hasOwnProperty,Dg=0,sf=(Ze=/[^.]+$/.exec(wl&&wl.keys&&wl.keys.IE_PROTO||""))?"Symbol(src)_1."+Ze:"",Yu=mr.toString,Ng=Xu.call(xn),Fg=Nn._,Bg=xl("^"+Xu.call(un).replace(Zn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qu=Sc?je.Buffer:void 0,qo=je.Symbol,Zu=je.Uint8Array,af=qu?qu.allocUnsafe:void 0,Ju=Bc(xn.getPrototypeOf,xn),lf=xn.create,uf=mr.propertyIsEnumerable,Tl=bl.splice,Os=qo?qo.isConcatSpreadable:void 0,Zr=qo?qo.iterator:void 0,Ds=qo?qo.toStringTag:void 0,$u=function(){try{var h=Ys(xn,"defineProperty");return h({},"",{}),h}catch{}}(),Ug=je.clearTimeout!==Nn.clearTimeout&&je.clearTimeout,kg=wt&&wt.now!==Nn.Date.now&&wt.now,Gg=je.setTimeout!==Nn.setTimeout&&je.setTimeout,Ku=ir.ceil,Qu=ir.floor,Gc=xn.getOwnPropertySymbols,Hc=qu?qu.isBuffer:void 0,_o=je.isFinite,Ti=bl.join,eh=Bc(xn.keys,xn),Sn=ir.max,ii=ir.min,rr=wt.now,Si=je.parseInt,th=ir.random,Sl=bl.reverse,El=Ys(je,"DataView"),wa=Ys(je,"Map"),nh=Ys(je,"Promise"),Ns=Ys(je,"Set"),Qe=Ys(je,"WeakMap"),En=Ys(xn,"create"),yo=Qe&&new Qe,gr={},Hg=ns(El),Kn=ns(wa),zc=ns(nh),pn=ns(Ns),Or=ns(Qe),Ml=qo?qo.prototype:void 0,Fs=Ml?Ml.valueOf:void 0,vi=Ml?Ml.toString:void 0;function T(h){if(Un(h)&&!Ut(h)&&!(h instanceof Ht)){if(h instanceof In)return h;if(un.call(h,"__wrapped__"))return Ef(h)}return new In(h)}var Zo=function(){function h(){}return function(p){if(!Bn(p))return{};if(lf)return lf(p);h.prototype=p;var x=new h;return h.prototype=void 0,x}}();function Al(){}function In(h,p){this.__wrapped__=h,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=void 0}function Ht(h){this.__wrapped__=h,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Dr(h){var p=-1,x=h==null?0:h.length;for(this.clear();++p<x;){var E=h[p];this.set(E[0],E[1])}}function Nr(h){var p=-1,x=h==null?0:h.length;for(this.clear();++p<x;){var E=h[p];this.set(E[0],E[1])}}function qi(h){var p=-1,x=h==null?0:h.length;for(this.clear();++p<x;){var E=h[p];this.set(E[0],E[1])}}function vr(h){var p=-1,x=h==null?0:h.length;for(this.__data__=new qi;++p<x;)this.add(h[p])}function Ri(h){var p=this.__data__=new Nr(h);this.size=p.size}function xo(h,p){var x=Ut(h),E=!x&&rs(h),P=!x&&!E&&Mo(h),V=!x&&!E&&!P&&Zs(h),re=x||E||P||V,ce=re?Vu(h.length,Uc):[],_e=ce.length;for(var He in h)!p&&!un.call(h,He)||re&&(He=="length"||P&&(He=="offset"||He=="parent")||V&&(He=="buffer"||He=="byteLength"||He=="byteOffset")||Li(He,_e))||ce.push(He);return ce}function bo(h){var p=h.length;return p?h[Qo(0,p-1)]:void 0}function Bs(h,p){return gh(hi(h),wo(p,0,h.length))}function Pl(h){return gh(hi(h))}function Ta(h,p,x){(x!==void 0&&!Tr(h[p],x)||x===void 0&&!(p in h))&&$r(h,p,x)}function Jo(h,p,x){var E=h[p];un.call(h,p)&&Tr(E,x)&&(x!==void 0||p in h)||$r(h,p,x)}function Jr(h,p){for(var x=h.length;x--;)if(Tr(h[x][0],p))return x;return-1}function Vc(h,p,x,E){return ki(h,function(P,V,re){p(E,P,x(P),re)}),E}function hf(h,p){return h&&Wn(p,di(p),h)}function $r(h,p,x){p=="__proto__"&&$u?$u(h,p,{configurable:!0,enumerable:!0,value:x,writable:!0}):h[p]=x}function Cl(h,p){for(var x=-1,E=p.length,P=ct(E),V=h==null;++x<E;)P[x]=V?void 0:wd(h,p[x]);return P}function wo(h,p,x){return h==h&&(x!==void 0&&(h=h<=x?h:x),p!==void 0&&(h=h>=p?h:p)),h}function ui(h,p,x,E,P,V){var re,ce=1&p,_e=2&p,He=4&p;if(x&&(re=P?x(h,E,P,V):x(h)),re!==void 0)return re;if(!Bn(h))return h;var ze=Ut(h);if(ze){if(re=function(Je){var nt=Je.length,Et=new Je.constructor(nt);return nt&&typeof Je[0]=="string"&&un.call(Je,"index")&&(Et.index=Je.index,Et.input=Je.input),Et}(h),!ce)return hi(h,re)}else{var tt=ci(h),vt=tt==Fe||tt==S;if(Mo(h))return td(h,ce);if(tt==j||tt==X||vt&&!P){if(re=_e||vt?{}:sd(h),!ce)return _e?function(Je,nt){return Wn(Je,qs(Je),nt)}(h,function(Je,nt){return Je&&Wn(nt,yi(nt),Je)}(re,h)):function(Je,nt){return Wn(Je,br(Je),nt)}(h,hf(re,h))}else{if(!_n[tt])return P?h:{};re=function(Je,nt,Et){var mt=Je.constructor;switch(nt){case ft:return nd(Je);case le:case Ee:return new mt(+Je);case $e:return function(It,jt){var Tt=jt?nd(It.buffer):It.buffer;return new It.constructor(Tt,It.byteOffset,It.byteLength)}(Je,Et);case ae:case Ce:case Ie:case H:case be:case Me:case"[object Uint8ClampedArray]":case Oe:case Se:return Hs(Je,Et);case A:return new mt;case L:case W:return new mt(Je);case D:return function(It){var jt=new It.constructor(It.source,co.exec(It));return jt.lastIndex=It.lastIndex,jt}(Je);case z:return new mt;case ee:return St=Je,Fs?xn(Fs.call(St)):{}}var St}(h,tt,ce)}}V||(V=new Ri);var yt=V.get(h);if(yt)return yt;V.set(h,re),zf(h)?h.forEach(function(Je){re.add(ui(Je,p,x,Je,h,V))}):Hf(h)&&h.forEach(function(Je,nt){re.set(nt,ui(Je,p,x,nt,h,V))});var Ct=ze?void 0:(He?_e?Ws:Gi:_e?yi:di)(h);return Wi(Ct||h,function(Je,nt){Ct&&(Je=h[nt=Je]),Jo(re,nt,ui(Je,p,x,nt,h,V))}),re}function Kr(h,p,x){var E=x.length;if(h==null)return!E;for(h=xn(h);E--;){var P=x[E],V=p[P],re=h[P];if(re===void 0&&!(P in h)||!V(re))return!1}return!0}function ih(h,p,x){if(typeof h!="function")throw new Yi(ie);return Bl(function(){h.apply(void 0,x)},p)}function $o(h,p,x,E){var P=-1,V=xa,re=!0,ce=h.length,_e=[],He=p.length;if(!ce)return _e;x&&(p=Tn(p,Xi(x))),E?(V=Bu,re=!1):p.length>=200&&(V=ba,re=!1,p=new vr(p));e:for(;++P<ce;){var ze=h[P],tt=x==null?ze:x(ze);if(ze=E||ze!==0?ze:0,re&&tt==tt){for(var vt=He;vt--;)if(p[vt]===tt)continue e;_e.push(ze)}else V(p,tt,E)||_e.push(ze)}return _e}T.templateSettings={escape:Bt,evaluate:Vt,interpolate:bt,variable:"",imports:{_:T}},T.prototype=Al.prototype,T.prototype.constructor=T,In.prototype=Zo(Al.prototype),In.prototype.constructor=In,Ht.prototype=Zo(Al.prototype),Ht.prototype.constructor=Ht,Dr.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},Dr.prototype.delete=function(h){var p=this.has(h)&&delete this.__data__[h];return this.size-=p?1:0,p},Dr.prototype.get=function(h){var p=this.__data__;if(En){var x=p[h];return x==="__lodash_hash_undefined__"?void 0:x}return un.call(p,h)?p[h]:void 0},Dr.prototype.has=function(h){var p=this.__data__;return En?p[h]!==void 0:un.call(p,h)},Dr.prototype.set=function(h,p){var x=this.__data__;return this.size+=this.has(h)?0:1,x[h]=En&&p===void 0?"__lodash_hash_undefined__":p,this},Nr.prototype.clear=function(){this.__data__=[],this.size=0},Nr.prototype.delete=function(h){var p=this.__data__,x=Jr(p,h);return!(x<0)&&(x==p.length-1?p.pop():Tl.call(p,x,1),--this.size,!0)},Nr.prototype.get=function(h){var p=this.__data__,x=Jr(p,h);return x<0?void 0:p[x][1]},Nr.prototype.has=function(h){return Jr(this.__data__,h)>-1},Nr.prototype.set=function(h,p){var x=this.__data__,E=Jr(x,h);return E<0?(++this.size,x.push([h,p])):x[E][1]=p,this},qi.prototype.clear=function(){this.size=0,this.__data__={hash:new Dr,map:new(wa||Nr),string:new Dr}},qi.prototype.delete=function(h){var p=Fa(this,h).delete(h);return this.size-=p?1:0,p},qi.prototype.get=function(h){return Fa(this,h).get(h)},qi.prototype.has=function(h){return Fa(this,h).has(h)},qi.prototype.set=function(h,p){var x=Fa(this,h),E=x.size;return x.set(h,p),this.size+=x.size==E?0:1,this},vr.prototype.add=vr.prototype.push=function(h){return this.__data__.set(h,"__lodash_hash_undefined__"),this},vr.prototype.has=function(h){return this.__data__.has(h)},Ri.prototype.clear=function(){this.__data__=new Nr,this.size=0},Ri.prototype.delete=function(h){var p=this.__data__,x=p.delete(h);return this.size=p.size,x},Ri.prototype.get=function(h){return this.__data__.get(h)},Ri.prototype.has=function(h){return this.__data__.has(h)},Ri.prototype.set=function(h,p){var x=this.__data__;if(x instanceof Nr){var E=x.__data__;if(!wa||E.length<199)return E.push([h,p]),this.size=++x.size,this;x=this.__data__=new qi(E)}return x.set(h,p),this.size=x.size,this};var ki=Mt(Qr),rh=Mt(jc,!0);function oh(h,p){var x=!0;return ki(h,function(E,P,V){return x=!!p(E,P,V)}),x}function Sa(h,p,x){for(var E=-1,P=h.length;++E<P;){var V=h[E],re=p(V);if(re!=null&&(ce===void 0?re==re&&!ur(re):x(re,ce)))var ce=re,_e=V}return _e}function To(h,p){var x=[];return ki(h,function(E,P,V){p(E,P,V)&&x.push(E)}),x}function pt(h,p,x,E,P){var V=-1,re=h.length;for(x||(x=zg),P||(P=[]);++V<re;){var ce=h[V];p>0&&x(ce)?p>1?pt(ce,p-1,x,E,P):mo(P,ce):E||(P[P.length]=ce)}return P}var Ko=id(),_r=id(!0);function Qr(h,p){return h&&Ko(h,p,di)}function jc(h,p){return h&&_r(h,p,di)}function Fr(h,p){return qr(p,function(x){return Gr(h[x])})}function eo(h,p){for(var x=0,E=(p=Ur(p,h)).length;h!=null&&x<E;)h=h[wr(p[x++])];return x&&x==E?h:void 0}function Zi(h,p,x){var E=p(h);return Ut(h)?E:mo(E,x(h))}function Ii(h){return h==null?h===void 0?"[object Undefined]":"[object Null]":Ds&&Ds in xn(h)?function(p){var x=un.call(p,Ds),E=p[Ds];try{p[Ds]=void 0;var P=!0}catch{}var V=Yu.call(p);return P&&(x?p[Ds]=E:delete p[Ds]),V}(h):function(p){return Yu.call(p)}(h)}function sh(h,p){return h>p}function Us(h,p){return h!=null&&un.call(h,p)}function Wc(h,p){return h!=null&&p in xn(h)}function Xc(h,p,x){for(var E=x?Bu:xa,P=h[0].length,V=h.length,re=V,ce=ct(V),_e=1/0,He=[];re--;){var ze=h[re];re&&p&&(ze=Tn(ze,Xi(p))),_e=ii(ze.length,_e),ce[re]=!x&&(p||P>=120&&ze.length>=120)?new vr(re&&ze):void 0}ze=h[0];var tt=-1,vt=ce[0];e:for(;++tt<P&&He.length<_e;){var yt=ze[tt],Ct=p?p(yt):yt;if(yt=x||yt!==0?yt:0,!(vt?ba(vt,Ct):E(He,Ct,x))){for(re=V;--re;){var Je=ce[re];if(!(Je?ba(Je,Ct):E(h[re],Ct,x)))continue e}vt&&vt.push(Ct),He.push(yt)}}return He}function Ea(h,p,x){var E=(h=bf(h,p=Ur(p,h)))==null?h:h[wr(lr(p))];return E==null?void 0:Ui(E,h,x)}function ks(h){return Un(h)&&Ii(h)==X}function or(h,p,x,E,P){return h===p||(h==null||p==null||!Un(h)&&!Un(p)?h!=h&&p!=p:function(V,re,ce,_e,He,ze){var tt=Ut(V),vt=Ut(re),yt=tt?K:ci(V),Ct=vt?K:ci(re),Je=(yt=yt==X?j:yt)==j,nt=(Ct=Ct==X?j:Ct)==j,Et=yt==Ct;if(Et&&Mo(V)){if(!Mo(re))return!1;tt=!0,Je=!1}if(Et&&!Je)return ze||(ze=new Ri),tt||Zs(V)?Ei(V,re,ce,_e,He,ze):function(Tt,Ot,Xn,Mi,Yn,kn,Hr){switch(Xn){case $e:if(Tt.byteLength!=Ot.byteLength||Tt.byteOffset!=Ot.byteOffset)return!1;Tt=Tt.buffer,Ot=Ot.buffer;case ft:return!(Tt.byteLength!=Ot.byteLength||!kn(new Zu(Tt),new Zu(Ot)));case le:case Ee:case L:return Tr(+Tt,+Ot);case Xe:return Tt.name==Ot.name&&Tt.message==Ot.message;case D:case W:return Tt==Ot+"";case A:var oo=Wu;case z:var ss=1&Mi;if(oo||(oo=Xo),Tt.size!=Ot.size&&!ss)return!1;var Wa=Hr.get(Tt);if(Wa)return Wa==Ot;Mi|=2,Hr.set(Tt,Ot);var as=Ei(oo(Tt),oo(Ot),Mi,Yn,kn,Hr);return Hr.delete(Tt),as;case ee:if(Fs)return Fs.call(Tt)==Fs.call(Ot)}return!1}(V,re,yt,ce,_e,He,ze);if(!(1&ce)){var mt=Je&&un.call(V,"__wrapped__"),St=nt&&un.call(re,"__wrapped__");if(mt||St){var It=mt?V.value():V,jt=St?re.value():re;return ze||(ze=new Ri),He(It,jt,ce,_e,ze)}}return Et?(ze||(ze=new Ri),function(Tt,Ot,Xn,Mi,Yn,kn){var Hr=1&Xn,oo=Gi(Tt),ss=oo.length,Wa=Gi(Ot).length;if(ss!=Wa&&!Hr)return!1;for(var as=ss;as--;){var so=oo[as];if(!(Hr?so in Ot:un.call(Ot,so)))return!1}var Fh=kn.get(Tt),Md=kn.get(Ot);if(Fh&&Md)return Fh==Ot&&Md==Tt;var ls=!0;kn.set(Tt,Ot),kn.set(Ot,Tt);for(var ta=Hr;++as<ss;){so=oo[as];var na=Tt[so],Xa=Ot[so];if(Mi)var Ya=Hr?Mi(Xa,na,so,Ot,Tt,kn):Mi(na,Xa,so,Tt,Ot,kn);if(!(Ya===void 0?na===Xa||Yn(na,Xa,Xn,Mi,kn):Ya)){ls=!1;break}ta||(ta=so=="constructor")}if(ls&&!ta){var ql=Tt.constructor,ia=Ot.constructor;ql==ia||!("constructor"in Tt)||!("constructor"in Ot)||typeof ql=="function"&&ql instanceof ql&&typeof ia=="function"&&ia instanceof ia||(ls=!1)}return kn.delete(Tt),kn.delete(Ot),ls}(V,re,ce,_e,He,ze)):!1}(h,p,x,E,or,P))}function Ma(h,p,x,E){var P=x.length,V=P,re=!E;if(h==null)return!V;for(h=xn(h);P--;){var ce=x[P];if(re&&ce[2]?ce[1]!==h[ce[0]]:!(ce[0]in h))return!1}for(;++P<V;){var _e=(ce=x[P])[0],He=h[_e],ze=ce[1];if(re&&ce[2]){if(He===void 0&&!(_e in h))return!1}else{var tt=new Ri;if(E)var vt=E(He,ze,_e,h,p,tt);if(!(vt===void 0?or(ze,He,3,E,tt):vt))return!1}}return!0}function Aa(h){return!(!Bn(h)||(p=h,sf&&sf in p))&&(Gr(h)?Bg:kp).test(ns(h));var p}function cf(h){return typeof h=="function"?h:h==null?zi:typeof h=="object"?Ut(h)?Zc(h[0],h[1]):pf(h):em(h)}function Yc(h){if(!Fl(h))return eh(h);var p=[];for(var x in xn(h))un.call(h,x)&&x!="constructor"&&p.push(x);return p}function df(h){if(!Bn(h))return function(P){var V=[];if(P!=null)for(var re in xn(P))V.push(re);return V}(h);var p=Fl(h),x=[];for(var E in h)(E!="constructor"||!p&&un.call(h,E))&&x.push(E);return x}function ah(h,p){return h<p}function qc(h,p){var x=-1,E=Ji(h)?ct(h.length):[];return ki(h,function(P,V,re){E[++x]=p(P,V,re)}),E}function pf(h){var p=od(h);return p.length==1&&p[0][2]?yf(p[0][0],p[0][1]):function(x){return x===h||Ma(x,h,p)}}function Zc(h,p){return dt(h)&&_f(p)?yf(wr(h),p):function(x){var E=wd(x,h);return E===void 0&&E===p?Gl(x,h):or(p,E,3)}}function Xt(h,p,x,E,P){h!==p&&Ko(p,function(V,re){if(P||(P=new Ri),Bn(V))(function(_e,He,ze,tt,vt,yt,Ct){var Je=ad(_e,ze),nt=ad(He,ze),Et=Ct.get(nt);if(Et)return void Ta(_e,ze,Et);var mt=yt?yt(Je,nt,ze+"",_e,He,Ct):void 0,St=mt===void 0;if(St){var It=Ut(nt),jt=!It&&Mo(nt),Tt=!It&&!jt&&Zs(nt);mt=nt,It||jt||Tt?Ut(Je)?mt=Je:An(Je)?mt=hi(Je):jt?(St=!1,mt=td(nt,!0)):Tt?(St=!1,mt=Hs(nt,!0)):mt=[]:ka(nt)||rs(nt)?(mt=Je,rs(Je)?mt=Xf(Je):Bn(Je)&&!Gr(Je)||(mt=sd(nt))):St=!1}St&&(Ct.set(nt,mt),vt(mt,nt,tt,yt,Ct),Ct.delete(nt)),Ta(_e,ze,mt)})(h,p,re,x,Xt,E,P);else{var ce=E?E(ad(h,re),V,re+"",h,p,P):void 0;ce===void 0&&(ce=V),Ta(h,re,ce)}},yi)}function yr(h,p){var x=h.length;if(x)return Li(p+=p<0?x:0,x)?h[p]:void 0}function to(h,p,x){p=p.length?Tn(p,function(P){return Ut(P)?function(V){return eo(V,P.length===1?P[0]:P)}:P}):[zi];var E=-1;return p=Tn(p,Xi(Pt())),function(P,V){var re=P.length;for(P.sort(V);re--;)P[re]=P[re].value;return P}(qc(h,function(P,V,re){return{criteria:Tn(p,function(ce){return ce(P)}),index:++E,value:P}}),function(P,V){return function(re,ce,_e){for(var He=-1,ze=re.criteria,tt=ce.criteria,vt=ze.length,yt=_e.length;++He<vt;){var Ct=vf(ze[He],tt[He]);if(Ct){if(He>=yt)return Ct;var Je=_e[He];return Ct*(Je=="desc"?-1:1)}}return re.index-ce.index}(P,V,x)})}function lh(h,p,x){for(var E=-1,P=p.length,V={};++E<P;){var re=p[E],ce=eo(h,re);x(ce,re)&&Mn(V,Ur(re,h),ce)}return V}function Br(h,p,x,E){var P=E?ef:Rs,V=-1,re=p.length,ce=h;for(h===p&&(p=hi(p)),x&&(ce=Tn(h,Xi(x)));++V<re;)for(var _e=0,He=p[V],ze=x?x(He):He;(_e=P(ce,ze,_e,E))>-1;)ce!==h&&Tl.call(ce,_e,1),Tl.call(h,_e,1);return h}function Gs(h,p){for(var x=h?p.length:0,E=x-1;x--;){var P=p[x];if(x==E||P!==V){var V=P;Li(P)?Tl.call(h,P,1):Ca(h,P)}}return h}function Qo(h,p){return h+Qu(th()*(p-h+1))}function uh(h,p){var x="";if(!h||p<1||p>9007199254740991)return x;do p%2&&(x+=h),(p=Qu(p/2))&&(h+=h);while(p);return x}function Yt(h,p){return ld(xf(h,p,zi),h+"")}function Jc(h){return bo(ro(h))}function $c(h,p){var x=ro(h);return gh(x,wo(p,0,x.length))}function Mn(h,p,x,E){if(!Bn(h))return h;for(var P=-1,V=(p=Ur(p,h)).length,re=V-1,ce=h;ce!=null&&++P<V;){var _e=wr(p[P]),He=x;if(_e==="__proto__"||_e==="constructor"||_e==="prototype")return h;if(P!=re){var ze=ce[_e];(He=E?E(ze,_e,ce):void 0)===void 0&&(He=Bn(ze)?ze:Li(p[P+1])?[]:{})}Jo(ce,_e,He),ce=ce[_e]}return h}var ff=yo?function(h,p){return yo.set(h,p),h}:zi,_i=$u?function(h,p){return $u(h,"toString",{configurable:!0,enumerable:!1,value:za(p),writable:!0})}:zi;function mf(h){return gh(ro(h))}function jn(h,p,x){var E=-1,P=h.length;p<0&&(p=-p>P?0:P+p),(x=x>P?P:x)<0&&(x+=P),P=p>x?0:x-p>>>0,p>>>=0;for(var V=ct(P);++E<P;)V[E]=h[E+p];return V}function hh(h,p){var x;return ki(h,function(E,P,V){return!(x=p(E,P,V))}),!!x}function Pa(h,p,x){var E=0,P=h==null?E:h.length;if(typeof p=="number"&&p==p&&P<=2147483647){for(;E<P;){var V=E+P>>>1,re=h[V];re!==null&&!ur(re)&&(x?re<=p:re<p)?E=V+1:P=V}return P}return Rl(h,p,zi,x)}function Rl(h,p,x,E){var P=0,V=h==null?0:h.length;if(V===0)return 0;for(var re=(p=x(p))!=p,ce=p===null,_e=ur(p),He=p===void 0;P<V;){var ze=Qu((P+V)/2),tt=x(h[ze]),vt=tt!==void 0,yt=tt===null,Ct=tt==tt,Je=ur(tt);if(re)var nt=E||Ct;else nt=He?Ct&&(E||vt):ce?Ct&&vt&&(E||!yt):_e?Ct&&vt&&!yt&&(E||!Je):!yt&&!Je&&(E?tt<=p:tt<p);nt?P=ze+1:V=ze}return ii(V,4294967294)}function ch(h,p){for(var x=-1,E=h.length,P=0,V=[];++x<E;){var re=h[x],ce=p?p(re):re;if(!x||!Tr(ce,_e)){var _e=ce;V[P++]=re===0?0:re}}return V}function gt(h){return typeof h=="number"?h:ur(h)?NaN:+h}function Qn(h){if(typeof h=="string")return h;if(Ut(h))return Tn(h,Qn)+"";if(ur(h))return vi?vi.call(h):"";var p=h+"";return p=="0"&&1/h==-1/0?"-0":p}function an(h,p,x){var E=-1,P=xa,V=h.length,re=!0,ce=[],_e=ce;if(x)re=!1,P=Bu;else if(V>=200){var He=p?null:rd(h);if(He)return Xo(He);re=!1,P=ba,_e=new vr}else _e=p?[]:ce;e:for(;++E<V;){var ze=h[E],tt=p?p(ze):ze;if(ze=x||ze!==0?ze:0,re&&tt==tt){for(var vt=_e.length;vt--;)if(_e[vt]===tt)continue e;p&&_e.push(tt),ce.push(ze)}else P(_e,tt,x)||(_e!==ce&&_e.push(tt),ce.push(ze))}return ce}function Ca(h,p){return(h=bf(h,p=Ur(p,h)))==null||delete h[wr(lr(p))]}function Zt(h,p,x,E){return Mn(h,p,x(eo(h,p)),E)}function Il(h,p,x,E){for(var P=h.length,V=E?P:-1;(E?V--:++V<P)&&p(h[V],V,h););return x?jn(h,E?0:V,E?V+1:P):jn(h,E?V+1:0,E?P:V)}function Kc(h,p){var x=h;return x instanceof Ht&&(x=x.value()),Uu(p,function(E,P){return P.func.apply(P.thisArg,mo([E],P.args))},x)}function dh(h,p,x){var E=h.length;if(E<2)return E?an(h[0]):[];for(var P=-1,V=ct(E);++P<E;)for(var re=h[P],ce=-1;++ce<E;)ce!=P&&(V[P]=$o(V[P]||re,h[ce],p,x));return an(pt(V,1),p,x)}function Qc(h,p,x){for(var E=-1,P=h.length,V=p.length,re={};++E<P;){var ce=E<V?p[E]:void 0;x(re,h[E],ce)}return re}function Ra(h){return An(h)?h:[]}function ph(h){return typeof h=="function"?h:zi}function Ur(h,p){return Ut(h)?h:dt(h,p)?[h]:vh(on(h))}var gf=Yt;function st(h,p,x){var E=h.length;return x=x===void 0?E:x,!p&&x>=E?h:jn(h,p,x)}var ed=Ug||function(h){return Nn.clearTimeout(h)};function td(h,p){if(p)return h.slice();var x=h.length,E=af?af(x):new h.constructor(x);return h.copy(E),E}function nd(h){var p=new h.constructor(h.byteLength);return new Zu(p).set(new Zu(h)),p}function Hs(h,p){var x=p?nd(h.buffer):h.buffer;return new h.constructor(x,h.byteOffset,h.length)}function vf(h,p){if(h!==p){var x=h!==void 0,E=h===null,P=h==h,V=ur(h),re=p!==void 0,ce=p===null,_e=p==p,He=ur(p);if(!ce&&!He&&!V&&h>p||V&&re&&_e&&!ce&&!He||E&&re&&_e||!x&&_e||!P)return 1;if(!E&&!V&&!He&&h<p||He&&x&&P&&!E&&!V||ce&&x&&P||!re&&P||!_e)return-1}return 0}function sr(h,p,x,E){for(var P=-1,V=h.length,re=x.length,ce=-1,_e=p.length,He=Sn(V-re,0),ze=ct(_e+He),tt=!E;++ce<_e;)ze[ce]=p[ce];for(;++P<re;)(tt||P<V)&&(ze[x[P]]=h[P]);for(;He--;)ze[ce++]=h[P++];return ze}function fh(h,p,x,E){for(var P=-1,V=h.length,re=-1,ce=x.length,_e=-1,He=p.length,ze=Sn(V-ce,0),tt=ct(ze+He),vt=!E;++P<ze;)tt[P]=h[P];for(var yt=P;++_e<He;)tt[yt+_e]=p[_e];for(;++re<ce;)(vt||P<V)&&(tt[yt+x[re]]=h[P++]);return tt}function hi(h,p){var x=-1,E=h.length;for(p||(p=ct(E));++x<E;)p[x]=h[x];return p}function Wn(h,p,x,E){var P=!x;x||(x={});for(var V=-1,re=p.length;++V<re;){var ce=p[V],_e=E?E(x[ce],h[ce],ce,x,h):void 0;_e===void 0&&(_e=h[ce]),P?$r(x,ce,_e):Jo(x,ce,_e)}return x}function es(h,p){return function(x,E){var P=Ut(x)?Ac:Vc,V=p?p():{};return P(x,h,Pt(E,2),V)}}function Fn(h){return Yt(function(p,x){var E=-1,P=x.length,V=P>1?x[P-1]:void 0,re=P>2?x[2]:void 0;for(V=h.length>3&&typeof V=="function"?(P--,V):void 0,re&&Lt(x[0],x[1],re)&&(V=P<3?void 0:V,P=1),p=xn(p);++E<P;){var ce=x[E];ce&&h(p,ce,E,V)}return p})}function Mt(h,p){return function(x,E){if(x==null)return x;if(!Ji(x))return h(x,E);for(var P=x.length,V=p?P:-1,re=xn(x);(p?V--:++V<P)&&E(re[V],V,re)!==!1;);return x}}function id(h){return function(p,x,E){for(var P=-1,V=xn(p),re=E(p),ce=re.length;ce--;){var _e=re[h?ce:++P];if(x(V[_e],_e,V)===!1)break}return p}}function zs(h){return function(p){var x=Is(p=on(p))?wi(p):void 0,E=x?x[0]:p.charAt(0),P=x?st(x,1).join(""):p.slice(1);return E[h]()+P}}function ts(h){return function(p){return Uu(Td(ea(p).replace(gl,"")),h,"")}}function xr(h){return function(){var p=arguments;switch(p.length){case 0:return new h;case 1:return new h(p[0]);case 2:return new h(p[0],p[1]);case 3:return new h(p[0],p[1],p[2]);case 4:return new h(p[0],p[1],p[2],p[3]);case 5:return new h(p[0],p[1],p[2],p[3],p[4]);case 6:return new h(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new h(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var x=Zo(h.prototype),E=h.apply(x,p);return Bn(E)?E:x}}function So(h){return function(p,x,E){var P=xn(p);if(!Ji(p)){var V=Pt(x,3);p=di(p),x=function(ce){return V(P[ce],ce,P)}}var re=h(p,x,E);return re>-1?P[V?p[re]:re]:void 0}}function Eo(h){return io(function(p){var x=p.length,E=x,P=In.prototype.thru;for(h&&p.reverse();E--;){var V=p[E];if(typeof V!="function")throw new Yi(ie);if(P&&!re&&Xs(V)=="wrapper")var re=new In([],!0)}for(E=re?E:x;++E<x;){var ce=Xs(V=p[E]),_e=ce=="wrapper"?ei(V):void 0;re=_e&&ar(_e[0])&&_e[1]==424&&!_e[4].length&&_e[9]==1?re[Xs(_e[0])].apply(re,_e[3]):V.length==1&&ar(V)?re[ce]():re.thru(V)}return function(){var He=arguments,ze=He[0];if(re&&He.length==1&&Ut(ze))return re.plant(ze).value();for(var tt=0,vt=x?p[tt].apply(this,He):ze;++tt<x;)vt=p[tt].call(this,vt);return vt}})}function Ia(h,p,x,E,P,V,re,ce,_e,He){var ze=128&p,tt=1&p,vt=2&p,yt=24&p,Ct=512&p,Je=vt?void 0:xr(h);return function nt(){for(var Et=arguments.length,mt=ct(Et),St=Et;St--;)mt[St]=arguments[St];if(yt)var It=kr(nt),jt=tf(mt,It);if(E&&(mt=sr(mt,E,P,yt)),V&&(mt=fh(mt,V,re,yt)),Et-=jt,yt&&Et<He){var Tt=go(mt,It);return Ol(h,p,Ia,nt.placeholder,x,mt,Tt,ce,_e,He-Et)}var Ot=tt?x:this,Xn=vt?Ot[h]:h;return Et=mt.length,ce?mt=jg(mt,ce):Ct&&Et>1&&mt.reverse(),ze&&_e<Et&&(mt.length=_e),this&&this!==Nn&&this instanceof nt&&(Xn=Je||xr(Xn)),Xn.apply(Ot,mt)}}function mh(h,p){return function(x,E){return function(P,V,re,ce){return Qr(P,function(_e,He,ze){V(ce,re(_e),He,ze)}),ce}(x,h,p(E),{})}}function La(h,p){return function(x,E){var P;if(x===void 0&&E===void 0)return p;if(x!==void 0&&(P=x),E!==void 0){if(P===void 0)return E;typeof x=="string"||typeof E=="string"?(x=Qn(x),E=Qn(E)):(x=gt(x),E=gt(E)),P=h(x,E)}return P}}function Oa(h){return io(function(p){return p=Tn(p,Xi(Pt())),Yt(function(x){var E=this;return h(p,function(P){return Ui(P,E,x)})})})}function Vs(h,p){var x=(p=p===void 0?" ":Qn(p)).length;if(x<2)return x?uh(p,h):p;var E=uh(p,Ku(h/vo(p)));return Is(p)?st(wi(E),0,h).join(""):E.slice(0,h)}function Ll(h){return function(p,x,E){return E&&typeof E!="number"&&Lt(p,x,E)&&(x=E=void 0),p=Ao(p),x===void 0?(x=p,p=0):x=Ao(x),function(P,V,re,ce){for(var _e=-1,He=Sn(Ku((V-P)/(re||1)),0),ze=ct(He);He--;)ze[ce?He:++_e]=P,P+=re;return ze}(p,x,E=E===void 0?p<x?1:-1:Ao(E),h)}}function js(h){return function(p,x){return typeof p=="string"&&typeof x=="string"||(p=hr(p),x=hr(x)),h(p,x)}}function Ol(h,p,x,E,P,V,re,ce,_e,He){var ze=8&p;p|=ze?32:64,4&(p&=~(ze?64:32))||(p&=-4);var tt=[h,p,P,ze?V:void 0,ze?re:void 0,ze?void 0:V,ze?void 0:re,ce,_e,He],vt=x.apply(void 0,tt);return ar(h)&&wf(vt,tt),vt.placeholder=E,Tf(vt,h,p)}function Da(h){var p=ir[h];return function(x,E){if(x=hr(x),(E=E==null?0:ii(qt(E),292))&&_o(x)){var P=(on(x)+"e").split("e");return+((P=(on(p(P[0]+"e"+(+P[1]+E)))+"e").split("e"))[0]+"e"+(+P[1]-E))}return p(x)}}var rd=Ns&&1/Xo(new Ns([,-0]))[1]==1/0?function(h){return new Ns(h)}:Va;function Dl(h){return function(p){var x=ci(p);return x==A?Wu(p):x==z?_l(p):function(E,P){return Tn(P,function(V){return[V,E[V]]})}(p,h(p))}}function ln(h,p,x,E,P,V,re,ce){var _e=2&p;if(!_e&&typeof h!="function")throw new Yi(ie);var He=E?E.length:0;if(He||(p&=-97,E=P=void 0),re=re===void 0?re:Sn(qt(re),0),ce=ce===void 0?ce:qt(ce),He-=P?P.length:0,64&p){var ze=E,tt=P;E=P=void 0}var vt=_e?void 0:ei(h),yt=[h,p,x,E,P,ze,tt,V,re,ce];if(vt&&function(Je,nt){var Et=Je[1],mt=nt[1],St=Et|mt,It=St<131,jt=mt==128&&Et==8||mt==128&&Et==256&&Je[7].length<=nt[8]||mt==384&&nt[7].length<=nt[8]&&Et==8;if(!It&&!jt)return Je;1&mt&&(Je[2]=nt[2],St|=1&Et?0:4);var Tt=nt[3];if(Tt){var Ot=Je[3];Je[3]=Ot?sr(Ot,Tt,nt[4]):Tt,Je[4]=Ot?go(Je[3],k):nt[4]}(Tt=nt[5])&&(Ot=Je[5],Je[5]=Ot?fh(Ot,Tt,nt[6]):Tt,Je[6]=Ot?go(Je[5],k):nt[6]),(Tt=nt[7])&&(Je[7]=Tt),128&mt&&(Je[8]=Je[8]==null?nt[8]:ii(Je[8],nt[8])),Je[9]==null&&(Je[9]=nt[9]),Je[0]=nt[0],Je[1]=St}(yt,vt),h=yt[0],p=yt[1],x=yt[2],E=yt[3],P=yt[4],!(ce=yt[9]=yt[9]===void 0?_e?0:h.length:Sn(yt[9]-He,0))&&24&p&&(p&=-25),p&&p!=1)Ct=p==8||p==16?function(Je,nt,Et){var mt=xr(Je);return function St(){for(var It=arguments.length,jt=ct(It),Tt=It,Ot=kr(St);Tt--;)jt[Tt]=arguments[Tt];var Xn=It<3&&jt[0]!==Ot&&jt[It-1]!==Ot?[]:go(jt,Ot);if((It-=Xn.length)<Et)return Ol(Je,nt,Ia,St.placeholder,void 0,jt,Xn,void 0,void 0,Et-It);var Mi=this&&this!==Nn&&this instanceof St?mt:Je;return Ui(Mi,this,jt)}}(h,p,ce):p!=32&&p!=33||P.length?Ia.apply(void 0,yt):function(Je,nt,Et,mt){var St=1&nt,It=xr(Je);return function jt(){for(var Tt=-1,Ot=arguments.length,Xn=-1,Mi=mt.length,Yn=ct(Mi+Ot),kn=this&&this!==Nn&&this instanceof jt?It:Je;++Xn<Mi;)Yn[Xn]=mt[Xn];for(;Ot--;)Yn[Xn++]=arguments[++Tt];return Ui(kn,St?Et:this,Yn)}}(h,p,x,E);else var Ct=function(Je,nt,Et){var mt=1&nt,St=xr(Je);return function It(){var jt=this&&this!==Nn&&this instanceof It?St:Je;return jt.apply(mt?Et:this,arguments)}}(h,p,x);return Tf((vt?ff:wf)(Ct,yt),h,p)}function Nl(h,p,x,E){return h===void 0||Tr(h,mr[x])&&!un.call(E,x)?p:h}function no(h,p,x,E,P,V){return Bn(h)&&Bn(p)&&(V.set(p,h),Xt(h,p,void 0,no,V),V.delete(p)),h}function Na(h){return ka(h)?void 0:h}function Ei(h,p,x,E,P,V){var re=1&x,ce=h.length,_e=p.length;if(ce!=_e&&!(re&&_e>ce))return!1;var He=V.get(h),ze=V.get(p);if(He&&ze)return He==p&&ze==h;var tt=-1,vt=!0,yt=2&x?new vr:void 0;for(V.set(h,p),V.set(p,h);++tt<ce;){var Ct=h[tt],Je=p[tt];if(E)var nt=re?E(Je,Ct,tt,p,h,V):E(Ct,Je,tt,h,p,V);if(nt!==void 0){if(nt)continue;vt=!1;break}if(yt){if(!ku(p,function(Et,mt){if(!ba(yt,mt)&&(Ct===Et||P(Ct,Et,x,E,V)))return yt.push(mt)})){vt=!1;break}}else if(Ct!==Je&&!P(Ct,Je,x,E,V)){vt=!1;break}}return V.delete(h),V.delete(p),vt}function io(h){return ld(xf(h,void 0,cd),h+"")}function Gi(h){return Zi(h,di,br)}function Ws(h){return Zi(h,yi,qs)}var ei=yo?function(h){return yo.get(h)}:Va;function Xs(h){for(var p=h.name+"",x=gr[p],E=un.call(gr,p)?x.length:0;E--;){var P=x[E],V=P.func;if(V==null||V==h)return P.name}return p}function kr(h){return(un.call(T,"placeholder")?T:h).placeholder}function Pt(){var h=T.iteratee||Ch;return h=h===Ch?cf:h,arguments.length?h(arguments[0],arguments[1]):h}function Fa(h,p){var x,E,P=h.__data__;return((E=typeof(x=p))=="string"||E=="number"||E=="symbol"||E=="boolean"?x!=="__proto__":x===null)?P[typeof p=="string"?"string":"hash"]:P.map}function od(h){for(var p=di(h),x=p.length;x--;){var E=p[x],P=h[E];p[x]=[E,P,_f(P)]}return p}function Ys(h,p){var x=function(E,P){return E==null?void 0:E[P]}(h,p);return Aa(x)?x:void 0}var br=Gc?function(h){return h==null?[]:(h=xn(h),qr(Gc(h),function(p){return uf.call(h,p)}))}:Oh,qs=Gc?function(h){for(var p=[];h;)mo(p,br(h)),h=Ju(h);return p}:Oh,ci=Ii;function Ba(h,p,x){for(var E=-1,P=(p=Ur(p,h)).length,V=!1;++E<P;){var re=wr(p[E]);if(!(V=h!=null&&x(h,re)))break;h=h[re]}return V||++E!=P?V:!!(P=h==null?0:h.length)&&wh(P)&&Li(re,P)&&(Ut(h)||rs(h))}function sd(h){return typeof h.constructor!="function"||Fl(h)?{}:Zo(Ju(h))}function zg(h){return Ut(h)||rs(h)||!!(Os&&h&&h[Os])}function Li(h,p){var x=typeof h;return!!(p=p==null?9007199254740991:p)&&(x=="number"||x!="symbol"&&Hp.test(h))&&h>-1&&h%1==0&&h<p}function Lt(h,p,x){if(!Bn(x))return!1;var E=typeof p;return!!(E=="number"?Ji(x)&&Li(p,x.length):E=="string"&&p in x)&&Tr(x[p],h)}function dt(h,p){if(Ut(h))return!1;var x=typeof h;return!(x!="number"&&x!="symbol"&&x!="boolean"&&h!=null&&!ur(h))||wn.test(h)||!Dn.test(h)||p!=null&&h in xn(p)}function ar(h){var p=Xs(h),x=T[p];if(typeof x!="function"||!(p in Ht.prototype))return!1;if(h===x)return!0;var E=ei(x);return!!E&&h===E[0]}(El&&ci(new El(new ArrayBuffer(1)))!=$e||wa&&ci(new wa)!=A||nh&&ci(nh.resolve())!="[object Promise]"||Ns&&ci(new Ns)!=z||Qe&&ci(new Qe)!=et)&&(ci=function(h){var p=Ii(h),x=p==j?h.constructor:void 0,E=x?ns(x):"";if(E)switch(E){case Hg:return $e;case Kn:return A;case zc:return"[object Promise]";case pn:return z;case Or:return et}return p});var Vg=wl?Gr:ja;function Fl(h){var p=h&&h.constructor;return h===(typeof p=="function"&&p.prototype||mr)}function _f(h){return h==h&&!Bn(h)}function yf(h,p){return function(x){return x!=null&&x[h]===p&&(p!==void 0||h in xn(x))}}function xf(h,p,x){return p=Sn(p===void 0?h.length-1:p,0),function(){for(var E=arguments,P=-1,V=Sn(E.length-p,0),re=ct(V);++P<V;)re[P]=E[p+P];P=-1;for(var ce=ct(p+1);++P<p;)ce[P]=E[P];return ce[p]=x(re),Ui(h,this,ce)}}function bf(h,p){return p.length<2?h:eo(h,jn(p,0,-1))}function jg(h,p){for(var x=h.length,E=ii(p.length,x),P=hi(h);E--;){var V=p[E];h[E]=Li(V,x)?P[V]:void 0}return h}function ad(h,p){if((p!=="constructor"||typeof h[p]!="function")&&p!="__proto__")return h[p]}var wf=Sf(ff),Bl=Gg||function(h,p){return Nn.setTimeout(h,p)},ld=Sf(_i);function Tf(h,p,x){var E=p+"";return ld(h,function(P,V){var re=V.length;if(!re)return P;var ce=re-1;return V[ce]=(re>1?"& ":"")+V[ce],V=V.join(re>2?", ":" "),P.replace(Ci,`{
9
- /* [wrapped with `+V+`] */
10
- `)}(E,function(P,V){return Wi(oe,function(re){var ce="_."+re[0];V&re[1]&&!xa(P,ce)&&P.push(ce)}),P.sort()}(function(P){var V=P.match(ji);return V?V[1].split(Lr):[]}(E),x)))}function Sf(h){var p=0,x=0;return function(){var E=rr(),P=16-(E-x);if(x=E,P>0){if(++p>=800)return arguments[0]}else p=0;return h.apply(void 0,arguments)}}function gh(h,p){var x=-1,E=h.length,P=E-1;for(p=p===void 0?E:p;++x<p;){var V=Qo(x,P),re=h[V];h[V]=h[x],h[x]=re}return h.length=p,h}var vh=function(h){var p=Ul(h,function(E){return x.size===500&&x.clear(),E}),x=p.cache;return p}(function(h){var p=[];return h.charCodeAt(0)===46&&p.push(""),h.replace(gn,function(x,E,P,V){p.push(P?V.replace(Np,"$1"):E||x)}),p});function wr(h){if(typeof h=="string"||ur(h))return h;var p=h+"";return p=="0"&&1/h==-1/0?"-0":p}function ns(h){if(h!=null){try{return Xu.call(h)}catch{}try{return h+""}catch{}}return""}function Ef(h){if(h instanceof Ht)return h.clone();var p=new In(h.__wrapped__,h.__chain__);return p.__actions__=hi(h.__actions__),p.__index__=h.__index__,p.__values__=h.__values__,p}var Wg=Yt(function(h,p){return An(h)?$o(h,pt(p,1,An,!0)):[]}),Mf=Yt(function(h,p){var x=lr(p);return An(x)&&(x=void 0),An(h)?$o(h,pt(p,1,An,!0),Pt(x,2)):[]}),Af=Yt(function(h,p){var x=lr(p);return An(x)&&(x=void 0),An(h)?$o(h,pt(p,1,An,!0),void 0,x):[]});function ud(h,p,x){var E=h==null?0:h.length;if(!E)return-1;var P=x==null?0:qt(x);return P<0&&(P=Sn(E+P,0)),vl(h,Pt(p,3),P)}function hd(h,p,x){var E=h==null?0:h.length;if(!E)return-1;var P=E-1;return x!==void 0&&(P=qt(x),P=x<0?Sn(E+P,0):ii(P,E-1)),vl(h,Pt(p,3),P,!0)}function cd(h){return(h==null?0:h.length)?pt(h,1):[]}function dd(h){return h&&h.length?h[0]:void 0}var Ua=Yt(function(h){var p=Tn(h,Ra);return p.length&&p[0]===h[0]?Xc(p):[]}),Hi=Yt(function(h){var p=lr(h),x=Tn(h,Ra);return p===lr(x)?p=void 0:x.pop(),x.length&&x[0]===h[0]?Xc(x,Pt(p,2)):[]}),Oi=Yt(function(h){var p=lr(h),x=Tn(h,Ra);return(p=typeof p=="function"?p:void 0)&&x.pop(),x.length&&x[0]===h[0]?Xc(x,void 0,p):[]});function lr(h){var p=h==null?0:h.length;return p?h[p-1]:void 0}var Xg=Yt(Pf);function Pf(h,p){return h&&h.length&&p&&p.length?Br(h,p):h}var Yg=io(function(h,p){var x=h==null?0:h.length,E=Cl(h,p);return Gs(h,Tn(p,function(P){return Li(P,x)?+P:P}).sort(vf)),E});function pd(h){return h==null?h:Sl.call(h)}var qg=Yt(function(h){return an(pt(h,1,An,!0))}),Zg=Yt(function(h){var p=lr(h);return An(p)&&(p=void 0),an(pt(h,1,An,!0),Pt(p,2))}),Jg=Yt(function(h){var p=lr(h);return p=typeof p=="function"?p:void 0,an(pt(h,1,An,!0),void 0,p)});function fd(h){if(!h||!h.length)return[];var p=0;return h=qr(h,function(x){if(An(x))return p=Sn(x.length,p),!0}),Vu(p,function(x){return Tn(h,Gu(x))})}function Cf(h,p){if(!h||!h.length)return[];var x=fd(h);return p==null?x:Tn(x,function(E){return Ui(p,void 0,E)})}var $g=Yt(function(h,p){return An(h)?$o(h,p):[]}),Kg=Yt(function(h){return dh(qr(h,An))}),Qg=Yt(function(h){var p=lr(h);return An(p)&&(p=void 0),dh(qr(h,An),Pt(p,2))}),ev=Yt(function(h){var p=lr(h);return p=typeof p=="function"?p:void 0,dh(qr(h,An),void 0,p)}),tv=Yt(fd),nv=Yt(function(h){var p=h.length,x=p>1?h[p-1]:void 0;return x=typeof x=="function"?(h.pop(),x):void 0,Cf(h,x)});function Rf(h){var p=T(h);return p.__chain__=!0,p}function _h(h,p){return p(h)}var iv=io(function(h){var p=h.length,x=p?h[0]:0,E=this.__wrapped__,P=function(V){return Cl(V,h)};return!(p>1||this.__actions__.length)&&E instanceof Ht&&Li(x)?((E=E.slice(x,+x+(p?1:0))).__actions__.push({func:_h,args:[P],thisArg:void 0}),new In(E,this.__chain__).thru(function(V){return p&&!V.length&&V.push(void 0),V})):this.thru(P)}),rv=es(function(h,p,x){un.call(h,x)?++h[x]:$r(h,x,1)}),ov=So(ud),sv=So(hd);function If(h,p){return(Ut(h)?Wi:ki)(h,Pt(p,3))}function Lf(h,p){return(Ut(h)?Pc:rh)(h,Pt(p,3))}var av=es(function(h,p,x){un.call(h,x)?h[x].push(p):$r(h,x,[p])}),lv=Yt(function(h,p,x){var E=-1,P=typeof p=="function",V=Ji(h)?ct(h.length):[];return ki(h,function(re){V[++E]=P?Ui(p,re,x):Ea(re,p,x)}),V}),uv=es(function(h,p,x){$r(h,x,p)});function yh(h,p){return(Ut(h)?Tn:qc)(h,Pt(p,3))}var hv=es(function(h,p,x){h[x?0:1].push(p)},function(){return[[],[]]}),cv=Yt(function(h,p){if(h==null)return[];var x=p.length;return x>1&&Lt(h,p[0],p[1])?p=[]:x>2&&Lt(p[0],p[1],p[2])&&(p=[p[0]]),to(h,pt(p,1),[])}),xh=kg||function(){return Nn.Date.now()};function Of(h,p,x){return p=x?void 0:p,ln(h,128,void 0,void 0,void 0,void 0,p=h&&p==null?h.length:p)}function Df(h,p){var x;if(typeof p!="function")throw new Yi(ie);return h=qt(h),function(){return--h>0&&(x=p.apply(this,arguments)),h<=1&&(p=void 0),x}}var md=Yt(function(h,p,x){var E=1;if(x.length){var P=go(x,kr(md));E|=32}return ln(h,E,p,x,P)}),Nf=Yt(function(h,p,x){var E=3;if(x.length){var P=go(x,kr(Nf));E|=32}return ln(p,E,h,x,P)});function Ff(h,p,x){var E,P,V,re,ce,_e,He=0,ze=!1,tt=!1,vt=!0;if(typeof h!="function")throw new Yi(ie);function yt(St){var It=E,jt=P;return E=P=void 0,He=St,re=h.apply(jt,It)}function Ct(St){return He=St,ce=Bl(nt,p),ze?yt(St):re}function Je(St){var It=St-_e;return _e===void 0||It>=p||It<0||tt&&St-He>=V}function nt(){var St=xh();if(Je(St))return Et(St);ce=Bl(nt,function(It){var jt=p-(It-_e);return tt?ii(jt,V-(It-He)):jt}(St))}function Et(St){return ce=void 0,vt&&E?yt(St):(E=P=void 0,re)}function mt(){var St=xh(),It=Je(St);if(E=arguments,P=this,_e=St,It){if(ce===void 0)return Ct(_e);if(tt)return ed(ce),ce=Bl(nt,p),yt(_e)}return ce===void 0&&(ce=Bl(nt,p)),re}return p=hr(p)||0,Bn(x)&&(ze=!!x.leading,V=(tt="maxWait"in x)?Sn(hr(x.maxWait)||0,p):V,vt="trailing"in x?!!x.trailing:vt),mt.cancel=function(){ce!==void 0&&ed(ce),He=0,E=_e=P=ce=void 0},mt.flush=function(){return ce===void 0?re:Et(xh())},mt}var dv=Yt(function(h,p){return ih(h,1,p)}),pv=Yt(function(h,p,x){return ih(h,hr(p)||0,x)});function Ul(h,p){if(typeof h!="function"||p!=null&&typeof p!="function")throw new Yi(ie);var x=function(){var E=arguments,P=p?p.apply(this,E):E[0],V=x.cache;if(V.has(P))return V.get(P);var re=h.apply(this,E);return x.cache=V.set(P,re)||V,re};return x.cache=new(Ul.Cache||qi),x}function kl(h){if(typeof h!="function")throw new Yi(ie);return function(){var p=arguments;switch(p.length){case 0:return!h.call(this);case 1:return!h.call(this,p[0]);case 2:return!h.call(this,p[0],p[1]);case 3:return!h.call(this,p[0],p[1],p[2])}return!h.apply(this,p)}}Ul.Cache=qi;var gd=gf(function(h,p){var x=(p=p.length==1&&Ut(p[0])?Tn(p[0],Xi(Pt())):Tn(pt(p,1),Xi(Pt()))).length;return Yt(function(E){for(var P=-1,V=ii(E.length,x);++P<V;)E[P]=p[P].call(this,E[P]);return Ui(h,this,E)})}),bh=Yt(function(h,p){return ln(h,32,void 0,p,go(p,kr(bh)))}),Bf=Yt(function(h,p){return ln(h,64,void 0,p,go(p,kr(Bf)))}),is=io(function(h,p){return ln(h,256,void 0,void 0,void 0,p)});function Tr(h,p){return h===p||h!=h&&p!=p}var fv=js(sh),Uf=js(function(h,p){return h>=p}),rs=ks(function(){return arguments}())?ks:function(h){return Un(h)&&un.call(h,"callee")&&!uf.call(h,"callee")},Ut=ct.isArray,mv=Ec?Xi(Ec):function(h){return Un(h)&&Ii(h)==ft};function Ji(h){return h!=null&&wh(h.length)&&!Gr(h)}function An(h){return Un(h)&&Ji(h)}var Mo=Hc||ja,kf=Mc?Xi(Mc):function(h){return Un(h)&&Ii(h)==Ee};function vd(h){if(!Un(h))return!1;var p=Ii(h);return p==Xe||p=="[object DOMException]"||typeof h.message=="string"&&typeof h.name=="string"&&!ka(h)}function Gr(h){if(!Bn(h))return!1;var p=Ii(h);return p==Fe||p==S||p=="[object AsyncFunction]"||p=="[object Proxy]"}function Gf(h){return typeof h=="number"&&h==qt(h)}function wh(h){return typeof h=="number"&&h>-1&&h%1==0&&h<=9007199254740991}function Bn(h){var p=typeof h;return h!=null&&(p=="object"||p=="function")}function Un(h){return h!=null&&typeof h=="object"}var Hf=Ou?Xi(Ou):function(h){return Un(h)&&ci(h)==A};function _d(h){return typeof h=="number"||Un(h)&&Ii(h)==L}function ka(h){if(!Un(h)||Ii(h)!=j)return!1;var p=Ju(h);if(p===null)return!0;var x=un.call(p,"constructor")&&p.constructor;return typeof x=="function"&&x instanceof x&&Xu.call(x)==Ng}var yd=Du?Xi(Du):function(h){return Un(h)&&Ii(h)==D},zf=Nu?Xi(Nu):function(h){return Un(h)&&ci(h)==z};function Th(h){return typeof h=="string"||!Ut(h)&&Un(h)&&Ii(h)==W}function ur(h){return typeof h=="symbol"||Un(h)&&Ii(h)==ee}var Zs=Fu?Xi(Fu):function(h){return Un(h)&&wh(h.length)&&!!dn[Ii(h)]},Vf=js(ah),gv=js(function(h,p){return h<=p});function jf(h){if(!h)return[];if(Ji(h))return Th(h)?wi(h):hi(h);if(Zr&&h[Zr])return function(x){for(var E,P=[];!(E=x.next()).done;)P.push(E.value);return P}(h[Zr]());var p=ci(h);return(p==A?Wu:p==z?Xo:ro)(h)}function Ao(h){return h?(h=hr(h))===1/0||h===-1/0?17976931348623157e292*(h<0?-1:1):h==h?h:0:h===0?h:0}function qt(h){var p=Ao(h),x=p%1;return p==p?x?p-x:p:0}function Wf(h){return h?wo(qt(h),0,4294967295):0}function hr(h){if(typeof h=="number")return h;if(ur(h))return NaN;if(Bn(h)){var p=typeof h.valueOf=="function"?h.valueOf():h;h=Bn(p)?p+"":p}if(typeof h!="string")return h===0?h:+h;h=Dc(h);var x=Up.test(h);return x||Gp.test(h)?Jp(h.slice(2),x?2:8):Bp.test(h)?NaN:+h}function Xf(h){return Wn(h,yi(h))}function on(h){return h==null?"":Qn(h)}var Sh=Fn(function(h,p){if(Fl(p)||Ji(p))Wn(p,di(p),h);else for(var x in p)un.call(p,x)&&Jo(h,x,p[x])}),xd=Fn(function(h,p){Wn(p,yi(p),h)}),Eh=Fn(function(h,p,x,E){Wn(p,yi(p),h,E)}),vv=Fn(function(h,p,x,E){Wn(p,di(p),h,E)}),Yf=io(Cl),bd=Yt(function(h,p){h=xn(h);var x=-1,E=p.length,P=E>2?p[2]:void 0;for(P&&Lt(p[0],p[1],P)&&(E=1);++x<E;)for(var V=p[x],re=yi(V),ce=-1,_e=re.length;++ce<_e;){var He=re[ce],ze=h[He];(ze===void 0||Tr(ze,mr[He])&&!un.call(h,He))&&(h[He]=V[He])}return h}),Js=Yt(function(h){return h.push(void 0,no),Ui(Ga,void 0,h)});function wd(h,p,x){var E=h==null?void 0:eo(h,p);return E===void 0?x:E}function Gl(h,p){return h!=null&&Ba(h,p,Wc)}var _v=mh(function(h,p,x){p!=null&&typeof p.toString!="function"&&(p=Yu.call(p)),h[p]=x},za(zi)),yv=mh(function(h,p,x){p!=null&&typeof p.toString!="function"&&(p=Yu.call(p)),un.call(h,p)?h[p].push(x):h[p]=[x]},Pt),fn=Yt(Ea);function di(h){return Ji(h)?xo(h):Yc(h)}function yi(h){return Ji(h)?xo(h,!0):df(h)}var Hl=Fn(function(h,p,x){Xt(h,p,x)}),Ga=Fn(function(h,p,x,E){Xt(h,p,x,E)}),$s=io(function(h,p){var x={};if(h==null)return x;var E=!1;p=Tn(p,function(V){return V=Ur(V,h),E||(E=V.length>1),V}),Wn(h,Ws(h),x),E&&(x=ui(x,7,Na));for(var P=p.length;P--;)Ca(x,p[P]);return x}),ti=io(function(h,p){return h==null?{}:function(x,E){return lh(x,E,function(P,V){return Gl(x,V)})}(h,p)});function Po(h,p){if(h==null)return{};var x=Tn(Ws(h),function(E){return[E]});return p=Pt(p),lh(h,x,function(E,P){return p(E,P[0])})}var zl=Dl(di),Ks=Dl(yi);function ro(h){return h==null?[]:ju(h,di(h))}var Ha=ts(function(h,p,x){return p=p.toLowerCase(),h+(x?Qs(p):p)});function Qs(h){return Wl(on(h).toLowerCase())}function ea(h){return(h=on(h))&&h.replace(Iu,nf).replace(Xp,"")}var Vl=ts(function(h,p,x){return h+(x?"-":"")+p.toLowerCase()}),qf=ts(function(h,p,x){return h+(x?" ":"")+p.toLowerCase()}),Mh=zs("toLowerCase"),jl=ts(function(h,p,x){return h+(x?"_":"")+p.toLowerCase()}),Ah=ts(function(h,p,x){return h+(x?" ":"")+Wl(p)}),Zf=ts(function(h,p,x){return h+(x?" ":"")+p.toUpperCase()}),Wl=zs("toUpperCase");function Td(h,p,x){return h=on(h),(p=x?void 0:p)===void 0?function(E){return Yp.test(E)}(h)?function(E){return E.match(po)||[]}(h):function(E){return E.match(Dp)||[]}(h):h.match(p)||[]}var Xl=Yt(function(h,p){try{return Ui(h,void 0,p)}catch(x){return vd(x)?x:new $t(x)}}),Ph=io(function(h,p){return Wi(p,function(x){x=wr(x),$r(h,x,md(h[x],h))}),h});function za(h){return function(){return h}}var Jf=Eo(),$f=Eo(!0);function zi(h){return h}function Ch(h){return cf(typeof h=="function"?h:ui(h,1))}var Kf=Yt(function(h,p){return function(x){return Ea(x,h,p)}}),xv=Yt(function(h,p){return function(x){return Ea(h,x,p)}});function Rh(h,p,x){var E=di(p),P=Fr(p,E);x!=null||Bn(p)&&(P.length||!E.length)||(x=p,p=h,h=this,P=Fr(p,di(p)));var V=!(Bn(x)&&"chain"in x&&!x.chain),re=Gr(h);return Wi(P,function(ce){var _e=p[ce];h[ce]=_e,re&&(h.prototype[ce]=function(){var He=this.__chain__;if(V||He){var ze=h(this.__wrapped__),tt=ze.__actions__=hi(this.__actions__);return tt.push({func:_e,args:arguments,thisArg:h}),ze.__chain__=He,ze}return _e.apply(h,mo([this.value()],arguments))})}),h}function Va(){}var Ih=Oa(Tn),os=Oa(Cc),Qf=Oa(ku);function em(h){return dt(h)?Gu(wr(h)):function(p){return function(x){return eo(x,p)}}(h)}var Lh=Ll(),tm=Ll(!0);function Oh(){return[]}function ja(){return!1}var Yl=La(function(h,p){return h+p},0),Sd=Da("ceil"),xi=La(function(h,p){return h/p},1),nm=Da("floor"),Dh,im=La(function(h,p){return h*p},1),Ed=Da("round"),Nh=La(function(h,p){return h-p},0);return T.after=function(h,p){if(typeof p!="function")throw new Yi(ie);return h=qt(h),function(){if(--h<1)return p.apply(this,arguments)}},T.ary=Of,T.assign=Sh,T.assignIn=xd,T.assignInWith=Eh,T.assignWith=vv,T.at=Yf,T.before=Df,T.bind=md,T.bindAll=Ph,T.bindKey=Nf,T.castArray=function(){if(!arguments.length)return[];var h=arguments[0];return Ut(h)?h:[h]},T.chain=Rf,T.chunk=function(h,p,x){p=(x?Lt(h,p,x):p===void 0)?1:Sn(qt(p),0);var E=h==null?0:h.length;if(!E||p<1)return[];for(var P=0,V=0,re=ct(Ku(E/p));P<E;)re[V++]=jn(h,P,P+=p);return re},T.compact=function(h){for(var p=-1,x=h==null?0:h.length,E=0,P=[];++p<x;){var V=h[p];V&&(P[E++]=V)}return P},T.concat=function(){var h=arguments.length;if(!h)return[];for(var p=ct(h-1),x=arguments[0],E=h;E--;)p[E-1]=arguments[E];return mo(Ut(x)?hi(x):[x],pt(p,1))},T.cond=function(h){var p=h==null?0:h.length,x=Pt();return h=p?Tn(h,function(E){if(typeof E[1]!="function")throw new Yi(ie);return[x(E[0]),E[1]]}):[],Yt(function(E){for(var P=-1;++P<p;){var V=h[P];if(Ui(V[0],this,E))return Ui(V[1],this,E)}})},T.conforms=function(h){return function(p){var x=di(p);return function(E){return Kr(E,p,x)}}(ui(h,1))},T.constant=za,T.countBy=rv,T.create=function(h,p){var x=Zo(h);return p==null?x:hf(x,p)},T.curry=function h(p,x,E){var P=ln(p,8,void 0,void 0,void 0,void 0,void 0,x=E?void 0:x);return P.placeholder=h.placeholder,P},T.curryRight=function h(p,x,E){var P=ln(p,16,void 0,void 0,void 0,void 0,void 0,x=E?void 0:x);return P.placeholder=h.placeholder,P},T.debounce=Ff,T.defaults=bd,T.defaultsDeep=Js,T.defer=dv,T.delay=pv,T.difference=Wg,T.differenceBy=Mf,T.differenceWith=Af,T.drop=function(h,p,x){var E=h==null?0:h.length;return E?jn(h,(p=x||p===void 0?1:qt(p))<0?0:p,E):[]},T.dropRight=function(h,p,x){var E=h==null?0:h.length;return E?jn(h,0,(p=E-(p=x||p===void 0?1:qt(p)))<0?0:p):[]},T.dropRightWhile=function(h,p){return h&&h.length?Il(h,Pt(p,3),!0,!0):[]},T.dropWhile=function(h,p){return h&&h.length?Il(h,Pt(p,3),!0):[]},T.fill=function(h,p,x,E){var P=h==null?0:h.length;return P?(x&&typeof x!="number"&&Lt(h,p,x)&&(x=0,E=P),function(V,re,ce,_e){var He=V.length;for((ce=qt(ce))<0&&(ce=-ce>He?0:He+ce),(_e=_e===void 0||_e>He?He:qt(_e))<0&&(_e+=He),_e=ce>_e?0:Wf(_e);ce<_e;)V[ce++]=re;return V}(h,p,x,E)):[]},T.filter=function(h,p){return(Ut(h)?qr:To)(h,Pt(p,3))},T.flatMap=function(h,p){return pt(yh(h,p),1)},T.flatMapDeep=function(h,p){return pt(yh(h,p),1/0)},T.flatMapDepth=function(h,p,x){return x=x===void 0?1:qt(x),pt(yh(h,p),x)},T.flatten=cd,T.flattenDeep=function(h){return(h==null?0:h.length)?pt(h,1/0):[]},T.flattenDepth=function(h,p){return(h==null?0:h.length)?pt(h,p=p===void 0?1:qt(p)):[]},T.flip=function(h){return ln(h,512)},T.flow=Jf,T.flowRight=$f,T.fromPairs=function(h){for(var p=-1,x=h==null?0:h.length,E={};++p<x;){var P=h[p];E[P[0]]=P[1]}return E},T.functions=function(h){return h==null?[]:Fr(h,di(h))},T.functionsIn=function(h){return h==null?[]:Fr(h,yi(h))},T.groupBy=av,T.initial=function(h){return(h==null?0:h.length)?jn(h,0,-1):[]},T.intersection=Ua,T.intersectionBy=Hi,T.intersectionWith=Oi,T.invert=_v,T.invertBy=yv,T.invokeMap=lv,T.iteratee=Ch,T.keyBy=uv,T.keys=di,T.keysIn=yi,T.map=yh,T.mapKeys=function(h,p){var x={};return p=Pt(p,3),Qr(h,function(E,P,V){$r(x,p(E,P,V),E)}),x},T.mapValues=function(h,p){var x={};return p=Pt(p,3),Qr(h,function(E,P,V){$r(x,P,p(E,P,V))}),x},T.matches=function(h){return pf(ui(h,1))},T.matchesProperty=function(h,p){return Zc(h,ui(p,1))},T.memoize=Ul,T.merge=Hl,T.mergeWith=Ga,T.method=Kf,T.methodOf=xv,T.mixin=Rh,T.negate=kl,T.nthArg=function(h){return h=qt(h),Yt(function(p){return yr(p,h)})},T.omit=$s,T.omitBy=function(h,p){return Po(h,kl(Pt(p)))},T.once=function(h){return Df(2,h)},T.orderBy=function(h,p,x,E){return h==null?[]:(Ut(p)||(p=p==null?[]:[p]),Ut(x=E?void 0:x)||(x=x==null?[]:[x]),to(h,p,x))},T.over=Ih,T.overArgs=gd,T.overEvery=os,T.overSome=Qf,T.partial=bh,T.partialRight=Bf,T.partition=hv,T.pick=ti,T.pickBy=Po,T.property=em,T.propertyOf=function(h){return function(p){return h==null?void 0:eo(h,p)}},T.pull=Xg,T.pullAll=Pf,T.pullAllBy=function(h,p,x){return h&&h.length&&p&&p.length?Br(h,p,Pt(x,2)):h},T.pullAllWith=function(h,p,x){return h&&h.length&&p&&p.length?Br(h,p,void 0,x):h},T.pullAt=Yg,T.range=Lh,T.rangeRight=tm,T.rearg=is,T.reject=function(h,p){return(Ut(h)?qr:To)(h,kl(Pt(p,3)))},T.remove=function(h,p){var x=[];if(!h||!h.length)return x;var E=-1,P=[],V=h.length;for(p=Pt(p,3);++E<V;){var re=h[E];p(re,E,h)&&(x.push(re),P.push(E))}return Gs(h,P),x},T.rest=function(h,p){if(typeof h!="function")throw new Yi(ie);return Yt(h,p=p===void 0?p:qt(p))},T.reverse=pd,T.sampleSize=function(h,p,x){return p=(x?Lt(h,p,x):p===void 0)?1:qt(p),(Ut(h)?Bs:$c)(h,p)},T.set=function(h,p,x){return h==null?h:Mn(h,p,x)},T.setWith=function(h,p,x,E){return E=typeof E=="function"?E:void 0,h==null?h:Mn(h,p,x,E)},T.shuffle=function(h){return(Ut(h)?Pl:mf)(h)},T.slice=function(h,p,x){var E=h==null?0:h.length;return E?(x&&typeof x!="number"&&Lt(h,p,x)?(p=0,x=E):(p=p==null?0:qt(p),x=x===void 0?E:qt(x)),jn(h,p,x)):[]},T.sortBy=cv,T.sortedUniq=function(h){return h&&h.length?ch(h):[]},T.sortedUniqBy=function(h,p){return h&&h.length?ch(h,Pt(p,2)):[]},T.split=function(h,p,x){return x&&typeof x!="number"&&Lt(h,p,x)&&(p=x=void 0),(x=x===void 0?4294967295:x>>>0)?(h=on(h))&&(typeof p=="string"||p!=null&&!yd(p))&&!(p=Qn(p))&&Is(h)?st(wi(h),0,x):h.split(p,x):[]},T.spread=function(h,p){if(typeof h!="function")throw new Yi(ie);return p=p==null?0:Sn(qt(p),0),Yt(function(x){var E=x[p],P=st(x,0,p);return E&&mo(P,E),Ui(h,this,P)})},T.tail=function(h){var p=h==null?0:h.length;return p?jn(h,1,p):[]},T.take=function(h,p,x){return h&&h.length?jn(h,0,(p=x||p===void 0?1:qt(p))<0?0:p):[]},T.takeRight=function(h,p,x){var E=h==null?0:h.length;return E?jn(h,(p=E-(p=x||p===void 0?1:qt(p)))<0?0:p,E):[]},T.takeRightWhile=function(h,p){return h&&h.length?Il(h,Pt(p,3),!1,!0):[]},T.takeWhile=function(h,p){return h&&h.length?Il(h,Pt(p,3)):[]},T.tap=function(h,p){return p(h),h},T.throttle=function(h,p,x){var E=!0,P=!0;if(typeof h!="function")throw new Yi(ie);return Bn(x)&&(E="leading"in x?!!x.leading:E,P="trailing"in x?!!x.trailing:P),Ff(h,p,{leading:E,maxWait:p,trailing:P})},T.thru=_h,T.toArray=jf,T.toPairs=zl,T.toPairsIn=Ks,T.toPath=function(h){return Ut(h)?Tn(h,wr):ur(h)?[h]:hi(vh(on(h)))},T.toPlainObject=Xf,T.transform=function(h,p,x){var E=Ut(h),P=E||Mo(h)||Zs(h);if(p=Pt(p,4),x==null){var V=h&&h.constructor;x=P?E?new V:[]:Bn(h)&&Gr(V)?Zo(Ju(h)):{}}return(P?Wi:Qr)(h,function(re,ce,_e){return p(x,re,ce,_e)}),x},T.unary=function(h){return Of(h,1)},T.union=qg,T.unionBy=Zg,T.unionWith=Jg,T.uniq=function(h){return h&&h.length?an(h):[]},T.uniqBy=function(h,p){return h&&h.length?an(h,Pt(p,2)):[]},T.uniqWith=function(h,p){return p=typeof p=="function"?p:void 0,h&&h.length?an(h,void 0,p):[]},T.unset=function(h,p){return h==null||Ca(h,p)},T.unzip=fd,T.unzipWith=Cf,T.update=function(h,p,x){return h==null?h:Zt(h,p,ph(x))},T.updateWith=function(h,p,x,E){return E=typeof E=="function"?E:void 0,h==null?h:Zt(h,p,ph(x),E)},T.values=ro,T.valuesIn=function(h){return h==null?[]:ju(h,yi(h))},T.without=$g,T.words=Td,T.wrap=function(h,p){return bh(ph(p),h)},T.xor=Kg,T.xorBy=Qg,T.xorWith=ev,T.zip=tv,T.zipObject=function(h,p){return Qc(h||[],p||[],Jo)},T.zipObjectDeep=function(h,p){return Qc(h||[],p||[],Mn)},T.zipWith=nv,T.entries=zl,T.entriesIn=Ks,T.extend=xd,T.extendWith=Eh,Rh(T,T),T.add=Yl,T.attempt=Xl,T.camelCase=Ha,T.capitalize=Qs,T.ceil=Sd,T.clamp=function(h,p,x){return x===void 0&&(x=p,p=void 0),x!==void 0&&(x=(x=hr(x))==x?x:0),p!==void 0&&(p=(p=hr(p))==p?p:0),wo(hr(h),p,x)},T.clone=function(h){return ui(h,4)},T.cloneDeep=function(h){return ui(h,5)},T.cloneDeepWith=function(h,p){return ui(h,5,p=typeof p=="function"?p:void 0)},T.cloneWith=function(h,p){return ui(h,4,p=typeof p=="function"?p:void 0)},T.conformsTo=function(h,p){return p==null||Kr(h,p,di(p))},T.deburr=ea,T.defaultTo=function(h,p){return h==null||h!=h?p:h},T.divide=xi,T.endsWith=function(h,p,x){h=on(h),p=Qn(p);var E=h.length,P=x=x===void 0?E:wo(qt(x),0,E);return(x-=p.length)>=0&&h.slice(x,P)==p},T.eq=Tr,T.escape=function(h){return(h=on(h))&&en.test(h)?h.replace(Qt,rf):h},T.escapeRegExp=function(h){return(h=on(h))&&yn.test(h)?h.replace(Zn,"\\$&"):h},T.every=function(h,p,x){var E=Ut(h)?Cc:oh;return x&&Lt(h,p,x)&&(p=void 0),E(h,Pt(p,3))},T.find=ov,T.findIndex=ud,T.findKey=function(h,p){return Rc(h,Pt(p,3),Qr)},T.findLast=sv,T.findLastIndex=hd,T.findLastKey=function(h,p){return Rc(h,Pt(p,3),jc)},T.floor=nm,T.forEach=If,T.forEachRight=Lf,T.forIn=function(h,p){return h==null?h:Ko(h,Pt(p,3),yi)},T.forInRight=function(h,p){return h==null?h:_r(h,Pt(p,3),yi)},T.forOwn=function(h,p){return h&&Qr(h,Pt(p,3))},T.forOwnRight=function(h,p){return h&&jc(h,Pt(p,3))},T.get=wd,T.gt=fv,T.gte=Uf,T.has=function(h,p){return h!=null&&Ba(h,p,Us)},T.hasIn=Gl,T.head=dd,T.identity=zi,T.includes=function(h,p,x,E){h=Ji(h)?h:ro(h),x=x&&!E?qt(x):0;var P=h.length;return x<0&&(x=Sn(P+x,0)),Th(h)?x<=P&&h.indexOf(p,x)>-1:!!P&&Rs(h,p,x)>-1},T.indexOf=function(h,p,x){var E=h==null?0:h.length;if(!E)return-1;var P=x==null?0:qt(x);return P<0&&(P=Sn(E+P,0)),Rs(h,p,P)},T.inRange=function(h,p,x){return p=Ao(p),x===void 0?(x=p,p=0):x=Ao(x),function(E,P,V){return E>=ii(P,V)&&E<Sn(P,V)}(h=hr(h),p,x)},T.invoke=fn,T.isArguments=rs,T.isArray=Ut,T.isArrayBuffer=mv,T.isArrayLike=Ji,T.isArrayLikeObject=An,T.isBoolean=function(h){return h===!0||h===!1||Un(h)&&Ii(h)==le},T.isBuffer=Mo,T.isDate=kf,T.isElement=function(h){return Un(h)&&h.nodeType===1&&!ka(h)},T.isEmpty=function(h){if(h==null)return!0;if(Ji(h)&&(Ut(h)||typeof h=="string"||typeof h.splice=="function"||Mo(h)||Zs(h)||rs(h)))return!h.length;var p=ci(h);if(p==A||p==z)return!h.size;if(Fl(h))return!Yc(h).length;for(var x in h)if(un.call(h,x))return!1;return!0},T.isEqual=function(h,p){return or(h,p)},T.isEqualWith=function(h,p,x){var E=(x=typeof x=="function"?x:void 0)?x(h,p):void 0;return E===void 0?or(h,p,void 0,x):!!E},T.isError=vd,T.isFinite=function(h){return typeof h=="number"&&_o(h)},T.isFunction=Gr,T.isInteger=Gf,T.isLength=wh,T.isMap=Hf,T.isMatch=function(h,p){return h===p||Ma(h,p,od(p))},T.isMatchWith=function(h,p,x){return x=typeof x=="function"?x:void 0,Ma(h,p,od(p),x)},T.isNaN=function(h){return _d(h)&&h!=+h},T.isNative=function(h){if(Vg(h))throw new $t("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Aa(h)},T.isNil=function(h){return h==null},T.isNull=function(h){return h===null},T.isNumber=_d,T.isObject=Bn,T.isObjectLike=Un,T.isPlainObject=ka,T.isRegExp=yd,T.isSafeInteger=function(h){return Gf(h)&&h>=-9007199254740991&&h<=9007199254740991},T.isSet=zf,T.isString=Th,T.isSymbol=ur,T.isTypedArray=Zs,T.isUndefined=function(h){return h===void 0},T.isWeakMap=function(h){return Un(h)&&ci(h)==et},T.isWeakSet=function(h){return Un(h)&&Ii(h)=="[object WeakSet]"},T.join=function(h,p){return h==null?"":Ti.call(h,p)},T.kebabCase=Vl,T.last=lr,T.lastIndexOf=function(h,p,x){var E=h==null?0:h.length;if(!E)return-1;var P=E;return x!==void 0&&(P=(P=qt(x))<0?Sn(E+P,0):ii(P,E-1)),p==p?function(V,re,ce){for(var _e=ce+1;_e--;)if(V[_e]===re)return _e;return _e}(h,p,P):vl(h,Ic,P,!0)},T.lowerCase=qf,T.lowerFirst=Mh,T.lt=Vf,T.lte=gv,T.max=function(h){return h&&h.length?Sa(h,zi,sh):void 0},T.maxBy=function(h,p){return h&&h.length?Sa(h,Pt(p,2),sh):void 0},T.mean=function(h){return Lc(h,zi)},T.meanBy=function(h,p){return Lc(h,Pt(p,2))},T.min=function(h){return h&&h.length?Sa(h,zi,ah):void 0},T.minBy=function(h,p){return h&&h.length?Sa(h,Pt(p,2),ah):void 0},T.stubArray=Oh,T.stubFalse=ja,T.stubObject=function(){return{}},T.stubString=function(){return""},T.stubTrue=function(){return!0},T.multiply=im,T.nth=function(h,p){return h&&h.length?yr(h,qt(p)):void 0},T.noConflict=function(){return Nn._===this&&(Nn._=Fg),this},T.noop=Va,T.now=xh,T.pad=function(h,p,x){h=on(h);var E=(p=qt(p))?vo(h):0;if(!p||E>=p)return h;var P=(p-E)/2;return Vs(Qu(P),x)+h+Vs(Ku(P),x)},T.padEnd=function(h,p,x){h=on(h);var E=(p=qt(p))?vo(h):0;return p&&E<p?h+Vs(p-E,x):h},T.padStart=function(h,p,x){h=on(h);var E=(p=qt(p))?vo(h):0;return p&&E<p?Vs(p-E,x)+h:h},T.parseInt=function(h,p,x){return x||p==null?p=0:p&&(p=+p),Si(on(h).replace(li,""),p||0)},T.random=function(h,p,x){if(x&&typeof x!="boolean"&&Lt(h,p,x)&&(p=x=void 0),x===void 0&&(typeof p=="boolean"?(x=p,p=void 0):typeof h=="boolean"&&(x=h,h=void 0)),h===void 0&&p===void 0?(h=0,p=1):(h=Ao(h),p===void 0?(p=h,h=0):p=Ao(p)),h>p){var E=h;h=p,p=E}if(x||h%1||p%1){var P=th();return ii(h+P*(p-h+tr("1e-"+((P+"").length-1))),p)}return Qo(h,p)},T.reduce=function(h,p,x){var E=Ut(h)?Uu:Oc,P=arguments.length<3;return E(h,Pt(p,4),x,P,ki)},T.reduceRight=function(h,p,x){var E=Ut(h)?Kp:Oc,P=arguments.length<3;return E(h,Pt(p,4),x,P,rh)},T.repeat=function(h,p,x){return p=(x?Lt(h,p,x):p===void 0)?1:qt(p),uh(on(h),p)},T.replace=function(){var h=arguments,p=on(h[0]);return h.length<3?p:p.replace(h[1],h[2])},T.result=function(h,p,x){var E=-1,P=(p=Ur(p,h)).length;for(P||(P=1,h=void 0);++E<P;){var V=h==null?void 0:h[wr(p[E])];V===void 0&&(E=P,V=x),h=Gr(V)?V.call(h):V}return h},T.round=Ed,T.runInContext=we,T.sample=function(h){return(Ut(h)?bo:Jc)(h)},T.size=function(h){if(h==null)return 0;if(Ji(h))return Th(h)?vo(h):h.length;var p=ci(h);return p==A||p==z?h.size:Yc(h).length},T.snakeCase=jl,T.some=function(h,p,x){var E=Ut(h)?ku:hh;return x&&Lt(h,p,x)&&(p=void 0),E(h,Pt(p,3))},T.sortedIndex=function(h,p){return Pa(h,p)},T.sortedIndexBy=function(h,p,x){return Rl(h,p,Pt(x,2))},T.sortedIndexOf=function(h,p){var x=h==null?0:h.length;if(x){var E=Pa(h,p);if(E<x&&Tr(h[E],p))return E}return-1},T.sortedLastIndex=function(h,p){return Pa(h,p,!0)},T.sortedLastIndexBy=function(h,p,x){return Rl(h,p,Pt(x,2),!0)},T.sortedLastIndexOf=function(h,p){if(h==null?0:h.length){var x=Pa(h,p,!0)-1;if(Tr(h[x],p))return x}return-1},T.startCase=Ah,T.startsWith=function(h,p,x){return h=on(h),x=x==null?0:wo(qt(x),0,h.length),p=Qn(p),h.slice(x,x+p.length)==p},T.subtract=Nh,T.sum=function(h){return h&&h.length?zu(h,zi):0},T.sumBy=function(h,p){return h&&h.length?zu(h,Pt(p,2)):0},T.template=function(h,p,x){var E=T.templateSettings;x&&Lt(h,p,x)&&(p=void 0),h=on(h),p=Eh({},p,E,Nl);var P,V,re=Eh({},p.imports,E.imports,Nl),ce=di(re),_e=ju(re,ce),He=0,ze=p.interpolate||zo,tt="__p += '",vt=xl((p.escape||zo).source+"|"+ze.source+"|"+(ze===bt?Fp:zo).source+"|"+(p.evaluate||zo).source+"|$","g"),yt="//# sourceURL="+(un.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zp+"]")+`
8
+ */(function(){var ie="Expected a function",k="__lodash_placeholder__",oe=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],X="[object Arguments]",K="[object Array]",le="[object Boolean]",Ee="[object Date]",Xe="[object Error]",Fe="[object Function]",S="[object GeneratorFunction]",A="[object Map]",O="[object Number]",V="[object Object]",D="[object RegExp]",z="[object Set]",W="[object String]",ee="[object Symbol]",et="[object WeakMap]",ft="[object ArrayBuffer]",$e="[object DataView]",ae="[object Float32Array]",Ce="[object Float64Array]",Ie="[object Int8Array]",H="[object Int16Array]",be="[object Int32Array]",Me="[object Uint8Array]",Oe="[object Uint16Array]",Se="[object Uint32Array]",Ue=/\b__p \+= '';/g,qe=/\b(__p \+=) '' \+/g,at=/(__e\(.*?\)|\b__t\)) \+\n'';/g,rt=/&(?:amp|lt|gt|quot|#39);/g,Qt=/[&<>"']/g,lt=RegExp(rt.source),en=RegExp(Qt.source),Bt=/<%-([\s\S]+?)%>/g,Vt=/<%([\s\S]+?)%>/g,bt=/<%=([\s\S]+?)%>/g,Dn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wn=/^\w*$/,gn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zn=/[\\^$.*+?()[\]{}|]/g,yn=RegExp(Zn.source),li=/^\s+/,Bi=/\s/,Ci=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ji=/\{\n\/\* \[wrapped with (.+)\] \*/,Lr=/,? & /,Dp=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ul=/[()=,{}\[\]\/\s]/,Np=/\\(\\)?/g,Fp=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,co=/\w*$/,Bp=/^[-+]0x[0-9a-f]+$/i,Up=/^0b[01]+$/i,kp=/^\[object .+?Constructor\]$/,Gp=/^0o[0-7]+$/i,Hp=/^(?:0|[1-9]\d*)$/,Iu=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zo=/($^)/,hl=/['\n\r\u2028\u2029\\]/g,cl="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",dl="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",va="[\\ud800-\\udfff]",_a="["+dl+"]",Vo="["+cl+"]",gi="\\d+",pl="[\\u2700-\\u27bf]",Jn="[a-z\\xdf-\\xf6\\xf8-\\xff]",fl="[^\\ud800-\\udfff"+dl+gi+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",bc="\\ud83c[\\udffb-\\udfff]",ml="[^\\ud800-\\udfff]",wc="(?:\\ud83c[\\udde6-\\uddff]){2}",$n="[\\ud800-\\udbff][\\udc00-\\udfff]",jo="[A-Z\\xc0-\\xd6\\xd8-\\xde]",zp="(?:"+Jn+"|"+fl+")",Ms="(?:"+jo+"|"+fl+")",Vp="(?:"+Vo+"|"+bc+")?",Wo="[\\ufe0e\\ufe0f]?"+Vp+("(?:\\u200d(?:"+[ml,wc,$n].join("|")+")[\\ufe0e\\ufe0f]?"+Vp+")*"),jp="(?:"+[pl,wc,$n].join("|")+")"+Wo,Wp="(?:"+[ml+Vo+"?",Vo,wc,$n,va].join("|")+")",gl=RegExp("['\u2019]","g"),Xp=RegExp(Vo,"g"),As=RegExp(bc+"(?="+bc+")|"+Wp+Wo,"g"),po=RegExp([jo+"?"+Jn+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[_a,jo,"$"].join("|")+")",Ms+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[_a,jo+zp,"$"].join("|")+")",jo+"?"+zp+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",jo+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gi,jp].join("|"),"g"),Ps=RegExp("[\\u200d\\ud800-\\udfff"+cl+"\\ufe0e\\ufe0f]"),Yp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qp=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Zp=-1,dn={};dn[ae]=dn[Ce]=dn[Ie]=dn[H]=dn[be]=dn[Me]=dn["[object Uint8ClampedArray]"]=dn[Oe]=dn[Se]=!0,dn[X]=dn[K]=dn[ft]=dn[le]=dn[$e]=dn[Ee]=dn[Xe]=dn[Fe]=dn[A]=dn[O]=dn[V]=dn[D]=dn[z]=dn[W]=dn[et]=!1;var _n={};_n[X]=_n[K]=_n[ft]=_n[$e]=_n[le]=_n[Ee]=_n[ae]=_n[Ce]=_n[Ie]=_n[H]=_n[be]=_n[A]=_n[O]=_n[V]=_n[D]=_n[z]=_n[W]=_n[ee]=_n[Me]=_n["[object Uint8ClampedArray]"]=_n[Oe]=_n[Se]=!0,_n[Xe]=_n[Fe]=_n[et]=!1;var fo={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tr=parseFloat,Jp=parseInt,Tc=typeof b=="object"&&b&&b.Object===Object&&b,$p=typeof self=="object"&&self&&self.Object===Object&&self,Nn=Tc||$p||Function("return this")(),Cs=L&&!L.nodeType&&L,ya=Cs&&typeof q=="object"&&q&&!q.nodeType&&q,Sc=ya&&ya.exports===Cs,Lu=Sc&&Tc.process,nr=function(){try{var we=ya&&ya.require&&ya.require("util").types;return we||Lu&&Lu.binding&&Lu.binding("util")}catch{}}(),Ec=nr&&nr.isArrayBuffer,Mc=nr&&nr.isDate,Ou=nr&&nr.isMap,Du=nr&&nr.isRegExp,Nu=nr&&nr.isSet,Fu=nr&&nr.isTypedArray;function Ui(we,je,Ze){switch(Ze.length){case 0:return we.call(je);case 1:return we.call(je,Ze[0]);case 2:return we.call(je,Ze[0],Ze[1]);case 3:return we.call(je,Ze[0],Ze[1],Ze[2])}return we.apply(je,Ze)}function Ac(we,je,Ze,ct){for(var wt=-1,$t=we==null?0:we.length;++wt<$t;){var Vn=we[wt];je(ct,Vn,Ze(Vn),we)}return ct}function Wi(we,je){for(var Ze=-1,ct=we==null?0:we.length;++Ze<ct&&je(we[Ze],Ze,we)!==!1;);return we}function Pc(we,je){for(var Ze=we==null?0:we.length;Ze--&&je(we[Ze],Ze,we)!==!1;);return we}function Cc(we,je){for(var Ze=-1,ct=we==null?0:we.length;++Ze<ct;)if(!je(we[Ze],Ze,we))return!1;return!0}function qr(we,je){for(var Ze=-1,ct=we==null?0:we.length,wt=0,$t=[];++Ze<ct;){var Vn=we[Ze];je(Vn,Ze,we)&&($t[wt++]=Vn)}return $t}function xa(we,je){return!!(we==null?0:we.length)&&Rs(we,je,0)>-1}function Bu(we,je,Ze){for(var ct=-1,wt=we==null?0:we.length;++ct<wt;)if(Ze(je,we[ct]))return!0;return!1}function Tn(we,je){for(var Ze=-1,ct=we==null?0:we.length,wt=Array(ct);++Ze<ct;)wt[Ze]=je(we[Ze],Ze,we);return wt}function mo(we,je){for(var Ze=-1,ct=je.length,wt=we.length;++Ze<ct;)we[wt+Ze]=je[Ze];return we}function Uu(we,je,Ze,ct){var wt=-1,$t=we==null?0:we.length;for(ct&&$t&&(Ze=we[++wt]);++wt<$t;)Ze=je(Ze,we[wt],wt,we);return Ze}function Kp(we,je,Ze,ct){var wt=we==null?0:we.length;for(ct&&wt&&(Ze=we[--wt]);wt--;)Ze=je(Ze,we[wt],wt,we);return Ze}function ku(we,je){for(var Ze=-1,ct=we==null?0:we.length;++Ze<ct;)if(je(we[Ze],Ze,we))return!0;return!1}var Qp=Gu("length");function Rc(we,je,Ze){var ct;return Ze(we,function(wt,$t,Vn){if(je(wt,$t,Vn))return ct=$t,!1}),ct}function vl(we,je,Ze,ct){for(var wt=we.length,$t=Ze+(ct?1:-1);ct?$t--:++$t<wt;)if(je(we[$t],$t,we))return $t;return-1}function Rs(we,je,Ze){return je==je?function(ct,wt,$t){for(var Vn=$t-1,ir=ct.length;++Vn<ir;)if(ct[Vn]===wt)return Vn;return-1}(we,je,Ze):vl(we,Ic,Ze)}function ef(we,je,Ze,ct){for(var wt=Ze-1,$t=we.length;++wt<$t;)if(ct(we[wt],je))return wt;return-1}function Ic(we){return we!=we}function Lc(we,je){var Ze=we==null?0:we.length;return Ze?zu(we,je)/Ze:NaN}function Gu(we){return function(je){return je==null?void 0:je[we]}}function Hu(we){return function(je){return we==null?void 0:we[je]}}function Oc(we,je,Ze,ct,wt){return wt(we,function($t,Vn,ir){Ze=ct?(ct=!1,$t):je(Ze,$t,Vn,ir)}),Ze}function zu(we,je){for(var Ze,ct=-1,wt=we.length;++ct<wt;){var $t=je(we[ct]);$t!==void 0&&(Ze=Ze===void 0?$t:Ze+$t)}return Ze}function Vu(we,je){for(var Ze=-1,ct=Array(we);++Ze<we;)ct[Ze]=je(Ze);return ct}function Dc(we){return we&&we.slice(0,Yo(we)+1).replace(li,"")}function Xi(we){return function(je){return we(je)}}function ju(we,je){return Tn(je,function(Ze){return we[Ze]})}function ba(we,je){return we.has(je)}function Nc(we,je){for(var Ze=-1,ct=we.length;++Ze<ct&&Rs(je,we[Ze],0)>-1;);return Ze}function Fc(we,je){for(var Ze=we.length;Ze--&&Rs(je,we[Ze],0)>-1;);return Ze}function tf(we,je){for(var Ze=we.length,ct=0;Ze--;)we[Ze]===je&&++ct;return ct}var nf=Hu({\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"}),rf=Hu({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function of(we){return"\\"+fo[we]}function Is(we){return Ps.test(we)}function Wu(we){var je=-1,Ze=Array(we.size);return we.forEach(function(ct,wt){Ze[++je]=[wt,ct]}),Ze}function Bc(we,je){return function(Ze){return we(je(Ze))}}function go(we,je){for(var Ze=-1,ct=we.length,wt=0,$t=[];++Ze<ct;){var Vn=we[Ze];Vn!==je&&Vn!==k||(we[Ze]=k,$t[wt++]=Ze)}return $t}function Xo(we){var je=-1,Ze=Array(we.size);return we.forEach(function(ct){Ze[++je]=ct}),Ze}function _l(we){var je=-1,Ze=Array(we.size);return we.forEach(function(ct){Ze[++je]=[ct,ct]}),Ze}function vo(we){return Is(we)?function(je){for(var Ze=As.lastIndex=0;As.test(je);)++Ze;return Ze}(we):Qp(we)}function wi(we){return Is(we)?function(je){return je.match(As)||[]}(we):function(je){return je.split("")}(we)}function Yo(we){for(var je=we.length;je--&&Bi.test(we.charAt(je)););return je}var yl=Hu({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Ls=function we(je){var Ze,ct=(je=je==null?Nn:Ls.defaults(Nn.Object(),je,Ls.pick(Nn,qp))).Array,wt=je.Date,$t=je.Error,Vn=je.Function,ir=je.Math,xn=je.Object,xl=je.RegExp,Uc=je.String,Yi=je.TypeError,bl=ct.prototype,kc=Vn.prototype,mr=xn.prototype,wl=je["__core-js_shared__"],Xu=kc.toString,un=mr.hasOwnProperty,Dg=0,sf=(Ze=/[^.]+$/.exec(wl&&wl.keys&&wl.keys.IE_PROTO||""))?"Symbol(src)_1."+Ze:"",Yu=mr.toString,Ng=Xu.call(xn),Fg=Nn._,Bg=xl("^"+Xu.call(un).replace(Zn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qu=Sc?je.Buffer:void 0,qo=je.Symbol,Zu=je.Uint8Array,af=qu?qu.allocUnsafe:void 0,Ju=Bc(xn.getPrototypeOf,xn),lf=xn.create,uf=mr.propertyIsEnumerable,Tl=bl.splice,Os=qo?qo.isConcatSpreadable:void 0,Zr=qo?qo.iterator:void 0,Ds=qo?qo.toStringTag:void 0,$u=function(){try{var h=Ys(xn,"defineProperty");return h({},"",{}),h}catch{}}(),Ug=je.clearTimeout!==Nn.clearTimeout&&je.clearTimeout,kg=wt&&wt.now!==Nn.Date.now&&wt.now,Gg=je.setTimeout!==Nn.setTimeout&&je.setTimeout,Ku=ir.ceil,Qu=ir.floor,Gc=xn.getOwnPropertySymbols,Hc=qu?qu.isBuffer:void 0,_o=je.isFinite,Ti=bl.join,eh=Bc(xn.keys,xn),Sn=ir.max,ii=ir.min,rr=wt.now,Si=je.parseInt,th=ir.random,Sl=bl.reverse,El=Ys(je,"DataView"),wa=Ys(je,"Map"),nh=Ys(je,"Promise"),Ns=Ys(je,"Set"),Qe=Ys(je,"WeakMap"),En=Ys(xn,"create"),yo=Qe&&new Qe,gr={},Hg=ns(El),Kn=ns(wa),zc=ns(nh),pn=ns(Ns),Or=ns(Qe),Ml=qo?qo.prototype:void 0,Fs=Ml?Ml.valueOf:void 0,vi=Ml?Ml.toString:void 0;function T(h){if(Un(h)&&!Ut(h)&&!(h instanceof Ht)){if(h instanceof In)return h;if(un.call(h,"__wrapped__"))return Ef(h)}return new In(h)}var Zo=function(){function h(){}return function(p){if(!Bn(p))return{};if(lf)return lf(p);h.prototype=p;var x=new h;return h.prototype=void 0,x}}();function Al(){}function In(h,p){this.__wrapped__=h,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=void 0}function Ht(h){this.__wrapped__=h,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Dr(h){var p=-1,x=h==null?0:h.length;for(this.clear();++p<x;){var E=h[p];this.set(E[0],E[1])}}function Nr(h){var p=-1,x=h==null?0:h.length;for(this.clear();++p<x;){var E=h[p];this.set(E[0],E[1])}}function qi(h){var p=-1,x=h==null?0:h.length;for(this.clear();++p<x;){var E=h[p];this.set(E[0],E[1])}}function vr(h){var p=-1,x=h==null?0:h.length;for(this.__data__=new qi;++p<x;)this.add(h[p])}function Ri(h){var p=this.__data__=new Nr(h);this.size=p.size}function xo(h,p){var x=Ut(h),E=!x&&rs(h),P=!x&&!E&&Mo(h),j=!x&&!E&&!P&&Zs(h),re=x||E||P||j,ce=re?Vu(h.length,Uc):[],_e=ce.length;for(var He in h)!p&&!un.call(h,He)||re&&(He=="length"||P&&(He=="offset"||He=="parent")||j&&(He=="buffer"||He=="byteLength"||He=="byteOffset")||Li(He,_e))||ce.push(He);return ce}function bo(h){var p=h.length;return p?h[Qo(0,p-1)]:void 0}function Bs(h,p){return gh(hi(h),wo(p,0,h.length))}function Pl(h){return gh(hi(h))}function Ta(h,p,x){(x!==void 0&&!Tr(h[p],x)||x===void 0&&!(p in h))&&$r(h,p,x)}function Jo(h,p,x){var E=h[p];un.call(h,p)&&Tr(E,x)&&(x!==void 0||p in h)||$r(h,p,x)}function Jr(h,p){for(var x=h.length;x--;)if(Tr(h[x][0],p))return x;return-1}function Vc(h,p,x,E){return ki(h,function(P,j,re){p(E,P,x(P),re)}),E}function hf(h,p){return h&&Wn(p,di(p),h)}function $r(h,p,x){p=="__proto__"&&$u?$u(h,p,{configurable:!0,enumerable:!0,value:x,writable:!0}):h[p]=x}function Cl(h,p){for(var x=-1,E=p.length,P=ct(E),j=h==null;++x<E;)P[x]=j?void 0:wd(h,p[x]);return P}function wo(h,p,x){return h==h&&(x!==void 0&&(h=h<=x?h:x),p!==void 0&&(h=h>=p?h:p)),h}function ui(h,p,x,E,P,j){var re,ce=1&p,_e=2&p,He=4&p;if(x&&(re=P?x(h,E,P,j):x(h)),re!==void 0)return re;if(!Bn(h))return h;var ze=Ut(h);if(ze){if(re=function(Je){var nt=Je.length,Et=new Je.constructor(nt);return nt&&typeof Je[0]=="string"&&un.call(Je,"index")&&(Et.index=Je.index,Et.input=Je.input),Et}(h),!ce)return hi(h,re)}else{var tt=ci(h),vt=tt==Fe||tt==S;if(Mo(h))return td(h,ce);if(tt==V||tt==X||vt&&!P){if(re=_e||vt?{}:sd(h),!ce)return _e?function(Je,nt){return Wn(Je,qs(Je),nt)}(h,function(Je,nt){return Je&&Wn(nt,yi(nt),Je)}(re,h)):function(Je,nt){return Wn(Je,br(Je),nt)}(h,hf(re,h))}else{if(!_n[tt])return P?h:{};re=function(Je,nt,Et){var mt=Je.constructor;switch(nt){case ft:return nd(Je);case le:case Ee:return new mt(+Je);case $e:return function(It,jt){var Tt=jt?nd(It.buffer):It.buffer;return new It.constructor(Tt,It.byteOffset,It.byteLength)}(Je,Et);case ae:case Ce:case Ie:case H:case be:case Me:case"[object Uint8ClampedArray]":case Oe:case Se:return Hs(Je,Et);case A:return new mt;case O:case W:return new mt(Je);case D:return function(It){var jt=new It.constructor(It.source,co.exec(It));return jt.lastIndex=It.lastIndex,jt}(Je);case z:return new mt;case ee:return St=Je,Fs?xn(Fs.call(St)):{}}var St}(h,tt,ce)}}j||(j=new Ri);var yt=j.get(h);if(yt)return yt;j.set(h,re),zf(h)?h.forEach(function(Je){re.add(ui(Je,p,x,Je,h,j))}):Hf(h)&&h.forEach(function(Je,nt){re.set(nt,ui(Je,p,x,nt,h,j))});var Ct=ze?void 0:(He?_e?Ws:Gi:_e?yi:di)(h);return Wi(Ct||h,function(Je,nt){Ct&&(Je=h[nt=Je]),Jo(re,nt,ui(Je,p,x,nt,h,j))}),re}function Kr(h,p,x){var E=x.length;if(h==null)return!E;for(h=xn(h);E--;){var P=x[E],j=p[P],re=h[P];if(re===void 0&&!(P in h)||!j(re))return!1}return!0}function ih(h,p,x){if(typeof h!="function")throw new Yi(ie);return Bl(function(){h.apply(void 0,x)},p)}function $o(h,p,x,E){var P=-1,j=xa,re=!0,ce=h.length,_e=[],He=p.length;if(!ce)return _e;x&&(p=Tn(p,Xi(x))),E?(j=Bu,re=!1):p.length>=200&&(j=ba,re=!1,p=new vr(p));e:for(;++P<ce;){var ze=h[P],tt=x==null?ze:x(ze);if(ze=E||ze!==0?ze:0,re&&tt==tt){for(var vt=He;vt--;)if(p[vt]===tt)continue e;_e.push(ze)}else j(p,tt,E)||_e.push(ze)}return _e}T.templateSettings={escape:Bt,evaluate:Vt,interpolate:bt,variable:"",imports:{_:T}},T.prototype=Al.prototype,T.prototype.constructor=T,In.prototype=Zo(Al.prototype),In.prototype.constructor=In,Ht.prototype=Zo(Al.prototype),Ht.prototype.constructor=Ht,Dr.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},Dr.prototype.delete=function(h){var p=this.has(h)&&delete this.__data__[h];return this.size-=p?1:0,p},Dr.prototype.get=function(h){var p=this.__data__;if(En){var x=p[h];return x==="__lodash_hash_undefined__"?void 0:x}return un.call(p,h)?p[h]:void 0},Dr.prototype.has=function(h){var p=this.__data__;return En?p[h]!==void 0:un.call(p,h)},Dr.prototype.set=function(h,p){var x=this.__data__;return this.size+=this.has(h)?0:1,x[h]=En&&p===void 0?"__lodash_hash_undefined__":p,this},Nr.prototype.clear=function(){this.__data__=[],this.size=0},Nr.prototype.delete=function(h){var p=this.__data__,x=Jr(p,h);return!(x<0)&&(x==p.length-1?p.pop():Tl.call(p,x,1),--this.size,!0)},Nr.prototype.get=function(h){var p=this.__data__,x=Jr(p,h);return x<0?void 0:p[x][1]},Nr.prototype.has=function(h){return Jr(this.__data__,h)>-1},Nr.prototype.set=function(h,p){var x=this.__data__,E=Jr(x,h);return E<0?(++this.size,x.push([h,p])):x[E][1]=p,this},qi.prototype.clear=function(){this.size=0,this.__data__={hash:new Dr,map:new(wa||Nr),string:new Dr}},qi.prototype.delete=function(h){var p=Fa(this,h).delete(h);return this.size-=p?1:0,p},qi.prototype.get=function(h){return Fa(this,h).get(h)},qi.prototype.has=function(h){return Fa(this,h).has(h)},qi.prototype.set=function(h,p){var x=Fa(this,h),E=x.size;return x.set(h,p),this.size+=x.size==E?0:1,this},vr.prototype.add=vr.prototype.push=function(h){return this.__data__.set(h,"__lodash_hash_undefined__"),this},vr.prototype.has=function(h){return this.__data__.has(h)},Ri.prototype.clear=function(){this.__data__=new Nr,this.size=0},Ri.prototype.delete=function(h){var p=this.__data__,x=p.delete(h);return this.size=p.size,x},Ri.prototype.get=function(h){return this.__data__.get(h)},Ri.prototype.has=function(h){return this.__data__.has(h)},Ri.prototype.set=function(h,p){var x=this.__data__;if(x instanceof Nr){var E=x.__data__;if(!wa||E.length<199)return E.push([h,p]),this.size=++x.size,this;x=this.__data__=new qi(E)}return x.set(h,p),this.size=x.size,this};var ki=Mt(Qr),rh=Mt(jc,!0);function oh(h,p){var x=!0;return ki(h,function(E,P,j){return x=!!p(E,P,j)}),x}function Sa(h,p,x){for(var E=-1,P=h.length;++E<P;){var j=h[E],re=p(j);if(re!=null&&(ce===void 0?re==re&&!ur(re):x(re,ce)))var ce=re,_e=j}return _e}function To(h,p){var x=[];return ki(h,function(E,P,j){p(E,P,j)&&x.push(E)}),x}function pt(h,p,x,E,P){var j=-1,re=h.length;for(x||(x=zg),P||(P=[]);++j<re;){var ce=h[j];p>0&&x(ce)?p>1?pt(ce,p-1,x,E,P):mo(P,ce):E||(P[P.length]=ce)}return P}var Ko=id(),_r=id(!0);function Qr(h,p){return h&&Ko(h,p,di)}function jc(h,p){return h&&_r(h,p,di)}function Fr(h,p){return qr(p,function(x){return Gr(h[x])})}function eo(h,p){for(var x=0,E=(p=Ur(p,h)).length;h!=null&&x<E;)h=h[wr(p[x++])];return x&&x==E?h:void 0}function Zi(h,p,x){var E=p(h);return Ut(h)?E:mo(E,x(h))}function Ii(h){return h==null?h===void 0?"[object Undefined]":"[object Null]":Ds&&Ds in xn(h)?function(p){var x=un.call(p,Ds),E=p[Ds];try{p[Ds]=void 0;var P=!0}catch{}var j=Yu.call(p);return P&&(x?p[Ds]=E:delete p[Ds]),j}(h):function(p){return Yu.call(p)}(h)}function sh(h,p){return h>p}function Us(h,p){return h!=null&&un.call(h,p)}function Wc(h,p){return h!=null&&p in xn(h)}function Xc(h,p,x){for(var E=x?Bu:xa,P=h[0].length,j=h.length,re=j,ce=ct(j),_e=1/0,He=[];re--;){var ze=h[re];re&&p&&(ze=Tn(ze,Xi(p))),_e=ii(ze.length,_e),ce[re]=!x&&(p||P>=120&&ze.length>=120)?new vr(re&&ze):void 0}ze=h[0];var tt=-1,vt=ce[0];e:for(;++tt<P&&He.length<_e;){var yt=ze[tt],Ct=p?p(yt):yt;if(yt=x||yt!==0?yt:0,!(vt?ba(vt,Ct):E(He,Ct,x))){for(re=j;--re;){var Je=ce[re];if(!(Je?ba(Je,Ct):E(h[re],Ct,x)))continue e}vt&&vt.push(Ct),He.push(yt)}}return He}function Ea(h,p,x){var E=(h=bf(h,p=Ur(p,h)))==null?h:h[wr(lr(p))];return E==null?void 0:Ui(E,h,x)}function ks(h){return Un(h)&&Ii(h)==X}function or(h,p,x,E,P){return h===p||(h==null||p==null||!Un(h)&&!Un(p)?h!=h&&p!=p:function(j,re,ce,_e,He,ze){var tt=Ut(j),vt=Ut(re),yt=tt?K:ci(j),Ct=vt?K:ci(re),Je=(yt=yt==X?V:yt)==V,nt=(Ct=Ct==X?V:Ct)==V,Et=yt==Ct;if(Et&&Mo(j)){if(!Mo(re))return!1;tt=!0,Je=!1}if(Et&&!Je)return ze||(ze=new Ri),tt||Zs(j)?Ei(j,re,ce,_e,He,ze):function(Tt,Ot,Xn,Mi,Yn,kn,Hr){switch(Xn){case $e:if(Tt.byteLength!=Ot.byteLength||Tt.byteOffset!=Ot.byteOffset)return!1;Tt=Tt.buffer,Ot=Ot.buffer;case ft:return!(Tt.byteLength!=Ot.byteLength||!kn(new Zu(Tt),new Zu(Ot)));case le:case Ee:case O:return Tr(+Tt,+Ot);case Xe:return Tt.name==Ot.name&&Tt.message==Ot.message;case D:case W:return Tt==Ot+"";case A:var oo=Wu;case z:var ss=1&Mi;if(oo||(oo=Xo),Tt.size!=Ot.size&&!ss)return!1;var Wa=Hr.get(Tt);if(Wa)return Wa==Ot;Mi|=2,Hr.set(Tt,Ot);var as=Ei(oo(Tt),oo(Ot),Mi,Yn,kn,Hr);return Hr.delete(Tt),as;case ee:if(Fs)return Fs.call(Tt)==Fs.call(Ot)}return!1}(j,re,yt,ce,_e,He,ze);if(!(1&ce)){var mt=Je&&un.call(j,"__wrapped__"),St=nt&&un.call(re,"__wrapped__");if(mt||St){var It=mt?j.value():j,jt=St?re.value():re;return ze||(ze=new Ri),He(It,jt,ce,_e,ze)}}return Et?(ze||(ze=new Ri),function(Tt,Ot,Xn,Mi,Yn,kn){var Hr=1&Xn,oo=Gi(Tt),ss=oo.length,Wa=Gi(Ot).length;if(ss!=Wa&&!Hr)return!1;for(var as=ss;as--;){var so=oo[as];if(!(Hr?so in Ot:un.call(Ot,so)))return!1}var Fh=kn.get(Tt),Md=kn.get(Ot);if(Fh&&Md)return Fh==Ot&&Md==Tt;var ls=!0;kn.set(Tt,Ot),kn.set(Ot,Tt);for(var ta=Hr;++as<ss;){so=oo[as];var na=Tt[so],Xa=Ot[so];if(Mi)var Ya=Hr?Mi(Xa,na,so,Ot,Tt,kn):Mi(na,Xa,so,Tt,Ot,kn);if(!(Ya===void 0?na===Xa||Yn(na,Xa,Xn,Mi,kn):Ya)){ls=!1;break}ta||(ta=so=="constructor")}if(ls&&!ta){var ql=Tt.constructor,ia=Ot.constructor;ql==ia||!("constructor"in Tt)||!("constructor"in Ot)||typeof ql=="function"&&ql instanceof ql&&typeof ia=="function"&&ia instanceof ia||(ls=!1)}return kn.delete(Tt),kn.delete(Ot),ls}(j,re,ce,_e,He,ze)):!1}(h,p,x,E,or,P))}function Ma(h,p,x,E){var P=x.length,j=P,re=!E;if(h==null)return!j;for(h=xn(h);P--;){var ce=x[P];if(re&&ce[2]?ce[1]!==h[ce[0]]:!(ce[0]in h))return!1}for(;++P<j;){var _e=(ce=x[P])[0],He=h[_e],ze=ce[1];if(re&&ce[2]){if(He===void 0&&!(_e in h))return!1}else{var tt=new Ri;if(E)var vt=E(He,ze,_e,h,p,tt);if(!(vt===void 0?or(ze,He,3,E,tt):vt))return!1}}return!0}function Aa(h){return!(!Bn(h)||(p=h,sf&&sf in p))&&(Gr(h)?Bg:kp).test(ns(h));var p}function cf(h){return typeof h=="function"?h:h==null?zi:typeof h=="object"?Ut(h)?Zc(h[0],h[1]):pf(h):em(h)}function Yc(h){if(!Fl(h))return eh(h);var p=[];for(var x in xn(h))un.call(h,x)&&x!="constructor"&&p.push(x);return p}function df(h){if(!Bn(h))return function(P){var j=[];if(P!=null)for(var re in xn(P))j.push(re);return j}(h);var p=Fl(h),x=[];for(var E in h)(E!="constructor"||!p&&un.call(h,E))&&x.push(E);return x}function ah(h,p){return h<p}function qc(h,p){var x=-1,E=Ji(h)?ct(h.length):[];return ki(h,function(P,j,re){E[++x]=p(P,j,re)}),E}function pf(h){var p=od(h);return p.length==1&&p[0][2]?yf(p[0][0],p[0][1]):function(x){return x===h||Ma(x,h,p)}}function Zc(h,p){return dt(h)&&_f(p)?yf(wr(h),p):function(x){var E=wd(x,h);return E===void 0&&E===p?Gl(x,h):or(p,E,3)}}function Xt(h,p,x,E,P){h!==p&&Ko(p,function(j,re){if(P||(P=new Ri),Bn(j))(function(_e,He,ze,tt,vt,yt,Ct){var Je=ad(_e,ze),nt=ad(He,ze),Et=Ct.get(nt);if(Et)return void Ta(_e,ze,Et);var mt=yt?yt(Je,nt,ze+"",_e,He,Ct):void 0,St=mt===void 0;if(St){var It=Ut(nt),jt=!It&&Mo(nt),Tt=!It&&!jt&&Zs(nt);mt=nt,It||jt||Tt?Ut(Je)?mt=Je:An(Je)?mt=hi(Je):jt?(St=!1,mt=td(nt,!0)):Tt?(St=!1,mt=Hs(nt,!0)):mt=[]:ka(nt)||rs(nt)?(mt=Je,rs(Je)?mt=Xf(Je):Bn(Je)&&!Gr(Je)||(mt=sd(nt))):St=!1}St&&(Ct.set(nt,mt),vt(mt,nt,tt,yt,Ct),Ct.delete(nt)),Ta(_e,ze,mt)})(h,p,re,x,Xt,E,P);else{var ce=E?E(ad(h,re),j,re+"",h,p,P):void 0;ce===void 0&&(ce=j),Ta(h,re,ce)}},yi)}function yr(h,p){var x=h.length;if(x)return Li(p+=p<0?x:0,x)?h[p]:void 0}function to(h,p,x){p=p.length?Tn(p,function(P){return Ut(P)?function(j){return eo(j,P.length===1?P[0]:P)}:P}):[zi];var E=-1;return p=Tn(p,Xi(Pt())),function(P,j){var re=P.length;for(P.sort(j);re--;)P[re]=P[re].value;return P}(qc(h,function(P,j,re){return{criteria:Tn(p,function(ce){return ce(P)}),index:++E,value:P}}),function(P,j){return function(re,ce,_e){for(var He=-1,ze=re.criteria,tt=ce.criteria,vt=ze.length,yt=_e.length;++He<vt;){var Ct=vf(ze[He],tt[He]);if(Ct){if(He>=yt)return Ct;var Je=_e[He];return Ct*(Je=="desc"?-1:1)}}return re.index-ce.index}(P,j,x)})}function lh(h,p,x){for(var E=-1,P=p.length,j={};++E<P;){var re=p[E],ce=eo(h,re);x(ce,re)&&Mn(j,Ur(re,h),ce)}return j}function Br(h,p,x,E){var P=E?ef:Rs,j=-1,re=p.length,ce=h;for(h===p&&(p=hi(p)),x&&(ce=Tn(h,Xi(x)));++j<re;)for(var _e=0,He=p[j],ze=x?x(He):He;(_e=P(ce,ze,_e,E))>-1;)ce!==h&&Tl.call(ce,_e,1),Tl.call(h,_e,1);return h}function Gs(h,p){for(var x=h?p.length:0,E=x-1;x--;){var P=p[x];if(x==E||P!==j){var j=P;Li(P)?Tl.call(h,P,1):Ca(h,P)}}return h}function Qo(h,p){return h+Qu(th()*(p-h+1))}function uh(h,p){var x="";if(!h||p<1||p>9007199254740991)return x;do p%2&&(x+=h),(p=Qu(p/2))&&(h+=h);while(p);return x}function Yt(h,p){return ld(xf(h,p,zi),h+"")}function Jc(h){return bo(ro(h))}function $c(h,p){var x=ro(h);return gh(x,wo(p,0,x.length))}function Mn(h,p,x,E){if(!Bn(h))return h;for(var P=-1,j=(p=Ur(p,h)).length,re=j-1,ce=h;ce!=null&&++P<j;){var _e=wr(p[P]),He=x;if(_e==="__proto__"||_e==="constructor"||_e==="prototype")return h;if(P!=re){var ze=ce[_e];(He=E?E(ze,_e,ce):void 0)===void 0&&(He=Bn(ze)?ze:Li(p[P+1])?[]:{})}Jo(ce,_e,He),ce=ce[_e]}return h}var ff=yo?function(h,p){return yo.set(h,p),h}:zi,_i=$u?function(h,p){return $u(h,"toString",{configurable:!0,enumerable:!1,value:za(p),writable:!0})}:zi;function mf(h){return gh(ro(h))}function jn(h,p,x){var E=-1,P=h.length;p<0&&(p=-p>P?0:P+p),(x=x>P?P:x)<0&&(x+=P),P=p>x?0:x-p>>>0,p>>>=0;for(var j=ct(P);++E<P;)j[E]=h[E+p];return j}function hh(h,p){var x;return ki(h,function(E,P,j){return!(x=p(E,P,j))}),!!x}function Pa(h,p,x){var E=0,P=h==null?E:h.length;if(typeof p=="number"&&p==p&&P<=2147483647){for(;E<P;){var j=E+P>>>1,re=h[j];re!==null&&!ur(re)&&(x?re<=p:re<p)?E=j+1:P=j}return P}return Rl(h,p,zi,x)}function Rl(h,p,x,E){var P=0,j=h==null?0:h.length;if(j===0)return 0;for(var re=(p=x(p))!=p,ce=p===null,_e=ur(p),He=p===void 0;P<j;){var ze=Qu((P+j)/2),tt=x(h[ze]),vt=tt!==void 0,yt=tt===null,Ct=tt==tt,Je=ur(tt);if(re)var nt=E||Ct;else nt=He?Ct&&(E||vt):ce?Ct&&vt&&(E||!yt):_e?Ct&&vt&&!yt&&(E||!Je):!yt&&!Je&&(E?tt<=p:tt<p);nt?P=ze+1:j=ze}return ii(j,4294967294)}function ch(h,p){for(var x=-1,E=h.length,P=0,j=[];++x<E;){var re=h[x],ce=p?p(re):re;if(!x||!Tr(ce,_e)){var _e=ce;j[P++]=re===0?0:re}}return j}function gt(h){return typeof h=="number"?h:ur(h)?NaN:+h}function Qn(h){if(typeof h=="string")return h;if(Ut(h))return Tn(h,Qn)+"";if(ur(h))return vi?vi.call(h):"";var p=h+"";return p=="0"&&1/h==-1/0?"-0":p}function an(h,p,x){var E=-1,P=xa,j=h.length,re=!0,ce=[],_e=ce;if(x)re=!1,P=Bu;else if(j>=200){var He=p?null:rd(h);if(He)return Xo(He);re=!1,P=ba,_e=new vr}else _e=p?[]:ce;e:for(;++E<j;){var ze=h[E],tt=p?p(ze):ze;if(ze=x||ze!==0?ze:0,re&&tt==tt){for(var vt=_e.length;vt--;)if(_e[vt]===tt)continue e;p&&_e.push(tt),ce.push(ze)}else P(_e,tt,x)||(_e!==ce&&_e.push(tt),ce.push(ze))}return ce}function Ca(h,p){return(h=bf(h,p=Ur(p,h)))==null||delete h[wr(lr(p))]}function Zt(h,p,x,E){return Mn(h,p,x(eo(h,p)),E)}function Il(h,p,x,E){for(var P=h.length,j=E?P:-1;(E?j--:++j<P)&&p(h[j],j,h););return x?jn(h,E?0:j,E?j+1:P):jn(h,E?j+1:0,E?P:j)}function Kc(h,p){var x=h;return x instanceof Ht&&(x=x.value()),Uu(p,function(E,P){return P.func.apply(P.thisArg,mo([E],P.args))},x)}function dh(h,p,x){var E=h.length;if(E<2)return E?an(h[0]):[];for(var P=-1,j=ct(E);++P<E;)for(var re=h[P],ce=-1;++ce<E;)ce!=P&&(j[P]=$o(j[P]||re,h[ce],p,x));return an(pt(j,1),p,x)}function Qc(h,p,x){for(var E=-1,P=h.length,j=p.length,re={};++E<P;){var ce=E<j?p[E]:void 0;x(re,h[E],ce)}return re}function Ra(h){return An(h)?h:[]}function ph(h){return typeof h=="function"?h:zi}function Ur(h,p){return Ut(h)?h:dt(h,p)?[h]:vh(on(h))}var gf=Yt;function st(h,p,x){var E=h.length;return x=x===void 0?E:x,!p&&x>=E?h:jn(h,p,x)}var ed=Ug||function(h){return Nn.clearTimeout(h)};function td(h,p){if(p)return h.slice();var x=h.length,E=af?af(x):new h.constructor(x);return h.copy(E),E}function nd(h){var p=new h.constructor(h.byteLength);return new Zu(p).set(new Zu(h)),p}function Hs(h,p){var x=p?nd(h.buffer):h.buffer;return new h.constructor(x,h.byteOffset,h.length)}function vf(h,p){if(h!==p){var x=h!==void 0,E=h===null,P=h==h,j=ur(h),re=p!==void 0,ce=p===null,_e=p==p,He=ur(p);if(!ce&&!He&&!j&&h>p||j&&re&&_e&&!ce&&!He||E&&re&&_e||!x&&_e||!P)return 1;if(!E&&!j&&!He&&h<p||He&&x&&P&&!E&&!j||ce&&x&&P||!re&&P||!_e)return-1}return 0}function sr(h,p,x,E){for(var P=-1,j=h.length,re=x.length,ce=-1,_e=p.length,He=Sn(j-re,0),ze=ct(_e+He),tt=!E;++ce<_e;)ze[ce]=p[ce];for(;++P<re;)(tt||P<j)&&(ze[x[P]]=h[P]);for(;He--;)ze[ce++]=h[P++];return ze}function fh(h,p,x,E){for(var P=-1,j=h.length,re=-1,ce=x.length,_e=-1,He=p.length,ze=Sn(j-ce,0),tt=ct(ze+He),vt=!E;++P<ze;)tt[P]=h[P];for(var yt=P;++_e<He;)tt[yt+_e]=p[_e];for(;++re<ce;)(vt||P<j)&&(tt[yt+x[re]]=h[P++]);return tt}function hi(h,p){var x=-1,E=h.length;for(p||(p=ct(E));++x<E;)p[x]=h[x];return p}function Wn(h,p,x,E){var P=!x;x||(x={});for(var j=-1,re=p.length;++j<re;){var ce=p[j],_e=E?E(x[ce],h[ce],ce,x,h):void 0;_e===void 0&&(_e=h[ce]),P?$r(x,ce,_e):Jo(x,ce,_e)}return x}function es(h,p){return function(x,E){var P=Ut(x)?Ac:Vc,j=p?p():{};return P(x,h,Pt(E,2),j)}}function Fn(h){return Yt(function(p,x){var E=-1,P=x.length,j=P>1?x[P-1]:void 0,re=P>2?x[2]:void 0;for(j=h.length>3&&typeof j=="function"?(P--,j):void 0,re&&Lt(x[0],x[1],re)&&(j=P<3?void 0:j,P=1),p=xn(p);++E<P;){var ce=x[E];ce&&h(p,ce,E,j)}return p})}function Mt(h,p){return function(x,E){if(x==null)return x;if(!Ji(x))return h(x,E);for(var P=x.length,j=p?P:-1,re=xn(x);(p?j--:++j<P)&&E(re[j],j,re)!==!1;);return x}}function id(h){return function(p,x,E){for(var P=-1,j=xn(p),re=E(p),ce=re.length;ce--;){var _e=re[h?ce:++P];if(x(j[_e],_e,j)===!1)break}return p}}function zs(h){return function(p){var x=Is(p=on(p))?wi(p):void 0,E=x?x[0]:p.charAt(0),P=x?st(x,1).join(""):p.slice(1);return E[h]()+P}}function ts(h){return function(p){return Uu(Td(ea(p).replace(gl,"")),h,"")}}function xr(h){return function(){var p=arguments;switch(p.length){case 0:return new h;case 1:return new h(p[0]);case 2:return new h(p[0],p[1]);case 3:return new h(p[0],p[1],p[2]);case 4:return new h(p[0],p[1],p[2],p[3]);case 5:return new h(p[0],p[1],p[2],p[3],p[4]);case 6:return new h(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new h(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var x=Zo(h.prototype),E=h.apply(x,p);return Bn(E)?E:x}}function So(h){return function(p,x,E){var P=xn(p);if(!Ji(p)){var j=Pt(x,3);p=di(p),x=function(ce){return j(P[ce],ce,P)}}var re=h(p,x,E);return re>-1?P[j?p[re]:re]:void 0}}function Eo(h){return io(function(p){var x=p.length,E=x,P=In.prototype.thru;for(h&&p.reverse();E--;){var j=p[E];if(typeof j!="function")throw new Yi(ie);if(P&&!re&&Xs(j)=="wrapper")var re=new In([],!0)}for(E=re?E:x;++E<x;){var ce=Xs(j=p[E]),_e=ce=="wrapper"?ei(j):void 0;re=_e&&ar(_e[0])&&_e[1]==424&&!_e[4].length&&_e[9]==1?re[Xs(_e[0])].apply(re,_e[3]):j.length==1&&ar(j)?re[ce]():re.thru(j)}return function(){var He=arguments,ze=He[0];if(re&&He.length==1&&Ut(ze))return re.plant(ze).value();for(var tt=0,vt=x?p[tt].apply(this,He):ze;++tt<x;)vt=p[tt].call(this,vt);return vt}})}function Ia(h,p,x,E,P,j,re,ce,_e,He){var ze=128&p,tt=1&p,vt=2&p,yt=24&p,Ct=512&p,Je=vt?void 0:xr(h);return function nt(){for(var Et=arguments.length,mt=ct(Et),St=Et;St--;)mt[St]=arguments[St];if(yt)var It=kr(nt),jt=tf(mt,It);if(E&&(mt=sr(mt,E,P,yt)),j&&(mt=fh(mt,j,re,yt)),Et-=jt,yt&&Et<He){var Tt=go(mt,It);return Ol(h,p,Ia,nt.placeholder,x,mt,Tt,ce,_e,He-Et)}var Ot=tt?x:this,Xn=vt?Ot[h]:h;return Et=mt.length,ce?mt=jg(mt,ce):Ct&&Et>1&&mt.reverse(),ze&&_e<Et&&(mt.length=_e),this&&this!==Nn&&this instanceof nt&&(Xn=Je||xr(Xn)),Xn.apply(Ot,mt)}}function mh(h,p){return function(x,E){return function(P,j,re,ce){return Qr(P,function(_e,He,ze){j(ce,re(_e),He,ze)}),ce}(x,h,p(E),{})}}function La(h,p){return function(x,E){var P;if(x===void 0&&E===void 0)return p;if(x!==void 0&&(P=x),E!==void 0){if(P===void 0)return E;typeof x=="string"||typeof E=="string"?(x=Qn(x),E=Qn(E)):(x=gt(x),E=gt(E)),P=h(x,E)}return P}}function Oa(h){return io(function(p){return p=Tn(p,Xi(Pt())),Yt(function(x){var E=this;return h(p,function(P){return Ui(P,E,x)})})})}function Vs(h,p){var x=(p=p===void 0?" ":Qn(p)).length;if(x<2)return x?uh(p,h):p;var E=uh(p,Ku(h/vo(p)));return Is(p)?st(wi(E),0,h).join(""):E.slice(0,h)}function Ll(h){return function(p,x,E){return E&&typeof E!="number"&&Lt(p,x,E)&&(x=E=void 0),p=Ao(p),x===void 0?(x=p,p=0):x=Ao(x),function(P,j,re,ce){for(var _e=-1,He=Sn(Ku((j-P)/(re||1)),0),ze=ct(He);He--;)ze[ce?He:++_e]=P,P+=re;return ze}(p,x,E=E===void 0?p<x?1:-1:Ao(E),h)}}function js(h){return function(p,x){return typeof p=="string"&&typeof x=="string"||(p=hr(p),x=hr(x)),h(p,x)}}function Ol(h,p,x,E,P,j,re,ce,_e,He){var ze=8&p;p|=ze?32:64,4&(p&=~(ze?64:32))||(p&=-4);var tt=[h,p,P,ze?j:void 0,ze?re:void 0,ze?void 0:j,ze?void 0:re,ce,_e,He],vt=x.apply(void 0,tt);return ar(h)&&wf(vt,tt),vt.placeholder=E,Tf(vt,h,p)}function Da(h){var p=ir[h];return function(x,E){if(x=hr(x),(E=E==null?0:ii(qt(E),292))&&_o(x)){var P=(on(x)+"e").split("e");return+((P=(on(p(P[0]+"e"+(+P[1]+E)))+"e").split("e"))[0]+"e"+(+P[1]-E))}return p(x)}}var rd=Ns&&1/Xo(new Ns([,-0]))[1]==1/0?function(h){return new Ns(h)}:Va;function Dl(h){return function(p){var x=ci(p);return x==A?Wu(p):x==z?_l(p):function(E,P){return Tn(P,function(j){return[j,E[j]]})}(p,h(p))}}function ln(h,p,x,E,P,j,re,ce){var _e=2&p;if(!_e&&typeof h!="function")throw new Yi(ie);var He=E?E.length:0;if(He||(p&=-97,E=P=void 0),re=re===void 0?re:Sn(qt(re),0),ce=ce===void 0?ce:qt(ce),He-=P?P.length:0,64&p){var ze=E,tt=P;E=P=void 0}var vt=_e?void 0:ei(h),yt=[h,p,x,E,P,ze,tt,j,re,ce];if(vt&&function(Je,nt){var Et=Je[1],mt=nt[1],St=Et|mt,It=St<131,jt=mt==128&&Et==8||mt==128&&Et==256&&Je[7].length<=nt[8]||mt==384&&nt[7].length<=nt[8]&&Et==8;if(!It&&!jt)return Je;1&mt&&(Je[2]=nt[2],St|=1&Et?0:4);var Tt=nt[3];if(Tt){var Ot=Je[3];Je[3]=Ot?sr(Ot,Tt,nt[4]):Tt,Je[4]=Ot?go(Je[3],k):nt[4]}(Tt=nt[5])&&(Ot=Je[5],Je[5]=Ot?fh(Ot,Tt,nt[6]):Tt,Je[6]=Ot?go(Je[5],k):nt[6]),(Tt=nt[7])&&(Je[7]=Tt),128&mt&&(Je[8]=Je[8]==null?nt[8]:ii(Je[8],nt[8])),Je[9]==null&&(Je[9]=nt[9]),Je[0]=nt[0],Je[1]=St}(yt,vt),h=yt[0],p=yt[1],x=yt[2],E=yt[3],P=yt[4],!(ce=yt[9]=yt[9]===void 0?_e?0:h.length:Sn(yt[9]-He,0))&&24&p&&(p&=-25),p&&p!=1)Ct=p==8||p==16?function(Je,nt,Et){var mt=xr(Je);return function St(){for(var It=arguments.length,jt=ct(It),Tt=It,Ot=kr(St);Tt--;)jt[Tt]=arguments[Tt];var Xn=It<3&&jt[0]!==Ot&&jt[It-1]!==Ot?[]:go(jt,Ot);if((It-=Xn.length)<Et)return Ol(Je,nt,Ia,St.placeholder,void 0,jt,Xn,void 0,void 0,Et-It);var Mi=this&&this!==Nn&&this instanceof St?mt:Je;return Ui(Mi,this,jt)}}(h,p,ce):p!=32&&p!=33||P.length?Ia.apply(void 0,yt):function(Je,nt,Et,mt){var St=1&nt,It=xr(Je);return function jt(){for(var Tt=-1,Ot=arguments.length,Xn=-1,Mi=mt.length,Yn=ct(Mi+Ot),kn=this&&this!==Nn&&this instanceof jt?It:Je;++Xn<Mi;)Yn[Xn]=mt[Xn];for(;Ot--;)Yn[Xn++]=arguments[++Tt];return Ui(kn,St?Et:this,Yn)}}(h,p,x,E);else var Ct=function(Je,nt,Et){var mt=1&nt,St=xr(Je);return function It(){var jt=this&&this!==Nn&&this instanceof It?St:Je;return jt.apply(mt?Et:this,arguments)}}(h,p,x);return Tf((vt?ff:wf)(Ct,yt),h,p)}function Nl(h,p,x,E){return h===void 0||Tr(h,mr[x])&&!un.call(E,x)?p:h}function no(h,p,x,E,P,j){return Bn(h)&&Bn(p)&&(j.set(p,h),Xt(h,p,void 0,no,j),j.delete(p)),h}function Na(h){return ka(h)?void 0:h}function Ei(h,p,x,E,P,j){var re=1&x,ce=h.length,_e=p.length;if(ce!=_e&&!(re&&_e>ce))return!1;var He=j.get(h),ze=j.get(p);if(He&&ze)return He==p&&ze==h;var tt=-1,vt=!0,yt=2&x?new vr:void 0;for(j.set(h,p),j.set(p,h);++tt<ce;){var Ct=h[tt],Je=p[tt];if(E)var nt=re?E(Je,Ct,tt,p,h,j):E(Ct,Je,tt,h,p,j);if(nt!==void 0){if(nt)continue;vt=!1;break}if(yt){if(!ku(p,function(Et,mt){if(!ba(yt,mt)&&(Ct===Et||P(Ct,Et,x,E,j)))return yt.push(mt)})){vt=!1;break}}else if(Ct!==Je&&!P(Ct,Je,x,E,j)){vt=!1;break}}return j.delete(h),j.delete(p),vt}function io(h){return ld(xf(h,void 0,cd),h+"")}function Gi(h){return Zi(h,di,br)}function Ws(h){return Zi(h,yi,qs)}var ei=yo?function(h){return yo.get(h)}:Va;function Xs(h){for(var p=h.name+"",x=gr[p],E=un.call(gr,p)?x.length:0;E--;){var P=x[E],j=P.func;if(j==null||j==h)return P.name}return p}function kr(h){return(un.call(T,"placeholder")?T:h).placeholder}function Pt(){var h=T.iteratee||Ch;return h=h===Ch?cf:h,arguments.length?h(arguments[0],arguments[1]):h}function Fa(h,p){var x,E,P=h.__data__;return((E=typeof(x=p))=="string"||E=="number"||E=="symbol"||E=="boolean"?x!=="__proto__":x===null)?P[typeof p=="string"?"string":"hash"]:P.map}function od(h){for(var p=di(h),x=p.length;x--;){var E=p[x],P=h[E];p[x]=[E,P,_f(P)]}return p}function Ys(h,p){var x=function(E,P){return E==null?void 0:E[P]}(h,p);return Aa(x)?x:void 0}var br=Gc?function(h){return h==null?[]:(h=xn(h),qr(Gc(h),function(p){return uf.call(h,p)}))}:Oh,qs=Gc?function(h){for(var p=[];h;)mo(p,br(h)),h=Ju(h);return p}:Oh,ci=Ii;function Ba(h,p,x){for(var E=-1,P=(p=Ur(p,h)).length,j=!1;++E<P;){var re=wr(p[E]);if(!(j=h!=null&&x(h,re)))break;h=h[re]}return j||++E!=P?j:!!(P=h==null?0:h.length)&&wh(P)&&Li(re,P)&&(Ut(h)||rs(h))}function sd(h){return typeof h.constructor!="function"||Fl(h)?{}:Zo(Ju(h))}function zg(h){return Ut(h)||rs(h)||!!(Os&&h&&h[Os])}function Li(h,p){var x=typeof h;return!!(p=p==null?9007199254740991:p)&&(x=="number"||x!="symbol"&&Hp.test(h))&&h>-1&&h%1==0&&h<p}function Lt(h,p,x){if(!Bn(x))return!1;var E=typeof p;return!!(E=="number"?Ji(x)&&Li(p,x.length):E=="string"&&p in x)&&Tr(x[p],h)}function dt(h,p){if(Ut(h))return!1;var x=typeof h;return!(x!="number"&&x!="symbol"&&x!="boolean"&&h!=null&&!ur(h))||wn.test(h)||!Dn.test(h)||p!=null&&h in xn(p)}function ar(h){var p=Xs(h),x=T[p];if(typeof x!="function"||!(p in Ht.prototype))return!1;if(h===x)return!0;var E=ei(x);return!!E&&h===E[0]}(El&&ci(new El(new ArrayBuffer(1)))!=$e||wa&&ci(new wa)!=A||nh&&ci(nh.resolve())!="[object Promise]"||Ns&&ci(new Ns)!=z||Qe&&ci(new Qe)!=et)&&(ci=function(h){var p=Ii(h),x=p==V?h.constructor:void 0,E=x?ns(x):"";if(E)switch(E){case Hg:return $e;case Kn:return A;case zc:return"[object Promise]";case pn:return z;case Or:return et}return p});var Vg=wl?Gr:ja;function Fl(h){var p=h&&h.constructor;return h===(typeof p=="function"&&p.prototype||mr)}function _f(h){return h==h&&!Bn(h)}function yf(h,p){return function(x){return x!=null&&x[h]===p&&(p!==void 0||h in xn(x))}}function xf(h,p,x){return p=Sn(p===void 0?h.length-1:p,0),function(){for(var E=arguments,P=-1,j=Sn(E.length-p,0),re=ct(j);++P<j;)re[P]=E[p+P];P=-1;for(var ce=ct(p+1);++P<p;)ce[P]=E[P];return ce[p]=x(re),Ui(h,this,ce)}}function bf(h,p){return p.length<2?h:eo(h,jn(p,0,-1))}function jg(h,p){for(var x=h.length,E=ii(p.length,x),P=hi(h);E--;){var j=p[E];h[E]=Li(j,x)?P[j]:void 0}return h}function ad(h,p){if((p!=="constructor"||typeof h[p]!="function")&&p!="__proto__")return h[p]}var wf=Sf(ff),Bl=Gg||function(h,p){return Nn.setTimeout(h,p)},ld=Sf(_i);function Tf(h,p,x){var E=p+"";return ld(h,function(P,j){var re=j.length;if(!re)return P;var ce=re-1;return j[ce]=(re>1?"& ":"")+j[ce],j=j.join(re>2?", ":" "),P.replace(Ci,`{
9
+ /* [wrapped with `+j+`] */
10
+ `)}(E,function(P,j){return Wi(oe,function(re){var ce="_."+re[0];j&re[1]&&!xa(P,ce)&&P.push(ce)}),P.sort()}(function(P){var j=P.match(ji);return j?j[1].split(Lr):[]}(E),x)))}function Sf(h){var p=0,x=0;return function(){var E=rr(),P=16-(E-x);if(x=E,P>0){if(++p>=800)return arguments[0]}else p=0;return h.apply(void 0,arguments)}}function gh(h,p){var x=-1,E=h.length,P=E-1;for(p=p===void 0?E:p;++x<p;){var j=Qo(x,P),re=h[j];h[j]=h[x],h[x]=re}return h.length=p,h}var vh=function(h){var p=Ul(h,function(E){return x.size===500&&x.clear(),E}),x=p.cache;return p}(function(h){var p=[];return h.charCodeAt(0)===46&&p.push(""),h.replace(gn,function(x,E,P,j){p.push(P?j.replace(Np,"$1"):E||x)}),p});function wr(h){if(typeof h=="string"||ur(h))return h;var p=h+"";return p=="0"&&1/h==-1/0?"-0":p}function ns(h){if(h!=null){try{return Xu.call(h)}catch{}try{return h+""}catch{}}return""}function Ef(h){if(h instanceof Ht)return h.clone();var p=new In(h.__wrapped__,h.__chain__);return p.__actions__=hi(h.__actions__),p.__index__=h.__index__,p.__values__=h.__values__,p}var Wg=Yt(function(h,p){return An(h)?$o(h,pt(p,1,An,!0)):[]}),Mf=Yt(function(h,p){var x=lr(p);return An(x)&&(x=void 0),An(h)?$o(h,pt(p,1,An,!0),Pt(x,2)):[]}),Af=Yt(function(h,p){var x=lr(p);return An(x)&&(x=void 0),An(h)?$o(h,pt(p,1,An,!0),void 0,x):[]});function ud(h,p,x){var E=h==null?0:h.length;if(!E)return-1;var P=x==null?0:qt(x);return P<0&&(P=Sn(E+P,0)),vl(h,Pt(p,3),P)}function hd(h,p,x){var E=h==null?0:h.length;if(!E)return-1;var P=E-1;return x!==void 0&&(P=qt(x),P=x<0?Sn(E+P,0):ii(P,E-1)),vl(h,Pt(p,3),P,!0)}function cd(h){return(h==null?0:h.length)?pt(h,1):[]}function dd(h){return h&&h.length?h[0]:void 0}var Ua=Yt(function(h){var p=Tn(h,Ra);return p.length&&p[0]===h[0]?Xc(p):[]}),Hi=Yt(function(h){var p=lr(h),x=Tn(h,Ra);return p===lr(x)?p=void 0:x.pop(),x.length&&x[0]===h[0]?Xc(x,Pt(p,2)):[]}),Oi=Yt(function(h){var p=lr(h),x=Tn(h,Ra);return(p=typeof p=="function"?p:void 0)&&x.pop(),x.length&&x[0]===h[0]?Xc(x,void 0,p):[]});function lr(h){var p=h==null?0:h.length;return p?h[p-1]:void 0}var Xg=Yt(Pf);function Pf(h,p){return h&&h.length&&p&&p.length?Br(h,p):h}var Yg=io(function(h,p){var x=h==null?0:h.length,E=Cl(h,p);return Gs(h,Tn(p,function(P){return Li(P,x)?+P:P}).sort(vf)),E});function pd(h){return h==null?h:Sl.call(h)}var qg=Yt(function(h){return an(pt(h,1,An,!0))}),Zg=Yt(function(h){var p=lr(h);return An(p)&&(p=void 0),an(pt(h,1,An,!0),Pt(p,2))}),Jg=Yt(function(h){var p=lr(h);return p=typeof p=="function"?p:void 0,an(pt(h,1,An,!0),void 0,p)});function fd(h){if(!h||!h.length)return[];var p=0;return h=qr(h,function(x){if(An(x))return p=Sn(x.length,p),!0}),Vu(p,function(x){return Tn(h,Gu(x))})}function Cf(h,p){if(!h||!h.length)return[];var x=fd(h);return p==null?x:Tn(x,function(E){return Ui(p,void 0,E)})}var $g=Yt(function(h,p){return An(h)?$o(h,p):[]}),Kg=Yt(function(h){return dh(qr(h,An))}),Qg=Yt(function(h){var p=lr(h);return An(p)&&(p=void 0),dh(qr(h,An),Pt(p,2))}),ev=Yt(function(h){var p=lr(h);return p=typeof p=="function"?p:void 0,dh(qr(h,An),void 0,p)}),tv=Yt(fd),nv=Yt(function(h){var p=h.length,x=p>1?h[p-1]:void 0;return x=typeof x=="function"?(h.pop(),x):void 0,Cf(h,x)});function Rf(h){var p=T(h);return p.__chain__=!0,p}function _h(h,p){return p(h)}var iv=io(function(h){var p=h.length,x=p?h[0]:0,E=this.__wrapped__,P=function(j){return Cl(j,h)};return!(p>1||this.__actions__.length)&&E instanceof Ht&&Li(x)?((E=E.slice(x,+x+(p?1:0))).__actions__.push({func:_h,args:[P],thisArg:void 0}),new In(E,this.__chain__).thru(function(j){return p&&!j.length&&j.push(void 0),j})):this.thru(P)}),rv=es(function(h,p,x){un.call(h,x)?++h[x]:$r(h,x,1)}),ov=So(ud),sv=So(hd);function If(h,p){return(Ut(h)?Wi:ki)(h,Pt(p,3))}function Lf(h,p){return(Ut(h)?Pc:rh)(h,Pt(p,3))}var av=es(function(h,p,x){un.call(h,x)?h[x].push(p):$r(h,x,[p])}),lv=Yt(function(h,p,x){var E=-1,P=typeof p=="function",j=Ji(h)?ct(h.length):[];return ki(h,function(re){j[++E]=P?Ui(p,re,x):Ea(re,p,x)}),j}),uv=es(function(h,p,x){$r(h,x,p)});function yh(h,p){return(Ut(h)?Tn:qc)(h,Pt(p,3))}var hv=es(function(h,p,x){h[x?0:1].push(p)},function(){return[[],[]]}),cv=Yt(function(h,p){if(h==null)return[];var x=p.length;return x>1&&Lt(h,p[0],p[1])?p=[]:x>2&&Lt(p[0],p[1],p[2])&&(p=[p[0]]),to(h,pt(p,1),[])}),xh=kg||function(){return Nn.Date.now()};function Of(h,p,x){return p=x?void 0:p,ln(h,128,void 0,void 0,void 0,void 0,p=h&&p==null?h.length:p)}function Df(h,p){var x;if(typeof p!="function")throw new Yi(ie);return h=qt(h),function(){return--h>0&&(x=p.apply(this,arguments)),h<=1&&(p=void 0),x}}var md=Yt(function(h,p,x){var E=1;if(x.length){var P=go(x,kr(md));E|=32}return ln(h,E,p,x,P)}),Nf=Yt(function(h,p,x){var E=3;if(x.length){var P=go(x,kr(Nf));E|=32}return ln(p,E,h,x,P)});function Ff(h,p,x){var E,P,j,re,ce,_e,He=0,ze=!1,tt=!1,vt=!0;if(typeof h!="function")throw new Yi(ie);function yt(St){var It=E,jt=P;return E=P=void 0,He=St,re=h.apply(jt,It)}function Ct(St){return He=St,ce=Bl(nt,p),ze?yt(St):re}function Je(St){var It=St-_e;return _e===void 0||It>=p||It<0||tt&&St-He>=j}function nt(){var St=xh();if(Je(St))return Et(St);ce=Bl(nt,function(It){var jt=p-(It-_e);return tt?ii(jt,j-(It-He)):jt}(St))}function Et(St){return ce=void 0,vt&&E?yt(St):(E=P=void 0,re)}function mt(){var St=xh(),It=Je(St);if(E=arguments,P=this,_e=St,It){if(ce===void 0)return Ct(_e);if(tt)return ed(ce),ce=Bl(nt,p),yt(_e)}return ce===void 0&&(ce=Bl(nt,p)),re}return p=hr(p)||0,Bn(x)&&(ze=!!x.leading,j=(tt="maxWait"in x)?Sn(hr(x.maxWait)||0,p):j,vt="trailing"in x?!!x.trailing:vt),mt.cancel=function(){ce!==void 0&&ed(ce),He=0,E=_e=P=ce=void 0},mt.flush=function(){return ce===void 0?re:Et(xh())},mt}var dv=Yt(function(h,p){return ih(h,1,p)}),pv=Yt(function(h,p,x){return ih(h,hr(p)||0,x)});function Ul(h,p){if(typeof h!="function"||p!=null&&typeof p!="function")throw new Yi(ie);var x=function(){var E=arguments,P=p?p.apply(this,E):E[0],j=x.cache;if(j.has(P))return j.get(P);var re=h.apply(this,E);return x.cache=j.set(P,re)||j,re};return x.cache=new(Ul.Cache||qi),x}function kl(h){if(typeof h!="function")throw new Yi(ie);return function(){var p=arguments;switch(p.length){case 0:return!h.call(this);case 1:return!h.call(this,p[0]);case 2:return!h.call(this,p[0],p[1]);case 3:return!h.call(this,p[0],p[1],p[2])}return!h.apply(this,p)}}Ul.Cache=qi;var gd=gf(function(h,p){var x=(p=p.length==1&&Ut(p[0])?Tn(p[0],Xi(Pt())):Tn(pt(p,1),Xi(Pt()))).length;return Yt(function(E){for(var P=-1,j=ii(E.length,x);++P<j;)E[P]=p[P].call(this,E[P]);return Ui(h,this,E)})}),bh=Yt(function(h,p){return ln(h,32,void 0,p,go(p,kr(bh)))}),Bf=Yt(function(h,p){return ln(h,64,void 0,p,go(p,kr(Bf)))}),is=io(function(h,p){return ln(h,256,void 0,void 0,void 0,p)});function Tr(h,p){return h===p||h!=h&&p!=p}var fv=js(sh),Uf=js(function(h,p){return h>=p}),rs=ks(function(){return arguments}())?ks:function(h){return Un(h)&&un.call(h,"callee")&&!uf.call(h,"callee")},Ut=ct.isArray,mv=Ec?Xi(Ec):function(h){return Un(h)&&Ii(h)==ft};function Ji(h){return h!=null&&wh(h.length)&&!Gr(h)}function An(h){return Un(h)&&Ji(h)}var Mo=Hc||ja,kf=Mc?Xi(Mc):function(h){return Un(h)&&Ii(h)==Ee};function vd(h){if(!Un(h))return!1;var p=Ii(h);return p==Xe||p=="[object DOMException]"||typeof h.message=="string"&&typeof h.name=="string"&&!ka(h)}function Gr(h){if(!Bn(h))return!1;var p=Ii(h);return p==Fe||p==S||p=="[object AsyncFunction]"||p=="[object Proxy]"}function Gf(h){return typeof h=="number"&&h==qt(h)}function wh(h){return typeof h=="number"&&h>-1&&h%1==0&&h<=9007199254740991}function Bn(h){var p=typeof h;return h!=null&&(p=="object"||p=="function")}function Un(h){return h!=null&&typeof h=="object"}var Hf=Ou?Xi(Ou):function(h){return Un(h)&&ci(h)==A};function _d(h){return typeof h=="number"||Un(h)&&Ii(h)==O}function ka(h){if(!Un(h)||Ii(h)!=V)return!1;var p=Ju(h);if(p===null)return!0;var x=un.call(p,"constructor")&&p.constructor;return typeof x=="function"&&x instanceof x&&Xu.call(x)==Ng}var yd=Du?Xi(Du):function(h){return Un(h)&&Ii(h)==D},zf=Nu?Xi(Nu):function(h){return Un(h)&&ci(h)==z};function Th(h){return typeof h=="string"||!Ut(h)&&Un(h)&&Ii(h)==W}function ur(h){return typeof h=="symbol"||Un(h)&&Ii(h)==ee}var Zs=Fu?Xi(Fu):function(h){return Un(h)&&wh(h.length)&&!!dn[Ii(h)]},Vf=js(ah),gv=js(function(h,p){return h<=p});function jf(h){if(!h)return[];if(Ji(h))return Th(h)?wi(h):hi(h);if(Zr&&h[Zr])return function(x){for(var E,P=[];!(E=x.next()).done;)P.push(E.value);return P}(h[Zr]());var p=ci(h);return(p==A?Wu:p==z?Xo:ro)(h)}function Ao(h){return h?(h=hr(h))===1/0||h===-1/0?17976931348623157e292*(h<0?-1:1):h==h?h:0:h===0?h:0}function qt(h){var p=Ao(h),x=p%1;return p==p?x?p-x:p:0}function Wf(h){return h?wo(qt(h),0,4294967295):0}function hr(h){if(typeof h=="number")return h;if(ur(h))return NaN;if(Bn(h)){var p=typeof h.valueOf=="function"?h.valueOf():h;h=Bn(p)?p+"":p}if(typeof h!="string")return h===0?h:+h;h=Dc(h);var x=Up.test(h);return x||Gp.test(h)?Jp(h.slice(2),x?2:8):Bp.test(h)?NaN:+h}function Xf(h){return Wn(h,yi(h))}function on(h){return h==null?"":Qn(h)}var Sh=Fn(function(h,p){if(Fl(p)||Ji(p))Wn(p,di(p),h);else for(var x in p)un.call(p,x)&&Jo(h,x,p[x])}),xd=Fn(function(h,p){Wn(p,yi(p),h)}),Eh=Fn(function(h,p,x,E){Wn(p,yi(p),h,E)}),vv=Fn(function(h,p,x,E){Wn(p,di(p),h,E)}),Yf=io(Cl),bd=Yt(function(h,p){h=xn(h);var x=-1,E=p.length,P=E>2?p[2]:void 0;for(P&&Lt(p[0],p[1],P)&&(E=1);++x<E;)for(var j=p[x],re=yi(j),ce=-1,_e=re.length;++ce<_e;){var He=re[ce],ze=h[He];(ze===void 0||Tr(ze,mr[He])&&!un.call(h,He))&&(h[He]=j[He])}return h}),Js=Yt(function(h){return h.push(void 0,no),Ui(Ga,void 0,h)});function wd(h,p,x){var E=h==null?void 0:eo(h,p);return E===void 0?x:E}function Gl(h,p){return h!=null&&Ba(h,p,Wc)}var _v=mh(function(h,p,x){p!=null&&typeof p.toString!="function"&&(p=Yu.call(p)),h[p]=x},za(zi)),yv=mh(function(h,p,x){p!=null&&typeof p.toString!="function"&&(p=Yu.call(p)),un.call(h,p)?h[p].push(x):h[p]=[x]},Pt),fn=Yt(Ea);function di(h){return Ji(h)?xo(h):Yc(h)}function yi(h){return Ji(h)?xo(h,!0):df(h)}var Hl=Fn(function(h,p,x){Xt(h,p,x)}),Ga=Fn(function(h,p,x,E){Xt(h,p,x,E)}),$s=io(function(h,p){var x={};if(h==null)return x;var E=!1;p=Tn(p,function(j){return j=Ur(j,h),E||(E=j.length>1),j}),Wn(h,Ws(h),x),E&&(x=ui(x,7,Na));for(var P=p.length;P--;)Ca(x,p[P]);return x}),ti=io(function(h,p){return h==null?{}:function(x,E){return lh(x,E,function(P,j){return Gl(x,j)})}(h,p)});function Po(h,p){if(h==null)return{};var x=Tn(Ws(h),function(E){return[E]});return p=Pt(p),lh(h,x,function(E,P){return p(E,P[0])})}var zl=Dl(di),Ks=Dl(yi);function ro(h){return h==null?[]:ju(h,di(h))}var Ha=ts(function(h,p,x){return p=p.toLowerCase(),h+(x?Qs(p):p)});function Qs(h){return Wl(on(h).toLowerCase())}function ea(h){return(h=on(h))&&h.replace(Iu,nf).replace(Xp,"")}var Vl=ts(function(h,p,x){return h+(x?"-":"")+p.toLowerCase()}),qf=ts(function(h,p,x){return h+(x?" ":"")+p.toLowerCase()}),Mh=zs("toLowerCase"),jl=ts(function(h,p,x){return h+(x?"_":"")+p.toLowerCase()}),Ah=ts(function(h,p,x){return h+(x?" ":"")+Wl(p)}),Zf=ts(function(h,p,x){return h+(x?" ":"")+p.toUpperCase()}),Wl=zs("toUpperCase");function Td(h,p,x){return h=on(h),(p=x?void 0:p)===void 0?function(E){return Yp.test(E)}(h)?function(E){return E.match(po)||[]}(h):function(E){return E.match(Dp)||[]}(h):h.match(p)||[]}var Xl=Yt(function(h,p){try{return Ui(h,void 0,p)}catch(x){return vd(x)?x:new $t(x)}}),Ph=io(function(h,p){return Wi(p,function(x){x=wr(x),$r(h,x,md(h[x],h))}),h});function za(h){return function(){return h}}var Jf=Eo(),$f=Eo(!0);function zi(h){return h}function Ch(h){return cf(typeof h=="function"?h:ui(h,1))}var Kf=Yt(function(h,p){return function(x){return Ea(x,h,p)}}),xv=Yt(function(h,p){return function(x){return Ea(h,x,p)}});function Rh(h,p,x){var E=di(p),P=Fr(p,E);x!=null||Bn(p)&&(P.length||!E.length)||(x=p,p=h,h=this,P=Fr(p,di(p)));var j=!(Bn(x)&&"chain"in x&&!x.chain),re=Gr(h);return Wi(P,function(ce){var _e=p[ce];h[ce]=_e,re&&(h.prototype[ce]=function(){var He=this.__chain__;if(j||He){var ze=h(this.__wrapped__),tt=ze.__actions__=hi(this.__actions__);return tt.push({func:_e,args:arguments,thisArg:h}),ze.__chain__=He,ze}return _e.apply(h,mo([this.value()],arguments))})}),h}function Va(){}var Ih=Oa(Tn),os=Oa(Cc),Qf=Oa(ku);function em(h){return dt(h)?Gu(wr(h)):function(p){return function(x){return eo(x,p)}}(h)}var Lh=Ll(),tm=Ll(!0);function Oh(){return[]}function ja(){return!1}var Yl=La(function(h,p){return h+p},0),Sd=Da("ceil"),xi=La(function(h,p){return h/p},1),nm=Da("floor"),Dh,im=La(function(h,p){return h*p},1),Ed=Da("round"),Nh=La(function(h,p){return h-p},0);return T.after=function(h,p){if(typeof p!="function")throw new Yi(ie);return h=qt(h),function(){if(--h<1)return p.apply(this,arguments)}},T.ary=Of,T.assign=Sh,T.assignIn=xd,T.assignInWith=Eh,T.assignWith=vv,T.at=Yf,T.before=Df,T.bind=md,T.bindAll=Ph,T.bindKey=Nf,T.castArray=function(){if(!arguments.length)return[];var h=arguments[0];return Ut(h)?h:[h]},T.chain=Rf,T.chunk=function(h,p,x){p=(x?Lt(h,p,x):p===void 0)?1:Sn(qt(p),0);var E=h==null?0:h.length;if(!E||p<1)return[];for(var P=0,j=0,re=ct(Ku(E/p));P<E;)re[j++]=jn(h,P,P+=p);return re},T.compact=function(h){for(var p=-1,x=h==null?0:h.length,E=0,P=[];++p<x;){var j=h[p];j&&(P[E++]=j)}return P},T.concat=function(){var h=arguments.length;if(!h)return[];for(var p=ct(h-1),x=arguments[0],E=h;E--;)p[E-1]=arguments[E];return mo(Ut(x)?hi(x):[x],pt(p,1))},T.cond=function(h){var p=h==null?0:h.length,x=Pt();return h=p?Tn(h,function(E){if(typeof E[1]!="function")throw new Yi(ie);return[x(E[0]),E[1]]}):[],Yt(function(E){for(var P=-1;++P<p;){var j=h[P];if(Ui(j[0],this,E))return Ui(j[1],this,E)}})},T.conforms=function(h){return function(p){var x=di(p);return function(E){return Kr(E,p,x)}}(ui(h,1))},T.constant=za,T.countBy=rv,T.create=function(h,p){var x=Zo(h);return p==null?x:hf(x,p)},T.curry=function h(p,x,E){var P=ln(p,8,void 0,void 0,void 0,void 0,void 0,x=E?void 0:x);return P.placeholder=h.placeholder,P},T.curryRight=function h(p,x,E){var P=ln(p,16,void 0,void 0,void 0,void 0,void 0,x=E?void 0:x);return P.placeholder=h.placeholder,P},T.debounce=Ff,T.defaults=bd,T.defaultsDeep=Js,T.defer=dv,T.delay=pv,T.difference=Wg,T.differenceBy=Mf,T.differenceWith=Af,T.drop=function(h,p,x){var E=h==null?0:h.length;return E?jn(h,(p=x||p===void 0?1:qt(p))<0?0:p,E):[]},T.dropRight=function(h,p,x){var E=h==null?0:h.length;return E?jn(h,0,(p=E-(p=x||p===void 0?1:qt(p)))<0?0:p):[]},T.dropRightWhile=function(h,p){return h&&h.length?Il(h,Pt(p,3),!0,!0):[]},T.dropWhile=function(h,p){return h&&h.length?Il(h,Pt(p,3),!0):[]},T.fill=function(h,p,x,E){var P=h==null?0:h.length;return P?(x&&typeof x!="number"&&Lt(h,p,x)&&(x=0,E=P),function(j,re,ce,_e){var He=j.length;for((ce=qt(ce))<0&&(ce=-ce>He?0:He+ce),(_e=_e===void 0||_e>He?He:qt(_e))<0&&(_e+=He),_e=ce>_e?0:Wf(_e);ce<_e;)j[ce++]=re;return j}(h,p,x,E)):[]},T.filter=function(h,p){return(Ut(h)?qr:To)(h,Pt(p,3))},T.flatMap=function(h,p){return pt(yh(h,p),1)},T.flatMapDeep=function(h,p){return pt(yh(h,p),1/0)},T.flatMapDepth=function(h,p,x){return x=x===void 0?1:qt(x),pt(yh(h,p),x)},T.flatten=cd,T.flattenDeep=function(h){return(h==null?0:h.length)?pt(h,1/0):[]},T.flattenDepth=function(h,p){return(h==null?0:h.length)?pt(h,p=p===void 0?1:qt(p)):[]},T.flip=function(h){return ln(h,512)},T.flow=Jf,T.flowRight=$f,T.fromPairs=function(h){for(var p=-1,x=h==null?0:h.length,E={};++p<x;){var P=h[p];E[P[0]]=P[1]}return E},T.functions=function(h){return h==null?[]:Fr(h,di(h))},T.functionsIn=function(h){return h==null?[]:Fr(h,yi(h))},T.groupBy=av,T.initial=function(h){return(h==null?0:h.length)?jn(h,0,-1):[]},T.intersection=Ua,T.intersectionBy=Hi,T.intersectionWith=Oi,T.invert=_v,T.invertBy=yv,T.invokeMap=lv,T.iteratee=Ch,T.keyBy=uv,T.keys=di,T.keysIn=yi,T.map=yh,T.mapKeys=function(h,p){var x={};return p=Pt(p,3),Qr(h,function(E,P,j){$r(x,p(E,P,j),E)}),x},T.mapValues=function(h,p){var x={};return p=Pt(p,3),Qr(h,function(E,P,j){$r(x,P,p(E,P,j))}),x},T.matches=function(h){return pf(ui(h,1))},T.matchesProperty=function(h,p){return Zc(h,ui(p,1))},T.memoize=Ul,T.merge=Hl,T.mergeWith=Ga,T.method=Kf,T.methodOf=xv,T.mixin=Rh,T.negate=kl,T.nthArg=function(h){return h=qt(h),Yt(function(p){return yr(p,h)})},T.omit=$s,T.omitBy=function(h,p){return Po(h,kl(Pt(p)))},T.once=function(h){return Df(2,h)},T.orderBy=function(h,p,x,E){return h==null?[]:(Ut(p)||(p=p==null?[]:[p]),Ut(x=E?void 0:x)||(x=x==null?[]:[x]),to(h,p,x))},T.over=Ih,T.overArgs=gd,T.overEvery=os,T.overSome=Qf,T.partial=bh,T.partialRight=Bf,T.partition=hv,T.pick=ti,T.pickBy=Po,T.property=em,T.propertyOf=function(h){return function(p){return h==null?void 0:eo(h,p)}},T.pull=Xg,T.pullAll=Pf,T.pullAllBy=function(h,p,x){return h&&h.length&&p&&p.length?Br(h,p,Pt(x,2)):h},T.pullAllWith=function(h,p,x){return h&&h.length&&p&&p.length?Br(h,p,void 0,x):h},T.pullAt=Yg,T.range=Lh,T.rangeRight=tm,T.rearg=is,T.reject=function(h,p){return(Ut(h)?qr:To)(h,kl(Pt(p,3)))},T.remove=function(h,p){var x=[];if(!h||!h.length)return x;var E=-1,P=[],j=h.length;for(p=Pt(p,3);++E<j;){var re=h[E];p(re,E,h)&&(x.push(re),P.push(E))}return Gs(h,P),x},T.rest=function(h,p){if(typeof h!="function")throw new Yi(ie);return Yt(h,p=p===void 0?p:qt(p))},T.reverse=pd,T.sampleSize=function(h,p,x){return p=(x?Lt(h,p,x):p===void 0)?1:qt(p),(Ut(h)?Bs:$c)(h,p)},T.set=function(h,p,x){return h==null?h:Mn(h,p,x)},T.setWith=function(h,p,x,E){return E=typeof E=="function"?E:void 0,h==null?h:Mn(h,p,x,E)},T.shuffle=function(h){return(Ut(h)?Pl:mf)(h)},T.slice=function(h,p,x){var E=h==null?0:h.length;return E?(x&&typeof x!="number"&&Lt(h,p,x)?(p=0,x=E):(p=p==null?0:qt(p),x=x===void 0?E:qt(x)),jn(h,p,x)):[]},T.sortBy=cv,T.sortedUniq=function(h){return h&&h.length?ch(h):[]},T.sortedUniqBy=function(h,p){return h&&h.length?ch(h,Pt(p,2)):[]},T.split=function(h,p,x){return x&&typeof x!="number"&&Lt(h,p,x)&&(p=x=void 0),(x=x===void 0?4294967295:x>>>0)?(h=on(h))&&(typeof p=="string"||p!=null&&!yd(p))&&!(p=Qn(p))&&Is(h)?st(wi(h),0,x):h.split(p,x):[]},T.spread=function(h,p){if(typeof h!="function")throw new Yi(ie);return p=p==null?0:Sn(qt(p),0),Yt(function(x){var E=x[p],P=st(x,0,p);return E&&mo(P,E),Ui(h,this,P)})},T.tail=function(h){var p=h==null?0:h.length;return p?jn(h,1,p):[]},T.take=function(h,p,x){return h&&h.length?jn(h,0,(p=x||p===void 0?1:qt(p))<0?0:p):[]},T.takeRight=function(h,p,x){var E=h==null?0:h.length;return E?jn(h,(p=E-(p=x||p===void 0?1:qt(p)))<0?0:p,E):[]},T.takeRightWhile=function(h,p){return h&&h.length?Il(h,Pt(p,3),!1,!0):[]},T.takeWhile=function(h,p){return h&&h.length?Il(h,Pt(p,3)):[]},T.tap=function(h,p){return p(h),h},T.throttle=function(h,p,x){var E=!0,P=!0;if(typeof h!="function")throw new Yi(ie);return Bn(x)&&(E="leading"in x?!!x.leading:E,P="trailing"in x?!!x.trailing:P),Ff(h,p,{leading:E,maxWait:p,trailing:P})},T.thru=_h,T.toArray=jf,T.toPairs=zl,T.toPairsIn=Ks,T.toPath=function(h){return Ut(h)?Tn(h,wr):ur(h)?[h]:hi(vh(on(h)))},T.toPlainObject=Xf,T.transform=function(h,p,x){var E=Ut(h),P=E||Mo(h)||Zs(h);if(p=Pt(p,4),x==null){var j=h&&h.constructor;x=P?E?new j:[]:Bn(h)&&Gr(j)?Zo(Ju(h)):{}}return(P?Wi:Qr)(h,function(re,ce,_e){return p(x,re,ce,_e)}),x},T.unary=function(h){return Of(h,1)},T.union=qg,T.unionBy=Zg,T.unionWith=Jg,T.uniq=function(h){return h&&h.length?an(h):[]},T.uniqBy=function(h,p){return h&&h.length?an(h,Pt(p,2)):[]},T.uniqWith=function(h,p){return p=typeof p=="function"?p:void 0,h&&h.length?an(h,void 0,p):[]},T.unset=function(h,p){return h==null||Ca(h,p)},T.unzip=fd,T.unzipWith=Cf,T.update=function(h,p,x){return h==null?h:Zt(h,p,ph(x))},T.updateWith=function(h,p,x,E){return E=typeof E=="function"?E:void 0,h==null?h:Zt(h,p,ph(x),E)},T.values=ro,T.valuesIn=function(h){return h==null?[]:ju(h,yi(h))},T.without=$g,T.words=Td,T.wrap=function(h,p){return bh(ph(p),h)},T.xor=Kg,T.xorBy=Qg,T.xorWith=ev,T.zip=tv,T.zipObject=function(h,p){return Qc(h||[],p||[],Jo)},T.zipObjectDeep=function(h,p){return Qc(h||[],p||[],Mn)},T.zipWith=nv,T.entries=zl,T.entriesIn=Ks,T.extend=xd,T.extendWith=Eh,Rh(T,T),T.add=Yl,T.attempt=Xl,T.camelCase=Ha,T.capitalize=Qs,T.ceil=Sd,T.clamp=function(h,p,x){return x===void 0&&(x=p,p=void 0),x!==void 0&&(x=(x=hr(x))==x?x:0),p!==void 0&&(p=(p=hr(p))==p?p:0),wo(hr(h),p,x)},T.clone=function(h){return ui(h,4)},T.cloneDeep=function(h){return ui(h,5)},T.cloneDeepWith=function(h,p){return ui(h,5,p=typeof p=="function"?p:void 0)},T.cloneWith=function(h,p){return ui(h,4,p=typeof p=="function"?p:void 0)},T.conformsTo=function(h,p){return p==null||Kr(h,p,di(p))},T.deburr=ea,T.defaultTo=function(h,p){return h==null||h!=h?p:h},T.divide=xi,T.endsWith=function(h,p,x){h=on(h),p=Qn(p);var E=h.length,P=x=x===void 0?E:wo(qt(x),0,E);return(x-=p.length)>=0&&h.slice(x,P)==p},T.eq=Tr,T.escape=function(h){return(h=on(h))&&en.test(h)?h.replace(Qt,rf):h},T.escapeRegExp=function(h){return(h=on(h))&&yn.test(h)?h.replace(Zn,"\\$&"):h},T.every=function(h,p,x){var E=Ut(h)?Cc:oh;return x&&Lt(h,p,x)&&(p=void 0),E(h,Pt(p,3))},T.find=ov,T.findIndex=ud,T.findKey=function(h,p){return Rc(h,Pt(p,3),Qr)},T.findLast=sv,T.findLastIndex=hd,T.findLastKey=function(h,p){return Rc(h,Pt(p,3),jc)},T.floor=nm,T.forEach=If,T.forEachRight=Lf,T.forIn=function(h,p){return h==null?h:Ko(h,Pt(p,3),yi)},T.forInRight=function(h,p){return h==null?h:_r(h,Pt(p,3),yi)},T.forOwn=function(h,p){return h&&Qr(h,Pt(p,3))},T.forOwnRight=function(h,p){return h&&jc(h,Pt(p,3))},T.get=wd,T.gt=fv,T.gte=Uf,T.has=function(h,p){return h!=null&&Ba(h,p,Us)},T.hasIn=Gl,T.head=dd,T.identity=zi,T.includes=function(h,p,x,E){h=Ji(h)?h:ro(h),x=x&&!E?qt(x):0;var P=h.length;return x<0&&(x=Sn(P+x,0)),Th(h)?x<=P&&h.indexOf(p,x)>-1:!!P&&Rs(h,p,x)>-1},T.indexOf=function(h,p,x){var E=h==null?0:h.length;if(!E)return-1;var P=x==null?0:qt(x);return P<0&&(P=Sn(E+P,0)),Rs(h,p,P)},T.inRange=function(h,p,x){return p=Ao(p),x===void 0?(x=p,p=0):x=Ao(x),function(E,P,j){return E>=ii(P,j)&&E<Sn(P,j)}(h=hr(h),p,x)},T.invoke=fn,T.isArguments=rs,T.isArray=Ut,T.isArrayBuffer=mv,T.isArrayLike=Ji,T.isArrayLikeObject=An,T.isBoolean=function(h){return h===!0||h===!1||Un(h)&&Ii(h)==le},T.isBuffer=Mo,T.isDate=kf,T.isElement=function(h){return Un(h)&&h.nodeType===1&&!ka(h)},T.isEmpty=function(h){if(h==null)return!0;if(Ji(h)&&(Ut(h)||typeof h=="string"||typeof h.splice=="function"||Mo(h)||Zs(h)||rs(h)))return!h.length;var p=ci(h);if(p==A||p==z)return!h.size;if(Fl(h))return!Yc(h).length;for(var x in h)if(un.call(h,x))return!1;return!0},T.isEqual=function(h,p){return or(h,p)},T.isEqualWith=function(h,p,x){var E=(x=typeof x=="function"?x:void 0)?x(h,p):void 0;return E===void 0?or(h,p,void 0,x):!!E},T.isError=vd,T.isFinite=function(h){return typeof h=="number"&&_o(h)},T.isFunction=Gr,T.isInteger=Gf,T.isLength=wh,T.isMap=Hf,T.isMatch=function(h,p){return h===p||Ma(h,p,od(p))},T.isMatchWith=function(h,p,x){return x=typeof x=="function"?x:void 0,Ma(h,p,od(p),x)},T.isNaN=function(h){return _d(h)&&h!=+h},T.isNative=function(h){if(Vg(h))throw new $t("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Aa(h)},T.isNil=function(h){return h==null},T.isNull=function(h){return h===null},T.isNumber=_d,T.isObject=Bn,T.isObjectLike=Un,T.isPlainObject=ka,T.isRegExp=yd,T.isSafeInteger=function(h){return Gf(h)&&h>=-9007199254740991&&h<=9007199254740991},T.isSet=zf,T.isString=Th,T.isSymbol=ur,T.isTypedArray=Zs,T.isUndefined=function(h){return h===void 0},T.isWeakMap=function(h){return Un(h)&&ci(h)==et},T.isWeakSet=function(h){return Un(h)&&Ii(h)=="[object WeakSet]"},T.join=function(h,p){return h==null?"":Ti.call(h,p)},T.kebabCase=Vl,T.last=lr,T.lastIndexOf=function(h,p,x){var E=h==null?0:h.length;if(!E)return-1;var P=E;return x!==void 0&&(P=(P=qt(x))<0?Sn(E+P,0):ii(P,E-1)),p==p?function(j,re,ce){for(var _e=ce+1;_e--;)if(j[_e]===re)return _e;return _e}(h,p,P):vl(h,Ic,P,!0)},T.lowerCase=qf,T.lowerFirst=Mh,T.lt=Vf,T.lte=gv,T.max=function(h){return h&&h.length?Sa(h,zi,sh):void 0},T.maxBy=function(h,p){return h&&h.length?Sa(h,Pt(p,2),sh):void 0},T.mean=function(h){return Lc(h,zi)},T.meanBy=function(h,p){return Lc(h,Pt(p,2))},T.min=function(h){return h&&h.length?Sa(h,zi,ah):void 0},T.minBy=function(h,p){return h&&h.length?Sa(h,Pt(p,2),ah):void 0},T.stubArray=Oh,T.stubFalse=ja,T.stubObject=function(){return{}},T.stubString=function(){return""},T.stubTrue=function(){return!0},T.multiply=im,T.nth=function(h,p){return h&&h.length?yr(h,qt(p)):void 0},T.noConflict=function(){return Nn._===this&&(Nn._=Fg),this},T.noop=Va,T.now=xh,T.pad=function(h,p,x){h=on(h);var E=(p=qt(p))?vo(h):0;if(!p||E>=p)return h;var P=(p-E)/2;return Vs(Qu(P),x)+h+Vs(Ku(P),x)},T.padEnd=function(h,p,x){h=on(h);var E=(p=qt(p))?vo(h):0;return p&&E<p?h+Vs(p-E,x):h},T.padStart=function(h,p,x){h=on(h);var E=(p=qt(p))?vo(h):0;return p&&E<p?Vs(p-E,x)+h:h},T.parseInt=function(h,p,x){return x||p==null?p=0:p&&(p=+p),Si(on(h).replace(li,""),p||0)},T.random=function(h,p,x){if(x&&typeof x!="boolean"&&Lt(h,p,x)&&(p=x=void 0),x===void 0&&(typeof p=="boolean"?(x=p,p=void 0):typeof h=="boolean"&&(x=h,h=void 0)),h===void 0&&p===void 0?(h=0,p=1):(h=Ao(h),p===void 0?(p=h,h=0):p=Ao(p)),h>p){var E=h;h=p,p=E}if(x||h%1||p%1){var P=th();return ii(h+P*(p-h+tr("1e-"+((P+"").length-1))),p)}return Qo(h,p)},T.reduce=function(h,p,x){var E=Ut(h)?Uu:Oc,P=arguments.length<3;return E(h,Pt(p,4),x,P,ki)},T.reduceRight=function(h,p,x){var E=Ut(h)?Kp:Oc,P=arguments.length<3;return E(h,Pt(p,4),x,P,rh)},T.repeat=function(h,p,x){return p=(x?Lt(h,p,x):p===void 0)?1:qt(p),uh(on(h),p)},T.replace=function(){var h=arguments,p=on(h[0]);return h.length<3?p:p.replace(h[1],h[2])},T.result=function(h,p,x){var E=-1,P=(p=Ur(p,h)).length;for(P||(P=1,h=void 0);++E<P;){var j=h==null?void 0:h[wr(p[E])];j===void 0&&(E=P,j=x),h=Gr(j)?j.call(h):j}return h},T.round=Ed,T.runInContext=we,T.sample=function(h){return(Ut(h)?bo:Jc)(h)},T.size=function(h){if(h==null)return 0;if(Ji(h))return Th(h)?vo(h):h.length;var p=ci(h);return p==A||p==z?h.size:Yc(h).length},T.snakeCase=jl,T.some=function(h,p,x){var E=Ut(h)?ku:hh;return x&&Lt(h,p,x)&&(p=void 0),E(h,Pt(p,3))},T.sortedIndex=function(h,p){return Pa(h,p)},T.sortedIndexBy=function(h,p,x){return Rl(h,p,Pt(x,2))},T.sortedIndexOf=function(h,p){var x=h==null?0:h.length;if(x){var E=Pa(h,p);if(E<x&&Tr(h[E],p))return E}return-1},T.sortedLastIndex=function(h,p){return Pa(h,p,!0)},T.sortedLastIndexBy=function(h,p,x){return Rl(h,p,Pt(x,2),!0)},T.sortedLastIndexOf=function(h,p){if(h==null?0:h.length){var x=Pa(h,p,!0)-1;if(Tr(h[x],p))return x}return-1},T.startCase=Ah,T.startsWith=function(h,p,x){return h=on(h),x=x==null?0:wo(qt(x),0,h.length),p=Qn(p),h.slice(x,x+p.length)==p},T.subtract=Nh,T.sum=function(h){return h&&h.length?zu(h,zi):0},T.sumBy=function(h,p){return h&&h.length?zu(h,Pt(p,2)):0},T.template=function(h,p,x){var E=T.templateSettings;x&&Lt(h,p,x)&&(p=void 0),h=on(h),p=Eh({},p,E,Nl);var P,j,re=Eh({},p.imports,E.imports,Nl),ce=di(re),_e=ju(re,ce),He=0,ze=p.interpolate||zo,tt="__p += '",vt=xl((p.escape||zo).source+"|"+ze.source+"|"+(ze===bt?Fp:zo).source+"|"+(p.evaluate||zo).source+"|$","g"),yt="//# sourceURL="+(un.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zp+"]")+`
11
11
  `;h.replace(vt,function(nt,Et,mt,St,It,jt){return mt||(mt=St),tt+=h.slice(He,jt).replace(hl,of),Et&&(P=!0,tt+=`' +
12
12
  __e(`+Et+`) +
13
- '`),It&&(V=!0,tt+=`';
13
+ '`),It&&(j=!0,tt+=`';
14
14
  `+It+`;
15
15
  __p += '`),mt&&(tt+=`' +
16
16
  ((__t = (`+mt+`)) == null ? '' : __t) +
@@ -18,18 +18,18 @@ __p += '`),mt&&(tt+=`' +
18
18
  `;var Ct=un.call(p,"variable")&&p.variable;if(Ct){if(ul.test(Ct))throw new $t("Invalid `variable` option passed into `_.template`")}else tt=`with (obj) {
19
19
  `+tt+`
20
20
  }
21
- `;tt=(V?tt.replace(Ue,""):tt).replace(qe,"$1").replace(at,"$1;"),tt="function("+(Ct||"obj")+`) {
21
+ `;tt=(j?tt.replace(Ue,""):tt).replace(qe,"$1").replace(at,"$1;"),tt="function("+(Ct||"obj")+`) {
22
22
  `+(Ct?"":`obj || (obj = {});
23
- `)+"var __t, __p = ''"+(P?", __e = _.escape":"")+(V?`, __j = Array.prototype.join;
23
+ `)+"var __t, __p = ''"+(P?", __e = _.escape":"")+(j?`, __j = Array.prototype.join;
24
24
  function print() { __p += __j.call(arguments, '') }
25
25
  `:`;
26
26
  `)+tt+`return __p
27
- }`;var Je=Xl(function(){return Vn(ce,yt+"return "+tt).apply(void 0,_e)});if(Je.source=tt,vd(Je))throw Je;return Je},T.times=function(h,p){if((h=qt(h))<1||h>9007199254740991)return[];var x=4294967295,E=ii(h,4294967295);h-=4294967295;for(var P=Vu(E,p=Pt(p));++x<h;)p(x);return P},T.toFinite=Ao,T.toInteger=qt,T.toLength=Wf,T.toLower=function(h){return on(h).toLowerCase()},T.toNumber=hr,T.toSafeInteger=function(h){return h?wo(qt(h),-9007199254740991,9007199254740991):h===0?h:0},T.toString=on,T.toUpper=function(h){return on(h).toUpperCase()},T.trim=function(h,p,x){if((h=on(h))&&(x||p===void 0))return Dc(h);if(!h||!(p=Qn(p)))return h;var E=wi(h),P=wi(p);return st(E,Nc(E,P),Fc(E,P)+1).join("")},T.trimEnd=function(h,p,x){if((h=on(h))&&(x||p===void 0))return h.slice(0,Yo(h)+1);if(!h||!(p=Qn(p)))return h;var E=wi(h);return st(E,0,Fc(E,wi(p))+1).join("")},T.trimStart=function(h,p,x){if((h=on(h))&&(x||p===void 0))return h.replace(li,"");if(!h||!(p=Qn(p)))return h;var E=wi(h);return st(E,Nc(E,wi(p))).join("")},T.truncate=function(h,p){var x=30,E="...";if(Bn(p)){var P="separator"in p?p.separator:P;x="length"in p?qt(p.length):x,E="omission"in p?Qn(p.omission):E}var V=(h=on(h)).length;if(Is(h)){var re=wi(h);V=re.length}if(x>=V)return h;var ce=x-vo(E);if(ce<1)return E;var _e=re?st(re,0,ce).join(""):h.slice(0,ce);if(P===void 0)return _e+E;if(re&&(ce+=_e.length-ce),yd(P)){if(h.slice(ce).search(P)){var He,ze=_e;for(P.global||(P=xl(P.source,on(co.exec(P))+"g")),P.lastIndex=0;He=P.exec(ze);)var tt=He.index;_e=_e.slice(0,tt===void 0?ce:tt)}}else if(h.indexOf(Qn(P),ce)!=ce){var vt=_e.lastIndexOf(P);vt>-1&&(_e=_e.slice(0,vt))}return _e+E},T.unescape=function(h){return(h=on(h))&&lt.test(h)?h.replace(rt,yl):h},T.uniqueId=function(h){var p=++Dg;return on(h)+p},T.upperCase=Zf,T.upperFirst=Wl,T.each=If,T.eachRight=Lf,T.first=dd,Rh(T,(Dh={},Qr(T,function(h,p){un.call(T.prototype,p)||(Dh[p]=h)}),Dh),{chain:!1}),T.VERSION="4.17.21",Wi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(h){T[h].placeholder=T}),Wi(["drop","take"],function(h,p){Ht.prototype[h]=function(x){x=x===void 0?1:Sn(qt(x),0);var E=this.__filtered__&&!p?new Ht(this):this.clone();return E.__filtered__?E.__takeCount__=ii(x,E.__takeCount__):E.__views__.push({size:ii(x,4294967295),type:h+(E.__dir__<0?"Right":"")}),E},Ht.prototype[h+"Right"]=function(x){return this.reverse()[h](x).reverse()}}),Wi(["filter","map","takeWhile"],function(h,p){var x=p+1,E=x==1||x==3;Ht.prototype[h]=function(P){var V=this.clone();return V.__iteratees__.push({iteratee:Pt(P,3),type:x}),V.__filtered__=V.__filtered__||E,V}}),Wi(["head","last"],function(h,p){var x="take"+(p?"Right":"");Ht.prototype[h]=function(){return this[x](1).value()[0]}}),Wi(["initial","tail"],function(h,p){var x="drop"+(p?"":"Right");Ht.prototype[h]=function(){return this.__filtered__?new Ht(this):this[x](1)}}),Ht.prototype.compact=function(){return this.filter(zi)},Ht.prototype.find=function(h){return this.filter(h).head()},Ht.prototype.findLast=function(h){return this.reverse().find(h)},Ht.prototype.invokeMap=Yt(function(h,p){return typeof h=="function"?new Ht(this):this.map(function(x){return Ea(x,h,p)})}),Ht.prototype.reject=function(h){return this.filter(kl(Pt(h)))},Ht.prototype.slice=function(h,p){h=qt(h);var x=this;return x.__filtered__&&(h>0||p<0)?new Ht(x):(h<0?x=x.takeRight(-h):h&&(x=x.drop(h)),p!==void 0&&(x=(p=qt(p))<0?x.dropRight(-p):x.take(p-h)),x)},Ht.prototype.takeRightWhile=function(h){return this.reverse().takeWhile(h).reverse()},Ht.prototype.toArray=function(){return this.take(4294967295)},Qr(Ht.prototype,function(h,p){var x=/^(?:filter|find|map|reject)|While$/.test(p),E=/^(?:head|last)$/.test(p),P=T[E?"take"+(p=="last"?"Right":""):p],V=E||/^find/.test(p);P&&(T.prototype[p]=function(){var re=this.__wrapped__,ce=E?[1]:arguments,_e=re instanceof Ht,He=ce[0],ze=_e||Ut(re),tt=function(Et){var mt=P.apply(T,mo([Et],ce));return E&&vt?mt[0]:mt};ze&&x&&typeof He=="function"&&He.length!=1&&(_e=ze=!1);var vt=this.__chain__,yt=!!this.__actions__.length,Ct=V&&!vt,Je=_e&&!yt;if(!V&&ze){re=Je?re:new Ht(this);var nt=h.apply(re,ce);return nt.__actions__.push({func:_h,args:[tt],thisArg:void 0}),new In(nt,vt)}return Ct&&Je?h.apply(this,ce):(nt=this.thru(tt),Ct?E?nt.value()[0]:nt.value():nt)})}),Wi(["pop","push","shift","sort","splice","unshift"],function(h){var p=bl[h],x=/^(?:push|sort|unshift)$/.test(h)?"tap":"thru",E=/^(?:pop|shift)$/.test(h);T.prototype[h]=function(){var P=arguments;if(E&&!this.__chain__){var V=this.value();return p.apply(Ut(V)?V:[],P)}return this[x](function(re){return p.apply(Ut(re)?re:[],P)})}}),Qr(Ht.prototype,function(h,p){var x=T[p];if(x){var E=x.name+"";un.call(gr,E)||(gr[E]=[]),gr[E].push({name:p,func:x})}}),gr[Ia(void 0,2).name]=[{name:"wrapper",func:void 0}],Ht.prototype.clone=function(){var h=new Ht(this.__wrapped__);return h.__actions__=hi(this.__actions__),h.__dir__=this.__dir__,h.__filtered__=this.__filtered__,h.__iteratees__=hi(this.__iteratees__),h.__takeCount__=this.__takeCount__,h.__views__=hi(this.__views__),h},Ht.prototype.reverse=function(){if(this.__filtered__){var h=new Ht(this);h.__dir__=-1,h.__filtered__=!0}else(h=this.clone()).__dir__*=-1;return h},Ht.prototype.value=function(){var h=this.__wrapped__.value(),p=this.__dir__,x=Ut(h),E=p<0,P=x?h.length:0,V=function(jt,Tt,Ot){for(var Xn=-1,Mi=Ot.length;++Xn<Mi;){var Yn=Ot[Xn],kn=Yn.size;switch(Yn.type){case"drop":jt+=kn;break;case"dropRight":Tt-=kn;break;case"take":Tt=ii(Tt,jt+kn);break;case"takeRight":jt=Sn(jt,Tt-kn)}}return{start:jt,end:Tt}}(0,P,this.__views__),re=V.start,ce=V.end,_e=ce-re,He=E?ce:re-1,ze=this.__iteratees__,tt=ze.length,vt=0,yt=ii(_e,this.__takeCount__);if(!x||!E&&P==_e&&yt==_e)return Kc(h,this.__actions__);var Ct=[];e:for(;_e--&&vt<yt;){for(var Je=-1,nt=h[He+=p];++Je<tt;){var Et=ze[Je],mt=Et.iteratee,St=Et.type,It=mt(nt);if(St==2)nt=It;else if(!It){if(St==1)continue e;break e}}Ct[vt++]=nt}return Ct},T.prototype.at=iv,T.prototype.chain=function(){return Rf(this)},T.prototype.commit=function(){return new In(this.value(),this.__chain__)},T.prototype.next=function(){this.__values__===void 0&&(this.__values__=jf(this.value()));var h=this.__index__>=this.__values__.length;return{done:h,value:h?void 0:this.__values__[this.__index__++]}},T.prototype.plant=function(h){for(var p,x=this;x instanceof Al;){var E=Ef(x);E.__index__=0,E.__values__=void 0,p?P.__wrapped__=E:p=E;var P=E;x=x.__wrapped__}return P.__wrapped__=h,p},T.prototype.reverse=function(){var h=this.__wrapped__;if(h instanceof Ht){var p=h;return this.__actions__.length&&(p=new Ht(this)),(p=p.reverse()).__actions__.push({func:_h,args:[pd],thisArg:void 0}),new In(p,this.__chain__)}return this.thru(pd)},T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=function(){return Kc(this.__wrapped__,this.__actions__)},T.prototype.first=T.prototype.head,Zr&&(T.prototype[Zr]=function(){return this}),T}();Nn._=Ls,(B=function(){return Ls}.call(O,v,O,q))===void 0||(q.exports=B)}).call(this)}).call(this,v(4),v(8)(I))},function(I,O,v){Object.defineProperty(O,"__esModule",{value:!0});var b=function(){function oe(X,K){for(var le=0;le<K.length;le++){var Ee=K[le];Ee.enumerable=Ee.enumerable||!1,Ee.configurable=!0,"value"in Ee&&(Ee.writable=!0),Object.defineProperty(X,Ee.key,Ee)}}return function(X,K,le){return K&&oe(X.prototype,K),le&&oe(X,le),X}}();function q(oe,X){if(!(oe instanceof X))throw new TypeError("Cannot call a class as a function")}var B=function(){function oe(X,K,le){K===void 0&&(K=!1),q(this,oe),this._fn=X,this._once=K,this._thisArg=le,this._next=this._prev=this._owner=null}return b(oe,[{key:"detach",value:function(){return this._owner!==null&&(this._owner.detach(this),!0)}}]),oe}();function ie(oe,X){return oe._head?(oe._tail._next=X,X._prev=oe._tail,oe._tail=X):(oe._head=X,oe._tail=X),X._owner=oe,X}var k=function(){function oe(){q(this,oe),this._head=this._tail=void 0}return b(oe,[{key:"handlers",value:function(){var X=!(arguments.length<=0||arguments[0]===void 0)&&arguments[0],K=this._head;if(X)return!!K;for(var le=[];K;)le.push(K),K=K._next;return le}},{key:"has",value:function(X){if(!(X instanceof B))throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");return X._owner===this}},{key:"dispatch",value:function(){var X=this._head;if(!X)return!1;for(;X;)X._once&&this.detach(X),X._fn.apply(X._thisArg,arguments),X=X._next;return!0}},{key:"add",value:function(X){var K=arguments.length<=1||arguments[1]===void 0?null:arguments[1];if(typeof X!="function")throw new Error("MiniSignal#add(): First arg must be a Function.");return ie(this,new B(X,!1,K))}},{key:"once",value:function(X){var K=arguments.length<=1||arguments[1]===void 0?null:arguments[1];if(typeof X!="function")throw new Error("MiniSignal#once(): First arg must be a Function.");return ie(this,new B(X,!0,K))}},{key:"detach",value:function(X){if(!(X instanceof B))throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object.");return X._owner!==this||(X._prev&&(X._prev._next=X._next),X._next&&(X._next._prev=X._prev),X===this._head?(this._head=X._next,X._next===null&&(this._tail=null)):X===this._tail&&(this._tail=X._prev,this._tail._next=null),X._owner=null),this}},{key:"detachAll",value:function(){var X=this._head;if(!X)return this;for(this._head=this._tail=null;X;)X._owner=null,X=X._next;return this}}]),oe}();k.MiniSignalBinding=B,O.default=k,I.exports=O.default},function(I,O,v){var b;(function(q){function B(D,z){var W=(65535&D)+(65535&z);return(D>>16)+(z>>16)+(W>>16)<<16|65535&W}function ie(D,z,W,ee,et,ft){return B(($e=B(B(z,D),B(ee,ft)))<<(ae=et)|$e>>>32-ae,W);var $e,ae}function k(D,z,W,ee,et,ft,$e){return ie(z&W|~z&ee,D,z,et,ft,$e)}function oe(D,z,W,ee,et,ft,$e){return ie(z&ee|W&~ee,D,z,et,ft,$e)}function X(D,z,W,ee,et,ft,$e){return ie(z^W^ee,D,z,et,ft,$e)}function K(D,z,W,ee,et,ft,$e){return ie(W^(z|~ee),D,z,et,ft,$e)}function le(D,z){var W,ee,et,ft,$e;D[z>>5]|=128<<z%32,D[14+(z+64>>>9<<4)]=z;var ae=1732584193,Ce=-271733879,Ie=-1732584194,H=271733878;for(W=0;W<D.length;W+=16)ee=ae,et=Ce,ft=Ie,$e=H,ae=k(ae,Ce,Ie,H,D[W],7,-680876936),H=k(H,ae,Ce,Ie,D[W+1],12,-389564586),Ie=k(Ie,H,ae,Ce,D[W+2],17,606105819),Ce=k(Ce,Ie,H,ae,D[W+3],22,-1044525330),ae=k(ae,Ce,Ie,H,D[W+4],7,-176418897),H=k(H,ae,Ce,Ie,D[W+5],12,1200080426),Ie=k(Ie,H,ae,Ce,D[W+6],17,-1473231341),Ce=k(Ce,Ie,H,ae,D[W+7],22,-45705983),ae=k(ae,Ce,Ie,H,D[W+8],7,1770035416),H=k(H,ae,Ce,Ie,D[W+9],12,-1958414417),Ie=k(Ie,H,ae,Ce,D[W+10],17,-42063),Ce=k(Ce,Ie,H,ae,D[W+11],22,-1990404162),ae=k(ae,Ce,Ie,H,D[W+12],7,1804603682),H=k(H,ae,Ce,Ie,D[W+13],12,-40341101),Ie=k(Ie,H,ae,Ce,D[W+14],17,-1502002290),ae=oe(ae,Ce=k(Ce,Ie,H,ae,D[W+15],22,1236535329),Ie,H,D[W+1],5,-165796510),H=oe(H,ae,Ce,Ie,D[W+6],9,-1069501632),Ie=oe(Ie,H,ae,Ce,D[W+11],14,643717713),Ce=oe(Ce,Ie,H,ae,D[W],20,-373897302),ae=oe(ae,Ce,Ie,H,D[W+5],5,-701558691),H=oe(H,ae,Ce,Ie,D[W+10],9,38016083),Ie=oe(Ie,H,ae,Ce,D[W+15],14,-660478335),Ce=oe(Ce,Ie,H,ae,D[W+4],20,-405537848),ae=oe(ae,Ce,Ie,H,D[W+9],5,568446438),H=oe(H,ae,Ce,Ie,D[W+14],9,-1019803690),Ie=oe(Ie,H,ae,Ce,D[W+3],14,-187363961),Ce=oe(Ce,Ie,H,ae,D[W+8],20,1163531501),ae=oe(ae,Ce,Ie,H,D[W+13],5,-1444681467),H=oe(H,ae,Ce,Ie,D[W+2],9,-51403784),Ie=oe(Ie,H,ae,Ce,D[W+7],14,1735328473),ae=X(ae,Ce=oe(Ce,Ie,H,ae,D[W+12],20,-1926607734),Ie,H,D[W+5],4,-378558),H=X(H,ae,Ce,Ie,D[W+8],11,-2022574463),Ie=X(Ie,H,ae,Ce,D[W+11],16,1839030562),Ce=X(Ce,Ie,H,ae,D[W+14],23,-35309556),ae=X(ae,Ce,Ie,H,D[W+1],4,-1530992060),H=X(H,ae,Ce,Ie,D[W+4],11,1272893353),Ie=X(Ie,H,ae,Ce,D[W+7],16,-155497632),Ce=X(Ce,Ie,H,ae,D[W+10],23,-1094730640),ae=X(ae,Ce,Ie,H,D[W+13],4,681279174),H=X(H,ae,Ce,Ie,D[W],11,-358537222),Ie=X(Ie,H,ae,Ce,D[W+3],16,-722521979),Ce=X(Ce,Ie,H,ae,D[W+6],23,76029189),ae=X(ae,Ce,Ie,H,D[W+9],4,-640364487),H=X(H,ae,Ce,Ie,D[W+12],11,-421815835),Ie=X(Ie,H,ae,Ce,D[W+15],16,530742520),ae=K(ae,Ce=X(Ce,Ie,H,ae,D[W+2],23,-995338651),Ie,H,D[W],6,-198630844),H=K(H,ae,Ce,Ie,D[W+7],10,1126891415),Ie=K(Ie,H,ae,Ce,D[W+14],15,-1416354905),Ce=K(Ce,Ie,H,ae,D[W+5],21,-57434055),ae=K(ae,Ce,Ie,H,D[W+12],6,1700485571),H=K(H,ae,Ce,Ie,D[W+3],10,-1894986606),Ie=K(Ie,H,ae,Ce,D[W+10],15,-1051523),Ce=K(Ce,Ie,H,ae,D[W+1],21,-2054922799),ae=K(ae,Ce,Ie,H,D[W+8],6,1873313359),H=K(H,ae,Ce,Ie,D[W+15],10,-30611744),Ie=K(Ie,H,ae,Ce,D[W+6],15,-1560198380),Ce=K(Ce,Ie,H,ae,D[W+13],21,1309151649),ae=K(ae,Ce,Ie,H,D[W+4],6,-145523070),H=K(H,ae,Ce,Ie,D[W+11],10,-1120210379),Ie=K(Ie,H,ae,Ce,D[W+2],15,718787259),Ce=K(Ce,Ie,H,ae,D[W+9],21,-343485551),ae=B(ae,ee),Ce=B(Ce,et),Ie=B(Ie,ft),H=B(H,$e);return[ae,Ce,Ie,H]}function Ee(D){var z,W="",ee=32*D.length;for(z=0;z<ee;z+=8)W+=String.fromCharCode(D[z>>5]>>>z%32&255);return W}function Xe(D){var z,W=[];for(W[(D.length>>2)-1]=void 0,z=0;z<W.length;z+=1)W[z]=0;var ee=8*D.length;for(z=0;z<ee;z+=8)W[z>>5]|=(255&D.charCodeAt(z/8))<<z%32;return W}function Fe(D){var z,W,ee="";for(W=0;W<D.length;W+=1)z=D.charCodeAt(W),ee+="0123456789abcdef".charAt(z>>>4&15)+"0123456789abcdef".charAt(15&z);return ee}function S(D){return unescape(encodeURIComponent(D))}function A(D){return function(z){return Ee(le(Xe(z),8*z.length))}(S(D))}function L(D,z){return function(W,ee){var et,ft,$e=Xe(W),ae=[],Ce=[];for(ae[15]=Ce[15]=void 0,$e.length>16&&($e=le($e,8*W.length)),et=0;et<16;et+=1)ae[et]=909522486^$e[et],Ce[et]=1549556828^$e[et];return ft=le(ae.concat(Xe(ee)),512+8*ee.length),Ee(le(Ce.concat(ft),640))}(S(D),S(z))}function j(D,z,W){return z?W?L(z,D):Fe(L(z,D)):W?A(D):Fe(A(D))}(b=function(){return j}.call(O,v,O,I))===void 0||(I.exports=b)})()},function(I,O){var v;v=function(){return this}();try{v=v||new Function("return this")()}catch{typeof window=="object"&&(v=window)}I.exports=v},function(I,O,v){var b=v(21),q=v(22);function B(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}O.parse=D,O.resolve=function(z,W){return D(z,!1,!0).resolve(W)},O.resolveObject=function(z,W){return z?D(z,!1,!0).resolveObject(W):W},O.format=function(z){return q.isString(z)&&(z=D(z)),z instanceof B?z.format():B.prototype.format.call(z)},O.Url=B;var ie=/^([a-z0-9.+-]+:)/i,k=/:[0-9]*$/,oe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,X=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
28
- `," "]),K=["'"].concat(X),le=["%","/","?",";","#"].concat(K),Ee=["/","?","#"],Xe=/^[+a-z0-9A-Z_-]{0,63}$/,Fe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,S={javascript:!0,"javascript:":!0},A={javascript:!0,"javascript:":!0},L={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},j=v(23);function D(z,W,ee){if(z&&q.isObject(z)&&z instanceof B)return z;var et=new B;return et.parse(z,W,ee),et}B.prototype.parse=function(z,W,ee){if(!q.isString(z))throw new TypeError("Parameter 'url' must be a string, not "+typeof z);var et=z.indexOf("?"),ft=et!==-1&&et<z.indexOf("#")?"?":"#",$e=z.split(ft);$e[0]=$e[0].replace(/\\/g,"/");var ae=z=$e.join(ft);if(ae=ae.trim(),!ee&&z.split("#").length===1){var Ce=oe.exec(ae);if(Ce)return this.path=ae,this.href=ae,this.pathname=Ce[1],Ce[2]?(this.search=Ce[2],this.query=W?j.parse(this.search.substr(1)):this.search.substr(1)):W&&(this.search="",this.query={}),this}var Ie=ie.exec(ae);if(Ie){var H=(Ie=Ie[0]).toLowerCase();this.protocol=H,ae=ae.substr(Ie.length)}if(ee||Ie||ae.match(/^\/\/[^@\/]+@[^@\/]+/)){var be=ae.substr(0,2)==="//";!be||Ie&&A[Ie]||(ae=ae.substr(2),this.slashes=!0)}if(!A[Ie]&&(be||Ie&&!L[Ie])){for(var Me,Oe,Se=-1,Ue=0;Ue<Ee.length;Ue++)(qe=ae.indexOf(Ee[Ue]))!==-1&&(Se===-1||qe<Se)&&(Se=qe);for((Oe=Se===-1?ae.lastIndexOf("@"):ae.lastIndexOf("@",Se))!==-1&&(Me=ae.slice(0,Oe),ae=ae.slice(Oe+1),this.auth=decodeURIComponent(Me)),Se=-1,Ue=0;Ue<le.length;Ue++){var qe;(qe=ae.indexOf(le[Ue]))!==-1&&(Se===-1||qe<Se)&&(Se=qe)}Se===-1&&(Se=ae.length),this.host=ae.slice(0,Se),ae=ae.slice(Se),this.parseHost(),this.hostname=this.hostname||"";var at=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!at)for(var rt=this.hostname.split(/\./),Qt=(Ue=0,rt.length);Ue<Qt;Ue++){var lt=rt[Ue];if(lt&&!lt.match(Xe)){for(var en="",Bt=0,Vt=lt.length;Bt<Vt;Bt++)lt.charCodeAt(Bt)>127?en+="x":en+=lt[Bt];if(!en.match(Xe)){var bt=rt.slice(0,Ue),Dn=rt.slice(Ue+1),wn=lt.match(Fe);wn&&(bt.push(wn[1]),Dn.unshift(wn[2])),Dn.length&&(ae="/"+Dn.join(".")+ae),this.hostname=bt.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),at||(this.hostname=b.toASCII(this.hostname));var gn=this.port?":"+this.port:"",Zn=this.hostname||"";this.host=Zn+gn,this.href+=this.host,at&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),ae[0]!=="/"&&(ae="/"+ae))}if(!S[H])for(Ue=0,Qt=K.length;Ue<Qt;Ue++){var yn=K[Ue];if(ae.indexOf(yn)!==-1){var li=encodeURIComponent(yn);li===yn&&(li=escape(yn)),ae=ae.split(yn).join(li)}}var Bi=ae.indexOf("#");Bi!==-1&&(this.hash=ae.substr(Bi),ae=ae.slice(0,Bi));var Ci=ae.indexOf("?");if(Ci!==-1?(this.search=ae.substr(Ci),this.query=ae.substr(Ci+1),W&&(this.query=j.parse(this.query)),ae=ae.slice(0,Ci)):W&&(this.search="",this.query={}),ae&&(this.pathname=ae),L[H]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){gn=this.pathname||"";var ji=this.search||"";this.path=gn+ji}return this.href=this.format(),this},B.prototype.format=function(){var z=this.auth||"";z&&(z=(z=encodeURIComponent(z)).replace(/%3A/i,":"),z+="@");var W=this.protocol||"",ee=this.pathname||"",et=this.hash||"",ft=!1,$e="";this.host?ft=z+this.host:this.hostname&&(ft=z+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(ft+=":"+this.port)),this.query&&q.isObject(this.query)&&Object.keys(this.query).length&&($e=j.stringify(this.query));var ae=this.search||$e&&"?"+$e||"";return W&&W.substr(-1)!==":"&&(W+=":"),this.slashes||(!W||L[W])&&ft!==!1?(ft="//"+(ft||""),ee&&ee.charAt(0)!=="/"&&(ee="/"+ee)):ft||(ft=""),et&&et.charAt(0)!=="#"&&(et="#"+et),ae&&ae.charAt(0)!=="?"&&(ae="?"+ae),W+ft+(ee=ee.replace(/[?#]/g,function(Ce){return encodeURIComponent(Ce)}))+(ae=ae.replace("#","%23"))+et},B.prototype.resolve=function(z){return this.resolveObject(D(z,!1,!0)).format()},B.prototype.resolveObject=function(z){if(q.isString(z)){var W=new B;W.parse(z,!1,!0),z=W}for(var ee=new B,et=Object.keys(this),ft=0;ft<et.length;ft++){var $e=et[ft];ee[$e]=this[$e]}if(ee.hash=z.hash,z.href==="")return ee.href=ee.format(),ee;if(z.slashes&&!z.protocol){for(var ae=Object.keys(z),Ce=0;Ce<ae.length;Ce++){var Ie=ae[Ce];Ie!=="protocol"&&(ee[Ie]=z[Ie])}return L[ee.protocol]&&ee.hostname&&!ee.pathname&&(ee.path=ee.pathname="/"),ee.href=ee.format(),ee}if(z.protocol&&z.protocol!==ee.protocol){if(!L[z.protocol]){for(var H=Object.keys(z),be=0;be<H.length;be++){var Me=H[be];ee[Me]=z[Me]}return ee.href=ee.format(),ee}if(ee.protocol=z.protocol,z.host||A[z.protocol])ee.pathname=z.pathname;else{for(var Oe=(z.pathname||"").split("/");Oe.length&&!(z.host=Oe.shift()););z.host||(z.host=""),z.hostname||(z.hostname=""),Oe[0]!==""&&Oe.unshift(""),Oe.length<2&&Oe.unshift(""),ee.pathname=Oe.join("/")}if(ee.search=z.search,ee.query=z.query,ee.host=z.host||"",ee.auth=z.auth,ee.hostname=z.hostname||z.host,ee.port=z.port,ee.pathname||ee.search){var Se=ee.pathname||"",Ue=ee.search||"";ee.path=Se+Ue}return ee.slashes=ee.slashes||z.slashes,ee.href=ee.format(),ee}var qe=ee.pathname&&ee.pathname.charAt(0)==="/",at=z.host||z.pathname&&z.pathname.charAt(0)==="/",rt=at||qe||ee.host&&z.pathname,Qt=rt,lt=ee.pathname&&ee.pathname.split("/")||[],en=(Oe=z.pathname&&z.pathname.split("/")||[],ee.protocol&&!L[ee.protocol]);if(en&&(ee.hostname="",ee.port=null,ee.host&&(lt[0]===""?lt[0]=ee.host:lt.unshift(ee.host)),ee.host="",z.protocol&&(z.hostname=null,z.port=null,z.host&&(Oe[0]===""?Oe[0]=z.host:Oe.unshift(z.host)),z.host=null),rt=rt&&(Oe[0]===""||lt[0]==="")),at)ee.host=z.host||z.host===""?z.host:ee.host,ee.hostname=z.hostname||z.hostname===""?z.hostname:ee.hostname,ee.search=z.search,ee.query=z.query,lt=Oe;else if(Oe.length)lt||(lt=[]),lt.pop(),lt=lt.concat(Oe),ee.search=z.search,ee.query=z.query;else if(!q.isNullOrUndefined(z.search))return en&&(ee.hostname=ee.host=lt.shift(),(wn=!!(ee.host&&ee.host.indexOf("@")>0)&&ee.host.split("@"))&&(ee.auth=wn.shift(),ee.host=ee.hostname=wn.shift())),ee.search=z.search,ee.query=z.query,q.isNull(ee.pathname)&&q.isNull(ee.search)||(ee.path=(ee.pathname?ee.pathname:"")+(ee.search?ee.search:"")),ee.href=ee.format(),ee;if(!lt.length)return ee.pathname=null,ee.search?ee.path="/"+ee.search:ee.path=null,ee.href=ee.format(),ee;for(var Bt=lt.slice(-1)[0],Vt=(ee.host||z.host||lt.length>1)&&(Bt==="."||Bt==="..")||Bt==="",bt=0,Dn=lt.length;Dn>=0;Dn--)(Bt=lt[Dn])==="."?lt.splice(Dn,1):Bt===".."?(lt.splice(Dn,1),bt++):bt&&(lt.splice(Dn,1),bt--);if(!rt&&!Qt)for(;bt--;bt)lt.unshift("..");!rt||lt[0]===""||lt[0]&&lt[0].charAt(0)==="/"||lt.unshift(""),Vt&&lt.join("/").substr(-1)!=="/"&&lt.push("");var wn,gn=lt[0]===""||lt[0]&&lt[0].charAt(0)==="/";return en&&(ee.hostname=ee.host=gn?"":lt.length?lt.shift():"",(wn=!!(ee.host&&ee.host.indexOf("@")>0)&&ee.host.split("@"))&&(ee.auth=wn.shift(),ee.host=ee.hostname=wn.shift())),(rt=rt||ee.host&&lt.length)&&!gn&&lt.unshift(""),lt.length?ee.pathname=lt.join("/"):(ee.pathname=null,ee.path=null),q.isNull(ee.pathname)&&q.isNull(ee.search)||(ee.path=(ee.pathname?ee.pathname:"")+(ee.search?ee.search:"")),ee.auth=z.auth||ee.auth,ee.slashes=ee.slashes||z.slashes,ee.href=ee.format(),ee},B.prototype.parseHost=function(){var z=this.host,W=k.exec(z);W&&((W=W[0])!==":"&&(this.port=W.substr(1)),z=z.substr(0,z.length-W.length)),z&&(this.hostname=z)}},function(I,O,v){I.exports=function(b,q){if(b){q=q||{};for(var B={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},ie=B.parser[q.strictMode?"strict":"loose"].exec(b),k={},oe=14;oe--;)k[B.key[oe]]=ie[oe]||"";return k[B.q.name]={},k[B.key[12]].replace(B.q.parser,function(X,K,le){K&&(k[B.q.name][K]=le)}),k}}},function(I,O,v){var b=v(26);I.exports=function(q,B){B=B||{};var ie=new b,k=B.inPlace||!1,oe=q.map(function(K){return k?K:{width:K.width,height:K.height,item:K}});oe=oe.sort(function(K,le){return le.width*le.height-K.width*K.height}),ie.fit(oe);var X={width:oe.reduce(function(K,le){return Math.max(K,le.x+le.width)},0),height:oe.reduce(function(K,le){return Math.max(K,le.y+le.height)},0)};return k||(X.items=oe),X}},function(I,O){I.exports=function(v){return v.webpackPolyfill||(v.deprecate=function(){},v.paths=[],v.children||(v.children=[]),Object.defineProperty(v,"loaded",{enumerable:!0,get:function(){return v.l}}),Object.defineProperty(v,"id",{enumerable:!0,get:function(){return v.i}}),v.webpackPolyfill=1),v}},function(I,O,v){var b=Object.prototype.hasOwnProperty,q="~";function B(){}function ie(K,le,Ee){this.fn=K,this.context=le,this.once=Ee||!1}function k(K,le,Ee,Xe,Fe){if(typeof Ee!="function")throw new TypeError("The listener must be a function");var S=new ie(Ee,Xe||K,Fe),A=q?q+le:le;return K._events[A]?K._events[A].fn?K._events[A]=[K._events[A],S]:K._events[A].push(S):(K._events[A]=S,K._eventsCount++),K}function oe(K,le){--K._eventsCount==0?K._events=new B:delete K._events[le]}function X(){this._events=new B,this._eventsCount=0}Object.create&&(B.prototype=Object.create(null),new B().__proto__||(q=!1)),X.prototype.eventNames=function(){var K,le,Ee=[];if(this._eventsCount===0)return Ee;for(le in K=this._events)b.call(K,le)&&Ee.push(q?le.slice(1):le);return Object.getOwnPropertySymbols?Ee.concat(Object.getOwnPropertySymbols(K)):Ee},X.prototype.listeners=function(K){var le=q?q+K:K,Ee=this._events[le];if(!Ee)return[];if(Ee.fn)return[Ee.fn];for(var Xe=0,Fe=Ee.length,S=new Array(Fe);Xe<Fe;Xe++)S[Xe]=Ee[Xe].fn;return S},X.prototype.listenerCount=function(K){var le=q?q+K:K,Ee=this._events[le];return Ee?Ee.fn?1:Ee.length:0},X.prototype.emit=function(K,le,Ee,Xe,Fe,S){var A=q?q+K:K;if(!this._events[A])return!1;var L,j,D=this._events[A],z=arguments.length;if(D.fn){switch(D.once&&this.removeListener(K,D.fn,void 0,!0),z){case 1:return D.fn.call(D.context),!0;case 2:return D.fn.call(D.context,le),!0;case 3:return D.fn.call(D.context,le,Ee),!0;case 4:return D.fn.call(D.context,le,Ee,Xe),!0;case 5:return D.fn.call(D.context,le,Ee,Xe,Fe),!0;case 6:return D.fn.call(D.context,le,Ee,Xe,Fe,S),!0}for(j=1,L=new Array(z-1);j<z;j++)L[j-1]=arguments[j];D.fn.apply(D.context,L)}else{var W,ee=D.length;for(j=0;j<ee;j++)switch(D[j].once&&this.removeListener(K,D[j].fn,void 0,!0),z){case 1:D[j].fn.call(D[j].context);break;case 2:D[j].fn.call(D[j].context,le);break;case 3:D[j].fn.call(D[j].context,le,Ee);break;case 4:D[j].fn.call(D[j].context,le,Ee,Xe);break;default:if(!L)for(W=1,L=new Array(z-1);W<z;W++)L[W-1]=arguments[W];D[j].fn.apply(D[j].context,L)}}return!0},X.prototype.on=function(K,le,Ee){return k(this,K,le,Ee,!1)},X.prototype.once=function(K,le,Ee){return k(this,K,le,Ee,!0)},X.prototype.removeListener=function(K,le,Ee,Xe){var Fe=q?q+K:K;if(!this._events[Fe])return this;if(!le)return oe(this,Fe),this;var S=this._events[Fe];if(S.fn)S.fn!==le||Xe&&!S.once||Ee&&S.context!==Ee||oe(this,Fe);else{for(var A=0,L=[],j=S.length;A<j;A++)(S[A].fn!==le||Xe&&!S[A].once||Ee&&S[A].context!==Ee)&&L.push(S[A]);L.length?this._events[Fe]=L.length===1?L[0]:L:oe(this,Fe)}return this},X.prototype.removeAllListeners=function(K){var le;return K?(le=q?q+K:K,this._events[le]&&oe(this,le)):(this._events=new B,this._eventsCount=0),this},X.prototype.off=X.prototype.removeListener,X.prototype.addListener=X.prototype.on,X.prefixed=q,X.EventEmitter=X,I.exports=X},function(I,O,v){function b(H,be,Me){Me=Me||2;var Oe,Se,Ue,qe,at,rt,Qt,lt=be&&be.length,en=lt?be[0]*Me:H.length,Bt=q(H,0,en,Me,!0),Vt=[];if(!Bt||Bt.next===Bt.prev)return Vt;if(lt&&(Bt=function(Dn,wn,gn,Zn){var yn,li,Bi,Ci,ji,Lr=[];for(yn=0,li=wn.length;yn<li;yn++)Bi=wn[yn]*Zn,Ci=yn<li-1?wn[yn+1]*Zn:Dn.length,(ji=q(Dn,Bi,Ci,Zn,!1))===ji.next&&(ji.steiner=!0),Lr.push(S(ji));for(Lr.sort(le),yn=0;yn<Lr.length;yn++)gn=B(gn=Ee(Lr[yn],gn),gn.next);return gn}(H,be,Bt,Me)),H.length>80*Me){Oe=Ue=H[0],Se=qe=H[1];for(var bt=Me;bt<en;bt+=Me)(at=H[bt])<Oe&&(Oe=at),(rt=H[bt+1])<Se&&(Se=rt),at>Ue&&(Ue=at),rt>qe&&(qe=rt);Qt=(Qt=Math.max(Ue-Oe,qe-Se))!==0?1/Qt:0}return ie(Bt,Vt,Me,Oe,Se,Qt),Vt}function q(H,be,Me,Oe,Se){var Ue,qe;if(Se===Ie(H,be,Me,Oe)>0)for(Ue=be;Ue<Me;Ue+=Oe)qe=$e(Ue,H[Ue],H[Ue+1],qe);else for(Ue=Me-Oe;Ue>=be;Ue-=Oe)qe=$e(Ue,H[Ue],H[Ue+1],qe);return qe&&D(qe,qe.next)&&(ae(qe),qe=qe.next),qe}function B(H,be){if(!H)return H;be||(be=H);var Me,Oe=H;do if(Me=!1,Oe.steiner||!D(Oe,Oe.next)&&j(Oe.prev,Oe,Oe.next)!==0)Oe=Oe.next;else{if(ae(Oe),(Oe=be=Oe.prev)===Oe.next)break;Me=!0}while(Me||Oe!==be);return be}function ie(H,be,Me,Oe,Se,Ue,qe){if(H){!qe&&Ue&&function(lt,en,Bt,Vt){var bt=lt;do bt.z===null&&(bt.z=Fe(bt.x,bt.y,en,Bt,Vt)),bt.prevZ=bt.prev,bt.nextZ=bt.next,bt=bt.next;while(bt!==lt);bt.prevZ.nextZ=null,bt.prevZ=null,function(Dn){var wn,gn,Zn,yn,li,Bi,Ci,ji,Lr=1;do{for(gn=Dn,Dn=null,li=null,Bi=0;gn;){for(Bi++,Zn=gn,Ci=0,wn=0;wn<Lr&&(Ci++,Zn=Zn.nextZ);wn++);for(ji=Lr;Ci>0||ji>0&&Zn;)Ci!==0&&(ji===0||!Zn||gn.z<=Zn.z)?(yn=gn,gn=gn.nextZ,Ci--):(yn=Zn,Zn=Zn.nextZ,ji--),li?li.nextZ=yn:Dn=yn,yn.prevZ=li,li=yn;gn=Zn}li.nextZ=null,Lr*=2}while(Bi>1)}(bt)}(H,Oe,Se,Ue);for(var at,rt,Qt=H;H.prev!==H.next;)if(at=H.prev,rt=H.next,Ue?oe(H,Oe,Se,Ue):k(H))be.push(at.i/Me),be.push(H.i/Me),be.push(rt.i/Me),ae(H),H=rt.next,Qt=rt.next;else if((H=rt)===Qt){qe?qe===1?ie(H=X(B(H),be,Me),be,Me,Oe,Se,Ue,2):qe===2&&K(H,be,Me,Oe,Se,Ue):ie(B(H),be,Me,Oe,Se,Ue,1);break}}}function k(H){var be=H.prev,Me=H,Oe=H.next;if(j(be,Me,Oe)>=0)return!1;for(var Se=H.next.next;Se!==H.prev;){if(A(be.x,be.y,Me.x,Me.y,Oe.x,Oe.y,Se.x,Se.y)&&j(Se.prev,Se,Se.next)>=0)return!1;Se=Se.next}return!0}function oe(H,be,Me,Oe){var Se=H.prev,Ue=H,qe=H.next;if(j(Se,Ue,qe)>=0)return!1;for(var at=Se.x<Ue.x?Se.x<qe.x?Se.x:qe.x:Ue.x<qe.x?Ue.x:qe.x,rt=Se.y<Ue.y?Se.y<qe.y?Se.y:qe.y:Ue.y<qe.y?Ue.y:qe.y,Qt=Se.x>Ue.x?Se.x>qe.x?Se.x:qe.x:Ue.x>qe.x?Ue.x:qe.x,lt=Se.y>Ue.y?Se.y>qe.y?Se.y:qe.y:Ue.y>qe.y?Ue.y:qe.y,en=Fe(at,rt,be,Me,Oe),Bt=Fe(Qt,lt,be,Me,Oe),Vt=H.prevZ,bt=H.nextZ;Vt&&Vt.z>=en&&bt&&bt.z<=Bt;){if(Vt!==H.prev&&Vt!==H.next&&A(Se.x,Se.y,Ue.x,Ue.y,qe.x,qe.y,Vt.x,Vt.y)&&j(Vt.prev,Vt,Vt.next)>=0||(Vt=Vt.prevZ,bt!==H.prev&&bt!==H.next&&A(Se.x,Se.y,Ue.x,Ue.y,qe.x,qe.y,bt.x,bt.y)&&j(bt.prev,bt,bt.next)>=0))return!1;bt=bt.nextZ}for(;Vt&&Vt.z>=en;){if(Vt!==H.prev&&Vt!==H.next&&A(Se.x,Se.y,Ue.x,Ue.y,qe.x,qe.y,Vt.x,Vt.y)&&j(Vt.prev,Vt,Vt.next)>=0)return!1;Vt=Vt.prevZ}for(;bt&&bt.z<=Bt;){if(bt!==H.prev&&bt!==H.next&&A(Se.x,Se.y,Ue.x,Ue.y,qe.x,qe.y,bt.x,bt.y)&&j(bt.prev,bt,bt.next)>=0)return!1;bt=bt.nextZ}return!0}function X(H,be,Me){var Oe=H;do{var Se=Oe.prev,Ue=Oe.next.next;!D(Se,Ue)&&z(Se,Oe,Oe.next,Ue)&&et(Se,Ue)&&et(Ue,Se)&&(be.push(Se.i/Me),be.push(Oe.i/Me),be.push(Ue.i/Me),ae(Oe),ae(Oe.next),Oe=H=Ue),Oe=Oe.next}while(Oe!==H);return B(Oe)}function K(H,be,Me,Oe,Se,Ue){var qe=H;do{for(var at=qe.next.next;at!==qe.prev;){if(qe.i!==at.i&&L(qe,at)){var rt=ft(qe,at);return qe=B(qe,qe.next),rt=B(rt,rt.next),ie(qe,be,Me,Oe,Se,Ue),void ie(rt,be,Me,Oe,Se,Ue)}at=at.next}qe=qe.next}while(qe!==H)}function le(H,be){return H.x-be.x}function Ee(H,be){var Me=function(Ue,qe){var at,rt=qe,Qt=Ue.x,lt=Ue.y,en=-1/0;do{if(lt<=rt.y&&lt>=rt.next.y&&rt.next.y!==rt.y){var Bt=rt.x+(lt-rt.y)*(rt.next.x-rt.x)/(rt.next.y-rt.y);if(Bt<=Qt&&Bt>en){if(en=Bt,Bt===Qt){if(lt===rt.y)return rt;if(lt===rt.next.y)return rt.next}at=rt.x<rt.next.x?rt:rt.next}}rt=rt.next}while(rt!==qe);if(!at)return null;if(Qt===en)return at;var Vt,bt=at,Dn=at.x,wn=at.y,gn=1/0;rt=at;do Qt>=rt.x&&rt.x>=Dn&&Qt!==rt.x&&A(lt<wn?Qt:en,lt,Dn,wn,lt<wn?en:Qt,lt,rt.x,rt.y)&&(Vt=Math.abs(lt-rt.y)/(Qt-rt.x),et(rt,Ue)&&(Vt<gn||Vt===gn&&(rt.x>at.x||rt.x===at.x&&Xe(at,rt)))&&(at=rt,gn=Vt)),rt=rt.next;while(rt!==bt);return at}(H,be);if(!Me)return be;var Oe=ft(Me,H),Se=B(Me,Me.next);return B(Oe,Oe.next),be===Me?Se:be}function Xe(H,be){return j(H.prev,H,be.prev)<0&&j(be.next,H,H.next)<0}function Fe(H,be,Me,Oe,Se){return(H=1431655765&((H=858993459&((H=252645135&((H=16711935&((H=32767*(H-Me)*Se)|H<<8))|H<<4))|H<<2))|H<<1))|(be=1431655765&((be=858993459&((be=252645135&((be=16711935&((be=32767*(be-Oe)*Se)|be<<8))|be<<4))|be<<2))|be<<1))<<1}function S(H){var be=H,Me=H;do(be.x<Me.x||be.x===Me.x&&be.y<Me.y)&&(Me=be),be=be.next;while(be!==H);return Me}function A(H,be,Me,Oe,Se,Ue,qe,at){return(Se-qe)*(be-at)-(H-qe)*(Ue-at)>=0&&(H-qe)*(Oe-at)-(Me-qe)*(be-at)>=0&&(Me-qe)*(Ue-at)-(Se-qe)*(Oe-at)>=0}function L(H,be){return H.next.i!==be.i&&H.prev.i!==be.i&&!function(Me,Oe){var Se=Me;do{if(Se.i!==Me.i&&Se.next.i!==Me.i&&Se.i!==Oe.i&&Se.next.i!==Oe.i&&z(Se,Se.next,Me,Oe))return!0;Se=Se.next}while(Se!==Me);return!1}(H,be)&&(et(H,be)&&et(be,H)&&function(Me,Oe){var Se=Me,Ue=!1,qe=(Me.x+Oe.x)/2,at=(Me.y+Oe.y)/2;do Se.y>at!=Se.next.y>at&&Se.next.y!==Se.y&&qe<(Se.next.x-Se.x)*(at-Se.y)/(Se.next.y-Se.y)+Se.x&&(Ue=!Ue),Se=Se.next;while(Se!==Me);return Ue}(H,be)&&(j(H.prev,H,be.prev)||j(H,be.prev,be))||D(H,be)&&j(H.prev,H,H.next)>0&&j(be.prev,be,be.next)>0)}function j(H,be,Me){return(be.y-H.y)*(Me.x-be.x)-(be.x-H.x)*(Me.y-be.y)}function D(H,be){return H.x===be.x&&H.y===be.y}function z(H,be,Me,Oe){var Se=ee(j(H,be,Me)),Ue=ee(j(H,be,Oe)),qe=ee(j(Me,Oe,H)),at=ee(j(Me,Oe,be));return Se!==Ue&&qe!==at||!(Se!==0||!W(H,Me,be))||!(Ue!==0||!W(H,Oe,be))||!(qe!==0||!W(Me,H,Oe))||!(at!==0||!W(Me,be,Oe))}function W(H,be,Me){return be.x<=Math.max(H.x,Me.x)&&be.x>=Math.min(H.x,Me.x)&&be.y<=Math.max(H.y,Me.y)&&be.y>=Math.min(H.y,Me.y)}function ee(H){return H>0?1:H<0?-1:0}function et(H,be){return j(H.prev,H,H.next)<0?j(H,be,H.next)>=0&&j(H,H.prev,be)>=0:j(H,be,H.prev)<0||j(H,H.next,be)<0}function ft(H,be){var Me=new Ce(H.i,H.x,H.y),Oe=new Ce(be.i,be.x,be.y),Se=H.next,Ue=be.prev;return H.next=be,be.prev=H,Me.next=Se,Se.prev=Me,Oe.next=Me,Me.prev=Oe,Ue.next=Oe,Oe.prev=Ue,Oe}function $e(H,be,Me,Oe){var Se=new Ce(H,be,Me);return Oe?(Se.next=Oe.next,Se.prev=Oe,Oe.next.prev=Se,Oe.next=Se):(Se.prev=Se,Se.next=Se),Se}function ae(H){H.next.prev=H.prev,H.prev.next=H.next,H.prevZ&&(H.prevZ.nextZ=H.nextZ),H.nextZ&&(H.nextZ.prevZ=H.prevZ)}function Ce(H,be,Me){this.i=H,this.x=be,this.y=Me,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ie(H,be,Me,Oe){for(var Se=0,Ue=be,qe=Me-Oe;Ue<Me;Ue+=Oe)Se+=(H[qe]-H[Ue])*(H[Ue+1]+H[qe+1]),qe=Ue;return Se}I.exports=b,I.exports.default=b,b.deviation=function(H,be,Me,Oe){var Se=be&&be.length,Ue=Se?be[0]*Me:H.length,qe=Math.abs(Ie(H,0,Ue,Me));if(Se)for(var at=0,rt=be.length;at<rt;at++){var Qt=be[at]*Me,lt=at<rt-1?be[at+1]*Me:H.length;qe-=Math.abs(Ie(H,Qt,lt,Me))}var en=0;for(at=0;at<Oe.length;at+=3){var Bt=Oe[at]*Me,Vt=Oe[at+1]*Me,bt=Oe[at+2]*Me;en+=Math.abs((H[Bt]-H[bt])*(H[Vt+1]-H[Bt+1])-(H[Bt]-H[Vt])*(H[bt+1]-H[Bt+1]))}return qe===0&&en===0?0:Math.abs((en-qe)/qe)},b.flatten=function(H){for(var be=H[0][0].length,Me={vertices:[],holes:[],dimensions:be},Oe=0,Se=0;Se<H.length;Se++){for(var Ue=0;Ue<H[Se].length;Ue++)for(var qe=0;qe<be;qe++)Me.vertices.push(H[Se][Ue][qe]);Se>0&&(Oe+=H[Se-1].length,Me.holes.push(Oe))}return Me}},function(I,O,v){(function(b){var q=v(12),B=v(13),ie=setTimeout;function k(A){return Boolean(A&&A.length!==void 0)}function oe(){}function X(A){if(!(this instanceof X))throw new TypeError("Promises must be constructed via new");if(typeof A!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],S(A,this)}function K(A,L){for(;A._state===3;)A=A._value;A._state!==0?(A._handled=!0,X._immediateFn(function(){var j=A._state===1?L.onFulfilled:L.onRejected;if(j!==null){var D;try{D=j(A._value)}catch(z){return void Ee(L.promise,z)}le(L.promise,D)}else(A._state===1?le:Ee)(L.promise,A._value)})):A._deferreds.push(L)}function le(A,L){try{if(L===A)throw new TypeError("A promise cannot be resolved with itself.");if(L&&(typeof L=="object"||typeof L=="function")){var j=L.then;if(L instanceof X)return A._state=3,A._value=L,void Xe(A);if(typeof j=="function")return void S((D=j,z=L,function(){D.apply(z,arguments)}),A)}A._state=1,A._value=L,Xe(A)}catch(W){Ee(A,W)}var D,z}function Ee(A,L){A._state=2,A._value=L,Xe(A)}function Xe(A){A._state===2&&A._deferreds.length===0&&X._immediateFn(function(){A._handled||X._unhandledRejectionFn(A._value)});for(var L=0,j=A._deferreds.length;L<j;L++)K(A,A._deferreds[L]);A._deferreds=null}function Fe(A,L,j){this.onFulfilled=typeof A=="function"?A:null,this.onRejected=typeof L=="function"?L:null,this.promise=j}function S(A,L){var j=!1;try{A(function(D){j||(j=!0,le(L,D))},function(D){j||(j=!0,Ee(L,D))})}catch(D){if(j)return;j=!0,Ee(L,D)}}X.prototype.catch=function(A){return this.then(null,A)},X.prototype.then=function(A,L){var j=new this.constructor(oe);return K(this,new Fe(A,L,j)),j},X.prototype.finally=q.a,X.all=function(A){return new X(function(L,j){if(!k(A))return j(new TypeError("Promise.all accepts an array"));var D=Array.prototype.slice.call(A);if(D.length===0)return L([]);var z=D.length;function W(et,ft){try{if(ft&&(typeof ft=="object"||typeof ft=="function")){var $e=ft.then;if(typeof $e=="function")return void $e.call(ft,function(ae){W(et,ae)},j)}D[et]=ft,--z==0&&L(D)}catch(ae){j(ae)}}for(var ee=0;ee<D.length;ee++)W(ee,D[ee])})},X.allSettled=B.a,X.resolve=function(A){return A&&typeof A=="object"&&A.constructor===X?A:new X(function(L){L(A)})},X.reject=function(A){return new X(function(L,j){j(A)})},X.race=function(A){return new X(function(L,j){if(!k(A))return j(new TypeError("Promise.race accepts an array"));for(var D=0,z=A.length;D<z;D++)X.resolve(A[D]).then(L,j)})},X._immediateFn=typeof b=="function"&&function(A){b(A)}||function(A){ie(A,0)},X._unhandledRejectionFn=function(A){typeof console!="undefined"&&console&&console.warn("Possible Unhandled Promise Rejection:",A)},O.a=X}).call(this,v(18).setImmediate)},function(I,O,v){O.a=function(b){var q=this.constructor;return this.then(function(B){return q.resolve(b()).then(function(){return B})},function(B){return q.resolve(b()).then(function(){return q.reject(B)})})}},function(I,O,v){O.a=function(b){return new this(function(q,B){if(!b||b.length===void 0)return B(new TypeError(typeof b+" "+b+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var ie=Array.prototype.slice.call(b);if(ie.length===0)return q([]);var k=ie.length;function oe(K,le){if(le&&(typeof le=="object"||typeof le=="function")){var Ee=le.then;if(typeof Ee=="function")return void Ee.call(le,function(Xe){oe(K,Xe)},function(Xe){ie[K]={status:"rejected",reason:Xe},--k==0&&q(ie)})}ie[K]={status:"fulfilled",value:le},--k==0&&q(ie)}for(var X=0;X<ie.length;X++)oe(X,ie[X])})}},function(I,O,v){/*
27
+ }`;var Je=Xl(function(){return Vn(ce,yt+"return "+tt).apply(void 0,_e)});if(Je.source=tt,vd(Je))throw Je;return Je},T.times=function(h,p){if((h=qt(h))<1||h>9007199254740991)return[];var x=4294967295,E=ii(h,4294967295);h-=4294967295;for(var P=Vu(E,p=Pt(p));++x<h;)p(x);return P},T.toFinite=Ao,T.toInteger=qt,T.toLength=Wf,T.toLower=function(h){return on(h).toLowerCase()},T.toNumber=hr,T.toSafeInteger=function(h){return h?wo(qt(h),-9007199254740991,9007199254740991):h===0?h:0},T.toString=on,T.toUpper=function(h){return on(h).toUpperCase()},T.trim=function(h,p,x){if((h=on(h))&&(x||p===void 0))return Dc(h);if(!h||!(p=Qn(p)))return h;var E=wi(h),P=wi(p);return st(E,Nc(E,P),Fc(E,P)+1).join("")},T.trimEnd=function(h,p,x){if((h=on(h))&&(x||p===void 0))return h.slice(0,Yo(h)+1);if(!h||!(p=Qn(p)))return h;var E=wi(h);return st(E,0,Fc(E,wi(p))+1).join("")},T.trimStart=function(h,p,x){if((h=on(h))&&(x||p===void 0))return h.replace(li,"");if(!h||!(p=Qn(p)))return h;var E=wi(h);return st(E,Nc(E,wi(p))).join("")},T.truncate=function(h,p){var x=30,E="...";if(Bn(p)){var P="separator"in p?p.separator:P;x="length"in p?qt(p.length):x,E="omission"in p?Qn(p.omission):E}var j=(h=on(h)).length;if(Is(h)){var re=wi(h);j=re.length}if(x>=j)return h;var ce=x-vo(E);if(ce<1)return E;var _e=re?st(re,0,ce).join(""):h.slice(0,ce);if(P===void 0)return _e+E;if(re&&(ce+=_e.length-ce),yd(P)){if(h.slice(ce).search(P)){var He,ze=_e;for(P.global||(P=xl(P.source,on(co.exec(P))+"g")),P.lastIndex=0;He=P.exec(ze);)var tt=He.index;_e=_e.slice(0,tt===void 0?ce:tt)}}else if(h.indexOf(Qn(P),ce)!=ce){var vt=_e.lastIndexOf(P);vt>-1&&(_e=_e.slice(0,vt))}return _e+E},T.unescape=function(h){return(h=on(h))&&lt.test(h)?h.replace(rt,yl):h},T.uniqueId=function(h){var p=++Dg;return on(h)+p},T.upperCase=Zf,T.upperFirst=Wl,T.each=If,T.eachRight=Lf,T.first=dd,Rh(T,(Dh={},Qr(T,function(h,p){un.call(T.prototype,p)||(Dh[p]=h)}),Dh),{chain:!1}),T.VERSION="4.17.21",Wi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(h){T[h].placeholder=T}),Wi(["drop","take"],function(h,p){Ht.prototype[h]=function(x){x=x===void 0?1:Sn(qt(x),0);var E=this.__filtered__&&!p?new Ht(this):this.clone();return E.__filtered__?E.__takeCount__=ii(x,E.__takeCount__):E.__views__.push({size:ii(x,4294967295),type:h+(E.__dir__<0?"Right":"")}),E},Ht.prototype[h+"Right"]=function(x){return this.reverse()[h](x).reverse()}}),Wi(["filter","map","takeWhile"],function(h,p){var x=p+1,E=x==1||x==3;Ht.prototype[h]=function(P){var j=this.clone();return j.__iteratees__.push({iteratee:Pt(P,3),type:x}),j.__filtered__=j.__filtered__||E,j}}),Wi(["head","last"],function(h,p){var x="take"+(p?"Right":"");Ht.prototype[h]=function(){return this[x](1).value()[0]}}),Wi(["initial","tail"],function(h,p){var x="drop"+(p?"":"Right");Ht.prototype[h]=function(){return this.__filtered__?new Ht(this):this[x](1)}}),Ht.prototype.compact=function(){return this.filter(zi)},Ht.prototype.find=function(h){return this.filter(h).head()},Ht.prototype.findLast=function(h){return this.reverse().find(h)},Ht.prototype.invokeMap=Yt(function(h,p){return typeof h=="function"?new Ht(this):this.map(function(x){return Ea(x,h,p)})}),Ht.prototype.reject=function(h){return this.filter(kl(Pt(h)))},Ht.prototype.slice=function(h,p){h=qt(h);var x=this;return x.__filtered__&&(h>0||p<0)?new Ht(x):(h<0?x=x.takeRight(-h):h&&(x=x.drop(h)),p!==void 0&&(x=(p=qt(p))<0?x.dropRight(-p):x.take(p-h)),x)},Ht.prototype.takeRightWhile=function(h){return this.reverse().takeWhile(h).reverse()},Ht.prototype.toArray=function(){return this.take(4294967295)},Qr(Ht.prototype,function(h,p){var x=/^(?:filter|find|map|reject)|While$/.test(p),E=/^(?:head|last)$/.test(p),P=T[E?"take"+(p=="last"?"Right":""):p],j=E||/^find/.test(p);P&&(T.prototype[p]=function(){var re=this.__wrapped__,ce=E?[1]:arguments,_e=re instanceof Ht,He=ce[0],ze=_e||Ut(re),tt=function(Et){var mt=P.apply(T,mo([Et],ce));return E&&vt?mt[0]:mt};ze&&x&&typeof He=="function"&&He.length!=1&&(_e=ze=!1);var vt=this.__chain__,yt=!!this.__actions__.length,Ct=j&&!vt,Je=_e&&!yt;if(!j&&ze){re=Je?re:new Ht(this);var nt=h.apply(re,ce);return nt.__actions__.push({func:_h,args:[tt],thisArg:void 0}),new In(nt,vt)}return Ct&&Je?h.apply(this,ce):(nt=this.thru(tt),Ct?E?nt.value()[0]:nt.value():nt)})}),Wi(["pop","push","shift","sort","splice","unshift"],function(h){var p=bl[h],x=/^(?:push|sort|unshift)$/.test(h)?"tap":"thru",E=/^(?:pop|shift)$/.test(h);T.prototype[h]=function(){var P=arguments;if(E&&!this.__chain__){var j=this.value();return p.apply(Ut(j)?j:[],P)}return this[x](function(re){return p.apply(Ut(re)?re:[],P)})}}),Qr(Ht.prototype,function(h,p){var x=T[p];if(x){var E=x.name+"";un.call(gr,E)||(gr[E]=[]),gr[E].push({name:p,func:x})}}),gr[Ia(void 0,2).name]=[{name:"wrapper",func:void 0}],Ht.prototype.clone=function(){var h=new Ht(this.__wrapped__);return h.__actions__=hi(this.__actions__),h.__dir__=this.__dir__,h.__filtered__=this.__filtered__,h.__iteratees__=hi(this.__iteratees__),h.__takeCount__=this.__takeCount__,h.__views__=hi(this.__views__),h},Ht.prototype.reverse=function(){if(this.__filtered__){var h=new Ht(this);h.__dir__=-1,h.__filtered__=!0}else(h=this.clone()).__dir__*=-1;return h},Ht.prototype.value=function(){var h=this.__wrapped__.value(),p=this.__dir__,x=Ut(h),E=p<0,P=x?h.length:0,j=function(jt,Tt,Ot){for(var Xn=-1,Mi=Ot.length;++Xn<Mi;){var Yn=Ot[Xn],kn=Yn.size;switch(Yn.type){case"drop":jt+=kn;break;case"dropRight":Tt-=kn;break;case"take":Tt=ii(Tt,jt+kn);break;case"takeRight":jt=Sn(jt,Tt-kn)}}return{start:jt,end:Tt}}(0,P,this.__views__),re=j.start,ce=j.end,_e=ce-re,He=E?ce:re-1,ze=this.__iteratees__,tt=ze.length,vt=0,yt=ii(_e,this.__takeCount__);if(!x||!E&&P==_e&&yt==_e)return Kc(h,this.__actions__);var Ct=[];e:for(;_e--&&vt<yt;){for(var Je=-1,nt=h[He+=p];++Je<tt;){var Et=ze[Je],mt=Et.iteratee,St=Et.type,It=mt(nt);if(St==2)nt=It;else if(!It){if(St==1)continue e;break e}}Ct[vt++]=nt}return Ct},T.prototype.at=iv,T.prototype.chain=function(){return Rf(this)},T.prototype.commit=function(){return new In(this.value(),this.__chain__)},T.prototype.next=function(){this.__values__===void 0&&(this.__values__=jf(this.value()));var h=this.__index__>=this.__values__.length;return{done:h,value:h?void 0:this.__values__[this.__index__++]}},T.prototype.plant=function(h){for(var p,x=this;x instanceof Al;){var E=Ef(x);E.__index__=0,E.__values__=void 0,p?P.__wrapped__=E:p=E;var P=E;x=x.__wrapped__}return P.__wrapped__=h,p},T.prototype.reverse=function(){var h=this.__wrapped__;if(h instanceof Ht){var p=h;return this.__actions__.length&&(p=new Ht(this)),(p=p.reverse()).__actions__.push({func:_h,args:[pd],thisArg:void 0}),new In(p,this.__chain__)}return this.thru(pd)},T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=function(){return Kc(this.__wrapped__,this.__actions__)},T.prototype.first=T.prototype.head,Zr&&(T.prototype[Zr]=function(){return this}),T}();Nn._=Ls,(B=function(){return Ls}.call(L,v,L,q))===void 0||(q.exports=B)}).call(this)}).call(this,v(4),v(8)(I))},function(I,L,v){Object.defineProperty(L,"__esModule",{value:!0});var b=function(){function oe(X,K){for(var le=0;le<K.length;le++){var Ee=K[le];Ee.enumerable=Ee.enumerable||!1,Ee.configurable=!0,"value"in Ee&&(Ee.writable=!0),Object.defineProperty(X,Ee.key,Ee)}}return function(X,K,le){return K&&oe(X.prototype,K),le&&oe(X,le),X}}();function q(oe,X){if(!(oe instanceof X))throw new TypeError("Cannot call a class as a function")}var B=function(){function oe(X,K,le){K===void 0&&(K=!1),q(this,oe),this._fn=X,this._once=K,this._thisArg=le,this._next=this._prev=this._owner=null}return b(oe,[{key:"detach",value:function(){return this._owner!==null&&(this._owner.detach(this),!0)}}]),oe}();function ie(oe,X){return oe._head?(oe._tail._next=X,X._prev=oe._tail,oe._tail=X):(oe._head=X,oe._tail=X),X._owner=oe,X}var k=function(){function oe(){q(this,oe),this._head=this._tail=void 0}return b(oe,[{key:"handlers",value:function(){var X=!(arguments.length<=0||arguments[0]===void 0)&&arguments[0],K=this._head;if(X)return!!K;for(var le=[];K;)le.push(K),K=K._next;return le}},{key:"has",value:function(X){if(!(X instanceof B))throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");return X._owner===this}},{key:"dispatch",value:function(){var X=this._head;if(!X)return!1;for(;X;)X._once&&this.detach(X),X._fn.apply(X._thisArg,arguments),X=X._next;return!0}},{key:"add",value:function(X){var K=arguments.length<=1||arguments[1]===void 0?null:arguments[1];if(typeof X!="function")throw new Error("MiniSignal#add(): First arg must be a Function.");return ie(this,new B(X,!1,K))}},{key:"once",value:function(X){var K=arguments.length<=1||arguments[1]===void 0?null:arguments[1];if(typeof X!="function")throw new Error("MiniSignal#once(): First arg must be a Function.");return ie(this,new B(X,!0,K))}},{key:"detach",value:function(X){if(!(X instanceof B))throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object.");return X._owner!==this||(X._prev&&(X._prev._next=X._next),X._next&&(X._next._prev=X._prev),X===this._head?(this._head=X._next,X._next===null&&(this._tail=null)):X===this._tail&&(this._tail=X._prev,this._tail._next=null),X._owner=null),this}},{key:"detachAll",value:function(){var X=this._head;if(!X)return this;for(this._head=this._tail=null;X;)X._owner=null,X=X._next;return this}}]),oe}();k.MiniSignalBinding=B,L.default=k,I.exports=L.default},function(I,L,v){var b;(function(q){function B(D,z){var W=(65535&D)+(65535&z);return(D>>16)+(z>>16)+(W>>16)<<16|65535&W}function ie(D,z,W,ee,et,ft){return B(($e=B(B(z,D),B(ee,ft)))<<(ae=et)|$e>>>32-ae,W);var $e,ae}function k(D,z,W,ee,et,ft,$e){return ie(z&W|~z&ee,D,z,et,ft,$e)}function oe(D,z,W,ee,et,ft,$e){return ie(z&ee|W&~ee,D,z,et,ft,$e)}function X(D,z,W,ee,et,ft,$e){return ie(z^W^ee,D,z,et,ft,$e)}function K(D,z,W,ee,et,ft,$e){return ie(W^(z|~ee),D,z,et,ft,$e)}function le(D,z){var W,ee,et,ft,$e;D[z>>5]|=128<<z%32,D[14+(z+64>>>9<<4)]=z;var ae=1732584193,Ce=-271733879,Ie=-1732584194,H=271733878;for(W=0;W<D.length;W+=16)ee=ae,et=Ce,ft=Ie,$e=H,ae=k(ae,Ce,Ie,H,D[W],7,-680876936),H=k(H,ae,Ce,Ie,D[W+1],12,-389564586),Ie=k(Ie,H,ae,Ce,D[W+2],17,606105819),Ce=k(Ce,Ie,H,ae,D[W+3],22,-1044525330),ae=k(ae,Ce,Ie,H,D[W+4],7,-176418897),H=k(H,ae,Ce,Ie,D[W+5],12,1200080426),Ie=k(Ie,H,ae,Ce,D[W+6],17,-1473231341),Ce=k(Ce,Ie,H,ae,D[W+7],22,-45705983),ae=k(ae,Ce,Ie,H,D[W+8],7,1770035416),H=k(H,ae,Ce,Ie,D[W+9],12,-1958414417),Ie=k(Ie,H,ae,Ce,D[W+10],17,-42063),Ce=k(Ce,Ie,H,ae,D[W+11],22,-1990404162),ae=k(ae,Ce,Ie,H,D[W+12],7,1804603682),H=k(H,ae,Ce,Ie,D[W+13],12,-40341101),Ie=k(Ie,H,ae,Ce,D[W+14],17,-1502002290),ae=oe(ae,Ce=k(Ce,Ie,H,ae,D[W+15],22,1236535329),Ie,H,D[W+1],5,-165796510),H=oe(H,ae,Ce,Ie,D[W+6],9,-1069501632),Ie=oe(Ie,H,ae,Ce,D[W+11],14,643717713),Ce=oe(Ce,Ie,H,ae,D[W],20,-373897302),ae=oe(ae,Ce,Ie,H,D[W+5],5,-701558691),H=oe(H,ae,Ce,Ie,D[W+10],9,38016083),Ie=oe(Ie,H,ae,Ce,D[W+15],14,-660478335),Ce=oe(Ce,Ie,H,ae,D[W+4],20,-405537848),ae=oe(ae,Ce,Ie,H,D[W+9],5,568446438),H=oe(H,ae,Ce,Ie,D[W+14],9,-1019803690),Ie=oe(Ie,H,ae,Ce,D[W+3],14,-187363961),Ce=oe(Ce,Ie,H,ae,D[W+8],20,1163531501),ae=oe(ae,Ce,Ie,H,D[W+13],5,-1444681467),H=oe(H,ae,Ce,Ie,D[W+2],9,-51403784),Ie=oe(Ie,H,ae,Ce,D[W+7],14,1735328473),ae=X(ae,Ce=oe(Ce,Ie,H,ae,D[W+12],20,-1926607734),Ie,H,D[W+5],4,-378558),H=X(H,ae,Ce,Ie,D[W+8],11,-2022574463),Ie=X(Ie,H,ae,Ce,D[W+11],16,1839030562),Ce=X(Ce,Ie,H,ae,D[W+14],23,-35309556),ae=X(ae,Ce,Ie,H,D[W+1],4,-1530992060),H=X(H,ae,Ce,Ie,D[W+4],11,1272893353),Ie=X(Ie,H,ae,Ce,D[W+7],16,-155497632),Ce=X(Ce,Ie,H,ae,D[W+10],23,-1094730640),ae=X(ae,Ce,Ie,H,D[W+13],4,681279174),H=X(H,ae,Ce,Ie,D[W],11,-358537222),Ie=X(Ie,H,ae,Ce,D[W+3],16,-722521979),Ce=X(Ce,Ie,H,ae,D[W+6],23,76029189),ae=X(ae,Ce,Ie,H,D[W+9],4,-640364487),H=X(H,ae,Ce,Ie,D[W+12],11,-421815835),Ie=X(Ie,H,ae,Ce,D[W+15],16,530742520),ae=K(ae,Ce=X(Ce,Ie,H,ae,D[W+2],23,-995338651),Ie,H,D[W],6,-198630844),H=K(H,ae,Ce,Ie,D[W+7],10,1126891415),Ie=K(Ie,H,ae,Ce,D[W+14],15,-1416354905),Ce=K(Ce,Ie,H,ae,D[W+5],21,-57434055),ae=K(ae,Ce,Ie,H,D[W+12],6,1700485571),H=K(H,ae,Ce,Ie,D[W+3],10,-1894986606),Ie=K(Ie,H,ae,Ce,D[W+10],15,-1051523),Ce=K(Ce,Ie,H,ae,D[W+1],21,-2054922799),ae=K(ae,Ce,Ie,H,D[W+8],6,1873313359),H=K(H,ae,Ce,Ie,D[W+15],10,-30611744),Ie=K(Ie,H,ae,Ce,D[W+6],15,-1560198380),Ce=K(Ce,Ie,H,ae,D[W+13],21,1309151649),ae=K(ae,Ce,Ie,H,D[W+4],6,-145523070),H=K(H,ae,Ce,Ie,D[W+11],10,-1120210379),Ie=K(Ie,H,ae,Ce,D[W+2],15,718787259),Ce=K(Ce,Ie,H,ae,D[W+9],21,-343485551),ae=B(ae,ee),Ce=B(Ce,et),Ie=B(Ie,ft),H=B(H,$e);return[ae,Ce,Ie,H]}function Ee(D){var z,W="",ee=32*D.length;for(z=0;z<ee;z+=8)W+=String.fromCharCode(D[z>>5]>>>z%32&255);return W}function Xe(D){var z,W=[];for(W[(D.length>>2)-1]=void 0,z=0;z<W.length;z+=1)W[z]=0;var ee=8*D.length;for(z=0;z<ee;z+=8)W[z>>5]|=(255&D.charCodeAt(z/8))<<z%32;return W}function Fe(D){var z,W,ee="";for(W=0;W<D.length;W+=1)z=D.charCodeAt(W),ee+="0123456789abcdef".charAt(z>>>4&15)+"0123456789abcdef".charAt(15&z);return ee}function S(D){return unescape(encodeURIComponent(D))}function A(D){return function(z){return Ee(le(Xe(z),8*z.length))}(S(D))}function O(D,z){return function(W,ee){var et,ft,$e=Xe(W),ae=[],Ce=[];for(ae[15]=Ce[15]=void 0,$e.length>16&&($e=le($e,8*W.length)),et=0;et<16;et+=1)ae[et]=909522486^$e[et],Ce[et]=1549556828^$e[et];return ft=le(ae.concat(Xe(ee)),512+8*ee.length),Ee(le(Ce.concat(ft),640))}(S(D),S(z))}function V(D,z,W){return z?W?O(z,D):Fe(O(z,D)):W?A(D):Fe(A(D))}(b=function(){return V}.call(L,v,L,I))===void 0||(I.exports=b)})()},function(I,L){var v;v=function(){return this}();try{v=v||new Function("return this")()}catch{typeof window=="object"&&(v=window)}I.exports=v},function(I,L,v){var b=v(21),q=v(22);function B(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}L.parse=D,L.resolve=function(z,W){return D(z,!1,!0).resolve(W)},L.resolveObject=function(z,W){return z?D(z,!1,!0).resolveObject(W):W},L.format=function(z){return q.isString(z)&&(z=D(z)),z instanceof B?z.format():B.prototype.format.call(z)},L.Url=B;var ie=/^([a-z0-9.+-]+:)/i,k=/:[0-9]*$/,oe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,X=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
28
+ `," "]),K=["'"].concat(X),le=["%","/","?",";","#"].concat(K),Ee=["/","?","#"],Xe=/^[+a-z0-9A-Z_-]{0,63}$/,Fe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,S={javascript:!0,"javascript:":!0},A={javascript:!0,"javascript:":!0},O={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},V=v(23);function D(z,W,ee){if(z&&q.isObject(z)&&z instanceof B)return z;var et=new B;return et.parse(z,W,ee),et}B.prototype.parse=function(z,W,ee){if(!q.isString(z))throw new TypeError("Parameter 'url' must be a string, not "+typeof z);var et=z.indexOf("?"),ft=et!==-1&&et<z.indexOf("#")?"?":"#",$e=z.split(ft);$e[0]=$e[0].replace(/\\/g,"/");var ae=z=$e.join(ft);if(ae=ae.trim(),!ee&&z.split("#").length===1){var Ce=oe.exec(ae);if(Ce)return this.path=ae,this.href=ae,this.pathname=Ce[1],Ce[2]?(this.search=Ce[2],this.query=W?V.parse(this.search.substr(1)):this.search.substr(1)):W&&(this.search="",this.query={}),this}var Ie=ie.exec(ae);if(Ie){var H=(Ie=Ie[0]).toLowerCase();this.protocol=H,ae=ae.substr(Ie.length)}if(ee||Ie||ae.match(/^\/\/[^@\/]+@[^@\/]+/)){var be=ae.substr(0,2)==="//";!be||Ie&&A[Ie]||(ae=ae.substr(2),this.slashes=!0)}if(!A[Ie]&&(be||Ie&&!O[Ie])){for(var Me,Oe,Se=-1,Ue=0;Ue<Ee.length;Ue++)(qe=ae.indexOf(Ee[Ue]))!==-1&&(Se===-1||qe<Se)&&(Se=qe);for((Oe=Se===-1?ae.lastIndexOf("@"):ae.lastIndexOf("@",Se))!==-1&&(Me=ae.slice(0,Oe),ae=ae.slice(Oe+1),this.auth=decodeURIComponent(Me)),Se=-1,Ue=0;Ue<le.length;Ue++){var qe;(qe=ae.indexOf(le[Ue]))!==-1&&(Se===-1||qe<Se)&&(Se=qe)}Se===-1&&(Se=ae.length),this.host=ae.slice(0,Se),ae=ae.slice(Se),this.parseHost(),this.hostname=this.hostname||"";var at=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!at)for(var rt=this.hostname.split(/\./),Qt=(Ue=0,rt.length);Ue<Qt;Ue++){var lt=rt[Ue];if(lt&&!lt.match(Xe)){for(var en="",Bt=0,Vt=lt.length;Bt<Vt;Bt++)lt.charCodeAt(Bt)>127?en+="x":en+=lt[Bt];if(!en.match(Xe)){var bt=rt.slice(0,Ue),Dn=rt.slice(Ue+1),wn=lt.match(Fe);wn&&(bt.push(wn[1]),Dn.unshift(wn[2])),Dn.length&&(ae="/"+Dn.join(".")+ae),this.hostname=bt.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),at||(this.hostname=b.toASCII(this.hostname));var gn=this.port?":"+this.port:"",Zn=this.hostname||"";this.host=Zn+gn,this.href+=this.host,at&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),ae[0]!=="/"&&(ae="/"+ae))}if(!S[H])for(Ue=0,Qt=K.length;Ue<Qt;Ue++){var yn=K[Ue];if(ae.indexOf(yn)!==-1){var li=encodeURIComponent(yn);li===yn&&(li=escape(yn)),ae=ae.split(yn).join(li)}}var Bi=ae.indexOf("#");Bi!==-1&&(this.hash=ae.substr(Bi),ae=ae.slice(0,Bi));var Ci=ae.indexOf("?");if(Ci!==-1?(this.search=ae.substr(Ci),this.query=ae.substr(Ci+1),W&&(this.query=V.parse(this.query)),ae=ae.slice(0,Ci)):W&&(this.search="",this.query={}),ae&&(this.pathname=ae),O[H]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){gn=this.pathname||"";var ji=this.search||"";this.path=gn+ji}return this.href=this.format(),this},B.prototype.format=function(){var z=this.auth||"";z&&(z=(z=encodeURIComponent(z)).replace(/%3A/i,":"),z+="@");var W=this.protocol||"",ee=this.pathname||"",et=this.hash||"",ft=!1,$e="";this.host?ft=z+this.host:this.hostname&&(ft=z+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(ft+=":"+this.port)),this.query&&q.isObject(this.query)&&Object.keys(this.query).length&&($e=V.stringify(this.query));var ae=this.search||$e&&"?"+$e||"";return W&&W.substr(-1)!==":"&&(W+=":"),this.slashes||(!W||O[W])&&ft!==!1?(ft="//"+(ft||""),ee&&ee.charAt(0)!=="/"&&(ee="/"+ee)):ft||(ft=""),et&&et.charAt(0)!=="#"&&(et="#"+et),ae&&ae.charAt(0)!=="?"&&(ae="?"+ae),W+ft+(ee=ee.replace(/[?#]/g,function(Ce){return encodeURIComponent(Ce)}))+(ae=ae.replace("#","%23"))+et},B.prototype.resolve=function(z){return this.resolveObject(D(z,!1,!0)).format()},B.prototype.resolveObject=function(z){if(q.isString(z)){var W=new B;W.parse(z,!1,!0),z=W}for(var ee=new B,et=Object.keys(this),ft=0;ft<et.length;ft++){var $e=et[ft];ee[$e]=this[$e]}if(ee.hash=z.hash,z.href==="")return ee.href=ee.format(),ee;if(z.slashes&&!z.protocol){for(var ae=Object.keys(z),Ce=0;Ce<ae.length;Ce++){var Ie=ae[Ce];Ie!=="protocol"&&(ee[Ie]=z[Ie])}return O[ee.protocol]&&ee.hostname&&!ee.pathname&&(ee.path=ee.pathname="/"),ee.href=ee.format(),ee}if(z.protocol&&z.protocol!==ee.protocol){if(!O[z.protocol]){for(var H=Object.keys(z),be=0;be<H.length;be++){var Me=H[be];ee[Me]=z[Me]}return ee.href=ee.format(),ee}if(ee.protocol=z.protocol,z.host||A[z.protocol])ee.pathname=z.pathname;else{for(var Oe=(z.pathname||"").split("/");Oe.length&&!(z.host=Oe.shift()););z.host||(z.host=""),z.hostname||(z.hostname=""),Oe[0]!==""&&Oe.unshift(""),Oe.length<2&&Oe.unshift(""),ee.pathname=Oe.join("/")}if(ee.search=z.search,ee.query=z.query,ee.host=z.host||"",ee.auth=z.auth,ee.hostname=z.hostname||z.host,ee.port=z.port,ee.pathname||ee.search){var Se=ee.pathname||"",Ue=ee.search||"";ee.path=Se+Ue}return ee.slashes=ee.slashes||z.slashes,ee.href=ee.format(),ee}var qe=ee.pathname&&ee.pathname.charAt(0)==="/",at=z.host||z.pathname&&z.pathname.charAt(0)==="/",rt=at||qe||ee.host&&z.pathname,Qt=rt,lt=ee.pathname&&ee.pathname.split("/")||[],en=(Oe=z.pathname&&z.pathname.split("/")||[],ee.protocol&&!O[ee.protocol]);if(en&&(ee.hostname="",ee.port=null,ee.host&&(lt[0]===""?lt[0]=ee.host:lt.unshift(ee.host)),ee.host="",z.protocol&&(z.hostname=null,z.port=null,z.host&&(Oe[0]===""?Oe[0]=z.host:Oe.unshift(z.host)),z.host=null),rt=rt&&(Oe[0]===""||lt[0]==="")),at)ee.host=z.host||z.host===""?z.host:ee.host,ee.hostname=z.hostname||z.hostname===""?z.hostname:ee.hostname,ee.search=z.search,ee.query=z.query,lt=Oe;else if(Oe.length)lt||(lt=[]),lt.pop(),lt=lt.concat(Oe),ee.search=z.search,ee.query=z.query;else if(!q.isNullOrUndefined(z.search))return en&&(ee.hostname=ee.host=lt.shift(),(wn=!!(ee.host&&ee.host.indexOf("@")>0)&&ee.host.split("@"))&&(ee.auth=wn.shift(),ee.host=ee.hostname=wn.shift())),ee.search=z.search,ee.query=z.query,q.isNull(ee.pathname)&&q.isNull(ee.search)||(ee.path=(ee.pathname?ee.pathname:"")+(ee.search?ee.search:"")),ee.href=ee.format(),ee;if(!lt.length)return ee.pathname=null,ee.search?ee.path="/"+ee.search:ee.path=null,ee.href=ee.format(),ee;for(var Bt=lt.slice(-1)[0],Vt=(ee.host||z.host||lt.length>1)&&(Bt==="."||Bt==="..")||Bt==="",bt=0,Dn=lt.length;Dn>=0;Dn--)(Bt=lt[Dn])==="."?lt.splice(Dn,1):Bt===".."?(lt.splice(Dn,1),bt++):bt&&(lt.splice(Dn,1),bt--);if(!rt&&!Qt)for(;bt--;bt)lt.unshift("..");!rt||lt[0]===""||lt[0]&&lt[0].charAt(0)==="/"||lt.unshift(""),Vt&&lt.join("/").substr(-1)!=="/"&&lt.push("");var wn,gn=lt[0]===""||lt[0]&&lt[0].charAt(0)==="/";return en&&(ee.hostname=ee.host=gn?"":lt.length?lt.shift():"",(wn=!!(ee.host&&ee.host.indexOf("@")>0)&&ee.host.split("@"))&&(ee.auth=wn.shift(),ee.host=ee.hostname=wn.shift())),(rt=rt||ee.host&&lt.length)&&!gn&&lt.unshift(""),lt.length?ee.pathname=lt.join("/"):(ee.pathname=null,ee.path=null),q.isNull(ee.pathname)&&q.isNull(ee.search)||(ee.path=(ee.pathname?ee.pathname:"")+(ee.search?ee.search:"")),ee.auth=z.auth||ee.auth,ee.slashes=ee.slashes||z.slashes,ee.href=ee.format(),ee},B.prototype.parseHost=function(){var z=this.host,W=k.exec(z);W&&((W=W[0])!==":"&&(this.port=W.substr(1)),z=z.substr(0,z.length-W.length)),z&&(this.hostname=z)}},function(I,L,v){I.exports=function(b,q){if(b){q=q||{};for(var B={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},ie=B.parser[q.strictMode?"strict":"loose"].exec(b),k={},oe=14;oe--;)k[B.key[oe]]=ie[oe]||"";return k[B.q.name]={},k[B.key[12]].replace(B.q.parser,function(X,K,le){K&&(k[B.q.name][K]=le)}),k}}},function(I,L,v){var b=v(26);I.exports=function(q,B){B=B||{};var ie=new b,k=B.inPlace||!1,oe=q.map(function(K){return k?K:{width:K.width,height:K.height,item:K}});oe=oe.sort(function(K,le){return le.width*le.height-K.width*K.height}),ie.fit(oe);var X={width:oe.reduce(function(K,le){return Math.max(K,le.x+le.width)},0),height:oe.reduce(function(K,le){return Math.max(K,le.y+le.height)},0)};return k||(X.items=oe),X}},function(I,L){I.exports=function(v){return v.webpackPolyfill||(v.deprecate=function(){},v.paths=[],v.children||(v.children=[]),Object.defineProperty(v,"loaded",{enumerable:!0,get:function(){return v.l}}),Object.defineProperty(v,"id",{enumerable:!0,get:function(){return v.i}}),v.webpackPolyfill=1),v}},function(I,L,v){var b=Object.prototype.hasOwnProperty,q="~";function B(){}function ie(K,le,Ee){this.fn=K,this.context=le,this.once=Ee||!1}function k(K,le,Ee,Xe,Fe){if(typeof Ee!="function")throw new TypeError("The listener must be a function");var S=new ie(Ee,Xe||K,Fe),A=q?q+le:le;return K._events[A]?K._events[A].fn?K._events[A]=[K._events[A],S]:K._events[A].push(S):(K._events[A]=S,K._eventsCount++),K}function oe(K,le){--K._eventsCount==0?K._events=new B:delete K._events[le]}function X(){this._events=new B,this._eventsCount=0}Object.create&&(B.prototype=Object.create(null),new B().__proto__||(q=!1)),X.prototype.eventNames=function(){var K,le,Ee=[];if(this._eventsCount===0)return Ee;for(le in K=this._events)b.call(K,le)&&Ee.push(q?le.slice(1):le);return Object.getOwnPropertySymbols?Ee.concat(Object.getOwnPropertySymbols(K)):Ee},X.prototype.listeners=function(K){var le=q?q+K:K,Ee=this._events[le];if(!Ee)return[];if(Ee.fn)return[Ee.fn];for(var Xe=0,Fe=Ee.length,S=new Array(Fe);Xe<Fe;Xe++)S[Xe]=Ee[Xe].fn;return S},X.prototype.listenerCount=function(K){var le=q?q+K:K,Ee=this._events[le];return Ee?Ee.fn?1:Ee.length:0},X.prototype.emit=function(K,le,Ee,Xe,Fe,S){var A=q?q+K:K;if(!this._events[A])return!1;var O,V,D=this._events[A],z=arguments.length;if(D.fn){switch(D.once&&this.removeListener(K,D.fn,void 0,!0),z){case 1:return D.fn.call(D.context),!0;case 2:return D.fn.call(D.context,le),!0;case 3:return D.fn.call(D.context,le,Ee),!0;case 4:return D.fn.call(D.context,le,Ee,Xe),!0;case 5:return D.fn.call(D.context,le,Ee,Xe,Fe),!0;case 6:return D.fn.call(D.context,le,Ee,Xe,Fe,S),!0}for(V=1,O=new Array(z-1);V<z;V++)O[V-1]=arguments[V];D.fn.apply(D.context,O)}else{var W,ee=D.length;for(V=0;V<ee;V++)switch(D[V].once&&this.removeListener(K,D[V].fn,void 0,!0),z){case 1:D[V].fn.call(D[V].context);break;case 2:D[V].fn.call(D[V].context,le);break;case 3:D[V].fn.call(D[V].context,le,Ee);break;case 4:D[V].fn.call(D[V].context,le,Ee,Xe);break;default:if(!O)for(W=1,O=new Array(z-1);W<z;W++)O[W-1]=arguments[W];D[V].fn.apply(D[V].context,O)}}return!0},X.prototype.on=function(K,le,Ee){return k(this,K,le,Ee,!1)},X.prototype.once=function(K,le,Ee){return k(this,K,le,Ee,!0)},X.prototype.removeListener=function(K,le,Ee,Xe){var Fe=q?q+K:K;if(!this._events[Fe])return this;if(!le)return oe(this,Fe),this;var S=this._events[Fe];if(S.fn)S.fn!==le||Xe&&!S.once||Ee&&S.context!==Ee||oe(this,Fe);else{for(var A=0,O=[],V=S.length;A<V;A++)(S[A].fn!==le||Xe&&!S[A].once||Ee&&S[A].context!==Ee)&&O.push(S[A]);O.length?this._events[Fe]=O.length===1?O[0]:O:oe(this,Fe)}return this},X.prototype.removeAllListeners=function(K){var le;return K?(le=q?q+K:K,this._events[le]&&oe(this,le)):(this._events=new B,this._eventsCount=0),this},X.prototype.off=X.prototype.removeListener,X.prototype.addListener=X.prototype.on,X.prefixed=q,X.EventEmitter=X,I.exports=X},function(I,L,v){function b(H,be,Me){Me=Me||2;var Oe,Se,Ue,qe,at,rt,Qt,lt=be&&be.length,en=lt?be[0]*Me:H.length,Bt=q(H,0,en,Me,!0),Vt=[];if(!Bt||Bt.next===Bt.prev)return Vt;if(lt&&(Bt=function(Dn,wn,gn,Zn){var yn,li,Bi,Ci,ji,Lr=[];for(yn=0,li=wn.length;yn<li;yn++)Bi=wn[yn]*Zn,Ci=yn<li-1?wn[yn+1]*Zn:Dn.length,(ji=q(Dn,Bi,Ci,Zn,!1))===ji.next&&(ji.steiner=!0),Lr.push(S(ji));for(Lr.sort(le),yn=0;yn<Lr.length;yn++)gn=B(gn=Ee(Lr[yn],gn),gn.next);return gn}(H,be,Bt,Me)),H.length>80*Me){Oe=Ue=H[0],Se=qe=H[1];for(var bt=Me;bt<en;bt+=Me)(at=H[bt])<Oe&&(Oe=at),(rt=H[bt+1])<Se&&(Se=rt),at>Ue&&(Ue=at),rt>qe&&(qe=rt);Qt=(Qt=Math.max(Ue-Oe,qe-Se))!==0?1/Qt:0}return ie(Bt,Vt,Me,Oe,Se,Qt),Vt}function q(H,be,Me,Oe,Se){var Ue,qe;if(Se===Ie(H,be,Me,Oe)>0)for(Ue=be;Ue<Me;Ue+=Oe)qe=$e(Ue,H[Ue],H[Ue+1],qe);else for(Ue=Me-Oe;Ue>=be;Ue-=Oe)qe=$e(Ue,H[Ue],H[Ue+1],qe);return qe&&D(qe,qe.next)&&(ae(qe),qe=qe.next),qe}function B(H,be){if(!H)return H;be||(be=H);var Me,Oe=H;do if(Me=!1,Oe.steiner||!D(Oe,Oe.next)&&V(Oe.prev,Oe,Oe.next)!==0)Oe=Oe.next;else{if(ae(Oe),(Oe=be=Oe.prev)===Oe.next)break;Me=!0}while(Me||Oe!==be);return be}function ie(H,be,Me,Oe,Se,Ue,qe){if(H){!qe&&Ue&&function(lt,en,Bt,Vt){var bt=lt;do bt.z===null&&(bt.z=Fe(bt.x,bt.y,en,Bt,Vt)),bt.prevZ=bt.prev,bt.nextZ=bt.next,bt=bt.next;while(bt!==lt);bt.prevZ.nextZ=null,bt.prevZ=null,function(Dn){var wn,gn,Zn,yn,li,Bi,Ci,ji,Lr=1;do{for(gn=Dn,Dn=null,li=null,Bi=0;gn;){for(Bi++,Zn=gn,Ci=0,wn=0;wn<Lr&&(Ci++,Zn=Zn.nextZ);wn++);for(ji=Lr;Ci>0||ji>0&&Zn;)Ci!==0&&(ji===0||!Zn||gn.z<=Zn.z)?(yn=gn,gn=gn.nextZ,Ci--):(yn=Zn,Zn=Zn.nextZ,ji--),li?li.nextZ=yn:Dn=yn,yn.prevZ=li,li=yn;gn=Zn}li.nextZ=null,Lr*=2}while(Bi>1)}(bt)}(H,Oe,Se,Ue);for(var at,rt,Qt=H;H.prev!==H.next;)if(at=H.prev,rt=H.next,Ue?oe(H,Oe,Se,Ue):k(H))be.push(at.i/Me),be.push(H.i/Me),be.push(rt.i/Me),ae(H),H=rt.next,Qt=rt.next;else if((H=rt)===Qt){qe?qe===1?ie(H=X(B(H),be,Me),be,Me,Oe,Se,Ue,2):qe===2&&K(H,be,Me,Oe,Se,Ue):ie(B(H),be,Me,Oe,Se,Ue,1);break}}}function k(H){var be=H.prev,Me=H,Oe=H.next;if(V(be,Me,Oe)>=0)return!1;for(var Se=H.next.next;Se!==H.prev;){if(A(be.x,be.y,Me.x,Me.y,Oe.x,Oe.y,Se.x,Se.y)&&V(Se.prev,Se,Se.next)>=0)return!1;Se=Se.next}return!0}function oe(H,be,Me,Oe){var Se=H.prev,Ue=H,qe=H.next;if(V(Se,Ue,qe)>=0)return!1;for(var at=Se.x<Ue.x?Se.x<qe.x?Se.x:qe.x:Ue.x<qe.x?Ue.x:qe.x,rt=Se.y<Ue.y?Se.y<qe.y?Se.y:qe.y:Ue.y<qe.y?Ue.y:qe.y,Qt=Se.x>Ue.x?Se.x>qe.x?Se.x:qe.x:Ue.x>qe.x?Ue.x:qe.x,lt=Se.y>Ue.y?Se.y>qe.y?Se.y:qe.y:Ue.y>qe.y?Ue.y:qe.y,en=Fe(at,rt,be,Me,Oe),Bt=Fe(Qt,lt,be,Me,Oe),Vt=H.prevZ,bt=H.nextZ;Vt&&Vt.z>=en&&bt&&bt.z<=Bt;){if(Vt!==H.prev&&Vt!==H.next&&A(Se.x,Se.y,Ue.x,Ue.y,qe.x,qe.y,Vt.x,Vt.y)&&V(Vt.prev,Vt,Vt.next)>=0||(Vt=Vt.prevZ,bt!==H.prev&&bt!==H.next&&A(Se.x,Se.y,Ue.x,Ue.y,qe.x,qe.y,bt.x,bt.y)&&V(bt.prev,bt,bt.next)>=0))return!1;bt=bt.nextZ}for(;Vt&&Vt.z>=en;){if(Vt!==H.prev&&Vt!==H.next&&A(Se.x,Se.y,Ue.x,Ue.y,qe.x,qe.y,Vt.x,Vt.y)&&V(Vt.prev,Vt,Vt.next)>=0)return!1;Vt=Vt.prevZ}for(;bt&&bt.z<=Bt;){if(bt!==H.prev&&bt!==H.next&&A(Se.x,Se.y,Ue.x,Ue.y,qe.x,qe.y,bt.x,bt.y)&&V(bt.prev,bt,bt.next)>=0)return!1;bt=bt.nextZ}return!0}function X(H,be,Me){var Oe=H;do{var Se=Oe.prev,Ue=Oe.next.next;!D(Se,Ue)&&z(Se,Oe,Oe.next,Ue)&&et(Se,Ue)&&et(Ue,Se)&&(be.push(Se.i/Me),be.push(Oe.i/Me),be.push(Ue.i/Me),ae(Oe),ae(Oe.next),Oe=H=Ue),Oe=Oe.next}while(Oe!==H);return B(Oe)}function K(H,be,Me,Oe,Se,Ue){var qe=H;do{for(var at=qe.next.next;at!==qe.prev;){if(qe.i!==at.i&&O(qe,at)){var rt=ft(qe,at);return qe=B(qe,qe.next),rt=B(rt,rt.next),ie(qe,be,Me,Oe,Se,Ue),void ie(rt,be,Me,Oe,Se,Ue)}at=at.next}qe=qe.next}while(qe!==H)}function le(H,be){return H.x-be.x}function Ee(H,be){var Me=function(Ue,qe){var at,rt=qe,Qt=Ue.x,lt=Ue.y,en=-1/0;do{if(lt<=rt.y&&lt>=rt.next.y&&rt.next.y!==rt.y){var Bt=rt.x+(lt-rt.y)*(rt.next.x-rt.x)/(rt.next.y-rt.y);if(Bt<=Qt&&Bt>en){if(en=Bt,Bt===Qt){if(lt===rt.y)return rt;if(lt===rt.next.y)return rt.next}at=rt.x<rt.next.x?rt:rt.next}}rt=rt.next}while(rt!==qe);if(!at)return null;if(Qt===en)return at;var Vt,bt=at,Dn=at.x,wn=at.y,gn=1/0;rt=at;do Qt>=rt.x&&rt.x>=Dn&&Qt!==rt.x&&A(lt<wn?Qt:en,lt,Dn,wn,lt<wn?en:Qt,lt,rt.x,rt.y)&&(Vt=Math.abs(lt-rt.y)/(Qt-rt.x),et(rt,Ue)&&(Vt<gn||Vt===gn&&(rt.x>at.x||rt.x===at.x&&Xe(at,rt)))&&(at=rt,gn=Vt)),rt=rt.next;while(rt!==bt);return at}(H,be);if(!Me)return be;var Oe=ft(Me,H),Se=B(Me,Me.next);return B(Oe,Oe.next),be===Me?Se:be}function Xe(H,be){return V(H.prev,H,be.prev)<0&&V(be.next,H,H.next)<0}function Fe(H,be,Me,Oe,Se){return(H=1431655765&((H=858993459&((H=252645135&((H=16711935&((H=32767*(H-Me)*Se)|H<<8))|H<<4))|H<<2))|H<<1))|(be=1431655765&((be=858993459&((be=252645135&((be=16711935&((be=32767*(be-Oe)*Se)|be<<8))|be<<4))|be<<2))|be<<1))<<1}function S(H){var be=H,Me=H;do(be.x<Me.x||be.x===Me.x&&be.y<Me.y)&&(Me=be),be=be.next;while(be!==H);return Me}function A(H,be,Me,Oe,Se,Ue,qe,at){return(Se-qe)*(be-at)-(H-qe)*(Ue-at)>=0&&(H-qe)*(Oe-at)-(Me-qe)*(be-at)>=0&&(Me-qe)*(Ue-at)-(Se-qe)*(Oe-at)>=0}function O(H,be){return H.next.i!==be.i&&H.prev.i!==be.i&&!function(Me,Oe){var Se=Me;do{if(Se.i!==Me.i&&Se.next.i!==Me.i&&Se.i!==Oe.i&&Se.next.i!==Oe.i&&z(Se,Se.next,Me,Oe))return!0;Se=Se.next}while(Se!==Me);return!1}(H,be)&&(et(H,be)&&et(be,H)&&function(Me,Oe){var Se=Me,Ue=!1,qe=(Me.x+Oe.x)/2,at=(Me.y+Oe.y)/2;do Se.y>at!=Se.next.y>at&&Se.next.y!==Se.y&&qe<(Se.next.x-Se.x)*(at-Se.y)/(Se.next.y-Se.y)+Se.x&&(Ue=!Ue),Se=Se.next;while(Se!==Me);return Ue}(H,be)&&(V(H.prev,H,be.prev)||V(H,be.prev,be))||D(H,be)&&V(H.prev,H,H.next)>0&&V(be.prev,be,be.next)>0)}function V(H,be,Me){return(be.y-H.y)*(Me.x-be.x)-(be.x-H.x)*(Me.y-be.y)}function D(H,be){return H.x===be.x&&H.y===be.y}function z(H,be,Me,Oe){var Se=ee(V(H,be,Me)),Ue=ee(V(H,be,Oe)),qe=ee(V(Me,Oe,H)),at=ee(V(Me,Oe,be));return Se!==Ue&&qe!==at||!(Se!==0||!W(H,Me,be))||!(Ue!==0||!W(H,Oe,be))||!(qe!==0||!W(Me,H,Oe))||!(at!==0||!W(Me,be,Oe))}function W(H,be,Me){return be.x<=Math.max(H.x,Me.x)&&be.x>=Math.min(H.x,Me.x)&&be.y<=Math.max(H.y,Me.y)&&be.y>=Math.min(H.y,Me.y)}function ee(H){return H>0?1:H<0?-1:0}function et(H,be){return V(H.prev,H,H.next)<0?V(H,be,H.next)>=0&&V(H,H.prev,be)>=0:V(H,be,H.prev)<0||V(H,H.next,be)<0}function ft(H,be){var Me=new Ce(H.i,H.x,H.y),Oe=new Ce(be.i,be.x,be.y),Se=H.next,Ue=be.prev;return H.next=be,be.prev=H,Me.next=Se,Se.prev=Me,Oe.next=Me,Me.prev=Oe,Ue.next=Oe,Oe.prev=Ue,Oe}function $e(H,be,Me,Oe){var Se=new Ce(H,be,Me);return Oe?(Se.next=Oe.next,Se.prev=Oe,Oe.next.prev=Se,Oe.next=Se):(Se.prev=Se,Se.next=Se),Se}function ae(H){H.next.prev=H.prev,H.prev.next=H.next,H.prevZ&&(H.prevZ.nextZ=H.nextZ),H.nextZ&&(H.nextZ.prevZ=H.prevZ)}function Ce(H,be,Me){this.i=H,this.x=be,this.y=Me,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ie(H,be,Me,Oe){for(var Se=0,Ue=be,qe=Me-Oe;Ue<Me;Ue+=Oe)Se+=(H[qe]-H[Ue])*(H[Ue+1]+H[qe+1]),qe=Ue;return Se}I.exports=b,I.exports.default=b,b.deviation=function(H,be,Me,Oe){var Se=be&&be.length,Ue=Se?be[0]*Me:H.length,qe=Math.abs(Ie(H,0,Ue,Me));if(Se)for(var at=0,rt=be.length;at<rt;at++){var Qt=be[at]*Me,lt=at<rt-1?be[at+1]*Me:H.length;qe-=Math.abs(Ie(H,Qt,lt,Me))}var en=0;for(at=0;at<Oe.length;at+=3){var Bt=Oe[at]*Me,Vt=Oe[at+1]*Me,bt=Oe[at+2]*Me;en+=Math.abs((H[Bt]-H[bt])*(H[Vt+1]-H[Bt+1])-(H[Bt]-H[Vt])*(H[bt+1]-H[Bt+1]))}return qe===0&&en===0?0:Math.abs((en-qe)/qe)},b.flatten=function(H){for(var be=H[0][0].length,Me={vertices:[],holes:[],dimensions:be},Oe=0,Se=0;Se<H.length;Se++){for(var Ue=0;Ue<H[Se].length;Ue++)for(var qe=0;qe<be;qe++)Me.vertices.push(H[Se][Ue][qe]);Se>0&&(Oe+=H[Se-1].length,Me.holes.push(Oe))}return Me}},function(I,L,v){(function(b){var q=v(12),B=v(13),ie=setTimeout;function k(A){return Boolean(A&&A.length!==void 0)}function oe(){}function X(A){if(!(this instanceof X))throw new TypeError("Promises must be constructed via new");if(typeof A!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],S(A,this)}function K(A,O){for(;A._state===3;)A=A._value;A._state!==0?(A._handled=!0,X._immediateFn(function(){var V=A._state===1?O.onFulfilled:O.onRejected;if(V!==null){var D;try{D=V(A._value)}catch(z){return void Ee(O.promise,z)}le(O.promise,D)}else(A._state===1?le:Ee)(O.promise,A._value)})):A._deferreds.push(O)}function le(A,O){try{if(O===A)throw new TypeError("A promise cannot be resolved with itself.");if(O&&(typeof O=="object"||typeof O=="function")){var V=O.then;if(O instanceof X)return A._state=3,A._value=O,void Xe(A);if(typeof V=="function")return void S((D=V,z=O,function(){D.apply(z,arguments)}),A)}A._state=1,A._value=O,Xe(A)}catch(W){Ee(A,W)}var D,z}function Ee(A,O){A._state=2,A._value=O,Xe(A)}function Xe(A){A._state===2&&A._deferreds.length===0&&X._immediateFn(function(){A._handled||X._unhandledRejectionFn(A._value)});for(var O=0,V=A._deferreds.length;O<V;O++)K(A,A._deferreds[O]);A._deferreds=null}function Fe(A,O,V){this.onFulfilled=typeof A=="function"?A:null,this.onRejected=typeof O=="function"?O:null,this.promise=V}function S(A,O){var V=!1;try{A(function(D){V||(V=!0,le(O,D))},function(D){V||(V=!0,Ee(O,D))})}catch(D){if(V)return;V=!0,Ee(O,D)}}X.prototype.catch=function(A){return this.then(null,A)},X.prototype.then=function(A,O){var V=new this.constructor(oe);return K(this,new Fe(A,O,V)),V},X.prototype.finally=q.a,X.all=function(A){return new X(function(O,V){if(!k(A))return V(new TypeError("Promise.all accepts an array"));var D=Array.prototype.slice.call(A);if(D.length===0)return O([]);var z=D.length;function W(et,ft){try{if(ft&&(typeof ft=="object"||typeof ft=="function")){var $e=ft.then;if(typeof $e=="function")return void $e.call(ft,function(ae){W(et,ae)},V)}D[et]=ft,--z==0&&O(D)}catch(ae){V(ae)}}for(var ee=0;ee<D.length;ee++)W(ee,D[ee])})},X.allSettled=B.a,X.resolve=function(A){return A&&typeof A=="object"&&A.constructor===X?A:new X(function(O){O(A)})},X.reject=function(A){return new X(function(O,V){V(A)})},X.race=function(A){return new X(function(O,V){if(!k(A))return V(new TypeError("Promise.race accepts an array"));for(var D=0,z=A.length;D<z;D++)X.resolve(A[D]).then(O,V)})},X._immediateFn=typeof b=="function"&&function(A){b(A)}||function(A){ie(A,0)},X._unhandledRejectionFn=function(A){typeof console!="undefined"&&console&&console.warn("Possible Unhandled Promise Rejection:",A)},L.a=X}).call(this,v(18).setImmediate)},function(I,L,v){L.a=function(b){var q=this.constructor;return this.then(function(B){return q.resolve(b()).then(function(){return B})},function(B){return q.resolve(b()).then(function(){return q.reject(B)})})}},function(I,L,v){L.a=function(b){return new this(function(q,B){if(!b||b.length===void 0)return B(new TypeError(typeof b+" "+b+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var ie=Array.prototype.slice.call(b);if(ie.length===0)return q([]);var k=ie.length;function oe(K,le){if(le&&(typeof le=="object"||typeof le=="function")){var Ee=le.then;if(typeof Ee=="function")return void Ee.call(le,function(Xe){oe(K,Xe)},function(Xe){ie[K]={status:"rejected",reason:Xe},--k==0&&q(ie)})}ie[K]={status:"fulfilled",value:le},--k==0&&q(ie)}for(var X=0;X<ie.length;X++)oe(X,ie[X])})}},function(I,L,v){/*
29
29
  object-assign
30
30
  (c) Sindre Sorhus
31
31
  @license MIT
32
- */var b=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;function ie(k){if(k==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(k)}I.exports=function(){try{if(!Object.assign)return!1;var k=new String("abc");if(k[5]="de",Object.getOwnPropertyNames(k)[0]==="5")return!1;for(var oe={},X=0;X<10;X++)oe["_"+String.fromCharCode(X)]=X;if(Object.getOwnPropertyNames(oe).map(function(le){return oe[le]}).join("")!=="0123456789")return!1;var K={};return"abcdefghijklmnopqrst".split("").forEach(function(le){K[le]=le}),Object.keys(Object.assign({},K)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(k,oe){for(var X,K,le=ie(k),Ee=1;Ee<arguments.length;Ee++){for(var Xe in X=Object(arguments[Ee]))q.call(X,Xe)&&(le[Xe]=X[Xe]);if(b){K=b(X);for(var Fe=0;Fe<K.length;Fe++)B.call(X,K[Fe])&&(le[K[Fe]]=X[K[Fe]])}}return le}},function(I,O){I.exports=`precision mediump float;
32
+ */var b=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;function ie(k){if(k==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(k)}I.exports=function(){try{if(!Object.assign)return!1;var k=new String("abc");if(k[5]="de",Object.getOwnPropertyNames(k)[0]==="5")return!1;for(var oe={},X=0;X<10;X++)oe["_"+String.fromCharCode(X)]=X;if(Object.getOwnPropertyNames(oe).map(function(le){return oe[le]}).join("")!=="0123456789")return!1;var K={};return"abcdefghijklmnopqrst".split("").forEach(function(le){K[le]=le}),Object.keys(Object.assign({},K)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(k,oe){for(var X,K,le=ie(k),Ee=1;Ee<arguments.length;Ee++){for(var Xe in X=Object(arguments[Ee]))q.call(X,Xe)&&(le[Xe]=X[Xe]);if(b){K=b(X);for(var Fe=0;Fe<K.length;Fe++)B.call(X,K[Fe])&&(le[K[Fe]]=X[K[Fe]])}}return le}},function(I,L){I.exports=`precision mediump float;
33
33
  attribute vec2 aVertexPosition;
34
34
  uniform mat3 projectionMatrix;
35
35
  varying vec2 vTextureCoord;
@@ -46,7 +46,7 @@ void main() {
46
46
  gl_Position = filterVertexPosition();
47
47
  vTextureCoord = filterTextureCoord();
48
48
  }
49
- `},function(I,O){I.exports=`precision mediump float;
49
+ `},function(I,L){I.exports=`precision mediump float;
50
50
  #define KERNEL 7
51
51
  varying vec2 vTextureCoord;
52
52
  uniform vec4 uShapeFilterArea;
@@ -70,7 +70,7 @@ void main() {
70
70
  gl_FragColor = outputColor;
71
71
  }
72
72
  }
73
- `},function(I,O,v){(function(b){var q;/*!
73
+ `},function(I,L,v){(function(b){var q;/*!
74
74
  * howler.js v2.2.3
75
75
  * howlerjs.com
76
76
  *
@@ -78,11 +78,11 @@ void main() {
78
78
  * goldfirestudios.com
79
79
  *
80
80
  * MIT License
81
- */(function(){var B=function(){this.init()};B.prototype={init:function(){var S=this||ie;return S._counter=1e3,S._html5AudioPool=[],S.html5PoolSize=10,S._codecs={},S._howls=[],S._muted=!1,S._volume=1,S._canPlayEvent="canplaythrough",S._navigator=typeof window!="undefined"&&window.navigator?window.navigator:null,S.masterGain=null,S.noAudio=!1,S.usingWebAudio=!0,S.autoSuspend=!0,S.ctx=null,S.autoUnlock=!0,S._setup(),S},volume:function(S){var A=this||ie;if(S=parseFloat(S),A.ctx||Fe(),S!==void 0&&S>=0&&S<=1){if(A._volume=S,A._muted)return A;A.usingWebAudio&&A.masterGain.gain.setValueAtTime(S,ie.ctx.currentTime);for(var L=0;L<A._howls.length;L++)if(!A._howls[L]._webAudio)for(var j=A._howls[L]._getSoundIds(),D=0;D<j.length;D++){var z=A._howls[L]._soundById(j[D]);z&&z._node&&(z._node.volume=z._volume*S)}return A}return A._volume},mute:function(S){var A=this||ie;A.ctx||Fe(),A._muted=S,A.usingWebAudio&&A.masterGain.gain.setValueAtTime(S?0:A._volume,ie.ctx.currentTime);for(var L=0;L<A._howls.length;L++)if(!A._howls[L]._webAudio)for(var j=A._howls[L]._getSoundIds(),D=0;D<j.length;D++){var z=A._howls[L]._soundById(j[D]);z&&z._node&&(z._node.muted=!!S||z._muted)}return A},stop:function(){for(var S=this||ie,A=0;A<S._howls.length;A++)S._howls[A].stop();return S},unload:function(){for(var S=this||ie,A=S._howls.length-1;A>=0;A--)S._howls[A].unload();return S.usingWebAudio&&S.ctx&&S.ctx.close!==void 0&&(S.ctx.close(),S.ctx=null,Fe()),S},codecs:function(S){return(this||ie)._codecs[S.replace(/^x-/,"")]},_setup:function(){var S=this||ie;if(S.state=S.ctx&&S.ctx.state||"suspended",S._autoSuspend(),!S.usingWebAudio)if(typeof Audio!="undefined")try{new Audio().oncanplaythrough===void 0&&(S._canPlayEvent="canplay")}catch{S.noAudio=!0}else S.noAudio=!0;try{new Audio().muted&&(S.noAudio=!0)}catch{}return S.noAudio||S._setupCodecs(),S},_setupCodecs:function(){var S=this||ie,A=null;try{A=typeof Audio!="undefined"?new Audio:null}catch{return S}if(!A||typeof A.canPlayType!="function")return S;var L=A.canPlayType("audio/mpeg;").replace(/^no$/,""),j=S._navigator?S._navigator.userAgent:"",D=j.match(/OPR\/([0-6].)/g),z=D&&parseInt(D[0].split("/")[1],10)<33,W=j.indexOf("Safari")!==-1&&j.indexOf("Chrome")===-1,ee=j.match(/Version\/(.*?) /),et=W&&ee&&parseInt(ee[1],10)<15;return S._codecs={mp3:!(z||!L&&!A.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!L,opus:!!A.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!A.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!A.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(A.canPlayType('audio/wav; codecs="1"')||A.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!A.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!A.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(A.canPlayType("audio/x-m4a;")||A.canPlayType("audio/m4a;")||A.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(A.canPlayType("audio/x-m4b;")||A.canPlayType("audio/m4b;")||A.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(A.canPlayType("audio/x-mp4;")||A.canPlayType("audio/mp4;")||A.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(et||!A.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(et||!A.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!A.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(A.canPlayType("audio/x-flac;")||A.canPlayType("audio/flac;")).replace(/^no$/,"")},S},_unlockAudio:function(){var S=this||ie;if(!S._audioUnlocked&&S.ctx){S._audioUnlocked=!1,S.autoUnlock=!1,S._mobileUnloaded||S.ctx.sampleRate===44100||(S._mobileUnloaded=!0,S.unload()),S._scratchBuffer=S.ctx.createBuffer(1,1,22050);var A=function(L){for(;S._html5AudioPool.length<S.html5PoolSize;)try{var j=new Audio;j._unlocked=!0,S._releaseHtml5Audio(j)}catch{S.noAudio=!0;break}for(var D=0;D<S._howls.length;D++)if(!S._howls[D]._webAudio)for(var z=S._howls[D]._getSoundIds(),W=0;W<z.length;W++){var ee=S._howls[D]._soundById(z[W]);ee&&ee._node&&!ee._node._unlocked&&(ee._node._unlocked=!0,ee._node.load())}S._autoResume();var et=S.ctx.createBufferSource();et.buffer=S._scratchBuffer,et.connect(S.ctx.destination),et.start===void 0?et.noteOn(0):et.start(0),typeof S.ctx.resume=="function"&&S.ctx.resume(),et.onended=function(){et.disconnect(0),S._audioUnlocked=!0,document.removeEventListener("touchstart",A,!0),document.removeEventListener("touchend",A,!0),document.removeEventListener("click",A,!0),document.removeEventListener("keydown",A,!0);for(var ft=0;ft<S._howls.length;ft++)S._howls[ft]._emit("unlock")}};return document.addEventListener("touchstart",A,!0),document.addEventListener("touchend",A,!0),document.addEventListener("click",A,!0),document.addEventListener("keydown",A,!0),S}},_obtainHtml5Audio:function(){var S=this||ie;if(S._html5AudioPool.length)return S._html5AudioPool.pop();var A=new Audio().play();return A&&typeof Promise!="undefined"&&(A instanceof Promise||typeof A.then=="function")&&A.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(S){var A=this||ie;return S._unlocked&&A._html5AudioPool.push(S),A},_autoSuspend:function(){var S=this;if(S.autoSuspend&&S.ctx&&S.ctx.suspend!==void 0&&ie.usingWebAudio){for(var A=0;A<S._howls.length;A++)if(S._howls[A]._webAudio){for(var L=0;L<S._howls[A]._sounds.length;L++)if(!S._howls[A]._sounds[L]._paused)return S}return S._suspendTimer&&clearTimeout(S._suspendTimer),S._suspendTimer=setTimeout(function(){if(S.autoSuspend){S._suspendTimer=null,S.state="suspending";var j=function(){S.state="suspended",S._resumeAfterSuspend&&(delete S._resumeAfterSuspend,S._autoResume())};S.ctx.suspend().then(j,j)}},3e4),S}},_autoResume:function(){var S=this;if(S.ctx&&S.ctx.resume!==void 0&&ie.usingWebAudio)return S.state==="running"&&S.ctx.state!=="interrupted"&&S._suspendTimer?(clearTimeout(S._suspendTimer),S._suspendTimer=null):S.state==="suspended"||S.state==="running"&&S.ctx.state==="interrupted"?(S.ctx.resume().then(function(){S.state="running";for(var A=0;A<S._howls.length;A++)S._howls[A]._emit("resume")}),S._suspendTimer&&(clearTimeout(S._suspendTimer),S._suspendTimer=null)):S.state==="suspending"&&(S._resumeAfterSuspend=!0),S}};var ie=new B,k=function(S){S.src&&S.src.length!==0?this.init(S):console.error("An array of source files must be passed with any new Howl.")};k.prototype={init:function(S){var A=this;return ie.ctx||Fe(),A._autoplay=S.autoplay||!1,A._format=typeof S.format!="string"?S.format:[S.format],A._html5=S.html5||!1,A._muted=S.mute||!1,A._loop=S.loop||!1,A._pool=S.pool||5,A._preload=typeof S.preload!="boolean"&&S.preload!=="metadata"||S.preload,A._rate=S.rate||1,A._sprite=S.sprite||{},A._src=typeof S.src!="string"?S.src:[S.src],A._volume=S.volume!==void 0?S.volume:1,A._xhr={method:S.xhr&&S.xhr.method?S.xhr.method:"GET",headers:S.xhr&&S.xhr.headers?S.xhr.headers:null,withCredentials:!(!S.xhr||!S.xhr.withCredentials)&&S.xhr.withCredentials},A._duration=0,A._state="unloaded",A._sounds=[],A._endTimers={},A._queue=[],A._playLock=!1,A._onend=S.onend?[{fn:S.onend}]:[],A._onfade=S.onfade?[{fn:S.onfade}]:[],A._onload=S.onload?[{fn:S.onload}]:[],A._onloaderror=S.onloaderror?[{fn:S.onloaderror}]:[],A._onplayerror=S.onplayerror?[{fn:S.onplayerror}]:[],A._onpause=S.onpause?[{fn:S.onpause}]:[],A._onplay=S.onplay?[{fn:S.onplay}]:[],A._onstop=S.onstop?[{fn:S.onstop}]:[],A._onmute=S.onmute?[{fn:S.onmute}]:[],A._onvolume=S.onvolume?[{fn:S.onvolume}]:[],A._onrate=S.onrate?[{fn:S.onrate}]:[],A._onseek=S.onseek?[{fn:S.onseek}]:[],A._onunlock=S.onunlock?[{fn:S.onunlock}]:[],A._onresume=[],A._webAudio=ie.usingWebAudio&&!A._html5,ie.ctx!==void 0&&ie.ctx&&ie.autoUnlock&&ie._unlockAudio(),ie._howls.push(A),A._autoplay&&A._queue.push({event:"play",action:function(){A.play()}}),A._preload&&A._preload!=="none"&&A.load(),A},load:function(){var S=null;if(ie.noAudio)this._emit("loaderror",null,"No audio support.");else{typeof this._src=="string"&&(this._src=[this._src]);for(var A=0;A<this._src.length;A++){var L,j;if(this._format&&this._format[A])L=this._format[A];else{if(typeof(j=this._src[A])!="string"){this._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(L=/^data:audio\/([^;,]+);/i.exec(j))||(L=/\.([^.]+)$/.exec(j.split("?",1)[0])),L&&(L=L[1].toLowerCase())}if(L||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),L&&ie.codecs(L)){S=this._src[A];break}}if(S)return this._src=S,this._state="loading",window.location.protocol==="https:"&&S.slice(0,5)==="http:"&&(this._html5=!0,this._webAudio=!1),new oe(this),this._webAudio&&K(this),this;this._emit("loaderror",null,"No codec support for selected audio sources.")}},play:function(S,A){var L=this,j=null;if(typeof S=="number")j=S,S=null;else{if(typeof S=="string"&&L._state==="loaded"&&!L._sprite[S])return null;if(S===void 0&&(S="__default",!L._playLock)){for(var D=0,z=0;z<L._sounds.length;z++)L._sounds[z]._paused&&!L._sounds[z]._ended&&(D++,j=L._sounds[z]._id);D===1?S=null:j=null}}var W=j?L._soundById(j):L._inactiveSound();if(!W)return null;if(j&&!S&&(S=W._sprite||"__default"),L._state!=="loaded"){W._sprite=S,W._ended=!1;var ee=W._id;return L._queue.push({event:"play",action:function(){L.play(ee)}}),ee}if(j&&!W._paused)return A||L._loadQueue("play"),W._id;L._webAudio&&ie._autoResume();var et=Math.max(0,W._seek>0?W._seek:L._sprite[S][0]/1e3),ft=Math.max(0,(L._sprite[S][0]+L._sprite[S][1])/1e3-et),$e=1e3*ft/Math.abs(W._rate),ae=L._sprite[S][0]/1e3,Ce=(L._sprite[S][0]+L._sprite[S][1])/1e3;W._sprite=S,W._ended=!1;var Ie=function(){W._paused=!1,W._seek=et,W._start=ae,W._stop=Ce,W._loop=!(!W._loop&&!L._sprite[S][2])};if(!(et>=Ce)){var H=W._node;if(L._webAudio){var be=function(){L._playLock=!1,Ie(),L._refreshBuffer(W);var Ue=W._muted||L._muted?0:W._volume;H.gain.setValueAtTime(Ue,ie.ctx.currentTime),W._playStart=ie.ctx.currentTime,H.bufferSource.start===void 0?W._loop?H.bufferSource.noteGrainOn(0,et,86400):H.bufferSource.noteGrainOn(0,et,ft):W._loop?H.bufferSource.start(0,et,86400):H.bufferSource.start(0,et,ft),$e!==1/0&&(L._endTimers[W._id]=setTimeout(L._ended.bind(L,W),$e)),A||setTimeout(function(){L._emit("play",W._id),L._loadQueue()},0)};ie.state==="running"&&ie.ctx.state!=="interrupted"?be():(L._playLock=!0,L.once("resume",be),L._clearTimer(W._id))}else{var Me=function(){H.currentTime=et,H.muted=W._muted||L._muted||ie._muted||H.muted,H.volume=W._volume*ie.volume(),H.playbackRate=W._rate;try{var Ue=H.play();if(Ue&&typeof Promise!="undefined"&&(Ue instanceof Promise||typeof Ue.then=="function")?(L._playLock=!0,Ie(),Ue.then(function(){L._playLock=!1,H._unlocked=!0,A?L._loadQueue():L._emit("play",W._id)}).catch(function(){L._playLock=!1,L._emit("playerror",W._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),W._ended=!0,W._paused=!0})):A||(L._playLock=!1,Ie(),L._emit("play",W._id)),H.playbackRate=W._rate,H.paused)return void L._emit("playerror",W._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");S!=="__default"||W._loop?L._endTimers[W._id]=setTimeout(L._ended.bind(L,W),$e):(L._endTimers[W._id]=function(){L._ended(W),H.removeEventListener("ended",L._endTimers[W._id],!1)},H.addEventListener("ended",L._endTimers[W._id],!1))}catch(qe){L._emit("playerror",W._id,qe)}};H.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(H.src=L._src,H.load());var Oe=window&&window.ejecta||!H.readyState&&ie._navigator.isCocoonJS;if(H.readyState>=3||Oe)Me();else{L._playLock=!0,L._state="loading";var Se=function(){L._state="loaded",Me(),H.removeEventListener(ie._canPlayEvent,Se,!1)};H.addEventListener(ie._canPlayEvent,Se,!1),L._clearTimer(W._id)}}return W._id}L._ended(W)},pause:function(S){var A=this;if(A._state!=="loaded"||A._playLock)return A._queue.push({event:"pause",action:function(){A.pause(S)}}),A;for(var L=A._getSoundIds(S),j=0;j<L.length;j++){A._clearTimer(L[j]);var D=A._soundById(L[j]);if(D&&!D._paused&&(D._seek=A.seek(L[j]),D._rateSeek=0,D._paused=!0,A._stopFade(L[j]),D._node))if(A._webAudio){if(!D._node.bufferSource)continue;D._node.bufferSource.stop===void 0?D._node.bufferSource.noteOff(0):D._node.bufferSource.stop(0),A._cleanBuffer(D._node)}else isNaN(D._node.duration)&&D._node.duration!==1/0||D._node.pause();arguments[1]||A._emit("pause",D?D._id:null)}return A},stop:function(S,A){var L=this;if(L._state!=="loaded"||L._playLock)return L._queue.push({event:"stop",action:function(){L.stop(S)}}),L;for(var j=L._getSoundIds(S),D=0;D<j.length;D++){L._clearTimer(j[D]);var z=L._soundById(j[D]);z&&(z._seek=z._start||0,z._rateSeek=0,z._paused=!0,z._ended=!0,L._stopFade(j[D]),z._node&&(L._webAudio?z._node.bufferSource&&(z._node.bufferSource.stop===void 0?z._node.bufferSource.noteOff(0):z._node.bufferSource.stop(0),L._cleanBuffer(z._node)):isNaN(z._node.duration)&&z._node.duration!==1/0||(z._node.currentTime=z._start||0,z._node.pause(),z._node.duration===1/0&&L._clearSound(z._node))),A||L._emit("stop",z._id))}return L},mute:function(S,A){var L=this;if(L._state!=="loaded"||L._playLock)return L._queue.push({event:"mute",action:function(){L.mute(S,A)}}),L;if(A===void 0){if(typeof S!="boolean")return L._muted;L._muted=S}for(var j=L._getSoundIds(A),D=0;D<j.length;D++){var z=L._soundById(j[D]);z&&(z._muted=S,z._interval&&L._stopFade(z._id),L._webAudio&&z._node?z._node.gain.setValueAtTime(S?0:z._volume,ie.ctx.currentTime):z._node&&(z._node.muted=!!ie._muted||S),L._emit("mute",z._id))}return L},volume:function(){var S,A,L,j=this,D=arguments;if(D.length===0)return j._volume;if(D.length===1||D.length===2&&D[1]===void 0){var z=j._getSoundIds(),W=z.indexOf(D[0]);W>=0?A=parseInt(D[0],10):S=parseFloat(D[0])}else D.length>=2&&(S=parseFloat(D[0]),A=parseInt(D[1],10));if(!(S!==void 0&&S>=0&&S<=1))return(L=A?j._soundById(A):j._sounds[0])?L._volume:0;if(j._state!=="loaded"||j._playLock)return j._queue.push({event:"volume",action:function(){j.volume.apply(j,D)}}),j;A===void 0&&(j._volume=S),A=j._getSoundIds(A);for(var ee=0;ee<A.length;ee++)(L=j._soundById(A[ee]))&&(L._volume=S,D[2]||j._stopFade(A[ee]),j._webAudio&&L._node&&!L._muted?L._node.gain.setValueAtTime(S,ie.ctx.currentTime):L._node&&!L._muted&&(L._node.volume=S*ie.volume()),j._emit("volume",L._id));return j},fade:function(S,A,L,j){var D=this;if(D._state!=="loaded"||D._playLock)return D._queue.push({event:"fade",action:function(){D.fade(S,A,L,j)}}),D;S=Math.min(Math.max(0,parseFloat(S)),1),A=Math.min(Math.max(0,parseFloat(A)),1),L=parseFloat(L),D.volume(S,j);for(var z=D._getSoundIds(j),W=0;W<z.length;W++){var ee=D._soundById(z[W]);if(ee){if(j||D._stopFade(z[W]),D._webAudio&&!ee._muted){var et=ie.ctx.currentTime,ft=et+L/1e3;ee._volume=S,ee._node.gain.setValueAtTime(S,et),ee._node.gain.linearRampToValueAtTime(A,ft)}D._startFadeInterval(ee,S,A,L,z[W],j===void 0)}}return D},_startFadeInterval:function(S,A,L,j,D,z){var W=this,ee=A,et=L-A,ft=Math.abs(et/.01),$e=Math.max(4,ft>0?j/ft:j),ae=Date.now();S._fadeTo=L,S._interval=setInterval(function(){var Ce=(Date.now()-ae)/j;ae=Date.now(),ee+=et*Ce,ee=Math.round(100*ee)/100,ee=et<0?Math.max(L,ee):Math.min(L,ee),W._webAudio?S._volume=ee:W.volume(ee,S._id,!0),z&&(W._volume=ee),(L<A&&ee<=L||L>A&&ee>=L)&&(clearInterval(S._interval),S._interval=null,S._fadeTo=null,W.volume(L,S._id),W._emit("fade",S._id))},$e)},_stopFade:function(S){var A=this._soundById(S);return A&&A._interval&&(this._webAudio&&A._node.gain.cancelScheduledValues(ie.ctx.currentTime),clearInterval(A._interval),A._interval=null,this.volume(A._fadeTo,S),A._fadeTo=null,this._emit("fade",S)),this},loop:function(){var S,A,L,j=this,D=arguments;if(D.length===0)return j._loop;if(D.length===1){if(typeof D[0]!="boolean")return!!(L=j._soundById(parseInt(D[0],10)))&&L._loop;S=D[0],j._loop=S}else D.length===2&&(S=D[0],A=parseInt(D[1],10));for(var z=j._getSoundIds(A),W=0;W<z.length;W++)(L=j._soundById(z[W]))&&(L._loop=S,j._webAudio&&L._node&&L._node.bufferSource&&(L._node.bufferSource.loop=S,S&&(L._node.bufferSource.loopStart=L._start||0,L._node.bufferSource.loopEnd=L._stop,j.playing(z[W])&&(j.pause(z[W],!0),j.play(z[W],!0)))));return j},rate:function(){var S,A,L,j=this,D=arguments;if(D.length===0)A=j._sounds[0]._id;else if(D.length===1){var z=j._getSoundIds(),W=z.indexOf(D[0]);W>=0?A=parseInt(D[0],10):S=parseFloat(D[0])}else D.length===2&&(S=parseFloat(D[0]),A=parseInt(D[1],10));if(typeof S!="number")return(L=j._soundById(A))?L._rate:j._rate;if(j._state!=="loaded"||j._playLock)return j._queue.push({event:"rate",action:function(){j.rate.apply(j,D)}}),j;A===void 0&&(j._rate=S),A=j._getSoundIds(A);for(var ee=0;ee<A.length;ee++)if(L=j._soundById(A[ee])){j.playing(A[ee])&&(L._rateSeek=j.seek(A[ee]),L._playStart=j._webAudio?ie.ctx.currentTime:L._playStart),L._rate=S,j._webAudio&&L._node&&L._node.bufferSource?L._node.bufferSource.playbackRate.setValueAtTime(S,ie.ctx.currentTime):L._node&&(L._node.playbackRate=S);var et=j.seek(A[ee]),ft=(j._sprite[L._sprite][0]+j._sprite[L._sprite][1])/1e3-et,$e=1e3*ft/Math.abs(L._rate);!j._endTimers[A[ee]]&&L._paused||(j._clearTimer(A[ee]),j._endTimers[A[ee]]=setTimeout(j._ended.bind(j,L),$e)),j._emit("rate",L._id)}return j},seek:function(){var S,A,L=this,j=arguments;if(j.length===0)L._sounds.length&&(A=L._sounds[0]._id);else if(j.length===1){var D=L._getSoundIds(),z=D.indexOf(j[0]);z>=0?A=parseInt(j[0],10):L._sounds.length&&(A=L._sounds[0]._id,S=parseFloat(j[0]))}else j.length===2&&(S=parseFloat(j[0]),A=parseInt(j[1],10));if(A===void 0)return 0;if(typeof S=="number"&&(L._state!=="loaded"||L._playLock))return L._queue.push({event:"seek",action:function(){L.seek.apply(L,j)}}),L;var W=L._soundById(A);if(W){if(!(typeof S=="number"&&S>=0)){if(L._webAudio){var ee=L.playing(A)?ie.ctx.currentTime-W._playStart:0,et=W._rateSeek?W._rateSeek-W._seek:0;return W._seek+(et+ee*Math.abs(W._rate))}return W._node.currentTime}var ft=L.playing(A);ft&&L.pause(A,!0),W._seek=S,W._ended=!1,L._clearTimer(A),L._webAudio||!W._node||isNaN(W._node.duration)||(W._node.currentTime=S);var $e=function(){ft&&L.play(A,!0),L._emit("seek",A)};if(ft&&!L._webAudio){var ae=function(){L._playLock?setTimeout(ae,0):$e()};setTimeout(ae,0)}else $e()}return L},playing:function(S){if(typeof S=="number"){var A=this._soundById(S);return!!A&&!A._paused}for(var L=0;L<this._sounds.length;L++)if(!this._sounds[L]._paused)return!0;return!1},duration:function(S){var A=this._duration,L=this._soundById(S);return L&&(A=this._sprite[L._sprite][1]/1e3),A},state:function(){return this._state},unload:function(){for(var S=this,A=S._sounds,L=0;L<A.length;L++)A[L]._paused||S.stop(A[L]._id),S._webAudio||(S._clearSound(A[L]._node),A[L]._node.removeEventListener("error",A[L]._errorFn,!1),A[L]._node.removeEventListener(ie._canPlayEvent,A[L]._loadFn,!1),A[L]._node.removeEventListener("ended",A[L]._endFn,!1),ie._releaseHtml5Audio(A[L]._node)),delete A[L]._node,S._clearTimer(A[L]._id);var j=ie._howls.indexOf(S);j>=0&&ie._howls.splice(j,1);var D=!0;for(L=0;L<ie._howls.length;L++)if(ie._howls[L]._src===S._src||S._src.indexOf(ie._howls[L]._src)>=0){D=!1;break}return X&&D&&delete X[S._src],ie.noAudio=!1,S._state="unloaded",S._sounds=[],S=null,null},on:function(S,A,L,j){var D=this["_on"+S];return typeof A=="function"&&D.push(j?{id:L,fn:A,once:j}:{id:L,fn:A}),this},off:function(S,A,L){var j=this["_on"+S],D=0;if(typeof A=="number"&&(L=A,A=null),A||L)for(D=0;D<j.length;D++){var z=L===j[D].id;if(A===j[D].fn&&z||!A&&z){j.splice(D,1);break}}else if(S)this["_on"+S]=[];else{var W=Object.keys(this);for(D=0;D<W.length;D++)W[D].indexOf("_on")===0&&Array.isArray(this[W[D]])&&(this[W[D]]=[])}return this},once:function(S,A,L){return this.on(S,A,L,1),this},_emit:function(S,A,L){for(var j=this["_on"+S],D=j.length-1;D>=0;D--)j[D].id&&j[D].id!==A&&S!=="load"||(setTimeout(function(z){z.call(this,A,L)}.bind(this,j[D].fn),0),j[D].once&&this.off(S,j[D].fn,j[D].id));return this._loadQueue(S),this},_loadQueue:function(S){if(this._queue.length>0){var A=this._queue[0];A.event===S&&(this._queue.shift(),this._loadQueue()),S||A.action()}return this},_ended:function(S){var A=S._sprite;if(!this._webAudio&&S._node&&!S._node.paused&&!S._node.ended&&S._node.currentTime<S._stop)return setTimeout(this._ended.bind(this,S),100),this;var L=!(!S._loop&&!this._sprite[A][2]);if(this._emit("end",S._id),!this._webAudio&&L&&this.stop(S._id,!0).play(S._id),this._webAudio&&L){this._emit("play",S._id),S._seek=S._start||0,S._rateSeek=0,S._playStart=ie.ctx.currentTime;var j=1e3*(S._stop-S._start)/Math.abs(S._rate);this._endTimers[S._id]=setTimeout(this._ended.bind(this,S),j)}return this._webAudio&&!L&&(S._paused=!0,S._ended=!0,S._seek=S._start||0,S._rateSeek=0,this._clearTimer(S._id),this._cleanBuffer(S._node),ie._autoSuspend()),this._webAudio||L||this.stop(S._id,!0),this},_clearTimer:function(S){if(this._endTimers[S]){if(typeof this._endTimers[S]!="function")clearTimeout(this._endTimers[S]);else{var A=this._soundById(S);A&&A._node&&A._node.removeEventListener("ended",this._endTimers[S],!1)}delete this._endTimers[S]}return this},_soundById:function(S){for(var A=0;A<this._sounds.length;A++)if(S===this._sounds[A]._id)return this._sounds[A];return null},_inactiveSound:function(){this._drain();for(var S=0;S<this._sounds.length;S++)if(this._sounds[S]._ended)return this._sounds[S].reset();return new oe(this)},_drain:function(){var S=this._pool,A=0,L=0;if(!(this._sounds.length<S)){for(L=0;L<this._sounds.length;L++)this._sounds[L]._ended&&A++;for(L=this._sounds.length-1;L>=0;L--){if(A<=S)return;this._sounds[L]._ended&&(this._webAudio&&this._sounds[L]._node&&this._sounds[L]._node.disconnect(0),this._sounds.splice(L,1),A--)}}},_getSoundIds:function(S){if(S===void 0){for(var A=[],L=0;L<this._sounds.length;L++)A.push(this._sounds[L]._id);return A}return[S]},_refreshBuffer:function(S){return S._node.bufferSource=ie.ctx.createBufferSource(),S._node.bufferSource.buffer=X[this._src],S._panner?S._node.bufferSource.connect(S._panner):S._node.bufferSource.connect(S._node),S._node.bufferSource.loop=S._loop,S._loop&&(S._node.bufferSource.loopStart=S._start||0,S._node.bufferSource.loopEnd=S._stop||0),S._node.bufferSource.playbackRate.setValueAtTime(S._rate,ie.ctx.currentTime),this},_cleanBuffer:function(S){var A=ie._navigator&&ie._navigator.vendor.indexOf("Apple")>=0;if(ie._scratchBuffer&&S.bufferSource&&(S.bufferSource.onended=null,S.bufferSource.disconnect(0),A))try{S.bufferSource.buffer=ie._scratchBuffer}catch{}return S.bufferSource=null,this},_clearSound:function(S){/MSIE |Trident\//.test(ie._navigator&&ie._navigator.userAgent)||(S.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var oe=function(S){this._parent=S,this.init()};oe.prototype={init:function(){var S=this._parent;return this._muted=S._muted,this._loop=S._loop,this._volume=S._volume,this._rate=S._rate,this._seek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++ie._counter,S._sounds.push(this),this.create(),this},create:function(){var S=this._parent,A=ie._muted||this._muted||this._parent._muted?0:this._volume;return S._webAudio?(this._node=ie.ctx.createGain===void 0?ie.ctx.createGainNode():ie.ctx.createGain(),this._node.gain.setValueAtTime(A,ie.ctx.currentTime),this._node.paused=!0,this._node.connect(ie.masterGain)):ie.noAudio||(this._node=ie._obtainHtml5Audio(),this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(ie._canPlayEvent,this._loadFn,!1),this._endFn=this._endListener.bind(this),this._node.addEventListener("ended",this._endFn,!1),this._node.src=S._src,this._node.preload=S._preload===!0?"auto":S._preload,this._node.volume=A*ie.volume(),this._node.load()),this},reset:function(){var S=this._parent;return this._muted=S._muted,this._loop=S._loop,this._volume=S._volume,this._rate=S._rate,this._seek=0,this._rateSeek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++ie._counter,this},_errorListener:function(){this._parent._emit("loaderror",this._id,this._node.error?this._node.error.code:0),this._node.removeEventListener("error",this._errorFn,!1)},_loadListener:function(){var S=this._parent;S._duration=Math.ceil(10*this._node.duration)/10,Object.keys(S._sprite).length===0&&(S._sprite={__default:[0,1e3*S._duration]}),S._state!=="loaded"&&(S._state="loaded",S._emit("load"),S._loadQueue()),this._node.removeEventListener(ie._canPlayEvent,this._loadFn,!1)},_endListener:function(){var S=this._parent;S._duration===1/0&&(S._duration=Math.ceil(10*this._node.duration)/10,S._sprite.__default[1]===1/0&&(S._sprite.__default[1]=1e3*S._duration),S._ended(this)),this._node.removeEventListener("ended",this._endFn,!1)}};var X={},K=function(S){var A=S._src;if(X[A])return S._duration=X[A].duration,void Xe(S);if(/^data:[^;]+;base64,/.test(A)){for(var L=atob(A.split(",")[1]),j=new Uint8Array(L.length),D=0;D<L.length;++D)j[D]=L.charCodeAt(D);Ee(j.buffer,S)}else{var z=new XMLHttpRequest;z.open(S._xhr.method,A,!0),z.withCredentials=S._xhr.withCredentials,z.responseType="arraybuffer",S._xhr.headers&&Object.keys(S._xhr.headers).forEach(function(W){z.setRequestHeader(W,S._xhr.headers[W])}),z.onload=function(){var W=(z.status+"")[0];W==="0"||W==="2"||W==="3"?Ee(z.response,S):S._emit("loaderror",null,"Failed loading audio file with status: "+z.status+".")},z.onerror=function(){S._webAudio&&(S._html5=!0,S._webAudio=!1,S._sounds=[],delete X[A],S.load())},le(z)}},le=function(S){try{S.send()}catch{S.onerror()}},Ee=function(S,A){var L=function(){A._emit("loaderror",null,"Decoding audio data failed.")},j=function(D){D&&A._sounds.length>0?(X[A._src]=D,Xe(A,D)):L()};typeof Promise!="undefined"&&ie.ctx.decodeAudioData.length===1?ie.ctx.decodeAudioData(S).then(j).catch(L):ie.ctx.decodeAudioData(S,j,L)},Xe=function(S,A){A&&!S._duration&&(S._duration=A.duration),Object.keys(S._sprite).length===0&&(S._sprite={__default:[0,1e3*S._duration]}),S._state!=="loaded"&&(S._state="loaded",S._emit("load"),S._loadQueue())},Fe=function(){if(ie.usingWebAudio){try{typeof AudioContext!="undefined"?ie.ctx=new AudioContext:typeof webkitAudioContext!="undefined"?ie.ctx=new webkitAudioContext:ie.usingWebAudio=!1}catch{ie.usingWebAudio=!1}ie.ctx||(ie.usingWebAudio=!1);var S=/iP(hone|od|ad)/.test(ie._navigator&&ie._navigator.platform),A=ie._navigator&&ie._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),L=A?parseInt(A[1],10):null;if(S&&L&&L<9){var j=/safari/.test(ie._navigator&&ie._navigator.userAgent.toLowerCase());ie._navigator&&!j&&(ie.usingWebAudio=!1)}ie.usingWebAudio&&(ie.masterGain=ie.ctx.createGain===void 0?ie.ctx.createGainNode():ie.ctx.createGain(),ie.masterGain.gain.setValueAtTime(ie._muted?0:ie._volume,ie.ctx.currentTime),ie.masterGain.connect(ie.ctx.destination)),ie._setup()}};(q=function(){return{Howler:ie,Howl:k}}.apply(O,[]))===void 0||(I.exports=q),O.Howler=ie,O.Howl=k,b!==void 0?(b.HowlerGlobal=B,b.Howler=ie,b.Howl=k,b.Sound=oe):typeof window!="undefined"&&(window.HowlerGlobal=B,window.Howler=ie,window.Howl=k,window.Sound=oe)})(),function(){var B;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(k){if(!this.ctx||!this.ctx.listener)return this;for(var oe=this._howls.length-1;oe>=0;oe--)this._howls[oe].stereo(k);return this},HowlerGlobal.prototype.pos=function(k,oe,X){return this.ctx&&this.ctx.listener?(oe=typeof oe!="number"?this._pos[1]:oe,X=typeof X!="number"?this._pos[2]:X,typeof k!="number"?this._pos:(this._pos=[k,oe,X],this.ctx.listener.positionX!==void 0?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this)):this},HowlerGlobal.prototype.orientation=function(k,oe,X,K,le,Ee){if(!this.ctx||!this.ctx.listener)return this;var Xe=this._orientation;return oe=typeof oe!="number"?Xe[1]:oe,X=typeof X!="number"?Xe[2]:X,K=typeof K!="number"?Xe[3]:K,le=typeof le!="number"?Xe[4]:le,Ee=typeof Ee!="number"?Xe[5]:Ee,typeof k!="number"?Xe:(this._orientation=[k,oe,X,K,le,Ee],this.ctx.listener.forwardX!==void 0?(this.ctx.listener.forwardX.setTargetAtTime(k,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(oe,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(X,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(K,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(le,Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(Ee,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(k,oe,X,K,le,Ee),this)},Howl.prototype.init=(B=Howl.prototype.init,function(k){return this._orientation=k.orientation||[1,0,0],this._stereo=k.stereo||null,this._pos=k.pos||null,this._pannerAttr={coneInnerAngle:k.coneInnerAngle!==void 0?k.coneInnerAngle:360,coneOuterAngle:k.coneOuterAngle!==void 0?k.coneOuterAngle:360,coneOuterGain:k.coneOuterGain!==void 0?k.coneOuterGain:0,distanceModel:k.distanceModel!==void 0?k.distanceModel:"inverse",maxDistance:k.maxDistance!==void 0?k.maxDistance:1e4,panningModel:k.panningModel!==void 0?k.panningModel:"HRTF",refDistance:k.refDistance!==void 0?k.refDistance:1,rolloffFactor:k.rolloffFactor!==void 0?k.rolloffFactor:1},this._onstereo=k.onstereo?[{fn:k.onstereo}]:[],this._onpos=k.onpos?[{fn:k.onpos}]:[],this._onorientation=k.onorientation?[{fn:k.onorientation}]:[],B.call(this,k)}),Howl.prototype.stereo=function(k,oe){var X=this;if(!X._webAudio)return X;if(X._state!=="loaded")return X._queue.push({event:"stereo",action:function(){X.stereo(k,oe)}}),X;var K=Howler.ctx.createStereoPanner===void 0?"spatial":"stereo";if(oe===void 0){if(typeof k!="number")return X._stereo;X._stereo=k,X._pos=[k,0,0]}for(var le=X._getSoundIds(oe),Ee=0;Ee<le.length;Ee++){var Xe=X._soundById(le[Ee]);if(Xe){if(typeof k!="number")return Xe._stereo;Xe._stereo=k,Xe._pos=[k,0,0],Xe._node&&(Xe._pannerAttr.panningModel="equalpower",Xe._panner&&Xe._panner.pan||ie(Xe,K),K==="spatial"?Xe._panner.positionX!==void 0?(Xe._panner.positionX.setValueAtTime(k,Howler.ctx.currentTime),Xe._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),Xe._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):Xe._panner.setPosition(k,0,0):Xe._panner.pan.setValueAtTime(k,Howler.ctx.currentTime)),X._emit("stereo",Xe._id)}}return X},Howl.prototype.pos=function(k,oe,X,K){var le=this;if(!le._webAudio)return le;if(le._state!=="loaded")return le._queue.push({event:"pos",action:function(){le.pos(k,oe,X,K)}}),le;if(oe=typeof oe!="number"?0:oe,X=typeof X!="number"?-.5:X,K===void 0){if(typeof k!="number")return le._pos;le._pos=[k,oe,X]}for(var Ee=le._getSoundIds(K),Xe=0;Xe<Ee.length;Xe++){var Fe=le._soundById(Ee[Xe]);if(Fe){if(typeof k!="number")return Fe._pos;Fe._pos=[k,oe,X],Fe._node&&(Fe._panner&&!Fe._panner.pan||ie(Fe,"spatial"),Fe._panner.positionX!==void 0?(Fe._panner.positionX.setValueAtTime(k,Howler.ctx.currentTime),Fe._panner.positionY.setValueAtTime(oe,Howler.ctx.currentTime),Fe._panner.positionZ.setValueAtTime(X,Howler.ctx.currentTime)):Fe._panner.setPosition(k,oe,X)),le._emit("pos",Fe._id)}}return le},Howl.prototype.orientation=function(k,oe,X,K){var le=this;if(!le._webAudio)return le;if(le._state!=="loaded")return le._queue.push({event:"orientation",action:function(){le.orientation(k,oe,X,K)}}),le;if(oe=typeof oe!="number"?le._orientation[1]:oe,X=typeof X!="number"?le._orientation[2]:X,K===void 0){if(typeof k!="number")return le._orientation;le._orientation=[k,oe,X]}for(var Ee=le._getSoundIds(K),Xe=0;Xe<Ee.length;Xe++){var Fe=le._soundById(Ee[Xe]);if(Fe){if(typeof k!="number")return Fe._orientation;Fe._orientation=[k,oe,X],Fe._node&&(Fe._panner||(Fe._pos||(Fe._pos=le._pos||[0,0,-.5]),ie(Fe,"spatial")),Fe._panner.orientationX!==void 0?(Fe._panner.orientationX.setValueAtTime(k,Howler.ctx.currentTime),Fe._panner.orientationY.setValueAtTime(oe,Howler.ctx.currentTime),Fe._panner.orientationZ.setValueAtTime(X,Howler.ctx.currentTime)):Fe._panner.setOrientation(k,oe,X)),le._emit("orientation",Fe._id)}}return le},Howl.prototype.pannerAttr=function(){var k,oe,X,K=this,le=arguments;if(!K._webAudio)return K;if(le.length===0)return K._pannerAttr;if(le.length===1){if(typeof le[0]!="object")return(X=K._soundById(parseInt(le[0],10)))?X._pannerAttr:K._pannerAttr;k=le[0],oe===void 0&&(k.pannerAttr||(k.pannerAttr={coneInnerAngle:k.coneInnerAngle,coneOuterAngle:k.coneOuterAngle,coneOuterGain:k.coneOuterGain,distanceModel:k.distanceModel,maxDistance:k.maxDistance,refDistance:k.refDistance,rolloffFactor:k.rolloffFactor,panningModel:k.panningModel}),K._pannerAttr={coneInnerAngle:k.pannerAttr.coneInnerAngle!==void 0?k.pannerAttr.coneInnerAngle:K._coneInnerAngle,coneOuterAngle:k.pannerAttr.coneOuterAngle!==void 0?k.pannerAttr.coneOuterAngle:K._coneOuterAngle,coneOuterGain:k.pannerAttr.coneOuterGain!==void 0?k.pannerAttr.coneOuterGain:K._coneOuterGain,distanceModel:k.pannerAttr.distanceModel!==void 0?k.pannerAttr.distanceModel:K._distanceModel,maxDistance:k.pannerAttr.maxDistance!==void 0?k.pannerAttr.maxDistance:K._maxDistance,refDistance:k.pannerAttr.refDistance!==void 0?k.pannerAttr.refDistance:K._refDistance,rolloffFactor:k.pannerAttr.rolloffFactor!==void 0?k.pannerAttr.rolloffFactor:K._rolloffFactor,panningModel:k.pannerAttr.panningModel!==void 0?k.pannerAttr.panningModel:K._panningModel})}else le.length===2&&(k=le[0],oe=parseInt(le[1],10));for(var Ee=K._getSoundIds(oe),Xe=0;Xe<Ee.length;Xe++)if(X=K._soundById(Ee[Xe])){var Fe=X._pannerAttr;Fe={coneInnerAngle:k.coneInnerAngle!==void 0?k.coneInnerAngle:Fe.coneInnerAngle,coneOuterAngle:k.coneOuterAngle!==void 0?k.coneOuterAngle:Fe.coneOuterAngle,coneOuterGain:k.coneOuterGain!==void 0?k.coneOuterGain:Fe.coneOuterGain,distanceModel:k.distanceModel!==void 0?k.distanceModel:Fe.distanceModel,maxDistance:k.maxDistance!==void 0?k.maxDistance:Fe.maxDistance,refDistance:k.refDistance!==void 0?k.refDistance:Fe.refDistance,rolloffFactor:k.rolloffFactor!==void 0?k.rolloffFactor:Fe.rolloffFactor,panningModel:k.panningModel!==void 0?k.panningModel:Fe.panningModel};var S=X._panner;S?(S.coneInnerAngle=Fe.coneInnerAngle,S.coneOuterAngle=Fe.coneOuterAngle,S.coneOuterGain=Fe.coneOuterGain,S.distanceModel=Fe.distanceModel,S.maxDistance=Fe.maxDistance,S.refDistance=Fe.refDistance,S.rolloffFactor=Fe.rolloffFactor,S.panningModel=Fe.panningModel):(X._pos||(X._pos=K._pos||[0,0,-.5]),ie(X,"spatial"))}return K},Sound.prototype.init=function(k){return function(){var oe=this._parent;this._orientation=oe._orientation,this._stereo=oe._stereo,this._pos=oe._pos,this._pannerAttr=oe._pannerAttr,k.call(this),this._stereo?oe.stereo(this._stereo):this._pos&&oe.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}}(Sound.prototype.init),Sound.prototype.reset=function(k){return function(){var oe=this._parent;return this._orientation=oe._orientation,this._stereo=oe._stereo,this._pos=oe._pos,this._pannerAttr=oe._pannerAttr,this._stereo?oe.stereo(this._stereo):this._pos?oe.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,oe._refreshBuffer(this)),k.call(this)}}(Sound.prototype.reset);var ie=function(k,oe){(oe=oe||"spatial")==="spatial"?(k._panner=Howler.ctx.createPanner(),k._panner.coneInnerAngle=k._pannerAttr.coneInnerAngle,k._panner.coneOuterAngle=k._pannerAttr.coneOuterAngle,k._panner.coneOuterGain=k._pannerAttr.coneOuterGain,k._panner.distanceModel=k._pannerAttr.distanceModel,k._panner.maxDistance=k._pannerAttr.maxDistance,k._panner.refDistance=k._pannerAttr.refDistance,k._panner.rolloffFactor=k._pannerAttr.rolloffFactor,k._panner.panningModel=k._pannerAttr.panningModel,k._panner.positionX!==void 0?(k._panner.positionX.setValueAtTime(k._pos[0],Howler.ctx.currentTime),k._panner.positionY.setValueAtTime(k._pos[1],Howler.ctx.currentTime),k._panner.positionZ.setValueAtTime(k._pos[2],Howler.ctx.currentTime)):k._panner.setPosition(k._pos[0],k._pos[1],k._pos[2]),k._panner.orientationX!==void 0?(k._panner.orientationX.setValueAtTime(k._orientation[0],Howler.ctx.currentTime),k._panner.orientationY.setValueAtTime(k._orientation[1],Howler.ctx.currentTime),k._panner.orientationZ.setValueAtTime(k._orientation[2],Howler.ctx.currentTime)):k._panner.setOrientation(k._orientation[0],k._orientation[1],k._orientation[2])):(k._panner=Howler.ctx.createStereoPanner(),k._panner.pan.setValueAtTime(k._stereo,Howler.ctx.currentTime)),k._panner.connect(k._node),k._paused||k._parent.pause(k._id,!0).play(k._id,!0)}}()}).call(this,v(4))},function(I,O,v){(function(b){var q=b!==void 0&&b||typeof self!="undefined"&&self||window,B=Function.prototype.apply;function ie(k,oe){this._id=k,this._clearFn=oe}O.setTimeout=function(){return new ie(B.call(setTimeout,q,arguments),clearTimeout)},O.setInterval=function(){return new ie(B.call(setInterval,q,arguments),clearInterval)},O.clearTimeout=O.clearInterval=function(k){k&&k.close()},ie.prototype.unref=ie.prototype.ref=function(){},ie.prototype.close=function(){this._clearFn.call(q,this._id)},O.enroll=function(k,oe){clearTimeout(k._idleTimeoutId),k._idleTimeout=oe},O.unenroll=function(k){clearTimeout(k._idleTimeoutId),k._idleTimeout=-1},O._unrefActive=O.active=function(k){clearTimeout(k._idleTimeoutId);var oe=k._idleTimeout;oe>=0&&(k._idleTimeoutId=setTimeout(function(){k._onTimeout&&k._onTimeout()},oe))},v(19),O.setImmediate=typeof self!="undefined"&&self.setImmediate||b!==void 0&&b.setImmediate||this&&this.setImmediate,O.clearImmediate=typeof self!="undefined"&&self.clearImmediate||b!==void 0&&b.clearImmediate||this&&this.clearImmediate}).call(this,v(4))},function(I,O,v){(function(b,q){(function(B,ie){if(!B.setImmediate){var k,oe,X,K,le,Ee=1,Xe={},Fe=!1,S=B.document,A=Object.getPrototypeOf&&Object.getPrototypeOf(B);A=A&&A.setTimeout?A:B,{}.toString.call(B.process)==="[object process]"?k=function(D){q.nextTick(function(){j(D)})}:function(){if(B.postMessage&&!B.importScripts){var D=!0,z=B.onmessage;return B.onmessage=function(){D=!1},B.postMessage("","*"),B.onmessage=z,D}}()?(K="setImmediate$"+Math.random()+"$",le=function(D){D.source===B&&typeof D.data=="string"&&D.data.indexOf(K)===0&&j(+D.data.slice(K.length))},B.addEventListener?B.addEventListener("message",le,!1):B.attachEvent("onmessage",le),k=function(D){B.postMessage(K+D,"*")}):B.MessageChannel?((X=new MessageChannel).port1.onmessage=function(D){j(D.data)},k=function(D){X.port2.postMessage(D)}):S&&"onreadystatechange"in S.createElement("script")?(oe=S.documentElement,k=function(D){var z=S.createElement("script");z.onreadystatechange=function(){j(D),z.onreadystatechange=null,oe.removeChild(z),z=null},oe.appendChild(z)}):k=function(D){setTimeout(j,0,D)},A.setImmediate=function(D){typeof D!="function"&&(D=new Function(""+D));for(var z=new Array(arguments.length-1),W=0;W<z.length;W++)z[W]=arguments[W+1];var ee={callback:D,args:z};return Xe[Ee]=ee,k(Ee),Ee++},A.clearImmediate=L}function L(D){delete Xe[D]}function j(D){if(Fe)setTimeout(j,0,D);else{var z=Xe[D];if(z){Fe=!0;try{(function(W){var ee=W.callback,et=W.args;switch(et.length){case 0:ee();break;case 1:ee(et[0]);break;case 2:ee(et[0],et[1]);break;case 3:ee(et[0],et[1],et[2]);break;default:ee.apply(void 0,et)}})(z)}finally{L(D),Fe=!1}}}}})(typeof self=="undefined"?b===void 0?this:b:self)}).call(this,v(4),v(20))},function(I,O){var v,b,q=I.exports={};function B(){throw new Error("setTimeout has not been defined")}function ie(){throw new Error("clearTimeout has not been defined")}function k(A){if(v===setTimeout)return setTimeout(A,0);if((v===B||!v)&&setTimeout)return v=setTimeout,setTimeout(A,0);try{return v(A,0)}catch{try{return v.call(null,A,0)}catch{return v.call(this,A,0)}}}(function(){try{v=typeof setTimeout=="function"?setTimeout:B}catch{v=B}try{b=typeof clearTimeout=="function"?clearTimeout:ie}catch{b=ie}})();var oe,X=[],K=!1,le=-1;function Ee(){K&&oe&&(K=!1,oe.length?X=oe.concat(X):le=-1,X.length&&Xe())}function Xe(){if(!K){var A=k(Ee);K=!0;for(var L=X.length;L;){for(oe=X,X=[];++le<L;)oe&&oe[le].run();le=-1,L=X.length}oe=null,K=!1,function(j){if(b===clearTimeout)return clearTimeout(j);if((b===ie||!b)&&clearTimeout)return b=clearTimeout,clearTimeout(j);try{b(j)}catch{try{return b.call(null,j)}catch{return b.call(this,j)}}}(A)}}function Fe(A,L){this.fun=A,this.array=L}function S(){}q.nextTick=function(A){var L=new Array(arguments.length-1);if(arguments.length>1)for(var j=1;j<arguments.length;j++)L[j-1]=arguments[j];X.push(new Fe(A,L)),X.length!==1||K||k(Xe)},Fe.prototype.run=function(){this.fun.apply(null,this.array)},q.title="browser",q.browser=!0,q.env={},q.argv=[],q.version="",q.versions={},q.on=S,q.addListener=S,q.once=S,q.off=S,q.removeListener=S,q.removeAllListeners=S,q.emit=S,q.prependListener=S,q.prependOnceListener=S,q.listeners=function(A){return[]},q.binding=function(A){throw new Error("process.binding is not supported")},q.cwd=function(){return"/"},q.chdir=function(A){throw new Error("process.chdir is not supported")},q.umask=function(){return 0}},function(I,O,v){(function(b,q){var B;/*! https://mths.be/punycode v1.4.1 by @mathias */(function(ie){O&&O.nodeType,b&&b.nodeType;var k=typeof q=="object"&&q;k.global!==k&&k.window!==k&&k.self;var oe,X=2147483647,K=/^xn--/,le=/[^\x20-\x7E]/,Ee=/[\x2E\u3002\uFF0E\uFF61]/g,Xe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Fe=Math.floor,S=String.fromCharCode;function A($e){throw new RangeError(Xe[$e])}function L($e,ae){for(var Ce=$e.length,Ie=[];Ce--;)Ie[Ce]=ae($e[Ce]);return Ie}function j($e,ae){var Ce=$e.split("@"),Ie="";return Ce.length>1&&(Ie=Ce[0]+"@",$e=Ce[1]),Ie+L(($e=$e.replace(Ee,".")).split("."),ae).join(".")}function D($e){for(var ae,Ce,Ie=[],H=0,be=$e.length;H<be;)(ae=$e.charCodeAt(H++))>=55296&&ae<=56319&&H<be?(64512&(Ce=$e.charCodeAt(H++)))==56320?Ie.push(((1023&ae)<<10)+(1023&Ce)+65536):(Ie.push(ae),H--):Ie.push(ae);return Ie}function z($e){return L($e,function(ae){var Ce="";return ae>65535&&(Ce+=S((ae-=65536)>>>10&1023|55296),ae=56320|1023&ae),Ce+=S(ae)}).join("")}function W($e,ae){return $e+22+75*($e<26)-((ae!=0)<<5)}function ee($e,ae,Ce){var Ie=0;for($e=Ce?Fe($e/700):$e>>1,$e+=Fe($e/ae);$e>455;Ie+=36)$e=Fe($e/35);return Fe(Ie+36*$e/($e+38))}function et($e){var ae,Ce,Ie,H,be,Me,Oe,Se,Ue,qe,at,rt=[],Qt=$e.length,lt=0,en=128,Bt=72;for((Ce=$e.lastIndexOf("-"))<0&&(Ce=0),Ie=0;Ie<Ce;++Ie)$e.charCodeAt(Ie)>=128&&A("not-basic"),rt.push($e.charCodeAt(Ie));for(H=Ce>0?Ce+1:0;H<Qt;){for(be=lt,Me=1,Oe=36;H>=Qt&&A("invalid-input"),((Se=(at=$e.charCodeAt(H++))-48<10?at-22:at-65<26?at-65:at-97<26?at-97:36)>=36||Se>Fe((X-lt)/Me))&&A("overflow"),lt+=Se*Me,!(Se<(Ue=Oe<=Bt?1:Oe>=Bt+26?26:Oe-Bt));Oe+=36)Me>Fe(X/(qe=36-Ue))&&A("overflow"),Me*=qe;Bt=ee(lt-be,ae=rt.length+1,be==0),Fe(lt/ae)>X-en&&A("overflow"),en+=Fe(lt/ae),lt%=ae,rt.splice(lt++,0,en)}return z(rt)}function ft($e){var ae,Ce,Ie,H,be,Me,Oe,Se,Ue,qe,at,rt,Qt,lt,en,Bt=[];for(rt=($e=D($e)).length,ae=128,Ce=0,be=72,Me=0;Me<rt;++Me)(at=$e[Me])<128&&Bt.push(S(at));for(Ie=H=Bt.length,H&&Bt.push("-");Ie<rt;){for(Oe=X,Me=0;Me<rt;++Me)(at=$e[Me])>=ae&&at<Oe&&(Oe=at);for(Oe-ae>Fe((X-Ce)/(Qt=Ie+1))&&A("overflow"),Ce+=(Oe-ae)*Qt,ae=Oe,Me=0;Me<rt;++Me)if((at=$e[Me])<ae&&++Ce>X&&A("overflow"),at==ae){for(Se=Ce,Ue=36;!(Se<(qe=Ue<=be?1:Ue>=be+26?26:Ue-be));Ue+=36)en=Se-qe,lt=36-qe,Bt.push(S(W(qe+en%lt,0))),Se=Fe(en/lt);Bt.push(S(W(Se,0))),be=ee(Ce,Qt,Ie==H),Ce=0,++Ie}++Ce,++ae}return Bt.join("")}oe={version:"1.4.1",ucs2:{decode:D,encode:z},decode:et,encode:ft,toASCII:function($e){return j($e,function(ae){return le.test(ae)?"xn--"+ft(ae):ae})},toUnicode:function($e){return j($e,function(ae){return K.test(ae)?et(ae.slice(4).toLowerCase()):ae})}},(B=function(){return oe}.call(O,v,O,b))===void 0||(b.exports=B)})()}).call(this,v(8)(I),v(4))},function(I,O,v){I.exports={isString:function(b){return typeof b=="string"},isObject:function(b){return typeof b=="object"&&b!==null},isNull:function(b){return b===null},isNullOrUndefined:function(b){return b==null}}},function(I,O,v){O.decode=O.parse=v(24),O.encode=O.stringify=v(25)},function(I,O,v){function b(B,ie){return Object.prototype.hasOwnProperty.call(B,ie)}I.exports=function(B,ie,k,oe){ie=ie||"&",k=k||"=";var X={};if(typeof B!="string"||B.length===0)return X;var K=/\+/g;B=B.split(ie);var le=1e3;oe&&typeof oe.maxKeys=="number"&&(le=oe.maxKeys);var Ee=B.length;le>0&&Ee>le&&(Ee=le);for(var Xe=0;Xe<Ee;++Xe){var Fe,S,A,L,j=B[Xe].replace(K,"%20"),D=j.indexOf(k);D>=0?(Fe=j.substr(0,D),S=j.substr(D+1)):(Fe=j,S=""),A=decodeURIComponent(Fe),L=decodeURIComponent(S),b(X,A)?q(X[A])?X[A].push(L):X[A]=[X[A],L]:X[A]=L}return X};var q=Array.isArray||function(B){return Object.prototype.toString.call(B)==="[object Array]"}},function(I,O,v){var b=function(k){switch(typeof k){case"string":return k;case"boolean":return k?"true":"false";case"number":return isFinite(k)?k:"";default:return""}};I.exports=function(k,oe,X,K){return oe=oe||"&",X=X||"=",k===null&&(k=void 0),typeof k=="object"?B(ie(k),function(le){var Ee=encodeURIComponent(b(le))+X;return q(k[le])?B(k[le],function(Xe){return Ee+encodeURIComponent(b(Xe))}).join(oe):Ee+encodeURIComponent(b(k[le]))}).join(oe):K?encodeURIComponent(b(K))+X+encodeURIComponent(b(k)):""};var q=Array.isArray||function(k){return Object.prototype.toString.call(k)==="[object Array]"};function B(k,oe){if(k.map)return k.map(oe);for(var X=[],K=0;K<k.length;K++)X.push(oe(k[K],K));return X}var ie=Object.keys||function(k){var oe=[];for(var X in k)Object.prototype.hasOwnProperty.call(k,X)&&oe.push(X);return oe}},function(I,O){var v=function(){};v.prototype={fit:function(b){var q,B,ie,k,oe=b.length,X=oe>0?b[0].width:0,K=oe>0?b[0].height:0;for(this.root={x:0,y:0,width:X,height:K},q=0;q<oe;q++)ie=b[q],(B=this.findNode(this.root,ie.width,ie.height))?(k=this.splitNode(B,ie.width,ie.height),ie.x=k.x,ie.y=k.y):(k=this.growNode(ie.width,ie.height),ie.x=k.x,ie.y=k.y)},findNode:function(b,q,B){return b.used?this.findNode(b.right,q,B)||this.findNode(b.down,q,B):q<=b.width&&B<=b.height?b:null},splitNode:function(b,q,B){return b.used=!0,b.down={x:b.x,y:b.y+B,width:b.width,height:b.height-B},b.right={x:b.x+q,y:b.y,width:b.width-q,height:B},b},growNode:function(b,q){var B=b<=this.root.width,ie=q<=this.root.height,k=ie&&this.root.height>=this.root.width+b,oe=B&&this.root.width>=this.root.height+q;return k?this.growRight(b,q):oe?this.growDown(b,q):ie?this.growRight(b,q):B?this.growDown(b,q):null},growRight:function(b,q){var B;return this.root={used:!0,x:0,y:0,width:this.root.width+b,height:this.root.height,down:this.root,right:{x:this.root.width,y:0,width:b,height:this.root.height}},(B=this.findNode(this.root,b,q))?this.splitNode(B,b,q):null},growDown:function(b,q){var B;return this.root={used:!0,x:0,y:0,width:this.root.width,height:this.root.height+q,down:{x:0,y:this.root.height,width:this.root.width,height:q},right:this.root},(B=this.findNode(this.root,b,q))?this.splitNode(B,b,q):null}},I.exports=v},function(I,O,v){v.r(O),v.d(O,"SLIDE_EVENTS",function(){return dr}),v.d(O,"Slide",function(){return QC});var b={};v.r(b),v.d(b,"ACESFilmicToneMapping",function(){return Gp}),v.d(b,"AddEquation",function(){return Me}),v.d(b,"AddOperation",function(){return Fp}),v.d(b,"AdditiveAnimationBlendMode",function(){return we}),v.d(b,"AdditiveBlending",function(){return Ce}),v.d(b,"AlphaFormat",function(){return _n}),v.d(b,"AlwaysDepth",function(){return yn}),v.d(b,"AlwaysStencilFunc",function(){return Tl}),v.d(b,"AmbientLight",function(){return pm}),v.d(b,"AmbientLightProbe",function(){return sx}),v.d(b,"AnimationClip",function(){return Od}),v.d(b,"AnimationLoader",function(){return HE}),v.d(b,"AnimationMixer",function(){return gx}),v.d(b,"AnimationObjectGroup",function(){return mx}),v.d(b,"AnimationUtils",function(){return Gn}),v.d(b,"ArcCurve",function(){return Hr}),v.d(b,"ArrayCamera",function(){return bd}),v.d(b,"ArrowHelper",function(){return yM}),v.d(b,"Audio",function(){return Yv}),v.d(b,"AudioAnalyser",function(){return px}),v.d(b,"AudioContext",function(){return Xv}),v.d(b,"AudioListener",function(){return ZE}),v.d(b,"AudioLoader",function(){return rx}),v.d(b,"AxesHelper",function(){return Ox}),v.d(b,"AxisHelper",function(){return JM}),v.d(b,"BackSide",function(){return W}),v.d(b,"BasicDepthPacking",function(){return bl}),v.d(b,"BasicShadowMap",function(){return A}),v.d(b,"BinaryTextureLoader",function(){return tA}),v.d(b,"Bone",function(){return Ih}),v.d(b,"BooleanKeyframeTrack",function(){return Kl}),v.d(b,"BoundingBoxHelper",function(){return $M}),v.d(b,"Box2",function(){return qh}),v.d(b,"Box3",function(){return In}),v.d(b,"Box3Helper",function(){return vM}),v.d(b,"BoxBufferGeometry",function(){return no}),v.d(b,"BoxGeometry",function(){return no}),v.d(b,"BoxHelper",function(){return Ix}),v.d(b,"BufferAttribute",function(){return Zt}),v.d(b,"BufferGeometry",function(){return Mt}),v.d(b,"BufferGeometryLoader",function(){return Qy}),v.d(b,"ByteType",function(){return jp}),v.d(b,"Cache",function(){return eu}),v.d(b,"Camera",function(){return Ws}),v.d(b,"CameraHelper",function(){return gM}),v.d(b,"CanvasRenderer",function(){return iA}),v.d(b,"CanvasTexture",function(){return Ct}),v.d(b,"CatmullRomCurve3",function(){return Fh}),v.d(b,"CineonToneMapping",function(){return kp}),v.d(b,"CircleBufferGeometry",function(){return nt}),v.d(b,"CircleGeometry",function(){return nt}),v.d(b,"ClampToEdgeWrapping",function(){return gi}),v.d(b,"Clock",function(){return ux}),v.d(b,"Color",function(){return gt}),v.d(b,"ColorKeyframeTrack",function(){return Ov}),v.d(b,"CompressedTexture",function(){return yt}),v.d(b,"CompressedTextureLoader",function(){return zE}),v.d(b,"ConeBufferGeometry",function(){return mt}),v.d(b,"ConeGeometry",function(){return mt}),v.d(b,"CubeCamera",function(){return Xs}),v.d(b,"CubeReflectionMapping",function(){return zo}),v.d(b,"CubeRefractionMapping",function(){return hl}),v.d(b,"CubeTexture",function(){return kr}),v.d(b,"CubeTextureLoader",function(){return zy}),v.d(b,"CubeUVReflectionMapping",function(){return va}),v.d(b,"CubeUVRefractionMapping",function(){return _a}),v.d(b,"CubicBezierCurve",function(){return na}),v.d(b,"CubicBezierCurve3",function(){return Xa}),v.d(b,"CubicInterpolant",function(){return Uy}),v.d(b,"CullFaceBack",function(){return Xe}),v.d(b,"CullFaceFront",function(){return Fe}),v.d(b,"CullFaceFrontBack",function(){return S}),v.d(b,"CullFaceNone",function(){return Ee}),v.d(b,"Curve",function(){return Yn}),v.d(b,"CurvePath",function(){return jy}),v.d(b,"CustomBlending",function(){return be}),v.d(b,"CustomToneMapping",function(){return Hp}),v.d(b,"CylinderBufferGeometry",function(){return Et}),v.d(b,"CylinderGeometry",function(){return Et}),v.d(b,"Cylindrical",function(){return uM}),v.d(b,"DataTexture",function(){return os}),v.d(b,"DataTexture2DArray",function(){return vh}),v.d(b,"DataTexture3D",function(){return wr}),v.d(b,"DataTextureLoader",function(){return Vy}),v.d(b,"DataUtils",function(){return bM}),v.d(b,"DecrementStencilOp",function(){return Yu}),v.d(b,"DecrementWrapStencilOp",function(){return Fg}),v.d(b,"DefaultLoadingManager",function(){return Hy}),v.d(b,"DepthFormat",function(){return Nn}),v.d(b,"DepthStencilFormat",function(){return Cs}),v.d(b,"DepthTexture",function(){return Je}),v.d(b,"DirectionalLight",function(){return dm}),v.d(b,"DirectionalLightHelper",function(){return mM}),v.d(b,"DiscreteInterpolant",function(){return ky}),v.d(b,"DodecahedronBufferGeometry",function(){return It}),v.d(b,"DodecahedronGeometry",function(){return It}),v.d(b,"DoubleSide",function(){return ee}),v.d(b,"DstAlphaFactor",function(){return Vt}),v.d(b,"DstColorFactor",function(){return Dn}),v.d(b,"DynamicBufferAttribute",function(){return GM}),v.d(b,"DynamicCopyUsage",function(){return Ku}),v.d(b,"DynamicDrawUsage",function(){return Zr}),v.d(b,"DynamicReadUsage",function(){return Ug}),v.d(b,"EdgesGeometry",function(){return Mi}),v.d(b,"EdgesHelper",function(){return KM}),v.d(b,"EllipseCurve",function(){return kn}),v.d(b,"EqualDepth",function(){return Ci}),v.d(b,"EqualStencilFunc",function(){return Zu}),v.d(b,"EquirectangularReflectionMapping",function(){return cl}),v.d(b,"EquirectangularRefractionMapping",function(){return dl}),v.d(b,"Euler",function(){return Us}),v.d(b,"EventDispatcher",function(){return _o}),v.d(b,"ExtrudeBufferGeometry",function(){return Co}),v.d(b,"ExtrudeGeometry",function(){return Co}),v.d(b,"FaceColors",function(){return CM}),v.d(b,"FileLoader",function(){return Lo}),v.d(b,"FlatShading",function(){return et}),v.d(b,"Float16BufferAttribute",function(){return gf}),v.d(b,"Float32Attribute",function(){return qM}),v.d(b,"Float32BufferAttribute",function(){return st}),v.d(b,"Float64Attribute",function(){return ZM}),v.d(b,"Float64BufferAttribute",function(){return ed}),v.d(b,"FloatType",function(){return po}),v.d(b,"Fog",function(){return Hl}),v.d(b,"FogExp2",function(){return yi}),v.d(b,"Font",function(){return Wv}),v.d(b,"FontLoader",function(){return XE}),v.d(b,"FrontSide",function(){return z}),v.d(b,"Frustum",function(){return Ba}),v.d(b,"GLBufferAttribute",function(){return _x}),v.d(b,"GLSL1",function(){return Gc}),v.d(b,"GLSL3",function(){return Hc}),v.d(b,"GammaEncoding",function(){return Vn}),v.d(b,"GreaterDepth",function(){return Lr}),v.d(b,"GreaterEqualDepth",function(){return ji}),v.d(b,"GreaterEqualStencilFunc",function(){return uf}),v.d(b,"GreaterStencilFunc",function(){return Ju}),v.d(b,"GridHelper",function(){return Px}),v.d(b,"Group",function(){return Js}),v.d(b,"HalfFloatType",function(){return Ps}),v.d(b,"HemisphereLight",function(){return Fv}),v.d(b,"HemisphereLightHelper",function(){return pM}),v.d(b,"HemisphereLightProbe",function(){return ox}),v.d(b,"IcosahedronBufferGeometry",function(){return Uh}),v.d(b,"IcosahedronGeometry",function(){return Uh}),v.d(b,"ImageBitmapLoader",function(){return nx}),v.d(b,"ImageLoader",function(){return Dd}),v.d(b,"ImageUtils",function(){return gr}),v.d(b,"ImmediateRenderObject",function(){return Tx}),v.d(b,"IncrementStencilOp",function(){return sf}),v.d(b,"IncrementWrapStencilOp",function(){return Ng}),v.d(b,"InstancedBufferAttribute",function(){return jv}),v.d(b,"InstancedBufferGeometry",function(){return Vv}),v.d(b,"InstancedInterleavedBuffer",function(){return vx}),v.d(b,"InstancedMesh",function(){return Sd}),v.d(b,"Int16Attribute",function(){return jM}),v.d(b,"Int16BufferAttribute",function(){return Qc}),v.d(b,"Int32Attribute",function(){return XM}),v.d(b,"Int32BufferAttribute",function(){return ph}),v.d(b,"Int8Attribute",function(){return HM}),v.d(b,"Int8BufferAttribute",function(){return Il}),v.d(b,"IntType",function(){return Xp}),v.d(b,"InterleavedBuffer",function(){return $s}),v.d(b,"InterleavedBufferAttribute",function(){return Po}),v.d(b,"Interpolant",function(){return ra}),v.d(b,"InterpolateDiscrete",function(){return Xo}),v.d(b,"InterpolateLinear",function(){return _l}),v.d(b,"InterpolateSmooth",function(){return vo}),v.d(b,"InvertStencilOp",function(){return Bg}),v.d(b,"JSONLoader",function(){return rA}),v.d(b,"KeepStencilOp",function(){return un}),v.d(b,"KeyframeTrack",function(){return Ro}),v.d(b,"LOD",function(){return $f}),v.d(b,"LatheBufferGeometry",function(){return kh}),v.d(b,"LatheGeometry",function(){return kh}),v.d(b,"Layers",function(){return Wc}),v.d(b,"LensFlare",function(){return sA}),v.d(b,"LessDepth",function(){return li}),v.d(b,"LessEqualDepth",function(){return Bi}),v.d(b,"LessEqualStencilFunc",function(){return af}),v.d(b,"LessStencilFunc",function(){return qo}),v.d(b,"Light",function(){return Oo}),v.d(b,"LightProbe",function(){return Fd}),v.d(b,"Line",function(){return h}),v.d(b,"Line3",function(){return wx}),v.d(b,"LineBasicMaterial",function(){return xi}),v.d(b,"LineCurve",function(){return Ya}),v.d(b,"LineCurve3",function(){return ql}),v.d(b,"LineDashedMaterial",function(){return Iv}),v.d(b,"LineLoop",function(){return P}),v.d(b,"LinePieces",function(){return AM}),v.d(b,"LineSegments",function(){return E}),v.d(b,"LineStrip",function(){return MM}),v.d(b,"LinearEncoding",function(){return wt}),v.d(b,"LinearFilter",function(){return $n}),v.d(b,"LinearInterpolant",function(){return Lv}),v.d(b,"LinearMipMapLinearFilter",function(){return Vp}),v.d(b,"LinearMipMapNearestFilter",function(){return zp}),v.d(b,"LinearMipmapLinearFilter",function(){return Ms}),v.d(b,"LinearMipmapNearestFilter",function(){return jo}),v.d(b,"LinearToneMapping",function(){return Bp}),v.d(b,"Loader",function(){return $i}),v.d(b,"LoaderUtils",function(){return fm}),v.d(b,"LoadingManager",function(){return Dv}),v.d(b,"LogLuvEncoding",function(){return xn}),v.d(b,"LoopOnce",function(){return Wu}),v.d(b,"LoopPingPong",function(){return go}),v.d(b,"LoopRepeat",function(){return Bc}),v.d(b,"LuminanceAlphaFormat",function(){return Tc}),v.d(b,"LuminanceFormat",function(){return Jp}),v.d(b,"MOUSE",function(){return K}),v.d(b,"Material",function(){return _i}),v.d(b,"MaterialLoader",function(){return Ky}),v.d(b,"Math",function(){return Ns}),v.d(b,"MathUtils",function(){return Ns}),v.d(b,"Matrix3",function(){return En}),v.d(b,"Matrix4",function(){return pt}),v.d(b,"MaxEquation",function(){return qe}),v.d(b,"Mesh",function(){return ln}),v.d(b,"MeshBasicMaterial",function(){return Qn}),v.d(b,"MeshDepthMaterial",function(){return on}),v.d(b,"MeshDistanceMaterial",function(){return Sh}),v.d(b,"MeshFaceMaterial",function(){return IM}),v.d(b,"MeshLambertMaterial",function(){return cm}),v.d(b,"MeshMatcapMaterial",function(){return Rv}),v.d(b,"MeshNormalMaterial",function(){return Cv}),v.d(b,"MeshPhongMaterial",function(){return hm}),v.d(b,"MeshPhysicalMaterial",function(){return Av}),v.d(b,"MeshStandardMaterial",function(){return um}),v.d(b,"MeshToonMaterial",function(){return Pv}),v.d(b,"MinEquation",function(){return Ue}),v.d(b,"MirroredRepeatWrapping",function(){return pl}),v.d(b,"MixOperation",function(){return Np}),v.d(b,"MultiMaterial",function(){return LM}),v.d(b,"MultiplyBlending",function(){return H}),v.d(b,"MultiplyOperation",function(){return ul}),v.d(b,"NearestFilter",function(){return Jn}),v.d(b,"NearestMipMapLinearFilter",function(){return wc}),v.d(b,"NearestMipMapNearestFilter",function(){return bc}),v.d(b,"NearestMipmapLinearFilter",function(){return ml}),v.d(b,"NearestMipmapNearestFilter",function(){return fl}),v.d(b,"NeverDepth",function(){return Zn}),v.d(b,"NeverStencilFunc",function(){return qu}),v.d(b,"NoBlending",function(){return $e}),v.d(b,"NoColors",function(){return PM}),v.d(b,"NoToneMapping",function(){return co}),v.d(b,"NormalAnimationBlendMode",function(){return Ls}),v.d(b,"NormalBlending",function(){return ae}),v.d(b,"NotEqualDepth",function(){return Dp}),v.d(b,"NotEqualStencilFunc",function(){return lf}),v.d(b,"NumberKeyframeTrack",function(){return Id}),v.d(b,"Object3D",function(){return Xt}),v.d(b,"ObjectLoader",function(){return VE}),v.d(b,"ObjectSpaceNormalMap",function(){return wl}),v.d(b,"OctahedronBufferGeometry",function(){return Zl}),v.d(b,"OctahedronGeometry",function(){return Zl}),v.d(b,"OneFactor",function(){return rt}),v.d(b,"OneMinusDstAlphaFactor",function(){return bt}),v.d(b,"OneMinusDstColorFactor",function(){return wn}),v.d(b,"OneMinusSrcAlphaFactor",function(){return Bt}),v.d(b,"OneMinusSrcColorFactor",function(){return lt}),v.d(b,"OrthographicCamera",function(){return Yh}),v.d(b,"PCFShadowMap",function(){return L}),v.d(b,"PCFSoftShadowMap",function(){return j}),v.d(b,"PMREMGenerator",function(){return TM}),v.d(b,"ParametricBufferGeometry",function(){return Rd}),v.d(b,"ParametricGeometry",function(){return Rd}),v.d(b,"Particle",function(){return DM}),v.d(b,"ParticleBasicMaterial",function(){return BM}),v.d(b,"ParticleSystem",function(){return NM}),v.d(b,"ParticleSystemMaterial",function(){return UM}),v.d(b,"Path",function(){return tu}),v.d(b,"PerspectiveCamera",function(){return ei}),v.d(b,"Plane",function(){return br}),v.d(b,"PlaneBufferGeometry",function(){return Li}),v.d(b,"PlaneGeometry",function(){return Li}),v.d(b,"PlaneHelper",function(){return _M}),v.d(b,"PointCloud",function(){return OM}),v.d(b,"PointCloudMaterial",function(){return FM}),v.d(b,"PointLight",function(){return Gv}),v.d(b,"PointLightHelper",function(){return cM}),v.d(b,"Points",function(){return ze}),v.d(b,"PointsMaterial",function(){return V}),v.d(b,"PolarGridHelper",function(){return fM}),v.d(b,"PolyhedronBufferGeometry",function(){return St}),v.d(b,"PolyhedronGeometry",function(){return St}),v.d(b,"PositionalAudio",function(){return $E}),v.d(b,"PropertyBinding",function(){return cn}),v.d(b,"PropertyMixer",function(){return fx}),v.d(b,"QuadraticBezierCurve",function(){return ia}),v.d(b,"QuadraticBezierCurve3",function(){return bv}),v.d(b,"Quaternion",function(){return vi}),v.d(b,"QuaternionKeyframeTrack",function(){return Xh}),v.d(b,"QuaternionLinearInterpolant",function(){return Gy}),v.d(b,"REVISION",function(){return X}),v.d(b,"RGBADepthPacking",function(){return kc}),v.d(b,"RGBAFormat",function(){return tr}),v.d(b,"RGBAIntegerFormat",function(){return Mc}),v.d(b,"RGBA_ASTC_10x10_Format",function(){return Ic}),v.d(b,"RGBA_ASTC_10x5_Format",function(){return vl}),v.d(b,"RGBA_ASTC_10x6_Format",function(){return Rs}),v.d(b,"RGBA_ASTC_10x8_Format",function(){return ef}),v.d(b,"RGBA_ASTC_12x10_Format",function(){return Lc}),v.d(b,"RGBA_ASTC_12x12_Format",function(){return Gu}),v.d(b,"RGBA_ASTC_4x4_Format",function(){return Bu}),v.d(b,"RGBA_ASTC_5x4_Format",function(){return Tn}),v.d(b,"RGBA_ASTC_5x5_Format",function(){return mo}),v.d(b,"RGBA_ASTC_6x5_Format",function(){return Uu}),v.d(b,"RGBA_ASTC_6x6_Format",function(){return Kp}),v.d(b,"RGBA_ASTC_8x5_Format",function(){return ku}),v.d(b,"RGBA_ASTC_8x6_Format",function(){return Qp}),v.d(b,"RGBA_ASTC_8x8_Format",function(){return Rc}),v.d(b,"RGBA_BPTC_Format",function(){return Hu}),v.d(b,"RGBA_ETC2_EAC_Format",function(){return xa}),v.d(b,"RGBA_PVRTC_2BPPV1_Format",function(){return Pc}),v.d(b,"RGBA_PVRTC_4BPPV1_Format",function(){return Wi}),v.d(b,"RGBA_S3TC_DXT1_Format",function(){return Du}),v.d(b,"RGBA_S3TC_DXT3_Format",function(){return Nu}),v.d(b,"RGBA_S3TC_DXT5_Format",function(){return Fu}),v.d(b,"RGBDEncoding",function(){return Yi}),v.d(b,"RGBEEncoding",function(){return ir}),v.d(b,"RGBEFormat",function(){return $p}),v.d(b,"RGBFormat",function(){return fo}),v.d(b,"RGBIntegerFormat",function(){return Ec}),v.d(b,"RGBM16Encoding",function(){return Uc}),v.d(b,"RGBM7Encoding",function(){return xl}),v.d(b,"RGB_ETC1_Format",function(){return Cc}),v.d(b,"RGB_ETC2_Format",function(){return qr}),v.d(b,"RGB_PVRTC_2BPPV1_Format",function(){return Ac}),v.d(b,"RGB_PVRTC_4BPPV1_Format",function(){return Ui}),v.d(b,"RGB_S3TC_DXT1_Format",function(){return Ou}),v.d(b,"RGFormat",function(){return Lu}),v.d(b,"RGIntegerFormat",function(){return nr}),v.d(b,"RawShaderMaterial",function(){return Wh}),v.d(b,"Ray",function(){return To}),v.d(b,"Raycaster",function(){return aM}),v.d(b,"RectAreaLight",function(){return Hv}),v.d(b,"RedFormat",function(){return ya}),v.d(b,"RedIntegerFormat",function(){return Sc}),v.d(b,"ReinhardToneMapping",function(){return Up}),v.d(b,"RepeatWrapping",function(){return Vo}),v.d(b,"ReplaceStencilOp",function(){return Dg}),v.d(b,"ReverseSubtractEquation",function(){return Se}),v.d(b,"RingBufferGeometry",function(){return Gh}),v.d(b,"RingGeometry",function(){return Gh}),v.d(b,"SRGB8_ALPHA8_ASTC_10x10_Format",function(){return rf}),v.d(b,"SRGB8_ALPHA8_ASTC_10x5_Format",function(){return Fc}),v.d(b,"SRGB8_ALPHA8_ASTC_10x6_Format",function(){return tf}),v.d(b,"SRGB8_ALPHA8_ASTC_10x8_Format",function(){return nf}),v.d(b,"SRGB8_ALPHA8_ASTC_12x10_Format",function(){return of}),v.d(b,"SRGB8_ALPHA8_ASTC_12x12_Format",function(){return Is}),v.d(b,"SRGB8_ALPHA8_ASTC_4x4_Format",function(){return Oc}),v.d(b,"SRGB8_ALPHA8_ASTC_5x4_Format",function(){return zu}),v.d(b,"SRGB8_ALPHA8_ASTC_5x5_Format",function(){return Vu}),v.d(b,"SRGB8_ALPHA8_ASTC_6x5_Format",function(){return Dc}),v.d(b,"SRGB8_ALPHA8_ASTC_6x6_Format",function(){return Xi}),v.d(b,"SRGB8_ALPHA8_ASTC_8x5_Format",function(){return ju}),v.d(b,"SRGB8_ALPHA8_ASTC_8x6_Format",function(){return ba}),v.d(b,"SRGB8_ALPHA8_ASTC_8x8_Format",function(){return Nc}),v.d(b,"Scene",function(){return Ga}),v.d(b,"SceneUtils",function(){return oA}),v.d(b,"ShaderChunk",function(){return Lt}),v.d(b,"ShaderLib",function(){return ar}),v.d(b,"ShaderMaterial",function(){return Gi}),v.d(b,"ShadowMaterial",function(){return Mv}),v.d(b,"Shape",function(){return Za}),v.d(b,"ShapeBufferGeometry",function(){return Jl}),v.d(b,"ShapeGeometry",function(){return Jl}),v.d(b,"ShapePath",function(){return ix}),v.d(b,"ShapeUtils",function(){return us}),v.d(b,"ShortType",function(){return Wp}),v.d(b,"Skeleton",function(){return Lh}),v.d(b,"SkeletonHelper",function(){return Ex}),v.d(b,"SkinnedMesh",function(){return Va}),v.d(b,"SmoothShading",function(){return ft}),v.d(b,"Sphere",function(){return ui}),v.d(b,"SphereBufferGeometry",function(){return $l}),v.d(b,"SphereGeometry",function(){return $l}),v.d(b,"Spherical",function(){return lM}),v.d(b,"SphericalHarmonics3",function(){return zv}),v.d(b,"SplineCurve",function(){return rm}),v.d(b,"SpotLight",function(){return Uv}),v.d(b,"SpotLightHelper",function(){return hM}),v.d(b,"Sprite",function(){return Xl}),v.d(b,"SpriteMaterial",function(){return zl}),v.d(b,"SrcAlphaFactor",function(){return en}),v.d(b,"SrcAlphaSaturateFactor",function(){return gn}),v.d(b,"SrcColorFactor",function(){return Qt}),v.d(b,"StaticCopyUsage",function(){return Gg}),v.d(b,"StaticDrawUsage",function(){return Os}),v.d(b,"StaticReadUsage",function(){return $u}),v.d(b,"StereoCamera",function(){return YE}),v.d(b,"StreamCopyUsage",function(){return Qu}),v.d(b,"StreamDrawUsage",function(){return Ds}),v.d(b,"StreamReadUsage",function(){return kg}),v.d(b,"StringKeyframeTrack",function(){return Ql}),v.d(b,"SubtractEquation",function(){return Oe}),v.d(b,"SubtractiveBlending",function(){return Ie}),v.d(b,"TOUCH",function(){return le}),v.d(b,"TangentSpaceNormalMap",function(){return mr}),v.d(b,"TetrahedronBufferGeometry",function(){return Hh}),v.d(b,"TetrahedronGeometry",function(){return Hh}),v.d(b,"TextBufferGeometry",function(){return lm}),v.d(b,"TextGeometry",function(){return lm}),v.d(b,"Texture",function(){return Kn}),v.d(b,"TextureLoader",function(){return Nv}),v.d(b,"TorusBufferGeometry",function(){return zh}),v.d(b,"TorusGeometry",function(){return zh}),v.d(b,"TorusKnotBufferGeometry",function(){return Vh}),v.d(b,"TorusKnotGeometry",function(){return Vh}),v.d(b,"Triangle",function(){return Mn}),v.d(b,"TriangleFanDrawMode",function(){return ct}),v.d(b,"TriangleStripDrawMode",function(){return Ze}),v.d(b,"TrianglesDrawMode",function(){return je}),v.d(b,"TubeBufferGeometry",function(){return jh}),v.d(b,"TubeGeometry",function(){return jh}),v.d(b,"UVMapping",function(){return Iu}),v.d(b,"Uint16Attribute",function(){return WM}),v.d(b,"Uint16BufferAttribute",function(){return Ra}),v.d(b,"Uint32Attribute",function(){return YM}),v.d(b,"Uint32BufferAttribute",function(){return Ur}),v.d(b,"Uint8Attribute",function(){return zM}),v.d(b,"Uint8BufferAttribute",function(){return Kc}),v.d(b,"Uint8ClampedAttribute",function(){return VM}),v.d(b,"Uint8ClampedBufferAttribute",function(){return dh}),v.d(b,"Uniform",function(){return gm}),v.d(b,"UniformsLib",function(){return dt}),v.d(b,"UniformsUtils",function(){return io}),v.d(b,"UnsignedByteType",function(){return Wo}),v.d(b,"UnsignedInt248Type",function(){return dn}),v.d(b,"UnsignedIntType",function(){return As}),v.d(b,"UnsignedShort4444Type",function(){return Yp}),v.d(b,"UnsignedShort5551Type",function(){return qp}),v.d(b,"UnsignedShort565Type",function(){return Zp}),v.d(b,"UnsignedShortType",function(){return gl}),v.d(b,"VSMShadowMap",function(){return D}),v.d(b,"Vector2",function(){return Qe}),v.d(b,"Vector3",function(){return T}),v.d(b,"Vector4",function(){return pn}),v.d(b,"VectorKeyframeTrack",function(){return Ld}),v.d(b,"Vertex",function(){return kM}),v.d(b,"VertexColors",function(){return RM}),v.d(b,"VideoTexture",function(){return vt}),v.d(b,"WebGL1Renderer",function(){return di}),v.d(b,"WebGLCubeRenderTarget",function(){return Pt}),v.d(b,"WebGLMultipleRenderTargets",function(){return Ml}),v.d(b,"WebGLMultisampleRenderTarget",function(){return Fs}),v.d(b,"WebGLRenderTarget",function(){return Or}),v.d(b,"WebGLRenderTargetCube",function(){return nA}),v.d(b,"WebGLRenderer",function(){return fn}),v.d(b,"WebGLUtils",function(){return Yf}),v.d(b,"WireframeGeometry",function(){return Ev}),v.d(b,"WireframeHelper",function(){return QM}),v.d(b,"WrapAroundEnding",function(){return yl}),v.d(b,"XHRLoader",function(){return eA}),v.d(b,"ZeroCurvatureEnding",function(){return wi}),v.d(b,"ZeroFactor",function(){return at}),v.d(b,"ZeroSlopeEnding",function(){return Yo}),v.d(b,"ZeroStencilOp",function(){return Xu}),v.d(b,"sRGBEncoding",function(){return $t});var q={};v.r(q),v.d(q,"isMobile",function(){return ao}),v.d(q,"EventEmitter",function(){return Kh.a}),v.d(q,"earcut",function(){return c0.a}),v.d(q,"BaseTextureCache",function(){return uo}),v.d(q,"CanvasRenderTarget",function(){return T0}),v.d(q,"DATA_URI",function(){return S1}),v.d(q,"ProgramCache",function(){return w0}),v.d(q,"TextureCache",function(){return Ar}),v.d(q,"clearTextureCache",function(){return MA}),v.d(q,"correctBlendMode",function(){return _0}),v.d(q,"createIndicesForQuads",function(){return x1}),v.d(q,"decomposeDataUri",function(){return AA}),v.d(q,"deprecation",function(){return fu}),v.d(q,"destroyTextureCache",function(){return EA}),v.d(q,"determineCrossOrigin",function(){return E1}),v.d(q,"getBufferType",function(){return b1}),v.d(q,"getResolutionOfUrl",function(){return Vd}),v.d(q,"hex2rgb",function(){return hu}),v.d(q,"hex2string",function(){return m0}),v.d(q,"interleaveTypedArrays",function(){return TA}),v.d(q,"isPow2",function(){return x0}),v.d(q,"isWebGLSupported",function(){return _1}),v.d(q,"log2",function(){return b0}),v.d(q,"nextPow2",function(){return zd}),v.d(q,"premultiplyBlendMode",function(){return v0}),v.d(q,"premultiplyRgba",function(){return y1}),v.d(q,"premultiplyTint",function(){return Pm}),v.d(q,"premultiplyTintToRgba",function(){return y0}),v.d(q,"removeItems",function(){return cu}),v.d(q,"rgb2hex",function(){return bA}),v.d(q,"sayHello",function(){return v1}),v.d(q,"sign",function(){return du}),v.d(q,"skipHello",function(){return yA}),v.d(q,"string2hex",function(){return g0}),v.d(q,"trimCanvas",function(){return T1}),v.d(q,"uid",function(){return pu}),v.d(q,"url",function(){return uu});var B={};v.r(B),v.d(B,"utils",function(){return q}),v.d(B,"AccessibilityManager",function(){return O1}),v.d(B,"accessibleTarget",function(){return L1}),v.d(B,"InteractionData",function(){return R0}),v.d(B,"InteractionEvent",function(){return F1}),v.d(B,"InteractionManager",function(){return U1}),v.d(B,"InteractionTrackingData",function(){return Im}),v.d(B,"interactiveTarget",function(){return B1}),v.d(B,"Application",function(){return Qd}),v.d(B,"AbstractBatchRenderer",function(){return fb}),v.d(B,"AbstractMultiResource",function(){return Dm}),v.d(B,"AbstractRenderer",function(){return cb}),v.d(B,"ArrayResource",function(){return I0}),v.d(B,"Attribute",function(){return B0}),v.d(B,"BaseImageResource",function(){return gs}),v.d(B,"BaseRenderTexture",function(){return N0}),v.d(B,"BaseTexture",function(){return vn}),v.d(B,"BatchDrawCall",function(){return Ym}),v.d(B,"BatchGeometry",function(){return r_}),v.d(B,"BatchPluginFactory",function(){return _b}),v.d(B,"BatchRenderer",function(){return yb}),v.d(B,"BatchShaderGenerator",function(){return mb}),v.d(B,"BatchSystem",function(){return H0}),v.d(B,"BatchTextureArray",function(){return qm}),v.d(B,"Buffer",function(){return Ni}),v.d(B,"BufferResource",function(){return Qh}),v.d(B,"CanvasResource",function(){return Nm}),v.d(B,"ContextSystem",function(){return z0}),v.d(B,"CubeResource",function(){return L0}),v.d(B,"Filter",function(){return Rr}),v.d(B,"FilterState",function(){return X1}),v.d(B,"FilterSystem",function(){return G0}),v.d(B,"Framebuffer",function(){return Um}),v.d(B,"FramebufferSystem",function(){return V0}),v.d(B,"GLFramebuffer",function(){return q1}),v.d(B,"GLProgram",function(){return lb}),v.d(B,"GLTexture",function(){return Xm}),v.d(B,"Geometry",function(){return bu}),v.d(B,"GeometrySystem",function(){return W0}),v.d(B,"IGLUniformData",function(){return XA}),v.d(B,"INSTALLED",function(){return Yd}),v.d(B,"ImageBitmapResource",function(){return D0}),v.d(B,"ImageResource",function(){return Fm}),v.d(B,"MaskData",function(){return Z1}),v.d(B,"MaskSystem",function(){return Y0}),v.d(B,"ObjectRenderer",function(){return qd}),v.d(B,"Program",function(){return $d}),v.d(B,"ProjectionSystem",function(){return J0}),v.d(B,"Quad",function(){return W1}),v.d(B,"QuadUv",function(){return U0}),v.d(B,"RenderTexture",function(){return zr}),v.d(B,"RenderTexturePool",function(){return z1}),v.d(B,"RenderTextureSystem",function(){return $0}),v.d(B,"Renderer",function(){return ua}),v.d(B,"Resource",function(){return xu}),v.d(B,"SVGResource",function(){return O0}),v.d(B,"ScissorSystem",function(){return q0}),v.d(B,"Shader",function(){return la}),v.d(B,"ShaderSystem",function(){return K0}),v.d(B,"SpriteMaskFilter",function(){return sb}),v.d(B,"State",function(){return Qa}),v.d(B,"StateSystem",function(){return Q0}),v.d(B,"StencilSystem",function(){return Z0}),v.d(B,"System",function(){return Cr}),v.d(B,"Texture",function(){return Nt}),v.d(B,"TextureGCSystem",function(){return e_}),v.d(B,"TextureMatrix",function(){return Wm}),v.d(B,"TextureSystem",function(){return t_}),v.d(B,"TextureUvs",function(){return F0}),v.d(B,"UniformGroup",function(){return Ka}),v.d(B,"VideoResource",function(){return Bm}),v.d(B,"ViewableBuffer",function(){return Zm}),v.d(B,"autoDetectRenderer",function(){return db}),v.d(B,"autoDetectResource",function(){return Om}),v.d(B,"checkMaxIfStatementsInShader",function(){return rb}),v.d(B,"defaultFilterVertex",function(){return i_}),v.d(B,"defaultVertex",function(){return pb}),v.d(B,"resources",function(){return xb}),v.d(B,"systems",function(){return bb}),v.d(B,"uniformParsers",function(){return Vm}),v.d(B,"Extract",function(){return Tb}),v.d(B,"AppLoaderPlugin",function(){return Lb}),v.d(B,"Loader",function(){return vs}),v.d(B,"LoaderResource",function(){return ho}),v.d(B,"TextureLoader",function(){return Ib}),v.d(B,"BlobResource",function(){return Nb}),v.d(B,"CompressedTextureLoader",function(){return Fb}),v.d(B,"CompressedTextureResource",function(){return Km}),v.d(B,"DDSLoader",function(){return Ub}),v.d(B,"FORMATS_TO_COMPONENTS",function(){return Gb}),v.d(B,"INTERNAL_FORMATS",function(){return Jt}),v.d(B,"INTERNAL_FORMAT_TO_BYTES_PER_PIXEL",function(){return ep}),v.d(B,"KTXLoader",function(){return zb}),v.d(B,"TYPES_TO_BYTES_PER_COMPONENT",function(){return u_}),v.d(B,"TYPES_TO_BYTES_PER_PIXEL",function(){return Hb}),v.d(B,"ParticleContainer",function(){return P2}),v.d(B,"ParticleRenderer",function(){return Xb}),v.d(B,"BasePrepare",function(){return aw}),v.d(B,"CountLimiter",function(){return sw}),v.d(B,"Prepare",function(){return uw}),v.d(B,"TimeLimiter",function(){return j2}),v.d(B,"Spritesheet",function(){return hw}),v.d(B,"SpritesheetLoader",function(){return cw}),v.d(B,"TilingSprite",function(){return W2}),v.d(B,"TilingSpriteRenderer",function(){return mw}),v.d(B,"BitmapFont",function(){return ac}),v.d(B,"BitmapFontData",function(){return ap}),v.d(B,"BitmapFontLoader",function(){return Sw}),v.d(B,"BitmapText",function(){return Z2}),v.d(B,"Ticker",function(){return Di}),v.d(B,"TickerPlugin",function(){return D1}),v.d(B,"UPDATE_PRIORITY",function(){return Pr}),v.d(B,"ALPHA_MODES",function(){return ms}),v.d(B,"BLEND_MODES",function(){return Ft}),v.d(B,"BUFFER_BITS",function(){return Gd}),v.d(B,"CLEAR_MODES",function(){return aa}),v.d(B,"DRAW_MODES",function(){return lo}),v.d(B,"ENV",function(){return ds}),v.d(B,"FORMATS",function(){return Do}),v.d(B,"GC_MODES",function(){return Am}),v.d(B,"MASK_TYPES",function(){return Mr}),v.d(B,"MIPMAP_MODES",function(){return sa}),v.d(B,"MSAA_QUALITY",function(){return lu}),v.d(B,"PRECISION",function(){return No}),v.d(B,"RENDERER_TYPE",function(){return $h}),v.d(B,"SAMPLER_TYPES",function(){return Hd}),v.d(B,"SCALE_MODES",function(){return ps}),v.d(B,"TARGETS",function(){return $a}),v.d(B,"TYPES",function(){return bn}),v.d(B,"WRAP_MODES",function(){return fs}),v.d(B,"Bounds",function(){return Xd}),v.d(B,"Container",function(){return Ai}),v.d(B,"DisplayObject",function(){return mi}),v.d(B,"TemporaryDisplayObject",function(){return P0}),v.d(B,"FillStyle",function(){return h_}),v.d(B,"GRAPHICS_CURVES",function(){return tc}),v.d(B,"Graphics",function(){return fa}),v.d(B,"GraphicsData",function(){return v_}),v.d(B,"GraphicsGeometry",function(){return ew}),v.d(B,"LINE_CAP",function(){return pa}),v.d(B,"LINE_JOIN",function(){return da}),v.d(B,"LineStyle",function(){return tw}),v.d(B,"graphicsUtils",function(){return I2}),v.d(B,"Circle",function(){return P1}),v.d(B,"DEG_TO_RAD",function(){return A1}),v.d(B,"Ellipse",function(){return C1}),v.d(B,"Matrix",function(){return fi}),v.d(B,"ObservablePoint",function(){return mu}),v.d(B,"PI_2",function(){return jd}),v.d(B,"Point",function(){return si}),v.d(B,"Polygon",function(){return Wd}),v.d(B,"RAD_TO_DEG",function(){return M1}),v.d(B,"Rectangle",function(){return nn}),v.d(B,"RoundedRectangle",function(){return S0}),v.d(B,"SHAPES",function(){return oi}),v.d(B,"Transform",function(){return M0}),v.d(B,"groupD8",function(){return qn}),v.d(B,"Mesh",function(){return Eu}),v.d(B,"MeshBatchUvs",function(){return vw}),v.d(B,"MeshGeometry",function(){return sp}),v.d(B,"MeshMaterial",function(){return op}),v.d(B,"NineSlicePlane",function(){return sP}),v.d(B,"PlaneGeometry",function(){return $w}),v.d(B,"RopeGeometry",function(){return Kw}),v.d(B,"SimpleMesh",function(){return oP}),v.d(B,"SimplePlane",function(){return Qw}),v.d(B,"SimpleRope",function(){return rP}),v.d(B,"Runner",function(){return Vi}),v.d(B,"Sprite",function(){return Hn}),v.d(B,"AnimatedSprite",function(){return P_}),v.d(B,"TEXT_GRADIENT",function(){return sc}),v.d(B,"Text",function(){return ig}),v.d(B,"TextMetrics",function(){return Vr}),v.d(B,"TextStyle",function(){return Su}),v.d(B,"isMobile",function(){return ao}),v.d(B,"settings",function(){return At}),v.d(B,"VERSION",function(){return aP}),v.d(B,"filters",function(){return up});var ie=v(0),k=v.n(ie),oe=v(1);/**
81
+ */(function(){var B=function(){this.init()};B.prototype={init:function(){var S=this||ie;return S._counter=1e3,S._html5AudioPool=[],S.html5PoolSize=10,S._codecs={},S._howls=[],S._muted=!1,S._volume=1,S._canPlayEvent="canplaythrough",S._navigator=typeof window!="undefined"&&window.navigator?window.navigator:null,S.masterGain=null,S.noAudio=!1,S.usingWebAudio=!0,S.autoSuspend=!0,S.ctx=null,S.autoUnlock=!0,S._setup(),S},volume:function(S){var A=this||ie;if(S=parseFloat(S),A.ctx||Fe(),S!==void 0&&S>=0&&S<=1){if(A._volume=S,A._muted)return A;A.usingWebAudio&&A.masterGain.gain.setValueAtTime(S,ie.ctx.currentTime);for(var O=0;O<A._howls.length;O++)if(!A._howls[O]._webAudio)for(var V=A._howls[O]._getSoundIds(),D=0;D<V.length;D++){var z=A._howls[O]._soundById(V[D]);z&&z._node&&(z._node.volume=z._volume*S)}return A}return A._volume},mute:function(S){var A=this||ie;A.ctx||Fe(),A._muted=S,A.usingWebAudio&&A.masterGain.gain.setValueAtTime(S?0:A._volume,ie.ctx.currentTime);for(var O=0;O<A._howls.length;O++)if(!A._howls[O]._webAudio)for(var V=A._howls[O]._getSoundIds(),D=0;D<V.length;D++){var z=A._howls[O]._soundById(V[D]);z&&z._node&&(z._node.muted=!!S||z._muted)}return A},stop:function(){for(var S=this||ie,A=0;A<S._howls.length;A++)S._howls[A].stop();return S},unload:function(){for(var S=this||ie,A=S._howls.length-1;A>=0;A--)S._howls[A].unload();return S.usingWebAudio&&S.ctx&&S.ctx.close!==void 0&&(S.ctx.close(),S.ctx=null,Fe()),S},codecs:function(S){return(this||ie)._codecs[S.replace(/^x-/,"")]},_setup:function(){var S=this||ie;if(S.state=S.ctx&&S.ctx.state||"suspended",S._autoSuspend(),!S.usingWebAudio)if(typeof Audio!="undefined")try{new Audio().oncanplaythrough===void 0&&(S._canPlayEvent="canplay")}catch{S.noAudio=!0}else S.noAudio=!0;try{new Audio().muted&&(S.noAudio=!0)}catch{}return S.noAudio||S._setupCodecs(),S},_setupCodecs:function(){var S=this||ie,A=null;try{A=typeof Audio!="undefined"?new Audio:null}catch{return S}if(!A||typeof A.canPlayType!="function")return S;var O=A.canPlayType("audio/mpeg;").replace(/^no$/,""),V=S._navigator?S._navigator.userAgent:"",D=V.match(/OPR\/([0-6].)/g),z=D&&parseInt(D[0].split("/")[1],10)<33,W=V.indexOf("Safari")!==-1&&V.indexOf("Chrome")===-1,ee=V.match(/Version\/(.*?) /),et=W&&ee&&parseInt(ee[1],10)<15;return S._codecs={mp3:!(z||!O&&!A.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!O,opus:!!A.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!A.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!A.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(A.canPlayType('audio/wav; codecs="1"')||A.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!A.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!A.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(A.canPlayType("audio/x-m4a;")||A.canPlayType("audio/m4a;")||A.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(A.canPlayType("audio/x-m4b;")||A.canPlayType("audio/m4b;")||A.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(A.canPlayType("audio/x-mp4;")||A.canPlayType("audio/mp4;")||A.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(et||!A.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(et||!A.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!A.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(A.canPlayType("audio/x-flac;")||A.canPlayType("audio/flac;")).replace(/^no$/,"")},S},_unlockAudio:function(){var S=this||ie;if(!S._audioUnlocked&&S.ctx){S._audioUnlocked=!1,S.autoUnlock=!1,S._mobileUnloaded||S.ctx.sampleRate===44100||(S._mobileUnloaded=!0,S.unload()),S._scratchBuffer=S.ctx.createBuffer(1,1,22050);var A=function(O){for(;S._html5AudioPool.length<S.html5PoolSize;)try{var V=new Audio;V._unlocked=!0,S._releaseHtml5Audio(V)}catch{S.noAudio=!0;break}for(var D=0;D<S._howls.length;D++)if(!S._howls[D]._webAudio)for(var z=S._howls[D]._getSoundIds(),W=0;W<z.length;W++){var ee=S._howls[D]._soundById(z[W]);ee&&ee._node&&!ee._node._unlocked&&(ee._node._unlocked=!0,ee._node.load())}S._autoResume();var et=S.ctx.createBufferSource();et.buffer=S._scratchBuffer,et.connect(S.ctx.destination),et.start===void 0?et.noteOn(0):et.start(0),typeof S.ctx.resume=="function"&&S.ctx.resume(),et.onended=function(){et.disconnect(0),S._audioUnlocked=!0,document.removeEventListener("touchstart",A,!0),document.removeEventListener("touchend",A,!0),document.removeEventListener("click",A,!0),document.removeEventListener("keydown",A,!0);for(var ft=0;ft<S._howls.length;ft++)S._howls[ft]._emit("unlock")}};return document.addEventListener("touchstart",A,!0),document.addEventListener("touchend",A,!0),document.addEventListener("click",A,!0),document.addEventListener("keydown",A,!0),S}},_obtainHtml5Audio:function(){var S=this||ie;if(S._html5AudioPool.length)return S._html5AudioPool.pop();var A=new Audio().play();return A&&typeof Promise!="undefined"&&(A instanceof Promise||typeof A.then=="function")&&A.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(S){var A=this||ie;return S._unlocked&&A._html5AudioPool.push(S),A},_autoSuspend:function(){var S=this;if(S.autoSuspend&&S.ctx&&S.ctx.suspend!==void 0&&ie.usingWebAudio){for(var A=0;A<S._howls.length;A++)if(S._howls[A]._webAudio){for(var O=0;O<S._howls[A]._sounds.length;O++)if(!S._howls[A]._sounds[O]._paused)return S}return S._suspendTimer&&clearTimeout(S._suspendTimer),S._suspendTimer=setTimeout(function(){if(S.autoSuspend){S._suspendTimer=null,S.state="suspending";var V=function(){S.state="suspended",S._resumeAfterSuspend&&(delete S._resumeAfterSuspend,S._autoResume())};S.ctx.suspend().then(V,V)}},3e4),S}},_autoResume:function(){var S=this;if(S.ctx&&S.ctx.resume!==void 0&&ie.usingWebAudio)return S.state==="running"&&S.ctx.state!=="interrupted"&&S._suspendTimer?(clearTimeout(S._suspendTimer),S._suspendTimer=null):S.state==="suspended"||S.state==="running"&&S.ctx.state==="interrupted"?(S.ctx.resume().then(function(){S.state="running";for(var A=0;A<S._howls.length;A++)S._howls[A]._emit("resume")}),S._suspendTimer&&(clearTimeout(S._suspendTimer),S._suspendTimer=null)):S.state==="suspending"&&(S._resumeAfterSuspend=!0),S}};var ie=new B,k=function(S){S.src&&S.src.length!==0?this.init(S):console.error("An array of source files must be passed with any new Howl.")};k.prototype={init:function(S){var A=this;return ie.ctx||Fe(),A._autoplay=S.autoplay||!1,A._format=typeof S.format!="string"?S.format:[S.format],A._html5=S.html5||!1,A._muted=S.mute||!1,A._loop=S.loop||!1,A._pool=S.pool||5,A._preload=typeof S.preload!="boolean"&&S.preload!=="metadata"||S.preload,A._rate=S.rate||1,A._sprite=S.sprite||{},A._src=typeof S.src!="string"?S.src:[S.src],A._volume=S.volume!==void 0?S.volume:1,A._xhr={method:S.xhr&&S.xhr.method?S.xhr.method:"GET",headers:S.xhr&&S.xhr.headers?S.xhr.headers:null,withCredentials:!(!S.xhr||!S.xhr.withCredentials)&&S.xhr.withCredentials},A._duration=0,A._state="unloaded",A._sounds=[],A._endTimers={},A._queue=[],A._playLock=!1,A._onend=S.onend?[{fn:S.onend}]:[],A._onfade=S.onfade?[{fn:S.onfade}]:[],A._onload=S.onload?[{fn:S.onload}]:[],A._onloaderror=S.onloaderror?[{fn:S.onloaderror}]:[],A._onplayerror=S.onplayerror?[{fn:S.onplayerror}]:[],A._onpause=S.onpause?[{fn:S.onpause}]:[],A._onplay=S.onplay?[{fn:S.onplay}]:[],A._onstop=S.onstop?[{fn:S.onstop}]:[],A._onmute=S.onmute?[{fn:S.onmute}]:[],A._onvolume=S.onvolume?[{fn:S.onvolume}]:[],A._onrate=S.onrate?[{fn:S.onrate}]:[],A._onseek=S.onseek?[{fn:S.onseek}]:[],A._onunlock=S.onunlock?[{fn:S.onunlock}]:[],A._onresume=[],A._webAudio=ie.usingWebAudio&&!A._html5,ie.ctx!==void 0&&ie.ctx&&ie.autoUnlock&&ie._unlockAudio(),ie._howls.push(A),A._autoplay&&A._queue.push({event:"play",action:function(){A.play()}}),A._preload&&A._preload!=="none"&&A.load(),A},load:function(){var S=null;if(ie.noAudio)this._emit("loaderror",null,"No audio support.");else{typeof this._src=="string"&&(this._src=[this._src]);for(var A=0;A<this._src.length;A++){var O,V;if(this._format&&this._format[A])O=this._format[A];else{if(typeof(V=this._src[A])!="string"){this._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(O=/^data:audio\/([^;,]+);/i.exec(V))||(O=/\.([^.]+)$/.exec(V.split("?",1)[0])),O&&(O=O[1].toLowerCase())}if(O||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),O&&ie.codecs(O)){S=this._src[A];break}}if(S)return this._src=S,this._state="loading",window.location.protocol==="https:"&&S.slice(0,5)==="http:"&&(this._html5=!0,this._webAudio=!1),new oe(this),this._webAudio&&K(this),this;this._emit("loaderror",null,"No codec support for selected audio sources.")}},play:function(S,A){var O=this,V=null;if(typeof S=="number")V=S,S=null;else{if(typeof S=="string"&&O._state==="loaded"&&!O._sprite[S])return null;if(S===void 0&&(S="__default",!O._playLock)){for(var D=0,z=0;z<O._sounds.length;z++)O._sounds[z]._paused&&!O._sounds[z]._ended&&(D++,V=O._sounds[z]._id);D===1?S=null:V=null}}var W=V?O._soundById(V):O._inactiveSound();if(!W)return null;if(V&&!S&&(S=W._sprite||"__default"),O._state!=="loaded"){W._sprite=S,W._ended=!1;var ee=W._id;return O._queue.push({event:"play",action:function(){O.play(ee)}}),ee}if(V&&!W._paused)return A||O._loadQueue("play"),W._id;O._webAudio&&ie._autoResume();var et=Math.max(0,W._seek>0?W._seek:O._sprite[S][0]/1e3),ft=Math.max(0,(O._sprite[S][0]+O._sprite[S][1])/1e3-et),$e=1e3*ft/Math.abs(W._rate),ae=O._sprite[S][0]/1e3,Ce=(O._sprite[S][0]+O._sprite[S][1])/1e3;W._sprite=S,W._ended=!1;var Ie=function(){W._paused=!1,W._seek=et,W._start=ae,W._stop=Ce,W._loop=!(!W._loop&&!O._sprite[S][2])};if(!(et>=Ce)){var H=W._node;if(O._webAudio){var be=function(){O._playLock=!1,Ie(),O._refreshBuffer(W);var Ue=W._muted||O._muted?0:W._volume;H.gain.setValueAtTime(Ue,ie.ctx.currentTime),W._playStart=ie.ctx.currentTime,H.bufferSource.start===void 0?W._loop?H.bufferSource.noteGrainOn(0,et,86400):H.bufferSource.noteGrainOn(0,et,ft):W._loop?H.bufferSource.start(0,et,86400):H.bufferSource.start(0,et,ft),$e!==1/0&&(O._endTimers[W._id]=setTimeout(O._ended.bind(O,W),$e)),A||setTimeout(function(){O._emit("play",W._id),O._loadQueue()},0)};ie.state==="running"&&ie.ctx.state!=="interrupted"?be():(O._playLock=!0,O.once("resume",be),O._clearTimer(W._id))}else{var Me=function(){H.currentTime=et,H.muted=W._muted||O._muted||ie._muted||H.muted,H.volume=W._volume*ie.volume(),H.playbackRate=W._rate;try{var Ue=H.play();if(Ue&&typeof Promise!="undefined"&&(Ue instanceof Promise||typeof Ue.then=="function")?(O._playLock=!0,Ie(),Ue.then(function(){O._playLock=!1,H._unlocked=!0,A?O._loadQueue():O._emit("play",W._id)}).catch(function(){O._playLock=!1,O._emit("playerror",W._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),W._ended=!0,W._paused=!0})):A||(O._playLock=!1,Ie(),O._emit("play",W._id)),H.playbackRate=W._rate,H.paused)return void O._emit("playerror",W._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");S!=="__default"||W._loop?O._endTimers[W._id]=setTimeout(O._ended.bind(O,W),$e):(O._endTimers[W._id]=function(){O._ended(W),H.removeEventListener("ended",O._endTimers[W._id],!1)},H.addEventListener("ended",O._endTimers[W._id],!1))}catch(qe){O._emit("playerror",W._id,qe)}};H.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(H.src=O._src,H.load());var Oe=window&&window.ejecta||!H.readyState&&ie._navigator.isCocoonJS;if(H.readyState>=3||Oe)Me();else{O._playLock=!0,O._state="loading";var Se=function(){O._state="loaded",Me(),H.removeEventListener(ie._canPlayEvent,Se,!1)};H.addEventListener(ie._canPlayEvent,Se,!1),O._clearTimer(W._id)}}return W._id}O._ended(W)},pause:function(S){var A=this;if(A._state!=="loaded"||A._playLock)return A._queue.push({event:"pause",action:function(){A.pause(S)}}),A;for(var O=A._getSoundIds(S),V=0;V<O.length;V++){A._clearTimer(O[V]);var D=A._soundById(O[V]);if(D&&!D._paused&&(D._seek=A.seek(O[V]),D._rateSeek=0,D._paused=!0,A._stopFade(O[V]),D._node))if(A._webAudio){if(!D._node.bufferSource)continue;D._node.bufferSource.stop===void 0?D._node.bufferSource.noteOff(0):D._node.bufferSource.stop(0),A._cleanBuffer(D._node)}else isNaN(D._node.duration)&&D._node.duration!==1/0||D._node.pause();arguments[1]||A._emit("pause",D?D._id:null)}return A},stop:function(S,A){var O=this;if(O._state!=="loaded"||O._playLock)return O._queue.push({event:"stop",action:function(){O.stop(S)}}),O;for(var V=O._getSoundIds(S),D=0;D<V.length;D++){O._clearTimer(V[D]);var z=O._soundById(V[D]);z&&(z._seek=z._start||0,z._rateSeek=0,z._paused=!0,z._ended=!0,O._stopFade(V[D]),z._node&&(O._webAudio?z._node.bufferSource&&(z._node.bufferSource.stop===void 0?z._node.bufferSource.noteOff(0):z._node.bufferSource.stop(0),O._cleanBuffer(z._node)):isNaN(z._node.duration)&&z._node.duration!==1/0||(z._node.currentTime=z._start||0,z._node.pause(),z._node.duration===1/0&&O._clearSound(z._node))),A||O._emit("stop",z._id))}return O},mute:function(S,A){var O=this;if(O._state!=="loaded"||O._playLock)return O._queue.push({event:"mute",action:function(){O.mute(S,A)}}),O;if(A===void 0){if(typeof S!="boolean")return O._muted;O._muted=S}for(var V=O._getSoundIds(A),D=0;D<V.length;D++){var z=O._soundById(V[D]);z&&(z._muted=S,z._interval&&O._stopFade(z._id),O._webAudio&&z._node?z._node.gain.setValueAtTime(S?0:z._volume,ie.ctx.currentTime):z._node&&(z._node.muted=!!ie._muted||S),O._emit("mute",z._id))}return O},volume:function(){var S,A,O,V=this,D=arguments;if(D.length===0)return V._volume;if(D.length===1||D.length===2&&D[1]===void 0){var z=V._getSoundIds(),W=z.indexOf(D[0]);W>=0?A=parseInt(D[0],10):S=parseFloat(D[0])}else D.length>=2&&(S=parseFloat(D[0]),A=parseInt(D[1],10));if(!(S!==void 0&&S>=0&&S<=1))return(O=A?V._soundById(A):V._sounds[0])?O._volume:0;if(V._state!=="loaded"||V._playLock)return V._queue.push({event:"volume",action:function(){V.volume.apply(V,D)}}),V;A===void 0&&(V._volume=S),A=V._getSoundIds(A);for(var ee=0;ee<A.length;ee++)(O=V._soundById(A[ee]))&&(O._volume=S,D[2]||V._stopFade(A[ee]),V._webAudio&&O._node&&!O._muted?O._node.gain.setValueAtTime(S,ie.ctx.currentTime):O._node&&!O._muted&&(O._node.volume=S*ie.volume()),V._emit("volume",O._id));return V},fade:function(S,A,O,V){var D=this;if(D._state!=="loaded"||D._playLock)return D._queue.push({event:"fade",action:function(){D.fade(S,A,O,V)}}),D;S=Math.min(Math.max(0,parseFloat(S)),1),A=Math.min(Math.max(0,parseFloat(A)),1),O=parseFloat(O),D.volume(S,V);for(var z=D._getSoundIds(V),W=0;W<z.length;W++){var ee=D._soundById(z[W]);if(ee){if(V||D._stopFade(z[W]),D._webAudio&&!ee._muted){var et=ie.ctx.currentTime,ft=et+O/1e3;ee._volume=S,ee._node.gain.setValueAtTime(S,et),ee._node.gain.linearRampToValueAtTime(A,ft)}D._startFadeInterval(ee,S,A,O,z[W],V===void 0)}}return D},_startFadeInterval:function(S,A,O,V,D,z){var W=this,ee=A,et=O-A,ft=Math.abs(et/.01),$e=Math.max(4,ft>0?V/ft:V),ae=Date.now();S._fadeTo=O,S._interval=setInterval(function(){var Ce=(Date.now()-ae)/V;ae=Date.now(),ee+=et*Ce,ee=Math.round(100*ee)/100,ee=et<0?Math.max(O,ee):Math.min(O,ee),W._webAudio?S._volume=ee:W.volume(ee,S._id,!0),z&&(W._volume=ee),(O<A&&ee<=O||O>A&&ee>=O)&&(clearInterval(S._interval),S._interval=null,S._fadeTo=null,W.volume(O,S._id),W._emit("fade",S._id))},$e)},_stopFade:function(S){var A=this._soundById(S);return A&&A._interval&&(this._webAudio&&A._node.gain.cancelScheduledValues(ie.ctx.currentTime),clearInterval(A._interval),A._interval=null,this.volume(A._fadeTo,S),A._fadeTo=null,this._emit("fade",S)),this},loop:function(){var S,A,O,V=this,D=arguments;if(D.length===0)return V._loop;if(D.length===1){if(typeof D[0]!="boolean")return!!(O=V._soundById(parseInt(D[0],10)))&&O._loop;S=D[0],V._loop=S}else D.length===2&&(S=D[0],A=parseInt(D[1],10));for(var z=V._getSoundIds(A),W=0;W<z.length;W++)(O=V._soundById(z[W]))&&(O._loop=S,V._webAudio&&O._node&&O._node.bufferSource&&(O._node.bufferSource.loop=S,S&&(O._node.bufferSource.loopStart=O._start||0,O._node.bufferSource.loopEnd=O._stop,V.playing(z[W])&&(V.pause(z[W],!0),V.play(z[W],!0)))));return V},rate:function(){var S,A,O,V=this,D=arguments;if(D.length===0)A=V._sounds[0]._id;else if(D.length===1){var z=V._getSoundIds(),W=z.indexOf(D[0]);W>=0?A=parseInt(D[0],10):S=parseFloat(D[0])}else D.length===2&&(S=parseFloat(D[0]),A=parseInt(D[1],10));if(typeof S!="number")return(O=V._soundById(A))?O._rate:V._rate;if(V._state!=="loaded"||V._playLock)return V._queue.push({event:"rate",action:function(){V.rate.apply(V,D)}}),V;A===void 0&&(V._rate=S),A=V._getSoundIds(A);for(var ee=0;ee<A.length;ee++)if(O=V._soundById(A[ee])){V.playing(A[ee])&&(O._rateSeek=V.seek(A[ee]),O._playStart=V._webAudio?ie.ctx.currentTime:O._playStart),O._rate=S,V._webAudio&&O._node&&O._node.bufferSource?O._node.bufferSource.playbackRate.setValueAtTime(S,ie.ctx.currentTime):O._node&&(O._node.playbackRate=S);var et=V.seek(A[ee]),ft=(V._sprite[O._sprite][0]+V._sprite[O._sprite][1])/1e3-et,$e=1e3*ft/Math.abs(O._rate);!V._endTimers[A[ee]]&&O._paused||(V._clearTimer(A[ee]),V._endTimers[A[ee]]=setTimeout(V._ended.bind(V,O),$e)),V._emit("rate",O._id)}return V},seek:function(){var S,A,O=this,V=arguments;if(V.length===0)O._sounds.length&&(A=O._sounds[0]._id);else if(V.length===1){var D=O._getSoundIds(),z=D.indexOf(V[0]);z>=0?A=parseInt(V[0],10):O._sounds.length&&(A=O._sounds[0]._id,S=parseFloat(V[0]))}else V.length===2&&(S=parseFloat(V[0]),A=parseInt(V[1],10));if(A===void 0)return 0;if(typeof S=="number"&&(O._state!=="loaded"||O._playLock))return O._queue.push({event:"seek",action:function(){O.seek.apply(O,V)}}),O;var W=O._soundById(A);if(W){if(!(typeof S=="number"&&S>=0)){if(O._webAudio){var ee=O.playing(A)?ie.ctx.currentTime-W._playStart:0,et=W._rateSeek?W._rateSeek-W._seek:0;return W._seek+(et+ee*Math.abs(W._rate))}return W._node.currentTime}var ft=O.playing(A);ft&&O.pause(A,!0),W._seek=S,W._ended=!1,O._clearTimer(A),O._webAudio||!W._node||isNaN(W._node.duration)||(W._node.currentTime=S);var $e=function(){ft&&O.play(A,!0),O._emit("seek",A)};if(ft&&!O._webAudio){var ae=function(){O._playLock?setTimeout(ae,0):$e()};setTimeout(ae,0)}else $e()}return O},playing:function(S){if(typeof S=="number"){var A=this._soundById(S);return!!A&&!A._paused}for(var O=0;O<this._sounds.length;O++)if(!this._sounds[O]._paused)return!0;return!1},duration:function(S){var A=this._duration,O=this._soundById(S);return O&&(A=this._sprite[O._sprite][1]/1e3),A},state:function(){return this._state},unload:function(){for(var S=this,A=S._sounds,O=0;O<A.length;O++)A[O]._paused||S.stop(A[O]._id),S._webAudio||(S._clearSound(A[O]._node),A[O]._node.removeEventListener("error",A[O]._errorFn,!1),A[O]._node.removeEventListener(ie._canPlayEvent,A[O]._loadFn,!1),A[O]._node.removeEventListener("ended",A[O]._endFn,!1),ie._releaseHtml5Audio(A[O]._node)),delete A[O]._node,S._clearTimer(A[O]._id);var V=ie._howls.indexOf(S);V>=0&&ie._howls.splice(V,1);var D=!0;for(O=0;O<ie._howls.length;O++)if(ie._howls[O]._src===S._src||S._src.indexOf(ie._howls[O]._src)>=0){D=!1;break}return X&&D&&delete X[S._src],ie.noAudio=!1,S._state="unloaded",S._sounds=[],S=null,null},on:function(S,A,O,V){var D=this["_on"+S];return typeof A=="function"&&D.push(V?{id:O,fn:A,once:V}:{id:O,fn:A}),this},off:function(S,A,O){var V=this["_on"+S],D=0;if(typeof A=="number"&&(O=A,A=null),A||O)for(D=0;D<V.length;D++){var z=O===V[D].id;if(A===V[D].fn&&z||!A&&z){V.splice(D,1);break}}else if(S)this["_on"+S]=[];else{var W=Object.keys(this);for(D=0;D<W.length;D++)W[D].indexOf("_on")===0&&Array.isArray(this[W[D]])&&(this[W[D]]=[])}return this},once:function(S,A,O){return this.on(S,A,O,1),this},_emit:function(S,A,O){for(var V=this["_on"+S],D=V.length-1;D>=0;D--)V[D].id&&V[D].id!==A&&S!=="load"||(setTimeout(function(z){z.call(this,A,O)}.bind(this,V[D].fn),0),V[D].once&&this.off(S,V[D].fn,V[D].id));return this._loadQueue(S),this},_loadQueue:function(S){if(this._queue.length>0){var A=this._queue[0];A.event===S&&(this._queue.shift(),this._loadQueue()),S||A.action()}return this},_ended:function(S){var A=S._sprite;if(!this._webAudio&&S._node&&!S._node.paused&&!S._node.ended&&S._node.currentTime<S._stop)return setTimeout(this._ended.bind(this,S),100),this;var O=!(!S._loop&&!this._sprite[A][2]);if(this._emit("end",S._id),!this._webAudio&&O&&this.stop(S._id,!0).play(S._id),this._webAudio&&O){this._emit("play",S._id),S._seek=S._start||0,S._rateSeek=0,S._playStart=ie.ctx.currentTime;var V=1e3*(S._stop-S._start)/Math.abs(S._rate);this._endTimers[S._id]=setTimeout(this._ended.bind(this,S),V)}return this._webAudio&&!O&&(S._paused=!0,S._ended=!0,S._seek=S._start||0,S._rateSeek=0,this._clearTimer(S._id),this._cleanBuffer(S._node),ie._autoSuspend()),this._webAudio||O||this.stop(S._id,!0),this},_clearTimer:function(S){if(this._endTimers[S]){if(typeof this._endTimers[S]!="function")clearTimeout(this._endTimers[S]);else{var A=this._soundById(S);A&&A._node&&A._node.removeEventListener("ended",this._endTimers[S],!1)}delete this._endTimers[S]}return this},_soundById:function(S){for(var A=0;A<this._sounds.length;A++)if(S===this._sounds[A]._id)return this._sounds[A];return null},_inactiveSound:function(){this._drain();for(var S=0;S<this._sounds.length;S++)if(this._sounds[S]._ended)return this._sounds[S].reset();return new oe(this)},_drain:function(){var S=this._pool,A=0,O=0;if(!(this._sounds.length<S)){for(O=0;O<this._sounds.length;O++)this._sounds[O]._ended&&A++;for(O=this._sounds.length-1;O>=0;O--){if(A<=S)return;this._sounds[O]._ended&&(this._webAudio&&this._sounds[O]._node&&this._sounds[O]._node.disconnect(0),this._sounds.splice(O,1),A--)}}},_getSoundIds:function(S){if(S===void 0){for(var A=[],O=0;O<this._sounds.length;O++)A.push(this._sounds[O]._id);return A}return[S]},_refreshBuffer:function(S){return S._node.bufferSource=ie.ctx.createBufferSource(),S._node.bufferSource.buffer=X[this._src],S._panner?S._node.bufferSource.connect(S._panner):S._node.bufferSource.connect(S._node),S._node.bufferSource.loop=S._loop,S._loop&&(S._node.bufferSource.loopStart=S._start||0,S._node.bufferSource.loopEnd=S._stop||0),S._node.bufferSource.playbackRate.setValueAtTime(S._rate,ie.ctx.currentTime),this},_cleanBuffer:function(S){var A=ie._navigator&&ie._navigator.vendor.indexOf("Apple")>=0;if(ie._scratchBuffer&&S.bufferSource&&(S.bufferSource.onended=null,S.bufferSource.disconnect(0),A))try{S.bufferSource.buffer=ie._scratchBuffer}catch{}return S.bufferSource=null,this},_clearSound:function(S){/MSIE |Trident\//.test(ie._navigator&&ie._navigator.userAgent)||(S.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var oe=function(S){this._parent=S,this.init()};oe.prototype={init:function(){var S=this._parent;return this._muted=S._muted,this._loop=S._loop,this._volume=S._volume,this._rate=S._rate,this._seek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++ie._counter,S._sounds.push(this),this.create(),this},create:function(){var S=this._parent,A=ie._muted||this._muted||this._parent._muted?0:this._volume;return S._webAudio?(this._node=ie.ctx.createGain===void 0?ie.ctx.createGainNode():ie.ctx.createGain(),this._node.gain.setValueAtTime(A,ie.ctx.currentTime),this._node.paused=!0,this._node.connect(ie.masterGain)):ie.noAudio||(this._node=ie._obtainHtml5Audio(),this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(ie._canPlayEvent,this._loadFn,!1),this._endFn=this._endListener.bind(this),this._node.addEventListener("ended",this._endFn,!1),this._node.src=S._src,this._node.preload=S._preload===!0?"auto":S._preload,this._node.volume=A*ie.volume(),this._node.load()),this},reset:function(){var S=this._parent;return this._muted=S._muted,this._loop=S._loop,this._volume=S._volume,this._rate=S._rate,this._seek=0,this._rateSeek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++ie._counter,this},_errorListener:function(){this._parent._emit("loaderror",this._id,this._node.error?this._node.error.code:0),this._node.removeEventListener("error",this._errorFn,!1)},_loadListener:function(){var S=this._parent;S._duration=Math.ceil(10*this._node.duration)/10,Object.keys(S._sprite).length===0&&(S._sprite={__default:[0,1e3*S._duration]}),S._state!=="loaded"&&(S._state="loaded",S._emit("load"),S._loadQueue()),this._node.removeEventListener(ie._canPlayEvent,this._loadFn,!1)},_endListener:function(){var S=this._parent;S._duration===1/0&&(S._duration=Math.ceil(10*this._node.duration)/10,S._sprite.__default[1]===1/0&&(S._sprite.__default[1]=1e3*S._duration),S._ended(this)),this._node.removeEventListener("ended",this._endFn,!1)}};var X={},K=function(S){var A=S._src;if(X[A])return S._duration=X[A].duration,void Xe(S);if(/^data:[^;]+;base64,/.test(A)){for(var O=atob(A.split(",")[1]),V=new Uint8Array(O.length),D=0;D<O.length;++D)V[D]=O.charCodeAt(D);Ee(V.buffer,S)}else{var z=new XMLHttpRequest;z.open(S._xhr.method,A,!0),z.withCredentials=S._xhr.withCredentials,z.responseType="arraybuffer",S._xhr.headers&&Object.keys(S._xhr.headers).forEach(function(W){z.setRequestHeader(W,S._xhr.headers[W])}),z.onload=function(){var W=(z.status+"")[0];W==="0"||W==="2"||W==="3"?Ee(z.response,S):S._emit("loaderror",null,"Failed loading audio file with status: "+z.status+".")},z.onerror=function(){S._webAudio&&(S._html5=!0,S._webAudio=!1,S._sounds=[],delete X[A],S.load())},le(z)}},le=function(S){try{S.send()}catch{S.onerror()}},Ee=function(S,A){var O=function(){A._emit("loaderror",null,"Decoding audio data failed.")},V=function(D){D&&A._sounds.length>0?(X[A._src]=D,Xe(A,D)):O()};typeof Promise!="undefined"&&ie.ctx.decodeAudioData.length===1?ie.ctx.decodeAudioData(S).then(V).catch(O):ie.ctx.decodeAudioData(S,V,O)},Xe=function(S,A){A&&!S._duration&&(S._duration=A.duration),Object.keys(S._sprite).length===0&&(S._sprite={__default:[0,1e3*S._duration]}),S._state!=="loaded"&&(S._state="loaded",S._emit("load"),S._loadQueue())},Fe=function(){if(ie.usingWebAudio){try{typeof AudioContext!="undefined"?ie.ctx=new AudioContext:typeof webkitAudioContext!="undefined"?ie.ctx=new webkitAudioContext:ie.usingWebAudio=!1}catch{ie.usingWebAudio=!1}ie.ctx||(ie.usingWebAudio=!1);var S=/iP(hone|od|ad)/.test(ie._navigator&&ie._navigator.platform),A=ie._navigator&&ie._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),O=A?parseInt(A[1],10):null;if(S&&O&&O<9){var V=/safari/.test(ie._navigator&&ie._navigator.userAgent.toLowerCase());ie._navigator&&!V&&(ie.usingWebAudio=!1)}ie.usingWebAudio&&(ie.masterGain=ie.ctx.createGain===void 0?ie.ctx.createGainNode():ie.ctx.createGain(),ie.masterGain.gain.setValueAtTime(ie._muted?0:ie._volume,ie.ctx.currentTime),ie.masterGain.connect(ie.ctx.destination)),ie._setup()}};(q=function(){return{Howler:ie,Howl:k}}.apply(L,[]))===void 0||(I.exports=q),L.Howler=ie,L.Howl=k,b!==void 0?(b.HowlerGlobal=B,b.Howler=ie,b.Howl=k,b.Sound=oe):typeof window!="undefined"&&(window.HowlerGlobal=B,window.Howler=ie,window.Howl=k,window.Sound=oe)})(),function(){var B;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(k){if(!this.ctx||!this.ctx.listener)return this;for(var oe=this._howls.length-1;oe>=0;oe--)this._howls[oe].stereo(k);return this},HowlerGlobal.prototype.pos=function(k,oe,X){return this.ctx&&this.ctx.listener?(oe=typeof oe!="number"?this._pos[1]:oe,X=typeof X!="number"?this._pos[2]:X,typeof k!="number"?this._pos:(this._pos=[k,oe,X],this.ctx.listener.positionX!==void 0?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this)):this},HowlerGlobal.prototype.orientation=function(k,oe,X,K,le,Ee){if(!this.ctx||!this.ctx.listener)return this;var Xe=this._orientation;return oe=typeof oe!="number"?Xe[1]:oe,X=typeof X!="number"?Xe[2]:X,K=typeof K!="number"?Xe[3]:K,le=typeof le!="number"?Xe[4]:le,Ee=typeof Ee!="number"?Xe[5]:Ee,typeof k!="number"?Xe:(this._orientation=[k,oe,X,K,le,Ee],this.ctx.listener.forwardX!==void 0?(this.ctx.listener.forwardX.setTargetAtTime(k,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(oe,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(X,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(K,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(le,Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(Ee,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(k,oe,X,K,le,Ee),this)},Howl.prototype.init=(B=Howl.prototype.init,function(k){return this._orientation=k.orientation||[1,0,0],this._stereo=k.stereo||null,this._pos=k.pos||null,this._pannerAttr={coneInnerAngle:k.coneInnerAngle!==void 0?k.coneInnerAngle:360,coneOuterAngle:k.coneOuterAngle!==void 0?k.coneOuterAngle:360,coneOuterGain:k.coneOuterGain!==void 0?k.coneOuterGain:0,distanceModel:k.distanceModel!==void 0?k.distanceModel:"inverse",maxDistance:k.maxDistance!==void 0?k.maxDistance:1e4,panningModel:k.panningModel!==void 0?k.panningModel:"HRTF",refDistance:k.refDistance!==void 0?k.refDistance:1,rolloffFactor:k.rolloffFactor!==void 0?k.rolloffFactor:1},this._onstereo=k.onstereo?[{fn:k.onstereo}]:[],this._onpos=k.onpos?[{fn:k.onpos}]:[],this._onorientation=k.onorientation?[{fn:k.onorientation}]:[],B.call(this,k)}),Howl.prototype.stereo=function(k,oe){var X=this;if(!X._webAudio)return X;if(X._state!=="loaded")return X._queue.push({event:"stereo",action:function(){X.stereo(k,oe)}}),X;var K=Howler.ctx.createStereoPanner===void 0?"spatial":"stereo";if(oe===void 0){if(typeof k!="number")return X._stereo;X._stereo=k,X._pos=[k,0,0]}for(var le=X._getSoundIds(oe),Ee=0;Ee<le.length;Ee++){var Xe=X._soundById(le[Ee]);if(Xe){if(typeof k!="number")return Xe._stereo;Xe._stereo=k,Xe._pos=[k,0,0],Xe._node&&(Xe._pannerAttr.panningModel="equalpower",Xe._panner&&Xe._panner.pan||ie(Xe,K),K==="spatial"?Xe._panner.positionX!==void 0?(Xe._panner.positionX.setValueAtTime(k,Howler.ctx.currentTime),Xe._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),Xe._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):Xe._panner.setPosition(k,0,0):Xe._panner.pan.setValueAtTime(k,Howler.ctx.currentTime)),X._emit("stereo",Xe._id)}}return X},Howl.prototype.pos=function(k,oe,X,K){var le=this;if(!le._webAudio)return le;if(le._state!=="loaded")return le._queue.push({event:"pos",action:function(){le.pos(k,oe,X,K)}}),le;if(oe=typeof oe!="number"?0:oe,X=typeof X!="number"?-.5:X,K===void 0){if(typeof k!="number")return le._pos;le._pos=[k,oe,X]}for(var Ee=le._getSoundIds(K),Xe=0;Xe<Ee.length;Xe++){var Fe=le._soundById(Ee[Xe]);if(Fe){if(typeof k!="number")return Fe._pos;Fe._pos=[k,oe,X],Fe._node&&(Fe._panner&&!Fe._panner.pan||ie(Fe,"spatial"),Fe._panner.positionX!==void 0?(Fe._panner.positionX.setValueAtTime(k,Howler.ctx.currentTime),Fe._panner.positionY.setValueAtTime(oe,Howler.ctx.currentTime),Fe._panner.positionZ.setValueAtTime(X,Howler.ctx.currentTime)):Fe._panner.setPosition(k,oe,X)),le._emit("pos",Fe._id)}}return le},Howl.prototype.orientation=function(k,oe,X,K){var le=this;if(!le._webAudio)return le;if(le._state!=="loaded")return le._queue.push({event:"orientation",action:function(){le.orientation(k,oe,X,K)}}),le;if(oe=typeof oe!="number"?le._orientation[1]:oe,X=typeof X!="number"?le._orientation[2]:X,K===void 0){if(typeof k!="number")return le._orientation;le._orientation=[k,oe,X]}for(var Ee=le._getSoundIds(K),Xe=0;Xe<Ee.length;Xe++){var Fe=le._soundById(Ee[Xe]);if(Fe){if(typeof k!="number")return Fe._orientation;Fe._orientation=[k,oe,X],Fe._node&&(Fe._panner||(Fe._pos||(Fe._pos=le._pos||[0,0,-.5]),ie(Fe,"spatial")),Fe._panner.orientationX!==void 0?(Fe._panner.orientationX.setValueAtTime(k,Howler.ctx.currentTime),Fe._panner.orientationY.setValueAtTime(oe,Howler.ctx.currentTime),Fe._panner.orientationZ.setValueAtTime(X,Howler.ctx.currentTime)):Fe._panner.setOrientation(k,oe,X)),le._emit("orientation",Fe._id)}}return le},Howl.prototype.pannerAttr=function(){var k,oe,X,K=this,le=arguments;if(!K._webAudio)return K;if(le.length===0)return K._pannerAttr;if(le.length===1){if(typeof le[0]!="object")return(X=K._soundById(parseInt(le[0],10)))?X._pannerAttr:K._pannerAttr;k=le[0],oe===void 0&&(k.pannerAttr||(k.pannerAttr={coneInnerAngle:k.coneInnerAngle,coneOuterAngle:k.coneOuterAngle,coneOuterGain:k.coneOuterGain,distanceModel:k.distanceModel,maxDistance:k.maxDistance,refDistance:k.refDistance,rolloffFactor:k.rolloffFactor,panningModel:k.panningModel}),K._pannerAttr={coneInnerAngle:k.pannerAttr.coneInnerAngle!==void 0?k.pannerAttr.coneInnerAngle:K._coneInnerAngle,coneOuterAngle:k.pannerAttr.coneOuterAngle!==void 0?k.pannerAttr.coneOuterAngle:K._coneOuterAngle,coneOuterGain:k.pannerAttr.coneOuterGain!==void 0?k.pannerAttr.coneOuterGain:K._coneOuterGain,distanceModel:k.pannerAttr.distanceModel!==void 0?k.pannerAttr.distanceModel:K._distanceModel,maxDistance:k.pannerAttr.maxDistance!==void 0?k.pannerAttr.maxDistance:K._maxDistance,refDistance:k.pannerAttr.refDistance!==void 0?k.pannerAttr.refDistance:K._refDistance,rolloffFactor:k.pannerAttr.rolloffFactor!==void 0?k.pannerAttr.rolloffFactor:K._rolloffFactor,panningModel:k.pannerAttr.panningModel!==void 0?k.pannerAttr.panningModel:K._panningModel})}else le.length===2&&(k=le[0],oe=parseInt(le[1],10));for(var Ee=K._getSoundIds(oe),Xe=0;Xe<Ee.length;Xe++)if(X=K._soundById(Ee[Xe])){var Fe=X._pannerAttr;Fe={coneInnerAngle:k.coneInnerAngle!==void 0?k.coneInnerAngle:Fe.coneInnerAngle,coneOuterAngle:k.coneOuterAngle!==void 0?k.coneOuterAngle:Fe.coneOuterAngle,coneOuterGain:k.coneOuterGain!==void 0?k.coneOuterGain:Fe.coneOuterGain,distanceModel:k.distanceModel!==void 0?k.distanceModel:Fe.distanceModel,maxDistance:k.maxDistance!==void 0?k.maxDistance:Fe.maxDistance,refDistance:k.refDistance!==void 0?k.refDistance:Fe.refDistance,rolloffFactor:k.rolloffFactor!==void 0?k.rolloffFactor:Fe.rolloffFactor,panningModel:k.panningModel!==void 0?k.panningModel:Fe.panningModel};var S=X._panner;S?(S.coneInnerAngle=Fe.coneInnerAngle,S.coneOuterAngle=Fe.coneOuterAngle,S.coneOuterGain=Fe.coneOuterGain,S.distanceModel=Fe.distanceModel,S.maxDistance=Fe.maxDistance,S.refDistance=Fe.refDistance,S.rolloffFactor=Fe.rolloffFactor,S.panningModel=Fe.panningModel):(X._pos||(X._pos=K._pos||[0,0,-.5]),ie(X,"spatial"))}return K},Sound.prototype.init=function(k){return function(){var oe=this._parent;this._orientation=oe._orientation,this._stereo=oe._stereo,this._pos=oe._pos,this._pannerAttr=oe._pannerAttr,k.call(this),this._stereo?oe.stereo(this._stereo):this._pos&&oe.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}}(Sound.prototype.init),Sound.prototype.reset=function(k){return function(){var oe=this._parent;return this._orientation=oe._orientation,this._stereo=oe._stereo,this._pos=oe._pos,this._pannerAttr=oe._pannerAttr,this._stereo?oe.stereo(this._stereo):this._pos?oe.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,oe._refreshBuffer(this)),k.call(this)}}(Sound.prototype.reset);var ie=function(k,oe){(oe=oe||"spatial")==="spatial"?(k._panner=Howler.ctx.createPanner(),k._panner.coneInnerAngle=k._pannerAttr.coneInnerAngle,k._panner.coneOuterAngle=k._pannerAttr.coneOuterAngle,k._panner.coneOuterGain=k._pannerAttr.coneOuterGain,k._panner.distanceModel=k._pannerAttr.distanceModel,k._panner.maxDistance=k._pannerAttr.maxDistance,k._panner.refDistance=k._pannerAttr.refDistance,k._panner.rolloffFactor=k._pannerAttr.rolloffFactor,k._panner.panningModel=k._pannerAttr.panningModel,k._panner.positionX!==void 0?(k._panner.positionX.setValueAtTime(k._pos[0],Howler.ctx.currentTime),k._panner.positionY.setValueAtTime(k._pos[1],Howler.ctx.currentTime),k._panner.positionZ.setValueAtTime(k._pos[2],Howler.ctx.currentTime)):k._panner.setPosition(k._pos[0],k._pos[1],k._pos[2]),k._panner.orientationX!==void 0?(k._panner.orientationX.setValueAtTime(k._orientation[0],Howler.ctx.currentTime),k._panner.orientationY.setValueAtTime(k._orientation[1],Howler.ctx.currentTime),k._panner.orientationZ.setValueAtTime(k._orientation[2],Howler.ctx.currentTime)):k._panner.setOrientation(k._orientation[0],k._orientation[1],k._orientation[2])):(k._panner=Howler.ctx.createStereoPanner(),k._panner.pan.setValueAtTime(k._stereo,Howler.ctx.currentTime)),k._panner.connect(k._node),k._paused||k._parent.pause(k._id,!0).play(k._id,!0)}}()}).call(this,v(4))},function(I,L,v){(function(b){var q=b!==void 0&&b||typeof self!="undefined"&&self||window,B=Function.prototype.apply;function ie(k,oe){this._id=k,this._clearFn=oe}L.setTimeout=function(){return new ie(B.call(setTimeout,q,arguments),clearTimeout)},L.setInterval=function(){return new ie(B.call(setInterval,q,arguments),clearInterval)},L.clearTimeout=L.clearInterval=function(k){k&&k.close()},ie.prototype.unref=ie.prototype.ref=function(){},ie.prototype.close=function(){this._clearFn.call(q,this._id)},L.enroll=function(k,oe){clearTimeout(k._idleTimeoutId),k._idleTimeout=oe},L.unenroll=function(k){clearTimeout(k._idleTimeoutId),k._idleTimeout=-1},L._unrefActive=L.active=function(k){clearTimeout(k._idleTimeoutId);var oe=k._idleTimeout;oe>=0&&(k._idleTimeoutId=setTimeout(function(){k._onTimeout&&k._onTimeout()},oe))},v(19),L.setImmediate=typeof self!="undefined"&&self.setImmediate||b!==void 0&&b.setImmediate||this&&this.setImmediate,L.clearImmediate=typeof self!="undefined"&&self.clearImmediate||b!==void 0&&b.clearImmediate||this&&this.clearImmediate}).call(this,v(4))},function(I,L,v){(function(b,q){(function(B,ie){if(!B.setImmediate){var k,oe,X,K,le,Ee=1,Xe={},Fe=!1,S=B.document,A=Object.getPrototypeOf&&Object.getPrototypeOf(B);A=A&&A.setTimeout?A:B,{}.toString.call(B.process)==="[object process]"?k=function(D){q.nextTick(function(){V(D)})}:function(){if(B.postMessage&&!B.importScripts){var D=!0,z=B.onmessage;return B.onmessage=function(){D=!1},B.postMessage("","*"),B.onmessage=z,D}}()?(K="setImmediate$"+Math.random()+"$",le=function(D){D.source===B&&typeof D.data=="string"&&D.data.indexOf(K)===0&&V(+D.data.slice(K.length))},B.addEventListener?B.addEventListener("message",le,!1):B.attachEvent("onmessage",le),k=function(D){B.postMessage(K+D,"*")}):B.MessageChannel?((X=new MessageChannel).port1.onmessage=function(D){V(D.data)},k=function(D){X.port2.postMessage(D)}):S&&"onreadystatechange"in S.createElement("script")?(oe=S.documentElement,k=function(D){var z=S.createElement("script");z.onreadystatechange=function(){V(D),z.onreadystatechange=null,oe.removeChild(z),z=null},oe.appendChild(z)}):k=function(D){setTimeout(V,0,D)},A.setImmediate=function(D){typeof D!="function"&&(D=new Function(""+D));for(var z=new Array(arguments.length-1),W=0;W<z.length;W++)z[W]=arguments[W+1];var ee={callback:D,args:z};return Xe[Ee]=ee,k(Ee),Ee++},A.clearImmediate=O}function O(D){delete Xe[D]}function V(D){if(Fe)setTimeout(V,0,D);else{var z=Xe[D];if(z){Fe=!0;try{(function(W){var ee=W.callback,et=W.args;switch(et.length){case 0:ee();break;case 1:ee(et[0]);break;case 2:ee(et[0],et[1]);break;case 3:ee(et[0],et[1],et[2]);break;default:ee.apply(void 0,et)}})(z)}finally{O(D),Fe=!1}}}}})(typeof self=="undefined"?b===void 0?this:b:self)}).call(this,v(4),v(20))},function(I,L){var v,b,q=I.exports={};function B(){throw new Error("setTimeout has not been defined")}function ie(){throw new Error("clearTimeout has not been defined")}function k(A){if(v===setTimeout)return setTimeout(A,0);if((v===B||!v)&&setTimeout)return v=setTimeout,setTimeout(A,0);try{return v(A,0)}catch{try{return v.call(null,A,0)}catch{return v.call(this,A,0)}}}(function(){try{v=typeof setTimeout=="function"?setTimeout:B}catch{v=B}try{b=typeof clearTimeout=="function"?clearTimeout:ie}catch{b=ie}})();var oe,X=[],K=!1,le=-1;function Ee(){K&&oe&&(K=!1,oe.length?X=oe.concat(X):le=-1,X.length&&Xe())}function Xe(){if(!K){var A=k(Ee);K=!0;for(var O=X.length;O;){for(oe=X,X=[];++le<O;)oe&&oe[le].run();le=-1,O=X.length}oe=null,K=!1,function(V){if(b===clearTimeout)return clearTimeout(V);if((b===ie||!b)&&clearTimeout)return b=clearTimeout,clearTimeout(V);try{b(V)}catch{try{return b.call(null,V)}catch{return b.call(this,V)}}}(A)}}function Fe(A,O){this.fun=A,this.array=O}function S(){}q.nextTick=function(A){var O=new Array(arguments.length-1);if(arguments.length>1)for(var V=1;V<arguments.length;V++)O[V-1]=arguments[V];X.push(new Fe(A,O)),X.length!==1||K||k(Xe)},Fe.prototype.run=function(){this.fun.apply(null,this.array)},q.title="browser",q.browser=!0,q.env={},q.argv=[],q.version="",q.versions={},q.on=S,q.addListener=S,q.once=S,q.off=S,q.removeListener=S,q.removeAllListeners=S,q.emit=S,q.prependListener=S,q.prependOnceListener=S,q.listeners=function(A){return[]},q.binding=function(A){throw new Error("process.binding is not supported")},q.cwd=function(){return"/"},q.chdir=function(A){throw new Error("process.chdir is not supported")},q.umask=function(){return 0}},function(I,L,v){(function(b,q){var B;/*! https://mths.be/punycode v1.4.1 by @mathias */(function(ie){L&&L.nodeType,b&&b.nodeType;var k=typeof q=="object"&&q;k.global!==k&&k.window!==k&&k.self;var oe,X=2147483647,K=/^xn--/,le=/[^\x20-\x7E]/,Ee=/[\x2E\u3002\uFF0E\uFF61]/g,Xe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Fe=Math.floor,S=String.fromCharCode;function A($e){throw new RangeError(Xe[$e])}function O($e,ae){for(var Ce=$e.length,Ie=[];Ce--;)Ie[Ce]=ae($e[Ce]);return Ie}function V($e,ae){var Ce=$e.split("@"),Ie="";return Ce.length>1&&(Ie=Ce[0]+"@",$e=Ce[1]),Ie+O(($e=$e.replace(Ee,".")).split("."),ae).join(".")}function D($e){for(var ae,Ce,Ie=[],H=0,be=$e.length;H<be;)(ae=$e.charCodeAt(H++))>=55296&&ae<=56319&&H<be?(64512&(Ce=$e.charCodeAt(H++)))==56320?Ie.push(((1023&ae)<<10)+(1023&Ce)+65536):(Ie.push(ae),H--):Ie.push(ae);return Ie}function z($e){return O($e,function(ae){var Ce="";return ae>65535&&(Ce+=S((ae-=65536)>>>10&1023|55296),ae=56320|1023&ae),Ce+=S(ae)}).join("")}function W($e,ae){return $e+22+75*($e<26)-((ae!=0)<<5)}function ee($e,ae,Ce){var Ie=0;for($e=Ce?Fe($e/700):$e>>1,$e+=Fe($e/ae);$e>455;Ie+=36)$e=Fe($e/35);return Fe(Ie+36*$e/($e+38))}function et($e){var ae,Ce,Ie,H,be,Me,Oe,Se,Ue,qe,at,rt=[],Qt=$e.length,lt=0,en=128,Bt=72;for((Ce=$e.lastIndexOf("-"))<0&&(Ce=0),Ie=0;Ie<Ce;++Ie)$e.charCodeAt(Ie)>=128&&A("not-basic"),rt.push($e.charCodeAt(Ie));for(H=Ce>0?Ce+1:0;H<Qt;){for(be=lt,Me=1,Oe=36;H>=Qt&&A("invalid-input"),((Se=(at=$e.charCodeAt(H++))-48<10?at-22:at-65<26?at-65:at-97<26?at-97:36)>=36||Se>Fe((X-lt)/Me))&&A("overflow"),lt+=Se*Me,!(Se<(Ue=Oe<=Bt?1:Oe>=Bt+26?26:Oe-Bt));Oe+=36)Me>Fe(X/(qe=36-Ue))&&A("overflow"),Me*=qe;Bt=ee(lt-be,ae=rt.length+1,be==0),Fe(lt/ae)>X-en&&A("overflow"),en+=Fe(lt/ae),lt%=ae,rt.splice(lt++,0,en)}return z(rt)}function ft($e){var ae,Ce,Ie,H,be,Me,Oe,Se,Ue,qe,at,rt,Qt,lt,en,Bt=[];for(rt=($e=D($e)).length,ae=128,Ce=0,be=72,Me=0;Me<rt;++Me)(at=$e[Me])<128&&Bt.push(S(at));for(Ie=H=Bt.length,H&&Bt.push("-");Ie<rt;){for(Oe=X,Me=0;Me<rt;++Me)(at=$e[Me])>=ae&&at<Oe&&(Oe=at);for(Oe-ae>Fe((X-Ce)/(Qt=Ie+1))&&A("overflow"),Ce+=(Oe-ae)*Qt,ae=Oe,Me=0;Me<rt;++Me)if((at=$e[Me])<ae&&++Ce>X&&A("overflow"),at==ae){for(Se=Ce,Ue=36;!(Se<(qe=Ue<=be?1:Ue>=be+26?26:Ue-be));Ue+=36)en=Se-qe,lt=36-qe,Bt.push(S(W(qe+en%lt,0))),Se=Fe(en/lt);Bt.push(S(W(Se,0))),be=ee(Ce,Qt,Ie==H),Ce=0,++Ie}++Ce,++ae}return Bt.join("")}oe={version:"1.4.1",ucs2:{decode:D,encode:z},decode:et,encode:ft,toASCII:function($e){return V($e,function(ae){return le.test(ae)?"xn--"+ft(ae):ae})},toUnicode:function($e){return V($e,function(ae){return K.test(ae)?et(ae.slice(4).toLowerCase()):ae})}},(B=function(){return oe}.call(L,v,L,b))===void 0||(b.exports=B)})()}).call(this,v(8)(I),v(4))},function(I,L,v){I.exports={isString:function(b){return typeof b=="string"},isObject:function(b){return typeof b=="object"&&b!==null},isNull:function(b){return b===null},isNullOrUndefined:function(b){return b==null}}},function(I,L,v){L.decode=L.parse=v(24),L.encode=L.stringify=v(25)},function(I,L,v){function b(B,ie){return Object.prototype.hasOwnProperty.call(B,ie)}I.exports=function(B,ie,k,oe){ie=ie||"&",k=k||"=";var X={};if(typeof B!="string"||B.length===0)return X;var K=/\+/g;B=B.split(ie);var le=1e3;oe&&typeof oe.maxKeys=="number"&&(le=oe.maxKeys);var Ee=B.length;le>0&&Ee>le&&(Ee=le);for(var Xe=0;Xe<Ee;++Xe){var Fe,S,A,O,V=B[Xe].replace(K,"%20"),D=V.indexOf(k);D>=0?(Fe=V.substr(0,D),S=V.substr(D+1)):(Fe=V,S=""),A=decodeURIComponent(Fe),O=decodeURIComponent(S),b(X,A)?q(X[A])?X[A].push(O):X[A]=[X[A],O]:X[A]=O}return X};var q=Array.isArray||function(B){return Object.prototype.toString.call(B)==="[object Array]"}},function(I,L,v){var b=function(k){switch(typeof k){case"string":return k;case"boolean":return k?"true":"false";case"number":return isFinite(k)?k:"";default:return""}};I.exports=function(k,oe,X,K){return oe=oe||"&",X=X||"=",k===null&&(k=void 0),typeof k=="object"?B(ie(k),function(le){var Ee=encodeURIComponent(b(le))+X;return q(k[le])?B(k[le],function(Xe){return Ee+encodeURIComponent(b(Xe))}).join(oe):Ee+encodeURIComponent(b(k[le]))}).join(oe):K?encodeURIComponent(b(K))+X+encodeURIComponent(b(k)):""};var q=Array.isArray||function(k){return Object.prototype.toString.call(k)==="[object Array]"};function B(k,oe){if(k.map)return k.map(oe);for(var X=[],K=0;K<k.length;K++)X.push(oe(k[K],K));return X}var ie=Object.keys||function(k){var oe=[];for(var X in k)Object.prototype.hasOwnProperty.call(k,X)&&oe.push(X);return oe}},function(I,L){var v=function(){};v.prototype={fit:function(b){var q,B,ie,k,oe=b.length,X=oe>0?b[0].width:0,K=oe>0?b[0].height:0;for(this.root={x:0,y:0,width:X,height:K},q=0;q<oe;q++)ie=b[q],(B=this.findNode(this.root,ie.width,ie.height))?(k=this.splitNode(B,ie.width,ie.height),ie.x=k.x,ie.y=k.y):(k=this.growNode(ie.width,ie.height),ie.x=k.x,ie.y=k.y)},findNode:function(b,q,B){return b.used?this.findNode(b.right,q,B)||this.findNode(b.down,q,B):q<=b.width&&B<=b.height?b:null},splitNode:function(b,q,B){return b.used=!0,b.down={x:b.x,y:b.y+B,width:b.width,height:b.height-B},b.right={x:b.x+q,y:b.y,width:b.width-q,height:B},b},growNode:function(b,q){var B=b<=this.root.width,ie=q<=this.root.height,k=ie&&this.root.height>=this.root.width+b,oe=B&&this.root.width>=this.root.height+q;return k?this.growRight(b,q):oe?this.growDown(b,q):ie?this.growRight(b,q):B?this.growDown(b,q):null},growRight:function(b,q){var B;return this.root={used:!0,x:0,y:0,width:this.root.width+b,height:this.root.height,down:this.root,right:{x:this.root.width,y:0,width:b,height:this.root.height}},(B=this.findNode(this.root,b,q))?this.splitNode(B,b,q):null},growDown:function(b,q){var B;return this.root={used:!0,x:0,y:0,width:this.root.width,height:this.root.height+q,down:{x:0,y:this.root.height,width:this.root.width,height:q},right:this.root},(B=this.findNode(this.root,b,q))?this.splitNode(B,b,q):null}},I.exports=v},function(I,L,v){v.r(L),v.d(L,"SLIDE_EVENTS",function(){return dr}),v.d(L,"Slide",function(){return QC});var b={};v.r(b),v.d(b,"ACESFilmicToneMapping",function(){return Gp}),v.d(b,"AddEquation",function(){return Me}),v.d(b,"AddOperation",function(){return Fp}),v.d(b,"AdditiveAnimationBlendMode",function(){return we}),v.d(b,"AdditiveBlending",function(){return Ce}),v.d(b,"AlphaFormat",function(){return _n}),v.d(b,"AlwaysDepth",function(){return yn}),v.d(b,"AlwaysStencilFunc",function(){return Tl}),v.d(b,"AmbientLight",function(){return pm}),v.d(b,"AmbientLightProbe",function(){return sx}),v.d(b,"AnimationClip",function(){return Od}),v.d(b,"AnimationLoader",function(){return HE}),v.d(b,"AnimationMixer",function(){return gx}),v.d(b,"AnimationObjectGroup",function(){return mx}),v.d(b,"AnimationUtils",function(){return Gn}),v.d(b,"ArcCurve",function(){return Hr}),v.d(b,"ArrayCamera",function(){return bd}),v.d(b,"ArrowHelper",function(){return yM}),v.d(b,"Audio",function(){return Yv}),v.d(b,"AudioAnalyser",function(){return px}),v.d(b,"AudioContext",function(){return Xv}),v.d(b,"AudioListener",function(){return ZE}),v.d(b,"AudioLoader",function(){return rx}),v.d(b,"AxesHelper",function(){return Ox}),v.d(b,"AxisHelper",function(){return JM}),v.d(b,"BackSide",function(){return W}),v.d(b,"BasicDepthPacking",function(){return bl}),v.d(b,"BasicShadowMap",function(){return A}),v.d(b,"BinaryTextureLoader",function(){return tA}),v.d(b,"Bone",function(){return Ih}),v.d(b,"BooleanKeyframeTrack",function(){return Kl}),v.d(b,"BoundingBoxHelper",function(){return $M}),v.d(b,"Box2",function(){return qh}),v.d(b,"Box3",function(){return In}),v.d(b,"Box3Helper",function(){return vM}),v.d(b,"BoxBufferGeometry",function(){return no}),v.d(b,"BoxGeometry",function(){return no}),v.d(b,"BoxHelper",function(){return Ix}),v.d(b,"BufferAttribute",function(){return Zt}),v.d(b,"BufferGeometry",function(){return Mt}),v.d(b,"BufferGeometryLoader",function(){return Qy}),v.d(b,"ByteType",function(){return jp}),v.d(b,"Cache",function(){return eu}),v.d(b,"Camera",function(){return Ws}),v.d(b,"CameraHelper",function(){return gM}),v.d(b,"CanvasRenderer",function(){return iA}),v.d(b,"CanvasTexture",function(){return Ct}),v.d(b,"CatmullRomCurve3",function(){return Fh}),v.d(b,"CineonToneMapping",function(){return kp}),v.d(b,"CircleBufferGeometry",function(){return nt}),v.d(b,"CircleGeometry",function(){return nt}),v.d(b,"ClampToEdgeWrapping",function(){return gi}),v.d(b,"Clock",function(){return ux}),v.d(b,"Color",function(){return gt}),v.d(b,"ColorKeyframeTrack",function(){return Ov}),v.d(b,"CompressedTexture",function(){return yt}),v.d(b,"CompressedTextureLoader",function(){return zE}),v.d(b,"ConeBufferGeometry",function(){return mt}),v.d(b,"ConeGeometry",function(){return mt}),v.d(b,"CubeCamera",function(){return Xs}),v.d(b,"CubeReflectionMapping",function(){return zo}),v.d(b,"CubeRefractionMapping",function(){return hl}),v.d(b,"CubeTexture",function(){return kr}),v.d(b,"CubeTextureLoader",function(){return zy}),v.d(b,"CubeUVReflectionMapping",function(){return va}),v.d(b,"CubeUVRefractionMapping",function(){return _a}),v.d(b,"CubicBezierCurve",function(){return na}),v.d(b,"CubicBezierCurve3",function(){return Xa}),v.d(b,"CubicInterpolant",function(){return Uy}),v.d(b,"CullFaceBack",function(){return Xe}),v.d(b,"CullFaceFront",function(){return Fe}),v.d(b,"CullFaceFrontBack",function(){return S}),v.d(b,"CullFaceNone",function(){return Ee}),v.d(b,"Curve",function(){return Yn}),v.d(b,"CurvePath",function(){return jy}),v.d(b,"CustomBlending",function(){return be}),v.d(b,"CustomToneMapping",function(){return Hp}),v.d(b,"CylinderBufferGeometry",function(){return Et}),v.d(b,"CylinderGeometry",function(){return Et}),v.d(b,"Cylindrical",function(){return uM}),v.d(b,"DataTexture",function(){return os}),v.d(b,"DataTexture2DArray",function(){return vh}),v.d(b,"DataTexture3D",function(){return wr}),v.d(b,"DataTextureLoader",function(){return Vy}),v.d(b,"DataUtils",function(){return bM}),v.d(b,"DecrementStencilOp",function(){return Yu}),v.d(b,"DecrementWrapStencilOp",function(){return Fg}),v.d(b,"DefaultLoadingManager",function(){return Hy}),v.d(b,"DepthFormat",function(){return Nn}),v.d(b,"DepthStencilFormat",function(){return Cs}),v.d(b,"DepthTexture",function(){return Je}),v.d(b,"DirectionalLight",function(){return dm}),v.d(b,"DirectionalLightHelper",function(){return mM}),v.d(b,"DiscreteInterpolant",function(){return ky}),v.d(b,"DodecahedronBufferGeometry",function(){return It}),v.d(b,"DodecahedronGeometry",function(){return It}),v.d(b,"DoubleSide",function(){return ee}),v.d(b,"DstAlphaFactor",function(){return Vt}),v.d(b,"DstColorFactor",function(){return Dn}),v.d(b,"DynamicBufferAttribute",function(){return GM}),v.d(b,"DynamicCopyUsage",function(){return Ku}),v.d(b,"DynamicDrawUsage",function(){return Zr}),v.d(b,"DynamicReadUsage",function(){return Ug}),v.d(b,"EdgesGeometry",function(){return Mi}),v.d(b,"EdgesHelper",function(){return KM}),v.d(b,"EllipseCurve",function(){return kn}),v.d(b,"EqualDepth",function(){return Ci}),v.d(b,"EqualStencilFunc",function(){return Zu}),v.d(b,"EquirectangularReflectionMapping",function(){return cl}),v.d(b,"EquirectangularRefractionMapping",function(){return dl}),v.d(b,"Euler",function(){return Us}),v.d(b,"EventDispatcher",function(){return _o}),v.d(b,"ExtrudeBufferGeometry",function(){return Co}),v.d(b,"ExtrudeGeometry",function(){return Co}),v.d(b,"FaceColors",function(){return CM}),v.d(b,"FileLoader",function(){return Lo}),v.d(b,"FlatShading",function(){return et}),v.d(b,"Float16BufferAttribute",function(){return gf}),v.d(b,"Float32Attribute",function(){return qM}),v.d(b,"Float32BufferAttribute",function(){return st}),v.d(b,"Float64Attribute",function(){return ZM}),v.d(b,"Float64BufferAttribute",function(){return ed}),v.d(b,"FloatType",function(){return po}),v.d(b,"Fog",function(){return Hl}),v.d(b,"FogExp2",function(){return yi}),v.d(b,"Font",function(){return Wv}),v.d(b,"FontLoader",function(){return XE}),v.d(b,"FrontSide",function(){return z}),v.d(b,"Frustum",function(){return Ba}),v.d(b,"GLBufferAttribute",function(){return _x}),v.d(b,"GLSL1",function(){return Gc}),v.d(b,"GLSL3",function(){return Hc}),v.d(b,"GammaEncoding",function(){return Vn}),v.d(b,"GreaterDepth",function(){return Lr}),v.d(b,"GreaterEqualDepth",function(){return ji}),v.d(b,"GreaterEqualStencilFunc",function(){return uf}),v.d(b,"GreaterStencilFunc",function(){return Ju}),v.d(b,"GridHelper",function(){return Px}),v.d(b,"Group",function(){return Js}),v.d(b,"HalfFloatType",function(){return Ps}),v.d(b,"HemisphereLight",function(){return Fv}),v.d(b,"HemisphereLightHelper",function(){return pM}),v.d(b,"HemisphereLightProbe",function(){return ox}),v.d(b,"IcosahedronBufferGeometry",function(){return Uh}),v.d(b,"IcosahedronGeometry",function(){return Uh}),v.d(b,"ImageBitmapLoader",function(){return nx}),v.d(b,"ImageLoader",function(){return Dd}),v.d(b,"ImageUtils",function(){return gr}),v.d(b,"ImmediateRenderObject",function(){return Tx}),v.d(b,"IncrementStencilOp",function(){return sf}),v.d(b,"IncrementWrapStencilOp",function(){return Ng}),v.d(b,"InstancedBufferAttribute",function(){return jv}),v.d(b,"InstancedBufferGeometry",function(){return Vv}),v.d(b,"InstancedInterleavedBuffer",function(){return vx}),v.d(b,"InstancedMesh",function(){return Sd}),v.d(b,"Int16Attribute",function(){return jM}),v.d(b,"Int16BufferAttribute",function(){return Qc}),v.d(b,"Int32Attribute",function(){return XM}),v.d(b,"Int32BufferAttribute",function(){return ph}),v.d(b,"Int8Attribute",function(){return HM}),v.d(b,"Int8BufferAttribute",function(){return Il}),v.d(b,"IntType",function(){return Xp}),v.d(b,"InterleavedBuffer",function(){return $s}),v.d(b,"InterleavedBufferAttribute",function(){return Po}),v.d(b,"Interpolant",function(){return ra}),v.d(b,"InterpolateDiscrete",function(){return Xo}),v.d(b,"InterpolateLinear",function(){return _l}),v.d(b,"InterpolateSmooth",function(){return vo}),v.d(b,"InvertStencilOp",function(){return Bg}),v.d(b,"JSONLoader",function(){return rA}),v.d(b,"KeepStencilOp",function(){return un}),v.d(b,"KeyframeTrack",function(){return Ro}),v.d(b,"LOD",function(){return $f}),v.d(b,"LatheBufferGeometry",function(){return kh}),v.d(b,"LatheGeometry",function(){return kh}),v.d(b,"Layers",function(){return Wc}),v.d(b,"LensFlare",function(){return sA}),v.d(b,"LessDepth",function(){return li}),v.d(b,"LessEqualDepth",function(){return Bi}),v.d(b,"LessEqualStencilFunc",function(){return af}),v.d(b,"LessStencilFunc",function(){return qo}),v.d(b,"Light",function(){return Oo}),v.d(b,"LightProbe",function(){return Fd}),v.d(b,"Line",function(){return h}),v.d(b,"Line3",function(){return wx}),v.d(b,"LineBasicMaterial",function(){return xi}),v.d(b,"LineCurve",function(){return Ya}),v.d(b,"LineCurve3",function(){return ql}),v.d(b,"LineDashedMaterial",function(){return Iv}),v.d(b,"LineLoop",function(){return P}),v.d(b,"LinePieces",function(){return AM}),v.d(b,"LineSegments",function(){return E}),v.d(b,"LineStrip",function(){return MM}),v.d(b,"LinearEncoding",function(){return wt}),v.d(b,"LinearFilter",function(){return $n}),v.d(b,"LinearInterpolant",function(){return Lv}),v.d(b,"LinearMipMapLinearFilter",function(){return Vp}),v.d(b,"LinearMipMapNearestFilter",function(){return zp}),v.d(b,"LinearMipmapLinearFilter",function(){return Ms}),v.d(b,"LinearMipmapNearestFilter",function(){return jo}),v.d(b,"LinearToneMapping",function(){return Bp}),v.d(b,"Loader",function(){return $i}),v.d(b,"LoaderUtils",function(){return fm}),v.d(b,"LoadingManager",function(){return Dv}),v.d(b,"LogLuvEncoding",function(){return xn}),v.d(b,"LoopOnce",function(){return Wu}),v.d(b,"LoopPingPong",function(){return go}),v.d(b,"LoopRepeat",function(){return Bc}),v.d(b,"LuminanceAlphaFormat",function(){return Tc}),v.d(b,"LuminanceFormat",function(){return Jp}),v.d(b,"MOUSE",function(){return K}),v.d(b,"Material",function(){return _i}),v.d(b,"MaterialLoader",function(){return Ky}),v.d(b,"Math",function(){return Ns}),v.d(b,"MathUtils",function(){return Ns}),v.d(b,"Matrix3",function(){return En}),v.d(b,"Matrix4",function(){return pt}),v.d(b,"MaxEquation",function(){return qe}),v.d(b,"Mesh",function(){return ln}),v.d(b,"MeshBasicMaterial",function(){return Qn}),v.d(b,"MeshDepthMaterial",function(){return on}),v.d(b,"MeshDistanceMaterial",function(){return Sh}),v.d(b,"MeshFaceMaterial",function(){return IM}),v.d(b,"MeshLambertMaterial",function(){return cm}),v.d(b,"MeshMatcapMaterial",function(){return Rv}),v.d(b,"MeshNormalMaterial",function(){return Cv}),v.d(b,"MeshPhongMaterial",function(){return hm}),v.d(b,"MeshPhysicalMaterial",function(){return Av}),v.d(b,"MeshStandardMaterial",function(){return um}),v.d(b,"MeshToonMaterial",function(){return Pv}),v.d(b,"MinEquation",function(){return Ue}),v.d(b,"MirroredRepeatWrapping",function(){return pl}),v.d(b,"MixOperation",function(){return Np}),v.d(b,"MultiMaterial",function(){return LM}),v.d(b,"MultiplyBlending",function(){return H}),v.d(b,"MultiplyOperation",function(){return ul}),v.d(b,"NearestFilter",function(){return Jn}),v.d(b,"NearestMipMapLinearFilter",function(){return wc}),v.d(b,"NearestMipMapNearestFilter",function(){return bc}),v.d(b,"NearestMipmapLinearFilter",function(){return ml}),v.d(b,"NearestMipmapNearestFilter",function(){return fl}),v.d(b,"NeverDepth",function(){return Zn}),v.d(b,"NeverStencilFunc",function(){return qu}),v.d(b,"NoBlending",function(){return $e}),v.d(b,"NoColors",function(){return PM}),v.d(b,"NoToneMapping",function(){return co}),v.d(b,"NormalAnimationBlendMode",function(){return Ls}),v.d(b,"NormalBlending",function(){return ae}),v.d(b,"NotEqualDepth",function(){return Dp}),v.d(b,"NotEqualStencilFunc",function(){return lf}),v.d(b,"NumberKeyframeTrack",function(){return Id}),v.d(b,"Object3D",function(){return Xt}),v.d(b,"ObjectLoader",function(){return VE}),v.d(b,"ObjectSpaceNormalMap",function(){return wl}),v.d(b,"OctahedronBufferGeometry",function(){return Zl}),v.d(b,"OctahedronGeometry",function(){return Zl}),v.d(b,"OneFactor",function(){return rt}),v.d(b,"OneMinusDstAlphaFactor",function(){return bt}),v.d(b,"OneMinusDstColorFactor",function(){return wn}),v.d(b,"OneMinusSrcAlphaFactor",function(){return Bt}),v.d(b,"OneMinusSrcColorFactor",function(){return lt}),v.d(b,"OrthographicCamera",function(){return Yh}),v.d(b,"PCFShadowMap",function(){return O}),v.d(b,"PCFSoftShadowMap",function(){return V}),v.d(b,"PMREMGenerator",function(){return TM}),v.d(b,"ParametricBufferGeometry",function(){return Rd}),v.d(b,"ParametricGeometry",function(){return Rd}),v.d(b,"Particle",function(){return DM}),v.d(b,"ParticleBasicMaterial",function(){return BM}),v.d(b,"ParticleSystem",function(){return NM}),v.d(b,"ParticleSystemMaterial",function(){return UM}),v.d(b,"Path",function(){return tu}),v.d(b,"PerspectiveCamera",function(){return ei}),v.d(b,"Plane",function(){return br}),v.d(b,"PlaneBufferGeometry",function(){return Li}),v.d(b,"PlaneGeometry",function(){return Li}),v.d(b,"PlaneHelper",function(){return _M}),v.d(b,"PointCloud",function(){return OM}),v.d(b,"PointCloudMaterial",function(){return FM}),v.d(b,"PointLight",function(){return Gv}),v.d(b,"PointLightHelper",function(){return cM}),v.d(b,"Points",function(){return ze}),v.d(b,"PointsMaterial",function(){return j}),v.d(b,"PolarGridHelper",function(){return fM}),v.d(b,"PolyhedronBufferGeometry",function(){return St}),v.d(b,"PolyhedronGeometry",function(){return St}),v.d(b,"PositionalAudio",function(){return $E}),v.d(b,"PropertyBinding",function(){return cn}),v.d(b,"PropertyMixer",function(){return fx}),v.d(b,"QuadraticBezierCurve",function(){return ia}),v.d(b,"QuadraticBezierCurve3",function(){return bv}),v.d(b,"Quaternion",function(){return vi}),v.d(b,"QuaternionKeyframeTrack",function(){return Xh}),v.d(b,"QuaternionLinearInterpolant",function(){return Gy}),v.d(b,"REVISION",function(){return X}),v.d(b,"RGBADepthPacking",function(){return kc}),v.d(b,"RGBAFormat",function(){return tr}),v.d(b,"RGBAIntegerFormat",function(){return Mc}),v.d(b,"RGBA_ASTC_10x10_Format",function(){return Ic}),v.d(b,"RGBA_ASTC_10x5_Format",function(){return vl}),v.d(b,"RGBA_ASTC_10x6_Format",function(){return Rs}),v.d(b,"RGBA_ASTC_10x8_Format",function(){return ef}),v.d(b,"RGBA_ASTC_12x10_Format",function(){return Lc}),v.d(b,"RGBA_ASTC_12x12_Format",function(){return Gu}),v.d(b,"RGBA_ASTC_4x4_Format",function(){return Bu}),v.d(b,"RGBA_ASTC_5x4_Format",function(){return Tn}),v.d(b,"RGBA_ASTC_5x5_Format",function(){return mo}),v.d(b,"RGBA_ASTC_6x5_Format",function(){return Uu}),v.d(b,"RGBA_ASTC_6x6_Format",function(){return Kp}),v.d(b,"RGBA_ASTC_8x5_Format",function(){return ku}),v.d(b,"RGBA_ASTC_8x6_Format",function(){return Qp}),v.d(b,"RGBA_ASTC_8x8_Format",function(){return Rc}),v.d(b,"RGBA_BPTC_Format",function(){return Hu}),v.d(b,"RGBA_ETC2_EAC_Format",function(){return xa}),v.d(b,"RGBA_PVRTC_2BPPV1_Format",function(){return Pc}),v.d(b,"RGBA_PVRTC_4BPPV1_Format",function(){return Wi}),v.d(b,"RGBA_S3TC_DXT1_Format",function(){return Du}),v.d(b,"RGBA_S3TC_DXT3_Format",function(){return Nu}),v.d(b,"RGBA_S3TC_DXT5_Format",function(){return Fu}),v.d(b,"RGBDEncoding",function(){return Yi}),v.d(b,"RGBEEncoding",function(){return ir}),v.d(b,"RGBEFormat",function(){return $p}),v.d(b,"RGBFormat",function(){return fo}),v.d(b,"RGBIntegerFormat",function(){return Ec}),v.d(b,"RGBM16Encoding",function(){return Uc}),v.d(b,"RGBM7Encoding",function(){return xl}),v.d(b,"RGB_ETC1_Format",function(){return Cc}),v.d(b,"RGB_ETC2_Format",function(){return qr}),v.d(b,"RGB_PVRTC_2BPPV1_Format",function(){return Ac}),v.d(b,"RGB_PVRTC_4BPPV1_Format",function(){return Ui}),v.d(b,"RGB_S3TC_DXT1_Format",function(){return Ou}),v.d(b,"RGFormat",function(){return Lu}),v.d(b,"RGIntegerFormat",function(){return nr}),v.d(b,"RawShaderMaterial",function(){return Wh}),v.d(b,"Ray",function(){return To}),v.d(b,"Raycaster",function(){return aM}),v.d(b,"RectAreaLight",function(){return Hv}),v.d(b,"RedFormat",function(){return ya}),v.d(b,"RedIntegerFormat",function(){return Sc}),v.d(b,"ReinhardToneMapping",function(){return Up}),v.d(b,"RepeatWrapping",function(){return Vo}),v.d(b,"ReplaceStencilOp",function(){return Dg}),v.d(b,"ReverseSubtractEquation",function(){return Se}),v.d(b,"RingBufferGeometry",function(){return Gh}),v.d(b,"RingGeometry",function(){return Gh}),v.d(b,"SRGB8_ALPHA8_ASTC_10x10_Format",function(){return rf}),v.d(b,"SRGB8_ALPHA8_ASTC_10x5_Format",function(){return Fc}),v.d(b,"SRGB8_ALPHA8_ASTC_10x6_Format",function(){return tf}),v.d(b,"SRGB8_ALPHA8_ASTC_10x8_Format",function(){return nf}),v.d(b,"SRGB8_ALPHA8_ASTC_12x10_Format",function(){return of}),v.d(b,"SRGB8_ALPHA8_ASTC_12x12_Format",function(){return Is}),v.d(b,"SRGB8_ALPHA8_ASTC_4x4_Format",function(){return Oc}),v.d(b,"SRGB8_ALPHA8_ASTC_5x4_Format",function(){return zu}),v.d(b,"SRGB8_ALPHA8_ASTC_5x5_Format",function(){return Vu}),v.d(b,"SRGB8_ALPHA8_ASTC_6x5_Format",function(){return Dc}),v.d(b,"SRGB8_ALPHA8_ASTC_6x6_Format",function(){return Xi}),v.d(b,"SRGB8_ALPHA8_ASTC_8x5_Format",function(){return ju}),v.d(b,"SRGB8_ALPHA8_ASTC_8x6_Format",function(){return ba}),v.d(b,"SRGB8_ALPHA8_ASTC_8x8_Format",function(){return Nc}),v.d(b,"Scene",function(){return Ga}),v.d(b,"SceneUtils",function(){return oA}),v.d(b,"ShaderChunk",function(){return Lt}),v.d(b,"ShaderLib",function(){return ar}),v.d(b,"ShaderMaterial",function(){return Gi}),v.d(b,"ShadowMaterial",function(){return Mv}),v.d(b,"Shape",function(){return Za}),v.d(b,"ShapeBufferGeometry",function(){return Jl}),v.d(b,"ShapeGeometry",function(){return Jl}),v.d(b,"ShapePath",function(){return ix}),v.d(b,"ShapeUtils",function(){return us}),v.d(b,"ShortType",function(){return Wp}),v.d(b,"Skeleton",function(){return Lh}),v.d(b,"SkeletonHelper",function(){return Ex}),v.d(b,"SkinnedMesh",function(){return Va}),v.d(b,"SmoothShading",function(){return ft}),v.d(b,"Sphere",function(){return ui}),v.d(b,"SphereBufferGeometry",function(){return $l}),v.d(b,"SphereGeometry",function(){return $l}),v.d(b,"Spherical",function(){return lM}),v.d(b,"SphericalHarmonics3",function(){return zv}),v.d(b,"SplineCurve",function(){return rm}),v.d(b,"SpotLight",function(){return Uv}),v.d(b,"SpotLightHelper",function(){return hM}),v.d(b,"Sprite",function(){return Xl}),v.d(b,"SpriteMaterial",function(){return zl}),v.d(b,"SrcAlphaFactor",function(){return en}),v.d(b,"SrcAlphaSaturateFactor",function(){return gn}),v.d(b,"SrcColorFactor",function(){return Qt}),v.d(b,"StaticCopyUsage",function(){return Gg}),v.d(b,"StaticDrawUsage",function(){return Os}),v.d(b,"StaticReadUsage",function(){return $u}),v.d(b,"StereoCamera",function(){return YE}),v.d(b,"StreamCopyUsage",function(){return Qu}),v.d(b,"StreamDrawUsage",function(){return Ds}),v.d(b,"StreamReadUsage",function(){return kg}),v.d(b,"StringKeyframeTrack",function(){return Ql}),v.d(b,"SubtractEquation",function(){return Oe}),v.d(b,"SubtractiveBlending",function(){return Ie}),v.d(b,"TOUCH",function(){return le}),v.d(b,"TangentSpaceNormalMap",function(){return mr}),v.d(b,"TetrahedronBufferGeometry",function(){return Hh}),v.d(b,"TetrahedronGeometry",function(){return Hh}),v.d(b,"TextBufferGeometry",function(){return lm}),v.d(b,"TextGeometry",function(){return lm}),v.d(b,"Texture",function(){return Kn}),v.d(b,"TextureLoader",function(){return Nv}),v.d(b,"TorusBufferGeometry",function(){return zh}),v.d(b,"TorusGeometry",function(){return zh}),v.d(b,"TorusKnotBufferGeometry",function(){return Vh}),v.d(b,"TorusKnotGeometry",function(){return Vh}),v.d(b,"Triangle",function(){return Mn}),v.d(b,"TriangleFanDrawMode",function(){return ct}),v.d(b,"TriangleStripDrawMode",function(){return Ze}),v.d(b,"TrianglesDrawMode",function(){return je}),v.d(b,"TubeBufferGeometry",function(){return jh}),v.d(b,"TubeGeometry",function(){return jh}),v.d(b,"UVMapping",function(){return Iu}),v.d(b,"Uint16Attribute",function(){return WM}),v.d(b,"Uint16BufferAttribute",function(){return Ra}),v.d(b,"Uint32Attribute",function(){return YM}),v.d(b,"Uint32BufferAttribute",function(){return Ur}),v.d(b,"Uint8Attribute",function(){return zM}),v.d(b,"Uint8BufferAttribute",function(){return Kc}),v.d(b,"Uint8ClampedAttribute",function(){return VM}),v.d(b,"Uint8ClampedBufferAttribute",function(){return dh}),v.d(b,"Uniform",function(){return gm}),v.d(b,"UniformsLib",function(){return dt}),v.d(b,"UniformsUtils",function(){return io}),v.d(b,"UnsignedByteType",function(){return Wo}),v.d(b,"UnsignedInt248Type",function(){return dn}),v.d(b,"UnsignedIntType",function(){return As}),v.d(b,"UnsignedShort4444Type",function(){return Yp}),v.d(b,"UnsignedShort5551Type",function(){return qp}),v.d(b,"UnsignedShort565Type",function(){return Zp}),v.d(b,"UnsignedShortType",function(){return gl}),v.d(b,"VSMShadowMap",function(){return D}),v.d(b,"Vector2",function(){return Qe}),v.d(b,"Vector3",function(){return T}),v.d(b,"Vector4",function(){return pn}),v.d(b,"VectorKeyframeTrack",function(){return Ld}),v.d(b,"Vertex",function(){return kM}),v.d(b,"VertexColors",function(){return RM}),v.d(b,"VideoTexture",function(){return vt}),v.d(b,"WebGL1Renderer",function(){return di}),v.d(b,"WebGLCubeRenderTarget",function(){return Pt}),v.d(b,"WebGLMultipleRenderTargets",function(){return Ml}),v.d(b,"WebGLMultisampleRenderTarget",function(){return Fs}),v.d(b,"WebGLRenderTarget",function(){return Or}),v.d(b,"WebGLRenderTargetCube",function(){return nA}),v.d(b,"WebGLRenderer",function(){return fn}),v.d(b,"WebGLUtils",function(){return Yf}),v.d(b,"WireframeGeometry",function(){return Ev}),v.d(b,"WireframeHelper",function(){return QM}),v.d(b,"WrapAroundEnding",function(){return yl}),v.d(b,"XHRLoader",function(){return eA}),v.d(b,"ZeroCurvatureEnding",function(){return wi}),v.d(b,"ZeroFactor",function(){return at}),v.d(b,"ZeroSlopeEnding",function(){return Yo}),v.d(b,"ZeroStencilOp",function(){return Xu}),v.d(b,"sRGBEncoding",function(){return $t});var q={};v.r(q),v.d(q,"isMobile",function(){return ao}),v.d(q,"EventEmitter",function(){return Kh.a}),v.d(q,"earcut",function(){return c0.a}),v.d(q,"BaseTextureCache",function(){return uo}),v.d(q,"CanvasRenderTarget",function(){return T0}),v.d(q,"DATA_URI",function(){return S1}),v.d(q,"ProgramCache",function(){return w0}),v.d(q,"TextureCache",function(){return Ar}),v.d(q,"clearTextureCache",function(){return MA}),v.d(q,"correctBlendMode",function(){return _0}),v.d(q,"createIndicesForQuads",function(){return x1}),v.d(q,"decomposeDataUri",function(){return AA}),v.d(q,"deprecation",function(){return fu}),v.d(q,"destroyTextureCache",function(){return EA}),v.d(q,"determineCrossOrigin",function(){return E1}),v.d(q,"getBufferType",function(){return b1}),v.d(q,"getResolutionOfUrl",function(){return Vd}),v.d(q,"hex2rgb",function(){return hu}),v.d(q,"hex2string",function(){return m0}),v.d(q,"interleaveTypedArrays",function(){return TA}),v.d(q,"isPow2",function(){return x0}),v.d(q,"isWebGLSupported",function(){return _1}),v.d(q,"log2",function(){return b0}),v.d(q,"nextPow2",function(){return zd}),v.d(q,"premultiplyBlendMode",function(){return v0}),v.d(q,"premultiplyRgba",function(){return y1}),v.d(q,"premultiplyTint",function(){return Pm}),v.d(q,"premultiplyTintToRgba",function(){return y0}),v.d(q,"removeItems",function(){return cu}),v.d(q,"rgb2hex",function(){return bA}),v.d(q,"sayHello",function(){return v1}),v.d(q,"sign",function(){return du}),v.d(q,"skipHello",function(){return yA}),v.d(q,"string2hex",function(){return g0}),v.d(q,"trimCanvas",function(){return T1}),v.d(q,"uid",function(){return pu}),v.d(q,"url",function(){return uu});var B={};v.r(B),v.d(B,"utils",function(){return q}),v.d(B,"AccessibilityManager",function(){return O1}),v.d(B,"accessibleTarget",function(){return L1}),v.d(B,"InteractionData",function(){return R0}),v.d(B,"InteractionEvent",function(){return F1}),v.d(B,"InteractionManager",function(){return U1}),v.d(B,"InteractionTrackingData",function(){return Im}),v.d(B,"interactiveTarget",function(){return B1}),v.d(B,"Application",function(){return Qd}),v.d(B,"AbstractBatchRenderer",function(){return fb}),v.d(B,"AbstractMultiResource",function(){return Dm}),v.d(B,"AbstractRenderer",function(){return cb}),v.d(B,"ArrayResource",function(){return I0}),v.d(B,"Attribute",function(){return B0}),v.d(B,"BaseImageResource",function(){return gs}),v.d(B,"BaseRenderTexture",function(){return N0}),v.d(B,"BaseTexture",function(){return vn}),v.d(B,"BatchDrawCall",function(){return Ym}),v.d(B,"BatchGeometry",function(){return r_}),v.d(B,"BatchPluginFactory",function(){return _b}),v.d(B,"BatchRenderer",function(){return yb}),v.d(B,"BatchShaderGenerator",function(){return mb}),v.d(B,"BatchSystem",function(){return H0}),v.d(B,"BatchTextureArray",function(){return qm}),v.d(B,"Buffer",function(){return Ni}),v.d(B,"BufferResource",function(){return Qh}),v.d(B,"CanvasResource",function(){return Nm}),v.d(B,"ContextSystem",function(){return z0}),v.d(B,"CubeResource",function(){return L0}),v.d(B,"Filter",function(){return Rr}),v.d(B,"FilterState",function(){return X1}),v.d(B,"FilterSystem",function(){return G0}),v.d(B,"Framebuffer",function(){return Um}),v.d(B,"FramebufferSystem",function(){return V0}),v.d(B,"GLFramebuffer",function(){return q1}),v.d(B,"GLProgram",function(){return lb}),v.d(B,"GLTexture",function(){return Xm}),v.d(B,"Geometry",function(){return bu}),v.d(B,"GeometrySystem",function(){return W0}),v.d(B,"IGLUniformData",function(){return XA}),v.d(B,"INSTALLED",function(){return Yd}),v.d(B,"ImageBitmapResource",function(){return D0}),v.d(B,"ImageResource",function(){return Fm}),v.d(B,"MaskData",function(){return Z1}),v.d(B,"MaskSystem",function(){return Y0}),v.d(B,"ObjectRenderer",function(){return qd}),v.d(B,"Program",function(){return $d}),v.d(B,"ProjectionSystem",function(){return J0}),v.d(B,"Quad",function(){return W1}),v.d(B,"QuadUv",function(){return U0}),v.d(B,"RenderTexture",function(){return zr}),v.d(B,"RenderTexturePool",function(){return z1}),v.d(B,"RenderTextureSystem",function(){return $0}),v.d(B,"Renderer",function(){return ua}),v.d(B,"Resource",function(){return xu}),v.d(B,"SVGResource",function(){return O0}),v.d(B,"ScissorSystem",function(){return q0}),v.d(B,"Shader",function(){return la}),v.d(B,"ShaderSystem",function(){return K0}),v.d(B,"SpriteMaskFilter",function(){return sb}),v.d(B,"State",function(){return Qa}),v.d(B,"StateSystem",function(){return Q0}),v.d(B,"StencilSystem",function(){return Z0}),v.d(B,"System",function(){return Cr}),v.d(B,"Texture",function(){return Nt}),v.d(B,"TextureGCSystem",function(){return e_}),v.d(B,"TextureMatrix",function(){return Wm}),v.d(B,"TextureSystem",function(){return t_}),v.d(B,"TextureUvs",function(){return F0}),v.d(B,"UniformGroup",function(){return Ka}),v.d(B,"VideoResource",function(){return Bm}),v.d(B,"ViewableBuffer",function(){return Zm}),v.d(B,"autoDetectRenderer",function(){return db}),v.d(B,"autoDetectResource",function(){return Om}),v.d(B,"checkMaxIfStatementsInShader",function(){return rb}),v.d(B,"defaultFilterVertex",function(){return i_}),v.d(B,"defaultVertex",function(){return pb}),v.d(B,"resources",function(){return xb}),v.d(B,"systems",function(){return bb}),v.d(B,"uniformParsers",function(){return Vm}),v.d(B,"Extract",function(){return Tb}),v.d(B,"AppLoaderPlugin",function(){return Lb}),v.d(B,"Loader",function(){return vs}),v.d(B,"LoaderResource",function(){return ho}),v.d(B,"TextureLoader",function(){return Ib}),v.d(B,"BlobResource",function(){return Nb}),v.d(B,"CompressedTextureLoader",function(){return Fb}),v.d(B,"CompressedTextureResource",function(){return Km}),v.d(B,"DDSLoader",function(){return Ub}),v.d(B,"FORMATS_TO_COMPONENTS",function(){return Gb}),v.d(B,"INTERNAL_FORMATS",function(){return Jt}),v.d(B,"INTERNAL_FORMAT_TO_BYTES_PER_PIXEL",function(){return ep}),v.d(B,"KTXLoader",function(){return zb}),v.d(B,"TYPES_TO_BYTES_PER_COMPONENT",function(){return u_}),v.d(B,"TYPES_TO_BYTES_PER_PIXEL",function(){return Hb}),v.d(B,"ParticleContainer",function(){return P2}),v.d(B,"ParticleRenderer",function(){return Xb}),v.d(B,"BasePrepare",function(){return aw}),v.d(B,"CountLimiter",function(){return sw}),v.d(B,"Prepare",function(){return uw}),v.d(B,"TimeLimiter",function(){return j2}),v.d(B,"Spritesheet",function(){return hw}),v.d(B,"SpritesheetLoader",function(){return cw}),v.d(B,"TilingSprite",function(){return W2}),v.d(B,"TilingSpriteRenderer",function(){return mw}),v.d(B,"BitmapFont",function(){return ac}),v.d(B,"BitmapFontData",function(){return ap}),v.d(B,"BitmapFontLoader",function(){return Sw}),v.d(B,"BitmapText",function(){return Z2}),v.d(B,"Ticker",function(){return Di}),v.d(B,"TickerPlugin",function(){return D1}),v.d(B,"UPDATE_PRIORITY",function(){return Pr}),v.d(B,"ALPHA_MODES",function(){return ms}),v.d(B,"BLEND_MODES",function(){return Ft}),v.d(B,"BUFFER_BITS",function(){return Gd}),v.d(B,"CLEAR_MODES",function(){return aa}),v.d(B,"DRAW_MODES",function(){return lo}),v.d(B,"ENV",function(){return ds}),v.d(B,"FORMATS",function(){return Do}),v.d(B,"GC_MODES",function(){return Am}),v.d(B,"MASK_TYPES",function(){return Mr}),v.d(B,"MIPMAP_MODES",function(){return sa}),v.d(B,"MSAA_QUALITY",function(){return lu}),v.d(B,"PRECISION",function(){return No}),v.d(B,"RENDERER_TYPE",function(){return $h}),v.d(B,"SAMPLER_TYPES",function(){return Hd}),v.d(B,"SCALE_MODES",function(){return ps}),v.d(B,"TARGETS",function(){return $a}),v.d(B,"TYPES",function(){return bn}),v.d(B,"WRAP_MODES",function(){return fs}),v.d(B,"Bounds",function(){return Xd}),v.d(B,"Container",function(){return Ai}),v.d(B,"DisplayObject",function(){return mi}),v.d(B,"TemporaryDisplayObject",function(){return P0}),v.d(B,"FillStyle",function(){return h_}),v.d(B,"GRAPHICS_CURVES",function(){return tc}),v.d(B,"Graphics",function(){return fa}),v.d(B,"GraphicsData",function(){return v_}),v.d(B,"GraphicsGeometry",function(){return ew}),v.d(B,"LINE_CAP",function(){return pa}),v.d(B,"LINE_JOIN",function(){return da}),v.d(B,"LineStyle",function(){return tw}),v.d(B,"graphicsUtils",function(){return I2}),v.d(B,"Circle",function(){return P1}),v.d(B,"DEG_TO_RAD",function(){return A1}),v.d(B,"Ellipse",function(){return C1}),v.d(B,"Matrix",function(){return fi}),v.d(B,"ObservablePoint",function(){return mu}),v.d(B,"PI_2",function(){return jd}),v.d(B,"Point",function(){return si}),v.d(B,"Polygon",function(){return Wd}),v.d(B,"RAD_TO_DEG",function(){return M1}),v.d(B,"Rectangle",function(){return nn}),v.d(B,"RoundedRectangle",function(){return S0}),v.d(B,"SHAPES",function(){return oi}),v.d(B,"Transform",function(){return M0}),v.d(B,"groupD8",function(){return qn}),v.d(B,"Mesh",function(){return Eu}),v.d(B,"MeshBatchUvs",function(){return vw}),v.d(B,"MeshGeometry",function(){return sp}),v.d(B,"MeshMaterial",function(){return op}),v.d(B,"NineSlicePlane",function(){return sP}),v.d(B,"PlaneGeometry",function(){return $w}),v.d(B,"RopeGeometry",function(){return Kw}),v.d(B,"SimpleMesh",function(){return oP}),v.d(B,"SimplePlane",function(){return Qw}),v.d(B,"SimpleRope",function(){return rP}),v.d(B,"Runner",function(){return Vi}),v.d(B,"Sprite",function(){return Hn}),v.d(B,"AnimatedSprite",function(){return P_}),v.d(B,"TEXT_GRADIENT",function(){return sc}),v.d(B,"Text",function(){return ig}),v.d(B,"TextMetrics",function(){return Vr}),v.d(B,"TextStyle",function(){return Su}),v.d(B,"isMobile",function(){return ao}),v.d(B,"settings",function(){return At}),v.d(B,"VERSION",function(){return aP}),v.d(B,"filters",function(){return up});var ie=v(0),k=v.n(ie),oe=v(1);/**
82
82
  * @license
83
83
  * Copyright 2010-2021 Three.js Authors
84
84
  * SPDX-License-Identifier: MIT
85
- */const X="130",K={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},le={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Ee=0,Xe=1,Fe=2,S=3,A=0,L=1,j=2,D=3,z=0,W=1,ee=2,et=1,ft=2,$e=0,ae=1,Ce=2,Ie=3,H=4,be=5,Me=100,Oe=101,Se=102,Ue=103,qe=104,at=200,rt=201,Qt=202,lt=203,en=204,Bt=205,Vt=206,bt=207,Dn=208,wn=209,gn=210,Zn=0,yn=1,li=2,Bi=3,Ci=4,ji=5,Lr=6,Dp=7,ul=0,Np=1,Fp=2,co=0,Bp=1,Up=2,kp=3,Gp=4,Hp=5,Iu=300,zo=301,hl=302,cl=303,dl=304,va=306,_a=307,Vo=1e3,gi=1001,pl=1002,Jn=1003,fl=1004,bc=1004,ml=1005,wc=1005,$n=1006,jo=1007,zp=1007,Ms=1008,Vp=1008,Wo=1009,jp=1010,Wp=1011,gl=1012,Xp=1013,As=1014,po=1015,Ps=1016,Yp=1017,qp=1018,Zp=1019,dn=1020,_n=1021,fo=1022,tr=1023,Jp=1024,Tc=1025,$p=tr,Nn=1026,Cs=1027,ya=1028,Sc=1029,Lu=1030,nr=1031,Ec=1032,Mc=1033,Ou=33776,Du=33777,Nu=33778,Fu=33779,Ui=35840,Ac=35841,Wi=35842,Pc=35843,Cc=36196,qr=37492,xa=37496,Bu=37808,Tn=37809,mo=37810,Uu=37811,Kp=37812,ku=37813,Qp=37814,Rc=37815,vl=37816,Rs=37817,ef=37818,Ic=37819,Lc=37820,Gu=37821,Hu=36492,Oc=37840,zu=37841,Vu=37842,Dc=37843,Xi=37844,ju=37845,ba=37846,Nc=37847,Fc=37848,tf=37849,nf=37850,rf=37851,of=37852,Is=37853,Wu=2200,Bc=2201,go=2202,Xo=2300,_l=2301,vo=2302,wi=2400,Yo=2401,yl=2402,Ls=2500,we=2501,je=0,Ze=1,ct=2,wt=3e3,$t=3001,Vn=3007,ir=3002,xn=3003,xl=3004,Uc=3005,Yi=3006,bl=3200,kc=3201,mr=0,wl=1,Xu=0,un=7680,Dg=7681,sf=7682,Yu=7683,Ng=34055,Fg=34056,Bg=5386,qu=512,qo=513,Zu=514,af=515,Ju=516,lf=517,uf=518,Tl=519,Os=35044,Zr=35048,Ds=35040,$u=35045,Ug=35049,kg=35041,Gg=35046,Ku=35050,Qu=35042,Gc="100",Hc="300 es";class _o{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const n=this._listeners[e];if(n!==void 0){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const t=this._listeners[e.type];if(t!==void 0){e.target=this;const n=t.slice(0);for(let i=0,o=n.length;i<o;i++)n[i].call(this,e);e.target=null}}}const Ti=[];for(let r=0;r<256;r++)Ti[r]=(r<16?"0":"")+r.toString(16);let eh=1234567;const Sn=Math.PI/180,ii=180/Math.PI;function rr(){const r=4294967295*Math.random()|0,e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0;return(Ti[255&r]+Ti[r>>8&255]+Ti[r>>16&255]+Ti[r>>24&255]+"-"+Ti[255&e]+Ti[e>>8&255]+"-"+Ti[e>>16&15|64]+Ti[e>>24&255]+"-"+Ti[63&t|128]+Ti[t>>8&255]+"-"+Ti[t>>16&255]+Ti[t>>24&255]+Ti[255&n]+Ti[n>>8&255]+Ti[n>>16&255]+Ti[n>>24&255]).toUpperCase()}function Si(r,e,t){return Math.max(e,Math.min(t,r))}function th(r,e){return(r%e+e)%e}function Sl(r,e,t){return(1-t)*r+t*e}function El(r){return(r&r-1)==0&&r!==0}function wa(r){return Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function nh(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}var Ns=Object.freeze({__proto__:null,DEG2RAD:Sn,RAD2DEG:ii,generateUUID:rr,clamp:Si,euclideanModulo:th,mapLinear:function(r,e,t,n,i){return n+(r-e)*(i-n)/(t-e)},inverseLerp:function(r,e,t){return r!==e?(t-r)/(e-r):0},lerp:Sl,damp:function(r,e,t,n){return Sl(r,e,1-Math.exp(-t*n))},pingpong:function(r,e=1){return e-Math.abs(th(r,2*e)-e)},smoothstep:function(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e))*r*(3-2*r)},smootherstep:function(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e))*r*r*(r*(6*r-15)+10)},randInt:function(r,e){return r+Math.floor(Math.random()*(e-r+1))},randFloat:function(r,e){return r+Math.random()*(e-r)},randFloatSpread:function(r){return r*(.5-Math.random())},seededRandom:function(r){return r!==void 0&&(eh=r%2147483647),eh=16807*eh%2147483647,(eh-1)/2147483646},degToRad:function(r){return r*Sn},radToDeg:function(r){return r*ii},isPowerOfTwo:El,ceilPowerOfTwo:wa,floorPowerOfTwo:nh,setQuaternionFromProperEuler:function(r,e,t,n,i){const o=Math.cos,s=Math.sin,a=o(t/2),l=s(t/2),u=o((e+n)/2),c=s((e+n)/2),d=o((e-n)/2),f=s((e-n)/2),m=o((n-e)/2),g=s((n-e)/2);switch(i){case"XYX":r.set(a*c,l*d,l*f,a*u);break;case"YZY":r.set(l*f,a*c,l*d,a*u);break;case"ZXZ":r.set(l*d,l*f,a*c,a*u);break;case"XZX":r.set(a*c,l*g,l*m,a*u);break;case"YXY":r.set(l*m,a*c,l*g,a*u);break;case"ZYZ":r.set(l*g,l*m,a*c,a*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}});class Qe{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),i=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*n-s*i+e.x,this.y=o*i+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}}Qe.prototype.isVector2=!0;class En{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,i,o,s,a,l,u){const c=this.elements;return c[0]=e,c[1]=i,c[2]=a,c[3]=t,c[4]=o,c[5]=l,c[6]=n,c[7]=s,c[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,o=this.elements,s=n[0],a=n[3],l=n[6],u=n[1],c=n[4],d=n[7],f=n[2],m=n[5],g=n[8],_=i[0],y=i[3],w=i[6],M=i[1],R=i[4],F=i[7],C=i[2],U=i[5],N=i[8];return o[0]=s*_+a*M+l*C,o[3]=s*y+a*R+l*U,o[6]=s*w+a*F+l*N,o[1]=u*_+c*M+d*C,o[4]=u*y+c*R+d*U,o[7]=u*w+c*F+d*N,o[2]=f*_+m*M+g*C,o[5]=f*y+m*R+g*U,o[8]=f*w+m*F+g*N,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],u=e[7],c=e[8];return t*s*c-t*a*u-n*o*c+n*a*l+i*o*u-i*s*l}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],u=e[7],c=e[8],d=c*s-a*u,f=a*l-c*o,m=u*o-s*l,g=t*d+n*f+i*m;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/g;return e[0]=d*_,e[1]=(i*u-c*n)*_,e[2]=(a*n-i*s)*_,e[3]=f*_,e[4]=(c*t-i*l)*_,e[5]=(i*o-a*t)*_,e[6]=m*_,e[7]=(n*l-u*t)*_,e[8]=(s*t-n*o)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,o,s,a){const l=Math.cos(o),u=Math.sin(o);return this.set(n*l,n*u,-n*(l*s+u*a)+s+e,-i*u,i*l,-i*(-u*s+l*a)+a+t,0,0,1),this}scale(e,t){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),i=this.elements,o=i[0],s=i[3],a=i[6],l=i[1],u=i[4],c=i[7];return i[0]=t*o+n*l,i[3]=t*s+n*u,i[6]=t*a+n*c,i[1]=-n*o+t*l,i[4]=-n*s+t*u,i[7]=-n*a+t*c,this}translate(e,t){const n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}let yo;En.prototype.isMatrix3=!0;class gr{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement=="undefined")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{yo===void 0&&(yo=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),yo.width=e.width,yo.height=e.height;const n=yo.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=yo}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}}let Hg=0;class Kn extends _o{constructor(e=Kn.DEFAULT_IMAGE,t=Kn.DEFAULT_MAPPING,n=gi,i=gi,o=$n,s=Ms,a=tr,l=Wo,u=1,c=wt){super(),Object.defineProperty(this,"id",{value:Hg++}),this.uuid=rr(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=i,this.magFilter=o,this.minFilter=s,this.anisotropy=u,this.format=a,this.internalFormat=null,this.type=l,this.offset=new Qe(0,0),this.repeat=new Qe(1,1),this.center=new Qe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new En,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.version=0,this.onUpdate=null}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(this.image!==void 0){const i=this.image;if(i.uuid===void 0&&(i.uuid=rr()),!t&&e.images[i.uuid]===void 0){let o;if(Array.isArray(i)){o=[];for(let s=0,a=i.length;s<a;s++)i[s].isDataTexture?o.push(zc(i[s].image)):o.push(zc(i[s]))}else o=zc(i);e.images[i.uuid]={uuid:i.uuid,url:o}}n.image=i.uuid}return t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Iu)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Vo:e.x=e.x-Math.floor(e.x);break;case gi:e.x=e.x<0?0:1;break;case pl:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case Vo:e.y=e.y-Math.floor(e.y);break;case gi:e.y=e.y<0?0:1;break;case pl:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&this.version++}}function zc(r){return typeof HTMLImageElement!="undefined"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&r instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&r instanceof ImageBitmap?gr.getDataURL(r):r.data?{data:Array.prototype.slice.call(r.data),width:r.width,height:r.height,type:r.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}Kn.DEFAULT_IMAGE=void 0,Kn.DEFAULT_MAPPING=Iu,Kn.prototype.isTexture=!0;class pn{constructor(e=0,t=0,n=0,i=1){this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*i+s[12]*o,this.y=s[1]*t+s[5]*n+s[9]*i+s[13]*o,this.z=s[2]*t+s[6]*n+s[10]*i+s[14]*o,this.w=s[3]*t+s[7]*n+s[11]*i+s[15]*o,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,o;const s=e.elements,a=s[0],l=s[4],u=s[8],c=s[1],d=s[5],f=s[9],m=s[2],g=s[6],_=s[10];if(Math.abs(l-c)<.01&&Math.abs(u-m)<.01&&Math.abs(f-g)<.01){if(Math.abs(l+c)<.1&&Math.abs(u+m)<.1&&Math.abs(f+g)<.1&&Math.abs(a+d+_-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const w=(a+1)/2,M=(d+1)/2,R=(_+1)/2,F=(l+c)/4,C=(u+m)/4,U=(f+g)/4;return w>M&&w>R?w<.01?(n=0,i=.707106781,o=.707106781):(n=Math.sqrt(w),i=F/n,o=C/n):M>R?M<.01?(n=.707106781,i=0,o=.707106781):(i=Math.sqrt(M),n=F/i,o=U/i):R<.01?(n=.707106781,i=.707106781,o=0):(o=Math.sqrt(R),n=C/o,i=U/o),this.set(n,i,o,t),this}let y=Math.sqrt((g-f)*(g-f)+(u-m)*(u-m)+(c-l)*(c-l));return Math.abs(y)<.001&&(y=1),this.x=(g-f)/y,this.y=(u-m)/y,this.z=(c-l)/y,this.w=Math.acos((a+d+_-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}}pn.prototype.isVector4=!0;class Or extends _o{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new pn(0,0,e,t),this.scissorTest=!1,this.viewport=new pn(0,0,e,t),this.texture=new Kn(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={width:e,height:t,depth:1},this.texture.generateMipmaps=n.generateMipmaps!==void 0&&n.generateMipmaps,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:$n,this.depthBuffer=n.depthBuffer===void 0||n.depthBuffer,this.stencilBuffer=n.stencilBuffer!==void 0&&n.stencilBuffer,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null}setTexture(e){e.image={width:this.width,height:this.height,depth:this.depth},this.texture=e}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.image=aS({},this.texture.image),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}Or.prototype.isWebGLRenderTarget=!0;class Ml extends Or{constructor(e,t,n){super(e,t);const i=this.texture;this.texture=[];for(let o=0;o<n;o++)this.texture[o]=i.clone()}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let i=0,o=this.texture.length;i<o;i++)this.texture[i].image.width=e,this.texture[i].image.height=t,this.texture[i].image.depth=n;this.dispose()}return this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t),this}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone();return this}}Ml.prototype.isWebGLMultipleRenderTargets=!0;class Fs extends Or{constructor(e,t,n){super(e,t,n),this.samples=4}copy(e){return super.copy.call(this,e),this.samples=e.samples,this}}Fs.prototype.isWebGLMultisampleRenderTarget=!0;class vi{constructor(e=0,t=0,n=0,i=1){this._x=e,this._y=t,this._z=n,this._w=i}static slerp(e,t,n,i){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(e,t,i)}static slerpFlat(e,t,n,i,o,s,a){let l=n[i+0],u=n[i+1],c=n[i+2],d=n[i+3];const f=o[s+0],m=o[s+1],g=o[s+2],_=o[s+3];if(a===0)return e[t+0]=l,e[t+1]=u,e[t+2]=c,void(e[t+3]=d);if(a===1)return e[t+0]=f,e[t+1]=m,e[t+2]=g,void(e[t+3]=_);if(d!==_||l!==f||u!==m||c!==g){let y=1-a;const w=l*f+u*m+c*g+d*_,M=w>=0?1:-1,R=1-w*w;if(R>Number.EPSILON){const C=Math.sqrt(R),U=Math.atan2(C,w*M);y=Math.sin(y*U)/C,a=Math.sin(a*U)/C}const F=a*M;if(l=l*y+f*F,u=u*y+m*F,c=c*y+g*F,d=d*y+_*F,y===1-a){const C=1/Math.sqrt(l*l+u*u+c*c+d*d);l*=C,u*=C,c*=C,d*=C}}e[t]=l,e[t+1]=u,e[t+2]=c,e[t+3]=d}static multiplyQuaternionsFlat(e,t,n,i,o,s){const a=n[i],l=n[i+1],u=n[i+2],c=n[i+3],d=o[s],f=o[s+1],m=o[s+2],g=o[s+3];return e[t]=a*g+c*d+l*m-u*f,e[t+1]=l*g+c*f+u*d-a*m,e[t+2]=u*g+c*m+a*f-l*d,e[t+3]=c*g-a*d-l*f-u*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=e._x,i=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,u=a(n/2),c=a(i/2),d=a(o/2),f=l(n/2),m=l(i/2),g=l(o/2);switch(s){case"XYZ":this._x=f*c*d+u*m*g,this._y=u*m*d-f*c*g,this._z=u*c*g+f*m*d,this._w=u*c*d-f*m*g;break;case"YXZ":this._x=f*c*d+u*m*g,this._y=u*m*d-f*c*g,this._z=u*c*g-f*m*d,this._w=u*c*d+f*m*g;break;case"ZXY":this._x=f*c*d-u*m*g,this._y=u*m*d+f*c*g,this._z=u*c*g+f*m*d,this._w=u*c*d-f*m*g;break;case"ZYX":this._x=f*c*d-u*m*g,this._y=u*m*d+f*c*g,this._z=u*c*g-f*m*d,this._w=u*c*d+f*m*g;break;case"YZX":this._x=f*c*d+u*m*g,this._y=u*m*d+f*c*g,this._z=u*c*g-f*m*d,this._w=u*c*d-f*m*g;break;case"XZY":this._x=f*c*d-u*m*g,this._y=u*m*d-f*c*g,this._z=u*c*g+f*m*d,this._w=u*c*d+f*m*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],o=t[8],s=t[1],a=t[5],l=t[9],u=t[2],c=t[6],d=t[10],f=n+a+d;if(f>0){const m=.5/Math.sqrt(f+1);this._w=.25/m,this._x=(c-l)*m,this._y=(o-u)*m,this._z=(s-i)*m}else if(n>a&&n>d){const m=2*Math.sqrt(1+n-a-d);this._w=(c-l)/m,this._x=.25*m,this._y=(i+s)/m,this._z=(o+u)/m}else if(a>d){const m=2*Math.sqrt(1+a-n-d);this._w=(o-u)/m,this._x=(i+s)/m,this._y=.25*m,this._z=(l+c)/m}else{const m=2*Math.sqrt(1+d-n-a);this._w=(s-i)/m,this._x=(o+u)/m,this._y=(l+c)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Si(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return t!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,i=e._y,o=e._z,s=e._w,a=t._x,l=t._y,u=t._z,c=t._w;return this._x=n*c+s*a+i*u-o*l,this._y=i*c+s*l+o*a-n*u,this._z=o*c+s*u+n*l-i*a,this._w=s*c-n*a-i*l-o*u,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const n=this._x,i=this._y,o=this._z,s=this._w;let a=s*e._w+n*e._x+i*e._y+o*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=n,this._y=i,this._z=o,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-t;return this._w=m*s+t*this._w,this._x=m*n+t*this._x,this._y=m*i+t*this._y,this._z=m*o+t*this._z,this.normalize(),this._onChangeCallback(),this}const u=Math.sqrt(l),c=Math.atan2(u,a),d=Math.sin((1-t)*c)/u,f=Math.sin(t*c)/u;return this._w=s*d+this._w*f,this._x=n*d+this._x*f,this._y=i*d+this._y*f,this._z=o*d+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,t,n){this.copy(e).slerp(t,n)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}vi.prototype.isQuaternion=!0;class T{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Al.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Al.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,i=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*i,this.y=o[1]*t+o[4]*n+o[7]*i,this.z=o[2]*t+o[5]*n+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,o=e.elements,s=1/(o[3]*t+o[7]*n+o[11]*i+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*i+o[12])*s,this.y=(o[1]*t+o[5]*n+o[9]*i+o[13])*s,this.z=(o[2]*t+o[6]*n+o[10]*i+o[14])*s,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,o=e.x,s=e.y,a=e.z,l=e.w,u=l*t+s*i-a*n,c=l*n+a*t-o*i,d=l*i+o*n-s*t,f=-o*t-s*n-a*i;return this.x=u*l+f*-o+c*-a-d*-s,this.y=c*l+f*-s+d*-o-u*-a,this.z=d*l+f*-a+u*-s-c*-o,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,i=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*i,this.y=o[1]*t+o[5]*n+o[9]*i,this.z=o[2]*t+o[6]*n+o[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return t!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,i=e.y,o=e.z,s=t.x,a=t.y,l=t.z;return this.x=i*l-o*a,this.y=o*s-n*l,this.z=n*a-i*s,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return Zo.copy(this).projectOnVector(e),this.sub(Zo)}reflect(e){return this.sub(Zo.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Si(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}}T.prototype.isVector3=!0;const Zo=new T,Al=new vi;class In{constructor(e=new T(1/0,1/0,1/0),t=new T(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,i=1/0,o=-1/0,s=-1/0,a=-1/0;for(let l=0,u=e.length;l<u;l+=3){const c=e[l],d=e[l+1],f=e[l+2];c<t&&(t=c),d<n&&(n=d),f<i&&(i=f),c>o&&(o=c),d>s&&(s=d),f>a&&(a=f)}return this.min.set(t,n,i),this.max.set(o,s,a),this}setFromBufferAttribute(e){let t=1/0,n=1/0,i=1/0,o=-1/0,s=-1/0,a=-1/0;for(let l=0,u=e.count;l<u;l++){const c=e.getX(l),d=e.getY(l),f=e.getZ(l);c<t&&(t=c),d<n&&(n=d),f<i&&(i=f),c>o&&(o=c),d>s&&(s=d),f>a&&(a=f)}return this.min.set(t,n,i),this.max.set(o,s,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Dr.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e){return this.makeEmpty(),this.expandByObject(e)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e){e.updateWorldMatrix(!1,!1);const t=e.geometry;t!==void 0&&(t.boundingBox===null&&t.computeBoundingBox(),Nr.copy(t.boundingBox),Nr.applyMatrix4(e.matrixWorld),this.union(Nr));const n=e.children;for(let i=0,o=n.length;i<o;i++)this.expandByObject(n[i]);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Dr),Dr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Pl),Ta.subVectors(this.max,Pl),qi.subVectors(e.a,Pl),vr.subVectors(e.b,Pl),Ri.subVectors(e.c,Pl),xo.subVectors(vr,qi),bo.subVectors(Ri,vr),Bs.subVectors(qi,Ri);let t=[0,-xo.z,xo.y,0,-bo.z,bo.y,0,-Bs.z,Bs.y,xo.z,0,-xo.x,bo.z,0,-bo.x,Bs.z,0,-Bs.x,-xo.y,xo.x,0,-bo.y,bo.x,0,-Bs.y,Bs.x,0];return!!Vc(t,qi,vr,Ri,Ta)&&(t=[1,0,0,0,1,0,0,0,1],!!Vc(t,qi,vr,Ri,Ta)&&(Jo.crossVectors(xo,bo),t=[Jo.x,Jo.y,Jo.z],Vc(t,qi,vr,Ri,Ta)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Dr.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(Dr).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(Ht[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ht[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ht[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ht[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ht[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ht[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ht[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ht[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ht)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}In.prototype.isBox3=!0;const Ht=[new T,new T,new T,new T,new T,new T,new T,new T],Dr=new T,Nr=new In,qi=new T,vr=new T,Ri=new T,xo=new T,bo=new T,Bs=new T,Pl=new T,Ta=new T,Jo=new T,Jr=new T;function Vc(r,e,t,n,i){for(let o=0,s=r.length-3;o<=s;o+=3){Jr.fromArray(r,o);const a=i.x*Math.abs(Jr.x)+i.y*Math.abs(Jr.y)+i.z*Math.abs(Jr.z),l=e.dot(Jr),u=t.dot(Jr),c=n.dot(Jr);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>a)return!1}return!0}const hf=new In,$r=new T,Cl=new T,wo=new T;class ui{constructor(e=new T,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):hf.setFromPoints(e).getCenter(n);let i=0;for(let o=0,s=e.length;o<s;o++)i=Math.max(i,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){wo.subVectors(e,this.center);const t=wo.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),i=.5*(n-this.radius);this.center.add(wo.multiplyScalar(i/n)),this.radius+=i}return this}union(e){return Cl.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint($r.copy(e.center).add(Cl)),this.expandByPoint($r.copy(e.center).sub(Cl)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Kr=new T,ih=new T,$o=new T,ki=new T,rh=new T,oh=new T,Sa=new T;class To{constructor(e=new T,t=new T(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Kr)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Kr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Kr.copy(this.direction).multiplyScalar(t).add(this.origin),Kr.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){ih.copy(e).add(t).multiplyScalar(.5),$o.copy(t).sub(e).normalize(),ki.copy(this.origin).sub(ih);const o=.5*e.distanceTo(t),s=-this.direction.dot($o),a=ki.dot(this.direction),l=-ki.dot($o),u=ki.lengthSq(),c=Math.abs(1-s*s);let d,f,m,g;if(c>0)if(d=s*l-a,f=s*a-l,g=o*c,d>=0)if(f>=-g)if(f<=g){const _=1/c;d*=_,f*=_,m=d*(d+s*f+2*a)+f*(s*d+f+2*l)+u}else f=o,d=Math.max(0,-(s*f+a)),m=-d*d+f*(f+2*l)+u;else f=-o,d=Math.max(0,-(s*f+a)),m=-d*d+f*(f+2*l)+u;else f<=-g?(d=Math.max(0,-(-s*o+a)),f=d>0?-o:Math.min(Math.max(-o,-l),o),m=-d*d+f*(f+2*l)+u):f<=g?(d=0,f=Math.min(Math.max(-o,-l),o),m=f*(f+2*l)+u):(d=Math.max(0,-(s*o+a)),f=d>0?o:Math.min(Math.max(-o,-l),o),m=-d*d+f*(f+2*l)+u);else f=s>0?-o:o,d=Math.max(0,-(s*f+a)),m=-d*d+f*(f+2*l)+u;return n&&n.copy(this.direction).multiplyScalar(d).add(this.origin),i&&i.copy($o).multiplyScalar(f).add(ih),m}intersectSphere(e,t){Kr.subVectors(e.center,this.origin);const n=Kr.dot(this.direction),i=Kr.dot(Kr)-n*n,o=e.radius*e.radius;if(i>o)return null;const s=Math.sqrt(o-i),a=n-s,l=n+s;return a<0&&l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0?!0:e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,o,s,a,l;const u=1/this.direction.x,c=1/this.direction.y,d=1/this.direction.z,f=this.origin;return u>=0?(n=(e.min.x-f.x)*u,i=(e.max.x-f.x)*u):(n=(e.max.x-f.x)*u,i=(e.min.x-f.x)*u),c>=0?(o=(e.min.y-f.y)*c,s=(e.max.y-f.y)*c):(o=(e.max.y-f.y)*c,s=(e.min.y-f.y)*c),n>s||o>i?null:((o>n||n!=n)&&(n=o),(s<i||i!=i)&&(i=s),d>=0?(a=(e.min.z-f.z)*d,l=(e.max.z-f.z)*d):(a=(e.max.z-f.z)*d,l=(e.min.z-f.z)*d),n>l||a>i?null:((a>n||n!=n)&&(n=a),(l<i||i!=i)&&(i=l),i<0?null:this.at(n>=0?n:i,t)))}intersectsBox(e){return this.intersectBox(e,Kr)!==null}intersectTriangle(e,t,n,i,o){rh.subVectors(t,e),oh.subVectors(n,e),Sa.crossVectors(rh,oh);let s,a=this.direction.dot(Sa);if(a>0){if(i)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}ki.subVectors(this.origin,e);const l=s*this.direction.dot(oh.crossVectors(ki,oh));if(l<0)return null;const u=s*this.direction.dot(rh.cross(ki));if(u<0||l+u>a)return null;const c=-s*ki.dot(Sa);return c<0?null:this.at(c/a,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class pt{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,i,o,s,a,l,u,c,d,f,m,g,_,y){const w=this.elements;return w[0]=e,w[4]=t,w[8]=n,w[12]=i,w[1]=o,w[5]=s,w[9]=a,w[13]=l,w[2]=u,w[6]=c,w[10]=d,w[14]=f,w[3]=m,w[7]=g,w[11]=_,w[15]=y,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new pt().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,i=1/Ko.setFromMatrixColumn(e,0).length(),o=1/Ko.setFromMatrixColumn(e,1).length(),s=1/Ko.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const t=this.elements,n=e.x,i=e.y,o=e.z,s=Math.cos(n),a=Math.sin(n),l=Math.cos(i),u=Math.sin(i),c=Math.cos(o),d=Math.sin(o);if(e.order==="XYZ"){const f=s*c,m=s*d,g=a*c,_=a*d;t[0]=l*c,t[4]=-l*d,t[8]=u,t[1]=m+g*u,t[5]=f-_*u,t[9]=-a*l,t[2]=_-f*u,t[6]=g+m*u,t[10]=s*l}else if(e.order==="YXZ"){const f=l*c,m=l*d,g=u*c,_=u*d;t[0]=f+_*a,t[4]=g*a-m,t[8]=s*u,t[1]=s*d,t[5]=s*c,t[9]=-a,t[2]=m*a-g,t[6]=_+f*a,t[10]=s*l}else if(e.order==="ZXY"){const f=l*c,m=l*d,g=u*c,_=u*d;t[0]=f-_*a,t[4]=-s*d,t[8]=g+m*a,t[1]=m+g*a,t[5]=s*c,t[9]=_-f*a,t[2]=-s*u,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){const f=s*c,m=s*d,g=a*c,_=a*d;t[0]=l*c,t[4]=g*u-m,t[8]=f*u+_,t[1]=l*d,t[5]=_*u+f,t[9]=m*u-g,t[2]=-u,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){const f=s*l,m=s*u,g=a*l,_=a*u;t[0]=l*c,t[4]=_-f*d,t[8]=g*d+m,t[1]=d,t[5]=s*c,t[9]=-a*c,t[2]=-u*c,t[6]=m*d+g,t[10]=f-_*d}else if(e.order==="XZY"){const f=s*l,m=s*u,g=a*l,_=a*u;t[0]=l*c,t[4]=-d,t[8]=u*c,t[1]=f*d+_,t[5]=s*c,t[9]=m*d-g,t[2]=g*d-m,t[6]=a*c,t[10]=_*d+f}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Qr,e,jc)}lookAt(e,t,n){const i=this.elements;return Zi.subVectors(e,t),Zi.lengthSq()===0&&(Zi.z=1),Zi.normalize(),Fr.crossVectors(n,Zi),Fr.lengthSq()===0&&(Math.abs(n.z)===1?Zi.x+=1e-4:Zi.z+=1e-4,Zi.normalize(),Fr.crossVectors(n,Zi)),Fr.normalize(),eo.crossVectors(Zi,Fr),i[0]=Fr.x,i[4]=eo.x,i[8]=Zi.x,i[1]=Fr.y,i[5]=eo.y,i[9]=Zi.y,i[2]=Fr.z,i[6]=eo.z,i[10]=Zi.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,o=this.elements,s=n[0],a=n[4],l=n[8],u=n[12],c=n[1],d=n[5],f=n[9],m=n[13],g=n[2],_=n[6],y=n[10],w=n[14],M=n[3],R=n[7],F=n[11],C=n[15],U=i[0],N=i[4],G=i[8],he=i[12],ne=i[1],Z=i[5],Q=i[9],$=i[13],se=i[2],me=i[6],ge=i[10],de=i[14],fe=i[3],Re=i[7],ke=i[11],Be=i[15];return o[0]=s*U+a*ne+l*se+u*fe,o[4]=s*N+a*Z+l*me+u*Re,o[8]=s*G+a*Q+l*ge+u*ke,o[12]=s*he+a*$+l*de+u*Be,o[1]=c*U+d*ne+f*se+m*fe,o[5]=c*N+d*Z+f*me+m*Re,o[9]=c*G+d*Q+f*ge+m*ke,o[13]=c*he+d*$+f*de+m*Be,o[2]=g*U+_*ne+y*se+w*fe,o[6]=g*N+_*Z+y*me+w*Re,o[10]=g*G+_*Q+y*ge+w*ke,o[14]=g*he+_*$+y*de+w*Be,o[3]=M*U+R*ne+F*se+C*fe,o[7]=M*N+R*Z+F*me+C*Re,o[11]=M*G+R*Q+F*ge+C*ke,o[15]=M*he+R*$+F*de+C*Be,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],i=e[8],o=e[12],s=e[1],a=e[5],l=e[9],u=e[13],c=e[2],d=e[6],f=e[10],m=e[14];return e[3]*(+o*l*d-i*u*d-o*a*f+n*u*f+i*a*m-n*l*m)+e[7]*(+t*l*m-t*u*f+o*s*f-i*s*m+i*u*c-o*l*c)+e[11]*(+t*u*d-t*a*m-o*s*d+n*s*m+o*a*c-n*u*c)+e[15]*(-i*a*c-t*l*d+t*a*f+i*s*d-n*s*f+n*l*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],m=e[11],g=e[12],_=e[13],y=e[14],w=e[15],M=d*y*u-_*f*u+_*l*m-a*y*m-d*l*w+a*f*w,R=g*f*u-c*y*u-g*l*m+s*y*m+c*l*w-s*f*w,F=c*_*u-g*d*u+g*a*m-s*_*m-c*a*w+s*d*w,C=g*d*l-c*_*l-g*a*f+s*_*f+c*a*y-s*d*y,U=t*M+n*R+i*F+o*C;if(U===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const N=1/U;return e[0]=M*N,e[1]=(_*f*o-d*y*o-_*i*m+n*y*m+d*i*w-n*f*w)*N,e[2]=(a*y*o-_*l*o+_*i*u-n*y*u-a*i*w+n*l*w)*N,e[3]=(d*l*o-a*f*o-d*i*u+n*f*u+a*i*m-n*l*m)*N,e[4]=R*N,e[5]=(c*y*o-g*f*o+g*i*m-t*y*m-c*i*w+t*f*w)*N,e[6]=(g*l*o-s*y*o-g*i*u+t*y*u+s*i*w-t*l*w)*N,e[7]=(s*f*o-c*l*o+c*i*u-t*f*u-s*i*m+t*l*m)*N,e[8]=F*N,e[9]=(g*d*o-c*_*o-g*n*m+t*_*m+c*n*w-t*d*w)*N,e[10]=(s*_*o-g*a*o+g*n*u-t*_*u-s*n*w+t*a*w)*N,e[11]=(c*a*o-s*d*o-c*n*u+t*d*u+s*n*m-t*a*m)*N,e[12]=C*N,e[13]=(c*_*i-g*d*i+g*n*f-t*_*f-c*n*y+t*d*y)*N,e[14]=(g*a*i-s*_*i-g*n*l+t*_*l+s*n*y-t*a*y)*N,e[15]=(s*d*i-c*a*i+c*n*l-t*d*l-s*n*f+t*a*f)*N,this}scale(e){const t=this.elements,n=e.x,i=e.y,o=e.z;return t[0]*=n,t[4]*=i,t[8]*=o,t[1]*=n,t[5]*=i,t[9]*=o,t[2]*=n,t[6]*=i,t[10]*=o,t[3]*=n,t[7]*=i,t[11]*=o,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),i=Math.sin(t),o=1-n,s=e.x,a=e.y,l=e.z,u=o*s,c=o*a;return this.set(u*s+n,u*a-i*l,u*l+i*a,0,u*a+i*l,c*a+n,c*l-i*s,0,u*l-i*a,c*l+i*s,o*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,o,s){return this.set(1,n,o,0,e,1,s,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,u=o+o,c=s+s,d=a+a,f=o*u,m=o*c,g=o*d,_=s*c,y=s*d,w=a*d,M=l*u,R=l*c,F=l*d,C=n.x,U=n.y,N=n.z;return i[0]=(1-(_+w))*C,i[1]=(m+F)*C,i[2]=(g-R)*C,i[3]=0,i[4]=(m-F)*U,i[5]=(1-(f+w))*U,i[6]=(y+M)*U,i[7]=0,i[8]=(g+R)*N,i[9]=(y-M)*N,i[10]=(1-(f+_))*N,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){const i=this.elements;let o=Ko.set(i[0],i[1],i[2]).length();const s=Ko.set(i[4],i[5],i[6]).length(),a=Ko.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],_r.copy(this);const l=1/o,u=1/s,c=1/a;return _r.elements[0]*=l,_r.elements[1]*=l,_r.elements[2]*=l,_r.elements[4]*=u,_r.elements[5]*=u,_r.elements[6]*=u,_r.elements[8]*=c,_r.elements[9]*=c,_r.elements[10]*=c,t.setFromRotationMatrix(_r),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,i,o,s){s===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const a=this.elements,l=2*o/(t-e),u=2*o/(n-i),c=(t+e)/(t-e),d=(n+i)/(n-i),f=-(s+o)/(s-o),m=-2*s*o/(s-o);return a[0]=l,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=u,a[9]=d,a[13]=0,a[2]=0,a[6]=0,a[10]=f,a[14]=m,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,i,o,s){const a=this.elements,l=1/(t-e),u=1/(n-i),c=1/(s-o),d=(t+e)*l,f=(n+i)*u,m=(s+o)*c;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-d,a[1]=0,a[5]=2*u,a[9]=0,a[13]=-f,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-m,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}pt.prototype.isMatrix4=!0;const Ko=new T,_r=new pt,Qr=new T(0,0,0),jc=new T(1,1,1),Fr=new T,eo=new T,Zi=new T,Ii=new pt,sh=new vi;class Us{constructor(e=0,t=0,n=0,i=Us.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const i=e.elements,o=i[0],s=i[4],a=i[8],l=i[1],u=i[5],c=i[9],d=i[2],f=i[6],m=i[10];switch(t){case"XYZ":this._y=Math.asin(Si(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,m),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(f,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Si(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-d,o),this._z=0);break;case"ZXY":this._x=Math.asin(Si(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-d,m),this._z=Math.atan2(-s,u)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Si(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(f,m),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,u));break;case"YZX":this._z=Math.asin(Si(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-d,o)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Si(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(f,u),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-c,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Ii.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Ii,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return sh.setFromEuler(this),this.setFromQuaternion(sh,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new T(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}Us.prototype.isEuler=!0,Us.DefaultOrder="XYZ",Us.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class Wc{constructor(){this.mask=1}set(e){this.mask=1<<e|0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!=0}}let Xc=0;const Ea=new T,ks=new vi,or=new pt,Ma=new T,Aa=new T,cf=new T,Yc=new vi,df=new T(1,0,0),ah=new T(0,1,0),qc=new T(0,0,1),pf={type:"added"},Zc={type:"removed"};class Xt extends _o{constructor(){super(),Object.defineProperty(this,"id",{value:Xc++}),this.uuid=rr(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Xt.DefaultUp.clone();const e=new T,t=new Us,n=new vi,i=new T(1,1,1);t._onChange(function(){n.setFromEuler(t,!1)}),n._onChange(function(){t.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new pt},normalMatrix:{value:new En}}),this.matrix=new pt,this.matrixWorld=new pt,this.matrixAutoUpdate=Xt.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Wc,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return ks.setFromAxisAngle(e,t),this.quaternion.multiply(ks),this}rotateOnWorldAxis(e,t){return ks.setFromAxisAngle(e,t),this.quaternion.premultiply(ks),this}rotateX(e){return this.rotateOnAxis(df,e)}rotateY(e){return this.rotateOnAxis(ah,e)}rotateZ(e){return this.rotateOnAxis(qc,e)}translateOnAxis(e,t){return Ea.copy(e).applyQuaternion(this.quaternion),this.position.add(Ea.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(df,e)}translateY(e){return this.translateOnAxis(ah,e)}translateZ(e){return this.translateOnAxis(qc,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(or.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Ma.copy(e):Ma.set(e,t,n);const i=this.parent;this.updateWorldMatrix(!0,!1),Aa.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?or.lookAt(Aa,Ma,this.up):or.lookAt(Ma,Aa,this.up),this.quaternion.setFromRotationMatrix(or),i&&(or.extractRotation(i.matrixWorld),ks.setFromRotationMatrix(or),this.quaternion.premultiply(ks.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.parent!==null&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(pf)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(Zc)),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(Zc)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),or.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),or.multiply(e.parent.matrixWorld)),e.applyMatrix4(or),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n<i;n++){const o=this.children[n].getObjectByProperty(e,t);if(o!==void 0)return o}}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Aa,e,cf),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Aa,Yc,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),t===!0){const i=this.children;for(let o=0,s=i.length;o<s;o++)i[o].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const i={};function o(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=o(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let u=0,c=l.length;u<c;u++){const d=l[u];o(e.shapes,d)}else o(e.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(o(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let l=0,u=this.material.length;l<u;l++)a.push(o(e.materials,this.material[l]));i.material=a}else i.material=o(e.materials,this.material);if(this.children.length>0){i.children=[];for(let a=0;a<this.children.length;a++)i.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let a=0;a<this.animations.length;a++){const l=this.animations[a];i.animations.push(o(e.animations,l))}}if(t){const a=s(e.geometries),l=s(e.materials),u=s(e.textures),c=s(e.images),d=s(e.shapes),f=s(e.skeletons),m=s(e.animations);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),u.length>0&&(n.textures=u),c.length>0&&(n.images=c),d.length>0&&(n.shapes=d),f.length>0&&(n.skeletons=f),m.length>0&&(n.animations=m)}return n.object=i,n;function s(a){const l=[];for(const u in a){const c=a[u];delete c.metadata,l.push(c)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){const i=e.children[n];this.add(i.clone())}return this}}Xt.DefaultUp=new T(0,1,0),Xt.DefaultMatrixAutoUpdate=!0,Xt.prototype.isObject3D=!0;const yr=new T,to=new T,lh=new T,Br=new T,Gs=new T,Qo=new T,uh=new T,Yt=new T,Jc=new T,$c=new T;class Mn{constructor(e=new T,t=new T,n=new T){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),yr.subVectors(e,t),i.cross(yr);const o=i.lengthSq();return o>0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(e,t,n,i,o){yr.subVectors(i,t),to.subVectors(n,t),lh.subVectors(e,t);const s=yr.dot(yr),a=yr.dot(to),l=yr.dot(lh),u=to.dot(to),c=to.dot(lh),d=s*u-a*a;if(d===0)return o.set(-2,-1,-1);const f=1/d,m=(u*l-a*c)*f,g=(s*c-a*l)*f;return o.set(1-m-g,g,m)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,Br),Br.x>=0&&Br.y>=0&&Br.x+Br.y<=1}static getUV(e,t,n,i,o,s,a,l){return this.getBarycoord(e,t,n,i,Br),l.set(0,0),l.addScaledVector(o,Br.x),l.addScaledVector(s,Br.y),l.addScaledVector(a,Br.z),l}static isFrontFacing(e,t,n,i){return yr.subVectors(n,t),to.subVectors(e,t),yr.cross(to).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return yr.subVectors(this.c,this.b),to.subVectors(this.a,this.b),.5*yr.cross(to).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Mn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Mn.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,i,o){return Mn.getUV(e,this.a,this.b,this.c,t,n,i,o)}containsPoint(e){return Mn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Mn.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,i=this.b,o=this.c;let s,a;Gs.subVectors(i,n),Qo.subVectors(o,n),Yt.subVectors(e,n);const l=Gs.dot(Yt),u=Qo.dot(Yt);if(l<=0&&u<=0)return t.copy(n);Jc.subVectors(e,i);const c=Gs.dot(Jc),d=Qo.dot(Jc);if(c>=0&&d<=c)return t.copy(i);const f=l*d-c*u;if(f<=0&&l>=0&&c<=0)return s=l/(l-c),t.copy(n).addScaledVector(Gs,s);$c.subVectors(e,o);const m=Gs.dot($c),g=Qo.dot($c);if(g>=0&&m<=g)return t.copy(o);const _=m*u-l*g;if(_<=0&&u>=0&&g<=0)return a=u/(u-g),t.copy(n).addScaledVector(Qo,a);const y=c*g-m*d;if(y<=0&&d-c>=0&&m-g>=0)return uh.subVectors(o,i),a=(d-c)/(d-c+(m-g)),t.copy(i).addScaledVector(uh,a);const w=1/(y+_+f);return s=_*w,a=f*w,t.copy(n).addScaledVector(Gs,s).addScaledVector(Qo,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let ff=0;class _i extends _o{constructor(){super(),Object.defineProperty(this,"id",{value:ff++}),this.uuid=rr(),this.name="",this.type="Material",this.fog=!0,this.blending=ae,this.side=z,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=en,this.blendDst=Bt,this.blendEquation=Me,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Bi,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Tl,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=un,this.stencilZFail=un,this.stencilZPass=un,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}onBuild(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if(t==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===et;continue}const i=this[t];i!==void 0?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function i(o){const s=[];for(const a in o){const l=o[a];delete l.metadata,s.push(l)}return s}if(n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==ae&&(n.blending=this.blending),this.side!==z&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.morphTargets===!0&&(n.morphTargets=!0),this.morphNormals===!0&&(n.morphNormals=!0),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),t){const o=i(e.textures),s=i(e.images);o.length>0&&(n.textures=o),s.length>0&&(n.images=s)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const i=t.length;n=new Array(i);for(let o=0;o!==i;++o)n[o]=t[o].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}_i.prototype.isMaterial=!0;const mf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},jn={h:0,s:0,l:0},hh={h:0,s:0,l:0};function Pa(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+6*(e-r)*t:t<.5?e:t<2/3?r+6*(e-r)*(2/3-t):r}function Rl(r){return r<.04045?.0773993808*r:Math.pow(.9478672986*r+.0521327014,2.4)}function ch(r){return r<.0031308?12.92*r:1.055*Math.pow(r,.41666)-.055}class gt{constructor(e,t,n){return t===void 0&&n===void 0?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this}setRGB(e,t,n){return this.r=e,this.g=t,this.b=n,this}setHSL(e,t,n){if(e=th(e,1),t=Si(t,0,1),n=Si(n,0,1),t===0)this.r=this.g=this.b=n;else{const i=n<=.5?n*(1+t):n+t-n*t,o=2*n-i;this.r=Pa(o,i,e+1/3),this.g=Pa(o,i,e),this.b=Pa(o,i,e-1/3)}return this}setStyle(e){function t(i){i!==void 0&&parseFloat(i)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let i;const o=n[1],s=n[2];switch(o){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,t(i[4]),this;if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,t(i[4]),this;break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s)){const a=parseFloat(i[1])/360,l=parseInt(i[2],10)/100,u=parseInt(i[3],10)/100;return t(i[4]),this.setHSL(a,l,u)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const i=n[1],o=i.length;if(o===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(o===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){const t=mf[e.toLowerCase()];return t!==void 0?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copyGammaToLinear(e,t=2){return this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this}copyLinearToGamma(e,t=2){const n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this}convertGammaToLinear(e){return this.copyGammaToLinear(this,e),this}convertLinearToGamma(e){return this.copyLinearToGamma(this,e),this}copySRGBToLinear(e){return this.r=Rl(e.r),this.g=Rl(e.g),this.b=Rl(e.b),this}copyLinearToSRGB(e){return this.r=ch(e.r),this.g=ch(e.g),this.b=ch(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){const t=this.r,n=this.g,i=this.b,o=Math.max(t,n,i),s=Math.min(t,n,i);let a,l;const u=(s+o)/2;if(s===o)a=0,l=0;else{const c=o-s;switch(l=u<=.5?c/(o+s):c/(2-o-s),o){case t:a=(n-i)/c+(n<i?6:0);break;case n:a=(i-t)/c+2;break;case i:a=(t-n)/c+4}a/=6}return e.h=a,e.s=l,e.l=u,e}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(e,t,n){return this.getHSL(jn),jn.h+=e,jn.s+=t,jn.l+=n,this.setHSL(jn.h,jn.s,jn.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(jn),e.getHSL(hh);const n=Sl(jn.h,hh.h,t),i=Sl(jn.s,hh.s,t),o=Sl(jn.l,hh.l,t);return this.setHSL(n,i,o),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),e.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}gt.NAMES=mf,gt.prototype.isColor=!0,gt.prototype.r=1,gt.prototype.g=1,gt.prototype.b=1;class Qn extends _i{constructor(e){super(),this.type="MeshBasicMaterial",this.color=new gt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ul,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this}}Qn.prototype.isMeshBasicMaterial=!0;const an=new T,Ca=new Qe;class Zt{constructor(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n===!0,this.usage=Os,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,o=this.itemSize;i<o;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}copyColorsArray(e){const t=this.array;let n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];s===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",i),s=new gt),t[n++]=s.r,t[n++]=s.g,t[n++]=s.b}return this}copyVector2sArray(e){const t=this.array;let n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",i),s=new Qe),t[n++]=s.x,t[n++]=s.y}return this}copyVector3sArray(e){const t=this.array;let n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",i),s=new T),t[n++]=s.x,t[n++]=s.y,t[n++]=s.z}return this}copyVector4sArray(e){const t=this.array;let n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",i),s=new pn),t[n++]=s.x,t[n++]=s.y,t[n++]=s.z,t[n++]=s.w}return this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Ca.fromBufferAttribute(this,t),Ca.applyMatrix3(e),this.setXY(t,Ca.x,Ca.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)an.fromBufferAttribute(this,t),an.applyMatrix3(e),this.setXYZ(t,an.x,an.y,an.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)an.x=this.getX(t),an.y=this.getY(t),an.z=this.getZ(t),an.applyMatrix4(e),this.setXYZ(t,an.x,an.y,an.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)an.x=this.getX(t),an.y=this.getY(t),an.z=this.getZ(t),an.applyNormalMatrix(e),this.setXYZ(t,an.x,an.y,an.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)an.x=this.getX(t),an.y=this.getY(t),an.z=this.getZ(t),an.transformDirection(e),this.setXYZ(t,an.x,an.y,an.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){return this.array[e*this.itemSize]}setX(e,t){return this.array[e*this.itemSize]=t,this}getY(e){return this.array[e*this.itemSize+1]}setY(e,t){return this.array[e*this.itemSize+1]=t,this}getZ(e){return this.array[e*this.itemSize+2]}setZ(e,t){return this.array[e*this.itemSize+2]=t,this}getW(e){return this.array[e*this.itemSize+3]}setW(e,t){return this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,o){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Os&&(e.usage=this.usage),this.updateRange.offset===0&&this.updateRange.count===-1||(e.updateRange=this.updateRange),e}}Zt.prototype.isBufferAttribute=!0;class Il extends Zt{constructor(e,t,n){super(new Int8Array(e),t,n)}}class Kc extends Zt{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class dh extends Zt{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class Qc extends Zt{constructor(e,t,n){super(new Int16Array(e),t,n)}}class Ra extends Zt{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class ph extends Zt{constructor(e,t,n){super(new Int32Array(e),t,n)}}class Ur extends Zt{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class gf extends Zt{constructor(e,t,n){super(new Uint16Array(e),t,n)}}gf.prototype.isFloat16BufferAttribute=!0;class st extends Zt{constructor(e,t,n){super(new Float32Array(e),t,n)}}class ed extends Zt{constructor(e,t,n){super(new Float64Array(e),t,n)}}function td(r){if(r.length===0)return-1/0;let e=r[0];for(let t=1,n=r.length;t<n;++t)r[t]>e&&(e=r[t]);return e}const nd={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Hs(r,e){return new nd[r](e)}let vf=0;const sr=new pt,fh=new Xt,hi=new T,Wn=new In,es=new In,Fn=new T;class Mt extends _o{constructor(){super(),Object.defineProperty(this,"id",{value:vf++}),this.uuid=rr(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(td(e)>65535?Ur:Ra)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const o=new En().getNormalMatrix(e);n.applyNormalMatrix(o),n.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return sr.makeRotationFromQuaternion(e),this.applyMatrix4(sr),this}rotateX(e){return sr.makeRotationX(e),this.applyMatrix4(sr),this}rotateY(e){return sr.makeRotationY(e),this.applyMatrix4(sr),this}rotateZ(e){return sr.makeRotationZ(e),this.applyMatrix4(sr),this}translate(e,t,n){return sr.makeTranslation(e,t,n),this.applyMatrix4(sr),this}scale(e,t,n){return sr.makeScale(e,t,n),this.applyMatrix4(sr),this}lookAt(e){return fh.lookAt(e),fh.updateMatrix(),this.applyMatrix4(fh.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(hi).negate(),this.translate(hi.x,hi.y,hi.z),this}setFromPoints(e){const t=[];for(let n=0,i=e.length;n<i;n++){const o=e[n];t.push(o.x,o.y,o.z||0)}return this.setAttribute("position",new st(t,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new In);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new T(-1/0,-1/0,-1/0),new T(1/0,1/0,1/0));if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,i=t.length;n<i;n++){const o=t[n];Wn.setFromBufferAttribute(o),this.morphTargetsRelative?(Fn.addVectors(this.boundingBox.min,Wn.min),this.boundingBox.expandByPoint(Fn),Fn.addVectors(this.boundingBox.max,Wn.max),this.boundingBox.expandByPoint(Fn)):(this.boundingBox.expandByPoint(Wn.min),this.boundingBox.expandByPoint(Wn.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new ui);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new T,1/0);if(e){const n=this.boundingSphere.center;if(Wn.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){const a=t[o];es.setFromBufferAttribute(a),this.morphTargetsRelative?(Fn.addVectors(Wn.min,es.min),Wn.expandByPoint(Fn),Fn.addVectors(Wn.max,es.max),Wn.expandByPoint(Fn)):(Wn.expandByPoint(es.min),Wn.expandByPoint(es.max))}Wn.getCenter(n);let i=0;for(let o=0,s=e.count;o<s;o++)Fn.fromBufferAttribute(e,o),i=Math.max(i,n.distanceToSquared(Fn));if(t)for(let o=0,s=t.length;o<s;o++){const a=t[o],l=this.morphTargetsRelative;for(let u=0,c=a.count;u<c;u++)Fn.fromBufferAttribute(a,u),l&&(hi.fromBufferAttribute(e,u),Fn.add(hi)),i=Math.max(i,n.distanceToSquared(Fn))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeFaceNormals(){}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,i=t.position.array,o=t.normal.array,s=t.uv.array,a=i.length/3;t.tangent===void 0&&this.setAttribute("tangent",new Zt(new Float32Array(4*a),4));const l=t.tangent.array,u=[],c=[];for(let ne=0;ne<a;ne++)u[ne]=new T,c[ne]=new T;const d=new T,f=new T,m=new T,g=new Qe,_=new Qe,y=new Qe,w=new T,M=new T;function R(ne,Z,Q){d.fromArray(i,3*ne),f.fromArray(i,3*Z),m.fromArray(i,3*Q),g.fromArray(s,2*ne),_.fromArray(s,2*Z),y.fromArray(s,2*Q),f.sub(d),m.sub(d),_.sub(g),y.sub(g);const $=1/(_.x*y.y-y.x*_.y);isFinite($)&&(w.copy(f).multiplyScalar(y.y).addScaledVector(m,-_.y).multiplyScalar($),M.copy(m).multiplyScalar(_.x).addScaledVector(f,-y.x).multiplyScalar($),u[ne].add(w),u[Z].add(w),u[Q].add(w),c[ne].add(M),c[Z].add(M),c[Q].add(M))}let F=this.groups;F.length===0&&(F=[{start:0,count:n.length}]);for(let ne=0,Z=F.length;ne<Z;++ne){const Q=F[ne],$=Q.start;for(let se=$,me=$+Q.count;se<me;se+=3)R(n[se+0],n[se+1],n[se+2])}const C=new T,U=new T,N=new T,G=new T;function he(ne){N.fromArray(o,3*ne),G.copy(N);const Z=u[ne];C.copy(Z),C.sub(N.multiplyScalar(N.dot(Z))).normalize(),U.crossVectors(G,Z);const Q=U.dot(c[ne])<0?-1:1;l[4*ne]=C.x,l[4*ne+1]=C.y,l[4*ne+2]=C.z,l[4*ne+3]=Q}for(let ne=0,Z=F.length;ne<Z;++ne){const Q=F[ne],$=Q.start;for(let se=$,me=$+Q.count;se<me;se+=3)he(n[se+0]),he(n[se+1]),he(n[se+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Zt(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let f=0,m=n.count;f<m;f++)n.setXYZ(f,0,0,0);const i=new T,o=new T,s=new T,a=new T,l=new T,u=new T,c=new T,d=new T;if(e)for(let f=0,m=e.count;f<m;f+=3){const g=e.getX(f+0),_=e.getX(f+1),y=e.getX(f+2);i.fromBufferAttribute(t,g),o.fromBufferAttribute(t,_),s.fromBufferAttribute(t,y),c.subVectors(s,o),d.subVectors(i,o),c.cross(d),a.fromBufferAttribute(n,g),l.fromBufferAttribute(n,_),u.fromBufferAttribute(n,y),a.add(c),l.add(c),u.add(c),n.setXYZ(g,a.x,a.y,a.z),n.setXYZ(_,l.x,l.y,l.z),n.setXYZ(y,u.x,u.y,u.z)}else for(let f=0,m=t.count;f<m;f+=3)i.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),s.fromBufferAttribute(t,f+2),c.subVectors(s,o),d.subVectors(i,o),c.cross(d),n.setXYZ(f+0,c.x,c.y,c.z),n.setXYZ(f+1,c.x,c.y,c.z),n.setXYZ(f+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(e,t){if(!e||!e.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e);t===void 0&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const i in n){if(e.attributes[i]===void 0)continue;const o=n[i].array,s=e.attributes[i],a=s.array,l=s.itemSize*t,u=Math.min(a.length,o.length-l);for(let c=0,d=l;c<u;c++,d++)o[d]=a[c]}return this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Fn.fromBufferAttribute(e,t),Fn.normalize(),e.setXYZ(t,Fn.x,Fn.y,Fn.z)}toNonIndexed(){function e(a,l){const u=a.array,c=a.itemSize,d=a.normalized,f=new u.constructor(l.length*c);let m=0,g=0;for(let _=0,y=l.length;_<y;_++){m=a.isInterleavedBufferAttribute?l[_]*a.data.stride+a.offset:l[_]*c;for(let w=0;w<c;w++)f[g++]=u[m++]}return new Zt(f,c,d)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Mt,n=this.index.array,i=this.attributes;for(const a in i){const l=e(i[a],n);t.setAttribute(a,l)}const o=this.morphAttributes;for(const a in o){const l=[],u=o[a];for(let c=0,d=u.length;c<d;c++){const f=e(u[c],n);l.push(f)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;const s=this.groups;for(let a=0,l=s.length;a<l;a++){const u=s[a];t.addGroup(u.start,u.count,u.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const l in n){const u=n[l];e.data.attributes[l]=u.toJSON(e.data)}const i={};let o=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],c=[];for(let d=0,f=u.length;d<f;d++){const m=u[d];c.push(m.toJSON(e.data))}c.length>0&&(i[l]=c,o=!0)}o&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new Mt().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;n!==null&&this.setIndex(n.clone(t));const i=e.attributes;for(const u in i){const c=i[u];this.setAttribute(u,c.clone(t))}const o=e.morphAttributes;for(const u in o){const c=[],d=o[u];for(let f=0,m=d.length;f<m;f++)c.push(d[f].clone(t));this.morphAttributes[u]=c}this.morphTargetsRelative=e.morphTargetsRelative;const s=e.groups;for(let u=0,c=s.length;u<c;u++){const d=s[u];this.addGroup(d.start,d.count,d.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}Mt.prototype.isBufferGeometry=!0;const id=new pt,zs=new To,ts=new ui,xr=new T,So=new T,Eo=new T,Ia=new T,mh=new T,La=new T,Oa=new T,Vs=new T,Ll=new T,js=new Qe,Ol=new Qe,Da=new Qe,rd=new T,Dl=new T;class ln extends Xt{constructor(e=new Mt,t=new Qn){super(),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o<s;o++){const a=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}else{const t=e.morphTargets;t!==void 0&&t.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){const n=this.geometry,i=this.material,o=this.matrixWorld;if(i===void 0||(n.boundingSphere===null&&n.computeBoundingSphere(),ts.copy(n.boundingSphere),ts.applyMatrix4(o),e.ray.intersectsSphere(ts)===!1)||(id.copy(o).invert(),zs.copy(e.ray).applyMatrix4(id),n.boundingBox!==null&&zs.intersectsBox(n.boundingBox)===!1))return;let s;if(n.isBufferGeometry){const a=n.index,l=n.attributes.position,u=n.morphAttributes.position,c=n.morphTargetsRelative,d=n.attributes.uv,f=n.attributes.uv2,m=n.groups,g=n.drawRange;if(a!==null)if(Array.isArray(i))for(let _=0,y=m.length;_<y;_++){const w=m[_],M=i[w.materialIndex];for(let R=Math.max(w.start,g.start),F=Math.min(w.start+w.count,g.start+g.count);R<F;R+=3){const C=a.getX(R),U=a.getX(R+1),N=a.getX(R+2);s=Nl(this,M,e,zs,l,u,c,d,f,C,U,N),s&&(s.faceIndex=Math.floor(R/3),s.face.materialIndex=w.materialIndex,t.push(s))}}else for(let _=Math.max(0,g.start),y=Math.min(a.count,g.start+g.count);_<y;_+=3){const w=a.getX(_),M=a.getX(_+1),R=a.getX(_+2);s=Nl(this,i,e,zs,l,u,c,d,f,w,M,R),s&&(s.faceIndex=Math.floor(_/3),t.push(s))}else if(l!==void 0)if(Array.isArray(i))for(let _=0,y=m.length;_<y;_++){const w=m[_],M=i[w.materialIndex];for(let R=Math.max(w.start,g.start),F=Math.min(w.start+w.count,g.start+g.count);R<F;R+=3)s=Nl(this,M,e,zs,l,u,c,d,f,R,R+1,R+2),s&&(s.faceIndex=Math.floor(R/3),s.face.materialIndex=w.materialIndex,t.push(s))}else for(let _=Math.max(0,g.start),y=Math.min(l.count,g.start+g.count);_<y;_+=3)s=Nl(this,i,e,zs,l,u,c,d,f,_,_+1,_+2),s&&(s.faceIndex=Math.floor(_/3),t.push(s))}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function Nl(r,e,t,n,i,o,s,a,l,u,c,d){xr.fromBufferAttribute(i,u),So.fromBufferAttribute(i,c),Eo.fromBufferAttribute(i,d);const f=r.morphTargetInfluences;if(e.morphTargets&&o&&f){Oa.set(0,0,0),Vs.set(0,0,0),Ll.set(0,0,0);for(let g=0,_=o.length;g<_;g++){const y=f[g],w=o[g];y!==0&&(Ia.fromBufferAttribute(w,u),mh.fromBufferAttribute(w,c),La.fromBufferAttribute(w,d),s?(Oa.addScaledVector(Ia,y),Vs.addScaledVector(mh,y),Ll.addScaledVector(La,y)):(Oa.addScaledVector(Ia.sub(xr),y),Vs.addScaledVector(mh.sub(So),y),Ll.addScaledVector(La.sub(Eo),y)))}xr.add(Oa),So.add(Vs),Eo.add(Ll)}r.isSkinnedMesh&&(r.boneTransform(u,xr),r.boneTransform(c,So),r.boneTransform(d,Eo));const m=function(g,_,y,w,M,R,F,C){let U;if(U=_.side===W?w.intersectTriangle(F,R,M,!0,C):w.intersectTriangle(M,R,F,_.side!==ee,C),U===null)return null;Dl.copy(C),Dl.applyMatrix4(g.matrixWorld);const N=y.ray.origin.distanceTo(Dl);return N<y.near||N>y.far?null:{distance:N,point:Dl.clone(),object:g}}(r,e,t,n,xr,So,Eo,rd);if(m){a&&(js.fromBufferAttribute(a,u),Ol.fromBufferAttribute(a,c),Da.fromBufferAttribute(a,d),m.uv=Mn.getUV(rd,xr,So,Eo,js,Ol,Da,new Qe)),l&&(js.fromBufferAttribute(l,u),Ol.fromBufferAttribute(l,c),Da.fromBufferAttribute(l,d),m.uv2=Mn.getUV(rd,xr,So,Eo,js,Ol,Da,new Qe));const g={a:u,b:c,c:d,normal:new T,materialIndex:0};Mn.getNormal(xr,So,Eo,g.normal),m.face=g}return m}ln.prototype.isMesh=!0;class no extends Mt{constructor(e=1,t=1,n=1,i=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:o,depthSegments:s};const a=this;i=Math.floor(i),o=Math.floor(o),s=Math.floor(s);const l=[],u=[],c=[],d=[];let f=0,m=0;function g(_,y,w,M,R,F,C,U,N,G,he){const ne=F/N,Z=C/G,Q=F/2,$=C/2,se=U/2,me=N+1,ge=G+1;let de=0,fe=0;const Re=new T;for(let ke=0;ke<ge;ke++){const Be=ke*Z-$;for(let J=0;J<me;J++){const te=J*ne-Q;Re[_]=te*M,Re[y]=Be*R,Re[w]=se,u.push(Re.x,Re.y,Re.z),Re[_]=0,Re[y]=0,Re[w]=U>0?1:-1,c.push(Re.x,Re.y,Re.z),d.push(J/N),d.push(1-ke/G),de+=1}}for(let ke=0;ke<G;ke++)for(let Be=0;Be<N;Be++){const J=f+Be+me*ke,te=f+Be+me*(ke+1),Ae=f+(Be+1)+me*(ke+1),Ne=f+(Be+1)+me*ke;l.push(J,te,Ne),l.push(te,Ae,Ne),fe+=6}a.addGroup(m,fe,he),m+=fe,f+=de}g("z","y","x",-1,-1,n,t,e,s,o,0),g("z","y","x",1,-1,n,t,-e,s,o,1),g("x","z","y",1,1,e,n,t,i,s,2),g("x","z","y",1,-1,e,n,-t,i,s,3),g("x","y","z",1,-1,e,t,n,i,o,4),g("x","y","z",-1,-1,e,t,-n,i,o,5),this.setIndex(l),this.setAttribute("position",new st(u,3)),this.setAttribute("normal",new st(c,3)),this.setAttribute("uv",new st(d,2))}static fromJSON(e){return new no(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Na(r){const e={};for(const t in r){e[t]={};for(const n in r[t]){const i=r[t][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?e[t][n]=i.clone():Array.isArray(i)?e[t][n]=i.slice():e[t][n]=i}}return e}function Ei(r){const e={};for(let t=0;t<r.length;t++){const n=Na(r[t]);for(const i in n)e[i]=n[i]}return e}const io={clone:Na,merge:Ei};class Gi extends _i{constructor(e){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=`void main() {
85
+ */const X="130",K={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},le={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Ee=0,Xe=1,Fe=2,S=3,A=0,O=1,V=2,D=3,z=0,W=1,ee=2,et=1,ft=2,$e=0,ae=1,Ce=2,Ie=3,H=4,be=5,Me=100,Oe=101,Se=102,Ue=103,qe=104,at=200,rt=201,Qt=202,lt=203,en=204,Bt=205,Vt=206,bt=207,Dn=208,wn=209,gn=210,Zn=0,yn=1,li=2,Bi=3,Ci=4,ji=5,Lr=6,Dp=7,ul=0,Np=1,Fp=2,co=0,Bp=1,Up=2,kp=3,Gp=4,Hp=5,Iu=300,zo=301,hl=302,cl=303,dl=304,va=306,_a=307,Vo=1e3,gi=1001,pl=1002,Jn=1003,fl=1004,bc=1004,ml=1005,wc=1005,$n=1006,jo=1007,zp=1007,Ms=1008,Vp=1008,Wo=1009,jp=1010,Wp=1011,gl=1012,Xp=1013,As=1014,po=1015,Ps=1016,Yp=1017,qp=1018,Zp=1019,dn=1020,_n=1021,fo=1022,tr=1023,Jp=1024,Tc=1025,$p=tr,Nn=1026,Cs=1027,ya=1028,Sc=1029,Lu=1030,nr=1031,Ec=1032,Mc=1033,Ou=33776,Du=33777,Nu=33778,Fu=33779,Ui=35840,Ac=35841,Wi=35842,Pc=35843,Cc=36196,qr=37492,xa=37496,Bu=37808,Tn=37809,mo=37810,Uu=37811,Kp=37812,ku=37813,Qp=37814,Rc=37815,vl=37816,Rs=37817,ef=37818,Ic=37819,Lc=37820,Gu=37821,Hu=36492,Oc=37840,zu=37841,Vu=37842,Dc=37843,Xi=37844,ju=37845,ba=37846,Nc=37847,Fc=37848,tf=37849,nf=37850,rf=37851,of=37852,Is=37853,Wu=2200,Bc=2201,go=2202,Xo=2300,_l=2301,vo=2302,wi=2400,Yo=2401,yl=2402,Ls=2500,we=2501,je=0,Ze=1,ct=2,wt=3e3,$t=3001,Vn=3007,ir=3002,xn=3003,xl=3004,Uc=3005,Yi=3006,bl=3200,kc=3201,mr=0,wl=1,Xu=0,un=7680,Dg=7681,sf=7682,Yu=7683,Ng=34055,Fg=34056,Bg=5386,qu=512,qo=513,Zu=514,af=515,Ju=516,lf=517,uf=518,Tl=519,Os=35044,Zr=35048,Ds=35040,$u=35045,Ug=35049,kg=35041,Gg=35046,Ku=35050,Qu=35042,Gc="100",Hc="300 es";class _o{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const n=this._listeners[e];if(n!==void 0){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const t=this._listeners[e.type];if(t!==void 0){e.target=this;const n=t.slice(0);for(let i=0,o=n.length;i<o;i++)n[i].call(this,e);e.target=null}}}const Ti=[];for(let r=0;r<256;r++)Ti[r]=(r<16?"0":"")+r.toString(16);let eh=1234567;const Sn=Math.PI/180,ii=180/Math.PI;function rr(){const r=4294967295*Math.random()|0,e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0;return(Ti[255&r]+Ti[r>>8&255]+Ti[r>>16&255]+Ti[r>>24&255]+"-"+Ti[255&e]+Ti[e>>8&255]+"-"+Ti[e>>16&15|64]+Ti[e>>24&255]+"-"+Ti[63&t|128]+Ti[t>>8&255]+"-"+Ti[t>>16&255]+Ti[t>>24&255]+Ti[255&n]+Ti[n>>8&255]+Ti[n>>16&255]+Ti[n>>24&255]).toUpperCase()}function Si(r,e,t){return Math.max(e,Math.min(t,r))}function th(r,e){return(r%e+e)%e}function Sl(r,e,t){return(1-t)*r+t*e}function El(r){return(r&r-1)==0&&r!==0}function wa(r){return Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function nh(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}var Ns=Object.freeze({__proto__:null,DEG2RAD:Sn,RAD2DEG:ii,generateUUID:rr,clamp:Si,euclideanModulo:th,mapLinear:function(r,e,t,n,i){return n+(r-e)*(i-n)/(t-e)},inverseLerp:function(r,e,t){return r!==e?(t-r)/(e-r):0},lerp:Sl,damp:function(r,e,t,n){return Sl(r,e,1-Math.exp(-t*n))},pingpong:function(r,e=1){return e-Math.abs(th(r,2*e)-e)},smoothstep:function(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e))*r*(3-2*r)},smootherstep:function(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e))*r*r*(r*(6*r-15)+10)},randInt:function(r,e){return r+Math.floor(Math.random()*(e-r+1))},randFloat:function(r,e){return r+Math.random()*(e-r)},randFloatSpread:function(r){return r*(.5-Math.random())},seededRandom:function(r){return r!==void 0&&(eh=r%2147483647),eh=16807*eh%2147483647,(eh-1)/2147483646},degToRad:function(r){return r*Sn},radToDeg:function(r){return r*ii},isPowerOfTwo:El,ceilPowerOfTwo:wa,floorPowerOfTwo:nh,setQuaternionFromProperEuler:function(r,e,t,n,i){const o=Math.cos,s=Math.sin,a=o(t/2),l=s(t/2),u=o((e+n)/2),c=s((e+n)/2),d=o((e-n)/2),f=s((e-n)/2),m=o((n-e)/2),g=s((n-e)/2);switch(i){case"XYX":r.set(a*c,l*d,l*f,a*u);break;case"YZY":r.set(l*f,a*c,l*d,a*u);break;case"ZXZ":r.set(l*d,l*f,a*c,a*u);break;case"XZX":r.set(a*c,l*g,l*m,a*u);break;case"YXY":r.set(l*m,a*c,l*g,a*u);break;case"ZYZ":r.set(l*g,l*m,a*c,a*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}});class Qe{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),i=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*n-s*i+e.x,this.y=o*i+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}}Qe.prototype.isVector2=!0;class En{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,i,o,s,a,l,u){const c=this.elements;return c[0]=e,c[1]=i,c[2]=a,c[3]=t,c[4]=o,c[5]=l,c[6]=n,c[7]=s,c[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,o=this.elements,s=n[0],a=n[3],l=n[6],u=n[1],c=n[4],d=n[7],f=n[2],m=n[5],g=n[8],_=i[0],y=i[3],w=i[6],M=i[1],R=i[4],F=i[7],C=i[2],U=i[5],N=i[8];return o[0]=s*_+a*M+l*C,o[3]=s*y+a*R+l*U,o[6]=s*w+a*F+l*N,o[1]=u*_+c*M+d*C,o[4]=u*y+c*R+d*U,o[7]=u*w+c*F+d*N,o[2]=f*_+m*M+g*C,o[5]=f*y+m*R+g*U,o[8]=f*w+m*F+g*N,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],u=e[7],c=e[8];return t*s*c-t*a*u-n*o*c+n*a*l+i*o*u-i*s*l}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],u=e[7],c=e[8],d=c*s-a*u,f=a*l-c*o,m=u*o-s*l,g=t*d+n*f+i*m;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/g;return e[0]=d*_,e[1]=(i*u-c*n)*_,e[2]=(a*n-i*s)*_,e[3]=f*_,e[4]=(c*t-i*l)*_,e[5]=(i*o-a*t)*_,e[6]=m*_,e[7]=(n*l-u*t)*_,e[8]=(s*t-n*o)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,o,s,a){const l=Math.cos(o),u=Math.sin(o);return this.set(n*l,n*u,-n*(l*s+u*a)+s+e,-i*u,i*l,-i*(-u*s+l*a)+a+t,0,0,1),this}scale(e,t){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),i=this.elements,o=i[0],s=i[3],a=i[6],l=i[1],u=i[4],c=i[7];return i[0]=t*o+n*l,i[3]=t*s+n*u,i[6]=t*a+n*c,i[1]=-n*o+t*l,i[4]=-n*s+t*u,i[7]=-n*a+t*c,this}translate(e,t){const n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}let yo;En.prototype.isMatrix3=!0;class gr{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement=="undefined")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{yo===void 0&&(yo=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),yo.width=e.width,yo.height=e.height;const n=yo.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=yo}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}}let Hg=0;class Kn extends _o{constructor(e=Kn.DEFAULT_IMAGE,t=Kn.DEFAULT_MAPPING,n=gi,i=gi,o=$n,s=Ms,a=tr,l=Wo,u=1,c=wt){super(),Object.defineProperty(this,"id",{value:Hg++}),this.uuid=rr(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=i,this.magFilter=o,this.minFilter=s,this.anisotropy=u,this.format=a,this.internalFormat=null,this.type=l,this.offset=new Qe(0,0),this.repeat=new Qe(1,1),this.center=new Qe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new En,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.version=0,this.onUpdate=null}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(this.image!==void 0){const i=this.image;if(i.uuid===void 0&&(i.uuid=rr()),!t&&e.images[i.uuid]===void 0){let o;if(Array.isArray(i)){o=[];for(let s=0,a=i.length;s<a;s++)i[s].isDataTexture?o.push(zc(i[s].image)):o.push(zc(i[s]))}else o=zc(i);e.images[i.uuid]={uuid:i.uuid,url:o}}n.image=i.uuid}return t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Iu)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Vo:e.x=e.x-Math.floor(e.x);break;case gi:e.x=e.x<0?0:1;break;case pl:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case Vo:e.y=e.y-Math.floor(e.y);break;case gi:e.y=e.y<0?0:1;break;case pl:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&this.version++}}function zc(r){return typeof HTMLImageElement!="undefined"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&r instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&r instanceof ImageBitmap?gr.getDataURL(r):r.data?{data:Array.prototype.slice.call(r.data),width:r.width,height:r.height,type:r.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}Kn.DEFAULT_IMAGE=void 0,Kn.DEFAULT_MAPPING=Iu,Kn.prototype.isTexture=!0;class pn{constructor(e=0,t=0,n=0,i=1){this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*i+s[12]*o,this.y=s[1]*t+s[5]*n+s[9]*i+s[13]*o,this.z=s[2]*t+s[6]*n+s[10]*i+s[14]*o,this.w=s[3]*t+s[7]*n+s[11]*i+s[15]*o,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,o;const s=e.elements,a=s[0],l=s[4],u=s[8],c=s[1],d=s[5],f=s[9],m=s[2],g=s[6],_=s[10];if(Math.abs(l-c)<.01&&Math.abs(u-m)<.01&&Math.abs(f-g)<.01){if(Math.abs(l+c)<.1&&Math.abs(u+m)<.1&&Math.abs(f+g)<.1&&Math.abs(a+d+_-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const w=(a+1)/2,M=(d+1)/2,R=(_+1)/2,F=(l+c)/4,C=(u+m)/4,U=(f+g)/4;return w>M&&w>R?w<.01?(n=0,i=.707106781,o=.707106781):(n=Math.sqrt(w),i=F/n,o=C/n):M>R?M<.01?(n=.707106781,i=0,o=.707106781):(i=Math.sqrt(M),n=F/i,o=U/i):R<.01?(n=.707106781,i=.707106781,o=0):(o=Math.sqrt(R),n=C/o,i=U/o),this.set(n,i,o,t),this}let y=Math.sqrt((g-f)*(g-f)+(u-m)*(u-m)+(c-l)*(c-l));return Math.abs(y)<.001&&(y=1),this.x=(g-f)/y,this.y=(u-m)/y,this.z=(c-l)/y,this.w=Math.acos((a+d+_-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}}pn.prototype.isVector4=!0;class Or extends _o{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new pn(0,0,e,t),this.scissorTest=!1,this.viewport=new pn(0,0,e,t),this.texture=new Kn(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={width:e,height:t,depth:1},this.texture.generateMipmaps=n.generateMipmaps!==void 0&&n.generateMipmaps,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:$n,this.depthBuffer=n.depthBuffer===void 0||n.depthBuffer,this.stencilBuffer=n.stencilBuffer!==void 0&&n.stencilBuffer,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null}setTexture(e){e.image={width:this.width,height:this.height,depth:this.depth},this.texture=e}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.image=aS({},this.texture.image),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}Or.prototype.isWebGLRenderTarget=!0;class Ml extends Or{constructor(e,t,n){super(e,t);const i=this.texture;this.texture=[];for(let o=0;o<n;o++)this.texture[o]=i.clone()}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let i=0,o=this.texture.length;i<o;i++)this.texture[i].image.width=e,this.texture[i].image.height=t,this.texture[i].image.depth=n;this.dispose()}return this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t),this}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone();return this}}Ml.prototype.isWebGLMultipleRenderTargets=!0;class Fs extends Or{constructor(e,t,n){super(e,t,n),this.samples=4}copy(e){return super.copy.call(this,e),this.samples=e.samples,this}}Fs.prototype.isWebGLMultisampleRenderTarget=!0;class vi{constructor(e=0,t=0,n=0,i=1){this._x=e,this._y=t,this._z=n,this._w=i}static slerp(e,t,n,i){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(e,t,i)}static slerpFlat(e,t,n,i,o,s,a){let l=n[i+0],u=n[i+1],c=n[i+2],d=n[i+3];const f=o[s+0],m=o[s+1],g=o[s+2],_=o[s+3];if(a===0)return e[t+0]=l,e[t+1]=u,e[t+2]=c,void(e[t+3]=d);if(a===1)return e[t+0]=f,e[t+1]=m,e[t+2]=g,void(e[t+3]=_);if(d!==_||l!==f||u!==m||c!==g){let y=1-a;const w=l*f+u*m+c*g+d*_,M=w>=0?1:-1,R=1-w*w;if(R>Number.EPSILON){const C=Math.sqrt(R),U=Math.atan2(C,w*M);y=Math.sin(y*U)/C,a=Math.sin(a*U)/C}const F=a*M;if(l=l*y+f*F,u=u*y+m*F,c=c*y+g*F,d=d*y+_*F,y===1-a){const C=1/Math.sqrt(l*l+u*u+c*c+d*d);l*=C,u*=C,c*=C,d*=C}}e[t]=l,e[t+1]=u,e[t+2]=c,e[t+3]=d}static multiplyQuaternionsFlat(e,t,n,i,o,s){const a=n[i],l=n[i+1],u=n[i+2],c=n[i+3],d=o[s],f=o[s+1],m=o[s+2],g=o[s+3];return e[t]=a*g+c*d+l*m-u*f,e[t+1]=l*g+c*f+u*d-a*m,e[t+2]=u*g+c*m+a*f-l*d,e[t+3]=c*g-a*d-l*f-u*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=e._x,i=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,u=a(n/2),c=a(i/2),d=a(o/2),f=l(n/2),m=l(i/2),g=l(o/2);switch(s){case"XYZ":this._x=f*c*d+u*m*g,this._y=u*m*d-f*c*g,this._z=u*c*g+f*m*d,this._w=u*c*d-f*m*g;break;case"YXZ":this._x=f*c*d+u*m*g,this._y=u*m*d-f*c*g,this._z=u*c*g-f*m*d,this._w=u*c*d+f*m*g;break;case"ZXY":this._x=f*c*d-u*m*g,this._y=u*m*d+f*c*g,this._z=u*c*g+f*m*d,this._w=u*c*d-f*m*g;break;case"ZYX":this._x=f*c*d-u*m*g,this._y=u*m*d+f*c*g,this._z=u*c*g-f*m*d,this._w=u*c*d+f*m*g;break;case"YZX":this._x=f*c*d+u*m*g,this._y=u*m*d+f*c*g,this._z=u*c*g-f*m*d,this._w=u*c*d-f*m*g;break;case"XZY":this._x=f*c*d-u*m*g,this._y=u*m*d-f*c*g,this._z=u*c*g+f*m*d,this._w=u*c*d+f*m*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],o=t[8],s=t[1],a=t[5],l=t[9],u=t[2],c=t[6],d=t[10],f=n+a+d;if(f>0){const m=.5/Math.sqrt(f+1);this._w=.25/m,this._x=(c-l)*m,this._y=(o-u)*m,this._z=(s-i)*m}else if(n>a&&n>d){const m=2*Math.sqrt(1+n-a-d);this._w=(c-l)/m,this._x=.25*m,this._y=(i+s)/m,this._z=(o+u)/m}else if(a>d){const m=2*Math.sqrt(1+a-n-d);this._w=(o-u)/m,this._x=(i+s)/m,this._y=.25*m,this._z=(l+c)/m}else{const m=2*Math.sqrt(1+d-n-a);this._w=(s-i)/m,this._x=(o+u)/m,this._y=(l+c)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Si(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return t!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,i=e._y,o=e._z,s=e._w,a=t._x,l=t._y,u=t._z,c=t._w;return this._x=n*c+s*a+i*u-o*l,this._y=i*c+s*l+o*a-n*u,this._z=o*c+s*u+n*l-i*a,this._w=s*c-n*a-i*l-o*u,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const n=this._x,i=this._y,o=this._z,s=this._w;let a=s*e._w+n*e._x+i*e._y+o*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=n,this._y=i,this._z=o,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-t;return this._w=m*s+t*this._w,this._x=m*n+t*this._x,this._y=m*i+t*this._y,this._z=m*o+t*this._z,this.normalize(),this._onChangeCallback(),this}const u=Math.sqrt(l),c=Math.atan2(u,a),d=Math.sin((1-t)*c)/u,f=Math.sin(t*c)/u;return this._w=s*d+this._w*f,this._x=n*d+this._x*f,this._y=i*d+this._y*f,this._z=o*d+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,t,n){this.copy(e).slerp(t,n)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}vi.prototype.isQuaternion=!0;class T{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Al.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Al.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,i=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*i,this.y=o[1]*t+o[4]*n+o[7]*i,this.z=o[2]*t+o[5]*n+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,o=e.elements,s=1/(o[3]*t+o[7]*n+o[11]*i+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*i+o[12])*s,this.y=(o[1]*t+o[5]*n+o[9]*i+o[13])*s,this.z=(o[2]*t+o[6]*n+o[10]*i+o[14])*s,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,o=e.x,s=e.y,a=e.z,l=e.w,u=l*t+s*i-a*n,c=l*n+a*t-o*i,d=l*i+o*n-s*t,f=-o*t-s*n-a*i;return this.x=u*l+f*-o+c*-a-d*-s,this.y=c*l+f*-s+d*-o-u*-a,this.z=d*l+f*-a+u*-s-c*-o,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,i=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*i,this.y=o[1]*t+o[5]*n+o[9]*i,this.z=o[2]*t+o[6]*n+o[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return t!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,i=e.y,o=e.z,s=t.x,a=t.y,l=t.z;return this.x=i*l-o*a,this.y=o*s-n*l,this.z=n*a-i*s,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return Zo.copy(this).projectOnVector(e),this.sub(Zo)}reflect(e){return this.sub(Zo.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Si(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}}T.prototype.isVector3=!0;const Zo=new T,Al=new vi;class In{constructor(e=new T(1/0,1/0,1/0),t=new T(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,i=1/0,o=-1/0,s=-1/0,a=-1/0;for(let l=0,u=e.length;l<u;l+=3){const c=e[l],d=e[l+1],f=e[l+2];c<t&&(t=c),d<n&&(n=d),f<i&&(i=f),c>o&&(o=c),d>s&&(s=d),f>a&&(a=f)}return this.min.set(t,n,i),this.max.set(o,s,a),this}setFromBufferAttribute(e){let t=1/0,n=1/0,i=1/0,o=-1/0,s=-1/0,a=-1/0;for(let l=0,u=e.count;l<u;l++){const c=e.getX(l),d=e.getY(l),f=e.getZ(l);c<t&&(t=c),d<n&&(n=d),f<i&&(i=f),c>o&&(o=c),d>s&&(s=d),f>a&&(a=f)}return this.min.set(t,n,i),this.max.set(o,s,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Dr.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e){return this.makeEmpty(),this.expandByObject(e)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e){e.updateWorldMatrix(!1,!1);const t=e.geometry;t!==void 0&&(t.boundingBox===null&&t.computeBoundingBox(),Nr.copy(t.boundingBox),Nr.applyMatrix4(e.matrixWorld),this.union(Nr));const n=e.children;for(let i=0,o=n.length;i<o;i++)this.expandByObject(n[i]);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Dr),Dr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Pl),Ta.subVectors(this.max,Pl),qi.subVectors(e.a,Pl),vr.subVectors(e.b,Pl),Ri.subVectors(e.c,Pl),xo.subVectors(vr,qi),bo.subVectors(Ri,vr),Bs.subVectors(qi,Ri);let t=[0,-xo.z,xo.y,0,-bo.z,bo.y,0,-Bs.z,Bs.y,xo.z,0,-xo.x,bo.z,0,-bo.x,Bs.z,0,-Bs.x,-xo.y,xo.x,0,-bo.y,bo.x,0,-Bs.y,Bs.x,0];return!!Vc(t,qi,vr,Ri,Ta)&&(t=[1,0,0,0,1,0,0,0,1],!!Vc(t,qi,vr,Ri,Ta)&&(Jo.crossVectors(xo,bo),t=[Jo.x,Jo.y,Jo.z],Vc(t,qi,vr,Ri,Ta)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Dr.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(Dr).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(Ht[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ht[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ht[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ht[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ht[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ht[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ht[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ht[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ht)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}In.prototype.isBox3=!0;const Ht=[new T,new T,new T,new T,new T,new T,new T,new T],Dr=new T,Nr=new In,qi=new T,vr=new T,Ri=new T,xo=new T,bo=new T,Bs=new T,Pl=new T,Ta=new T,Jo=new T,Jr=new T;function Vc(r,e,t,n,i){for(let o=0,s=r.length-3;o<=s;o+=3){Jr.fromArray(r,o);const a=i.x*Math.abs(Jr.x)+i.y*Math.abs(Jr.y)+i.z*Math.abs(Jr.z),l=e.dot(Jr),u=t.dot(Jr),c=n.dot(Jr);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>a)return!1}return!0}const hf=new In,$r=new T,Cl=new T,wo=new T;class ui{constructor(e=new T,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):hf.setFromPoints(e).getCenter(n);let i=0;for(let o=0,s=e.length;o<s;o++)i=Math.max(i,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){wo.subVectors(e,this.center);const t=wo.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),i=.5*(n-this.radius);this.center.add(wo.multiplyScalar(i/n)),this.radius+=i}return this}union(e){return Cl.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint($r.copy(e.center).add(Cl)),this.expandByPoint($r.copy(e.center).sub(Cl)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Kr=new T,ih=new T,$o=new T,ki=new T,rh=new T,oh=new T,Sa=new T;class To{constructor(e=new T,t=new T(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Kr)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Kr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Kr.copy(this.direction).multiplyScalar(t).add(this.origin),Kr.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){ih.copy(e).add(t).multiplyScalar(.5),$o.copy(t).sub(e).normalize(),ki.copy(this.origin).sub(ih);const o=.5*e.distanceTo(t),s=-this.direction.dot($o),a=ki.dot(this.direction),l=-ki.dot($o),u=ki.lengthSq(),c=Math.abs(1-s*s);let d,f,m,g;if(c>0)if(d=s*l-a,f=s*a-l,g=o*c,d>=0)if(f>=-g)if(f<=g){const _=1/c;d*=_,f*=_,m=d*(d+s*f+2*a)+f*(s*d+f+2*l)+u}else f=o,d=Math.max(0,-(s*f+a)),m=-d*d+f*(f+2*l)+u;else f=-o,d=Math.max(0,-(s*f+a)),m=-d*d+f*(f+2*l)+u;else f<=-g?(d=Math.max(0,-(-s*o+a)),f=d>0?-o:Math.min(Math.max(-o,-l),o),m=-d*d+f*(f+2*l)+u):f<=g?(d=0,f=Math.min(Math.max(-o,-l),o),m=f*(f+2*l)+u):(d=Math.max(0,-(s*o+a)),f=d>0?o:Math.min(Math.max(-o,-l),o),m=-d*d+f*(f+2*l)+u);else f=s>0?-o:o,d=Math.max(0,-(s*f+a)),m=-d*d+f*(f+2*l)+u;return n&&n.copy(this.direction).multiplyScalar(d).add(this.origin),i&&i.copy($o).multiplyScalar(f).add(ih),m}intersectSphere(e,t){Kr.subVectors(e.center,this.origin);const n=Kr.dot(this.direction),i=Kr.dot(Kr)-n*n,o=e.radius*e.radius;if(i>o)return null;const s=Math.sqrt(o-i),a=n-s,l=n+s;return a<0&&l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0?!0:e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,o,s,a,l;const u=1/this.direction.x,c=1/this.direction.y,d=1/this.direction.z,f=this.origin;return u>=0?(n=(e.min.x-f.x)*u,i=(e.max.x-f.x)*u):(n=(e.max.x-f.x)*u,i=(e.min.x-f.x)*u),c>=0?(o=(e.min.y-f.y)*c,s=(e.max.y-f.y)*c):(o=(e.max.y-f.y)*c,s=(e.min.y-f.y)*c),n>s||o>i?null:((o>n||n!=n)&&(n=o),(s<i||i!=i)&&(i=s),d>=0?(a=(e.min.z-f.z)*d,l=(e.max.z-f.z)*d):(a=(e.max.z-f.z)*d,l=(e.min.z-f.z)*d),n>l||a>i?null:((a>n||n!=n)&&(n=a),(l<i||i!=i)&&(i=l),i<0?null:this.at(n>=0?n:i,t)))}intersectsBox(e){return this.intersectBox(e,Kr)!==null}intersectTriangle(e,t,n,i,o){rh.subVectors(t,e),oh.subVectors(n,e),Sa.crossVectors(rh,oh);let s,a=this.direction.dot(Sa);if(a>0){if(i)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}ki.subVectors(this.origin,e);const l=s*this.direction.dot(oh.crossVectors(ki,oh));if(l<0)return null;const u=s*this.direction.dot(rh.cross(ki));if(u<0||l+u>a)return null;const c=-s*ki.dot(Sa);return c<0?null:this.at(c/a,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class pt{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,i,o,s,a,l,u,c,d,f,m,g,_,y){const w=this.elements;return w[0]=e,w[4]=t,w[8]=n,w[12]=i,w[1]=o,w[5]=s,w[9]=a,w[13]=l,w[2]=u,w[6]=c,w[10]=d,w[14]=f,w[3]=m,w[7]=g,w[11]=_,w[15]=y,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new pt().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,i=1/Ko.setFromMatrixColumn(e,0).length(),o=1/Ko.setFromMatrixColumn(e,1).length(),s=1/Ko.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const t=this.elements,n=e.x,i=e.y,o=e.z,s=Math.cos(n),a=Math.sin(n),l=Math.cos(i),u=Math.sin(i),c=Math.cos(o),d=Math.sin(o);if(e.order==="XYZ"){const f=s*c,m=s*d,g=a*c,_=a*d;t[0]=l*c,t[4]=-l*d,t[8]=u,t[1]=m+g*u,t[5]=f-_*u,t[9]=-a*l,t[2]=_-f*u,t[6]=g+m*u,t[10]=s*l}else if(e.order==="YXZ"){const f=l*c,m=l*d,g=u*c,_=u*d;t[0]=f+_*a,t[4]=g*a-m,t[8]=s*u,t[1]=s*d,t[5]=s*c,t[9]=-a,t[2]=m*a-g,t[6]=_+f*a,t[10]=s*l}else if(e.order==="ZXY"){const f=l*c,m=l*d,g=u*c,_=u*d;t[0]=f-_*a,t[4]=-s*d,t[8]=g+m*a,t[1]=m+g*a,t[5]=s*c,t[9]=_-f*a,t[2]=-s*u,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){const f=s*c,m=s*d,g=a*c,_=a*d;t[0]=l*c,t[4]=g*u-m,t[8]=f*u+_,t[1]=l*d,t[5]=_*u+f,t[9]=m*u-g,t[2]=-u,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){const f=s*l,m=s*u,g=a*l,_=a*u;t[0]=l*c,t[4]=_-f*d,t[8]=g*d+m,t[1]=d,t[5]=s*c,t[9]=-a*c,t[2]=-u*c,t[6]=m*d+g,t[10]=f-_*d}else if(e.order==="XZY"){const f=s*l,m=s*u,g=a*l,_=a*u;t[0]=l*c,t[4]=-d,t[8]=u*c,t[1]=f*d+_,t[5]=s*c,t[9]=m*d-g,t[2]=g*d-m,t[6]=a*c,t[10]=_*d+f}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Qr,e,jc)}lookAt(e,t,n){const i=this.elements;return Zi.subVectors(e,t),Zi.lengthSq()===0&&(Zi.z=1),Zi.normalize(),Fr.crossVectors(n,Zi),Fr.lengthSq()===0&&(Math.abs(n.z)===1?Zi.x+=1e-4:Zi.z+=1e-4,Zi.normalize(),Fr.crossVectors(n,Zi)),Fr.normalize(),eo.crossVectors(Zi,Fr),i[0]=Fr.x,i[4]=eo.x,i[8]=Zi.x,i[1]=Fr.y,i[5]=eo.y,i[9]=Zi.y,i[2]=Fr.z,i[6]=eo.z,i[10]=Zi.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,o=this.elements,s=n[0],a=n[4],l=n[8],u=n[12],c=n[1],d=n[5],f=n[9],m=n[13],g=n[2],_=n[6],y=n[10],w=n[14],M=n[3],R=n[7],F=n[11],C=n[15],U=i[0],N=i[4],G=i[8],he=i[12],ne=i[1],Z=i[5],Q=i[9],$=i[13],se=i[2],me=i[6],ge=i[10],de=i[14],fe=i[3],Re=i[7],ke=i[11],Be=i[15];return o[0]=s*U+a*ne+l*se+u*fe,o[4]=s*N+a*Z+l*me+u*Re,o[8]=s*G+a*Q+l*ge+u*ke,o[12]=s*he+a*$+l*de+u*Be,o[1]=c*U+d*ne+f*se+m*fe,o[5]=c*N+d*Z+f*me+m*Re,o[9]=c*G+d*Q+f*ge+m*ke,o[13]=c*he+d*$+f*de+m*Be,o[2]=g*U+_*ne+y*se+w*fe,o[6]=g*N+_*Z+y*me+w*Re,o[10]=g*G+_*Q+y*ge+w*ke,o[14]=g*he+_*$+y*de+w*Be,o[3]=M*U+R*ne+F*se+C*fe,o[7]=M*N+R*Z+F*me+C*Re,o[11]=M*G+R*Q+F*ge+C*ke,o[15]=M*he+R*$+F*de+C*Be,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],i=e[8],o=e[12],s=e[1],a=e[5],l=e[9],u=e[13],c=e[2],d=e[6],f=e[10],m=e[14];return e[3]*(+o*l*d-i*u*d-o*a*f+n*u*f+i*a*m-n*l*m)+e[7]*(+t*l*m-t*u*f+o*s*f-i*s*m+i*u*c-o*l*c)+e[11]*(+t*u*d-t*a*m-o*s*d+n*s*m+o*a*c-n*u*c)+e[15]*(-i*a*c-t*l*d+t*a*f+i*s*d-n*s*f+n*l*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],m=e[11],g=e[12],_=e[13],y=e[14],w=e[15],M=d*y*u-_*f*u+_*l*m-a*y*m-d*l*w+a*f*w,R=g*f*u-c*y*u-g*l*m+s*y*m+c*l*w-s*f*w,F=c*_*u-g*d*u+g*a*m-s*_*m-c*a*w+s*d*w,C=g*d*l-c*_*l-g*a*f+s*_*f+c*a*y-s*d*y,U=t*M+n*R+i*F+o*C;if(U===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const N=1/U;return e[0]=M*N,e[1]=(_*f*o-d*y*o-_*i*m+n*y*m+d*i*w-n*f*w)*N,e[2]=(a*y*o-_*l*o+_*i*u-n*y*u-a*i*w+n*l*w)*N,e[3]=(d*l*o-a*f*o-d*i*u+n*f*u+a*i*m-n*l*m)*N,e[4]=R*N,e[5]=(c*y*o-g*f*o+g*i*m-t*y*m-c*i*w+t*f*w)*N,e[6]=(g*l*o-s*y*o-g*i*u+t*y*u+s*i*w-t*l*w)*N,e[7]=(s*f*o-c*l*o+c*i*u-t*f*u-s*i*m+t*l*m)*N,e[8]=F*N,e[9]=(g*d*o-c*_*o-g*n*m+t*_*m+c*n*w-t*d*w)*N,e[10]=(s*_*o-g*a*o+g*n*u-t*_*u-s*n*w+t*a*w)*N,e[11]=(c*a*o-s*d*o-c*n*u+t*d*u+s*n*m-t*a*m)*N,e[12]=C*N,e[13]=(c*_*i-g*d*i+g*n*f-t*_*f-c*n*y+t*d*y)*N,e[14]=(g*a*i-s*_*i-g*n*l+t*_*l+s*n*y-t*a*y)*N,e[15]=(s*d*i-c*a*i+c*n*l-t*d*l-s*n*f+t*a*f)*N,this}scale(e){const t=this.elements,n=e.x,i=e.y,o=e.z;return t[0]*=n,t[4]*=i,t[8]*=o,t[1]*=n,t[5]*=i,t[9]*=o,t[2]*=n,t[6]*=i,t[10]*=o,t[3]*=n,t[7]*=i,t[11]*=o,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),i=Math.sin(t),o=1-n,s=e.x,a=e.y,l=e.z,u=o*s,c=o*a;return this.set(u*s+n,u*a-i*l,u*l+i*a,0,u*a+i*l,c*a+n,c*l-i*s,0,u*l-i*a,c*l+i*s,o*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,o,s){return this.set(1,n,o,0,e,1,s,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,u=o+o,c=s+s,d=a+a,f=o*u,m=o*c,g=o*d,_=s*c,y=s*d,w=a*d,M=l*u,R=l*c,F=l*d,C=n.x,U=n.y,N=n.z;return i[0]=(1-(_+w))*C,i[1]=(m+F)*C,i[2]=(g-R)*C,i[3]=0,i[4]=(m-F)*U,i[5]=(1-(f+w))*U,i[6]=(y+M)*U,i[7]=0,i[8]=(g+R)*N,i[9]=(y-M)*N,i[10]=(1-(f+_))*N,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){const i=this.elements;let o=Ko.set(i[0],i[1],i[2]).length();const s=Ko.set(i[4],i[5],i[6]).length(),a=Ko.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],_r.copy(this);const l=1/o,u=1/s,c=1/a;return _r.elements[0]*=l,_r.elements[1]*=l,_r.elements[2]*=l,_r.elements[4]*=u,_r.elements[5]*=u,_r.elements[6]*=u,_r.elements[8]*=c,_r.elements[9]*=c,_r.elements[10]*=c,t.setFromRotationMatrix(_r),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,i,o,s){s===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const a=this.elements,l=2*o/(t-e),u=2*o/(n-i),c=(t+e)/(t-e),d=(n+i)/(n-i),f=-(s+o)/(s-o),m=-2*s*o/(s-o);return a[0]=l,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=u,a[9]=d,a[13]=0,a[2]=0,a[6]=0,a[10]=f,a[14]=m,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,i,o,s){const a=this.elements,l=1/(t-e),u=1/(n-i),c=1/(s-o),d=(t+e)*l,f=(n+i)*u,m=(s+o)*c;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-d,a[1]=0,a[5]=2*u,a[9]=0,a[13]=-f,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-m,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}pt.prototype.isMatrix4=!0;const Ko=new T,_r=new pt,Qr=new T(0,0,0),jc=new T(1,1,1),Fr=new T,eo=new T,Zi=new T,Ii=new pt,sh=new vi;class Us{constructor(e=0,t=0,n=0,i=Us.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const i=e.elements,o=i[0],s=i[4],a=i[8],l=i[1],u=i[5],c=i[9],d=i[2],f=i[6],m=i[10];switch(t){case"XYZ":this._y=Math.asin(Si(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,m),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(f,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Si(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-d,o),this._z=0);break;case"ZXY":this._x=Math.asin(Si(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-d,m),this._z=Math.atan2(-s,u)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Si(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(f,m),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,u));break;case"YZX":this._z=Math.asin(Si(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-d,o)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Si(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(f,u),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-c,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Ii.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Ii,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return sh.setFromEuler(this),this.setFromQuaternion(sh,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new T(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}Us.prototype.isEuler=!0,Us.DefaultOrder="XYZ",Us.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class Wc{constructor(){this.mask=1}set(e){this.mask=1<<e|0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!=0}}let Xc=0;const Ea=new T,ks=new vi,or=new pt,Ma=new T,Aa=new T,cf=new T,Yc=new vi,df=new T(1,0,0),ah=new T(0,1,0),qc=new T(0,0,1),pf={type:"added"},Zc={type:"removed"};class Xt extends _o{constructor(){super(),Object.defineProperty(this,"id",{value:Xc++}),this.uuid=rr(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Xt.DefaultUp.clone();const e=new T,t=new Us,n=new vi,i=new T(1,1,1);t._onChange(function(){n.setFromEuler(t,!1)}),n._onChange(function(){t.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new pt},normalMatrix:{value:new En}}),this.matrix=new pt,this.matrixWorld=new pt,this.matrixAutoUpdate=Xt.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Wc,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return ks.setFromAxisAngle(e,t),this.quaternion.multiply(ks),this}rotateOnWorldAxis(e,t){return ks.setFromAxisAngle(e,t),this.quaternion.premultiply(ks),this}rotateX(e){return this.rotateOnAxis(df,e)}rotateY(e){return this.rotateOnAxis(ah,e)}rotateZ(e){return this.rotateOnAxis(qc,e)}translateOnAxis(e,t){return Ea.copy(e).applyQuaternion(this.quaternion),this.position.add(Ea.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(df,e)}translateY(e){return this.translateOnAxis(ah,e)}translateZ(e){return this.translateOnAxis(qc,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(or.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Ma.copy(e):Ma.set(e,t,n);const i=this.parent;this.updateWorldMatrix(!0,!1),Aa.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?or.lookAt(Aa,Ma,this.up):or.lookAt(Ma,Aa,this.up),this.quaternion.setFromRotationMatrix(or),i&&(or.extractRotation(i.matrixWorld),ks.setFromRotationMatrix(or),this.quaternion.premultiply(ks.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.parent!==null&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(pf)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(Zc)),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(Zc)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),or.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),or.multiply(e.parent.matrixWorld)),e.applyMatrix4(or),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n<i;n++){const o=this.children[n].getObjectByProperty(e,t);if(o!==void 0)return o}}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Aa,e,cf),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Aa,Yc,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),t===!0){const i=this.children;for(let o=0,s=i.length;o<s;o++)i[o].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const i={};function o(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=o(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let u=0,c=l.length;u<c;u++){const d=l[u];o(e.shapes,d)}else o(e.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(o(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let l=0,u=this.material.length;l<u;l++)a.push(o(e.materials,this.material[l]));i.material=a}else i.material=o(e.materials,this.material);if(this.children.length>0){i.children=[];for(let a=0;a<this.children.length;a++)i.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let a=0;a<this.animations.length;a++){const l=this.animations[a];i.animations.push(o(e.animations,l))}}if(t){const a=s(e.geometries),l=s(e.materials),u=s(e.textures),c=s(e.images),d=s(e.shapes),f=s(e.skeletons),m=s(e.animations);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),u.length>0&&(n.textures=u),c.length>0&&(n.images=c),d.length>0&&(n.shapes=d),f.length>0&&(n.skeletons=f),m.length>0&&(n.animations=m)}return n.object=i,n;function s(a){const l=[];for(const u in a){const c=a[u];delete c.metadata,l.push(c)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){const i=e.children[n];this.add(i.clone())}return this}}Xt.DefaultUp=new T(0,1,0),Xt.DefaultMatrixAutoUpdate=!0,Xt.prototype.isObject3D=!0;const yr=new T,to=new T,lh=new T,Br=new T,Gs=new T,Qo=new T,uh=new T,Yt=new T,Jc=new T,$c=new T;class Mn{constructor(e=new T,t=new T,n=new T){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),yr.subVectors(e,t),i.cross(yr);const o=i.lengthSq();return o>0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(e,t,n,i,o){yr.subVectors(i,t),to.subVectors(n,t),lh.subVectors(e,t);const s=yr.dot(yr),a=yr.dot(to),l=yr.dot(lh),u=to.dot(to),c=to.dot(lh),d=s*u-a*a;if(d===0)return o.set(-2,-1,-1);const f=1/d,m=(u*l-a*c)*f,g=(s*c-a*l)*f;return o.set(1-m-g,g,m)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,Br),Br.x>=0&&Br.y>=0&&Br.x+Br.y<=1}static getUV(e,t,n,i,o,s,a,l){return this.getBarycoord(e,t,n,i,Br),l.set(0,0),l.addScaledVector(o,Br.x),l.addScaledVector(s,Br.y),l.addScaledVector(a,Br.z),l}static isFrontFacing(e,t,n,i){return yr.subVectors(n,t),to.subVectors(e,t),yr.cross(to).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return yr.subVectors(this.c,this.b),to.subVectors(this.a,this.b),.5*yr.cross(to).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Mn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Mn.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,i,o){return Mn.getUV(e,this.a,this.b,this.c,t,n,i,o)}containsPoint(e){return Mn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Mn.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,i=this.b,o=this.c;let s,a;Gs.subVectors(i,n),Qo.subVectors(o,n),Yt.subVectors(e,n);const l=Gs.dot(Yt),u=Qo.dot(Yt);if(l<=0&&u<=0)return t.copy(n);Jc.subVectors(e,i);const c=Gs.dot(Jc),d=Qo.dot(Jc);if(c>=0&&d<=c)return t.copy(i);const f=l*d-c*u;if(f<=0&&l>=0&&c<=0)return s=l/(l-c),t.copy(n).addScaledVector(Gs,s);$c.subVectors(e,o);const m=Gs.dot($c),g=Qo.dot($c);if(g>=0&&m<=g)return t.copy(o);const _=m*u-l*g;if(_<=0&&u>=0&&g<=0)return a=u/(u-g),t.copy(n).addScaledVector(Qo,a);const y=c*g-m*d;if(y<=0&&d-c>=0&&m-g>=0)return uh.subVectors(o,i),a=(d-c)/(d-c+(m-g)),t.copy(i).addScaledVector(uh,a);const w=1/(y+_+f);return s=_*w,a=f*w,t.copy(n).addScaledVector(Gs,s).addScaledVector(Qo,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let ff=0;class _i extends _o{constructor(){super(),Object.defineProperty(this,"id",{value:ff++}),this.uuid=rr(),this.name="",this.type="Material",this.fog=!0,this.blending=ae,this.side=z,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=en,this.blendDst=Bt,this.blendEquation=Me,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Bi,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Tl,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=un,this.stencilZFail=un,this.stencilZPass=un,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}onBuild(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if(t==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===et;continue}const i=this[t];i!==void 0?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function i(o){const s=[];for(const a in o){const l=o[a];delete l.metadata,s.push(l)}return s}if(n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==ae&&(n.blending=this.blending),this.side!==z&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.morphTargets===!0&&(n.morphTargets=!0),this.morphNormals===!0&&(n.morphNormals=!0),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),t){const o=i(e.textures),s=i(e.images);o.length>0&&(n.textures=o),s.length>0&&(n.images=s)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const i=t.length;n=new Array(i);for(let o=0;o!==i;++o)n[o]=t[o].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}_i.prototype.isMaterial=!0;const mf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},jn={h:0,s:0,l:0},hh={h:0,s:0,l:0};function Pa(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+6*(e-r)*t:t<.5?e:t<2/3?r+6*(e-r)*(2/3-t):r}function Rl(r){return r<.04045?.0773993808*r:Math.pow(.9478672986*r+.0521327014,2.4)}function ch(r){return r<.0031308?12.92*r:1.055*Math.pow(r,.41666)-.055}class gt{constructor(e,t,n){return t===void 0&&n===void 0?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this}setRGB(e,t,n){return this.r=e,this.g=t,this.b=n,this}setHSL(e,t,n){if(e=th(e,1),t=Si(t,0,1),n=Si(n,0,1),t===0)this.r=this.g=this.b=n;else{const i=n<=.5?n*(1+t):n+t-n*t,o=2*n-i;this.r=Pa(o,i,e+1/3),this.g=Pa(o,i,e),this.b=Pa(o,i,e-1/3)}return this}setStyle(e){function t(i){i!==void 0&&parseFloat(i)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let i;const o=n[1],s=n[2];switch(o){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,t(i[4]),this;if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,t(i[4]),this;break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s)){const a=parseFloat(i[1])/360,l=parseInt(i[2],10)/100,u=parseInt(i[3],10)/100;return t(i[4]),this.setHSL(a,l,u)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const i=n[1],o=i.length;if(o===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(o===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){const t=mf[e.toLowerCase()];return t!==void 0?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copyGammaToLinear(e,t=2){return this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this}copyLinearToGamma(e,t=2){const n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this}convertGammaToLinear(e){return this.copyGammaToLinear(this,e),this}convertLinearToGamma(e){return this.copyLinearToGamma(this,e),this}copySRGBToLinear(e){return this.r=Rl(e.r),this.g=Rl(e.g),this.b=Rl(e.b),this}copyLinearToSRGB(e){return this.r=ch(e.r),this.g=ch(e.g),this.b=ch(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){const t=this.r,n=this.g,i=this.b,o=Math.max(t,n,i),s=Math.min(t,n,i);let a,l;const u=(s+o)/2;if(s===o)a=0,l=0;else{const c=o-s;switch(l=u<=.5?c/(o+s):c/(2-o-s),o){case t:a=(n-i)/c+(n<i?6:0);break;case n:a=(i-t)/c+2;break;case i:a=(t-n)/c+4}a/=6}return e.h=a,e.s=l,e.l=u,e}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(e,t,n){return this.getHSL(jn),jn.h+=e,jn.s+=t,jn.l+=n,this.setHSL(jn.h,jn.s,jn.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(jn),e.getHSL(hh);const n=Sl(jn.h,hh.h,t),i=Sl(jn.s,hh.s,t),o=Sl(jn.l,hh.l,t);return this.setHSL(n,i,o),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),e.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}gt.NAMES=mf,gt.prototype.isColor=!0,gt.prototype.r=1,gt.prototype.g=1,gt.prototype.b=1;class Qn extends _i{constructor(e){super(),this.type="MeshBasicMaterial",this.color=new gt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ul,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this}}Qn.prototype.isMeshBasicMaterial=!0;const an=new T,Ca=new Qe;class Zt{constructor(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n===!0,this.usage=Os,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,o=this.itemSize;i<o;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}copyColorsArray(e){const t=this.array;let n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];s===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",i),s=new gt),t[n++]=s.r,t[n++]=s.g,t[n++]=s.b}return this}copyVector2sArray(e){const t=this.array;let n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",i),s=new Qe),t[n++]=s.x,t[n++]=s.y}return this}copyVector3sArray(e){const t=this.array;let n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",i),s=new T),t[n++]=s.x,t[n++]=s.y,t[n++]=s.z}return this}copyVector4sArray(e){const t=this.array;let n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",i),s=new pn),t[n++]=s.x,t[n++]=s.y,t[n++]=s.z,t[n++]=s.w}return this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Ca.fromBufferAttribute(this,t),Ca.applyMatrix3(e),this.setXY(t,Ca.x,Ca.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)an.fromBufferAttribute(this,t),an.applyMatrix3(e),this.setXYZ(t,an.x,an.y,an.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)an.x=this.getX(t),an.y=this.getY(t),an.z=this.getZ(t),an.applyMatrix4(e),this.setXYZ(t,an.x,an.y,an.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)an.x=this.getX(t),an.y=this.getY(t),an.z=this.getZ(t),an.applyNormalMatrix(e),this.setXYZ(t,an.x,an.y,an.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)an.x=this.getX(t),an.y=this.getY(t),an.z=this.getZ(t),an.transformDirection(e),this.setXYZ(t,an.x,an.y,an.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){return this.array[e*this.itemSize]}setX(e,t){return this.array[e*this.itemSize]=t,this}getY(e){return this.array[e*this.itemSize+1]}setY(e,t){return this.array[e*this.itemSize+1]=t,this}getZ(e){return this.array[e*this.itemSize+2]}setZ(e,t){return this.array[e*this.itemSize+2]=t,this}getW(e){return this.array[e*this.itemSize+3]}setW(e,t){return this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,o){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Os&&(e.usage=this.usage),this.updateRange.offset===0&&this.updateRange.count===-1||(e.updateRange=this.updateRange),e}}Zt.prototype.isBufferAttribute=!0;class Il extends Zt{constructor(e,t,n){super(new Int8Array(e),t,n)}}class Kc extends Zt{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class dh extends Zt{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class Qc extends Zt{constructor(e,t,n){super(new Int16Array(e),t,n)}}class Ra extends Zt{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class ph extends Zt{constructor(e,t,n){super(new Int32Array(e),t,n)}}class Ur extends Zt{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class gf extends Zt{constructor(e,t,n){super(new Uint16Array(e),t,n)}}gf.prototype.isFloat16BufferAttribute=!0;class st extends Zt{constructor(e,t,n){super(new Float32Array(e),t,n)}}class ed extends Zt{constructor(e,t,n){super(new Float64Array(e),t,n)}}function td(r){if(r.length===0)return-1/0;let e=r[0];for(let t=1,n=r.length;t<n;++t)r[t]>e&&(e=r[t]);return e}const nd={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Hs(r,e){return new nd[r](e)}let vf=0;const sr=new pt,fh=new Xt,hi=new T,Wn=new In,es=new In,Fn=new T;class Mt extends _o{constructor(){super(),Object.defineProperty(this,"id",{value:vf++}),this.uuid=rr(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(td(e)>65535?Ur:Ra)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const o=new En().getNormalMatrix(e);n.applyNormalMatrix(o),n.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return sr.makeRotationFromQuaternion(e),this.applyMatrix4(sr),this}rotateX(e){return sr.makeRotationX(e),this.applyMatrix4(sr),this}rotateY(e){return sr.makeRotationY(e),this.applyMatrix4(sr),this}rotateZ(e){return sr.makeRotationZ(e),this.applyMatrix4(sr),this}translate(e,t,n){return sr.makeTranslation(e,t,n),this.applyMatrix4(sr),this}scale(e,t,n){return sr.makeScale(e,t,n),this.applyMatrix4(sr),this}lookAt(e){return fh.lookAt(e),fh.updateMatrix(),this.applyMatrix4(fh.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(hi).negate(),this.translate(hi.x,hi.y,hi.z),this}setFromPoints(e){const t=[];for(let n=0,i=e.length;n<i;n++){const o=e[n];t.push(o.x,o.y,o.z||0)}return this.setAttribute("position",new st(t,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new In);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new T(-1/0,-1/0,-1/0),new T(1/0,1/0,1/0));if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,i=t.length;n<i;n++){const o=t[n];Wn.setFromBufferAttribute(o),this.morphTargetsRelative?(Fn.addVectors(this.boundingBox.min,Wn.min),this.boundingBox.expandByPoint(Fn),Fn.addVectors(this.boundingBox.max,Wn.max),this.boundingBox.expandByPoint(Fn)):(this.boundingBox.expandByPoint(Wn.min),this.boundingBox.expandByPoint(Wn.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new ui);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new T,1/0);if(e){const n=this.boundingSphere.center;if(Wn.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){const a=t[o];es.setFromBufferAttribute(a),this.morphTargetsRelative?(Fn.addVectors(Wn.min,es.min),Wn.expandByPoint(Fn),Fn.addVectors(Wn.max,es.max),Wn.expandByPoint(Fn)):(Wn.expandByPoint(es.min),Wn.expandByPoint(es.max))}Wn.getCenter(n);let i=0;for(let o=0,s=e.count;o<s;o++)Fn.fromBufferAttribute(e,o),i=Math.max(i,n.distanceToSquared(Fn));if(t)for(let o=0,s=t.length;o<s;o++){const a=t[o],l=this.morphTargetsRelative;for(let u=0,c=a.count;u<c;u++)Fn.fromBufferAttribute(a,u),l&&(hi.fromBufferAttribute(e,u),Fn.add(hi)),i=Math.max(i,n.distanceToSquared(Fn))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeFaceNormals(){}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,i=t.position.array,o=t.normal.array,s=t.uv.array,a=i.length/3;t.tangent===void 0&&this.setAttribute("tangent",new Zt(new Float32Array(4*a),4));const l=t.tangent.array,u=[],c=[];for(let ne=0;ne<a;ne++)u[ne]=new T,c[ne]=new T;const d=new T,f=new T,m=new T,g=new Qe,_=new Qe,y=new Qe,w=new T,M=new T;function R(ne,Z,Q){d.fromArray(i,3*ne),f.fromArray(i,3*Z),m.fromArray(i,3*Q),g.fromArray(s,2*ne),_.fromArray(s,2*Z),y.fromArray(s,2*Q),f.sub(d),m.sub(d),_.sub(g),y.sub(g);const $=1/(_.x*y.y-y.x*_.y);isFinite($)&&(w.copy(f).multiplyScalar(y.y).addScaledVector(m,-_.y).multiplyScalar($),M.copy(m).multiplyScalar(_.x).addScaledVector(f,-y.x).multiplyScalar($),u[ne].add(w),u[Z].add(w),u[Q].add(w),c[ne].add(M),c[Z].add(M),c[Q].add(M))}let F=this.groups;F.length===0&&(F=[{start:0,count:n.length}]);for(let ne=0,Z=F.length;ne<Z;++ne){const Q=F[ne],$=Q.start;for(let se=$,me=$+Q.count;se<me;se+=3)R(n[se+0],n[se+1],n[se+2])}const C=new T,U=new T,N=new T,G=new T;function he(ne){N.fromArray(o,3*ne),G.copy(N);const Z=u[ne];C.copy(Z),C.sub(N.multiplyScalar(N.dot(Z))).normalize(),U.crossVectors(G,Z);const Q=U.dot(c[ne])<0?-1:1;l[4*ne]=C.x,l[4*ne+1]=C.y,l[4*ne+2]=C.z,l[4*ne+3]=Q}for(let ne=0,Z=F.length;ne<Z;++ne){const Q=F[ne],$=Q.start;for(let se=$,me=$+Q.count;se<me;se+=3)he(n[se+0]),he(n[se+1]),he(n[se+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Zt(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let f=0,m=n.count;f<m;f++)n.setXYZ(f,0,0,0);const i=new T,o=new T,s=new T,a=new T,l=new T,u=new T,c=new T,d=new T;if(e)for(let f=0,m=e.count;f<m;f+=3){const g=e.getX(f+0),_=e.getX(f+1),y=e.getX(f+2);i.fromBufferAttribute(t,g),o.fromBufferAttribute(t,_),s.fromBufferAttribute(t,y),c.subVectors(s,o),d.subVectors(i,o),c.cross(d),a.fromBufferAttribute(n,g),l.fromBufferAttribute(n,_),u.fromBufferAttribute(n,y),a.add(c),l.add(c),u.add(c),n.setXYZ(g,a.x,a.y,a.z),n.setXYZ(_,l.x,l.y,l.z),n.setXYZ(y,u.x,u.y,u.z)}else for(let f=0,m=t.count;f<m;f+=3)i.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),s.fromBufferAttribute(t,f+2),c.subVectors(s,o),d.subVectors(i,o),c.cross(d),n.setXYZ(f+0,c.x,c.y,c.z),n.setXYZ(f+1,c.x,c.y,c.z),n.setXYZ(f+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(e,t){if(!e||!e.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e);t===void 0&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const i in n){if(e.attributes[i]===void 0)continue;const o=n[i].array,s=e.attributes[i],a=s.array,l=s.itemSize*t,u=Math.min(a.length,o.length-l);for(let c=0,d=l;c<u;c++,d++)o[d]=a[c]}return this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Fn.fromBufferAttribute(e,t),Fn.normalize(),e.setXYZ(t,Fn.x,Fn.y,Fn.z)}toNonIndexed(){function e(a,l){const u=a.array,c=a.itemSize,d=a.normalized,f=new u.constructor(l.length*c);let m=0,g=0;for(let _=0,y=l.length;_<y;_++){m=a.isInterleavedBufferAttribute?l[_]*a.data.stride+a.offset:l[_]*c;for(let w=0;w<c;w++)f[g++]=u[m++]}return new Zt(f,c,d)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Mt,n=this.index.array,i=this.attributes;for(const a in i){const l=e(i[a],n);t.setAttribute(a,l)}const o=this.morphAttributes;for(const a in o){const l=[],u=o[a];for(let c=0,d=u.length;c<d;c++){const f=e(u[c],n);l.push(f)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;const s=this.groups;for(let a=0,l=s.length;a<l;a++){const u=s[a];t.addGroup(u.start,u.count,u.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const l in n){const u=n[l];e.data.attributes[l]=u.toJSON(e.data)}const i={};let o=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],c=[];for(let d=0,f=u.length;d<f;d++){const m=u[d];c.push(m.toJSON(e.data))}c.length>0&&(i[l]=c,o=!0)}o&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new Mt().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;n!==null&&this.setIndex(n.clone(t));const i=e.attributes;for(const u in i){const c=i[u];this.setAttribute(u,c.clone(t))}const o=e.morphAttributes;for(const u in o){const c=[],d=o[u];for(let f=0,m=d.length;f<m;f++)c.push(d[f].clone(t));this.morphAttributes[u]=c}this.morphTargetsRelative=e.morphTargetsRelative;const s=e.groups;for(let u=0,c=s.length;u<c;u++){const d=s[u];this.addGroup(d.start,d.count,d.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}Mt.prototype.isBufferGeometry=!0;const id=new pt,zs=new To,ts=new ui,xr=new T,So=new T,Eo=new T,Ia=new T,mh=new T,La=new T,Oa=new T,Vs=new T,Ll=new T,js=new Qe,Ol=new Qe,Da=new Qe,rd=new T,Dl=new T;class ln extends Xt{constructor(e=new Mt,t=new Qn){super(),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o<s;o++){const a=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}else{const t=e.morphTargets;t!==void 0&&t.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){const n=this.geometry,i=this.material,o=this.matrixWorld;if(i===void 0||(n.boundingSphere===null&&n.computeBoundingSphere(),ts.copy(n.boundingSphere),ts.applyMatrix4(o),e.ray.intersectsSphere(ts)===!1)||(id.copy(o).invert(),zs.copy(e.ray).applyMatrix4(id),n.boundingBox!==null&&zs.intersectsBox(n.boundingBox)===!1))return;let s;if(n.isBufferGeometry){const a=n.index,l=n.attributes.position,u=n.morphAttributes.position,c=n.morphTargetsRelative,d=n.attributes.uv,f=n.attributes.uv2,m=n.groups,g=n.drawRange;if(a!==null)if(Array.isArray(i))for(let _=0,y=m.length;_<y;_++){const w=m[_],M=i[w.materialIndex];for(let R=Math.max(w.start,g.start),F=Math.min(w.start+w.count,g.start+g.count);R<F;R+=3){const C=a.getX(R),U=a.getX(R+1),N=a.getX(R+2);s=Nl(this,M,e,zs,l,u,c,d,f,C,U,N),s&&(s.faceIndex=Math.floor(R/3),s.face.materialIndex=w.materialIndex,t.push(s))}}else for(let _=Math.max(0,g.start),y=Math.min(a.count,g.start+g.count);_<y;_+=3){const w=a.getX(_),M=a.getX(_+1),R=a.getX(_+2);s=Nl(this,i,e,zs,l,u,c,d,f,w,M,R),s&&(s.faceIndex=Math.floor(_/3),t.push(s))}else if(l!==void 0)if(Array.isArray(i))for(let _=0,y=m.length;_<y;_++){const w=m[_],M=i[w.materialIndex];for(let R=Math.max(w.start,g.start),F=Math.min(w.start+w.count,g.start+g.count);R<F;R+=3)s=Nl(this,M,e,zs,l,u,c,d,f,R,R+1,R+2),s&&(s.faceIndex=Math.floor(R/3),s.face.materialIndex=w.materialIndex,t.push(s))}else for(let _=Math.max(0,g.start),y=Math.min(l.count,g.start+g.count);_<y;_+=3)s=Nl(this,i,e,zs,l,u,c,d,f,_,_+1,_+2),s&&(s.faceIndex=Math.floor(_/3),t.push(s))}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function Nl(r,e,t,n,i,o,s,a,l,u,c,d){xr.fromBufferAttribute(i,u),So.fromBufferAttribute(i,c),Eo.fromBufferAttribute(i,d);const f=r.morphTargetInfluences;if(e.morphTargets&&o&&f){Oa.set(0,0,0),Vs.set(0,0,0),Ll.set(0,0,0);for(let g=0,_=o.length;g<_;g++){const y=f[g],w=o[g];y!==0&&(Ia.fromBufferAttribute(w,u),mh.fromBufferAttribute(w,c),La.fromBufferAttribute(w,d),s?(Oa.addScaledVector(Ia,y),Vs.addScaledVector(mh,y),Ll.addScaledVector(La,y)):(Oa.addScaledVector(Ia.sub(xr),y),Vs.addScaledVector(mh.sub(So),y),Ll.addScaledVector(La.sub(Eo),y)))}xr.add(Oa),So.add(Vs),Eo.add(Ll)}r.isSkinnedMesh&&(r.boneTransform(u,xr),r.boneTransform(c,So),r.boneTransform(d,Eo));const m=function(g,_,y,w,M,R,F,C){let U;if(U=_.side===W?w.intersectTriangle(F,R,M,!0,C):w.intersectTriangle(M,R,F,_.side!==ee,C),U===null)return null;Dl.copy(C),Dl.applyMatrix4(g.matrixWorld);const N=y.ray.origin.distanceTo(Dl);return N<y.near||N>y.far?null:{distance:N,point:Dl.clone(),object:g}}(r,e,t,n,xr,So,Eo,rd);if(m){a&&(js.fromBufferAttribute(a,u),Ol.fromBufferAttribute(a,c),Da.fromBufferAttribute(a,d),m.uv=Mn.getUV(rd,xr,So,Eo,js,Ol,Da,new Qe)),l&&(js.fromBufferAttribute(l,u),Ol.fromBufferAttribute(l,c),Da.fromBufferAttribute(l,d),m.uv2=Mn.getUV(rd,xr,So,Eo,js,Ol,Da,new Qe));const g={a:u,b:c,c:d,normal:new T,materialIndex:0};Mn.getNormal(xr,So,Eo,g.normal),m.face=g}return m}ln.prototype.isMesh=!0;class no extends Mt{constructor(e=1,t=1,n=1,i=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:o,depthSegments:s};const a=this;i=Math.floor(i),o=Math.floor(o),s=Math.floor(s);const l=[],u=[],c=[],d=[];let f=0,m=0;function g(_,y,w,M,R,F,C,U,N,G,he){const ne=F/N,Z=C/G,Q=F/2,$=C/2,se=U/2,me=N+1,ge=G+1;let de=0,fe=0;const Re=new T;for(let ke=0;ke<ge;ke++){const Be=ke*Z-$;for(let J=0;J<me;J++){const te=J*ne-Q;Re[_]=te*M,Re[y]=Be*R,Re[w]=se,u.push(Re.x,Re.y,Re.z),Re[_]=0,Re[y]=0,Re[w]=U>0?1:-1,c.push(Re.x,Re.y,Re.z),d.push(J/N),d.push(1-ke/G),de+=1}}for(let ke=0;ke<G;ke++)for(let Be=0;Be<N;Be++){const J=f+Be+me*ke,te=f+Be+me*(ke+1),Ae=f+(Be+1)+me*(ke+1),Ne=f+(Be+1)+me*ke;l.push(J,te,Ne),l.push(te,Ae,Ne),fe+=6}a.addGroup(m,fe,he),m+=fe,f+=de}g("z","y","x",-1,-1,n,t,e,s,o,0),g("z","y","x",1,-1,n,t,-e,s,o,1),g("x","z","y",1,1,e,n,t,i,s,2),g("x","z","y",1,-1,e,n,-t,i,s,3),g("x","y","z",1,-1,e,t,n,i,o,4),g("x","y","z",-1,-1,e,t,-n,i,o,5),this.setIndex(l),this.setAttribute("position",new st(u,3)),this.setAttribute("normal",new st(c,3)),this.setAttribute("uv",new st(d,2))}static fromJSON(e){return new no(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Na(r){const e={};for(const t in r){e[t]={};for(const n in r[t]){const i=r[t][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?e[t][n]=i.clone():Array.isArray(i)?e[t][n]=i.slice():e[t][n]=i}}return e}function Ei(r){const e={};for(let t=0;t<r.length;t++){const n=Na(r[t]);for(const i in n)e[i]=n[i]}return e}const io={clone:Na,merge:Ei};class Gi extends _i{constructor(e){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=`void main() {
86
86
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
87
87
  }`,this.fragmentShader=`void main() {
88
88
  gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
@@ -2932,7 +2932,7 @@ void main() {
2932
2932
  precision `+r.precision+" int;";return r.precision==="highp"?e+=`
2933
2933
  #define HIGH_PRECISION`:r.precision==="mediump"?e+=`
2934
2934
  #define MEDIUM_PRECISION`:r.precision==="lowp"&&(e+=`
2935
- #define LOW_PRECISION`),e}function yd(r,e,t,n){const i=r.getContext(),o=t.defines;let s=t.vertexShader,a=t.fragmentShader;const l=function(G){let he="SHADOWMAP_TYPE_BASIC";return G.shadowMapType===L?he="SHADOWMAP_TYPE_PCF":G.shadowMapType===j?he="SHADOWMAP_TYPE_PCF_SOFT":G.shadowMapType===D&&(he="SHADOWMAP_TYPE_VSM"),he}(t),u=function(G){let he="ENVMAP_TYPE_CUBE";if(G.envMap)switch(G.envMapMode){case zo:case hl:he="ENVMAP_TYPE_CUBE";break;case va:case _a:he="ENVMAP_TYPE_CUBE_UV"}return he}(t),c=function(G){let he="ENVMAP_MODE_REFLECTION";if(G.envMap)switch(G.envMapMode){case hl:case _a:he="ENVMAP_MODE_REFRACTION"}return he}(t),d=function(G){let he="ENVMAP_BLENDING_NONE";if(G.envMap)switch(G.combine){case ul:he="ENVMAP_BLENDING_MULTIPLY";break;case Np:he="ENVMAP_BLENDING_MIX";break;case Fp:he="ENVMAP_BLENDING_ADD"}return he}(t),f=r.gammaFactor>0?r.gammaFactor:1,m=t.isWebGL2?"":function(G){return[G.extensionDerivatives||G.envMapCubeUV||G.bumpMap||G.tangentSpaceNormalMap||G.clearcoatNormalMap||G.flatShading||G.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(G.extensionFragDepth||G.logarithmicDepthBuffer)&&G.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",G.extensionDrawBuffers&&G.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(G.extensionShaderTextureLOD||G.envMap||G.transmission>0)&&G.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(An).join(`
2935
+ #define LOW_PRECISION`),e}function yd(r,e,t,n){const i=r.getContext(),o=t.defines;let s=t.vertexShader,a=t.fragmentShader;const l=function(G){let he="SHADOWMAP_TYPE_BASIC";return G.shadowMapType===O?he="SHADOWMAP_TYPE_PCF":G.shadowMapType===V?he="SHADOWMAP_TYPE_PCF_SOFT":G.shadowMapType===D&&(he="SHADOWMAP_TYPE_VSM"),he}(t),u=function(G){let he="ENVMAP_TYPE_CUBE";if(G.envMap)switch(G.envMapMode){case zo:case hl:he="ENVMAP_TYPE_CUBE";break;case va:case _a:he="ENVMAP_TYPE_CUBE_UV"}return he}(t),c=function(G){let he="ENVMAP_MODE_REFLECTION";if(G.envMap)switch(G.envMapMode){case hl:case _a:he="ENVMAP_MODE_REFRACTION"}return he}(t),d=function(G){let he="ENVMAP_BLENDING_NONE";if(G.envMap)switch(G.combine){case ul:he="ENVMAP_BLENDING_MULTIPLY";break;case Np:he="ENVMAP_BLENDING_MIX";break;case Fp:he="ENVMAP_BLENDING_ADD"}return he}(t),f=r.gammaFactor>0?r.gammaFactor:1,m=t.isWebGL2?"":function(G){return[G.extensionDerivatives||G.envMapCubeUV||G.bumpMap||G.tangentSpaceNormalMap||G.clearcoatNormalMap||G.flatShading||G.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(G.extensionFragDepth||G.logarithmicDepthBuffer)&&G.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",G.extensionDrawBuffers&&G.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(G.extensionShaderTextureLOD||G.envMap||G.transmission>0)&&G.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(An).join(`
2936
2936
  `)}(t),g=function(G){const he=[];for(const ne in G){const Z=G[ne];Z!==!1&&he.push("#define "+ne+" "+Z)}return he.join(`
2937
2937
  `)}(o),_=i.createProgram();let y,w,M=t.glslVersion?"#version "+t.glslVersion+`
2938
2938
  `:"";t.isRawShaderMaterial?(y=[g].filter(An).join(`
@@ -2973,7 +2973,7 @@ void main() {
2973
2973
  squared_mean = squared_mean * HALF_SAMPLE_RATE;
2974
2974
  float std_dev = sqrt( squared_mean - mean * mean );
2975
2975
  gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
2976
- }`}),m=f.clone();m.defines.HORIZONTAL_PASS=1;const g=new Mt;g.setAttribute("position",new Zt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new ln(g,f),y=this;function w(U,N){const G=e.update(_);f.uniforms.shadow_pass.value=U.map.texture,f.uniforms.resolution.value=U.mapSize,f.uniforms.radius.value=U.radius,r.setRenderTarget(U.mapPass),r.clear(),r.renderBufferDirect(N,null,G,f,_,null),m.uniforms.shadow_pass.value=U.mapPass.texture,m.uniforms.resolution.value=U.mapSize,m.uniforms.radius.value=U.radius,r.setRenderTarget(U.map),r.clear(),r.renderBufferDirect(N,null,G,m,_,null)}function M(U){const N=U<<0;let G=a[N];return G===void 0&&(G=new on({depthPacking:kc,morphTargets:U}),a[N]=G),G}function R(U){const N=U<<0;let G=l[N];return G===void 0&&(G=new Sh({morphTargets:U}),l[N]=G),G}function F(U,N,G,he,ne,Z,Q){let $=null,se=M,me=U.customDepthMaterial;if(he.isPointLight===!0&&(se=R,me=U.customDistanceMaterial),me===void 0){let ge=!1;G.morphTargets===!0&&(ge=N.morphAttributes&&N.morphAttributes.position&&N.morphAttributes.position.length>0),$=se(ge)}else $=me;if(r.localClippingEnabled&&G.clipShadows===!0&&G.clippingPlanes.length!==0){const ge=$.uuid,de=G.uuid;let fe=u[ge];fe===void 0&&(fe={},u[ge]=fe);let Re=fe[de];Re===void 0&&(Re=$.clone(),fe[de]=Re),$=Re}return $.visible=G.visible,$.wireframe=G.wireframe,$.side=Q===D?G.shadowSide!==null?G.shadowSide:G.side:G.shadowSide!==null?G.shadowSide:d[G.side],$.clipShadows=G.clipShadows,$.clippingPlanes=G.clippingPlanes,$.clipIntersection=G.clipIntersection,$.wireframeLinewidth=G.wireframeLinewidth,$.linewidth=G.linewidth,he.isPointLight===!0&&$.isMeshDistanceMaterial===!0&&($.referencePosition.setFromMatrixPosition(he.matrixWorld),$.nearDistance=ne,$.farDistance=Z),$}function C(U,N,G,he,ne){if(U.visible===!1)return;if(U.layers.test(N.layers)&&(U.isMesh||U.isLine||U.isPoints)&&(U.castShadow||U.receiveShadow&&ne===D)&&(!U.frustumCulled||n.intersectsObject(U))){U.modelViewMatrix.multiplyMatrices(G.matrixWorldInverse,U.matrixWorld);const Q=e.update(U),$=U.material;if(Array.isArray($)){const se=Q.groups;for(let me=0,ge=se.length;me<ge;me++){const de=se[me],fe=$[de.materialIndex];if(fe&&fe.visible){const Re=F(U,Q,fe,he,G.near,G.far,ne);r.renderBufferDirect(G,null,Q,Re,U,de)}}}else if($.visible){const se=F(U,Q,$,he,G.near,G.far,ne);r.renderBufferDirect(G,null,Q,se,U,null)}}const Z=U.children;for(let Q=0,$=Z.length;Q<$;Q++)C(Z[Q],N,G,he,ne)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=L,this.render=function(U,N,G){if(y.enabled===!1||y.autoUpdate===!1&&y.needsUpdate===!1||U.length===0)return;const he=r.getRenderTarget(),ne=r.getActiveCubeFace(),Z=r.getActiveMipmapLevel(),Q=r.state;Q.setBlending($e),Q.buffers.color.setClear(1,1,1,1),Q.buffers.depth.setTest(!0),Q.setScissorTest(!1);for(let $=0,se=U.length;$<se;$++){const me=U[$],ge=me.shadow;if(ge===void 0){console.warn("THREE.WebGLShadowMap:",me,"has no shadow.");continue}if(ge.autoUpdate===!1&&ge.needsUpdate===!1)continue;i.copy(ge.mapSize);const de=ge.getFrameExtents();if(i.multiply(de),o.copy(ge.mapSize),(i.x>c||i.y>c)&&(i.x>c&&(o.x=Math.floor(c/de.x),i.x=o.x*de.x,ge.mapSize.x=o.x),i.y>c&&(o.y=Math.floor(c/de.y),i.y=o.y*de.y,ge.mapSize.y=o.y)),ge.map===null&&!ge.isPointLightShadow&&this.type===D){const Re={minFilter:$n,magFilter:$n,format:tr};ge.map=new Or(i.x,i.y,Re),ge.map.texture.name=me.name+".shadowMap",ge.mapPass=new Or(i.x,i.y,Re),ge.camera.updateProjectionMatrix()}if(ge.map===null){const Re={minFilter:Jn,magFilter:Jn,format:tr};ge.map=new Or(i.x,i.y,Re),ge.map.texture.name=me.name+".shadowMap",ge.camera.updateProjectionMatrix()}r.setRenderTarget(ge.map),r.clear();const fe=ge.getViewportCount();for(let Re=0;Re<fe;Re++){const ke=ge.getViewport(Re);s.set(o.x*ke.x,o.y*ke.y,o.x*ke.z,o.y*ke.w),Q.viewport(s),ge.updateMatrices(me,Re),n=ge.getFrustum(),C(N,G,ge.camera,me,this.type)}ge.isPointLightShadow||this.type!==D||w(ge,G),ge.needsUpdate=!1}y.needsUpdate=!1,r.setRenderTarget(he,ne,Z)}}function Eh(r,e,t){const n=t.isWebGL2,i=new function(){let Y=!1;const pe=new pn;let ye=null;const xe=new pn(0,0,0,0);return{setMask:function(De){ye===De||Y||(r.colorMask(De,De,De,De),ye=De)},setLocked:function(De){Y=De},setClear:function(De,ht,xt,_t,Gt){Gt===!0&&(De*=_t,ht*=_t,xt*=_t),pe.set(De,ht,xt,_t),xe.equals(pe)===!1&&(r.clearColor(De,ht,xt,_t),xe.copy(pe))},reset:function(){Y=!1,ye=null,xe.set(-1,0,0,0)}}},o=new function(){let Y=!1,pe=null,ye=null,xe=null;return{setTest:function(De){De?Be(2929):J(2929)},setMask:function(De){pe===De||Y||(r.depthMask(De),pe=De)},setFunc:function(De){if(ye!==De){if(De)switch(De){case Zn:r.depthFunc(512);break;case yn:r.depthFunc(519);break;case li:r.depthFunc(513);break;case Bi:r.depthFunc(515);break;case Ci:r.depthFunc(514);break;case ji:r.depthFunc(518);break;case Lr:r.depthFunc(516);break;case Dp:r.depthFunc(517);break;default:r.depthFunc(515)}else r.depthFunc(515);ye=De}},setLocked:function(De){Y=De},setClear:function(De){xe!==De&&(r.clearDepth(De),xe=De)},reset:function(){Y=!1,pe=null,ye=null,xe=null}}},s=new function(){let Y=!1,pe=null,ye=null,xe=null,De=null,ht=null,xt=null,_t=null,Gt=null;return{setTest:function(Wt){Y||(Wt?Be(2960):J(2960))},setMask:function(Wt){pe===Wt||Y||(r.stencilMask(Wt),pe=Wt)},setFunc:function(Wt,ai,Cn){ye===Wt&&xe===ai&&De===Cn||(r.stencilFunc(Wt,ai,Cn),ye=Wt,xe=ai,De=Cn)},setOp:function(Wt,ai,Cn){ht===Wt&&xt===ai&&_t===Cn||(r.stencilOp(Wt,ai,Cn),ht=Wt,xt=ai,_t=Cn)},setLocked:function(Wt){Y=Wt},setClear:function(Wt){Gt!==Wt&&(r.clearStencil(Wt),Gt=Wt)},reset:function(){Y=!1,pe=null,ye=null,xe=null,De=null,ht=null,xt=null,_t=null,Gt=null}}};let a={},l=null,u={},c=null,d=!1,f=null,m=null,g=null,_=null,y=null,w=null,M=null,R=!1,F=null,C=null,U=null,N=null,G=null;const he=r.getParameter(35661);let ne=!1,Z=0;const Q=r.getParameter(7938);Q.indexOf("WebGL")!==-1?(Z=parseFloat(/^WebGL (\d)/.exec(Q)[1]),ne=Z>=1):Q.indexOf("OpenGL ES")!==-1&&(Z=parseFloat(/^OpenGL ES (\d)/.exec(Q)[1]),ne=Z>=2);let $=null,se={};const me=r.getParameter(3088),ge=r.getParameter(2978),de=new pn().fromArray(me),fe=new pn().fromArray(ge);function Re(Y,pe,ye){const xe=new Uint8Array(4),De=r.createTexture();r.bindTexture(Y,De),r.texParameteri(Y,10241,9728),r.texParameteri(Y,10240,9728);for(let ht=0;ht<ye;ht++)r.texImage2D(pe+ht,0,6408,1,1,0,6408,5121,xe);return De}const ke={};function Be(Y){a[Y]!==!0&&(r.enable(Y),a[Y]=!0)}function J(Y){a[Y]!==!1&&(r.disable(Y),a[Y]=!1)}ke[3553]=Re(3553,3553,1),ke[34067]=Re(34067,34069,6),i.setClear(0,0,0,1),o.setClear(1),s.setClear(0),Be(2929),o.setFunc(Bi),Te(!1),Ge(Xe),Be(2884),Ne($e);const te={[Me]:32774,[Oe]:32778,[Se]:32779};if(n)te[Ue]=32775,te[qe]=32776;else{const Y=e.get("EXT_blend_minmax");Y!==null&&(te[Ue]=Y.MIN_EXT,te[qe]=Y.MAX_EXT)}const Ae={[at]:0,[rt]:1,[Qt]:768,[en]:770,[gn]:776,[Dn]:774,[Vt]:772,[lt]:769,[Bt]:771,[wn]:775,[bt]:773};function Ne(Y,pe,ye,xe,De,ht,xt,_t){if(Y!==$e){if(d===!1&&(Be(3042),d=!0),Y===be)De=De||pe,ht=ht||ye,xt=xt||xe,pe===m&&De===y||(r.blendEquationSeparate(te[pe],te[De]),m=pe,y=De),ye===g&&xe===_&&ht===w&&xt===M||(r.blendFuncSeparate(Ae[ye],Ae[xe],Ae[ht],Ae[xt]),g=ye,_=xe,w=ht,M=xt),f=Y,R=null;else if(Y!==f||_t!==R){if(m===Me&&y===Me||(r.blendEquation(32774),m=Me,y=Me),_t)switch(Y){case ae:r.blendFuncSeparate(1,771,1,771);break;case Ce:r.blendFunc(1,1);break;case Ie:r.blendFuncSeparate(0,0,769,771);break;case H:r.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",Y)}else switch(Y){case ae:r.blendFuncSeparate(770,771,1,771);break;case Ce:r.blendFunc(770,1);break;case Ie:r.blendFunc(0,769);break;case H:r.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",Y)}g=null,_=null,w=null,M=null,f=Y,R=_t}}else d===!0&&(J(3042),d=!1)}function Te(Y){F!==Y&&(Y?r.frontFace(2304):r.frontFace(2305),F=Y)}function Ge(Y){Y!==Ee?(Be(2884),Y!==C&&(Y===Xe?r.cullFace(1029):Y===Fe?r.cullFace(1028):r.cullFace(1032))):J(2884),C=Y}function Ye(Y,pe,ye){Y?(Be(32823),N===pe&&G===ye||(r.polygonOffset(pe,ye),N=pe,G=ye)):J(32823)}function ve(Y){Y===void 0&&(Y=33984+he-1),$!==Y&&(r.activeTexture(Y),$=Y)}return{buffers:{color:i,depth:o,stencil:s},enable:Be,disable:J,bindFramebuffer:function(Y,pe){return pe===null&&l!==null&&(pe=l),u[Y]!==pe&&(r.bindFramebuffer(Y,pe),u[Y]=pe,n&&(Y===36009&&(u[36160]=pe),Y===36160&&(u[36009]=pe)),!0)},bindXRFramebuffer:function(Y){Y!==l&&(r.bindFramebuffer(36160,Y),l=Y)},useProgram:function(Y){return c!==Y&&(r.useProgram(Y),c=Y,!0)},setBlending:Ne,setMaterial:function(Y,pe){Y.side===ee?J(2884):Be(2884);let ye=Y.side===W;pe&&(ye=!ye),Te(ye),Y.blending===ae&&Y.transparent===!1?Ne($e):Ne(Y.blending,Y.blendEquation,Y.blendSrc,Y.blendDst,Y.blendEquationAlpha,Y.blendSrcAlpha,Y.blendDstAlpha,Y.premultipliedAlpha),o.setFunc(Y.depthFunc),o.setTest(Y.depthTest),o.setMask(Y.depthWrite),i.setMask(Y.colorWrite);const xe=Y.stencilWrite;s.setTest(xe),xe&&(s.setMask(Y.stencilWriteMask),s.setFunc(Y.stencilFunc,Y.stencilRef,Y.stencilFuncMask),s.setOp(Y.stencilFail,Y.stencilZFail,Y.stencilZPass)),Ye(Y.polygonOffset,Y.polygonOffsetFactor,Y.polygonOffsetUnits),Y.alphaToCoverage===!0?Be(32926):J(32926)},setFlipSided:Te,setCullFace:Ge,setLineWidth:function(Y){Y!==U&&(ne&&r.lineWidth(Y),U=Y)},setPolygonOffset:Ye,setScissorTest:function(Y){Y?Be(3089):J(3089)},activeTexture:ve,bindTexture:function(Y,pe){$===null&&ve();let ye=se[$];ye===void 0&&(ye={type:void 0,texture:void 0},se[$]=ye),ye.type===Y&&ye.texture===pe||(r.bindTexture(Y,pe||ke[Y]),ye.type=Y,ye.texture=pe)},unbindTexture:function(){const Y=se[$];Y!==void 0&&Y.type!==void 0&&(r.bindTexture(Y.type,null),Y.type=void 0,Y.texture=void 0)},compressedTexImage2D:function(){try{r.compressedTexImage2D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}},texImage2D:function(){try{r.texImage2D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}},texImage3D:function(){try{r.texImage3D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}},scissor:function(Y){de.equals(Y)===!1&&(r.scissor(Y.x,Y.y,Y.z,Y.w),de.copy(Y))},viewport:function(Y){fe.equals(Y)===!1&&(r.viewport(Y.x,Y.y,Y.z,Y.w),fe.copy(Y))},reset:function(){r.disable(3042),r.disable(2884),r.disable(2929),r.disable(32823),r.disable(3089),r.disable(2960),r.disable(32926),r.blendEquation(32774),r.blendFunc(1,0),r.blendFuncSeparate(1,0,1,0),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0),r.depthMask(!0),r.depthFunc(513),r.clearDepth(1),r.stencilMask(4294967295),r.stencilFunc(519,0,4294967295),r.stencilOp(7680,7680,7680),r.clearStencil(0),r.cullFace(1029),r.frontFace(2305),r.polygonOffset(0,0),r.activeTexture(33984),r.bindFramebuffer(36160,null),n===!0&&(r.bindFramebuffer(36009,null),r.bindFramebuffer(36008,null)),r.useProgram(null),r.lineWidth(1),r.scissor(0,0,r.canvas.width,r.canvas.height),r.viewport(0,0,r.canvas.width,r.canvas.height),a={},$=null,se={},l=null,u={},c=null,d=!1,f=null,m=null,g=null,_=null,y=null,w=null,M=null,R=!1,F=null,C=null,U=null,N=null,G=null,de.set(0,0,r.canvas.width,r.canvas.height),fe.set(0,0,r.canvas.width,r.canvas.height),i.reset(),o.reset(),s.reset()}}}function vv(r,e,t,n,i,o,s){const a=i.isWebGL2,l=i.maxTextures,u=i.maxCubemapSize,c=i.maxTextureSize,d=i.maxSamples,f=new WeakMap;let m,g=!1;try{g=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(J,te){return g?new OffscreenCanvas(J,te):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function y(J,te,Ae,Ne){let Te=1;if((J.width>Ne||J.height>Ne)&&(Te=Ne/Math.max(J.width,J.height)),Te<1||te===!0){if(typeof HTMLImageElement!="undefined"&&J instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&J instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&J instanceof ImageBitmap){const Ge=te?nh:Math.floor,Ye=Ge(Te*J.width),ve=Ge(Te*J.height);m===void 0&&(m=_(Ye,ve));const Y=Ae?_(Ye,ve):m;return Y.width=Ye,Y.height=ve,Y.getContext("2d").drawImage(J,0,0,Ye,ve),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+J.width+"x"+J.height+") to ("+Ye+"x"+ve+")."),Y}return"data"in J&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+J.width+"x"+J.height+")."),J}return J}function w(J){return El(J.width)&&El(J.height)}function M(J,te){return J.generateMipmaps&&te&&J.minFilter!==Jn&&J.minFilter!==$n}function R(J,te,Ae,Ne,Te=1){r.generateMipmap(J),n.get(te).__maxMipLevel=Math.log2(Math.max(Ae,Ne,Te))}function F(J,te,Ae){if(a===!1)return te;if(J!==null){if(r[J]!==void 0)return r[J];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+J+"'")}let Ne=te;return te===6403&&(Ae===5126&&(Ne=33326),Ae===5131&&(Ne=33325),Ae===5121&&(Ne=33321)),te===6407&&(Ae===5126&&(Ne=34837),Ae===5131&&(Ne=34843),Ae===5121&&(Ne=32849)),te===6408&&(Ae===5126&&(Ne=34836),Ae===5131&&(Ne=34842),Ae===5121&&(Ne=32856)),Ne!==33325&&Ne!==33326&&Ne!==34842&&Ne!==34836||e.get("EXT_color_buffer_float"),Ne}function C(J){return J===Jn||J===fl||J===ml?9728:9729}function U(J){const te=J.target;te.removeEventListener("dispose",U),function(Ae){const Ne=n.get(Ae);Ne.__webglInit!==void 0&&(r.deleteTexture(Ne.__webglTexture),n.remove(Ae))}(te),te.isVideoTexture&&f.delete(te),s.memory.textures--}function N(J){const te=J.target;te.removeEventListener("dispose",N),function(Ae){const Ne=Ae.texture,Te=n.get(Ae),Ge=n.get(Ne);if(!!Ae){if(Ge.__webglTexture!==void 0&&(r.deleteTexture(Ge.__webglTexture),s.memory.textures--),Ae.depthTexture&&Ae.depthTexture.dispose(),Ae.isWebGLCubeRenderTarget)for(let Ye=0;Ye<6;Ye++)r.deleteFramebuffer(Te.__webglFramebuffer[Ye]),Te.__webglDepthbuffer&&r.deleteRenderbuffer(Te.__webglDepthbuffer[Ye]);else r.deleteFramebuffer(Te.__webglFramebuffer),Te.__webglDepthbuffer&&r.deleteRenderbuffer(Te.__webglDepthbuffer),Te.__webglMultisampledFramebuffer&&r.deleteFramebuffer(Te.__webglMultisampledFramebuffer),Te.__webglColorRenderbuffer&&r.deleteRenderbuffer(Te.__webglColorRenderbuffer),Te.__webglDepthRenderbuffer&&r.deleteRenderbuffer(Te.__webglDepthRenderbuffer);if(Ae.isWebGLMultipleRenderTargets)for(let Ye=0,ve=Ne.length;Ye<ve;Ye++){const Y=n.get(Ne[Ye]);Y.__webglTexture&&(r.deleteTexture(Y.__webglTexture),s.memory.textures--),n.remove(Ne[Ye])}n.remove(Ne),n.remove(Ae)}}(te)}let G=0;function he(J,te){const Ae=n.get(J);if(J.isVideoTexture&&function(Ne){const Te=s.render.frame;f.get(Ne)!==Te&&(f.set(Ne,Te),Ne.update())}(J),J.version>0&&Ae.__version!==J.version){const Ne=J.image;if(Ne===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(Ne.complete!==!1)return void me(Ae,J,te);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}t.activeTexture(33984+te),t.bindTexture(3553,Ae.__webglTexture)}function ne(J,te){const Ae=n.get(J);J.version>0&&Ae.__version!==J.version?function(Ne,Te,Ge){if(Te.image.length!==6)return;se(Ne,Te),t.activeTexture(33984+Ge),t.bindTexture(34067,Ne.__webglTexture),r.pixelStorei(37440,Te.flipY),r.pixelStorei(37441,Te.premultiplyAlpha),r.pixelStorei(3317,Te.unpackAlignment),r.pixelStorei(37443,0);const Ye=Te&&(Te.isCompressedTexture||Te.image[0].isCompressedTexture),ve=Te.image[0]&&Te.image[0].isDataTexture,Y=[];for(let _t=0;_t<6;_t++)Y[_t]=Ye||ve?ve?Te.image[_t].image:Te.image[_t]:y(Te.image[_t],!1,!0,u);const pe=Y[0],ye=w(pe)||a,xe=o.convert(Te.format),De=o.convert(Te.type),ht=F(Te.internalFormat,xe,De);let xt;if($(34067,Te,ye),Ye){for(let _t=0;_t<6;_t++){xt=Y[_t].mipmaps;for(let Gt=0;Gt<xt.length;Gt++){const Wt=xt[Gt];Te.format!==tr&&Te.format!==fo?xe!==null?t.compressedTexImage2D(34069+_t,Gt,ht,Wt.width,Wt.height,0,Wt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):t.texImage2D(34069+_t,Gt,ht,Wt.width,Wt.height,0,xe,De,Wt.data)}}Ne.__maxMipLevel=xt.length-1}else{xt=Te.mipmaps;for(let _t=0;_t<6;_t++)if(ve){t.texImage2D(34069+_t,0,ht,Y[_t].width,Y[_t].height,0,xe,De,Y[_t].data);for(let Gt=0;Gt<xt.length;Gt++){const Wt=xt[Gt].image[_t].image;t.texImage2D(34069+_t,Gt+1,ht,Wt.width,Wt.height,0,xe,De,Wt.data)}}else{t.texImage2D(34069+_t,0,ht,xe,De,Y[_t]);for(let Gt=0;Gt<xt.length;Gt++){const Wt=xt[Gt];t.texImage2D(34069+_t,Gt+1,ht,xe,De,Wt.image[_t])}}Ne.__maxMipLevel=xt.length}M(Te,ye)&&R(34067,Te,pe.width,pe.height),Ne.__version=Te.version,Te.onUpdate&&Te.onUpdate(Te)}(Ae,J,te):(t.activeTexture(33984+te),t.bindTexture(34067,Ae.__webglTexture))}const Z={[Vo]:10497,[gi]:33071,[pl]:33648},Q={[Jn]:9728,[fl]:9984,[ml]:9986,[$n]:9729,[jo]:9985,[Ms]:9987};function $(J,te,Ae){if(Ae?(r.texParameteri(J,10242,Z[te.wrapS]),r.texParameteri(J,10243,Z[te.wrapT]),J!==32879&&J!==35866||r.texParameteri(J,32882,Z[te.wrapR]),r.texParameteri(J,10240,Q[te.magFilter]),r.texParameteri(J,10241,Q[te.minFilter])):(r.texParameteri(J,10242,33071),r.texParameteri(J,10243,33071),J!==32879&&J!==35866||r.texParameteri(J,32882,33071),te.wrapS===gi&&te.wrapT===gi||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),r.texParameteri(J,10240,C(te.magFilter)),r.texParameteri(J,10241,C(te.minFilter)),te.minFilter!==Jn&&te.minFilter!==$n&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){const Ne=e.get("EXT_texture_filter_anisotropic");if(te.type===po&&e.has("OES_texture_float_linear")===!1||a===!1&&te.type===Ps&&e.has("OES_texture_half_float_linear")===!1)return;(te.anisotropy>1||n.get(te).__currentAnisotropy)&&(r.texParameterf(J,Ne.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(te.anisotropy,i.getMaxAnisotropy())),n.get(te).__currentAnisotropy=te.anisotropy)}}function se(J,te){J.__webglInit===void 0&&(J.__webglInit=!0,te.addEventListener("dispose",U),J.__webglTexture=r.createTexture(),s.memory.textures++)}function me(J,te,Ae){let Ne=3553;te.isDataTexture2DArray&&(Ne=35866),te.isDataTexture3D&&(Ne=32879),se(J,te),t.activeTexture(33984+Ae),t.bindTexture(Ne,J.__webglTexture),r.pixelStorei(37440,te.flipY),r.pixelStorei(37441,te.premultiplyAlpha),r.pixelStorei(3317,te.unpackAlignment),r.pixelStorei(37443,0);const Te=function(De){return!a&&(De.wrapS!==gi||De.wrapT!==gi||De.minFilter!==Jn&&De.minFilter!==$n)}(te)&&w(te.image)===!1,Ge=y(te.image,Te,!1,c),Ye=w(Ge)||a,ve=o.convert(te.format);let Y,pe=o.convert(te.type),ye=F(te.internalFormat,ve,pe);$(Ne,te,Ye);const xe=te.mipmaps;if(te.isDepthTexture)ye=6402,a?ye=te.type===po?36012:te.type===As?33190:te.type===dn?35056:33189:te.type===po&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),te.format===Nn&&ye===6402&&te.type!==gl&&te.type!==As&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),te.type=gl,pe=o.convert(te.type)),te.format===Cs&&ye===6402&&(ye=34041,te.type!==dn&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),te.type=dn,pe=o.convert(te.type))),t.texImage2D(3553,0,ye,Ge.width,Ge.height,0,ve,pe,null);else if(te.isDataTexture)if(xe.length>0&&Ye){for(let De=0,ht=xe.length;De<ht;De++)Y=xe[De],t.texImage2D(3553,De,ye,Y.width,Y.height,0,ve,pe,Y.data);te.generateMipmaps=!1,J.__maxMipLevel=xe.length-1}else t.texImage2D(3553,0,ye,Ge.width,Ge.height,0,ve,pe,Ge.data),J.__maxMipLevel=0;else if(te.isCompressedTexture){for(let De=0,ht=xe.length;De<ht;De++)Y=xe[De],te.format!==tr&&te.format!==fo?ve!==null?t.compressedTexImage2D(3553,De,ye,Y.width,Y.height,0,Y.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):t.texImage2D(3553,De,ye,Y.width,Y.height,0,ve,pe,Y.data);J.__maxMipLevel=xe.length-1}else if(te.isDataTexture2DArray)t.texImage3D(35866,0,ye,Ge.width,Ge.height,Ge.depth,0,ve,pe,Ge.data),J.__maxMipLevel=0;else if(te.isDataTexture3D)t.texImage3D(32879,0,ye,Ge.width,Ge.height,Ge.depth,0,ve,pe,Ge.data),J.__maxMipLevel=0;else if(xe.length>0&&Ye){for(let De=0,ht=xe.length;De<ht;De++)Y=xe[De],t.texImage2D(3553,De,ye,ve,pe,Y);te.generateMipmaps=!1,J.__maxMipLevel=xe.length-1}else t.texImage2D(3553,0,ye,ve,pe,Ge),J.__maxMipLevel=0;M(te,Ye)&&R(Ne,te,Ge.width,Ge.height),J.__version=te.version,te.onUpdate&&te.onUpdate(te)}function ge(J,te,Ae,Ne,Te){const Ge=o.convert(Ae.format),Ye=o.convert(Ae.type),ve=F(Ae.internalFormat,Ge,Ye);Te===32879||Te===35866?t.texImage3D(Te,0,ve,te.width,te.height,te.depth,0,Ge,Ye,null):t.texImage2D(Te,0,ve,te.width,te.height,0,Ge,Ye,null),t.bindFramebuffer(36160,J),r.framebufferTexture2D(36160,Ne,Te,n.get(Ae).__webglTexture,0),t.bindFramebuffer(36160,null)}function de(J,te,Ae){if(r.bindRenderbuffer(36161,J),te.depthBuffer&&!te.stencilBuffer){let Ne=33189;if(Ae){const Te=te.depthTexture;Te&&Te.isDepthTexture&&(Te.type===po?Ne=36012:Te.type===As&&(Ne=33190));const Ge=Re(te);r.renderbufferStorageMultisample(36161,Ge,Ne,te.width,te.height)}else r.renderbufferStorage(36161,Ne,te.width,te.height);r.framebufferRenderbuffer(36160,36096,36161,J)}else if(te.depthBuffer&&te.stencilBuffer){if(Ae){const Ne=Re(te);r.renderbufferStorageMultisample(36161,Ne,35056,te.width,te.height)}else r.renderbufferStorage(36161,34041,te.width,te.height);r.framebufferRenderbuffer(36160,33306,36161,J)}else{const Ne=te.isWebGLMultipleRenderTargets===!0?te.texture[0]:te.texture,Te=o.convert(Ne.format),Ge=o.convert(Ne.type),Ye=F(Ne.internalFormat,Te,Ge);if(Ae){const ve=Re(te);r.renderbufferStorageMultisample(36161,ve,Ye,te.width,te.height)}else r.renderbufferStorage(36161,Ye,te.width,te.height)}r.bindRenderbuffer(36161,null)}function fe(J){const te=n.get(J),Ae=J.isWebGLCubeRenderTarget===!0;if(J.depthTexture){if(Ae)throw new Error("target.depthTexture not supported in Cube render targets");(function(Ne,Te){if(Te&&Te.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,Ne),!Te.depthTexture||!Te.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");n.get(Te.depthTexture).__webglTexture&&Te.depthTexture.image.width===Te.width&&Te.depthTexture.image.height===Te.height||(Te.depthTexture.image.width=Te.width,Te.depthTexture.image.height=Te.height,Te.depthTexture.needsUpdate=!0),he(Te.depthTexture,0);const Ge=n.get(Te.depthTexture).__webglTexture;if(Te.depthTexture.format===Nn)r.framebufferTexture2D(36160,36096,3553,Ge,0);else{if(Te.depthTexture.format!==Cs)throw new Error("Unknown depthTexture format");r.framebufferTexture2D(36160,33306,3553,Ge,0)}})(te.__webglFramebuffer,J)}else if(Ae){te.__webglDepthbuffer=[];for(let Ne=0;Ne<6;Ne++)t.bindFramebuffer(36160,te.__webglFramebuffer[Ne]),te.__webglDepthbuffer[Ne]=r.createRenderbuffer(),de(te.__webglDepthbuffer[Ne],J,!1)}else t.bindFramebuffer(36160,te.__webglFramebuffer),te.__webglDepthbuffer=r.createRenderbuffer(),de(te.__webglDepthbuffer,J,!1);t.bindFramebuffer(36160,null)}function Re(J){return a&&J.isWebGLMultisampleRenderTarget?Math.min(d,J.samples):0}let ke=!1,Be=!1;this.allocateTextureUnit=function(){const J=G;return J>=l&&console.warn("THREE.WebGLTextures: Trying to use "+J+" texture units while this GPU supports only "+l),G+=1,J},this.resetTextureUnits=function(){G=0},this.setTexture2D=he,this.setTexture2DArray=function(J,te){const Ae=n.get(J);J.version>0&&Ae.__version!==J.version?me(Ae,J,te):(t.activeTexture(33984+te),t.bindTexture(35866,Ae.__webglTexture))},this.setTexture3D=function(J,te){const Ae=n.get(J);J.version>0&&Ae.__version!==J.version?me(Ae,J,te):(t.activeTexture(33984+te),t.bindTexture(32879,Ae.__webglTexture))},this.setTextureCube=ne,this.setupRenderTarget=function(J){const te=J.texture,Ae=n.get(J),Ne=n.get(te);J.addEventListener("dispose",N),J.isWebGLMultipleRenderTargets!==!0&&(Ne.__webglTexture=r.createTexture(),Ne.__version=te.version,s.memory.textures++);const Te=J.isWebGLCubeRenderTarget===!0,Ge=J.isWebGLMultipleRenderTargets===!0,Ye=J.isWebGLMultisampleRenderTarget===!0,ve=te.isDataTexture3D||te.isDataTexture2DArray,Y=w(J)||a;if(!a||te.format!==fo||te.type!==po&&te.type!==Ps||(te.format=tr,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),Te){Ae.__webglFramebuffer=[];for(let pe=0;pe<6;pe++)Ae.__webglFramebuffer[pe]=r.createFramebuffer()}else if(Ae.__webglFramebuffer=r.createFramebuffer(),Ge)if(i.drawBuffers){const pe=J.texture;for(let ye=0,xe=pe.length;ye<xe;ye++){const De=n.get(pe[ye]);De.__webglTexture===void 0&&(De.__webglTexture=r.createTexture(),s.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(Ye)if(a){Ae.__webglMultisampledFramebuffer=r.createFramebuffer(),Ae.__webglColorRenderbuffer=r.createRenderbuffer(),r.bindRenderbuffer(36161,Ae.__webglColorRenderbuffer);const pe=o.convert(te.format),ye=o.convert(te.type),xe=F(te.internalFormat,pe,ye),De=Re(J);r.renderbufferStorageMultisample(36161,De,xe,J.width,J.height),t.bindFramebuffer(36160,Ae.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(36160,36064,36161,Ae.__webglColorRenderbuffer),r.bindRenderbuffer(36161,null),J.depthBuffer&&(Ae.__webglDepthRenderbuffer=r.createRenderbuffer(),de(Ae.__webglDepthRenderbuffer,J,!0)),t.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(Te){t.bindTexture(34067,Ne.__webglTexture),$(34067,te,Y);for(let pe=0;pe<6;pe++)ge(Ae.__webglFramebuffer[pe],J,te,36064,34069+pe);M(te,Y)&&R(34067,te,J.width,J.height),t.bindTexture(34067,null)}else if(Ge){const pe=J.texture;for(let ye=0,xe=pe.length;ye<xe;ye++){const De=pe[ye],ht=n.get(De);t.bindTexture(3553,ht.__webglTexture),$(3553,De,Y),ge(Ae.__webglFramebuffer,J,De,36064+ye,3553),M(De,Y)&&R(3553,De,J.width,J.height)}t.bindTexture(3553,null)}else{let pe=3553;ve&&(a?pe=te.isDataTexture3D?32879:35866:console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")),t.bindTexture(pe,Ne.__webglTexture),$(pe,te,Y),ge(Ae.__webglFramebuffer,J,te,36064,pe),M(te,Y)&&R(pe,te,J.width,J.height,J.depth),t.bindTexture(pe,null)}J.depthBuffer&&fe(J)},this.updateRenderTargetMipmap=function(J){const te=w(J)||a,Ae=J.isWebGLMultipleRenderTargets===!0?J.texture:[J.texture];for(let Ne=0,Te=Ae.length;Ne<Te;Ne++){const Ge=Ae[Ne];if(M(Ge,te)){const Ye=J.isWebGLCubeRenderTarget?34067:3553,ve=n.get(Ge).__webglTexture;t.bindTexture(Ye,ve),R(Ye,Ge,J.width,J.height),t.bindTexture(Ye,null)}}},this.updateMultisampleRenderTarget=function(J){if(J.isWebGLMultisampleRenderTarget)if(a){const te=J.width,Ae=J.height;let Ne=16384;J.depthBuffer&&(Ne|=256),J.stencilBuffer&&(Ne|=1024);const Te=n.get(J);t.bindFramebuffer(36008,Te.__webglMultisampledFramebuffer),t.bindFramebuffer(36009,Te.__webglFramebuffer),r.blitFramebuffer(0,0,te,Ae,0,0,te,Ae,Ne,9728),t.bindFramebuffer(36008,null),t.bindFramebuffer(36009,Te.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(J,te){J&&J.isWebGLRenderTarget&&(ke===!1&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),ke=!0),J=J.texture),he(J,te)},this.safeSetTextureCube=function(J,te){J&&J.isWebGLCubeRenderTarget&&(Be===!1&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),Be=!0),J=J.texture),ne(J,te)}}function Yf(r,e,t){const n=t.isWebGL2;return{convert:function(i){let o;if(i===Wo)return 5121;if(i===Yp)return 32819;if(i===qp)return 32820;if(i===Zp)return 33635;if(i===jp)return 5120;if(i===Wp)return 5122;if(i===gl)return 5123;if(i===Xp)return 5124;if(i===As)return 5125;if(i===po)return 5126;if(i===Ps)return n?5131:(o=e.get("OES_texture_half_float"),o!==null?o.HALF_FLOAT_OES:null);if(i===_n)return 6406;if(i===fo)return 6407;if(i===tr)return 6408;if(i===Jp)return 6409;if(i===Tc)return 6410;if(i===Nn)return 6402;if(i===Cs)return 34041;if(i===ya)return 6403;if(i===Sc)return 36244;if(i===Lu)return 33319;if(i===nr)return 33320;if(i===Ec)return 36248;if(i===Mc)return 36249;if(i===Ou||i===Du||i===Nu||i===Fu){if(o=e.get("WEBGL_compressed_texture_s3tc"),o===null)return null;if(i===Ou)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Du)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Nu)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===Fu)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(i===Ui||i===Ac||i===Wi||i===Pc){if(o=e.get("WEBGL_compressed_texture_pvrtc"),o===null)return null;if(i===Ui)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===Ac)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===Wi)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===Pc)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(i===Cc)return o=e.get("WEBGL_compressed_texture_etc1"),o!==null?o.COMPRESSED_RGB_ETC1_WEBGL:null;if((i===qr||i===xa)&&(o=e.get("WEBGL_compressed_texture_etc"),o!==null)){if(i===qr)return o.COMPRESSED_RGB8_ETC2;if(i===xa)return o.COMPRESSED_RGBA8_ETC2_EAC}return i===Bu||i===Tn||i===mo||i===Uu||i===Kp||i===ku||i===Qp||i===Rc||i===vl||i===Rs||i===ef||i===Ic||i===Lc||i===Gu||i===Oc||i===zu||i===Vu||i===Dc||i===Xi||i===ju||i===ba||i===Nc||i===Fc||i===tf||i===nf||i===rf||i===of||i===Is?(o=e.get("WEBGL_compressed_texture_astc"),o!==null?i:null):i===Hu?(o=e.get("EXT_texture_compression_bptc"),o!==null?i:null):i===dn?n?34042:(o=e.get("WEBGL_depth_texture"),o!==null?o.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}class bd extends ei{constructor(e=[]){super(),this.cameras=e}}bd.prototype.isArrayCamera=!0;class Js extends Xt{constructor(){super(),this.type="Group"}}Js.prototype.isGroup=!0;const wd={type:"move"};class Gl{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Js,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Js,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new T,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new T),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Js,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new T,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new T),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,o=null,s=null;const a=this._targetRay,l=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred")if(a!==null&&(i=t.getPose(e.targetRaySpace,n),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(wd))),u&&e.hand){s=!0;for(const _ of e.hand.values()){const y=t.getJointPose(_,n);if(u.joints[_.jointName]===void 0){const M=new Js;M.matrixAutoUpdate=!1,M.visible=!1,u.joints[_.jointName]=M,u.add(M)}const w=u.joints[_.jointName];y!==null&&(w.matrix.fromArray(y.transform.matrix),w.matrix.decompose(w.position,w.rotation,w.scale),w.jointRadius=y.radius),w.visible=y!==null}const c=u.joints["index-finger-tip"],d=u.joints["thumb-tip"],f=c.position.distanceTo(d.position),m=.02,g=.005;u.inputState.pinching&&f>m+g?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&f<=m-g&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=t.getPose(e.gripSpace,n),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=o!==null),u!==null&&(u.visible=s!==null),this}}class _v extends _o{constructor(e,t){super();const n=this,i=e.state;let o=null,s=1,a=null,l="local-floor",u=null,c=null,d=null,f=null;const m=[],g=new Map,_=new ei;_.layers.enable(1),_.viewport=new pn;const y=new ei;y.layers.enable(2),y.viewport=new pn;const w=[_,y],M=new bd;M.layers.enable(1),M.layers.enable(2);let R=null,F=null;function C($){const se=g.get($.inputSource);se&&se.dispatchEvent({type:$.type,data:$.inputSource})}function U(){g.forEach(function($,se){$.disconnect(se)}),g.clear(),R=null,F=null,i.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),Q.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function N($){const se=o.inputSources;for(let me=0;me<m.length;me++)g.set(se[me],m[me]);for(let me=0;me<$.removed.length;me++){const ge=$.removed[me],de=g.get(ge);de&&(de.dispatchEvent({type:"disconnected",data:ge}),g.delete(ge))}for(let me=0;me<$.added.length;me++){const ge=$.added[me],de=g.get(ge);de&&de.dispatchEvent({type:"connected",data:ge})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function($){let se=m[$];return se===void 0&&(se=new Gl,m[$]=se),se.getTargetRaySpace()},this.getControllerGrip=function($){let se=m[$];return se===void 0&&(se=new Gl,m[$]=se),se.getGripSpace()},this.getHand=function($){let se=m[$];return se===void 0&&(se=new Gl,m[$]=se),se.getHandSpace()},this.setFramebufferScaleFactor=function($){s=$,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function($){l=$,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getSession=function(){return o},this.setSession=async function($){if(o=$,o!==null){o.addEventListener("select",C),o.addEventListener("selectstart",C),o.addEventListener("selectend",C),o.addEventListener("squeeze",C),o.addEventListener("squeezestart",C),o.addEventListener("squeezeend",C),o.addEventListener("end",U),o.addEventListener("inputsourceschange",N);const se=t.getContextAttributes();if(se.xrCompatible!==!0&&await t.makeXRCompatible(),o.renderState.layers===void 0){const me={antialias:se.antialias,alpha:se.alpha,depth:se.depth,stencil:se.stencil,framebufferScaleFactor:s},ge=new XRWebGLLayer(o,t,me);o.updateRenderState({baseLayer:ge})}else{let me=0;se.depth&&(me=se.stencil?34041:6402);const ge={colorFormat:se.alpha?6408:6407,depthFormat:me,scaleFactor:s};c=new XRWebGLBinding(o,t),f=c.createProjectionLayer(ge),d=t.createFramebuffer(),o.updateRenderState({layers:[f]})}a=await o.requestReferenceSpace(l),Q.setContext(o),Q.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const G=new T,he=new T;function ne($,se){se===null?$.matrixWorld.copy($.matrix):$.matrixWorld.multiplyMatrices(se.matrixWorld,$.matrix),$.matrixWorldInverse.copy($.matrixWorld).invert()}this.updateCamera=function($){if(o===null)return;M.near=y.near=_.near=$.near,M.far=y.far=_.far=$.far,R===M.near&&F===M.far||(o.updateRenderState({depthNear:M.near,depthFar:M.far}),R=M.near,F=M.far);const se=$.parent,me=M.cameras;ne(M,se);for(let de=0;de<me.length;de++)ne(me[de],se);M.matrixWorld.decompose(M.position,M.quaternion,M.scale),$.position.copy(M.position),$.quaternion.copy(M.quaternion),$.scale.copy(M.scale),$.matrix.copy(M.matrix),$.matrixWorld.copy(M.matrixWorld);const ge=$.children;for(let de=0,fe=ge.length;de<fe;de++)ge[de].updateMatrixWorld(!0);me.length===2?function(de,fe,Re){G.setFromMatrixPosition(fe.matrixWorld),he.setFromMatrixPosition(Re.matrixWorld);const ke=G.distanceTo(he),Be=fe.projectionMatrix.elements,J=Re.projectionMatrix.elements,te=Be[14]/(Be[10]-1),Ae=Be[14]/(Be[10]+1),Ne=(Be[9]+1)/Be[5],Te=(Be[9]-1)/Be[5],Ge=(Be[8]-1)/Be[0],Ye=(J[8]+1)/J[0],ve=te*Ge,Y=te*Ye,pe=ke/(-Ge+Ye),ye=pe*-Ge;fe.matrixWorld.decompose(de.position,de.quaternion,de.scale),de.translateX(ye),de.translateZ(pe),de.matrixWorld.compose(de.position,de.quaternion,de.scale),de.matrixWorldInverse.copy(de.matrixWorld).invert();const xe=te+pe,De=Ae+pe,ht=ve-ye,xt=Y+(ke-ye),_t=Ne*Ae/De*xe,Gt=Te*Ae/De*xe;de.projectionMatrix.makePerspective(ht,xt,_t,Gt,xe,De)}(M,_,y):M.projectionMatrix.copy(_.projectionMatrix)},this.getCamera=function(){return M};let Z=null;const Q=new sd;Q.setAnimationLoop(function($,se){if(u=se.getViewerPose(a),u!==null){const ge=u.views,de=o.renderState.baseLayer;o.renderState.layers===void 0&&i.bindXRFramebuffer(de.framebuffer);let fe=!1;ge.length!==M.cameras.length&&(M.cameras.length=0,fe=!0);for(let Re=0;Re<ge.length;Re++){const ke=ge[Re];let Be=null;if(o.renderState.layers===void 0)Be=de.getViewport(ke);else{const te=c.getViewSubImage(f,ke);i.bindXRFramebuffer(d),t.framebufferTexture2D(36160,36064,3553,te.colorTexture,0),te.depthStencilTexture!==void 0&&t.framebufferTexture2D(36160,36096,3553,te.depthStencilTexture,0),Be=te.viewport}const J=w[Re];J.matrix.fromArray(ke.transform.matrix),J.projectionMatrix.fromArray(ke.projectionMatrix),J.viewport.set(Be.x,Be.y,Be.width,Be.height),Re===0&&M.matrix.copy(J.matrix),fe===!0&&M.cameras.push(J)}}const me=o.inputSources;for(let ge=0;ge<m.length;ge++){const de=m[ge],fe=me[ge];de.update(fe,se,a)}Z&&Z($,se)}),this.setAnimationLoop=function($){Z=$},this.dispose=function(){}}}function yv(r){function e(n,i){n.opacity.value=i.opacity,i.color&&n.diffuse.value.copy(i.color),i.emissive&&n.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),i.map&&(n.map.value=i.map),i.alphaMap&&(n.alphaMap.value=i.alphaMap),i.specularMap&&(n.specularMap.value=i.specularMap);const o=r.get(i).envMap;if(o){n.envMap.value=o,n.flipEnvMap.value=o.isCubeTexture&&o._needsFlipEnvMap?-1:1,n.reflectivity.value=i.reflectivity,n.refractionRatio.value=i.refractionRatio;const l=r.get(o).__maxMipLevel;l!==void 0&&(n.maxMipLevel.value=l)}let s,a;i.lightMap&&(n.lightMap.value=i.lightMap,n.lightMapIntensity.value=i.lightMapIntensity),i.aoMap&&(n.aoMap.value=i.aoMap,n.aoMapIntensity.value=i.aoMapIntensity),i.map?s=i.map:i.specularMap?s=i.specularMap:i.displacementMap?s=i.displacementMap:i.normalMap?s=i.normalMap:i.bumpMap?s=i.bumpMap:i.roughnessMap?s=i.roughnessMap:i.metalnessMap?s=i.metalnessMap:i.alphaMap?s=i.alphaMap:i.emissiveMap?s=i.emissiveMap:i.clearcoatMap?s=i.clearcoatMap:i.clearcoatNormalMap?s=i.clearcoatNormalMap:i.clearcoatRoughnessMap&&(s=i.clearcoatRoughnessMap),s!==void 0&&(s.isWebGLRenderTarget&&(s=s.texture),s.matrixAutoUpdate===!0&&s.updateMatrix(),n.uvTransform.value.copy(s.matrix)),i.aoMap?a=i.aoMap:i.lightMap&&(a=i.lightMap),a!==void 0&&(a.isWebGLRenderTarget&&(a=a.texture),a.matrixAutoUpdate===!0&&a.updateMatrix(),n.uv2Transform.value.copy(a.matrix))}function t(n,i){n.roughness.value=i.roughness,n.metalness.value=i.metalness,i.roughnessMap&&(n.roughnessMap.value=i.roughnessMap),i.metalnessMap&&(n.metalnessMap.value=i.metalnessMap),i.emissiveMap&&(n.emissiveMap.value=i.emissiveMap),i.bumpMap&&(n.bumpMap.value=i.bumpMap,n.bumpScale.value=i.bumpScale,i.side===W&&(n.bumpScale.value*=-1)),i.normalMap&&(n.normalMap.value=i.normalMap,n.normalScale.value.copy(i.normalScale),i.side===W&&n.normalScale.value.negate()),i.displacementMap&&(n.displacementMap.value=i.displacementMap,n.displacementScale.value=i.displacementScale,n.displacementBias.value=i.displacementBias),r.get(i).envMap&&(n.envMapIntensity.value=i.envMapIntensity)}return{refreshFogUniforms:function(n,i){n.fogColor.value.copy(i.color),i.isFog?(n.fogNear.value=i.near,n.fogFar.value=i.far):i.isFogExp2&&(n.fogDensity.value=i.density)},refreshMaterialUniforms:function(n,i,o,s,a){i.isMeshBasicMaterial?e(n,i):i.isMeshLambertMaterial?(e(n,i),function(l,u){u.emissiveMap&&(l.emissiveMap.value=u.emissiveMap)}(n,i)):i.isMeshToonMaterial?(e(n,i),function(l,u){u.gradientMap&&(l.gradientMap.value=u.gradientMap),u.emissiveMap&&(l.emissiveMap.value=u.emissiveMap),u.bumpMap&&(l.bumpMap.value=u.bumpMap,l.bumpScale.value=u.bumpScale,u.side===W&&(l.bumpScale.value*=-1)),u.normalMap&&(l.normalMap.value=u.normalMap,l.normalScale.value.copy(u.normalScale),u.side===W&&l.normalScale.value.negate()),u.displacementMap&&(l.displacementMap.value=u.displacementMap,l.displacementScale.value=u.displacementScale,l.displacementBias.value=u.displacementBias)}(n,i)):i.isMeshPhongMaterial?(e(n,i),function(l,u){l.specular.value.copy(u.specular),l.shininess.value=Math.max(u.shininess,1e-4),u.emissiveMap&&(l.emissiveMap.value=u.emissiveMap),u.bumpMap&&(l.bumpMap.value=u.bumpMap,l.bumpScale.value=u.bumpScale,u.side===W&&(l.bumpScale.value*=-1)),u.normalMap&&(l.normalMap.value=u.normalMap,l.normalScale.value.copy(u.normalScale),u.side===W&&l.normalScale.value.negate()),u.displacementMap&&(l.displacementMap.value=u.displacementMap,l.displacementScale.value=u.displacementScale,l.displacementBias.value=u.displacementBias)}(n,i)):i.isMeshStandardMaterial?(e(n,i),i.isMeshPhysicalMaterial?function(l,u,c){t(l,u),l.reflectivity.value=u.reflectivity,l.clearcoat.value=u.clearcoat,l.clearcoatRoughness.value=u.clearcoatRoughness,u.sheen&&l.sheen.value.copy(u.sheen),u.clearcoatMap&&(l.clearcoatMap.value=u.clearcoatMap),u.clearcoatRoughnessMap&&(l.clearcoatRoughnessMap.value=u.clearcoatRoughnessMap),u.clearcoatNormalMap&&(l.clearcoatNormalScale.value.copy(u.clearcoatNormalScale),l.clearcoatNormalMap.value=u.clearcoatNormalMap,u.side===W&&l.clearcoatNormalScale.value.negate()),l.transmission.value=u.transmission,u.transmissionMap&&(l.transmissionMap.value=u.transmissionMap),u.transmission>0&&(l.transmissionSamplerMap.value=c.texture,l.transmissionSamplerSize.value.set(c.width,c.height)),l.thickness.value=u.thickness,u.thicknessMap&&(l.thicknessMap.value=u.thicknessMap),l.attenuationDistance.value=u.attenuationDistance,l.attenuationColor.value.copy(u.attenuationColor)}(n,i,a):t(n,i)):i.isMeshMatcapMaterial?(e(n,i),function(l,u){u.matcap&&(l.matcap.value=u.matcap),u.bumpMap&&(l.bumpMap.value=u.bumpMap,l.bumpScale.value=u.bumpScale,u.side===W&&(l.bumpScale.value*=-1)),u.normalMap&&(l.normalMap.value=u.normalMap,l.normalScale.value.copy(u.normalScale),u.side===W&&l.normalScale.value.negate()),u.displacementMap&&(l.displacementMap.value=u.displacementMap,l.displacementScale.value=u.displacementScale,l.displacementBias.value=u.displacementBias)}(n,i)):i.isMeshDepthMaterial?(e(n,i),function(l,u){u.displacementMap&&(l.displacementMap.value=u.displacementMap,l.displacementScale.value=u.displacementScale,l.displacementBias.value=u.displacementBias)}(n,i)):i.isMeshDistanceMaterial?(e(n,i),function(l,u){u.displacementMap&&(l.displacementMap.value=u.displacementMap,l.displacementScale.value=u.displacementScale,l.displacementBias.value=u.displacementBias),l.referencePosition.value.copy(u.referencePosition),l.nearDistance.value=u.nearDistance,l.farDistance.value=u.farDistance}(n,i)):i.isMeshNormalMaterial?(e(n,i),function(l,u){u.bumpMap&&(l.bumpMap.value=u.bumpMap,l.bumpScale.value=u.bumpScale,u.side===W&&(l.bumpScale.value*=-1)),u.normalMap&&(l.normalMap.value=u.normalMap,l.normalScale.value.copy(u.normalScale),u.side===W&&l.normalScale.value.negate()),u.displacementMap&&(l.displacementMap.value=u.displacementMap,l.displacementScale.value=u.displacementScale,l.displacementBias.value=u.displacementBias)}(n,i)):i.isLineBasicMaterial?(function(l,u){l.diffuse.value.copy(u.color),l.opacity.value=u.opacity}(n,i),i.isLineDashedMaterial&&function(l,u){l.dashSize.value=u.dashSize,l.totalSize.value=u.dashSize+u.gapSize,l.scale.value=u.scale}(n,i)):i.isPointsMaterial?function(l,u,c,d){l.diffuse.value.copy(u.color),l.opacity.value=u.opacity,l.size.value=u.size*c,l.scale.value=.5*d,u.map&&(l.map.value=u.map),u.alphaMap&&(l.alphaMap.value=u.alphaMap);let f;u.map?f=u.map:u.alphaMap&&(f=u.alphaMap),f!==void 0&&(f.matrixAutoUpdate===!0&&f.updateMatrix(),l.uvTransform.value.copy(f.matrix))}(n,i,o,s):i.isSpriteMaterial?function(l,u){l.diffuse.value.copy(u.color),l.opacity.value=u.opacity,l.rotation.value=u.rotation,u.map&&(l.map.value=u.map),u.alphaMap&&(l.alphaMap.value=u.alphaMap);let c;u.map?c=u.map:u.alphaMap&&(c=u.alphaMap),c!==void 0&&(c.matrixAutoUpdate===!0&&c.updateMatrix(),l.uvTransform.value.copy(c.matrix))}(n,i):i.isShadowMaterial?(n.color.value.copy(i.color),n.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function fn(r={}){const e=r.canvas!==void 0?r.canvas:function(){const ue=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return ue.style.display="block",ue}(),t=r.context!==void 0?r.context:null,n=r.alpha!==void 0&&r.alpha,i=r.depth===void 0||r.depth,o=r.stencil===void 0||r.stencil,s=r.antialias!==void 0&&r.antialias,a=r.premultipliedAlpha===void 0||r.premultipliedAlpha,l=r.preserveDrawingBuffer!==void 0&&r.preserveDrawingBuffer,u=r.powerPreference!==void 0?r.powerPreference:"default",c=r.failIfMajorPerformanceCaveat!==void 0&&r.failIfMajorPerformanceCaveat;let d=null,f=null;const m=[],g=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=wt,this.physicallyCorrectLights=!1,this.toneMapping=co,this.toneMappingExposure=1;const _=this;let y=!1,w=0,M=0,R=null,F=-1,C=null;const U=new pn,N=new pn;let G=null,he=e.width,ne=e.height,Z=1,Q=null,$=null;const se=new pn(0,0,he,ne),me=new pn(0,0,he,ne);let ge=!1;const de=[],fe=new Ba;let Re=!1,ke=!1,Be=null;const J=new pt,te=new T,Ae={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Ne(){return R===null?Z:1}let Te,Ge,Ye,ve,Y,pe,ye,xe,De,ht,xt,_t,Gt,Wt,ai,Cn,ko,Sp,Ep,Mp,pr,Ir,it=t;function ZT(ue,Ve){for(let Le=0;Le<ue.length;Le++){const We=ue[Le],ot=e.getContext(We,Ve);if(ot!==null)return ot}return null}try{const ue={alpha:n,depth:i,stencil:o,antialias:s,premultipliedAlpha:a,preserveDrawingBuffer:l,powerPreference:u,failIfMajorPerformanceCaveat:c};if(e.addEventListener("webglcontextlost",$T,!1),e.addEventListener("webglcontextrestored",KT,!1),it===null){const Ve=["webgl2","webgl","experimental-webgl"];if(_.isWebGL1Renderer===!0&&Ve.shift(),it=ZT(Ve,ue),it===null)throw ZT(Ve)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}it.getShaderPrecisionFormat===void 0&&(it.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(ue){throw console.error("THREE.WebGLRenderer: "+ue.message),ue}function JT(){Te=new jg(it),Ge=new yf(it,Te,r),Te.init(Ge),pr=new Yf(it,Te,Ge),Ye=new Eh(it,Te,Ge),de[0]=1029,ve=new Bl(it),Y=new Th,pe=new vv(it,Te,Ye,Y,Ge,pr,ve),ye=new bf(_),xe=new zg(it,Ge),Ir=new Fl(it,Te,xe,Ge),De=new ad(it,xe,ve,Ir),ht=new gh(it,De,xe,ve),Sp=new Sf(it),ai=new xf(Y),xt=new zf(_,ye,Te,Ge,Ir,ai),_t=new yv(Y),Gt=new gv(Y),Wt=new Xf(Te,Ge),ko=new Vg(_,ye,Ye,ht,a),Cn=new xd(_,ht,Ge),Ep=new _f(it,Te,ve,Ge),Mp=new wf(it,Te,ve,Ge),ve.programs=xt.programs,_.capabilities=Ge,_.extensions=Te,_.properties=Y,_.renderLists=Gt,_.shadowMap=Cn,_.state=Ye,_.info=ve}JT();const jr=new _v(_,it);function $T(ue){ue.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),y=!0}function KT(){console.log("THREE.WebGLRenderer: Context Restored."),y=!1;const ue=ve.autoReset,Ve=Cn.enabled,Le=Cn.autoUpdate,We=Cn.needsUpdate,ot=Cn.type;JT(),ve.autoReset=ue,Cn.enabled=Ve,Cn.autoUpdate=Le,Cn.needsUpdate=We,Cn.type=ot}function QT(ue){const Ve=ue.target;Ve.removeEventListener("dispose",QT),function(Le){(function(We){const ot=Y.get(We).programs;ot!==void 0&&ot.forEach(function(hn){xt.releaseProgram(hn)})})(Le),Y.remove(Le)}(Ve)}this.xr=jr,this.getContext=function(){return it},this.getContextAttributes=function(){return it.getContextAttributes()},this.forceContextLoss=function(){const ue=Te.get("WEBGL_lose_context");ue&&ue.loseContext()},this.forceContextRestore=function(){const ue=Te.get("WEBGL_lose_context");ue&&ue.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(ue){ue!==void 0&&(Z=ue,this.setSize(he,ne,!1))},this.getSize=function(ue){return ue.set(he,ne)},this.setSize=function(ue,Ve,Le){jr.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(he=ue,ne=Ve,e.width=Math.floor(ue*Z),e.height=Math.floor(Ve*Z),Le!==!1&&(e.style.width=ue+"px",e.style.height=Ve+"px"),this.setViewport(0,0,ue,Ve))},this.getDrawingBufferSize=function(ue){return ue.set(he*Z,ne*Z).floor()},this.setDrawingBufferSize=function(ue,Ve,Le){he=ue,ne=Ve,Z=Le,e.width=Math.floor(ue*Le),e.height=Math.floor(Ve*Le),this.setViewport(0,0,ue,Ve)},this.getCurrentViewport=function(ue){return ue.copy(U)},this.getViewport=function(ue){return ue.copy(se)},this.setViewport=function(ue,Ve,Le,We){ue.isVector4?se.set(ue.x,ue.y,ue.z,ue.w):se.set(ue,Ve,Le,We),Ye.viewport(U.copy(se).multiplyScalar(Z).floor())},this.getScissor=function(ue){return ue.copy(me)},this.setScissor=function(ue,Ve,Le,We){ue.isVector4?me.set(ue.x,ue.y,ue.z,ue.w):me.set(ue,Ve,Le,We),Ye.scissor(N.copy(me).multiplyScalar(Z).floor())},this.getScissorTest=function(){return ge},this.setScissorTest=function(ue){Ye.setScissorTest(ge=ue)},this.setOpaqueSort=function(ue){Q=ue},this.setTransparentSort=function(ue){$=ue},this.getClearColor=function(ue){return ue.copy(ko.getClearColor())},this.setClearColor=function(){ko.setClearColor.apply(ko,arguments)},this.getClearAlpha=function(){return ko.getClearAlpha()},this.setClearAlpha=function(){ko.setClearAlpha.apply(ko,arguments)},this.clear=function(ue,Ve,Le){let We=0;(ue===void 0||ue)&&(We|=16384),(Ve===void 0||Ve)&&(We|=256),(Le===void 0||Le)&&(We|=1024),it.clear(We)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){e.removeEventListener("webglcontextlost",$T,!1),e.removeEventListener("webglcontextrestored",KT,!1),Gt.dispose(),Wt.dispose(),Y.dispose(),ye.dispose(),ht.dispose(),Ir.dispose(),jr.dispose(),jr.removeEventListener("sessionstart",eS),jr.removeEventListener("sessionend",tS),Be&&(Be.dispose(),Be=null),Cu.stop()},this.renderBufferImmediate=function(ue,Ve){Ir.initAttributes();const Le=Y.get(ue);ue.hasPositions&&!Le.position&&(Le.position=it.createBuffer()),ue.hasNormals&&!Le.normal&&(Le.normal=it.createBuffer()),ue.hasUvs&&!Le.uv&&(Le.uv=it.createBuffer()),ue.hasColors&&!Le.color&&(Le.color=it.createBuffer());const We=Ve.getAttributes();ue.hasPositions&&(it.bindBuffer(34962,Le.position),it.bufferData(34962,ue.positionArray,35048),Ir.enableAttribute(We.position),it.vertexAttribPointer(We.position,3,5126,!1,0,0)),ue.hasNormals&&(it.bindBuffer(34962,Le.normal),it.bufferData(34962,ue.normalArray,35048),Ir.enableAttribute(We.normal),it.vertexAttribPointer(We.normal,3,5126,!1,0,0)),ue.hasUvs&&(it.bindBuffer(34962,Le.uv),it.bufferData(34962,ue.uvArray,35048),Ir.enableAttribute(We.uv),it.vertexAttribPointer(We.uv,2,5126,!1,0,0)),ue.hasColors&&(it.bindBuffer(34962,Le.color),it.bufferData(34962,ue.colorArray,35048),Ir.enableAttribute(We.color),it.vertexAttribPointer(We.color,3,5126,!1,0,0)),Ir.disableUnusedAttributes(),it.drawArrays(4,0,ue.count),ue.count=0},this.renderBufferDirect=function(ue,Ve,Le,We,ot,hn){Ve===null&&(Ve=Ae);const zt=ot.isMesh&&ot.matrixWorld.determinant()<0,ut=rS(ue,Ve,We,ot);Ye.setMaterial(We,zt);let Kt=Le.index;const Rt=Le.attributes.position;if(Kt===null){if(Rt===void 0||Rt.count===0)return}else if(Kt.count===0)return;let sn,kt=1;We.wireframe===!0&&(Kt=De.getWireframeAttribute(Le),kt=2),(We.morphTargets||We.morphNormals)&&Sp.update(ot,Le,We,ut),Ir.setup(ot,We,ut,Le,Kt);let rn=Ep;Kt!==null&&(sn=xe.get(Kt),rn=Mp,rn.setIndex(sn));const bi=Kt!==null?Kt.count:Rt.count,On=Le.drawRange.start*kt,Go=Le.drawRange.count*kt,Rn=hn!==null?hn.start*kt:0,Ss=hn!==null?hn.count*kt:1/0,Pi=Math.max(On,Rn),Wr=Math.min(bi,On+Go,Rn+Ss)-1,er=Math.max(0,Wr-Pi+1);if(er!==0){if(ot.isMesh)We.wireframe===!0?(Ye.setLineWidth(We.wireframeLinewidth*Ne()),rn.setMode(1)):rn.setMode(4);else if(ot.isLine){let Ap=We.linewidth;Ap===void 0&&(Ap=1),Ye.setLineWidth(Ap*Ne()),ot.isLineSegments?rn.setMode(1):ot.isLineLoop?rn.setMode(2):rn.setMode(3)}else ot.isPoints?rn.setMode(0):ot.isSprite&&rn.setMode(4);if(ot.isInstancedMesh)rn.renderInstances(Pi,er,ot.count);else if(Le.isInstancedBufferGeometry){const Ap=Math.min(Le.instanceCount,Le._maxInstanceCount);rn.renderInstances(Pi,er,Ap)}else rn.render(Pi,er)}},this.compile=function(ue,Ve){f=Wt.get(ue),f.init(),ue.traverseVisible(function(Le){Le.isLight&&Le.layers.test(Ve.layers)&&(f.pushLight(Le),Le.castShadow&&f.pushShadow(Le))}),f.setupLights(),ue.traverse(function(Le){const We=Le.material;if(We)if(Array.isArray(We))for(let ot=0;ot<We.length;ot++)ey(We[ot],ue,Le);else ey(We,ue,Le)})};let Q_=null;function eS(){Cu.stop()}function tS(){Cu.start()}const Cu=new sd;function bg(ue,Ve,Le){const We=Ve.isScene===!0?Ve.overrideMaterial:null;for(let ot=0,hn=ue.length;ot<hn;ot++){const zt=ue[ot],ut=zt.object,Kt=zt.geometry,Rt=We===null?zt.material:We,sn=zt.group;if(Le.isArrayCamera){const kt=Le.cameras;for(let rn=0,bi=kt.length;rn<bi;rn++){const On=kt[rn];ut.layers.test(On.layers)&&(Ye.viewport(U.copy(On.viewport)),f.setupLightsView(On),nS(ut,Ve,On,Kt,Rt,sn))}}else nS(ut,Ve,Le,Kt,Rt,sn)}}function nS(ue,Ve,Le,We,ot,hn){if(ue.onBeforeRender(_,Ve,Le,We,ot,hn),ue.modelViewMatrix.multiplyMatrices(Le.matrixWorldInverse,ue.matrixWorld),ue.normalMatrix.getNormalMatrix(ue.modelViewMatrix),ue.isImmediateRenderObject){const zt=rS(Le,Ve,ot,ue);Ye.setMaterial(ot),Ir.reset(),function(ut,Kt){ut.render(function(Rt){_.renderBufferImmediate(Rt,Kt)})}(ue,zt)}else ot.transparent===!0&&ot.side===ee?(ot.side=W,ot.needsUpdate=!0,_.renderBufferDirect(Le,Ve,We,ot,ue,hn),ot.side=z,ot.needsUpdate=!0,_.renderBufferDirect(Le,Ve,We,ot,ue,hn),ot.side=ee):_.renderBufferDirect(Le,Ve,We,ot,ue,hn);ue.onAfterRender(_,Ve,Le,We,ot,hn)}function ey(ue,Ve,Le){Ve.isScene!==!0&&(Ve=Ae);const We=Y.get(ue),ot=f.state.lights,hn=f.state.shadowsArray,zt=ot.state.version,ut=xt.getParameters(ue,ot.state,hn,Ve,Le),Kt=xt.getProgramCacheKey(ut);let Rt=We.programs;We.environment=ue.isMeshStandardMaterial?Ve.environment:null,We.fog=Ve.fog,We.envMap=ye.get(ue.envMap||We.environment),Rt===void 0&&(ue.addEventListener("dispose",QT),Rt=new Map,We.programs=Rt);let sn=Rt.get(Kt);if(sn!==void 0){if(We.currentProgram===sn&&We.lightsStateVersion===zt)return iS(ue,ut),sn}else ut.uniforms=xt.getUniforms(ue),ue.onBuild(ut,_),ue.onBeforeCompile(ut,_),sn=xt.acquireProgram(ut,Kt),Rt.set(Kt,sn),We.uniforms=ut.uniforms;const kt=We.uniforms;(ue.isShaderMaterial||ue.isRawShaderMaterial)&&ue.clipping!==!0||(kt.clippingPlanes=ai.uniform),iS(ue,ut),We.needsLights=function(On){return On.isMeshLambertMaterial||On.isMeshToonMaterial||On.isMeshPhongMaterial||On.isMeshStandardMaterial||On.isShadowMaterial||On.isShaderMaterial&&On.lights===!0}(ue),We.lightsStateVersion=zt,We.needsLights&&(kt.ambientLightColor.value=ot.state.ambient,kt.lightProbe.value=ot.state.probe,kt.directionalLights.value=ot.state.directional,kt.directionalLightShadows.value=ot.state.directionalShadow,kt.spotLights.value=ot.state.spot,kt.spotLightShadows.value=ot.state.spotShadow,kt.rectAreaLights.value=ot.state.rectArea,kt.ltc_1.value=ot.state.rectAreaLTC1,kt.ltc_2.value=ot.state.rectAreaLTC2,kt.pointLights.value=ot.state.point,kt.pointLightShadows.value=ot.state.pointShadow,kt.hemisphereLights.value=ot.state.hemi,kt.directionalShadowMap.value=ot.state.directionalShadowMap,kt.directionalShadowMatrix.value=ot.state.directionalShadowMatrix,kt.spotShadowMap.value=ot.state.spotShadowMap,kt.spotShadowMatrix.value=ot.state.spotShadowMatrix,kt.pointShadowMap.value=ot.state.pointShadowMap,kt.pointShadowMatrix.value=ot.state.pointShadowMatrix);const rn=sn.getUniforms(),bi=is.seqWithValue(rn.seq,kt);return We.currentProgram=sn,We.uniformsList=bi,sn}function iS(ue,Ve){const Le=Y.get(ue);Le.outputEncoding=Ve.outputEncoding,Le.instancing=Ve.instancing,Le.skinning=Ve.skinning,Le.numClippingPlanes=Ve.numClippingPlanes,Le.numIntersection=Ve.numClipIntersection,Le.vertexAlphas=Ve.vertexAlphas}function rS(ue,Ve,Le,We){Ve.isScene!==!0&&(Ve=Ae),pe.resetTextureUnits();const ot=Ve.fog,hn=Le.isMeshStandardMaterial?Ve.environment:null,zt=R===null?_.outputEncoding:R.texture.encoding,ut=ye.get(Le.envMap||hn),Kt=Le.vertexColors===!0&&We.geometry&&We.geometry.attributes.color&&We.geometry.attributes.color.itemSize===4,Rt=Y.get(Le),sn=f.state.lights;if(Re===!0&&(ke===!0||ue!==C)){const er=ue===C&&Le.id===F;ai.setState(Le,ue,er)}let kt=!1;Le.version===Rt.__version?Rt.needsLights&&Rt.lightsStateVersion!==sn.state.version||Rt.outputEncoding!==zt||We.isInstancedMesh&&Rt.instancing===!1?kt=!0:We.isInstancedMesh||Rt.instancing!==!0?We.isSkinnedMesh&&Rt.skinning===!1?kt=!0:We.isSkinnedMesh||Rt.skinning!==!0?Rt.envMap!==ut||Le.fog&&Rt.fog!==ot?kt=!0:Rt.numClippingPlanes===void 0||Rt.numClippingPlanes===ai.numPlanes&&Rt.numIntersection===ai.numIntersection?Rt.vertexAlphas!==Kt&&(kt=!0):kt=!0:kt=!0:kt=!0:(kt=!0,Rt.__version=Le.version);let rn=Rt.currentProgram;kt===!0&&(rn=ey(Le,Ve,We));let bi=!1,On=!1,Go=!1;const Rn=rn.getUniforms(),Ss=Rt.uniforms;if(Ye.useProgram(rn.program)&&(bi=!0,On=!0,Go=!0),Le.id!==F&&(F=Le.id,On=!0),bi||C!==ue){if(Rn.setValue(it,"projectionMatrix",ue.projectionMatrix),Ge.logarithmicDepthBuffer&&Rn.setValue(it,"logDepthBufFC",2/(Math.log(ue.far+1)/Math.LN2)),C!==ue&&(C=ue,On=!0,Go=!0),Le.isShaderMaterial||Le.isMeshPhongMaterial||Le.isMeshToonMaterial||Le.isMeshStandardMaterial||Le.envMap){const er=Rn.map.cameraPosition;er!==void 0&&er.setValue(it,te.setFromMatrixPosition(ue.matrixWorld))}(Le.isMeshPhongMaterial||Le.isMeshToonMaterial||Le.isMeshLambertMaterial||Le.isMeshBasicMaterial||Le.isMeshStandardMaterial||Le.isShaderMaterial)&&Rn.setValue(it,"isOrthographic",ue.isOrthographicCamera===!0),(Le.isMeshPhongMaterial||Le.isMeshToonMaterial||Le.isMeshLambertMaterial||Le.isMeshBasicMaterial||Le.isMeshStandardMaterial||Le.isShaderMaterial||Le.isShadowMaterial||We.isSkinnedMesh)&&Rn.setValue(it,"viewMatrix",ue.matrixWorldInverse)}if(We.isSkinnedMesh){Rn.setOptional(it,We,"bindMatrix"),Rn.setOptional(it,We,"bindMatrixInverse");const er=We.skeleton;er&&(Ge.floatVertexTextures?(er.boneTexture===null&&er.computeBoneTexture(),Rn.setValue(it,"boneTexture",er.boneTexture,pe),Rn.setValue(it,"boneTextureSize",er.boneTextureSize)):Rn.setOptional(it,er,"boneMatrices"))}var Pi,Wr;return(On||Rt.receiveShadow!==We.receiveShadow)&&(Rt.receiveShadow=We.receiveShadow,Rn.setValue(it,"receiveShadow",We.receiveShadow)),On&&(Rn.setValue(it,"toneMappingExposure",_.toneMappingExposure),Rt.needsLights&&(Wr=Go,(Pi=Ss).ambientLightColor.needsUpdate=Wr,Pi.lightProbe.needsUpdate=Wr,Pi.directionalLights.needsUpdate=Wr,Pi.directionalLightShadows.needsUpdate=Wr,Pi.pointLights.needsUpdate=Wr,Pi.pointLightShadows.needsUpdate=Wr,Pi.spotLights.needsUpdate=Wr,Pi.spotLightShadows.needsUpdate=Wr,Pi.rectAreaLights.needsUpdate=Wr,Pi.hemisphereLights.needsUpdate=Wr),ot&&Le.fog&&_t.refreshFogUniforms(Ss,ot),_t.refreshMaterialUniforms(Ss,Le,Z,ne,Be),is.upload(it,Rt.uniformsList,Ss,pe)),Le.isShaderMaterial&&Le.uniformsNeedUpdate===!0&&(is.upload(it,Rt.uniformsList,Ss,pe),Le.uniformsNeedUpdate=!1),Le.isSpriteMaterial&&Rn.setValue(it,"center",We.center),Rn.setValue(it,"modelViewMatrix",We.modelViewMatrix),Rn.setValue(it,"normalMatrix",We.normalMatrix),Rn.setValue(it,"modelMatrix",We.matrixWorld),rn}Cu.setAnimationLoop(function(ue){Q_&&Q_(ue)}),typeof window!="undefined"&&Cu.setContext(window),this.setAnimationLoop=function(ue){Q_=ue,jr.setAnimationLoop(ue),ue===null?Cu.stop():Cu.start()},jr.addEventListener("sessionstart",eS),jr.addEventListener("sessionend",tS),this.render=function(ue,Ve){if(Ve!==void 0&&Ve.isCamera!==!0)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(y===!0)return;ue.autoUpdate===!0&&ue.updateMatrixWorld(),Ve.parent===null&&Ve.updateMatrixWorld(),jr.enabled===!0&&jr.isPresenting===!0&&(jr.cameraAutoUpdate===!0&&jr.updateCamera(Ve),Ve=jr.getCamera()),ue.isScene===!0&&ue.onBeforeRender(_,ue,Ve,R),f=Wt.get(ue,g.length),f.init(),g.push(f),J.multiplyMatrices(Ve.projectionMatrix,Ve.matrixWorldInverse),fe.setFromProjectionMatrix(J),ke=this.localClippingEnabled,Re=ai.init(this.clippingPlanes,ke,Ve),d=Gt.get(ue,m.length),d.init(),m.push(d),function zt(ut,Kt,Rt,sn){if(ut.visible===!1)return;if(ut.layers.test(Kt.layers)){if(ut.isGroup)Rt=ut.renderOrder;else if(ut.isLOD)ut.autoUpdate===!0&&ut.update(Kt);else if(ut.isLight)f.pushLight(ut),ut.castShadow&&f.pushShadow(ut);else if(ut.isSprite){if(!ut.frustumCulled||fe.intersectsSprite(ut)){sn&&te.setFromMatrixPosition(ut.matrixWorld).applyMatrix4(J);const rn=ht.update(ut),bi=ut.material;bi.visible&&d.push(ut,rn,bi,Rt,te.z,null)}}else if(ut.isImmediateRenderObject)sn&&te.setFromMatrixPosition(ut.matrixWorld).applyMatrix4(J),d.push(ut,null,ut.material,Rt,te.z,null);else if((ut.isMesh||ut.isLine||ut.isPoints)&&(ut.isSkinnedMesh&&ut.skeleton.frame!==ve.render.frame&&(ut.skeleton.update(),ut.skeleton.frame=ve.render.frame),!ut.frustumCulled||fe.intersectsObject(ut))){sn&&te.setFromMatrixPosition(ut.matrixWorld).applyMatrix4(J);const rn=ht.update(ut),bi=ut.material;if(Array.isArray(bi)){const On=rn.groups;for(let Go=0,Rn=On.length;Go<Rn;Go++){const Ss=On[Go],Pi=bi[Ss.materialIndex];Pi&&Pi.visible&&d.push(ut,rn,Pi,Rt,te.z,Ss)}}else bi.visible&&d.push(ut,rn,bi,Rt,te.z,null)}}const kt=ut.children;for(let rn=0,bi=kt.length;rn<bi;rn++)zt(kt[rn],Kt,Rt,sn)}(ue,Ve,0,_.sortObjects),d.finish(),_.sortObjects===!0&&d.sort(Q,$),Re===!0&&ai.beginShadows();const Le=f.state.shadowsArray;Cn.render(Le,ue,Ve),f.setupLights(),f.setupLightsView(Ve),Re===!0&&ai.endShadows(),this.info.autoReset===!0&&this.info.reset(),ko.render(d,ue);const We=d.opaque,ot=d.transmissive,hn=d.transparent;We.length>0&&bg(We,ue,Ve),ot.length>0&&function(zt,ut,Kt,Rt){if(Be===null){const rn=s===!0&&Ge.isWebGL2===!0;Be=new(rn?Fs:Or)(1024,1024,{generateMipmaps:!0,type:pr.convert(Ps)!==null?Ps:Wo,minFilter:Ms,magFilter:Jn,wrapS:gi,wrapT:gi})}const sn=_.getRenderTarget();_.setRenderTarget(Be),_.clear();const kt=_.toneMapping;_.toneMapping=co,bg(zt,Kt,Rt),_.toneMapping=kt,pe.updateMultisampleRenderTarget(Be),pe.updateRenderTargetMipmap(Be),_.setRenderTarget(sn),bg(ut,Kt,Rt)}(We,ot,ue,Ve),hn.length>0&&bg(hn,ue,Ve),R!==null&&(pe.updateMultisampleRenderTarget(R),pe.updateRenderTargetMipmap(R)),ue.isScene===!0&&ue.onAfterRender(_,ue,Ve),Ye.buffers.depth.setTest(!0),Ye.buffers.depth.setMask(!0),Ye.buffers.color.setMask(!0),Ye.setPolygonOffset(!1),Ir.resetDefaultState(),F=-1,C=null,g.pop(),f=g.length>0?g[g.length-1]:null,m.pop(),d=m.length>0?m[m.length-1]:null},this.getActiveCubeFace=function(){return w},this.getActiveMipmapLevel=function(){return M},this.getRenderTarget=function(){return R},this.setRenderTarget=function(ue,Ve=0,Le=0){R=ue,w=Ve,M=Le,ue&&Y.get(ue).__webglFramebuffer===void 0&&pe.setupRenderTarget(ue);let We=null,ot=!1,hn=!1;if(ue){const zt=ue.texture;(zt.isDataTexture3D||zt.isDataTexture2DArray)&&(hn=!0);const ut=Y.get(ue).__webglFramebuffer;ue.isWebGLCubeRenderTarget?(We=ut[Ve],ot=!0):We=ue.isWebGLMultisampleRenderTarget?Y.get(ue).__webglMultisampledFramebuffer:ut,U.copy(ue.viewport),N.copy(ue.scissor),G=ue.scissorTest}else U.copy(se).multiplyScalar(Z).floor(),N.copy(me).multiplyScalar(Z).floor(),G=ge;if(Ye.bindFramebuffer(36160,We)&&Ge.drawBuffers){let zt=!1;if(ue)if(ue.isWebGLMultipleRenderTargets){const ut=ue.texture;if(de.length!==ut.length||de[0]!==36064){for(let Kt=0,Rt=ut.length;Kt<Rt;Kt++)de[Kt]=36064+Kt;de.length=ut.length,zt=!0}}else de.length===1&&de[0]===36064||(de[0]=36064,de.length=1,zt=!0);else de.length===1&&de[0]===1029||(de[0]=1029,de.length=1,zt=!0);zt&&(Ge.isWebGL2?it.drawBuffers(de):Te.get("WEBGL_draw_buffers").drawBuffersWEBGL(de))}if(Ye.viewport(U),Ye.scissor(N),Ye.setScissorTest(G),ot){const zt=Y.get(ue.texture);it.framebufferTexture2D(36160,36064,34069+Ve,zt.__webglTexture,Le)}else if(hn){const zt=Y.get(ue.texture),ut=Ve||0;it.framebufferTextureLayer(36160,36064,zt.__webglTexture,Le||0,ut)}},this.readRenderTargetPixels=function(ue,Ve,Le,We,ot,hn,zt){if(!ue||!ue.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let ut=Y.get(ue).__webglFramebuffer;if(ue.isWebGLCubeRenderTarget&&zt!==void 0&&(ut=ut[zt]),ut){Ye.bindFramebuffer(36160,ut);try{const Kt=ue.texture,Rt=Kt.format,sn=Kt.type;if(Rt!==tr&&pr.convert(Rt)!==it.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const kt=sn===Ps&&(Te.has("EXT_color_buffer_half_float")||Ge.isWebGL2&&Te.has("EXT_color_buffer_float"));if(!(sn===Wo||pr.convert(sn)===it.getParameter(35738)||sn===po&&(Ge.isWebGL2||Te.has("OES_texture_float")||Te.has("WEBGL_color_buffer_float"))||kt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");it.checkFramebufferStatus(36160)===36053?Ve>=0&&Ve<=ue.width-We&&Le>=0&&Le<=ue.height-ot&&it.readPixels(Ve,Le,We,ot,pr.convert(Rt),pr.convert(sn),hn):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const Kt=R!==null?Y.get(R).__webglFramebuffer:null;Ye.bindFramebuffer(36160,Kt)}}},this.copyFramebufferToTexture=function(ue,Ve,Le=0){const We=Math.pow(2,-Le),ot=Math.floor(Ve.image.width*We),hn=Math.floor(Ve.image.height*We);let zt=pr.convert(Ve.format);Ge.isWebGL2&&(zt===6407&&(zt=32849),zt===6408&&(zt=32856)),pe.setTexture2D(Ve,0),it.copyTexImage2D(3553,Le,zt,ue.x,ue.y,ot,hn,0),Ye.unbindTexture()},this.copyTextureToTexture=function(ue,Ve,Le,We=0){const ot=Ve.image.width,hn=Ve.image.height,zt=pr.convert(Le.format),ut=pr.convert(Le.type);pe.setTexture2D(Le,0),it.pixelStorei(37440,Le.flipY),it.pixelStorei(37441,Le.premultiplyAlpha),it.pixelStorei(3317,Le.unpackAlignment),Ve.isDataTexture?it.texSubImage2D(3553,We,ue.x,ue.y,ot,hn,zt,ut,Ve.image.data):Ve.isCompressedTexture?it.compressedTexSubImage2D(3553,We,ue.x,ue.y,Ve.mipmaps[0].width,Ve.mipmaps[0].height,zt,Ve.mipmaps[0].data):it.texSubImage2D(3553,We,ue.x,ue.y,zt,ut,Ve.image),We===0&&Le.generateMipmaps&&it.generateMipmap(3553),Ye.unbindTexture()},this.copyTextureToTexture3D=function(ue,Ve,Le,We,ot=0){if(_.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const hn=ue.max.x-ue.min.x+1,zt=ue.max.y-ue.min.y+1,ut=ue.max.z-ue.min.z+1,Kt=pr.convert(We.format),Rt=pr.convert(We.type);let sn;if(We.isDataTexture3D)pe.setTexture3D(We,0),sn=32879;else{if(!We.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");pe.setTexture2DArray(We,0),sn=35866}it.pixelStorei(37440,We.flipY),it.pixelStorei(37441,We.premultiplyAlpha),it.pixelStorei(3317,We.unpackAlignment);const kt=it.getParameter(3314),rn=it.getParameter(32878),bi=it.getParameter(3316),On=it.getParameter(3315),Go=it.getParameter(32877),Rn=Le.isCompressedTexture?Le.mipmaps[0]:Le.image;it.pixelStorei(3314,Rn.width),it.pixelStorei(32878,Rn.height),it.pixelStorei(3316,ue.min.x),it.pixelStorei(3315,ue.min.y),it.pixelStorei(32877,ue.min.z),Le.isDataTexture||Le.isDataTexture3D?it.texSubImage3D(sn,ot,Ve.x,Ve.y,Ve.z,hn,zt,ut,Kt,Rt,Rn.data):Le.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),it.compressedTexSubImage3D(sn,ot,Ve.x,Ve.y,Ve.z,hn,zt,ut,Kt,Rn.data)):it.texSubImage3D(sn,ot,Ve.x,Ve.y,Ve.z,hn,zt,ut,Kt,Rt,Rn),it.pixelStorei(3314,kt),it.pixelStorei(32878,rn),it.pixelStorei(3316,bi),it.pixelStorei(3315,On),it.pixelStorei(32877,Go),ot===0&&We.generateMipmaps&&it.generateMipmap(sn),Ye.unbindTexture()},this.initTexture=function(ue){pe.setTexture2D(ue,0),Ye.unbindTexture()},this.resetState=function(){w=0,M=0,R=null,Ye.reset(),Ir.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}class di extends fn{}di.prototype.isWebGL1Renderer=!0;class yi{constructor(e,t=25e-5){this.name="",this.color=new gt(e),this.density=t}clone(){return new yi(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}yi.prototype.isFogExp2=!0;class Hl{constructor(e,t=1,n=1e3){this.name="",this.color=new gt(e),this.near=t,this.far=n}clone(){return new Hl(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}Hl.prototype.isFog=!0;class Ga extends Xt{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),t}}Ga.prototype.isScene=!0;class $s{constructor(e,t){this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Os,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=rr()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,o=this.stride;i<o;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=rr()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=rr()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}$s.prototype.isInterleavedBuffer=!0;const ti=new T;class Po{constructor(e,t,n,i=!1){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i===!0}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)ti.x=this.getX(t),ti.y=this.getY(t),ti.z=this.getZ(t),ti.applyMatrix4(e),this.setXYZ(t,ti.x,ti.y,ti.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)ti.x=this.getX(t),ti.y=this.getY(t),ti.z=this.getZ(t),ti.applyNormalMatrix(e),this.setXYZ(t,ti.x,ti.y,ti.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)ti.x=this.getX(t),ti.y=this.getY(t),ti.z=this.getZ(t),ti.transformDirection(e),this.setXYZ(t,ti.x,ti.y,ti.z);return this}setX(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){return this.data.array[e*this.data.stride+this.offset]}getY(e){return this.data.array[e*this.data.stride+this.offset+1]}getZ(e){return this.data.array[e*this.data.stride+this.offset+2]}getW(e){return this.data.array[e*this.data.stride+this.offset+3]}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,o){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=o,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[i+o])}return new Zt(new this.array.constructor(t),this.itemSize,this.normalized)}return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new Po(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[i+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}Po.prototype.isInterleavedBufferAttribute=!0;class zl extends _i{constructor(e){super(),this.type="SpriteMaterial",this.color=new gt(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this}}let Ks;zl.prototype.isSpriteMaterial=!0;const ro=new T,Ha=new T,Qs=new T,ea=new Qe,Vl=new Qe,qf=new pt,Mh=new T,jl=new T,Ah=new T,Zf=new Qe,Wl=new Qe,Td=new Qe;class Xl extends Xt{constructor(e){if(super(),this.type="Sprite",Ks===void 0){Ks=new Mt;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new $s(t,5);Ks.setIndex([0,1,2,0,2,3]),Ks.setAttribute("position",new Po(n,3,0,!1)),Ks.setAttribute("uv",new Po(n,2,3,!1))}this.geometry=Ks,this.material=e!==void 0?e:new zl,this.center=new Qe(.5,.5)}raycast(e,t){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Ha.setFromMatrixScale(this.matrixWorld),qf.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Qs.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&Ha.multiplyScalar(-Qs.z);const n=this.material.rotation;let i,o;n!==0&&(o=Math.cos(n),i=Math.sin(n));const s=this.center;Ph(Mh.set(-.5,-.5,0),Qs,s,Ha,i,o),Ph(jl.set(.5,-.5,0),Qs,s,Ha,i,o),Ph(Ah.set(.5,.5,0),Qs,s,Ha,i,o),Zf.set(0,0),Wl.set(1,0),Td.set(1,1);let a=e.ray.intersectTriangle(Mh,jl,Ah,!1,ro);if(a===null&&(Ph(jl.set(-.5,.5,0),Qs,s,Ha,i,o),Wl.set(0,1),a=e.ray.intersectTriangle(Mh,Ah,jl,!1,ro),a===null))return;const l=e.ray.origin.distanceTo(ro);l<e.near||l>e.far||t.push({distance:l,point:ro.clone(),uv:Mn.getUV(ro,Mh,jl,Ah,Zf,Wl,Td,new Qe),face:null,object:this})}copy(e){return super.copy(e),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Ph(r,e,t,n,i,o){ea.subVectors(r,t).addScalar(.5).multiply(n),i!==void 0?(Vl.x=o*ea.x-i*ea.y,Vl.y=i*ea.x+o*ea.y):Vl.copy(ea),r.copy(e),r.x+=Vl.x,r.y+=Vl.y,r.applyMatrix4(qf)}Xl.prototype.isSprite=!0;const za=new T,Jf=new T;class $f extends Xt{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,i=t.length;n<i;n++){const o=t[n];this.addLevel(o.object.clone(),o.distance)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0){t=Math.abs(t);const n=this.levels;let i;for(i=0;i<n.length&&!(t<n[i].distance);i++);return n.splice(i,0,{distance:t,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,i;for(n=1,i=t.length;n<i&&!(e<t[n].distance);n++);return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){za.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(za);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){za.setFromMatrixPosition(e.matrixWorld),Jf.setFromMatrixPosition(this.matrixWorld);const n=za.distanceTo(Jf)/e.zoom;let i,o;for(t[0].object.visible=!0,i=1,o=t.length;i<o&&n>=t[i].distance;i++)t[i-1].object.visible=!1,t[i].object.visible=!0;for(this._currentLevel=i-1;i<o;i++)t[i].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let i=0,o=n.length;i<o;i++){const s=n[i];t.object.levels.push({object:s.object.uuid,distance:s.distance})}return t}}const zi=new T,Ch=new pn,Kf=new pn,xv=new T,Rh=new pt;class Va extends ln{constructor(e,t){super(e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new pt,this.bindMatrixInverse=new pt}copy(e){return super.copy(e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new pn,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);const o=1/e.manhattanLength();o!==1/0?e.multiplyScalar(o):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode==="attached"?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode==="detached"?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(e,t){const n=this.skeleton,i=this.geometry;Ch.fromBufferAttribute(i.attributes.skinIndex,e),Kf.fromBufferAttribute(i.attributes.skinWeight,e),zi.fromBufferAttribute(i.attributes.position,e).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let o=0;o<4;o++){const s=Kf.getComponent(o);if(s!==0){const a=Ch.getComponent(o);Rh.multiplyMatrices(n.bones[a].matrixWorld,n.boneInverses[a]),t.addScaledVector(xv.copy(zi).applyMatrix4(Rh),s)}}return t.applyMatrix4(this.bindMatrixInverse)}}Va.prototype.isSkinnedMesh=!0;class Ih extends Xt{constructor(){super(),this.type="Bone"}}Ih.prototype.isBone=!0;class os extends Kn{constructor(e=null,t=1,n=1,i,o,s,a,l,u=Jn,c=Jn,d,f){super(null,s,a,l,u,c,i,o,d,f),this.image={data:e,width:t,height:n},this.magFilter=u,this.minFilter=c,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}os.prototype.isDataTexture=!0;const Qf=new pt,em=new pt;class Lh{constructor(e=[],t=[]){this.uuid=rr(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),t.length===0)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new pt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new pt;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let o=0,s=e.length;o<s;o++){const a=e[o]?e[o].matrixWorld:em;Qf.multiplyMatrices(a,t[o]),Qf.toArray(n,16*o)}i!==null&&(i.needsUpdate=!0)}clone(){return new Lh(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=wa(e),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new os(t,e,e,tr,po);return this.boneMatrices=t,this.boneTexture=n,this.boneTextureSize=e,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const i=this.bones[t];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){const o=e.bones[n];let s=t[o];s===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",o),s=new Ih),this.bones.push(s),this.boneInverses.push(new pt().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let i=0,o=t.length;i<o;i++){const s=t[i];e.bones.push(s.uuid);const a=n[i];e.boneInverses.push(a.toArray())}return e}}const tm=new pt,Oh=new pt,ja=[],Yl=new ln;class Sd extends ln{constructor(e,t,n){super(e,t),this.instanceMatrix=new Zt(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(e){return super.copy(e),this.instanceMatrix.copy(e.instanceMatrix),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,i=this.count;if(Yl.geometry=this.geometry,Yl.material=this.material,Yl.material!==void 0)for(let o=0;o<i;o++){this.getMatrixAt(o,tm),Oh.multiplyMatrices(n,tm),Yl.matrixWorld=Oh,Yl.raycast(e,ja);for(let s=0,a=ja.length;s<a;s++){const l=ja[s];l.instanceId=o,l.object=this,t.push(l)}ja.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new Zt(new Float32Array(3*this.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}Sd.prototype.isInstancedMesh=!0;class xi extends _i{constructor(e){super(),this.type="LineBasicMaterial",this.color=new gt(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.morphTargets=e.morphTargets,this}}xi.prototype.isLineBasicMaterial=!0;const nm=new T,Dh=new T,im=new pt,Ed=new To,Nh=new ui;class h extends Xt{constructor(e=new Mt,t=new xi){super(),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(e.index===null){const t=e.attributes.position,n=[0];for(let i=1,o=t.count;i<o;i++)nm.fromBufferAttribute(t,i-1),Dh.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=nm.distanceTo(Dh);e.setAttribute("lineDistance",new st(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,o=e.params.Line.threshold,s=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Nh.copy(n.boundingSphere),Nh.applyMatrix4(i),Nh.radius+=o,e.ray.intersectsSphere(Nh)===!1)return;im.copy(i).invert(),Ed.copy(e.ray).applyMatrix4(im);const a=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,u=new T,c=new T,d=new T,f=new T,m=this.isLineSegments?2:1;if(n.isBufferGeometry){const g=n.index,_=n.attributes.position;if(g!==null)for(let y=Math.max(0,s.start),w=Math.min(g.count,s.start+s.count)-1;y<w;y+=m){const M=g.getX(y),R=g.getX(y+1);if(u.fromBufferAttribute(_,M),c.fromBufferAttribute(_,R),Ed.distanceSqToSegment(u,c,f,d)>l)continue;f.applyMatrix4(this.matrixWorld);const F=e.ray.origin.distanceTo(f);F<e.near||F>e.far||t.push({distance:F,point:d.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}else for(let y=Math.max(0,s.start),w=Math.min(_.count,s.start+s.count)-1;y<w;y+=m){if(u.fromBufferAttribute(_,y),c.fromBufferAttribute(_,y+1),Ed.distanceSqToSegment(u,c,f,d)>l)continue;f.applyMatrix4(this.matrixWorld);const M=e.ray.origin.distanceTo(f);M<e.near||M>e.far||t.push({distance:M,point:d.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o<s;o++){const a=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}else{const t=e.morphTargets;t!==void 0&&t.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}h.prototype.isLine=!0;const p=new T,x=new T;class E extends h{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(e.index===null){const t=e.attributes.position,n=[];for(let i=0,o=t.count;i<o;i+=2)p.fromBufferAttribute(t,i),x.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+p.distanceTo(x);e.setAttribute("lineDistance",new st(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}E.prototype.isLineSegments=!0;class P extends h{constructor(e,t){super(e,t),this.type="LineLoop"}}P.prototype.isLineLoop=!0;class V extends _i{constructor(e){super(),this.type="PointsMaterial",this.color=new gt(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this}}V.prototype.isPointsMaterial=!0;const re=new pt,ce=new To,_e=new ui,He=new T;class ze extends Xt{constructor(e=new Mt,t=new V){super(),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,o=e.params.Points.threshold,s=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),_e.copy(n.boundingSphere),_e.applyMatrix4(i),_e.radius+=o,e.ray.intersectsSphere(_e)===!1)return;re.copy(i).invert(),ce.copy(e.ray).applyMatrix4(re);const a=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a;if(n.isBufferGeometry){const u=n.index,c=n.attributes.position;if(u!==null)for(let d=Math.max(0,s.start),f=Math.min(u.count,s.start+s.count);d<f;d++){const m=u.getX(d);He.fromBufferAttribute(c,m),tt(He,m,l,i,e,t,this)}else for(let d=Math.max(0,s.start),f=Math.min(c.count,s.start+s.count);d<f;d++)He.fromBufferAttribute(c,d),tt(He,d,l,i,e,t,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o<s;o++){const a=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}else{const t=e.morphTargets;t!==void 0&&t.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function tt(r,e,t,n,i,o,s){const a=ce.distanceSqToPoint(r);if(a<t){const l=new T;ce.closestPointToPoint(r,l),l.applyMatrix4(n);const u=i.ray.origin.distanceTo(l);if(u<i.near||u>i.far)return;o.push({distance:u,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:s})}}ze.prototype.isPoints=!0;class vt extends Kn{constructor(e,t,n,i,o,s,a,l,u){super(e,t,n,i,o,s,a,l,u),this.format=a!==void 0?a:fo,this.minFilter=s!==void 0?s:$n,this.magFilter=o!==void 0?o:$n,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(function d(){c.needsUpdate=!0,e.requestVideoFrameCallback(d)})}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!("requestVideoFrameCallback"in e)&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}vt.prototype.isVideoTexture=!0;class yt extends Kn{constructor(e,t,n,i,o,s,a,l,u,c,d,f){super(null,s,a,l,u,c,i,o,d,f),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}yt.prototype.isCompressedTexture=!0;class Ct extends Kn{constructor(e,t,n,i,o,s,a,l,u){super(e,t,n,i,o,s,a,l,u),this.needsUpdate=!0}}Ct.prototype.isCanvasTexture=!0;class Je extends Kn{constructor(e,t,n,i,o,s,a,l,u,c){if((c=c!==void 0?c:Nn)!==Nn&&c!==Cs)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&c===Nn&&(n=gl),n===void 0&&c===Cs&&(n=dn),super(null,i,o,s,a,l,c,n,u),this.image={width:e,height:t},this.magFilter=a!==void 0?a:Jn,this.minFilter=l!==void 0?l:Jn,this.flipY=!1,this.generateMipmaps=!1}}Je.prototype.isDepthTexture=!0;class nt extends Mt{constructor(e=1,t=8,n=0,i=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:i},t=Math.max(3,t);const o=[],s=[],a=[],l=[],u=new T,c=new Qe;s.push(0,0,0),a.push(0,0,1),l.push(.5,.5);for(let d=0,f=3;d<=t;d++,f+=3){const m=n+d/t*i;u.x=e*Math.cos(m),u.y=e*Math.sin(m),s.push(u.x,u.y,u.z),a.push(0,0,1),c.x=(s[f]/e+1)/2,c.y=(s[f+1]/e+1)/2,l.push(c.x,c.y)}for(let d=1;d<=t;d++)o.push(d,d+1,0);this.setIndex(o),this.setAttribute("position",new st(s,3)),this.setAttribute("normal",new st(a,3)),this.setAttribute("uv",new st(l,2))}static fromJSON(e){return new nt(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Et extends Mt{constructor(e=1,t=1,n=1,i=8,o=1,s=!1,a=0,l=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:i,heightSegments:o,openEnded:s,thetaStart:a,thetaLength:l};const u=this;i=Math.floor(i),o=Math.floor(o);const c=[],d=[],f=[],m=[];let g=0;const _=[],y=n/2;let w=0;function M(R){const F=g,C=new Qe,U=new T;let N=0;const G=R===!0?e:t,he=R===!0?1:-1;for(let Z=1;Z<=i;Z++)d.push(0,y*he,0),f.push(0,he,0),m.push(.5,.5),g++;const ne=g;for(let Z=0;Z<=i;Z++){const Q=Z/i*l+a,$=Math.cos(Q),se=Math.sin(Q);U.x=G*se,U.y=y*he,U.z=G*$,d.push(U.x,U.y,U.z),f.push(0,he,0),C.x=.5*$+.5,C.y=.5*se*he+.5,m.push(C.x,C.y),g++}for(let Z=0;Z<i;Z++){const Q=F+Z,$=ne+Z;R===!0?c.push($,$+1,Q):c.push($+1,$,Q),N+=3}u.addGroup(w,N,R===!0?1:2),w+=N}(function(){const R=new T,F=new T;let C=0;const U=(t-e)/n;for(let N=0;N<=o;N++){const G=[],he=N/o,ne=he*(t-e)+e;for(let Z=0;Z<=i;Z++){const Q=Z/i,$=Q*l+a,se=Math.sin($),me=Math.cos($);F.x=ne*se,F.y=-he*n+y,F.z=ne*me,d.push(F.x,F.y,F.z),R.set(se,U,me).normalize(),f.push(R.x,R.y,R.z),m.push(Q,1-he),G.push(g++)}_.push(G)}for(let N=0;N<i;N++)for(let G=0;G<o;G++){const he=_[G][N],ne=_[G+1][N],Z=_[G+1][N+1],Q=_[G][N+1];c.push(he,ne,Q),c.push(ne,Z,Q),C+=6}u.addGroup(w,C,0),w+=C})(),s===!1&&(e>0&&M(!0),t>0&&M(!1)),this.setIndex(c),this.setAttribute("position",new st(d,3)),this.setAttribute("normal",new st(f,3)),this.setAttribute("uv",new st(m,2))}static fromJSON(e){return new Et(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class mt extends Et{constructor(e=1,t=1,n=8,i=1,o=!1,s=0,a=2*Math.PI){super(0,e,t,n,i,o,s,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:i,openEnded:o,thetaStart:s,thetaLength:a}}static fromJSON(e){return new mt(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class St extends Mt{constructor(e,t,n=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:i};const o=[],s=[];function a(f,m,g,_){const y=_+1,w=[];for(let M=0;M<=y;M++){w[M]=[];const R=f.clone().lerp(g,M/y),F=m.clone().lerp(g,M/y),C=y-M;for(let U=0;U<=C;U++)w[M][U]=U===0&&M===y?R:R.clone().lerp(F,U/C)}for(let M=0;M<y;M++)for(let R=0;R<2*(y-M)-1;R++){const F=Math.floor(R/2);R%2==0?(l(w[M][F+1]),l(w[M+1][F]),l(w[M][F])):(l(w[M][F+1]),l(w[M+1][F+1]),l(w[M+1][F]))}}function l(f){o.push(f.x,f.y,f.z)}function u(f,m){const g=3*f;m.x=e[g+0],m.y=e[g+1],m.z=e[g+2]}function c(f,m,g,_){_<0&&f.x===1&&(s[m]=f.x-1),g.x===0&&g.z===0&&(s[m]=_/2/Math.PI+.5)}function d(f){return Math.atan2(f.z,-f.x)}(function(f){const m=new T,g=new T,_=new T;for(let y=0;y<t.length;y+=3)u(t[y+0],m),u(t[y+1],g),u(t[y+2],_),a(m,g,_,f)})(i),function(f){const m=new T;for(let g=0;g<o.length;g+=3)m.x=o[g+0],m.y=o[g+1],m.z=o[g+2],m.normalize().multiplyScalar(f),o[g+0]=m.x,o[g+1]=m.y,o[g+2]=m.z}(n),function(){const f=new T;for(let g=0;g<o.length;g+=3){f.x=o[g+0],f.y=o[g+1],f.z=o[g+2];const _=d(f)/2/Math.PI+.5,y=(m=f,Math.atan2(-m.y,Math.sqrt(m.x*m.x+m.z*m.z))/Math.PI+.5);s.push(_,1-y)}var m;(function(){const g=new T,_=new T,y=new T,w=new T,M=new Qe,R=new Qe,F=new Qe;for(let C=0,U=0;C<o.length;C+=9,U+=6){g.set(o[C+0],o[C+1],o[C+2]),_.set(o[C+3],o[C+4],o[C+5]),y.set(o[C+6],o[C+7],o[C+8]),M.set(s[U+0],s[U+1]),R.set(s[U+2],s[U+3]),F.set(s[U+4],s[U+5]),w.copy(g).add(_).add(y).divideScalar(3);const N=d(w);c(M,U+0,g,N),c(R,U+2,_,N),c(F,U+4,y,N)}})(),function(){for(let g=0;g<s.length;g+=6){const _=s[g+0],y=s[g+2],w=s[g+4],M=Math.max(_,y,w),R=Math.min(_,y,w);M>.9&&R<.1&&(_<.2&&(s[g+0]+=1),y<.2&&(s[g+2]+=1),w<.2&&(s[g+4]+=1))}}()}(),this.setAttribute("position",new st(o,3)),this.setAttribute("normal",new st(o.slice(),3)),this.setAttribute("uv",new st(s,2)),i===0?this.computeVertexNormals():this.normalizeNormals()}static fromJSON(e){return new St(e.vertices,e.indices,e.radius,e.details)}}class It extends St{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,i=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new It(e.radius,e.detail)}}const jt=new T,Tt=new T,Ot=new T,Xn=new Mn;class Mi extends Mt{constructor(e,t){if(super(),this.type="EdgesGeometry",this.parameters={thresholdAngle:t},t=t!==void 0?t:1,e.isGeometry===!0)return void console.error("THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");const n=Math.pow(10,4),i=Math.cos(Sn*t),o=e.getIndex(),s=e.getAttribute("position"),a=o?o.count:s.count,l=[0,0,0],u=["a","b","c"],c=new Array(3),d={},f=[];for(let m=0;m<a;m+=3){o?(l[0]=o.getX(m),l[1]=o.getX(m+1),l[2]=o.getX(m+2)):(l[0]=m,l[1]=m+1,l[2]=m+2);const{a:g,b:_,c:y}=Xn;if(g.fromBufferAttribute(s,l[0]),_.fromBufferAttribute(s,l[1]),y.fromBufferAttribute(s,l[2]),Xn.getNormal(Ot),c[0]=`${Math.round(g.x*n)},${Math.round(g.y*n)},${Math.round(g.z*n)}`,c[1]=`${Math.round(_.x*n)},${Math.round(_.y*n)},${Math.round(_.z*n)}`,c[2]=`${Math.round(y.x*n)},${Math.round(y.y*n)},${Math.round(y.z*n)}`,c[0]!==c[1]&&c[1]!==c[2]&&c[2]!==c[0])for(let w=0;w<3;w++){const M=(w+1)%3,R=c[w],F=c[M],C=Xn[u[w]],U=Xn[u[M]],N=`${R}_${F}`,G=`${F}_${R}`;G in d&&d[G]?(Ot.dot(d[G].normal)<=i&&(f.push(C.x,C.y,C.z),f.push(U.x,U.y,U.z)),d[G]=null):N in d||(d[N]={index0:l[w],index1:l[M],normal:Ot.clone()})}}for(const m in d)if(d[m]){const{index0:g,index1:_}=d[m];jt.fromBufferAttribute(s,g),Tt.fromBufferAttribute(s,_),f.push(jt.x,jt.y,jt.z),f.push(Tt.x,Tt.y,Tt.z)}this.setAttribute("position",new st(f,3))}}class Yn{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,i=this.getPoint(0),o=0;t.push(0);for(let s=1;s<=e;s++)n=this.getPoint(s/e),o+=n.distanceTo(i),t.push(o),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let i=0;const o=n.length;let s;s=t||e*n[o-1];let a,l=0,u=o-1;for(;l<=u;)if(i=Math.floor(l+(u-l)/2),a=n[i]-s,a<0)l=i+1;else{if(!(a>0)){u=i;break}u=i-1}if(i=u,n[i]===s)return i/(o-1);const c=n[i];return(i+(s-c)/(n[i+1]-c))/(o-1)}getTangent(e,t){let n=e-1e-4,i=e+1e-4;n<0&&(n=0),i>1&&(i=1);const o=this.getPoint(n),s=this.getPoint(i),a=t||(o.isVector2?new Qe:new T);return a.copy(s).sub(o).normalize(),a}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new T,i=[],o=[],s=[],a=new T,l=new pt;for(let m=0;m<=e;m++){const g=m/e;i[m]=this.getTangentAt(g,new T),i[m].normalize()}o[0]=new T,s[0]=new T;let u=Number.MAX_VALUE;const c=Math.abs(i[0].x),d=Math.abs(i[0].y),f=Math.abs(i[0].z);c<=u&&(u=c,n.set(1,0,0)),d<=u&&(u=d,n.set(0,1,0)),f<=u&&n.set(0,0,1),a.crossVectors(i[0],n).normalize(),o[0].crossVectors(i[0],a),s[0].crossVectors(i[0],o[0]);for(let m=1;m<=e;m++){if(o[m]=o[m-1].clone(),s[m]=s[m-1].clone(),a.crossVectors(i[m-1],i[m]),a.length()>Number.EPSILON){a.normalize();const g=Math.acos(Si(i[m-1].dot(i[m]),-1,1));o[m].applyMatrix4(l.makeRotationAxis(a,g))}s[m].crossVectors(i[m],o[m])}if(t===!0){let m=Math.acos(Si(o[0].dot(o[e]),-1,1));m/=e,i[0].dot(a.crossVectors(o[0],o[e]))>0&&(m=-m);for(let g=1;g<=e;g++)o[g].applyMatrix4(l.makeRotationAxis(i[g],m*g)),s[g].crossVectors(i[g],o[g])}return{tangents:i,normals:o,binormals:s}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class kn extends Yn{constructor(e=0,t=0,n=1,i=1,o=0,s=2*Math.PI,a=!1,l=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=l}getPoint(e,t){const n=t||new Qe,i=2*Math.PI;let o=this.aEndAngle-this.aStartAngle;const s=Math.abs(o)<Number.EPSILON;for(;o<0;)o+=i;for(;o>i;)o-=i;o<Number.EPSILON&&(o=s?0:i),this.aClockwise!==!0||s||(o===i?o=-i:o-=i);const a=this.aStartAngle+e*o;let l=this.aX+this.xRadius*Math.cos(a),u=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const c=Math.cos(this.aRotation),d=Math.sin(this.aRotation),f=l-this.aX,m=u-this.aY;l=f*c-m*d+this.aX,u=f*d+m*c+this.aY}return n.set(l,u)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}kn.prototype.isEllipseCurve=!0;class Hr extends kn{constructor(e,t,n,i,o,s){super(e,t,n,n,i,o,s),this.type="ArcCurve"}}function oo(){let r=0,e=0,t=0,n=0;function i(o,s,a,l){r=o,e=a,t=-3*o+3*s-2*a-l,n=2*o-2*s+a+l}return{initCatmullRom:function(o,s,a,l,u){i(s,a,u*(a-o),u*(l-s))},initNonuniformCatmullRom:function(o,s,a,l,u,c,d){let f=(s-o)/u-(a-o)/(u+c)+(a-s)/c,m=(a-s)/c-(l-s)/(c+d)+(l-a)/d;f*=c,m*=c,i(s,a,f,m)},calc:function(o){const s=o*o;return r+e*o+t*s+n*(s*o)}}}Hr.prototype.isArcCurve=!0;const ss=new T,Wa=new oo,as=new oo,so=new oo;class Fh extends Yn{constructor(e=[],t=!1,n="centripetal",i=.5){super(),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=i}getPoint(e,t=new T){const n=t,i=this.points,o=i.length,s=(o-(this.closed?0:1))*e;let a,l,u=Math.floor(s),c=s-u;this.closed?u+=u>0?0:(Math.floor(Math.abs(u)/o)+1)*o:c===0&&u===o-1&&(u=o-2,c=1),this.closed||u>0?a=i[(u-1)%o]:(ss.subVectors(i[0],i[1]).add(i[0]),a=ss);const d=i[u%o],f=i[(u+1)%o];if(this.closed||u+2<o?l=i[(u+2)%o]:(ss.subVectors(i[o-1],i[o-2]).add(i[o-1]),l=ss),this.curveType==="centripetal"||this.curveType==="chordal"){const m=this.curveType==="chordal"?.5:.25;let g=Math.pow(a.distanceToSquared(d),m),_=Math.pow(d.distanceToSquared(f),m),y=Math.pow(f.distanceToSquared(l),m);_<1e-4&&(_=1),g<1e-4&&(g=_),y<1e-4&&(y=_),Wa.initNonuniformCatmullRom(a.x,d.x,f.x,l.x,g,_,y),as.initNonuniformCatmullRom(a.y,d.y,f.y,l.y,g,_,y),so.initNonuniformCatmullRom(a.z,d.z,f.z,l.z,g,_,y)}else this.curveType==="catmullrom"&&(Wa.initCatmullRom(a.x,d.x,f.x,l.x,this.tension),as.initCatmullRom(a.y,d.y,f.y,l.y,this.tension),so.initCatmullRom(a.z,d.z,f.z,l.z,this.tension));return n.set(Wa.calc(c),as.calc(c),so.calc(c)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new T().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function Md(r,e,t,n,i){const o=.5*(n-e),s=.5*(i-t),a=r*r;return(2*t-2*n+o+s)*(r*a)+(-3*t+3*n-2*o-s)*a+o*r+t}function ls(r,e,t,n){return function(i,o){const s=1-i;return s*s*o}(r,e)+function(i,o){return 2*(1-i)*i*o}(r,t)+function(i,o){return i*i*o}(r,n)}function ta(r,e,t,n,i){return function(o,s){const a=1-o;return a*a*a*s}(r,e)+function(o,s){const a=1-o;return 3*a*a*o*s}(r,t)+function(o,s){return 3*(1-o)*o*o*s}(r,n)+function(o,s){return o*o*o*s}(r,i)}Fh.prototype.isCatmullRomCurve3=!0;class na extends Yn{constructor(e=new Qe,t=new Qe,n=new Qe,i=new Qe){super(),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new Qe){const n=t,i=this.v0,o=this.v1,s=this.v2,a=this.v3;return n.set(ta(e,i.x,o.x,s.x,a.x),ta(e,i.y,o.y,s.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}na.prototype.isCubicBezierCurve=!0;class Xa extends Yn{constructor(e=new T,t=new T,n=new T,i=new T){super(),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new T){const n=t,i=this.v0,o=this.v1,s=this.v2,a=this.v3;return n.set(ta(e,i.x,o.x,s.x,a.x),ta(e,i.y,o.y,s.y,a.y),ta(e,i.z,o.z,s.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}Xa.prototype.isCubicBezierCurve3=!0;class Ya extends Yn{constructor(e=new Qe,t=new Qe){super(),this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Qe){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new Qe;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Ya.prototype.isLineCurve=!0;class ql extends Yn{constructor(e=new T,t=new T){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=e,this.v2=t}getPoint(e,t=new T){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class ia extends Yn{constructor(e=new Qe,t=new Qe,n=new Qe){super(),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Qe){const n=t,i=this.v0,o=this.v1,s=this.v2;return n.set(ls(e,i.x,o.x,s.x),ls(e,i.y,o.y,s.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}ia.prototype.isQuadraticBezierCurve=!0;class bv extends Yn{constructor(e=new T,t=new T,n=new T){super(),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new T){const n=t,i=this.v0,o=this.v1,s=this.v2;return n.set(ls(e,i.x,o.x,s.x),ls(e,i.y,o.y,s.y),ls(e,i.z,o.z,s.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}bv.prototype.isQuadraticBezierCurve3=!0;class rm extends Yn{constructor(e=[]){super(),this.type="SplineCurve",this.points=e}getPoint(e,t=new Qe){const n=t,i=this.points,o=(i.length-1)*e,s=Math.floor(o),a=o-s,l=i[s===0?s:s-1],u=i[s],c=i[s>i.length-2?i.length-1:s+1],d=i[s>i.length-3?i.length-1:s+2];return n.set(Md(a,l.x,u.x,c.x,d.x),Md(a,l.y,u.y,c.y,d.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new Qe().fromArray(i))}return this}}rm.prototype.isSplineCurve=!0;var wv=Object.freeze({__proto__:null,ArcCurve:Hr,CatmullRomCurve3:Fh,CubicBezierCurve:na,CubicBezierCurve3:Xa,EllipseCurve:kn,LineCurve:Ya,LineCurve3:ql,QuadraticBezierCurve:ia,QuadraticBezierCurve3:bv,SplineCurve:rm});const PE=function(r,e,t=2){const n=e&&e.length,i=n?e[0]*t:r.length;let o=Iy(r,0,i,t,!0);const s=[];if(!o||o.next===o.prev)return s;let a,l,u,c,d,f,m;if(n&&(o=function(g,_,y,w){const M=[];let R,F,C,U,N;for(R=0,F=_.length;R<F;R++)C=_[R]*w,U=R<F-1?_[R+1]*w:g.length,N=Iy(g,C,U,w,!1),N===N.next&&(N.steiner=!0),M.push(FE(N));for(M.sort(OE),R=0;R<M.length;R++)DE(M[R],y),y=qa(y,y.next);return y}(r,e,o,t)),r.length>80*t){a=u=r[0],l=c=r[1];for(let g=t;g<i;g+=t)d=r[g],f=r[g+1],d<a&&(a=d),f<l&&(l=f),d>u&&(u=d),f>c&&(c=f);m=Math.max(u-a,c-l),m=m!==0?1/m:0}return Ad(o,s,t,a,l,m),s};function Iy(r,e,t,n,i){let o,s;if(i===function(a,l,u,c){let d=0;for(let f=l,m=u-c;f<u;f+=c)d+=(a[m]-a[f])*(a[f+1]+a[m+1]),m=f;return d}(r,e,t,n)>0)for(o=e;o<t;o+=n)s=Dy(o,r[o],r[o+1],s);else for(o=t-n;o>=e;o-=n)s=Dy(o,r[o],r[o+1],s);return s&&om(s,s.next)&&(Cd(s),s=s.next),s}function qa(r,e){if(!r)return r;e||(e=r);let t,n=r;do if(t=!1,n.steiner||!om(n,n.next)&&ni(n.prev,n,n.next)!==0)n=n.next;else{if(Cd(n),n=e=n.prev,n===n.next)break;t=!0}while(t||n!==e);return e}function Ad(r,e,t,n,i,o,s){if(!r)return;!s&&o&&function(c,d,f,m){let g=c;do g.z===null&&(g.z=Tv(g.x,g.y,d,f,m)),g.prevZ=g.prev,g.nextZ=g.next,g=g.next;while(g!==c);g.prevZ.nextZ=null,g.prevZ=null,function(_){let y,w,M,R,F,C,U,N,G=1;do{for(w=_,_=null,F=null,C=0;w;){for(C++,M=w,U=0,y=0;y<G&&(U++,M=M.nextZ,M);y++);for(N=G;U>0||N>0&&M;)U!==0&&(N===0||!M||w.z<=M.z)?(R=w,w=w.nextZ,U--):(R=M,M=M.nextZ,N--),F?F.nextZ=R:_=R,R.prevZ=F,F=R;w=M}F.nextZ=null,G*=2}while(C>1)}(g)}(r,n,i,o);let a,l,u=r;for(;r.prev!==r.next;)if(a=r.prev,l=r.next,o?RE(r,n,i,o):CE(r))e.push(a.i/t),e.push(r.i/t),e.push(l.i/t),Cd(r),r=l.next,u=l.next;else if((r=l)===u){s?s===1?Ad(r=IE(qa(r),e,t),e,t,n,i,o,2):s===2&&LE(r,e,t,n,i,o):Ad(qa(r),e,t,n,i,o,1);break}}function CE(r){const e=r.prev,t=r,n=r.next;if(ni(e,t,n)>=0)return!1;let i=r.next.next;for(;i!==r.prev;){if(Bh(e.x,e.y,t.x,t.y,n.x,n.y,i.x,i.y)&&ni(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function RE(r,e,t,n){const i=r.prev,o=r,s=r.next;if(ni(i,o,s)>=0)return!1;const a=i.x<o.x?i.x<s.x?i.x:s.x:o.x<s.x?o.x:s.x,l=i.y<o.y?i.y<s.y?i.y:s.y:o.y<s.y?o.y:s.y,u=i.x>o.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,c=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,d=Tv(a,l,e,t,n),f=Tv(u,c,e,t,n);let m=r.prevZ,g=r.nextZ;for(;m&&m.z>=d&&g&&g.z<=f;){if(m!==r.prev&&m!==r.next&&Bh(i.x,i.y,o.x,o.y,s.x,s.y,m.x,m.y)&&ni(m.prev,m,m.next)>=0||(m=m.prevZ,g!==r.prev&&g!==r.next&&Bh(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&ni(g.prev,g,g.next)>=0))return!1;g=g.nextZ}for(;m&&m.z>=d;){if(m!==r.prev&&m!==r.next&&Bh(i.x,i.y,o.x,o.y,s.x,s.y,m.x,m.y)&&ni(m.prev,m,m.next)>=0)return!1;m=m.prevZ}for(;g&&g.z<=f;){if(g!==r.prev&&g!==r.next&&Bh(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&ni(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function IE(r,e,t){let n=r;do{const i=n.prev,o=n.next.next;!om(i,o)&&Ly(i,n,n.next,o)&&Pd(i,o)&&Pd(o,i)&&(e.push(i.i/t),e.push(n.i/t),e.push(o.i/t),Cd(n),Cd(n.next),n=r=o),n=n.next}while(n!==r);return qa(n)}function LE(r,e,t,n,i,o){let s=r;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&BE(s,a)){let l=Oy(s,a);return s=qa(s,s.next),l=qa(l,l.next),Ad(s,e,t,n,i,o),void Ad(l,e,t,n,i,o)}a=a.next}s=s.next}while(s!==r)}function OE(r,e){return r.x-e.x}function DE(r,e){if(e=function(t,n){let i=n;const o=t.x,s=t.y;let a,l=-1/0;do{if(s<=i.y&&s>=i.next.y&&i.next.y!==i.y){const g=i.x+(s-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(g<=o&&g>l){if(l=g,g===o){if(s===i.y)return i;if(s===i.next.y)return i.next}a=i.x<i.next.x?i:i.next}}i=i.next}while(i!==n);if(!a)return null;if(o===l)return a;const u=a,c=a.x,d=a.y;let f,m=1/0;i=a;do o>=i.x&&i.x>=c&&o!==i.x&&Bh(s<d?o:l,s,c,d,s<d?l:o,s,i.x,i.y)&&(f=Math.abs(s-i.y)/(o-i.x),Pd(i,t)&&(f<m||f===m&&(i.x>a.x||i.x===a.x&&NE(a,i)))&&(a=i,m=f)),i=i.next;while(i!==u);return a}(r,e)){const t=Oy(e,r);qa(e,e.next),qa(t,t.next)}}function NE(r,e){return ni(r.prev,r,e.prev)<0&&ni(e.next,r,r.next)<0}function Tv(r,e,t,n,i){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=32767*(r-t)*i)|r<<8))|r<<4))|r<<2))|r<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function FE(r){let e=r,t=r;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==r);return t}function Bh(r,e,t,n,i,o,s,a){return(i-s)*(e-a)-(r-s)*(o-a)>=0&&(r-s)*(n-a)-(t-s)*(e-a)>=0&&(t-s)*(o-a)-(i-s)*(n-a)>=0}function BE(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!function(t,n){let i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==n.i&&i.next.i!==n.i&&Ly(i,i.next,t,n))return!0;i=i.next}while(i!==t);return!1}(r,e)&&(Pd(r,e)&&Pd(e,r)&&function(t,n){let i=t,o=!1;const s=(t.x+n.x)/2,a=(t.y+n.y)/2;do i.y>a!=i.next.y>a&&i.next.y!==i.y&&s<(i.next.x-i.x)*(a-i.y)/(i.next.y-i.y)+i.x&&(o=!o),i=i.next;while(i!==t);return o}(r,e)&&(ni(r.prev,r,e.prev)||ni(r,e.prev,e))||om(r,e)&&ni(r.prev,r,r.next)>0&&ni(e.prev,e,e.next)>0)}function ni(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function om(r,e){return r.x===e.x&&r.y===e.y}function Ly(r,e,t,n){const i=am(ni(r,e,t)),o=am(ni(r,e,n)),s=am(ni(t,n,r)),a=am(ni(t,n,e));return i!==o&&s!==a||!(i!==0||!sm(r,t,e))||!(o!==0||!sm(r,n,e))||!(s!==0||!sm(t,r,n))||!(a!==0||!sm(t,e,n))}function sm(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function am(r){return r>0?1:r<0?-1:0}function Pd(r,e){return ni(r.prev,r,r.next)<0?ni(r,e,r.next)>=0&&ni(r,r.prev,e)>=0:ni(r,e,r.prev)<0||ni(r,r.next,e)<0}function Oy(r,e){const t=new Sv(r.i,r.x,r.y),n=new Sv(e.i,e.x,e.y),i=r.next,o=e.prev;return r.next=e,e.prev=r,t.next=i,i.prev=t,n.next=t,t.prev=n,o.next=n,n.prev=o,n}function Dy(r,e,t,n){const i=new Sv(r,e,t);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Cd(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Sv(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class us{static area(e){const t=e.length;let n=0;for(let i=t-1,o=0;o<t;i=o++)n+=e[i].x*e[o].y-e[o].x*e[i].y;return .5*n}static isClockWise(e){return us.area(e)<0}static triangulateShape(e,t){const n=[],i=[],o=[];Ny(e),Fy(n,e);let s=e.length;t.forEach(Ny);for(let l=0;l<t.length;l++)i.push(s),s+=t[l].length,Fy(n,t[l]);const a=PE(n,i);for(let l=0;l<a.length;l+=3)o.push(a.slice(l,l+3));return o}}function Ny(r){const e=r.length;e>2&&r[e-1].equals(r[0])&&r.pop()}function Fy(r,e){for(let t=0;t<e.length;t++)r.push(e[t].x),r.push(e[t].y)}class Co extends Mt{constructor(e,t){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,i=[],o=[];for(let a=0,l=e.length;a<l;a++)s(e[a]);function s(a){const l=[],u=t.curveSegments!==void 0?t.curveSegments:12,c=t.steps!==void 0?t.steps:1;let d=t.depth!==void 0?t.depth:100,f=t.bevelEnabled===void 0||t.bevelEnabled,m=t.bevelThickness!==void 0?t.bevelThickness:6,g=t.bevelSize!==void 0?t.bevelSize:m-2,_=t.bevelOffset!==void 0?t.bevelOffset:0,y=t.bevelSegments!==void 0?t.bevelSegments:3;const w=t.extrudePath,M=t.UVGenerator!==void 0?t.UVGenerator:UE;t.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),d=t.amount);let R,F,C,U,N,G=!1;w&&(R=w.getSpacedPoints(c),G=!0,f=!1,F=w.computeFrenetFrames(c,!1),C=new T,U=new T,N=new T),f||(y=0,m=0,g=0,_=0);const he=a.extractPoints(u);let ne=he.shape;const Z=he.holes;if(!us.isClockWise(ne)){ne=ne.reverse();for(let ve=0,Y=Z.length;ve<Y;ve++){const pe=Z[ve];us.isClockWise(pe)&&(Z[ve]=pe.reverse())}}const Q=us.triangulateShape(ne,Z),$=ne;for(let ve=0,Y=Z.length;ve<Y;ve++){const pe=Z[ve];ne=ne.concat(pe)}function se(ve,Y,pe){return Y||console.error("THREE.ExtrudeGeometry: vec does not exist"),Y.clone().multiplyScalar(pe).add(ve)}const me=ne.length,ge=Q.length;function de(ve,Y,pe){let ye,xe,De;const ht=ve.x-Y.x,xt=ve.y-Y.y,_t=pe.x-ve.x,Gt=pe.y-ve.y,Wt=ht*ht+xt*xt,ai=ht*Gt-xt*_t;if(Math.abs(ai)>Number.EPSILON){const Cn=Math.sqrt(Wt),ko=Math.sqrt(_t*_t+Gt*Gt),Sp=Y.x-xt/Cn,Ep=Y.y+ht/Cn,Mp=((pe.x-Gt/ko-Sp)*Gt-(pe.y+_t/ko-Ep)*_t)/(ht*Gt-xt*_t);ye=Sp+ht*Mp-ve.x,xe=Ep+xt*Mp-ve.y;const pr=ye*ye+xe*xe;if(pr<=2)return new Qe(ye,xe);De=Math.sqrt(pr/2)}else{let Cn=!1;ht>Number.EPSILON?_t>Number.EPSILON&&(Cn=!0):ht<-Number.EPSILON?_t<-Number.EPSILON&&(Cn=!0):Math.sign(xt)===Math.sign(Gt)&&(Cn=!0),Cn?(ye=-xt,xe=ht,De=Math.sqrt(Wt)):(ye=ht,xe=xt,De=Math.sqrt(Wt/2))}return new Qe(ye/De,xe/De)}const fe=[];for(let ve=0,Y=$.length,pe=Y-1,ye=ve+1;ve<Y;ve++,pe++,ye++)pe===Y&&(pe=0),ye===Y&&(ye=0),fe[ve]=de($[ve],$[pe],$[ye]);const Re=[];let ke,Be=fe.concat();for(let ve=0,Y=Z.length;ve<Y;ve++){const pe=Z[ve];ke=[];for(let ye=0,xe=pe.length,De=xe-1,ht=ye+1;ye<xe;ye++,De++,ht++)De===xe&&(De=0),ht===xe&&(ht=0),ke[ye]=de(pe[ye],pe[De],pe[ht]);Re.push(ke),Be=Be.concat(ke)}for(let ve=0;ve<y;ve++){const Y=ve/y,pe=m*Math.cos(Y*Math.PI/2),ye=g*Math.sin(Y*Math.PI/2)+_;for(let xe=0,De=$.length;xe<De;xe++){const ht=se($[xe],fe[xe],ye);Ae(ht.x,ht.y,-pe)}for(let xe=0,De=Z.length;xe<De;xe++){const ht=Z[xe];ke=Re[xe];for(let xt=0,_t=ht.length;xt<_t;xt++){const Gt=se(ht[xt],ke[xt],ye);Ae(Gt.x,Gt.y,-pe)}}}const J=g+_;for(let ve=0;ve<me;ve++){const Y=f?se(ne[ve],Be[ve],J):ne[ve];G?(U.copy(F.normals[0]).multiplyScalar(Y.x),C.copy(F.binormals[0]).multiplyScalar(Y.y),N.copy(R[0]).add(U).add(C),Ae(N.x,N.y,N.z)):Ae(Y.x,Y.y,0)}for(let ve=1;ve<=c;ve++)for(let Y=0;Y<me;Y++){const pe=f?se(ne[Y],Be[Y],J):ne[Y];G?(U.copy(F.normals[ve]).multiplyScalar(pe.x),C.copy(F.binormals[ve]).multiplyScalar(pe.y),N.copy(R[ve]).add(U).add(C),Ae(N.x,N.y,N.z)):Ae(pe.x,pe.y,d/c*ve)}for(let ve=y-1;ve>=0;ve--){const Y=ve/y,pe=m*Math.cos(Y*Math.PI/2),ye=g*Math.sin(Y*Math.PI/2)+_;for(let xe=0,De=$.length;xe<De;xe++){const ht=se($[xe],fe[xe],ye);Ae(ht.x,ht.y,d+pe)}for(let xe=0,De=Z.length;xe<De;xe++){const ht=Z[xe];ke=Re[xe];for(let xt=0,_t=ht.length;xt<_t;xt++){const Gt=se(ht[xt],ke[xt],ye);G?Ae(Gt.x,Gt.y+R[c-1].y,R[c-1].x+pe):Ae(Gt.x,Gt.y,d+pe)}}}function te(ve,Y){let pe=ve.length;for(;--pe>=0;){const ye=pe;let xe=pe-1;xe<0&&(xe=ve.length-1);for(let De=0,ht=c+2*y;De<ht;De++){const xt=me*De,_t=me*(De+1);Te(Y+ye+xt,Y+xe+xt,Y+xe+_t,Y+ye+_t)}}}function Ae(ve,Y,pe){l.push(ve),l.push(Y),l.push(pe)}function Ne(ve,Y,pe){Ge(ve),Ge(Y),Ge(pe);const ye=i.length/3,xe=M.generateTopUV(n,i,ye-3,ye-2,ye-1);Ye(xe[0]),Ye(xe[1]),Ye(xe[2])}function Te(ve,Y,pe,ye){Ge(ve),Ge(Y),Ge(ye),Ge(Y),Ge(pe),Ge(ye);const xe=i.length/3,De=M.generateSideWallUV(n,i,xe-6,xe-3,xe-2,xe-1);Ye(De[0]),Ye(De[1]),Ye(De[3]),Ye(De[1]),Ye(De[2]),Ye(De[3])}function Ge(ve){i.push(l[3*ve+0]),i.push(l[3*ve+1]),i.push(l[3*ve+2])}function Ye(ve){o.push(ve.x),o.push(ve.y)}(function(){const ve=i.length/3;if(f){let Y=0,pe=me*Y;for(let ye=0;ye<ge;ye++){const xe=Q[ye];Ne(xe[2]+pe,xe[1]+pe,xe[0]+pe)}Y=c+2*y,pe=me*Y;for(let ye=0;ye<ge;ye++){const xe=Q[ye];Ne(xe[0]+pe,xe[1]+pe,xe[2]+pe)}}else{for(let Y=0;Y<ge;Y++){const pe=Q[Y];Ne(pe[2],pe[1],pe[0])}for(let Y=0;Y<ge;Y++){const pe=Q[Y];Ne(pe[0]+me*c,pe[1]+me*c,pe[2]+me*c)}}n.addGroup(ve,i.length/3-ve,0)})(),function(){const ve=i.length/3;let Y=0;te($,Y),Y+=$.length;for(let pe=0,ye=Z.length;pe<ye;pe++){const xe=Z[pe];te(xe,Y),Y+=xe.length}n.addGroup(ve,i.length/3-ve,1)}()}this.setAttribute("position",new st(i,3)),this.setAttribute("uv",new st(o,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(t,n,i){if(i.shapes=[],Array.isArray(t))for(let o=0,s=t.length;o<s;o++){const a=t[o];i.shapes.push(a.uuid)}else i.shapes.push(t.uuid);return n.extrudePath!==void 0&&(i.options.extrudePath=n.extrudePath.toJSON()),i}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let o=0,s=e.shapes.length;o<s;o++){const a=t[e.shapes[o]];n.push(a)}const i=e.options.extrudePath;return i!==void 0&&(e.options.extrudePath=new wv[i.type]().fromJSON(i)),new Co(n,e.options)}}const UE={generateTopUV:function(r,e,t,n,i){const o=e[3*t],s=e[3*t+1],a=e[3*n],l=e[3*n+1],u=e[3*i],c=e[3*i+1];return[new Qe(o,s),new Qe(a,l),new Qe(u,c)]},generateSideWallUV:function(r,e,t,n,i,o){const s=e[3*t],a=e[3*t+1],l=e[3*t+2],u=e[3*n],c=e[3*n+1],d=e[3*n+2],f=e[3*i],m=e[3*i+1],g=e[3*i+2],_=e[3*o],y=e[3*o+1],w=e[3*o+2];return Math.abs(a-c)<Math.abs(s-u)?[new Qe(s,1-l),new Qe(u,1-d),new Qe(f,1-g),new Qe(_,1-w)]:[new Qe(a,1-l),new Qe(c,1-d),new Qe(m,1-g),new Qe(y,1-w)]}};class Uh extends St{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Uh(e.radius,e.detail)}}class kh extends Mt{constructor(e,t=12,n=0,i=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:i},t=Math.floor(t),i=Si(i,0,2*Math.PI);const o=[],s=[],a=[],l=1/t,u=new T,c=new Qe;for(let d=0;d<=t;d++){const f=n+d*l*i,m=Math.sin(f),g=Math.cos(f);for(let _=0;_<=e.length-1;_++)u.x=e[_].x*m,u.y=e[_].y,u.z=e[_].x*g,s.push(u.x,u.y,u.z),c.x=d/t,c.y=_/(e.length-1),a.push(c.x,c.y)}for(let d=0;d<t;d++)for(let f=0;f<e.length-1;f++){const m=f+d*e.length,g=m,_=m+e.length,y=m+e.length+1,w=m+1;o.push(g,_,w),o.push(_,y,w)}if(this.setIndex(o),this.setAttribute("position",new st(s,3)),this.setAttribute("uv",new st(a,2)),this.computeVertexNormals(),i===2*Math.PI){const d=this.attributes.normal.array,f=new T,m=new T,g=new T,_=t*e.length*3;for(let y=0,w=0;y<e.length;y++,w+=3)f.x=d[w+0],f.y=d[w+1],f.z=d[w+2],m.x=d[_+w+0],m.y=d[_+w+1],m.z=d[_+w+2],g.addVectors(f,m).normalize(),d[w+0]=d[_+w+0]=g.x,d[w+1]=d[_+w+1]=g.y,d[w+2]=d[_+w+2]=g.z}}static fromJSON(e){return new kh(e.points,e.segments,e.phiStart,e.phiLength)}}class Zl extends St{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Zl(e.radius,e.detail)}}class Rd extends Mt{constructor(e,t,n){super(),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n};const i=[],o=[],s=[],a=[],l=1e-5,u=new T,c=new T,d=new T,f=new T,m=new T;e.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");const g=t+1;for(let _=0;_<=n;_++){const y=_/n;for(let w=0;w<=t;w++){const M=w/t;e(M,y,c),o.push(c.x,c.y,c.z),M-l>=0?(e(M-l,y,d),f.subVectors(c,d)):(e(M+l,y,d),f.subVectors(d,c)),y-l>=0?(e(M,y-l,d),m.subVectors(c,d)):(e(M,y+l,d),m.subVectors(d,c)),u.crossVectors(f,m).normalize(),s.push(u.x,u.y,u.z),a.push(M,y)}}for(let _=0;_<n;_++)for(let y=0;y<t;y++){const w=_*g+y,M=_*g+y+1,R=(_+1)*g+y+1,F=(_+1)*g+y;i.push(w,M,F),i.push(M,R,F)}this.setIndex(i),this.setAttribute("position",new st(o,3)),this.setAttribute("normal",new st(s,3)),this.setAttribute("uv",new st(a,2))}}class Gh extends Mt{constructor(e=.5,t=1,n=8,i=1,o=0,s=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:i,thetaStart:o,thetaLength:s},n=Math.max(3,n);const a=[],l=[],u=[],c=[];let d=e;const f=(t-e)/(i=Math.max(1,i)),m=new T,g=new Qe;for(let _=0;_<=i;_++){for(let y=0;y<=n;y++){const w=o+y/n*s;m.x=d*Math.cos(w),m.y=d*Math.sin(w),l.push(m.x,m.y,m.z),u.push(0,0,1),g.x=(m.x/t+1)/2,g.y=(m.y/t+1)/2,c.push(g.x,g.y)}d+=f}for(let _=0;_<i;_++){const y=_*(n+1);for(let w=0;w<n;w++){const M=w+y,R=M,F=M+n+1,C=M+n+2,U=M+1;a.push(R,F,U),a.push(F,C,U)}}this.setIndex(a),this.setAttribute("position",new st(l,3)),this.setAttribute("normal",new st(u,3)),this.setAttribute("uv",new st(c,2))}static fromJSON(e){return new Gh(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Jl extends Mt{constructor(e,t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],i=[],o=[],s=[];let a=0,l=0;if(Array.isArray(e)===!1)u(e);else for(let c=0;c<e.length;c++)u(e[c]),this.addGroup(a,l,c),a+=l,l=0;function u(c){const d=i.length/3,f=c.extractPoints(t);let m=f.shape;const g=f.holes;us.isClockWise(m)===!1&&(m=m.reverse());for(let y=0,w=g.length;y<w;y++){const M=g[y];us.isClockWise(M)===!0&&(g[y]=M.reverse())}const _=us.triangulateShape(m,g);for(let y=0,w=g.length;y<w;y++){const M=g[y];m=m.concat(M)}for(let y=0,w=m.length;y<w;y++){const M=m[y];i.push(M.x,M.y,0),o.push(0,0,1),s.push(M.x,M.y)}for(let y=0,w=_.length;y<w;y++){const M=_[y],R=M[0]+d,F=M[1]+d,C=M[2]+d;n.push(R,F,C),l+=3}}this.setIndex(n),this.setAttribute("position",new st(i,3)),this.setAttribute("normal",new st(o,3)),this.setAttribute("uv",new st(s,2))}toJSON(){const e=super.toJSON();return function(t,n){if(n.shapes=[],Array.isArray(t))for(let i=0,o=t.length;i<o;i++){const s=t[i];n.shapes.push(s.uuid)}else n.shapes.push(t.uuid);return n}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let i=0,o=e.shapes.length;i<o;i++){const s=t[e.shapes[i]];n.push(s)}return new Jl(n,e.curveSegments)}}class $l extends Mt{constructor(e=1,t=8,n=6,i=0,o=2*Math.PI,s=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:o,thetaStart:s,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const l=Math.min(s+a,Math.PI);let u=0;const c=[],d=new T,f=new T,m=[],g=[],_=[],y=[];for(let w=0;w<=n;w++){const M=[],R=w/n;let F=0;w==0&&s==0?F=.5/t:w==n&&l==Math.PI&&(F=-.5/t);for(let C=0;C<=t;C++){const U=C/t;d.x=-e*Math.cos(i+U*o)*Math.sin(s+R*a),d.y=e*Math.cos(s+R*a),d.z=e*Math.sin(i+U*o)*Math.sin(s+R*a),g.push(d.x,d.y,d.z),f.copy(d).normalize(),_.push(f.x,f.y,f.z),y.push(U+F,1-R),M.push(u++)}c.push(M)}for(let w=0;w<n;w++)for(let M=0;M<t;M++){const R=c[w][M+1],F=c[w][M],C=c[w+1][M],U=c[w+1][M+1];(w!==0||s>0)&&m.push(R,F,U),(w!==n-1||l<Math.PI)&&m.push(F,C,U)}this.setIndex(m),this.setAttribute("position",new st(g,3)),this.setAttribute("normal",new st(_,3)),this.setAttribute("uv",new st(y,2))}static fromJSON(e){return new $l(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class Hh extends St{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Hh(e.radius,e.detail)}}class lm extends Co{constructor(e,t={}){const n=t.font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Mt;const i=n.generateShapes(e,t.size);t.depth=t.height!==void 0?t.height:50,t.bevelThickness===void 0&&(t.bevelThickness=10),t.bevelSize===void 0&&(t.bevelSize=8),t.bevelEnabled===void 0&&(t.bevelEnabled=!1),super(i,t),this.type="TextGeometry"}}class zh extends Mt{constructor(e=1,t=.4,n=8,i=6,o=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:i,arc:o},n=Math.floor(n),i=Math.floor(i);const s=[],a=[],l=[],u=[],c=new T,d=new T,f=new T;for(let m=0;m<=n;m++)for(let g=0;g<=i;g++){const _=g/i*o,y=m/n*Math.PI*2;d.x=(e+t*Math.cos(y))*Math.cos(_),d.y=(e+t*Math.cos(y))*Math.sin(_),d.z=t*Math.sin(y),a.push(d.x,d.y,d.z),c.x=e*Math.cos(_),c.y=e*Math.sin(_),f.subVectors(d,c).normalize(),l.push(f.x,f.y,f.z),u.push(g/i),u.push(m/n)}for(let m=1;m<=n;m++)for(let g=1;g<=i;g++){const _=(i+1)*m+g-1,y=(i+1)*(m-1)+g-1,w=(i+1)*(m-1)+g,M=(i+1)*m+g;s.push(_,y,M),s.push(y,w,M)}this.setIndex(s),this.setAttribute("position",new st(a,3)),this.setAttribute("normal",new st(l,3)),this.setAttribute("uv",new st(u,2))}static fromJSON(e){return new zh(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class Vh extends Mt{constructor(e=1,t=.4,n=64,i=8,o=2,s=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:i,p:o,q:s},n=Math.floor(n),i=Math.floor(i);const a=[],l=[],u=[],c=[],d=new T,f=new T,m=new T,g=new T,_=new T,y=new T,w=new T;for(let R=0;R<=n;++R){const F=R/n*o*Math.PI*2;M(F,o,s,e,m),M(F+.01,o,s,e,g),y.subVectors(g,m),w.addVectors(g,m),_.crossVectors(y,w),w.crossVectors(_,y),_.normalize(),w.normalize();for(let C=0;C<=i;++C){const U=C/i*Math.PI*2,N=-t*Math.cos(U),G=t*Math.sin(U);d.x=m.x+(N*w.x+G*_.x),d.y=m.y+(N*w.y+G*_.y),d.z=m.z+(N*w.z+G*_.z),l.push(d.x,d.y,d.z),f.subVectors(d,m).normalize(),u.push(f.x,f.y,f.z),c.push(R/n),c.push(C/i)}}for(let R=1;R<=n;R++)for(let F=1;F<=i;F++){const C=(i+1)*(R-1)+(F-1),U=(i+1)*R+(F-1),N=(i+1)*R+F,G=(i+1)*(R-1)+F;a.push(C,U,G),a.push(U,N,G)}function M(R,F,C,U,N){const G=Math.cos(R),he=Math.sin(R),ne=C/F*R,Z=Math.cos(ne);N.x=U*(2+Z)*.5*G,N.y=U*(2+Z)*he*.5,N.z=U*Math.sin(ne)*.5}this.setIndex(a),this.setAttribute("position",new st(l,3)),this.setAttribute("normal",new st(u,3)),this.setAttribute("uv",new st(c,2))}static fromJSON(e){return new Vh(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class jh extends Mt{constructor(e,t=64,n=1,i=8,o=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:i,closed:o};const s=e.computeFrenetFrames(t,o);this.tangents=s.tangents,this.normals=s.normals,this.binormals=s.binormals;const a=new T,l=new T,u=new Qe;let c=new T;const d=[],f=[],m=[],g=[];function _(y){c=e.getPointAt(y/t,c);const w=s.normals[y],M=s.binormals[y];for(let R=0;R<=i;R++){const F=R/i*Math.PI*2,C=Math.sin(F),U=-Math.cos(F);l.x=U*w.x+C*M.x,l.y=U*w.y+C*M.y,l.z=U*w.z+C*M.z,l.normalize(),f.push(l.x,l.y,l.z),a.x=c.x+n*l.x,a.y=c.y+n*l.y,a.z=c.z+n*l.z,d.push(a.x,a.y,a.z)}}(function(){for(let y=0;y<t;y++)_(y);_(o===!1?t:0),function(){for(let y=0;y<=t;y++)for(let w=0;w<=i;w++)u.x=y/t,u.y=w/i,m.push(u.x,u.y)}(),function(){for(let y=1;y<=t;y++)for(let w=1;w<=i;w++){const M=(i+1)*(y-1)+(w-1),R=(i+1)*y+(w-1),F=(i+1)*y+w,C=(i+1)*(y-1)+w;g.push(M,R,C),g.push(R,F,C)}}()})(),this.setIndex(g),this.setAttribute("position",new st(d,3)),this.setAttribute("normal",new st(f,3)),this.setAttribute("uv",new st(m,2))}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new jh(new wv[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class Ev extends Mt{constructor(e){if(super(),this.type="WireframeGeometry",e.isGeometry===!0)return void console.error("THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");const t=[],n=[0,0],i={},o=new T;if(e.index!==null){const s=e.attributes.position,a=e.index;let l=e.groups;l.length===0&&(l=[{start:0,count:a.count,materialIndex:0}]);for(let u=0,c=l.length;u<c;++u){const d=l[u],f=d.start;for(let m=f,g=f+d.count;m<g;m+=3)for(let _=0;_<3;_++){const y=a.getX(m+_),w=a.getX(m+(_+1)%3);n[0]=Math.min(y,w),n[1]=Math.max(y,w);const M=n[0]+","+n[1];i[M]===void 0&&(i[M]={index1:n[0],index2:n[1]})}}for(const u in i){const c=i[u];o.fromBufferAttribute(s,c.index1),t.push(o.x,o.y,o.z),o.fromBufferAttribute(s,c.index2),t.push(o.x,o.y,o.z)}}else{const s=e.attributes.position;for(let a=0,l=s.count/3;a<l;a++)for(let u=0;u<3;u++){const c=3*a+u;o.fromBufferAttribute(s,c),t.push(o.x,o.y,o.z);const d=3*a+(u+1)%3;o.fromBufferAttribute(s,d),t.push(o.x,o.y,o.z)}}this.setAttribute("position",new st(t,3))}}var By=Object.freeze({__proto__:null,BoxGeometry:no,BoxBufferGeometry:no,CircleGeometry:nt,CircleBufferGeometry:nt,ConeGeometry:mt,ConeBufferGeometry:mt,CylinderGeometry:Et,CylinderBufferGeometry:Et,DodecahedronGeometry:It,DodecahedronBufferGeometry:It,EdgesGeometry:Mi,ExtrudeGeometry:Co,ExtrudeBufferGeometry:Co,IcosahedronGeometry:Uh,IcosahedronBufferGeometry:Uh,LatheGeometry:kh,LatheBufferGeometry:kh,OctahedronGeometry:Zl,OctahedronBufferGeometry:Zl,ParametricGeometry:Rd,ParametricBufferGeometry:Rd,PlaneGeometry:Li,PlaneBufferGeometry:Li,PolyhedronGeometry:St,PolyhedronBufferGeometry:St,RingGeometry:Gh,RingBufferGeometry:Gh,ShapeGeometry:Jl,ShapeBufferGeometry:Jl,SphereGeometry:$l,SphereBufferGeometry:$l,TetrahedronGeometry:Hh,TetrahedronBufferGeometry:Hh,TextGeometry:lm,TextBufferGeometry:lm,TorusGeometry:zh,TorusBufferGeometry:zh,TorusKnotGeometry:Vh,TorusKnotBufferGeometry:Vh,TubeGeometry:jh,TubeBufferGeometry:jh,WireframeGeometry:Ev});class Mv extends _i{constructor(e){super(),this.type="ShadowMaterial",this.color=new gt(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}}Mv.prototype.isShadowMaterial=!0;class Wh extends Gi{constructor(e){super(e),this.type="RawShaderMaterial"}}Wh.prototype.isRawShaderMaterial=!0;class um extends _i{constructor(e){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mr,this.normalScale=new Qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.vertexTangents=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this.vertexTangents=e.vertexTangents,this}}um.prototype.isMeshStandardMaterial=!0;class Av extends um{constructor(e){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Qe(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(t){this.reflectivity=Si(2.5*(t-1)/(t+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.thickness=.01,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new gt(1,1,1),this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.reflectivity=e.reflectivity,e.sheen?this.sheen=(this.sheen||new gt).copy(e.sheen):this.sheen=null,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this}}Av.prototype.isMeshPhysicalMaterial=!0;class hm extends _i{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new gt(16777215),this.specular=new gt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mr,this.normalScale=new Qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ul,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}hm.prototype.isMeshPhongMaterial=!0;class Pv extends _i{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new gt(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mr,this.normalScale=new Qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this}}Pv.prototype.isMeshToonMaterial=!0;class Cv extends _i{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mr,this.normalScale=new Qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}Cv.prototype.isMeshNormalMaterial=!0;class cm extends _i{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new gt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ul,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this}}cm.prototype.isMeshLambertMaterial=!0;class Rv extends _i{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new gt(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mr,this.normalScale=new Qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}Rv.prototype.isMeshMatcapMaterial=!0;class Iv extends xi{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}Iv.prototype.isLineDashedMaterial=!0;var kE=Object.freeze({__proto__:null,ShadowMaterial:Mv,SpriteMaterial:zl,RawShaderMaterial:Wh,ShaderMaterial:Gi,PointsMaterial:V,MeshPhysicalMaterial:Av,MeshStandardMaterial:um,MeshPhongMaterial:hm,MeshToonMaterial:Pv,MeshNormalMaterial:Cv,MeshLambertMaterial:cm,MeshDepthMaterial:on,MeshDistanceMaterial:Sh,MeshBasicMaterial:Qn,MeshMatcapMaterial:Rv,LineDashedMaterial:Iv,LineBasicMaterial:xi,Material:_i});const Gn={arraySlice:function(r,e,t){return Gn.isTypedArray(r)?new r.constructor(r.subarray(e,t!==void 0?t:r.length)):r.slice(e,t)},convertArray:function(r,e,t){return!r||!t&&r.constructor===e?r:typeof e.BYTES_PER_ELEMENT=="number"?new e(r):Array.prototype.slice.call(r)},isTypedArray:function(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)},getKeyframeOrder:function(r){const e=r.length,t=new Array(e);for(let n=0;n!==e;++n)t[n]=n;return t.sort(function(n,i){return r[n]-r[i]}),t},sortedArray:function(r,e,t){const n=r.length,i=new r.constructor(n);for(let o=0,s=0;s!==n;++o){const a=t[o]*e;for(let l=0;l!==e;++l)i[s++]=r[a+l]}return i},flattenJSON:function(r,e,t,n){let i=1,o=r[0];for(;o!==void 0&&o[n]===void 0;)o=r[i++];if(o===void 0)return;let s=o[n];if(s!==void 0)if(Array.isArray(s))do s=o[n],s!==void 0&&(e.push(o.time),t.push.apply(t,s)),o=r[i++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[n],s!==void 0&&(e.push(o.time),s.toArray(t,t.length)),o=r[i++];while(o!==void 0);else do s=o[n],s!==void 0&&(e.push(o.time),t.push(s)),o=r[i++];while(o!==void 0)},subclip:function(r,e,t,n,i=30){const o=r.clone();o.name=e;const s=[];for(let l=0;l<o.tracks.length;++l){const u=o.tracks[l],c=u.getValueSize(),d=[],f=[];for(let m=0;m<u.times.length;++m){const g=u.times[m]*i;if(!(g<t||g>=n)){d.push(u.times[m]);for(let _=0;_<c;++_)f.push(u.values[m*c+_])}}d.length!==0&&(u.times=Gn.convertArray(d,u.times.constructor),u.values=Gn.convertArray(f,u.values.constructor),s.push(u))}o.tracks=s;let a=1/0;for(let l=0;l<o.tracks.length;++l)a>o.tracks[l].times[0]&&(a=o.tracks[l].times[0]);for(let l=0;l<o.tracks.length;++l)o.tracks[l].shift(-1*a);return o.resetDuration(),o},makeClipAdditive:function(r,e=0,t=r,n=30){n<=0&&(n=30);const i=t.tracks.length,o=e/n;for(let s=0;s<i;++s){const a=t.tracks[s],l=a.ValueTypeName;if(l==="bool"||l==="string")continue;const u=r.tracks.find(function(w){return w.name===a.name&&w.ValueTypeName===l});if(u===void 0)continue;let c=0;const d=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=d/3);let f=0;const m=u.getValueSize();u.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(f=m/3);const g=a.times.length-1;let _;if(o<=a.times[0]){const w=c,M=d-c;_=Gn.arraySlice(a.values,w,M)}else if(o>=a.times[g]){const w=g*d+c,M=w+d-c;_=Gn.arraySlice(a.values,w,M)}else{const w=a.createInterpolant(),M=c,R=d-c;w.evaluate(o),_=Gn.arraySlice(w.resultBuffer,M,R)}l==="quaternion"&&new vi().fromArray(_).normalize().conjugate().toArray(_);const y=u.times.length;for(let w=0;w<y;++w){const M=w*m+f;if(l==="quaternion")vi.multiplyQuaternionsFlat(u.values,M,_,0,u.values,M);else{const R=m-2*f;for(let F=0;F<R;++F)u.values[M+F]-=_[F]}}}return r.blendMode=we,r}};class ra{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,i=t[n],o=t[n-1];e:{t:{let s;n:{i:if(!(e<i)){for(let a=n+2;;){if(i===void 0){if(e<o)break i;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,o)}if(n===a)break;if(o=i,i=t[++n],e<i)break t}s=t.length;break n}if(e>=o)break e;{const a=t[1];e<a&&(n=2,o=a);for(let l=n-2;;){if(o===void 0)return this._cachedIndex=0,this.beforeStart_(0,e,i);if(n===l)break;if(i=o,o=t[--n-1],e>=o)break t}s=n,n=0}}for(;n<s;){const a=n+s>>>1;e<t[a]?s=a:n=a+1}if(i=t[n],o=t[n-1],o===void 0)return this._cachedIndex=0,this.beforeStart_(0,e,i);if(i===void 0)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,o,e)}this._cachedIndex=n,this.intervalChanged_(n,o,i)}return this.interpolate_(n,o,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,o=e*i;for(let s=0;s!==i;++s)t[s]=n[o+s];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}ra.prototype.beforeStart_=ra.prototype.copySampleValue_,ra.prototype.afterEnd_=ra.prototype.copySampleValue_;class Uy extends ra{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:wi,endingEnd:wi}}intervalChanged_(e,t,n){const i=this.parameterPositions;let o=e-2,s=e+1,a=i[o],l=i[s];if(a===void 0)switch(this.getSettings_().endingStart){case Yo:o=e,a=2*t-n;break;case yl:o=i.length-2,a=t+i[o]-i[o+1];break;default:o=e,a=n}if(l===void 0)switch(this.getSettings_().endingEnd){case Yo:s=e,l=2*n-t;break;case yl:s=1,l=n+i[1]-i[0];break;default:s=e-1,l=t}const u=.5*(n-t),c=this.valueSize;this._weightPrev=u/(t-a),this._weightNext=u/(l-n),this._offsetPrev=o*c,this._offsetNext=s*c}interpolate_(e,t,n,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=e*a,u=l-a,c=this._offsetPrev,d=this._offsetNext,f=this._weightPrev,m=this._weightNext,g=(n-t)/(i-t),_=g*g,y=_*g,w=-f*y+2*f*_-f*g,M=(1+f)*y+(-1.5-2*f)*_+(-.5+f)*g+1,R=(-1-m)*y+(1.5+m)*_+.5*g,F=m*y-m*_;for(let C=0;C!==a;++C)o[C]=w*s[c+C]+M*s[u+C]+R*s[l+C]+F*s[d+C];return o}}class Lv extends ra{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=e*a,u=l-a,c=(n-t)/(i-t),d=1-c;for(let f=0;f!==a;++f)o[f]=s[u+f]*d+s[l+f]*c;return o}}class ky extends ra{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class Ro{constructor(e,t,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Gn.convertArray(t,this.TimeBufferType),this.values=Gn.convertArray(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:Gn.convertArray(e.times,Array),values:Gn.convertArray(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new ky(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Lv(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Uy(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Xo:t=this.InterpolantFactoryMethodDiscrete;break;case _l:t=this.InterpolantFactoryMethodLinear;break;case vo:t=this.InterpolantFactoryMethodSmooth}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0){if(e===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Xo;case this.InterpolantFactoryMethodLinear:return _l;case this.InterpolantFactoryMethodSmooth:return vo}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let o=0,s=i-1;for(;o!==i&&n[o]<e;)++o;for(;s!==-1&&n[s]>t;)--s;if(++s,o!==0||s!==i){o>=s&&(s=Math.max(s,1),o=s-1);const a=this.getValueSize();this.times=Gn.arraySlice(n,o,s),this.values=Gn.arraySlice(this.values,o*a,s*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,o=n.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;a++){const l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(i!==void 0&&Gn.isTypedArray(i))for(let a=0,l=i.length;a!==l;++a){const u=i[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),e=!1;break}}return e}optimize(){const e=Gn.arraySlice(this.times),t=Gn.arraySlice(this.values),n=this.getValueSize(),i=this.getInterpolation()===vo,o=e.length-1;let s=1;for(let a=1;a<o;++a){let l=!1;const u=e[a];if(u!==e[a+1]&&(a!==1||u!==e[0]))if(i)l=!0;else{const c=a*n,d=c-n,f=c+n;for(let m=0;m!==n;++m){const g=t[c+m];if(g!==t[d+m]||g!==t[f+m]){l=!0;break}}}if(l){if(a!==s){e[s]=e[a];const c=a*n,d=s*n;for(let f=0;f!==n;++f)t[d+f]=t[c+f]}++s}}if(o>0){e[s]=e[o];for(let a=o*n,l=s*n,u=0;u!==n;++u)t[l+u]=t[a+u];++s}return s!==e.length?(this.times=Gn.arraySlice(e,0,s),this.values=Gn.arraySlice(t,0,s*n)):(this.times=e,this.values=t),this}clone(){const e=Gn.arraySlice(this.times,0),t=Gn.arraySlice(this.values,0),n=new this.constructor(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}Ro.prototype.TimeBufferType=Float32Array,Ro.prototype.ValueBufferType=Float32Array,Ro.prototype.DefaultInterpolation=_l;class Kl extends Ro{}Kl.prototype.ValueTypeName="bool",Kl.prototype.ValueBufferType=Array,Kl.prototype.DefaultInterpolation=Xo,Kl.prototype.InterpolantFactoryMethodLinear=void 0,Kl.prototype.InterpolantFactoryMethodSmooth=void 0;class Ov extends Ro{}Ov.prototype.ValueTypeName="color";class Id extends Ro{}Id.prototype.ValueTypeName="number";class Gy extends ra{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(n-t)/(i-t);let u=e*a;for(let c=u+a;u!==c;u+=4)vi.slerpFlat(o,0,s,u-a,s,u,l);return o}}class Xh extends Ro{InterpolantFactoryMethodLinear(e){return new Gy(this.times,this.values,this.getValueSize(),e)}}Xh.prototype.ValueTypeName="quaternion",Xh.prototype.DefaultInterpolation=_l,Xh.prototype.InterpolantFactoryMethodSmooth=void 0;class Ql extends Ro{}Ql.prototype.ValueTypeName="string",Ql.prototype.ValueBufferType=Array,Ql.prototype.DefaultInterpolation=Xo,Ql.prototype.InterpolantFactoryMethodLinear=void 0,Ql.prototype.InterpolantFactoryMethodSmooth=void 0;class Ld extends Ro{}Ld.prototype.ValueTypeName="vector";class Od{constructor(e,t=-1,n,i=Ls){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=rr(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let s=0,a=n.length;s!==a;++s)t.push(GE(n[s]).scale(i));const o=new this(e.name,e.duration,t,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,s=n.length;o!==s;++o)t.push(Ro.toJSON(n[o]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const o=t.length,s=[];for(let a=0;a<o;a++){let l=[],u=[];l.push((a+o-1)%o,a,(a+1)%o),u.push(0,1,0);const c=Gn.getKeyframeOrder(l);l=Gn.sortedArray(l,1,c),u=Gn.sortedArray(u,1,c),i||l[0]!==0||(l.push(o),u.push(u[0])),s.push(new Id(".morphTargetInfluences["+t[a].name+"]",l,u).scale(1/n))}return new this(e,-1,s)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const i=e;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const i={},o=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const u=e[a],c=u.name.match(o);if(c&&c.length>1){const d=c[1];let f=i[d];f||(i[d]=f=[]),f.push(u)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],t,n));return s}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(c,d,f,m,g){if(f.length!==0){const _=[],y=[];Gn.flattenJSON(f,_,y,m),_.length!==0&&g.push(new c(d,_,y))}},i=[],o=e.name||"default",s=e.fps||30,a=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let c=0;c<u.length;c++){const d=u[c].keys;if(d&&d.length!==0)if(d[0].morphTargets){const f={};let m;for(m=0;m<d.length;m++)if(d[m].morphTargets)for(let g=0;g<d[m].morphTargets.length;g++)f[d[m].morphTargets[g]]=-1;for(const g in f){const _=[],y=[];for(let w=0;w!==d[m].morphTargets.length;++w){const M=d[m];_.push(M.time),y.push(M.morphTarget===g?1:0)}i.push(new Id(".morphTargetInfluence["+g+"]",_,y))}l=f.length*(s||1)}else{const f=".bones["+t[c].name+"]";n(Ld,f+".position",d,"pos",i),n(Xh,f+".quaternion",d,"rot",i),n(Ld,f+".scale",d,"scl",i)}}return i.length===0?null:new this(o,l,i,a)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const i=this.tracks[t];e=Math.max(e,i.times[i.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function GE(r){if(r.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Id;case"vector":case"vector2":case"vector3":case"vector4":return Ld;case"color":return Ov;case"quaternion":return Xh;case"bool":case"boolean":return Kl;case"string":return Ql}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}(r.type);if(r.times===void 0){const t=[],n=[];Gn.flattenJSON(r.keys,t,n,"value"),r.times=t,r.values=n}return e.parse!==void 0?e.parse(r):new e(r.name,r.times,r.values,r.interpolation)}const eu={enabled:!1,files:{},add:function(r,e){this.enabled!==!1&&(this.files[r]=e)},get:function(r){if(this.enabled!==!1)return this.files[r]},remove:function(r){delete this.files[r]},clear:function(){this.files={}}};class Dv{constructor(e,t,n){const i=this;let o=!1,s=0,a=0,l;const u=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(c){a++,o===!1&&i.onStart!==void 0&&i.onStart(c,s,a),o=!0},this.itemEnd=function(c){s++,i.onProgress!==void 0&&i.onProgress(c,s,a),s===a&&(o=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(c){i.onError!==void 0&&i.onError(c)},this.resolveURL=function(c){return l?l(c):c},this.setURLModifier=function(c){return l=c,this},this.addHandler=function(c,d){return u.push(c,d),this},this.removeHandler=function(c){const d=u.indexOf(c);return d!==-1&&u.splice(d,2),this},this.getHandler=function(c){for(let d=0,f=u.length;d<f;d+=2){const m=u[d],g=u[d+1];if(m.global&&(m.lastIndex=0),m.test(c))return g}return null}}}const Hy=new Dv;class $i{constructor(e){this.manager=e!==void 0?e:Hy,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(i,o){n.load(e,i,t,o)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const Io={};class Lo extends $i{constructor(e){super(e)}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=eu.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(s),o.manager.itemEnd(e)},0),s;if(Io[e]!==void 0)return void Io[e].push({onLoad:t,onProgress:n,onError:i});const a=e.match(/^data:(.*?)(;base64)?,(.*)$/);let l;if(a){const u=a[1],c=!!a[2];let d=a[3];d=decodeURIComponent(d),c&&(d=atob(d));try{let f;const m=(this.responseType||"").toLowerCase();switch(m){case"arraybuffer":case"blob":const g=new Uint8Array(d.length);for(let y=0;y<d.length;y++)g[y]=d.charCodeAt(y);f=m==="blob"?new Blob([g.buffer],{type:u}):g.buffer;break;case"document":f=new DOMParser().parseFromString(d,u);break;case"json":f=JSON.parse(d);break;default:f=d}setTimeout(function(){t&&t(f),o.manager.itemEnd(e)},0)}catch(f){setTimeout(function(){i&&i(f),o.manager.itemError(e),o.manager.itemEnd(e)},0)}}else{Io[e]=[],Io[e].push({onLoad:t,onProgress:n,onError:i}),l=new XMLHttpRequest,l.open("GET",e,!0),l.addEventListener("load",function(u){const c=this.response,d=Io[e];if(delete Io[e],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),eu.add(e,c);for(let f=0,m=d.length;f<m;f++){const g=d[f];g.onLoad&&g.onLoad(c)}o.manager.itemEnd(e)}else{for(let f=0,m=d.length;f<m;f++){const g=d[f];g.onError&&g.onError(u)}o.manager.itemError(e),o.manager.itemEnd(e)}},!1),l.addEventListener("progress",function(u){const c=Io[e];for(let d=0,f=c.length;d<f;d++){const m=c[d];m.onProgress&&m.onProgress(u)}},!1),l.addEventListener("error",function(u){const c=Io[e];delete Io[e];for(let d=0,f=c.length;d<f;d++){const m=c[d];m.onError&&m.onError(u)}o.manager.itemError(e),o.manager.itemEnd(e)},!1),l.addEventListener("abort",function(u){const c=Io[e];delete Io[e];for(let d=0,f=c.length;d<f;d++){const m=c[d];m.onError&&m.onError(u)}o.manager.itemError(e),o.manager.itemEnd(e)},!1),this.responseType!==void 0&&(l.responseType=this.responseType),this.withCredentials!==void 0&&(l.withCredentials=this.withCredentials),l.overrideMimeType&&l.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(const u in this.requestHeader)l.setRequestHeader(u,this.requestHeader[u]);l.send(null)}return o.manager.itemStart(e),l}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class HE extends $i{constructor(e){super(e)}load(e,t,n,i){const o=this,s=new Lo(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{t(o.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},n,i)}parse(e){const t=[];for(let n=0;n<e.length;n++){const i=Od.parse(e[n]);t.push(i)}return t}}class zE extends $i{constructor(e){super(e)}load(e,t,n,i){const o=this,s=[],a=new yt,l=new Lo(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(o.withCredentials);let u=0;function c(d){l.load(e[d],function(f){const m=o.parse(f,!0);s[d]={width:m.width,height:m.height,format:m.format,mipmaps:m.mipmaps},u+=1,u===6&&(m.mipmapCount===1&&(a.minFilter=$n),a.image=s,a.format=m.format,a.needsUpdate=!0,t&&t(a))},n,i)}if(Array.isArray(e))for(let d=0,f=e.length;d<f;++d)c(d);else l.load(e,function(d){const f=o.parse(d,!0);if(f.isCubemap){const m=f.mipmaps.length/f.mipmapCount;for(let g=0;g<m;g++){s[g]={mipmaps:[]};for(let _=0;_<f.mipmapCount;_++)s[g].mipmaps.push(f.mipmaps[g*f.mipmapCount+_]),s[g].format=f.format,s[g].width=f.width,s[g].height=f.height}a.image=s}else a.image.width=f.width,a.image.height=f.height,a.mipmaps=f.mipmaps;f.mipmapCount===1&&(a.minFilter=$n),a.format=f.format,a.needsUpdate=!0,t&&t(a)},n,i);return a}}class Dd extends $i{constructor(e){super(e)}load(e,t,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=eu.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(s),o.manager.itemEnd(e)},0),s;const a=document.createElementNS("http://www.w3.org/1999/xhtml","img");function l(){a.removeEventListener("load",l,!1),a.removeEventListener("error",u,!1),eu.add(e,this),t&&t(this),o.manager.itemEnd(e)}function u(c){a.removeEventListener("load",l,!1),a.removeEventListener("error",u,!1),i&&i(c),o.manager.itemError(e),o.manager.itemEnd(e)}return a.addEventListener("load",l,!1),a.addEventListener("error",u,!1),e.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),o.manager.itemStart(e),a.src=e,a}}class zy extends $i{constructor(e){super(e)}load(e,t,n,i){const o=new kr,s=new Dd(this.manager);s.setCrossOrigin(this.crossOrigin),s.setPath(this.path);let a=0;function l(u){s.load(e[u],function(c){o.images[u]=c,a++,a===6&&(o.needsUpdate=!0,t&&t(o))},void 0,i)}for(let u=0;u<e.length;++u)l(u);return o}}class Vy extends $i{constructor(e){super(e)}load(e,t,n,i){const o=this,s=new os,a=new Lo(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(o.withCredentials),a.load(e,function(l){const u=o.parse(l);u&&(u.image!==void 0?s.image=u.image:u.data!==void 0&&(s.image.width=u.width,s.image.height=u.height,s.image.data=u.data),s.wrapS=u.wrapS!==void 0?u.wrapS:gi,s.wrapT=u.wrapT!==void 0?u.wrapT:gi,s.magFilter=u.magFilter!==void 0?u.magFilter:$n,s.minFilter=u.minFilter!==void 0?u.minFilter:$n,s.anisotropy=u.anisotropy!==void 0?u.anisotropy:1,u.encoding!==void 0&&(s.encoding=u.encoding),u.flipY!==void 0&&(s.flipY=u.flipY),u.format!==void 0&&(s.format=u.format),u.type!==void 0&&(s.type=u.type),u.mipmaps!==void 0&&(s.mipmaps=u.mipmaps,s.minFilter=Ms),u.mipmapCount===1&&(s.minFilter=$n),u.generateMipmaps!==void 0&&(s.generateMipmaps=u.generateMipmaps),s.needsUpdate=!0,t&&t(s,u))},n,i),s}}class Nv extends $i{constructor(e){super(e)}load(e,t,n,i){const o=new Kn,s=new Dd(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(e,function(a){o.image=a;const l=e.search(/\.jpe?g($|\?)/i)>0||e.search(/^data\:image\/jpeg/)===0;o.format=l?fo:tr,o.needsUpdate=!0,t!==void 0&&t(o)},n,i),o}}class jy extends Yn{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Ya(t,e))}getPoint(e){const t=e*this.getLength(),n=this.getCurveLengths();let i=0;for(;i<n.length;){if(n[i]>=t){const o=n[i]-t,s=this.curves[i],a=s.getLength(),l=a===0?0:1-o/a;return s.getPointAt(l)}i++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,i=this.curves.length;n<i;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let i=0,o=this.curves;i<o.length;i++){const s=o[i],a=s&&s.isEllipseCurve?2*e:s&&(s.isLineCurve||s.isLineCurve3)?1:s&&s.isSplineCurve?e*s.points.length:e,l=s.getPoints(a);for(let u=0;u<l.length;u++){const c=l[u];n&&n.equals(c)||(t.push(c),n=c)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const i=e.curves[t];this.curves.push(i.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const i=this.curves[t];e.curves.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const i=e.curves[t];this.curves.push(new wv[i.type]().fromJSON(i))}return this}}class tu extends jy{constructor(e){super(),this.type="Path",this.currentPoint=new Qe,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Ya(this.currentPoint.clone(),new Qe(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,i){const o=new ia(this.currentPoint.clone(),new Qe(e,t),new Qe(n,i));return this.curves.push(o),this.currentPoint.set(n,i),this}bezierCurveTo(e,t,n,i,o,s){const a=new na(this.currentPoint.clone(),new Qe(e,t),new Qe(n,i),new Qe(o,s));return this.curves.push(a),this.currentPoint.set(o,s),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new rm(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,i,o,s){const a=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(e+a,t+l,n,i,o,s),this}absarc(e,t,n,i,o,s){return this.absellipse(e,t,n,n,i,o,s),this}ellipse(e,t,n,i,o,s,a,l){const u=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+u,t+c,n,i,o,s,a,l),this}absellipse(e,t,n,i,o,s,a,l){const u=new kn(e,t,n,i,o,s,a,l);if(this.curves.length>0){const d=u.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(u);const c=u.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Za extends tu{constructor(e){super(e),this.uuid=rr(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,i=this.holes.length;n<i;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const i=e.holes[t];this.holes.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const i=this.holes[t];e.holes.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const i=e.holes[t];this.holes.push(new tu().fromJSON(i))}return this}}class Oo extends Xt{constructor(e,t=1){super(),this.type="Light",this.color=new gt(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}Oo.prototype.isLight=!0;class Fv extends Oo{constructor(e,t,n){super(e,n),this.type="HemisphereLight",this.position.copy(Xt.DefaultUp),this.updateMatrix(),this.groundColor=new gt(t)}copy(e){return Oo.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}Fv.prototype.isHemisphereLight=!0;const Wy=new pt,Xy=new T,Yy=new T;class Bv{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new Qe(512,512),this.map=null,this.mapPass=null,this.matrix=new pt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Ba,this._frameExtents=new Qe(1,1),this._viewportCount=1,this._viewports=[new pn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;Xy.setFromMatrixPosition(e.matrixWorld),t.position.copy(Xy),Yy.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Yy),t.updateMatrixWorld(),Wy.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Wy),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),this.mapSize.x===512&&this.mapSize.y===512||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class qy extends Bv{constructor(){super(new ei(50,1,.5,500)),this.focus=1}updateMatrices(e){const t=this.camera,n=2*ii*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,o=e.distance||t.far;n===t.fov&&i===t.aspect&&o===t.far||(t.fov=n,t.aspect=i,t.far=o,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}qy.prototype.isSpotLightShadow=!0;class Uv extends Oo{constructor(e,t,n=0,i=Math.PI/3,o=0,s=1){super(e,t),this.type="SpotLight",this.position.copy(Xt.DefaultUp),this.updateMatrix(),this.target=new Xt,this.distance=n,this.angle=i,this.penumbra=o,this.decay=s,this.shadow=new qy}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}Uv.prototype.isSpotLight=!0;const Zy=new pt,Nd=new T,kv=new T;class Jy extends Bv{constructor(){super(new ei(90,1,.5,500)),this._frameExtents=new Qe(4,2),this._viewportCount=6,this._viewports=[new pn(2,1,1,1),new pn(0,1,1,1),new pn(3,1,1,1),new pn(1,1,1,1),new pn(3,0,1,1),new pn(1,0,1,1)],this._cubeDirections=[new T(1,0,0),new T(-1,0,0),new T(0,0,1),new T(0,0,-1),new T(0,1,0),new T(0,-1,0)],this._cubeUps=[new T(0,1,0),new T(0,1,0),new T(0,1,0),new T(0,1,0),new T(0,0,1),new T(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,i=this.matrix,o=e.distance||n.far;o!==n.far&&(n.far=o,n.updateProjectionMatrix()),Nd.setFromMatrixPosition(e.matrixWorld),n.position.copy(Nd),kv.copy(n.position),kv.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(kv),n.updateMatrixWorld(),i.makeTranslation(-Nd.x,-Nd.y,-Nd.z),Zy.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Zy)}}Jy.prototype.isPointLightShadow=!0;class Gv extends Oo{constructor(e,t,n=0,i=1){super(e,t),this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new Jy}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}Gv.prototype.isPointLight=!0;class Yh extends Ws{constructor(e=-1,t=1,n=1,i=-1,o=.1,s=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,o,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let o=n-e,s=n+e,a=i+t,l=i-t;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=u*this.view.offsetX,s=o+u*this.view.width,a-=c*this.view.offsetY,l=a-c*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}Yh.prototype.isOrthographicCamera=!0;class $y extends Bv{constructor(){super(new Yh(-5,5,5,-5,.5,500))}}$y.prototype.isDirectionalLightShadow=!0;class dm extends Oo{constructor(e,t){super(e,t),this.type="DirectionalLight",this.position.copy(Xt.DefaultUp),this.updateMatrix(),this.target=new Xt,this.shadow=new $y}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}dm.prototype.isDirectionalLight=!0;class pm extends Oo{constructor(e,t){super(e,t),this.type="AmbientLight"}}pm.prototype.isAmbientLight=!0;class Hv extends Oo{constructor(e,t,n=10,i=10){super(e,t),this.type="RectAreaLight",this.width=n,this.height=i}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}Hv.prototype.isRectAreaLight=!0;class zv{constructor(){this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new T)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,i=e.y,o=e.z,s=this.coefficients;return t.copy(s[0]).multiplyScalar(.282095),t.addScaledVector(s[1],.488603*i),t.addScaledVector(s[2],.488603*o),t.addScaledVector(s[3],.488603*n),t.addScaledVector(s[4],n*i*1.092548),t.addScaledVector(s[5],i*o*1.092548),t.addScaledVector(s[6],.315392*(3*o*o-1)),t.addScaledVector(s[7],n*o*1.092548),t.addScaledVector(s[8],.546274*(n*n-i*i)),t}getIrradianceAt(e,t){const n=e.x,i=e.y,o=e.z,s=this.coefficients;return t.copy(s[0]).multiplyScalar(.886227),t.addScaledVector(s[1],1.023328*i),t.addScaledVector(s[2],1.023328*o),t.addScaledVector(s[3],1.023328*n),t.addScaledVector(s[4],.858086*n*i),t.addScaledVector(s[5],.858086*i*o),t.addScaledVector(s[6],.743125*o*o-.247708),t.addScaledVector(s[7],.858086*n*o),t.addScaledVector(s[8],.429043*(n*n-i*i)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].fromArray(e,t+3*i);return this}toArray(e=[],t=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].toArray(e,t+3*i);return e}static getBasisAt(e,t){const n=e.x,i=e.y,o=e.z;t[0]=.282095,t[1]=.488603*i,t[2]=.488603*o,t[3]=.488603*n,t[4]=1.092548*n*i,t[5]=1.092548*i*o,t[6]=.315392*(3*o*o-1),t[7]=1.092548*n*o,t[8]=.546274*(n*n-i*i)}}zv.prototype.isSphericalHarmonics3=!0;class Fd extends Oo{constructor(e=new zv,t=1){super(void 0,t),this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}Fd.prototype.isLightProbe=!0;class Ky extends $i{constructor(e){super(e),this.textures={}}load(e,t,n,i){const o=this,s=new Lo(o.manager);s.setPath(o.path),s.setRequestHeader(o.requestHeader),s.setWithCredentials(o.withCredentials),s.load(e,function(a){try{t(o.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},n,i)}parse(e){const t=this.textures;function n(o){return t[o]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",o),t[o]}const i=new kE[e.type];if(e.uuid!==void 0&&(i.uuid=e.uuid),e.name!==void 0&&(i.name=e.name),e.color!==void 0&&i.color!==void 0&&i.color.setHex(e.color),e.roughness!==void 0&&(i.roughness=e.roughness),e.metalness!==void 0&&(i.metalness=e.metalness),e.sheen!==void 0&&(i.sheen=new gt().setHex(e.sheen)),e.emissive!==void 0&&i.emissive!==void 0&&i.emissive.setHex(e.emissive),e.specular!==void 0&&i.specular!==void 0&&i.specular.setHex(e.specular),e.shininess!==void 0&&(i.shininess=e.shininess),e.clearcoat!==void 0&&(i.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=e.clearcoatRoughness),e.transmission!==void 0&&(i.transmission=e.transmission),e.thickness!==void 0&&(i.thickness=e.thickness),e.attenuationDistance!==void 0&&(i.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&i.attenuationColor!==void 0&&i.attenuationColor.setHex(e.attenuationColor),e.fog!==void 0&&(i.fog=e.fog),e.flatShading!==void 0&&(i.flatShading=e.flatShading),e.blending!==void 0&&(i.blending=e.blending),e.combine!==void 0&&(i.combine=e.combine),e.side!==void 0&&(i.side=e.side),e.shadowSide!==void 0&&(i.shadowSide=e.shadowSide),e.opacity!==void 0&&(i.opacity=e.opacity),e.transparent!==void 0&&(i.transparent=e.transparent),e.alphaTest!==void 0&&(i.alphaTest=e.alphaTest),e.depthTest!==void 0&&(i.depthTest=e.depthTest),e.depthWrite!==void 0&&(i.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(i.colorWrite=e.colorWrite),e.stencilWrite!==void 0&&(i.stencilWrite=e.stencilWrite),e.stencilWriteMask!==void 0&&(i.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(i.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(i.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(i.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(i.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(i.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(i.stencilZPass=e.stencilZPass),e.wireframe!==void 0&&(i.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(i.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(i.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(i.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(i.rotation=e.rotation),e.linewidth!==1&&(i.linewidth=e.linewidth),e.dashSize!==void 0&&(i.dashSize=e.dashSize),e.gapSize!==void 0&&(i.gapSize=e.gapSize),e.scale!==void 0&&(i.scale=e.scale),e.polygonOffset!==void 0&&(i.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(i.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(i.polygonOffsetUnits=e.polygonOffsetUnits),e.morphTargets!==void 0&&(i.morphTargets=e.morphTargets),e.morphNormals!==void 0&&(i.morphNormals=e.morphNormals),e.dithering!==void 0&&(i.dithering=e.dithering),e.alphaToCoverage!==void 0&&(i.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(i.premultipliedAlpha=e.premultipliedAlpha),e.vertexTangents!==void 0&&(i.vertexTangents=e.vertexTangents),e.visible!==void 0&&(i.visible=e.visible),e.toneMapped!==void 0&&(i.toneMapped=e.toneMapped),e.userData!==void 0&&(i.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?i.vertexColors=e.vertexColors>0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const o in e.uniforms){const s=e.uniforms[o];switch(i.uniforms[o]={},s.type){case"t":i.uniforms[o].value=n(s.value);break;case"c":i.uniforms[o].value=new gt().setHex(s.value);break;case"v2":i.uniforms[o].value=new Qe().fromArray(s.value);break;case"v3":i.uniforms[o].value=new T().fromArray(s.value);break;case"v4":i.uniforms[o].value=new pn().fromArray(s.value);break;case"m3":i.uniforms[o].value=new En().fromArray(s.value);break;case"m4":i.uniforms[o].value=new pt().fromArray(s.value);break;default:i.uniforms[o].value=s.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.extensions!==void 0)for(const o in e.extensions)i.extensions[o]=e.extensions[o];if(e.shading!==void 0&&(i.flatShading=e.shading===1),e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=n(e.map)),e.matcap!==void 0&&(i.matcap=n(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=new Qe().fromArray(o)}return e.displacementMap!==void 0&&(i.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=n(e.specularMap)),e.envMap!==void 0&&(i.envMap=n(e.envMap)),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new Qe().fromArray(e.clearcoatNormalScale)),e.transmissionMap!==void 0&&(i.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=n(e.thicknessMap)),i}setTextures(e){return this.textures=e,this}}class fm{static decodeText(e){if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e);let t="";for(let n=0,i=e.length;n<i;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch{return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.substr(0,t+1)}}class Vv extends Mt{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}clone(){return new this.constructor().copy(this)}toJSON(){const e=super.toJSON(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}Vv.prototype.isInstancedBufferGeometry=!0;class jv extends Zt{constructor(e,t,n,i=1){typeof n=="number"&&(i=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(e,t,n),this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}jv.prototype.isInstancedBufferAttribute=!0;class Qy extends $i{constructor(e){super(e)}load(e,t,n,i){const o=this,s=new Lo(o.manager);s.setPath(o.path),s.setRequestHeader(o.requestHeader),s.setWithCredentials(o.withCredentials),s.load(e,function(a){try{t(o.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},n,i)}parse(e){const t={},n={};function i(d,f){if(t[f]!==void 0)return t[f];const m=d.interleavedBuffers[f],g=function(w,M){if(n[M]!==void 0)return n[M];const R=w.arrayBuffers[M],F=new Uint32Array(R).buffer;return n[M]=F,F}(d,m.buffer),_=Hs(m.type,g),y=new $s(_,m.stride);return y.uuid=m.uuid,t[f]=y,y}const o=e.isInstancedBufferGeometry?new Vv:new Mt,s=e.data.index;if(s!==void 0){const d=Hs(s.type,s.array);o.setIndex(new Zt(d,1))}const a=e.data.attributes;for(const d in a){const f=a[d];let m;if(f.isInterleavedBufferAttribute){const g=i(e.data,f.data);m=new Po(g,f.itemSize,f.offset,f.normalized)}else{const g=Hs(f.type,f.array);m=new(f.isInstancedBufferAttribute?jv:Zt)(g,f.itemSize,f.normalized)}f.name!==void 0&&(m.name=f.name),f.usage!==void 0&&m.setUsage(f.usage),f.updateRange!==void 0&&(m.updateRange.offset=f.updateRange.offset,m.updateRange.count=f.updateRange.count),o.setAttribute(d,m)}const l=e.data.morphAttributes;if(l)for(const d in l){const f=l[d],m=[];for(let g=0,_=f.length;g<_;g++){const y=f[g];let w;if(y.isInterleavedBufferAttribute){const M=i(e.data,y.data);w=new Po(M,y.itemSize,y.offset,y.normalized)}else{const M=Hs(y.type,y.array);w=new Zt(M,y.itemSize,y.normalized)}y.name!==void 0&&(w.name=y.name),m.push(w)}o.morphAttributes[d]=m}e.data.morphTargetsRelative&&(o.morphTargetsRelative=!0);const u=e.data.groups||e.data.drawcalls||e.data.offsets;if(u!==void 0)for(let d=0,f=u.length;d!==f;++d){const m=u[d];o.addGroup(m.start,m.count,m.materialIndex)}const c=e.data.boundingSphere;if(c!==void 0){const d=new T;c.center!==void 0&&d.fromArray(c.center),o.boundingSphere=new ui(d,c.radius)}return e.name&&(o.name=e.name),e.userData&&(o.userData=e.userData),o}}class VE extends $i{constructor(e){super(e)}load(e,t,n,i){const o=this,s=this.path===""?fm.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||s;const a=new Lo(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){let u=null;try{u=JSON.parse(l)}catch(d){return i!==void 0&&i(d),void console.error("THREE:ObjectLoader: Can't parse "+e+".",d.message)}const c=u.metadata;c!==void 0&&c.type!==void 0&&c.type.toLowerCase()!=="geometry"?o.parse(u,t):console.error("THREE.ObjectLoader: Can't load "+e)},n,i)}async loadAsync(e,t){const n=this.path===""?fm.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||n;const i=new Lo(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials);const o=await i.loadAsync(e,t),s=JSON.parse(o),a=s.metadata;if(a===void 0||a.type===void 0||a.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return await this.parseAsync(s)}parse(e,t){const n=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),o=this.parseGeometries(e.geometries,i),s=this.parseImages(e.images,function(){t!==void 0&&t(u)}),a=this.parseTextures(e.textures,s),l=this.parseMaterials(e.materials,a),u=this.parseObject(e.object,o,l,a,n),c=this.parseSkeletons(e.skeletons,u);if(this.bindSkeletons(u,c),t!==void 0){let d=!1;for(const f in s)if(s[f]instanceof HTMLImageElement){d=!0;break}d===!1&&t(u)}return u}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,n),o=await this.parseImagesAsync(e.images),s=this.parseTextures(e.textures,o),a=this.parseMaterials(e.materials,s),l=this.parseObject(e.object,i,a,s,t),u=this.parseSkeletons(e.skeletons,l);return this.bindSkeletons(l,u),l}parseShapes(e){const t={};if(e!==void 0)for(let n=0,i=e.length;n<i;n++){const o=new Za().fromJSON(e[n]);t[o.uuid]=o}return t}parseSkeletons(e,t){const n={},i={};if(t.traverse(function(o){o.isBone&&(i[o.uuid]=o)}),e!==void 0)for(let o=0,s=e.length;o<s;o++){const a=new Lh().fromJSON(e[o],i);n[a.uuid]=a}return n}parseGeometries(e,t){const n={};if(e!==void 0){const i=new Qy;for(let o=0,s=e.length;o<s;o++){let a;const l=e[o];switch(l.type){case"BufferGeometry":case"InstancedBufferGeometry":a=i.parse(l);break;case"Geometry":console.error("THREE.ObjectLoader: The legacy Geometry type is no longer supported.");break;default:l.type in By?a=By[l.type].fromJSON(l,t):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${l.type}"`)}a.uuid=l.uuid,l.name!==void 0&&(a.name=l.name),a.isBufferGeometry===!0&&l.userData!==void 0&&(a.userData=l.userData),n[l.uuid]=a}}return n}parseMaterials(e,t){const n={},i={};if(e!==void 0){const o=new Ky;o.setTextures(t);for(let s=0,a=e.length;s<a;s++){const l=e[s];if(l.type==="MultiMaterial"){const u=[];for(let c=0;c<l.materials.length;c++){const d=l.materials[c];n[d.uuid]===void 0&&(n[d.uuid]=o.parse(d)),u.push(n[d.uuid])}i[l.uuid]=u}else n[l.uuid]===void 0&&(n[l.uuid]=o.parse(l)),i[l.uuid]=n[l.uuid]}}return i}parseAnimations(e){const t={};if(e!==void 0)for(let n=0;n<e.length;n++){const i=e[n],o=Od.parse(i);t[o.uuid]=o}return t}parseImages(e,t){const n=this,i={};let o;function s(a){if(typeof a=="string"){const l=a;return function(u){return n.manager.itemStart(u),o.load(u,function(){n.manager.itemEnd(u)},void 0,function(){n.manager.itemError(u),n.manager.itemEnd(u)})}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(l)?l:n.resourcePath+l)}return a.data?{data:Hs(a.type,a.data),width:a.width,height:a.height}:null}if(e!==void 0&&e.length>0){const a=new Dv(t);o=new Dd(a),o.setCrossOrigin(this.crossOrigin);for(let l=0,u=e.length;l<u;l++){const c=e[l],d=c.url;if(Array.isArray(d)){i[c.uuid]=[];for(let f=0,m=d.length;f<m;f++){const g=s(d[f]);g!==null&&(g instanceof HTMLImageElement?i[c.uuid].push(g):i[c.uuid].push(new os(g.data,g.width,g.height)))}}else{const f=s(c.url);f!==null&&(i[c.uuid]=f)}}}return i}async parseImagesAsync(e){const t=this,n={};let i;async function o(s){if(typeof s=="string"){const a=s,l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(a)?a:t.resourcePath+a;return await i.loadAsync(l)}return s.data?{data:Hs(s.type,s.data),width:s.width,height:s.height}:null}if(e!==void 0&&e.length>0){i=new Dd(this.manager),i.setCrossOrigin(this.crossOrigin);for(let s=0,a=e.length;s<a;s++){const l=e[s],u=l.url;if(Array.isArray(u)){n[l.uuid]=[];for(let c=0,d=u.length;c<d;c++){const f=u[c],m=await o(f);m!==null&&(m instanceof HTMLImageElement?n[l.uuid].push(m):n[l.uuid].push(new os(m.data,m.width,m.height)))}}else{const c=await o(l.url);c!==null&&(n[l.uuid]=c)}}}return n}parseTextures(e,t){function n(o,s){return typeof o=="number"?o:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",o),s[o])}const i={};if(e!==void 0)for(let o=0,s=e.length;o<s;o++){const a=e[o];let l;a.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',a.uuid),t[a.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",a.image);const u=t[a.image];Array.isArray(u)?(l=new kr(u),u.length===6&&(l.needsUpdate=!0)):(l=u&&u.data?new os(u.data,u.width,u.height):new Kn(u),u&&(l.needsUpdate=!0)),l.uuid=a.uuid,a.name!==void 0&&(l.name=a.name),a.mapping!==void 0&&(l.mapping=n(a.mapping,jE)),a.offset!==void 0&&l.offset.fromArray(a.offset),a.repeat!==void 0&&l.repeat.fromArray(a.repeat),a.center!==void 0&&l.center.fromArray(a.center),a.rotation!==void 0&&(l.rotation=a.rotation),a.wrap!==void 0&&(l.wrapS=n(a.wrap[0],ex),l.wrapT=n(a.wrap[1],ex)),a.format!==void 0&&(l.format=a.format),a.type!==void 0&&(l.type=a.type),a.encoding!==void 0&&(l.encoding=a.encoding),a.minFilter!==void 0&&(l.minFilter=n(a.minFilter,tx)),a.magFilter!==void 0&&(l.magFilter=n(a.magFilter,tx)),a.anisotropy!==void 0&&(l.anisotropy=a.anisotropy),a.flipY!==void 0&&(l.flipY=a.flipY),a.premultiplyAlpha!==void 0&&(l.premultiplyAlpha=a.premultiplyAlpha),a.unpackAlignment!==void 0&&(l.unpackAlignment=a.unpackAlignment),i[a.uuid]=l}return i}parseObject(e,t,n,i,o){let s,a,l;function u(f){return t[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",f),t[f]}function c(f){if(f!==void 0){if(Array.isArray(f)){const m=[];for(let g=0,_=f.length;g<_;g++){const y=f[g];n[y]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",y),m.push(n[y])}return m}return n[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",f),n[f]}}function d(f){return i[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined texture",f),i[f]}switch(e.type){case"Scene":s=new Ga,e.background!==void 0&&(Number.isInteger(e.background)?s.background=new gt(e.background):s.background=d(e.background)),e.environment!==void 0&&(s.environment=d(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?s.fog=new Hl(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(s.fog=new yi(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":s=new ei(e.fov,e.aspect,e.near,e.far),e.focus!==void 0&&(s.focus=e.focus),e.zoom!==void 0&&(s.zoom=e.zoom),e.filmGauge!==void 0&&(s.filmGauge=e.filmGauge),e.filmOffset!==void 0&&(s.filmOffset=e.filmOffset),e.view!==void 0&&(s.view=Object.assign({},e.view));break;case"OrthographicCamera":s=new Yh(e.left,e.right,e.top,e.bottom,e.near,e.far),e.zoom!==void 0&&(s.zoom=e.zoom),e.view!==void 0&&(s.view=Object.assign({},e.view));break;case"AmbientLight":s=new pm(e.color,e.intensity);break;case"DirectionalLight":s=new dm(e.color,e.intensity);break;case"PointLight":s=new Gv(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":s=new Hv(e.color,e.intensity,e.width,e.height);break;case"SpotLight":s=new Uv(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":s=new Fv(e.color,e.groundColor,e.intensity);break;case"LightProbe":s=new Fd().fromJSON(e);break;case"SkinnedMesh":a=u(e.geometry),l=c(e.material),s=new Va(a,l),e.bindMode!==void 0&&(s.bindMode=e.bindMode),e.bindMatrix!==void 0&&s.bindMatrix.fromArray(e.bindMatrix),e.skeleton!==void 0&&(s.skeleton=e.skeleton);break;case"Mesh":a=u(e.geometry),l=c(e.material),s=new ln(a,l);break;case"InstancedMesh":a=u(e.geometry),l=c(e.material);const f=e.count,m=e.instanceMatrix,g=e.instanceColor;s=new Sd(a,l,f),s.instanceMatrix=new Zt(new Float32Array(m.array),16),g!==void 0&&(s.instanceColor=new Zt(new Float32Array(g.array),g.itemSize));break;case"LOD":s=new $f;break;case"Line":s=new h(u(e.geometry),c(e.material));break;case"LineLoop":s=new P(u(e.geometry),c(e.material));break;case"LineSegments":s=new E(u(e.geometry),c(e.material));break;case"PointCloud":case"Points":s=new ze(u(e.geometry),c(e.material));break;case"Sprite":s=new Xl(c(e.material));break;case"Group":s=new Js;break;case"Bone":s=new Ih;break;default:s=new Xt}if(s.uuid=e.uuid,e.name!==void 0&&(s.name=e.name),e.matrix!==void 0?(s.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=e.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(e.position!==void 0&&s.position.fromArray(e.position),e.rotation!==void 0&&s.rotation.fromArray(e.rotation),e.quaternion!==void 0&&s.quaternion.fromArray(e.quaternion),e.scale!==void 0&&s.scale.fromArray(e.scale)),e.castShadow!==void 0&&(s.castShadow=e.castShadow),e.receiveShadow!==void 0&&(s.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.bias!==void 0&&(s.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(s.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(s.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(s.visible=e.visible),e.frustumCulled!==void 0&&(s.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(s.renderOrder=e.renderOrder),e.userData!==void 0&&(s.userData=e.userData),e.layers!==void 0&&(s.layers.mask=e.layers),e.children!==void 0){const f=e.children;for(let m=0;m<f.length;m++)s.add(this.parseObject(f[m],t,n,i,o))}if(e.animations!==void 0){const f=e.animations;for(let m=0;m<f.length;m++){const g=f[m];s.animations.push(o[g])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(s.autoUpdate=e.autoUpdate);const f=e.levels;for(let m=0;m<f.length;m++){const g=f[m],_=s.getObjectByProperty("uuid",g.object);_!==void 0&&s.addLevel(_,g.distance)}}return s}bindSkeletons(e,t){Object.keys(t).length!==0&&e.traverse(function(n){if(n.isSkinnedMesh===!0&&n.skeleton!==void 0){const i=t[n.skeleton];i===void 0?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",n.skeleton):n.bind(i,n.bindMatrix)}})}setTexturePath(e){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(e)}}const jE={UVMapping:Iu,CubeReflectionMapping:zo,CubeRefractionMapping:hl,EquirectangularReflectionMapping:cl,EquirectangularRefractionMapping:dl,CubeUVReflectionMapping:va,CubeUVRefractionMapping:_a},ex={RepeatWrapping:Vo,ClampToEdgeWrapping:gi,MirroredRepeatWrapping:pl},tx={NearestFilter:Jn,NearestMipmapNearestFilter:fl,NearestMipmapLinearFilter:ml,LinearFilter:$n,LinearMipmapNearestFilter:jo,LinearMipmapLinearFilter:Ms};class nx extends $i{constructor(e){super(e),typeof createImageBitmap=="undefined"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch=="undefined"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=eu.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(s),o.manager.itemEnd(e)},0),s;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){eu.add(e,l),t&&t(l),o.manager.itemEnd(e)}).catch(function(l){i&&i(l),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}}nx.prototype.isImageBitmapLoader=!0;class ix{constructor(){this.type="ShapePath",this.color=new gt,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new tu,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,i){return this.currentPath.quadraticCurveTo(e,t,n,i),this}bezierCurveTo(e,t,n,i,o,s){return this.currentPath.bezierCurveTo(e,t,n,i,o,s),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(M){const R=[];for(let F=0,C=M.length;F<C;F++){const U=M[F],N=new Za;N.curves=U.curves,R.push(N)}return R}function i(M,R){const F=R.length;let C=!1;for(let U=F-1,N=0;N<F;U=N++){let G=R[U],he=R[N],ne=he.x-G.x,Z=he.y-G.y;if(Math.abs(Z)>Number.EPSILON){if(Z<0&&(G=R[N],ne=-ne,he=R[U],Z=-Z),M.y<G.y||M.y>he.y)continue;if(M.y===G.y){if(M.x===G.x)return!0}else{const Q=Z*(M.x-G.x)-ne*(M.y-G.y);if(Q===0)return!0;if(Q<0)continue;C=!C}}else{if(M.y!==G.y)continue;if(he.x<=M.x&&M.x<=G.x||G.x<=M.x&&M.x<=he.x)return!0}}return C}const o=us.isClockWise,s=this.subPaths;if(s.length===0)return[];if(t===!0)return n(s);let a,l,u;const c=[];if(s.length===1)return l=s[0],u=new Za,u.curves=l.curves,c.push(u),c;let d=!o(s[0].getPoints());d=e?!d:d;const f=[],m=[];let g,_,y=[],w=0;m[w]=void 0,y[w]=[];for(let M=0,R=s.length;M<R;M++)l=s[M],g=l.getPoints(),a=o(g),a=e?!a:a,a?(!d&&m[w]&&w++,m[w]={s:new Za,p:g},m[w].s.curves=l.curves,d&&w++,y[w]=[]):y[w].push({h:l,p:g[0]});if(!m[0])return n(s);if(m.length>1){let M=!1;const R=[];for(let F=0,C=m.length;F<C;F++)f[F]=[];for(let F=0,C=m.length;F<C;F++){const U=y[F];for(let N=0;N<U.length;N++){const G=U[N];let he=!0;for(let ne=0;ne<m.length;ne++)i(G.p,m[ne].p)&&(F!==ne&&R.push({froms:F,tos:ne,hole:N}),he?(he=!1,f[ne].push(G)):M=!0);he&&f[F].push(G)}}R.length>0&&(M||(y=f))}for(let M=0,R=m.length;M<R;M++){u=m[M].s,c.push(u),_=y[M];for(let F=0,C=_.length;F<C;F++)u.holes.push(_[F].h)}return c}}class Wv{constructor(e){this.type="Font",this.data=e}generateShapes(e,t=100){const n=[],i=function(o,s,a){const l=Array.from(o),u=s/a.resolution,c=(a.boundingBox.yMax-a.boundingBox.yMin+a.underlineThickness)*u,d=[];let f=0,m=0;for(let g=0;g<l.length;g++){const _=l[g];if(_===`
2976
+ }`}),m=f.clone();m.defines.HORIZONTAL_PASS=1;const g=new Mt;g.setAttribute("position",new Zt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new ln(g,f),y=this;function w(U,N){const G=e.update(_);f.uniforms.shadow_pass.value=U.map.texture,f.uniforms.resolution.value=U.mapSize,f.uniforms.radius.value=U.radius,r.setRenderTarget(U.mapPass),r.clear(),r.renderBufferDirect(N,null,G,f,_,null),m.uniforms.shadow_pass.value=U.mapPass.texture,m.uniforms.resolution.value=U.mapSize,m.uniforms.radius.value=U.radius,r.setRenderTarget(U.map),r.clear(),r.renderBufferDirect(N,null,G,m,_,null)}function M(U){const N=U<<0;let G=a[N];return G===void 0&&(G=new on({depthPacking:kc,morphTargets:U}),a[N]=G),G}function R(U){const N=U<<0;let G=l[N];return G===void 0&&(G=new Sh({morphTargets:U}),l[N]=G),G}function F(U,N,G,he,ne,Z,Q){let $=null,se=M,me=U.customDepthMaterial;if(he.isPointLight===!0&&(se=R,me=U.customDistanceMaterial),me===void 0){let ge=!1;G.morphTargets===!0&&(ge=N.morphAttributes&&N.morphAttributes.position&&N.morphAttributes.position.length>0),$=se(ge)}else $=me;if(r.localClippingEnabled&&G.clipShadows===!0&&G.clippingPlanes.length!==0){const ge=$.uuid,de=G.uuid;let fe=u[ge];fe===void 0&&(fe={},u[ge]=fe);let Re=fe[de];Re===void 0&&(Re=$.clone(),fe[de]=Re),$=Re}return $.visible=G.visible,$.wireframe=G.wireframe,$.side=Q===D?G.shadowSide!==null?G.shadowSide:G.side:G.shadowSide!==null?G.shadowSide:d[G.side],$.clipShadows=G.clipShadows,$.clippingPlanes=G.clippingPlanes,$.clipIntersection=G.clipIntersection,$.wireframeLinewidth=G.wireframeLinewidth,$.linewidth=G.linewidth,he.isPointLight===!0&&$.isMeshDistanceMaterial===!0&&($.referencePosition.setFromMatrixPosition(he.matrixWorld),$.nearDistance=ne,$.farDistance=Z),$}function C(U,N,G,he,ne){if(U.visible===!1)return;if(U.layers.test(N.layers)&&(U.isMesh||U.isLine||U.isPoints)&&(U.castShadow||U.receiveShadow&&ne===D)&&(!U.frustumCulled||n.intersectsObject(U))){U.modelViewMatrix.multiplyMatrices(G.matrixWorldInverse,U.matrixWorld);const Q=e.update(U),$=U.material;if(Array.isArray($)){const se=Q.groups;for(let me=0,ge=se.length;me<ge;me++){const de=se[me],fe=$[de.materialIndex];if(fe&&fe.visible){const Re=F(U,Q,fe,he,G.near,G.far,ne);r.renderBufferDirect(G,null,Q,Re,U,de)}}}else if($.visible){const se=F(U,Q,$,he,G.near,G.far,ne);r.renderBufferDirect(G,null,Q,se,U,null)}}const Z=U.children;for(let Q=0,$=Z.length;Q<$;Q++)C(Z[Q],N,G,he,ne)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=O,this.render=function(U,N,G){if(y.enabled===!1||y.autoUpdate===!1&&y.needsUpdate===!1||U.length===0)return;const he=r.getRenderTarget(),ne=r.getActiveCubeFace(),Z=r.getActiveMipmapLevel(),Q=r.state;Q.setBlending($e),Q.buffers.color.setClear(1,1,1,1),Q.buffers.depth.setTest(!0),Q.setScissorTest(!1);for(let $=0,se=U.length;$<se;$++){const me=U[$],ge=me.shadow;if(ge===void 0){console.warn("THREE.WebGLShadowMap:",me,"has no shadow.");continue}if(ge.autoUpdate===!1&&ge.needsUpdate===!1)continue;i.copy(ge.mapSize);const de=ge.getFrameExtents();if(i.multiply(de),o.copy(ge.mapSize),(i.x>c||i.y>c)&&(i.x>c&&(o.x=Math.floor(c/de.x),i.x=o.x*de.x,ge.mapSize.x=o.x),i.y>c&&(o.y=Math.floor(c/de.y),i.y=o.y*de.y,ge.mapSize.y=o.y)),ge.map===null&&!ge.isPointLightShadow&&this.type===D){const Re={minFilter:$n,magFilter:$n,format:tr};ge.map=new Or(i.x,i.y,Re),ge.map.texture.name=me.name+".shadowMap",ge.mapPass=new Or(i.x,i.y,Re),ge.camera.updateProjectionMatrix()}if(ge.map===null){const Re={minFilter:Jn,magFilter:Jn,format:tr};ge.map=new Or(i.x,i.y,Re),ge.map.texture.name=me.name+".shadowMap",ge.camera.updateProjectionMatrix()}r.setRenderTarget(ge.map),r.clear();const fe=ge.getViewportCount();for(let Re=0;Re<fe;Re++){const ke=ge.getViewport(Re);s.set(o.x*ke.x,o.y*ke.y,o.x*ke.z,o.y*ke.w),Q.viewport(s),ge.updateMatrices(me,Re),n=ge.getFrustum(),C(N,G,ge.camera,me,this.type)}ge.isPointLightShadow||this.type!==D||w(ge,G),ge.needsUpdate=!1}y.needsUpdate=!1,r.setRenderTarget(he,ne,Z)}}function Eh(r,e,t){const n=t.isWebGL2,i=new function(){let Y=!1;const pe=new pn;let ye=null;const xe=new pn(0,0,0,0);return{setMask:function(De){ye===De||Y||(r.colorMask(De,De,De,De),ye=De)},setLocked:function(De){Y=De},setClear:function(De,ht,xt,_t,Gt){Gt===!0&&(De*=_t,ht*=_t,xt*=_t),pe.set(De,ht,xt,_t),xe.equals(pe)===!1&&(r.clearColor(De,ht,xt,_t),xe.copy(pe))},reset:function(){Y=!1,ye=null,xe.set(-1,0,0,0)}}},o=new function(){let Y=!1,pe=null,ye=null,xe=null;return{setTest:function(De){De?Be(2929):J(2929)},setMask:function(De){pe===De||Y||(r.depthMask(De),pe=De)},setFunc:function(De){if(ye!==De){if(De)switch(De){case Zn:r.depthFunc(512);break;case yn:r.depthFunc(519);break;case li:r.depthFunc(513);break;case Bi:r.depthFunc(515);break;case Ci:r.depthFunc(514);break;case ji:r.depthFunc(518);break;case Lr:r.depthFunc(516);break;case Dp:r.depthFunc(517);break;default:r.depthFunc(515)}else r.depthFunc(515);ye=De}},setLocked:function(De){Y=De},setClear:function(De){xe!==De&&(r.clearDepth(De),xe=De)},reset:function(){Y=!1,pe=null,ye=null,xe=null}}},s=new function(){let Y=!1,pe=null,ye=null,xe=null,De=null,ht=null,xt=null,_t=null,Gt=null;return{setTest:function(Wt){Y||(Wt?Be(2960):J(2960))},setMask:function(Wt){pe===Wt||Y||(r.stencilMask(Wt),pe=Wt)},setFunc:function(Wt,ai,Cn){ye===Wt&&xe===ai&&De===Cn||(r.stencilFunc(Wt,ai,Cn),ye=Wt,xe=ai,De=Cn)},setOp:function(Wt,ai,Cn){ht===Wt&&xt===ai&&_t===Cn||(r.stencilOp(Wt,ai,Cn),ht=Wt,xt=ai,_t=Cn)},setLocked:function(Wt){Y=Wt},setClear:function(Wt){Gt!==Wt&&(r.clearStencil(Wt),Gt=Wt)},reset:function(){Y=!1,pe=null,ye=null,xe=null,De=null,ht=null,xt=null,_t=null,Gt=null}}};let a={},l=null,u={},c=null,d=!1,f=null,m=null,g=null,_=null,y=null,w=null,M=null,R=!1,F=null,C=null,U=null,N=null,G=null;const he=r.getParameter(35661);let ne=!1,Z=0;const Q=r.getParameter(7938);Q.indexOf("WebGL")!==-1?(Z=parseFloat(/^WebGL (\d)/.exec(Q)[1]),ne=Z>=1):Q.indexOf("OpenGL ES")!==-1&&(Z=parseFloat(/^OpenGL ES (\d)/.exec(Q)[1]),ne=Z>=2);let $=null,se={};const me=r.getParameter(3088),ge=r.getParameter(2978),de=new pn().fromArray(me),fe=new pn().fromArray(ge);function Re(Y,pe,ye){const xe=new Uint8Array(4),De=r.createTexture();r.bindTexture(Y,De),r.texParameteri(Y,10241,9728),r.texParameteri(Y,10240,9728);for(let ht=0;ht<ye;ht++)r.texImage2D(pe+ht,0,6408,1,1,0,6408,5121,xe);return De}const ke={};function Be(Y){a[Y]!==!0&&(r.enable(Y),a[Y]=!0)}function J(Y){a[Y]!==!1&&(r.disable(Y),a[Y]=!1)}ke[3553]=Re(3553,3553,1),ke[34067]=Re(34067,34069,6),i.setClear(0,0,0,1),o.setClear(1),s.setClear(0),Be(2929),o.setFunc(Bi),Te(!1),Ge(Xe),Be(2884),Ne($e);const te={[Me]:32774,[Oe]:32778,[Se]:32779};if(n)te[Ue]=32775,te[qe]=32776;else{const Y=e.get("EXT_blend_minmax");Y!==null&&(te[Ue]=Y.MIN_EXT,te[qe]=Y.MAX_EXT)}const Ae={[at]:0,[rt]:1,[Qt]:768,[en]:770,[gn]:776,[Dn]:774,[Vt]:772,[lt]:769,[Bt]:771,[wn]:775,[bt]:773};function Ne(Y,pe,ye,xe,De,ht,xt,_t){if(Y!==$e){if(d===!1&&(Be(3042),d=!0),Y===be)De=De||pe,ht=ht||ye,xt=xt||xe,pe===m&&De===y||(r.blendEquationSeparate(te[pe],te[De]),m=pe,y=De),ye===g&&xe===_&&ht===w&&xt===M||(r.blendFuncSeparate(Ae[ye],Ae[xe],Ae[ht],Ae[xt]),g=ye,_=xe,w=ht,M=xt),f=Y,R=null;else if(Y!==f||_t!==R){if(m===Me&&y===Me||(r.blendEquation(32774),m=Me,y=Me),_t)switch(Y){case ae:r.blendFuncSeparate(1,771,1,771);break;case Ce:r.blendFunc(1,1);break;case Ie:r.blendFuncSeparate(0,0,769,771);break;case H:r.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",Y)}else switch(Y){case ae:r.blendFuncSeparate(770,771,1,771);break;case Ce:r.blendFunc(770,1);break;case Ie:r.blendFunc(0,769);break;case H:r.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",Y)}g=null,_=null,w=null,M=null,f=Y,R=_t}}else d===!0&&(J(3042),d=!1)}function Te(Y){F!==Y&&(Y?r.frontFace(2304):r.frontFace(2305),F=Y)}function Ge(Y){Y!==Ee?(Be(2884),Y!==C&&(Y===Xe?r.cullFace(1029):Y===Fe?r.cullFace(1028):r.cullFace(1032))):J(2884),C=Y}function Ye(Y,pe,ye){Y?(Be(32823),N===pe&&G===ye||(r.polygonOffset(pe,ye),N=pe,G=ye)):J(32823)}function ve(Y){Y===void 0&&(Y=33984+he-1),$!==Y&&(r.activeTexture(Y),$=Y)}return{buffers:{color:i,depth:o,stencil:s},enable:Be,disable:J,bindFramebuffer:function(Y,pe){return pe===null&&l!==null&&(pe=l),u[Y]!==pe&&(r.bindFramebuffer(Y,pe),u[Y]=pe,n&&(Y===36009&&(u[36160]=pe),Y===36160&&(u[36009]=pe)),!0)},bindXRFramebuffer:function(Y){Y!==l&&(r.bindFramebuffer(36160,Y),l=Y)},useProgram:function(Y){return c!==Y&&(r.useProgram(Y),c=Y,!0)},setBlending:Ne,setMaterial:function(Y,pe){Y.side===ee?J(2884):Be(2884);let ye=Y.side===W;pe&&(ye=!ye),Te(ye),Y.blending===ae&&Y.transparent===!1?Ne($e):Ne(Y.blending,Y.blendEquation,Y.blendSrc,Y.blendDst,Y.blendEquationAlpha,Y.blendSrcAlpha,Y.blendDstAlpha,Y.premultipliedAlpha),o.setFunc(Y.depthFunc),o.setTest(Y.depthTest),o.setMask(Y.depthWrite),i.setMask(Y.colorWrite);const xe=Y.stencilWrite;s.setTest(xe),xe&&(s.setMask(Y.stencilWriteMask),s.setFunc(Y.stencilFunc,Y.stencilRef,Y.stencilFuncMask),s.setOp(Y.stencilFail,Y.stencilZFail,Y.stencilZPass)),Ye(Y.polygonOffset,Y.polygonOffsetFactor,Y.polygonOffsetUnits),Y.alphaToCoverage===!0?Be(32926):J(32926)},setFlipSided:Te,setCullFace:Ge,setLineWidth:function(Y){Y!==U&&(ne&&r.lineWidth(Y),U=Y)},setPolygonOffset:Ye,setScissorTest:function(Y){Y?Be(3089):J(3089)},activeTexture:ve,bindTexture:function(Y,pe){$===null&&ve();let ye=se[$];ye===void 0&&(ye={type:void 0,texture:void 0},se[$]=ye),ye.type===Y&&ye.texture===pe||(r.bindTexture(Y,pe||ke[Y]),ye.type=Y,ye.texture=pe)},unbindTexture:function(){const Y=se[$];Y!==void 0&&Y.type!==void 0&&(r.bindTexture(Y.type,null),Y.type=void 0,Y.texture=void 0)},compressedTexImage2D:function(){try{r.compressedTexImage2D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}},texImage2D:function(){try{r.texImage2D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}},texImage3D:function(){try{r.texImage3D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}},scissor:function(Y){de.equals(Y)===!1&&(r.scissor(Y.x,Y.y,Y.z,Y.w),de.copy(Y))},viewport:function(Y){fe.equals(Y)===!1&&(r.viewport(Y.x,Y.y,Y.z,Y.w),fe.copy(Y))},reset:function(){r.disable(3042),r.disable(2884),r.disable(2929),r.disable(32823),r.disable(3089),r.disable(2960),r.disable(32926),r.blendEquation(32774),r.blendFunc(1,0),r.blendFuncSeparate(1,0,1,0),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0),r.depthMask(!0),r.depthFunc(513),r.clearDepth(1),r.stencilMask(4294967295),r.stencilFunc(519,0,4294967295),r.stencilOp(7680,7680,7680),r.clearStencil(0),r.cullFace(1029),r.frontFace(2305),r.polygonOffset(0,0),r.activeTexture(33984),r.bindFramebuffer(36160,null),n===!0&&(r.bindFramebuffer(36009,null),r.bindFramebuffer(36008,null)),r.useProgram(null),r.lineWidth(1),r.scissor(0,0,r.canvas.width,r.canvas.height),r.viewport(0,0,r.canvas.width,r.canvas.height),a={},$=null,se={},l=null,u={},c=null,d=!1,f=null,m=null,g=null,_=null,y=null,w=null,M=null,R=!1,F=null,C=null,U=null,N=null,G=null,de.set(0,0,r.canvas.width,r.canvas.height),fe.set(0,0,r.canvas.width,r.canvas.height),i.reset(),o.reset(),s.reset()}}}function vv(r,e,t,n,i,o,s){const a=i.isWebGL2,l=i.maxTextures,u=i.maxCubemapSize,c=i.maxTextureSize,d=i.maxSamples,f=new WeakMap;let m,g=!1;try{g=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(J,te){return g?new OffscreenCanvas(J,te):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function y(J,te,Ae,Ne){let Te=1;if((J.width>Ne||J.height>Ne)&&(Te=Ne/Math.max(J.width,J.height)),Te<1||te===!0){if(typeof HTMLImageElement!="undefined"&&J instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&J instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&J instanceof ImageBitmap){const Ge=te?nh:Math.floor,Ye=Ge(Te*J.width),ve=Ge(Te*J.height);m===void 0&&(m=_(Ye,ve));const Y=Ae?_(Ye,ve):m;return Y.width=Ye,Y.height=ve,Y.getContext("2d").drawImage(J,0,0,Ye,ve),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+J.width+"x"+J.height+") to ("+Ye+"x"+ve+")."),Y}return"data"in J&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+J.width+"x"+J.height+")."),J}return J}function w(J){return El(J.width)&&El(J.height)}function M(J,te){return J.generateMipmaps&&te&&J.minFilter!==Jn&&J.minFilter!==$n}function R(J,te,Ae,Ne,Te=1){r.generateMipmap(J),n.get(te).__maxMipLevel=Math.log2(Math.max(Ae,Ne,Te))}function F(J,te,Ae){if(a===!1)return te;if(J!==null){if(r[J]!==void 0)return r[J];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+J+"'")}let Ne=te;return te===6403&&(Ae===5126&&(Ne=33326),Ae===5131&&(Ne=33325),Ae===5121&&(Ne=33321)),te===6407&&(Ae===5126&&(Ne=34837),Ae===5131&&(Ne=34843),Ae===5121&&(Ne=32849)),te===6408&&(Ae===5126&&(Ne=34836),Ae===5131&&(Ne=34842),Ae===5121&&(Ne=32856)),Ne!==33325&&Ne!==33326&&Ne!==34842&&Ne!==34836||e.get("EXT_color_buffer_float"),Ne}function C(J){return J===Jn||J===fl||J===ml?9728:9729}function U(J){const te=J.target;te.removeEventListener("dispose",U),function(Ae){const Ne=n.get(Ae);Ne.__webglInit!==void 0&&(r.deleteTexture(Ne.__webglTexture),n.remove(Ae))}(te),te.isVideoTexture&&f.delete(te),s.memory.textures--}function N(J){const te=J.target;te.removeEventListener("dispose",N),function(Ae){const Ne=Ae.texture,Te=n.get(Ae),Ge=n.get(Ne);if(!!Ae){if(Ge.__webglTexture!==void 0&&(r.deleteTexture(Ge.__webglTexture),s.memory.textures--),Ae.depthTexture&&Ae.depthTexture.dispose(),Ae.isWebGLCubeRenderTarget)for(let Ye=0;Ye<6;Ye++)r.deleteFramebuffer(Te.__webglFramebuffer[Ye]),Te.__webglDepthbuffer&&r.deleteRenderbuffer(Te.__webglDepthbuffer[Ye]);else r.deleteFramebuffer(Te.__webglFramebuffer),Te.__webglDepthbuffer&&r.deleteRenderbuffer(Te.__webglDepthbuffer),Te.__webglMultisampledFramebuffer&&r.deleteFramebuffer(Te.__webglMultisampledFramebuffer),Te.__webglColorRenderbuffer&&r.deleteRenderbuffer(Te.__webglColorRenderbuffer),Te.__webglDepthRenderbuffer&&r.deleteRenderbuffer(Te.__webglDepthRenderbuffer);if(Ae.isWebGLMultipleRenderTargets)for(let Ye=0,ve=Ne.length;Ye<ve;Ye++){const Y=n.get(Ne[Ye]);Y.__webglTexture&&(r.deleteTexture(Y.__webglTexture),s.memory.textures--),n.remove(Ne[Ye])}n.remove(Ne),n.remove(Ae)}}(te)}let G=0;function he(J,te){const Ae=n.get(J);if(J.isVideoTexture&&function(Ne){const Te=s.render.frame;f.get(Ne)!==Te&&(f.set(Ne,Te),Ne.update())}(J),J.version>0&&Ae.__version!==J.version){const Ne=J.image;if(Ne===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(Ne.complete!==!1)return void me(Ae,J,te);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}t.activeTexture(33984+te),t.bindTexture(3553,Ae.__webglTexture)}function ne(J,te){const Ae=n.get(J);J.version>0&&Ae.__version!==J.version?function(Ne,Te,Ge){if(Te.image.length!==6)return;se(Ne,Te),t.activeTexture(33984+Ge),t.bindTexture(34067,Ne.__webglTexture),r.pixelStorei(37440,Te.flipY),r.pixelStorei(37441,Te.premultiplyAlpha),r.pixelStorei(3317,Te.unpackAlignment),r.pixelStorei(37443,0);const Ye=Te&&(Te.isCompressedTexture||Te.image[0].isCompressedTexture),ve=Te.image[0]&&Te.image[0].isDataTexture,Y=[];for(let _t=0;_t<6;_t++)Y[_t]=Ye||ve?ve?Te.image[_t].image:Te.image[_t]:y(Te.image[_t],!1,!0,u);const pe=Y[0],ye=w(pe)||a,xe=o.convert(Te.format),De=o.convert(Te.type),ht=F(Te.internalFormat,xe,De);let xt;if($(34067,Te,ye),Ye){for(let _t=0;_t<6;_t++){xt=Y[_t].mipmaps;for(let Gt=0;Gt<xt.length;Gt++){const Wt=xt[Gt];Te.format!==tr&&Te.format!==fo?xe!==null?t.compressedTexImage2D(34069+_t,Gt,ht,Wt.width,Wt.height,0,Wt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):t.texImage2D(34069+_t,Gt,ht,Wt.width,Wt.height,0,xe,De,Wt.data)}}Ne.__maxMipLevel=xt.length-1}else{xt=Te.mipmaps;for(let _t=0;_t<6;_t++)if(ve){t.texImage2D(34069+_t,0,ht,Y[_t].width,Y[_t].height,0,xe,De,Y[_t].data);for(let Gt=0;Gt<xt.length;Gt++){const Wt=xt[Gt].image[_t].image;t.texImage2D(34069+_t,Gt+1,ht,Wt.width,Wt.height,0,xe,De,Wt.data)}}else{t.texImage2D(34069+_t,0,ht,xe,De,Y[_t]);for(let Gt=0;Gt<xt.length;Gt++){const Wt=xt[Gt];t.texImage2D(34069+_t,Gt+1,ht,xe,De,Wt.image[_t])}}Ne.__maxMipLevel=xt.length}M(Te,ye)&&R(34067,Te,pe.width,pe.height),Ne.__version=Te.version,Te.onUpdate&&Te.onUpdate(Te)}(Ae,J,te):(t.activeTexture(33984+te),t.bindTexture(34067,Ae.__webglTexture))}const Z={[Vo]:10497,[gi]:33071,[pl]:33648},Q={[Jn]:9728,[fl]:9984,[ml]:9986,[$n]:9729,[jo]:9985,[Ms]:9987};function $(J,te,Ae){if(Ae?(r.texParameteri(J,10242,Z[te.wrapS]),r.texParameteri(J,10243,Z[te.wrapT]),J!==32879&&J!==35866||r.texParameteri(J,32882,Z[te.wrapR]),r.texParameteri(J,10240,Q[te.magFilter]),r.texParameteri(J,10241,Q[te.minFilter])):(r.texParameteri(J,10242,33071),r.texParameteri(J,10243,33071),J!==32879&&J!==35866||r.texParameteri(J,32882,33071),te.wrapS===gi&&te.wrapT===gi||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),r.texParameteri(J,10240,C(te.magFilter)),r.texParameteri(J,10241,C(te.minFilter)),te.minFilter!==Jn&&te.minFilter!==$n&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){const Ne=e.get("EXT_texture_filter_anisotropic");if(te.type===po&&e.has("OES_texture_float_linear")===!1||a===!1&&te.type===Ps&&e.has("OES_texture_half_float_linear")===!1)return;(te.anisotropy>1||n.get(te).__currentAnisotropy)&&(r.texParameterf(J,Ne.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(te.anisotropy,i.getMaxAnisotropy())),n.get(te).__currentAnisotropy=te.anisotropy)}}function se(J,te){J.__webglInit===void 0&&(J.__webglInit=!0,te.addEventListener("dispose",U),J.__webglTexture=r.createTexture(),s.memory.textures++)}function me(J,te,Ae){let Ne=3553;te.isDataTexture2DArray&&(Ne=35866),te.isDataTexture3D&&(Ne=32879),se(J,te),t.activeTexture(33984+Ae),t.bindTexture(Ne,J.__webglTexture),r.pixelStorei(37440,te.flipY),r.pixelStorei(37441,te.premultiplyAlpha),r.pixelStorei(3317,te.unpackAlignment),r.pixelStorei(37443,0);const Te=function(De){return!a&&(De.wrapS!==gi||De.wrapT!==gi||De.minFilter!==Jn&&De.minFilter!==$n)}(te)&&w(te.image)===!1,Ge=y(te.image,Te,!1,c),Ye=w(Ge)||a,ve=o.convert(te.format);let Y,pe=o.convert(te.type),ye=F(te.internalFormat,ve,pe);$(Ne,te,Ye);const xe=te.mipmaps;if(te.isDepthTexture)ye=6402,a?ye=te.type===po?36012:te.type===As?33190:te.type===dn?35056:33189:te.type===po&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),te.format===Nn&&ye===6402&&te.type!==gl&&te.type!==As&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),te.type=gl,pe=o.convert(te.type)),te.format===Cs&&ye===6402&&(ye=34041,te.type!==dn&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),te.type=dn,pe=o.convert(te.type))),t.texImage2D(3553,0,ye,Ge.width,Ge.height,0,ve,pe,null);else if(te.isDataTexture)if(xe.length>0&&Ye){for(let De=0,ht=xe.length;De<ht;De++)Y=xe[De],t.texImage2D(3553,De,ye,Y.width,Y.height,0,ve,pe,Y.data);te.generateMipmaps=!1,J.__maxMipLevel=xe.length-1}else t.texImage2D(3553,0,ye,Ge.width,Ge.height,0,ve,pe,Ge.data),J.__maxMipLevel=0;else if(te.isCompressedTexture){for(let De=0,ht=xe.length;De<ht;De++)Y=xe[De],te.format!==tr&&te.format!==fo?ve!==null?t.compressedTexImage2D(3553,De,ye,Y.width,Y.height,0,Y.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):t.texImage2D(3553,De,ye,Y.width,Y.height,0,ve,pe,Y.data);J.__maxMipLevel=xe.length-1}else if(te.isDataTexture2DArray)t.texImage3D(35866,0,ye,Ge.width,Ge.height,Ge.depth,0,ve,pe,Ge.data),J.__maxMipLevel=0;else if(te.isDataTexture3D)t.texImage3D(32879,0,ye,Ge.width,Ge.height,Ge.depth,0,ve,pe,Ge.data),J.__maxMipLevel=0;else if(xe.length>0&&Ye){for(let De=0,ht=xe.length;De<ht;De++)Y=xe[De],t.texImage2D(3553,De,ye,ve,pe,Y);te.generateMipmaps=!1,J.__maxMipLevel=xe.length-1}else t.texImage2D(3553,0,ye,ve,pe,Ge),J.__maxMipLevel=0;M(te,Ye)&&R(Ne,te,Ge.width,Ge.height),J.__version=te.version,te.onUpdate&&te.onUpdate(te)}function ge(J,te,Ae,Ne,Te){const Ge=o.convert(Ae.format),Ye=o.convert(Ae.type),ve=F(Ae.internalFormat,Ge,Ye);Te===32879||Te===35866?t.texImage3D(Te,0,ve,te.width,te.height,te.depth,0,Ge,Ye,null):t.texImage2D(Te,0,ve,te.width,te.height,0,Ge,Ye,null),t.bindFramebuffer(36160,J),r.framebufferTexture2D(36160,Ne,Te,n.get(Ae).__webglTexture,0),t.bindFramebuffer(36160,null)}function de(J,te,Ae){if(r.bindRenderbuffer(36161,J),te.depthBuffer&&!te.stencilBuffer){let Ne=33189;if(Ae){const Te=te.depthTexture;Te&&Te.isDepthTexture&&(Te.type===po?Ne=36012:Te.type===As&&(Ne=33190));const Ge=Re(te);r.renderbufferStorageMultisample(36161,Ge,Ne,te.width,te.height)}else r.renderbufferStorage(36161,Ne,te.width,te.height);r.framebufferRenderbuffer(36160,36096,36161,J)}else if(te.depthBuffer&&te.stencilBuffer){if(Ae){const Ne=Re(te);r.renderbufferStorageMultisample(36161,Ne,35056,te.width,te.height)}else r.renderbufferStorage(36161,34041,te.width,te.height);r.framebufferRenderbuffer(36160,33306,36161,J)}else{const Ne=te.isWebGLMultipleRenderTargets===!0?te.texture[0]:te.texture,Te=o.convert(Ne.format),Ge=o.convert(Ne.type),Ye=F(Ne.internalFormat,Te,Ge);if(Ae){const ve=Re(te);r.renderbufferStorageMultisample(36161,ve,Ye,te.width,te.height)}else r.renderbufferStorage(36161,Ye,te.width,te.height)}r.bindRenderbuffer(36161,null)}function fe(J){const te=n.get(J),Ae=J.isWebGLCubeRenderTarget===!0;if(J.depthTexture){if(Ae)throw new Error("target.depthTexture not supported in Cube render targets");(function(Ne,Te){if(Te&&Te.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,Ne),!Te.depthTexture||!Te.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");n.get(Te.depthTexture).__webglTexture&&Te.depthTexture.image.width===Te.width&&Te.depthTexture.image.height===Te.height||(Te.depthTexture.image.width=Te.width,Te.depthTexture.image.height=Te.height,Te.depthTexture.needsUpdate=!0),he(Te.depthTexture,0);const Ge=n.get(Te.depthTexture).__webglTexture;if(Te.depthTexture.format===Nn)r.framebufferTexture2D(36160,36096,3553,Ge,0);else{if(Te.depthTexture.format!==Cs)throw new Error("Unknown depthTexture format");r.framebufferTexture2D(36160,33306,3553,Ge,0)}})(te.__webglFramebuffer,J)}else if(Ae){te.__webglDepthbuffer=[];for(let Ne=0;Ne<6;Ne++)t.bindFramebuffer(36160,te.__webglFramebuffer[Ne]),te.__webglDepthbuffer[Ne]=r.createRenderbuffer(),de(te.__webglDepthbuffer[Ne],J,!1)}else t.bindFramebuffer(36160,te.__webglFramebuffer),te.__webglDepthbuffer=r.createRenderbuffer(),de(te.__webglDepthbuffer,J,!1);t.bindFramebuffer(36160,null)}function Re(J){return a&&J.isWebGLMultisampleRenderTarget?Math.min(d,J.samples):0}let ke=!1,Be=!1;this.allocateTextureUnit=function(){const J=G;return J>=l&&console.warn("THREE.WebGLTextures: Trying to use "+J+" texture units while this GPU supports only "+l),G+=1,J},this.resetTextureUnits=function(){G=0},this.setTexture2D=he,this.setTexture2DArray=function(J,te){const Ae=n.get(J);J.version>0&&Ae.__version!==J.version?me(Ae,J,te):(t.activeTexture(33984+te),t.bindTexture(35866,Ae.__webglTexture))},this.setTexture3D=function(J,te){const Ae=n.get(J);J.version>0&&Ae.__version!==J.version?me(Ae,J,te):(t.activeTexture(33984+te),t.bindTexture(32879,Ae.__webglTexture))},this.setTextureCube=ne,this.setupRenderTarget=function(J){const te=J.texture,Ae=n.get(J),Ne=n.get(te);J.addEventListener("dispose",N),J.isWebGLMultipleRenderTargets!==!0&&(Ne.__webglTexture=r.createTexture(),Ne.__version=te.version,s.memory.textures++);const Te=J.isWebGLCubeRenderTarget===!0,Ge=J.isWebGLMultipleRenderTargets===!0,Ye=J.isWebGLMultisampleRenderTarget===!0,ve=te.isDataTexture3D||te.isDataTexture2DArray,Y=w(J)||a;if(!a||te.format!==fo||te.type!==po&&te.type!==Ps||(te.format=tr,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),Te){Ae.__webglFramebuffer=[];for(let pe=0;pe<6;pe++)Ae.__webglFramebuffer[pe]=r.createFramebuffer()}else if(Ae.__webglFramebuffer=r.createFramebuffer(),Ge)if(i.drawBuffers){const pe=J.texture;for(let ye=0,xe=pe.length;ye<xe;ye++){const De=n.get(pe[ye]);De.__webglTexture===void 0&&(De.__webglTexture=r.createTexture(),s.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(Ye)if(a){Ae.__webglMultisampledFramebuffer=r.createFramebuffer(),Ae.__webglColorRenderbuffer=r.createRenderbuffer(),r.bindRenderbuffer(36161,Ae.__webglColorRenderbuffer);const pe=o.convert(te.format),ye=o.convert(te.type),xe=F(te.internalFormat,pe,ye),De=Re(J);r.renderbufferStorageMultisample(36161,De,xe,J.width,J.height),t.bindFramebuffer(36160,Ae.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(36160,36064,36161,Ae.__webglColorRenderbuffer),r.bindRenderbuffer(36161,null),J.depthBuffer&&(Ae.__webglDepthRenderbuffer=r.createRenderbuffer(),de(Ae.__webglDepthRenderbuffer,J,!0)),t.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(Te){t.bindTexture(34067,Ne.__webglTexture),$(34067,te,Y);for(let pe=0;pe<6;pe++)ge(Ae.__webglFramebuffer[pe],J,te,36064,34069+pe);M(te,Y)&&R(34067,te,J.width,J.height),t.bindTexture(34067,null)}else if(Ge){const pe=J.texture;for(let ye=0,xe=pe.length;ye<xe;ye++){const De=pe[ye],ht=n.get(De);t.bindTexture(3553,ht.__webglTexture),$(3553,De,Y),ge(Ae.__webglFramebuffer,J,De,36064+ye,3553),M(De,Y)&&R(3553,De,J.width,J.height)}t.bindTexture(3553,null)}else{let pe=3553;ve&&(a?pe=te.isDataTexture3D?32879:35866:console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")),t.bindTexture(pe,Ne.__webglTexture),$(pe,te,Y),ge(Ae.__webglFramebuffer,J,te,36064,pe),M(te,Y)&&R(pe,te,J.width,J.height,J.depth),t.bindTexture(pe,null)}J.depthBuffer&&fe(J)},this.updateRenderTargetMipmap=function(J){const te=w(J)||a,Ae=J.isWebGLMultipleRenderTargets===!0?J.texture:[J.texture];for(let Ne=0,Te=Ae.length;Ne<Te;Ne++){const Ge=Ae[Ne];if(M(Ge,te)){const Ye=J.isWebGLCubeRenderTarget?34067:3553,ve=n.get(Ge).__webglTexture;t.bindTexture(Ye,ve),R(Ye,Ge,J.width,J.height),t.bindTexture(Ye,null)}}},this.updateMultisampleRenderTarget=function(J){if(J.isWebGLMultisampleRenderTarget)if(a){const te=J.width,Ae=J.height;let Ne=16384;J.depthBuffer&&(Ne|=256),J.stencilBuffer&&(Ne|=1024);const Te=n.get(J);t.bindFramebuffer(36008,Te.__webglMultisampledFramebuffer),t.bindFramebuffer(36009,Te.__webglFramebuffer),r.blitFramebuffer(0,0,te,Ae,0,0,te,Ae,Ne,9728),t.bindFramebuffer(36008,null),t.bindFramebuffer(36009,Te.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(J,te){J&&J.isWebGLRenderTarget&&(ke===!1&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),ke=!0),J=J.texture),he(J,te)},this.safeSetTextureCube=function(J,te){J&&J.isWebGLCubeRenderTarget&&(Be===!1&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),Be=!0),J=J.texture),ne(J,te)}}function Yf(r,e,t){const n=t.isWebGL2;return{convert:function(i){let o;if(i===Wo)return 5121;if(i===Yp)return 32819;if(i===qp)return 32820;if(i===Zp)return 33635;if(i===jp)return 5120;if(i===Wp)return 5122;if(i===gl)return 5123;if(i===Xp)return 5124;if(i===As)return 5125;if(i===po)return 5126;if(i===Ps)return n?5131:(o=e.get("OES_texture_half_float"),o!==null?o.HALF_FLOAT_OES:null);if(i===_n)return 6406;if(i===fo)return 6407;if(i===tr)return 6408;if(i===Jp)return 6409;if(i===Tc)return 6410;if(i===Nn)return 6402;if(i===Cs)return 34041;if(i===ya)return 6403;if(i===Sc)return 36244;if(i===Lu)return 33319;if(i===nr)return 33320;if(i===Ec)return 36248;if(i===Mc)return 36249;if(i===Ou||i===Du||i===Nu||i===Fu){if(o=e.get("WEBGL_compressed_texture_s3tc"),o===null)return null;if(i===Ou)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Du)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Nu)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===Fu)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(i===Ui||i===Ac||i===Wi||i===Pc){if(o=e.get("WEBGL_compressed_texture_pvrtc"),o===null)return null;if(i===Ui)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===Ac)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===Wi)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===Pc)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(i===Cc)return o=e.get("WEBGL_compressed_texture_etc1"),o!==null?o.COMPRESSED_RGB_ETC1_WEBGL:null;if((i===qr||i===xa)&&(o=e.get("WEBGL_compressed_texture_etc"),o!==null)){if(i===qr)return o.COMPRESSED_RGB8_ETC2;if(i===xa)return o.COMPRESSED_RGBA8_ETC2_EAC}return i===Bu||i===Tn||i===mo||i===Uu||i===Kp||i===ku||i===Qp||i===Rc||i===vl||i===Rs||i===ef||i===Ic||i===Lc||i===Gu||i===Oc||i===zu||i===Vu||i===Dc||i===Xi||i===ju||i===ba||i===Nc||i===Fc||i===tf||i===nf||i===rf||i===of||i===Is?(o=e.get("WEBGL_compressed_texture_astc"),o!==null?i:null):i===Hu?(o=e.get("EXT_texture_compression_bptc"),o!==null?i:null):i===dn?n?34042:(o=e.get("WEBGL_depth_texture"),o!==null?o.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}class bd extends ei{constructor(e=[]){super(),this.cameras=e}}bd.prototype.isArrayCamera=!0;class Js extends Xt{constructor(){super(),this.type="Group"}}Js.prototype.isGroup=!0;const wd={type:"move"};class Gl{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Js,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Js,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new T,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new T),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Js,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new T,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new T),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,o=null,s=null;const a=this._targetRay,l=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred")if(a!==null&&(i=t.getPose(e.targetRaySpace,n),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(wd))),u&&e.hand){s=!0;for(const _ of e.hand.values()){const y=t.getJointPose(_,n);if(u.joints[_.jointName]===void 0){const M=new Js;M.matrixAutoUpdate=!1,M.visible=!1,u.joints[_.jointName]=M,u.add(M)}const w=u.joints[_.jointName];y!==null&&(w.matrix.fromArray(y.transform.matrix),w.matrix.decompose(w.position,w.rotation,w.scale),w.jointRadius=y.radius),w.visible=y!==null}const c=u.joints["index-finger-tip"],d=u.joints["thumb-tip"],f=c.position.distanceTo(d.position),m=.02,g=.005;u.inputState.pinching&&f>m+g?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&f<=m-g&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=t.getPose(e.gripSpace,n),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=o!==null),u!==null&&(u.visible=s!==null),this}}class _v extends _o{constructor(e,t){super();const n=this,i=e.state;let o=null,s=1,a=null,l="local-floor",u=null,c=null,d=null,f=null;const m=[],g=new Map,_=new ei;_.layers.enable(1),_.viewport=new pn;const y=new ei;y.layers.enable(2),y.viewport=new pn;const w=[_,y],M=new bd;M.layers.enable(1),M.layers.enable(2);let R=null,F=null;function C($){const se=g.get($.inputSource);se&&se.dispatchEvent({type:$.type,data:$.inputSource})}function U(){g.forEach(function($,se){$.disconnect(se)}),g.clear(),R=null,F=null,i.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),Q.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function N($){const se=o.inputSources;for(let me=0;me<m.length;me++)g.set(se[me],m[me]);for(let me=0;me<$.removed.length;me++){const ge=$.removed[me],de=g.get(ge);de&&(de.dispatchEvent({type:"disconnected",data:ge}),g.delete(ge))}for(let me=0;me<$.added.length;me++){const ge=$.added[me],de=g.get(ge);de&&de.dispatchEvent({type:"connected",data:ge})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function($){let se=m[$];return se===void 0&&(se=new Gl,m[$]=se),se.getTargetRaySpace()},this.getControllerGrip=function($){let se=m[$];return se===void 0&&(se=new Gl,m[$]=se),se.getGripSpace()},this.getHand=function($){let se=m[$];return se===void 0&&(se=new Gl,m[$]=se),se.getHandSpace()},this.setFramebufferScaleFactor=function($){s=$,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function($){l=$,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getSession=function(){return o},this.setSession=async function($){if(o=$,o!==null){o.addEventListener("select",C),o.addEventListener("selectstart",C),o.addEventListener("selectend",C),o.addEventListener("squeeze",C),o.addEventListener("squeezestart",C),o.addEventListener("squeezeend",C),o.addEventListener("end",U),o.addEventListener("inputsourceschange",N);const se=t.getContextAttributes();if(se.xrCompatible!==!0&&await t.makeXRCompatible(),o.renderState.layers===void 0){const me={antialias:se.antialias,alpha:se.alpha,depth:se.depth,stencil:se.stencil,framebufferScaleFactor:s},ge=new XRWebGLLayer(o,t,me);o.updateRenderState({baseLayer:ge})}else{let me=0;se.depth&&(me=se.stencil?34041:6402);const ge={colorFormat:se.alpha?6408:6407,depthFormat:me,scaleFactor:s};c=new XRWebGLBinding(o,t),f=c.createProjectionLayer(ge),d=t.createFramebuffer(),o.updateRenderState({layers:[f]})}a=await o.requestReferenceSpace(l),Q.setContext(o),Q.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const G=new T,he=new T;function ne($,se){se===null?$.matrixWorld.copy($.matrix):$.matrixWorld.multiplyMatrices(se.matrixWorld,$.matrix),$.matrixWorldInverse.copy($.matrixWorld).invert()}this.updateCamera=function($){if(o===null)return;M.near=y.near=_.near=$.near,M.far=y.far=_.far=$.far,R===M.near&&F===M.far||(o.updateRenderState({depthNear:M.near,depthFar:M.far}),R=M.near,F=M.far);const se=$.parent,me=M.cameras;ne(M,se);for(let de=0;de<me.length;de++)ne(me[de],se);M.matrixWorld.decompose(M.position,M.quaternion,M.scale),$.position.copy(M.position),$.quaternion.copy(M.quaternion),$.scale.copy(M.scale),$.matrix.copy(M.matrix),$.matrixWorld.copy(M.matrixWorld);const ge=$.children;for(let de=0,fe=ge.length;de<fe;de++)ge[de].updateMatrixWorld(!0);me.length===2?function(de,fe,Re){G.setFromMatrixPosition(fe.matrixWorld),he.setFromMatrixPosition(Re.matrixWorld);const ke=G.distanceTo(he),Be=fe.projectionMatrix.elements,J=Re.projectionMatrix.elements,te=Be[14]/(Be[10]-1),Ae=Be[14]/(Be[10]+1),Ne=(Be[9]+1)/Be[5],Te=(Be[9]-1)/Be[5],Ge=(Be[8]-1)/Be[0],Ye=(J[8]+1)/J[0],ve=te*Ge,Y=te*Ye,pe=ke/(-Ge+Ye),ye=pe*-Ge;fe.matrixWorld.decompose(de.position,de.quaternion,de.scale),de.translateX(ye),de.translateZ(pe),de.matrixWorld.compose(de.position,de.quaternion,de.scale),de.matrixWorldInverse.copy(de.matrixWorld).invert();const xe=te+pe,De=Ae+pe,ht=ve-ye,xt=Y+(ke-ye),_t=Ne*Ae/De*xe,Gt=Te*Ae/De*xe;de.projectionMatrix.makePerspective(ht,xt,_t,Gt,xe,De)}(M,_,y):M.projectionMatrix.copy(_.projectionMatrix)},this.getCamera=function(){return M};let Z=null;const Q=new sd;Q.setAnimationLoop(function($,se){if(u=se.getViewerPose(a),u!==null){const ge=u.views,de=o.renderState.baseLayer;o.renderState.layers===void 0&&i.bindXRFramebuffer(de.framebuffer);let fe=!1;ge.length!==M.cameras.length&&(M.cameras.length=0,fe=!0);for(let Re=0;Re<ge.length;Re++){const ke=ge[Re];let Be=null;if(o.renderState.layers===void 0)Be=de.getViewport(ke);else{const te=c.getViewSubImage(f,ke);i.bindXRFramebuffer(d),t.framebufferTexture2D(36160,36064,3553,te.colorTexture,0),te.depthStencilTexture!==void 0&&t.framebufferTexture2D(36160,36096,3553,te.depthStencilTexture,0),Be=te.viewport}const J=w[Re];J.matrix.fromArray(ke.transform.matrix),J.projectionMatrix.fromArray(ke.projectionMatrix),J.viewport.set(Be.x,Be.y,Be.width,Be.height),Re===0&&M.matrix.copy(J.matrix),fe===!0&&M.cameras.push(J)}}const me=o.inputSources;for(let ge=0;ge<m.length;ge++){const de=m[ge],fe=me[ge];de.update(fe,se,a)}Z&&Z($,se)}),this.setAnimationLoop=function($){Z=$},this.dispose=function(){}}}function yv(r){function e(n,i){n.opacity.value=i.opacity,i.color&&n.diffuse.value.copy(i.color),i.emissive&&n.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),i.map&&(n.map.value=i.map),i.alphaMap&&(n.alphaMap.value=i.alphaMap),i.specularMap&&(n.specularMap.value=i.specularMap);const o=r.get(i).envMap;if(o){n.envMap.value=o,n.flipEnvMap.value=o.isCubeTexture&&o._needsFlipEnvMap?-1:1,n.reflectivity.value=i.reflectivity,n.refractionRatio.value=i.refractionRatio;const l=r.get(o).__maxMipLevel;l!==void 0&&(n.maxMipLevel.value=l)}let s,a;i.lightMap&&(n.lightMap.value=i.lightMap,n.lightMapIntensity.value=i.lightMapIntensity),i.aoMap&&(n.aoMap.value=i.aoMap,n.aoMapIntensity.value=i.aoMapIntensity),i.map?s=i.map:i.specularMap?s=i.specularMap:i.displacementMap?s=i.displacementMap:i.normalMap?s=i.normalMap:i.bumpMap?s=i.bumpMap:i.roughnessMap?s=i.roughnessMap:i.metalnessMap?s=i.metalnessMap:i.alphaMap?s=i.alphaMap:i.emissiveMap?s=i.emissiveMap:i.clearcoatMap?s=i.clearcoatMap:i.clearcoatNormalMap?s=i.clearcoatNormalMap:i.clearcoatRoughnessMap&&(s=i.clearcoatRoughnessMap),s!==void 0&&(s.isWebGLRenderTarget&&(s=s.texture),s.matrixAutoUpdate===!0&&s.updateMatrix(),n.uvTransform.value.copy(s.matrix)),i.aoMap?a=i.aoMap:i.lightMap&&(a=i.lightMap),a!==void 0&&(a.isWebGLRenderTarget&&(a=a.texture),a.matrixAutoUpdate===!0&&a.updateMatrix(),n.uv2Transform.value.copy(a.matrix))}function t(n,i){n.roughness.value=i.roughness,n.metalness.value=i.metalness,i.roughnessMap&&(n.roughnessMap.value=i.roughnessMap),i.metalnessMap&&(n.metalnessMap.value=i.metalnessMap),i.emissiveMap&&(n.emissiveMap.value=i.emissiveMap),i.bumpMap&&(n.bumpMap.value=i.bumpMap,n.bumpScale.value=i.bumpScale,i.side===W&&(n.bumpScale.value*=-1)),i.normalMap&&(n.normalMap.value=i.normalMap,n.normalScale.value.copy(i.normalScale),i.side===W&&n.normalScale.value.negate()),i.displacementMap&&(n.displacementMap.value=i.displacementMap,n.displacementScale.value=i.displacementScale,n.displacementBias.value=i.displacementBias),r.get(i).envMap&&(n.envMapIntensity.value=i.envMapIntensity)}return{refreshFogUniforms:function(n,i){n.fogColor.value.copy(i.color),i.isFog?(n.fogNear.value=i.near,n.fogFar.value=i.far):i.isFogExp2&&(n.fogDensity.value=i.density)},refreshMaterialUniforms:function(n,i,o,s,a){i.isMeshBasicMaterial?e(n,i):i.isMeshLambertMaterial?(e(n,i),function(l,u){u.emissiveMap&&(l.emissiveMap.value=u.emissiveMap)}(n,i)):i.isMeshToonMaterial?(e(n,i),function(l,u){u.gradientMap&&(l.gradientMap.value=u.gradientMap),u.emissiveMap&&(l.emissiveMap.value=u.emissiveMap),u.bumpMap&&(l.bumpMap.value=u.bumpMap,l.bumpScale.value=u.bumpScale,u.side===W&&(l.bumpScale.value*=-1)),u.normalMap&&(l.normalMap.value=u.normalMap,l.normalScale.value.copy(u.normalScale),u.side===W&&l.normalScale.value.negate()),u.displacementMap&&(l.displacementMap.value=u.displacementMap,l.displacementScale.value=u.displacementScale,l.displacementBias.value=u.displacementBias)}(n,i)):i.isMeshPhongMaterial?(e(n,i),function(l,u){l.specular.value.copy(u.specular),l.shininess.value=Math.max(u.shininess,1e-4),u.emissiveMap&&(l.emissiveMap.value=u.emissiveMap),u.bumpMap&&(l.bumpMap.value=u.bumpMap,l.bumpScale.value=u.bumpScale,u.side===W&&(l.bumpScale.value*=-1)),u.normalMap&&(l.normalMap.value=u.normalMap,l.normalScale.value.copy(u.normalScale),u.side===W&&l.normalScale.value.negate()),u.displacementMap&&(l.displacementMap.value=u.displacementMap,l.displacementScale.value=u.displacementScale,l.displacementBias.value=u.displacementBias)}(n,i)):i.isMeshStandardMaterial?(e(n,i),i.isMeshPhysicalMaterial?function(l,u,c){t(l,u),l.reflectivity.value=u.reflectivity,l.clearcoat.value=u.clearcoat,l.clearcoatRoughness.value=u.clearcoatRoughness,u.sheen&&l.sheen.value.copy(u.sheen),u.clearcoatMap&&(l.clearcoatMap.value=u.clearcoatMap),u.clearcoatRoughnessMap&&(l.clearcoatRoughnessMap.value=u.clearcoatRoughnessMap),u.clearcoatNormalMap&&(l.clearcoatNormalScale.value.copy(u.clearcoatNormalScale),l.clearcoatNormalMap.value=u.clearcoatNormalMap,u.side===W&&l.clearcoatNormalScale.value.negate()),l.transmission.value=u.transmission,u.transmissionMap&&(l.transmissionMap.value=u.transmissionMap),u.transmission>0&&(l.transmissionSamplerMap.value=c.texture,l.transmissionSamplerSize.value.set(c.width,c.height)),l.thickness.value=u.thickness,u.thicknessMap&&(l.thicknessMap.value=u.thicknessMap),l.attenuationDistance.value=u.attenuationDistance,l.attenuationColor.value.copy(u.attenuationColor)}(n,i,a):t(n,i)):i.isMeshMatcapMaterial?(e(n,i),function(l,u){u.matcap&&(l.matcap.value=u.matcap),u.bumpMap&&(l.bumpMap.value=u.bumpMap,l.bumpScale.value=u.bumpScale,u.side===W&&(l.bumpScale.value*=-1)),u.normalMap&&(l.normalMap.value=u.normalMap,l.normalScale.value.copy(u.normalScale),u.side===W&&l.normalScale.value.negate()),u.displacementMap&&(l.displacementMap.value=u.displacementMap,l.displacementScale.value=u.displacementScale,l.displacementBias.value=u.displacementBias)}(n,i)):i.isMeshDepthMaterial?(e(n,i),function(l,u){u.displacementMap&&(l.displacementMap.value=u.displacementMap,l.displacementScale.value=u.displacementScale,l.displacementBias.value=u.displacementBias)}(n,i)):i.isMeshDistanceMaterial?(e(n,i),function(l,u){u.displacementMap&&(l.displacementMap.value=u.displacementMap,l.displacementScale.value=u.displacementScale,l.displacementBias.value=u.displacementBias),l.referencePosition.value.copy(u.referencePosition),l.nearDistance.value=u.nearDistance,l.farDistance.value=u.farDistance}(n,i)):i.isMeshNormalMaterial?(e(n,i),function(l,u){u.bumpMap&&(l.bumpMap.value=u.bumpMap,l.bumpScale.value=u.bumpScale,u.side===W&&(l.bumpScale.value*=-1)),u.normalMap&&(l.normalMap.value=u.normalMap,l.normalScale.value.copy(u.normalScale),u.side===W&&l.normalScale.value.negate()),u.displacementMap&&(l.displacementMap.value=u.displacementMap,l.displacementScale.value=u.displacementScale,l.displacementBias.value=u.displacementBias)}(n,i)):i.isLineBasicMaterial?(function(l,u){l.diffuse.value.copy(u.color),l.opacity.value=u.opacity}(n,i),i.isLineDashedMaterial&&function(l,u){l.dashSize.value=u.dashSize,l.totalSize.value=u.dashSize+u.gapSize,l.scale.value=u.scale}(n,i)):i.isPointsMaterial?function(l,u,c,d){l.diffuse.value.copy(u.color),l.opacity.value=u.opacity,l.size.value=u.size*c,l.scale.value=.5*d,u.map&&(l.map.value=u.map),u.alphaMap&&(l.alphaMap.value=u.alphaMap);let f;u.map?f=u.map:u.alphaMap&&(f=u.alphaMap),f!==void 0&&(f.matrixAutoUpdate===!0&&f.updateMatrix(),l.uvTransform.value.copy(f.matrix))}(n,i,o,s):i.isSpriteMaterial?function(l,u){l.diffuse.value.copy(u.color),l.opacity.value=u.opacity,l.rotation.value=u.rotation,u.map&&(l.map.value=u.map),u.alphaMap&&(l.alphaMap.value=u.alphaMap);let c;u.map?c=u.map:u.alphaMap&&(c=u.alphaMap),c!==void 0&&(c.matrixAutoUpdate===!0&&c.updateMatrix(),l.uvTransform.value.copy(c.matrix))}(n,i):i.isShadowMaterial?(n.color.value.copy(i.color),n.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function fn(r={}){const e=r.canvas!==void 0?r.canvas:function(){const ue=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return ue.style.display="block",ue}(),t=r.context!==void 0?r.context:null,n=r.alpha!==void 0&&r.alpha,i=r.depth===void 0||r.depth,o=r.stencil===void 0||r.stencil,s=r.antialias!==void 0&&r.antialias,a=r.premultipliedAlpha===void 0||r.premultipliedAlpha,l=r.preserveDrawingBuffer!==void 0&&r.preserveDrawingBuffer,u=r.powerPreference!==void 0?r.powerPreference:"default",c=r.failIfMajorPerformanceCaveat!==void 0&&r.failIfMajorPerformanceCaveat;let d=null,f=null;const m=[],g=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=wt,this.physicallyCorrectLights=!1,this.toneMapping=co,this.toneMappingExposure=1;const _=this;let y=!1,w=0,M=0,R=null,F=-1,C=null;const U=new pn,N=new pn;let G=null,he=e.width,ne=e.height,Z=1,Q=null,$=null;const se=new pn(0,0,he,ne),me=new pn(0,0,he,ne);let ge=!1;const de=[],fe=new Ba;let Re=!1,ke=!1,Be=null;const J=new pt,te=new T,Ae={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Ne(){return R===null?Z:1}let Te,Ge,Ye,ve,Y,pe,ye,xe,De,ht,xt,_t,Gt,Wt,ai,Cn,ko,Sp,Ep,Mp,pr,Ir,it=t;function ZT(ue,Ve){for(let Le=0;Le<ue.length;Le++){const We=ue[Le],ot=e.getContext(We,Ve);if(ot!==null)return ot}return null}try{const ue={alpha:n,depth:i,stencil:o,antialias:s,premultipliedAlpha:a,preserveDrawingBuffer:l,powerPreference:u,failIfMajorPerformanceCaveat:c};if(e.addEventListener("webglcontextlost",$T,!1),e.addEventListener("webglcontextrestored",KT,!1),it===null){const Ve=["webgl2","webgl","experimental-webgl"];if(_.isWebGL1Renderer===!0&&Ve.shift(),it=ZT(Ve,ue),it===null)throw ZT(Ve)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}it.getShaderPrecisionFormat===void 0&&(it.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(ue){throw console.error("THREE.WebGLRenderer: "+ue.message),ue}function JT(){Te=new jg(it),Ge=new yf(it,Te,r),Te.init(Ge),pr=new Yf(it,Te,Ge),Ye=new Eh(it,Te,Ge),de[0]=1029,ve=new Bl(it),Y=new Th,pe=new vv(it,Te,Ye,Y,Ge,pr,ve),ye=new bf(_),xe=new zg(it,Ge),Ir=new Fl(it,Te,xe,Ge),De=new ad(it,xe,ve,Ir),ht=new gh(it,De,xe,ve),Sp=new Sf(it),ai=new xf(Y),xt=new zf(_,ye,Te,Ge,Ir,ai),_t=new yv(Y),Gt=new gv(Y),Wt=new Xf(Te,Ge),ko=new Vg(_,ye,Ye,ht,a),Cn=new xd(_,ht,Ge),Ep=new _f(it,Te,ve,Ge),Mp=new wf(it,Te,ve,Ge),ve.programs=xt.programs,_.capabilities=Ge,_.extensions=Te,_.properties=Y,_.renderLists=Gt,_.shadowMap=Cn,_.state=Ye,_.info=ve}JT();const jr=new _v(_,it);function $T(ue){ue.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),y=!0}function KT(){console.log("THREE.WebGLRenderer: Context Restored."),y=!1;const ue=ve.autoReset,Ve=Cn.enabled,Le=Cn.autoUpdate,We=Cn.needsUpdate,ot=Cn.type;JT(),ve.autoReset=ue,Cn.enabled=Ve,Cn.autoUpdate=Le,Cn.needsUpdate=We,Cn.type=ot}function QT(ue){const Ve=ue.target;Ve.removeEventListener("dispose",QT),function(Le){(function(We){const ot=Y.get(We).programs;ot!==void 0&&ot.forEach(function(hn){xt.releaseProgram(hn)})})(Le),Y.remove(Le)}(Ve)}this.xr=jr,this.getContext=function(){return it},this.getContextAttributes=function(){return it.getContextAttributes()},this.forceContextLoss=function(){const ue=Te.get("WEBGL_lose_context");ue&&ue.loseContext()},this.forceContextRestore=function(){const ue=Te.get("WEBGL_lose_context");ue&&ue.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(ue){ue!==void 0&&(Z=ue,this.setSize(he,ne,!1))},this.getSize=function(ue){return ue.set(he,ne)},this.setSize=function(ue,Ve,Le){jr.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(he=ue,ne=Ve,e.width=Math.floor(ue*Z),e.height=Math.floor(Ve*Z),Le!==!1&&(e.style.width=ue+"px",e.style.height=Ve+"px"),this.setViewport(0,0,ue,Ve))},this.getDrawingBufferSize=function(ue){return ue.set(he*Z,ne*Z).floor()},this.setDrawingBufferSize=function(ue,Ve,Le){he=ue,ne=Ve,Z=Le,e.width=Math.floor(ue*Le),e.height=Math.floor(Ve*Le),this.setViewport(0,0,ue,Ve)},this.getCurrentViewport=function(ue){return ue.copy(U)},this.getViewport=function(ue){return ue.copy(se)},this.setViewport=function(ue,Ve,Le,We){ue.isVector4?se.set(ue.x,ue.y,ue.z,ue.w):se.set(ue,Ve,Le,We),Ye.viewport(U.copy(se).multiplyScalar(Z).floor())},this.getScissor=function(ue){return ue.copy(me)},this.setScissor=function(ue,Ve,Le,We){ue.isVector4?me.set(ue.x,ue.y,ue.z,ue.w):me.set(ue,Ve,Le,We),Ye.scissor(N.copy(me).multiplyScalar(Z).floor())},this.getScissorTest=function(){return ge},this.setScissorTest=function(ue){Ye.setScissorTest(ge=ue)},this.setOpaqueSort=function(ue){Q=ue},this.setTransparentSort=function(ue){$=ue},this.getClearColor=function(ue){return ue.copy(ko.getClearColor())},this.setClearColor=function(){ko.setClearColor.apply(ko,arguments)},this.getClearAlpha=function(){return ko.getClearAlpha()},this.setClearAlpha=function(){ko.setClearAlpha.apply(ko,arguments)},this.clear=function(ue,Ve,Le){let We=0;(ue===void 0||ue)&&(We|=16384),(Ve===void 0||Ve)&&(We|=256),(Le===void 0||Le)&&(We|=1024),it.clear(We)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){e.removeEventListener("webglcontextlost",$T,!1),e.removeEventListener("webglcontextrestored",KT,!1),Gt.dispose(),Wt.dispose(),Y.dispose(),ye.dispose(),ht.dispose(),Ir.dispose(),jr.dispose(),jr.removeEventListener("sessionstart",eS),jr.removeEventListener("sessionend",tS),Be&&(Be.dispose(),Be=null),Cu.stop()},this.renderBufferImmediate=function(ue,Ve){Ir.initAttributes();const Le=Y.get(ue);ue.hasPositions&&!Le.position&&(Le.position=it.createBuffer()),ue.hasNormals&&!Le.normal&&(Le.normal=it.createBuffer()),ue.hasUvs&&!Le.uv&&(Le.uv=it.createBuffer()),ue.hasColors&&!Le.color&&(Le.color=it.createBuffer());const We=Ve.getAttributes();ue.hasPositions&&(it.bindBuffer(34962,Le.position),it.bufferData(34962,ue.positionArray,35048),Ir.enableAttribute(We.position),it.vertexAttribPointer(We.position,3,5126,!1,0,0)),ue.hasNormals&&(it.bindBuffer(34962,Le.normal),it.bufferData(34962,ue.normalArray,35048),Ir.enableAttribute(We.normal),it.vertexAttribPointer(We.normal,3,5126,!1,0,0)),ue.hasUvs&&(it.bindBuffer(34962,Le.uv),it.bufferData(34962,ue.uvArray,35048),Ir.enableAttribute(We.uv),it.vertexAttribPointer(We.uv,2,5126,!1,0,0)),ue.hasColors&&(it.bindBuffer(34962,Le.color),it.bufferData(34962,ue.colorArray,35048),Ir.enableAttribute(We.color),it.vertexAttribPointer(We.color,3,5126,!1,0,0)),Ir.disableUnusedAttributes(),it.drawArrays(4,0,ue.count),ue.count=0},this.renderBufferDirect=function(ue,Ve,Le,We,ot,hn){Ve===null&&(Ve=Ae);const zt=ot.isMesh&&ot.matrixWorld.determinant()<0,ut=rS(ue,Ve,We,ot);Ye.setMaterial(We,zt);let Kt=Le.index;const Rt=Le.attributes.position;if(Kt===null){if(Rt===void 0||Rt.count===0)return}else if(Kt.count===0)return;let sn,kt=1;We.wireframe===!0&&(Kt=De.getWireframeAttribute(Le),kt=2),(We.morphTargets||We.morphNormals)&&Sp.update(ot,Le,We,ut),Ir.setup(ot,We,ut,Le,Kt);let rn=Ep;Kt!==null&&(sn=xe.get(Kt),rn=Mp,rn.setIndex(sn));const bi=Kt!==null?Kt.count:Rt.count,On=Le.drawRange.start*kt,Go=Le.drawRange.count*kt,Rn=hn!==null?hn.start*kt:0,Ss=hn!==null?hn.count*kt:1/0,Pi=Math.max(On,Rn),Wr=Math.min(bi,On+Go,Rn+Ss)-1,er=Math.max(0,Wr-Pi+1);if(er!==0){if(ot.isMesh)We.wireframe===!0?(Ye.setLineWidth(We.wireframeLinewidth*Ne()),rn.setMode(1)):rn.setMode(4);else if(ot.isLine){let Ap=We.linewidth;Ap===void 0&&(Ap=1),Ye.setLineWidth(Ap*Ne()),ot.isLineSegments?rn.setMode(1):ot.isLineLoop?rn.setMode(2):rn.setMode(3)}else ot.isPoints?rn.setMode(0):ot.isSprite&&rn.setMode(4);if(ot.isInstancedMesh)rn.renderInstances(Pi,er,ot.count);else if(Le.isInstancedBufferGeometry){const Ap=Math.min(Le.instanceCount,Le._maxInstanceCount);rn.renderInstances(Pi,er,Ap)}else rn.render(Pi,er)}},this.compile=function(ue,Ve){f=Wt.get(ue),f.init(),ue.traverseVisible(function(Le){Le.isLight&&Le.layers.test(Ve.layers)&&(f.pushLight(Le),Le.castShadow&&f.pushShadow(Le))}),f.setupLights(),ue.traverse(function(Le){const We=Le.material;if(We)if(Array.isArray(We))for(let ot=0;ot<We.length;ot++)ey(We[ot],ue,Le);else ey(We,ue,Le)})};let Q_=null;function eS(){Cu.stop()}function tS(){Cu.start()}const Cu=new sd;function bg(ue,Ve,Le){const We=Ve.isScene===!0?Ve.overrideMaterial:null;for(let ot=0,hn=ue.length;ot<hn;ot++){const zt=ue[ot],ut=zt.object,Kt=zt.geometry,Rt=We===null?zt.material:We,sn=zt.group;if(Le.isArrayCamera){const kt=Le.cameras;for(let rn=0,bi=kt.length;rn<bi;rn++){const On=kt[rn];ut.layers.test(On.layers)&&(Ye.viewport(U.copy(On.viewport)),f.setupLightsView(On),nS(ut,Ve,On,Kt,Rt,sn))}}else nS(ut,Ve,Le,Kt,Rt,sn)}}function nS(ue,Ve,Le,We,ot,hn){if(ue.onBeforeRender(_,Ve,Le,We,ot,hn),ue.modelViewMatrix.multiplyMatrices(Le.matrixWorldInverse,ue.matrixWorld),ue.normalMatrix.getNormalMatrix(ue.modelViewMatrix),ue.isImmediateRenderObject){const zt=rS(Le,Ve,ot,ue);Ye.setMaterial(ot),Ir.reset(),function(ut,Kt){ut.render(function(Rt){_.renderBufferImmediate(Rt,Kt)})}(ue,zt)}else ot.transparent===!0&&ot.side===ee?(ot.side=W,ot.needsUpdate=!0,_.renderBufferDirect(Le,Ve,We,ot,ue,hn),ot.side=z,ot.needsUpdate=!0,_.renderBufferDirect(Le,Ve,We,ot,ue,hn),ot.side=ee):_.renderBufferDirect(Le,Ve,We,ot,ue,hn);ue.onAfterRender(_,Ve,Le,We,ot,hn)}function ey(ue,Ve,Le){Ve.isScene!==!0&&(Ve=Ae);const We=Y.get(ue),ot=f.state.lights,hn=f.state.shadowsArray,zt=ot.state.version,ut=xt.getParameters(ue,ot.state,hn,Ve,Le),Kt=xt.getProgramCacheKey(ut);let Rt=We.programs;We.environment=ue.isMeshStandardMaterial?Ve.environment:null,We.fog=Ve.fog,We.envMap=ye.get(ue.envMap||We.environment),Rt===void 0&&(ue.addEventListener("dispose",QT),Rt=new Map,We.programs=Rt);let sn=Rt.get(Kt);if(sn!==void 0){if(We.currentProgram===sn&&We.lightsStateVersion===zt)return iS(ue,ut),sn}else ut.uniforms=xt.getUniforms(ue),ue.onBuild(ut,_),ue.onBeforeCompile(ut,_),sn=xt.acquireProgram(ut,Kt),Rt.set(Kt,sn),We.uniforms=ut.uniforms;const kt=We.uniforms;(ue.isShaderMaterial||ue.isRawShaderMaterial)&&ue.clipping!==!0||(kt.clippingPlanes=ai.uniform),iS(ue,ut),We.needsLights=function(On){return On.isMeshLambertMaterial||On.isMeshToonMaterial||On.isMeshPhongMaterial||On.isMeshStandardMaterial||On.isShadowMaterial||On.isShaderMaterial&&On.lights===!0}(ue),We.lightsStateVersion=zt,We.needsLights&&(kt.ambientLightColor.value=ot.state.ambient,kt.lightProbe.value=ot.state.probe,kt.directionalLights.value=ot.state.directional,kt.directionalLightShadows.value=ot.state.directionalShadow,kt.spotLights.value=ot.state.spot,kt.spotLightShadows.value=ot.state.spotShadow,kt.rectAreaLights.value=ot.state.rectArea,kt.ltc_1.value=ot.state.rectAreaLTC1,kt.ltc_2.value=ot.state.rectAreaLTC2,kt.pointLights.value=ot.state.point,kt.pointLightShadows.value=ot.state.pointShadow,kt.hemisphereLights.value=ot.state.hemi,kt.directionalShadowMap.value=ot.state.directionalShadowMap,kt.directionalShadowMatrix.value=ot.state.directionalShadowMatrix,kt.spotShadowMap.value=ot.state.spotShadowMap,kt.spotShadowMatrix.value=ot.state.spotShadowMatrix,kt.pointShadowMap.value=ot.state.pointShadowMap,kt.pointShadowMatrix.value=ot.state.pointShadowMatrix);const rn=sn.getUniforms(),bi=is.seqWithValue(rn.seq,kt);return We.currentProgram=sn,We.uniformsList=bi,sn}function iS(ue,Ve){const Le=Y.get(ue);Le.outputEncoding=Ve.outputEncoding,Le.instancing=Ve.instancing,Le.skinning=Ve.skinning,Le.numClippingPlanes=Ve.numClippingPlanes,Le.numIntersection=Ve.numClipIntersection,Le.vertexAlphas=Ve.vertexAlphas}function rS(ue,Ve,Le,We){Ve.isScene!==!0&&(Ve=Ae),pe.resetTextureUnits();const ot=Ve.fog,hn=Le.isMeshStandardMaterial?Ve.environment:null,zt=R===null?_.outputEncoding:R.texture.encoding,ut=ye.get(Le.envMap||hn),Kt=Le.vertexColors===!0&&We.geometry&&We.geometry.attributes.color&&We.geometry.attributes.color.itemSize===4,Rt=Y.get(Le),sn=f.state.lights;if(Re===!0&&(ke===!0||ue!==C)){const er=ue===C&&Le.id===F;ai.setState(Le,ue,er)}let kt=!1;Le.version===Rt.__version?Rt.needsLights&&Rt.lightsStateVersion!==sn.state.version||Rt.outputEncoding!==zt||We.isInstancedMesh&&Rt.instancing===!1?kt=!0:We.isInstancedMesh||Rt.instancing!==!0?We.isSkinnedMesh&&Rt.skinning===!1?kt=!0:We.isSkinnedMesh||Rt.skinning!==!0?Rt.envMap!==ut||Le.fog&&Rt.fog!==ot?kt=!0:Rt.numClippingPlanes===void 0||Rt.numClippingPlanes===ai.numPlanes&&Rt.numIntersection===ai.numIntersection?Rt.vertexAlphas!==Kt&&(kt=!0):kt=!0:kt=!0:kt=!0:(kt=!0,Rt.__version=Le.version);let rn=Rt.currentProgram;kt===!0&&(rn=ey(Le,Ve,We));let bi=!1,On=!1,Go=!1;const Rn=rn.getUniforms(),Ss=Rt.uniforms;if(Ye.useProgram(rn.program)&&(bi=!0,On=!0,Go=!0),Le.id!==F&&(F=Le.id,On=!0),bi||C!==ue){if(Rn.setValue(it,"projectionMatrix",ue.projectionMatrix),Ge.logarithmicDepthBuffer&&Rn.setValue(it,"logDepthBufFC",2/(Math.log(ue.far+1)/Math.LN2)),C!==ue&&(C=ue,On=!0,Go=!0),Le.isShaderMaterial||Le.isMeshPhongMaterial||Le.isMeshToonMaterial||Le.isMeshStandardMaterial||Le.envMap){const er=Rn.map.cameraPosition;er!==void 0&&er.setValue(it,te.setFromMatrixPosition(ue.matrixWorld))}(Le.isMeshPhongMaterial||Le.isMeshToonMaterial||Le.isMeshLambertMaterial||Le.isMeshBasicMaterial||Le.isMeshStandardMaterial||Le.isShaderMaterial)&&Rn.setValue(it,"isOrthographic",ue.isOrthographicCamera===!0),(Le.isMeshPhongMaterial||Le.isMeshToonMaterial||Le.isMeshLambertMaterial||Le.isMeshBasicMaterial||Le.isMeshStandardMaterial||Le.isShaderMaterial||Le.isShadowMaterial||We.isSkinnedMesh)&&Rn.setValue(it,"viewMatrix",ue.matrixWorldInverse)}if(We.isSkinnedMesh){Rn.setOptional(it,We,"bindMatrix"),Rn.setOptional(it,We,"bindMatrixInverse");const er=We.skeleton;er&&(Ge.floatVertexTextures?(er.boneTexture===null&&er.computeBoneTexture(),Rn.setValue(it,"boneTexture",er.boneTexture,pe),Rn.setValue(it,"boneTextureSize",er.boneTextureSize)):Rn.setOptional(it,er,"boneMatrices"))}var Pi,Wr;return(On||Rt.receiveShadow!==We.receiveShadow)&&(Rt.receiveShadow=We.receiveShadow,Rn.setValue(it,"receiveShadow",We.receiveShadow)),On&&(Rn.setValue(it,"toneMappingExposure",_.toneMappingExposure),Rt.needsLights&&(Wr=Go,(Pi=Ss).ambientLightColor.needsUpdate=Wr,Pi.lightProbe.needsUpdate=Wr,Pi.directionalLights.needsUpdate=Wr,Pi.directionalLightShadows.needsUpdate=Wr,Pi.pointLights.needsUpdate=Wr,Pi.pointLightShadows.needsUpdate=Wr,Pi.spotLights.needsUpdate=Wr,Pi.spotLightShadows.needsUpdate=Wr,Pi.rectAreaLights.needsUpdate=Wr,Pi.hemisphereLights.needsUpdate=Wr),ot&&Le.fog&&_t.refreshFogUniforms(Ss,ot),_t.refreshMaterialUniforms(Ss,Le,Z,ne,Be),is.upload(it,Rt.uniformsList,Ss,pe)),Le.isShaderMaterial&&Le.uniformsNeedUpdate===!0&&(is.upload(it,Rt.uniformsList,Ss,pe),Le.uniformsNeedUpdate=!1),Le.isSpriteMaterial&&Rn.setValue(it,"center",We.center),Rn.setValue(it,"modelViewMatrix",We.modelViewMatrix),Rn.setValue(it,"normalMatrix",We.normalMatrix),Rn.setValue(it,"modelMatrix",We.matrixWorld),rn}Cu.setAnimationLoop(function(ue){Q_&&Q_(ue)}),typeof window!="undefined"&&Cu.setContext(window),this.setAnimationLoop=function(ue){Q_=ue,jr.setAnimationLoop(ue),ue===null?Cu.stop():Cu.start()},jr.addEventListener("sessionstart",eS),jr.addEventListener("sessionend",tS),this.render=function(ue,Ve){if(Ve!==void 0&&Ve.isCamera!==!0)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(y===!0)return;ue.autoUpdate===!0&&ue.updateMatrixWorld(),Ve.parent===null&&Ve.updateMatrixWorld(),jr.enabled===!0&&jr.isPresenting===!0&&(jr.cameraAutoUpdate===!0&&jr.updateCamera(Ve),Ve=jr.getCamera()),ue.isScene===!0&&ue.onBeforeRender(_,ue,Ve,R),f=Wt.get(ue,g.length),f.init(),g.push(f),J.multiplyMatrices(Ve.projectionMatrix,Ve.matrixWorldInverse),fe.setFromProjectionMatrix(J),ke=this.localClippingEnabled,Re=ai.init(this.clippingPlanes,ke,Ve),d=Gt.get(ue,m.length),d.init(),m.push(d),function zt(ut,Kt,Rt,sn){if(ut.visible===!1)return;if(ut.layers.test(Kt.layers)){if(ut.isGroup)Rt=ut.renderOrder;else if(ut.isLOD)ut.autoUpdate===!0&&ut.update(Kt);else if(ut.isLight)f.pushLight(ut),ut.castShadow&&f.pushShadow(ut);else if(ut.isSprite){if(!ut.frustumCulled||fe.intersectsSprite(ut)){sn&&te.setFromMatrixPosition(ut.matrixWorld).applyMatrix4(J);const rn=ht.update(ut),bi=ut.material;bi.visible&&d.push(ut,rn,bi,Rt,te.z,null)}}else if(ut.isImmediateRenderObject)sn&&te.setFromMatrixPosition(ut.matrixWorld).applyMatrix4(J),d.push(ut,null,ut.material,Rt,te.z,null);else if((ut.isMesh||ut.isLine||ut.isPoints)&&(ut.isSkinnedMesh&&ut.skeleton.frame!==ve.render.frame&&(ut.skeleton.update(),ut.skeleton.frame=ve.render.frame),!ut.frustumCulled||fe.intersectsObject(ut))){sn&&te.setFromMatrixPosition(ut.matrixWorld).applyMatrix4(J);const rn=ht.update(ut),bi=ut.material;if(Array.isArray(bi)){const On=rn.groups;for(let Go=0,Rn=On.length;Go<Rn;Go++){const Ss=On[Go],Pi=bi[Ss.materialIndex];Pi&&Pi.visible&&d.push(ut,rn,Pi,Rt,te.z,Ss)}}else bi.visible&&d.push(ut,rn,bi,Rt,te.z,null)}}const kt=ut.children;for(let rn=0,bi=kt.length;rn<bi;rn++)zt(kt[rn],Kt,Rt,sn)}(ue,Ve,0,_.sortObjects),d.finish(),_.sortObjects===!0&&d.sort(Q,$),Re===!0&&ai.beginShadows();const Le=f.state.shadowsArray;Cn.render(Le,ue,Ve),f.setupLights(),f.setupLightsView(Ve),Re===!0&&ai.endShadows(),this.info.autoReset===!0&&this.info.reset(),ko.render(d,ue);const We=d.opaque,ot=d.transmissive,hn=d.transparent;We.length>0&&bg(We,ue,Ve),ot.length>0&&function(zt,ut,Kt,Rt){if(Be===null){const rn=s===!0&&Ge.isWebGL2===!0;Be=new(rn?Fs:Or)(1024,1024,{generateMipmaps:!0,type:pr.convert(Ps)!==null?Ps:Wo,minFilter:Ms,magFilter:Jn,wrapS:gi,wrapT:gi})}const sn=_.getRenderTarget();_.setRenderTarget(Be),_.clear();const kt=_.toneMapping;_.toneMapping=co,bg(zt,Kt,Rt),_.toneMapping=kt,pe.updateMultisampleRenderTarget(Be),pe.updateRenderTargetMipmap(Be),_.setRenderTarget(sn),bg(ut,Kt,Rt)}(We,ot,ue,Ve),hn.length>0&&bg(hn,ue,Ve),R!==null&&(pe.updateMultisampleRenderTarget(R),pe.updateRenderTargetMipmap(R)),ue.isScene===!0&&ue.onAfterRender(_,ue,Ve),Ye.buffers.depth.setTest(!0),Ye.buffers.depth.setMask(!0),Ye.buffers.color.setMask(!0),Ye.setPolygonOffset(!1),Ir.resetDefaultState(),F=-1,C=null,g.pop(),f=g.length>0?g[g.length-1]:null,m.pop(),d=m.length>0?m[m.length-1]:null},this.getActiveCubeFace=function(){return w},this.getActiveMipmapLevel=function(){return M},this.getRenderTarget=function(){return R},this.setRenderTarget=function(ue,Ve=0,Le=0){R=ue,w=Ve,M=Le,ue&&Y.get(ue).__webglFramebuffer===void 0&&pe.setupRenderTarget(ue);let We=null,ot=!1,hn=!1;if(ue){const zt=ue.texture;(zt.isDataTexture3D||zt.isDataTexture2DArray)&&(hn=!0);const ut=Y.get(ue).__webglFramebuffer;ue.isWebGLCubeRenderTarget?(We=ut[Ve],ot=!0):We=ue.isWebGLMultisampleRenderTarget?Y.get(ue).__webglMultisampledFramebuffer:ut,U.copy(ue.viewport),N.copy(ue.scissor),G=ue.scissorTest}else U.copy(se).multiplyScalar(Z).floor(),N.copy(me).multiplyScalar(Z).floor(),G=ge;if(Ye.bindFramebuffer(36160,We)&&Ge.drawBuffers){let zt=!1;if(ue)if(ue.isWebGLMultipleRenderTargets){const ut=ue.texture;if(de.length!==ut.length||de[0]!==36064){for(let Kt=0,Rt=ut.length;Kt<Rt;Kt++)de[Kt]=36064+Kt;de.length=ut.length,zt=!0}}else de.length===1&&de[0]===36064||(de[0]=36064,de.length=1,zt=!0);else de.length===1&&de[0]===1029||(de[0]=1029,de.length=1,zt=!0);zt&&(Ge.isWebGL2?it.drawBuffers(de):Te.get("WEBGL_draw_buffers").drawBuffersWEBGL(de))}if(Ye.viewport(U),Ye.scissor(N),Ye.setScissorTest(G),ot){const zt=Y.get(ue.texture);it.framebufferTexture2D(36160,36064,34069+Ve,zt.__webglTexture,Le)}else if(hn){const zt=Y.get(ue.texture),ut=Ve||0;it.framebufferTextureLayer(36160,36064,zt.__webglTexture,Le||0,ut)}},this.readRenderTargetPixels=function(ue,Ve,Le,We,ot,hn,zt){if(!ue||!ue.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let ut=Y.get(ue).__webglFramebuffer;if(ue.isWebGLCubeRenderTarget&&zt!==void 0&&(ut=ut[zt]),ut){Ye.bindFramebuffer(36160,ut);try{const Kt=ue.texture,Rt=Kt.format,sn=Kt.type;if(Rt!==tr&&pr.convert(Rt)!==it.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const kt=sn===Ps&&(Te.has("EXT_color_buffer_half_float")||Ge.isWebGL2&&Te.has("EXT_color_buffer_float"));if(!(sn===Wo||pr.convert(sn)===it.getParameter(35738)||sn===po&&(Ge.isWebGL2||Te.has("OES_texture_float")||Te.has("WEBGL_color_buffer_float"))||kt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");it.checkFramebufferStatus(36160)===36053?Ve>=0&&Ve<=ue.width-We&&Le>=0&&Le<=ue.height-ot&&it.readPixels(Ve,Le,We,ot,pr.convert(Rt),pr.convert(sn),hn):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const Kt=R!==null?Y.get(R).__webglFramebuffer:null;Ye.bindFramebuffer(36160,Kt)}}},this.copyFramebufferToTexture=function(ue,Ve,Le=0){const We=Math.pow(2,-Le),ot=Math.floor(Ve.image.width*We),hn=Math.floor(Ve.image.height*We);let zt=pr.convert(Ve.format);Ge.isWebGL2&&(zt===6407&&(zt=32849),zt===6408&&(zt=32856)),pe.setTexture2D(Ve,0),it.copyTexImage2D(3553,Le,zt,ue.x,ue.y,ot,hn,0),Ye.unbindTexture()},this.copyTextureToTexture=function(ue,Ve,Le,We=0){const ot=Ve.image.width,hn=Ve.image.height,zt=pr.convert(Le.format),ut=pr.convert(Le.type);pe.setTexture2D(Le,0),it.pixelStorei(37440,Le.flipY),it.pixelStorei(37441,Le.premultiplyAlpha),it.pixelStorei(3317,Le.unpackAlignment),Ve.isDataTexture?it.texSubImage2D(3553,We,ue.x,ue.y,ot,hn,zt,ut,Ve.image.data):Ve.isCompressedTexture?it.compressedTexSubImage2D(3553,We,ue.x,ue.y,Ve.mipmaps[0].width,Ve.mipmaps[0].height,zt,Ve.mipmaps[0].data):it.texSubImage2D(3553,We,ue.x,ue.y,zt,ut,Ve.image),We===0&&Le.generateMipmaps&&it.generateMipmap(3553),Ye.unbindTexture()},this.copyTextureToTexture3D=function(ue,Ve,Le,We,ot=0){if(_.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const hn=ue.max.x-ue.min.x+1,zt=ue.max.y-ue.min.y+1,ut=ue.max.z-ue.min.z+1,Kt=pr.convert(We.format),Rt=pr.convert(We.type);let sn;if(We.isDataTexture3D)pe.setTexture3D(We,0),sn=32879;else{if(!We.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");pe.setTexture2DArray(We,0),sn=35866}it.pixelStorei(37440,We.flipY),it.pixelStorei(37441,We.premultiplyAlpha),it.pixelStorei(3317,We.unpackAlignment);const kt=it.getParameter(3314),rn=it.getParameter(32878),bi=it.getParameter(3316),On=it.getParameter(3315),Go=it.getParameter(32877),Rn=Le.isCompressedTexture?Le.mipmaps[0]:Le.image;it.pixelStorei(3314,Rn.width),it.pixelStorei(32878,Rn.height),it.pixelStorei(3316,ue.min.x),it.pixelStorei(3315,ue.min.y),it.pixelStorei(32877,ue.min.z),Le.isDataTexture||Le.isDataTexture3D?it.texSubImage3D(sn,ot,Ve.x,Ve.y,Ve.z,hn,zt,ut,Kt,Rt,Rn.data):Le.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),it.compressedTexSubImage3D(sn,ot,Ve.x,Ve.y,Ve.z,hn,zt,ut,Kt,Rn.data)):it.texSubImage3D(sn,ot,Ve.x,Ve.y,Ve.z,hn,zt,ut,Kt,Rt,Rn),it.pixelStorei(3314,kt),it.pixelStorei(32878,rn),it.pixelStorei(3316,bi),it.pixelStorei(3315,On),it.pixelStorei(32877,Go),ot===0&&We.generateMipmaps&&it.generateMipmap(sn),Ye.unbindTexture()},this.initTexture=function(ue){pe.setTexture2D(ue,0),Ye.unbindTexture()},this.resetState=function(){w=0,M=0,R=null,Ye.reset(),Ir.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}class di extends fn{}di.prototype.isWebGL1Renderer=!0;class yi{constructor(e,t=25e-5){this.name="",this.color=new gt(e),this.density=t}clone(){return new yi(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}yi.prototype.isFogExp2=!0;class Hl{constructor(e,t=1,n=1e3){this.name="",this.color=new gt(e),this.near=t,this.far=n}clone(){return new Hl(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}Hl.prototype.isFog=!0;class Ga extends Xt{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),t}}Ga.prototype.isScene=!0;class $s{constructor(e,t){this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Os,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=rr()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,o=this.stride;i<o;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=rr()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=rr()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}$s.prototype.isInterleavedBuffer=!0;const ti=new T;class Po{constructor(e,t,n,i=!1){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i===!0}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)ti.x=this.getX(t),ti.y=this.getY(t),ti.z=this.getZ(t),ti.applyMatrix4(e),this.setXYZ(t,ti.x,ti.y,ti.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)ti.x=this.getX(t),ti.y=this.getY(t),ti.z=this.getZ(t),ti.applyNormalMatrix(e),this.setXYZ(t,ti.x,ti.y,ti.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)ti.x=this.getX(t),ti.y=this.getY(t),ti.z=this.getZ(t),ti.transformDirection(e),this.setXYZ(t,ti.x,ti.y,ti.z);return this}setX(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){return this.data.array[e*this.data.stride+this.offset]}getY(e){return this.data.array[e*this.data.stride+this.offset+1]}getZ(e){return this.data.array[e*this.data.stride+this.offset+2]}getW(e){return this.data.array[e*this.data.stride+this.offset+3]}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,o){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=o,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[i+o])}return new Zt(new this.array.constructor(t),this.itemSize,this.normalized)}return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new Po(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[i+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}Po.prototype.isInterleavedBufferAttribute=!0;class zl extends _i{constructor(e){super(),this.type="SpriteMaterial",this.color=new gt(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this}}let Ks;zl.prototype.isSpriteMaterial=!0;const ro=new T,Ha=new T,Qs=new T,ea=new Qe,Vl=new Qe,qf=new pt,Mh=new T,jl=new T,Ah=new T,Zf=new Qe,Wl=new Qe,Td=new Qe;class Xl extends Xt{constructor(e){if(super(),this.type="Sprite",Ks===void 0){Ks=new Mt;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new $s(t,5);Ks.setIndex([0,1,2,0,2,3]),Ks.setAttribute("position",new Po(n,3,0,!1)),Ks.setAttribute("uv",new Po(n,2,3,!1))}this.geometry=Ks,this.material=e!==void 0?e:new zl,this.center=new Qe(.5,.5)}raycast(e,t){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Ha.setFromMatrixScale(this.matrixWorld),qf.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Qs.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&Ha.multiplyScalar(-Qs.z);const n=this.material.rotation;let i,o;n!==0&&(o=Math.cos(n),i=Math.sin(n));const s=this.center;Ph(Mh.set(-.5,-.5,0),Qs,s,Ha,i,o),Ph(jl.set(.5,-.5,0),Qs,s,Ha,i,o),Ph(Ah.set(.5,.5,0),Qs,s,Ha,i,o),Zf.set(0,0),Wl.set(1,0),Td.set(1,1);let a=e.ray.intersectTriangle(Mh,jl,Ah,!1,ro);if(a===null&&(Ph(jl.set(-.5,.5,0),Qs,s,Ha,i,o),Wl.set(0,1),a=e.ray.intersectTriangle(Mh,Ah,jl,!1,ro),a===null))return;const l=e.ray.origin.distanceTo(ro);l<e.near||l>e.far||t.push({distance:l,point:ro.clone(),uv:Mn.getUV(ro,Mh,jl,Ah,Zf,Wl,Td,new Qe),face:null,object:this})}copy(e){return super.copy(e),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Ph(r,e,t,n,i,o){ea.subVectors(r,t).addScalar(.5).multiply(n),i!==void 0?(Vl.x=o*ea.x-i*ea.y,Vl.y=i*ea.x+o*ea.y):Vl.copy(ea),r.copy(e),r.x+=Vl.x,r.y+=Vl.y,r.applyMatrix4(qf)}Xl.prototype.isSprite=!0;const za=new T,Jf=new T;class $f extends Xt{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,i=t.length;n<i;n++){const o=t[n];this.addLevel(o.object.clone(),o.distance)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0){t=Math.abs(t);const n=this.levels;let i;for(i=0;i<n.length&&!(t<n[i].distance);i++);return n.splice(i,0,{distance:t,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,i;for(n=1,i=t.length;n<i&&!(e<t[n].distance);n++);return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){za.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(za);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){za.setFromMatrixPosition(e.matrixWorld),Jf.setFromMatrixPosition(this.matrixWorld);const n=za.distanceTo(Jf)/e.zoom;let i,o;for(t[0].object.visible=!0,i=1,o=t.length;i<o&&n>=t[i].distance;i++)t[i-1].object.visible=!1,t[i].object.visible=!0;for(this._currentLevel=i-1;i<o;i++)t[i].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let i=0,o=n.length;i<o;i++){const s=n[i];t.object.levels.push({object:s.object.uuid,distance:s.distance})}return t}}const zi=new T,Ch=new pn,Kf=new pn,xv=new T,Rh=new pt;class Va extends ln{constructor(e,t){super(e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new pt,this.bindMatrixInverse=new pt}copy(e){return super.copy(e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new pn,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);const o=1/e.manhattanLength();o!==1/0?e.multiplyScalar(o):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode==="attached"?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode==="detached"?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(e,t){const n=this.skeleton,i=this.geometry;Ch.fromBufferAttribute(i.attributes.skinIndex,e),Kf.fromBufferAttribute(i.attributes.skinWeight,e),zi.fromBufferAttribute(i.attributes.position,e).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let o=0;o<4;o++){const s=Kf.getComponent(o);if(s!==0){const a=Ch.getComponent(o);Rh.multiplyMatrices(n.bones[a].matrixWorld,n.boneInverses[a]),t.addScaledVector(xv.copy(zi).applyMatrix4(Rh),s)}}return t.applyMatrix4(this.bindMatrixInverse)}}Va.prototype.isSkinnedMesh=!0;class Ih extends Xt{constructor(){super(),this.type="Bone"}}Ih.prototype.isBone=!0;class os extends Kn{constructor(e=null,t=1,n=1,i,o,s,a,l,u=Jn,c=Jn,d,f){super(null,s,a,l,u,c,i,o,d,f),this.image={data:e,width:t,height:n},this.magFilter=u,this.minFilter=c,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}os.prototype.isDataTexture=!0;const Qf=new pt,em=new pt;class Lh{constructor(e=[],t=[]){this.uuid=rr(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),t.length===0)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new pt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new pt;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let o=0,s=e.length;o<s;o++){const a=e[o]?e[o].matrixWorld:em;Qf.multiplyMatrices(a,t[o]),Qf.toArray(n,16*o)}i!==null&&(i.needsUpdate=!0)}clone(){return new Lh(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=wa(e),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new os(t,e,e,tr,po);return this.boneMatrices=t,this.boneTexture=n,this.boneTextureSize=e,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const i=this.bones[t];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){const o=e.bones[n];let s=t[o];s===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",o),s=new Ih),this.bones.push(s),this.boneInverses.push(new pt().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let i=0,o=t.length;i<o;i++){const s=t[i];e.bones.push(s.uuid);const a=n[i];e.boneInverses.push(a.toArray())}return e}}const tm=new pt,Oh=new pt,ja=[],Yl=new ln;class Sd extends ln{constructor(e,t,n){super(e,t),this.instanceMatrix=new Zt(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(e){return super.copy(e),this.instanceMatrix.copy(e.instanceMatrix),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,i=this.count;if(Yl.geometry=this.geometry,Yl.material=this.material,Yl.material!==void 0)for(let o=0;o<i;o++){this.getMatrixAt(o,tm),Oh.multiplyMatrices(n,tm),Yl.matrixWorld=Oh,Yl.raycast(e,ja);for(let s=0,a=ja.length;s<a;s++){const l=ja[s];l.instanceId=o,l.object=this,t.push(l)}ja.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new Zt(new Float32Array(3*this.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}Sd.prototype.isInstancedMesh=!0;class xi extends _i{constructor(e){super(),this.type="LineBasicMaterial",this.color=new gt(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.morphTargets=e.morphTargets,this}}xi.prototype.isLineBasicMaterial=!0;const nm=new T,Dh=new T,im=new pt,Ed=new To,Nh=new ui;class h extends Xt{constructor(e=new Mt,t=new xi){super(),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(e.index===null){const t=e.attributes.position,n=[0];for(let i=1,o=t.count;i<o;i++)nm.fromBufferAttribute(t,i-1),Dh.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=nm.distanceTo(Dh);e.setAttribute("lineDistance",new st(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,o=e.params.Line.threshold,s=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Nh.copy(n.boundingSphere),Nh.applyMatrix4(i),Nh.radius+=o,e.ray.intersectsSphere(Nh)===!1)return;im.copy(i).invert(),Ed.copy(e.ray).applyMatrix4(im);const a=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,u=new T,c=new T,d=new T,f=new T,m=this.isLineSegments?2:1;if(n.isBufferGeometry){const g=n.index,_=n.attributes.position;if(g!==null)for(let y=Math.max(0,s.start),w=Math.min(g.count,s.start+s.count)-1;y<w;y+=m){const M=g.getX(y),R=g.getX(y+1);if(u.fromBufferAttribute(_,M),c.fromBufferAttribute(_,R),Ed.distanceSqToSegment(u,c,f,d)>l)continue;f.applyMatrix4(this.matrixWorld);const F=e.ray.origin.distanceTo(f);F<e.near||F>e.far||t.push({distance:F,point:d.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}else for(let y=Math.max(0,s.start),w=Math.min(_.count,s.start+s.count)-1;y<w;y+=m){if(u.fromBufferAttribute(_,y),c.fromBufferAttribute(_,y+1),Ed.distanceSqToSegment(u,c,f,d)>l)continue;f.applyMatrix4(this.matrixWorld);const M=e.ray.origin.distanceTo(f);M<e.near||M>e.far||t.push({distance:M,point:d.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o<s;o++){const a=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}else{const t=e.morphTargets;t!==void 0&&t.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}h.prototype.isLine=!0;const p=new T,x=new T;class E extends h{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(e.index===null){const t=e.attributes.position,n=[];for(let i=0,o=t.count;i<o;i+=2)p.fromBufferAttribute(t,i),x.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+p.distanceTo(x);e.setAttribute("lineDistance",new st(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}E.prototype.isLineSegments=!0;class P extends h{constructor(e,t){super(e,t),this.type="LineLoop"}}P.prototype.isLineLoop=!0;class j extends _i{constructor(e){super(),this.type="PointsMaterial",this.color=new gt(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this}}j.prototype.isPointsMaterial=!0;const re=new pt,ce=new To,_e=new ui,He=new T;class ze extends Xt{constructor(e=new Mt,t=new j){super(),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,o=e.params.Points.threshold,s=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),_e.copy(n.boundingSphere),_e.applyMatrix4(i),_e.radius+=o,e.ray.intersectsSphere(_e)===!1)return;re.copy(i).invert(),ce.copy(e.ray).applyMatrix4(re);const a=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a;if(n.isBufferGeometry){const u=n.index,c=n.attributes.position;if(u!==null)for(let d=Math.max(0,s.start),f=Math.min(u.count,s.start+s.count);d<f;d++){const m=u.getX(d);He.fromBufferAttribute(c,m),tt(He,m,l,i,e,t,this)}else for(let d=Math.max(0,s.start),f=Math.min(c.count,s.start+s.count);d<f;d++)He.fromBufferAttribute(c,d),tt(He,d,l,i,e,t,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o<s;o++){const a=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}else{const t=e.morphTargets;t!==void 0&&t.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function tt(r,e,t,n,i,o,s){const a=ce.distanceSqToPoint(r);if(a<t){const l=new T;ce.closestPointToPoint(r,l),l.applyMatrix4(n);const u=i.ray.origin.distanceTo(l);if(u<i.near||u>i.far)return;o.push({distance:u,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:s})}}ze.prototype.isPoints=!0;class vt extends Kn{constructor(e,t,n,i,o,s,a,l,u){super(e,t,n,i,o,s,a,l,u),this.format=a!==void 0?a:fo,this.minFilter=s!==void 0?s:$n,this.magFilter=o!==void 0?o:$n,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(function d(){c.needsUpdate=!0,e.requestVideoFrameCallback(d)})}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!("requestVideoFrameCallback"in e)&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}vt.prototype.isVideoTexture=!0;class yt extends Kn{constructor(e,t,n,i,o,s,a,l,u,c,d,f){super(null,s,a,l,u,c,i,o,d,f),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}yt.prototype.isCompressedTexture=!0;class Ct extends Kn{constructor(e,t,n,i,o,s,a,l,u){super(e,t,n,i,o,s,a,l,u),this.needsUpdate=!0}}Ct.prototype.isCanvasTexture=!0;class Je extends Kn{constructor(e,t,n,i,o,s,a,l,u,c){if((c=c!==void 0?c:Nn)!==Nn&&c!==Cs)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&c===Nn&&(n=gl),n===void 0&&c===Cs&&(n=dn),super(null,i,o,s,a,l,c,n,u),this.image={width:e,height:t},this.magFilter=a!==void 0?a:Jn,this.minFilter=l!==void 0?l:Jn,this.flipY=!1,this.generateMipmaps=!1}}Je.prototype.isDepthTexture=!0;class nt extends Mt{constructor(e=1,t=8,n=0,i=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:i},t=Math.max(3,t);const o=[],s=[],a=[],l=[],u=new T,c=new Qe;s.push(0,0,0),a.push(0,0,1),l.push(.5,.5);for(let d=0,f=3;d<=t;d++,f+=3){const m=n+d/t*i;u.x=e*Math.cos(m),u.y=e*Math.sin(m),s.push(u.x,u.y,u.z),a.push(0,0,1),c.x=(s[f]/e+1)/2,c.y=(s[f+1]/e+1)/2,l.push(c.x,c.y)}for(let d=1;d<=t;d++)o.push(d,d+1,0);this.setIndex(o),this.setAttribute("position",new st(s,3)),this.setAttribute("normal",new st(a,3)),this.setAttribute("uv",new st(l,2))}static fromJSON(e){return new nt(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Et extends Mt{constructor(e=1,t=1,n=1,i=8,o=1,s=!1,a=0,l=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:i,heightSegments:o,openEnded:s,thetaStart:a,thetaLength:l};const u=this;i=Math.floor(i),o=Math.floor(o);const c=[],d=[],f=[],m=[];let g=0;const _=[],y=n/2;let w=0;function M(R){const F=g,C=new Qe,U=new T;let N=0;const G=R===!0?e:t,he=R===!0?1:-1;for(let Z=1;Z<=i;Z++)d.push(0,y*he,0),f.push(0,he,0),m.push(.5,.5),g++;const ne=g;for(let Z=0;Z<=i;Z++){const Q=Z/i*l+a,$=Math.cos(Q),se=Math.sin(Q);U.x=G*se,U.y=y*he,U.z=G*$,d.push(U.x,U.y,U.z),f.push(0,he,0),C.x=.5*$+.5,C.y=.5*se*he+.5,m.push(C.x,C.y),g++}for(let Z=0;Z<i;Z++){const Q=F+Z,$=ne+Z;R===!0?c.push($,$+1,Q):c.push($+1,$,Q),N+=3}u.addGroup(w,N,R===!0?1:2),w+=N}(function(){const R=new T,F=new T;let C=0;const U=(t-e)/n;for(let N=0;N<=o;N++){const G=[],he=N/o,ne=he*(t-e)+e;for(let Z=0;Z<=i;Z++){const Q=Z/i,$=Q*l+a,se=Math.sin($),me=Math.cos($);F.x=ne*se,F.y=-he*n+y,F.z=ne*me,d.push(F.x,F.y,F.z),R.set(se,U,me).normalize(),f.push(R.x,R.y,R.z),m.push(Q,1-he),G.push(g++)}_.push(G)}for(let N=0;N<i;N++)for(let G=0;G<o;G++){const he=_[G][N],ne=_[G+1][N],Z=_[G+1][N+1],Q=_[G][N+1];c.push(he,ne,Q),c.push(ne,Z,Q),C+=6}u.addGroup(w,C,0),w+=C})(),s===!1&&(e>0&&M(!0),t>0&&M(!1)),this.setIndex(c),this.setAttribute("position",new st(d,3)),this.setAttribute("normal",new st(f,3)),this.setAttribute("uv",new st(m,2))}static fromJSON(e){return new Et(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class mt extends Et{constructor(e=1,t=1,n=8,i=1,o=!1,s=0,a=2*Math.PI){super(0,e,t,n,i,o,s,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:i,openEnded:o,thetaStart:s,thetaLength:a}}static fromJSON(e){return new mt(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class St extends Mt{constructor(e,t,n=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:i};const o=[],s=[];function a(f,m,g,_){const y=_+1,w=[];for(let M=0;M<=y;M++){w[M]=[];const R=f.clone().lerp(g,M/y),F=m.clone().lerp(g,M/y),C=y-M;for(let U=0;U<=C;U++)w[M][U]=U===0&&M===y?R:R.clone().lerp(F,U/C)}for(let M=0;M<y;M++)for(let R=0;R<2*(y-M)-1;R++){const F=Math.floor(R/2);R%2==0?(l(w[M][F+1]),l(w[M+1][F]),l(w[M][F])):(l(w[M][F+1]),l(w[M+1][F+1]),l(w[M+1][F]))}}function l(f){o.push(f.x,f.y,f.z)}function u(f,m){const g=3*f;m.x=e[g+0],m.y=e[g+1],m.z=e[g+2]}function c(f,m,g,_){_<0&&f.x===1&&(s[m]=f.x-1),g.x===0&&g.z===0&&(s[m]=_/2/Math.PI+.5)}function d(f){return Math.atan2(f.z,-f.x)}(function(f){const m=new T,g=new T,_=new T;for(let y=0;y<t.length;y+=3)u(t[y+0],m),u(t[y+1],g),u(t[y+2],_),a(m,g,_,f)})(i),function(f){const m=new T;for(let g=0;g<o.length;g+=3)m.x=o[g+0],m.y=o[g+1],m.z=o[g+2],m.normalize().multiplyScalar(f),o[g+0]=m.x,o[g+1]=m.y,o[g+2]=m.z}(n),function(){const f=new T;for(let g=0;g<o.length;g+=3){f.x=o[g+0],f.y=o[g+1],f.z=o[g+2];const _=d(f)/2/Math.PI+.5,y=(m=f,Math.atan2(-m.y,Math.sqrt(m.x*m.x+m.z*m.z))/Math.PI+.5);s.push(_,1-y)}var m;(function(){const g=new T,_=new T,y=new T,w=new T,M=new Qe,R=new Qe,F=new Qe;for(let C=0,U=0;C<o.length;C+=9,U+=6){g.set(o[C+0],o[C+1],o[C+2]),_.set(o[C+3],o[C+4],o[C+5]),y.set(o[C+6],o[C+7],o[C+8]),M.set(s[U+0],s[U+1]),R.set(s[U+2],s[U+3]),F.set(s[U+4],s[U+5]),w.copy(g).add(_).add(y).divideScalar(3);const N=d(w);c(M,U+0,g,N),c(R,U+2,_,N),c(F,U+4,y,N)}})(),function(){for(let g=0;g<s.length;g+=6){const _=s[g+0],y=s[g+2],w=s[g+4],M=Math.max(_,y,w),R=Math.min(_,y,w);M>.9&&R<.1&&(_<.2&&(s[g+0]+=1),y<.2&&(s[g+2]+=1),w<.2&&(s[g+4]+=1))}}()}(),this.setAttribute("position",new st(o,3)),this.setAttribute("normal",new st(o.slice(),3)),this.setAttribute("uv",new st(s,2)),i===0?this.computeVertexNormals():this.normalizeNormals()}static fromJSON(e){return new St(e.vertices,e.indices,e.radius,e.details)}}class It extends St{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,i=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new It(e.radius,e.detail)}}const jt=new T,Tt=new T,Ot=new T,Xn=new Mn;class Mi extends Mt{constructor(e,t){if(super(),this.type="EdgesGeometry",this.parameters={thresholdAngle:t},t=t!==void 0?t:1,e.isGeometry===!0)return void console.error("THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");const n=Math.pow(10,4),i=Math.cos(Sn*t),o=e.getIndex(),s=e.getAttribute("position"),a=o?o.count:s.count,l=[0,0,0],u=["a","b","c"],c=new Array(3),d={},f=[];for(let m=0;m<a;m+=3){o?(l[0]=o.getX(m),l[1]=o.getX(m+1),l[2]=o.getX(m+2)):(l[0]=m,l[1]=m+1,l[2]=m+2);const{a:g,b:_,c:y}=Xn;if(g.fromBufferAttribute(s,l[0]),_.fromBufferAttribute(s,l[1]),y.fromBufferAttribute(s,l[2]),Xn.getNormal(Ot),c[0]=`${Math.round(g.x*n)},${Math.round(g.y*n)},${Math.round(g.z*n)}`,c[1]=`${Math.round(_.x*n)},${Math.round(_.y*n)},${Math.round(_.z*n)}`,c[2]=`${Math.round(y.x*n)},${Math.round(y.y*n)},${Math.round(y.z*n)}`,c[0]!==c[1]&&c[1]!==c[2]&&c[2]!==c[0])for(let w=0;w<3;w++){const M=(w+1)%3,R=c[w],F=c[M],C=Xn[u[w]],U=Xn[u[M]],N=`${R}_${F}`,G=`${F}_${R}`;G in d&&d[G]?(Ot.dot(d[G].normal)<=i&&(f.push(C.x,C.y,C.z),f.push(U.x,U.y,U.z)),d[G]=null):N in d||(d[N]={index0:l[w],index1:l[M],normal:Ot.clone()})}}for(const m in d)if(d[m]){const{index0:g,index1:_}=d[m];jt.fromBufferAttribute(s,g),Tt.fromBufferAttribute(s,_),f.push(jt.x,jt.y,jt.z),f.push(Tt.x,Tt.y,Tt.z)}this.setAttribute("position",new st(f,3))}}class Yn{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,i=this.getPoint(0),o=0;t.push(0);for(let s=1;s<=e;s++)n=this.getPoint(s/e),o+=n.distanceTo(i),t.push(o),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let i=0;const o=n.length;let s;s=t||e*n[o-1];let a,l=0,u=o-1;for(;l<=u;)if(i=Math.floor(l+(u-l)/2),a=n[i]-s,a<0)l=i+1;else{if(!(a>0)){u=i;break}u=i-1}if(i=u,n[i]===s)return i/(o-1);const c=n[i];return(i+(s-c)/(n[i+1]-c))/(o-1)}getTangent(e,t){let n=e-1e-4,i=e+1e-4;n<0&&(n=0),i>1&&(i=1);const o=this.getPoint(n),s=this.getPoint(i),a=t||(o.isVector2?new Qe:new T);return a.copy(s).sub(o).normalize(),a}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new T,i=[],o=[],s=[],a=new T,l=new pt;for(let m=0;m<=e;m++){const g=m/e;i[m]=this.getTangentAt(g,new T),i[m].normalize()}o[0]=new T,s[0]=new T;let u=Number.MAX_VALUE;const c=Math.abs(i[0].x),d=Math.abs(i[0].y),f=Math.abs(i[0].z);c<=u&&(u=c,n.set(1,0,0)),d<=u&&(u=d,n.set(0,1,0)),f<=u&&n.set(0,0,1),a.crossVectors(i[0],n).normalize(),o[0].crossVectors(i[0],a),s[0].crossVectors(i[0],o[0]);for(let m=1;m<=e;m++){if(o[m]=o[m-1].clone(),s[m]=s[m-1].clone(),a.crossVectors(i[m-1],i[m]),a.length()>Number.EPSILON){a.normalize();const g=Math.acos(Si(i[m-1].dot(i[m]),-1,1));o[m].applyMatrix4(l.makeRotationAxis(a,g))}s[m].crossVectors(i[m],o[m])}if(t===!0){let m=Math.acos(Si(o[0].dot(o[e]),-1,1));m/=e,i[0].dot(a.crossVectors(o[0],o[e]))>0&&(m=-m);for(let g=1;g<=e;g++)o[g].applyMatrix4(l.makeRotationAxis(i[g],m*g)),s[g].crossVectors(i[g],o[g])}return{tangents:i,normals:o,binormals:s}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class kn extends Yn{constructor(e=0,t=0,n=1,i=1,o=0,s=2*Math.PI,a=!1,l=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=l}getPoint(e,t){const n=t||new Qe,i=2*Math.PI;let o=this.aEndAngle-this.aStartAngle;const s=Math.abs(o)<Number.EPSILON;for(;o<0;)o+=i;for(;o>i;)o-=i;o<Number.EPSILON&&(o=s?0:i),this.aClockwise!==!0||s||(o===i?o=-i:o-=i);const a=this.aStartAngle+e*o;let l=this.aX+this.xRadius*Math.cos(a),u=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const c=Math.cos(this.aRotation),d=Math.sin(this.aRotation),f=l-this.aX,m=u-this.aY;l=f*c-m*d+this.aX,u=f*d+m*c+this.aY}return n.set(l,u)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}kn.prototype.isEllipseCurve=!0;class Hr extends kn{constructor(e,t,n,i,o,s){super(e,t,n,n,i,o,s),this.type="ArcCurve"}}function oo(){let r=0,e=0,t=0,n=0;function i(o,s,a,l){r=o,e=a,t=-3*o+3*s-2*a-l,n=2*o-2*s+a+l}return{initCatmullRom:function(o,s,a,l,u){i(s,a,u*(a-o),u*(l-s))},initNonuniformCatmullRom:function(o,s,a,l,u,c,d){let f=(s-o)/u-(a-o)/(u+c)+(a-s)/c,m=(a-s)/c-(l-s)/(c+d)+(l-a)/d;f*=c,m*=c,i(s,a,f,m)},calc:function(o){const s=o*o;return r+e*o+t*s+n*(s*o)}}}Hr.prototype.isArcCurve=!0;const ss=new T,Wa=new oo,as=new oo,so=new oo;class Fh extends Yn{constructor(e=[],t=!1,n="centripetal",i=.5){super(),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=i}getPoint(e,t=new T){const n=t,i=this.points,o=i.length,s=(o-(this.closed?0:1))*e;let a,l,u=Math.floor(s),c=s-u;this.closed?u+=u>0?0:(Math.floor(Math.abs(u)/o)+1)*o:c===0&&u===o-1&&(u=o-2,c=1),this.closed||u>0?a=i[(u-1)%o]:(ss.subVectors(i[0],i[1]).add(i[0]),a=ss);const d=i[u%o],f=i[(u+1)%o];if(this.closed||u+2<o?l=i[(u+2)%o]:(ss.subVectors(i[o-1],i[o-2]).add(i[o-1]),l=ss),this.curveType==="centripetal"||this.curveType==="chordal"){const m=this.curveType==="chordal"?.5:.25;let g=Math.pow(a.distanceToSquared(d),m),_=Math.pow(d.distanceToSquared(f),m),y=Math.pow(f.distanceToSquared(l),m);_<1e-4&&(_=1),g<1e-4&&(g=_),y<1e-4&&(y=_),Wa.initNonuniformCatmullRom(a.x,d.x,f.x,l.x,g,_,y),as.initNonuniformCatmullRom(a.y,d.y,f.y,l.y,g,_,y),so.initNonuniformCatmullRom(a.z,d.z,f.z,l.z,g,_,y)}else this.curveType==="catmullrom"&&(Wa.initCatmullRom(a.x,d.x,f.x,l.x,this.tension),as.initCatmullRom(a.y,d.y,f.y,l.y,this.tension),so.initCatmullRom(a.z,d.z,f.z,l.z,this.tension));return n.set(Wa.calc(c),as.calc(c),so.calc(c)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new T().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function Md(r,e,t,n,i){const o=.5*(n-e),s=.5*(i-t),a=r*r;return(2*t-2*n+o+s)*(r*a)+(-3*t+3*n-2*o-s)*a+o*r+t}function ls(r,e,t,n){return function(i,o){const s=1-i;return s*s*o}(r,e)+function(i,o){return 2*(1-i)*i*o}(r,t)+function(i,o){return i*i*o}(r,n)}function ta(r,e,t,n,i){return function(o,s){const a=1-o;return a*a*a*s}(r,e)+function(o,s){const a=1-o;return 3*a*a*o*s}(r,t)+function(o,s){return 3*(1-o)*o*o*s}(r,n)+function(o,s){return o*o*o*s}(r,i)}Fh.prototype.isCatmullRomCurve3=!0;class na extends Yn{constructor(e=new Qe,t=new Qe,n=new Qe,i=new Qe){super(),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new Qe){const n=t,i=this.v0,o=this.v1,s=this.v2,a=this.v3;return n.set(ta(e,i.x,o.x,s.x,a.x),ta(e,i.y,o.y,s.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}na.prototype.isCubicBezierCurve=!0;class Xa extends Yn{constructor(e=new T,t=new T,n=new T,i=new T){super(),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new T){const n=t,i=this.v0,o=this.v1,s=this.v2,a=this.v3;return n.set(ta(e,i.x,o.x,s.x,a.x),ta(e,i.y,o.y,s.y,a.y),ta(e,i.z,o.z,s.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}Xa.prototype.isCubicBezierCurve3=!0;class Ya extends Yn{constructor(e=new Qe,t=new Qe){super(),this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Qe){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new Qe;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Ya.prototype.isLineCurve=!0;class ql extends Yn{constructor(e=new T,t=new T){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=e,this.v2=t}getPoint(e,t=new T){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class ia extends Yn{constructor(e=new Qe,t=new Qe,n=new Qe){super(),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Qe){const n=t,i=this.v0,o=this.v1,s=this.v2;return n.set(ls(e,i.x,o.x,s.x),ls(e,i.y,o.y,s.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}ia.prototype.isQuadraticBezierCurve=!0;class bv extends Yn{constructor(e=new T,t=new T,n=new T){super(),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new T){const n=t,i=this.v0,o=this.v1,s=this.v2;return n.set(ls(e,i.x,o.x,s.x),ls(e,i.y,o.y,s.y),ls(e,i.z,o.z,s.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}bv.prototype.isQuadraticBezierCurve3=!0;class rm extends Yn{constructor(e=[]){super(),this.type="SplineCurve",this.points=e}getPoint(e,t=new Qe){const n=t,i=this.points,o=(i.length-1)*e,s=Math.floor(o),a=o-s,l=i[s===0?s:s-1],u=i[s],c=i[s>i.length-2?i.length-1:s+1],d=i[s>i.length-3?i.length-1:s+2];return n.set(Md(a,l.x,u.x,c.x,d.x),Md(a,l.y,u.y,c.y,d.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new Qe().fromArray(i))}return this}}rm.prototype.isSplineCurve=!0;var wv=Object.freeze({__proto__:null,ArcCurve:Hr,CatmullRomCurve3:Fh,CubicBezierCurve:na,CubicBezierCurve3:Xa,EllipseCurve:kn,LineCurve:Ya,LineCurve3:ql,QuadraticBezierCurve:ia,QuadraticBezierCurve3:bv,SplineCurve:rm});const PE=function(r,e,t=2){const n=e&&e.length,i=n?e[0]*t:r.length;let o=Iy(r,0,i,t,!0);const s=[];if(!o||o.next===o.prev)return s;let a,l,u,c,d,f,m;if(n&&(o=function(g,_,y,w){const M=[];let R,F,C,U,N;for(R=0,F=_.length;R<F;R++)C=_[R]*w,U=R<F-1?_[R+1]*w:g.length,N=Iy(g,C,U,w,!1),N===N.next&&(N.steiner=!0),M.push(FE(N));for(M.sort(OE),R=0;R<M.length;R++)DE(M[R],y),y=qa(y,y.next);return y}(r,e,o,t)),r.length>80*t){a=u=r[0],l=c=r[1];for(let g=t;g<i;g+=t)d=r[g],f=r[g+1],d<a&&(a=d),f<l&&(l=f),d>u&&(u=d),f>c&&(c=f);m=Math.max(u-a,c-l),m=m!==0?1/m:0}return Ad(o,s,t,a,l,m),s};function Iy(r,e,t,n,i){let o,s;if(i===function(a,l,u,c){let d=0;for(let f=l,m=u-c;f<u;f+=c)d+=(a[m]-a[f])*(a[f+1]+a[m+1]),m=f;return d}(r,e,t,n)>0)for(o=e;o<t;o+=n)s=Dy(o,r[o],r[o+1],s);else for(o=t-n;o>=e;o-=n)s=Dy(o,r[o],r[o+1],s);return s&&om(s,s.next)&&(Cd(s),s=s.next),s}function qa(r,e){if(!r)return r;e||(e=r);let t,n=r;do if(t=!1,n.steiner||!om(n,n.next)&&ni(n.prev,n,n.next)!==0)n=n.next;else{if(Cd(n),n=e=n.prev,n===n.next)break;t=!0}while(t||n!==e);return e}function Ad(r,e,t,n,i,o,s){if(!r)return;!s&&o&&function(c,d,f,m){let g=c;do g.z===null&&(g.z=Tv(g.x,g.y,d,f,m)),g.prevZ=g.prev,g.nextZ=g.next,g=g.next;while(g!==c);g.prevZ.nextZ=null,g.prevZ=null,function(_){let y,w,M,R,F,C,U,N,G=1;do{for(w=_,_=null,F=null,C=0;w;){for(C++,M=w,U=0,y=0;y<G&&(U++,M=M.nextZ,M);y++);for(N=G;U>0||N>0&&M;)U!==0&&(N===0||!M||w.z<=M.z)?(R=w,w=w.nextZ,U--):(R=M,M=M.nextZ,N--),F?F.nextZ=R:_=R,R.prevZ=F,F=R;w=M}F.nextZ=null,G*=2}while(C>1)}(g)}(r,n,i,o);let a,l,u=r;for(;r.prev!==r.next;)if(a=r.prev,l=r.next,o?RE(r,n,i,o):CE(r))e.push(a.i/t),e.push(r.i/t),e.push(l.i/t),Cd(r),r=l.next,u=l.next;else if((r=l)===u){s?s===1?Ad(r=IE(qa(r),e,t),e,t,n,i,o,2):s===2&&LE(r,e,t,n,i,o):Ad(qa(r),e,t,n,i,o,1);break}}function CE(r){const e=r.prev,t=r,n=r.next;if(ni(e,t,n)>=0)return!1;let i=r.next.next;for(;i!==r.prev;){if(Bh(e.x,e.y,t.x,t.y,n.x,n.y,i.x,i.y)&&ni(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function RE(r,e,t,n){const i=r.prev,o=r,s=r.next;if(ni(i,o,s)>=0)return!1;const a=i.x<o.x?i.x<s.x?i.x:s.x:o.x<s.x?o.x:s.x,l=i.y<o.y?i.y<s.y?i.y:s.y:o.y<s.y?o.y:s.y,u=i.x>o.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,c=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,d=Tv(a,l,e,t,n),f=Tv(u,c,e,t,n);let m=r.prevZ,g=r.nextZ;for(;m&&m.z>=d&&g&&g.z<=f;){if(m!==r.prev&&m!==r.next&&Bh(i.x,i.y,o.x,o.y,s.x,s.y,m.x,m.y)&&ni(m.prev,m,m.next)>=0||(m=m.prevZ,g!==r.prev&&g!==r.next&&Bh(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&ni(g.prev,g,g.next)>=0))return!1;g=g.nextZ}for(;m&&m.z>=d;){if(m!==r.prev&&m!==r.next&&Bh(i.x,i.y,o.x,o.y,s.x,s.y,m.x,m.y)&&ni(m.prev,m,m.next)>=0)return!1;m=m.prevZ}for(;g&&g.z<=f;){if(g!==r.prev&&g!==r.next&&Bh(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&ni(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function IE(r,e,t){let n=r;do{const i=n.prev,o=n.next.next;!om(i,o)&&Ly(i,n,n.next,o)&&Pd(i,o)&&Pd(o,i)&&(e.push(i.i/t),e.push(n.i/t),e.push(o.i/t),Cd(n),Cd(n.next),n=r=o),n=n.next}while(n!==r);return qa(n)}function LE(r,e,t,n,i,o){let s=r;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&BE(s,a)){let l=Oy(s,a);return s=qa(s,s.next),l=qa(l,l.next),Ad(s,e,t,n,i,o),void Ad(l,e,t,n,i,o)}a=a.next}s=s.next}while(s!==r)}function OE(r,e){return r.x-e.x}function DE(r,e){if(e=function(t,n){let i=n;const o=t.x,s=t.y;let a,l=-1/0;do{if(s<=i.y&&s>=i.next.y&&i.next.y!==i.y){const g=i.x+(s-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(g<=o&&g>l){if(l=g,g===o){if(s===i.y)return i;if(s===i.next.y)return i.next}a=i.x<i.next.x?i:i.next}}i=i.next}while(i!==n);if(!a)return null;if(o===l)return a;const u=a,c=a.x,d=a.y;let f,m=1/0;i=a;do o>=i.x&&i.x>=c&&o!==i.x&&Bh(s<d?o:l,s,c,d,s<d?l:o,s,i.x,i.y)&&(f=Math.abs(s-i.y)/(o-i.x),Pd(i,t)&&(f<m||f===m&&(i.x>a.x||i.x===a.x&&NE(a,i)))&&(a=i,m=f)),i=i.next;while(i!==u);return a}(r,e)){const t=Oy(e,r);qa(e,e.next),qa(t,t.next)}}function NE(r,e){return ni(r.prev,r,e.prev)<0&&ni(e.next,r,r.next)<0}function Tv(r,e,t,n,i){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=32767*(r-t)*i)|r<<8))|r<<4))|r<<2))|r<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function FE(r){let e=r,t=r;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==r);return t}function Bh(r,e,t,n,i,o,s,a){return(i-s)*(e-a)-(r-s)*(o-a)>=0&&(r-s)*(n-a)-(t-s)*(e-a)>=0&&(t-s)*(o-a)-(i-s)*(n-a)>=0}function BE(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!function(t,n){let i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==n.i&&i.next.i!==n.i&&Ly(i,i.next,t,n))return!0;i=i.next}while(i!==t);return!1}(r,e)&&(Pd(r,e)&&Pd(e,r)&&function(t,n){let i=t,o=!1;const s=(t.x+n.x)/2,a=(t.y+n.y)/2;do i.y>a!=i.next.y>a&&i.next.y!==i.y&&s<(i.next.x-i.x)*(a-i.y)/(i.next.y-i.y)+i.x&&(o=!o),i=i.next;while(i!==t);return o}(r,e)&&(ni(r.prev,r,e.prev)||ni(r,e.prev,e))||om(r,e)&&ni(r.prev,r,r.next)>0&&ni(e.prev,e,e.next)>0)}function ni(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function om(r,e){return r.x===e.x&&r.y===e.y}function Ly(r,e,t,n){const i=am(ni(r,e,t)),o=am(ni(r,e,n)),s=am(ni(t,n,r)),a=am(ni(t,n,e));return i!==o&&s!==a||!(i!==0||!sm(r,t,e))||!(o!==0||!sm(r,n,e))||!(s!==0||!sm(t,r,n))||!(a!==0||!sm(t,e,n))}function sm(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function am(r){return r>0?1:r<0?-1:0}function Pd(r,e){return ni(r.prev,r,r.next)<0?ni(r,e,r.next)>=0&&ni(r,r.prev,e)>=0:ni(r,e,r.prev)<0||ni(r,r.next,e)<0}function Oy(r,e){const t=new Sv(r.i,r.x,r.y),n=new Sv(e.i,e.x,e.y),i=r.next,o=e.prev;return r.next=e,e.prev=r,t.next=i,i.prev=t,n.next=t,t.prev=n,o.next=n,n.prev=o,n}function Dy(r,e,t,n){const i=new Sv(r,e,t);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Cd(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Sv(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class us{static area(e){const t=e.length;let n=0;for(let i=t-1,o=0;o<t;i=o++)n+=e[i].x*e[o].y-e[o].x*e[i].y;return .5*n}static isClockWise(e){return us.area(e)<0}static triangulateShape(e,t){const n=[],i=[],o=[];Ny(e),Fy(n,e);let s=e.length;t.forEach(Ny);for(let l=0;l<t.length;l++)i.push(s),s+=t[l].length,Fy(n,t[l]);const a=PE(n,i);for(let l=0;l<a.length;l+=3)o.push(a.slice(l,l+3));return o}}function Ny(r){const e=r.length;e>2&&r[e-1].equals(r[0])&&r.pop()}function Fy(r,e){for(let t=0;t<e.length;t++)r.push(e[t].x),r.push(e[t].y)}class Co extends Mt{constructor(e,t){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,i=[],o=[];for(let a=0,l=e.length;a<l;a++)s(e[a]);function s(a){const l=[],u=t.curveSegments!==void 0?t.curveSegments:12,c=t.steps!==void 0?t.steps:1;let d=t.depth!==void 0?t.depth:100,f=t.bevelEnabled===void 0||t.bevelEnabled,m=t.bevelThickness!==void 0?t.bevelThickness:6,g=t.bevelSize!==void 0?t.bevelSize:m-2,_=t.bevelOffset!==void 0?t.bevelOffset:0,y=t.bevelSegments!==void 0?t.bevelSegments:3;const w=t.extrudePath,M=t.UVGenerator!==void 0?t.UVGenerator:UE;t.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),d=t.amount);let R,F,C,U,N,G=!1;w&&(R=w.getSpacedPoints(c),G=!0,f=!1,F=w.computeFrenetFrames(c,!1),C=new T,U=new T,N=new T),f||(y=0,m=0,g=0,_=0);const he=a.extractPoints(u);let ne=he.shape;const Z=he.holes;if(!us.isClockWise(ne)){ne=ne.reverse();for(let ve=0,Y=Z.length;ve<Y;ve++){const pe=Z[ve];us.isClockWise(pe)&&(Z[ve]=pe.reverse())}}const Q=us.triangulateShape(ne,Z),$=ne;for(let ve=0,Y=Z.length;ve<Y;ve++){const pe=Z[ve];ne=ne.concat(pe)}function se(ve,Y,pe){return Y||console.error("THREE.ExtrudeGeometry: vec does not exist"),Y.clone().multiplyScalar(pe).add(ve)}const me=ne.length,ge=Q.length;function de(ve,Y,pe){let ye,xe,De;const ht=ve.x-Y.x,xt=ve.y-Y.y,_t=pe.x-ve.x,Gt=pe.y-ve.y,Wt=ht*ht+xt*xt,ai=ht*Gt-xt*_t;if(Math.abs(ai)>Number.EPSILON){const Cn=Math.sqrt(Wt),ko=Math.sqrt(_t*_t+Gt*Gt),Sp=Y.x-xt/Cn,Ep=Y.y+ht/Cn,Mp=((pe.x-Gt/ko-Sp)*Gt-(pe.y+_t/ko-Ep)*_t)/(ht*Gt-xt*_t);ye=Sp+ht*Mp-ve.x,xe=Ep+xt*Mp-ve.y;const pr=ye*ye+xe*xe;if(pr<=2)return new Qe(ye,xe);De=Math.sqrt(pr/2)}else{let Cn=!1;ht>Number.EPSILON?_t>Number.EPSILON&&(Cn=!0):ht<-Number.EPSILON?_t<-Number.EPSILON&&(Cn=!0):Math.sign(xt)===Math.sign(Gt)&&(Cn=!0),Cn?(ye=-xt,xe=ht,De=Math.sqrt(Wt)):(ye=ht,xe=xt,De=Math.sqrt(Wt/2))}return new Qe(ye/De,xe/De)}const fe=[];for(let ve=0,Y=$.length,pe=Y-1,ye=ve+1;ve<Y;ve++,pe++,ye++)pe===Y&&(pe=0),ye===Y&&(ye=0),fe[ve]=de($[ve],$[pe],$[ye]);const Re=[];let ke,Be=fe.concat();for(let ve=0,Y=Z.length;ve<Y;ve++){const pe=Z[ve];ke=[];for(let ye=0,xe=pe.length,De=xe-1,ht=ye+1;ye<xe;ye++,De++,ht++)De===xe&&(De=0),ht===xe&&(ht=0),ke[ye]=de(pe[ye],pe[De],pe[ht]);Re.push(ke),Be=Be.concat(ke)}for(let ve=0;ve<y;ve++){const Y=ve/y,pe=m*Math.cos(Y*Math.PI/2),ye=g*Math.sin(Y*Math.PI/2)+_;for(let xe=0,De=$.length;xe<De;xe++){const ht=se($[xe],fe[xe],ye);Ae(ht.x,ht.y,-pe)}for(let xe=0,De=Z.length;xe<De;xe++){const ht=Z[xe];ke=Re[xe];for(let xt=0,_t=ht.length;xt<_t;xt++){const Gt=se(ht[xt],ke[xt],ye);Ae(Gt.x,Gt.y,-pe)}}}const J=g+_;for(let ve=0;ve<me;ve++){const Y=f?se(ne[ve],Be[ve],J):ne[ve];G?(U.copy(F.normals[0]).multiplyScalar(Y.x),C.copy(F.binormals[0]).multiplyScalar(Y.y),N.copy(R[0]).add(U).add(C),Ae(N.x,N.y,N.z)):Ae(Y.x,Y.y,0)}for(let ve=1;ve<=c;ve++)for(let Y=0;Y<me;Y++){const pe=f?se(ne[Y],Be[Y],J):ne[Y];G?(U.copy(F.normals[ve]).multiplyScalar(pe.x),C.copy(F.binormals[ve]).multiplyScalar(pe.y),N.copy(R[ve]).add(U).add(C),Ae(N.x,N.y,N.z)):Ae(pe.x,pe.y,d/c*ve)}for(let ve=y-1;ve>=0;ve--){const Y=ve/y,pe=m*Math.cos(Y*Math.PI/2),ye=g*Math.sin(Y*Math.PI/2)+_;for(let xe=0,De=$.length;xe<De;xe++){const ht=se($[xe],fe[xe],ye);Ae(ht.x,ht.y,d+pe)}for(let xe=0,De=Z.length;xe<De;xe++){const ht=Z[xe];ke=Re[xe];for(let xt=0,_t=ht.length;xt<_t;xt++){const Gt=se(ht[xt],ke[xt],ye);G?Ae(Gt.x,Gt.y+R[c-1].y,R[c-1].x+pe):Ae(Gt.x,Gt.y,d+pe)}}}function te(ve,Y){let pe=ve.length;for(;--pe>=0;){const ye=pe;let xe=pe-1;xe<0&&(xe=ve.length-1);for(let De=0,ht=c+2*y;De<ht;De++){const xt=me*De,_t=me*(De+1);Te(Y+ye+xt,Y+xe+xt,Y+xe+_t,Y+ye+_t)}}}function Ae(ve,Y,pe){l.push(ve),l.push(Y),l.push(pe)}function Ne(ve,Y,pe){Ge(ve),Ge(Y),Ge(pe);const ye=i.length/3,xe=M.generateTopUV(n,i,ye-3,ye-2,ye-1);Ye(xe[0]),Ye(xe[1]),Ye(xe[2])}function Te(ve,Y,pe,ye){Ge(ve),Ge(Y),Ge(ye),Ge(Y),Ge(pe),Ge(ye);const xe=i.length/3,De=M.generateSideWallUV(n,i,xe-6,xe-3,xe-2,xe-1);Ye(De[0]),Ye(De[1]),Ye(De[3]),Ye(De[1]),Ye(De[2]),Ye(De[3])}function Ge(ve){i.push(l[3*ve+0]),i.push(l[3*ve+1]),i.push(l[3*ve+2])}function Ye(ve){o.push(ve.x),o.push(ve.y)}(function(){const ve=i.length/3;if(f){let Y=0,pe=me*Y;for(let ye=0;ye<ge;ye++){const xe=Q[ye];Ne(xe[2]+pe,xe[1]+pe,xe[0]+pe)}Y=c+2*y,pe=me*Y;for(let ye=0;ye<ge;ye++){const xe=Q[ye];Ne(xe[0]+pe,xe[1]+pe,xe[2]+pe)}}else{for(let Y=0;Y<ge;Y++){const pe=Q[Y];Ne(pe[2],pe[1],pe[0])}for(let Y=0;Y<ge;Y++){const pe=Q[Y];Ne(pe[0]+me*c,pe[1]+me*c,pe[2]+me*c)}}n.addGroup(ve,i.length/3-ve,0)})(),function(){const ve=i.length/3;let Y=0;te($,Y),Y+=$.length;for(let pe=0,ye=Z.length;pe<ye;pe++){const xe=Z[pe];te(xe,Y),Y+=xe.length}n.addGroup(ve,i.length/3-ve,1)}()}this.setAttribute("position",new st(i,3)),this.setAttribute("uv",new st(o,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(t,n,i){if(i.shapes=[],Array.isArray(t))for(let o=0,s=t.length;o<s;o++){const a=t[o];i.shapes.push(a.uuid)}else i.shapes.push(t.uuid);return n.extrudePath!==void 0&&(i.options.extrudePath=n.extrudePath.toJSON()),i}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let o=0,s=e.shapes.length;o<s;o++){const a=t[e.shapes[o]];n.push(a)}const i=e.options.extrudePath;return i!==void 0&&(e.options.extrudePath=new wv[i.type]().fromJSON(i)),new Co(n,e.options)}}const UE={generateTopUV:function(r,e,t,n,i){const o=e[3*t],s=e[3*t+1],a=e[3*n],l=e[3*n+1],u=e[3*i],c=e[3*i+1];return[new Qe(o,s),new Qe(a,l),new Qe(u,c)]},generateSideWallUV:function(r,e,t,n,i,o){const s=e[3*t],a=e[3*t+1],l=e[3*t+2],u=e[3*n],c=e[3*n+1],d=e[3*n+2],f=e[3*i],m=e[3*i+1],g=e[3*i+2],_=e[3*o],y=e[3*o+1],w=e[3*o+2];return Math.abs(a-c)<Math.abs(s-u)?[new Qe(s,1-l),new Qe(u,1-d),new Qe(f,1-g),new Qe(_,1-w)]:[new Qe(a,1-l),new Qe(c,1-d),new Qe(m,1-g),new Qe(y,1-w)]}};class Uh extends St{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Uh(e.radius,e.detail)}}class kh extends Mt{constructor(e,t=12,n=0,i=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:i},t=Math.floor(t),i=Si(i,0,2*Math.PI);const o=[],s=[],a=[],l=1/t,u=new T,c=new Qe;for(let d=0;d<=t;d++){const f=n+d*l*i,m=Math.sin(f),g=Math.cos(f);for(let _=0;_<=e.length-1;_++)u.x=e[_].x*m,u.y=e[_].y,u.z=e[_].x*g,s.push(u.x,u.y,u.z),c.x=d/t,c.y=_/(e.length-1),a.push(c.x,c.y)}for(let d=0;d<t;d++)for(let f=0;f<e.length-1;f++){const m=f+d*e.length,g=m,_=m+e.length,y=m+e.length+1,w=m+1;o.push(g,_,w),o.push(_,y,w)}if(this.setIndex(o),this.setAttribute("position",new st(s,3)),this.setAttribute("uv",new st(a,2)),this.computeVertexNormals(),i===2*Math.PI){const d=this.attributes.normal.array,f=new T,m=new T,g=new T,_=t*e.length*3;for(let y=0,w=0;y<e.length;y++,w+=3)f.x=d[w+0],f.y=d[w+1],f.z=d[w+2],m.x=d[_+w+0],m.y=d[_+w+1],m.z=d[_+w+2],g.addVectors(f,m).normalize(),d[w+0]=d[_+w+0]=g.x,d[w+1]=d[_+w+1]=g.y,d[w+2]=d[_+w+2]=g.z}}static fromJSON(e){return new kh(e.points,e.segments,e.phiStart,e.phiLength)}}class Zl extends St{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Zl(e.radius,e.detail)}}class Rd extends Mt{constructor(e,t,n){super(),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n};const i=[],o=[],s=[],a=[],l=1e-5,u=new T,c=new T,d=new T,f=new T,m=new T;e.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");const g=t+1;for(let _=0;_<=n;_++){const y=_/n;for(let w=0;w<=t;w++){const M=w/t;e(M,y,c),o.push(c.x,c.y,c.z),M-l>=0?(e(M-l,y,d),f.subVectors(c,d)):(e(M+l,y,d),f.subVectors(d,c)),y-l>=0?(e(M,y-l,d),m.subVectors(c,d)):(e(M,y+l,d),m.subVectors(d,c)),u.crossVectors(f,m).normalize(),s.push(u.x,u.y,u.z),a.push(M,y)}}for(let _=0;_<n;_++)for(let y=0;y<t;y++){const w=_*g+y,M=_*g+y+1,R=(_+1)*g+y+1,F=(_+1)*g+y;i.push(w,M,F),i.push(M,R,F)}this.setIndex(i),this.setAttribute("position",new st(o,3)),this.setAttribute("normal",new st(s,3)),this.setAttribute("uv",new st(a,2))}}class Gh extends Mt{constructor(e=.5,t=1,n=8,i=1,o=0,s=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:i,thetaStart:o,thetaLength:s},n=Math.max(3,n);const a=[],l=[],u=[],c=[];let d=e;const f=(t-e)/(i=Math.max(1,i)),m=new T,g=new Qe;for(let _=0;_<=i;_++){for(let y=0;y<=n;y++){const w=o+y/n*s;m.x=d*Math.cos(w),m.y=d*Math.sin(w),l.push(m.x,m.y,m.z),u.push(0,0,1),g.x=(m.x/t+1)/2,g.y=(m.y/t+1)/2,c.push(g.x,g.y)}d+=f}for(let _=0;_<i;_++){const y=_*(n+1);for(let w=0;w<n;w++){const M=w+y,R=M,F=M+n+1,C=M+n+2,U=M+1;a.push(R,F,U),a.push(F,C,U)}}this.setIndex(a),this.setAttribute("position",new st(l,3)),this.setAttribute("normal",new st(u,3)),this.setAttribute("uv",new st(c,2))}static fromJSON(e){return new Gh(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Jl extends Mt{constructor(e,t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],i=[],o=[],s=[];let a=0,l=0;if(Array.isArray(e)===!1)u(e);else for(let c=0;c<e.length;c++)u(e[c]),this.addGroup(a,l,c),a+=l,l=0;function u(c){const d=i.length/3,f=c.extractPoints(t);let m=f.shape;const g=f.holes;us.isClockWise(m)===!1&&(m=m.reverse());for(let y=0,w=g.length;y<w;y++){const M=g[y];us.isClockWise(M)===!0&&(g[y]=M.reverse())}const _=us.triangulateShape(m,g);for(let y=0,w=g.length;y<w;y++){const M=g[y];m=m.concat(M)}for(let y=0,w=m.length;y<w;y++){const M=m[y];i.push(M.x,M.y,0),o.push(0,0,1),s.push(M.x,M.y)}for(let y=0,w=_.length;y<w;y++){const M=_[y],R=M[0]+d,F=M[1]+d,C=M[2]+d;n.push(R,F,C),l+=3}}this.setIndex(n),this.setAttribute("position",new st(i,3)),this.setAttribute("normal",new st(o,3)),this.setAttribute("uv",new st(s,2))}toJSON(){const e=super.toJSON();return function(t,n){if(n.shapes=[],Array.isArray(t))for(let i=0,o=t.length;i<o;i++){const s=t[i];n.shapes.push(s.uuid)}else n.shapes.push(t.uuid);return n}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let i=0,o=e.shapes.length;i<o;i++){const s=t[e.shapes[i]];n.push(s)}return new Jl(n,e.curveSegments)}}class $l extends Mt{constructor(e=1,t=8,n=6,i=0,o=2*Math.PI,s=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:o,thetaStart:s,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const l=Math.min(s+a,Math.PI);let u=0;const c=[],d=new T,f=new T,m=[],g=[],_=[],y=[];for(let w=0;w<=n;w++){const M=[],R=w/n;let F=0;w==0&&s==0?F=.5/t:w==n&&l==Math.PI&&(F=-.5/t);for(let C=0;C<=t;C++){const U=C/t;d.x=-e*Math.cos(i+U*o)*Math.sin(s+R*a),d.y=e*Math.cos(s+R*a),d.z=e*Math.sin(i+U*o)*Math.sin(s+R*a),g.push(d.x,d.y,d.z),f.copy(d).normalize(),_.push(f.x,f.y,f.z),y.push(U+F,1-R),M.push(u++)}c.push(M)}for(let w=0;w<n;w++)for(let M=0;M<t;M++){const R=c[w][M+1],F=c[w][M],C=c[w+1][M],U=c[w+1][M+1];(w!==0||s>0)&&m.push(R,F,U),(w!==n-1||l<Math.PI)&&m.push(F,C,U)}this.setIndex(m),this.setAttribute("position",new st(g,3)),this.setAttribute("normal",new st(_,3)),this.setAttribute("uv",new st(y,2))}static fromJSON(e){return new $l(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class Hh extends St{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Hh(e.radius,e.detail)}}class lm extends Co{constructor(e,t={}){const n=t.font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Mt;const i=n.generateShapes(e,t.size);t.depth=t.height!==void 0?t.height:50,t.bevelThickness===void 0&&(t.bevelThickness=10),t.bevelSize===void 0&&(t.bevelSize=8),t.bevelEnabled===void 0&&(t.bevelEnabled=!1),super(i,t),this.type="TextGeometry"}}class zh extends Mt{constructor(e=1,t=.4,n=8,i=6,o=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:i,arc:o},n=Math.floor(n),i=Math.floor(i);const s=[],a=[],l=[],u=[],c=new T,d=new T,f=new T;for(let m=0;m<=n;m++)for(let g=0;g<=i;g++){const _=g/i*o,y=m/n*Math.PI*2;d.x=(e+t*Math.cos(y))*Math.cos(_),d.y=(e+t*Math.cos(y))*Math.sin(_),d.z=t*Math.sin(y),a.push(d.x,d.y,d.z),c.x=e*Math.cos(_),c.y=e*Math.sin(_),f.subVectors(d,c).normalize(),l.push(f.x,f.y,f.z),u.push(g/i),u.push(m/n)}for(let m=1;m<=n;m++)for(let g=1;g<=i;g++){const _=(i+1)*m+g-1,y=(i+1)*(m-1)+g-1,w=(i+1)*(m-1)+g,M=(i+1)*m+g;s.push(_,y,M),s.push(y,w,M)}this.setIndex(s),this.setAttribute("position",new st(a,3)),this.setAttribute("normal",new st(l,3)),this.setAttribute("uv",new st(u,2))}static fromJSON(e){return new zh(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class Vh extends Mt{constructor(e=1,t=.4,n=64,i=8,o=2,s=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:i,p:o,q:s},n=Math.floor(n),i=Math.floor(i);const a=[],l=[],u=[],c=[],d=new T,f=new T,m=new T,g=new T,_=new T,y=new T,w=new T;for(let R=0;R<=n;++R){const F=R/n*o*Math.PI*2;M(F,o,s,e,m),M(F+.01,o,s,e,g),y.subVectors(g,m),w.addVectors(g,m),_.crossVectors(y,w),w.crossVectors(_,y),_.normalize(),w.normalize();for(let C=0;C<=i;++C){const U=C/i*Math.PI*2,N=-t*Math.cos(U),G=t*Math.sin(U);d.x=m.x+(N*w.x+G*_.x),d.y=m.y+(N*w.y+G*_.y),d.z=m.z+(N*w.z+G*_.z),l.push(d.x,d.y,d.z),f.subVectors(d,m).normalize(),u.push(f.x,f.y,f.z),c.push(R/n),c.push(C/i)}}for(let R=1;R<=n;R++)for(let F=1;F<=i;F++){const C=(i+1)*(R-1)+(F-1),U=(i+1)*R+(F-1),N=(i+1)*R+F,G=(i+1)*(R-1)+F;a.push(C,U,G),a.push(U,N,G)}function M(R,F,C,U,N){const G=Math.cos(R),he=Math.sin(R),ne=C/F*R,Z=Math.cos(ne);N.x=U*(2+Z)*.5*G,N.y=U*(2+Z)*he*.5,N.z=U*Math.sin(ne)*.5}this.setIndex(a),this.setAttribute("position",new st(l,3)),this.setAttribute("normal",new st(u,3)),this.setAttribute("uv",new st(c,2))}static fromJSON(e){return new Vh(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class jh extends Mt{constructor(e,t=64,n=1,i=8,o=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:i,closed:o};const s=e.computeFrenetFrames(t,o);this.tangents=s.tangents,this.normals=s.normals,this.binormals=s.binormals;const a=new T,l=new T,u=new Qe;let c=new T;const d=[],f=[],m=[],g=[];function _(y){c=e.getPointAt(y/t,c);const w=s.normals[y],M=s.binormals[y];for(let R=0;R<=i;R++){const F=R/i*Math.PI*2,C=Math.sin(F),U=-Math.cos(F);l.x=U*w.x+C*M.x,l.y=U*w.y+C*M.y,l.z=U*w.z+C*M.z,l.normalize(),f.push(l.x,l.y,l.z),a.x=c.x+n*l.x,a.y=c.y+n*l.y,a.z=c.z+n*l.z,d.push(a.x,a.y,a.z)}}(function(){for(let y=0;y<t;y++)_(y);_(o===!1?t:0),function(){for(let y=0;y<=t;y++)for(let w=0;w<=i;w++)u.x=y/t,u.y=w/i,m.push(u.x,u.y)}(),function(){for(let y=1;y<=t;y++)for(let w=1;w<=i;w++){const M=(i+1)*(y-1)+(w-1),R=(i+1)*y+(w-1),F=(i+1)*y+w,C=(i+1)*(y-1)+w;g.push(M,R,C),g.push(R,F,C)}}()})(),this.setIndex(g),this.setAttribute("position",new st(d,3)),this.setAttribute("normal",new st(f,3)),this.setAttribute("uv",new st(m,2))}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new jh(new wv[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class Ev extends Mt{constructor(e){if(super(),this.type="WireframeGeometry",e.isGeometry===!0)return void console.error("THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");const t=[],n=[0,0],i={},o=new T;if(e.index!==null){const s=e.attributes.position,a=e.index;let l=e.groups;l.length===0&&(l=[{start:0,count:a.count,materialIndex:0}]);for(let u=0,c=l.length;u<c;++u){const d=l[u],f=d.start;for(let m=f,g=f+d.count;m<g;m+=3)for(let _=0;_<3;_++){const y=a.getX(m+_),w=a.getX(m+(_+1)%3);n[0]=Math.min(y,w),n[1]=Math.max(y,w);const M=n[0]+","+n[1];i[M]===void 0&&(i[M]={index1:n[0],index2:n[1]})}}for(const u in i){const c=i[u];o.fromBufferAttribute(s,c.index1),t.push(o.x,o.y,o.z),o.fromBufferAttribute(s,c.index2),t.push(o.x,o.y,o.z)}}else{const s=e.attributes.position;for(let a=0,l=s.count/3;a<l;a++)for(let u=0;u<3;u++){const c=3*a+u;o.fromBufferAttribute(s,c),t.push(o.x,o.y,o.z);const d=3*a+(u+1)%3;o.fromBufferAttribute(s,d),t.push(o.x,o.y,o.z)}}this.setAttribute("position",new st(t,3))}}var By=Object.freeze({__proto__:null,BoxGeometry:no,BoxBufferGeometry:no,CircleGeometry:nt,CircleBufferGeometry:nt,ConeGeometry:mt,ConeBufferGeometry:mt,CylinderGeometry:Et,CylinderBufferGeometry:Et,DodecahedronGeometry:It,DodecahedronBufferGeometry:It,EdgesGeometry:Mi,ExtrudeGeometry:Co,ExtrudeBufferGeometry:Co,IcosahedronGeometry:Uh,IcosahedronBufferGeometry:Uh,LatheGeometry:kh,LatheBufferGeometry:kh,OctahedronGeometry:Zl,OctahedronBufferGeometry:Zl,ParametricGeometry:Rd,ParametricBufferGeometry:Rd,PlaneGeometry:Li,PlaneBufferGeometry:Li,PolyhedronGeometry:St,PolyhedronBufferGeometry:St,RingGeometry:Gh,RingBufferGeometry:Gh,ShapeGeometry:Jl,ShapeBufferGeometry:Jl,SphereGeometry:$l,SphereBufferGeometry:$l,TetrahedronGeometry:Hh,TetrahedronBufferGeometry:Hh,TextGeometry:lm,TextBufferGeometry:lm,TorusGeometry:zh,TorusBufferGeometry:zh,TorusKnotGeometry:Vh,TorusKnotBufferGeometry:Vh,TubeGeometry:jh,TubeBufferGeometry:jh,WireframeGeometry:Ev});class Mv extends _i{constructor(e){super(),this.type="ShadowMaterial",this.color=new gt(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}}Mv.prototype.isShadowMaterial=!0;class Wh extends Gi{constructor(e){super(e),this.type="RawShaderMaterial"}}Wh.prototype.isRawShaderMaterial=!0;class um extends _i{constructor(e){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mr,this.normalScale=new Qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.vertexTangents=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this.vertexTangents=e.vertexTangents,this}}um.prototype.isMeshStandardMaterial=!0;class Av extends um{constructor(e){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Qe(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(t){this.reflectivity=Si(2.5*(t-1)/(t+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.thickness=.01,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new gt(1,1,1),this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.reflectivity=e.reflectivity,e.sheen?this.sheen=(this.sheen||new gt).copy(e.sheen):this.sheen=null,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this}}Av.prototype.isMeshPhysicalMaterial=!0;class hm extends _i{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new gt(16777215),this.specular=new gt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mr,this.normalScale=new Qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ul,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}hm.prototype.isMeshPhongMaterial=!0;class Pv extends _i{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new gt(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mr,this.normalScale=new Qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this}}Pv.prototype.isMeshToonMaterial=!0;class Cv extends _i{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mr,this.normalScale=new Qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}Cv.prototype.isMeshNormalMaterial=!0;class cm extends _i{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new gt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ul,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this}}cm.prototype.isMeshLambertMaterial=!0;class Rv extends _i{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new gt(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mr,this.normalScale=new Qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}Rv.prototype.isMeshMatcapMaterial=!0;class Iv extends xi{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}Iv.prototype.isLineDashedMaterial=!0;var kE=Object.freeze({__proto__:null,ShadowMaterial:Mv,SpriteMaterial:zl,RawShaderMaterial:Wh,ShaderMaterial:Gi,PointsMaterial:j,MeshPhysicalMaterial:Av,MeshStandardMaterial:um,MeshPhongMaterial:hm,MeshToonMaterial:Pv,MeshNormalMaterial:Cv,MeshLambertMaterial:cm,MeshDepthMaterial:on,MeshDistanceMaterial:Sh,MeshBasicMaterial:Qn,MeshMatcapMaterial:Rv,LineDashedMaterial:Iv,LineBasicMaterial:xi,Material:_i});const Gn={arraySlice:function(r,e,t){return Gn.isTypedArray(r)?new r.constructor(r.subarray(e,t!==void 0?t:r.length)):r.slice(e,t)},convertArray:function(r,e,t){return!r||!t&&r.constructor===e?r:typeof e.BYTES_PER_ELEMENT=="number"?new e(r):Array.prototype.slice.call(r)},isTypedArray:function(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)},getKeyframeOrder:function(r){const e=r.length,t=new Array(e);for(let n=0;n!==e;++n)t[n]=n;return t.sort(function(n,i){return r[n]-r[i]}),t},sortedArray:function(r,e,t){const n=r.length,i=new r.constructor(n);for(let o=0,s=0;s!==n;++o){const a=t[o]*e;for(let l=0;l!==e;++l)i[s++]=r[a+l]}return i},flattenJSON:function(r,e,t,n){let i=1,o=r[0];for(;o!==void 0&&o[n]===void 0;)o=r[i++];if(o===void 0)return;let s=o[n];if(s!==void 0)if(Array.isArray(s))do s=o[n],s!==void 0&&(e.push(o.time),t.push.apply(t,s)),o=r[i++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[n],s!==void 0&&(e.push(o.time),s.toArray(t,t.length)),o=r[i++];while(o!==void 0);else do s=o[n],s!==void 0&&(e.push(o.time),t.push(s)),o=r[i++];while(o!==void 0)},subclip:function(r,e,t,n,i=30){const o=r.clone();o.name=e;const s=[];for(let l=0;l<o.tracks.length;++l){const u=o.tracks[l],c=u.getValueSize(),d=[],f=[];for(let m=0;m<u.times.length;++m){const g=u.times[m]*i;if(!(g<t||g>=n)){d.push(u.times[m]);for(let _=0;_<c;++_)f.push(u.values[m*c+_])}}d.length!==0&&(u.times=Gn.convertArray(d,u.times.constructor),u.values=Gn.convertArray(f,u.values.constructor),s.push(u))}o.tracks=s;let a=1/0;for(let l=0;l<o.tracks.length;++l)a>o.tracks[l].times[0]&&(a=o.tracks[l].times[0]);for(let l=0;l<o.tracks.length;++l)o.tracks[l].shift(-1*a);return o.resetDuration(),o},makeClipAdditive:function(r,e=0,t=r,n=30){n<=0&&(n=30);const i=t.tracks.length,o=e/n;for(let s=0;s<i;++s){const a=t.tracks[s],l=a.ValueTypeName;if(l==="bool"||l==="string")continue;const u=r.tracks.find(function(w){return w.name===a.name&&w.ValueTypeName===l});if(u===void 0)continue;let c=0;const d=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=d/3);let f=0;const m=u.getValueSize();u.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(f=m/3);const g=a.times.length-1;let _;if(o<=a.times[0]){const w=c,M=d-c;_=Gn.arraySlice(a.values,w,M)}else if(o>=a.times[g]){const w=g*d+c,M=w+d-c;_=Gn.arraySlice(a.values,w,M)}else{const w=a.createInterpolant(),M=c,R=d-c;w.evaluate(o),_=Gn.arraySlice(w.resultBuffer,M,R)}l==="quaternion"&&new vi().fromArray(_).normalize().conjugate().toArray(_);const y=u.times.length;for(let w=0;w<y;++w){const M=w*m+f;if(l==="quaternion")vi.multiplyQuaternionsFlat(u.values,M,_,0,u.values,M);else{const R=m-2*f;for(let F=0;F<R;++F)u.values[M+F]-=_[F]}}}return r.blendMode=we,r}};class ra{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,i=t[n],o=t[n-1];e:{t:{let s;n:{i:if(!(e<i)){for(let a=n+2;;){if(i===void 0){if(e<o)break i;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,o)}if(n===a)break;if(o=i,i=t[++n],e<i)break t}s=t.length;break n}if(e>=o)break e;{const a=t[1];e<a&&(n=2,o=a);for(let l=n-2;;){if(o===void 0)return this._cachedIndex=0,this.beforeStart_(0,e,i);if(n===l)break;if(i=o,o=t[--n-1],e>=o)break t}s=n,n=0}}for(;n<s;){const a=n+s>>>1;e<t[a]?s=a:n=a+1}if(i=t[n],o=t[n-1],o===void 0)return this._cachedIndex=0,this.beforeStart_(0,e,i);if(i===void 0)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,o,e)}this._cachedIndex=n,this.intervalChanged_(n,o,i)}return this.interpolate_(n,o,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,o=e*i;for(let s=0;s!==i;++s)t[s]=n[o+s];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}ra.prototype.beforeStart_=ra.prototype.copySampleValue_,ra.prototype.afterEnd_=ra.prototype.copySampleValue_;class Uy extends ra{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:wi,endingEnd:wi}}intervalChanged_(e,t,n){const i=this.parameterPositions;let o=e-2,s=e+1,a=i[o],l=i[s];if(a===void 0)switch(this.getSettings_().endingStart){case Yo:o=e,a=2*t-n;break;case yl:o=i.length-2,a=t+i[o]-i[o+1];break;default:o=e,a=n}if(l===void 0)switch(this.getSettings_().endingEnd){case Yo:s=e,l=2*n-t;break;case yl:s=1,l=n+i[1]-i[0];break;default:s=e-1,l=t}const u=.5*(n-t),c=this.valueSize;this._weightPrev=u/(t-a),this._weightNext=u/(l-n),this._offsetPrev=o*c,this._offsetNext=s*c}interpolate_(e,t,n,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=e*a,u=l-a,c=this._offsetPrev,d=this._offsetNext,f=this._weightPrev,m=this._weightNext,g=(n-t)/(i-t),_=g*g,y=_*g,w=-f*y+2*f*_-f*g,M=(1+f)*y+(-1.5-2*f)*_+(-.5+f)*g+1,R=(-1-m)*y+(1.5+m)*_+.5*g,F=m*y-m*_;for(let C=0;C!==a;++C)o[C]=w*s[c+C]+M*s[u+C]+R*s[l+C]+F*s[d+C];return o}}class Lv extends ra{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=e*a,u=l-a,c=(n-t)/(i-t),d=1-c;for(let f=0;f!==a;++f)o[f]=s[u+f]*d+s[l+f]*c;return o}}class ky extends ra{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class Ro{constructor(e,t,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Gn.convertArray(t,this.TimeBufferType),this.values=Gn.convertArray(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:Gn.convertArray(e.times,Array),values:Gn.convertArray(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new ky(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Lv(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Uy(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Xo:t=this.InterpolantFactoryMethodDiscrete;break;case _l:t=this.InterpolantFactoryMethodLinear;break;case vo:t=this.InterpolantFactoryMethodSmooth}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0){if(e===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Xo;case this.InterpolantFactoryMethodLinear:return _l;case this.InterpolantFactoryMethodSmooth:return vo}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let o=0,s=i-1;for(;o!==i&&n[o]<e;)++o;for(;s!==-1&&n[s]>t;)--s;if(++s,o!==0||s!==i){o>=s&&(s=Math.max(s,1),o=s-1);const a=this.getValueSize();this.times=Gn.arraySlice(n,o,s),this.values=Gn.arraySlice(this.values,o*a,s*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,o=n.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;a++){const l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(i!==void 0&&Gn.isTypedArray(i))for(let a=0,l=i.length;a!==l;++a){const u=i[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),e=!1;break}}return e}optimize(){const e=Gn.arraySlice(this.times),t=Gn.arraySlice(this.values),n=this.getValueSize(),i=this.getInterpolation()===vo,o=e.length-1;let s=1;for(let a=1;a<o;++a){let l=!1;const u=e[a];if(u!==e[a+1]&&(a!==1||u!==e[0]))if(i)l=!0;else{const c=a*n,d=c-n,f=c+n;for(let m=0;m!==n;++m){const g=t[c+m];if(g!==t[d+m]||g!==t[f+m]){l=!0;break}}}if(l){if(a!==s){e[s]=e[a];const c=a*n,d=s*n;for(let f=0;f!==n;++f)t[d+f]=t[c+f]}++s}}if(o>0){e[s]=e[o];for(let a=o*n,l=s*n,u=0;u!==n;++u)t[l+u]=t[a+u];++s}return s!==e.length?(this.times=Gn.arraySlice(e,0,s),this.values=Gn.arraySlice(t,0,s*n)):(this.times=e,this.values=t),this}clone(){const e=Gn.arraySlice(this.times,0),t=Gn.arraySlice(this.values,0),n=new this.constructor(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}Ro.prototype.TimeBufferType=Float32Array,Ro.prototype.ValueBufferType=Float32Array,Ro.prototype.DefaultInterpolation=_l;class Kl extends Ro{}Kl.prototype.ValueTypeName="bool",Kl.prototype.ValueBufferType=Array,Kl.prototype.DefaultInterpolation=Xo,Kl.prototype.InterpolantFactoryMethodLinear=void 0,Kl.prototype.InterpolantFactoryMethodSmooth=void 0;class Ov extends Ro{}Ov.prototype.ValueTypeName="color";class Id extends Ro{}Id.prototype.ValueTypeName="number";class Gy extends ra{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(n-t)/(i-t);let u=e*a;for(let c=u+a;u!==c;u+=4)vi.slerpFlat(o,0,s,u-a,s,u,l);return o}}class Xh extends Ro{InterpolantFactoryMethodLinear(e){return new Gy(this.times,this.values,this.getValueSize(),e)}}Xh.prototype.ValueTypeName="quaternion",Xh.prototype.DefaultInterpolation=_l,Xh.prototype.InterpolantFactoryMethodSmooth=void 0;class Ql extends Ro{}Ql.prototype.ValueTypeName="string",Ql.prototype.ValueBufferType=Array,Ql.prototype.DefaultInterpolation=Xo,Ql.prototype.InterpolantFactoryMethodLinear=void 0,Ql.prototype.InterpolantFactoryMethodSmooth=void 0;class Ld extends Ro{}Ld.prototype.ValueTypeName="vector";class Od{constructor(e,t=-1,n,i=Ls){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=rr(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let s=0,a=n.length;s!==a;++s)t.push(GE(n[s]).scale(i));const o=new this(e.name,e.duration,t,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,s=n.length;o!==s;++o)t.push(Ro.toJSON(n[o]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const o=t.length,s=[];for(let a=0;a<o;a++){let l=[],u=[];l.push((a+o-1)%o,a,(a+1)%o),u.push(0,1,0);const c=Gn.getKeyframeOrder(l);l=Gn.sortedArray(l,1,c),u=Gn.sortedArray(u,1,c),i||l[0]!==0||(l.push(o),u.push(u[0])),s.push(new Id(".morphTargetInfluences["+t[a].name+"]",l,u).scale(1/n))}return new this(e,-1,s)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const i=e;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const i={},o=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const u=e[a],c=u.name.match(o);if(c&&c.length>1){const d=c[1];let f=i[d];f||(i[d]=f=[]),f.push(u)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],t,n));return s}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(c,d,f,m,g){if(f.length!==0){const _=[],y=[];Gn.flattenJSON(f,_,y,m),_.length!==0&&g.push(new c(d,_,y))}},i=[],o=e.name||"default",s=e.fps||30,a=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let c=0;c<u.length;c++){const d=u[c].keys;if(d&&d.length!==0)if(d[0].morphTargets){const f={};let m;for(m=0;m<d.length;m++)if(d[m].morphTargets)for(let g=0;g<d[m].morphTargets.length;g++)f[d[m].morphTargets[g]]=-1;for(const g in f){const _=[],y=[];for(let w=0;w!==d[m].morphTargets.length;++w){const M=d[m];_.push(M.time),y.push(M.morphTarget===g?1:0)}i.push(new Id(".morphTargetInfluence["+g+"]",_,y))}l=f.length*(s||1)}else{const f=".bones["+t[c].name+"]";n(Ld,f+".position",d,"pos",i),n(Xh,f+".quaternion",d,"rot",i),n(Ld,f+".scale",d,"scl",i)}}return i.length===0?null:new this(o,l,i,a)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const i=this.tracks[t];e=Math.max(e,i.times[i.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function GE(r){if(r.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Id;case"vector":case"vector2":case"vector3":case"vector4":return Ld;case"color":return Ov;case"quaternion":return Xh;case"bool":case"boolean":return Kl;case"string":return Ql}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}(r.type);if(r.times===void 0){const t=[],n=[];Gn.flattenJSON(r.keys,t,n,"value"),r.times=t,r.values=n}return e.parse!==void 0?e.parse(r):new e(r.name,r.times,r.values,r.interpolation)}const eu={enabled:!1,files:{},add:function(r,e){this.enabled!==!1&&(this.files[r]=e)},get:function(r){if(this.enabled!==!1)return this.files[r]},remove:function(r){delete this.files[r]},clear:function(){this.files={}}};class Dv{constructor(e,t,n){const i=this;let o=!1,s=0,a=0,l;const u=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(c){a++,o===!1&&i.onStart!==void 0&&i.onStart(c,s,a),o=!0},this.itemEnd=function(c){s++,i.onProgress!==void 0&&i.onProgress(c,s,a),s===a&&(o=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(c){i.onError!==void 0&&i.onError(c)},this.resolveURL=function(c){return l?l(c):c},this.setURLModifier=function(c){return l=c,this},this.addHandler=function(c,d){return u.push(c,d),this},this.removeHandler=function(c){const d=u.indexOf(c);return d!==-1&&u.splice(d,2),this},this.getHandler=function(c){for(let d=0,f=u.length;d<f;d+=2){const m=u[d],g=u[d+1];if(m.global&&(m.lastIndex=0),m.test(c))return g}return null}}}const Hy=new Dv;class $i{constructor(e){this.manager=e!==void 0?e:Hy,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(i,o){n.load(e,i,t,o)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const Io={};class Lo extends $i{constructor(e){super(e)}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=eu.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(s),o.manager.itemEnd(e)},0),s;if(Io[e]!==void 0)return void Io[e].push({onLoad:t,onProgress:n,onError:i});const a=e.match(/^data:(.*?)(;base64)?,(.*)$/);let l;if(a){const u=a[1],c=!!a[2];let d=a[3];d=decodeURIComponent(d),c&&(d=atob(d));try{let f;const m=(this.responseType||"").toLowerCase();switch(m){case"arraybuffer":case"blob":const g=new Uint8Array(d.length);for(let y=0;y<d.length;y++)g[y]=d.charCodeAt(y);f=m==="blob"?new Blob([g.buffer],{type:u}):g.buffer;break;case"document":f=new DOMParser().parseFromString(d,u);break;case"json":f=JSON.parse(d);break;default:f=d}setTimeout(function(){t&&t(f),o.manager.itemEnd(e)},0)}catch(f){setTimeout(function(){i&&i(f),o.manager.itemError(e),o.manager.itemEnd(e)},0)}}else{Io[e]=[],Io[e].push({onLoad:t,onProgress:n,onError:i}),l=new XMLHttpRequest,l.open("GET",e,!0),l.addEventListener("load",function(u){const c=this.response,d=Io[e];if(delete Io[e],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),eu.add(e,c);for(let f=0,m=d.length;f<m;f++){const g=d[f];g.onLoad&&g.onLoad(c)}o.manager.itemEnd(e)}else{for(let f=0,m=d.length;f<m;f++){const g=d[f];g.onError&&g.onError(u)}o.manager.itemError(e),o.manager.itemEnd(e)}},!1),l.addEventListener("progress",function(u){const c=Io[e];for(let d=0,f=c.length;d<f;d++){const m=c[d];m.onProgress&&m.onProgress(u)}},!1),l.addEventListener("error",function(u){const c=Io[e];delete Io[e];for(let d=0,f=c.length;d<f;d++){const m=c[d];m.onError&&m.onError(u)}o.manager.itemError(e),o.manager.itemEnd(e)},!1),l.addEventListener("abort",function(u){const c=Io[e];delete Io[e];for(let d=0,f=c.length;d<f;d++){const m=c[d];m.onError&&m.onError(u)}o.manager.itemError(e),o.manager.itemEnd(e)},!1),this.responseType!==void 0&&(l.responseType=this.responseType),this.withCredentials!==void 0&&(l.withCredentials=this.withCredentials),l.overrideMimeType&&l.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(const u in this.requestHeader)l.setRequestHeader(u,this.requestHeader[u]);l.send(null)}return o.manager.itemStart(e),l}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class HE extends $i{constructor(e){super(e)}load(e,t,n,i){const o=this,s=new Lo(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{t(o.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},n,i)}parse(e){const t=[];for(let n=0;n<e.length;n++){const i=Od.parse(e[n]);t.push(i)}return t}}class zE extends $i{constructor(e){super(e)}load(e,t,n,i){const o=this,s=[],a=new yt,l=new Lo(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(o.withCredentials);let u=0;function c(d){l.load(e[d],function(f){const m=o.parse(f,!0);s[d]={width:m.width,height:m.height,format:m.format,mipmaps:m.mipmaps},u+=1,u===6&&(m.mipmapCount===1&&(a.minFilter=$n),a.image=s,a.format=m.format,a.needsUpdate=!0,t&&t(a))},n,i)}if(Array.isArray(e))for(let d=0,f=e.length;d<f;++d)c(d);else l.load(e,function(d){const f=o.parse(d,!0);if(f.isCubemap){const m=f.mipmaps.length/f.mipmapCount;for(let g=0;g<m;g++){s[g]={mipmaps:[]};for(let _=0;_<f.mipmapCount;_++)s[g].mipmaps.push(f.mipmaps[g*f.mipmapCount+_]),s[g].format=f.format,s[g].width=f.width,s[g].height=f.height}a.image=s}else a.image.width=f.width,a.image.height=f.height,a.mipmaps=f.mipmaps;f.mipmapCount===1&&(a.minFilter=$n),a.format=f.format,a.needsUpdate=!0,t&&t(a)},n,i);return a}}class Dd extends $i{constructor(e){super(e)}load(e,t,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=eu.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(s),o.manager.itemEnd(e)},0),s;const a=document.createElementNS("http://www.w3.org/1999/xhtml","img");function l(){a.removeEventListener("load",l,!1),a.removeEventListener("error",u,!1),eu.add(e,this),t&&t(this),o.manager.itemEnd(e)}function u(c){a.removeEventListener("load",l,!1),a.removeEventListener("error",u,!1),i&&i(c),o.manager.itemError(e),o.manager.itemEnd(e)}return a.addEventListener("load",l,!1),a.addEventListener("error",u,!1),e.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),o.manager.itemStart(e),a.src=e,a}}class zy extends $i{constructor(e){super(e)}load(e,t,n,i){const o=new kr,s=new Dd(this.manager);s.setCrossOrigin(this.crossOrigin),s.setPath(this.path);let a=0;function l(u){s.load(e[u],function(c){o.images[u]=c,a++,a===6&&(o.needsUpdate=!0,t&&t(o))},void 0,i)}for(let u=0;u<e.length;++u)l(u);return o}}class Vy extends $i{constructor(e){super(e)}load(e,t,n,i){const o=this,s=new os,a=new Lo(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(o.withCredentials),a.load(e,function(l){const u=o.parse(l);u&&(u.image!==void 0?s.image=u.image:u.data!==void 0&&(s.image.width=u.width,s.image.height=u.height,s.image.data=u.data),s.wrapS=u.wrapS!==void 0?u.wrapS:gi,s.wrapT=u.wrapT!==void 0?u.wrapT:gi,s.magFilter=u.magFilter!==void 0?u.magFilter:$n,s.minFilter=u.minFilter!==void 0?u.minFilter:$n,s.anisotropy=u.anisotropy!==void 0?u.anisotropy:1,u.encoding!==void 0&&(s.encoding=u.encoding),u.flipY!==void 0&&(s.flipY=u.flipY),u.format!==void 0&&(s.format=u.format),u.type!==void 0&&(s.type=u.type),u.mipmaps!==void 0&&(s.mipmaps=u.mipmaps,s.minFilter=Ms),u.mipmapCount===1&&(s.minFilter=$n),u.generateMipmaps!==void 0&&(s.generateMipmaps=u.generateMipmaps),s.needsUpdate=!0,t&&t(s,u))},n,i),s}}class Nv extends $i{constructor(e){super(e)}load(e,t,n,i){const o=new Kn,s=new Dd(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(e,function(a){o.image=a;const l=e.search(/\.jpe?g($|\?)/i)>0||e.search(/^data\:image\/jpeg/)===0;o.format=l?fo:tr,o.needsUpdate=!0,t!==void 0&&t(o)},n,i),o}}class jy extends Yn{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Ya(t,e))}getPoint(e){const t=e*this.getLength(),n=this.getCurveLengths();let i=0;for(;i<n.length;){if(n[i]>=t){const o=n[i]-t,s=this.curves[i],a=s.getLength(),l=a===0?0:1-o/a;return s.getPointAt(l)}i++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,i=this.curves.length;n<i;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let i=0,o=this.curves;i<o.length;i++){const s=o[i],a=s&&s.isEllipseCurve?2*e:s&&(s.isLineCurve||s.isLineCurve3)?1:s&&s.isSplineCurve?e*s.points.length:e,l=s.getPoints(a);for(let u=0;u<l.length;u++){const c=l[u];n&&n.equals(c)||(t.push(c),n=c)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const i=e.curves[t];this.curves.push(i.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const i=this.curves[t];e.curves.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const i=e.curves[t];this.curves.push(new wv[i.type]().fromJSON(i))}return this}}class tu extends jy{constructor(e){super(),this.type="Path",this.currentPoint=new Qe,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Ya(this.currentPoint.clone(),new Qe(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,i){const o=new ia(this.currentPoint.clone(),new Qe(e,t),new Qe(n,i));return this.curves.push(o),this.currentPoint.set(n,i),this}bezierCurveTo(e,t,n,i,o,s){const a=new na(this.currentPoint.clone(),new Qe(e,t),new Qe(n,i),new Qe(o,s));return this.curves.push(a),this.currentPoint.set(o,s),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new rm(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,i,o,s){const a=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(e+a,t+l,n,i,o,s),this}absarc(e,t,n,i,o,s){return this.absellipse(e,t,n,n,i,o,s),this}ellipse(e,t,n,i,o,s,a,l){const u=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+u,t+c,n,i,o,s,a,l),this}absellipse(e,t,n,i,o,s,a,l){const u=new kn(e,t,n,i,o,s,a,l);if(this.curves.length>0){const d=u.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(u);const c=u.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Za extends tu{constructor(e){super(e),this.uuid=rr(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,i=this.holes.length;n<i;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const i=e.holes[t];this.holes.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const i=this.holes[t];e.holes.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const i=e.holes[t];this.holes.push(new tu().fromJSON(i))}return this}}class Oo extends Xt{constructor(e,t=1){super(),this.type="Light",this.color=new gt(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}Oo.prototype.isLight=!0;class Fv extends Oo{constructor(e,t,n){super(e,n),this.type="HemisphereLight",this.position.copy(Xt.DefaultUp),this.updateMatrix(),this.groundColor=new gt(t)}copy(e){return Oo.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}Fv.prototype.isHemisphereLight=!0;const Wy=new pt,Xy=new T,Yy=new T;class Bv{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new Qe(512,512),this.map=null,this.mapPass=null,this.matrix=new pt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Ba,this._frameExtents=new Qe(1,1),this._viewportCount=1,this._viewports=[new pn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;Xy.setFromMatrixPosition(e.matrixWorld),t.position.copy(Xy),Yy.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Yy),t.updateMatrixWorld(),Wy.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Wy),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),this.mapSize.x===512&&this.mapSize.y===512||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class qy extends Bv{constructor(){super(new ei(50,1,.5,500)),this.focus=1}updateMatrices(e){const t=this.camera,n=2*ii*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,o=e.distance||t.far;n===t.fov&&i===t.aspect&&o===t.far||(t.fov=n,t.aspect=i,t.far=o,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}qy.prototype.isSpotLightShadow=!0;class Uv extends Oo{constructor(e,t,n=0,i=Math.PI/3,o=0,s=1){super(e,t),this.type="SpotLight",this.position.copy(Xt.DefaultUp),this.updateMatrix(),this.target=new Xt,this.distance=n,this.angle=i,this.penumbra=o,this.decay=s,this.shadow=new qy}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}Uv.prototype.isSpotLight=!0;const Zy=new pt,Nd=new T,kv=new T;class Jy extends Bv{constructor(){super(new ei(90,1,.5,500)),this._frameExtents=new Qe(4,2),this._viewportCount=6,this._viewports=[new pn(2,1,1,1),new pn(0,1,1,1),new pn(3,1,1,1),new pn(1,1,1,1),new pn(3,0,1,1),new pn(1,0,1,1)],this._cubeDirections=[new T(1,0,0),new T(-1,0,0),new T(0,0,1),new T(0,0,-1),new T(0,1,0),new T(0,-1,0)],this._cubeUps=[new T(0,1,0),new T(0,1,0),new T(0,1,0),new T(0,1,0),new T(0,0,1),new T(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,i=this.matrix,o=e.distance||n.far;o!==n.far&&(n.far=o,n.updateProjectionMatrix()),Nd.setFromMatrixPosition(e.matrixWorld),n.position.copy(Nd),kv.copy(n.position),kv.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(kv),n.updateMatrixWorld(),i.makeTranslation(-Nd.x,-Nd.y,-Nd.z),Zy.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Zy)}}Jy.prototype.isPointLightShadow=!0;class Gv extends Oo{constructor(e,t,n=0,i=1){super(e,t),this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new Jy}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}Gv.prototype.isPointLight=!0;class Yh extends Ws{constructor(e=-1,t=1,n=1,i=-1,o=.1,s=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,o,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let o=n-e,s=n+e,a=i+t,l=i-t;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=u*this.view.offsetX,s=o+u*this.view.width,a-=c*this.view.offsetY,l=a-c*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}Yh.prototype.isOrthographicCamera=!0;class $y extends Bv{constructor(){super(new Yh(-5,5,5,-5,.5,500))}}$y.prototype.isDirectionalLightShadow=!0;class dm extends Oo{constructor(e,t){super(e,t),this.type="DirectionalLight",this.position.copy(Xt.DefaultUp),this.updateMatrix(),this.target=new Xt,this.shadow=new $y}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}dm.prototype.isDirectionalLight=!0;class pm extends Oo{constructor(e,t){super(e,t),this.type="AmbientLight"}}pm.prototype.isAmbientLight=!0;class Hv extends Oo{constructor(e,t,n=10,i=10){super(e,t),this.type="RectAreaLight",this.width=n,this.height=i}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}Hv.prototype.isRectAreaLight=!0;class zv{constructor(){this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new T)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,i=e.y,o=e.z,s=this.coefficients;return t.copy(s[0]).multiplyScalar(.282095),t.addScaledVector(s[1],.488603*i),t.addScaledVector(s[2],.488603*o),t.addScaledVector(s[3],.488603*n),t.addScaledVector(s[4],n*i*1.092548),t.addScaledVector(s[5],i*o*1.092548),t.addScaledVector(s[6],.315392*(3*o*o-1)),t.addScaledVector(s[7],n*o*1.092548),t.addScaledVector(s[8],.546274*(n*n-i*i)),t}getIrradianceAt(e,t){const n=e.x,i=e.y,o=e.z,s=this.coefficients;return t.copy(s[0]).multiplyScalar(.886227),t.addScaledVector(s[1],1.023328*i),t.addScaledVector(s[2],1.023328*o),t.addScaledVector(s[3],1.023328*n),t.addScaledVector(s[4],.858086*n*i),t.addScaledVector(s[5],.858086*i*o),t.addScaledVector(s[6],.743125*o*o-.247708),t.addScaledVector(s[7],.858086*n*o),t.addScaledVector(s[8],.429043*(n*n-i*i)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].fromArray(e,t+3*i);return this}toArray(e=[],t=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].toArray(e,t+3*i);return e}static getBasisAt(e,t){const n=e.x,i=e.y,o=e.z;t[0]=.282095,t[1]=.488603*i,t[2]=.488603*o,t[3]=.488603*n,t[4]=1.092548*n*i,t[5]=1.092548*i*o,t[6]=.315392*(3*o*o-1),t[7]=1.092548*n*o,t[8]=.546274*(n*n-i*i)}}zv.prototype.isSphericalHarmonics3=!0;class Fd extends Oo{constructor(e=new zv,t=1){super(void 0,t),this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}Fd.prototype.isLightProbe=!0;class Ky extends $i{constructor(e){super(e),this.textures={}}load(e,t,n,i){const o=this,s=new Lo(o.manager);s.setPath(o.path),s.setRequestHeader(o.requestHeader),s.setWithCredentials(o.withCredentials),s.load(e,function(a){try{t(o.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},n,i)}parse(e){const t=this.textures;function n(o){return t[o]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",o),t[o]}const i=new kE[e.type];if(e.uuid!==void 0&&(i.uuid=e.uuid),e.name!==void 0&&(i.name=e.name),e.color!==void 0&&i.color!==void 0&&i.color.setHex(e.color),e.roughness!==void 0&&(i.roughness=e.roughness),e.metalness!==void 0&&(i.metalness=e.metalness),e.sheen!==void 0&&(i.sheen=new gt().setHex(e.sheen)),e.emissive!==void 0&&i.emissive!==void 0&&i.emissive.setHex(e.emissive),e.specular!==void 0&&i.specular!==void 0&&i.specular.setHex(e.specular),e.shininess!==void 0&&(i.shininess=e.shininess),e.clearcoat!==void 0&&(i.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=e.clearcoatRoughness),e.transmission!==void 0&&(i.transmission=e.transmission),e.thickness!==void 0&&(i.thickness=e.thickness),e.attenuationDistance!==void 0&&(i.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&i.attenuationColor!==void 0&&i.attenuationColor.setHex(e.attenuationColor),e.fog!==void 0&&(i.fog=e.fog),e.flatShading!==void 0&&(i.flatShading=e.flatShading),e.blending!==void 0&&(i.blending=e.blending),e.combine!==void 0&&(i.combine=e.combine),e.side!==void 0&&(i.side=e.side),e.shadowSide!==void 0&&(i.shadowSide=e.shadowSide),e.opacity!==void 0&&(i.opacity=e.opacity),e.transparent!==void 0&&(i.transparent=e.transparent),e.alphaTest!==void 0&&(i.alphaTest=e.alphaTest),e.depthTest!==void 0&&(i.depthTest=e.depthTest),e.depthWrite!==void 0&&(i.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(i.colorWrite=e.colorWrite),e.stencilWrite!==void 0&&(i.stencilWrite=e.stencilWrite),e.stencilWriteMask!==void 0&&(i.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(i.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(i.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(i.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(i.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(i.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(i.stencilZPass=e.stencilZPass),e.wireframe!==void 0&&(i.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(i.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(i.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(i.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(i.rotation=e.rotation),e.linewidth!==1&&(i.linewidth=e.linewidth),e.dashSize!==void 0&&(i.dashSize=e.dashSize),e.gapSize!==void 0&&(i.gapSize=e.gapSize),e.scale!==void 0&&(i.scale=e.scale),e.polygonOffset!==void 0&&(i.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(i.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(i.polygonOffsetUnits=e.polygonOffsetUnits),e.morphTargets!==void 0&&(i.morphTargets=e.morphTargets),e.morphNormals!==void 0&&(i.morphNormals=e.morphNormals),e.dithering!==void 0&&(i.dithering=e.dithering),e.alphaToCoverage!==void 0&&(i.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(i.premultipliedAlpha=e.premultipliedAlpha),e.vertexTangents!==void 0&&(i.vertexTangents=e.vertexTangents),e.visible!==void 0&&(i.visible=e.visible),e.toneMapped!==void 0&&(i.toneMapped=e.toneMapped),e.userData!==void 0&&(i.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?i.vertexColors=e.vertexColors>0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const o in e.uniforms){const s=e.uniforms[o];switch(i.uniforms[o]={},s.type){case"t":i.uniforms[o].value=n(s.value);break;case"c":i.uniforms[o].value=new gt().setHex(s.value);break;case"v2":i.uniforms[o].value=new Qe().fromArray(s.value);break;case"v3":i.uniforms[o].value=new T().fromArray(s.value);break;case"v4":i.uniforms[o].value=new pn().fromArray(s.value);break;case"m3":i.uniforms[o].value=new En().fromArray(s.value);break;case"m4":i.uniforms[o].value=new pt().fromArray(s.value);break;default:i.uniforms[o].value=s.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.extensions!==void 0)for(const o in e.extensions)i.extensions[o]=e.extensions[o];if(e.shading!==void 0&&(i.flatShading=e.shading===1),e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=n(e.map)),e.matcap!==void 0&&(i.matcap=n(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=new Qe().fromArray(o)}return e.displacementMap!==void 0&&(i.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=n(e.specularMap)),e.envMap!==void 0&&(i.envMap=n(e.envMap)),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new Qe().fromArray(e.clearcoatNormalScale)),e.transmissionMap!==void 0&&(i.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=n(e.thicknessMap)),i}setTextures(e){return this.textures=e,this}}class fm{static decodeText(e){if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e);let t="";for(let n=0,i=e.length;n<i;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch{return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.substr(0,t+1)}}class Vv extends Mt{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}clone(){return new this.constructor().copy(this)}toJSON(){const e=super.toJSON(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}Vv.prototype.isInstancedBufferGeometry=!0;class jv extends Zt{constructor(e,t,n,i=1){typeof n=="number"&&(i=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(e,t,n),this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}jv.prototype.isInstancedBufferAttribute=!0;class Qy extends $i{constructor(e){super(e)}load(e,t,n,i){const o=this,s=new Lo(o.manager);s.setPath(o.path),s.setRequestHeader(o.requestHeader),s.setWithCredentials(o.withCredentials),s.load(e,function(a){try{t(o.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},n,i)}parse(e){const t={},n={};function i(d,f){if(t[f]!==void 0)return t[f];const m=d.interleavedBuffers[f],g=function(w,M){if(n[M]!==void 0)return n[M];const R=w.arrayBuffers[M],F=new Uint32Array(R).buffer;return n[M]=F,F}(d,m.buffer),_=Hs(m.type,g),y=new $s(_,m.stride);return y.uuid=m.uuid,t[f]=y,y}const o=e.isInstancedBufferGeometry?new Vv:new Mt,s=e.data.index;if(s!==void 0){const d=Hs(s.type,s.array);o.setIndex(new Zt(d,1))}const a=e.data.attributes;for(const d in a){const f=a[d];let m;if(f.isInterleavedBufferAttribute){const g=i(e.data,f.data);m=new Po(g,f.itemSize,f.offset,f.normalized)}else{const g=Hs(f.type,f.array);m=new(f.isInstancedBufferAttribute?jv:Zt)(g,f.itemSize,f.normalized)}f.name!==void 0&&(m.name=f.name),f.usage!==void 0&&m.setUsage(f.usage),f.updateRange!==void 0&&(m.updateRange.offset=f.updateRange.offset,m.updateRange.count=f.updateRange.count),o.setAttribute(d,m)}const l=e.data.morphAttributes;if(l)for(const d in l){const f=l[d],m=[];for(let g=0,_=f.length;g<_;g++){const y=f[g];let w;if(y.isInterleavedBufferAttribute){const M=i(e.data,y.data);w=new Po(M,y.itemSize,y.offset,y.normalized)}else{const M=Hs(y.type,y.array);w=new Zt(M,y.itemSize,y.normalized)}y.name!==void 0&&(w.name=y.name),m.push(w)}o.morphAttributes[d]=m}e.data.morphTargetsRelative&&(o.morphTargetsRelative=!0);const u=e.data.groups||e.data.drawcalls||e.data.offsets;if(u!==void 0)for(let d=0,f=u.length;d!==f;++d){const m=u[d];o.addGroup(m.start,m.count,m.materialIndex)}const c=e.data.boundingSphere;if(c!==void 0){const d=new T;c.center!==void 0&&d.fromArray(c.center),o.boundingSphere=new ui(d,c.radius)}return e.name&&(o.name=e.name),e.userData&&(o.userData=e.userData),o}}class VE extends $i{constructor(e){super(e)}load(e,t,n,i){const o=this,s=this.path===""?fm.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||s;const a=new Lo(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){let u=null;try{u=JSON.parse(l)}catch(d){return i!==void 0&&i(d),void console.error("THREE:ObjectLoader: Can't parse "+e+".",d.message)}const c=u.metadata;c!==void 0&&c.type!==void 0&&c.type.toLowerCase()!=="geometry"?o.parse(u,t):console.error("THREE.ObjectLoader: Can't load "+e)},n,i)}async loadAsync(e,t){const n=this.path===""?fm.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||n;const i=new Lo(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials);const o=await i.loadAsync(e,t),s=JSON.parse(o),a=s.metadata;if(a===void 0||a.type===void 0||a.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return await this.parseAsync(s)}parse(e,t){const n=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),o=this.parseGeometries(e.geometries,i),s=this.parseImages(e.images,function(){t!==void 0&&t(u)}),a=this.parseTextures(e.textures,s),l=this.parseMaterials(e.materials,a),u=this.parseObject(e.object,o,l,a,n),c=this.parseSkeletons(e.skeletons,u);if(this.bindSkeletons(u,c),t!==void 0){let d=!1;for(const f in s)if(s[f]instanceof HTMLImageElement){d=!0;break}d===!1&&t(u)}return u}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,n),o=await this.parseImagesAsync(e.images),s=this.parseTextures(e.textures,o),a=this.parseMaterials(e.materials,s),l=this.parseObject(e.object,i,a,s,t),u=this.parseSkeletons(e.skeletons,l);return this.bindSkeletons(l,u),l}parseShapes(e){const t={};if(e!==void 0)for(let n=0,i=e.length;n<i;n++){const o=new Za().fromJSON(e[n]);t[o.uuid]=o}return t}parseSkeletons(e,t){const n={},i={};if(t.traverse(function(o){o.isBone&&(i[o.uuid]=o)}),e!==void 0)for(let o=0,s=e.length;o<s;o++){const a=new Lh().fromJSON(e[o],i);n[a.uuid]=a}return n}parseGeometries(e,t){const n={};if(e!==void 0){const i=new Qy;for(let o=0,s=e.length;o<s;o++){let a;const l=e[o];switch(l.type){case"BufferGeometry":case"InstancedBufferGeometry":a=i.parse(l);break;case"Geometry":console.error("THREE.ObjectLoader: The legacy Geometry type is no longer supported.");break;default:l.type in By?a=By[l.type].fromJSON(l,t):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${l.type}"`)}a.uuid=l.uuid,l.name!==void 0&&(a.name=l.name),a.isBufferGeometry===!0&&l.userData!==void 0&&(a.userData=l.userData),n[l.uuid]=a}}return n}parseMaterials(e,t){const n={},i={};if(e!==void 0){const o=new Ky;o.setTextures(t);for(let s=0,a=e.length;s<a;s++){const l=e[s];if(l.type==="MultiMaterial"){const u=[];for(let c=0;c<l.materials.length;c++){const d=l.materials[c];n[d.uuid]===void 0&&(n[d.uuid]=o.parse(d)),u.push(n[d.uuid])}i[l.uuid]=u}else n[l.uuid]===void 0&&(n[l.uuid]=o.parse(l)),i[l.uuid]=n[l.uuid]}}return i}parseAnimations(e){const t={};if(e!==void 0)for(let n=0;n<e.length;n++){const i=e[n],o=Od.parse(i);t[o.uuid]=o}return t}parseImages(e,t){const n=this,i={};let o;function s(a){if(typeof a=="string"){const l=a;return function(u){return n.manager.itemStart(u),o.load(u,function(){n.manager.itemEnd(u)},void 0,function(){n.manager.itemError(u),n.manager.itemEnd(u)})}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(l)?l:n.resourcePath+l)}return a.data?{data:Hs(a.type,a.data),width:a.width,height:a.height}:null}if(e!==void 0&&e.length>0){const a=new Dv(t);o=new Dd(a),o.setCrossOrigin(this.crossOrigin);for(let l=0,u=e.length;l<u;l++){const c=e[l],d=c.url;if(Array.isArray(d)){i[c.uuid]=[];for(let f=0,m=d.length;f<m;f++){const g=s(d[f]);g!==null&&(g instanceof HTMLImageElement?i[c.uuid].push(g):i[c.uuid].push(new os(g.data,g.width,g.height)))}}else{const f=s(c.url);f!==null&&(i[c.uuid]=f)}}}return i}async parseImagesAsync(e){const t=this,n={};let i;async function o(s){if(typeof s=="string"){const a=s,l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(a)?a:t.resourcePath+a;return await i.loadAsync(l)}return s.data?{data:Hs(s.type,s.data),width:s.width,height:s.height}:null}if(e!==void 0&&e.length>0){i=new Dd(this.manager),i.setCrossOrigin(this.crossOrigin);for(let s=0,a=e.length;s<a;s++){const l=e[s],u=l.url;if(Array.isArray(u)){n[l.uuid]=[];for(let c=0,d=u.length;c<d;c++){const f=u[c],m=await o(f);m!==null&&(m instanceof HTMLImageElement?n[l.uuid].push(m):n[l.uuid].push(new os(m.data,m.width,m.height)))}}else{const c=await o(l.url);c!==null&&(n[l.uuid]=c)}}}return n}parseTextures(e,t){function n(o,s){return typeof o=="number"?o:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",o),s[o])}const i={};if(e!==void 0)for(let o=0,s=e.length;o<s;o++){const a=e[o];let l;a.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',a.uuid),t[a.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",a.image);const u=t[a.image];Array.isArray(u)?(l=new kr(u),u.length===6&&(l.needsUpdate=!0)):(l=u&&u.data?new os(u.data,u.width,u.height):new Kn(u),u&&(l.needsUpdate=!0)),l.uuid=a.uuid,a.name!==void 0&&(l.name=a.name),a.mapping!==void 0&&(l.mapping=n(a.mapping,jE)),a.offset!==void 0&&l.offset.fromArray(a.offset),a.repeat!==void 0&&l.repeat.fromArray(a.repeat),a.center!==void 0&&l.center.fromArray(a.center),a.rotation!==void 0&&(l.rotation=a.rotation),a.wrap!==void 0&&(l.wrapS=n(a.wrap[0],ex),l.wrapT=n(a.wrap[1],ex)),a.format!==void 0&&(l.format=a.format),a.type!==void 0&&(l.type=a.type),a.encoding!==void 0&&(l.encoding=a.encoding),a.minFilter!==void 0&&(l.minFilter=n(a.minFilter,tx)),a.magFilter!==void 0&&(l.magFilter=n(a.magFilter,tx)),a.anisotropy!==void 0&&(l.anisotropy=a.anisotropy),a.flipY!==void 0&&(l.flipY=a.flipY),a.premultiplyAlpha!==void 0&&(l.premultiplyAlpha=a.premultiplyAlpha),a.unpackAlignment!==void 0&&(l.unpackAlignment=a.unpackAlignment),i[a.uuid]=l}return i}parseObject(e,t,n,i,o){let s,a,l;function u(f){return t[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",f),t[f]}function c(f){if(f!==void 0){if(Array.isArray(f)){const m=[];for(let g=0,_=f.length;g<_;g++){const y=f[g];n[y]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",y),m.push(n[y])}return m}return n[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",f),n[f]}}function d(f){return i[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined texture",f),i[f]}switch(e.type){case"Scene":s=new Ga,e.background!==void 0&&(Number.isInteger(e.background)?s.background=new gt(e.background):s.background=d(e.background)),e.environment!==void 0&&(s.environment=d(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?s.fog=new Hl(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(s.fog=new yi(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":s=new ei(e.fov,e.aspect,e.near,e.far),e.focus!==void 0&&(s.focus=e.focus),e.zoom!==void 0&&(s.zoom=e.zoom),e.filmGauge!==void 0&&(s.filmGauge=e.filmGauge),e.filmOffset!==void 0&&(s.filmOffset=e.filmOffset),e.view!==void 0&&(s.view=Object.assign({},e.view));break;case"OrthographicCamera":s=new Yh(e.left,e.right,e.top,e.bottom,e.near,e.far),e.zoom!==void 0&&(s.zoom=e.zoom),e.view!==void 0&&(s.view=Object.assign({},e.view));break;case"AmbientLight":s=new pm(e.color,e.intensity);break;case"DirectionalLight":s=new dm(e.color,e.intensity);break;case"PointLight":s=new Gv(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":s=new Hv(e.color,e.intensity,e.width,e.height);break;case"SpotLight":s=new Uv(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":s=new Fv(e.color,e.groundColor,e.intensity);break;case"LightProbe":s=new Fd().fromJSON(e);break;case"SkinnedMesh":a=u(e.geometry),l=c(e.material),s=new Va(a,l),e.bindMode!==void 0&&(s.bindMode=e.bindMode),e.bindMatrix!==void 0&&s.bindMatrix.fromArray(e.bindMatrix),e.skeleton!==void 0&&(s.skeleton=e.skeleton);break;case"Mesh":a=u(e.geometry),l=c(e.material),s=new ln(a,l);break;case"InstancedMesh":a=u(e.geometry),l=c(e.material);const f=e.count,m=e.instanceMatrix,g=e.instanceColor;s=new Sd(a,l,f),s.instanceMatrix=new Zt(new Float32Array(m.array),16),g!==void 0&&(s.instanceColor=new Zt(new Float32Array(g.array),g.itemSize));break;case"LOD":s=new $f;break;case"Line":s=new h(u(e.geometry),c(e.material));break;case"LineLoop":s=new P(u(e.geometry),c(e.material));break;case"LineSegments":s=new E(u(e.geometry),c(e.material));break;case"PointCloud":case"Points":s=new ze(u(e.geometry),c(e.material));break;case"Sprite":s=new Xl(c(e.material));break;case"Group":s=new Js;break;case"Bone":s=new Ih;break;default:s=new Xt}if(s.uuid=e.uuid,e.name!==void 0&&(s.name=e.name),e.matrix!==void 0?(s.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=e.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(e.position!==void 0&&s.position.fromArray(e.position),e.rotation!==void 0&&s.rotation.fromArray(e.rotation),e.quaternion!==void 0&&s.quaternion.fromArray(e.quaternion),e.scale!==void 0&&s.scale.fromArray(e.scale)),e.castShadow!==void 0&&(s.castShadow=e.castShadow),e.receiveShadow!==void 0&&(s.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.bias!==void 0&&(s.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(s.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(s.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(s.visible=e.visible),e.frustumCulled!==void 0&&(s.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(s.renderOrder=e.renderOrder),e.userData!==void 0&&(s.userData=e.userData),e.layers!==void 0&&(s.layers.mask=e.layers),e.children!==void 0){const f=e.children;for(let m=0;m<f.length;m++)s.add(this.parseObject(f[m],t,n,i,o))}if(e.animations!==void 0){const f=e.animations;for(let m=0;m<f.length;m++){const g=f[m];s.animations.push(o[g])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(s.autoUpdate=e.autoUpdate);const f=e.levels;for(let m=0;m<f.length;m++){const g=f[m],_=s.getObjectByProperty("uuid",g.object);_!==void 0&&s.addLevel(_,g.distance)}}return s}bindSkeletons(e,t){Object.keys(t).length!==0&&e.traverse(function(n){if(n.isSkinnedMesh===!0&&n.skeleton!==void 0){const i=t[n.skeleton];i===void 0?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",n.skeleton):n.bind(i,n.bindMatrix)}})}setTexturePath(e){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(e)}}const jE={UVMapping:Iu,CubeReflectionMapping:zo,CubeRefractionMapping:hl,EquirectangularReflectionMapping:cl,EquirectangularRefractionMapping:dl,CubeUVReflectionMapping:va,CubeUVRefractionMapping:_a},ex={RepeatWrapping:Vo,ClampToEdgeWrapping:gi,MirroredRepeatWrapping:pl},tx={NearestFilter:Jn,NearestMipmapNearestFilter:fl,NearestMipmapLinearFilter:ml,LinearFilter:$n,LinearMipmapNearestFilter:jo,LinearMipmapLinearFilter:Ms};class nx extends $i{constructor(e){super(e),typeof createImageBitmap=="undefined"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch=="undefined"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=eu.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(s),o.manager.itemEnd(e)},0),s;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){eu.add(e,l),t&&t(l),o.manager.itemEnd(e)}).catch(function(l){i&&i(l),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}}nx.prototype.isImageBitmapLoader=!0;class ix{constructor(){this.type="ShapePath",this.color=new gt,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new tu,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,i){return this.currentPath.quadraticCurveTo(e,t,n,i),this}bezierCurveTo(e,t,n,i,o,s){return this.currentPath.bezierCurveTo(e,t,n,i,o,s),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(M){const R=[];for(let F=0,C=M.length;F<C;F++){const U=M[F],N=new Za;N.curves=U.curves,R.push(N)}return R}function i(M,R){const F=R.length;let C=!1;for(let U=F-1,N=0;N<F;U=N++){let G=R[U],he=R[N],ne=he.x-G.x,Z=he.y-G.y;if(Math.abs(Z)>Number.EPSILON){if(Z<0&&(G=R[N],ne=-ne,he=R[U],Z=-Z),M.y<G.y||M.y>he.y)continue;if(M.y===G.y){if(M.x===G.x)return!0}else{const Q=Z*(M.x-G.x)-ne*(M.y-G.y);if(Q===0)return!0;if(Q<0)continue;C=!C}}else{if(M.y!==G.y)continue;if(he.x<=M.x&&M.x<=G.x||G.x<=M.x&&M.x<=he.x)return!0}}return C}const o=us.isClockWise,s=this.subPaths;if(s.length===0)return[];if(t===!0)return n(s);let a,l,u;const c=[];if(s.length===1)return l=s[0],u=new Za,u.curves=l.curves,c.push(u),c;let d=!o(s[0].getPoints());d=e?!d:d;const f=[],m=[];let g,_,y=[],w=0;m[w]=void 0,y[w]=[];for(let M=0,R=s.length;M<R;M++)l=s[M],g=l.getPoints(),a=o(g),a=e?!a:a,a?(!d&&m[w]&&w++,m[w]={s:new Za,p:g},m[w].s.curves=l.curves,d&&w++,y[w]=[]):y[w].push({h:l,p:g[0]});if(!m[0])return n(s);if(m.length>1){let M=!1;const R=[];for(let F=0,C=m.length;F<C;F++)f[F]=[];for(let F=0,C=m.length;F<C;F++){const U=y[F];for(let N=0;N<U.length;N++){const G=U[N];let he=!0;for(let ne=0;ne<m.length;ne++)i(G.p,m[ne].p)&&(F!==ne&&R.push({froms:F,tos:ne,hole:N}),he?(he=!1,f[ne].push(G)):M=!0);he&&f[F].push(G)}}R.length>0&&(M||(y=f))}for(let M=0,R=m.length;M<R;M++){u=m[M].s,c.push(u),_=y[M];for(let F=0,C=_.length;F<C;F++)u.holes.push(_[F].h)}return c}}class Wv{constructor(e){this.type="Font",this.data=e}generateShapes(e,t=100){const n=[],i=function(o,s,a){const l=Array.from(o),u=s/a.resolution,c=(a.boundingBox.yMax-a.boundingBox.yMin+a.underlineThickness)*u,d=[];let f=0,m=0;for(let g=0;g<l.length;g++){const _=l[g];if(_===`
2977
2977
  `)f=0,m-=c;else{const y=WE(_,u,f,m,a);f+=y.offsetX,d.push(y.path)}}return d}(e,t,this.data);for(let o=0,s=i.length;o<s;o++)Array.prototype.push.apply(n,i[o].toShapes());return n}}function WE(r,e,t,n,i){const o=i.glyphs[r]||i.glyphs["?"];if(!o)return void console.error('THREE.Font: character "'+r+'" does not exists in font family '+i.familyName+".");const s=new ix;let a,l,u,c,d,f,m,g;if(o.o){const _=o._cachedOutline||(o._cachedOutline=o.o.split(" "));for(let y=0,w=_.length;y<w;)switch(_[y++]){case"m":a=_[y++]*e+t,l=_[y++]*e+n,s.moveTo(a,l);break;case"l":a=_[y++]*e+t,l=_[y++]*e+n,s.lineTo(a,l);break;case"q":u=_[y++]*e+t,c=_[y++]*e+n,d=_[y++]*e+t,f=_[y++]*e+n,s.quadraticCurveTo(d,f,u,c);break;case"b":u=_[y++]*e+t,c=_[y++]*e+n,d=_[y++]*e+t,f=_[y++]*e+n,m=_[y++]*e+t,g=_[y++]*e+n,s.bezierCurveTo(d,f,m,g,u,c)}}return{offsetX:o.ha*e,path:s}}Wv.prototype.isFont=!0;class XE extends $i{constructor(e){super(e)}load(e,t,n,i){const o=this,s=new Lo(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(o.withCredentials),s.load(e,function(a){let l;try{l=JSON.parse(a)}catch{console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),l=JSON.parse(a.substring(65,a.length-2))}const u=o.parse(l);t&&t(u)},n,i)}parse(e){return new Wv(e)}}let mm;const Xv={getContext:function(){return mm===void 0&&(mm=new(window.AudioContext||window.webkitAudioContext)),mm},setContext:function(r){mm=r}};class rx extends $i{constructor(e){super(e)}load(e,t,n,i){const o=this,s=new Lo(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{const l=a.slice(0);Xv.getContext().decodeAudioData(l,function(u){t(u)})}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},n,i)}}class ox extends Fd{constructor(e,t,n=1){super(void 0,n);const i=new gt().set(e),o=new gt().set(t),s=new T(i.r,i.g,i.b),a=new T(o.r,o.g,o.b),l=Math.sqrt(Math.PI),u=l*Math.sqrt(.75);this.sh.coefficients[0].copy(s).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(s).sub(a).multiplyScalar(u)}}ox.prototype.isHemisphereLightProbe=!0;class sx extends Fd{constructor(e,t=1){super(void 0,t);const n=new gt().set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}sx.prototype.isAmbientLightProbe=!0;const ax=new pt,lx=new pt;class YE{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new ei,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new ei,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep;const n=e.projectionMatrix.clone(),i=t.eyeSep/2,o=i*t.near/t.focus,s=t.near*Math.tan(Sn*t.fov*.5)/t.zoom;let a,l;lx.elements[12]=-i,ax.elements[12]=i,a=-s*t.aspect+o,l=s*t.aspect+o,n.elements[0]=2*t.near/(l-a),n.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(n),a=-s*t.aspect-o,l=s*t.aspect-o,n.elements[0]=2*t.near/(l-a),n.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(lx),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(ax)}}class ux{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=hx(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=hx();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function hx(){return(typeof performance=="undefined"?Date:performance).now()}const nu=new T,cx=new vi,qE=new T,iu=new T;class ZE extends Xt{constructor(){super(),this.type="AudioListener",this.context=Xv.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new ux}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(nu,cx,qE),iu.set(0,0,-1).applyQuaternion(cx),t.positionX){const i=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(nu.x,i),t.positionY.linearRampToValueAtTime(nu.y,i),t.positionZ.linearRampToValueAtTime(nu.z,i),t.forwardX.linearRampToValueAtTime(iu.x,i),t.forwardY.linearRampToValueAtTime(iu.y,i),t.forwardZ.linearRampToValueAtTime(iu.z,i),t.upX.linearRampToValueAtTime(n.x,i),t.upY.linearRampToValueAtTime(n.y,i),t.upZ.linearRampToValueAtTime(n.z,i)}else t.setPosition(nu.x,nu.y,nu.z),t.setOrientation(iu.x,iu.y,iu.z,n.x,n.y,n.z)}}class Yv extends Xt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0)return void console.warn("THREE.Audio: Audio is already playing.");if(this.hasPlaybackControl===!1)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl!==!1)return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(this.hasPlaybackControl!==!1)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(e){return e||(e=[]),this._connected===!0?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,this.source.detune!==void 0)return this.isPlaying===!0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(this.hasPlaybackControl!==!1)return this.playbackRate=e,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(this.hasPlaybackControl!==!1)return this.loop=e,this.isPlaying===!0&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}const ru=new T,dx=new vi,JE=new T,ou=new T;class $E extends Yv{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(ru,dx,JE),ou.set(0,0,1).applyQuaternion(dx);const t=this.panner;if(t.positionX){const n=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(ru.x,n),t.positionY.linearRampToValueAtTime(ru.y,n),t.positionZ.linearRampToValueAtTime(ru.z,n),t.orientationX.linearRampToValueAtTime(ou.x,n),t.orientationY.linearRampToValueAtTime(ou.y,n),t.orientationZ.linearRampToValueAtTime(ou.z,n)}else t.setPosition(ru.x,ru.y,ru.z),t.setOrientation(ou.x,ou.y,ou.z)}}class px{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}}class fx{constructor(e,t,n){let i,o,s;switch(this.binding=e,this.valueSize=n,t){case"quaternion":i=this._slerp,o=this._slerpAdditive,s=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":i=this._select,o=this._select,s=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:i=this._lerp,o=this._lerpAdditive,s=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=o,this._setIdentity=s,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,i=this.valueSize,o=e*i+i;let s=this.cumulativeWeight;if(s===0){for(let a=0;a!==i;++a)n[o+a]=n[a];s=t}else{s+=t;const a=t/s;this._mixBufferRegion(n,o,0,a,i)}this.cumulativeWeight=s}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,i=n*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(t,i,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,i=e*t+t,o=this.cumulativeWeight,s=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,o<1){const l=t*this._origIndex;this._mixBufferRegion(n,i,l,1-o,t)}s>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*t,1,t);for(let l=t,u=t+t;l!==u;++l)if(n[l]!==n[l+t]){a.setValue(n,i);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,i=n*this._origIndex;e.getValue(t,i);for(let o=n,s=i;o!==s;++o)t[o]=t[i+o%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,i,o){if(i>=.5)for(let s=0;s!==o;++s)e[t+s]=e[n+s]}_slerp(e,t,n,i){vi.slerpFlat(e,t,e,t,e,n,i)}_slerpAdditive(e,t,n,i,o){const s=this._workIndex*o;vi.multiplyQuaternionsFlat(e,s,e,t,e,n),vi.slerpFlat(e,t,e,t,e,s,i)}_lerp(e,t,n,i,o){const s=1-i;for(let a=0;a!==o;++a){const l=t+a;e[l]=e[l]*s+e[n+a]*i}}_lerpAdditive(e,t,n,i,o){for(let s=0;s!==o;++s){const a=t+s;e[a]=e[a]+e[n+s]*i}}}const KE=new RegExp("[\\[\\]\\.:\\/]","g"),QE="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",eM=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),tM=/(WCOD+)?/.source.replace("WCOD",QE),nM=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),iM=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),rM=new RegExp("^"+eM+tM+nM+iM+"$"),oM=["material","materials","bones"];class cn{constructor(e,t,n){this.path=t,this.parsedPath=n||cn.parseTrackName(t),this.node=cn.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new cn.Composite(e,t,n):new cn(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(KE,"")}static parseTrackName(e){const t=rM.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const o=n.nodeName.substring(i+1);oM.indexOf(o)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=o)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(!t||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){const n=function(o){for(let s=0;s<o.length;s++){const a=o[s];if(a.name===t||a.uuid===t)return a;const l=n(a.children);if(l)return l}return null},i=n(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.node[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)e[t++]=n[i]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)n[i]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)n[i]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)n[i]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,i=t.propertyName;let o=t.propertyIndex;if(e||(e=cn.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let u=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let c=0;c<e.length;c++)if(e[c].name===u){u=c;break}break;default:if(e[n]===void 0)return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(u!==void 0){if(e[u]===void 0)return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[u]}}const s=e[i];if(s===void 0){const u=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+u+"."+i+" but it wasn't found.",e)}let a=this.Versioning.None;this.targetObject=e,e.needsUpdate!==void 0?a=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(o!==void 0){if(i==="morphTargetInfluences"){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);e.morphTargetDictionary[o]!==void 0&&(o=e.morphTargetDictionary[o])}l=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=o}else s.fromArray!==void 0&&s.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(l=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=i;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}cn.Composite=class{constructor(r,e,t){const n=t||cn.parseTrackName(e);this._targetGroup=r,this._bindings=r.subscribe_(e,n)}getValue(r,e){this.bind();const t=this._targetGroup.nCachedObjects_,n=this._bindings[t];n!==void 0&&n.getValue(r,e)}setValue(r,e){const t=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=t.length;n!==i;++n)t[n].setValue(r,e)}bind(){const r=this._bindings;for(let e=this._targetGroup.nCachedObjects_,t=r.length;e!==t;++e)r[e].bind()}unbind(){const r=this._bindings;for(let e=this._targetGroup.nCachedObjects_,t=r.length;e!==t;++e)r[e].unbind()}},cn.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},cn.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},cn.prototype.GetterByBindingType=[cn.prototype._getValue_direct,cn.prototype._getValue_array,cn.prototype._getValue_arrayElement,cn.prototype._getValue_toArray],cn.prototype.SetterByBindingTypeAndVersioning=[[cn.prototype._setValue_direct,cn.prototype._setValue_direct_setNeedsUpdate,cn.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[cn.prototype._setValue_array,cn.prototype._setValue_array_setNeedsUpdate,cn.prototype._setValue_array_setMatrixWorldNeedsUpdate],[cn.prototype._setValue_arrayElement,cn.prototype._setValue_arrayElement_setNeedsUpdate,cn.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[cn.prototype._setValue_fromArray,cn.prototype._setValue_fromArray_setNeedsUpdate,cn.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class mx{constructor(){this.uuid=rr(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let n=0,i=arguments.length;n!==i;++n)e[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,i=this._parsedPaths,o=this._bindings,s=o.length;let a,l=e.length,u=this.nCachedObjects_;for(let c=0,d=arguments.length;c!==d;++c){const f=arguments[c],m=f.uuid;let g=t[m];if(g===void 0){g=l++,t[m]=g,e.push(f);for(let _=0,y=s;_!==y;++_)o[_].push(new cn(f,n[_],i[_]))}else if(g<u){a=e[g];const _=--u,y=e[_];t[y.uuid]=g,e[g]=y,t[m]=_,e[_]=f;for(let w=0,M=s;w!==M;++w){const R=o[w],F=R[_];let C=R[g];R[g]=F,C===void 0&&(C=new cn(f,n[w],i[w])),R[_]=C}}else e[g]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=u}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,i=n.length;let o=this.nCachedObjects_;for(let s=0,a=arguments.length;s!==a;++s){const l=arguments[s],u=l.uuid,c=t[u];if(c!==void 0&&c>=o){const d=o++,f=e[d];t[f.uuid]=c,e[c]=f,t[u]=d,e[d]=l;for(let m=0,g=i;m!==g;++m){const _=n[m],y=_[d],w=_[c];_[c]=y,_[d]=w}}}this.nCachedObjects_=o}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,i=n.length;let o=this.nCachedObjects_,s=e.length;for(let a=0,l=arguments.length;a!==l;++a){const u=arguments[a].uuid,c=t[u];if(c!==void 0)if(delete t[u],c<o){const d=--o,f=e[d],m=--s,g=e[m];t[f.uuid]=c,e[c]=f,t[g.uuid]=d,e[d]=g,e.pop();for(let _=0,y=i;_!==y;++_){const w=n[_],M=w[d],R=w[m];w[c]=M,w[d]=R,w.pop()}}else{const d=--s,f=e[d];d>0&&(t[f.uuid]=c),e[c]=f,e.pop();for(let m=0,g=i;m!==g;++m){const _=n[m];_[c]=_[d],_.pop()}}}this.nCachedObjects_=o}subscribe_(e,t){const n=this._bindingsIndicesByPath;let i=n[e];const o=this._bindings;if(i!==void 0)return o[i];const s=this._paths,a=this._parsedPaths,l=this._objects,u=l.length,c=this.nCachedObjects_,d=new Array(u);i=o.length,n[e]=i,s.push(e),a.push(t),o.push(d);for(let f=c,m=l.length;f!==m;++f){const g=l[f];d[f]=new cn(g,e,t)}return d}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){const i=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length-1,l=s[a];t[e[a]]=n,s[n]=l,s.pop(),o[n]=o[a],o.pop(),i[n]=i[a],i.pop()}}}mx.prototype.isAnimationObjectGroup=!0;class sM{constructor(e,t,n=null,i=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=i;const o=t.tracks,s=o.length,a=new Array(s),l={endingStart:wi,endingEnd:wi};for(let u=0;u!==s;++u){const c=o[u].createInterpolant(null);a[u]=c,c.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Bc,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const i=this._clip.duration,o=e._clip.duration,s=o/i,a=i/o;e.warp(1,s,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const i=this._mixer,o=i.time,s=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,u=a.sampleValues;return l[0]=o,l[1]=o+n,u[0]=e/s,u[1]=t/s,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,i){if(!this.enabled)return void this._updateWeight(e);const o=this._startTime;if(o!==null){const l=(e-o)*n;if(l<0||n===0)return;this._startTime=null,t=n*l}t*=this._updateTimeScale(e);const s=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,u=this._propertyBindings;switch(this.blendMode){case we:for(let c=0,d=l.length;c!==d;++c)l[c].evaluate(s),u[c].accumulateAdditive(a);break;case Ls:default:for(let c=0,d=l.length;c!==d;++c)l[c].evaluate(s),u[c].accumulate(i,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(n!==null){const i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;n!==null&&(t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let i=this.time+e,o=this._loopCount;const s=n===go;if(e===0)return o===-1?i:s&&(1&o)==1?t-i:i;if(n===Wu){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=t)i=t;else{if(!(i<0)){this.time=i;break e}i=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),i>=t||i<0){const a=Math.floor(i/t);i-=t*a,o+=Math.abs(a);const l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?t:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const u=e<0;this._setEndings(u,!u,s)}else this._setEndings(!1,!1,s);this._loopCount=o,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(s&&(1&o)==1)return t-i}return i}_setEndings(e,t,n){const i=this._interpolantSettings;n?(i.endingStart=Yo,i.endingEnd=Yo):(i.endingStart=e?this.zeroSlopeAtStart?Yo:wi:yl,i.endingEnd=t?this.zeroSlopeAtEnd?Yo:wi:yl)}_scheduleFading(e,t,n){const i=this._mixer,o=i.time;let s=this._weightInterpolant;s===null&&(s=i._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,l=s.sampleValues;return a[0]=o,l[0]=t,a[1]=o+e,l[1]=n,this}}class gx extends _o{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,i=e._clip.tracks,o=i.length,s=e._propertyBindings,a=e._interpolants,l=n.uuid,u=this._bindingsByRootAndName;let c=u[l];c===void 0&&(c={},u[l]=c);for(let d=0;d!==o;++d){const f=i[d],m=f.name;let g=c[m];if(g!==void 0)s[d]=g;else{if(g=s[d],g!==void 0){g._cacheIndex===null&&(++g.referenceCount,this._addInactiveBinding(g,l,m));continue}const _=t&&t._propertyBindings[d].binding.parsedPath;g=new fx(cn.create(n,m,_),f.ValueTypeName,f.getValueSize()),++g.referenceCount,this._addInactiveBinding(g,l,m),s[d]=g}a[d].resultBuffer=g.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const n=(e._localRoot||this._root).uuid,i=e._clip.uuid,o=this._actionsByClip[i];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,i,n)}const t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){const o=t[n];o.useCount++==0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){const o=t[n];--o.useCount==0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t<this._nActiveActions}_addInactiveAction(e,t,n){const i=this._actions,o=this._actionsByClip;let s=o[t];if(s===void 0)s={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,o[t]=s;else{const a=s.knownActions;e._byClipCacheIndex=a.length,a.push(e)}e._cacheIndex=i.length,i.push(e),s.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],i=e._cacheIndex;n._cacheIndex=i,t[i]=n,t.pop(),e._cacheIndex=null;const o=e._clip.uuid,s=this._actionsByClip,a=s[o],l=a.knownActions,u=l[l.length-1],c=e._byClipCacheIndex;u._byClipCacheIndex=c,l[c]=u,l.pop(),e._byClipCacheIndex=null,delete a.actionByRoot[(e._localRoot||this._root).uuid],l.length===0&&delete s[o],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){const o=t[n];--o.referenceCount==0&&this._removeInactiveBinding(o)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,i=this._nActiveActions++,o=t[i];e._cacheIndex=i,t[i]=e,o._cacheIndex=n,t[n]=o}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,i=--this._nActiveActions,o=t[i];e._cacheIndex=i,t[i]=e,o._cacheIndex=n,t[n]=o}_addInactiveBinding(e,t,n){const i=this._bindingsByRootAndName,o=this._bindings;let s=i[t];s===void 0&&(s={},i[t]=s),s[n]=e,e._cacheIndex=o.length,o.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,i=n.rootNode.uuid,o=n.path,s=this._bindingsByRootAndName,a=s[i],l=t[t.length-1],u=e._cacheIndex;l._cacheIndex=u,t[u]=l,t.pop(),delete a[o],Object.keys(a).length===0&&delete s[i]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,i=this._nActiveBindings++,o=t[i];e._cacheIndex=i,t[i]=e,o._cacheIndex=n,t[n]=o}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,i=--this._nActiveBindings,o=t[i];e._cacheIndex=i,t[i]=e,o._cacheIndex=n,t[n]=o}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return n===void 0&&(n=new Lv(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,i=--this._nActiveControlInterpolants,o=t[i];e.__cacheIndex=i,t[i]=e,o.__cacheIndex=n,t[n]=o}clipAction(e,t,n){const i=t||this._root,o=i.uuid;let s=typeof e=="string"?Od.findByName(i,e):e;const a=s!==null?s.uuid:e,l=this._actionsByClip[a];let u=null;if(n===void 0&&(n=s!==null?s.blendMode:Ls),l!==void 0){const d=l.actionByRoot[o];if(d!==void 0&&d.blendMode===n)return d;u=l.knownActions[0],s===null&&(s=u._clip)}if(s===null)return null;const c=new sM(this,s,t,n);return this._bindAction(c,u),this._addInactiveAction(c,a,o),c}existingAction(e,t){const n=t||this._root,i=n.uuid,o=typeof e=="string"?Od.findByName(n,e):e,s=o?o.uuid:e,a=this._actionsByClip[s];return a!==void 0&&a.actionByRoot[i]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,i=this.time+=e,o=Math.sign(e),s=this._accuIndex^=1;for(let u=0;u!==n;++u)t[u]._update(i,e,o,s);const a=this._bindings,l=this._nActiveBindings;for(let u=0;u!==l;++u)a[u].apply(s);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,i=this._actionsByClip,o=i[n];if(o!==void 0){const s=o.knownActions;for(let a=0,l=s.length;a!==l;++a){const u=s[a];this._deactivateAction(u);const c=u._cacheIndex,d=t[t.length-1];u._cacheIndex=null,u._byClipCacheIndex=null,d._cacheIndex=c,t[c]=d,t.pop(),this._removeInactiveBindingsForAction(u)}delete i[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const o in n){const s=n[o].actionByRoot[t];s!==void 0&&(this._deactivateAction(s),this._removeInactiveAction(s))}const i=this._bindingsByRootAndName[t];if(i!==void 0)for(const o in i){const s=i[o];s.restoreOriginalState(),this._removeInactiveBinding(s)}}uncacheAction(e,t){const n=this.existingAction(e,t);n!==null&&(this._deactivateAction(n),this._removeInactiveAction(n))}}gx.prototype._controlInterpolantsResultBuffer=new Float32Array(1);class gm{constructor(e){typeof e=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}clone(){return new gm(this.value.clone===void 0?this.value:this.value.clone())}}class vx extends $s{constructor(e,t,n=1){super(e,t),this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}vx.prototype.isInstancedInterleavedBuffer=!0;class _x{constructor(e,t,n,i,o){this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=i,this.count=o,this.version=0}set needsUpdate(e){e===!0&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}_x.prototype.isGLBufferAttribute=!0;class aM{constructor(e,t,n=0,i=1/0){this.ray=new To(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new Wc,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e,t=!1,n=[]){return qv(e,this,n,t),n.sort(yx),n}intersectObjects(e,t=!1,n=[]){for(let i=0,o=e.length;i<o;i++)qv(e[i],this,n,t);return n.sort(yx),n}}function yx(r,e){return r.distance-e.distance}function qv(r,e,t,n){if(r.layers.test(e.layers)&&r.raycast(e,t),n===!0){const i=r.children;for(let o=0,s=i.length;o<s;o++)qv(i[o],e,t,!0)}}class lM{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Si(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class uM{constructor(e=1,t=0,n=0){return this.radius=e,this.theta=t,this.y=n,this}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return new this.constructor().copy(this)}}const xx=new Qe;class qh{constructor(e=new Qe(1/0,1/0),t=new Qe(-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=xx.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return xx.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}qh.prototype.isBox2=!0;const bx=new T,vm=new T;class wx{constructor(e=new T,t=new T){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){bx.subVectors(e,this.start),vm.subVectors(this.end,this.start);const n=vm.dot(vm);let i=vm.dot(bx)/n;return t&&(i=Si(i,0,1)),i}closestPointToPoint(e,t,n){const i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}class Tx extends Xt{constructor(e){super(),this.material=e,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}}Tx.prototype.isImmediateRenderObject=!0;const Sx=new T;class hM extends Xt{constructor(e,t){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;const n=new Mt,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,a=1,l=32;s<l;s++,a++){const u=s/l*Math.PI*2,c=a/l*Math.PI*2;i.push(Math.cos(u),Math.sin(u),1,Math.cos(c),Math.sin(c),1)}n.setAttribute("position",new st(i,3));const o=new xi({fog:!1,toneMapped:!1});this.cone=new E(n,o),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateMatrixWorld();const e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),Sx.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Sx),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Ja=new T,_m=new pt,Zv=new pt;class Ex extends E{constructor(e){const t=function l(u){const c=[];u&&u.isBone&&c.push(u);for(let d=0;d<u.children.length;d++)c.push.apply(c,l(u.children[d]));return c}(e),n=new Mt,i=[],o=[],s=new gt(0,0,1),a=new gt(0,1,0);for(let l=0;l<t.length;l++){const u=t[l];u.parent&&u.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),o.push(s.r,s.g,s.b),o.push(a.r,a.g,a.b))}n.setAttribute("position",new st(i,3)),n.setAttribute("color",new st(o,3)),super(n,new xi({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,i=n.getAttribute("position");Zv.copy(this.root.matrixWorld).invert();for(let o=0,s=0;o<t.length;o++){const a=t[o];a.parent&&a.parent.isBone&&(_m.multiplyMatrices(Zv,a.matrixWorld),Ja.setFromMatrixPosition(_m),i.setXYZ(s,Ja.x,Ja.y,Ja.z),_m.multiplyMatrices(Zv,a.parent.matrixWorld),Ja.setFromMatrixPosition(_m),i.setXYZ(s+1,Ja.x,Ja.y,Ja.z),s+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}}class cM extends ln{constructor(e,t,n){super(new $l(t,4,2),new Qn({wireframe:!0,fog:!1,toneMapped:!1})),this.light=e,this.light.updateMatrixWorld(),this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const dM=new T,Mx=new gt,Ax=new gt;class pM extends Xt{constructor(e,t,n){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;const i=new Zl(t);i.rotateY(.5*Math.PI),this.material=new Qn({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const o=i.getAttribute("position"),s=new Float32Array(3*o.count);i.setAttribute("color",new Zt(s,3)),this.add(new ln(i,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");Mx.copy(this.light.color),Ax.copy(this.light.groundColor);for(let n=0,i=t.count;n<i;n++){const o=n<i/2?Mx:Ax;t.setXYZ(n,o.r,o.g,o.b)}t.needsUpdate=!0}e.lookAt(dM.setFromMatrixPosition(this.light.matrixWorld).negate())}}class Px extends E{constructor(e=10,t=10,n=4473924,i=8947848){n=new gt(n),i=new gt(i);const o=t/2,s=e/t,a=e/2,l=[],u=[];for(let d=0,f=0,m=-a;d<=t;d++,m+=s){l.push(-a,0,m,a,0,m),l.push(m,0,-a,m,0,a);const g=d===o?n:i;g.toArray(u,f),f+=3,g.toArray(u,f),f+=3,g.toArray(u,f),f+=3,g.toArray(u,f),f+=3}const c=new Mt;c.setAttribute("position",new st(l,3)),c.setAttribute("color",new st(u,3)),super(c,new xi({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}class fM extends E{constructor(e=10,t=16,n=8,i=64,o=4473924,s=8947848){o=new gt(o),s=new gt(s);const a=[],l=[];for(let c=0;c<=t;c++){const d=c/t*(2*Math.PI),f=Math.sin(d)*e,m=Math.cos(d)*e;a.push(0,0,0),a.push(f,0,m);const g=1&c?o:s;l.push(g.r,g.g,g.b),l.push(g.r,g.g,g.b)}for(let c=0;c<=n;c++){const d=1&c?o:s,f=e-e/n*c;for(let m=0;m<i;m++){let g=m/i*(2*Math.PI),_=Math.sin(g)*f,y=Math.cos(g)*f;a.push(_,0,y),l.push(d.r,d.g,d.b),g=(m+1)/i*(2*Math.PI),_=Math.sin(g)*f,y=Math.cos(g)*f,a.push(_,0,y),l.push(d.r,d.g,d.b)}}const u=new Mt;u.setAttribute("position",new st(a,3)),u.setAttribute("color",new st(l,3)),super(u,new xi({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}}const Cx=new T,ym=new T,Rx=new T;class mM extends Xt{constructor(e,t,n){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,t===void 0&&(t=1);let i=new Mt;i.setAttribute("position",new st([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const o=new xi({fog:!1,toneMapped:!1});this.lightPlane=new h(i,o),this.add(this.lightPlane),i=new Mt,i.setAttribute("position",new st([0,0,0,0,0,1],3)),this.targetLine=new h(i,o),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){Cx.setFromMatrixPosition(this.light.matrixWorld),ym.setFromMatrixPosition(this.light.target.matrixWorld),Rx.subVectors(ym,Cx),this.lightPlane.lookAt(ym),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(ym),this.targetLine.scale.z=Rx.length()}}const xm=new T,ri=new Ws;class gM extends E{constructor(e){const t=new Mt,n=new xi({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],o=[],s={},a=new gt(16755200),l=new gt(16711680),u=new gt(43775),c=new gt(16777215),d=new gt(3355443);function f(g,_,y){m(g,y),m(_,y)}function m(g,_){i.push(0,0,0),o.push(_.r,_.g,_.b),s[g]===void 0&&(s[g]=[]),s[g].push(i.length/3-1)}f("n1","n2",a),f("n2","n4",a),f("n4","n3",a),f("n3","n1",a),f("f1","f2",a),f("f2","f4",a),f("f4","f3",a),f("f3","f1",a),f("n1","f1",a),f("n2","f2",a),f("n3","f3",a),f("n4","f4",a),f("p","n1",l),f("p","n2",l),f("p","n3",l),f("p","n4",l),f("u1","u2",u),f("u2","u3",u),f("u3","u1",u),f("c","t",c),f("p","c",d),f("cn1","cn2",d),f("cn3","cn4",d),f("cf1","cf2",d),f("cf3","cf4",d),t.setAttribute("position",new st(i,3)),t.setAttribute("color",new st(o,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=s,this.update()}update(){const e=this.geometry,t=this.pointMap;ri.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),pi("c",t,e,ri,0,0,-1),pi("t",t,e,ri,0,0,1),pi("n1",t,e,ri,-1,-1,-1),pi("n2",t,e,ri,1,-1,-1),pi("n3",t,e,ri,-1,1,-1),pi("n4",t,e,ri,1,1,-1),pi("f1",t,e,ri,-1,-1,1),pi("f2",t,e,ri,1,-1,1),pi("f3",t,e,ri,-1,1,1),pi("f4",t,e,ri,1,1,1),pi("u1",t,e,ri,.7,1.1,-1),pi("u2",t,e,ri,-.7,1.1,-1),pi("u3",t,e,ri,0,2,-1),pi("cf1",t,e,ri,-1,0,1),pi("cf2",t,e,ri,1,0,1),pi("cf3",t,e,ri,0,-1,1),pi("cf4",t,e,ri,0,1,1),pi("cn1",t,e,ri,-1,0,-1),pi("cn2",t,e,ri,1,0,-1),pi("cn3",t,e,ri,0,-1,-1),pi("cn4",t,e,ri,0,1,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function pi(r,e,t,n,i,o,s){xm.set(i,o,s).unproject(n);const a=e[r];if(a!==void 0){const l=t.getAttribute("position");for(let u=0,c=a.length;u<c;u++)l.setXYZ(a[u],xm.x,xm.y,xm.z)}}const bm=new In;class Ix extends E{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Float32Array(24),o=new Mt;o.setIndex(new Zt(n,1)),o.setAttribute("position",new Zt(i,3)),super(o,new xi({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&bm.setFromObject(this.object),bm.isEmpty())return;const t=bm.min,n=bm.max,i=this.geometry.attributes.position,o=i.array;o[0]=n.x,o[1]=n.y,o[2]=n.z,o[3]=t.x,o[4]=n.y,o[5]=n.z,o[6]=t.x,o[7]=t.y,o[8]=n.z,o[9]=n.x,o[10]=t.y,o[11]=n.z,o[12]=n.x,o[13]=n.y,o[14]=t.z,o[15]=t.x,o[16]=n.y,o[17]=t.z,o[18]=t.x,o[19]=t.y,o[20]=t.z,o[21]=n.x,o[22]=t.y,o[23]=t.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e){return E.prototype.copy.call(this,e),this.object=e.object,this}}class vM extends E{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Mt;i.setIndex(new Zt(n,1)),i.setAttribute("position",new st([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(i,new xi({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}}class _M extends h{constructor(e,t=1,n=16776960){const i=n,o=new Mt;o.setAttribute("position",new st([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),o.computeBoundingSphere(),super(o,new xi({color:i,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const s=new Mt;s.setAttribute("position",new st([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),s.computeBoundingSphere(),this.add(new ln(s,new Qn({color:i,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){let t=-this.plane.constant;Math.abs(t)<1e-8&&(t=1e-8),this.scale.set(.5*this.size,.5*this.size,t),this.children[0].material.side=t<0?W:z,this.lookAt(this.plane.normal),super.updateMatrixWorld(e)}}const Lx=new T;let wm,Jv;class yM extends Xt{constructor(e=new T(0,0,1),t=new T(0,0,0),n=1,i=16776960,o=.2*n,s=.2*o){super(),this.type="ArrowHelper",wm===void 0&&(wm=new Mt,wm.setAttribute("position",new st([0,0,0,0,1,0],3)),Jv=new Et(0,.5,1,5,1),Jv.translate(0,-.5,0)),this.position.copy(t),this.line=new h(wm,new xi({color:i,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ln(Jv,new Qn({color:i,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,o,s)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{Lx.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Lx,t)}}setLength(e,t=.2*e,n=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}}class Ox extends E{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new Mt;n.setAttribute("position",new st(t,3)),n.setAttribute("color",new st([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(n,new xi({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,n){const i=new gt,o=this.geometry.attributes.color.array;return i.set(e),i.toArray(o,0),i.toArray(o,3),i.set(t),i.toArray(o,6),i.toArray(o,9),i.set(n),i.toArray(o,12),i.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}const Dx=new Float32Array(1),xM=new Int32Array(Dx.buffer);class bM{static toHalfFloat(e){Dx[0]=e;const t=xM[0];let n=t>>16&32768,i=t>>12&2047;const o=t>>23&255;return o<103?n:o>142?(n|=31744,n|=(o==255?0:1)&&8388607&t,n):o<113?(i|=2048,n|=(i>>114-o)+(i>>113-o&1),n):(n|=o-112<<10|i>>1,n+=1&i,n)}}const hs=Math.pow(2,8),Nx=[.125,.215,.35,.446,.526,.582],Fx=5+Nx.length,cs={[wt]:0,[$t]:1,[ir]:2,[xl]:3,[Uc]:4,[Yi]:5,[Vn]:6},su=new Qn({side:W,depthWrite:!1,depthTest:!1}),wM=new ln(new no,su),$v=new Yh,{_lodPlanes:Bd,_sizeLods:Bx,_sigmas:Tm}=EM(),Ux=new gt;let Kv=null;const au=(1+Math.sqrt(5))/2,Zh=1/au,kx=[new T(1,1,1),new T(-1,1,1),new T(1,1,-1),new T(-1,1,-1),new T(0,au,Zh),new T(0,au,-Zh),new T(Zh,0,au),new T(-Zh,0,au),new T(au,Zh,0),new T(-au,Zh,0)];function Gx(r){const e=Math.max(r.r,r.g,r.b),t=Math.min(Math.max(Math.ceil(Math.log2(e)),-128),127);return r.multiplyScalar(Math.pow(2,-t)),(t+128)/255}class TM{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=function(t){const n=new Float32Array(t),i=new T(0,1,0);return new Wh({name:"SphericalGaussianBlur",defines:{n:t},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i},inputEncoding:{value:cs[wt]},outputEncoding:{value:cs[wt]}},vertexShader:Qv(),fragmentShader:`
2978
2978
 
2979
2979
  precision mediump float;
@@ -3231,7 +3231,7 @@ void main() {
3231
3231
  return inputTexelToLinear( color );
3232
3232
 
3233
3233
  }
3234
- `}const MM=0,AM=1,PM=0,CM=1,RM=2;function IM(r){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),r}function LM(r=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),r.isMultiMaterial=!0,r.materials=r,r.clone=function(){return r.slice()},r}function OM(r,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new ze(r,e)}function DM(r){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Xl(r)}function NM(r,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new ze(r,e)}function FM(r){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new V(r)}function BM(r){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new V(r)}function UM(r){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new V(r)}function kM(r,e,t){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new T(r,e,t)}function GM(r,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new Zt(r,e).setUsage(Zr)}function HM(r,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Il(r,e)}function zM(r,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Kc(r,e)}function VM(r,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new dh(r,e)}function jM(r,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new Qc(r,e)}function WM(r,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Ra(r,e)}function XM(r,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new ph(r,e)}function YM(r,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Ur(r,e)}function qM(r,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new st(r,e)}function ZM(r,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new ed(r,e)}function JM(r){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new Ox(r)}function $M(r,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new Ix(r,e)}function KM(r,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new E(new Mi(r.geometry),new xi({color:e!==void 0?e:16777215}))}function QM(r,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new E(new Ev(r.geometry),new xi({color:e!==void 0?e:16777215}))}function eA(r){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Lo(r)}function tA(r){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Vy(r)}function nA(r,e,t){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Pt(r,t)}function iA(){console.error("THREE.CanvasRenderer has been removed")}function rA(){console.error("THREE.JSONLoader has been removed.")}Yn.create=function(r,e){return console.log("THREE.Curve.create() has been deprecated"),r.prototype=Object.create(Yn.prototype),r.prototype.constructor=r,r.prototype.getPoint=e,r},tu.prototype.fromPoints=function(r){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(r)},Px.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Ex.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},$i.prototype.extractUrlBase=function(r){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),fm.extractUrlBase(r)},$i.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},qh.prototype.center=function(r){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(r)},qh.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},qh.prototype.isIntersectionBox=function(r){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(r)},qh.prototype.size=function(r){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(r)},In.prototype.center=function(r){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(r)},In.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},In.prototype.isIntersectionBox=function(r){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(r)},In.prototype.isIntersectionSphere=function(r){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(r)},In.prototype.size=function(r){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(r)},ui.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Ba.prototype.setFromMatrix=function(r){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(r)},wx.prototype.center=function(r){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(r)},En.prototype.flattenToArrayOffset=function(r,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(r,e)},En.prototype.multiplyVector3=function(r){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),r.applyMatrix3(this)},En.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},En.prototype.applyToBufferAttribute=function(r){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),r.applyMatrix3(this)},En.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},En.prototype.getInverse=function(r){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(r).invert()},pt.prototype.extractPosition=function(r){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(r)},pt.prototype.flattenToArrayOffset=function(r,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(r,e)},pt.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),new T().setFromMatrixColumn(this,3)},pt.prototype.setRotationFromQuaternion=function(r){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(r)},pt.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},pt.prototype.multiplyVector3=function(r){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),r.applyMatrix4(this)},pt.prototype.multiplyVector4=function(r){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),r.applyMatrix4(this)},pt.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},pt.prototype.rotateAxis=function(r){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),r.transformDirection(this)},pt.prototype.crossVector=function(r){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),r.applyMatrix4(this)},pt.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},pt.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},pt.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},pt.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},pt.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},pt.prototype.applyToBufferAttribute=function(r){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),r.applyMatrix4(this)},pt.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},pt.prototype.makeFrustum=function(r,e,t,n,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(r,e,n,t,i,o)},pt.prototype.getInverse=function(r){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(r).invert()},br.prototype.isIntersectionLine=function(r){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(r)},vi.prototype.multiplyVector3=function(r){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),r.applyQuaternion(this)},vi.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},To.prototype.isIntersectionBox=function(r){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(r)},To.prototype.isIntersectionPlane=function(r){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(r)},To.prototype.isIntersectionSphere=function(r){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(r)},Mn.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},Mn.prototype.barycoordFromPoint=function(r,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(r,e)},Mn.prototype.midpoint=function(r){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(r)},Mn.prototypenormal=function(r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(r)},Mn.prototype.plane=function(r){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(r)},Mn.barycoordFromPoint=function(r,e,t,n,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Mn.getBarycoord(r,e,t,n,i)},Mn.normal=function(r,e,t,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Mn.getNormal(r,e,t,n)},Za.prototype.extractAllPoints=function(r){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(r)},Za.prototype.extrude=function(r){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Co(this,r)},Za.prototype.makeGeometry=function(r){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Jl(this,r)},Qe.prototype.fromAttribute=function(r,e,t){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(r,e,t)},Qe.prototype.distanceToManhattan=function(r){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(r)},Qe.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},T.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},T.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},T.prototype.getPositionFromMatrix=function(r){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(r)},T.prototype.getScaleFromMatrix=function(r){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(r)},T.prototype.getColumnFromMatrix=function(r,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,r)},T.prototype.applyProjection=function(r){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(r)},T.prototype.fromAttribute=function(r,e,t){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(r,e,t)},T.prototype.distanceToManhattan=function(r){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(r)},T.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},pn.prototype.fromAttribute=function(r,e,t){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(r,e,t)},pn.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Xt.prototype.getChildByName=function(r){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(r)},Xt.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},Xt.prototype.translate=function(r,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,r)},Xt.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},Xt.prototype.applyMatrix=function(r){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(r)},Object.defineProperties(Xt.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(r){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=r}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),ln.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(ln.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),je},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),Va.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},ei.prototype.setLens=function(r,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(r)},Object.defineProperties(Oo.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(r){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=r}},shadowCameraLeft:{set:function(r){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=r}},shadowCameraRight:{set:function(r){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=r}},shadowCameraTop:{set:function(r){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=r}},shadowCameraBottom:{set:function(r){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=r}},shadowCameraNear:{set:function(r){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=r}},shadowCameraFar:{set:function(r){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=r}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(r){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=r}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(r){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=r}},shadowMapHeight:{set:function(r){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=r}}}),Object.defineProperties(Zt.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Zr},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Zr)}}}),Zt.prototype.setDynamic=function(r){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(r===!0?Zr:Os),this},Zt.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Zt.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Mt.prototype.addIndex=function(r){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(r)},Mt.prototype.addAttribute=function(r,e){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?r==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):this.setAttribute(r,e):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(r,new Zt(arguments[1],arguments[2])))},Mt.prototype.addDrawCall=function(r,e,t){t!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(r,e)},Mt.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},Mt.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},Mt.prototype.removeAttribute=function(r){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(r)},Mt.prototype.applyMatrix=function(r){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(r)},Object.defineProperties(Mt.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),$s.prototype.setDynamic=function(r){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(r===!0?Zr:Os),this},$s.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Co.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},Co.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},Co.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},Ga.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},gm.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(_i.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gt}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(r){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=r===et}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(r){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=r}}}),Object.defineProperties(Gi.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(r){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=r}}}),fn.prototype.clearTarget=function(r,e,t,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(r),this.clear(e,t,n)},fn.prototype.animate=function(r){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(r)},fn.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},fn.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},fn.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},fn.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},fn.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},fn.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},fn.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},fn.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},fn.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},fn.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},fn.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},fn.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},fn.prototype.enableScissorTest=function(r){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(r)},fn.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},fn.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},fn.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},fn.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},fn.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},fn.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},fn.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},fn.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},fn.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},fn.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(fn.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(r){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=r}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(r){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=r}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(r){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=r===!0?$t:wt}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(xd.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Or.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(r){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=r}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(r){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=r}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(r){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=r}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(r){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=r}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(r){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=r}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(r){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=r}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(r){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=r}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(r){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=r}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(r){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=r}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(r){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=r}}}),Yv.prototype.load=function(r){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const e=this;return new rx().load(r,function(t){e.setBuffer(t)}),this},px.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Xs.prototype.updateCubeMap=function(r,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(r,e)},Xs.prototype.clear=function(r,e,t,n){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(r,e,t,n)},gr.crossOrigin=void 0,gr.loadTexture=function(r,e,t,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const i=new Nv;i.setCrossOrigin(this.crossOrigin);const o=i.load(r,t,void 0,n);return e&&(o.mapping=e),o},gr.loadTextureCube=function(r,e,t,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const i=new zy;i.setCrossOrigin(this.crossOrigin);const o=i.load(r,t,void 0,n);return e&&(o.mapping=e),o},gr.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},gr.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};const oA={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function sA(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:X}})),typeof window!="undefined"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=X);const Sr=`
3234
+ `}const MM=0,AM=1,PM=0,CM=1,RM=2;function IM(r){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),r}function LM(r=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),r.isMultiMaterial=!0,r.materials=r,r.clone=function(){return r.slice()},r}function OM(r,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new ze(r,e)}function DM(r){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Xl(r)}function NM(r,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new ze(r,e)}function FM(r){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new j(r)}function BM(r){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new j(r)}function UM(r){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new j(r)}function kM(r,e,t){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new T(r,e,t)}function GM(r,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new Zt(r,e).setUsage(Zr)}function HM(r,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Il(r,e)}function zM(r,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Kc(r,e)}function VM(r,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new dh(r,e)}function jM(r,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new Qc(r,e)}function WM(r,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Ra(r,e)}function XM(r,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new ph(r,e)}function YM(r,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Ur(r,e)}function qM(r,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new st(r,e)}function ZM(r,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new ed(r,e)}function JM(r){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new Ox(r)}function $M(r,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new Ix(r,e)}function KM(r,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new E(new Mi(r.geometry),new xi({color:e!==void 0?e:16777215}))}function QM(r,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new E(new Ev(r.geometry),new xi({color:e!==void 0?e:16777215}))}function eA(r){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Lo(r)}function tA(r){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Vy(r)}function nA(r,e,t){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Pt(r,t)}function iA(){console.error("THREE.CanvasRenderer has been removed")}function rA(){console.error("THREE.JSONLoader has been removed.")}Yn.create=function(r,e){return console.log("THREE.Curve.create() has been deprecated"),r.prototype=Object.create(Yn.prototype),r.prototype.constructor=r,r.prototype.getPoint=e,r},tu.prototype.fromPoints=function(r){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(r)},Px.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Ex.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},$i.prototype.extractUrlBase=function(r){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),fm.extractUrlBase(r)},$i.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},qh.prototype.center=function(r){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(r)},qh.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},qh.prototype.isIntersectionBox=function(r){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(r)},qh.prototype.size=function(r){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(r)},In.prototype.center=function(r){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(r)},In.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},In.prototype.isIntersectionBox=function(r){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(r)},In.prototype.isIntersectionSphere=function(r){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(r)},In.prototype.size=function(r){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(r)},ui.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Ba.prototype.setFromMatrix=function(r){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(r)},wx.prototype.center=function(r){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(r)},En.prototype.flattenToArrayOffset=function(r,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(r,e)},En.prototype.multiplyVector3=function(r){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),r.applyMatrix3(this)},En.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},En.prototype.applyToBufferAttribute=function(r){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),r.applyMatrix3(this)},En.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},En.prototype.getInverse=function(r){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(r).invert()},pt.prototype.extractPosition=function(r){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(r)},pt.prototype.flattenToArrayOffset=function(r,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(r,e)},pt.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),new T().setFromMatrixColumn(this,3)},pt.prototype.setRotationFromQuaternion=function(r){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(r)},pt.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},pt.prototype.multiplyVector3=function(r){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),r.applyMatrix4(this)},pt.prototype.multiplyVector4=function(r){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),r.applyMatrix4(this)},pt.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},pt.prototype.rotateAxis=function(r){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),r.transformDirection(this)},pt.prototype.crossVector=function(r){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),r.applyMatrix4(this)},pt.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},pt.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},pt.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},pt.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},pt.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},pt.prototype.applyToBufferAttribute=function(r){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),r.applyMatrix4(this)},pt.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},pt.prototype.makeFrustum=function(r,e,t,n,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(r,e,n,t,i,o)},pt.prototype.getInverse=function(r){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(r).invert()},br.prototype.isIntersectionLine=function(r){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(r)},vi.prototype.multiplyVector3=function(r){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),r.applyQuaternion(this)},vi.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},To.prototype.isIntersectionBox=function(r){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(r)},To.prototype.isIntersectionPlane=function(r){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(r)},To.prototype.isIntersectionSphere=function(r){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(r)},Mn.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},Mn.prototype.barycoordFromPoint=function(r,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(r,e)},Mn.prototype.midpoint=function(r){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(r)},Mn.prototypenormal=function(r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(r)},Mn.prototype.plane=function(r){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(r)},Mn.barycoordFromPoint=function(r,e,t,n,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Mn.getBarycoord(r,e,t,n,i)},Mn.normal=function(r,e,t,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Mn.getNormal(r,e,t,n)},Za.prototype.extractAllPoints=function(r){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(r)},Za.prototype.extrude=function(r){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Co(this,r)},Za.prototype.makeGeometry=function(r){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Jl(this,r)},Qe.prototype.fromAttribute=function(r,e,t){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(r,e,t)},Qe.prototype.distanceToManhattan=function(r){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(r)},Qe.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},T.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},T.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},T.prototype.getPositionFromMatrix=function(r){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(r)},T.prototype.getScaleFromMatrix=function(r){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(r)},T.prototype.getColumnFromMatrix=function(r,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,r)},T.prototype.applyProjection=function(r){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(r)},T.prototype.fromAttribute=function(r,e,t){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(r,e,t)},T.prototype.distanceToManhattan=function(r){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(r)},T.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},pn.prototype.fromAttribute=function(r,e,t){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(r,e,t)},pn.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Xt.prototype.getChildByName=function(r){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(r)},Xt.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},Xt.prototype.translate=function(r,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,r)},Xt.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},Xt.prototype.applyMatrix=function(r){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(r)},Object.defineProperties(Xt.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(r){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=r}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),ln.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(ln.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),je},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),Va.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},ei.prototype.setLens=function(r,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(r)},Object.defineProperties(Oo.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(r){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=r}},shadowCameraLeft:{set:function(r){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=r}},shadowCameraRight:{set:function(r){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=r}},shadowCameraTop:{set:function(r){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=r}},shadowCameraBottom:{set:function(r){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=r}},shadowCameraNear:{set:function(r){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=r}},shadowCameraFar:{set:function(r){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=r}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(r){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=r}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(r){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=r}},shadowMapHeight:{set:function(r){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=r}}}),Object.defineProperties(Zt.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Zr},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Zr)}}}),Zt.prototype.setDynamic=function(r){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(r===!0?Zr:Os),this},Zt.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Zt.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Mt.prototype.addIndex=function(r){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(r)},Mt.prototype.addAttribute=function(r,e){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?r==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):this.setAttribute(r,e):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(r,new Zt(arguments[1],arguments[2])))},Mt.prototype.addDrawCall=function(r,e,t){t!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(r,e)},Mt.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},Mt.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},Mt.prototype.removeAttribute=function(r){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(r)},Mt.prototype.applyMatrix=function(r){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(r)},Object.defineProperties(Mt.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),$s.prototype.setDynamic=function(r){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(r===!0?Zr:Os),this},$s.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Co.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},Co.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},Co.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},Ga.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},gm.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(_i.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gt}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(r){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=r===et}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(r){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=r}}}),Object.defineProperties(Gi.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(r){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=r}}}),fn.prototype.clearTarget=function(r,e,t,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(r),this.clear(e,t,n)},fn.prototype.animate=function(r){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(r)},fn.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},fn.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},fn.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},fn.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},fn.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},fn.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},fn.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},fn.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},fn.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},fn.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},fn.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},fn.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},fn.prototype.enableScissorTest=function(r){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(r)},fn.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},fn.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},fn.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},fn.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},fn.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},fn.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},fn.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},fn.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},fn.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},fn.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(fn.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(r){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=r}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(r){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=r}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(r){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=r===!0?$t:wt}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(xd.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Or.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(r){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=r}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(r){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=r}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(r){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=r}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(r){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=r}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(r){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=r}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(r){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=r}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(r){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=r}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(r){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=r}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(r){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=r}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(r){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=r}}}),Yv.prototype.load=function(r){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const e=this;return new rx().load(r,function(t){e.setBuffer(t)}),this},px.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Xs.prototype.updateCubeMap=function(r,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(r,e)},Xs.prototype.clear=function(r,e,t,n){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(r,e,t,n)},gr.crossOrigin=void 0,gr.loadTexture=function(r,e,t,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const i=new Nv;i.setCrossOrigin(this.crossOrigin);const o=i.load(r,t,void 0,n);return e&&(o.mapping=e),o},gr.loadTextureCube=function(r,e,t,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const i=new zy;i.setCrossOrigin(this.crossOrigin);const o=i.load(r,t,void 0,n);return e&&(o.mapping=e),o},gr.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},gr.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};const oA={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function sA(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:X}})),typeof window!="undefined"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=X);const Sr=`
3235
3235
  vec4 blendSrcOver(vec4 src, vec4 dist) {
3236
3236
  vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
3237
3237
 
@@ -5820,6 +5820,6 @@ void main(void){
5820
5820
  </div>
5821
5821
 
5822
5822
  </div>`,jC=function(r,e){var t=r[e];return Ke.isArray(arguments[2])||Ke.isObject(arguments[2])?new kC(r,e,arguments[2]):Ke.isNumber(t)?Ke.isNumber(arguments[2])&&Ke.isNumber(arguments[3])?Ke.isNumber(arguments[4])?new X_(r,e,arguments[2],arguments[3],arguments[4]):new X_(r,e,arguments[2],arguments[3]):Ke.isNumber(arguments[4])?new _g(r,e,{min:arguments[2],max:arguments[3],step:arguments[4]}):new _g(r,e,{min:arguments[2],max:arguments[3]}):Ke.isString(t)?new GC(r,e):Ke.isFunction(t)?new GT(r,e,""):Ke.isBoolean(t)?new FT(r,e):null},WC=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(r){setTimeout(r,1e3/60)},XC=function(){function r(){Bo(this,r),this.backgroundElement=document.createElement("div"),Ke.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),Pe.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),Ke.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var e=this;Pe.bind(this.backgroundElement,"click",function(){e.hide()})}return Uo(r,[{key:"show",value:function(){var e=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),Ke.defer(function(){e.backgroundElement.style.opacity=1,e.domElement.style.opacity=1,e.domElement.style.webkitTransform="scale(1)"})}},{key:"hide",value:function(){var e=this,t=function n(){e.domElement.style.display="none",e.backgroundElement.style.display="none",Pe.unbind(e.domElement,"webkitTransitionEnd",n),Pe.unbind(e.domElement,"transitionend",n),Pe.unbind(e.domElement,"oTransitionEnd",n)};Pe.bind(this.domElement,"webkitTransitionEnd",t),Pe.bind(this.domElement,"transitionend",t),Pe.bind(this.domElement,"oTransitionEnd",t),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"}},{key:"layout",value:function(){this.domElement.style.left=window.innerWidth/2-Pe.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-Pe.getHeight(this.domElement)/2+"px"}}]),r}();zC(function(r){if(r&&typeof window!="undefined"){var e=document.createElement("style");return e.setAttribute("type","text/css"),e.innerHTML=r,document.head.appendChild(e),r}}(`.dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}
5823
- `));var wp=function(){try{return!!window.localStorage}catch{return!1}}(),yg=void 0,zT=!0,fc=void 0,q_=!1,VT=[],Ln=function r(e){var t=this,n=e||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),Pe.addClass(this.domElement,"dg"),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],n=Ke.defaults(n,{closeOnTop:!1,autoPlace:!0,width:r.DEFAULT_WIDTH}),n=Ke.defaults(n,{resizable:n.autoPlace,hideable:n.autoPlace}),Ke.isUndefined(n.load)?n.load={preset:"Default"}:n.preset&&(n.load.preset=n.preset),Ke.isUndefined(n.parent)&&n.hideable&&VT.push(this),n.resizable=Ke.isUndefined(n.parent)&&n.resizable,n.autoPlace&&Ke.isUndefined(n.scrollable)&&(n.scrollable=!0);var i,o=wp&&localStorage.getItem(mc(this,"isLocal"))==="true",s=void 0,a=void 0;if(Object.defineProperties(this,{parent:{get:function(){return n.parent}},scrollable:{get:function(){return n.scrollable}},autoPlace:{get:function(){return n.autoPlace}},closeOnTop:{get:function(){return n.closeOnTop}},preset:{get:function(){return t.parent?t.getRoot().preset:n.load.preset},set:function(c){t.parent?t.getRoot().preset=c:n.load.preset=c,function(d){for(var f=0;f<d.__preset_select.length;f++)d.__preset_select[f].value===d.preset&&(d.__preset_select.selectedIndex=f)}(this),t.revert()}},width:{get:function(){return n.width},set:function(c){n.width=c,K_(t,c)}},name:{get:function(){return n.name},set:function(c){n.name=c,a&&(a.innerHTML=n.name)}},closed:{get:function(){return n.closed},set:function(c){n.closed=c,n.closed?Pe.addClass(t.__ul,r.CLASS_CLOSED):Pe.removeClass(t.__ul,r.CLASS_CLOSED),this.onResize(),t.__closeButton&&(t.__closeButton.innerHTML=c?r.TEXT_OPEN:r.TEXT_CLOSED)}},load:{get:function(){return n.load}},useLocalStorage:{get:function(){return o},set:function(c){wp&&(o=c,c?Pe.bind(window,"unload",s):Pe.unbind(window,"unload",s),localStorage.setItem(mc(t,"isLocal"),c))}}}),Ke.isUndefined(n.parent)){if(this.closed=n.closed||!1,Pe.addClass(this.domElement,r.CLASS_MAIN),Pe.makeSelectable(this.domElement,!1),wp&&o){t.useLocalStorage=!0;var l=localStorage.getItem(mc(this,"gui"));l&&(n.load=JSON.parse(l))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=r.TEXT_CLOSED,Pe.addClass(this.__closeButton,r.CLASS_CLOSE_BUTTON),n.closeOnTop?(Pe.addClass(this.__closeButton,r.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(Pe.addClass(this.__closeButton,r.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),Pe.bind(this.__closeButton,"click",function(){t.closed=!t.closed})}else{n.closed===void 0&&(n.closed=!0);var u=document.createTextNode(n.name);Pe.addClass(u,"controller-name"),a=Z_(t,u),Pe.addClass(this.__ul,r.CLASS_CLOSED),Pe.addClass(a,"title"),Pe.bind(a,"click",function(c){return c.preventDefault(),t.closed=!t.closed,!1}),n.closed||(this.closed=!1)}n.autoPlace&&(Ke.isUndefined(n.parent)&&(zT&&(fc=document.createElement("div"),Pe.addClass(fc,"dg"),Pe.addClass(fc,r.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(fc),zT=!1),fc.appendChild(this.domElement),Pe.addClass(this.domElement,r.CLASS_AUTO_PLACE)),this.parent||K_(t,n.width)),this.__resizeHandler=function(){t.onResizeDebounced()},Pe.bind(window,"resize",this.__resizeHandler),Pe.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),Pe.bind(this.__ul,"transitionend",this.__resizeHandler),Pe.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),n.resizable&&qC(this),s=function(){wp&&localStorage.getItem(mc(t,"isLocal"))==="true"&&localStorage.setItem(mc(t,"gui"),JSON.stringify(t.getSaveObject()))},this.saveToLocalStorageIfPossible=s,n.parent||((i=t.getRoot()).width+=1,Ke.defer(function(){i.width-=1}))};function Z_(r,e,t){var n=document.createElement("li");return e&&n.appendChild(e),t?r.__ul.insertBefore(n,t):r.__ul.appendChild(n),r.onResize(),n}function jT(r){Pe.unbind(window,"resize",r.__resizeHandler),r.saveToLocalStorageIfPossible&&Pe.unbind(window,"unload",r.saveToLocalStorageIfPossible)}function J_(r,e){var t=r.__preset_select[r.__preset_select.selectedIndex];t.innerHTML=e?t.value+"*":t.value}function WT(r,e){var t=r.getRoot(),n=t.__rememberedObjects.indexOf(e.object);if(n!==-1){var i=t.__rememberedObjectIndecesToControllers[n];if(i===void 0&&(i={},t.__rememberedObjectIndecesToControllers[n]=i),i[e.property]=e,t.load&&t.load.remembered){var o=t.load.remembered,s=void 0;if(o[r.preset])s=o[r.preset];else{if(!o.Default)return;s=o.Default}if(s[n]&&s[n][e.property]!==void 0){var a=s[n][e.property];e.initialValue=a,e.setValue(a)}}}}function Tp(r,e,t,n){if(e[t]===void 0)throw new Error('Object "'+e+'" has no property "'+t+'"');var i=void 0;if(n.color)i=new Y_(e,t);else{var o=[e,t].concat(n.factoryArgs);i=jC.apply(r,o)}n.before instanceof Pu&&(n.before=n.before.__li),WT(r,i),Pe.addClass(i.domElement,"c");var s=document.createElement("span");Pe.addClass(s,"property-name"),s.innerHTML=i.property;var a=document.createElement("div");a.appendChild(s),a.appendChild(i.domElement);var l=Z_(r,a,n.before);return Pe.addClass(l,Ln.CLASS_CONTROLLER_ROW),i instanceof Y_?Pe.addClass(l,"color"):Pe.addClass(l,BC(i.getValue())),function(u,c,d){if(d.__li=c,d.__gui=u,Ke.extend(d,{options:function(g){if(arguments.length>1){var _=d.__li.nextElementSibling;return d.remove(),Tp(u,d.object,d.property,{before:_,factoryArgs:[Ke.toArray(arguments)]})}if(Ke.isArray(g)||Ke.isObject(g)){var y=d.__li.nextElementSibling;return d.remove(),Tp(u,d.object,d.property,{before:y,factoryArgs:[g]})}},name:function(g){return d.__li.firstElementChild.firstElementChild.innerHTML=g,d},listen:function(){return d.__gui.listen(d),d},remove:function(){return d.__gui.remove(d),d}}),d instanceof X_){var f=new _g(d.object,d.property,{min:d.__min,max:d.__max,step:d.__step});Ke.each(["updateDisplay","onChange","onFinishChange","step","min","max"],function(g){var _=d[g],y=f[g];d[g]=f[g]=function(){var w=Array.prototype.slice.call(arguments);return y.apply(f,w),_.apply(d,w)}}),Pe.addClass(c,"has-slider"),d.domElement.insertBefore(f.domElement,d.domElement.firstElementChild)}else if(d instanceof _g){var m=function(g){if(Ke.isNumber(d.__min)&&Ke.isNumber(d.__max)){var _=d.__li.firstElementChild.firstElementChild.innerHTML,y=d.__gui.__listening.indexOf(d)>-1;d.remove();var w=Tp(u,d.object,d.property,{before:d.__li.nextElementSibling,factoryArgs:[d.__min,d.__max,d.__step]});return w.name(_),y&&w.listen(),w}return g};d.min=Ke.compose(m,d.min),d.max=Ke.compose(m,d.max)}else d instanceof FT?(Pe.bind(c,"click",function(){Pe.fakeEvent(d.__checkbox,"click")}),Pe.bind(d.__checkbox,"click",function(g){g.stopPropagation()})):d instanceof GT?(Pe.bind(c,"click",function(){Pe.fakeEvent(d.__button,"click")}),Pe.bind(c,"mouseover",function(){Pe.addClass(d.__button,"hover")}),Pe.bind(c,"mouseout",function(){Pe.removeClass(d.__button,"hover")})):d instanceof Y_&&(Pe.addClass(c,"color"),d.updateDisplay=Ke.compose(function(g){return c.style.borderLeftColor=d.__color.toString(),g},d.updateDisplay),d.updateDisplay());d.setValue=Ke.compose(function(g){return u.getRoot().__preset_select&&d.isModified()&&J_(u.getRoot(),!0),g},d.setValue)}(r,l,i),r.__controllers.push(i),i}function mc(r,e){return document.location.href+"."+e}function $_(r,e,t){var n=document.createElement("option");n.innerHTML=e,n.value=e,r.__preset_select.appendChild(n),t&&(r.__preset_select.selectedIndex=r.__preset_select.length-1)}function XT(r,e){e.style.display=r.useLocalStorage?"block":"none"}function YC(r){var e=r.__save_row=document.createElement("li");Pe.addClass(r.domElement,"has-save"),r.__ul.insertBefore(e,r.__ul.firstChild),Pe.addClass(e,"save-row");var t=document.createElement("span");t.innerHTML="&nbsp;",Pe.addClass(t,"button gears");var n=document.createElement("span");n.innerHTML="Save",Pe.addClass(n,"button"),Pe.addClass(n,"save");var i=document.createElement("span");i.innerHTML="New",Pe.addClass(i,"button"),Pe.addClass(i,"save-as");var o=document.createElement("span");o.innerHTML="Revert",Pe.addClass(o,"button"),Pe.addClass(o,"revert");var s=r.__preset_select=document.createElement("select");if(r.load&&r.load.remembered?Ke.each(r.load.remembered,function(c,d){$_(r,d,d===r.preset)}):$_(r,"Default",!1),Pe.bind(s,"change",function(){for(var c=0;c<r.__preset_select.length;c++)r.__preset_select[c].innerHTML=r.__preset_select[c].value;r.preset=this.value}),e.appendChild(s),e.appendChild(t),e.appendChild(n),e.appendChild(i),e.appendChild(o),wp){var a=document.getElementById("dg-local-explain"),l=document.getElementById("dg-local-storage");document.getElementById("dg-save-locally").style.display="block",localStorage.getItem(mc(0,"isLocal"))==="true"&&l.setAttribute("checked","checked"),XT(r,a),Pe.bind(l,"change",function(){r.useLocalStorage=!r.useLocalStorage,XT(r,a)})}var u=document.getElementById("dg-new-constructor");Pe.bind(u,"keydown",function(c){!c.metaKey||c.which!==67&&c.keyCode!==67||yg.hide()}),Pe.bind(t,"click",function(){u.innerHTML=JSON.stringify(r.getSaveObject(),void 0,2),yg.show(),u.focus(),u.select()}),Pe.bind(n,"click",function(){r.save()}),Pe.bind(i,"click",function(){var c=prompt("Enter a new preset name.");c&&r.saveAs(c)}),Pe.bind(o,"click",function(){r.revert()})}function qC(r){var e=void 0;function t(o){return o.preventDefault(),r.width+=e-o.clientX,r.onResize(),e=o.clientX,!1}function n(){Pe.removeClass(r.__closeButton,Ln.CLASS_DRAG),Pe.unbind(window,"mousemove",t),Pe.unbind(window,"mouseup",n)}function i(o){return o.preventDefault(),e=o.clientX,Pe.addClass(r.__closeButton,Ln.CLASS_DRAG),Pe.bind(window,"mousemove",t),Pe.bind(window,"mouseup",n),!1}r.__resize_handle=document.createElement("div"),Ke.extend(r.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"}),Pe.bind(r.__resize_handle,"mousedown",i),Pe.bind(r.__closeButton,"mousedown",i),r.domElement.insertBefore(r.__resize_handle,r.domElement.firstElementChild)}function K_(r,e){r.domElement.style.width=e+"px",r.__save_row&&r.autoPlace&&(r.__save_row.style.width=e+"px"),r.__closeButton&&(r.__closeButton.style.width=e+"px")}function xg(r,e){var t={};return Ke.each(r.__rememberedObjects,function(n,i){var o={},s=r.__rememberedObjectIndecesToControllers[i];Ke.each(s,function(a,l){o[l]=e?a.initialValue:a.getValue()}),t[i]=o}),t}Ln.toggleHide=function(){q_=!q_,Ke.each(VT,function(r){r.domElement.style.display=q_?"none":""})},Ln.CLASS_AUTO_PLACE="a",Ln.CLASS_AUTO_PLACE_CONTAINER="ac",Ln.CLASS_MAIN="main",Ln.CLASS_CONTROLLER_ROW="cr",Ln.CLASS_TOO_TALL="taller-than-window",Ln.CLASS_CLOSED="closed",Ln.CLASS_CLOSE_BUTTON="close-button",Ln.CLASS_CLOSE_TOP="close-top",Ln.CLASS_CLOSE_BOTTOM="close-bottom",Ln.CLASS_DRAG="drag",Ln.DEFAULT_WIDTH=245,Ln.TEXT_CLOSED="Close Controls",Ln.TEXT_OPEN="Open Controls",Ln._keydownHandler=function(r){document.activeElement.type==="text"||r.which!==72&&r.keyCode!==72||Ln.toggleHide()},Pe.bind(window,"keydown",Ln._keydownHandler,!1),Ke.extend(Ln.prototype,{add:function(r,e){return Tp(this,r,e,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(r,e){return Tp(this,r,e,{color:!0})},remove:function(r){this.__ul.removeChild(r.__li),this.__controllers.splice(this.__controllers.indexOf(r),1);var e=this;Ke.defer(function(){e.onResize()})},destroy:function(){if(this.parent)throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");this.autoPlace&&fc.removeChild(this.domElement);var r=this;Ke.each(this.__folders,function(e){r.removeFolder(e)}),Pe.unbind(window,"keydown",Ln._keydownHandler,!1),jT(this)},addFolder:function(r){if(this.__folders[r]!==void 0)throw new Error('You already have a folder in this GUI by the name "'+r+'"');var e={name:r,parent:this};e.autoPlace=this.autoPlace,this.load&&this.load.folders&&this.load.folders[r]&&(e.closed=this.load.folders[r].closed,e.load=this.load.folders[r]);var t=new Ln(e);this.__folders[r]=t;var n=Z_(this,t.domElement);return Pe.addClass(n,"folder"),t},removeFolder:function(r){this.__ul.removeChild(r.domElement.parentElement),delete this.__folders[r.name],this.load&&this.load.folders&&this.load.folders[r.name]&&delete this.load.folders[r.name],jT(r);var e=this;Ke.each(r.__folders,function(t){r.removeFolder(t)}),Ke.defer(function(){e.onResize()})},open:function(){this.closed=!1},close:function(){this.closed=!0},hide:function(){this.domElement.style.display="none"},show:function(){this.domElement.style.display=""},onResize:function(){var r=this.getRoot();if(r.scrollable){var e=Pe.getOffset(r.__ul).top,t=0;Ke.each(r.__ul.childNodes,function(n){r.autoPlace&&n===r.__save_row||(t+=Pe.getHeight(n))}),window.innerHeight-e-20<t?(Pe.addClass(r.domElement,Ln.CLASS_TOO_TALL),r.__ul.style.height=window.innerHeight-e-20+"px"):(Pe.removeClass(r.domElement,Ln.CLASS_TOO_TALL),r.__ul.style.height="auto")}r.__resize_handle&&Ke.defer(function(){r.__resize_handle.style.height=r.__ul.offsetHeight+"px"}),r.__closeButton&&(r.__closeButton.style.width=r.width+"px")},onResizeDebounced:Ke.debounce(function(){this.onResize()},50),remember:function(){if(Ke.isUndefined(yg)&&((yg=new XC).domElement.innerHTML=VC),this.parent)throw new Error("You can only call remember on a top level GUI.");var r=this;Ke.each(Array.prototype.slice.call(arguments),function(e){r.__rememberedObjects.length===0&&YC(r),r.__rememberedObjects.indexOf(e)===-1&&r.__rememberedObjects.push(e)}),this.autoPlace&&K_(this,this.width)},getRoot:function(){for(var r=this;r.parent;)r=r.parent;return r},getSaveObject:function(){var r=this.load;return r.closed=this.closed,this.__rememberedObjects.length>0&&(r.preset=this.preset,r.remembered||(r.remembered={}),r.remembered[this.preset]=xg(this)),r.folders={},Ke.each(this.__folders,function(e,t){r.folders[t]=e.getSaveObject()}),r},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=xg(this),J_(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(r){this.load.remembered||(this.load.remembered={},this.load.remembered.Default=xg(this,!0)),this.load.remembered[r]=xg(this),this.preset=r,$_(this,r,!0),this.saveToLocalStorageIfPossible()},revert:function(r){Ke.each(this.__controllers,function(e){this.getRoot().load.remembered?WT(r||this.getRoot(),e):e.setValue(e.initialValue),e.__onFinishChange&&e.__onFinishChange.call(e,e.getValue())},this),Ke.each(this.__folders,function(e){e.revert(e)}),r||J_(this.getRoot(),!1)},listen:function(r){var e=this.__listening.length===0;this.__listening.push(r),e&&function t(n){n.length!==0&&WC.call(window,function(){t(n)}),Ke.each(n,function(i){i.updateDisplay()})}(this.__listening)},updateDisplay:function(){Ke.each(this.__controllers,function(r){r.updateDisplay()}),Ke.each(this.__folders,function(r){r.updateDisplay()})}});var ZC=Ln,JC=function(){function r(e){this.runTime={fps:0,resolution:""},this.target=e.target,this.data=e.params,this.player=e.player,this.gui=this.createControllerGUI(),this.createStats(),this.addEventListener()}return r.prototype.createStats=function(){var e=this;setInterval(function(){e.controller.runTimeFps.setValue(e.player.runtime.fps),e.controller.runTimeResolution.setValue(e.player.view.width+"*"+e.player.view.height)},500)},r.prototype.createControllerGUI=function(){var e,t,n,i,o,s,a=new ZC({autoPlace:!0,closed:!0});return a.domElement.style.opacity=".6",a.domElement.style.transformOrigin="100% 0",a.domElement.style.transform="scale(1.4)",this.target.appendChild(a.domElement),a.domElement.style.position="absolute",a.domElement.style.right="0",a.domElement.style.top="0",a.domElement.style.zIndex="2",this.controller={runTimeFps:a.add({FPS:0},"FPS",0),runTimeResolution:a.add({\u5206\u8FA8\u7387:""},"\u5206\u8FA8\u7387",""),autoFps:a.add({\u81EA\u52A8fps:(e=this.data.autoFPS)===null||e===void 0||e},"\u81EA\u52A8fps",!0),autoResolution:a.add({\u81EA\u52A8\u5206\u8FA8\u7387:(t=this.data.autoResolution)!==null&&t!==void 0&&t},"\u81EA\u52A8\u5206\u8FA8\u7387",!0),moreCalculation:a.add({\u989D\u5916\u8BA1\u7B97:0},"\u989D\u5916\u8BA1\u7B97",0,100),minFPS:a.add({\u6700\u4F4Efps:(n=this.data.minFPS)!==null&&n!==void 0?n:40},"\u6700\u4F4Efps",0,60),maxFPS:a.add({\u6700\u9AD8fps:(i=this.data.maxFPS)!==null&&i!==void 0?i:50},"\u6700\u9AD8fps",0,60),resolution:a.add({\u76EE\u6807\u5206\u8FA8\u500D\u7387:(o=this.data.resolution)!==null&&o!==void 0?o:window.devicePixelRatio},"\u76EE\u6807\u5206\u8FA8\u500D\u7387",.5,4),minResolution:a.add({\u6700\u5C0F\u5206\u8FA8\u500D\u7387:(s=this.data.minResolution)!==null&&s!==void 0?s:1},"\u6700\u5C0F\u5206\u8FA8\u500D\u7387",.5,4)},this.controller.runTimeFps.disabled=!0,this.controller.runTimeResolution.disabled=!0,a},r.prototype.addEventListener=function(){var e,t=this;this.controller.autoFps.onChange(function(n){t.data.autoFPS=n,t.player.updateConfig(t.data)}),this.controller.maxFPS.onChange(function(n){t.data.maxFPS=n,t.player.updateConfig(t.data)}),this.controller.minFPS.onChange(function(n){t.data.minFPS=n,t.player.updateConfig(t.data)}),this.controller.autoResolution.onChange(function(n){t.data.autoResolution=n,t.player.updateConfig(t.data)}),this.controller.minResolution.onChange(function(n){t.data.minResolution=n,t.player.updateConfig(t.data)}),this.controller.resolution.onChange(function(n){t.data.resolution=n,t.player.updateConfig(t.data)}),this.controller.moreCalculation.onChange(function(n){e&&t.player.app.ticker.remove(e),n>0&&(e=function(){for(var i="";i.length<n;)i+=Math.random().toString(32).substr(2);lg()(i)},t.player.app.ticker.add(e))})},r}(),$C=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])})(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),YT=function(r,e,t,n){return new(t||(t=Promise))(function(i,o){function s(u){try{l(n.next(u))}catch(c){o(c)}}function a(u){try{l(n.throw(u))}catch(c){o(c)}}function l(u){var c;u.done?i(u.value):(c=u.value,c instanceof t?c:new t(function(d){d(c)})).then(s,a)}l((n=n.apply(r,e||[])).next())})},qT=function(r,e){var t,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,n=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!((i=i.length>0&&i[i.length-1])||c[0]!==6&&c[0]!==2)){s=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){s.label=c[1];break}if(c[0]===6&&s.label<i[1]){s.label=i[1],i=c;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(c);break}i[2]&&s.ops.pop(),s.trys.pop();continue}c=e.call(r,s)}catch(d){c=[6,d],n=0}finally{t=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([l,u])}}},KC=window.ResizeObserver||PC,dr={syncDispatch:"syncDispatch",syncReceive:"syncReceive",renderStart:"renderStart",renderEnd:"renderEnd",renderError:"renderError",slideChange:"slideChange",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",animateStart:"animateStart",animateEnd:"animateEnd"},QC=function(r){function e(t){var n=r.call(this)||this;return n.__slideState={taskId:"",url:"",currentSlideIndex:-1,mainSeqStep:-1,mainSeqState:null,appliedInteractiveSeqIds:[]},n.resize=!1,n.isAnimating=!1,n.renderingTaskManager=new LC,n.isLoading=!1,n.interactive=!0,n.player=new vC,n.frameWidth=1,n.frameHeight=1,n.frame=document.createElement("div"),n.frameResizeObserver=new KC(function(i){return n.frameResizeHandler(i)}),n.anchor=t.anchor,n.resize=t.resize||!1,n.interactive=t.interactive,n.player.setInteractive(n.interactive),n.player.updateConfig(t.renderOptions||{}),n.frame.style.cssText="width:100%;height:100%;display:flex;justify-content:center;align-items:center",n.frame.appendChild(n.player.view),n.anchor.appendChild(n.frame),(t==null?void 0:t.controller)&&new JC({player:n.player,params:t.renderOptions||{},target:n.frame}),n.frameResizeObserver.observe(n.frame),n.player.on(mn.renderStart,function(i){n.isLoading=!0,n.emit(dr.renderStart,i)}),n.player.on(mn.renderEnd,function(i){n.isLoading=!1,n.emit(dr.renderEnd,i)}),n.player.on(mn.slideChange,function(i){n.__slideState.currentSlideIndex=i,n.emit(dr.slideChange,i)}),n.player.on(mn.mainSeqStateChange,function(i){n.__slideState.mainSeqState=i}),n.player.on(mn.mainSeqStepChange,function(i){n.__slideState.mainSeqStep=i}),n.player.on(mn.animateStart,function(){n.isAnimating!==!0&&(n.isAnimating=!0,n.emit(dr.animateStart))}),n.player.on(mn.animateEnd,function(){n.isAnimating!==!1&&(n.isAnimating=!1,n.emit(dr.animateEnd))}),n.player.on(mn.interactiveAnimTrigger,function(i){var o=i.action,s=i.seqId;n.__slideState.appliedInteractiveSeqIds.push(s),n.emit(dr.syncDispatch,{type:"interactiveAnim",action:o})}),n.player.on(mn.mainSeqStepStart,Object(oe.throttle)(function(i){n.emit(dr.mainSeqStepStart)},100)),n.player.on(mn.mainSeqStepEnd,Object(oe.throttle)(function(i){n.emit(dr.mainSeqStepEnd)},100)),n.on(dr.syncReceive,n.receiveSyncHandler),n.renderingTaskManager.eventHub.on("task-error",function(i){var o=i.error,s=i.task;n.emit(dr.renderError,{error:o,index:s.slideIndex})}),n}return $C(e,r),e.prototype.frameResizeHandler=function(t){var n=t[0].contentRect,i=n.width,o=n.height;this.frameWidth=i,this.frameHeight=o,this.resizeView()},e.prototype.resizeView=function(){var t=this.width,n=this.height;if(t>0&&n>0){var i=this.frameWidth/t,o=i*n;if(o>this.frameHeight&&(i*=this.frameHeight/o),this.resize){var s=this.player.app,a=i*(this.player.config.resolution||window.devicePixelRatio);s.renderer.resolution=a,s.renderer.plugins.interaction.resolution=s.renderer.resolution,s.renderer.resize(this.width,this.height)}this.view.style.transform="scale("+i+")"}},e.prototype.receiveSyncHandler=function(t){var n=this;t.type==="nextStep"?this.mainSeqStep===t.next-1||this.mainSeqStep+1===this.mainSeqLength?this.nextStep(!0):(this.setMainSeqStep(t.next,"start"),this.player.nextTick(function(){n.nextStep(!0)})):t.type==="prevStep"?this.mainSeqStep===0&&this.mainSeqState==="idle"||this.mainSeqStep===t.next+1||this.mainSeqStep+1===this.mainSeqLength?this.prevStep(!0):(this.setMainSeqStep(t.next+1,"start"),this.player.nextTick(function(){n.prevStep(!0)})):t.type==="interactiveAnim"?this.player.applyInteractiveAction(t.action):t.type==="renderSlide"&&this.renderSlide(t.index,!0)},e.prototype.setSlideState=function(t){return YT(this,void 0,void 0,function(){var n,i=this;return qT(this,function(o){switch(o.label){case 0:return t.taskId&&t.taskId!==this.__slideState.taskId&&(this.__slideState.taskId=t.taskId,this.player.setResourceData(t.taskId,this.__slideState.url)),t.url&&t.url!==this.__slideState.url&&(this.__slideState.url=t.url,this.player.setResourceData(this.__slideState.taskId,t.url)),Number.isInteger(t.currentSlideIndex)&&t.currentSlideIndex!==this.__slideState.currentSlideIndex?(this.__slideState.currentSlideIndex=t.currentSlideIndex,[4,this.renderSlide(t.currentSlideIndex)]):[3,2];case 1:o.sent(),o.label=2;case 2:return[4,NC(function(){return i.player.currentIndex===t.currentSlideIndex&&i.player.currentStage},3e3)];case 3:return o.sent(),n=!1,Number.isInteger(t.mainSeqStep)&&t.mainSeqStep!==this.__slideState.mainSeqStep&&(n=!0,this.__slideState.mainSeqStep=t.mainSeqStep),t.mainSeqState&&t.mainSeqState!==this.__slideState.mainSeqState&&(n=!0,this.__slideState.mainSeqState=t.mainSeqState),n&&this.setMainSeqStep(this.__slideState.mainSeqStep,this.__slideState.mainSeqState==="idle"?"start":"end"),t.appliedInteractiveSeqIds&&t.appliedInteractiveSeqIds.length>0&&(this.__slideState.appliedInteractiveSeqIds=t.appliedInteractiveSeqIds,t.appliedInteractiveSeqIds.forEach(function(s){i.player.seekInteractiveSeqToEnd(s)})),[2]}})})},Object.defineProperty(e.prototype,"slideCount",{get:function(){return this.player.slideCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"slideState",{get:function(){return this.__slideState.mainSeqState=this.mainSeqState,this.__slideState.mainSeqStep=this.mainSeqStep,JSON.parse(JSON.stringify(this.__slideState))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainSeqLength",{get:function(){return this.player.mainSeqLength()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainSeqStep",{get:function(){return this.player.mainSeqStep()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainSeqState",{get:function(){return this.player.mainSeqState()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderOptions",{get:function(){return this.player.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawCall",{get:function(){return this.player.runtime.drawCall},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderFps",{get:function(){return this.player.runtime.fps},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"runtimeFps",{get:function(){return this.player.fps.value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"view",{get:function(){return this.player.view},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.player.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.player.height},enumerable:!1,configurable:!0}),e.prototype.updateRenderOption=function(t){this.player.updateConfig(t)},e.prototype.setResource=function(t,n){this.player.setResourceData(t,n),this.__slideState.taskId=t,this.__slideState.url=n,this.emit(dr.syncDispatch,{type:"setResource",taskId:t,url:n})},e.prototype._renderSlide=function(t,n){return n===void 0&&(n=!1),YT(this,void 0,void 0,function(){return qT(this,function(i){switch(i.label){case 0:return this.isLoading=!0,[4,this.player.renderSlide(t)];case 1:return i.sent(),this.__slideState.currentSlideIndex=t,this.isLoading=!1,this.resizeView(),n||this.emit(dr.syncDispatch,{type:"renderSlide",index:t}),[2]}})})},e.prototype.renderSlide=function(t,n){var i=this;n===void 0&&(n=!1);var o=Number(t);(o!==this.player.currentIndex||this.renderingTaskManager.hasStartTask())&&(o>this.slideCount&&this.slideCount>0||this.renderingTaskManager.addTask(function(){return i._renderSlide(o,n)},o))},e.prototype.nextStep=function(t){if(t===void 0&&(t=!1),!this.isLoading){this.player.nextStep();var n=this.player.mainSeqStep();this.__slideState.mainSeqStep=n,t||this.emit(dr.syncDispatch,{type:"nextStep",next:n})}},e.prototype.prevStep=function(t){if(t===void 0&&(t=!1),!this.isLoading){this.player.prevStep();var n=this.player.mainSeqStep();this.__slideState.mainSeqStep=n,t||this.emit(dr.syncDispatch,{type:"prevStep",next:n})}},e.prototype.setMainSeqStep=function(t,n){this.player.setMainSeqStep(t,n)},e.prototype.setInteractive=function(t){this.interactive=t,this.player.setInteractive(t)},e.prototype.pause=function(){this.player.pause()},e.prototype.resume=function(){this.player.resume()},e.prototype.destroy=function(){this.frameResizeObserver.disconnect(),this.player.removeAllListeners(),this.player.destroy(),this.player.removeAllListeners();try{this.anchor.removeChild(this.player.view)}catch{}},e}(k.a)}]);class fr{constructor(){this.disposers=new Map,this.disposerIDGenCount=-1}add(O,v=this.genDisposerID()){return this.flush(v),this.disposers.set(v,O()),v}addEventListener(O,v,b,q,B=this.genDisposerID()){return this.add(()=>(O.addEventListener(v,b,q),()=>O.removeEventListener(v,b,q)),B),B}setTimeout(O,v,b=this.genDisposerID()){return this.add(()=>{const q=window.setTimeout(()=>{this.remove(b),O()},v);return()=>window.clearTimeout(q)},b)}setInterval(O,v,b=this.genDisposerID()){return this.add(()=>{const q=window.setInterval(O,v);return()=>window.clearInterval(q)},b)}remove(O){const v=this.disposers.get(O);return this.disposers.delete(O),v}flush(O){const v=this.remove(O);if(v)try{v()}catch(b){console.error(b)}}flushAll(){this.disposers.forEach(O=>{try{O()}catch(v){console.error(v)}}),this.disposers.clear()}genDisposerID(){const{MAX_SAFE_INTEGER:O=9007199254740991}=Number;return this.disposerIDGenCount=(this.disposerIDGenCount+1)%O,`disposer-${this.disposerIDGenCount}`}}function lS(I){return I!=null&&typeof I=="object"&&!Array.isArray(I)}function uS(I,O){let v=I.getAttributes();if(v||(I.setAttributes(O),v=I.getAttributes()),!v)throw new Error("[NetlessAppMonaco] No attributes");return lS(O)&&Object.keys(O).forEach(b=>{Object.prototype.hasOwnProperty.call(v,b)||I.updateAttributes([b],O[b])}),v}function hS(I,O,v){return Math.min(Math.max(I,O),v)}function cS(I){return typeof I=="object"&&I!==null}function dS(I,O,v){const b=O.slideState.currentSlideIndex;if(b==null)return;const q=[v,b].join("/");if(I.scenePathType(q)==="none"){I.removeScenes(v);const B=O.slideCount,ie=[];for(let k=1;k<=B;++k)ie.push({name:`${k}`});I.putScenes(v,ie)}I.setScenePath(q)}function pS(I){const{width:O,height:v,slideCount:b,slideState:q}=I,{taskId:B,url:ie}=q,k=[];for(let oe=1;oe<=b;++oe)k.push({width:O,height:v,thumbnail:`${ie}/${B}/preview/${oe}.png`,src:"ppt"});return k}class fS{constructor(O,v,b,q,B,ie,k){this.slide=O,this.onPageChanged=v,this.onTransitionStart=b,this.onTransitionEnd=q,this.onDispatchSyncEvent=B,this.initialState=ie,this.initialPage=k,this.pollCount=0,this.pollReadyState=()=>{this.isReady()?this.resolveReady(this):this.pollCount<20?(this.pollCount++,setTimeout(this.pollReadyState,500)):this.reject()},this.targetingPage=-1,O.on(zn.SLIDE_EVENTS.slideChange,v),O.on(zn.SLIDE_EVENTS.renderStart,b),O.on(zn.SLIDE_EVENTS.renderEnd,q),O.on(zn.SLIDE_EVENTS.mainSeqStepStart,b),O.on(zn.SLIDE_EVENTS.mainSeqStepEnd,q),O.on(zn.SLIDE_EVENTS.syncDispatch,B),O.on(zn.SLIDE_EVENTS.renderError,({error:oe})=>{console.warn("[Slide] render error",oe),q()}),ie?O.setSlideState(ie):O.renderSlide(k),this.ready=new Promise((oe,X)=>{this.resolveReady=oe,this.reject=X}),this.pollReadyState()}receiveSyncEvent(O){this.slide.emit(zn.SLIDE_EVENTS.syncReceive,O)}isReady(){return this.slide.slideCount>0}jumpToPage(O){!this.isReady()||(O=hS(O,1,this.slide.slideCount),O!==this.targetingPage&&(this.targetingPage=O,this.slide.renderSlide(O)))}destroy(){this.slide.destroy()}}async function mS(I,O,v,b,q,B,ie,k,oe,X){const K=new zn.Slide({anchor:I,interactive:!0,resize:!0,controller:b});return K.setResource(O,v),new fS(K,ie,k,oe,X,q,B).ready}function gS(I){const O="http://www.w3.org/2000/svg",v=document.createElementNS(O,"svg");v.setAttribute("class",`${I}-footer-icon-sidebar`),v.setAttribute("viewBox","0 0 64 64");const b=document.createElementNS(O,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M50 8H14c-3.309 0-6 2.691-6 6v36c0 3.309 2.691 6 6 6h36c3.309 0 6-2.691 6-6V14c0-3.309-2.691-6-6-6zM12 50V14c0-1.103.897-2 2-2h8v40h-8c-1.103 0-2-.897-2-2zm40 0c0 1.103-.897 2-2 2H26V12h24c1.103 0 2 .897 2 2z"),v.appendChild(b),v}function vS(I){const O="http://www.w3.org/2000/svg",v=document.createElementNS(O,"svg");v.setAttribute("class",`${I}-footer-icon-arrow-left`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(O,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M177.81 249.959L337.473 90.295c2.722-2.865 2.651-7.378-.143-10.1-2.793-2.65-7.163-2.65-9.956 0l-164.75 164.75c-2.793 2.793-2.793 7.306 0 10.1l164.75 164.75c2.865 2.722 7.378 2.65 10.099-.143 2.651-2.794 2.651-7.163 0-9.957L177.809 249.959z"),v.appendChild(b),v}function _S(I){const O="http://www.w3.org/2000/svg",v=document.createElementNS(O,"svg");v.setAttribute("class",`${I}-footer-icon-arrow-right`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(O,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M322.19 250.041L162.527 409.705c-2.722 2.865-2.651 7.378.143 10.1 2.793 2.65 7.163 2.65 9.956 0l164.75-164.75c2.793-2.793 2.793-7.306 0-10.1l-164.75-164.75c-2.865-2.722-7.378-2.65-10.099.143-2.651 2.794-2.651 7.163 0 9.957l159.664 159.736z"),v.appendChild(b),v}function yS(I){const O="http://www.w3.org/2000/svg",v=document.createElementNS(O,"svg");v.setAttribute("class",`${I}-footer-icon-play`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(O,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M418.158 257.419L174.663 413.33c-6.017 3.919-15.708 3.772-21.291-.29-2.791-2.018-4.295-4.483-4.295-7.084V94.109c0-5.65 6.883-10.289 15.271-10.289 4.298 0 8.391 1.307 11.181 3.332l242.629 155.484c6.016 3.917 6.451 10.292.649 14.491-.216.154-.432.154-.649.292zM170.621 391.288l223.116-141.301L170.71 107.753l-.089 283.535z"),v.appendChild(b),v}function xS(I){const O="http://www.w3.org/2000/svg",v=document.createElementNS(O,"svg");v.setAttribute("class",`${I}-footer-icon-pause`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(O,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M312.491 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261zM165.257 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261z"),v.appendChild(b),v}const sl=typeof window!="undefined",ty=sl&&!("onscroll"in window)||typeof navigator!="undefined"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),ny=sl&&"IntersectionObserver"in window,iy=sl&&"classList"in document.createElement("p"),ry=sl&&window.devicePixelRatio>1,bS={elements_selector:".lazy",container:ty||sl?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1},oy=I=>Object.assign({},bS,I),sy=function(I,O){let v;const b="LazyLoad::Initialized",q=new I(O);try{v=new CustomEvent(b,{detail:{instance:q}})}catch{v=document.createEvent("CustomEvent"),v.initCustomEvent(b,!1,!1,{instance:q})}window.dispatchEvent(v)},wS=(I,O)=>{if(!!O)if(!O.length)sy(I,O);else for(let v=0,b;b=O[v];v+=1)sy(I,b)},Es="src",wg="srcset",Tg="sizes",ay="poster",gc="llOriginalAttrs",Sg="loading",ly="loaded",uy="applied",TS="entered",Eg="error",hy="native",cy="data-",dy="ll-status",Yr=(I,O)=>I.getAttribute(cy+O),SS=(I,O,v)=>{var b=cy+O;if(v===null){I.removeAttribute(b);return}I.setAttribute(b,v)},vc=I=>Yr(I,dy),al=(I,O)=>SS(I,dy,O),Pp=I=>al(I,null),Mg=I=>vc(I)===null,ES=I=>vc(I)===Sg,MS=I=>vc(I)===Eg,Ag=I=>vc(I)===hy,AS=[Sg,ly,uy,Eg],PS=I=>AS.indexOf(vc(I))>=0,ga=(I,O,v,b)=>{if(!!I){if(b!==void 0){I(O,v,b);return}if(v!==void 0){I(O,v);return}I(O)}},Ru=(I,O)=>{if(iy){I.classList.add(O);return}I.className+=(I.className?" ":"")+O},Ho=(I,O)=>{if(iy){I.classList.remove(O);return}I.className=I.className.replace(new RegExp("(^|\\s+)"+O+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},CS=I=>{I.llTempImage=document.createElement("IMG")},RS=I=>{delete I.llTempImage},py=I=>I.llTempImage,Cp=(I,O)=>{if(!O)return;const v=O._observer;!v||v.unobserve(I)},IS=I=>{I.disconnect()},LS=(I,O,v)=>{O.unobserve_entered&&Cp(I,v)},Pg=(I,O)=>{!I||(I.loadingCount+=O)},OS=I=>{!I||(I.toLoadCount-=1)},fy=(I,O)=>{!I||(I.toLoadCount=O)},DS=I=>I.loadingCount>0,NS=I=>I.toLoadCount>0,my=I=>{let O=[];for(let v=0,b;b=I.children[v];v+=1)b.tagName==="SOURCE"&&O.push(b);return O},Cg=(I,O)=>{const v=I.parentNode;if(!v||v.tagName!=="PICTURE")return;my(v).forEach(O)},gy=(I,O)=>{my(I).forEach(O)},Rp=[Es],vy=[Es,ay],Ip=[Es,wg,Tg],Lp=I=>!!I[gc],_y=I=>I[gc],yy=I=>delete I[gc],_c=(I,O)=>{if(Lp(I))return;const v={};O.forEach(b=>{v[b]=I.getAttribute(b)}),I[gc]=v},FS=I=>{Lp(I)||(I[gc]={backgroundImage:I.style.backgroundImage})},BS=(I,O,v)=>{if(!v){I.removeAttribute(O);return}I.setAttribute(O,v)},yc=(I,O)=>{if(!Lp(I))return;const v=_y(I);O.forEach(b=>{BS(I,b,v[b])})},US=I=>{if(!Lp(I))return;const O=_y(I);I.style.backgroundImage=O.backgroundImage},kS=(I,O,v)=>{Ru(I,O.class_applied),al(I,uy),!!v&&(O.unobserve_completed&&Cp(I,O),ga(O.callback_applied,I,v))},xy=(I,O,v)=>{Ru(I,O.class_loading),al(I,Sg),!!v&&(Pg(v,1),ga(O.callback_loading,I,v))},ll=(I,O,v)=>{!v||I.setAttribute(O,v)},by=(I,O)=>{ll(I,Tg,Yr(I,O.data_sizes)),ll(I,wg,Yr(I,O.data_srcset)),ll(I,Es,Yr(I,O.data_src))},GS=(I,O)=>{Cg(I,v=>{_c(v,Ip),by(v,O)}),_c(I,Ip),by(I,O)},HS=(I,O)=>{_c(I,Rp),ll(I,Es,Yr(I,O.data_src))},zS=(I,O)=>{gy(I,v=>{_c(v,Rp),ll(v,Es,Yr(v,O.data_src))}),_c(I,vy),ll(I,ay,Yr(I,O.data_poster)),ll(I,Es,Yr(I,O.data_src)),I.load()},VS=(I,O,v)=>{const b=Yr(I,O.data_bg),q=Yr(I,O.data_bg_hidpi),B=ry&&q?q:b;!B||(I.style.backgroundImage=`url("${B}")`,py(I).setAttribute(Es,B),xy(I,O,v))},jS=(I,O,v)=>{const b=Yr(I,O.data_bg_multi),q=Yr(I,O.data_bg_multi_hidpi),B=ry&&q?q:b;!B||(I.style.backgroundImage=B,kS(I,O,v))},wy={IMG:GS,IFRAME:HS,VIDEO:zS},WS=(I,O)=>{const v=wy[I.tagName];!v||v(I,O)},XS=(I,O,v)=>{const b=wy[I.tagName];!b||(b(I,O),xy(I,O,v))},YS=["IMG","IFRAME","VIDEO"],qS=I=>YS.indexOf(I.tagName)>-1,Ty=(I,O)=>{O&&!DS(O)&&!NS(O)&&ga(I.callback_finish,O)},Sy=(I,O,v)=>{I.addEventListener(O,v),I.llEvLisnrs[O]=v},ZS=(I,O,v)=>{I.removeEventListener(O,v)},Rg=I=>!!I.llEvLisnrs,JS=(I,O,v)=>{Rg(I)||(I.llEvLisnrs={});const b=I.tagName==="VIDEO"?"loadeddata":"load";Sy(I,b,O),Sy(I,"error",v)},Ig=I=>{if(!Rg(I))return;const O=I.llEvLisnrs;for(let v in O){const b=O[v];ZS(I,v,b)}delete I.llEvLisnrs},Ey=(I,O,v)=>{RS(I),Pg(v,-1),OS(v),Ho(I,O.class_loading),O.unobserve_completed&&Cp(I,v)},$S=(I,O,v,b)=>{const q=Ag(O);Ey(O,v,b),Ru(O,v.class_loaded),al(O,ly),ga(v.callback_loaded,O,b),q||Ty(v,b)},KS=(I,O,v,b)=>{const q=Ag(O);Ey(O,v,b),Ru(O,v.class_error),al(O,Eg),ga(v.callback_error,O,b),q||Ty(v,b)},Lg=(I,O,v)=>{const b=py(I)||I;if(Rg(b))return;JS(b,ie=>{$S(ie,I,O,v),Ig(b)},ie=>{KS(ie,I,O,v),Ig(b)})},QS=(I,O,v)=>{CS(I),Lg(I,O,v),FS(I),VS(I,O,v),jS(I,O,v)},eE=(I,O,v)=>{Lg(I,O,v),XS(I,O,v)},Og=(I,O,v)=>{qS(I)?eE(I,O,v):QS(I,O,v)},tE=(I,O,v)=>{I.setAttribute("loading","lazy"),Lg(I,O,v),WS(I,O),al(I,hy)},My=I=>{I.removeAttribute(Es),I.removeAttribute(wg),I.removeAttribute(Tg)},nE=I=>{Cg(I,O=>{My(O)}),My(I)},Ay=I=>{Cg(I,O=>{yc(O,Ip)}),yc(I,Ip)},iE={IMG:Ay,IFRAME:I=>{yc(I,Rp)},VIDEO:I=>{gy(I,O=>{yc(O,Rp)}),yc(I,vy),I.load()}},rE=I=>{const O=iE[I.tagName];if(!O){US(I);return}O(I)},oE=(I,O)=>{Mg(I)||Ag(I)||(Ho(I,O.class_entered),Ho(I,O.class_exited),Ho(I,O.class_applied),Ho(I,O.class_loading),Ho(I,O.class_loaded),Ho(I,O.class_error))},sE=(I,O)=>{rE(I),oE(I,O),Pp(I),yy(I)},aE=(I,O,v,b)=>{!v.cancel_on_exit||!ES(I)||I.tagName==="IMG"&&(Ig(I),nE(I),Ay(I),Ho(I,v.class_loading),Pg(b,-1),Pp(I),ga(v.callback_cancel,I,O,b))},lE=(I,O,v,b)=>{const q=PS(I);al(I,TS),Ru(I,v.class_entered),Ho(I,v.class_exited),LS(I,v,b),ga(v.callback_enter,I,O,b),!q&&Og(I,v,b)},uE=(I,O,v,b)=>{Mg(I)||(Ru(I,v.class_exited),aE(I,O,v,b),ga(v.callback_exit,I,O,b))},hE=["IMG","IFRAME","VIDEO"],Py=I=>I.use_native&&"loading"in HTMLImageElement.prototype,cE=(I,O,v)=>{I.forEach(b=>{hE.indexOf(b.tagName)!==-1&&tE(b,O,v)}),fy(v,0)},dE=I=>I.isIntersecting||I.intersectionRatio>0,pE=I=>({root:I.container===document?null:I.container,rootMargin:I.thresholds||I.threshold+"px"}),fE=(I,O,v)=>{I.forEach(b=>dE(b)?lE(b.target,b,O,v):uE(b.target,b,O,v))},mE=(I,O)=>{O.forEach(v=>{I.observe(v)})},gE=(I,O)=>{IS(I),mE(I,O)},vE=(I,O)=>{!ny||Py(I)||(O._observer=new IntersectionObserver(v=>{fE(v,I,O)},pE(I)))},Cy=I=>Array.prototype.slice.call(I),Op=I=>I.container.querySelectorAll(I.elements_selector),_E=I=>Cy(I).filter(Mg),yE=I=>MS(I),xE=I=>Cy(I).filter(yE),Ry=(I,O)=>_E(I||Op(O)),bE=(I,O)=>{xE(Op(I)).forEach(b=>{Ho(b,I.class_error),Pp(b)}),O.update()},wE=(I,O)=>{!sl||window.addEventListener("online",()=>{bE(I,O)})},xc=function(I,O){const v=oy(I);this._settings=v,this.loadingCount=0,vE(v,this),wE(v,this),this.update(O)};xc.prototype={update:function(I){const O=this._settings,v=Ry(I,O);if(fy(this,v.length),ty||!ny){this.loadAll(v);return}if(Py(O)){cE(v,O,this);return}gE(this._observer,v)},destroy:function(){this._observer&&this._observer.disconnect(),Op(this._settings).forEach(I=>{yy(I)}),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(I){const O=this._settings;Ry(I,O).forEach(b=>{Cp(b,this),Og(b,O,this)})},restoreAll:function(){const I=this._settings;Op(I).forEach(O=>{sE(O,I)})}},xc.load=(I,O)=>{const v=oy(O);Og(I,v)},xc.resetStatus=I=>{Pp(I)},sl&&wS(xc,window.lazyLoadOptions);class TE{constructor({readonly:O,box:v,onNewPageIndex:b,onPlay:q}){this._pages=[],this.pageIndex=0,this.setPaused=()=>{this.$btnPlay.classList.toggle(this.wrapClassName("footer-btn-playing"),!1)},this.setPlaying=()=>{this.$btnPlay.classList.toggle(this.wrapClassName("footer-btn-playing"),!0)},this.namespace="netless-app-slide",this.isShowPreview=!1,this.isSmallBox=!1,this.sideEffect=new fr,this.readonly=O,this.box=v,this.onNewPageIndex=b,this.onPlay=q,this.render()}set pages(O){this._pages=O,this.refreshPreview(),this.refreshTotalPage(),this.refreshBtnSidebar()}get pages(){return this._pages}mount(){this.box.mountContent(this.$content),this.box.mountFooter(this.$footer)}unmount(){this.$content.remove(),this.$footer.remove()}setReadonly(O){this.readonly!==O&&(this.readonly=O,this.$content.classList.toggle(this.wrapClassName("readonly"),O),this.$footer.classList.toggle(this.wrapClassName("readonly"),O),this.$pageNumberInput.disabled=O)}destroy(){this.sideEffect.flushAll(),this.unmount()}setPageIndex(O){Number.isNaN(O)||(this.pageIndex=O,this.$pageNumberInput.value=String(O+1))}refreshTotalPage(){this.pages.length?this.$totalPage.textContent=" / "+this.pages.length:this.$totalPage.textContent=""}setSmallBox(O){this.isSmallBox!==O&&(this.isSmallBox=O,this.$footer.classList.toggle(this.wrapClassName("float-footer"),O))}render(){return this.renderContent(),this.renderFooter(),this.$content}renderContent(){if(!this.$content){const O=document.createElement("div");O.className=this.wrapClassName("content"),this.$content=O,this.readonly&&O.classList.add(this.wrapClassName("readonly")),O.appendChild(this.renderPreviewMask()),O.appendChild(this.renderPreview())}return this.$content}renderPreview(){if(!this.$preview){const O=document.createElement("div");O.className=this.wrapClassName("preview")+" tele-fancy-scrollbar",this.$preview=O,this.refreshPreview(),this.sideEffect.addEventListener(O,"click",v=>{var q;if(this.readonly)return;const b=(q=v.target.dataset)==null?void 0:q.pageIndex;b&&(v.preventDefault(),v.stopPropagation(),v.stopImmediatePropagation(),this.onNewPageIndex(Number(b)),this.togglePreview(!1))})}return this.$preview}refreshPreview(){const{$preview:O}=this,v=this.wrapClassName("preview-page"),b=this.wrapClassName("preview-page-name");for(;O.firstChild;)O.firstChild.remove();this.pages.forEach((q,B)=>{var le;const ie=(le=q.thumbnail)!=null?le:q.src.startsWith("ppt")?void 0:q.src;if(!ie)return;const k=String(B),oe=document.createElement("a");oe.className=v+" "+this.wrapClassName(`preview-page-${B}`),oe.setAttribute("href","#"),oe.dataset.pageIndex=k;const X=document.createElement("span");X.className=b,X.textContent=String(B+1),X.dataset.pageIndex=k;const K=document.createElement("img");K.width=q.width,K.height=q.height,K.dataset.src=ie,K.dataset.pageIndex=k,oe.appendChild(K),oe.appendChild(X),O.appendChild(oe)}),this.sideEffect.add(()=>{const q=new xc({container:this.$preview,elements_selector:`.${this.wrapClassName("preview-page>img")}`});return()=>q.destroy()},"preview-lazyload")}renderPreviewMask(){return this.$previewMask||(this.$previewMask=document.createElement("div"),this.$previewMask.className=this.wrapClassName("preview-mask"),this.sideEffect.addEventListener(this.$previewMask,"click",O=>{this.readonly||O.target===this.$previewMask&&this.togglePreview(!1)})),this.$previewMask}refreshBtnSidebar(){this.$btnSidebar.style.display=this.pages.length>0?"":"none"}renderFooter(){if(!this.$footer){const O=document.createElement("div");O.className=this.wrapClassName("footer"),this.$footer=O,this.readonly&&O.classList.add(this.wrapClassName("readonly")),this.isSmallBox&&O.classList.add(this.wrapClassName("float-footer"));const v=this.renderFooterBtn("btn-sidebar",gS(this.namespace));this.sideEffect.addEventListener(v,"click",()=>{this.readonly||this.togglePreview()}),this.$btnSidebar=v,this.$btnSidebar.style.display="none",this.$footer.appendChild(v);const b=document.createElement("div");b.className=this.wrapClassName("page-jumps");const q=this.renderFooterBtn("btn-page-back",vS(this.namespace));if(this.sideEffect.addEventListener(q,"click",()=>{this.readonly||this.onNewPageIndex(this.pageIndex-1)}),b.appendChild(q),this.onPlay){const X=this.renderFooterBtn("btn-page-play",yS(this.namespace),xS(this.namespace));this.$btnPlay=X,this.sideEffect.addEventListener(X,"click",()=>{this.readonly||(this.setPlaying(),this.onPlay&&this.onPlay())}),b.appendChild(X)}const B=this.renderFooterBtn("btn-page-next",_S(this.namespace));this.sideEffect.addEventListener(B,"click",()=>{this.readonly||this.onNewPageIndex(this.pageIndex+1)}),b.appendChild(B);const ie=document.createElement("div");ie.className=this.wrapClassName("page-number");const k=document.createElement("input");k.className=this.wrapClassName("page-number-input"),k.value=String(this.pageIndex+1),this.readonly&&(k.disabled=!0),this.$pageNumberInput=k,this.sideEffect.addEventListener(k,"change",()=>{this.readonly||k.value&&this.onNewPageIndex(Number(k.value)-1)});const oe=document.createElement("span");this.$totalPage=oe,ie.appendChild(k),ie.appendChild(oe),this.$footer.appendChild(b),this.$footer.appendChild(ie)}return this.$footer}renderFooterBtn(O,v,b){const q=document.createElement("button");return q.className=this.wrapClassName("footer-btn")+" "+this.wrapClassName(O),q.appendChild(v),b&&q.appendChild(b),q}togglePreview(O){if(this.isShowPreview=O!=null?O:!this.isShowPreview,this.$content.classList.toggle(this.wrapClassName("preview-active"),this.isShowPreview),this.isShowPreview){const v=this.$preview.querySelector("."+this.wrapClassName(`preview-page-${this.pageIndex}`));v&&this.$preview.scrollTo({top:v.offsetTop-16})}}wrapClassName(O){return`${this.namespace}-${O}`}}const SE=new Set(["clicker","selector"]);class EE{constructor({box:O,view:v,mountSlideController:b,mountWhiteboard:q}){this.scaleDocsToFit=()=>{if(this.slideController){const{width:B,height:ie}=this.slideController.slide;this.whiteboardView.moveCameraToContain({originX:-B/2,originY:-ie/2,width:B,height:ie,animationMode:"immediately"})}},this.onPlay=()=>{this.slideController&&this.slideController.slide.nextStep()},this.onNewPageIndex=B=>{this.slideController&&this.slideController.jumpToPage(B+1)},this.sideEffect=new fr,this.namespace="netless-app-slide",this.box=O,this.whiteboardView=v,this.mountSlideController=b,this.mountWhiteboard=q,this.viewer=new TE({box:O,readonly:O.readonly,onNewPageIndex:this.onNewPageIndex,onPlay:this.onPlay}),this.render()}render(){this.viewer.$content.appendChild(this.renderSlideContainer()),this.viewer.$content.appendChild(this.renderWhiteboardView()),this.sideEffect.addEventListener(window,"keydown",O=>{if(this.box.focus&&this.slideController)switch(O.key){case"ArrowUp":case"ArrowLeft":{this.slideController.slide.prevStep();break}case"ArrowRight":case"ArrowDown":{this.slideController.slide.nextStep();break}}})}renderSlideContainer(){if(!this.$slide){const O=document.createElement("div");O.className=this.wrapClassName("slide"),O.dataset.appKind="Slide",this.$slide=O}return this.$slide}renderWhiteboardView(){return this.$whiteboardView||(this.$whiteboardView=document.createElement("div"),this.$whiteboardView.className=this.wrapClassName("wb-view"),this.mountWhiteboard(this.$whiteboardView)),this.$whiteboardView}async mount(){return this.viewer.mount(),this.slideController=await this.mountSlideController(this.$slide),this.viewer.pages=pS(this.slideController.slide),this.viewer.setPageIndex(this.getPageIndex(this.slideController)),this.scaleDocsToFit(),this.sideEffect.add(()=>(this.whiteboardView.callbacks.on("onSizeUpdated",this.scaleDocsToFit),()=>this.whiteboardView.callbacks.off("onSizeUpdated",this.scaleDocsToFit))),this}getPageIndex(O){return(O.slide.slideState.currentSlideIndex||1)-1}unmount(){return this.slideController&&this.slideController.destroy(),this.viewer.unmount(),this}setReadonly(O){this.viewer.setReadonly(O)}destroy(){this.sideEffect.flushAll(),this.unmount(),this.viewer.destroy()}toggleClickThrough(O){this.$whiteboardView.style.pointerEvents=!O||SE.has(O)?"none":"auto"}wrapClassName(O){return`${this.namespace}-${O}`}}var ME=`.netless-app-slide-content{position:relative;height:100%;overflow:hidden}.netless-app-slide-preview-mask{display:none;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%}.netless-app-slide-preview{display:flex;flex-direction:column;align-items:center;position:absolute;z-index:300;top:0;left:0;width:33%;max-width:200px;height:100%;padding-top:10px;transform:translate(-100%);background:rgba(237,237,240,.9);box-shadow:inset -1px 0 #0000001c;transition:transform .4s}.netless-app-slide-preview-active .netless-app-slide-preview-mask{display:block}.netless-app-slide-preview-active .netless-app-slide-preview{transform:translate(0)}.netless-app-slide-preview-page{position:relative;display:block;width:55%;margin-bottom:10px;font-size:0;color:transparent;outline:none;border:7px solid transparent;border-radius:4px;transition:border-color .3s;user-select:none}.netless-app-slide-preview-page:hover,.netless-app-slide-preview-page.netless-app-slide-preview-page-active{border-color:#444e601a}.netless-app-slide-preview-page>img{width:100%;height:auto;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);border-radius:1px;background-color:#fff;box-shadow:0 2px 8px #0000004d}.netless-app-slide-preview-page-name{position:absolute;top:1px;left:-10px;transform:translate(-100%);text-align:right;font-size:12px;color:#5f5f5f;user-select:none}.netless-app-slide-footer{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;border-top:1px solid #eeeef7;color:#191919}.netless-app-slide-float-footer{width:100%;min-height:26px;position:absolute;left:0;bottom:0;z-index:2000;background:rgba(249,249,252,.9);transition:opacity .4s}.netless-app-slide-footer-btn{box-sizing:border-box;width:26px;height:26px;font-size:0;margin:0;padding:3px;border:none;border-radius:1px;outline:none;color:currentColor;background:transparent;transition:background .4s;cursor:pointer;user-select:none}.netless-app-slide-footer-btn:hover{background:rgba(237,237,240,.9)}.netless-app-slide-footer-btn>svg{width:100%;height:100%}.netless-app-slide-footer-btn>svg:nth-of-type(2){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(1){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(2){display:initial}.netless-app-slide-footer-btn~.netless-app-slide-footer-btn{margin-left:15px}.netless-app-slide-page-jumps{flex:1;display:flex;justify-content:center;align-items:center}.netless-app-slide-page-number{margin-left:auto;font-size:13px;user-select:none;white-space:nowrap;word-break:keep-all}.netless-app-slide-page-number-input{border:none;outline:none;width:1.5em;text-align:right;border-radius:2px;color:currentColor;background:transparent;transition:background .4s;user-select:text}.netless-app-slide-page-number-input:hover,.netless-app-slide-page-number-input:focus,.netless-app-slide-page-number-input:active{background:#fff;box-shadow:#63636333 0 2px 8px}.netless-app-slide-readonly .netless-app-slide-footer-btn{cursor:not-allowed}.netless-app-slide-readonly .netless-app-slide-footer-btn:hover{background:transparent}.netless-app-slide-readonly .netless-app-slide-page-number-input{cursor:not-allowed}.netless-app-slide-readonly .netless-app-slide-page-number-input:hover,.netless-app-slide-readonly .netless-app-slide-page-number-input:focus,.netless-app-slide-readonly .netless-app-slide-page-number-input:active{background:transparent;box-shadow:none}.netless-app-slide-readonly .netless-app-slide-page-number-input:disabled{color:inherit}.netless-app-slide-readonly.netless-app-slide-float-footer{display:none}.netless-app-slide-wb-view{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;overflow:hidden}.netless-app-slide-slide{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.netless-app-slide-slide canvas{transform:scale(var(--netless-app-slide-scale, 1))}
5824
- `;const AE={kind:"Slide",async setup(I){const O=I.getBox(),v=I.getView(),b=I.getRoom(),q=I.getDisplayer(),B=uS(I,{taskId:"",url:"",state:null});if(!B.taskId||!B.url)throw new Error("[Slide] no taskId or url");if(!v)throw new Error("[Slide] no view, please set scenePath on addApp()");O.mountStyles(ME);const ie=new fr,k=I.getInitScenePath(),oe=!1,X=`channel-${I.appId}`;let K;const le=L=>{console.log("[Slide] page to",L),I.getIsWritable()&&b&&K&&(dS(b,K.slide,k),A.viewer.setPageIndex(L-1))},Ee=()=>{A.viewer.setPlaying()},Xe=()=>{A.viewer.setPaused()},Fe=L=>{I.getIsWritable()&&K&&(I.updateAttributes(["state"],K.slide.slideState),b&&b.dispatchMagixEvent(X,{type:zn.SLIDE_EVENTS.syncDispatch,event:L}))};function S(L){const{slide:j}=L;j.on(zn.SLIDE_EVENTS.syncDispatch,D=>{I.updateAttributes(["state"],j.slideState),b&&b.dispatchMagixEvent(X,{type:zn.SLIDE_EVENTS.syncDispatch,payload:D})}),ie.add(()=>{const D=z=>{if(L&&z.event===X&&z.authorId!==q.observerId&&cS(z.payload)){const{type:W,payload:ee}=z.payload;W===zn.SLIDE_EVENTS.syncDispatch&&L.receiveSyncEvent(ee)}};return q.addMagixEventListener(X,D),()=>q.removeMagixEventListener(X,D)})}const A=new EE({box:O,view:v,mountSlideController:async L=>(K=await mS(L,B.taskId,B.url,oe,JSON.parse(JSON.stringify(B.state)),q.state.sceneState.index+1,le,Ee,Xe,Fe),S(K),K),mountWhiteboard:L=>I.mountView(L)});try{await A.mount()}catch{console.log("[Slide]: destroy by error"),ie.flushAll(),A.destroy();return}b&&(A.toggleClickThrough(b.state.memberState.currentApplianceName),ie.add(()=>{const L=j=>{j.memberState&&A.toggleClickThrough(j.memberState.currentApplianceName)};return b.callbacks.on("onRoomStateChanged",L),()=>b.callbacks.off("onRoomStateChanged",L)})),O.events.on("readonly",L=>{A.setReadonly(L)}),I.emitter.on("destroy",()=>{console.log("[Slide]: destroy"),ie.flushAll(),A.destroy()})}};return Xr.default=AE,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr[Symbol.toStringTag]="Module",Xr}({});})();
5823
+ `));var wp=function(){try{return!!window.localStorage}catch{return!1}}(),yg=void 0,zT=!0,fc=void 0,q_=!1,VT=[],Ln=function r(e){var t=this,n=e||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),Pe.addClass(this.domElement,"dg"),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],n=Ke.defaults(n,{closeOnTop:!1,autoPlace:!0,width:r.DEFAULT_WIDTH}),n=Ke.defaults(n,{resizable:n.autoPlace,hideable:n.autoPlace}),Ke.isUndefined(n.load)?n.load={preset:"Default"}:n.preset&&(n.load.preset=n.preset),Ke.isUndefined(n.parent)&&n.hideable&&VT.push(this),n.resizable=Ke.isUndefined(n.parent)&&n.resizable,n.autoPlace&&Ke.isUndefined(n.scrollable)&&(n.scrollable=!0);var i,o=wp&&localStorage.getItem(mc(this,"isLocal"))==="true",s=void 0,a=void 0;if(Object.defineProperties(this,{parent:{get:function(){return n.parent}},scrollable:{get:function(){return n.scrollable}},autoPlace:{get:function(){return n.autoPlace}},closeOnTop:{get:function(){return n.closeOnTop}},preset:{get:function(){return t.parent?t.getRoot().preset:n.load.preset},set:function(c){t.parent?t.getRoot().preset=c:n.load.preset=c,function(d){for(var f=0;f<d.__preset_select.length;f++)d.__preset_select[f].value===d.preset&&(d.__preset_select.selectedIndex=f)}(this),t.revert()}},width:{get:function(){return n.width},set:function(c){n.width=c,K_(t,c)}},name:{get:function(){return n.name},set:function(c){n.name=c,a&&(a.innerHTML=n.name)}},closed:{get:function(){return n.closed},set:function(c){n.closed=c,n.closed?Pe.addClass(t.__ul,r.CLASS_CLOSED):Pe.removeClass(t.__ul,r.CLASS_CLOSED),this.onResize(),t.__closeButton&&(t.__closeButton.innerHTML=c?r.TEXT_OPEN:r.TEXT_CLOSED)}},load:{get:function(){return n.load}},useLocalStorage:{get:function(){return o},set:function(c){wp&&(o=c,c?Pe.bind(window,"unload",s):Pe.unbind(window,"unload",s),localStorage.setItem(mc(t,"isLocal"),c))}}}),Ke.isUndefined(n.parent)){if(this.closed=n.closed||!1,Pe.addClass(this.domElement,r.CLASS_MAIN),Pe.makeSelectable(this.domElement,!1),wp&&o){t.useLocalStorage=!0;var l=localStorage.getItem(mc(this,"gui"));l&&(n.load=JSON.parse(l))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=r.TEXT_CLOSED,Pe.addClass(this.__closeButton,r.CLASS_CLOSE_BUTTON),n.closeOnTop?(Pe.addClass(this.__closeButton,r.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(Pe.addClass(this.__closeButton,r.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),Pe.bind(this.__closeButton,"click",function(){t.closed=!t.closed})}else{n.closed===void 0&&(n.closed=!0);var u=document.createTextNode(n.name);Pe.addClass(u,"controller-name"),a=Z_(t,u),Pe.addClass(this.__ul,r.CLASS_CLOSED),Pe.addClass(a,"title"),Pe.bind(a,"click",function(c){return c.preventDefault(),t.closed=!t.closed,!1}),n.closed||(this.closed=!1)}n.autoPlace&&(Ke.isUndefined(n.parent)&&(zT&&(fc=document.createElement("div"),Pe.addClass(fc,"dg"),Pe.addClass(fc,r.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(fc),zT=!1),fc.appendChild(this.domElement),Pe.addClass(this.domElement,r.CLASS_AUTO_PLACE)),this.parent||K_(t,n.width)),this.__resizeHandler=function(){t.onResizeDebounced()},Pe.bind(window,"resize",this.__resizeHandler),Pe.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),Pe.bind(this.__ul,"transitionend",this.__resizeHandler),Pe.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),n.resizable&&qC(this),s=function(){wp&&localStorage.getItem(mc(t,"isLocal"))==="true"&&localStorage.setItem(mc(t,"gui"),JSON.stringify(t.getSaveObject()))},this.saveToLocalStorageIfPossible=s,n.parent||((i=t.getRoot()).width+=1,Ke.defer(function(){i.width-=1}))};function Z_(r,e,t){var n=document.createElement("li");return e&&n.appendChild(e),t?r.__ul.insertBefore(n,t):r.__ul.appendChild(n),r.onResize(),n}function jT(r){Pe.unbind(window,"resize",r.__resizeHandler),r.saveToLocalStorageIfPossible&&Pe.unbind(window,"unload",r.saveToLocalStorageIfPossible)}function J_(r,e){var t=r.__preset_select[r.__preset_select.selectedIndex];t.innerHTML=e?t.value+"*":t.value}function WT(r,e){var t=r.getRoot(),n=t.__rememberedObjects.indexOf(e.object);if(n!==-1){var i=t.__rememberedObjectIndecesToControllers[n];if(i===void 0&&(i={},t.__rememberedObjectIndecesToControllers[n]=i),i[e.property]=e,t.load&&t.load.remembered){var o=t.load.remembered,s=void 0;if(o[r.preset])s=o[r.preset];else{if(!o.Default)return;s=o.Default}if(s[n]&&s[n][e.property]!==void 0){var a=s[n][e.property];e.initialValue=a,e.setValue(a)}}}}function Tp(r,e,t,n){if(e[t]===void 0)throw new Error('Object "'+e+'" has no property "'+t+'"');var i=void 0;if(n.color)i=new Y_(e,t);else{var o=[e,t].concat(n.factoryArgs);i=jC.apply(r,o)}n.before instanceof Pu&&(n.before=n.before.__li),WT(r,i),Pe.addClass(i.domElement,"c");var s=document.createElement("span");Pe.addClass(s,"property-name"),s.innerHTML=i.property;var a=document.createElement("div");a.appendChild(s),a.appendChild(i.domElement);var l=Z_(r,a,n.before);return Pe.addClass(l,Ln.CLASS_CONTROLLER_ROW),i instanceof Y_?Pe.addClass(l,"color"):Pe.addClass(l,BC(i.getValue())),function(u,c,d){if(d.__li=c,d.__gui=u,Ke.extend(d,{options:function(g){if(arguments.length>1){var _=d.__li.nextElementSibling;return d.remove(),Tp(u,d.object,d.property,{before:_,factoryArgs:[Ke.toArray(arguments)]})}if(Ke.isArray(g)||Ke.isObject(g)){var y=d.__li.nextElementSibling;return d.remove(),Tp(u,d.object,d.property,{before:y,factoryArgs:[g]})}},name:function(g){return d.__li.firstElementChild.firstElementChild.innerHTML=g,d},listen:function(){return d.__gui.listen(d),d},remove:function(){return d.__gui.remove(d),d}}),d instanceof X_){var f=new _g(d.object,d.property,{min:d.__min,max:d.__max,step:d.__step});Ke.each(["updateDisplay","onChange","onFinishChange","step","min","max"],function(g){var _=d[g],y=f[g];d[g]=f[g]=function(){var w=Array.prototype.slice.call(arguments);return y.apply(f,w),_.apply(d,w)}}),Pe.addClass(c,"has-slider"),d.domElement.insertBefore(f.domElement,d.domElement.firstElementChild)}else if(d instanceof _g){var m=function(g){if(Ke.isNumber(d.__min)&&Ke.isNumber(d.__max)){var _=d.__li.firstElementChild.firstElementChild.innerHTML,y=d.__gui.__listening.indexOf(d)>-1;d.remove();var w=Tp(u,d.object,d.property,{before:d.__li.nextElementSibling,factoryArgs:[d.__min,d.__max,d.__step]});return w.name(_),y&&w.listen(),w}return g};d.min=Ke.compose(m,d.min),d.max=Ke.compose(m,d.max)}else d instanceof FT?(Pe.bind(c,"click",function(){Pe.fakeEvent(d.__checkbox,"click")}),Pe.bind(d.__checkbox,"click",function(g){g.stopPropagation()})):d instanceof GT?(Pe.bind(c,"click",function(){Pe.fakeEvent(d.__button,"click")}),Pe.bind(c,"mouseover",function(){Pe.addClass(d.__button,"hover")}),Pe.bind(c,"mouseout",function(){Pe.removeClass(d.__button,"hover")})):d instanceof Y_&&(Pe.addClass(c,"color"),d.updateDisplay=Ke.compose(function(g){return c.style.borderLeftColor=d.__color.toString(),g},d.updateDisplay),d.updateDisplay());d.setValue=Ke.compose(function(g){return u.getRoot().__preset_select&&d.isModified()&&J_(u.getRoot(),!0),g},d.setValue)}(r,l,i),r.__controllers.push(i),i}function mc(r,e){return document.location.href+"."+e}function $_(r,e,t){var n=document.createElement("option");n.innerHTML=e,n.value=e,r.__preset_select.appendChild(n),t&&(r.__preset_select.selectedIndex=r.__preset_select.length-1)}function XT(r,e){e.style.display=r.useLocalStorage?"block":"none"}function YC(r){var e=r.__save_row=document.createElement("li");Pe.addClass(r.domElement,"has-save"),r.__ul.insertBefore(e,r.__ul.firstChild),Pe.addClass(e,"save-row");var t=document.createElement("span");t.innerHTML="&nbsp;",Pe.addClass(t,"button gears");var n=document.createElement("span");n.innerHTML="Save",Pe.addClass(n,"button"),Pe.addClass(n,"save");var i=document.createElement("span");i.innerHTML="New",Pe.addClass(i,"button"),Pe.addClass(i,"save-as");var o=document.createElement("span");o.innerHTML="Revert",Pe.addClass(o,"button"),Pe.addClass(o,"revert");var s=r.__preset_select=document.createElement("select");if(r.load&&r.load.remembered?Ke.each(r.load.remembered,function(c,d){$_(r,d,d===r.preset)}):$_(r,"Default",!1),Pe.bind(s,"change",function(){for(var c=0;c<r.__preset_select.length;c++)r.__preset_select[c].innerHTML=r.__preset_select[c].value;r.preset=this.value}),e.appendChild(s),e.appendChild(t),e.appendChild(n),e.appendChild(i),e.appendChild(o),wp){var a=document.getElementById("dg-local-explain"),l=document.getElementById("dg-local-storage");document.getElementById("dg-save-locally").style.display="block",localStorage.getItem(mc(0,"isLocal"))==="true"&&l.setAttribute("checked","checked"),XT(r,a),Pe.bind(l,"change",function(){r.useLocalStorage=!r.useLocalStorage,XT(r,a)})}var u=document.getElementById("dg-new-constructor");Pe.bind(u,"keydown",function(c){!c.metaKey||c.which!==67&&c.keyCode!==67||yg.hide()}),Pe.bind(t,"click",function(){u.innerHTML=JSON.stringify(r.getSaveObject(),void 0,2),yg.show(),u.focus(),u.select()}),Pe.bind(n,"click",function(){r.save()}),Pe.bind(i,"click",function(){var c=prompt("Enter a new preset name.");c&&r.saveAs(c)}),Pe.bind(o,"click",function(){r.revert()})}function qC(r){var e=void 0;function t(o){return o.preventDefault(),r.width+=e-o.clientX,r.onResize(),e=o.clientX,!1}function n(){Pe.removeClass(r.__closeButton,Ln.CLASS_DRAG),Pe.unbind(window,"mousemove",t),Pe.unbind(window,"mouseup",n)}function i(o){return o.preventDefault(),e=o.clientX,Pe.addClass(r.__closeButton,Ln.CLASS_DRAG),Pe.bind(window,"mousemove",t),Pe.bind(window,"mouseup",n),!1}r.__resize_handle=document.createElement("div"),Ke.extend(r.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"}),Pe.bind(r.__resize_handle,"mousedown",i),Pe.bind(r.__closeButton,"mousedown",i),r.domElement.insertBefore(r.__resize_handle,r.domElement.firstElementChild)}function K_(r,e){r.domElement.style.width=e+"px",r.__save_row&&r.autoPlace&&(r.__save_row.style.width=e+"px"),r.__closeButton&&(r.__closeButton.style.width=e+"px")}function xg(r,e){var t={};return Ke.each(r.__rememberedObjects,function(n,i){var o={},s=r.__rememberedObjectIndecesToControllers[i];Ke.each(s,function(a,l){o[l]=e?a.initialValue:a.getValue()}),t[i]=o}),t}Ln.toggleHide=function(){q_=!q_,Ke.each(VT,function(r){r.domElement.style.display=q_?"none":""})},Ln.CLASS_AUTO_PLACE="a",Ln.CLASS_AUTO_PLACE_CONTAINER="ac",Ln.CLASS_MAIN="main",Ln.CLASS_CONTROLLER_ROW="cr",Ln.CLASS_TOO_TALL="taller-than-window",Ln.CLASS_CLOSED="closed",Ln.CLASS_CLOSE_BUTTON="close-button",Ln.CLASS_CLOSE_TOP="close-top",Ln.CLASS_CLOSE_BOTTOM="close-bottom",Ln.CLASS_DRAG="drag",Ln.DEFAULT_WIDTH=245,Ln.TEXT_CLOSED="Close Controls",Ln.TEXT_OPEN="Open Controls",Ln._keydownHandler=function(r){document.activeElement.type==="text"||r.which!==72&&r.keyCode!==72||Ln.toggleHide()},Pe.bind(window,"keydown",Ln._keydownHandler,!1),Ke.extend(Ln.prototype,{add:function(r,e){return Tp(this,r,e,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(r,e){return Tp(this,r,e,{color:!0})},remove:function(r){this.__ul.removeChild(r.__li),this.__controllers.splice(this.__controllers.indexOf(r),1);var e=this;Ke.defer(function(){e.onResize()})},destroy:function(){if(this.parent)throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");this.autoPlace&&fc.removeChild(this.domElement);var r=this;Ke.each(this.__folders,function(e){r.removeFolder(e)}),Pe.unbind(window,"keydown",Ln._keydownHandler,!1),jT(this)},addFolder:function(r){if(this.__folders[r]!==void 0)throw new Error('You already have a folder in this GUI by the name "'+r+'"');var e={name:r,parent:this};e.autoPlace=this.autoPlace,this.load&&this.load.folders&&this.load.folders[r]&&(e.closed=this.load.folders[r].closed,e.load=this.load.folders[r]);var t=new Ln(e);this.__folders[r]=t;var n=Z_(this,t.domElement);return Pe.addClass(n,"folder"),t},removeFolder:function(r){this.__ul.removeChild(r.domElement.parentElement),delete this.__folders[r.name],this.load&&this.load.folders&&this.load.folders[r.name]&&delete this.load.folders[r.name],jT(r);var e=this;Ke.each(r.__folders,function(t){r.removeFolder(t)}),Ke.defer(function(){e.onResize()})},open:function(){this.closed=!1},close:function(){this.closed=!0},hide:function(){this.domElement.style.display="none"},show:function(){this.domElement.style.display=""},onResize:function(){var r=this.getRoot();if(r.scrollable){var e=Pe.getOffset(r.__ul).top,t=0;Ke.each(r.__ul.childNodes,function(n){r.autoPlace&&n===r.__save_row||(t+=Pe.getHeight(n))}),window.innerHeight-e-20<t?(Pe.addClass(r.domElement,Ln.CLASS_TOO_TALL),r.__ul.style.height=window.innerHeight-e-20+"px"):(Pe.removeClass(r.domElement,Ln.CLASS_TOO_TALL),r.__ul.style.height="auto")}r.__resize_handle&&Ke.defer(function(){r.__resize_handle.style.height=r.__ul.offsetHeight+"px"}),r.__closeButton&&(r.__closeButton.style.width=r.width+"px")},onResizeDebounced:Ke.debounce(function(){this.onResize()},50),remember:function(){if(Ke.isUndefined(yg)&&((yg=new XC).domElement.innerHTML=VC),this.parent)throw new Error("You can only call remember on a top level GUI.");var r=this;Ke.each(Array.prototype.slice.call(arguments),function(e){r.__rememberedObjects.length===0&&YC(r),r.__rememberedObjects.indexOf(e)===-1&&r.__rememberedObjects.push(e)}),this.autoPlace&&K_(this,this.width)},getRoot:function(){for(var r=this;r.parent;)r=r.parent;return r},getSaveObject:function(){var r=this.load;return r.closed=this.closed,this.__rememberedObjects.length>0&&(r.preset=this.preset,r.remembered||(r.remembered={}),r.remembered[this.preset]=xg(this)),r.folders={},Ke.each(this.__folders,function(e,t){r.folders[t]=e.getSaveObject()}),r},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=xg(this),J_(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(r){this.load.remembered||(this.load.remembered={},this.load.remembered.Default=xg(this,!0)),this.load.remembered[r]=xg(this),this.preset=r,$_(this,r,!0),this.saveToLocalStorageIfPossible()},revert:function(r){Ke.each(this.__controllers,function(e){this.getRoot().load.remembered?WT(r||this.getRoot(),e):e.setValue(e.initialValue),e.__onFinishChange&&e.__onFinishChange.call(e,e.getValue())},this),Ke.each(this.__folders,function(e){e.revert(e)}),r||J_(this.getRoot(),!1)},listen:function(r){var e=this.__listening.length===0;this.__listening.push(r),e&&function t(n){n.length!==0&&WC.call(window,function(){t(n)}),Ke.each(n,function(i){i.updateDisplay()})}(this.__listening)},updateDisplay:function(){Ke.each(this.__controllers,function(r){r.updateDisplay()}),Ke.each(this.__folders,function(r){r.updateDisplay()})}});var ZC=Ln,JC=function(){function r(e){this.runTime={fps:0,resolution:""},this.target=e.target,this.data=e.params,this.player=e.player,this.gui=this.createControllerGUI(),this.createStats(),this.addEventListener()}return r.prototype.createStats=function(){var e=this;setInterval(function(){e.controller.runTimeFps.setValue(e.player.runtime.fps),e.controller.runTimeResolution.setValue(e.player.view.width+"*"+e.player.view.height)},500)},r.prototype.createControllerGUI=function(){var e,t,n,i,o,s,a=new ZC({autoPlace:!0,closed:!0});return a.domElement.style.opacity=".6",a.domElement.style.transformOrigin="100% 0",a.domElement.style.transform="scale(1.4)",this.target.appendChild(a.domElement),a.domElement.style.position="absolute",a.domElement.style.right="0",a.domElement.style.top="0",a.domElement.style.zIndex="2",this.controller={runTimeFps:a.add({FPS:0},"FPS",0),runTimeResolution:a.add({\u5206\u8FA8\u7387:""},"\u5206\u8FA8\u7387",""),autoFps:a.add({\u81EA\u52A8fps:(e=this.data.autoFPS)===null||e===void 0||e},"\u81EA\u52A8fps",!0),autoResolution:a.add({\u81EA\u52A8\u5206\u8FA8\u7387:(t=this.data.autoResolution)!==null&&t!==void 0&&t},"\u81EA\u52A8\u5206\u8FA8\u7387",!0),moreCalculation:a.add({\u989D\u5916\u8BA1\u7B97:0},"\u989D\u5916\u8BA1\u7B97",0,100),minFPS:a.add({\u6700\u4F4Efps:(n=this.data.minFPS)!==null&&n!==void 0?n:40},"\u6700\u4F4Efps",0,60),maxFPS:a.add({\u6700\u9AD8fps:(i=this.data.maxFPS)!==null&&i!==void 0?i:50},"\u6700\u9AD8fps",0,60),resolution:a.add({\u76EE\u6807\u5206\u8FA8\u500D\u7387:(o=this.data.resolution)!==null&&o!==void 0?o:window.devicePixelRatio},"\u76EE\u6807\u5206\u8FA8\u500D\u7387",.5,4),minResolution:a.add({\u6700\u5C0F\u5206\u8FA8\u500D\u7387:(s=this.data.minResolution)!==null&&s!==void 0?s:1},"\u6700\u5C0F\u5206\u8FA8\u500D\u7387",.5,4)},this.controller.runTimeFps.disabled=!0,this.controller.runTimeResolution.disabled=!0,a},r.prototype.addEventListener=function(){var e,t=this;this.controller.autoFps.onChange(function(n){t.data.autoFPS=n,t.player.updateConfig(t.data)}),this.controller.maxFPS.onChange(function(n){t.data.maxFPS=n,t.player.updateConfig(t.data)}),this.controller.minFPS.onChange(function(n){t.data.minFPS=n,t.player.updateConfig(t.data)}),this.controller.autoResolution.onChange(function(n){t.data.autoResolution=n,t.player.updateConfig(t.data)}),this.controller.minResolution.onChange(function(n){t.data.minResolution=n,t.player.updateConfig(t.data)}),this.controller.resolution.onChange(function(n){t.data.resolution=n,t.player.updateConfig(t.data)}),this.controller.moreCalculation.onChange(function(n){e&&t.player.app.ticker.remove(e),n>0&&(e=function(){for(var i="";i.length<n;)i+=Math.random().toString(32).substr(2);lg()(i)},t.player.app.ticker.add(e))})},r}(),$C=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])})(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),YT=function(r,e,t,n){return new(t||(t=Promise))(function(i,o){function s(u){try{l(n.next(u))}catch(c){o(c)}}function a(u){try{l(n.throw(u))}catch(c){o(c)}}function l(u){var c;u.done?i(u.value):(c=u.value,c instanceof t?c:new t(function(d){d(c)})).then(s,a)}l((n=n.apply(r,e||[])).next())})},qT=function(r,e){var t,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,n=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!((i=i.length>0&&i[i.length-1])||c[0]!==6&&c[0]!==2)){s=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){s.label=c[1];break}if(c[0]===6&&s.label<i[1]){s.label=i[1],i=c;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(c);break}i[2]&&s.ops.pop(),s.trys.pop();continue}c=e.call(r,s)}catch(d){c=[6,d],n=0}finally{t=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([l,u])}}},KC=window.ResizeObserver||PC,dr={syncDispatch:"syncDispatch",syncReceive:"syncReceive",renderStart:"renderStart",renderEnd:"renderEnd",renderError:"renderError",slideChange:"slideChange",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",animateStart:"animateStart",animateEnd:"animateEnd"},QC=function(r){function e(t){var n=r.call(this)||this;return n.__slideState={taskId:"",url:"",currentSlideIndex:-1,mainSeqStep:-1,mainSeqState:null,appliedInteractiveSeqIds:[]},n.resize=!1,n.isAnimating=!1,n.renderingTaskManager=new LC,n.isLoading=!1,n.interactive=!0,n.player=new vC,n.frameWidth=1,n.frameHeight=1,n.frame=document.createElement("div"),n.frameResizeObserver=new KC(function(i){return n.frameResizeHandler(i)}),n.anchor=t.anchor,n.resize=t.resize||!1,n.interactive=t.interactive,n.player.setInteractive(n.interactive),n.player.updateConfig(t.renderOptions||{}),n.frame.style.cssText="width:100%;height:100%;display:flex;justify-content:center;align-items:center",n.frame.appendChild(n.player.view),n.anchor.appendChild(n.frame),(t==null?void 0:t.controller)&&new JC({player:n.player,params:t.renderOptions||{},target:n.frame}),n.frameResizeObserver.observe(n.frame),n.player.on(mn.renderStart,function(i){n.isLoading=!0,n.emit(dr.renderStart,i)}),n.player.on(mn.renderEnd,function(i){n.isLoading=!1,n.emit(dr.renderEnd,i)}),n.player.on(mn.slideChange,function(i){n.__slideState.currentSlideIndex=i,n.emit(dr.slideChange,i)}),n.player.on(mn.mainSeqStateChange,function(i){n.__slideState.mainSeqState=i}),n.player.on(mn.mainSeqStepChange,function(i){n.__slideState.mainSeqStep=i}),n.player.on(mn.animateStart,function(){n.isAnimating!==!0&&(n.isAnimating=!0,n.emit(dr.animateStart))}),n.player.on(mn.animateEnd,function(){n.isAnimating!==!1&&(n.isAnimating=!1,n.emit(dr.animateEnd))}),n.player.on(mn.interactiveAnimTrigger,function(i){var o=i.action,s=i.seqId;n.__slideState.appliedInteractiveSeqIds.push(s),n.emit(dr.syncDispatch,{type:"interactiveAnim",action:o})}),n.player.on(mn.mainSeqStepStart,Object(oe.throttle)(function(i){n.emit(dr.mainSeqStepStart)},100)),n.player.on(mn.mainSeqStepEnd,Object(oe.throttle)(function(i){n.emit(dr.mainSeqStepEnd)},100)),n.on(dr.syncReceive,n.receiveSyncHandler),n.renderingTaskManager.eventHub.on("task-error",function(i){var o=i.error,s=i.task;n.emit(dr.renderError,{error:o,index:s.slideIndex})}),n}return $C(e,r),e.prototype.frameResizeHandler=function(t){var n=t[0].contentRect,i=n.width,o=n.height;this.frameWidth=i,this.frameHeight=o,this.resizeView()},e.prototype.resizeView=function(){var t=this.width,n=this.height;if(t>0&&n>0){var i=this.frameWidth/t,o=i*n;if(o>this.frameHeight&&(i*=this.frameHeight/o),this.resize){var s=this.player.app,a=i*(this.player.config.resolution||window.devicePixelRatio);s.renderer.resolution=a,s.renderer.plugins.interaction.resolution=s.renderer.resolution,s.renderer.resize(this.width,this.height)}this.view.style.transform="scale("+i+")"}},e.prototype.receiveSyncHandler=function(t){var n=this;t.type==="nextStep"?this.mainSeqStep===t.next-1||this.mainSeqStep+1===this.mainSeqLength?this.nextStep(!0):(this.setMainSeqStep(t.next,"start"),this.player.nextTick(function(){n.nextStep(!0)})):t.type==="prevStep"?this.mainSeqStep===0&&this.mainSeqState==="idle"||this.mainSeqStep===t.next+1||this.mainSeqStep+1===this.mainSeqLength?this.prevStep(!0):(this.setMainSeqStep(t.next+1,"start"),this.player.nextTick(function(){n.prevStep(!0)})):t.type==="interactiveAnim"?this.player.applyInteractiveAction(t.action):t.type==="renderSlide"&&this.renderSlide(t.index,!0)},e.prototype.setSlideState=function(t){return YT(this,void 0,void 0,function(){var n,i=this;return qT(this,function(o){switch(o.label){case 0:return t.taskId&&t.taskId!==this.__slideState.taskId&&(this.__slideState.taskId=t.taskId,this.player.setResourceData(t.taskId,this.__slideState.url)),t.url&&t.url!==this.__slideState.url&&(this.__slideState.url=t.url,this.player.setResourceData(this.__slideState.taskId,t.url)),Number.isInteger(t.currentSlideIndex)&&t.currentSlideIndex!==this.__slideState.currentSlideIndex?(this.__slideState.currentSlideIndex=t.currentSlideIndex,[4,this.renderSlide(t.currentSlideIndex)]):[3,2];case 1:o.sent(),o.label=2;case 2:return[4,NC(function(){return i.player.currentIndex===t.currentSlideIndex&&i.player.currentStage},3e3)];case 3:return o.sent(),n=!1,Number.isInteger(t.mainSeqStep)&&t.mainSeqStep!==this.__slideState.mainSeqStep&&(n=!0,this.__slideState.mainSeqStep=t.mainSeqStep),t.mainSeqState&&t.mainSeqState!==this.__slideState.mainSeqState&&(n=!0,this.__slideState.mainSeqState=t.mainSeqState),n&&this.setMainSeqStep(this.__slideState.mainSeqStep,this.__slideState.mainSeqState==="idle"?"start":"end"),t.appliedInteractiveSeqIds&&t.appliedInteractiveSeqIds.length>0&&(this.__slideState.appliedInteractiveSeqIds=t.appliedInteractiveSeqIds,t.appliedInteractiveSeqIds.forEach(function(s){i.player.seekInteractiveSeqToEnd(s)})),[2]}})})},Object.defineProperty(e.prototype,"slideCount",{get:function(){return this.player.slideCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"slideState",{get:function(){return this.__slideState.mainSeqState=this.mainSeqState,this.__slideState.mainSeqStep=this.mainSeqStep,JSON.parse(JSON.stringify(this.__slideState))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainSeqLength",{get:function(){return this.player.mainSeqLength()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainSeqStep",{get:function(){return this.player.mainSeqStep()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainSeqState",{get:function(){return this.player.mainSeqState()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderOptions",{get:function(){return this.player.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawCall",{get:function(){return this.player.runtime.drawCall},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderFps",{get:function(){return this.player.runtime.fps},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"runtimeFps",{get:function(){return this.player.fps.value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"view",{get:function(){return this.player.view},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.player.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.player.height},enumerable:!1,configurable:!0}),e.prototype.updateRenderOption=function(t){this.player.updateConfig(t)},e.prototype.setResource=function(t,n){this.player.setResourceData(t,n),this.__slideState.taskId=t,this.__slideState.url=n,this.emit(dr.syncDispatch,{type:"setResource",taskId:t,url:n})},e.prototype._renderSlide=function(t,n){return n===void 0&&(n=!1),YT(this,void 0,void 0,function(){return qT(this,function(i){switch(i.label){case 0:return this.isLoading=!0,[4,this.player.renderSlide(t)];case 1:return i.sent(),this.__slideState.currentSlideIndex=t,this.isLoading=!1,this.resizeView(),n||this.emit(dr.syncDispatch,{type:"renderSlide",index:t}),[2]}})})},e.prototype.renderSlide=function(t,n){var i=this;n===void 0&&(n=!1);var o=Number(t);(o!==this.player.currentIndex||this.renderingTaskManager.hasStartTask())&&(o>this.slideCount&&this.slideCount>0||this.renderingTaskManager.addTask(function(){return i._renderSlide(o,n)},o))},e.prototype.nextStep=function(t){if(t===void 0&&(t=!1),!this.isLoading){this.player.nextStep();var n=this.player.mainSeqStep();this.__slideState.mainSeqStep=n,t||this.emit(dr.syncDispatch,{type:"nextStep",next:n})}},e.prototype.prevStep=function(t){if(t===void 0&&(t=!1),!this.isLoading){this.player.prevStep();var n=this.player.mainSeqStep();this.__slideState.mainSeqStep=n,t||this.emit(dr.syncDispatch,{type:"prevStep",next:n})}},e.prototype.setMainSeqStep=function(t,n){this.player.setMainSeqStep(t,n)},e.prototype.setInteractive=function(t){this.interactive=t,this.player.setInteractive(t)},e.prototype.pause=function(){this.player.pause()},e.prototype.resume=function(){this.player.resume()},e.prototype.destroy=function(){this.frameResizeObserver.disconnect(),this.player.removeAllListeners(),this.player.destroy(),this.player.removeAllListeners();try{this.anchor.removeChild(this.player.view)}catch{}},e}(k.a)}]);class fr{constructor(){this.disposers=new Map,this.disposerIDGenCount=-1}add(L,v=this.genDisposerID()){return this.flush(v),this.disposers.set(v,L()),v}addEventListener(L,v,b,q,B=this.genDisposerID()){return this.add(()=>(L.addEventListener(v,b,q),()=>L.removeEventListener(v,b,q)),B),B}setTimeout(L,v,b=this.genDisposerID()){return this.add(()=>{const q=window.setTimeout(()=>{this.remove(b),L()},v);return()=>window.clearTimeout(q)},b)}setInterval(L,v,b=this.genDisposerID()){return this.add(()=>{const q=window.setInterval(L,v);return()=>window.clearInterval(q)},b)}remove(L){const v=this.disposers.get(L);return this.disposers.delete(L),v}flush(L){const v=this.remove(L);if(v)try{v()}catch(b){console.error(b)}}flushAll(){this.disposers.forEach(L=>{try{L()}catch(v){console.error(v)}}),this.disposers.clear()}genDisposerID(){const{MAX_SAFE_INTEGER:L=9007199254740991}=Number;return this.disposerIDGenCount=(this.disposerIDGenCount+1)%L,`disposer-${this.disposerIDGenCount}`}}function lS(I){return I!=null&&typeof I=="object"&&!Array.isArray(I)}function uS(I,L){let v=I.getAttributes();if(v||(I.setAttributes(L),v=I.getAttributes()),!v)throw new Error("[NetlessAppMonaco] No attributes");return lS(L)&&Object.keys(L).forEach(b=>{Object.prototype.hasOwnProperty.call(v,b)||I.updateAttributes([b],L[b])}),v}function hS(I,L,v){return Math.min(Math.max(I,L),v)}function cS(I){return typeof I=="object"&&I!==null}function dS(I,L,v){const b=L.slideState.currentSlideIndex;if(b==null)return;const q=[v,b].join("/");if(I.scenePathType(q)==="none"){I.removeScenes(v);const B=L.slideCount,ie=[];for(let k=1;k<=B;++k)ie.push({name:`${k}`});I.putScenes(v,ie)}I.setScenePath(q)}function pS(I){const{width:L,height:v,slideCount:b,slideState:q}=I,{taskId:B,url:ie}=q,k=[];for(let oe=1;oe<=b;++oe)k.push({width:L,height:v,thumbnail:`${ie}/${B}/preview/${oe}.png`,src:"ppt"});return k}class fS{constructor(L,v,b,q,B,ie,k){this.slide=L,this.onPageChanged=v,this.onTransitionStart=b,this.onTransitionEnd=q,this.onDispatchSyncEvent=B,this.initialState=ie,this.initialPage=k,this.pollCount=0,this.pollReadyState=()=>{this.isReady()?this.resolveReady(this):this.pollCount<20?(this.pollCount++,setTimeout(this.pollReadyState,500)):this.reject()},this.targetingPage=-1,L.on(zn.SLIDE_EVENTS.slideChange,v),L.on(zn.SLIDE_EVENTS.renderStart,b),L.on(zn.SLIDE_EVENTS.renderEnd,q),L.on(zn.SLIDE_EVENTS.mainSeqStepStart,b),L.on(zn.SLIDE_EVENTS.mainSeqStepEnd,q),L.on(zn.SLIDE_EVENTS.syncDispatch,B),L.on(zn.SLIDE_EVENTS.renderError,({error:oe})=>{console.warn("[Slide] render error",oe),q()}),ie?L.setSlideState(ie):L.renderSlide(k),this.ready=new Promise((oe,X)=>{this.resolveReady=oe,this.reject=X}),this.pollReadyState()}receiveSyncEvent(L){this.slide.emit(zn.SLIDE_EVENTS.syncReceive,L)}isReady(){return this.slide.slideCount>0}jumpToPage(L){!this.isReady()||(L=hS(L,1,this.slide.slideCount),L!==this.targetingPage&&(this.targetingPage=L,this.slide.renderSlide(L)))}destroy(){this.slide.destroy()}}async function mS(I,L,v,b,q,B,ie,k,oe,X){const K=new zn.Slide({anchor:I,interactive:!0,resize:!0,controller:b});return K.setResource(L,v),new fS(K,ie,k,oe,X,q,B).ready}function gS(I){const L="http://www.w3.org/2000/svg",v=document.createElementNS(L,"svg");v.setAttribute("class",`${I}-footer-icon-sidebar`),v.setAttribute("viewBox","0 0 64 64");const b=document.createElementNS(L,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M50 8H14c-3.309 0-6 2.691-6 6v36c0 3.309 2.691 6 6 6h36c3.309 0 6-2.691 6-6V14c0-3.309-2.691-6-6-6zM12 50V14c0-1.103.897-2 2-2h8v40h-8c-1.103 0-2-.897-2-2zm40 0c0 1.103-.897 2-2 2H26V12h24c1.103 0 2 .897 2 2z"),v.appendChild(b),v}function vS(I){const L="http://www.w3.org/2000/svg",v=document.createElementNS(L,"svg");v.setAttribute("class",`${I}-footer-icon-arrow-left`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(L,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M177.81 249.959L337.473 90.295c2.722-2.865 2.651-7.378-.143-10.1-2.793-2.65-7.163-2.65-9.956 0l-164.75 164.75c-2.793 2.793-2.793 7.306 0 10.1l164.75 164.75c2.865 2.722 7.378 2.65 10.099-.143 2.651-2.794 2.651-7.163 0-9.957L177.809 249.959z"),v.appendChild(b),v}function _S(I){const L="http://www.w3.org/2000/svg",v=document.createElementNS(L,"svg");v.setAttribute("class",`${I}-footer-icon-arrow-right`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(L,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M322.19 250.041L162.527 409.705c-2.722 2.865-2.651 7.378.143 10.1 2.793 2.65 7.163 2.65 9.956 0l164.75-164.75c2.793-2.793 2.793-7.306 0-10.1l-164.75-164.75c-2.865-2.722-7.378-2.65-10.099.143-2.651 2.794-2.651 7.163 0 9.957l159.664 159.736z"),v.appendChild(b),v}function yS(I){const L="http://www.w3.org/2000/svg",v=document.createElementNS(L,"svg");v.setAttribute("class",`${I}-footer-icon-play`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(L,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M418.158 257.419L174.663 413.33c-6.017 3.919-15.708 3.772-21.291-.29-2.791-2.018-4.295-4.483-4.295-7.084V94.109c0-5.65 6.883-10.289 15.271-10.289 4.298 0 8.391 1.307 11.181 3.332l242.629 155.484c6.016 3.917 6.451 10.292.649 14.491-.216.154-.432.154-.649.292zM170.621 391.288l223.116-141.301L170.71 107.753l-.089 283.535z"),v.appendChild(b),v}function xS(I){const L="http://www.w3.org/2000/svg",v=document.createElementNS(L,"svg");v.setAttribute("class",`${I}-footer-icon-pause`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(L,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M312.491 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261zM165.257 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261z"),v.appendChild(b),v}const sl=typeof window!="undefined",ty=sl&&!("onscroll"in window)||typeof navigator!="undefined"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),ny=sl&&"IntersectionObserver"in window,iy=sl&&"classList"in document.createElement("p"),ry=sl&&window.devicePixelRatio>1,bS={elements_selector:".lazy",container:ty||sl?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1},oy=I=>Object.assign({},bS,I),sy=function(I,L){let v;const b="LazyLoad::Initialized",q=new I(L);try{v=new CustomEvent(b,{detail:{instance:q}})}catch{v=document.createEvent("CustomEvent"),v.initCustomEvent(b,!1,!1,{instance:q})}window.dispatchEvent(v)},wS=(I,L)=>{if(!!L)if(!L.length)sy(I,L);else for(let v=0,b;b=L[v];v+=1)sy(I,b)},Es="src",wg="srcset",Tg="sizes",ay="poster",gc="llOriginalAttrs",Sg="loading",ly="loaded",uy="applied",TS="entered",Eg="error",hy="native",cy="data-",dy="ll-status",Yr=(I,L)=>I.getAttribute(cy+L),SS=(I,L,v)=>{var b=cy+L;if(v===null){I.removeAttribute(b);return}I.setAttribute(b,v)},vc=I=>Yr(I,dy),al=(I,L)=>SS(I,dy,L),Pp=I=>al(I,null),Mg=I=>vc(I)===null,ES=I=>vc(I)===Sg,MS=I=>vc(I)===Eg,Ag=I=>vc(I)===hy,AS=[Sg,ly,uy,Eg],PS=I=>AS.indexOf(vc(I))>=0,ga=(I,L,v,b)=>{if(!!I){if(b!==void 0){I(L,v,b);return}if(v!==void 0){I(L,v);return}I(L)}},Ru=(I,L)=>{if(iy){I.classList.add(L);return}I.className+=(I.className?" ":"")+L},Ho=(I,L)=>{if(iy){I.classList.remove(L);return}I.className=I.className.replace(new RegExp("(^|\\s+)"+L+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},CS=I=>{I.llTempImage=document.createElement("IMG")},RS=I=>{delete I.llTempImage},py=I=>I.llTempImage,Cp=(I,L)=>{if(!L)return;const v=L._observer;!v||v.unobserve(I)},IS=I=>{I.disconnect()},LS=(I,L,v)=>{L.unobserve_entered&&Cp(I,v)},Pg=(I,L)=>{!I||(I.loadingCount+=L)},OS=I=>{!I||(I.toLoadCount-=1)},fy=(I,L)=>{!I||(I.toLoadCount=L)},DS=I=>I.loadingCount>0,NS=I=>I.toLoadCount>0,my=I=>{let L=[];for(let v=0,b;b=I.children[v];v+=1)b.tagName==="SOURCE"&&L.push(b);return L},Cg=(I,L)=>{const v=I.parentNode;if(!v||v.tagName!=="PICTURE")return;my(v).forEach(L)},gy=(I,L)=>{my(I).forEach(L)},Rp=[Es],vy=[Es,ay],Ip=[Es,wg,Tg],Lp=I=>!!I[gc],_y=I=>I[gc],yy=I=>delete I[gc],_c=(I,L)=>{if(Lp(I))return;const v={};L.forEach(b=>{v[b]=I.getAttribute(b)}),I[gc]=v},FS=I=>{Lp(I)||(I[gc]={backgroundImage:I.style.backgroundImage})},BS=(I,L,v)=>{if(!v){I.removeAttribute(L);return}I.setAttribute(L,v)},yc=(I,L)=>{if(!Lp(I))return;const v=_y(I);L.forEach(b=>{BS(I,b,v[b])})},US=I=>{if(!Lp(I))return;const L=_y(I);I.style.backgroundImage=L.backgroundImage},kS=(I,L,v)=>{Ru(I,L.class_applied),al(I,uy),!!v&&(L.unobserve_completed&&Cp(I,L),ga(L.callback_applied,I,v))},xy=(I,L,v)=>{Ru(I,L.class_loading),al(I,Sg),!!v&&(Pg(v,1),ga(L.callback_loading,I,v))},ll=(I,L,v)=>{!v||I.setAttribute(L,v)},by=(I,L)=>{ll(I,Tg,Yr(I,L.data_sizes)),ll(I,wg,Yr(I,L.data_srcset)),ll(I,Es,Yr(I,L.data_src))},GS=(I,L)=>{Cg(I,v=>{_c(v,Ip),by(v,L)}),_c(I,Ip),by(I,L)},HS=(I,L)=>{_c(I,Rp),ll(I,Es,Yr(I,L.data_src))},zS=(I,L)=>{gy(I,v=>{_c(v,Rp),ll(v,Es,Yr(v,L.data_src))}),_c(I,vy),ll(I,ay,Yr(I,L.data_poster)),ll(I,Es,Yr(I,L.data_src)),I.load()},VS=(I,L,v)=>{const b=Yr(I,L.data_bg),q=Yr(I,L.data_bg_hidpi),B=ry&&q?q:b;!B||(I.style.backgroundImage=`url("${B}")`,py(I).setAttribute(Es,B),xy(I,L,v))},jS=(I,L,v)=>{const b=Yr(I,L.data_bg_multi),q=Yr(I,L.data_bg_multi_hidpi),B=ry&&q?q:b;!B||(I.style.backgroundImage=B,kS(I,L,v))},wy={IMG:GS,IFRAME:HS,VIDEO:zS},WS=(I,L)=>{const v=wy[I.tagName];!v||v(I,L)},XS=(I,L,v)=>{const b=wy[I.tagName];!b||(b(I,L),xy(I,L,v))},YS=["IMG","IFRAME","VIDEO"],qS=I=>YS.indexOf(I.tagName)>-1,Ty=(I,L)=>{L&&!DS(L)&&!NS(L)&&ga(I.callback_finish,L)},Sy=(I,L,v)=>{I.addEventListener(L,v),I.llEvLisnrs[L]=v},ZS=(I,L,v)=>{I.removeEventListener(L,v)},Rg=I=>!!I.llEvLisnrs,JS=(I,L,v)=>{Rg(I)||(I.llEvLisnrs={});const b=I.tagName==="VIDEO"?"loadeddata":"load";Sy(I,b,L),Sy(I,"error",v)},Ig=I=>{if(!Rg(I))return;const L=I.llEvLisnrs;for(let v in L){const b=L[v];ZS(I,v,b)}delete I.llEvLisnrs},Ey=(I,L,v)=>{RS(I),Pg(v,-1),OS(v),Ho(I,L.class_loading),L.unobserve_completed&&Cp(I,v)},$S=(I,L,v,b)=>{const q=Ag(L);Ey(L,v,b),Ru(L,v.class_loaded),al(L,ly),ga(v.callback_loaded,L,b),q||Ty(v,b)},KS=(I,L,v,b)=>{const q=Ag(L);Ey(L,v,b),Ru(L,v.class_error),al(L,Eg),ga(v.callback_error,L,b),q||Ty(v,b)},Lg=(I,L,v)=>{const b=py(I)||I;if(Rg(b))return;JS(b,ie=>{$S(ie,I,L,v),Ig(b)},ie=>{KS(ie,I,L,v),Ig(b)})},QS=(I,L,v)=>{CS(I),Lg(I,L,v),FS(I),VS(I,L,v),jS(I,L,v)},eE=(I,L,v)=>{Lg(I,L,v),XS(I,L,v)},Og=(I,L,v)=>{qS(I)?eE(I,L,v):QS(I,L,v)},tE=(I,L,v)=>{I.setAttribute("loading","lazy"),Lg(I,L,v),WS(I,L),al(I,hy)},My=I=>{I.removeAttribute(Es),I.removeAttribute(wg),I.removeAttribute(Tg)},nE=I=>{Cg(I,L=>{My(L)}),My(I)},Ay=I=>{Cg(I,L=>{yc(L,Ip)}),yc(I,Ip)},iE={IMG:Ay,IFRAME:I=>{yc(I,Rp)},VIDEO:I=>{gy(I,L=>{yc(L,Rp)}),yc(I,vy),I.load()}},rE=I=>{const L=iE[I.tagName];if(!L){US(I);return}L(I)},oE=(I,L)=>{Mg(I)||Ag(I)||(Ho(I,L.class_entered),Ho(I,L.class_exited),Ho(I,L.class_applied),Ho(I,L.class_loading),Ho(I,L.class_loaded),Ho(I,L.class_error))},sE=(I,L)=>{rE(I),oE(I,L),Pp(I),yy(I)},aE=(I,L,v,b)=>{!v.cancel_on_exit||!ES(I)||I.tagName==="IMG"&&(Ig(I),nE(I),Ay(I),Ho(I,v.class_loading),Pg(b,-1),Pp(I),ga(v.callback_cancel,I,L,b))},lE=(I,L,v,b)=>{const q=PS(I);al(I,TS),Ru(I,v.class_entered),Ho(I,v.class_exited),LS(I,v,b),ga(v.callback_enter,I,L,b),!q&&Og(I,v,b)},uE=(I,L,v,b)=>{Mg(I)||(Ru(I,v.class_exited),aE(I,L,v,b),ga(v.callback_exit,I,L,b))},hE=["IMG","IFRAME","VIDEO"],Py=I=>I.use_native&&"loading"in HTMLImageElement.prototype,cE=(I,L,v)=>{I.forEach(b=>{hE.indexOf(b.tagName)!==-1&&tE(b,L,v)}),fy(v,0)},dE=I=>I.isIntersecting||I.intersectionRatio>0,pE=I=>({root:I.container===document?null:I.container,rootMargin:I.thresholds||I.threshold+"px"}),fE=(I,L,v)=>{I.forEach(b=>dE(b)?lE(b.target,b,L,v):uE(b.target,b,L,v))},mE=(I,L)=>{L.forEach(v=>{I.observe(v)})},gE=(I,L)=>{IS(I),mE(I,L)},vE=(I,L)=>{!ny||Py(I)||(L._observer=new IntersectionObserver(v=>{fE(v,I,L)},pE(I)))},Cy=I=>Array.prototype.slice.call(I),Op=I=>I.container.querySelectorAll(I.elements_selector),_E=I=>Cy(I).filter(Mg),yE=I=>MS(I),xE=I=>Cy(I).filter(yE),Ry=(I,L)=>_E(I||Op(L)),bE=(I,L)=>{xE(Op(I)).forEach(b=>{Ho(b,I.class_error),Pp(b)}),L.update()},wE=(I,L)=>{!sl||window.addEventListener("online",()=>{bE(I,L)})},xc=function(I,L){const v=oy(I);this._settings=v,this.loadingCount=0,vE(v,this),wE(v,this),this.update(L)};xc.prototype={update:function(I){const L=this._settings,v=Ry(I,L);if(fy(this,v.length),ty||!ny){this.loadAll(v);return}if(Py(L)){cE(v,L,this);return}gE(this._observer,v)},destroy:function(){this._observer&&this._observer.disconnect(),Op(this._settings).forEach(I=>{yy(I)}),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(I){const L=this._settings;Ry(I,L).forEach(b=>{Cp(b,this),Og(b,L,this)})},restoreAll:function(){const I=this._settings;Op(I).forEach(L=>{sE(L,I)})}},xc.load=(I,L)=>{const v=oy(L);Og(I,v)},xc.resetStatus=I=>{Pp(I)},sl&&wS(xc,window.lazyLoadOptions);class TE{constructor({readonly:L,box:v,onNewPageIndex:b,onPlay:q}){this._pages=[],this.pageIndex=0,this.setPaused=()=>{this.$btnPlay.classList.toggle(this.wrapClassName("footer-btn-playing"),!1)},this.setPlaying=()=>{this.$btnPlay.classList.toggle(this.wrapClassName("footer-btn-playing"),!0)},this.namespace="netless-app-slide",this.isShowPreview=!1,this.isSmallBox=!1,this.sideEffect=new fr,this.readonly=L,this.box=v,this.onNewPageIndex=b,this.onPlay=q,this.render()}set pages(L){this._pages=L,this.refreshPreview(),this.refreshTotalPage(),this.refreshBtnSidebar()}get pages(){return this._pages}mount(){this.box.mountContent(this.$content),this.box.mountFooter(this.$footer)}unmount(){this.$content.remove(),this.$footer.remove()}setReadonly(L){this.readonly!==L&&(this.readonly=L,this.$content.classList.toggle(this.wrapClassName("readonly"),L),this.$footer.classList.toggle(this.wrapClassName("readonly"),L),this.$pageNumberInput.disabled=L)}destroy(){this.sideEffect.flushAll(),this.unmount()}setPageIndex(L){Number.isNaN(L)||(this.pageIndex=L,this.$pageNumberInput.value=String(L+1))}refreshTotalPage(){this.pages.length?this.$totalPage.textContent=" / "+this.pages.length:this.$totalPage.textContent=""}setSmallBox(L){this.isSmallBox!==L&&(this.isSmallBox=L,this.$footer.classList.toggle(this.wrapClassName("float-footer"),L))}render(){return this.renderContent(),this.renderFooter(),this.$content}renderContent(){if(!this.$content){const L=document.createElement("div");L.className=this.wrapClassName("content"),this.$content=L,this.readonly&&L.classList.add(this.wrapClassName("readonly")),L.appendChild(this.renderPreviewMask()),L.appendChild(this.renderPreview())}return this.$content}renderPreview(){if(!this.$preview){const L=document.createElement("div");L.className=this.wrapClassName("preview")+" tele-fancy-scrollbar",this.$preview=L,this.refreshPreview(),this.sideEffect.addEventListener(L,"click",v=>{var q;if(this.readonly)return;const b=(q=v.target.dataset)==null?void 0:q.pageIndex;b&&(v.preventDefault(),v.stopPropagation(),v.stopImmediatePropagation(),this.onNewPageIndex(Number(b)),this.togglePreview(!1))})}return this.$preview}refreshPreview(){const{$preview:L}=this,v=this.wrapClassName("preview-page"),b=this.wrapClassName("preview-page-name");for(;L.firstChild;)L.firstChild.remove();this.pages.forEach((q,B)=>{var le;const ie=(le=q.thumbnail)!=null?le:q.src.startsWith("ppt")?void 0:q.src;if(!ie)return;const k=String(B),oe=document.createElement("a");oe.className=v+" "+this.wrapClassName(`preview-page-${B}`),oe.setAttribute("href","#"),oe.dataset.pageIndex=k;const X=document.createElement("span");X.className=b,X.textContent=String(B+1),X.dataset.pageIndex=k;const K=document.createElement("img");K.width=q.width,K.height=q.height,K.dataset.src=ie,K.dataset.pageIndex=k,oe.appendChild(K),oe.appendChild(X),L.appendChild(oe)}),this.sideEffect.add(()=>{const q=new xc({container:this.$preview,elements_selector:`.${this.wrapClassName("preview-page>img")}`});return()=>q.destroy()},"preview-lazyload")}renderPreviewMask(){return this.$previewMask||(this.$previewMask=document.createElement("div"),this.$previewMask.className=this.wrapClassName("preview-mask"),this.sideEffect.addEventListener(this.$previewMask,"click",L=>{this.readonly||L.target===this.$previewMask&&this.togglePreview(!1)})),this.$previewMask}refreshBtnSidebar(){this.$btnSidebar.style.display=this.pages.length>0?"":"none"}renderFooter(){if(!this.$footer){const L=document.createElement("div");L.className=this.wrapClassName("footer"),this.$footer=L,this.readonly&&L.classList.add(this.wrapClassName("readonly")),this.isSmallBox&&L.classList.add(this.wrapClassName("float-footer"));const v=this.renderFooterBtn("btn-sidebar",gS(this.namespace));this.sideEffect.addEventListener(v,"click",()=>{this.readonly||this.togglePreview()}),this.$btnSidebar=v,this.$btnSidebar.style.display="none",this.$footer.appendChild(v);const b=document.createElement("div");b.className=this.wrapClassName("page-jumps");const q=this.renderFooterBtn("btn-page-back",vS(this.namespace));if(this.sideEffect.addEventListener(q,"click",()=>{this.readonly||this.onNewPageIndex(this.pageIndex-1)}),b.appendChild(q),this.onPlay){const X=this.renderFooterBtn("btn-page-play",yS(this.namespace),xS(this.namespace));this.$btnPlay=X,this.sideEffect.addEventListener(X,"click",()=>{this.readonly||(this.setPlaying(),this.onPlay&&this.onPlay())}),b.appendChild(X)}const B=this.renderFooterBtn("btn-page-next",_S(this.namespace));this.sideEffect.addEventListener(B,"click",()=>{this.readonly||this.onNewPageIndex(this.pageIndex+1)}),b.appendChild(B);const ie=document.createElement("div");ie.className=this.wrapClassName("page-number");const k=document.createElement("input");k.className=this.wrapClassName("page-number-input"),k.value=String(this.pageIndex+1),this.readonly&&(k.disabled=!0),this.$pageNumberInput=k,this.sideEffect.addEventListener(k,"change",()=>{this.readonly||k.value&&this.onNewPageIndex(Number(k.value)-1)});const oe=document.createElement("span");this.$totalPage=oe,ie.appendChild(k),ie.appendChild(oe),this.$footer.appendChild(b),this.$footer.appendChild(ie)}return this.$footer}renderFooterBtn(L,v,b){const q=document.createElement("button");return q.className=this.wrapClassName("footer-btn")+" "+this.wrapClassName(L),q.appendChild(v),b&&q.appendChild(b),q}togglePreview(L){if(this.isShowPreview=L!=null?L:!this.isShowPreview,this.$content.classList.toggle(this.wrapClassName("preview-active"),this.isShowPreview),this.isShowPreview){const v=this.$preview.querySelector("."+this.wrapClassName(`preview-page-${this.pageIndex}`));v&&this.$preview.scrollTo({top:v.offsetTop-16})}}wrapClassName(L){return`${this.namespace}-${L}`}}const SE=new Set(["clicker","selector"]);class EE{constructor({box:L,view:v,mountSlideController:b,mountWhiteboard:q}){this.scaleDocsToFit=()=>{if(this.slideController){const{width:B,height:ie}=this.slideController.slide;this.whiteboardView.moveCameraToContain({originX:-B/2,originY:-ie/2,width:B,height:ie,animationMode:"immediately"})}},this.onPlay=()=>{this.slideController&&this.slideController.slide.nextStep()},this.onNewPageIndex=B=>{this.slideController&&this.slideController.jumpToPage(B+1)},this.sideEffect=new fr,this.namespace="netless-app-slide",this.box=L,this.whiteboardView=v,this.mountSlideController=b,this.mountWhiteboard=q,this.viewer=new TE({box:L,readonly:L.readonly,onNewPageIndex:this.onNewPageIndex,onPlay:this.onPlay}),this.render()}render(){this.viewer.$content.appendChild(this.renderSlideContainer()),this.viewer.$content.appendChild(this.renderWhiteboardView()),this.sideEffect.addEventListener(window,"keydown",L=>{if(this.box.focus&&this.slideController)switch(L.key){case"ArrowUp":case"ArrowLeft":{this.slideController.slide.prevStep();break}case"ArrowRight":case"ArrowDown":{this.slideController.slide.nextStep();break}}})}renderSlideContainer(){if(!this.$slide){const L=document.createElement("div");L.className=this.wrapClassName("slide"),L.dataset.appKind="Slide",this.$slide=L}return this.$slide}renderWhiteboardView(){return this.$whiteboardView||(this.$whiteboardView=document.createElement("div"),this.$whiteboardView.className=this.wrapClassName("wb-view"),this.mountWhiteboard(this.$whiteboardView)),this.$whiteboardView}async mount(){return this.viewer.mount(),this.slideController=await this.mountSlideController(this.$slide),this.viewer.pages=pS(this.slideController.slide),this.viewer.setPageIndex(this.getPageIndex(this.slideController)),this.scaleDocsToFit(),this.sideEffect.add(()=>(this.whiteboardView.callbacks.on("onSizeUpdated",this.scaleDocsToFit),()=>this.whiteboardView.callbacks.off("onSizeUpdated",this.scaleDocsToFit))),this}getPageIndex(L){return(L.slide.slideState.currentSlideIndex||1)-1}unmount(){return this.slideController&&this.slideController.destroy(),this.viewer.unmount(),this}setReadonly(L){this.viewer.setReadonly(L)}destroy(){this.sideEffect.flushAll(),this.unmount(),this.viewer.destroy()}toggleClickThrough(L){this.$whiteboardView.style.pointerEvents=!L||SE.has(L)?"none":"auto"}wrapClassName(L){return`${this.namespace}-${L}`}}var ME=`.netless-app-slide-content{position:relative;height:100%;overflow:hidden}.netless-app-slide-preview-mask{display:none;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%}.netless-app-slide-preview{display:flex;flex-direction:column;align-items:center;position:absolute;z-index:300;top:0;left:0;width:33%;max-width:200px;height:100%;padding-top:10px;transform:translate(-100%);background:rgba(237,237,240,.9);box-shadow:inset -1px 0 #0000001c;transition:transform .4s}.netless-app-slide-preview-active .netless-app-slide-preview-mask{display:block}.netless-app-slide-preview-active .netless-app-slide-preview{transform:translate(0)}.netless-app-slide-preview-page{position:relative;display:block;width:55%;margin-bottom:10px;font-size:0;color:transparent;outline:none;border:7px solid transparent;border-radius:4px;transition:border-color .3s;user-select:none}.netless-app-slide-preview-page:hover,.netless-app-slide-preview-page.netless-app-slide-preview-page-active{border-color:#444e601a}.netless-app-slide-preview-page>img{width:100%;height:auto;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);border-radius:1px;background-color:#fff;box-shadow:0 2px 8px #0000004d}.netless-app-slide-preview-page-name{position:absolute;top:1px;left:-10px;transform:translate(-100%);text-align:right;font-size:12px;color:#5f5f5f;user-select:none}.netless-app-slide-footer{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;border-top:1px solid #eeeef7;color:#191919}.netless-app-slide-float-footer{width:100%;min-height:26px;position:absolute;left:0;bottom:0;z-index:2000;background:rgba(249,249,252,.9);transition:opacity .4s}.netless-app-slide-footer-btn{box-sizing:border-box;width:26px;height:26px;font-size:0;margin:0;padding:3px;border:none;border-radius:1px;outline:none;color:currentColor;background:transparent;transition:background .4s;cursor:pointer;user-select:none}.netless-app-slide-footer-btn:hover{background:rgba(237,237,240,.9)}.netless-app-slide-footer-btn>svg{width:100%;height:100%}.netless-app-slide-footer-btn>svg:nth-of-type(2){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(1){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(2){display:initial}.netless-app-slide-footer-btn~.netless-app-slide-footer-btn{margin-left:15px}.netless-app-slide-page-jumps{flex:1;display:flex;justify-content:center;align-items:center}.netless-app-slide-page-number{margin-left:auto;font-size:13px;user-select:none;white-space:nowrap;word-break:keep-all}.netless-app-slide-page-number-input{border:none;outline:none;width:1.5em;text-align:right;border-radius:2px;color:currentColor;background:transparent;transition:background .4s;user-select:text}.netless-app-slide-page-number-input:hover,.netless-app-slide-page-number-input:focus,.netless-app-slide-page-number-input:active{background:#fff;box-shadow:#63636333 0 2px 8px}.netless-app-slide-readonly .netless-app-slide-footer-btn{cursor:not-allowed}.netless-app-slide-readonly .netless-app-slide-footer-btn:hover{background:transparent}.netless-app-slide-readonly .netless-app-slide-page-number-input{cursor:not-allowed}.netless-app-slide-readonly .netless-app-slide-page-number-input:hover,.netless-app-slide-readonly .netless-app-slide-page-number-input:focus,.netless-app-slide-readonly .netless-app-slide-page-number-input:active{background:transparent;box-shadow:none}.netless-app-slide-readonly .netless-app-slide-page-number-input:disabled{color:inherit}.netless-app-slide-readonly.netless-app-slide-float-footer{display:none}.netless-app-slide-wb-view{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;overflow:hidden}.netless-app-slide-slide{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.netless-app-slide-slide canvas{transform:scale(var(--netless-app-slide-scale, 1))}
5824
+ `;const AE={kind:"Slide",async setup(I){var O;const L=I.getBox(),v=I.getView(),b=I.getRoom(),q=I.getDisplayer(),B=uS(I,{taskId:"",url:"",state:null});if(!B.taskId||!B.url)throw new Error("[Slide] no taskId or url");if(!v)throw new Error("[Slide] no view, please set scenePath on addApp()");L.mountStyles(ME);const ie=new fr,k=I.getInitScenePath(),oe=(O=I.getAppOptions())==null?void 0:O.debug,X=`channel-${I.appId}`;let K;const le=V=>{console.log("[Slide] page to",V),I.getIsWritable()&&b&&K&&(dS(b,K.slide,k),A.viewer.setPageIndex(V-1))},Ee=()=>{A.viewer.setPlaying()},Xe=()=>{A.viewer.setPaused()},Fe=V=>{I.getIsWritable()&&K&&(I.updateAttributes(["state"],K.slide.slideState),b&&b.dispatchMagixEvent(X,{type:zn.SLIDE_EVENTS.syncDispatch,event:V}))};function S(V){const{slide:D}=V;D.on(zn.SLIDE_EVENTS.syncDispatch,z=>{I.updateAttributes(["state"],D.slideState),b&&b.dispatchMagixEvent(X,{type:zn.SLIDE_EVENTS.syncDispatch,payload:z})}),ie.add(()=>{const z=W=>{if(V&&W.event===X&&W.authorId!==q.observerId&&cS(W.payload)){const{type:ee,payload:et}=W.payload;ee===zn.SLIDE_EVENTS.syncDispatch&&V.receiveSyncEvent(et)}};return q.addMagixEventListener(X,z),()=>q.removeMagixEventListener(X,z)})}const A=new EE({box:L,view:v,mountSlideController:async V=>(K=await mS(V,B.taskId,B.url,oe,JSON.parse(JSON.stringify(B.state)),q.state.sceneState.index+1,le,Ee,Xe,Fe),S(K),K),mountWhiteboard:V=>I.mountView(V)});try{await A.mount()}catch{console.log("[Slide]: destroy by error"),ie.flushAll(),A.destroy();return}b&&(A.toggleClickThrough(b.state.memberState.currentApplianceName),ie.add(()=>{const V=D=>{D.memberState&&A.toggleClickThrough(D.memberState.currentApplianceName)};return b.callbacks.on("onRoomStateChanged",V),()=>b.callbacks.off("onRoomStateChanged",V)})),L.events.on("readonly",V=>{A.setReadonly(V)}),I.emitter.on("destroy",()=>{console.log("[Slide]: destroy"),ie.flushAll(),A.destroy()})}};return Xr.default=AE,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr[Symbol.toStringTag]="Module",Xr}({});})();
5825
5825
  //# sourceMappingURL=main.iife.js.map