chbim-plugins 0.0.17 → 0.0.19
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/chbim-plugins.js +12186 -8142
- package/chbim-plugins.umd.cjs +47 -21
- package/package.json +2 -5
package/chbim-plugins.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(dn,ke){typeof exports=="object"&&typeof module<"u"?ke(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],ke):(dn=typeof globalThis<"u"?globalThis:dn||self,ke(dn["chbim-plugins"]={},dn.Vue))})(this,function(dn,ke){"use strict";var km=Object.defineProperty;var Vm=(dn,ke,Ma)=>ke in dn?km(dn,ke,{enumerable:!0,configurable:!0,writable:!0,value:Ma}):dn[ke]=Ma;var Nu=(dn,ke,Ma)=>(Vm(dn,typeof ke!="symbol"?ke+"":ke,Ma),Ma);const Ma="",Bh=((g,ht)=>{const M=g.__vccOpts||g;for(const[_t,mt]of ht)M[_t]=mt;return M})(Object.assign({name:"MukButton"},{props:{size:{type:String,default:"middle"},type:{type:String,default:"default"}},setup(g){return(ht,M)=>(ke.openBlock(),ke.createElementBlock("button",{class:ke.normalizeClass(["muk-btn",[g.size,g.type]])},[ke.renderSlot(ht.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-0e6d93cd"]]);class Bu{constructor(){this.dom={mask:document.querySelector(".js-mask"),slices:[...document.querySelectorAll(".js-mask__slice")],lines:[...document.querySelectorAll(".js-mask-line")],logo:document.querySelector(".js-logo"),titles:[...document.querySelectorAll(".js-transition-title")]},this.tl=null,this.state=!1,this.init()}resetScroll(){window.scrollTo(0,0)}createTimeline(){this.tl=new TimelineMax({paused:!0,onComplete:()=>{this.state=!1}}),this.tl.set(this.dom.titles,{yPercent:0}).set(this.dom.mask,{autoAlpha:1}).staggerFromTo(this.dom.slices,1.5,{xPercent:100},{xPercent:0,ease:Expo.easeInOut},-.075).addCallback(this.resetScroll.bind(this)).addLabel("loaderStart").set(this.dom.titles,{yPercent:-100}).set([this.dom.lines[0],this.dom.logo],{autoAlpha:1}).fromTo(this.dom.logo,1,{yPercent:-100,rotation:10},{yPercent:0,rotation:0,ease:Expo.easeOut}).addLabel("intermediateFrame").staggerFromTo(this.dom.lines,.5,{scaleX:0},{scaleX:1,ease:Expo.easeInOut},.75,"-=1").set(this.dom.lines,{transformOrigin:"right"}).fromTo(this.dom.lines[0],1,{scaleX:1},{scaleX:0,ease:Expo.easeInOut}).fromTo(this.dom.logo,1,{yPercent:0},{yPercent:105,ease:Expo.easeOut},"-=1").staggerFromTo(this.dom.slices,.5,{xPercent:0},{xPercent:100,ease:Expo.easeInOut},.075).set(this.dom.mask,{autoAlpha:0}).addLabel("imagesStart","-=0.85").staggerFromTo(this.dom.titles,1.5,{yPercent:100},{yPercent:0,ease:Expo.easeInOut},.05,"imagesStart").addLabel("loaderEnd")}continuation(){this.init(),this.resetScroll(),this.tl.tweenFromTo("loaderStart","loaderEnd")}show(){this.init(),this.tl.tweenFromTo("loaderStart","intermediateFrame")}hide(){this.resetScroll(),this.tl.tweenFromTo("intermediateFrame","loaderEnd")}init(){document.querySelector(".mask-line.js-mask-line")&&document.querySelector(".mask-line.js-mask-line").removeAttribute("style"),document.querySelector(".mask-line__inner.js-mask-line")&&document.querySelector(".mask-line__inner.js-mask-line").removeAttribute("style"),this.createTimeline()}}const Uu={class:"mask js-mask"},Fu=ke.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),Gu=ke.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),Hu=ke.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),ku={class:"mask__inner"},Vu={class:"logo logo--mask"},Wu={class:"js-logo",style:{color:"#fff"}},ju=ke.createElementVNode("div",{class:"mask-line js-mask-line"},[ke.createElementVNode("div",{class:"mask-line__inner js-mask-line"})],-1),Xu={name:"BimCutscenes"},Uh=ke.defineComponent({...Xu,props:{text:{type:String,default:"CHBIM云平台"}},setup(g,{expose:ht}){const M=ke.ref(null),_t=()=>{M.value===null&&(M.value=new Bu)},mt=()=>{_t(),M.value.continuation()};return ke.onMounted(()=>{_t()}),ht({continuation:mt}),(S,Mt)=>(ke.openBlock(),ke.createElementBlock("div",Uu,[Fu,Gu,Hu,ke.createElementVNode("div",ku,[ke.createElementVNode("figure",Vu,[ke.createElementVNode("p",Wu,ke.toDisplayString(g.text),1)]),ju])]))}}),qm="";/*!
|
|
2
2
|
* VERSION: 2.0.2
|
|
3
3
|
* DATE: 2018-08-27
|
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Club GreenSock members, the software agreement that was issued with your membership.
|
|
11
11
|
*
|
|
12
12
|
* @author: Jack Doyle, jack@greensock.com
|
|
13
|
-
**/var $e=typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window;($e._gsQueue||($e._gsQueue=[])).push(function(){$e._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(p,pt,Z){var ft=function(Q){var H,m=[],f=Q.length;for(H=0;H!==f;m.push(Q[H++]));return m},at=function(Q,H,m){var f,C,M=Q.cycle;for(f in M)C=M[f],Q[f]=typeof C=="function"?C(m,H[m]):C[m%C.length];delete Q.cycle},x=function(Q,H,m){Z.call(this,Q,H,m),this._cycle=0,this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._repeat&&this._uncache(!0),this.render=x.prototype.render},mt=1e-10,Ct=Z._internals,Y=Ct.isSelector,ht=Ct.isArray,wt=x.prototype=Z.to({},.1,{}),ct=[];x.version="2.0.2",wt.constructor=x,wt.kill()._gc=!1,x.killTweensOf=x.killDelayedCallsTo=Z.killTweensOf,x.getTweensOf=Z.getTweensOf,x.lagSmoothing=Z.lagSmoothing,x.ticker=Z.ticker,x.render=Z.render,wt.invalidate=function(){return this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._yoyoEase=null,this._uncache(!0),Z.prototype.invalidate.call(this)},wt.updateTo=function(Q,H){var m,f=this.ratio,C=this.vars.immediateRender||Q.immediateRender;H&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(m in Q)this.vars[m]=Q[m];if(this._initted||C){if(H)this._initted=!1,C&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&Z._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var M=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(M,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||C)for(var G,b=1/(1-f),F=this._firstPT;F;)G=F.s+F.c,F.c*=b,F.s=G-F.c,F=F._next}return this},wt.render=function(Q,H,m){this._initted||this._duration===0&&this.vars.repeat&&this.invalidate();var f,C,M,G,b,F,q,st,it,Lt=this._dirty?this.totalDuration():this._totalDuration,bt=this._time,Gt=this._totalTime,Vt=this._cycle,ie=this._duration,ut=this._rawPrevTime;if(Q>=Lt-1e-7&&Q>=0?(this._totalTime=Lt,this._cycle=this._repeat,this._yoyo&&1&this._cycle?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=ie,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(f=!0,C="onComplete",m=m||this._timeline.autoRemoveChildren),ie===0&&(this._initted||!this.vars.lazy||m)&&(this._startTime===this._timeline._duration&&(Q=0),(0>ut||0>=Q&&Q>=-1e-7||ut===mt&&this.data!=="isPause")&&ut!==Q&&(m=!0,ut>mt&&(C="onReverseComplete")),this._rawPrevTime=st=!H||Q||ut===Q?Q:mt)):1e-7>Q?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(Gt!==0||ie===0&&ut>0)&&(C="onReverseComplete",f=this._reversed),0>Q&&(this._active=!1,ie===0&&(this._initted||!this.vars.lazy||m)&&(ut>=0&&(m=!0),this._rawPrevTime=st=!H||Q||ut===Q?Q:mt)),this._initted||(m=!0)):(this._totalTime=this._time=Q,this._repeat!==0&&(G=ie+this._repeatDelay,this._cycle=this._totalTime/G>>0,this._cycle!==0&&this._cycle===this._totalTime/G&&Q>=Gt&&this._cycle--,this._time=this._totalTime-this._cycle*G,this._yoyo&&1&this._cycle&&(this._time=ie-this._time,it=this._yoyoEase||this.vars.yoyoEase,it&&(this._yoyoEase||(it!==!0||this._initted?this._yoyoEase=it=it===!0?this._ease:it instanceof Ease?it:Ease.map[it]:(it=this.vars.ease,this._yoyoEase=it=it?it instanceof Ease?it:typeof it=="function"?new Ease(it,this.vars.easeParams):Ease.map[it]||Z.defaultEase:Z.defaultEase)),this.ratio=it?1-it.getRatio((ie-this._time)/ie):0)),this._time>ie?this._time=ie:this._time<0&&(this._time=0)),this._easeType&&!it?(b=this._time/ie,F=this._easeType,q=this._easePower,(F===1||F===3&&b>=.5)&&(b=1-b),F===3&&(b*=2),q===1?b*=b:q===2?b*=b*b:q===3?b*=b*b*b:q===4&&(b*=b*b*b*b),F===1?this.ratio=1-b:F===2?this.ratio=b:this._time/ie<.5?this.ratio=b/2:this.ratio=1-b/2):it||(this.ratio=this._ease.getRatio(this._time/ie))),bt===this._time&&!m&&Vt===this._cycle)return void(Gt!==this._totalTime&&this._onUpdate&&(H||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!m&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=bt,this._totalTime=Gt,this._rawPrevTime=ut,this._cycle=Vt,Ct.lazyTweens.push(this),void(this._lazy=[Q,H]);!this._time||f||it?f&&this._ease._calcEnd&&!it&&(this.ratio=this._ease.getRatio(this._time===0?0:1)):this.ratio=this._ease.getRatio(this._time/ie)}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==bt&&Q>=0&&(this._active=!0),Gt===0&&(this._initted===2&&Q>0&&this._init(),this._startAt&&(Q>=0?this._startAt.render(Q,!0,m):C||(C="_dummyGS")),this.vars.onStart&&(this._totalTime!==0||ie===0)&&(H||this._callback("onStart"))),M=this._firstPT;M;)M.f?M.t[M.p](M.c*this.ratio+M.s):M.t[M.p]=M.c*this.ratio+M.s,M=M._next;this._onUpdate&&(0>Q&&this._startAt&&this._startTime&&this._startAt.render(Q,!0,m),H||(this._totalTime!==Gt||C)&&this._callback("onUpdate")),this._cycle!==Vt&&(H||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),C&&(!this._gc||m)&&(0>Q&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(Q,!0,m),f&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!H&&this.vars[C]&&this._callback(C),ie===0&&this._rawPrevTime===mt&&st!==mt&&(this._rawPrevTime=0))},x.to=function(Q,H,m){return new x(Q,H,m)},x.from=function(Q,H,m){return m.runBackwards=!0,m.immediateRender=m.immediateRender!=0,new x(Q,H,m)},x.fromTo=function(Q,H,m,f){return f.startAt=m,f.immediateRender=f.immediateRender!=0&&m.immediateRender!=0,new x(Q,H,f)},x.staggerTo=x.allTo=function(Q,H,m,f,C,M,G){f=f||0;var b,F,q,st,it=0,Lt=[],bt=function(){m.onComplete&&m.onComplete.apply(m.onCompleteScope||this,arguments),C.apply(G||m.callbackScope||this,M||ct)},Gt=m.cycle,Vt=m.startAt&&m.startAt.cycle;for(ht(Q)||(typeof Q=="string"&&(Q=Z.selector(Q)||Q),Y(Q)&&(Q=ft(Q))),Q=Q||[],0>f&&(Q=ft(Q),Q.reverse(),f*=-1),b=Q.length-1,q=0;b>=q;q++){F={};for(st in m)F[st]=m[st];if(Gt&&(at(F,Q,q),F.duration!=null&&(H=F.duration,delete F.duration)),Vt){Vt=F.startAt={};for(st in m.startAt)Vt[st]=m.startAt[st];at(F.startAt,Q,q)}F.delay=it+(F.delay||0),q===b&&C&&(F.onComplete=bt),Lt[q]=new x(Q[q],H,F),it+=f}return Lt},x.staggerFrom=x.allFrom=function(Q,H,m,f,C,M,G){return m.runBackwards=!0,m.immediateRender=m.immediateRender!=0,x.staggerTo(Q,H,m,f,C,M,G)},x.staggerFromTo=x.allFromTo=function(Q,H,m,f,C,M,G,b){return f.startAt=m,f.immediateRender=f.immediateRender!=0&&m.immediateRender!=0,x.staggerTo(Q,H,f,C,M,G,b)},x.delayedCall=function(Q,H,m,f,C){return new x(H,0,{delay:Q,onComplete:H,onCompleteParams:m,callbackScope:f,onReverseComplete:H,onReverseCompleteParams:m,immediateRender:!1,useFrames:C,overwrite:0})},x.set=function(Q,H){return new x(Q,0,H)},x.isTweening=function(Q){return Z.getTweensOf(Q,!0).length>0};var Pt=function(Q,H){for(var m=[],f=0,C=Q._first;C;)C instanceof Z?m[f++]=C:(H&&(m[f++]=C),m=m.concat(Pt(C,H)),f=m.length),C=C._next;return m},Ot=x.getAllTweens=function(Q){return Pt(p._rootTimeline,Q).concat(Pt(p._rootFramesTimeline,Q))};x.killAll=function(Q,H,m,f){H==null&&(H=!0),m==null&&(m=!0);var C,M,G,b=Ot(f!=0),F=b.length,q=H&&m&&f;for(G=0;F>G;G++)M=b[G],(q||M instanceof pt||(C=M.target===M.vars.onComplete)&&m||H&&!C)&&(Q?M.totalTime(M._reversed?0:M.totalDuration()):M._enabled(!1,!1))},x.killChildTweensOf=function(Q,H){if(Q!=null){var m,f,C,M,G,b=Ct.tweenLookup;if(typeof Q=="string"&&(Q=Z.selector(Q)||Q),Y(Q)&&(Q=ft(Q)),ht(Q))for(M=Q.length;--M>-1;)x.killChildTweensOf(Q[M],H);else{m=[];for(C in b)for(f=b[C].target.parentNode;f;)f===Q&&(m=m.concat(b[C].tweens)),f=f.parentNode;for(G=m.length,M=0;G>M;M++)H&&m[M].totalTime(m[M].totalDuration()),m[M]._enabled(!1,!1)}}};var xt=function(Q,H,m,f){H=H!==!1,m=m!==!1,f=f!==!1;for(var C,M,G=Ot(f),b=H&&m&&f,F=G.length;--F>-1;)M=G[F],(b||M instanceof pt||(C=M.target===M.vars.onComplete)&&m||H&&!C)&&M.paused(Q)};return x.pauseAll=function(Q,H,m){xt(!0,Q,H,m)},x.resumeAll=function(Q,H,m){xt(!1,Q,H,m)},x.globalTimeScale=function(Q){var H=p._rootTimeline,m=Z.ticker.time;return arguments.length?(Q=Q||mt,H._startTime=m-(m-H._startTime)*H._timeScale/Q,H=p._rootFramesTimeline,m=Z.ticker.frame,H._startTime=m-(m-H._startTime)*H._timeScale/Q,H._timeScale=p._rootTimeline._timeScale=Q,Q):H._timeScale},wt.progress=function(Q,H){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-Q:Q)+this._cycle*(this._duration+this._repeatDelay),H):this._time/this.duration()},wt.totalProgress=function(Q,H){return arguments.length?this.totalTime(this.totalDuration()*Q,H):this._totalTime/this.totalDuration()},wt.time=function(Q,H){return arguments.length?(this._dirty&&this.totalDuration(),Q>this._duration&&(Q=this._duration),this._yoyo&&1&this._cycle?Q=this._duration-Q+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(Q+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(Q,H)):this._time},wt.duration=function(Q){return arguments.length?p.prototype.duration.call(this,Q):this._duration},wt.totalDuration=function(Q){return arguments.length?this._repeat===-1?this:this.duration((Q-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},wt.repeat=function(Q){return arguments.length?(this._repeat=Q,this._uncache(!0)):this._repeat},wt.repeatDelay=function(Q){return arguments.length?(this._repeatDelay=Q,this._uncache(!0)):this._repeatDelay},wt.yoyo=function(Q){return arguments.length?(this._yoyo=Q,this):this._yoyo},x},!0),$e._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(p,pt,Z){var ft=function(m){pt.call(this,m),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var f,C,M=this.vars;for(C in M)f=M[C],Y(f)&&f.join("").indexOf("{self}")!==-1&&(M[C]=this._swapSelfInParams(f));Y(M.tweens)&&this.add(M.tweens,0,M.align,M.stagger)},at=1e-10,x=Z._internals,mt=ft._internals={},Ct=x.isSelector,Y=x.isArray,ht=x.lazyTweens,wt=x.lazyRender,ct=$e._gsDefine.globals,Pt=function(m){var f,C={};for(f in m)C[f]=m[f];return C},Ot=function(m,f,C){var M,G,b=m.cycle;for(M in b)G=b[M],m[M]=typeof G=="function"?G(C,f[C]):G[C%G.length];delete m.cycle},xt=mt.pauseCallback=function(){},Q=function(m){var f,C=[],M=m.length;for(f=0;f!==M;C.push(m[f++]));return C},H=ft.prototype=new pt;return ft.version="2.0.2",H.constructor=ft,H.kill()._gc=H._forcingPlayhead=H._hasPause=!1,H.to=function(m,f,C,M){var G=C.repeat&&ct.TweenMax||Z;return f?this.add(new G(m,f,C),M):this.set(m,C,M)},H.from=function(m,f,C,M){return this.add((C.repeat&&ct.TweenMax||Z).from(m,f,C),M)},H.fromTo=function(m,f,C,M,G){var b=M.repeat&&ct.TweenMax||Z;return f?this.add(b.fromTo(m,f,C,M),G):this.set(m,M,G)},H.staggerTo=function(m,f,C,M,G,b,F,q){var st,it,Lt=new ft({onComplete:b,onCompleteParams:F,callbackScope:q,smoothChildTiming:this.smoothChildTiming}),bt=C.cycle;for(typeof m=="string"&&(m=Z.selector(m)||m),m=m||[],Ct(m)&&(m=Q(m)),M=M||0,0>M&&(m=Q(m),m.reverse(),M*=-1),it=0;it<m.length;it++)st=Pt(C),st.startAt&&(st.startAt=Pt(st.startAt),st.startAt.cycle&&Ot(st.startAt,m,it)),bt&&(Ot(st,m,it),st.duration!=null&&(f=st.duration,delete st.duration)),Lt.to(m[it],f,st,it*M);return this.add(Lt,G)},H.staggerFrom=function(m,f,C,M,G,b,F,q){return C.immediateRender=C.immediateRender!=0,C.runBackwards=!0,this.staggerTo(m,f,C,M,G,b,F,q)},H.staggerFromTo=function(m,f,C,M,G,b,F,q,st){return M.startAt=C,M.immediateRender=M.immediateRender!=0&&C.immediateRender!=0,this.staggerTo(m,f,M,G,b,F,q,st)},H.call=function(m,f,C,M){return this.add(Z.delayedCall(0,m,f,C),M)},H.set=function(m,f,C){return C=this._parseTimeOrLabel(C,0,!0),f.immediateRender==null&&(f.immediateRender=C===this._time&&!this._paused),this.add(new Z(m,0,f),C)},ft.exportRoot=function(m,f){m=m||{},m.smoothChildTiming==null&&(m.smoothChildTiming=!0);var C,M,G,b,F=new ft(m),q=F._timeline;for(f==null&&(f=!0),q._remove(F,!0),F._startTime=0,F._rawPrevTime=F._time=F._totalTime=q._time,G=q._first;G;)b=G._next,f&&G instanceof Z&&G.target===G.vars.onComplete||(M=G._startTime-G._delay,0>M&&(C=1),F.add(G,M)),G=b;return q.add(F,0),C&&F.totalDuration(),F},H.add=function(m,f,C,M){var G,b,F,q,st,it;if(typeof f!="number"&&(f=this._parseTimeOrLabel(f,0,!0,m)),!(m instanceof p)){if(m instanceof Array||m&&m.push&&Y(m)){for(C=C||"normal",M=M||0,G=f,b=m.length,F=0;b>F;F++)Y(q=m[F])&&(q=new ft({tweens:q})),this.add(q,G),typeof q!="string"&&typeof q!="function"&&(C==="sequence"?G=q._startTime+q.totalDuration()/q._timeScale:C==="start"&&(q._startTime-=q.delay())),G+=M;return this._uncache(!0)}if(typeof m=="string")return this.addLabel(m,f);if(typeof m!="function")throw"Cannot add "+m+" into the timeline; it is not a tween, timeline, function, or string.";m=Z.delayedCall(0,m)}if(pt.prototype.add.call(this,m,f),m._time&&(G=Math.max(0,Math.min(m.totalDuration(),(this.rawTime()-m._startTime)*m._timeScale)),Math.abs(G-m._totalTime)>1e-5&&m.render(G,!1,!1)),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(st=this,it=st.rawTime()>m._startTime;st._timeline;)it&&st._timeline.smoothChildTiming?st.totalTime(st._totalTime,!0):st._gc&&st._enabled(!0,!1),st=st._timeline;return this},H.remove=function(m){if(m instanceof p){this._remove(m,!1);var f=m._timeline=m.vars.useFrames?p._rootFramesTimeline:p._rootTimeline;return m._startTime=(m._paused?m._pauseTime:f._time)-(m._reversed?m.totalDuration()-m._totalTime:m._totalTime)/m._timeScale,this}if(m instanceof Array||m&&m.push&&Y(m)){for(var C=m.length;--C>-1;)this.remove(m[C]);return this}return typeof m=="string"?this.removeLabel(m):this.kill(null,m)},H._remove=function(m,f){pt.prototype._remove.call(this,m,f);var C=this._last;return C?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},H.append=function(m,f){return this.add(m,this._parseTimeOrLabel(null,f,!0,m))},H.insert=H.insertMultiple=function(m,f,C,M){return this.add(m,f||0,C,M)},H.appendMultiple=function(m,f,C,M){return this.add(m,this._parseTimeOrLabel(null,f,!0,m),C,M)},H.addLabel=function(m,f){return this._labels[m]=this._parseTimeOrLabel(f),this},H.addPause=function(m,f,C,M){var G=Z.delayedCall(0,xt,C,M||this);return G.vars.onComplete=G.vars.onReverseComplete=f,G.data="isPause",this._hasPause=!0,this.add(G,m)},H.removeLabel=function(m){return delete this._labels[m],this},H.getLabelTime=function(m){return this._labels[m]!=null?this._labels[m]:-1},H._parseTimeOrLabel=function(m,f,C,M){var G,b;if(M instanceof p&&M.timeline===this)this.remove(M);else if(M&&(M instanceof Array||M.push&&Y(M)))for(b=M.length;--b>-1;)M[b]instanceof p&&M[b].timeline===this&&this.remove(M[b]);if(G=typeof m!="number"||f?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,typeof f=="string")return this._parseTimeOrLabel(f,C&&typeof m=="number"&&this._labels[f]==null?m-G:0,C);if(f=f||0,typeof m!="string"||!isNaN(m)&&this._labels[m]==null)m==null&&(m=G);else{if(b=m.indexOf("="),b===-1)return this._labels[m]==null?C?this._labels[m]=G+f:f:this._labels[m]+f;f=parseInt(m.charAt(b-1)+"1",10)*Number(m.substr(b+1)),m=b>1?this._parseTimeOrLabel(m.substr(0,b-1),0,C):G}return Number(m)+f},H.seek=function(m,f){return this.totalTime(typeof m=="number"?m:this._parseTimeOrLabel(m),f!==!1)},H.stop=function(){return this.paused(!0)},H.gotoAndPlay=function(m,f){return this.play(m,f)},H.gotoAndStop=function(m,f){return this.pause(m,f)},H.render=function(m,f,C){this._gc&&this._enabled(!0,!1);var M,G,b,F,q,st,it,Lt=this._time,bt=this._dirty?this.totalDuration():this._totalDuration,Gt=this._startTime,Vt=this._timeScale,ie=this._paused;if(Lt!==this._time&&(m+=this._time-Lt),m>=bt-1e-7&&m>=0)this._totalTime=this._time=bt,this._reversed||this._hasPausedChild()||(G=!0,F="onComplete",q=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=m&&m>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===at)&&this._rawPrevTime!==m&&this._first&&(q=!0,this._rawPrevTime>at&&(F="onReverseComplete"))),this._rawPrevTime=this._duration||!f||m||this._rawPrevTime===m?m:at,m=bt+1e-4;else if(1e-7>m)if(this._totalTime=this._time=0,(Lt!==0||this._duration===0&&this._rawPrevTime!==at&&(this._rawPrevTime>0||0>m&&this._rawPrevTime>=0))&&(F="onReverseComplete",G=this._reversed),0>m)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(q=G=!0,F="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(q=!0),this._rawPrevTime=m;else{if(this._rawPrevTime=this._duration||!f||m||this._rawPrevTime===m?m:at,m===0&&G)for(M=this._first;M&&M._startTime===0;)M._duration||(G=!1),M=M._next;m=0,this._initted||(q=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!f){if(m>=Lt)for(M=this._first;M&&M._startTime<=m&&!st;)M._duration||M.data!=="isPause"||M.ratio||M._startTime===0&&this._rawPrevTime===0||(st=M),M=M._next;else for(M=this._last;M&&M._startTime>=m&&!st;)M._duration||M.data==="isPause"&&M._rawPrevTime>0&&(st=M),M=M._prev;st&&(this._time=m=st._startTime,this._totalTime=m+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=m}if(this._time!==Lt&&this._first||C||q||st){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==Lt&&m>0&&(this._active=!0),Lt===0&&this.vars.onStart&&(this._time===0&&this._duration||f||this._callback("onStart")),it=this._time,it>=Lt)for(M=this._first;M&&(b=M._next,it===this._time&&(!this._paused||ie));)(M._active||M._startTime<=it&&!M._paused&&!M._gc)&&(st===M&&this.pause(),M._reversed?M.render((M._dirty?M.totalDuration():M._totalDuration)-(m-M._startTime)*M._timeScale,f,C):M.render((m-M._startTime)*M._timeScale,f,C)),M=b;else for(M=this._last;M&&(b=M._prev,it===this._time&&(!this._paused||ie));){if(M._active||M._startTime<=Lt&&!M._paused&&!M._gc){if(st===M){for(st=M._prev;st&&st.endTime()>this._time;)st.render(st._reversed?st.totalDuration()-(m-st._startTime)*st._timeScale:(m-st._startTime)*st._timeScale,f,C),st=st._prev;st=null,this.pause()}M._reversed?M.render((M._dirty?M.totalDuration():M._totalDuration)-(m-M._startTime)*M._timeScale,f,C):M.render((m-M._startTime)*M._timeScale,f,C)}M=b}this._onUpdate&&(f||(ht.length&&wt(),this._callback("onUpdate"))),F&&(this._gc||(Gt===this._startTime||Vt!==this._timeScale)&&(this._time===0||bt>=this.totalDuration())&&(G&&(ht.length&&wt(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!f&&this.vars[F]&&this._callback(F)))}},H._hasPausedChild=function(){for(var m=this._first;m;){if(m._paused||m instanceof ft&&m._hasPausedChild())return!0;m=m._next}return!1},H.getChildren=function(m,f,C,M){M=M||-9999999999;for(var G=[],b=this._first,F=0;b;)b._startTime<M||(b instanceof Z?f!==!1&&(G[F++]=b):(C!==!1&&(G[F++]=b),m!==!1&&(G=G.concat(b.getChildren(!0,f,C)),F=G.length))),b=b._next;return G},H.getTweensOf=function(m,f){var C,M,G=this._gc,b=[],F=0;for(G&&this._enabled(!0,!0),C=Z.getTweensOf(m),M=C.length;--M>-1;)(C[M].timeline===this||f&&this._contains(C[M]))&&(b[F++]=C[M]);return G&&this._enabled(!1,!0),b},H.recent=function(){return this._recent},H._contains=function(m){for(var f=m.timeline;f;){if(f===this)return!0;f=f.timeline}return!1},H.shiftChildren=function(m,f,C){C=C||0;for(var M,G=this._first,b=this._labels;G;)G._startTime>=C&&(G._startTime+=m),G=G._next;if(f)for(M in b)b[M]>=C&&(b[M]+=m);return this._uncache(!0)},H._kill=function(m,f){if(!m&&!f)return this._enabled(!1,!1);for(var C=f?this.getTweensOf(f):this.getChildren(!0,!0,!1),M=C.length,G=!1;--M>-1;)C[M]._kill(m,f)&&(G=!0);return G},H.clear=function(m){var f=this.getChildren(!1,!0,!0),C=f.length;for(this._time=this._totalTime=0;--C>-1;)f[C]._enabled(!1,!1);return m!==!1&&(this._labels={}),this._uncache(!0)},H.invalidate=function(){for(var m=this._first;m;)m.invalidate(),m=m._next;return p.prototype.invalidate.call(this)},H._enabled=function(m,f){if(m===this._gc)for(var C=this._first;C;)C._enabled(m,!0),C=C._next;return pt.prototype._enabled.call(this,m,f)},H.totalTime=function(m,f,C){this._forcingPlayhead=!0;var M=p.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,M},H.duration=function(m){return arguments.length?(this.duration()!==0&&m!==0&&this.timeScale(this._duration/m),this):(this._dirty&&this.totalDuration(),this._duration)},H.totalDuration=function(m){if(!arguments.length){if(this._dirty){for(var f,C,M=0,G=this._last,b=999999999999;G;)f=G._prev,G._dirty&&G.totalDuration(),G._startTime>b&&this._sortChildren&&!G._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(G,G._startTime-G._delay),this._calculatingDuration=0):b=G._startTime,G._startTime<0&&!G._paused&&(M-=G._startTime,this._timeline.smoothChildTiming&&(this._startTime+=G._startTime/this._timeScale,this._time-=G._startTime,this._totalTime-=G._startTime,this._rawPrevTime-=G._startTime),this.shiftChildren(-G._startTime,!1,-9999999999),b=0),C=G._startTime+G._totalDuration/G._timeScale,C>M&&(M=C),G=f;this._duration=this._totalDuration=M,this._dirty=!1}return this._totalDuration}return m&&this.totalDuration()?this.timeScale(this._totalDuration/m):this},H.paused=function(m){if(!m)for(var f=this._first,C=this._time;f;)f._startTime===C&&f.data==="isPause"&&(f._rawPrevTime=0),f=f._next;return p.prototype.paused.apply(this,arguments)},H.usesFrames=function(){for(var m=this._timeline;m._timeline;)m=m._timeline;return m===p._rootFramesTimeline},H.rawTime=function(m){return m&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(m)-this._startTime)*this._timeScale},ft},!0),$e._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(p,pt,Z){var ft=function(ct){p.call(this,ct),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},at=1e-10,x=pt._internals,mt=x.lazyTweens,Ct=x.lazyRender,Y=$e._gsDefine.globals,ht=new Z(null,null,1,0),wt=ft.prototype=new p;return wt.constructor=ft,wt.kill()._gc=!1,ft.version="2.0.2",wt.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),p.prototype.invalidate.call(this)},wt.addCallback=function(ct,Pt,Ot,xt){return this.add(pt.delayedCall(0,ct,Ot,xt),Pt)},wt.removeCallback=function(ct,Pt){if(ct)if(Pt==null)this._kill(null,ct);else for(var Ot=this.getTweensOf(ct,!1),xt=Ot.length,Q=this._parseTimeOrLabel(Pt);--xt>-1;)Ot[xt]._startTime===Q&&Ot[xt]._enabled(!1,!1);return this},wt.removePause=function(ct){return this.removeCallback(p._internals.pauseCallback,ct)},wt.tweenTo=function(ct,Pt){Pt=Pt||{};var Ot,xt,Q,H={ease:ht,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},m=Pt.repeat&&Y.TweenMax||pt;for(xt in Pt)H[xt]=Pt[xt];return H.time=this._parseTimeOrLabel(ct),Ot=Math.abs(Number(H.time)-this._time)/this._timeScale||.001,Q=new m(this,Ot,H),H.onStart=function(){Q.target.paused(!0),Q.vars.time===Q.target.time()||Ot!==Q.duration()||Q.isFromTo||Q.duration(Math.abs(Q.vars.time-Q.target.time())/Q.target._timeScale).render(Q.time(),!0,!0),Pt.onStart&&Pt.onStart.apply(Pt.onStartScope||Pt.callbackScope||Q,Pt.onStartParams||[])},Q},wt.tweenFromTo=function(ct,Pt,Ot){Ot=Ot||{},ct=this._parseTimeOrLabel(ct),Ot.startAt={onComplete:this.seek,onCompleteParams:[ct],callbackScope:this},Ot.immediateRender=Ot.immediateRender!==!1;var xt=this.tweenTo(Pt,Ot);return xt.isFromTo=1,xt.duration(Math.abs(xt.vars.time-ct)/this._timeScale||.001)},wt.render=function(ct,Pt,Ot){this._gc&&this._enabled(!0,!1);var xt,Q,H,m,f,C,M,G,b=this._time,F=this._dirty?this.totalDuration():this._totalDuration,q=this._duration,st=this._totalTime,it=this._startTime,Lt=this._timeScale,bt=this._rawPrevTime,Gt=this._paused,Vt=this._cycle;if(b!==this._time&&(ct+=this._time-b),ct>=F-1e-7&&ct>=0)this._locked||(this._totalTime=F,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(Q=!0,m="onComplete",f=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=ct&&ct>=-1e-7||0>bt||bt===at)&&bt!==ct&&this._first&&(f=!0,bt>at&&(m="onReverseComplete"))),this._rawPrevTime=this._duration||!Pt||ct||this._rawPrevTime===ct?ct:at,this._yoyo&&1&this._cycle?this._time=ct=0:(this._time=q,ct=q+1e-4);else if(1e-7>ct)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(b!==0||q===0&&bt!==at&&(bt>0||0>ct&&bt>=0)&&!this._locked)&&(m="onReverseComplete",Q=this._reversed),0>ct)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(f=Q=!0,m="onReverseComplete"):bt>=0&&this._first&&(f=!0),this._rawPrevTime=ct;else{if(this._rawPrevTime=q||!Pt||ct||this._rawPrevTime===ct?ct:at,ct===0&&Q)for(xt=this._first;xt&&xt._startTime===0;)xt._duration||(Q=!1),xt=xt._next;ct=0,this._initted||(f=!0)}else if(q===0&&0>bt&&(f=!0),this._time=this._rawPrevTime=ct,this._locked||(this._totalTime=ct,this._repeat!==0&&(C=q+this._repeatDelay,this._cycle=this._totalTime/C>>0,this._cycle!==0&&this._cycle===this._totalTime/C&&ct>=st&&this._cycle--,this._time=this._totalTime-this._cycle*C,this._yoyo&&1&this._cycle&&(this._time=q-this._time),this._time>q?(this._time=q,ct=q+1e-4):this._time<0?this._time=ct=0:ct=this._time)),this._hasPause&&!this._forcingPlayhead&&!Pt){if(ct=this._time,ct>=b||this._repeat&&Vt!==this._cycle)for(xt=this._first;xt&&xt._startTime<=ct&&!M;)xt._duration||xt.data!=="isPause"||xt.ratio||xt._startTime===0&&this._rawPrevTime===0||(M=xt),xt=xt._next;else for(xt=this._last;xt&&xt._startTime>=ct&&!M;)xt._duration||xt.data==="isPause"&&xt._rawPrevTime>0&&(M=xt),xt=xt._prev;M&&M._startTime<q&&(this._time=ct=M._startTime,this._totalTime=ct+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==Vt&&!this._locked){var ie=this._yoyo&&(1&Vt)!==0,ut=ie===(this._yoyo&&(1&this._cycle)!==0),kt=this._totalTime,Me=this._cycle,gi=this._rawPrevTime,Rt=this._time;if(this._totalTime=Vt*q,this._cycle<Vt?ie=!ie:this._totalTime+=q,this._time=b,this._rawPrevTime=q===0?bt-1e-4:bt,this._cycle=Vt,this._locked=!0,b=ie?0:q,this.render(b,Pt,q===0),Pt||this._gc||this.vars.onRepeat&&(this._cycle=Me,this._locked=!1,this._callback("onRepeat")),b!==this._time||(ut&&(this._cycle=Vt,this._locked=!0,b=ie?q+1e-4:-1e-4,this.render(b,!0,!1)),this._locked=!1,this._paused&&!Gt))return;this._time=Rt,this._totalTime=kt,this._cycle=Me,this._rawPrevTime=gi}if(!(this._time!==b&&this._first||Ot||f||M))return void(st!==this._totalTime&&this._onUpdate&&(Pt||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==st&&ct>0&&(this._active=!0),st===0&&this.vars.onStart&&(this._totalTime===0&&this._totalDuration||Pt||this._callback("onStart")),G=this._time,G>=b)for(xt=this._first;xt&&(H=xt._next,G===this._time&&(!this._paused||Gt));)(xt._active||xt._startTime<=this._time&&!xt._paused&&!xt._gc)&&(M===xt&&this.pause(),xt._reversed?xt.render((xt._dirty?xt.totalDuration():xt._totalDuration)-(ct-xt._startTime)*xt._timeScale,Pt,Ot):xt.render((ct-xt._startTime)*xt._timeScale,Pt,Ot)),xt=H;else for(xt=this._last;xt&&(H=xt._prev,G===this._time&&(!this._paused||Gt));){if(xt._active||xt._startTime<=b&&!xt._paused&&!xt._gc){if(M===xt){for(M=xt._prev;M&&M.endTime()>this._time;)M.render(M._reversed?M.totalDuration()-(ct-M._startTime)*M._timeScale:(ct-M._startTime)*M._timeScale,Pt,Ot),M=M._prev;M=null,this.pause()}xt._reversed?xt.render((xt._dirty?xt.totalDuration():xt._totalDuration)-(ct-xt._startTime)*xt._timeScale,Pt,Ot):xt.render((ct-xt._startTime)*xt._timeScale,Pt,Ot)}xt=H}this._onUpdate&&(Pt||(mt.length&&Ct(),this._callback("onUpdate"))),m&&(this._locked||this._gc||(it===this._startTime||Lt!==this._timeScale)&&(this._time===0||F>=this.totalDuration())&&(Q&&(mt.length&&Ct(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!Pt&&this.vars[m]&&this._callback(m)))},wt.getActive=function(ct,Pt,Ot){ct==null&&(ct=!0),Pt==null&&(Pt=!0),Ot==null&&(Ot=!1);var xt,Q,H=[],m=this.getChildren(ct,Pt,Ot),f=0,C=m.length;for(xt=0;C>xt;xt++)Q=m[xt],Q.isActive()&&(H[f++]=Q);return H},wt.getLabelAfter=function(ct){ct||ct!==0&&(ct=this._time);var Pt,Ot=this.getLabelsArray(),xt=Ot.length;for(Pt=0;xt>Pt;Pt++)if(Ot[Pt].time>ct)return Ot[Pt].name;return null},wt.getLabelBefore=function(ct){ct==null&&(ct=this._time);for(var Pt=this.getLabelsArray(),Ot=Pt.length;--Ot>-1;)if(Pt[Ot].time<ct)return Pt[Ot].name;return null},wt.getLabelsArray=function(){var ct,Pt=[],Ot=0;for(ct in this._labels)Pt[Ot++]={time:this._labels[ct],name:ct};return Pt.sort(function(xt,Q){return xt.time-Q.time}),Pt},wt.invalidate=function(){return this._locked=!1,p.prototype.invalidate.call(this)},wt.progress=function(ct,Pt){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-ct:ct)+this._cycle*(this._duration+this._repeatDelay),Pt):this._time/this.duration()||0},wt.totalProgress=function(ct,Pt){return arguments.length?this.totalTime(this.totalDuration()*ct,Pt):this._totalTime/this.totalDuration()||0},wt.totalDuration=function(ct){return arguments.length?this._repeat!==-1&&ct?this.timeScale(this.totalDuration()/ct):this:(this._dirty&&(p.prototype.totalDuration.call(this),this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},wt.time=function(ct,Pt){return arguments.length?(this._dirty&&this.totalDuration(),ct>this._duration&&(ct=this._duration),this._yoyo&&1&this._cycle?ct=this._duration-ct+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(ct+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(ct,Pt)):this._time},wt.repeat=function(ct){return arguments.length?(this._repeat=ct,this._uncache(!0)):this._repeat},wt.repeatDelay=function(ct){return arguments.length?(this._repeatDelay=ct,this._uncache(!0)):this._repeatDelay},wt.yoyo=function(ct){return arguments.length?(this._yoyo=ct,this):this._yoyo},wt.currentLabel=function(ct){return arguments.length?this.seek(ct,!0):this.getLabelBefore(this._time+1e-8)},ft},!0),function(){var p=180/Math.PI,pt=[],Z=[],ft=[],at={},x=$e._gsDefine.globals,mt=function(m,f,C,M){C===M&&(C=M-(M-f)/1e6),m===f&&(f=m+(C-m)/1e6),this.a=m,this.b=f,this.c=C,this.d=M,this.da=M-m,this.ca=C-m,this.ba=f-m},Ct=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",Y=function(m,f,C,M){var G={a:m},b={},F={},q={c:M},st=(m+f)/2,it=(f+C)/2,Lt=(C+M)/2,bt=(st+it)/2,Gt=(it+Lt)/2,Vt=(Gt-bt)/8;return G.b=st+(m-st)/4,b.b=bt+Vt,G.c=b.a=(G.b+b.b)/2,b.c=F.a=(bt+Gt)/2,F.b=Gt-Vt,q.b=Lt+(M-Lt)/4,F.c=q.a=(F.b+q.b)/2,[G,b,F,q]},ht=function(m,f,C,M,G){var b,F,q,st,it,Lt,bt,Gt,Vt,ie,ut,kt,Me,gi=m.length-1,Rt=0,Fe=m[0].a;for(b=0;gi>b;b++)it=m[Rt],F=it.a,q=it.d,st=m[Rt+1].d,G?(ut=pt[b],kt=Z[b],Me=(kt+ut)*f*.25/(M?.5:ft[b]||.5),Lt=q-(q-F)*(M?.5*f:ut!==0?Me/ut:0),bt=q+(st-q)*(M?.5*f:kt!==0?Me/kt:0),Gt=q-(Lt+((bt-Lt)*(3*ut/(ut+kt)+.5)/4||0))):(Lt=q-(q-F)*f*.5,bt=q+(st-q)*f*.5,Gt=q-(Lt+bt)/2),Lt+=Gt,bt+=Gt,it.c=Vt=Lt,b!==0?it.b=Fe:it.b=Fe=it.a+.6*(it.c-it.a),it.da=q-F,it.ca=Vt-F,it.ba=Fe-F,C?(ie=Y(F,Fe,Vt,q),m.splice(Rt,1,ie[0],ie[1],ie[2],ie[3]),Rt+=4):Rt++,Fe=bt;it=m[Rt],it.b=Fe,it.c=Fe+.4*(it.d-Fe),it.da=it.d-it.a,it.ca=it.c-it.a,it.ba=Fe-it.a,C&&(ie=Y(it.a,Fe,it.c,it.d),m.splice(Rt,1,ie[0],ie[1],ie[2],ie[3]))},wt=function(m,f,C,M){var G,b,F,q,st,it,Lt=[];if(M)for(m=[M].concat(m),b=m.length;--b>-1;)typeof(it=m[b][f])=="string"&&it.charAt(1)==="="&&(m[b][f]=M[f]+Number(it.charAt(0)+it.substr(2)));if(G=m.length-2,0>G)return Lt[0]=new mt(m[0][f],0,0,m[0][f]),Lt;for(b=0;G>b;b++)F=m[b][f],q=m[b+1][f],Lt[b]=new mt(F,0,0,q),C&&(st=m[b+2][f],pt[b]=(pt[b]||0)+(q-F)*(q-F),Z[b]=(Z[b]||0)+(st-q)*(st-q));return Lt[b]=new mt(m[b][f],0,0,m[b+1][f]),Lt},ct=function(m,f,C,M,G,b){var F,q,st,it,Lt,bt,Gt,Vt,ie={},ut=[],kt=b||m[0];G=typeof G=="string"?","+G+",":Ct,f==null&&(f=1);for(q in m[0])ut.push(q);if(m.length>1){for(Vt=m[m.length-1],Gt=!0,F=ut.length;--F>-1;)if(q=ut[F],Math.abs(kt[q]-Vt[q])>.05){Gt=!1;break}Gt&&(m=m.concat(),b&&m.unshift(b),m.push(m[1]),b=m[m.length-3])}for(pt.length=Z.length=ft.length=0,F=ut.length;--F>-1;)q=ut[F],at[q]=G.indexOf(","+q+",")!==-1,ie[q]=wt(m,q,at[q],b);for(F=pt.length;--F>-1;)pt[F]=Math.sqrt(pt[F]),Z[F]=Math.sqrt(Z[F]);if(!M){for(F=ut.length;--F>-1;)if(at[q])for(st=ie[ut[F]],bt=st.length-1,it=0;bt>it;it++)Lt=st[it+1].da/Z[it]+st[it].da/pt[it]||0,ft[it]=(ft[it]||0)+Lt*Lt;for(F=ft.length;--F>-1;)ft[F]=Math.sqrt(ft[F])}for(F=ut.length,it=C?4:1;--F>-1;)q=ut[F],st=ie[q],ht(st,f,C,M,at[q]),Gt&&(st.splice(0,it),st.splice(st.length-it,it));return ie},Pt=function(m,f,C){f=f||"soft";var M,G,b,F,q,st,it,Lt,bt,Gt,Vt,ie={},ut=f==="cubic"?3:2,kt=f==="soft",Me=[];if(kt&&C&&(m=[C].concat(m)),m==null||m.length<ut+1)throw"invalid Bezier data";for(bt in m[0])Me.push(bt);for(st=Me.length;--st>-1;){for(bt=Me[st],ie[bt]=q=[],Gt=0,Lt=m.length,it=0;Lt>it;it++)M=C==null?m[it][bt]:typeof(Vt=m[it][bt])=="string"&&Vt.charAt(1)==="="?C[bt]+Number(Vt.charAt(0)+Vt.substr(2)):Number(Vt),kt&&it>1&&Lt-1>it&&(q[Gt++]=(M+q[Gt-2])/2),q[Gt++]=M;for(Lt=Gt-ut+1,Gt=0,it=0;Lt>it;it+=ut)M=q[it],G=q[it+1],b=q[it+2],F=ut===2?0:q[it+3],q[Gt++]=Vt=ut===3?new mt(M,G,b,F):new mt(M,(2*G+M)/3,(2*G+b)/3,b);q.length=Gt}return ie},Ot=function(m,f,C){for(var M,G,b,F,q,st,it,Lt,bt,Gt,Vt,ie=1/C,ut=m.length;--ut>-1;)for(Gt=m[ut],b=Gt.a,F=Gt.d-b,q=Gt.c-b,st=Gt.b-b,M=G=0,Lt=1;C>=Lt;Lt++)it=ie*Lt,bt=1-it,M=G-(G=(it*it*F+3*bt*(it*q+bt*st))*it),Vt=ut*C+Lt-1,f[Vt]=(f[Vt]||0)+M*M},xt=function(m,f){f=f>>0||6;var C,M,G,b,F=[],q=[],st=0,it=0,Lt=f-1,bt=[],Gt=[];for(C in m)Ot(m[C],F,f);for(G=F.length,M=0;G>M;M++)st+=Math.sqrt(F[M]),b=M%f,Gt[b]=st,b===Lt&&(it+=st,b=M/f>>0,bt[b]=Gt,q[b]=it,st=0,Gt=[]);return{length:it,lengths:q,segments:bt}},Q=$e._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(m,f,C){this._target=m,f instanceof Array&&(f={values:f}),this._func={},this._mod={},this._props=[],this._timeRes=f.timeResolution==null?6:parseInt(f.timeResolution,10);var M,G,b,F,q,st=f.values||[],it={},Lt=st[0],bt=f.autoRotate||C.vars.orientToBezier;this._autoRotate=bt?bt instanceof Array?bt:[["x","y","rotation",bt===!0?0:Number(bt)||0]]:null;for(M in Lt)this._props.push(M);for(b=this._props.length;--b>-1;)M=this._props[b],this._overwriteProps.push(M),G=this._func[M]=typeof m[M]=="function",it[M]=G?m[M.indexOf("set")||typeof m["get"+M.substr(3)]!="function"?M:"get"+M.substr(3)]():parseFloat(m[M]),q||it[M]!==st[0][M]&&(q=it);if(this._beziers=f.type!=="cubic"&&f.type!=="quadratic"&&f.type!=="soft"?ct(st,isNaN(f.curviness)?1:f.curviness,!1,f.type==="thruBasic",f.correlate,q):Pt(st,f.type,it),this._segCount=this._beziers[M].length,this._timeRes){var Gt=xt(this._beziers,this._timeRes);this._length=Gt.length,this._lengths=Gt.lengths,this._segments=Gt.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(bt=this._autoRotate)for(this._initialRotations=[],bt[0]instanceof Array||(this._autoRotate=bt=[bt]),b=bt.length;--b>-1;){for(F=0;3>F;F++)M=bt[b][F],this._func[M]=typeof m[M]=="function"?m[M.indexOf("set")||typeof m["get"+M.substr(3)]!="function"?M:"get"+M.substr(3)]:!1;M=bt[b][2],this._initialRotations[b]=(this._func[M]?this._func[M].call(this._target):this._target[M])||0,this._overwriteProps.push(M)}return this._startRatio=C.vars.runBackwards?1:0,!0},set:function(m){var f,C,M,G,b,F,q,st,it,Lt,bt=this._segCount,Gt=this._func,Vt=this._target,ie=m!==this._startRatio;if(this._timeRes){if(it=this._lengths,Lt=this._curSeg,m*=this._length,M=this._li,m>this._l2&&bt-1>M){for(st=bt-1;st>M&&(this._l2=it[++M])<=m;);this._l1=it[M-1],this._li=M,this._curSeg=Lt=this._segments[M],this._s2=Lt[this._s1=this._si=0]}else if(m<this._l1&&M>0){for(;M>0&&(this._l1=it[--M])>=m;);M===0&&m<this._l1?this._l1=0:M++,this._l2=it[M],this._li=M,this._curSeg=Lt=this._segments[M],this._s1=Lt[(this._si=Lt.length-1)-1]||0,this._s2=Lt[this._si]}if(f=M,m-=this._l1,M=this._si,m>this._s2&&M<Lt.length-1){for(st=Lt.length-1;st>M&&(this._s2=Lt[++M])<=m;);this._s1=Lt[M-1],this._si=M}else if(m<this._s1&&M>0){for(;M>0&&(this._s1=Lt[--M])>=m;);M===0&&m<this._s1?this._s1=0:M++,this._s2=Lt[M],this._si=M}F=(M+(m-this._s1)/(this._s2-this._s1))*this._prec||0}else f=0>m?0:m>=1?bt-1:bt*m>>0,F=(m-f*(1/bt))*bt;for(C=1-F,M=this._props.length;--M>-1;)G=this._props[M],b=this._beziers[G][f],q=(F*F*b.da+3*C*(F*b.ca+C*b.ba))*F+b.a,this._mod[G]&&(q=this._mod[G](q,Vt)),Gt[G]?Vt[G](q):Vt[G]=q;if(this._autoRotate){var ut,kt,Me,gi,Rt,Fe,vi,Ti=this._autoRotate;for(M=Ti.length;--M>-1;)G=Ti[M][2],Fe=Ti[M][3]||0,vi=Ti[M][4]===!0?1:p,b=this._beziers[Ti[M][0]],ut=this._beziers[Ti[M][1]],b&&ut&&(b=b[f],ut=ut[f],kt=b.a+(b.b-b.a)*F,gi=b.b+(b.c-b.b)*F,kt+=(gi-kt)*F,gi+=(b.c+(b.d-b.c)*F-gi)*F,Me=ut.a+(ut.b-ut.a)*F,Rt=ut.b+(ut.c-ut.b)*F,Me+=(Rt-Me)*F,Rt+=(ut.c+(ut.d-ut.c)*F-Rt)*F,q=ie?Math.atan2(Rt-Me,gi-kt)*vi+Fe:this._initialRotations[M],this._mod[G]&&(q=this._mod[G](q,Vt)),Gt[G]?Vt[G](q):Vt[G]=q)}}}),H=Q.prototype;Q.bezierThrough=ct,Q.cubicToQuadratic=Y,Q._autoCSS=!0,Q.quadraticToCubic=function(m,f,C){return new mt(m,(2*f+m)/3,(2*f+C)/3,C)},Q._cssRegister=function(){var m=x.CSSPlugin;if(m){var f=m._internals,C=f._parseToProxy,M=f._setPluginRatio,G=f.CSSPropTween;f._registerComplexSpecialProp("bezier",{parser:function(b,F,q,st,it,Lt){F instanceof Array&&(F={values:F}),Lt=new Q;var bt,Gt,Vt,ie=F.values,ut=ie.length-1,kt=[],Me={};if(0>ut)return it;for(bt=0;ut>=bt;bt++)Vt=C(b,ie[bt],st,it,Lt,ut!==bt),kt[bt]=Vt.end;for(Gt in F)Me[Gt]=F[Gt];return Me.values=kt,it=new G(b,"bezier",0,0,Vt.pt,2),it.data=Vt,it.plugin=Lt,it.setRatio=M,Me.autoRotate===0&&(Me.autoRotate=!0),!Me.autoRotate||Me.autoRotate instanceof Array||(bt=Me.autoRotate===!0?0:Number(Me.autoRotate),Me.autoRotate=Vt.end.left!=null?[["left","top","rotation",bt,!1]]:Vt.end.x!=null?[["x","y","rotation",bt,!1]]:!1),Me.autoRotate&&(st._transform||st._enableTransforms(!1),Vt.autoRotate=st._target._gsTransform,Vt.proxy.rotation=Vt.autoRotate.rotation||0,st._overwriteProps.push("rotation")),Lt._onInitTween(Vt.proxy,Me,st._tween),it}})}},H._mod=function(m){for(var f,C=this._overwriteProps,M=C.length;--M>-1;)f=m[C[M]],f&&typeof f=="function"&&(this._mod[C[M]]=f)},H._kill=function(m){var f,C,M=this._props;for(f in this._beziers)if(f in m)for(delete this._beziers[f],delete this._func[f],C=M.length;--C>-1;)M[C]===f&&M.splice(C,1);if(M=this._autoRotate)for(C=M.length;--C>-1;)m[M[C][2]]&&M.splice(C,1);return this._super._kill.call(this,m)}}(),$e._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(p,pt){var Z,ft,at,x,mt=function(){p.call(this,"css"),this._overwriteProps.length=0,this.setRatio=mt.prototype.setRatio},Ct=$e._gsDefine.globals,Y={},ht=mt.prototype=new p("css");ht.constructor=mt,mt.version="2.0.2",mt.API=2,mt.defaultTransformPerspective=0,mt.defaultSkewType="compensated",mt.defaultSmoothOrigin=!0,ht="px",mt.suffixMap={top:ht,right:ht,bottom:ht,left:ht,width:ht,height:ht,fontSize:ht,padding:ht,margin:ht,perspective:ht,lineHeight:""};var wt,ct,Pt,Ot,xt,Q,H,m,f=/(?:\-|\.|\b)(\d|\.|e\-)+/g,C=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,M=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,G=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,b=/(?:\d|\-|\+|=|#|\.)*/g,F=/opacity *= *([^)]*)/i,q=/opacity:([^;]*)/i,st=/alpha\(opacity *=.+?\)/i,it=/^(rgb|hsl)/,Lt=/([A-Z])/g,bt=/-([a-z])/gi,Gt=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,Vt=function(v,E){return E.toUpperCase()},ie=/(?:Left|Right|Width)/i,ut=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,kt=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,Me=/,(?=[^\)]*(?:\(|$))/gi,gi=/[\s,\(]/i,Rt=Math.PI/180,Fe=180/Math.PI,vi={},Ti={style:{}},oi=$e.document||{createElement:function(){return Ti}},fe=function(v,E){return oi.createElementNS?oi.createElementNS(E||"http://www.w3.org/1999/xhtml",v):oi.createElement(v)},Je=fe("div"),bi=fe("img"),Ce=mt._internals={_specialProps:Y},je=($e.navigator||{}).userAgent||"",Ke=function(){var v=je.indexOf("Android"),E=fe("a");return Pt=je.indexOf("Safari")!==-1&&je.indexOf("Chrome")===-1&&(v===-1||parseFloat(je.substr(v+8,2))>3),xt=Pt&&parseFloat(je.substr(je.indexOf("Version/")+8,2))<6,Ot=je.indexOf("Firefox")!==-1,(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(je)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(je))&&(Q=parseFloat(RegExp.$1)),E?(E.style.cssText="top:1px;opacity:.55;",/^0.55/.test(E.style.opacity)):!1}(),Mn=function(v){return F.test(typeof v=="string"?v:(v.currentStyle?v.currentStyle.filter:v.style.filter)||"")?parseFloat(RegExp.$1)/100:1},Rn=function(v){$e.console&&console.log(v)},Vi="",Di="",en=function(v,E){E=E||Je;var R,L,y=E.style;if(y[v]!==void 0)return v;for(v=v.charAt(0).toUpperCase()+v.substr(1),R=["O","Moz","ms","Ms","Webkit"],L=5;--L>-1&&y[R[L]+v]===void 0;);return L>=0?(Di=L===3?"ms":R[L],Vi="-"+Di.toLowerCase()+"-",Di+v):null},ci=(typeof window<"u"?window:oi.defaultView||{getComputedStyle:function(){}}).getComputedStyle,Oe=mt.getStyle=function(v,E,R,L,y){var X;return Ke||E!=="opacity"?(!L&&v.style[E]?X=v.style[E]:(R=R||ci(v))?X=R[E]||R.getPropertyValue(E)||R.getPropertyValue(E.replace(Lt,"-$1").toLowerCase()):v.currentStyle&&(X=v.currentStyle[E]),y==null||X&&X!=="none"&&X!=="auto"&&X!=="auto auto"?X:y):Mn(v)},Si=Ce.convertToPixels=function(v,E,R,L,y){if(L==="px"||!L&&E!=="lineHeight")return R;if(L==="auto"||!R)return 0;var X,O,K,rt=ie.test(E),et=v,W=Je.style,St=0>R,Et=R===1;if(St&&(R=-R),Et&&(R*=100),E!=="lineHeight"||L)if(L==="%"&&E.indexOf("border")!==-1)X=R/100*(rt?v.clientWidth:v.clientHeight);else{if(W.cssText="border:0 solid red;position:"+Oe(v,"position")+";line-height:0;",L!=="%"&&et.appendChild&&L.charAt(0)!=="v"&&L!=="rem")W[rt?"borderLeftWidth":"borderTopWidth"]=R+L;else{if(et=v.parentNode||oi.body,Oe(et,"display").indexOf("flex")!==-1&&(W.position="absolute"),O=et._gsCache,K=pt.ticker.frame,O&&rt&&O.time===K)return O.width*R/100;W[rt?"width":"height"]=R+L}et.appendChild(Je),X=parseFloat(Je[rt?"offsetWidth":"offsetHeight"]),et.removeChild(Je),rt&&L==="%"&&mt.cacheWidths!==!1&&(O=et._gsCache=et._gsCache||{},O.time=K,O.width=X/R*100),X!==0||y||(X=Si(v,E,R,L,!0))}else O=ci(v).lineHeight,v.style.lineHeight=R,X=parseFloat(ci(v).lineHeight),v.style.lineHeight=O;return Et&&(X/=100),St?-X:X},Tn=Ce.calculateOffset=function(v,E,R){if(Oe(v,"position",R)!=="absolute")return 0;var L=E==="left"?"Left":"Top",y=Oe(v,"margin"+L,R);return v["offset"+L]-(Si(v,E,parseFloat(y),y.replace(b,""))||0)},nn=function(v,E){var R,L,y,X={};if(E=E||ci(v,null))if(R=E.length)for(;--R>-1;)y=E[R],(y.indexOf("-transform")===-1||zr===y)&&(X[y.replace(bt,Vt)]=E.getPropertyValue(y));else for(R in E)(R.indexOf("Transform")===-1||ui===R)&&(X[R]=E[R]);else if(E=v.currentStyle||v.style)for(R in E)typeof R=="string"&&X[R]===void 0&&(X[R.replace(bt,Vt)]=E[R]);return Ke||(X.opacity=Mn(v)),L=sn(v,E,!1),X.rotation=L.rotation,X.skewX=L.skewX,X.scaleX=L.scaleX,X.scaleY=L.scaleY,X.x=L.x,X.y=L.y,Gi&&(X.z=L.z,X.rotationX=L.rotationX,X.rotationY=L.rotationY,X.scaleZ=L.scaleZ),X.filters&&delete X.filters,X},Ri=function(v,E,R,L,y){var X,O,K,rt={},et=v.style;for(O in R)O!=="cssText"&&O!=="length"&&isNaN(O)&&(E[O]!==(X=R[O])||y&&y[O])&&O.indexOf("Origin")===-1&&(typeof X=="number"||typeof X=="string")&&(rt[O]=X!=="auto"||O!=="left"&&O!=="top"?X!==""&&X!=="auto"&&X!=="none"||typeof E[O]!="string"||E[O].replace(G,"")===""?X:0:Tn(v,O),et[O]!==void 0&&(K=new Re(et,O,et[O],K)));if(L)for(O in L)O!=="className"&&(rt[O]=L[O]);return{difs:rt,firstMPT:K}},_={width:["Left","Right"],height:["Top","Bottom"]},D=["marginLeft","marginRight","marginTop","marginBottom"],B=function(v,E,R){if((v.nodeName+"").toLowerCase()==="svg")return(R||ci(v))[E]||0;if(v.getCTM&&Br(v))return v.getBBox()[E]||0;var L=parseFloat(E==="width"?v.offsetWidth:v.offsetHeight),y=_[E],X=y.length;for(R=R||ci(v,null);--X>-1;)L-=parseFloat(Oe(v,"padding"+y[X],R,!0))||0,L-=parseFloat(Oe(v,"border"+y[X]+"Width",R,!0))||0;return L},U=function(v,E){if(v==="contain"||v==="auto"||v==="auto auto")return v+" ";(v==null||v==="")&&(v="0 0");var R,L=v.split(" "),y=v.indexOf("left")!==-1?"0%":v.indexOf("right")!==-1?"100%":L[0],X=v.indexOf("top")!==-1?"0%":v.indexOf("bottom")!==-1?"100%":L[1];if(L.length>3&&!E){for(L=v.split(", ").join(",").split(","),v=[],R=0;R<L.length;R++)v.push(U(L[R]));return v.join(",")}return X==null?X=y==="center"?"50%":"0":X==="center"&&(X="50%"),(y==="center"||isNaN(parseFloat(y))&&(y+"").indexOf("=")===-1)&&(y="50%"),v=y+" "+X+(L.length>2?" "+L[2]:""),E&&(E.oxp=y.indexOf("%")!==-1,E.oyp=X.indexOf("%")!==-1,E.oxr=y.charAt(1)==="=",E.oyr=X.charAt(1)==="=",E.ox=parseFloat(y.replace(G,"")),E.oy=parseFloat(X.replace(G,"")),E.v=v),E||v},$=function(v,E){return typeof v=="function"&&(v=v(m,H)),typeof v=="string"&&v.charAt(1)==="="?parseInt(v.charAt(0)+"1",10)*parseFloat(v.substr(2)):parseFloat(v)-parseFloat(E)||0},gt=function(v,E){typeof v=="function"&&(v=v(m,H));var R=typeof v=="string"&&v.charAt(1)==="=";return typeof v=="string"&&v.charAt(v.length-2)==="v"&&(v=(R?v.substr(0,2):0)+window["inner"+(v.substr(-2)==="vh"?"Height":"Width")]*(parseFloat(R?v.substr(2):v)/100)),v==null?E:R?parseInt(v.charAt(0)+"1",10)*parseFloat(v.substr(2))+E:parseFloat(v)||0},Tt=function(v,E,R,L){var y,X,O,K,rt,et=1e-6;return typeof v=="function"&&(v=v(m,H)),v==null?K=E:typeof v=="number"?K=v:(y=360,X=v.split("_"),rt=v.charAt(1)==="=",O=(rt?parseInt(v.charAt(0)+"1",10)*parseFloat(X[0].substr(2)):parseFloat(X[0]))*(v.indexOf("rad")===-1?1:Fe)-(rt?0:E),X.length&&(L&&(L[R]=E+O),v.indexOf("short")!==-1&&(O%=y,O!==O%(y/2)&&(O=0>O?O+y:O-y)),v.indexOf("_cw")!==-1&&0>O?O=(O+9999999999*y)%y-(O/y|0)*y:v.indexOf("ccw")!==-1&&O>0&&(O=(O-9999999999*y)%y-(O/y|0)*y)),K=E+O),et>K&&K>-et&&(K=0),K},dt={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ae=function(v,E,R){return v=0>v?v+1:v>1?v-1:v,255*(1>6*v?E+(R-E)*v*6:.5>v?R:2>3*v?E+(R-E)*(2/3-v)*6:E)+.5|0},se=mt.parseColor=function(v,E){var R,L,y,X,O,K,rt,et,W,St,Et;if(v)if(typeof v=="number")R=[v>>16,v>>8&255,255&v];else{if(v.charAt(v.length-1)===","&&(v=v.substr(0,v.length-1)),dt[v])R=dt[v];else if(v.charAt(0)==="#")v.length===4&&(L=v.charAt(1),y=v.charAt(2),X=v.charAt(3),v="#"+L+L+y+y+X+X),v=parseInt(v.substr(1),16),R=[v>>16,v>>8&255,255&v];else if(v.substr(0,3)==="hsl")if(R=Et=v.match(f),E){if(v.indexOf("=")!==-1)return v.match(C)}else O=Number(R[0])%360/360,K=Number(R[1])/100,rt=Number(R[2])/100,y=.5>=rt?rt*(K+1):rt+K-rt*K,L=2*rt-y,R.length>3&&(R[3]=Number(R[3])),R[0]=ae(O+1/3,L,y),R[1]=ae(O,L,y),R[2]=ae(O-1/3,L,y);else R=v.match(f)||dt.transparent;R[0]=Number(R[0]),R[1]=Number(R[1]),R[2]=Number(R[2]),R.length>3&&(R[3]=Number(R[3]))}else R=dt.black;return E&&!Et&&(L=R[0]/255,y=R[1]/255,X=R[2]/255,et=Math.max(L,y,X),W=Math.min(L,y,X),rt=(et+W)/2,et===W?O=K=0:(St=et-W,K=rt>.5?St/(2-et-W):St/(et+W),O=et===L?(y-X)/St+(X>y?6:0):et===y?(X-L)/St+2:(L-y)/St+4,O*=60),R[0]=O+.5|0,R[1]=100*K+.5|0,R[2]=100*rt+.5|0),R},Ut=function(v,E){var R,L,y,X=v.match(he)||[],O=0,K="";if(!X.length)return v;for(R=0;R<X.length;R++)L=X[R],y=v.substr(O,v.indexOf(L,O)-O),O+=y.length+L.length,L=se(L,E),L.length===3&&L.push(1),K+=y+(E?"hsla("+L[0]+","+L[1]+"%,"+L[2]+"%,"+L[3]:"rgba("+L.join(","))+")";return K+v.substr(O)},he="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(ht in dt)he+="|"+ht+"\\b";he=new RegExp(he+")","gi"),mt.colorStringFilter=function(v){var E,R=v[0]+" "+v[1];he.test(R)&&(E=R.indexOf("hsl(")!==-1||R.indexOf("hsla(")!==-1,v[0]=Ut(v[0],E),v[1]=Ut(v[1],E)),he.lastIndex=0},pt.defaultStringFilter||(pt.defaultStringFilter=mt.colorStringFilter);var ze=function(v,E,R,L){if(v==null)return function(Et){return Et};var y,X=E?(v.match(he)||[""])[0]:"",O=v.split(X).join("").match(M)||[],K=v.substr(0,v.indexOf(O[0])),rt=v.charAt(v.length-1)===")"?")":"",et=v.indexOf(" ")!==-1?" ":",",W=O.length,St=W>0?O[0].replace(f,""):"";return W?y=E?function(Et){var yt,Nt,At,oe;if(typeof Et=="number")Et+=St;else if(L&&Me.test(Et)){for(oe=Et.replace(Me,"|").split("|"),At=0;At<oe.length;At++)oe[At]=y(oe[At]);return oe.join(",")}if(yt=(Et.match(he)||[X])[0],Nt=Et.split(yt).join("").match(M)||[],At=Nt.length,W>At--)for(;++At<W;)Nt[At]=R?Nt[(At-1)/2|0]:O[At];return K+Nt.join(et)+et+yt+rt+(Et.indexOf("inset")!==-1?" inset":"")}:function(Et){var yt,Nt,At;if(typeof Et=="number")Et+=St;else if(L&&Me.test(Et)){for(Nt=Et.replace(Me,"|").split("|"),At=0;At<Nt.length;At++)Nt[At]=y(Nt[At]);return Nt.join(",")}if(yt=Et.match(M)||[],At=yt.length,W>At--)for(;++At<W;)yt[At]=R?yt[(At-1)/2|0]:O[At];return K+yt.join(et)+rt}:function(Et){return Et}},Xe=function(v){return v=v.split(","),function(E,R,L,y,X,O,K){var rt,et=(R+"").split(" ");for(K={},rt=0;4>rt;rt++)K[v[rt]]=et[rt]=et[rt]||et[(rt-1)/2>>0];return y.parse(E,K,X,O)}},Re=(Ce._setPluginRatio=function(v){this.plugin.setRatio(v);for(var E,R,L,y,X,O=this.data,K=O.proxy,rt=O.firstMPT,et=1e-6;rt;)E=K[rt.v],rt.r?E=rt.r(E):et>E&&E>-et&&(E=0),rt.t[rt.p]=E,rt=rt._next;if(O.autoRotate&&(O.autoRotate.rotation=O.mod?O.mod.call(this._tween,K.rotation,this.t,this._tween):K.rotation),v===1||v===0)for(rt=O.firstMPT,X=v===1?"e":"b";rt;){if(R=rt.t,R.type){if(R.type===1){for(y=R.xs0+R.s+R.xs1,L=1;L<R.l;L++)y+=R["xn"+L]+R["xs"+(L+1)];R[X]=y}}else R[X]=R.s+R.xs0;rt=rt._next}},function(v,E,R,L,y){this.t=v,this.p=E,this.v=R,this.r=y,L&&(L._prev=this,this._next=L)}),Ve=(Ce._parseToProxy=function(v,E,R,L,y,X){var O,K,rt,et,W,St=L,Et={},yt={},Nt=R._transform,At=vi;for(R._transform=null,vi=E,L=W=R.parse(v,E,L,y),vi=At,X&&(R._transform=Nt,St&&(St._prev=null,St._prev&&(St._prev._next=null)));L&&L!==St;){if(L.type<=1&&(K=L.p,yt[K]=L.s+L.c,Et[K]=L.s,X||(et=new Re(L,"s",K,et,L.r),L.c=0),L.type===1))for(O=L.l;--O>0;)rt="xn"+O,K=L.p+"_"+rt,yt[K]=L.data[rt],Et[K]=L[rt],X||(et=new Re(L,rt,K,et,L.rxp[rt]));L=L._next}return{proxy:Et,end:yt,firstMPT:et,pt:W}},Ce.CSSPropTween=function(v,E,R,L,y,X,O,K,rt,et,W){this.t=v,this.p=E,this.s=R,this.c=L,this.n=O||E,v instanceof Ve||x.push(this.n),this.r=K&&(typeof K=="function"?K:Math.round),this.type=X||0,rt&&(this.pr=rt,Z=!0),this.b=et===void 0?R:et,this.e=W===void 0?R+L:W,y&&(this._next=y,y._prev=this)}),gn=function(v,E,R,L,y,X){var O=new Ve(v,E,R,L-R,y,-1,X);return O.b=R,O.e=O.xs0=L,O},Wi=mt.parseComplex=function(v,E,R,L,y,X,O,K,rt,et){R=R||X||"",typeof L=="function"&&(L=L(m,H)),O=new Ve(v,E,0,0,O,et?2:1,null,!1,K,R,L),L+="",y&&he.test(L+R)&&(L=[R,L],mt.colorStringFilter(L),R=L[0],L=L[1]);var W,St,Et,yt,Nt,At,oe,ne,Pe,Kt,Bt,te,It,Le=R.split(", ").join(",").split(" "),Zt=L.split(", ").join(",").split(" "),Ft=Le.length,Jt=wt!==!1;for((L.indexOf(",")!==-1||R.indexOf(",")!==-1)&&((L+R).indexOf("rgb")!==-1||(L+R).indexOf("hsl")!==-1?(Le=Le.join(" ").replace(Me,", ").split(" "),Zt=Zt.join(" ").replace(Me,", ").split(" ")):(Le=Le.join(" ").split(",").join(", ").split(" "),Zt=Zt.join(" ").split(",").join(", ").split(" ")),Ft=Le.length),Ft!==Zt.length&&(Le=(X||"").split(" "),Ft=Le.length),O.plugin=rt,O.setRatio=et,he.lastIndex=0,W=0;Ft>W;W++)if(yt=Le[W],Nt=Zt[W]+"",ne=parseFloat(yt),ne||ne===0)O.appendXtra("",ne,$(Nt,ne),Nt.replace(C,""),Jt&&Nt.indexOf("px")!==-1?Math.round:!1,!0);else if(y&&he.test(yt))te=Nt.indexOf(")")+1,te=")"+(te?Nt.substr(te):""),It=Nt.indexOf("hsl")!==-1&&Ke,Kt=Nt,yt=se(yt,It),Nt=se(Nt,It),Pe=yt.length+Nt.length>6,Pe&&!Ke&&Nt[3]===0?(O["xs"+O.l]+=O.l?" transparent":"transparent",O.e=O.e.split(Zt[W]).join("transparent")):(Ke||(Pe=!1),It?O.appendXtra(Kt.substr(0,Kt.indexOf("hsl"))+(Pe?"hsla(":"hsl("),yt[0],$(Nt[0],yt[0]),",",!1,!0).appendXtra("",yt[1],$(Nt[1],yt[1]),"%,",!1).appendXtra("",yt[2],$(Nt[2],yt[2]),Pe?"%,":"%"+te,!1):O.appendXtra(Kt.substr(0,Kt.indexOf("rgb"))+(Pe?"rgba(":"rgb("),yt[0],Nt[0]-yt[0],",",Math.round,!0).appendXtra("",yt[1],Nt[1]-yt[1],",",Math.round).appendXtra("",yt[2],Nt[2]-yt[2],Pe?",":te,Math.round),Pe&&(yt=yt.length<4?1:yt[3],O.appendXtra("",yt,(Nt.length<4?1:Nt[3])-yt,te,!1))),he.lastIndex=0;else if(At=yt.match(f)){if(oe=Nt.match(C),!oe||oe.length!==At.length)return O;for(Et=0,St=0;St<At.length;St++)Bt=At[St],Kt=yt.indexOf(Bt,Et),O.appendXtra(yt.substr(Et,Kt-Et),Number(Bt),$(oe[St],Bt),"",Jt&&yt.substr(Kt+Bt.length,2)==="px"?Math.round:!1,St===0),Et=Kt+Bt.length;O["xs"+O.l]+=yt.substr(Et)}else O["xs"+O.l]+=O.l||O["xs"+O.l]?" "+Nt:Nt;if(L.indexOf("=")!==-1&&O.data){for(te=O.xs0+O.data.s,W=1;W<O.l;W++)te+=O["xs"+W]+O.data["xn"+W];O.e=te+O["xs"+W]}return O.l||(O.type=-1,O.xs0=O.e),O.xfirst||O},si=9;for(ht=Ve.prototype,ht.l=ht.pr=0;--si>0;)ht["xn"+si]=0,ht["xs"+si]="";ht.xs0="",ht._next=ht._prev=ht.xfirst=ht.data=ht.plugin=ht.setRatio=ht.rxp=null,ht.appendXtra=function(v,E,R,L,y,X){var O=this,K=O.l;return O["xs"+K]+=X&&(K||O["xs"+K])?" "+v:v||"",R||K===0||O.plugin?(O.l++,O.type=O.setRatio?2:1,O["xs"+O.l]=L||"",K>0?(O.data["xn"+K]=E+R,O.rxp["xn"+K]=y,O["xn"+K]=E,O.plugin||(O.xfirst=new Ve(O,"xn"+K,E,R,O.xfirst||O,0,O.n,y,O.pr),O.xfirst.xs0=0),O):(O.data={s:E+R},O.rxp={},O.s=E,O.c=R,O.r=y,O)):(O["xs"+K]+=E+(L||""),O)};var Dr=function(v,E){E=E||{},this.p=E.prefix&&en(v)||v,Y[v]=Y[this.p]=this,this.format=E.formatter||ze(E.defaultValue,E.color,E.collapsible,E.multi),E.parser&&(this.parse=E.parser),this.clrs=E.color,this.multi=E.multi,this.keyword=E.keyword,this.dflt=E.defaultValue,this.pr=E.priority||0},Qe=Ce._registerComplexSpecialProp=function(v,E,R){typeof E!="object"&&(E={parser:R});var L,y=v.split(","),X=E.defaultValue;for(R=R||[X],L=0;L<y.length;L++)E.prefix=L===0&&E.prefix,E.defaultValue=R[L]||X,new Dr(y[L],E)},Ko=Ce._registerPluginProp=function(v){if(!Y[v]){var E=v.charAt(0).toUpperCase()+v.substr(1)+"Plugin";Qe(v,{parser:function(R,L,y,X,O,K,rt){var et=Ct.com.greensock.plugins[E];return et?(et._cssRegister(),Y[y].parse(R,L,y,X,O,K,rt)):(Rn("Error: "+E+" js file not loaded."),O)}})}};ht=Dr.prototype,ht.parseComplex=function(v,E,R,L,y,X){var O,K,rt,et,W,St,Et=this.keyword;if(this.multi&&(Me.test(R)||Me.test(E)?(K=E.replace(Me,"|").split("|"),rt=R.replace(Me,"|").split("|")):Et&&(K=[E],rt=[R])),rt){for(et=rt.length>K.length?rt.length:K.length,O=0;et>O;O++)E=K[O]=K[O]||this.dflt,R=rt[O]=rt[O]||this.dflt,Et&&(W=E.indexOf(Et),St=R.indexOf(Et),W!==St&&(St===-1?K[O]=K[O].split(Et).join(""):W===-1&&(K[O]+=" "+Et)));E=K.join(", "),R=rt.join(", ")}return Wi(v,this.p,E,R,this.clrs,this.dflt,L,this.pr,y,X)},ht.parse=function(v,E,R,L,y,X,O){return this.parseComplex(v.style,this.format(Oe(v,this.p,at,!1,this.dflt)),this.format(E),y,X)},mt.registerSpecialProp=function(v,E,R){Qe(v,{parser:function(L,y,X,O,K,rt,et){var W=new Ve(L,X,0,0,K,2,X,!1,R);return W.plugin=rt,W.setRatio=E(L,y,O._tween,X),W},priority:R})},mt.useSVGTransformAttr=!0;var rn,Mo="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),ui=en("transform"),zr=Vi+"transform",Cn=en("transformOrigin"),Gi=en("perspective")!==null,Kn=Ce.Transform=function(){this.perspective=parseFloat(mt.defaultTransformPerspective)||0,this.force3D=mt.defaultForce3D!==!1&&Gi?mt.defaultForce3D||"auto":!1},ts=$e.SVGElement,To=function(v,E,R){var L,y=oi.createElementNS("http://www.w3.org/2000/svg",v),X=/([a-z])([A-Z])/g;for(L in R)y.setAttributeNS(null,L.replace(X,"$1-$2").toLowerCase(),R[L]);return E.appendChild(y),y},Sn=oi.documentElement||{},es=function(){var v,E,R,L=Q||/Android/i.test(je)&&!$e.chrome;return oi.createElementNS&&!L&&(v=To("svg",Sn),E=To("rect",v,{width:100,height:50,x:100}),R=E.getBoundingClientRect().width,E.style[Cn]="50% 50%",E.style[ui]="scaleX(0.5)",L=R===E.getBoundingClientRect().width&&!(Ot&&Gi),Sn.removeChild(v)),L}(),tr=function(v,E,R,L,y,X){var O,K,rt,et,W,St,Et,yt,Nt,At,oe,ne,Pe,Kt,Bt=v._gsTransform,te=ir(v,!0);Bt&&(Pe=Bt.xOrigin,Kt=Bt.yOrigin),(!L||(O=L.split(" ")).length<2)&&(Et=v.getBBox(),Et.x===0&&Et.y===0&&Et.width+Et.height===0&&(Et={x:parseFloat(v.hasAttribute("x")?v.getAttribute("x"):v.hasAttribute("cx")?v.getAttribute("cx"):0)||0,y:parseFloat(v.hasAttribute("y")?v.getAttribute("y"):v.hasAttribute("cy")?v.getAttribute("cy"):0)||0,width:0,height:0}),E=U(E).split(" "),O=[(E[0].indexOf("%")!==-1?parseFloat(E[0])/100*Et.width:parseFloat(E[0]))+Et.x,(E[1].indexOf("%")!==-1?parseFloat(E[1])/100*Et.height:parseFloat(E[1]))+Et.y]),R.xOrigin=et=parseFloat(O[0]),R.yOrigin=W=parseFloat(O[1]),L&&te!==er&&(St=te[0],Et=te[1],yt=te[2],Nt=te[3],At=te[4],oe=te[5],ne=St*Nt-Et*yt,ne&&(K=et*(Nt/ne)+W*(-yt/ne)+(yt*oe-Nt*At)/ne,rt=et*(-Et/ne)+W*(St/ne)-(St*oe-Et*At)/ne,et=R.xOrigin=O[0]=K,W=R.yOrigin=O[1]=rt)),Bt&&(X&&(R.xOffset=Bt.xOffset,R.yOffset=Bt.yOffset,Bt=R),y||y!==!1&&mt.defaultSmoothOrigin!==!1?(K=et-Pe,rt=W-Kt,Bt.xOffset+=K*te[0]+rt*te[2]-K,Bt.yOffset+=K*te[1]+rt*te[3]-rt):Bt.xOffset=Bt.yOffset=0),X||v.setAttribute("data-svg-origin",O.join(" "))},Nr=function(v){var E,R=fe("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),L=this.parentNode,y=this.nextSibling,X=this.style.cssText;if(Sn.appendChild(R),R.appendChild(this),this.style.display="block",v)try{E=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Nr}catch{}else this._originalGetBBox&&(E=this._originalGetBBox());return y?L.insertBefore(this,y):L.appendChild(this),Sn.removeChild(R),this.style.cssText=X,E},on=function(v){try{return v.getBBox()}catch{return Nr.call(v,!0)}},Br=function(v){return!(!ts||!v.getCTM||v.parentNode&&!v.ownerSVGElement||!on(v))},er=[1,0,0,1,0,0],ir=function(v,E){var R,L,y,X,O,K,rt=v._gsTransform||new Kn,et=1e5,W=v.style;if(ui?L=Oe(v,zr,null,!0):v.currentStyle&&(L=v.currentStyle.filter.match(ut),L=L&&L.length===4?[L[0].substr(4),Number(L[2].substr(4)),Number(L[1].substr(4)),L[3].substr(4),rt.x||0,rt.y||0].join(","):""),R=!L||L==="none"||L==="matrix(1, 0, 0, 1, 0, 0)",!ui||!(K=!ci(v)||ci(v).display==="none")&&v.parentNode||(K&&(X=W.display,W.display="block"),v.parentNode||(O=1,Sn.appendChild(v)),L=Oe(v,zr,null,!0),R=!L||L==="none"||L==="matrix(1, 0, 0, 1, 0, 0)",X?W.display=X:K&&On(W,"display"),O&&Sn.removeChild(v)),(rt.svg||v.getCTM&&Br(v))&&(R&&(W[ui]+"").indexOf("matrix")!==-1&&(L=W[ui],R=0),y=v.getAttribute("transform"),R&&y&&(y=v.transform.baseVal.consolidate().matrix,L="matrix("+y.a+","+y.b+","+y.c+","+y.d+","+y.e+","+y.f+")",R=0)),R)return er;for(y=(L||"").match(f)||[],si=y.length;--si>-1;)X=Number(y[si]),y[si]=(O=X-(X|=0))?(O*et+(0>O?-.5:.5)|0)/et+X:X;return E&&y.length>6?[y[0],y[1],y[4],y[5],y[12],y[13]]:y},sn=Ce.getTransform=function(v,E,R,L){if(v._gsTransform&&R&&!L)return v._gsTransform;var y,X,O,K,rt,et,W=R?v._gsTransform||new Kn:new Kn,St=W.scaleX<0,Et=2e-5,yt=1e5,Nt=Gi&&(parseFloat(Oe(v,Cn,E,!1,"0 0 0").split(" ")[2])||W.zOrigin)||0,At=parseFloat(mt.defaultTransformPerspective)||0;if(W.svg=!(!v.getCTM||!Br(v)),W.svg&&(tr(v,Oe(v,Cn,E,!1,"50% 50%")+"",W,v.getAttribute("data-svg-origin")),rn=mt.useSVGTransformAttr||es),y=ir(v),y!==er){if(y.length===16){var oe,ne,Pe,Kt,Bt,te=y[0],It=y[1],Le=y[2],Zt=y[3],Ft=y[4],Jt=y[5],yi=y[6],qi=y[7],Ge=y[8],He=y[9],We=y[10],ei=y[12],ii=y[13],ai=y[14],hi=y[11],ke=Math.atan2(yi,We);W.zOrigin&&(ai=-W.zOrigin,ei=Ge*ai-y[12],ii=He*ai-y[13],ai=We*ai+W.zOrigin-y[14]),W.rotationX=ke*Fe,ke&&(Kt=Math.cos(-ke),Bt=Math.sin(-ke),oe=Ft*Kt+Ge*Bt,ne=Jt*Kt+He*Bt,Pe=yi*Kt+We*Bt,Ge=Ft*-Bt+Ge*Kt,He=Jt*-Bt+He*Kt,We=yi*-Bt+We*Kt,hi=qi*-Bt+hi*Kt,Ft=oe,Jt=ne,yi=Pe),ke=Math.atan2(-Le,We),W.rotationY=ke*Fe,ke&&(Kt=Math.cos(-ke),Bt=Math.sin(-ke),oe=te*Kt-Ge*Bt,ne=It*Kt-He*Bt,Pe=Le*Kt-We*Bt,He=It*Bt+He*Kt,We=Le*Bt+We*Kt,hi=Zt*Bt+hi*Kt,te=oe,It=ne,Le=Pe),ke=Math.atan2(It,te),W.rotation=ke*Fe,ke&&(Kt=Math.cos(ke),Bt=Math.sin(ke),oe=te*Kt+It*Bt,ne=Ft*Kt+Jt*Bt,Pe=Ge*Kt+He*Bt,It=It*Kt-te*Bt,Jt=Jt*Kt-Ft*Bt,He=He*Kt-Ge*Bt,te=oe,Ft=ne,Ge=Pe),W.rotationX&&Math.abs(W.rotationX)+Math.abs(W.rotation)>359.9&&(W.rotationX=W.rotation=0,W.rotationY=180-W.rotationY),ke=Math.atan2(Ft,Jt),W.scaleX=(Math.sqrt(te*te+It*It+Le*Le)*yt+.5|0)/yt,W.scaleY=(Math.sqrt(Jt*Jt+yi*yi)*yt+.5|0)/yt,W.scaleZ=(Math.sqrt(Ge*Ge+He*He+We*We)*yt+.5|0)/yt,te/=W.scaleX,Ft/=W.scaleY,It/=W.scaleX,Jt/=W.scaleY,Math.abs(ke)>Et?(W.skewX=ke*Fe,Ft=0,W.skewType!=="simple"&&(W.scaleY*=1/Math.cos(ke))):W.skewX=0,W.perspective=hi?1/(0>hi?-hi:hi):0,W.x=ei,W.y=ii,W.z=ai,W.svg&&(W.x-=W.xOrigin-(W.xOrigin*te-W.yOrigin*Ft),W.y-=W.yOrigin-(W.yOrigin*It-W.xOrigin*Jt))}else if(!Gi||L||!y.length||W.x!==y[4]||W.y!==y[5]||!W.rotationX&&!W.rotationY){var Ne=y.length>=6,qe=Ne?y[0]:1,be=y[1]||0,an=y[2]||0,xi=Ne?y[3]:1;W.x=y[4]||0,W.y=y[5]||0,O=Math.sqrt(qe*qe+be*be),K=Math.sqrt(xi*xi+an*an),rt=qe||be?Math.atan2(be,qe)*Fe:W.rotation||0,et=an||xi?Math.atan2(an,xi)*Fe+rt:W.skewX||0,W.scaleX=O,W.scaleY=K,W.rotation=rt,W.skewX=et,Gi&&(W.rotationX=W.rotationY=W.z=0,W.perspective=At,W.scaleZ=1),W.svg&&(W.x-=W.xOrigin-(W.xOrigin*qe+W.yOrigin*an),W.y-=W.yOrigin-(W.xOrigin*be+W.yOrigin*xi))}Math.abs(W.skewX)>90&&Math.abs(W.skewX)<270&&(St?(W.scaleX*=-1,W.skewX+=W.rotation<=0?180:-180,W.rotation+=W.rotation<=0?180:-180):(W.scaleY*=-1,W.skewX+=W.skewX<=0?180:-180)),W.zOrigin=Nt;for(X in W)W[X]<Et&&W[X]>-Et&&(W[X]=0)}return R&&(v._gsTransform=W,W.svg&&(rn&&v.style[ui]?pt.delayedCall(.001,function(){On(v.style,ui)}):!rn&&v.getAttribute("transform")&&pt.delayedCall(.001,function(){v.removeAttribute("transform")}))),W},is=function(v){var E,R,L=this.data,y=-L.rotation*Rt,X=y+L.skewX*Rt,O=1e5,K=(Math.cos(y)*L.scaleX*O|0)/O,rt=(Math.sin(y)*L.scaleX*O|0)/O,et=(Math.sin(X)*-L.scaleY*O|0)/O,W=(Math.cos(X)*L.scaleY*O|0)/O,St=this.t.style,Et=this.t.currentStyle;if(Et){R=rt,rt=-et,et=-R,E=Et.filter,St.filter="";var yt,Nt,At=this.t.offsetWidth,oe=this.t.offsetHeight,ne=Et.position!=="absolute",Pe="progid:DXImageTransform.Microsoft.Matrix(M11="+K+", M12="+rt+", M21="+et+", M22="+W,Kt=L.x+At*L.xPercent/100,Bt=L.y+oe*L.yPercent/100;if(L.ox!=null&&(yt=(L.oxp?At*L.ox*.01:L.ox)-At/2,Nt=(L.oyp?oe*L.oy*.01:L.oy)-oe/2,Kt+=yt-(yt*K+Nt*rt),Bt+=Nt-(yt*et+Nt*W)),ne?(yt=At/2,Nt=oe/2,Pe+=", Dx="+(yt-(yt*K+Nt*rt)+Kt)+", Dy="+(Nt-(yt*et+Nt*W)+Bt)+")"):Pe+=", sizingMethod='auto expand')",E.indexOf("DXImageTransform.Microsoft.Matrix(")!==-1?St.filter=E.replace(kt,Pe):St.filter=Pe+" "+E,(v===0||v===1)&&K===1&&rt===0&&et===0&&W===1&&(ne&&Pe.indexOf("Dx=0, Dy=0")===-1||F.test(E)&&parseFloat(RegExp.$1)!==100||E.indexOf(E.indexOf("Alpha"))===-1&&St.removeAttribute("filter")),!ne){var te,It,Le,Zt=8>Q?1:-1;for(yt=L.ieOffsetX||0,Nt=L.ieOffsetY||0,L.ieOffsetX=Math.round((At-((0>K?-K:K)*At+(0>rt?-rt:rt)*oe))/2+Kt),L.ieOffsetY=Math.round((oe-((0>W?-W:W)*oe+(0>et?-et:et)*At))/2+Bt),si=0;4>si;si++)It=D[si],te=Et[It],R=te.indexOf("px")!==-1?parseFloat(te):Si(this.t,It,parseFloat(te),te.replace(b,""))||0,Le=R!==L[It]?2>si?-L.ieOffsetX:-L.ieOffsetY:2>si?yt-L.ieOffsetX:Nt-L.ieOffsetY,St[It]=(L[It]=Math.round(R-Le*(si===0||si===2?1:Zt)))+"px"}}},ns=Ce.set3DTransformRatio=Ce.setTransformRatio=function(v){var E,R,L,y,X,O,K,rt,et,W,St,Et,yt,Nt,At,oe,ne,Pe,Kt,Bt,te,It,Le,Zt=this.data,Ft=this.t.style,Jt=Zt.rotation,yi=Zt.rotationX,qi=Zt.rotationY,Ge=Zt.scaleX,He=Zt.scaleY,We=Zt.scaleZ,ei=Zt.x,ii=Zt.y,ai=Zt.z,hi=Zt.svg,ke=Zt.perspective,Ne=Zt.force3D,qe=Zt.skewY,be=Zt.skewX;if(qe&&(be+=qe,Jt+=qe),((v===1||v===0)&&Ne==="auto"&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!Ne)&&!ai&&!ke&&!qi&&!yi&&We===1||rn&&hi||!Gi)return void(Jt||be||hi?(Jt*=Rt,It=be*Rt,Le=1e5,R=Math.cos(Jt)*Ge,X=Math.sin(Jt)*Ge,L=Math.sin(Jt-It)*-He,O=Math.cos(Jt-It)*He,It&&Zt.skewType==="simple"&&(E=Math.tan(It-qe*Rt),E=Math.sqrt(1+E*E),L*=E,O*=E,qe&&(E=Math.tan(qe*Rt),E=Math.sqrt(1+E*E),R*=E,X*=E)),hi&&(ei+=Zt.xOrigin-(Zt.xOrigin*R+Zt.yOrigin*L)+Zt.xOffset,ii+=Zt.yOrigin-(Zt.xOrigin*X+Zt.yOrigin*O)+Zt.yOffset,rn&&(Zt.xPercent||Zt.yPercent)&&(At=this.t.getBBox(),ei+=.01*Zt.xPercent*At.width,ii+=.01*Zt.yPercent*At.height),At=1e-6,At>ei&&ei>-At&&(ei=0),At>ii&&ii>-At&&(ii=0)),Kt=(R*Le|0)/Le+","+(X*Le|0)/Le+","+(L*Le|0)/Le+","+(O*Le|0)/Le+","+ei+","+ii+")",hi&&rn?this.t.setAttribute("transform","matrix("+Kt):Ft[ui]=(Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) matrix(":"matrix(")+Kt):Ft[ui]=(Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) matrix(":"matrix(")+Ge+",0,0,"+He+","+ei+","+ii+")");if(Ot&&(At=1e-4,At>Ge&&Ge>-At&&(Ge=We=2e-5),At>He&&He>-At&&(He=We=2e-5),!ke||Zt.z||Zt.rotationX||Zt.rotationY||(ke=0)),Jt||be)Jt*=Rt,oe=R=Math.cos(Jt),ne=X=Math.sin(Jt),be&&(Jt-=be*Rt,oe=Math.cos(Jt),ne=Math.sin(Jt),Zt.skewType==="simple"&&(E=Math.tan((be-qe)*Rt),E=Math.sqrt(1+E*E),oe*=E,ne*=E,Zt.skewY&&(E=Math.tan(qe*Rt),E=Math.sqrt(1+E*E),R*=E,X*=E))),L=-ne,O=oe;else{if(!(qi||yi||We!==1||ke||hi))return void(Ft[ui]=(Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) translate3d(":"translate3d(")+ei+"px,"+ii+"px,"+ai+"px)"+(Ge!==1||He!==1?" scale("+Ge+","+He+")":""));R=O=1,L=X=0}W=1,y=K=rt=et=St=Et=0,yt=ke?-1/ke:0,Nt=Zt.zOrigin,At=1e-6,Bt=",",te="0",Jt=qi*Rt,Jt&&(oe=Math.cos(Jt),ne=Math.sin(Jt),rt=-ne,St=yt*-ne,y=R*ne,K=X*ne,W=oe,yt*=oe,R*=oe,X*=oe),Jt=yi*Rt,Jt&&(oe=Math.cos(Jt),ne=Math.sin(Jt),E=L*oe+y*ne,Pe=O*oe+K*ne,et=W*ne,Et=yt*ne,y=L*-ne+y*oe,K=O*-ne+K*oe,W*=oe,yt*=oe,L=E,O=Pe),We!==1&&(y*=We,K*=We,W*=We,yt*=We),He!==1&&(L*=He,O*=He,et*=He,Et*=He),Ge!==1&&(R*=Ge,X*=Ge,rt*=Ge,St*=Ge),(Nt||hi)&&(Nt&&(ei+=y*-Nt,ii+=K*-Nt,ai+=W*-Nt+Nt),hi&&(ei+=Zt.xOrigin-(Zt.xOrigin*R+Zt.yOrigin*L)+Zt.xOffset,ii+=Zt.yOrigin-(Zt.xOrigin*X+Zt.yOrigin*O)+Zt.yOffset),At>ei&&ei>-At&&(ei=te),At>ii&&ii>-At&&(ii=te),At>ai&&ai>-At&&(ai=0)),Kt=Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) matrix3d(":"matrix3d(",Kt+=(At>R&&R>-At?te:R)+Bt+(At>X&&X>-At?te:X)+Bt+(At>rt&&rt>-At?te:rt),Kt+=Bt+(At>St&&St>-At?te:St)+Bt+(At>L&&L>-At?te:L)+Bt+(At>O&&O>-At?te:O),yi||qi||We!==1?(Kt+=Bt+(At>et&&et>-At?te:et)+Bt+(At>Et&&Et>-At?te:Et)+Bt+(At>y&&y>-At?te:y),Kt+=Bt+(At>K&&K>-At?te:K)+Bt+(At>W&&W>-At?te:W)+Bt+(At>yt&&yt>-At?te:yt)+Bt):Kt+=",0,0,0,0,1,0,",Kt+=ei+Bt+ii+Bt+ai+Bt+(ke?1+-ai/ke:1)+")",Ft[ui]=Kt};ht=Kn.prototype,ht.x=ht.y=ht.z=ht.skewX=ht.skewY=ht.rotation=ht.rotationX=ht.rotationY=ht.zOrigin=ht.xPercent=ht.yPercent=ht.xOffset=ht.yOffset=0,ht.scaleX=ht.scaleY=ht.scaleZ=1,Qe("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(v,E,R,L,y,X,O){if(L._lastParsedTransform===O)return y;L._lastParsedTransform=O;var K,rt=O.scale&&typeof O.scale=="function"?O.scale:0;typeof O[R]=="function"&&(K=O[R],O[R]=E),rt&&(O.scale=rt(m,v));var et,W,St,Et,yt,Nt,At,oe,ne,Pe=v._gsTransform,Kt=v.style,Bt=1e-6,te=Mo.length,It=O,Le={},Zt="transformOrigin",Ft=sn(v,at,!0,It.parseTransform),Jt=It.transform&&(typeof It.transform=="function"?It.transform(m,H):It.transform);if(Ft.skewType=It.skewType||Ft.skewType||mt.defaultSkewType,L._transform=Ft,"rotationZ"in It&&(It.rotation=It.rotationZ),Jt&&typeof Jt=="string"&&ui)W=Je.style,W[ui]=Jt,W.display="block",W.position="absolute",Jt.indexOf("%")!==-1&&(W.width=Oe(v,"width"),W.height=Oe(v,"height")),oi.body.appendChild(Je),et=sn(Je,null,!1),Ft.skewType==="simple"&&(et.scaleY*=Math.cos(et.skewX*Rt)),Ft.svg&&(Nt=Ft.xOrigin,At=Ft.yOrigin,et.x-=Ft.xOffset,et.y-=Ft.yOffset,(It.transformOrigin||It.svgOrigin)&&(Jt={},tr(v,U(It.transformOrigin),Jt,It.svgOrigin,It.smoothOrigin,!0),Nt=Jt.xOrigin,At=Jt.yOrigin,et.x-=Jt.xOffset-Ft.xOffset,et.y-=Jt.yOffset-Ft.yOffset),(Nt||At)&&(oe=ir(Je,!0),et.x-=Nt-(Nt*oe[0]+At*oe[2]),et.y-=At-(Nt*oe[1]+At*oe[3]))),oi.body.removeChild(Je),et.perspective||(et.perspective=Ft.perspective),It.xPercent!=null&&(et.xPercent=gt(It.xPercent,Ft.xPercent)),It.yPercent!=null&&(et.yPercent=gt(It.yPercent,Ft.yPercent));else if(typeof It=="object"){if(et={scaleX:gt(It.scaleX!=null?It.scaleX:It.scale,Ft.scaleX),scaleY:gt(It.scaleY!=null?It.scaleY:It.scale,Ft.scaleY),scaleZ:gt(It.scaleZ,Ft.scaleZ),x:gt(It.x,Ft.x),y:gt(It.y,Ft.y),z:gt(It.z,Ft.z),xPercent:gt(It.xPercent,Ft.xPercent),yPercent:gt(It.yPercent,Ft.yPercent),perspective:gt(It.transformPerspective,Ft.perspective)},yt=It.directionalRotation,yt!=null)if(typeof yt=="object")for(W in yt)It[W]=yt[W];else It.rotation=yt;typeof It.x=="string"&&It.x.indexOf("%")!==-1&&(et.x=0,et.xPercent=gt(It.x,Ft.xPercent)),typeof It.y=="string"&&It.y.indexOf("%")!==-1&&(et.y=0,et.yPercent=gt(It.y,Ft.yPercent)),et.rotation=Tt("rotation"in It?It.rotation:"shortRotation"in It?It.shortRotation+"_short":Ft.rotation,Ft.rotation,"rotation",Le),Gi&&(et.rotationX=Tt("rotationX"in It?It.rotationX:"shortRotationX"in It?It.shortRotationX+"_short":Ft.rotationX||0,Ft.rotationX,"rotationX",Le),et.rotationY=Tt("rotationY"in It?It.rotationY:"shortRotationY"in It?It.shortRotationY+"_short":Ft.rotationY||0,Ft.rotationY,"rotationY",Le)),et.skewX=Tt(It.skewX,Ft.skewX),et.skewY=Tt(It.skewY,Ft.skewY)}for(Gi&&It.force3D!=null&&(Ft.force3D=It.force3D,Et=!0),St=Ft.force3D||Ft.z||Ft.rotationX||Ft.rotationY||et.z||et.rotationX||et.rotationY||et.perspective,St||It.scale==null||(et.scaleZ=1);--te>-1;)ne=Mo[te],Jt=et[ne]-Ft[ne],(Jt>Bt||-Bt>Jt||It[ne]!=null||vi[ne]!=null)&&(Et=!0,y=new Ve(Ft,ne,Ft[ne],Jt,y),ne in Le&&(y.e=Le[ne]),y.xs0=0,y.plugin=X,L._overwriteProps.push(y.n));return Jt=It.transformOrigin,Ft.svg&&(Jt||It.svgOrigin)&&(Nt=Ft.xOffset,At=Ft.yOffset,tr(v,U(Jt),et,It.svgOrigin,It.smoothOrigin),y=gn(Ft,"xOrigin",(Pe?Ft:et).xOrigin,et.xOrigin,y,Zt),y=gn(Ft,"yOrigin",(Pe?Ft:et).yOrigin,et.yOrigin,y,Zt),(Nt!==Ft.xOffset||At!==Ft.yOffset)&&(y=gn(Ft,"xOffset",Pe?Nt:Ft.xOffset,Ft.xOffset,y,Zt),y=gn(Ft,"yOffset",Pe?At:Ft.yOffset,Ft.yOffset,y,Zt)),Jt="0px 0px"),(Jt||Gi&&St&&Ft.zOrigin)&&(ui?(Et=!0,ne=Cn,Jt=(Jt||Oe(v,ne,at,!1,"50% 50%"))+"",y=new Ve(Kt,ne,0,0,y,-1,Zt),y.b=Kt[ne],y.plugin=X,Gi?(W=Ft.zOrigin,Jt=Jt.split(" "),Ft.zOrigin=(Jt.length>2&&(W===0||Jt[2]!=="0px")?parseFloat(Jt[2]):W)||0,y.xs0=y.e=Jt[0]+" "+(Jt[1]||"50%")+" 0px",y=new Ve(Ft,"zOrigin",0,0,y,-1,y.n),y.b=W,y.xs0=y.e=Ft.zOrigin):y.xs0=y.e=Jt):U(Jt+"",Ft)),Et&&(L._transformType=Ft.svg&&rn||!St&&this._transformType!==3?2:3),K&&(O[R]=K),rt&&(O.scale=rt),y},prefix:!0}),Qe("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),Qe("borderRadius",{defaultValue:"0px",parser:function(v,E,R,L,y,X){E=this.format(E);var O,K,rt,et,W,St,Et,yt,Nt,At,oe,ne,Pe,Kt,Bt,te,It=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],Le=v.style;for(Nt=parseFloat(v.offsetWidth),At=parseFloat(v.offsetHeight),O=E.split(" "),K=0;K<It.length;K++)this.p.indexOf("border")&&(It[K]=en(It[K])),W=et=Oe(v,It[K],at,!1,"0px"),W.indexOf(" ")!==-1&&(et=W.split(" "),W=et[0],et=et[1]),St=rt=O[K],Et=parseFloat(W),ne=W.substr((Et+"").length),Pe=St.charAt(1)==="=",Pe?(yt=parseInt(St.charAt(0)+"1",10),St=St.substr(2),yt*=parseFloat(St),oe=St.substr((yt+"").length-(0>yt?1:0))||""):(yt=parseFloat(St),oe=St.substr((yt+"").length)),oe===""&&(oe=ft[R]||ne),oe!==ne&&(Kt=Si(v,"borderLeft",Et,ne),Bt=Si(v,"borderTop",Et,ne),oe==="%"?(W=Kt/Nt*100+"%",et=Bt/At*100+"%"):oe==="em"?(te=Si(v,"borderLeft",1,"em"),W=Kt/te+"em",et=Bt/te+"em"):(W=Kt+"px",et=Bt+"px"),Pe&&(St=parseFloat(W)+yt+oe,rt=parseFloat(et)+yt+oe)),y=Wi(Le,It[K],W+" "+et,St+" "+rt,!1,"0px",y);return y},prefix:!0,formatter:ze("0px 0px 0px 0px",!1,!0)}),Qe("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(v,E,R,L,y,X){return Wi(v.style,R,this.format(Oe(v,R,at,!1,"0px 0px")),this.format(E),!1,"0px",y)},prefix:!0,formatter:ze("0px 0px",!1,!0)}),Qe("backgroundPosition",{defaultValue:"0 0",parser:function(v,E,R,L,y,X){var O,K,rt,et,W,St,Et="background-position",yt=at||ci(v,null),Nt=this.format((yt?Q?yt.getPropertyValue(Et+"-x")+" "+yt.getPropertyValue(Et+"-y"):yt.getPropertyValue(Et):v.currentStyle.backgroundPositionX+" "+v.currentStyle.backgroundPositionY)||"0 0"),At=this.format(E);if(Nt.indexOf("%")!==-1!=(At.indexOf("%")!==-1)&&At.split(",").length<2&&(St=Oe(v,"backgroundImage").replace(Gt,""),St&&St!=="none")){for(O=Nt.split(" "),K=At.split(" "),bi.setAttribute("src",St),rt=2;--rt>-1;)Nt=O[rt],et=Nt.indexOf("%")!==-1,et!==(K[rt].indexOf("%")!==-1)&&(W=rt===0?v.offsetWidth-bi.width:v.offsetHeight-bi.height,O[rt]=et?parseFloat(Nt)/100*W+"px":parseFloat(Nt)/W*100+"%");Nt=O.join(" ")}return this.parseComplex(v.style,Nt,At,y,X)},formatter:U}),Qe("backgroundSize",{defaultValue:"0 0",formatter:function(v){return v+="",v.substr(0,2)==="co"?v:U(v.indexOf(" ")===-1?v+" "+v:v)}}),Qe("perspective",{defaultValue:"0px",prefix:!0}),Qe("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),Qe("transformStyle",{prefix:!0}),Qe("backfaceVisibility",{prefix:!0}),Qe("userSelect",{prefix:!0}),Qe("margin",{parser:Xe("marginTop,marginRight,marginBottom,marginLeft")}),Qe("padding",{parser:Xe("paddingTop,paddingRight,paddingBottom,paddingLeft")}),Qe("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(v,E,R,L,y,X){var O,K,rt;return 9>Q?(K=v.currentStyle,rt=8>Q?" ":",",O="rect("+K.clipTop+rt+K.clipRight+rt+K.clipBottom+rt+K.clipLeft+")",E=this.format(E).split(",").join(rt)):(O=this.format(Oe(v,this.p,at,!1,this.dflt)),E=this.format(E)),this.parseComplex(v.style,O,E,y,X)}}),Qe("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),Qe("autoRound,strictUnits",{parser:function(v,E,R,L,y){return y}}),Qe("border",{defaultValue:"0px solid #000",parser:function(v,E,R,L,y,X){var O=Oe(v,"borderTopWidth",at,!1,"0px"),K=this.format(E).split(" "),rt=K[0].replace(b,"");return rt!=="px"&&(O=parseFloat(O)/Si(v,"borderTopWidth",1,rt)+rt),this.parseComplex(v.style,this.format(O+" "+Oe(v,"borderTopStyle",at,!1,"solid")+" "+Oe(v,"borderTopColor",at,!1,"#000")),K.join(" "),y,X)},color:!0,formatter:function(v){var E=v.split(" ");return E[0]+" "+(E[1]||"solid")+" "+(v.match(he)||["#000"])[0]}}),Qe("borderWidth",{parser:Xe("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),Qe("float,cssFloat,styleFloat",{parser:function(v,E,R,L,y,X){var O=v.style,K="cssFloat"in O?"cssFloat":"styleFloat";return new Ve(O,K,0,0,y,-1,R,!1,0,O[K],E)}});var rs=function(v){var E,R=this.t,L=R.filter||Oe(this.data,"filter")||"",y=this.s+this.c*v|0;y===100&&(L.indexOf("atrix(")===-1&&L.indexOf("radient(")===-1&&L.indexOf("oader(")===-1?(R.removeAttribute("filter"),E=!Oe(this.data,"filter")):(R.filter=L.replace(st,""),E=!0)),E||(this.xn1&&(R.filter=L=L||"alpha(opacity="+y+")"),L.indexOf("pacity")===-1?y===0&&this.xn1||(R.filter=L+" alpha(opacity="+y+")"):R.filter=L.replace(F,"opacity="+y))};Qe("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(v,E,R,L,y,X){var O=parseFloat(Oe(v,"opacity",at,!1,"1")),K=v.style,rt=R==="autoAlpha";return typeof E=="string"&&E.charAt(1)==="="&&(E=(E.charAt(0)==="-"?-1:1)*parseFloat(E.substr(2))+O),rt&&O===1&&Oe(v,"visibility",at)==="hidden"&&E!==0&&(O=0),Ke?y=new Ve(K,"opacity",O,E-O,y):(y=new Ve(K,"opacity",100*O,100*(E-O),y),y.xn1=rt?1:0,K.zoom=1,y.type=2,y.b="alpha(opacity="+y.s+")",y.e="alpha(opacity="+(y.s+y.c)+")",y.data=v,y.plugin=X,y.setRatio=rs),rt&&(y=new Ve(K,"visibility",0,0,y,-1,null,!1,0,O!==0?"inherit":"hidden",E===0?"hidden":"inherit"),y.xs0="inherit",L._overwriteProps.push(y.n),L._overwriteProps.push(R)),y}});var On=function(v,E){E&&(v.removeProperty?((E.substr(0,2)==="ms"||E.substr(0,6)==="webkit")&&(E="-"+E),v.removeProperty(E.replace(Lt,"-$1").toLowerCase())):v.removeAttribute(E))},In=function(v){if(this.t._gsClassPT=this,v===1||v===0){this.t.setAttribute("class",v===0?this.b:this.e);for(var E=this.data,R=this.t.style;E;)E.v?R[E.p]=E.v:On(R,E.p),E=E._next;v===1&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};Qe("className",{parser:function(v,E,R,L,y,X,O){var K,rt,et,W,St,Et=v.getAttribute("class")||"",yt=v.style.cssText;if(y=L._classNamePT=new Ve(v,R,0,0,y,2),y.setRatio=In,y.pr=-11,Z=!0,y.b=Et,rt=nn(v,at),et=v._gsClassPT){for(W={},St=et.data;St;)W[St.p]=1,St=St._next;et.setRatio(1)}return v._gsClassPT=y,y.e=E.charAt(1)!=="="?E:Et.replace(new RegExp("(?:\\s|^)"+E.substr(2)+"(?![\\w-])"),"")+(E.charAt(0)==="+"?" "+E.substr(2):""),v.setAttribute("class",y.e),K=Ri(v,rt,nn(v),O,W),v.setAttribute("class",Et),y.data=K.firstMPT,v.style.cssText=yt,y=y.xfirst=L.parse(v,K.difs,y,X)}});var So=function(v){if((v===1||v===0)&&this.data._totalTime===this.data._totalDuration&&this.data.data!=="isFromStart"){var E,R,L,y,X,O=this.t.style,K=Y.transform.parse;if(this.e==="all")O.cssText="",y=!0;else for(E=this.e.split(" ").join("").split(","),L=E.length;--L>-1;)R=E[L],Y[R]&&(Y[R].parse===K?y=!0:R=R==="transformOrigin"?Cn:Y[R].p),On(O,R);y&&(On(O,ui),X=this.t._gsTransform,X&&(X.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(Qe("clearProps",{parser:function(v,E,R,L,y){return y=new Ve(v,R,0,0,y,2),y.setRatio=So,y.e=E,y.pr=-10,y.data=L._tween,Z=!0,y}}),ht="bezier,throwProps,physicsProps,physics2D".split(","),si=ht.length;si--;)Ko(ht[si]);ht=mt.prototype,ht._firstPT=ht._lastParsedTransform=ht._transform=null,ht._onInitTween=function(v,E,R,L){if(!v.nodeType)return!1;this._target=H=v,this._tween=R,this._vars=E,m=L,wt=E.autoRound,Z=!1,ft=E.suffixMap||mt.suffixMap,at=ci(v,""),x=this._overwriteProps;var y,X,O,K,rt,et,W,St,Et,yt=v.style;if(ct&&yt.zIndex===""&&(y=Oe(v,"zIndex",at),(y==="auto"||y==="")&&this._addLazySet(yt,"zIndex",0)),typeof E=="string"&&(K=yt.cssText,y=nn(v,at),yt.cssText=K+";"+E,y=Ri(v,y,nn(v)).difs,!Ke&&q.test(E)&&(y.opacity=parseFloat(RegExp.$1)),E=y,yt.cssText=K),E.className?this._firstPT=X=Y.className.parse(v,E.className,"className",this,null,null,E):this._firstPT=X=this.parse(v,E,null),this._transformType){for(Et=this._transformType===3,ui?Pt&&(ct=!0,yt.zIndex===""&&(W=Oe(v,"zIndex",at),(W==="auto"||W==="")&&this._addLazySet(yt,"zIndex",0)),xt&&this._addLazySet(yt,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(Et?"visible":"hidden"))):yt.zoom=1,O=X;O&&O._next;)O=O._next;St=new Ve(v,"transform",0,0,null,2),this._linkCSSP(St,null,O),St.setRatio=ui?ns:is,St.data=this._transform||sn(v,at,!0),St.tween=R,St.pr=-1,x.pop()}if(Z){for(;X;){for(et=X._next,O=K;O&&O.pr>X.pr;)O=O._next;(X._prev=O?O._prev:rt)?X._prev._next=X:K=X,(X._next=O)?O._prev=X:rt=X,X=et}this._firstPT=K}return!0},ht.parse=function(v,E,R,L){var y,X,O,K,rt,et,W,St,Et,yt,Nt=v.style;for(y in E){if(et=E[y],typeof et=="function"&&(et=et(m,H)),X=Y[y])R=X.parse(v,et,y,this,R,L,E);else{if(y.substr(0,2)==="--"){this._tween._propLookup[y]=this._addTween.call(this._tween,v.style,"setProperty",ci(v).getPropertyValue(y)+"",et+"",y,!1,y);continue}rt=Oe(v,y,at)+"",Et=typeof et=="string",y==="color"||y==="fill"||y==="stroke"||y.indexOf("Color")!==-1||Et&&it.test(et)?(Et||(et=se(et),et=(et.length>3?"rgba(":"rgb(")+et.join(",")+")"),R=Wi(Nt,y,rt,et,!0,"transparent",R,0,L)):Et&&gi.test(et)?R=Wi(Nt,y,rt,et,!0,null,R,0,L):(O=parseFloat(rt),W=O||O===0?rt.substr((O+"").length):"",(rt===""||rt==="auto")&&(y==="width"||y==="height"?(O=B(v,y,at),W="px"):y==="left"||y==="top"?(O=Tn(v,y,at),W="px"):(O=y!=="opacity"?0:1,W="")),yt=Et&&et.charAt(1)==="=",yt?(K=parseInt(et.charAt(0)+"1",10),et=et.substr(2),K*=parseFloat(et),St=et.replace(b,"")):(K=parseFloat(et),St=Et?et.replace(b,""):""),St===""&&(St=y in ft?ft[y]:W),et=K||K===0?(yt?K+O:K)+St:E[y],W!==St&&(St!==""||y==="lineHeight")&&(K||K===0)&&O&&(O=Si(v,y,O,W),St==="%"?(O/=Si(v,y,100,"%")/100,E.strictUnits!==!0&&(rt=O+"%")):St==="em"||St==="rem"||St==="vw"||St==="vh"?O/=Si(v,y,1,St):St!=="px"&&(K=Si(v,y,K,St),St="px"),yt&&(K||K===0)&&(et=K+O+St)),yt&&(K+=O),!O&&O!==0||!K&&K!==0?Nt[y]!==void 0&&(et||et+""!="NaN"&&et!=null)?(R=new Ve(Nt,y,K||O||0,0,R,-1,y,!1,0,rt,et),R.xs0=et!=="none"||y!=="display"&&y.indexOf("Style")===-1?et:rt):Rn("invalid "+y+" tween value: "+E[y]):(R=new Ve(Nt,y,O,K-O,R,0,y,wt!==!1&&(St==="px"||y==="zIndex"),0,rt,et),R.xs0=St))}L&&R&&!R.plugin&&(R.plugin=L)}return R},ht.setRatio=function(v){var E,R,L,y=this._firstPT,X=1e-6;if(v!==1||this._tween._time!==this._tween._duration&&this._tween._time!==0)if(v||this._tween._time!==this._tween._duration&&this._tween._time!==0||this._tween._rawPrevTime===-1e-6)for(;y;){if(E=y.c*v+y.s,y.r?E=y.r(E):X>E&&E>-X&&(E=0),y.type)if(y.type===1)if(L=y.l,L===2)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2;else if(L===3)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2+y.xn2+y.xs3;else if(L===4)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2+y.xn2+y.xs3+y.xn3+y.xs4;else if(L===5)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2+y.xn2+y.xs3+y.xn3+y.xs4+y.xn4+y.xs5;else{for(R=y.xs0+E+y.xs1,L=1;L<y.l;L++)R+=y["xn"+L]+y["xs"+(L+1)];y.t[y.p]=R}else y.type===-1?y.t[y.p]=y.xs0:y.setRatio&&y.setRatio(v);else y.t[y.p]=E+y.xs0;y=y._next}else for(;y;)y.type!==2?y.t[y.p]=y.b:y.setRatio(v),y=y._next;else for(;y;){if(y.type!==2)if(y.r&&y.type!==-1)if(E=y.r(y.s+y.c),y.type){if(y.type===1){for(L=y.l,R=y.xs0+E+y.xs1,L=1;L<y.l;L++)R+=y["xn"+L]+y["xs"+(L+1)];y.t[y.p]=R}}else y.t[y.p]=E+y.xs0;else y.t[y.p]=y.e;else y.setRatio(v);y=y._next}},ht._enableTransforms=function(v){this._transform=this._transform||sn(this._target,at,!0),this._transformType=this._transform.svg&&rn||!v&&this._transformType!==3?2:3};var Eo=function(v){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};ht._addLazySet=function(v,E,R){var L=this._firstPT=new Ve(v,E,0,0,this._firstPT,2);L.e=R,L.setRatio=Eo,L.data=this},ht._linkCSSP=function(v,E,R,L){return v&&(E&&(E._prev=v),v._next&&(v._next._prev=v._prev),v._prev?v._prev._next=v._next:this._firstPT===v&&(this._firstPT=v._next,L=!0),R?R._next=v:L||this._firstPT!==null||(this._firstPT=v),v._next=E,v._prev=R),v},ht._mod=function(v){for(var E=this._firstPT;E;)typeof v[E.p]=="function"&&(E.r=v[E.p]),E=E._next},ht._kill=function(v){var E,R,L,y=v;if(v.autoAlpha||v.alpha){y={};for(R in v)y[R]=v[R];y.opacity=1,y.autoAlpha&&(y.visibility=1)}for(v.className&&(E=this._classNamePT)&&(L=E.xfirst,L&&L._prev?this._linkCSSP(L._prev,E._next,L._prev._prev):L===this._firstPT&&(this._firstPT=E._next),E._next&&this._linkCSSP(E._next,E._next._next,L._prev),this._classNamePT=null),E=this._firstPT;E;)E.plugin&&E.plugin!==R&&E.plugin._kill&&(E.plugin._kill(v),R=E.plugin),E=E._next;return p.prototype._kill.call(this,y)};var En=function(v,E,R){var L,y,X,O;if(v.slice)for(y=v.length;--y>-1;)En(v[y],E,R);else for(L=v.childNodes,y=L.length;--y>-1;)X=L[y],O=X.type,X.style&&(E.push(nn(X)),R&&R.push(X)),O!==1&&O!==9&&O!==11||!X.childNodes.length||En(X,E,R)};return mt.cascadeTo=function(v,E,R){var L,y,X,O,K=pt.to(v,E,R),rt=[K],et=[],W=[],St=[],Et=pt._internals.reservedProps;for(v=K._targets||K.target,En(v,et,St),K.render(E,!0,!0),En(v,W),K.render(0,!0,!0),K._enabled(!0),L=St.length;--L>-1;)if(y=Ri(St[L],et[L],W[L]),y.firstMPT){y=y.difs;for(X in R)Et[X]&&(y[X]=R[X]);O={};for(X in y)O[X]=et[L][X];rt.push(pt.fromTo(St[L],E,O,y))}return rt},p.activate([mt]),mt},!0),function(){var p=$e._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(at,x,mt){return this._tween=mt,!0}}),pt=function(at){var x=1>at?Math.pow(10,(at+"").length-2):1;return function(mt){return(Math.round(mt/at)*at*x|0)/x}},Z=function(at,x){for(;at;)at.f||at.blob||(at.m=x||Math.round),at=at._next},ft=p.prototype;ft._onInitAllProps=function(){var at,x,mt,Ct,Y=this._tween,ht=Y.vars.roundProps,wt={},ct=Y._propLookup.roundProps;if(typeof ht!="object"||ht.push)for(typeof ht=="string"&&(ht=ht.split(",")),mt=ht.length;--mt>-1;)wt[ht[mt]]=Math.round;else for(Ct in ht)wt[Ct]=pt(ht[Ct]);for(Ct in wt)for(at=Y._firstPT;at;)x=at._next,at.pg?at.t._mod(wt):at.n===Ct&&(at.f===2&&at.t?Z(at.t._firstPT,wt[Ct]):(this._add(at.t,Ct,at.s,at.c,wt[Ct]),x&&(x._prev=at._prev),at._prev?at._prev._next=x:Y._firstPT===at&&(Y._firstPT=x),at._next=at._prev=null,Y._propLookup[Ct]=ct)),at=x;return!1},ft._add=function(at,x,mt,Ct,Y){this._addTween(at,x,mt,mt+Ct,x,Y||Math.round),this._overwriteProps.push(x)}}(),function(){$e._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(p,pt,Z,ft){var at,x;if(typeof p.setAttribute!="function")return!1;for(at in pt)x=pt[at],typeof x=="function"&&(x=x(ft,p)),this._addTween(p,"setAttribute",p.getAttribute(at)+"",x+"",at,!1,at),this._overwriteProps.push(at);return!0}})}(),$e._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(p,pt,Z,ft){typeof pt!="object"&&(pt={rotation:pt}),this.finals={};var at,x,mt,Ct,Y,ht,wt=pt.useRadians===!0?2*Math.PI:360,ct=1e-6;for(at in pt)at!=="useRadians"&&(Ct=pt[at],typeof Ct=="function"&&(Ct=Ct(ft,p)),ht=(Ct+"").split("_"),x=ht[0],mt=parseFloat(typeof p[at]!="function"?p[at]:p[at.indexOf("set")||typeof p["get"+at.substr(3)]!="function"?at:"get"+at.substr(3)]()),Ct=this.finals[at]=typeof x=="string"&&x.charAt(1)==="="?mt+parseInt(x.charAt(0)+"1",10)*Number(x.substr(2)):Number(x)||0,Y=Ct-mt,ht.length&&(x=ht.join("_"),x.indexOf("short")!==-1&&(Y%=wt,Y!==Y%(wt/2)&&(Y=0>Y?Y+wt:Y-wt)),x.indexOf("_cw")!==-1&&0>Y?Y=(Y+9999999999*wt)%wt-(Y/wt|0)*wt:x.indexOf("ccw")!==-1&&Y>0&&(Y=(Y-9999999999*wt)%wt-(Y/wt|0)*wt)),(Y>ct||-ct>Y)&&(this._addTween(p,at,mt,mt+Y,at),this._overwriteProps.push(at)));return!0},set:function(p){var pt;if(p!==1)this._super.setRatio.call(this,p);else for(pt=this._firstPT;pt;)pt.f?pt.t[pt.p](this.finals[pt.p]):pt.t[pt.p]=this.finals[pt.p],pt=pt._next}})._autoCSS=!0,$e._gsDefine("easing.Back",["easing.Ease"],function(p){var pt,Z,ft,at,x=$e.GreenSockGlobals||$e,mt=x.com.greensock,Ct=2*Math.PI,Y=Math.PI/2,ht=mt._class,wt=function(f,C){var M=ht("easing."+f,function(){},!0),G=M.prototype=new p;return G.constructor=M,G.getRatio=C,M},ct=p.register||function(){},Pt=function(f,C,M,G,b){var F=ht("easing."+f,{easeOut:new C,easeIn:new M,easeInOut:new G},!0);return ct(F,f),F},Ot=function(f,C,M){this.t=f,this.v=C,M&&(this.next=M,M.prev=this,this.c=M.v-C,this.gap=M.t-f)},xt=function(f,C){var M=ht("easing."+f,function(b){this._p1=b||b===0?b:1.70158,this._p2=1.525*this._p1},!0),G=M.prototype=new p;return G.constructor=M,G.getRatio=C,G.config=function(b){return new M(b)},M},Q=Pt("Back",xt("BackOut",function(f){return(f-=1)*f*((this._p1+1)*f+this._p1)+1}),xt("BackIn",function(f){return f*f*((this._p1+1)*f-this._p1)}),xt("BackInOut",function(f){return(f*=2)<1?.5*f*f*((this._p2+1)*f-this._p2):.5*((f-=2)*f*((this._p2+1)*f+this._p2)+2)})),H=ht("easing.SlowMo",function(f,C,M){C=C||C===0?C:.7,f==null?f=.7:f>1&&(f=1),this._p=f!==1?C:0,this._p1=(1-f)/2,this._p2=f,this._p3=this._p1+this._p2,this._calcEnd=M===!0},!0),m=H.prototype=new p;return m.constructor=H,m.getRatio=function(f){var C=f+(.5-f)*this._p;return f<this._p1?this._calcEnd?1-(f=1-f/this._p1)*f:C-(f=1-f/this._p1)*f*f*f*C:f>this._p3?this._calcEnd?f===1?0:1-(f=(f-this._p3)/this._p1)*f:C+(f-C)*(f=(f-this._p3)/this._p1)*f*f*f:this._calcEnd?1:C},H.ease=new H(.7,.7),m.config=H.config=function(f,C,M){return new H(f,C,M)},pt=ht("easing.SteppedEase",function(f,C){f=f||1,this._p1=1/f,this._p2=f+(C?0:1),this._p3=C?1:0},!0),m=pt.prototype=new p,m.constructor=pt,m.getRatio=function(f){return 0>f?f=0:f>=1&&(f=.999999999),((this._p2*f|0)+this._p3)*this._p1},m.config=pt.config=function(f,C){return new pt(f,C)},Z=ht("easing.ExpoScaleEase",function(f,C,M){this._p1=Math.log(C/f),this._p2=C-f,this._p3=f,this._ease=M},!0),m=Z.prototype=new p,m.constructor=Z,m.getRatio=function(f){return this._ease&&(f=this._ease.getRatio(f)),(this._p3*Math.exp(this._p1*f)-this._p3)/this._p2},m.config=Z.config=function(f,C,M){return new Z(f,C,M)},ft=ht("easing.RoughEase",function(f){f=f||{};for(var C,M,G,b,F,q,st=f.taper||"none",it=[],Lt=0,bt=0|(f.points||20),Gt=bt,Vt=f.randomize!==!1,ie=f.clamp===!0,ut=f.template instanceof p?f.template:null,kt=typeof f.strength=="number"?.4*f.strength:.4;--Gt>-1;)C=Vt?Math.random():1/bt*Gt,M=ut?ut.getRatio(C):C,st==="none"?G=kt:st==="out"?(b=1-C,G=b*b*kt):st==="in"?G=C*C*kt:.5>C?(b=2*C,G=b*b*.5*kt):(b=2*(1-C),G=b*b*.5*kt),Vt?M+=Math.random()*G-.5*G:Gt%2?M+=.5*G:M-=.5*G,ie&&(M>1?M=1:0>M&&(M=0)),it[Lt++]={x:C,y:M};for(it.sort(function(Me,gi){return Me.x-gi.x}),q=new Ot(1,1,null),Gt=bt;--Gt>-1;)F=it[Gt],q=new Ot(F.x,F.y,q);this._prev=new Ot(0,0,q.t!==0?q:q.next)},!0),m=ft.prototype=new p,m.constructor=ft,m.getRatio=function(f){var C=this._prev;if(f>C.t){for(;C.next&&f>=C.t;)C=C.next;C=C.prev}else for(;C.prev&&f<=C.t;)C=C.prev;return this._prev=C,C.v+(f-C.t)/C.gap*C.c},m.config=function(f){return new ft(f)},ft.ease=new ft,Pt("Bounce",wt("BounceOut",function(f){return 1/2.75>f?7.5625*f*f:2/2.75>f?7.5625*(f-=1.5/2.75)*f+.75:2.5/2.75>f?7.5625*(f-=2.25/2.75)*f+.9375:7.5625*(f-=2.625/2.75)*f+.984375}),wt("BounceIn",function(f){return(f=1-f)<1/2.75?1-7.5625*f*f:2/2.75>f?1-(7.5625*(f-=1.5/2.75)*f+.75):2.5/2.75>f?1-(7.5625*(f-=2.25/2.75)*f+.9375):1-(7.5625*(f-=2.625/2.75)*f+.984375)}),wt("BounceInOut",function(f){var C=.5>f;return f=C?1-2*f:2*f-1,f=1/2.75>f?7.5625*f*f:2/2.75>f?7.5625*(f-=1.5/2.75)*f+.75:2.5/2.75>f?7.5625*(f-=2.25/2.75)*f+.9375:7.5625*(f-=2.625/2.75)*f+.984375,C?.5*(1-f):.5*f+.5})),Pt("Circ",wt("CircOut",function(f){return Math.sqrt(1-(f-=1)*f)}),wt("CircIn",function(f){return-(Math.sqrt(1-f*f)-1)}),wt("CircInOut",function(f){return(f*=2)<1?-.5*(Math.sqrt(1-f*f)-1):.5*(Math.sqrt(1-(f-=2)*f)+1)})),at=function(f,C,M){var G=ht("easing."+f,function(F,q){this._p1=F>=1?F:1,this._p2=(q||M)/(1>F?F:1),this._p3=this._p2/Ct*(Math.asin(1/this._p1)||0),this._p2=Ct/this._p2},!0),b=G.prototype=new p;return b.constructor=G,b.getRatio=C,b.config=function(F,q){return new G(F,q)},G},Pt("Elastic",at("ElasticOut",function(f){return this._p1*Math.pow(2,-10*f)*Math.sin((f-this._p3)*this._p2)+1},.3),at("ElasticIn",function(f){return-(this._p1*Math.pow(2,10*(f-=1))*Math.sin((f-this._p3)*this._p2))},.3),at("ElasticInOut",function(f){return(f*=2)<1?-.5*(this._p1*Math.pow(2,10*(f-=1))*Math.sin((f-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(f-=1))*Math.sin((f-this._p3)*this._p2)*.5+1},.45)),Pt("Expo",wt("ExpoOut",function(f){return 1-Math.pow(2,-10*f)}),wt("ExpoIn",function(f){return Math.pow(2,10*(f-1))-.001}),wt("ExpoInOut",function(f){return(f*=2)<1?.5*Math.pow(2,10*(f-1)):.5*(2-Math.pow(2,-10*(f-1)))})),Pt("Sine",wt("SineOut",function(f){return Math.sin(f*Y)}),wt("SineIn",function(f){return-Math.cos(f*Y)+1}),wt("SineInOut",function(f){return-.5*(Math.cos(Math.PI*f)-1)})),ht("easing.EaseLookup",{find:function(f){return p.map[f]}},!0),ct(x.SlowMo,"SlowMo","ease,"),ct(ft,"RoughEase","ease,"),ct(pt,"SteppedEase","ease,"),Q},!0)}),$e._gsDefine&&$e._gsQueue.pop()(),function(p,pt){var Z={},ft=p.document,at=p.GreenSockGlobals=p.GreenSockGlobals||p,x=at[pt];if(x)return typeof module<"u"&&module.exports&&(module.exports=x),x;var mt,Ct,Y,ht,wt,ct=function(_){var D,B=_.split("."),U=at;for(D=0;D<B.length;D++)U[B[D]]=U=U[B[D]]||{};return U},Pt=ct("com.greensock"),Ot=1e-10,xt=function(_){var D,B=[],U=_.length;for(D=0;D!==U;B.push(_[D++]));return B},Q=function(){},H=function(){var _=Object.prototype.toString,D=_.call([]);return function(B){return B!=null&&(B instanceof Array||typeof B=="object"&&!!B.push&&_.call(B)===D)}}(),m={},f=function(_,D,B,U){this.sc=m[_]?m[_].sc:[],m[_]=this,this.gsClass=null,this.func=B;var $=[];this.check=function(gt){for(var Tt,dt,ae,se,Ut=D.length,he=Ut;--Ut>-1;)(Tt=m[D[Ut]]||new f(D[Ut],[])).gsClass?($[Ut]=Tt.gsClass,he--):gt&&Tt.sc.push(this);if(he===0&&B){if(dt=("com.greensock."+_).split("."),ae=dt.pop(),se=ct(dt.join("."))[ae]=this.gsClass=B.apply(B,$),U)if(at[ae]=Z[ae]=se,typeof module<"u"&&module.exports)if(_===pt){module.exports=Z[pt]=se;for(Ut in Z)se[Ut]=Z[Ut]}else Z[pt]&&(Z[pt][ae]=se);else typeof define=="function"&&define.amd&&define((p.GreenSockAMDPath?p.GreenSockAMDPath+"/":"")+_.split(".").pop(),[],function(){return se});for(Ut=0;Ut<this.sc.length;Ut++)this.sc[Ut].check()}},this.check(!0)},C=p._gsDefine=function(_,D,B,U){return new f(_,D,B,U)},M=Pt._class=function(_,D,B){return D=D||function(){},C(_,[],function(){return D},B),D};C.globals=at;var G=[0,0,1,1],b=M("easing.Ease",function(_,D,B,U){this._func=_,this._type=B||0,this._power=U||0,this._params=D?G.concat(D):G},!0),F=b.map={},q=b.register=function(_,D,B,U){for(var $,gt,Tt,dt,ae=D.split(","),se=ae.length,Ut=(B||"easeIn,easeOut,easeInOut").split(",");--se>-1;)for(gt=ae[se],$=U?M("easing."+gt,null,!0):Pt.easing[gt]||{},Tt=Ut.length;--Tt>-1;)dt=Ut[Tt],F[gt+"."+dt]=F[dt+gt]=$[dt]=_.getRatio?_:_[dt]||new _};for(Y=b.prototype,Y._calcEnd=!1,Y.getRatio=function(_){if(this._func)return this._params[0]=_,this._func.apply(null,this._params);var D=this._type,B=this._power,U=D===1?1-_:D===2?_:.5>_?2*_:2*(1-_);return B===1?U*=U:B===2?U*=U*U:B===3?U*=U*U*U:B===4&&(U*=U*U*U*U),D===1?1-U:D===2?U:.5>_?U/2:1-U/2},mt=["Linear","Quad","Cubic","Quart","Quint,Strong"],Ct=mt.length;--Ct>-1;)Y=mt[Ct]+",Power"+Ct,q(new b(null,null,1,Ct),Y,"easeOut",!0),q(new b(null,null,2,Ct),Y,"easeIn"+(Ct===0?",easeNone":"")),q(new b(null,null,3,Ct),Y,"easeInOut");F.linear=Pt.easing.Linear.easeIn,F.swing=Pt.easing.Quad.easeInOut;var st=M("events.EventDispatcher",function(_){this._listeners={},this._eventTarget=_||this});Y=st.prototype,Y.addEventListener=function(_,D,B,U,$){$=$||0;var gt,Tt,dt=this._listeners[_],ae=0;for(this!==ht||wt||ht.wake(),dt==null&&(this._listeners[_]=dt=[]),Tt=dt.length;--Tt>-1;)gt=dt[Tt],gt.c===D&>.s===B?dt.splice(Tt,1):ae===0&>.pr<$&&(ae=Tt+1);dt.splice(ae,0,{c:D,s:B,up:U,pr:$})},Y.removeEventListener=function(_,D){var B,U=this._listeners[_];if(U){for(B=U.length;--B>-1;)if(U[B].c===D)return void U.splice(B,1)}},Y.dispatchEvent=function(_){var D,B,U,$=this._listeners[_];if($)for(D=$.length,D>1&&($=$.slice(0)),B=this._eventTarget;--D>-1;)U=$[D],U&&(U.up?U.c.call(U.s||B,{type:_,target:B}):U.c.call(U.s||B))};var it=p.requestAnimationFrame,Lt=p.cancelAnimationFrame,bt=Date.now||function(){return new Date().getTime()},Gt=bt();for(mt=["ms","moz","webkit","o"],Ct=mt.length;--Ct>-1&&!it;)it=p[mt[Ct]+"RequestAnimationFrame"],Lt=p[mt[Ct]+"CancelAnimationFrame"]||p[mt[Ct]+"CancelRequestAnimationFrame"];M("Ticker",function(_,D){var B,U,$,gt,Tt,dt=this,ae=bt(),se=D!==!1&&it?"auto":!1,Ut=500,he=33,ze="tick",Xe=function(Re){var Ve,gn,Wi=bt()-Gt;Wi>Ut&&(ae+=Wi-he),Gt+=Wi,dt.time=(Gt-ae)/1e3,Ve=dt.time-Tt,(!B||Ve>0||Re===!0)&&(dt.frame++,Tt+=Ve+(Ve>=gt?.004:gt-Ve),gn=!0),Re!==!0&&($=U(Xe)),gn&&dt.dispatchEvent(ze)};st.call(dt),dt.time=dt.frame=0,dt.tick=function(){Xe(!0)},dt.lagSmoothing=function(Re,Ve){return arguments.length?(Ut=Re||1/Ot,void(he=Math.min(Ve,Ut,0))):1/Ot>Ut},dt.sleep=function(){$!=null&&(se&&Lt?Lt($):clearTimeout($),U=Q,$=null,dt===ht&&(wt=!1))},dt.wake=function(Re){$!==null?dt.sleep():Re?ae+=-Gt+(Gt=bt()):dt.frame>10&&(Gt=bt()-Ut+5),U=B===0?Q:se&&it?it:function(Ve){return setTimeout(Ve,1e3*(Tt-dt.time)+1|0)},dt===ht&&(wt=!0),Xe(2)},dt.fps=function(Re){return arguments.length?(B=Re,gt=1/(B||60),Tt=this.time+gt,void dt.wake()):B},dt.useRAF=function(Re){return arguments.length?(dt.sleep(),se=Re,void dt.fps(B)):se},dt.fps(_),setTimeout(function(){se==="auto"&&dt.frame<5&&(ft||{}).visibilityState!=="hidden"&&dt.useRAF(!1)},1500)}),Y=Pt.Ticker.prototype=new Pt.events.EventDispatcher,Y.constructor=Pt.Ticker;var Vt=M("core.Animation",function(_,D){if(this.vars=D=D||{},this._duration=this._totalDuration=_||0,this._delay=Number(D.delay)||0,this._timeScale=1,this._active=D.immediateRender===!0,this.data=D.data,this._reversed=D.reversed===!0,Di){wt||ht.wake();var B=this.vars.useFrames?Vi:Di;B.add(this,B._time),this.vars.paused&&this.paused(!0)}});ht=Vt.ticker=new Pt.Ticker,Y=Vt.prototype,Y._dirty=Y._gc=Y._initted=Y._paused=!1,Y._totalTime=Y._time=0,Y._rawPrevTime=-1,Y._next=Y._last=Y._onUpdate=Y._timeline=Y.timeline=null,Y._paused=!1;var ie=function(){wt&&bt()-Gt>2e3&&((ft||{}).visibilityState!=="hidden"||!ht.lagSmoothing())&&ht.wake();var _=setTimeout(ie,2e3);_.unref&&_.unref()};ie(),Y.play=function(_,D){return _!=null&&this.seek(_,D),this.reversed(!1).paused(!1)},Y.pause=function(_,D){return _!=null&&this.seek(_,D),this.paused(!0)},Y.resume=function(_,D){return _!=null&&this.seek(_,D),this.paused(!1)},Y.seek=function(_,D){return this.totalTime(Number(_),D!==!1)},Y.restart=function(_,D){return this.reversed(!1).paused(!1).totalTime(_?-this._delay:0,D!==!1,!0)},Y.reverse=function(_,D){return _!=null&&this.seek(_||this.totalDuration(),D),this.reversed(!0).paused(!1)},Y.render=function(_,D,B){},Y.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},Y.isActive=function(){var _,D=this._timeline,B=this._startTime;return!D||!this._gc&&!this._paused&&D.isActive()&&(_=D.rawTime(!0))>=B&&_<B+this.totalDuration()/this._timeScale-1e-7},Y._enabled=function(_,D){return wt||ht.wake(),this._gc=!_,this._active=this.isActive(),D!==!0&&(_&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!_&&this.timeline&&this._timeline._remove(this,!0)),!1},Y._kill=function(_,D){return this._enabled(!1,!1)},Y.kill=function(_,D){return this._kill(_,D),this},Y._uncache=function(_){for(var D=_?this:this.timeline;D;)D._dirty=!0,D=D.timeline;return this},Y._swapSelfInParams=function(_){for(var D=_.length,B=_.concat();--D>-1;)_[D]==="{self}"&&(B[D]=this);return B},Y._callback=function(_){var D=this.vars,B=D[_],U=D[_+"Params"],$=D[_+"Scope"]||D.callbackScope||this,gt=U?U.length:0;switch(gt){case 0:B.call($);break;case 1:B.call($,U[0]);break;case 2:B.call($,U[0],U[1]);break;default:B.apply($,U)}},Y.eventCallback=function(_,D,B,U){if((_||"").substr(0,2)==="on"){var $=this.vars;if(arguments.length===1)return $[_];D==null?delete $[_]:($[_]=D,$[_+"Params"]=H(B)&&B.join("").indexOf("{self}")!==-1?this._swapSelfInParams(B):B,$[_+"Scope"]=U),_==="onUpdate"&&(this._onUpdate=D)}return this},Y.delay=function(_){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+_-this._delay),this._delay=_,this):this._delay},Y.duration=function(_){return arguments.length?(this._duration=this._totalDuration=_,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&_!==0&&this.totalTime(this._totalTime*(_/this._duration),!0),this):(this._dirty=!1,this._duration)},Y.totalDuration=function(_){return this._dirty=!1,arguments.length?this.duration(_):this._totalDuration},Y.time=function(_,D){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(_>this._duration?this._duration:_,D)):this._time},Y.totalTime=function(_,D,B){if(wt||ht.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>_&&!B&&(_+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var U=this._totalDuration,$=this._timeline;if(_>U&&!B&&(_=U),this._startTime=(this._paused?this._pauseTime:$._time)-(this._reversed?U-_:_)/this._timeScale,$._dirty||this._uncache(!1),$._timeline)for(;$._timeline;)$._timeline._time!==($._startTime+$._totalTime)/$._timeScale&&$.totalTime($._totalTime,!0),$=$._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==_||this._duration===0)&&(Rt.length&&ci(),this.render(_,D,!1),Rt.length&&ci())}return this},Y.progress=Y.totalProgress=function(_,D){var B=this.duration();return arguments.length?this.totalTime(B*_,D):B?this._time/B:this.ratio},Y.startTime=function(_){return arguments.length?(_!==this._startTime&&(this._startTime=_,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,_-this._delay)),this):this._startTime},Y.endTime=function(_){return this._startTime+(_!=0?this.totalDuration():this.duration())/this._timeScale},Y.timeScale=function(_){if(!arguments.length)return this._timeScale;var D,B;for(_=_||Ot,this._timeline&&this._timeline.smoothChildTiming&&(D=this._pauseTime,B=D||D===0?D:this._timeline.totalTime(),this._startTime=B-(B-this._startTime)*this._timeScale/_),this._timeScale=_,B=this.timeline;B&&B.timeline;)B._dirty=!0,B.totalDuration(),B=B.timeline;return this},Y.reversed=function(_){return arguments.length?(_!=this._reversed&&(this._reversed=_,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},Y.paused=function(_){if(!arguments.length)return this._paused;var D,B,U=this._timeline;return _!=this._paused&&U&&(wt||_||ht.wake(),D=U.rawTime(),B=D-this._pauseTime,!_&&U.smoothChildTiming&&(this._startTime+=B,this._uncache(!1)),this._pauseTime=_?D:null,this._paused=_,this._active=this.isActive(),!_&&B!==0&&this._initted&&this.duration()&&(D=U.smoothChildTiming?this._totalTime:(D-this._startTime)/this._timeScale,this.render(D,D===this._totalTime,!0))),this._gc&&!_&&this._enabled(!0,!1),this};var ut=M("core.SimpleTimeline",function(_){Vt.call(this,0,_),this.autoRemoveChildren=this.smoothChildTiming=!0});Y=ut.prototype=new Vt,Y.constructor=ut,Y.kill()._gc=!1,Y._first=Y._last=Y._recent=null,Y._sortChildren=!1,Y.add=Y.insert=function(_,D,B,U){var $,gt;if(_._startTime=Number(D||0)+_._delay,_._paused&&this!==_._timeline&&(_._pauseTime=this.rawTime()-(_._timeline.rawTime()-_._pauseTime)),_.timeline&&_.timeline._remove(_,!0),_.timeline=_._timeline=this,_._gc&&_._enabled(!0,!0),$=this._last,this._sortChildren)for(gt=_._startTime;$&&$._startTime>gt;)$=$._prev;return $?(_._next=$._next,$._next=_):(_._next=this._first,this._first=_),_._next?_._next._prev=_:this._last=_,_._prev=$,this._recent=_,this._timeline&&this._uncache(!0),this},Y._remove=function(_,D){return _.timeline===this&&(D||_._enabled(!1,!0),_._prev?_._prev._next=_._next:this._first===_&&(this._first=_._next),_._next?_._next._prev=_._prev:this._last===_&&(this._last=_._prev),_._next=_._prev=_.timeline=null,_===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},Y.render=function(_,D,B){var U,$=this._first;for(this._totalTime=this._time=this._rawPrevTime=_;$;)U=$._next,($._active||_>=$._startTime&&!$._paused&&!$._gc)&&($._reversed?$.render(($._dirty?$.totalDuration():$._totalDuration)-(_-$._startTime)*$._timeScale,D,B):$.render((_-$._startTime)*$._timeScale,D,B)),$=U},Y.rawTime=function(){return wt||ht.wake(),this._totalTime};var kt=M("TweenLite",function(_,D,B){if(Vt.call(this,D,B),this.render=kt.prototype.render,_==null)throw"Cannot tween a null target.";this.target=_=typeof _!="string"?_:kt.selector(_)||_;var U,$,gt,Tt=_.jquery||_.length&&_!==p&&_[0]&&(_[0]===p||_[0].nodeType&&_[0].style&&!_.nodeType),dt=this.vars.overwrite;if(this._overwrite=dt=dt==null?Rn[kt.defaultOverwrite]:typeof dt=="number"?dt>>0:Rn[dt],(Tt||_ instanceof Array||_.push&&H(_))&&typeof _[0]!="number")for(this._targets=gt=xt(_),this._propLookup=[],this._siblings=[],U=0;U<gt.length;U++)$=gt[U],$?typeof $!="string"?$.length&&$!==p&&$[0]&&($[0]===p||$[0].nodeType&&$[0].style&&!$.nodeType)?(gt.splice(U--,1),this._targets=gt=gt.concat(xt($))):(this._siblings[U]=Oe($,this,!1),dt===1&&this._siblings[U].length>1&&Tn($,this,null,1,this._siblings[U])):($=gt[U--]=kt.selector($),typeof $=="string"&>.splice(U+1,1)):gt.splice(U--,1);else this._propLookup={},this._siblings=Oe(_,this,!1),dt===1&&this._siblings.length>1&&Tn(_,this,null,1,this._siblings);(this.vars.immediateRender||D===0&&this._delay===0&&this.vars.immediateRender!==!1)&&(this._time=-Ot,this.render(Math.min(0,-this._delay)))},!0),Me=function(_){return _&&_.length&&_!==p&&_[0]&&(_[0]===p||_[0].nodeType&&_[0].style&&!_.nodeType)},gi=function(_,D){var B,U={};for(B in _)Mn[B]||B in D&&B!=="transform"&&B!=="x"&&B!=="y"&&B!=="width"&&B!=="height"&&B!=="className"&&B!=="border"||!(!Ce[B]||Ce[B]&&Ce[B]._autoCSS)||(U[B]=_[B],delete _[B]);_.css=U};Y=kt.prototype=new Vt,Y.constructor=kt,Y.kill()._gc=!1,Y.ratio=0,Y._firstPT=Y._targets=Y._overwrittenProps=Y._startAt=null,Y._notifyPluginsOfEnabled=Y._lazy=!1,kt.version="2.0.2",kt.defaultEase=Y._ease=new b(null,null,1,1),kt.defaultOverwrite="auto",kt.ticker=ht,kt.autoSleep=120,kt.lagSmoothing=function(_,D){ht.lagSmoothing(_,D)},kt.selector=p.$||p.jQuery||function(_){var D=p.$||p.jQuery;return D?(kt.selector=D,D(_)):(ft||(ft=p.document),ft?ft.querySelectorAll?ft.querySelectorAll(_):ft.getElementById(_.charAt(0)==="#"?_.substr(1):_):_)};var Rt=[],Fe={},vi=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Ti=/[\+-]=-?[\.\d]/,oi=function(_){for(var D,B=this._firstPT,U=1e-6;B;)D=B.blob?_===1&&this.end!=null?this.end:_?this.join(""):this.start:B.c*_+B.s,B.m?D=B.m.call(this._tween,D,this._target||B.t,this._tween):U>D&&D>-U&&!B.blob&&(D=0),B.f?B.fp?B.t[B.p](B.fp,D):B.t[B.p](D):B.t[B.p]=D,B=B._next},fe=function(_,D,B,U){var $,gt,Tt,dt,ae,se,Ut,he=[],ze=0,Xe="",Re=0;for(he.start=_,he.end=D,_=he[0]=_+"",D=he[1]=D+"",B&&(B(he),_=he[0],D=he[1]),he.length=0,$=_.match(vi)||[],gt=D.match(vi)||[],U&&(U._next=null,U.blob=1,he._firstPT=he._applyPT=U),ae=gt.length,dt=0;ae>dt;dt++)Ut=gt[dt],se=D.substr(ze,D.indexOf(Ut,ze)-ze),Xe+=se||!dt?se:",",ze+=se.length,Re?Re=(Re+1)%5:se.substr(-5)==="rgba("&&(Re=1),Ut===$[dt]||$.length<=dt?Xe+=Ut:(Xe&&(he.push(Xe),Xe=""),Tt=parseFloat($[dt]),he.push(Tt),he._firstPT={_next:he._firstPT,t:he,p:he.length-1,s:Tt,c:(Ut.charAt(1)==="="?parseInt(Ut.charAt(0)+"1",10)*parseFloat(Ut.substr(2)):parseFloat(Ut)-Tt)||0,f:0,m:Re&&4>Re?Math.round:0}),ze+=Ut.length;return Xe+=D.substr(ze),Xe&&he.push(Xe),he.setRatio=oi,Ti.test(D)&&(he.end=null),he},Je=function(_,D,B,U,$,gt,Tt,dt,ae){typeof U=="function"&&(U=U(ae||0,_));var se,Ut=typeof _[D],he=Ut!=="function"?"":D.indexOf("set")||typeof _["get"+D.substr(3)]!="function"?D:"get"+D.substr(3),ze=B!=="get"?B:he?Tt?_[he](Tt):_[he]():_[D],Xe=typeof U=="string"&&U.charAt(1)==="=",Re={t:_,p:D,s:ze,f:Ut==="function",pg:0,n:$||D,m:gt?typeof gt=="function"?gt:Math.round:0,pr:0,c:Xe?parseInt(U.charAt(0)+"1",10)*parseFloat(U.substr(2)):parseFloat(U)-ze||0};return(typeof ze!="number"||typeof U!="number"&&!Xe)&&(Tt||isNaN(ze)||!Xe&&isNaN(U)||typeof ze=="boolean"||typeof U=="boolean"?(Re.fp=Tt,se=fe(ze,Xe?parseFloat(Re.s)+Re.c+(Re.s+"").replace(/[0-9\-\.]/g,""):U,dt||kt.defaultStringFilter,Re),Re={t:se,p:"setRatio",s:0,c:1,f:2,pg:0,n:$||D,pr:0,m:0}):(Re.s=parseFloat(ze),Xe||(Re.c=parseFloat(U)-Re.s||0))),Re.c?((Re._next=this._firstPT)&&(Re._next._prev=Re),this._firstPT=Re,Re):void 0},bi=kt._internals={isArray:H,isSelector:Me,lazyTweens:Rt,blobDif:fe},Ce=kt._plugins={},je=bi.tweenLookup={},Ke=0,Mn=bi.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1},Rn={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},Vi=Vt._rootFramesTimeline=new ut,Di=Vt._rootTimeline=new ut,en=30,ci=bi.lazyRender=function(){var _,D=Rt.length;for(Fe={};--D>-1;)_=Rt[D],_&&_._lazy!==!1&&(_.render(_._lazy[0],_._lazy[1],!0),_._lazy=!1);Rt.length=0};Di._startTime=ht.time,Vi._startTime=ht.frame,Di._active=Vi._active=!0,setTimeout(ci,1),Vt._updateRoot=kt.render=function(){var _,D,B;if(Rt.length&&ci(),Di.render((ht.time-Di._startTime)*Di._timeScale,!1,!1),Vi.render((ht.frame-Vi._startTime)*Vi._timeScale,!1,!1),Rt.length&&ci(),ht.frame>=en){en=ht.frame+(parseInt(kt.autoSleep,10)||120);for(B in je){for(D=je[B].tweens,_=D.length;--_>-1;)D[_]._gc&&D.splice(_,1);D.length===0&&delete je[B]}if(B=Di._first,(!B||B._paused)&&kt.autoSleep&&!Vi._first&&ht._listeners.tick.length===1){for(;B&&B._paused;)B=B._next;B||ht.sleep()}}},ht.addEventListener("tick",Vt._updateRoot);var Oe=function(_,D,B){var U,$,gt=_._gsTweenID;if(je[gt||(_._gsTweenID=gt="t"+Ke++)]||(je[gt]={target:_,tweens:[]}),D&&(U=je[gt].tweens,U[$=U.length]=D,B))for(;--$>-1;)U[$]===D&&U.splice($,1);return je[gt].tweens},Si=function(_,D,B,U){var $,gt,Tt=_.vars.onOverwrite;return Tt&&($=Tt(_,D,B,U)),Tt=kt.onOverwrite,Tt&&(gt=Tt(_,D,B,U)),$!==!1&>!==!1},Tn=function(_,D,B,U,$){var gt,Tt,dt,ae;if(U===1||U>=4){for(ae=$.length,gt=0;ae>gt;gt++)if((dt=$[gt])!==D)dt._gc||dt._kill(null,_,D)&&(Tt=!0);else if(U===5)break;return Tt}var se,Ut=D._startTime+Ot,he=[],ze=0,Xe=D._duration===0;for(gt=$.length;--gt>-1;)(dt=$[gt])===D||dt._gc||dt._paused||(dt._timeline!==D._timeline?(se=se||nn(D,0,Xe),nn(dt,se,Xe)===0&&(he[ze++]=dt)):dt._startTime<=Ut&&dt._startTime+dt.totalDuration()/dt._timeScale>Ut&&((Xe||!dt._initted)&&Ut-dt._startTime<=2e-10||(he[ze++]=dt)));for(gt=ze;--gt>-1;)if(dt=he[gt],ae=dt._firstPT,U===2&&dt._kill(B,_,D)&&(Tt=!0),U!==2||!dt._firstPT&&dt._initted&&ae){if(U!==2&&!Si(dt,D))continue;dt._enabled(!1,!1)&&(Tt=!0)}return Tt},nn=function(_,D,B){for(var U=_._timeline,$=U._timeScale,gt=_._startTime;U._timeline;){if(gt+=U._startTime,$*=U._timeScale,U._paused)return-100;U=U._timeline}return gt/=$,gt>D?gt-D:B&>===D||!_._initted&&2*Ot>gt-D?Ot:(gt+=_.totalDuration()/_._timeScale/$)>D+Ot?0:gt-D-Ot};Y._init=function(){var _,D,B,U,$,gt,Tt=this.vars,dt=this._overwrittenProps,ae=this._duration,se=!!Tt.immediateRender,Ut=Tt.ease;if(Tt.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),$={};for(U in Tt.startAt)$[U]=Tt.startAt[U];if($.data="isStart",$.overwrite=!1,$.immediateRender=!0,$.lazy=se&&Tt.lazy!==!1,$.startAt=$.delay=null,$.onUpdate=Tt.onUpdate,$.onUpdateParams=Tt.onUpdateParams,$.onUpdateScope=Tt.onUpdateScope||Tt.callbackScope||this,this._startAt=kt.to(this.target||{},0,$),se){if(this._time>0)this._startAt=null;else if(ae!==0)return}}else if(Tt.runBackwards&&ae!==0)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{this._time!==0&&(se=!1),B={};for(U in Tt)Mn[U]&&U!=="autoCSS"||(B[U]=Tt[U]);if(B.overwrite=0,B.data="isFromStart",B.lazy=se&&Tt.lazy!==!1,B.immediateRender=se,this._startAt=kt.to(this.target,0,B),se){if(this._time===0)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=Ut=Ut?Ut instanceof b?Ut:typeof Ut=="function"?new b(Ut,Tt.easeParams):F[Ut]||kt.defaultEase:kt.defaultEase,Tt.easeParams instanceof Array&&Ut.config&&(this._ease=Ut.config.apply(Ut,Tt.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(gt=this._targets.length,_=0;gt>_;_++)this._initProps(this._targets[_],this._propLookup[_]={},this._siblings[_],dt?dt[_]:null,_)&&(D=!0);else D=this._initProps(this.target,this._propLookup,this._siblings,dt,0);if(D&&kt._onPluginEvent("_onInitAllProps",this),dt&&(this._firstPT||typeof this.target!="function"&&this._enabled(!1,!1)),Tt.runBackwards)for(B=this._firstPT;B;)B.s+=B.c,B.c=-B.c,B=B._next;this._onUpdate=Tt.onUpdate,this._initted=!0},Y._initProps=function(_,D,B,U,$){var gt,Tt,dt,ae,se,Ut;if(_==null)return!1;Fe[_._gsTweenID]&&ci(),this.vars.css||_.style&&_!==p&&_.nodeType&&Ce.css&&this.vars.autoCSS!==!1&&gi(this.vars,_);for(gt in this.vars)if(Ut=this.vars[gt],Mn[gt])Ut&&(Ut instanceof Array||Ut.push&&H(Ut))&&Ut.join("").indexOf("{self}")!==-1&&(this.vars[gt]=Ut=this._swapSelfInParams(Ut,this));else if(Ce[gt]&&(ae=new Ce[gt])._onInitTween(_,this.vars[gt],this,$)){for(this._firstPT=se={_next:this._firstPT,t:ae,p:"setRatio",s:0,c:1,f:1,n:gt,pg:1,pr:ae._priority,m:0},Tt=ae._overwriteProps.length;--Tt>-1;)D[ae._overwriteProps[Tt]]=this._firstPT;(ae._priority||ae._onInitAllProps)&&(dt=!0),(ae._onDisable||ae._onEnable)&&(this._notifyPluginsOfEnabled=!0),se._next&&(se._next._prev=se)}else D[gt]=Je.call(this,_,gt,"get",Ut,gt,0,null,this.vars.stringFilter,$);return U&&this._kill(U,_)?this._initProps(_,D,B,U,$):this._overwrite>1&&this._firstPT&&B.length>1&&Tn(_,this,D,this._overwrite,B)?(this._kill(D,_),this._initProps(_,D,B,U,$)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(Fe[_._gsTweenID]=!0),dt)},Y.render=function(_,D,B){var U,$,gt,Tt,dt=this._time,ae=this._duration,se=this._rawPrevTime;if(_>=ae-1e-7&&_>=0)this._totalTime=this._time=ae,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(U=!0,$="onComplete",B=B||this._timeline.autoRemoveChildren),ae===0&&(this._initted||!this.vars.lazy||B)&&(this._startTime===this._timeline._duration&&(_=0),(0>se||0>=_&&_>=-1e-7||se===Ot&&this.data!=="isPause")&&se!==_&&(B=!0,se>Ot&&($="onReverseComplete")),this._rawPrevTime=Tt=!D||_||se===_?_:Ot);else if(1e-7>_)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(dt!==0||ae===0&&se>0)&&($="onReverseComplete",U=this._reversed),0>_&&(this._active=!1,ae===0&&(this._initted||!this.vars.lazy||B)&&(se>=0&&(se!==Ot||this.data!=="isPause")&&(B=!0),this._rawPrevTime=Tt=!D||_||se===_?_:Ot)),(!this._initted||this._startAt&&this._startAt.progress())&&(B=!0);else if(this._totalTime=this._time=_,this._easeType){var Ut=_/ae,he=this._easeType,ze=this._easePower;(he===1||he===3&&Ut>=.5)&&(Ut=1-Ut),he===3&&(Ut*=2),ze===1?Ut*=Ut:ze===2?Ut*=Ut*Ut:ze===3?Ut*=Ut*Ut*Ut:ze===4&&(Ut*=Ut*Ut*Ut*Ut),he===1?this.ratio=1-Ut:he===2?this.ratio=Ut:.5>_/ae?this.ratio=Ut/2:this.ratio=1-Ut/2}else this.ratio=this._ease.getRatio(_/ae);if(this._time!==dt||B){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!B&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=dt,this._rawPrevTime=se,Rt.push(this),void(this._lazy=[_,D]);this._time&&!U?this.ratio=this._ease.getRatio(this._time/ae):U&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(this._time===0?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==dt&&_>=0&&(this._active=!0),dt===0&&(this._startAt&&(_>=0?this._startAt.render(_,!0,B):$||($="_dummyGS")),this.vars.onStart&&(this._time!==0||ae===0)&&(D||this._callback("onStart"))),gt=this._firstPT;gt;)gt.f?gt.t[gt.p](gt.c*this.ratio+gt.s):gt.t[gt.p]=gt.c*this.ratio+gt.s,gt=gt._next;this._onUpdate&&(0>_&&this._startAt&&_!==-1e-4&&this._startAt.render(_,!0,B),D||(this._time!==dt||U||B)&&this._callback("onUpdate")),$&&(!this._gc||B)&&(0>_&&this._startAt&&!this._onUpdate&&_!==-1e-4&&this._startAt.render(_,!0,B),U&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!D&&this.vars[$]&&this._callback($),ae===0&&this._rawPrevTime===Ot&&Tt!==Ot&&(this._rawPrevTime=0))}},Y._kill=function(_,D,B){if(_==="all"&&(_=null),_==null&&(D==null||D===this.target))return this._lazy=!1,this._enabled(!1,!1);D=typeof D!="string"?D||this._targets||this.target:kt.selector(D)||D;var U,$,gt,Tt,dt,ae,se,Ut,he,ze=B&&this._time&&B._startTime===this._startTime&&this._timeline===B._timeline,Xe=this._firstPT;if((H(D)||Me(D))&&typeof D[0]!="number")for(U=D.length;--U>-1;)this._kill(_,D[U],B)&&(ae=!0);else{if(this._targets){for(U=this._targets.length;--U>-1;)if(D===this._targets[U]){dt=this._propLookup[U]||{},this._overwrittenProps=this._overwrittenProps||[],$=this._overwrittenProps[U]=_?this._overwrittenProps[U]||{}:"all";break}}else{if(D!==this.target)return!1;dt=this._propLookup,$=this._overwrittenProps=_?this._overwrittenProps||{}:"all"}if(dt){if(se=_||dt,Ut=_!==$&&$!=="all"&&_!==dt&&(typeof _!="object"||!_._tempKill),B&&(kt.onOverwrite||this.vars.onOverwrite)){for(gt in se)dt[gt]&&(he||(he=[]),he.push(gt));if((he||!_)&&!Si(this,B,D,he))return!1}for(gt in se)(Tt=dt[gt])&&(ze&&(Tt.f?Tt.t[Tt.p](Tt.s):Tt.t[Tt.p]=Tt.s,ae=!0),Tt.pg&&Tt.t._kill(se)&&(ae=!0),Tt.pg&&Tt.t._overwriteProps.length!==0||(Tt._prev?Tt._prev._next=Tt._next:Tt===this._firstPT&&(this._firstPT=Tt._next),Tt._next&&(Tt._next._prev=Tt._prev),Tt._next=Tt._prev=null),delete dt[gt]),Ut&&($[gt]=1);!this._firstPT&&this._initted&&Xe&&this._enabled(!1,!1)}}return ae},Y.invalidate=function(){return this._notifyPluginsOfEnabled&&kt._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],Vt.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-Ot,this.render(Math.min(0,-this._delay))),this},Y._enabled=function(_,D){if(wt||ht.wake(),_&&this._gc){var B,U=this._targets;if(U)for(B=U.length;--B>-1;)this._siblings[B]=Oe(U[B],this,!0);else this._siblings=Oe(this.target,this,!0)}return Vt.prototype._enabled.call(this,_,D),this._notifyPluginsOfEnabled&&this._firstPT?kt._onPluginEvent(_?"_onEnable":"_onDisable",this):!1},kt.to=function(_,D,B){return new kt(_,D,B)},kt.from=function(_,D,B){return B.runBackwards=!0,B.immediateRender=B.immediateRender!=0,new kt(_,D,B)},kt.fromTo=function(_,D,B,U){return U.startAt=B,U.immediateRender=U.immediateRender!=0&&B.immediateRender!=0,new kt(_,D,U)},kt.delayedCall=function(_,D,B,U,$){return new kt(D,0,{delay:_,onComplete:D,onCompleteParams:B,callbackScope:U,onReverseComplete:D,onReverseCompleteParams:B,immediateRender:!1,lazy:!1,useFrames:$,overwrite:0})},kt.set=function(_,D){return new kt(_,0,D)},kt.getTweensOf=function(_,D){if(_==null)return[];_=typeof _!="string"?_:kt.selector(_)||_;var B,U,$,gt;if((H(_)||Me(_))&&typeof _[0]!="number"){for(B=_.length,U=[];--B>-1;)U=U.concat(kt.getTweensOf(_[B],D));for(B=U.length;--B>-1;)for(gt=U[B],$=B;--$>-1;)gt===U[$]&&U.splice(B,1)}else if(_._gsTweenID)for(U=Oe(_).concat(),B=U.length;--B>-1;)(U[B]._gc||D&&!U[B].isActive())&&U.splice(B,1);return U||[]},kt.killTweensOf=kt.killDelayedCallsTo=function(_,D,B){typeof D=="object"&&(B=D,D=!1);for(var U=kt.getTweensOf(_,D),$=U.length;--$>-1;)U[$]._kill(B,_)};var Ri=M("plugins.TweenPlugin",function(_,D){this._overwriteProps=(_||"").split(","),this._propName=this._overwriteProps[0],this._priority=D||0,this._super=Ri.prototype},!0);if(Y=Ri.prototype,Ri.version="1.19.0",Ri.API=2,Y._firstPT=null,Y._addTween=Je,Y.setRatio=oi,Y._kill=function(_){var D,B=this._overwriteProps,U=this._firstPT;if(_[this._propName]!=null)this._overwriteProps=[];else for(D=B.length;--D>-1;)_[B[D]]!=null&&B.splice(D,1);for(;U;)_[U.n]!=null&&(U._next&&(U._next._prev=U._prev),U._prev?(U._prev._next=U._next,U._prev=null):this._firstPT===U&&(this._firstPT=U._next)),U=U._next;return!1},Y._mod=Y._roundProps=function(_){for(var D,B=this._firstPT;B;)D=_[this._propName]||B.n!=null&&_[B.n.split(this._propName+"_").join("")],D&&typeof D=="function"&&(B.f===2?B.t._applyPT.m=D:B.m=D),B=B._next},kt._onPluginEvent=function(_,D){var B,U,$,gt,Tt,dt=D._firstPT;if(_==="_onInitAllProps"){for(;dt;){for(Tt=dt._next,U=$;U&&U.pr>dt.pr;)U=U._next;(dt._prev=U?U._prev:gt)?dt._prev._next=dt:$=dt,(dt._next=U)?U._prev=dt:gt=dt,dt=Tt}dt=D._firstPT=$}for(;dt;)dt.pg&&typeof dt.t[_]=="function"&&dt.t[_]()&&(B=!0),dt=dt._next;return B},Ri.activate=function(_){for(var D=_.length;--D>-1;)_[D].API===Ri.API&&(Ce[new _[D]()._propName]=_[D]);return!0},C.plugin=function(_){if(!(_&&_.propName&&_.init&&_.API))throw"illegal plugin definition.";var D,B=_.propName,U=_.priority||0,$=_.overwriteProps,gt={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},Tt=M("plugins."+B.charAt(0).toUpperCase()+B.substr(1)+"Plugin",function(){Ri.call(this,B,U),this._overwriteProps=$||[]},_.global===!0),dt=Tt.prototype=new Ri(B);dt.constructor=Tt,Tt.API=_.API;for(D in gt)typeof _[D]=="function"&&(dt[gt[D]]=_[D]);return Tt.version=_.version,Ri.activate([Tt]),Tt},mt=p._gsQueue){for(Ct=0;Ct<mt.length;Ct++)mt[Ct]();for(Y in m)m[Y].func||p.console.log("GSAP encountered missing dependency: "+Y)}wt=!1}(typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window,"TweenMax");const ka={class:"modal-background"},ja=["innerHTML"],Va={name:"MapModali"},Hs=Ee.defineComponent({...Va,props:{},setup(p,{expose:pt}){const Z=Ee.ref(""),ft=Ee.ref(""),at=mt=>{ft.value=mt,Z.value="five"},x=()=>{Z.value=Z.value+" out"};return Ee.onMounted(()=>{}),pt({text:ft,show:at,hide:x}),(mt,Ct)=>(Ee.openBlock(),Ee.createElementBlock("div",{id:"modal-container",class:Ee.normalizeClass(Z.value),onClick:x},[Ee.createElementVNode("div",ka,[Ee.createElementVNode("div",{class:"modal",onClick:Ct[0]||(Ct[0]=Y=>{Y.stopPropagation()})},[Ee.createElementVNode("p",{style:{"white-space":"pre-line","line-height":"1",margin:"0",color:"#fff"},innerHTML:ft.value},null,8,ja)])])],2))}}),Sh="",Wa={class:"bim_background_plate"},Xa={class:"content"},qa=Ee.createElementVNode("canvas",{class:"landscape"},null,-1),Ya={class:"content__title"},Za=Ee.createElementVNode("div",{class:"overlay"},null,-1),Ja={name:"BimBackgroundPlate"},ks=Ee.defineComponent({...Ja,setup(p){const pt=()=>{let at=`
|
|
13
|
+
**/var ji=typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window;(ji._gsQueue||(ji._gsQueue=[])).push(function(){ji._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(g,ht,M){var _t=function(st){var Z,_=[],y=st.length;for(Z=0;Z!==y;_.push(st[Z++]));return _},mt=function(st,Z,_){var y,B,E=st.cycle;for(y in E)B=E[y],st[y]=typeof B=="function"?B(_,Z[_]):B[_%B.length];delete st.cycle},S=function(st,Z,_){M.call(this,st,Z,_),this._cycle=0,this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._repeat&&this._uncache(!0),this.render=S.prototype.render},Mt=1e-10,qt=M._internals,nt=qt.isSelector,Tt=qt.isArray,bt=S.prototype=M.to({},.1,{}),gt=[];S.version="2.0.2",bt.constructor=S,bt.kill()._gc=!1,S.killTweensOf=S.killDelayedCallsTo=M.killTweensOf,S.getTweensOf=M.getTweensOf,S.lagSmoothing=M.lagSmoothing,S.ticker=M.ticker,S.render=M.render,bt.invalidate=function(){return this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._yoyoEase=null,this._uncache(!0),M.prototype.invalidate.call(this)},bt.updateTo=function(st,Z){var _,y=this.ratio,B=this.vars.immediateRender||st.immediateRender;Z&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(_ in st)this.vars[_]=st[_];if(this._initted||B){if(Z)this._initted=!1,B&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&M._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var E=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(E,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||B)for(var Y,z=1/(1-y),X=this._firstPT;X;)Y=X.s+X.c,X.c*=z,X.s=Y-X.c,X=X._next}return this},bt.render=function(st,Z,_){this._initted||this._duration===0&&this.vars.repeat&&this.invalidate();var y,B,E,Y,z,X,et,yt,ft,zt=this._dirty?this.totalDuration():this._totalDuration,Yt=this._time,re=this._totalTime,se=this._cycle,we=this._duration,Et=this._rawPrevTime;if(st>=zt-1e-7&&st>=0?(this._totalTime=zt,this._cycle=this._repeat,this._yoyo&&1&this._cycle?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=we,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(y=!0,B="onComplete",_=_||this._timeline.autoRemoveChildren),we===0&&(this._initted||!this.vars.lazy||_)&&(this._startTime===this._timeline._duration&&(st=0),(0>Et||0>=st&&st>=-1e-7||Et===Mt&&this.data!=="isPause")&&Et!==st&&(_=!0,Et>Mt&&(B="onReverseComplete")),this._rawPrevTime=yt=!Z||st||Et===st?st:Mt)):1e-7>st?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(re!==0||we===0&&Et>0)&&(B="onReverseComplete",y=this._reversed),0>st&&(this._active=!1,we===0&&(this._initted||!this.vars.lazy||_)&&(Et>=0&&(_=!0),this._rawPrevTime=yt=!Z||st||Et===st?st:Mt)),this._initted||(_=!0)):(this._totalTime=this._time=st,this._repeat!==0&&(Y=we+this._repeatDelay,this._cycle=this._totalTime/Y>>0,this._cycle!==0&&this._cycle===this._totalTime/Y&&st>=re&&this._cycle--,this._time=this._totalTime-this._cycle*Y,this._yoyo&&1&this._cycle&&(this._time=we-this._time,ft=this._yoyoEase||this.vars.yoyoEase,ft&&(this._yoyoEase||(ft!==!0||this._initted?this._yoyoEase=ft=ft===!0?this._ease:ft instanceof Ease?ft:Ease.map[ft]:(ft=this.vars.ease,this._yoyoEase=ft=ft?ft instanceof Ease?ft:typeof ft=="function"?new Ease(ft,this.vars.easeParams):Ease.map[ft]||M.defaultEase:M.defaultEase)),this.ratio=ft?1-ft.getRatio((we-this._time)/we):0)),this._time>we?this._time=we:this._time<0&&(this._time=0)),this._easeType&&!ft?(z=this._time/we,X=this._easeType,et=this._easePower,(X===1||X===3&&z>=.5)&&(z=1-z),X===3&&(z*=2),et===1?z*=z:et===2?z*=z*z:et===3?z*=z*z*z:et===4&&(z*=z*z*z*z),X===1?this.ratio=1-z:X===2?this.ratio=z:this._time/we<.5?this.ratio=z/2:this.ratio=1-z/2):ft||(this.ratio=this._ease.getRatio(this._time/we))),Yt===this._time&&!_&&se===this._cycle)return void(re!==this._totalTime&&this._onUpdate&&(Z||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!_&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=Yt,this._totalTime=re,this._rawPrevTime=Et,this._cycle=se,qt.lazyTweens.push(this),void(this._lazy=[st,Z]);!this._time||y||ft?y&&this._ease._calcEnd&&!ft&&(this.ratio=this._ease.getRatio(this._time===0?0:1)):this.ratio=this._ease.getRatio(this._time/we)}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==Yt&&st>=0&&(this._active=!0),re===0&&(this._initted===2&&st>0&&this._init(),this._startAt&&(st>=0?this._startAt.render(st,!0,_):B||(B="_dummyGS")),this.vars.onStart&&(this._totalTime!==0||we===0)&&(Z||this._callback("onStart"))),E=this._firstPT;E;)E.f?E.t[E.p](E.c*this.ratio+E.s):E.t[E.p]=E.c*this.ratio+E.s,E=E._next;this._onUpdate&&(0>st&&this._startAt&&this._startTime&&this._startAt.render(st,!0,_),Z||(this._totalTime!==re||B)&&this._callback("onUpdate")),this._cycle!==se&&(Z||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),B&&(!this._gc||_)&&(0>st&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(st,!0,_),y&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!Z&&this.vars[B]&&this._callback(B),we===0&&this._rawPrevTime===Mt&&yt!==Mt&&(this._rawPrevTime=0))},S.to=function(st,Z,_){return new S(st,Z,_)},S.from=function(st,Z,_){return _.runBackwards=!0,_.immediateRender=_.immediateRender!=0,new S(st,Z,_)},S.fromTo=function(st,Z,_,y){return y.startAt=_,y.immediateRender=y.immediateRender!=0&&_.immediateRender!=0,new S(st,Z,y)},S.staggerTo=S.allTo=function(st,Z,_,y,B,E,Y){y=y||0;var z,X,et,yt,ft=0,zt=[],Yt=function(){_.onComplete&&_.onComplete.apply(_.onCompleteScope||this,arguments),B.apply(Y||_.callbackScope||this,E||gt)},re=_.cycle,se=_.startAt&&_.startAt.cycle;for(Tt(st)||(typeof st=="string"&&(st=M.selector(st)||st),nt(st)&&(st=_t(st))),st=st||[],0>y&&(st=_t(st),st.reverse(),y*=-1),z=st.length-1,et=0;z>=et;et++){X={};for(yt in _)X[yt]=_[yt];if(re&&(mt(X,st,et),X.duration!=null&&(Z=X.duration,delete X.duration)),se){se=X.startAt={};for(yt in _.startAt)se[yt]=_.startAt[yt];mt(X.startAt,st,et)}X.delay=ft+(X.delay||0),et===z&&B&&(X.onComplete=Yt),zt[et]=new S(st[et],Z,X),ft+=y}return zt},S.staggerFrom=S.allFrom=function(st,Z,_,y,B,E,Y){return _.runBackwards=!0,_.immediateRender=_.immediateRender!=0,S.staggerTo(st,Z,_,y,B,E,Y)},S.staggerFromTo=S.allFromTo=function(st,Z,_,y,B,E,Y,z){return y.startAt=_,y.immediateRender=y.immediateRender!=0&&_.immediateRender!=0,S.staggerTo(st,Z,y,B,E,Y,z)},S.delayedCall=function(st,Z,_,y,B){return new S(Z,0,{delay:st,onComplete:Z,onCompleteParams:_,callbackScope:y,onReverseComplete:Z,onReverseCompleteParams:_,immediateRender:!1,useFrames:B,overwrite:0})},S.set=function(st,Z){return new S(st,0,Z)},S.isTweening=function(st){return M.getTweensOf(st,!0).length>0};var Nt=function(st,Z){for(var _=[],y=0,B=st._first;B;)B instanceof M?_[y++]=B:(Z&&(_[y++]=B),_=_.concat(Nt(B,Z)),y=_.length),B=B._next;return _},Ht=S.getAllTweens=function(st){return Nt(g._rootTimeline,st).concat(Nt(g._rootFramesTimeline,st))};S.killAll=function(st,Z,_,y){Z==null&&(Z=!0),_==null&&(_=!0);var B,E,Y,z=Ht(y!=0),X=z.length,et=Z&&_&&y;for(Y=0;X>Y;Y++)E=z[Y],(et||E instanceof ht||(B=E.target===E.vars.onComplete)&&_||Z&&!B)&&(st?E.totalTime(E._reversed?0:E.totalDuration()):E._enabled(!1,!1))},S.killChildTweensOf=function(st,Z){if(st!=null){var _,y,B,E,Y,z=qt.tweenLookup;if(typeof st=="string"&&(st=M.selector(st)||st),nt(st)&&(st=_t(st)),Tt(st))for(E=st.length;--E>-1;)S.killChildTweensOf(st[E],Z);else{_=[];for(B in z)for(y=z[B].target.parentNode;y;)y===st&&(_=_.concat(z[B].tweens)),y=y.parentNode;for(Y=_.length,E=0;Y>E;E++)Z&&_[E].totalTime(_[E].totalDuration()),_[E]._enabled(!1,!1)}}};var Ct=function(st,Z,_,y){Z=Z!==!1,_=_!==!1,y=y!==!1;for(var B,E,Y=Ht(y),z=Z&&_&&y,X=Y.length;--X>-1;)E=Y[X],(z||E instanceof ht||(B=E.target===E.vars.onComplete)&&_||Z&&!B)&&E.paused(st)};return S.pauseAll=function(st,Z,_){Ct(!0,st,Z,_)},S.resumeAll=function(st,Z,_){Ct(!1,st,Z,_)},S.globalTimeScale=function(st){var Z=g._rootTimeline,_=M.ticker.time;return arguments.length?(st=st||Mt,Z._startTime=_-(_-Z._startTime)*Z._timeScale/st,Z=g._rootFramesTimeline,_=M.ticker.frame,Z._startTime=_-(_-Z._startTime)*Z._timeScale/st,Z._timeScale=g._rootTimeline._timeScale=st,st):Z._timeScale},bt.progress=function(st,Z){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-st:st)+this._cycle*(this._duration+this._repeatDelay),Z):this._time/this.duration()},bt.totalProgress=function(st,Z){return arguments.length?this.totalTime(this.totalDuration()*st,Z):this._totalTime/this.totalDuration()},bt.time=function(st,Z){return arguments.length?(this._dirty&&this.totalDuration(),st>this._duration&&(st=this._duration),this._yoyo&&1&this._cycle?st=this._duration-st+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(st+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(st,Z)):this._time},bt.duration=function(st){return arguments.length?g.prototype.duration.call(this,st):this._duration},bt.totalDuration=function(st){return arguments.length?this._repeat===-1?this:this.duration((st-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},bt.repeat=function(st){return arguments.length?(this._repeat=st,this._uncache(!0)):this._repeat},bt.repeatDelay=function(st){return arguments.length?(this._repeatDelay=st,this._uncache(!0)):this._repeatDelay},bt.yoyo=function(st){return arguments.length?(this._yoyo=st,this):this._yoyo},S},!0),ji._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(g,ht,M){var _t=function(_){ht.call(this,_),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var y,B,E=this.vars;for(B in E)y=E[B],nt(y)&&y.join("").indexOf("{self}")!==-1&&(E[B]=this._swapSelfInParams(y));nt(E.tweens)&&this.add(E.tweens,0,E.align,E.stagger)},mt=1e-10,S=M._internals,Mt=_t._internals={},qt=S.isSelector,nt=S.isArray,Tt=S.lazyTweens,bt=S.lazyRender,gt=ji._gsDefine.globals,Nt=function(_){var y,B={};for(y in _)B[y]=_[y];return B},Ht=function(_,y,B){var E,Y,z=_.cycle;for(E in z)Y=z[E],_[E]=typeof Y=="function"?Y(B,y[B]):Y[B%Y.length];delete _.cycle},Ct=Mt.pauseCallback=function(){},st=function(_){var y,B=[],E=_.length;for(y=0;y!==E;B.push(_[y++]));return B},Z=_t.prototype=new ht;return _t.version="2.0.2",Z.constructor=_t,Z.kill()._gc=Z._forcingPlayhead=Z._hasPause=!1,Z.to=function(_,y,B,E){var Y=B.repeat&>.TweenMax||M;return y?this.add(new Y(_,y,B),E):this.set(_,B,E)},Z.from=function(_,y,B,E){return this.add((B.repeat&>.TweenMax||M).from(_,y,B),E)},Z.fromTo=function(_,y,B,E,Y){var z=E.repeat&>.TweenMax||M;return y?this.add(z.fromTo(_,y,B,E),Y):this.set(_,E,Y)},Z.staggerTo=function(_,y,B,E,Y,z,X,et){var yt,ft,zt=new _t({onComplete:z,onCompleteParams:X,callbackScope:et,smoothChildTiming:this.smoothChildTiming}),Yt=B.cycle;for(typeof _=="string"&&(_=M.selector(_)||_),_=_||[],qt(_)&&(_=st(_)),E=E||0,0>E&&(_=st(_),_.reverse(),E*=-1),ft=0;ft<_.length;ft++)yt=Nt(B),yt.startAt&&(yt.startAt=Nt(yt.startAt),yt.startAt.cycle&&Ht(yt.startAt,_,ft)),Yt&&(Ht(yt,_,ft),yt.duration!=null&&(y=yt.duration,delete yt.duration)),zt.to(_[ft],y,yt,ft*E);return this.add(zt,Y)},Z.staggerFrom=function(_,y,B,E,Y,z,X,et){return B.immediateRender=B.immediateRender!=0,B.runBackwards=!0,this.staggerTo(_,y,B,E,Y,z,X,et)},Z.staggerFromTo=function(_,y,B,E,Y,z,X,et,yt){return E.startAt=B,E.immediateRender=E.immediateRender!=0&&B.immediateRender!=0,this.staggerTo(_,y,E,Y,z,X,et,yt)},Z.call=function(_,y,B,E){return this.add(M.delayedCall(0,_,y,B),E)},Z.set=function(_,y,B){return B=this._parseTimeOrLabel(B,0,!0),y.immediateRender==null&&(y.immediateRender=B===this._time&&!this._paused),this.add(new M(_,0,y),B)},_t.exportRoot=function(_,y){_=_||{},_.smoothChildTiming==null&&(_.smoothChildTiming=!0);var B,E,Y,z,X=new _t(_),et=X._timeline;for(y==null&&(y=!0),et._remove(X,!0),X._startTime=0,X._rawPrevTime=X._time=X._totalTime=et._time,Y=et._first;Y;)z=Y._next,y&&Y instanceof M&&Y.target===Y.vars.onComplete||(E=Y._startTime-Y._delay,0>E&&(B=1),X.add(Y,E)),Y=z;return et.add(X,0),B&&X.totalDuration(),X},Z.add=function(_,y,B,E){var Y,z,X,et,yt,ft;if(typeof y!="number"&&(y=this._parseTimeOrLabel(y,0,!0,_)),!(_ instanceof g)){if(_ instanceof Array||_&&_.push&&nt(_)){for(B=B||"normal",E=E||0,Y=y,z=_.length,X=0;z>X;X++)nt(et=_[X])&&(et=new _t({tweens:et})),this.add(et,Y),typeof et!="string"&&typeof et!="function"&&(B==="sequence"?Y=et._startTime+et.totalDuration()/et._timeScale:B==="start"&&(et._startTime-=et.delay())),Y+=E;return this._uncache(!0)}if(typeof _=="string")return this.addLabel(_,y);if(typeof _!="function")throw"Cannot add "+_+" into the timeline; it is not a tween, timeline, function, or string.";_=M.delayedCall(0,_)}if(ht.prototype.add.call(this,_,y),_._time&&(Y=Math.max(0,Math.min(_.totalDuration(),(this.rawTime()-_._startTime)*_._timeScale)),Math.abs(Y-_._totalTime)>1e-5&&_.render(Y,!1,!1)),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(yt=this,ft=yt.rawTime()>_._startTime;yt._timeline;)ft&&yt._timeline.smoothChildTiming?yt.totalTime(yt._totalTime,!0):yt._gc&&yt._enabled(!0,!1),yt=yt._timeline;return this},Z.remove=function(_){if(_ instanceof g){this._remove(_,!1);var y=_._timeline=_.vars.useFrames?g._rootFramesTimeline:g._rootTimeline;return _._startTime=(_._paused?_._pauseTime:y._time)-(_._reversed?_.totalDuration()-_._totalTime:_._totalTime)/_._timeScale,this}if(_ instanceof Array||_&&_.push&&nt(_)){for(var B=_.length;--B>-1;)this.remove(_[B]);return this}return typeof _=="string"?this.removeLabel(_):this.kill(null,_)},Z._remove=function(_,y){ht.prototype._remove.call(this,_,y);var B=this._last;return B?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},Z.append=function(_,y){return this.add(_,this._parseTimeOrLabel(null,y,!0,_))},Z.insert=Z.insertMultiple=function(_,y,B,E){return this.add(_,y||0,B,E)},Z.appendMultiple=function(_,y,B,E){return this.add(_,this._parseTimeOrLabel(null,y,!0,_),B,E)},Z.addLabel=function(_,y){return this._labels[_]=this._parseTimeOrLabel(y),this},Z.addPause=function(_,y,B,E){var Y=M.delayedCall(0,Ct,B,E||this);return Y.vars.onComplete=Y.vars.onReverseComplete=y,Y.data="isPause",this._hasPause=!0,this.add(Y,_)},Z.removeLabel=function(_){return delete this._labels[_],this},Z.getLabelTime=function(_){return this._labels[_]!=null?this._labels[_]:-1},Z._parseTimeOrLabel=function(_,y,B,E){var Y,z;if(E instanceof g&&E.timeline===this)this.remove(E);else if(E&&(E instanceof Array||E.push&&nt(E)))for(z=E.length;--z>-1;)E[z]instanceof g&&E[z].timeline===this&&this.remove(E[z]);if(Y=typeof _!="number"||y?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,typeof y=="string")return this._parseTimeOrLabel(y,B&&typeof _=="number"&&this._labels[y]==null?_-Y:0,B);if(y=y||0,typeof _!="string"||!isNaN(_)&&this._labels[_]==null)_==null&&(_=Y);else{if(z=_.indexOf("="),z===-1)return this._labels[_]==null?B?this._labels[_]=Y+y:y:this._labels[_]+y;y=parseInt(_.charAt(z-1)+"1",10)*Number(_.substr(z+1)),_=z>1?this._parseTimeOrLabel(_.substr(0,z-1),0,B):Y}return Number(_)+y},Z.seek=function(_,y){return this.totalTime(typeof _=="number"?_:this._parseTimeOrLabel(_),y!==!1)},Z.stop=function(){return this.paused(!0)},Z.gotoAndPlay=function(_,y){return this.play(_,y)},Z.gotoAndStop=function(_,y){return this.pause(_,y)},Z.render=function(_,y,B){this._gc&&this._enabled(!0,!1);var E,Y,z,X,et,yt,ft,zt=this._time,Yt=this._dirty?this.totalDuration():this._totalDuration,re=this._startTime,se=this._timeScale,we=this._paused;if(zt!==this._time&&(_+=this._time-zt),_>=Yt-1e-7&&_>=0)this._totalTime=this._time=Yt,this._reversed||this._hasPausedChild()||(Y=!0,X="onComplete",et=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=_&&_>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===mt)&&this._rawPrevTime!==_&&this._first&&(et=!0,this._rawPrevTime>mt&&(X="onReverseComplete"))),this._rawPrevTime=this._duration||!y||_||this._rawPrevTime===_?_:mt,_=Yt+1e-4;else if(1e-7>_)if(this._totalTime=this._time=0,(zt!==0||this._duration===0&&this._rawPrevTime!==mt&&(this._rawPrevTime>0||0>_&&this._rawPrevTime>=0))&&(X="onReverseComplete",Y=this._reversed),0>_)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(et=Y=!0,X="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(et=!0),this._rawPrevTime=_;else{if(this._rawPrevTime=this._duration||!y||_||this._rawPrevTime===_?_:mt,_===0&&Y)for(E=this._first;E&&E._startTime===0;)E._duration||(Y=!1),E=E._next;_=0,this._initted||(et=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!y){if(_>=zt)for(E=this._first;E&&E._startTime<=_&&!yt;)E._duration||E.data!=="isPause"||E.ratio||E._startTime===0&&this._rawPrevTime===0||(yt=E),E=E._next;else for(E=this._last;E&&E._startTime>=_&&!yt;)E._duration||E.data==="isPause"&&E._rawPrevTime>0&&(yt=E),E=E._prev;yt&&(this._time=_=yt._startTime,this._totalTime=_+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=_}if(this._time!==zt&&this._first||B||et||yt){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==zt&&_>0&&(this._active=!0),zt===0&&this.vars.onStart&&(this._time===0&&this._duration||y||this._callback("onStart")),ft=this._time,ft>=zt)for(E=this._first;E&&(z=E._next,ft===this._time&&(!this._paused||we));)(E._active||E._startTime<=ft&&!E._paused&&!E._gc)&&(yt===E&&this.pause(),E._reversed?E.render((E._dirty?E.totalDuration():E._totalDuration)-(_-E._startTime)*E._timeScale,y,B):E.render((_-E._startTime)*E._timeScale,y,B)),E=z;else for(E=this._last;E&&(z=E._prev,ft===this._time&&(!this._paused||we));){if(E._active||E._startTime<=zt&&!E._paused&&!E._gc){if(yt===E){for(yt=E._prev;yt&&yt.endTime()>this._time;)yt.render(yt._reversed?yt.totalDuration()-(_-yt._startTime)*yt._timeScale:(_-yt._startTime)*yt._timeScale,y,B),yt=yt._prev;yt=null,this.pause()}E._reversed?E.render((E._dirty?E.totalDuration():E._totalDuration)-(_-E._startTime)*E._timeScale,y,B):E.render((_-E._startTime)*E._timeScale,y,B)}E=z}this._onUpdate&&(y||(Tt.length&&bt(),this._callback("onUpdate"))),X&&(this._gc||(re===this._startTime||se!==this._timeScale)&&(this._time===0||Yt>=this.totalDuration())&&(Y&&(Tt.length&&bt(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!y&&this.vars[X]&&this._callback(X)))}},Z._hasPausedChild=function(){for(var _=this._first;_;){if(_._paused||_ instanceof _t&&_._hasPausedChild())return!0;_=_._next}return!1},Z.getChildren=function(_,y,B,E){E=E||-9999999999;for(var Y=[],z=this._first,X=0;z;)z._startTime<E||(z instanceof M?y!==!1&&(Y[X++]=z):(B!==!1&&(Y[X++]=z),_!==!1&&(Y=Y.concat(z.getChildren(!0,y,B)),X=Y.length))),z=z._next;return Y},Z.getTweensOf=function(_,y){var B,E,Y=this._gc,z=[],X=0;for(Y&&this._enabled(!0,!0),B=M.getTweensOf(_),E=B.length;--E>-1;)(B[E].timeline===this||y&&this._contains(B[E]))&&(z[X++]=B[E]);return Y&&this._enabled(!1,!0),z},Z.recent=function(){return this._recent},Z._contains=function(_){for(var y=_.timeline;y;){if(y===this)return!0;y=y.timeline}return!1},Z.shiftChildren=function(_,y,B){B=B||0;for(var E,Y=this._first,z=this._labels;Y;)Y._startTime>=B&&(Y._startTime+=_),Y=Y._next;if(y)for(E in z)z[E]>=B&&(z[E]+=_);return this._uncache(!0)},Z._kill=function(_,y){if(!_&&!y)return this._enabled(!1,!1);for(var B=y?this.getTweensOf(y):this.getChildren(!0,!0,!1),E=B.length,Y=!1;--E>-1;)B[E]._kill(_,y)&&(Y=!0);return Y},Z.clear=function(_){var y=this.getChildren(!1,!0,!0),B=y.length;for(this._time=this._totalTime=0;--B>-1;)y[B]._enabled(!1,!1);return _!==!1&&(this._labels={}),this._uncache(!0)},Z.invalidate=function(){for(var _=this._first;_;)_.invalidate(),_=_._next;return g.prototype.invalidate.call(this)},Z._enabled=function(_,y){if(_===this._gc)for(var B=this._first;B;)B._enabled(_,!0),B=B._next;return ht.prototype._enabled.call(this,_,y)},Z.totalTime=function(_,y,B){this._forcingPlayhead=!0;var E=g.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,E},Z.duration=function(_){return arguments.length?(this.duration()!==0&&_!==0&&this.timeScale(this._duration/_),this):(this._dirty&&this.totalDuration(),this._duration)},Z.totalDuration=function(_){if(!arguments.length){if(this._dirty){for(var y,B,E=0,Y=this._last,z=999999999999;Y;)y=Y._prev,Y._dirty&&Y.totalDuration(),Y._startTime>z&&this._sortChildren&&!Y._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(Y,Y._startTime-Y._delay),this._calculatingDuration=0):z=Y._startTime,Y._startTime<0&&!Y._paused&&(E-=Y._startTime,this._timeline.smoothChildTiming&&(this._startTime+=Y._startTime/this._timeScale,this._time-=Y._startTime,this._totalTime-=Y._startTime,this._rawPrevTime-=Y._startTime),this.shiftChildren(-Y._startTime,!1,-9999999999),z=0),B=Y._startTime+Y._totalDuration/Y._timeScale,B>E&&(E=B),Y=y;this._duration=this._totalDuration=E,this._dirty=!1}return this._totalDuration}return _&&this.totalDuration()?this.timeScale(this._totalDuration/_):this},Z.paused=function(_){if(!_)for(var y=this._first,B=this._time;y;)y._startTime===B&&y.data==="isPause"&&(y._rawPrevTime=0),y=y._next;return g.prototype.paused.apply(this,arguments)},Z.usesFrames=function(){for(var _=this._timeline;_._timeline;)_=_._timeline;return _===g._rootFramesTimeline},Z.rawTime=function(_){return _&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(_)-this._startTime)*this._timeScale},_t},!0),ji._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(g,ht,M){var _t=function(gt){g.call(this,gt),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},mt=1e-10,S=ht._internals,Mt=S.lazyTweens,qt=S.lazyRender,nt=ji._gsDefine.globals,Tt=new M(null,null,1,0),bt=_t.prototype=new g;return bt.constructor=_t,bt.kill()._gc=!1,_t.version="2.0.2",bt.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),g.prototype.invalidate.call(this)},bt.addCallback=function(gt,Nt,Ht,Ct){return this.add(ht.delayedCall(0,gt,Ht,Ct),Nt)},bt.removeCallback=function(gt,Nt){if(gt)if(Nt==null)this._kill(null,gt);else for(var Ht=this.getTweensOf(gt,!1),Ct=Ht.length,st=this._parseTimeOrLabel(Nt);--Ct>-1;)Ht[Ct]._startTime===st&&Ht[Ct]._enabled(!1,!1);return this},bt.removePause=function(gt){return this.removeCallback(g._internals.pauseCallback,gt)},bt.tweenTo=function(gt,Nt){Nt=Nt||{};var Ht,Ct,st,Z={ease:Tt,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},_=Nt.repeat&&nt.TweenMax||ht;for(Ct in Nt)Z[Ct]=Nt[Ct];return Z.time=this._parseTimeOrLabel(gt),Ht=Math.abs(Number(Z.time)-this._time)/this._timeScale||.001,st=new _(this,Ht,Z),Z.onStart=function(){st.target.paused(!0),st.vars.time===st.target.time()||Ht!==st.duration()||st.isFromTo||st.duration(Math.abs(st.vars.time-st.target.time())/st.target._timeScale).render(st.time(),!0,!0),Nt.onStart&&Nt.onStart.apply(Nt.onStartScope||Nt.callbackScope||st,Nt.onStartParams||[])},st},bt.tweenFromTo=function(gt,Nt,Ht){Ht=Ht||{},gt=this._parseTimeOrLabel(gt),Ht.startAt={onComplete:this.seek,onCompleteParams:[gt],callbackScope:this},Ht.immediateRender=Ht.immediateRender!==!1;var Ct=this.tweenTo(Nt,Ht);return Ct.isFromTo=1,Ct.duration(Math.abs(Ct.vars.time-gt)/this._timeScale||.001)},bt.render=function(gt,Nt,Ht){this._gc&&this._enabled(!0,!1);var Ct,st,Z,_,y,B,E,Y,z=this._time,X=this._dirty?this.totalDuration():this._totalDuration,et=this._duration,yt=this._totalTime,ft=this._startTime,zt=this._timeScale,Yt=this._rawPrevTime,re=this._paused,se=this._cycle;if(z!==this._time&&(gt+=this._time-z),gt>=X-1e-7&>>=0)this._locked||(this._totalTime=X,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(st=!0,_="onComplete",y=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=gt&>>=-1e-7||0>Yt||Yt===mt)&&Yt!==gt&&this._first&&(y=!0,Yt>mt&&(_="onReverseComplete"))),this._rawPrevTime=this._duration||!Nt||gt||this._rawPrevTime===gt?gt:mt,this._yoyo&&1&this._cycle?this._time=gt=0:(this._time=et,gt=et+1e-4);else if(1e-7>gt)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(z!==0||et===0&&Yt!==mt&&(Yt>0||0>gt&&Yt>=0)&&!this._locked)&&(_="onReverseComplete",st=this._reversed),0>gt)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(y=st=!0,_="onReverseComplete"):Yt>=0&&this._first&&(y=!0),this._rawPrevTime=gt;else{if(this._rawPrevTime=et||!Nt||gt||this._rawPrevTime===gt?gt:mt,gt===0&&st)for(Ct=this._first;Ct&&Ct._startTime===0;)Ct._duration||(st=!1),Ct=Ct._next;gt=0,this._initted||(y=!0)}else if(et===0&&0>Yt&&(y=!0),this._time=this._rawPrevTime=gt,this._locked||(this._totalTime=gt,this._repeat!==0&&(B=et+this._repeatDelay,this._cycle=this._totalTime/B>>0,this._cycle!==0&&this._cycle===this._totalTime/B&>>=yt&&this._cycle--,this._time=this._totalTime-this._cycle*B,this._yoyo&&1&this._cycle&&(this._time=et-this._time),this._time>et?(this._time=et,gt=et+1e-4):this._time<0?this._time=gt=0:gt=this._time)),this._hasPause&&!this._forcingPlayhead&&!Nt){if(gt=this._time,gt>=z||this._repeat&&se!==this._cycle)for(Ct=this._first;Ct&&Ct._startTime<=gt&&!E;)Ct._duration||Ct.data!=="isPause"||Ct.ratio||Ct._startTime===0&&this._rawPrevTime===0||(E=Ct),Ct=Ct._next;else for(Ct=this._last;Ct&&Ct._startTime>=gt&&!E;)Ct._duration||Ct.data==="isPause"&&Ct._rawPrevTime>0&&(E=Ct),Ct=Ct._prev;E&&E._startTime<et&&(this._time=gt=E._startTime,this._totalTime=gt+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==se&&!this._locked){var we=this._yoyo&&(1&se)!==0,Et=we===(this._yoyo&&(1&this._cycle)!==0),ie=this._totalTime,ze=this._cycle,rn=this._rawPrevTime,Ut=this._time;if(this._totalTime=se*et,this._cycle<se?we=!we:this._totalTime+=et,this._time=z,this._rawPrevTime=et===0?Yt-1e-4:Yt,this._cycle=se,this._locked=!0,z=we?0:et,this.render(z,Nt,et===0),Nt||this._gc||this.vars.onRepeat&&(this._cycle=ze,this._locked=!1,this._callback("onRepeat")),z!==this._time||(Et&&(this._cycle=se,this._locked=!0,z=we?et+1e-4:-1e-4,this.render(z,!0,!1)),this._locked=!1,this._paused&&!re))return;this._time=Ut,this._totalTime=ie,this._cycle=ze,this._rawPrevTime=rn}if(!(this._time!==z&&this._first||Ht||y||E))return void(yt!==this._totalTime&&this._onUpdate&&(Nt||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==yt&>>0&&(this._active=!0),yt===0&&this.vars.onStart&&(this._totalTime===0&&this._totalDuration||Nt||this._callback("onStart")),Y=this._time,Y>=z)for(Ct=this._first;Ct&&(Z=Ct._next,Y===this._time&&(!this._paused||re));)(Ct._active||Ct._startTime<=this._time&&!Ct._paused&&!Ct._gc)&&(E===Ct&&this.pause(),Ct._reversed?Ct.render((Ct._dirty?Ct.totalDuration():Ct._totalDuration)-(gt-Ct._startTime)*Ct._timeScale,Nt,Ht):Ct.render((gt-Ct._startTime)*Ct._timeScale,Nt,Ht)),Ct=Z;else for(Ct=this._last;Ct&&(Z=Ct._prev,Y===this._time&&(!this._paused||re));){if(Ct._active||Ct._startTime<=z&&!Ct._paused&&!Ct._gc){if(E===Ct){for(E=Ct._prev;E&&E.endTime()>this._time;)E.render(E._reversed?E.totalDuration()-(gt-E._startTime)*E._timeScale:(gt-E._startTime)*E._timeScale,Nt,Ht),E=E._prev;E=null,this.pause()}Ct._reversed?Ct.render((Ct._dirty?Ct.totalDuration():Ct._totalDuration)-(gt-Ct._startTime)*Ct._timeScale,Nt,Ht):Ct.render((gt-Ct._startTime)*Ct._timeScale,Nt,Ht)}Ct=Z}this._onUpdate&&(Nt||(Mt.length&&qt(),this._callback("onUpdate"))),_&&(this._locked||this._gc||(ft===this._startTime||zt!==this._timeScale)&&(this._time===0||X>=this.totalDuration())&&(st&&(Mt.length&&qt(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!Nt&&this.vars[_]&&this._callback(_)))},bt.getActive=function(gt,Nt,Ht){gt==null&&(gt=!0),Nt==null&&(Nt=!0),Ht==null&&(Ht=!1);var Ct,st,Z=[],_=this.getChildren(gt,Nt,Ht),y=0,B=_.length;for(Ct=0;B>Ct;Ct++)st=_[Ct],st.isActive()&&(Z[y++]=st);return Z},bt.getLabelAfter=function(gt){gt||gt!==0&&(gt=this._time);var Nt,Ht=this.getLabelsArray(),Ct=Ht.length;for(Nt=0;Ct>Nt;Nt++)if(Ht[Nt].time>gt)return Ht[Nt].name;return null},bt.getLabelBefore=function(gt){gt==null&&(gt=this._time);for(var Nt=this.getLabelsArray(),Ht=Nt.length;--Ht>-1;)if(Nt[Ht].time<gt)return Nt[Ht].name;return null},bt.getLabelsArray=function(){var gt,Nt=[],Ht=0;for(gt in this._labels)Nt[Ht++]={time:this._labels[gt],name:gt};return Nt.sort(function(Ct,st){return Ct.time-st.time}),Nt},bt.invalidate=function(){return this._locked=!1,g.prototype.invalidate.call(this)},bt.progress=function(gt,Nt){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-gt:gt)+this._cycle*(this._duration+this._repeatDelay),Nt):this._time/this.duration()||0},bt.totalProgress=function(gt,Nt){return arguments.length?this.totalTime(this.totalDuration()*gt,Nt):this._totalTime/this.totalDuration()||0},bt.totalDuration=function(gt){return arguments.length?this._repeat!==-1&>?this.timeScale(this.totalDuration()/gt):this:(this._dirty&&(g.prototype.totalDuration.call(this),this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},bt.time=function(gt,Nt){return arguments.length?(this._dirty&&this.totalDuration(),gt>this._duration&&(gt=this._duration),this._yoyo&&1&this._cycle?gt=this._duration-gt+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(gt+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(gt,Nt)):this._time},bt.repeat=function(gt){return arguments.length?(this._repeat=gt,this._uncache(!0)):this._repeat},bt.repeatDelay=function(gt){return arguments.length?(this._repeatDelay=gt,this._uncache(!0)):this._repeatDelay},bt.yoyo=function(gt){return arguments.length?(this._yoyo=gt,this):this._yoyo},bt.currentLabel=function(gt){return arguments.length?this.seek(gt,!0):this.getLabelBefore(this._time+1e-8)},_t},!0),function(){var g=180/Math.PI,ht=[],M=[],_t=[],mt={},S=ji._gsDefine.globals,Mt=function(_,y,B,E){B===E&&(B=E-(E-y)/1e6),_===y&&(y=_+(B-_)/1e6),this.a=_,this.b=y,this.c=B,this.d=E,this.da=E-_,this.ca=B-_,this.ba=y-_},qt=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",nt=function(_,y,B,E){var Y={a:_},z={},X={},et={c:E},yt=(_+y)/2,ft=(y+B)/2,zt=(B+E)/2,Yt=(yt+ft)/2,re=(ft+zt)/2,se=(re-Yt)/8;return Y.b=yt+(_-yt)/4,z.b=Yt+se,Y.c=z.a=(Y.b+z.b)/2,z.c=X.a=(Yt+re)/2,X.b=re-se,et.b=zt+(E-zt)/4,X.c=et.a=(X.b+et.b)/2,[Y,z,X,et]},Tt=function(_,y,B,E,Y){var z,X,et,yt,ft,zt,Yt,re,se,we,Et,ie,ze,rn=_.length-1,Ut=0,Qe=_[0].a;for(z=0;rn>z;z++)ft=_[Ut],X=ft.a,et=ft.d,yt=_[Ut+1].d,Y?(Et=ht[z],ie=M[z],ze=(ie+Et)*y*.25/(E?.5:_t[z]||.5),zt=et-(et-X)*(E?.5*y:Et!==0?ze/Et:0),Yt=et+(yt-et)*(E?.5*y:ie!==0?ze/ie:0),re=et-(zt+((Yt-zt)*(3*Et/(Et+ie)+.5)/4||0))):(zt=et-(et-X)*y*.5,Yt=et+(yt-et)*y*.5,re=et-(zt+Yt)/2),zt+=re,Yt+=re,ft.c=se=zt,z!==0?ft.b=Qe:ft.b=Qe=ft.a+.6*(ft.c-ft.a),ft.da=et-X,ft.ca=se-X,ft.ba=Qe-X,B?(we=nt(X,Qe,se,et),_.splice(Ut,1,we[0],we[1],we[2],we[3]),Ut+=4):Ut++,Qe=Yt;ft=_[Ut],ft.b=Qe,ft.c=Qe+.4*(ft.d-Qe),ft.da=ft.d-ft.a,ft.ca=ft.c-ft.a,ft.ba=Qe-ft.a,B&&(we=nt(ft.a,Qe,ft.c,ft.d),_.splice(Ut,1,we[0],we[1],we[2],we[3]))},bt=function(_,y,B,E){var Y,z,X,et,yt,ft,zt=[];if(E)for(_=[E].concat(_),z=_.length;--z>-1;)typeof(ft=_[z][y])=="string"&&ft.charAt(1)==="="&&(_[z][y]=E[y]+Number(ft.charAt(0)+ft.substr(2)));if(Y=_.length-2,0>Y)return zt[0]=new Mt(_[0][y],0,0,_[0][y]),zt;for(z=0;Y>z;z++)X=_[z][y],et=_[z+1][y],zt[z]=new Mt(X,0,0,et),B&&(yt=_[z+2][y],ht[z]=(ht[z]||0)+(et-X)*(et-X),M[z]=(M[z]||0)+(yt-et)*(yt-et));return zt[z]=new Mt(_[z][y],0,0,_[z+1][y]),zt},gt=function(_,y,B,E,Y,z){var X,et,yt,ft,zt,Yt,re,se,we={},Et=[],ie=z||_[0];Y=typeof Y=="string"?","+Y+",":qt,y==null&&(y=1);for(et in _[0])Et.push(et);if(_.length>1){for(se=_[_.length-1],re=!0,X=Et.length;--X>-1;)if(et=Et[X],Math.abs(ie[et]-se[et])>.05){re=!1;break}re&&(_=_.concat(),z&&_.unshift(z),_.push(_[1]),z=_[_.length-3])}for(ht.length=M.length=_t.length=0,X=Et.length;--X>-1;)et=Et[X],mt[et]=Y.indexOf(","+et+",")!==-1,we[et]=bt(_,et,mt[et],z);for(X=ht.length;--X>-1;)ht[X]=Math.sqrt(ht[X]),M[X]=Math.sqrt(M[X]);if(!E){for(X=Et.length;--X>-1;)if(mt[et])for(yt=we[Et[X]],Yt=yt.length-1,ft=0;Yt>ft;ft++)zt=yt[ft+1].da/M[ft]+yt[ft].da/ht[ft]||0,_t[ft]=(_t[ft]||0)+zt*zt;for(X=_t.length;--X>-1;)_t[X]=Math.sqrt(_t[X])}for(X=Et.length,ft=B?4:1;--X>-1;)et=Et[X],yt=we[et],Tt(yt,y,B,E,mt[et]),re&&(yt.splice(0,ft),yt.splice(yt.length-ft,ft));return we},Nt=function(_,y,B){y=y||"soft";var E,Y,z,X,et,yt,ft,zt,Yt,re,se,we={},Et=y==="cubic"?3:2,ie=y==="soft",ze=[];if(ie&&B&&(_=[B].concat(_)),_==null||_.length<Et+1)throw"invalid Bezier data";for(Yt in _[0])ze.push(Yt);for(yt=ze.length;--yt>-1;){for(Yt=ze[yt],we[Yt]=et=[],re=0,zt=_.length,ft=0;zt>ft;ft++)E=B==null?_[ft][Yt]:typeof(se=_[ft][Yt])=="string"&&se.charAt(1)==="="?B[Yt]+Number(se.charAt(0)+se.substr(2)):Number(se),ie&&ft>1&&zt-1>ft&&(et[re++]=(E+et[re-2])/2),et[re++]=E;for(zt=re-Et+1,re=0,ft=0;zt>ft;ft+=Et)E=et[ft],Y=et[ft+1],z=et[ft+2],X=Et===2?0:et[ft+3],et[re++]=se=Et===3?new Mt(E,Y,z,X):new Mt(E,(2*Y+E)/3,(2*Y+z)/3,z);et.length=re}return we},Ht=function(_,y,B){for(var E,Y,z,X,et,yt,ft,zt,Yt,re,se,we=1/B,Et=_.length;--Et>-1;)for(re=_[Et],z=re.a,X=re.d-z,et=re.c-z,yt=re.b-z,E=Y=0,zt=1;B>=zt;zt++)ft=we*zt,Yt=1-ft,E=Y-(Y=(ft*ft*X+3*Yt*(ft*et+Yt*yt))*ft),se=Et*B+zt-1,y[se]=(y[se]||0)+E*E},Ct=function(_,y){y=y>>0||6;var B,E,Y,z,X=[],et=[],yt=0,ft=0,zt=y-1,Yt=[],re=[];for(B in _)Ht(_[B],X,y);for(Y=X.length,E=0;Y>E;E++)yt+=Math.sqrt(X[E]),z=E%y,re[z]=yt,z===zt&&(ft+=yt,z=E/y>>0,Yt[z]=re,et[z]=ft,yt=0,re=[]);return{length:ft,lengths:et,segments:Yt}},st=ji._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(_,y,B){this._target=_,y instanceof Array&&(y={values:y}),this._func={},this._mod={},this._props=[],this._timeRes=y.timeResolution==null?6:parseInt(y.timeResolution,10);var E,Y,z,X,et,yt=y.values||[],ft={},zt=yt[0],Yt=y.autoRotate||B.vars.orientToBezier;this._autoRotate=Yt?Yt instanceof Array?Yt:[["x","y","rotation",Yt===!0?0:Number(Yt)||0]]:null;for(E in zt)this._props.push(E);for(z=this._props.length;--z>-1;)E=this._props[z],this._overwriteProps.push(E),Y=this._func[E]=typeof _[E]=="function",ft[E]=Y?_[E.indexOf("set")||typeof _["get"+E.substr(3)]!="function"?E:"get"+E.substr(3)]():parseFloat(_[E]),et||ft[E]!==yt[0][E]&&(et=ft);if(this._beziers=y.type!=="cubic"&&y.type!=="quadratic"&&y.type!=="soft"?gt(yt,isNaN(y.curviness)?1:y.curviness,!1,y.type==="thruBasic",y.correlate,et):Nt(yt,y.type,ft),this._segCount=this._beziers[E].length,this._timeRes){var re=Ct(this._beziers,this._timeRes);this._length=re.length,this._lengths=re.lengths,this._segments=re.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(Yt=this._autoRotate)for(this._initialRotations=[],Yt[0]instanceof Array||(this._autoRotate=Yt=[Yt]),z=Yt.length;--z>-1;){for(X=0;3>X;X++)E=Yt[z][X],this._func[E]=typeof _[E]=="function"?_[E.indexOf("set")||typeof _["get"+E.substr(3)]!="function"?E:"get"+E.substr(3)]:!1;E=Yt[z][2],this._initialRotations[z]=(this._func[E]?this._func[E].call(this._target):this._target[E])||0,this._overwriteProps.push(E)}return this._startRatio=B.vars.runBackwards?1:0,!0},set:function(_){var y,B,E,Y,z,X,et,yt,ft,zt,Yt=this._segCount,re=this._func,se=this._target,we=_!==this._startRatio;if(this._timeRes){if(ft=this._lengths,zt=this._curSeg,_*=this._length,E=this._li,_>this._l2&&Yt-1>E){for(yt=Yt-1;yt>E&&(this._l2=ft[++E])<=_;);this._l1=ft[E-1],this._li=E,this._curSeg=zt=this._segments[E],this._s2=zt[this._s1=this._si=0]}else if(_<this._l1&&E>0){for(;E>0&&(this._l1=ft[--E])>=_;);E===0&&_<this._l1?this._l1=0:E++,this._l2=ft[E],this._li=E,this._curSeg=zt=this._segments[E],this._s1=zt[(this._si=zt.length-1)-1]||0,this._s2=zt[this._si]}if(y=E,_-=this._l1,E=this._si,_>this._s2&&E<zt.length-1){for(yt=zt.length-1;yt>E&&(this._s2=zt[++E])<=_;);this._s1=zt[E-1],this._si=E}else if(_<this._s1&&E>0){for(;E>0&&(this._s1=zt[--E])>=_;);E===0&&_<this._s1?this._s1=0:E++,this._s2=zt[E],this._si=E}X=(E+(_-this._s1)/(this._s2-this._s1))*this._prec||0}else y=0>_?0:_>=1?Yt-1:Yt*_>>0,X=(_-y*(1/Yt))*Yt;for(B=1-X,E=this._props.length;--E>-1;)Y=this._props[E],z=this._beziers[Y][y],et=(X*X*z.da+3*B*(X*z.ca+B*z.ba))*X+z.a,this._mod[Y]&&(et=this._mod[Y](et,se)),re[Y]?se[Y](et):se[Y]=et;if(this._autoRotate){var Et,ie,ze,rn,Ut,Qe,Ii,Pn=this._autoRotate;for(E=Pn.length;--E>-1;)Y=Pn[E][2],Qe=Pn[E][3]||0,Ii=Pn[E][4]===!0?1:g,z=this._beziers[Pn[E][0]],Et=this._beziers[Pn[E][1]],z&&Et&&(z=z[y],Et=Et[y],ie=z.a+(z.b-z.a)*X,rn=z.b+(z.c-z.b)*X,ie+=(rn-ie)*X,rn+=(z.c+(z.d-z.c)*X-rn)*X,ze=Et.a+(Et.b-Et.a)*X,Ut=Et.b+(Et.c-Et.b)*X,ze+=(Ut-ze)*X,Ut+=(Et.c+(Et.d-Et.c)*X-Ut)*X,et=we?Math.atan2(Ut-ze,rn-ie)*Ii+Qe:this._initialRotations[E],this._mod[Y]&&(et=this._mod[Y](et,se)),re[Y]?se[Y](et):se[Y]=et)}}}),Z=st.prototype;st.bezierThrough=gt,st.cubicToQuadratic=nt,st._autoCSS=!0,st.quadraticToCubic=function(_,y,B){return new Mt(_,(2*y+_)/3,(2*y+B)/3,B)},st._cssRegister=function(){var _=S.CSSPlugin;if(_){var y=_._internals,B=y._parseToProxy,E=y._setPluginRatio,Y=y.CSSPropTween;y._registerComplexSpecialProp("bezier",{parser:function(z,X,et,yt,ft,zt){X instanceof Array&&(X={values:X}),zt=new st;var Yt,re,se,we=X.values,Et=we.length-1,ie=[],ze={};if(0>Et)return ft;for(Yt=0;Et>=Yt;Yt++)se=B(z,we[Yt],yt,ft,zt,Et!==Yt),ie[Yt]=se.end;for(re in X)ze[re]=X[re];return ze.values=ie,ft=new Y(z,"bezier",0,0,se.pt,2),ft.data=se,ft.plugin=zt,ft.setRatio=E,ze.autoRotate===0&&(ze.autoRotate=!0),!ze.autoRotate||ze.autoRotate instanceof Array||(Yt=ze.autoRotate===!0?0:Number(ze.autoRotate),ze.autoRotate=se.end.left!=null?[["left","top","rotation",Yt,!1]]:se.end.x!=null?[["x","y","rotation",Yt,!1]]:!1),ze.autoRotate&&(yt._transform||yt._enableTransforms(!1),se.autoRotate=yt._target._gsTransform,se.proxy.rotation=se.autoRotate.rotation||0,yt._overwriteProps.push("rotation")),zt._onInitTween(se.proxy,ze,yt._tween),ft}})}},Z._mod=function(_){for(var y,B=this._overwriteProps,E=B.length;--E>-1;)y=_[B[E]],y&&typeof y=="function"&&(this._mod[B[E]]=y)},Z._kill=function(_){var y,B,E=this._props;for(y in this._beziers)if(y in _)for(delete this._beziers[y],delete this._func[y],B=E.length;--B>-1;)E[B]===y&&E.splice(B,1);if(E=this._autoRotate)for(B=E.length;--B>-1;)_[E[B][2]]&&E.splice(B,1);return this._super._kill.call(this,_)}}(),ji._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(g,ht){var M,_t,mt,S,Mt=function(){g.call(this,"css"),this._overwriteProps.length=0,this.setRatio=Mt.prototype.setRatio},qt=ji._gsDefine.globals,nt={},Tt=Mt.prototype=new g("css");Tt.constructor=Mt,Mt.version="2.0.2",Mt.API=2,Mt.defaultTransformPerspective=0,Mt.defaultSkewType="compensated",Mt.defaultSmoothOrigin=!0,Tt="px",Mt.suffixMap={top:Tt,right:Tt,bottom:Tt,left:Tt,width:Tt,height:Tt,fontSize:Tt,padding:Tt,margin:Tt,perspective:Tt,lineHeight:""};var bt,gt,Nt,Ht,Ct,st,Z,_,y=/(?:\-|\.|\b)(\d|\.|e\-)+/g,B=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,E=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,Y=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,z=/(?:\d|\-|\+|=|#|\.)*/g,X=/opacity *= *([^)]*)/i,et=/opacity:([^;]*)/i,yt=/alpha\(opacity *=.+?\)/i,ft=/^(rgb|hsl)/,zt=/([A-Z])/g,Yt=/-([a-z])/gi,re=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,se=function(w,b){return b.toUpperCase()},we=/(?:Left|Right|Width)/i,Et=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,ie=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,ze=/,(?=[^\)]*(?:\(|$))/gi,rn=/[\s,\(]/i,Ut=Math.PI/180,Qe=180/Math.PI,Ii={},Pn={style:{}},Zi=ji.document||{createElement:function(){return Pn}},Oe=function(w,b){return Zi.createElementNS?Zi.createElementNS(b||"http://www.w3.org/1999/xhtml",w):Zi.createElement(w)},Pi=Oe("div"),In=Oe("img"),ni=Mt._internals={_specialProps:nt},ci=(ji.navigator||{}).userAgent||"",Fi=function(){var w=ci.indexOf("Android"),b=Oe("a");return Nt=ci.indexOf("Safari")!==-1&&ci.indexOf("Chrome")===-1&&(w===-1||parseFloat(ci.substr(w+8,2))>3),Ct=Nt&&parseFloat(ci.substr(ci.indexOf("Version/")+8,2))<6,Ht=ci.indexOf("Firefox")!==-1,(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(ci)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(ci))&&(st=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),yr=function(w){return X.test(typeof w=="string"?w:(w.currentStyle?w.currentStyle.filter:w.style.filter)||"")?parseFloat(RegExp.$1)/100:1},Lr=function(w){ji.console&&console.log(w)},$n="",Gi="",Gn=function(w,b){b=b||Pi;var U,N,T=b.style;if(T[w]!==void 0)return w;for(w=w.charAt(0).toUpperCase()+w.substr(1),U=["O","Moz","ms","Ms","Webkit"],N=5;--N>-1&&T[U[N]+w]===void 0;);return N>=0?(Gi=N===3?"ms":U[N],$n="-"+Gi.toLowerCase()+"-",Gi+w):null},on=(typeof window<"u"?window:Zi.defaultView||{getComputedStyle:function(){}}).getComputedStyle,Je=Mt.getStyle=function(w,b,U,N,T){var it;return Fi||b!=="opacity"?(!N&&w.style[b]?it=w.style[b]:(U=U||on(w))?it=U[b]||U.getPropertyValue(b)||U.getPropertyValue(b.replace(zt,"-$1").toLowerCase()):w.currentStyle&&(it=w.currentStyle[b]),T==null||it&&it!=="none"&&it!=="auto"&&it!=="auto auto"?it:T):yr(w)},wn=ni.convertToPixels=function(w,b,U,N,T){if(N==="px"||!N&&b!=="lineHeight")return U;if(N==="auto"||!U)return 0;var it,F,ut,xt=we.test(b),pt=w,tt=Pi.style,jt=0>U,kt=U===1;if(jt&&(U=-U),kt&&(U*=100),b!=="lineHeight"||N)if(N==="%"&&b.indexOf("border")!==-1)it=U/100*(xt?w.clientWidth:w.clientHeight);else{if(tt.cssText="border:0 solid red;position:"+Je(w,"position")+";line-height:0;",N!=="%"&&pt.appendChild&&N.charAt(0)!=="v"&&N!=="rem")tt[xt?"borderLeftWidth":"borderTopWidth"]=U+N;else{if(pt=w.parentNode||Zi.body,Je(pt,"display").indexOf("flex")!==-1&&(tt.position="absolute"),F=pt._gsCache,ut=ht.ticker.frame,F&&xt&&F.time===ut)return F.width*U/100;tt[xt?"width":"height"]=U+N}pt.appendChild(Pi),it=parseFloat(Pi[xt?"offsetWidth":"offsetHeight"]),pt.removeChild(Pi),xt&&N==="%"&&Mt.cacheWidths!==!1&&(F=pt._gsCache=pt._gsCache||{},F.time=ut,F.width=it/U*100),it!==0||T||(it=wn(w,b,U,N,!0))}else F=on(w).lineHeight,w.style.lineHeight=U,it=parseFloat(on(w).lineHeight),w.style.lineHeight=F;return kt&&(it/=100),jt?-it:it},ho=ni.calculateOffset=function(w,b,U){if(Je(w,"position",U)!=="absolute")return 0;var N=b==="left"?"Left":"Top",T=Je(w,"margin"+N,U);return w["offset"+N]-(wn(w,b,parseFloat(T),T.replace(z,""))||0)},Hn=function(w,b){var U,N,T,it={};if(b=b||on(w,null))if(U=b.length)for(;--U>-1;)T=b[U],(T.indexOf("-transform")===-1||as===T)&&(it[T.replace(Yt,se)]=b.getPropertyValue(T));else for(U in b)(U.indexOf("Transform")===-1||sn===U)&&(it[U]=b[U]);else if(b=w.currentStyle||w.style)for(U in b)typeof U=="string"&&it[U]===void 0&&(it[U.replace(Yt,se)]=b[U]);return Fi||(it.opacity=yr(w)),N=Or(w,b,!1),it.rotation=N.rotation,it.skewX=N.skewX,it.scaleX=N.scaleX,it.scaleY=N.scaleY,it.x=N.x,it.y=N.y,Qn&&(it.z=N.z,it.rotationX=N.rotationX,it.rotationY=N.rotationY,it.scaleZ=N.scaleZ),it.filters&&delete it.filters,it},Bi=function(w,b,U,N,T){var it,F,ut,xt={},pt=w.style;for(F in U)F!=="cssText"&&F!=="length"&&isNaN(F)&&(b[F]!==(it=U[F])||T&&T[F])&&F.indexOf("Origin")===-1&&(typeof it=="number"||typeof it=="string")&&(xt[F]=it!=="auto"||F!=="left"&&F!=="top"?it!==""&&it!=="auto"&&it!=="none"||typeof b[F]!="string"||b[F].replace(Y,"")===""?it:0:ho(w,F),pt[F]!==void 0&&(ut=new ti(pt,F,pt[F],ut)));if(N)for(F in N)F!=="className"&&(xt[F]=N[F]);return{difs:xt,firstMPT:ut}},A={width:["Left","Right"],height:["Top","Bottom"]},k=["marginLeft","marginRight","marginTop","marginBottom"],j=function(w,b,U){if((w.nodeName+"").toLowerCase()==="svg")return(U||on(w))[b]||0;if(w.getCTM&&Vs(w))return w.getBBox()[b]||0;var N=parseFloat(b==="width"?w.offsetWidth:w.offsetHeight),T=A[b],it=T.length;for(U=U||on(w,null);--it>-1;)N-=parseFloat(Je(w,"padding"+T[it],U,!0))||0,N-=parseFloat(Je(w,"border"+T[it]+"Width",U,!0))||0;return N},q=function(w,b){if(w==="contain"||w==="auto"||w==="auto auto")return w+" ";(w==null||w==="")&&(w="0 0");var U,N=w.split(" "),T=w.indexOf("left")!==-1?"0%":w.indexOf("right")!==-1?"100%":N[0],it=w.indexOf("top")!==-1?"0%":w.indexOf("bottom")!==-1?"100%":N[1];if(N.length>3&&!b){for(N=w.split(", ").join(",").split(","),w=[],U=0;U<N.length;U++)w.push(q(N[U]));return w.join(",")}return it==null?it=T==="center"?"50%":"0":it==="center"&&(it="50%"),(T==="center"||isNaN(parseFloat(T))&&(T+"").indexOf("=")===-1)&&(T="50%"),w=T+" "+it+(N.length>2?" "+N[2]:""),b&&(b.oxp=T.indexOf("%")!==-1,b.oyp=it.indexOf("%")!==-1,b.oxr=T.charAt(1)==="=",b.oyr=it.charAt(1)==="=",b.ox=parseFloat(T.replace(Y,"")),b.oy=parseFloat(it.replace(Y,"")),b.v=w),b||w},lt=function(w,b){return typeof w=="function"&&(w=w(_,Z)),typeof w=="string"&&w.charAt(1)==="="?parseInt(w.charAt(0)+"1",10)*parseFloat(w.substr(2)):parseFloat(w)-parseFloat(b)||0},Lt=function(w,b){typeof w=="function"&&(w=w(_,Z));var U=typeof w=="string"&&w.charAt(1)==="=";return typeof w=="string"&&w.charAt(w.length-2)==="v"&&(w=(U?w.substr(0,2):0)+window["inner"+(w.substr(-2)==="vh"?"Height":"Width")]*(parseFloat(U?w.substr(2):w)/100)),w==null?b:U?parseInt(w.charAt(0)+"1",10)*parseFloat(w.substr(2))+b:parseFloat(w)||0},Ft=function(w,b,U,N){var T,it,F,ut,xt,pt=1e-6;return typeof w=="function"&&(w=w(_,Z)),w==null?ut=b:typeof w=="number"?ut=w:(T=360,it=w.split("_"),xt=w.charAt(1)==="=",F=(xt?parseInt(w.charAt(0)+"1",10)*parseFloat(it[0].substr(2)):parseFloat(it[0]))*(w.indexOf("rad")===-1?1:Qe)-(xt?0:b),it.length&&(N&&(N[U]=b+F),w.indexOf("short")!==-1&&(F%=T,F!==F%(T/2)&&(F=0>F?F+T:F-T)),w.indexOf("_cw")!==-1&&0>F?F=(F+9999999999*T)%T-(F/T|0)*T:w.indexOf("ccw")!==-1&&F>0&&(F=(F-9999999999*T)%T-(F/T|0)*T)),ut=b+F),pt>ut&&ut>-pt&&(ut=0),ut},Pt={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},Ae=function(w,b,U){return w=0>w?w+1:w>1?w-1:w,255*(1>6*w?b+(U-b)*w*6:.5>w?U:2>3*w?b+(U-b)*(2/3-w)*6:b)+.5|0},Se=Mt.parseColor=function(w,b){var U,N,T,it,F,ut,xt,pt,tt,jt,kt;if(w)if(typeof w=="number")U=[w>>16,w>>8&255,255&w];else{if(w.charAt(w.length-1)===","&&(w=w.substr(0,w.length-1)),Pt[w])U=Pt[w];else if(w.charAt(0)==="#")w.length===4&&(N=w.charAt(1),T=w.charAt(2),it=w.charAt(3),w="#"+N+N+T+T+it+it),w=parseInt(w.substr(1),16),U=[w>>16,w>>8&255,255&w];else if(w.substr(0,3)==="hsl")if(U=kt=w.match(y),b){if(w.indexOf("=")!==-1)return w.match(B)}else F=Number(U[0])%360/360,ut=Number(U[1])/100,xt=Number(U[2])/100,T=.5>=xt?xt*(ut+1):xt+ut-xt*ut,N=2*xt-T,U.length>3&&(U[3]=Number(U[3])),U[0]=Ae(F+1/3,N,T),U[1]=Ae(F,N,T),U[2]=Ae(F-1/3,N,T);else U=w.match(y)||Pt.transparent;U[0]=Number(U[0]),U[1]=Number(U[1]),U[2]=Number(U[2]),U.length>3&&(U[3]=Number(U[3]))}else U=Pt.black;return b&&!kt&&(N=U[0]/255,T=U[1]/255,it=U[2]/255,pt=Math.max(N,T,it),tt=Math.min(N,T,it),xt=(pt+tt)/2,pt===tt?F=ut=0:(jt=pt-tt,ut=xt>.5?jt/(2-pt-tt):jt/(pt+tt),F=pt===N?(T-it)/jt+(it>T?6:0):pt===T?(it-N)/jt+2:(N-T)/jt+4,F*=60),U[0]=F+.5|0,U[1]=100*ut+.5|0,U[2]=100*xt+.5|0),U},te=function(w,b){var U,N,T,it=w.match(Pe)||[],F=0,ut="";if(!it.length)return w;for(U=0;U<it.length;U++)N=it[U],T=w.substr(F,w.indexOf(N,F)-F),F+=T.length+N.length,N=Se(N,b),N.length===3&&N.push(1),ut+=T+(b?"hsla("+N[0]+","+N[1]+"%,"+N[2]+"%,"+N[3]:"rgba("+N.join(","))+")";return ut+w.substr(F)},Pe="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(Tt in Pt)Pe+="|"+Tt+"\\b";Pe=new RegExp(Pe+")","gi"),Mt.colorStringFilter=function(w){var b,U=w[0]+" "+w[1];Pe.test(U)&&(b=U.indexOf("hsl(")!==-1||U.indexOf("hsla(")!==-1,w[0]=te(w[0],b),w[1]=te(w[1],b)),Pe.lastIndex=0},ht.defaultStringFilter||(ht.defaultStringFilter=Mt.colorStringFilter);var pi=function(w,b,U,N){if(w==null)return function(kt){return kt};var T,it=b?(w.match(Pe)||[""])[0]:"",F=w.split(it).join("").match(E)||[],ut=w.substr(0,w.indexOf(F[0])),xt=w.charAt(w.length-1)===")"?")":"",pt=w.indexOf(" ")!==-1?" ":",",tt=F.length,jt=tt>0?F[0].replace(y,""):"";return tt?T=b?function(kt){var It,Kt,Xt,Le;if(typeof kt=="number")kt+=jt;else if(N&&ze.test(kt)){for(Le=kt.replace(ze,"|").split("|"),Xt=0;Xt<Le.length;Xt++)Le[Xt]=T(Le[Xt]);return Le.join(",")}if(It=(kt.match(Pe)||[it])[0],Kt=kt.split(It).join("").match(E)||[],Xt=Kt.length,tt>Xt--)for(;++Xt<tt;)Kt[Xt]=U?Kt[(Xt-1)/2|0]:F[Xt];return ut+Kt.join(pt)+pt+It+xt+(kt.indexOf("inset")!==-1?" inset":"")}:function(kt){var It,Kt,Xt;if(typeof kt=="number")kt+=jt;else if(N&&ze.test(kt)){for(Kt=kt.replace(ze,"|").split("|"),Xt=0;Xt<Kt.length;Xt++)Kt[Xt]=T(Kt[Xt]);return Kt.join(",")}if(It=kt.match(E)||[],Xt=It.length,tt>Xt--)for(;++Xt<tt;)It[Xt]=U?It[(Xt-1)/2|0]:F[Xt];return ut+It.join(pt)+xt}:function(kt){return kt}},Mi=function(w){return w=w.split(","),function(b,U,N,T,it,F,ut){var xt,pt=(U+"").split(" ");for(ut={},xt=0;4>xt;xt++)ut[w[xt]]=pt[xt]=pt[xt]||pt[(xt-1)/2>>0];return T.parse(b,ut,it,F)}},ti=(ni._setPluginRatio=function(w){this.plugin.setRatio(w);for(var b,U,N,T,it,F=this.data,ut=F.proxy,xt=F.firstMPT,pt=1e-6;xt;)b=ut[xt.v],xt.r?b=xt.r(b):pt>b&&b>-pt&&(b=0),xt.t[xt.p]=b,xt=xt._next;if(F.autoRotate&&(F.autoRotate.rotation=F.mod?F.mod.call(this._tween,ut.rotation,this.t,this._tween):ut.rotation),w===1||w===0)for(xt=F.firstMPT,it=w===1?"e":"b";xt;){if(U=xt.t,U.type){if(U.type===1){for(T=U.xs0+U.s+U.xs1,N=1;N<U.l;N++)T+=U["xn"+N]+U["xs"+(N+1)];U[it]=T}}else U[it]=U.s+U.xs0;xt=xt._next}},function(w,b,U,N,T){this.t=w,this.p=b,this.v=U,this.r=T,N&&(N._prev=this,this._next=N)}),gi=(ni._parseToProxy=function(w,b,U,N,T,it){var F,ut,xt,pt,tt,jt=N,kt={},It={},Kt=U._transform,Xt=Ii;for(U._transform=null,Ii=b,N=tt=U.parse(w,b,N,T),Ii=Xt,it&&(U._transform=Kt,jt&&(jt._prev=null,jt._prev&&(jt._prev._next=null)));N&&N!==jt;){if(N.type<=1&&(ut=N.p,It[ut]=N.s+N.c,kt[ut]=N.s,it||(pt=new ti(N,"s",ut,pt,N.r),N.c=0),N.type===1))for(F=N.l;--F>0;)xt="xn"+F,ut=N.p+"_"+xt,It[ut]=N.data[xt],kt[ut]=N[xt],it||(pt=new ti(N,xt,ut,pt,N.rxp[xt]));N=N._next}return{proxy:kt,end:It,firstMPT:pt,pt:tt}},ni.CSSPropTween=function(w,b,U,N,T,it,F,ut,xt,pt,tt){this.t=w,this.p=b,this.s=U,this.c=N,this.n=F||b,w instanceof gi||S.push(this.n),this.r=ut&&(typeof ut=="function"?ut:Math.round),this.type=it||0,xt&&(this.pr=xt,M=!0),this.b=pt===void 0?U:pt,this.e=tt===void 0?U+N:tt,T&&(this._next=T,T._prev=this)}),Zr=function(w,b,U,N,T,it){var F=new gi(w,b,U,N-U,T,-1,it);return F.b=U,F.e=F.xs0=N,F},sr=Mt.parseComplex=function(w,b,U,N,T,it,F,ut,xt,pt){U=U||it||"",typeof N=="function"&&(N=N(_,Z)),F=new gi(w,b,0,0,F,pt?2:1,null,!1,ut,U,N),N+="",T&&Pe.test(N+U)&&(N=[U,N],Mt.colorStringFilter(N),U=N[0],N=N[1]);var tt,jt,kt,It,Kt,Xt,Le,Me,Ye,ye,ee,_e,Zt,Ke=U.split(", ").join(",").split(" "),fe=N.split(", ").join(",").split(" "),ne=Ke.length,de=bt!==!1;for((N.indexOf(",")!==-1||U.indexOf(",")!==-1)&&((N+U).indexOf("rgb")!==-1||(N+U).indexOf("hsl")!==-1?(Ke=Ke.join(" ").replace(ze,", ").split(" "),fe=fe.join(" ").replace(ze,", ").split(" ")):(Ke=Ke.join(" ").split(",").join(", ").split(" "),fe=fe.join(" ").split(",").join(", ").split(" ")),ne=Ke.length),ne!==fe.length&&(Ke=(it||"").split(" "),ne=Ke.length),F.plugin=xt,F.setRatio=pt,Pe.lastIndex=0,tt=0;ne>tt;tt++)if(It=Ke[tt],Kt=fe[tt]+"",Me=parseFloat(It),Me||Me===0)F.appendXtra("",Me,lt(Kt,Me),Kt.replace(B,""),de&&Kt.indexOf("px")!==-1?Math.round:!1,!0);else if(T&&Pe.test(It))_e=Kt.indexOf(")")+1,_e=")"+(_e?Kt.substr(_e):""),Zt=Kt.indexOf("hsl")!==-1&&Fi,ye=Kt,It=Se(It,Zt),Kt=Se(Kt,Zt),Ye=It.length+Kt.length>6,Ye&&!Fi&&Kt[3]===0?(F["xs"+F.l]+=F.l?" transparent":"transparent",F.e=F.e.split(fe[tt]).join("transparent")):(Fi||(Ye=!1),Zt?F.appendXtra(ye.substr(0,ye.indexOf("hsl"))+(Ye?"hsla(":"hsl("),It[0],lt(Kt[0],It[0]),",",!1,!0).appendXtra("",It[1],lt(Kt[1],It[1]),"%,",!1).appendXtra("",It[2],lt(Kt[2],It[2]),Ye?"%,":"%"+_e,!1):F.appendXtra(ye.substr(0,ye.indexOf("rgb"))+(Ye?"rgba(":"rgb("),It[0],Kt[0]-It[0],",",Math.round,!0).appendXtra("",It[1],Kt[1]-It[1],",",Math.round).appendXtra("",It[2],Kt[2]-It[2],Ye?",":_e,Math.round),Ye&&(It=It.length<4?1:It[3],F.appendXtra("",It,(Kt.length<4?1:Kt[3])-It,_e,!1))),Pe.lastIndex=0;else if(Xt=It.match(y)){if(Le=Kt.match(B),!Le||Le.length!==Xt.length)return F;for(kt=0,jt=0;jt<Xt.length;jt++)ee=Xt[jt],ye=It.indexOf(ee,kt),F.appendXtra(It.substr(kt,ye-kt),Number(ee),lt(Le[jt],ee),"",de&&It.substr(ye+ee.length,2)==="px"?Math.round:!1,jt===0),kt=ye+ee.length;F["xs"+F.l]+=It.substr(kt)}else F["xs"+F.l]+=F.l||F["xs"+F.l]?" "+Kt:Kt;if(N.indexOf("=")!==-1&&F.data){for(_e=F.xs0+F.data.s,tt=1;tt<F.l;tt++)_e+=F["xs"+tt]+F.data["xn"+tt];F.e=_e+F["xs"+tt]}return F.l||(F.type=-1,F.xs0=F.e),F.xfirst||F},Ji=9;for(Tt=gi.prototype,Tt.l=Tt.pr=0;--Ji>0;)Tt["xn"+Ji]=0,Tt["xs"+Ji]="";Tt.xs0="",Tt._next=Tt._prev=Tt.xfirst=Tt.data=Tt.plugin=Tt.setRatio=Tt.rxp=null,Tt.appendXtra=function(w,b,U,N,T,it){var F=this,ut=F.l;return F["xs"+ut]+=it&&(ut||F["xs"+ut])?" "+w:w||"",U||ut===0||F.plugin?(F.l++,F.type=F.setRatio?2:1,F["xs"+F.l]=N||"",ut>0?(F.data["xn"+ut]=b+U,F.rxp["xn"+ut]=T,F["xn"+ut]=b,F.plugin||(F.xfirst=new gi(F,"xn"+ut,b,U,F.xfirst||F,0,F.n,T,F.pr),F.xfirst.xs0=0),F):(F.data={s:b+U},F.rxp={},F.s=b,F.c=U,F.r=T,F)):(F["xs"+ut]+=b+(N||""),F)};var ss=function(w,b){b=b||{},this.p=b.prefix&&Gn(w)||w,nt[w]=nt[this.p]=this,this.format=b.formatter||pi(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},Di=ni._registerComplexSpecialProp=function(w,b,U){typeof b!="object"&&(b={parser:U});var N,T=w.split(","),it=b.defaultValue;for(U=U||[it],N=0;N<T.length;N++)b.prefix=N===0&&b.prefix,b.defaultValue=U[N]||it,new ss(T[N],b)},Qa=ni._registerPluginProp=function(w){if(!nt[w]){var b=w.charAt(0).toUpperCase()+w.substr(1)+"Plugin";Di(w,{parser:function(U,N,T,it,F,ut,xt){var pt=qt.com.greensock.plugins[b];return pt?(pt._cssRegister(),nt[T].parse(U,N,T,it,F,ut,xt)):(Lr("Error: "+b+" js file not loaded."),F)}})}};Tt=ss.prototype,Tt.parseComplex=function(w,b,U,N,T,it){var F,ut,xt,pt,tt,jt,kt=this.keyword;if(this.multi&&(ze.test(U)||ze.test(b)?(ut=b.replace(ze,"|").split("|"),xt=U.replace(ze,"|").split("|")):kt&&(ut=[b],xt=[U])),xt){for(pt=xt.length>ut.length?xt.length:ut.length,F=0;pt>F;F++)b=ut[F]=ut[F]||this.dflt,U=xt[F]=xt[F]||this.dflt,kt&&(tt=b.indexOf(kt),jt=U.indexOf(kt),tt!==jt&&(jt===-1?ut[F]=ut[F].split(kt).join(""):tt===-1&&(ut[F]+=" "+kt)));b=ut.join(", "),U=xt.join(", ")}return sr(w,this.p,b,U,this.clrs,this.dflt,N,this.pr,T,it)},Tt.parse=function(w,b,U,N,T,it,F){return this.parseComplex(w.style,this.format(Je(w,this.p,mt,!1,this.dflt)),this.format(b),T,it)},Mt.registerSpecialProp=function(w,b,U){Di(w,{parser:function(N,T,it,F,ut,xt,pt){var tt=new gi(N,it,0,0,ut,2,it,!1,U);return tt.plugin=xt,tt.setRatio=b(N,T,F._tween,it),tt},priority:U})},Mt.useSVGTransformAttr=!0;var Cr,Ta="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),sn=Gn("transform"),as=$n+"transform",Lo=Gn("transformOrigin"),Qn=Gn("perspective")!==null,ls=ni.Transform=function(){this.perspective=parseFloat(Mt.defaultTransformPerspective)||0,this.force3D=Mt.defaultForce3D!==!1&&Qn?Mt.defaultForce3D||"auto":!1},Hs=ji.SVGElement,Sa=function(w,b,U){var N,T=Zi.createElementNS("http://www.w3.org/2000/svg",w),it=/([a-z])([A-Z])/g;for(N in U)T.setAttributeNS(null,N.replace(it,"$1-$2").toLowerCase(),U[N]);return b.appendChild(T),T},Rr=Zi.documentElement||{},Ka=function(){var w,b,U,N=st||/Android/i.test(ci)&&!ji.chrome;return Zi.createElementNS&&!N&&(w=Sa("svg",Rr),b=Sa("rect",w,{width:100,height:50,x:100}),U=b.getBoundingClientRect().width,b.style[Lo]="50% 50%",b.style[sn]="scaleX(0.5)",N=U===b.getBoundingClientRect().width&&!(Ht&&Qn),Rr.removeChild(w)),N}(),hs=function(w,b,U,N,T,it){var F,ut,xt,pt,tt,jt,kt,It,Kt,Xt,Le,Me,Ye,ye,ee=w._gsTransform,_e=cs(w,!0);ee&&(Ye=ee.xOrigin,ye=ee.yOrigin),(!N||(F=N.split(" ")).length<2)&&(kt=w.getBBox(),kt.x===0&&kt.y===0&&kt.width+kt.height===0&&(kt={x:parseFloat(w.hasAttribute("x")?w.getAttribute("x"):w.hasAttribute("cx")?w.getAttribute("cx"):0)||0,y:parseFloat(w.hasAttribute("y")?w.getAttribute("y"):w.hasAttribute("cy")?w.getAttribute("cy"):0)||0,width:0,height:0}),b=q(b).split(" "),F=[(b[0].indexOf("%")!==-1?parseFloat(b[0])/100*kt.width:parseFloat(b[0]))+kt.x,(b[1].indexOf("%")!==-1?parseFloat(b[1])/100*kt.height:parseFloat(b[1]))+kt.y]),U.xOrigin=pt=parseFloat(F[0]),U.yOrigin=tt=parseFloat(F[1]),N&&_e!==us&&(jt=_e[0],kt=_e[1],It=_e[2],Kt=_e[3],Xt=_e[4],Le=_e[5],Me=jt*Kt-kt*It,Me&&(ut=pt*(Kt/Me)+tt*(-It/Me)+(It*Le-Kt*Xt)/Me,xt=pt*(-kt/Me)+tt*(jt/Me)-(jt*Le-kt*Xt)/Me,pt=U.xOrigin=F[0]=ut,tt=U.yOrigin=F[1]=xt)),ee&&(it&&(U.xOffset=ee.xOffset,U.yOffset=ee.yOffset,ee=U),T||T!==!1&&Mt.defaultSmoothOrigin!==!1?(ut=pt-Ye,xt=tt-ye,ee.xOffset+=ut*_e[0]+xt*_e[2]-ut,ee.yOffset+=ut*_e[1]+xt*_e[3]-xt):ee.xOffset=ee.yOffset=0),it||w.setAttribute("data-svg-origin",F.join(" "))},ks=function(w){var b,U=Oe("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),N=this.parentNode,T=this.nextSibling,it=this.style.cssText;if(Rr.appendChild(U),U.appendChild(this),this.style.display="block",w)try{b=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=ks}catch{}else this._originalGetBBox&&(b=this._originalGetBBox());return T?N.insertBefore(this,T):N.appendChild(this),Rr.removeChild(U),this.style.cssText=it,b},br=function(w){try{return w.getBBox()}catch{return ks.call(w,!0)}},Vs=function(w){return!(!Hs||!w.getCTM||w.parentNode&&!w.ownerSVGElement||!br(w))},us=[1,0,0,1,0,0],cs=function(w,b){var U,N,T,it,F,ut,xt=w._gsTransform||new ls,pt=1e5,tt=w.style;if(sn?N=Je(w,as,null,!0):w.currentStyle&&(N=w.currentStyle.filter.match(Et),N=N&&N.length===4?[N[0].substr(4),Number(N[2].substr(4)),Number(N[1].substr(4)),N[3].substr(4),xt.x||0,xt.y||0].join(","):""),U=!N||N==="none"||N==="matrix(1, 0, 0, 1, 0, 0)",!sn||!(ut=!on(w)||on(w).display==="none")&&w.parentNode||(ut&&(it=tt.display,tt.display="block"),w.parentNode||(F=1,Rr.appendChild(w)),N=Je(w,as,null,!0),U=!N||N==="none"||N==="matrix(1, 0, 0, 1, 0, 0)",it?tt.display=it:ut&&Co(tt,"display"),F&&Rr.removeChild(w)),(xt.svg||w.getCTM&&Vs(w))&&(U&&(tt[sn]+"").indexOf("matrix")!==-1&&(N=tt[sn],U=0),T=w.getAttribute("transform"),U&&T&&(T=w.transform.baseVal.consolidate().matrix,N="matrix("+T.a+","+T.b+","+T.c+","+T.d+","+T.e+","+T.f+")",U=0)),U)return us;for(T=(N||"").match(y)||[],Ji=T.length;--Ji>-1;)it=Number(T[Ji]),T[Ji]=(F=it-(it|=0))?(F*pt+(0>F?-.5:.5)|0)/pt+it:it;return b&&T.length>6?[T[0],T[1],T[4],T[5],T[12],T[13]]:T},Or=ni.getTransform=function(w,b,U,N){if(w._gsTransform&&U&&!N)return w._gsTransform;var T,it,F,ut,xt,pt,tt=U?w._gsTransform||new ls:new ls,jt=tt.scaleX<0,kt=2e-5,It=1e5,Kt=Qn&&(parseFloat(Je(w,Lo,b,!1,"0 0 0").split(" ")[2])||tt.zOrigin)||0,Xt=parseFloat(Mt.defaultTransformPerspective)||0;if(tt.svg=!(!w.getCTM||!Vs(w)),tt.svg&&(hs(w,Je(w,Lo,b,!1,"50% 50%")+"",tt,w.getAttribute("data-svg-origin")),Cr=Mt.useSVGTransformAttr||Ka),T=cs(w),T!==us){if(T.length===16){var Le,Me,Ye,ye,ee,_e=T[0],Zt=T[1],Ke=T[2],fe=T[3],ne=T[4],de=T[5],an=T[6],Ln=T[7],vi=T[8],yi=T[9],Si=T[10],Hi=T[12],ki=T[13],Xi=T[14],qi=T[11],Ti=Math.atan2(an,Si);tt.zOrigin&&(Xi=-tt.zOrigin,Hi=vi*Xi-T[12],ki=yi*Xi-T[13],Xi=Si*Xi+tt.zOrigin-T[14]),tt.rotationX=Ti*Qe,Ti&&(ye=Math.cos(-Ti),ee=Math.sin(-Ti),Le=ne*ye+vi*ee,Me=de*ye+yi*ee,Ye=an*ye+Si*ee,vi=ne*-ee+vi*ye,yi=de*-ee+yi*ye,Si=an*-ee+Si*ye,qi=Ln*-ee+qi*ye,ne=Le,de=Me,an=Ye),Ti=Math.atan2(-Ke,Si),tt.rotationY=Ti*Qe,Ti&&(ye=Math.cos(-Ti),ee=Math.sin(-Ti),Le=_e*ye-vi*ee,Me=Zt*ye-yi*ee,Ye=Ke*ye-Si*ee,yi=Zt*ee+yi*ye,Si=Ke*ee+Si*ye,qi=fe*ee+qi*ye,_e=Le,Zt=Me,Ke=Ye),Ti=Math.atan2(Zt,_e),tt.rotation=Ti*Qe,Ti&&(ye=Math.cos(Ti),ee=Math.sin(Ti),Le=_e*ye+Zt*ee,Me=ne*ye+de*ee,Ye=vi*ye+yi*ee,Zt=Zt*ye-_e*ee,de=de*ye-ne*ee,yi=yi*ye-vi*ee,_e=Le,ne=Me,vi=Ye),tt.rotationX&&Math.abs(tt.rotationX)+Math.abs(tt.rotation)>359.9&&(tt.rotationX=tt.rotation=0,tt.rotationY=180-tt.rotationY),Ti=Math.atan2(ne,de),tt.scaleX=(Math.sqrt(_e*_e+Zt*Zt+Ke*Ke)*It+.5|0)/It,tt.scaleY=(Math.sqrt(de*de+an*an)*It+.5|0)/It,tt.scaleZ=(Math.sqrt(vi*vi+yi*yi+Si*Si)*It+.5|0)/It,_e/=tt.scaleX,ne/=tt.scaleY,Zt/=tt.scaleX,de/=tt.scaleY,Math.abs(Ti)>kt?(tt.skewX=Ti*Qe,ne=0,tt.skewType!=="simple"&&(tt.scaleY*=1/Math.cos(Ti))):tt.skewX=0,tt.perspective=qi?1/(0>qi?-qi:qi):0,tt.x=Hi,tt.y=ki,tt.z=Xi,tt.svg&&(tt.x-=tt.xOrigin-(tt.xOrigin*_e-tt.yOrigin*ne),tt.y-=tt.yOrigin-(tt.yOrigin*Zt-tt.xOrigin*de))}else if(!Qn||N||!T.length||tt.x!==T[4]||tt.y!==T[5]||!tt.rotationX&&!tt.rotationY){var _i=T.length>=6,Li=_i?T[0]:1,ei=T[1]||0,Ir=T[2]||0,Mn=_i?T[3]:1;tt.x=T[4]||0,tt.y=T[5]||0,F=Math.sqrt(Li*Li+ei*ei),ut=Math.sqrt(Mn*Mn+Ir*Ir),xt=Li||ei?Math.atan2(ei,Li)*Qe:tt.rotation||0,pt=Ir||Mn?Math.atan2(Ir,Mn)*Qe+xt:tt.skewX||0,tt.scaleX=F,tt.scaleY=ut,tt.rotation=xt,tt.skewX=pt,Qn&&(tt.rotationX=tt.rotationY=tt.z=0,tt.perspective=Xt,tt.scaleZ=1),tt.svg&&(tt.x-=tt.xOrigin-(tt.xOrigin*Li+tt.yOrigin*Ir),tt.y-=tt.yOrigin-(tt.xOrigin*ei+tt.yOrigin*Mn))}Math.abs(tt.skewX)>90&&Math.abs(tt.skewX)<270&&(jt?(tt.scaleX*=-1,tt.skewX+=tt.rotation<=0?180:-180,tt.rotation+=tt.rotation<=0?180:-180):(tt.scaleY*=-1,tt.skewX+=tt.skewX<=0?180:-180)),tt.zOrigin=Kt;for(it in tt)tt[it]<kt&&tt[it]>-kt&&(tt[it]=0)}return U&&(w._gsTransform=tt,tt.svg&&(Cr&&w.style[sn]?ht.delayedCall(.001,function(){Co(w.style,sn)}):!Cr&&w.getAttribute("transform")&&ht.delayedCall(.001,function(){w.removeAttribute("transform")}))),tt},Ea=function(w){var b,U,N=this.data,T=-N.rotation*Ut,it=T+N.skewX*Ut,F=1e5,ut=(Math.cos(T)*N.scaleX*F|0)/F,xt=(Math.sin(T)*N.scaleX*F|0)/F,pt=(Math.sin(it)*-N.scaleY*F|0)/F,tt=(Math.cos(it)*N.scaleY*F|0)/F,jt=this.t.style,kt=this.t.currentStyle;if(kt){U=xt,xt=-pt,pt=-U,b=kt.filter,jt.filter="";var It,Kt,Xt=this.t.offsetWidth,Le=this.t.offsetHeight,Me=kt.position!=="absolute",Ye="progid:DXImageTransform.Microsoft.Matrix(M11="+ut+", M12="+xt+", M21="+pt+", M22="+tt,ye=N.x+Xt*N.xPercent/100,ee=N.y+Le*N.yPercent/100;if(N.ox!=null&&(It=(N.oxp?Xt*N.ox*.01:N.ox)-Xt/2,Kt=(N.oyp?Le*N.oy*.01:N.oy)-Le/2,ye+=It-(It*ut+Kt*xt),ee+=Kt-(It*pt+Kt*tt)),Me?(It=Xt/2,Kt=Le/2,Ye+=", Dx="+(It-(It*ut+Kt*xt)+ye)+", Dy="+(Kt-(It*pt+Kt*tt)+ee)+")"):Ye+=", sizingMethod='auto expand')",b.indexOf("DXImageTransform.Microsoft.Matrix(")!==-1?jt.filter=b.replace(ie,Ye):jt.filter=Ye+" "+b,(w===0||w===1)&&ut===1&&xt===0&&pt===0&&tt===1&&(Me&&Ye.indexOf("Dx=0, Dy=0")===-1||X.test(b)&&parseFloat(RegExp.$1)!==100||b.indexOf(b.indexOf("Alpha"))===-1&&jt.removeAttribute("filter")),!Me){var _e,Zt,Ke,fe=8>st?1:-1;for(It=N.ieOffsetX||0,Kt=N.ieOffsetY||0,N.ieOffsetX=Math.round((Xt-((0>ut?-ut:ut)*Xt+(0>xt?-xt:xt)*Le))/2+ye),N.ieOffsetY=Math.round((Le-((0>tt?-tt:tt)*Le+(0>pt?-pt:pt)*Xt))/2+ee),Ji=0;4>Ji;Ji++)Zt=k[Ji],_e=kt[Zt],U=_e.indexOf("px")!==-1?parseFloat(_e):wn(this.t,Zt,parseFloat(_e),_e.replace(z,""))||0,Ke=U!==N[Zt]?2>Ji?-N.ieOffsetX:-N.ieOffsetY:2>Ji?It-N.ieOffsetX:Kt-N.ieOffsetY,jt[Zt]=(N[Zt]=Math.round(U-Ke*(Ji===0||Ji===2?1:fe)))+"px"}}},tl=ni.set3DTransformRatio=ni.setTransformRatio=function(w){var b,U,N,T,it,F,ut,xt,pt,tt,jt,kt,It,Kt,Xt,Le,Me,Ye,ye,ee,_e,Zt,Ke,fe=this.data,ne=this.t.style,de=fe.rotation,an=fe.rotationX,Ln=fe.rotationY,vi=fe.scaleX,yi=fe.scaleY,Si=fe.scaleZ,Hi=fe.x,ki=fe.y,Xi=fe.z,qi=fe.svg,Ti=fe.perspective,_i=fe.force3D,Li=fe.skewY,ei=fe.skewX;if(Li&&(ei+=Li,de+=Li),((w===1||w===0)&&_i==="auto"&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!_i)&&!Xi&&!Ti&&!Ln&&!an&&Si===1||Cr&&qi||!Qn)return void(de||ei||qi?(de*=Ut,Zt=ei*Ut,Ke=1e5,U=Math.cos(de)*vi,it=Math.sin(de)*vi,N=Math.sin(de-Zt)*-yi,F=Math.cos(de-Zt)*yi,Zt&&fe.skewType==="simple"&&(b=Math.tan(Zt-Li*Ut),b=Math.sqrt(1+b*b),N*=b,F*=b,Li&&(b=Math.tan(Li*Ut),b=Math.sqrt(1+b*b),U*=b,it*=b)),qi&&(Hi+=fe.xOrigin-(fe.xOrigin*U+fe.yOrigin*N)+fe.xOffset,ki+=fe.yOrigin-(fe.xOrigin*it+fe.yOrigin*F)+fe.yOffset,Cr&&(fe.xPercent||fe.yPercent)&&(Xt=this.t.getBBox(),Hi+=.01*fe.xPercent*Xt.width,ki+=.01*fe.yPercent*Xt.height),Xt=1e-6,Xt>Hi&&Hi>-Xt&&(Hi=0),Xt>ki&&ki>-Xt&&(ki=0)),ye=(U*Ke|0)/Ke+","+(it*Ke|0)/Ke+","+(N*Ke|0)/Ke+","+(F*Ke|0)/Ke+","+Hi+","+ki+")",qi&&Cr?this.t.setAttribute("transform","matrix("+ye):ne[sn]=(fe.xPercent||fe.yPercent?"translate("+fe.xPercent+"%,"+fe.yPercent+"%) matrix(":"matrix(")+ye):ne[sn]=(fe.xPercent||fe.yPercent?"translate("+fe.xPercent+"%,"+fe.yPercent+"%) matrix(":"matrix(")+vi+",0,0,"+yi+","+Hi+","+ki+")");if(Ht&&(Xt=1e-4,Xt>vi&&vi>-Xt&&(vi=Si=2e-5),Xt>yi&&yi>-Xt&&(yi=Si=2e-5),!Ti||fe.z||fe.rotationX||fe.rotationY||(Ti=0)),de||ei)de*=Ut,Le=U=Math.cos(de),Me=it=Math.sin(de),ei&&(de-=ei*Ut,Le=Math.cos(de),Me=Math.sin(de),fe.skewType==="simple"&&(b=Math.tan((ei-Li)*Ut),b=Math.sqrt(1+b*b),Le*=b,Me*=b,fe.skewY&&(b=Math.tan(Li*Ut),b=Math.sqrt(1+b*b),U*=b,it*=b))),N=-Me,F=Le;else{if(!(Ln||an||Si!==1||Ti||qi))return void(ne[sn]=(fe.xPercent||fe.yPercent?"translate("+fe.xPercent+"%,"+fe.yPercent+"%) translate3d(":"translate3d(")+Hi+"px,"+ki+"px,"+Xi+"px)"+(vi!==1||yi!==1?" scale("+vi+","+yi+")":""));U=F=1,N=it=0}tt=1,T=ut=xt=pt=jt=kt=0,It=Ti?-1/Ti:0,Kt=fe.zOrigin,Xt=1e-6,ee=",",_e="0",de=Ln*Ut,de&&(Le=Math.cos(de),Me=Math.sin(de),xt=-Me,jt=It*-Me,T=U*Me,ut=it*Me,tt=Le,It*=Le,U*=Le,it*=Le),de=an*Ut,de&&(Le=Math.cos(de),Me=Math.sin(de),b=N*Le+T*Me,Ye=F*Le+ut*Me,pt=tt*Me,kt=It*Me,T=N*-Me+T*Le,ut=F*-Me+ut*Le,tt*=Le,It*=Le,N=b,F=Ye),Si!==1&&(T*=Si,ut*=Si,tt*=Si,It*=Si),yi!==1&&(N*=yi,F*=yi,pt*=yi,kt*=yi),vi!==1&&(U*=vi,it*=vi,xt*=vi,jt*=vi),(Kt||qi)&&(Kt&&(Hi+=T*-Kt,ki+=ut*-Kt,Xi+=tt*-Kt+Kt),qi&&(Hi+=fe.xOrigin-(fe.xOrigin*U+fe.yOrigin*N)+fe.xOffset,ki+=fe.yOrigin-(fe.xOrigin*it+fe.yOrigin*F)+fe.yOffset),Xt>Hi&&Hi>-Xt&&(Hi=_e),Xt>ki&&ki>-Xt&&(ki=_e),Xt>Xi&&Xi>-Xt&&(Xi=0)),ye=fe.xPercent||fe.yPercent?"translate("+fe.xPercent+"%,"+fe.yPercent+"%) matrix3d(":"matrix3d(",ye+=(Xt>U&&U>-Xt?_e:U)+ee+(Xt>it&&it>-Xt?_e:it)+ee+(Xt>xt&&xt>-Xt?_e:xt),ye+=ee+(Xt>jt&&jt>-Xt?_e:jt)+ee+(Xt>N&&N>-Xt?_e:N)+ee+(Xt>F&&F>-Xt?_e:F),an||Ln||Si!==1?(ye+=ee+(Xt>pt&&pt>-Xt?_e:pt)+ee+(Xt>kt&&kt>-Xt?_e:kt)+ee+(Xt>T&&T>-Xt?_e:T),ye+=ee+(Xt>ut&&ut>-Xt?_e:ut)+ee+(Xt>tt&&tt>-Xt?_e:tt)+ee+(Xt>It&&It>-Xt?_e:It)+ee):ye+=",0,0,0,0,1,0,",ye+=Hi+ee+ki+ee+Xi+ee+(Ti?1+-Xi/Ti:1)+")",ne[sn]=ye};Tt=ls.prototype,Tt.x=Tt.y=Tt.z=Tt.skewX=Tt.skewY=Tt.rotation=Tt.rotationX=Tt.rotationY=Tt.zOrigin=Tt.xPercent=Tt.yPercent=Tt.xOffset=Tt.yOffset=0,Tt.scaleX=Tt.scaleY=Tt.scaleZ=1,Di("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(w,b,U,N,T,it,F){if(N._lastParsedTransform===F)return T;N._lastParsedTransform=F;var ut,xt=F.scale&&typeof F.scale=="function"?F.scale:0;typeof F[U]=="function"&&(ut=F[U],F[U]=b),xt&&(F.scale=xt(_,w));var pt,tt,jt,kt,It,Kt,Xt,Le,Me,Ye=w._gsTransform,ye=w.style,ee=1e-6,_e=Ta.length,Zt=F,Ke={},fe="transformOrigin",ne=Or(w,mt,!0,Zt.parseTransform),de=Zt.transform&&(typeof Zt.transform=="function"?Zt.transform(_,Z):Zt.transform);if(ne.skewType=Zt.skewType||ne.skewType||Mt.defaultSkewType,N._transform=ne,"rotationZ"in Zt&&(Zt.rotation=Zt.rotationZ),de&&typeof de=="string"&&sn)tt=Pi.style,tt[sn]=de,tt.display="block",tt.position="absolute",de.indexOf("%")!==-1&&(tt.width=Je(w,"width"),tt.height=Je(w,"height")),Zi.body.appendChild(Pi),pt=Or(Pi,null,!1),ne.skewType==="simple"&&(pt.scaleY*=Math.cos(pt.skewX*Ut)),ne.svg&&(Kt=ne.xOrigin,Xt=ne.yOrigin,pt.x-=ne.xOffset,pt.y-=ne.yOffset,(Zt.transformOrigin||Zt.svgOrigin)&&(de={},hs(w,q(Zt.transformOrigin),de,Zt.svgOrigin,Zt.smoothOrigin,!0),Kt=de.xOrigin,Xt=de.yOrigin,pt.x-=de.xOffset-ne.xOffset,pt.y-=de.yOffset-ne.yOffset),(Kt||Xt)&&(Le=cs(Pi,!0),pt.x-=Kt-(Kt*Le[0]+Xt*Le[2]),pt.y-=Xt-(Kt*Le[1]+Xt*Le[3]))),Zi.body.removeChild(Pi),pt.perspective||(pt.perspective=ne.perspective),Zt.xPercent!=null&&(pt.xPercent=Lt(Zt.xPercent,ne.xPercent)),Zt.yPercent!=null&&(pt.yPercent=Lt(Zt.yPercent,ne.yPercent));else if(typeof Zt=="object"){if(pt={scaleX:Lt(Zt.scaleX!=null?Zt.scaleX:Zt.scale,ne.scaleX),scaleY:Lt(Zt.scaleY!=null?Zt.scaleY:Zt.scale,ne.scaleY),scaleZ:Lt(Zt.scaleZ,ne.scaleZ),x:Lt(Zt.x,ne.x),y:Lt(Zt.y,ne.y),z:Lt(Zt.z,ne.z),xPercent:Lt(Zt.xPercent,ne.xPercent),yPercent:Lt(Zt.yPercent,ne.yPercent),perspective:Lt(Zt.transformPerspective,ne.perspective)},It=Zt.directionalRotation,It!=null)if(typeof It=="object")for(tt in It)Zt[tt]=It[tt];else Zt.rotation=It;typeof Zt.x=="string"&&Zt.x.indexOf("%")!==-1&&(pt.x=0,pt.xPercent=Lt(Zt.x,ne.xPercent)),typeof Zt.y=="string"&&Zt.y.indexOf("%")!==-1&&(pt.y=0,pt.yPercent=Lt(Zt.y,ne.yPercent)),pt.rotation=Ft("rotation"in Zt?Zt.rotation:"shortRotation"in Zt?Zt.shortRotation+"_short":ne.rotation,ne.rotation,"rotation",Ke),Qn&&(pt.rotationX=Ft("rotationX"in Zt?Zt.rotationX:"shortRotationX"in Zt?Zt.shortRotationX+"_short":ne.rotationX||0,ne.rotationX,"rotationX",Ke),pt.rotationY=Ft("rotationY"in Zt?Zt.rotationY:"shortRotationY"in Zt?Zt.shortRotationY+"_short":ne.rotationY||0,ne.rotationY,"rotationY",Ke)),pt.skewX=Ft(Zt.skewX,ne.skewX),pt.skewY=Ft(Zt.skewY,ne.skewY)}for(Qn&&Zt.force3D!=null&&(ne.force3D=Zt.force3D,kt=!0),jt=ne.force3D||ne.z||ne.rotationX||ne.rotationY||pt.z||pt.rotationX||pt.rotationY||pt.perspective,jt||Zt.scale==null||(pt.scaleZ=1);--_e>-1;)Me=Ta[_e],de=pt[Me]-ne[Me],(de>ee||-ee>de||Zt[Me]!=null||Ii[Me]!=null)&&(kt=!0,T=new gi(ne,Me,ne[Me],de,T),Me in Ke&&(T.e=Ke[Me]),T.xs0=0,T.plugin=it,N._overwriteProps.push(T.n));return de=Zt.transformOrigin,ne.svg&&(de||Zt.svgOrigin)&&(Kt=ne.xOffset,Xt=ne.yOffset,hs(w,q(de),pt,Zt.svgOrigin,Zt.smoothOrigin),T=Zr(ne,"xOrigin",(Ye?ne:pt).xOrigin,pt.xOrigin,T,fe),T=Zr(ne,"yOrigin",(Ye?ne:pt).yOrigin,pt.yOrigin,T,fe),(Kt!==ne.xOffset||Xt!==ne.yOffset)&&(T=Zr(ne,"xOffset",Ye?Kt:ne.xOffset,ne.xOffset,T,fe),T=Zr(ne,"yOffset",Ye?Xt:ne.yOffset,ne.yOffset,T,fe)),de="0px 0px"),(de||Qn&&jt&&ne.zOrigin)&&(sn?(kt=!0,Me=Lo,de=(de||Je(w,Me,mt,!1,"50% 50%"))+"",T=new gi(ye,Me,0,0,T,-1,fe),T.b=ye[Me],T.plugin=it,Qn?(tt=ne.zOrigin,de=de.split(" "),ne.zOrigin=(de.length>2&&(tt===0||de[2]!=="0px")?parseFloat(de[2]):tt)||0,T.xs0=T.e=de[0]+" "+(de[1]||"50%")+" 0px",T=new gi(ne,"zOrigin",0,0,T,-1,T.n),T.b=tt,T.xs0=T.e=ne.zOrigin):T.xs0=T.e=de):q(de+"",ne)),kt&&(N._transformType=ne.svg&&Cr||!jt&&this._transformType!==3?2:3),ut&&(F[U]=ut),xt&&(F.scale=xt),T},prefix:!0}),Di("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),Di("borderRadius",{defaultValue:"0px",parser:function(w,b,U,N,T,it){b=this.format(b);var F,ut,xt,pt,tt,jt,kt,It,Kt,Xt,Le,Me,Ye,ye,ee,_e,Zt=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],Ke=w.style;for(Kt=parseFloat(w.offsetWidth),Xt=parseFloat(w.offsetHeight),F=b.split(" "),ut=0;ut<Zt.length;ut++)this.p.indexOf("border")&&(Zt[ut]=Gn(Zt[ut])),tt=pt=Je(w,Zt[ut],mt,!1,"0px"),tt.indexOf(" ")!==-1&&(pt=tt.split(" "),tt=pt[0],pt=pt[1]),jt=xt=F[ut],kt=parseFloat(tt),Me=tt.substr((kt+"").length),Ye=jt.charAt(1)==="=",Ye?(It=parseInt(jt.charAt(0)+"1",10),jt=jt.substr(2),It*=parseFloat(jt),Le=jt.substr((It+"").length-(0>It?1:0))||""):(It=parseFloat(jt),Le=jt.substr((It+"").length)),Le===""&&(Le=_t[U]||Me),Le!==Me&&(ye=wn(w,"borderLeft",kt,Me),ee=wn(w,"borderTop",kt,Me),Le==="%"?(tt=ye/Kt*100+"%",pt=ee/Xt*100+"%"):Le==="em"?(_e=wn(w,"borderLeft",1,"em"),tt=ye/_e+"em",pt=ee/_e+"em"):(tt=ye+"px",pt=ee+"px"),Ye&&(jt=parseFloat(tt)+It+Le,xt=parseFloat(pt)+It+Le)),T=sr(Ke,Zt[ut],tt+" "+pt,jt+" "+xt,!1,"0px",T);return T},prefix:!0,formatter:pi("0px 0px 0px 0px",!1,!0)}),Di("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(w,b,U,N,T,it){return sr(w.style,U,this.format(Je(w,U,mt,!1,"0px 0px")),this.format(b),!1,"0px",T)},prefix:!0,formatter:pi("0px 0px",!1,!0)}),Di("backgroundPosition",{defaultValue:"0 0",parser:function(w,b,U,N,T,it){var F,ut,xt,pt,tt,jt,kt="background-position",It=mt||on(w,null),Kt=this.format((It?st?It.getPropertyValue(kt+"-x")+" "+It.getPropertyValue(kt+"-y"):It.getPropertyValue(kt):w.currentStyle.backgroundPositionX+" "+w.currentStyle.backgroundPositionY)||"0 0"),Xt=this.format(b);if(Kt.indexOf("%")!==-1!=(Xt.indexOf("%")!==-1)&&Xt.split(",").length<2&&(jt=Je(w,"backgroundImage").replace(re,""),jt&&jt!=="none")){for(F=Kt.split(" "),ut=Xt.split(" "),In.setAttribute("src",jt),xt=2;--xt>-1;)Kt=F[xt],pt=Kt.indexOf("%")!==-1,pt!==(ut[xt].indexOf("%")!==-1)&&(tt=xt===0?w.offsetWidth-In.width:w.offsetHeight-In.height,F[xt]=pt?parseFloat(Kt)/100*tt+"px":parseFloat(Kt)/tt*100+"%");Kt=F.join(" ")}return this.parseComplex(w.style,Kt,Xt,T,it)},formatter:q}),Di("backgroundSize",{defaultValue:"0 0",formatter:function(w){return w+="",w.substr(0,2)==="co"?w:q(w.indexOf(" ")===-1?w+" "+w:w)}}),Di("perspective",{defaultValue:"0px",prefix:!0}),Di("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),Di("transformStyle",{prefix:!0}),Di("backfaceVisibility",{prefix:!0}),Di("userSelect",{prefix:!0}),Di("margin",{parser:Mi("marginTop,marginRight,marginBottom,marginLeft")}),Di("padding",{parser:Mi("paddingTop,paddingRight,paddingBottom,paddingLeft")}),Di("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(w,b,U,N,T,it){var F,ut,xt;return 9>st?(ut=w.currentStyle,xt=8>st?" ":",",F="rect("+ut.clipTop+xt+ut.clipRight+xt+ut.clipBottom+xt+ut.clipLeft+")",b=this.format(b).split(",").join(xt)):(F=this.format(Je(w,this.p,mt,!1,this.dflt)),b=this.format(b)),this.parseComplex(w.style,F,b,T,it)}}),Di("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),Di("autoRound,strictUnits",{parser:function(w,b,U,N,T){return T}}),Di("border",{defaultValue:"0px solid #000",parser:function(w,b,U,N,T,it){var F=Je(w,"borderTopWidth",mt,!1,"0px"),ut=this.format(b).split(" "),xt=ut[0].replace(z,"");return xt!=="px"&&(F=parseFloat(F)/wn(w,"borderTopWidth",1,xt)+xt),this.parseComplex(w.style,this.format(F+" "+Je(w,"borderTopStyle",mt,!1,"solid")+" "+Je(w,"borderTopColor",mt,!1,"#000")),ut.join(" "),T,it)},color:!0,formatter:function(w){var b=w.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(w.match(Pe)||["#000"])[0]}}),Di("borderWidth",{parser:Mi("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),Di("float,cssFloat,styleFloat",{parser:function(w,b,U,N,T,it){var F=w.style,ut="cssFloat"in F?"cssFloat":"styleFloat";return new gi(F,ut,0,0,T,-1,U,!1,0,F[ut],b)}});var el=function(w){var b,U=this.t,N=U.filter||Je(this.data,"filter")||"",T=this.s+this.c*w|0;T===100&&(N.indexOf("atrix(")===-1&&N.indexOf("radient(")===-1&&N.indexOf("oader(")===-1?(U.removeAttribute("filter"),b=!Je(this.data,"filter")):(U.filter=N.replace(yt,""),b=!0)),b||(this.xn1&&(U.filter=N=N||"alpha(opacity="+T+")"),N.indexOf("pacity")===-1?T===0&&this.xn1||(U.filter=N+" alpha(opacity="+T+")"):U.filter=N.replace(X,"opacity="+T))};Di("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(w,b,U,N,T,it){var F=parseFloat(Je(w,"opacity",mt,!1,"1")),ut=w.style,xt=U==="autoAlpha";return typeof b=="string"&&b.charAt(1)==="="&&(b=(b.charAt(0)==="-"?-1:1)*parseFloat(b.substr(2))+F),xt&&F===1&&Je(w,"visibility",mt)==="hidden"&&b!==0&&(F=0),Fi?T=new gi(ut,"opacity",F,b-F,T):(T=new gi(ut,"opacity",100*F,100*(b-F),T),T.xn1=xt?1:0,ut.zoom=1,T.type=2,T.b="alpha(opacity="+T.s+")",T.e="alpha(opacity="+(T.s+T.c)+")",T.data=w,T.plugin=it,T.setRatio=el),xt&&(T=new gi(ut,"visibility",0,0,T,-1,null,!1,0,F!==0?"inherit":"hidden",b===0?"hidden":"inherit"),T.xs0="inherit",N._overwriteProps.push(T.n),N._overwriteProps.push(U)),T}});var Co=function(w,b){b&&(w.removeProperty?((b.substr(0,2)==="ms"||b.substr(0,6)==="webkit")&&(b="-"+b),w.removeProperty(b.replace(zt,"-$1").toLowerCase())):w.removeAttribute(b))},Ro=function(w){if(this.t._gsClassPT=this,w===1||w===0){this.t.setAttribute("class",w===0?this.b:this.e);for(var b=this.data,U=this.t.style;b;)b.v?U[b.p]=b.v:Co(U,b.p),b=b._next;w===1&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};Di("className",{parser:function(w,b,U,N,T,it,F){var ut,xt,pt,tt,jt,kt=w.getAttribute("class")||"",It=w.style.cssText;if(T=N._classNamePT=new gi(w,U,0,0,T,2),T.setRatio=Ro,T.pr=-11,M=!0,T.b=kt,xt=Hn(w,mt),pt=w._gsClassPT){for(tt={},jt=pt.data;jt;)tt[jt.p]=1,jt=jt._next;pt.setRatio(1)}return w._gsClassPT=T,T.e=b.charAt(1)!=="="?b:kt.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+(b.charAt(0)==="+"?" "+b.substr(2):""),w.setAttribute("class",T.e),ut=Bi(w,xt,Hn(w),F,tt),w.setAttribute("class",kt),T.data=ut.firstMPT,w.style.cssText=It,T=T.xfirst=N.parse(w,ut.difs,T,it)}});var Aa=function(w){if((w===1||w===0)&&this.data._totalTime===this.data._totalDuration&&this.data.data!=="isFromStart"){var b,U,N,T,it,F=this.t.style,ut=nt.transform.parse;if(this.e==="all")F.cssText="",T=!0;else for(b=this.e.split(" ").join("").split(","),N=b.length;--N>-1;)U=b[N],nt[U]&&(nt[U].parse===ut?T=!0:U=U==="transformOrigin"?Lo:nt[U].p),Co(F,U);T&&(Co(F,sn),it=this.t._gsTransform,it&&(it.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(Di("clearProps",{parser:function(w,b,U,N,T){return T=new gi(w,U,0,0,T,2),T.setRatio=Aa,T.e=b,T.pr=-10,T.data=N._tween,M=!0,T}}),Tt="bezier,throwProps,physicsProps,physics2D".split(","),Ji=Tt.length;Ji--;)Qa(Tt[Ji]);Tt=Mt.prototype,Tt._firstPT=Tt._lastParsedTransform=Tt._transform=null,Tt._onInitTween=function(w,b,U,N){if(!w.nodeType)return!1;this._target=Z=w,this._tween=U,this._vars=b,_=N,bt=b.autoRound,M=!1,_t=b.suffixMap||Mt.suffixMap,mt=on(w,""),S=this._overwriteProps;var T,it,F,ut,xt,pt,tt,jt,kt,It=w.style;if(gt&&It.zIndex===""&&(T=Je(w,"zIndex",mt),(T==="auto"||T==="")&&this._addLazySet(It,"zIndex",0)),typeof b=="string"&&(ut=It.cssText,T=Hn(w,mt),It.cssText=ut+";"+b,T=Bi(w,T,Hn(w)).difs,!Fi&&et.test(b)&&(T.opacity=parseFloat(RegExp.$1)),b=T,It.cssText=ut),b.className?this._firstPT=it=nt.className.parse(w,b.className,"className",this,null,null,b):this._firstPT=it=this.parse(w,b,null),this._transformType){for(kt=this._transformType===3,sn?Nt&&(gt=!0,It.zIndex===""&&(tt=Je(w,"zIndex",mt),(tt==="auto"||tt==="")&&this._addLazySet(It,"zIndex",0)),Ct&&this._addLazySet(It,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(kt?"visible":"hidden"))):It.zoom=1,F=it;F&&F._next;)F=F._next;jt=new gi(w,"transform",0,0,null,2),this._linkCSSP(jt,null,F),jt.setRatio=sn?tl:Ea,jt.data=this._transform||Or(w,mt,!0),jt.tween=U,jt.pr=-1,S.pop()}if(M){for(;it;){for(pt=it._next,F=ut;F&&F.pr>it.pr;)F=F._next;(it._prev=F?F._prev:xt)?it._prev._next=it:ut=it,(it._next=F)?F._prev=it:xt=it,it=pt}this._firstPT=ut}return!0},Tt.parse=function(w,b,U,N){var T,it,F,ut,xt,pt,tt,jt,kt,It,Kt=w.style;for(T in b){if(pt=b[T],typeof pt=="function"&&(pt=pt(_,Z)),it=nt[T])U=it.parse(w,pt,T,this,U,N,b);else{if(T.substr(0,2)==="--"){this._tween._propLookup[T]=this._addTween.call(this._tween,w.style,"setProperty",on(w).getPropertyValue(T)+"",pt+"",T,!1,T);continue}xt=Je(w,T,mt)+"",kt=typeof pt=="string",T==="color"||T==="fill"||T==="stroke"||T.indexOf("Color")!==-1||kt&&ft.test(pt)?(kt||(pt=Se(pt),pt=(pt.length>3?"rgba(":"rgb(")+pt.join(",")+")"),U=sr(Kt,T,xt,pt,!0,"transparent",U,0,N)):kt&&rn.test(pt)?U=sr(Kt,T,xt,pt,!0,null,U,0,N):(F=parseFloat(xt),tt=F||F===0?xt.substr((F+"").length):"",(xt===""||xt==="auto")&&(T==="width"||T==="height"?(F=j(w,T,mt),tt="px"):T==="left"||T==="top"?(F=ho(w,T,mt),tt="px"):(F=T!=="opacity"?0:1,tt="")),It=kt&&pt.charAt(1)==="=",It?(ut=parseInt(pt.charAt(0)+"1",10),pt=pt.substr(2),ut*=parseFloat(pt),jt=pt.replace(z,"")):(ut=parseFloat(pt),jt=kt?pt.replace(z,""):""),jt===""&&(jt=T in _t?_t[T]:tt),pt=ut||ut===0?(It?ut+F:ut)+jt:b[T],tt!==jt&&(jt!==""||T==="lineHeight")&&(ut||ut===0)&&F&&(F=wn(w,T,F,tt),jt==="%"?(F/=wn(w,T,100,"%")/100,b.strictUnits!==!0&&(xt=F+"%")):jt==="em"||jt==="rem"||jt==="vw"||jt==="vh"?F/=wn(w,T,1,jt):jt!=="px"&&(ut=wn(w,T,ut,jt),jt="px"),It&&(ut||ut===0)&&(pt=ut+F+jt)),It&&(ut+=F),!F&&F!==0||!ut&&ut!==0?Kt[T]!==void 0&&(pt||pt+""!="NaN"&&pt!=null)?(U=new gi(Kt,T,ut||F||0,0,U,-1,T,!1,0,xt,pt),U.xs0=pt!=="none"||T!=="display"&&T.indexOf("Style")===-1?pt:xt):Lr("invalid "+T+" tween value: "+b[T]):(U=new gi(Kt,T,F,ut-F,U,0,T,bt!==!1&&(jt==="px"||T==="zIndex"),0,xt,pt),U.xs0=jt))}N&&U&&!U.plugin&&(U.plugin=N)}return U},Tt.setRatio=function(w){var b,U,N,T=this._firstPT,it=1e-6;if(w!==1||this._tween._time!==this._tween._duration&&this._tween._time!==0)if(w||this._tween._time!==this._tween._duration&&this._tween._time!==0||this._tween._rawPrevTime===-1e-6)for(;T;){if(b=T.c*w+T.s,T.r?b=T.r(b):it>b&&b>-it&&(b=0),T.type)if(T.type===1)if(N=T.l,N===2)T.t[T.p]=T.xs0+b+T.xs1+T.xn1+T.xs2;else if(N===3)T.t[T.p]=T.xs0+b+T.xs1+T.xn1+T.xs2+T.xn2+T.xs3;else if(N===4)T.t[T.p]=T.xs0+b+T.xs1+T.xn1+T.xs2+T.xn2+T.xs3+T.xn3+T.xs4;else if(N===5)T.t[T.p]=T.xs0+b+T.xs1+T.xn1+T.xs2+T.xn2+T.xs3+T.xn3+T.xs4+T.xn4+T.xs5;else{for(U=T.xs0+b+T.xs1,N=1;N<T.l;N++)U+=T["xn"+N]+T["xs"+(N+1)];T.t[T.p]=U}else T.type===-1?T.t[T.p]=T.xs0:T.setRatio&&T.setRatio(w);else T.t[T.p]=b+T.xs0;T=T._next}else for(;T;)T.type!==2?T.t[T.p]=T.b:T.setRatio(w),T=T._next;else for(;T;){if(T.type!==2)if(T.r&&T.type!==-1)if(b=T.r(T.s+T.c),T.type){if(T.type===1){for(N=T.l,U=T.xs0+b+T.xs1,N=1;N<T.l;N++)U+=T["xn"+N]+T["xs"+(N+1)];T.t[T.p]=U}}else T.t[T.p]=b+T.xs0;else T.t[T.p]=T.e;else T.setRatio(w);T=T._next}},Tt._enableTransforms=function(w){this._transform=this._transform||Or(this._target,mt,!0),this._transformType=this._transform.svg&&Cr||!w&&this._transformType!==3?2:3};var Pa=function(w){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};Tt._addLazySet=function(w,b,U){var N=this._firstPT=new gi(w,b,0,0,this._firstPT,2);N.e=U,N.setRatio=Pa,N.data=this},Tt._linkCSSP=function(w,b,U,N){return w&&(b&&(b._prev=w),w._next&&(w._next._prev=w._prev),w._prev?w._prev._next=w._next:this._firstPT===w&&(this._firstPT=w._next,N=!0),U?U._next=w:N||this._firstPT!==null||(this._firstPT=w),w._next=b,w._prev=U),w},Tt._mod=function(w){for(var b=this._firstPT;b;)typeof w[b.p]=="function"&&(b.r=w[b.p]),b=b._next},Tt._kill=function(w){var b,U,N,T=w;if(w.autoAlpha||w.alpha){T={};for(U in w)T[U]=w[U];T.opacity=1,T.autoAlpha&&(T.visibility=1)}for(w.className&&(b=this._classNamePT)&&(N=b.xfirst,N&&N._prev?this._linkCSSP(N._prev,b._next,N._prev._prev):N===this._firstPT&&(this._firstPT=b._next),b._next&&this._linkCSSP(b._next,b._next._next,N._prev),this._classNamePT=null),b=this._firstPT;b;)b.plugin&&b.plugin!==U&&b.plugin._kill&&(b.plugin._kill(w),U=b.plugin),b=b._next;return g.prototype._kill.call(this,T)};var _r=function(w,b,U){var N,T,it,F;if(w.slice)for(T=w.length;--T>-1;)_r(w[T],b,U);else for(N=w.childNodes,T=N.length;--T>-1;)it=N[T],F=it.type,it.style&&(b.push(Hn(it)),U&&U.push(it)),F!==1&&F!==9&&F!==11||!it.childNodes.length||_r(it,b,U)};return Mt.cascadeTo=function(w,b,U){var N,T,it,F,ut=ht.to(w,b,U),xt=[ut],pt=[],tt=[],jt=[],kt=ht._internals.reservedProps;for(w=ut._targets||ut.target,_r(w,pt,jt),ut.render(b,!0,!0),_r(w,tt),ut.render(0,!0,!0),ut._enabled(!0),N=jt.length;--N>-1;)if(T=Bi(jt[N],pt[N],tt[N]),T.firstMPT){T=T.difs;for(it in U)kt[it]&&(T[it]=U[it]);F={};for(it in T)F[it]=pt[N][it];xt.push(ht.fromTo(jt[N],b,F,T))}return xt},g.activate([Mt]),Mt},!0),function(){var g=ji._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(mt,S,Mt){return this._tween=Mt,!0}}),ht=function(mt){var S=1>mt?Math.pow(10,(mt+"").length-2):1;return function(Mt){return(Math.round(Mt/mt)*mt*S|0)/S}},M=function(mt,S){for(;mt;)mt.f||mt.blob||(mt.m=S||Math.round),mt=mt._next},_t=g.prototype;_t._onInitAllProps=function(){var mt,S,Mt,qt,nt=this._tween,Tt=nt.vars.roundProps,bt={},gt=nt._propLookup.roundProps;if(typeof Tt!="object"||Tt.push)for(typeof Tt=="string"&&(Tt=Tt.split(",")),Mt=Tt.length;--Mt>-1;)bt[Tt[Mt]]=Math.round;else for(qt in Tt)bt[qt]=ht(Tt[qt]);for(qt in bt)for(mt=nt._firstPT;mt;)S=mt._next,mt.pg?mt.t._mod(bt):mt.n===qt&&(mt.f===2&&mt.t?M(mt.t._firstPT,bt[qt]):(this._add(mt.t,qt,mt.s,mt.c,bt[qt]),S&&(S._prev=mt._prev),mt._prev?mt._prev._next=S:nt._firstPT===mt&&(nt._firstPT=S),mt._next=mt._prev=null,nt._propLookup[qt]=gt)),mt=S;return!1},_t._add=function(mt,S,Mt,qt,nt){this._addTween(mt,S,Mt,Mt+qt,S,nt||Math.round),this._overwriteProps.push(S)}}(),function(){ji._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(g,ht,M,_t){var mt,S;if(typeof g.setAttribute!="function")return!1;for(mt in ht)S=ht[mt],typeof S=="function"&&(S=S(_t,g)),this._addTween(g,"setAttribute",g.getAttribute(mt)+"",S+"",mt,!1,mt),this._overwriteProps.push(mt);return!0}})}(),ji._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(g,ht,M,_t){typeof ht!="object"&&(ht={rotation:ht}),this.finals={};var mt,S,Mt,qt,nt,Tt,bt=ht.useRadians===!0?2*Math.PI:360,gt=1e-6;for(mt in ht)mt!=="useRadians"&&(qt=ht[mt],typeof qt=="function"&&(qt=qt(_t,g)),Tt=(qt+"").split("_"),S=Tt[0],Mt=parseFloat(typeof g[mt]!="function"?g[mt]:g[mt.indexOf("set")||typeof g["get"+mt.substr(3)]!="function"?mt:"get"+mt.substr(3)]()),qt=this.finals[mt]=typeof S=="string"&&S.charAt(1)==="="?Mt+parseInt(S.charAt(0)+"1",10)*Number(S.substr(2)):Number(S)||0,nt=qt-Mt,Tt.length&&(S=Tt.join("_"),S.indexOf("short")!==-1&&(nt%=bt,nt!==nt%(bt/2)&&(nt=0>nt?nt+bt:nt-bt)),S.indexOf("_cw")!==-1&&0>nt?nt=(nt+9999999999*bt)%bt-(nt/bt|0)*bt:S.indexOf("ccw")!==-1&&nt>0&&(nt=(nt-9999999999*bt)%bt-(nt/bt|0)*bt)),(nt>gt||-gt>nt)&&(this._addTween(g,mt,Mt,Mt+nt,mt),this._overwriteProps.push(mt)));return!0},set:function(g){var ht;if(g!==1)this._super.setRatio.call(this,g);else for(ht=this._firstPT;ht;)ht.f?ht.t[ht.p](this.finals[ht.p]):ht.t[ht.p]=this.finals[ht.p],ht=ht._next}})._autoCSS=!0,ji._gsDefine("easing.Back",["easing.Ease"],function(g){var ht,M,_t,mt,S=ji.GreenSockGlobals||ji,Mt=S.com.greensock,qt=2*Math.PI,nt=Math.PI/2,Tt=Mt._class,bt=function(y,B){var E=Tt("easing."+y,function(){},!0),Y=E.prototype=new g;return Y.constructor=E,Y.getRatio=B,E},gt=g.register||function(){},Nt=function(y,B,E,Y,z){var X=Tt("easing."+y,{easeOut:new B,easeIn:new E,easeInOut:new Y},!0);return gt(X,y),X},Ht=function(y,B,E){this.t=y,this.v=B,E&&(this.next=E,E.prev=this,this.c=E.v-B,this.gap=E.t-y)},Ct=function(y,B){var E=Tt("easing."+y,function(z){this._p1=z||z===0?z:1.70158,this._p2=1.525*this._p1},!0),Y=E.prototype=new g;return Y.constructor=E,Y.getRatio=B,Y.config=function(z){return new E(z)},E},st=Nt("Back",Ct("BackOut",function(y){return(y-=1)*y*((this._p1+1)*y+this._p1)+1}),Ct("BackIn",function(y){return y*y*((this._p1+1)*y-this._p1)}),Ct("BackInOut",function(y){return(y*=2)<1?.5*y*y*((this._p2+1)*y-this._p2):.5*((y-=2)*y*((this._p2+1)*y+this._p2)+2)})),Z=Tt("easing.SlowMo",function(y,B,E){B=B||B===0?B:.7,y==null?y=.7:y>1&&(y=1),this._p=y!==1?B:0,this._p1=(1-y)/2,this._p2=y,this._p3=this._p1+this._p2,this._calcEnd=E===!0},!0),_=Z.prototype=new g;return _.constructor=Z,_.getRatio=function(y){var B=y+(.5-y)*this._p;return y<this._p1?this._calcEnd?1-(y=1-y/this._p1)*y:B-(y=1-y/this._p1)*y*y*y*B:y>this._p3?this._calcEnd?y===1?0:1-(y=(y-this._p3)/this._p1)*y:B+(y-B)*(y=(y-this._p3)/this._p1)*y*y*y:this._calcEnd?1:B},Z.ease=new Z(.7,.7),_.config=Z.config=function(y,B,E){return new Z(y,B,E)},ht=Tt("easing.SteppedEase",function(y,B){y=y||1,this._p1=1/y,this._p2=y+(B?0:1),this._p3=B?1:0},!0),_=ht.prototype=new g,_.constructor=ht,_.getRatio=function(y){return 0>y?y=0:y>=1&&(y=.999999999),((this._p2*y|0)+this._p3)*this._p1},_.config=ht.config=function(y,B){return new ht(y,B)},M=Tt("easing.ExpoScaleEase",function(y,B,E){this._p1=Math.log(B/y),this._p2=B-y,this._p3=y,this._ease=E},!0),_=M.prototype=new g,_.constructor=M,_.getRatio=function(y){return this._ease&&(y=this._ease.getRatio(y)),(this._p3*Math.exp(this._p1*y)-this._p3)/this._p2},_.config=M.config=function(y,B,E){return new M(y,B,E)},_t=Tt("easing.RoughEase",function(y){y=y||{};for(var B,E,Y,z,X,et,yt=y.taper||"none",ft=[],zt=0,Yt=0|(y.points||20),re=Yt,se=y.randomize!==!1,we=y.clamp===!0,Et=y.template instanceof g?y.template:null,ie=typeof y.strength=="number"?.4*y.strength:.4;--re>-1;)B=se?Math.random():1/Yt*re,E=Et?Et.getRatio(B):B,yt==="none"?Y=ie:yt==="out"?(z=1-B,Y=z*z*ie):yt==="in"?Y=B*B*ie:.5>B?(z=2*B,Y=z*z*.5*ie):(z=2*(1-B),Y=z*z*.5*ie),se?E+=Math.random()*Y-.5*Y:re%2?E+=.5*Y:E-=.5*Y,we&&(E>1?E=1:0>E&&(E=0)),ft[zt++]={x:B,y:E};for(ft.sort(function(ze,rn){return ze.x-rn.x}),et=new Ht(1,1,null),re=Yt;--re>-1;)X=ft[re],et=new Ht(X.x,X.y,et);this._prev=new Ht(0,0,et.t!==0?et:et.next)},!0),_=_t.prototype=new g,_.constructor=_t,_.getRatio=function(y){var B=this._prev;if(y>B.t){for(;B.next&&y>=B.t;)B=B.next;B=B.prev}else for(;B.prev&&y<=B.t;)B=B.prev;return this._prev=B,B.v+(y-B.t)/B.gap*B.c},_.config=function(y){return new _t(y)},_t.ease=new _t,Nt("Bounce",bt("BounceOut",function(y){return 1/2.75>y?7.5625*y*y:2/2.75>y?7.5625*(y-=1.5/2.75)*y+.75:2.5/2.75>y?7.5625*(y-=2.25/2.75)*y+.9375:7.5625*(y-=2.625/2.75)*y+.984375}),bt("BounceIn",function(y){return(y=1-y)<1/2.75?1-7.5625*y*y:2/2.75>y?1-(7.5625*(y-=1.5/2.75)*y+.75):2.5/2.75>y?1-(7.5625*(y-=2.25/2.75)*y+.9375):1-(7.5625*(y-=2.625/2.75)*y+.984375)}),bt("BounceInOut",function(y){var B=.5>y;return y=B?1-2*y:2*y-1,y=1/2.75>y?7.5625*y*y:2/2.75>y?7.5625*(y-=1.5/2.75)*y+.75:2.5/2.75>y?7.5625*(y-=2.25/2.75)*y+.9375:7.5625*(y-=2.625/2.75)*y+.984375,B?.5*(1-y):.5*y+.5})),Nt("Circ",bt("CircOut",function(y){return Math.sqrt(1-(y-=1)*y)}),bt("CircIn",function(y){return-(Math.sqrt(1-y*y)-1)}),bt("CircInOut",function(y){return(y*=2)<1?-.5*(Math.sqrt(1-y*y)-1):.5*(Math.sqrt(1-(y-=2)*y)+1)})),mt=function(y,B,E){var Y=Tt("easing."+y,function(X,et){this._p1=X>=1?X:1,this._p2=(et||E)/(1>X?X:1),this._p3=this._p2/qt*(Math.asin(1/this._p1)||0),this._p2=qt/this._p2},!0),z=Y.prototype=new g;return z.constructor=Y,z.getRatio=B,z.config=function(X,et){return new Y(X,et)},Y},Nt("Elastic",mt("ElasticOut",function(y){return this._p1*Math.pow(2,-10*y)*Math.sin((y-this._p3)*this._p2)+1},.3),mt("ElasticIn",function(y){return-(this._p1*Math.pow(2,10*(y-=1))*Math.sin((y-this._p3)*this._p2))},.3),mt("ElasticInOut",function(y){return(y*=2)<1?-.5*(this._p1*Math.pow(2,10*(y-=1))*Math.sin((y-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(y-=1))*Math.sin((y-this._p3)*this._p2)*.5+1},.45)),Nt("Expo",bt("ExpoOut",function(y){return 1-Math.pow(2,-10*y)}),bt("ExpoIn",function(y){return Math.pow(2,10*(y-1))-.001}),bt("ExpoInOut",function(y){return(y*=2)<1?.5*Math.pow(2,10*(y-1)):.5*(2-Math.pow(2,-10*(y-1)))})),Nt("Sine",bt("SineOut",function(y){return Math.sin(y*nt)}),bt("SineIn",function(y){return-Math.cos(y*nt)+1}),bt("SineInOut",function(y){return-.5*(Math.cos(Math.PI*y)-1)})),Tt("easing.EaseLookup",{find:function(y){return g.map[y]}},!0),gt(S.SlowMo,"SlowMo","ease,"),gt(_t,"RoughEase","ease,"),gt(ht,"SteppedEase","ease,"),st},!0)}),ji._gsDefine&&ji._gsQueue.pop()(),function(g,ht){var M={},_t=g.document,mt=g.GreenSockGlobals=g.GreenSockGlobals||g,S=mt[ht];if(S)return typeof module<"u"&&module.exports&&(module.exports=S),S;var Mt,qt,nt,Tt,bt,gt=function(A){var k,j=A.split("."),q=mt;for(k=0;k<j.length;k++)q[j[k]]=q=q[j[k]]||{};return q},Nt=gt("com.greensock"),Ht=1e-10,Ct=function(A){var k,j=[],q=A.length;for(k=0;k!==q;j.push(A[k++]));return j},st=function(){},Z=function(){var A=Object.prototype.toString,k=A.call([]);return function(j){return j!=null&&(j instanceof Array||typeof j=="object"&&!!j.push&&A.call(j)===k)}}(),_={},y=function(A,k,j,q){this.sc=_[A]?_[A].sc:[],_[A]=this,this.gsClass=null,this.func=j;var lt=[];this.check=function(Lt){for(var Ft,Pt,Ae,Se,te=k.length,Pe=te;--te>-1;)(Ft=_[k[te]]||new y(k[te],[])).gsClass?(lt[te]=Ft.gsClass,Pe--):Lt&&Ft.sc.push(this);if(Pe===0&&j){if(Pt=("com.greensock."+A).split("."),Ae=Pt.pop(),Se=gt(Pt.join("."))[Ae]=this.gsClass=j.apply(j,lt),q)if(mt[Ae]=M[Ae]=Se,typeof module<"u"&&module.exports)if(A===ht){module.exports=M[ht]=Se;for(te in M)Se[te]=M[te]}else M[ht]&&(M[ht][Ae]=Se);else typeof define=="function"&&define.amd&&define((g.GreenSockAMDPath?g.GreenSockAMDPath+"/":"")+A.split(".").pop(),[],function(){return Se});for(te=0;te<this.sc.length;te++)this.sc[te].check()}},this.check(!0)},B=g._gsDefine=function(A,k,j,q){return new y(A,k,j,q)},E=Nt._class=function(A,k,j){return k=k||function(){},B(A,[],function(){return k},j),k};B.globals=mt;var Y=[0,0,1,1],z=E("easing.Ease",function(A,k,j,q){this._func=A,this._type=j||0,this._power=q||0,this._params=k?Y.concat(k):Y},!0),X=z.map={},et=z.register=function(A,k,j,q){for(var lt,Lt,Ft,Pt,Ae=k.split(","),Se=Ae.length,te=(j||"easeIn,easeOut,easeInOut").split(",");--Se>-1;)for(Lt=Ae[Se],lt=q?E("easing."+Lt,null,!0):Nt.easing[Lt]||{},Ft=te.length;--Ft>-1;)Pt=te[Ft],X[Lt+"."+Pt]=X[Pt+Lt]=lt[Pt]=A.getRatio?A:A[Pt]||new A};for(nt=z.prototype,nt._calcEnd=!1,nt.getRatio=function(A){if(this._func)return this._params[0]=A,this._func.apply(null,this._params);var k=this._type,j=this._power,q=k===1?1-A:k===2?A:.5>A?2*A:2*(1-A);return j===1?q*=q:j===2?q*=q*q:j===3?q*=q*q*q:j===4&&(q*=q*q*q*q),k===1?1-q:k===2?q:.5>A?q/2:1-q/2},Mt=["Linear","Quad","Cubic","Quart","Quint,Strong"],qt=Mt.length;--qt>-1;)nt=Mt[qt]+",Power"+qt,et(new z(null,null,1,qt),nt,"easeOut",!0),et(new z(null,null,2,qt),nt,"easeIn"+(qt===0?",easeNone":"")),et(new z(null,null,3,qt),nt,"easeInOut");X.linear=Nt.easing.Linear.easeIn,X.swing=Nt.easing.Quad.easeInOut;var yt=E("events.EventDispatcher",function(A){this._listeners={},this._eventTarget=A||this});nt=yt.prototype,nt.addEventListener=function(A,k,j,q,lt){lt=lt||0;var Lt,Ft,Pt=this._listeners[A],Ae=0;for(this!==Tt||bt||Tt.wake(),Pt==null&&(this._listeners[A]=Pt=[]),Ft=Pt.length;--Ft>-1;)Lt=Pt[Ft],Lt.c===k&&Lt.s===j?Pt.splice(Ft,1):Ae===0&&Lt.pr<lt&&(Ae=Ft+1);Pt.splice(Ae,0,{c:k,s:j,up:q,pr:lt})},nt.removeEventListener=function(A,k){var j,q=this._listeners[A];if(q){for(j=q.length;--j>-1;)if(q[j].c===k)return void q.splice(j,1)}},nt.dispatchEvent=function(A){var k,j,q,lt=this._listeners[A];if(lt)for(k=lt.length,k>1&&(lt=lt.slice(0)),j=this._eventTarget;--k>-1;)q=lt[k],q&&(q.up?q.c.call(q.s||j,{type:A,target:j}):q.c.call(q.s||j))};var ft=g.requestAnimationFrame,zt=g.cancelAnimationFrame,Yt=Date.now||function(){return new Date().getTime()},re=Yt();for(Mt=["ms","moz","webkit","o"],qt=Mt.length;--qt>-1&&!ft;)ft=g[Mt[qt]+"RequestAnimationFrame"],zt=g[Mt[qt]+"CancelAnimationFrame"]||g[Mt[qt]+"CancelRequestAnimationFrame"];E("Ticker",function(A,k){var j,q,lt,Lt,Ft,Pt=this,Ae=Yt(),Se=k!==!1&&ft?"auto":!1,te=500,Pe=33,pi="tick",Mi=function(ti){var gi,Zr,sr=Yt()-re;sr>te&&(Ae+=sr-Pe),re+=sr,Pt.time=(re-Ae)/1e3,gi=Pt.time-Ft,(!j||gi>0||ti===!0)&&(Pt.frame++,Ft+=gi+(gi>=Lt?.004:Lt-gi),Zr=!0),ti!==!0&&(lt=q(Mi)),Zr&&Pt.dispatchEvent(pi)};yt.call(Pt),Pt.time=Pt.frame=0,Pt.tick=function(){Mi(!0)},Pt.lagSmoothing=function(ti,gi){return arguments.length?(te=ti||1/Ht,void(Pe=Math.min(gi,te,0))):1/Ht>te},Pt.sleep=function(){lt!=null&&(Se&&zt?zt(lt):clearTimeout(lt),q=st,lt=null,Pt===Tt&&(bt=!1))},Pt.wake=function(ti){lt!==null?Pt.sleep():ti?Ae+=-re+(re=Yt()):Pt.frame>10&&(re=Yt()-te+5),q=j===0?st:Se&&ft?ft:function(gi){return setTimeout(gi,1e3*(Ft-Pt.time)+1|0)},Pt===Tt&&(bt=!0),Mi(2)},Pt.fps=function(ti){return arguments.length?(j=ti,Lt=1/(j||60),Ft=this.time+Lt,void Pt.wake()):j},Pt.useRAF=function(ti){return arguments.length?(Pt.sleep(),Se=ti,void Pt.fps(j)):Se},Pt.fps(A),setTimeout(function(){Se==="auto"&&Pt.frame<5&&(_t||{}).visibilityState!=="hidden"&&Pt.useRAF(!1)},1500)}),nt=Nt.Ticker.prototype=new Nt.events.EventDispatcher,nt.constructor=Nt.Ticker;var se=E("core.Animation",function(A,k){if(this.vars=k=k||{},this._duration=this._totalDuration=A||0,this._delay=Number(k.delay)||0,this._timeScale=1,this._active=k.immediateRender===!0,this.data=k.data,this._reversed=k.reversed===!0,Gi){bt||Tt.wake();var j=this.vars.useFrames?$n:Gi;j.add(this,j._time),this.vars.paused&&this.paused(!0)}});Tt=se.ticker=new Nt.Ticker,nt=se.prototype,nt._dirty=nt._gc=nt._initted=nt._paused=!1,nt._totalTime=nt._time=0,nt._rawPrevTime=-1,nt._next=nt._last=nt._onUpdate=nt._timeline=nt.timeline=null,nt._paused=!1;var we=function(){bt&&Yt()-re>2e3&&((_t||{}).visibilityState!=="hidden"||!Tt.lagSmoothing())&&Tt.wake();var A=setTimeout(we,2e3);A.unref&&A.unref()};we(),nt.play=function(A,k){return A!=null&&this.seek(A,k),this.reversed(!1).paused(!1)},nt.pause=function(A,k){return A!=null&&this.seek(A,k),this.paused(!0)},nt.resume=function(A,k){return A!=null&&this.seek(A,k),this.paused(!1)},nt.seek=function(A,k){return this.totalTime(Number(A),k!==!1)},nt.restart=function(A,k){return this.reversed(!1).paused(!1).totalTime(A?-this._delay:0,k!==!1,!0)},nt.reverse=function(A,k){return A!=null&&this.seek(A||this.totalDuration(),k),this.reversed(!0).paused(!1)},nt.render=function(A,k,j){},nt.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},nt.isActive=function(){var A,k=this._timeline,j=this._startTime;return!k||!this._gc&&!this._paused&&k.isActive()&&(A=k.rawTime(!0))>=j&&A<j+this.totalDuration()/this._timeScale-1e-7},nt._enabled=function(A,k){return bt||Tt.wake(),this._gc=!A,this._active=this.isActive(),k!==!0&&(A&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!A&&this.timeline&&this._timeline._remove(this,!0)),!1},nt._kill=function(A,k){return this._enabled(!1,!1)},nt.kill=function(A,k){return this._kill(A,k),this},nt._uncache=function(A){for(var k=A?this:this.timeline;k;)k._dirty=!0,k=k.timeline;return this},nt._swapSelfInParams=function(A){for(var k=A.length,j=A.concat();--k>-1;)A[k]==="{self}"&&(j[k]=this);return j},nt._callback=function(A){var k=this.vars,j=k[A],q=k[A+"Params"],lt=k[A+"Scope"]||k.callbackScope||this,Lt=q?q.length:0;switch(Lt){case 0:j.call(lt);break;case 1:j.call(lt,q[0]);break;case 2:j.call(lt,q[0],q[1]);break;default:j.apply(lt,q)}},nt.eventCallback=function(A,k,j,q){if((A||"").substr(0,2)==="on"){var lt=this.vars;if(arguments.length===1)return lt[A];k==null?delete lt[A]:(lt[A]=k,lt[A+"Params"]=Z(j)&&j.join("").indexOf("{self}")!==-1?this._swapSelfInParams(j):j,lt[A+"Scope"]=q),A==="onUpdate"&&(this._onUpdate=k)}return this},nt.delay=function(A){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+A-this._delay),this._delay=A,this):this._delay},nt.duration=function(A){return arguments.length?(this._duration=this._totalDuration=A,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&A!==0&&this.totalTime(this._totalTime*(A/this._duration),!0),this):(this._dirty=!1,this._duration)},nt.totalDuration=function(A){return this._dirty=!1,arguments.length?this.duration(A):this._totalDuration},nt.time=function(A,k){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(A>this._duration?this._duration:A,k)):this._time},nt.totalTime=function(A,k,j){if(bt||Tt.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>A&&!j&&(A+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var q=this._totalDuration,lt=this._timeline;if(A>q&&!j&&(A=q),this._startTime=(this._paused?this._pauseTime:lt._time)-(this._reversed?q-A:A)/this._timeScale,lt._dirty||this._uncache(!1),lt._timeline)for(;lt._timeline;)lt._timeline._time!==(lt._startTime+lt._totalTime)/lt._timeScale&<.totalTime(lt._totalTime,!0),lt=lt._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==A||this._duration===0)&&(Ut.length&&on(),this.render(A,k,!1),Ut.length&&on())}return this},nt.progress=nt.totalProgress=function(A,k){var j=this.duration();return arguments.length?this.totalTime(j*A,k):j?this._time/j:this.ratio},nt.startTime=function(A){return arguments.length?(A!==this._startTime&&(this._startTime=A,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,A-this._delay)),this):this._startTime},nt.endTime=function(A){return this._startTime+(A!=0?this.totalDuration():this.duration())/this._timeScale},nt.timeScale=function(A){if(!arguments.length)return this._timeScale;var k,j;for(A=A||Ht,this._timeline&&this._timeline.smoothChildTiming&&(k=this._pauseTime,j=k||k===0?k:this._timeline.totalTime(),this._startTime=j-(j-this._startTime)*this._timeScale/A),this._timeScale=A,j=this.timeline;j&&j.timeline;)j._dirty=!0,j.totalDuration(),j=j.timeline;return this},nt.reversed=function(A){return arguments.length?(A!=this._reversed&&(this._reversed=A,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},nt.paused=function(A){if(!arguments.length)return this._paused;var k,j,q=this._timeline;return A!=this._paused&&q&&(bt||A||Tt.wake(),k=q.rawTime(),j=k-this._pauseTime,!A&&q.smoothChildTiming&&(this._startTime+=j,this._uncache(!1)),this._pauseTime=A?k:null,this._paused=A,this._active=this.isActive(),!A&&j!==0&&this._initted&&this.duration()&&(k=q.smoothChildTiming?this._totalTime:(k-this._startTime)/this._timeScale,this.render(k,k===this._totalTime,!0))),this._gc&&!A&&this._enabled(!0,!1),this};var Et=E("core.SimpleTimeline",function(A){se.call(this,0,A),this.autoRemoveChildren=this.smoothChildTiming=!0});nt=Et.prototype=new se,nt.constructor=Et,nt.kill()._gc=!1,nt._first=nt._last=nt._recent=null,nt._sortChildren=!1,nt.add=nt.insert=function(A,k,j,q){var lt,Lt;if(A._startTime=Number(k||0)+A._delay,A._paused&&this!==A._timeline&&(A._pauseTime=this.rawTime()-(A._timeline.rawTime()-A._pauseTime)),A.timeline&&A.timeline._remove(A,!0),A.timeline=A._timeline=this,A._gc&&A._enabled(!0,!0),lt=this._last,this._sortChildren)for(Lt=A._startTime;lt&<._startTime>Lt;)lt=lt._prev;return lt?(A._next=lt._next,lt._next=A):(A._next=this._first,this._first=A),A._next?A._next._prev=A:this._last=A,A._prev=lt,this._recent=A,this._timeline&&this._uncache(!0),this},nt._remove=function(A,k){return A.timeline===this&&(k||A._enabled(!1,!0),A._prev?A._prev._next=A._next:this._first===A&&(this._first=A._next),A._next?A._next._prev=A._prev:this._last===A&&(this._last=A._prev),A._next=A._prev=A.timeline=null,A===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},nt.render=function(A,k,j){var q,lt=this._first;for(this._totalTime=this._time=this._rawPrevTime=A;lt;)q=lt._next,(lt._active||A>=lt._startTime&&!lt._paused&&!lt._gc)&&(lt._reversed?lt.render((lt._dirty?lt.totalDuration():lt._totalDuration)-(A-lt._startTime)*lt._timeScale,k,j):lt.render((A-lt._startTime)*lt._timeScale,k,j)),lt=q},nt.rawTime=function(){return bt||Tt.wake(),this._totalTime};var ie=E("TweenLite",function(A,k,j){if(se.call(this,k,j),this.render=ie.prototype.render,A==null)throw"Cannot tween a null target.";this.target=A=typeof A!="string"?A:ie.selector(A)||A;var q,lt,Lt,Ft=A.jquery||A.length&&A!==g&&A[0]&&(A[0]===g||A[0].nodeType&&A[0].style&&!A.nodeType),Pt=this.vars.overwrite;if(this._overwrite=Pt=Pt==null?Lr[ie.defaultOverwrite]:typeof Pt=="number"?Pt>>0:Lr[Pt],(Ft||A instanceof Array||A.push&&Z(A))&&typeof A[0]!="number")for(this._targets=Lt=Ct(A),this._propLookup=[],this._siblings=[],q=0;q<Lt.length;q++)lt=Lt[q],lt?typeof lt!="string"?lt.length&<!==g&<[0]&&(lt[0]===g||lt[0].nodeType&<[0].style&&!lt.nodeType)?(Lt.splice(q--,1),this._targets=Lt=Lt.concat(Ct(lt))):(this._siblings[q]=Je(lt,this,!1),Pt===1&&this._siblings[q].length>1&&ho(lt,this,null,1,this._siblings[q])):(lt=Lt[q--]=ie.selector(lt),typeof lt=="string"&&Lt.splice(q+1,1)):Lt.splice(q--,1);else this._propLookup={},this._siblings=Je(A,this,!1),Pt===1&&this._siblings.length>1&&ho(A,this,null,1,this._siblings);(this.vars.immediateRender||k===0&&this._delay===0&&this.vars.immediateRender!==!1)&&(this._time=-Ht,this.render(Math.min(0,-this._delay)))},!0),ze=function(A){return A&&A.length&&A!==g&&A[0]&&(A[0]===g||A[0].nodeType&&A[0].style&&!A.nodeType)},rn=function(A,k){var j,q={};for(j in A)yr[j]||j in k&&j!=="transform"&&j!=="x"&&j!=="y"&&j!=="width"&&j!=="height"&&j!=="className"&&j!=="border"||!(!ni[j]||ni[j]&&ni[j]._autoCSS)||(q[j]=A[j],delete A[j]);A.css=q};nt=ie.prototype=new se,nt.constructor=ie,nt.kill()._gc=!1,nt.ratio=0,nt._firstPT=nt._targets=nt._overwrittenProps=nt._startAt=null,nt._notifyPluginsOfEnabled=nt._lazy=!1,ie.version="2.0.2",ie.defaultEase=nt._ease=new z(null,null,1,1),ie.defaultOverwrite="auto",ie.ticker=Tt,ie.autoSleep=120,ie.lagSmoothing=function(A,k){Tt.lagSmoothing(A,k)},ie.selector=g.$||g.jQuery||function(A){var k=g.$||g.jQuery;return k?(ie.selector=k,k(A)):(_t||(_t=g.document),_t?_t.querySelectorAll?_t.querySelectorAll(A):_t.getElementById(A.charAt(0)==="#"?A.substr(1):A):A)};var Ut=[],Qe={},Ii=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Pn=/[\+-]=-?[\.\d]/,Zi=function(A){for(var k,j=this._firstPT,q=1e-6;j;)k=j.blob?A===1&&this.end!=null?this.end:A?this.join(""):this.start:j.c*A+j.s,j.m?k=j.m.call(this._tween,k,this._target||j.t,this._tween):q>k&&k>-q&&!j.blob&&(k=0),j.f?j.fp?j.t[j.p](j.fp,k):j.t[j.p](k):j.t[j.p]=k,j=j._next},Oe=function(A,k,j,q){var lt,Lt,Ft,Pt,Ae,Se,te,Pe=[],pi=0,Mi="",ti=0;for(Pe.start=A,Pe.end=k,A=Pe[0]=A+"",k=Pe[1]=k+"",j&&(j(Pe),A=Pe[0],k=Pe[1]),Pe.length=0,lt=A.match(Ii)||[],Lt=k.match(Ii)||[],q&&(q._next=null,q.blob=1,Pe._firstPT=Pe._applyPT=q),Ae=Lt.length,Pt=0;Ae>Pt;Pt++)te=Lt[Pt],Se=k.substr(pi,k.indexOf(te,pi)-pi),Mi+=Se||!Pt?Se:",",pi+=Se.length,ti?ti=(ti+1)%5:Se.substr(-5)==="rgba("&&(ti=1),te===lt[Pt]||lt.length<=Pt?Mi+=te:(Mi&&(Pe.push(Mi),Mi=""),Ft=parseFloat(lt[Pt]),Pe.push(Ft),Pe._firstPT={_next:Pe._firstPT,t:Pe,p:Pe.length-1,s:Ft,c:(te.charAt(1)==="="?parseInt(te.charAt(0)+"1",10)*parseFloat(te.substr(2)):parseFloat(te)-Ft)||0,f:0,m:ti&&4>ti?Math.round:0}),pi+=te.length;return Mi+=k.substr(pi),Mi&&Pe.push(Mi),Pe.setRatio=Zi,Pn.test(k)&&(Pe.end=null),Pe},Pi=function(A,k,j,q,lt,Lt,Ft,Pt,Ae){typeof q=="function"&&(q=q(Ae||0,A));var Se,te=typeof A[k],Pe=te!=="function"?"":k.indexOf("set")||typeof A["get"+k.substr(3)]!="function"?k:"get"+k.substr(3),pi=j!=="get"?j:Pe?Ft?A[Pe](Ft):A[Pe]():A[k],Mi=typeof q=="string"&&q.charAt(1)==="=",ti={t:A,p:k,s:pi,f:te==="function",pg:0,n:lt||k,m:Lt?typeof Lt=="function"?Lt:Math.round:0,pr:0,c:Mi?parseInt(q.charAt(0)+"1",10)*parseFloat(q.substr(2)):parseFloat(q)-pi||0};return(typeof pi!="number"||typeof q!="number"&&!Mi)&&(Ft||isNaN(pi)||!Mi&&isNaN(q)||typeof pi=="boolean"||typeof q=="boolean"?(ti.fp=Ft,Se=Oe(pi,Mi?parseFloat(ti.s)+ti.c+(ti.s+"").replace(/[0-9\-\.]/g,""):q,Pt||ie.defaultStringFilter,ti),ti={t:Se,p:"setRatio",s:0,c:1,f:2,pg:0,n:lt||k,pr:0,m:0}):(ti.s=parseFloat(pi),Mi||(ti.c=parseFloat(q)-ti.s||0))),ti.c?((ti._next=this._firstPT)&&(ti._next._prev=ti),this._firstPT=ti,ti):void 0},In=ie._internals={isArray:Z,isSelector:ze,lazyTweens:Ut,blobDif:Oe},ni=ie._plugins={},ci=In.tweenLookup={},Fi=0,yr=In.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1},Lr={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},$n=se._rootFramesTimeline=new Et,Gi=se._rootTimeline=new Et,Gn=30,on=In.lazyRender=function(){var A,k=Ut.length;for(Qe={};--k>-1;)A=Ut[k],A&&A._lazy!==!1&&(A.render(A._lazy[0],A._lazy[1],!0),A._lazy=!1);Ut.length=0};Gi._startTime=Tt.time,$n._startTime=Tt.frame,Gi._active=$n._active=!0,setTimeout(on,1),se._updateRoot=ie.render=function(){var A,k,j;if(Ut.length&&on(),Gi.render((Tt.time-Gi._startTime)*Gi._timeScale,!1,!1),$n.render((Tt.frame-$n._startTime)*$n._timeScale,!1,!1),Ut.length&&on(),Tt.frame>=Gn){Gn=Tt.frame+(parseInt(ie.autoSleep,10)||120);for(j in ci){for(k=ci[j].tweens,A=k.length;--A>-1;)k[A]._gc&&k.splice(A,1);k.length===0&&delete ci[j]}if(j=Gi._first,(!j||j._paused)&&ie.autoSleep&&!$n._first&&Tt._listeners.tick.length===1){for(;j&&j._paused;)j=j._next;j||Tt.sleep()}}},Tt.addEventListener("tick",se._updateRoot);var Je=function(A,k,j){var q,lt,Lt=A._gsTweenID;if(ci[Lt||(A._gsTweenID=Lt="t"+Fi++)]||(ci[Lt]={target:A,tweens:[]}),k&&(q=ci[Lt].tweens,q[lt=q.length]=k,j))for(;--lt>-1;)q[lt]===k&&q.splice(lt,1);return ci[Lt].tweens},wn=function(A,k,j,q){var lt,Lt,Ft=A.vars.onOverwrite;return Ft&&(lt=Ft(A,k,j,q)),Ft=ie.onOverwrite,Ft&&(Lt=Ft(A,k,j,q)),lt!==!1&&Lt!==!1},ho=function(A,k,j,q,lt){var Lt,Ft,Pt,Ae;if(q===1||q>=4){for(Ae=lt.length,Lt=0;Ae>Lt;Lt++)if((Pt=lt[Lt])!==k)Pt._gc||Pt._kill(null,A,k)&&(Ft=!0);else if(q===5)break;return Ft}var Se,te=k._startTime+Ht,Pe=[],pi=0,Mi=k._duration===0;for(Lt=lt.length;--Lt>-1;)(Pt=lt[Lt])===k||Pt._gc||Pt._paused||(Pt._timeline!==k._timeline?(Se=Se||Hn(k,0,Mi),Hn(Pt,Se,Mi)===0&&(Pe[pi++]=Pt)):Pt._startTime<=te&&Pt._startTime+Pt.totalDuration()/Pt._timeScale>te&&((Mi||!Pt._initted)&&te-Pt._startTime<=2e-10||(Pe[pi++]=Pt)));for(Lt=pi;--Lt>-1;)if(Pt=Pe[Lt],Ae=Pt._firstPT,q===2&&Pt._kill(j,A,k)&&(Ft=!0),q!==2||!Pt._firstPT&&Pt._initted&&Ae){if(q!==2&&!wn(Pt,k))continue;Pt._enabled(!1,!1)&&(Ft=!0)}return Ft},Hn=function(A,k,j){for(var q=A._timeline,lt=q._timeScale,Lt=A._startTime;q._timeline;){if(Lt+=q._startTime,lt*=q._timeScale,q._paused)return-100;q=q._timeline}return Lt/=lt,Lt>k?Lt-k:j&&Lt===k||!A._initted&&2*Ht>Lt-k?Ht:(Lt+=A.totalDuration()/A._timeScale/lt)>k+Ht?0:Lt-k-Ht};nt._init=function(){var A,k,j,q,lt,Lt,Ft=this.vars,Pt=this._overwrittenProps,Ae=this._duration,Se=!!Ft.immediateRender,te=Ft.ease;if(Ft.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),lt={};for(q in Ft.startAt)lt[q]=Ft.startAt[q];if(lt.data="isStart",lt.overwrite=!1,lt.immediateRender=!0,lt.lazy=Se&&Ft.lazy!==!1,lt.startAt=lt.delay=null,lt.onUpdate=Ft.onUpdate,lt.onUpdateParams=Ft.onUpdateParams,lt.onUpdateScope=Ft.onUpdateScope||Ft.callbackScope||this,this._startAt=ie.to(this.target||{},0,lt),Se){if(this._time>0)this._startAt=null;else if(Ae!==0)return}}else if(Ft.runBackwards&&Ae!==0)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{this._time!==0&&(Se=!1),j={};for(q in Ft)yr[q]&&q!=="autoCSS"||(j[q]=Ft[q]);if(j.overwrite=0,j.data="isFromStart",j.lazy=Se&&Ft.lazy!==!1,j.immediateRender=Se,this._startAt=ie.to(this.target,0,j),Se){if(this._time===0)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=te=te?te instanceof z?te:typeof te=="function"?new z(te,Ft.easeParams):X[te]||ie.defaultEase:ie.defaultEase,Ft.easeParams instanceof Array&&te.config&&(this._ease=te.config.apply(te,Ft.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(Lt=this._targets.length,A=0;Lt>A;A++)this._initProps(this._targets[A],this._propLookup[A]={},this._siblings[A],Pt?Pt[A]:null,A)&&(k=!0);else k=this._initProps(this.target,this._propLookup,this._siblings,Pt,0);if(k&&ie._onPluginEvent("_onInitAllProps",this),Pt&&(this._firstPT||typeof this.target!="function"&&this._enabled(!1,!1)),Ft.runBackwards)for(j=this._firstPT;j;)j.s+=j.c,j.c=-j.c,j=j._next;this._onUpdate=Ft.onUpdate,this._initted=!0},nt._initProps=function(A,k,j,q,lt){var Lt,Ft,Pt,Ae,Se,te;if(A==null)return!1;Qe[A._gsTweenID]&&on(),this.vars.css||A.style&&A!==g&&A.nodeType&&ni.css&&this.vars.autoCSS!==!1&&rn(this.vars,A);for(Lt in this.vars)if(te=this.vars[Lt],yr[Lt])te&&(te instanceof Array||te.push&&Z(te))&&te.join("").indexOf("{self}")!==-1&&(this.vars[Lt]=te=this._swapSelfInParams(te,this));else if(ni[Lt]&&(Ae=new ni[Lt])._onInitTween(A,this.vars[Lt],this,lt)){for(this._firstPT=Se={_next:this._firstPT,t:Ae,p:"setRatio",s:0,c:1,f:1,n:Lt,pg:1,pr:Ae._priority,m:0},Ft=Ae._overwriteProps.length;--Ft>-1;)k[Ae._overwriteProps[Ft]]=this._firstPT;(Ae._priority||Ae._onInitAllProps)&&(Pt=!0),(Ae._onDisable||Ae._onEnable)&&(this._notifyPluginsOfEnabled=!0),Se._next&&(Se._next._prev=Se)}else k[Lt]=Pi.call(this,A,Lt,"get",te,Lt,0,null,this.vars.stringFilter,lt);return q&&this._kill(q,A)?this._initProps(A,k,j,q,lt):this._overwrite>1&&this._firstPT&&j.length>1&&ho(A,this,k,this._overwrite,j)?(this._kill(k,A),this._initProps(A,k,j,q,lt)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(Qe[A._gsTweenID]=!0),Pt)},nt.render=function(A,k,j){var q,lt,Lt,Ft,Pt=this._time,Ae=this._duration,Se=this._rawPrevTime;if(A>=Ae-1e-7&&A>=0)this._totalTime=this._time=Ae,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(q=!0,lt="onComplete",j=j||this._timeline.autoRemoveChildren),Ae===0&&(this._initted||!this.vars.lazy||j)&&(this._startTime===this._timeline._duration&&(A=0),(0>Se||0>=A&&A>=-1e-7||Se===Ht&&this.data!=="isPause")&&Se!==A&&(j=!0,Se>Ht&&(lt="onReverseComplete")),this._rawPrevTime=Ft=!k||A||Se===A?A:Ht);else if(1e-7>A)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(Pt!==0||Ae===0&&Se>0)&&(lt="onReverseComplete",q=this._reversed),0>A&&(this._active=!1,Ae===0&&(this._initted||!this.vars.lazy||j)&&(Se>=0&&(Se!==Ht||this.data!=="isPause")&&(j=!0),this._rawPrevTime=Ft=!k||A||Se===A?A:Ht)),(!this._initted||this._startAt&&this._startAt.progress())&&(j=!0);else if(this._totalTime=this._time=A,this._easeType){var te=A/Ae,Pe=this._easeType,pi=this._easePower;(Pe===1||Pe===3&&te>=.5)&&(te=1-te),Pe===3&&(te*=2),pi===1?te*=te:pi===2?te*=te*te:pi===3?te*=te*te*te:pi===4&&(te*=te*te*te*te),Pe===1?this.ratio=1-te:Pe===2?this.ratio=te:.5>A/Ae?this.ratio=te/2:this.ratio=1-te/2}else this.ratio=this._ease.getRatio(A/Ae);if(this._time!==Pt||j){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!j&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=Pt,this._rawPrevTime=Se,Ut.push(this),void(this._lazy=[A,k]);this._time&&!q?this.ratio=this._ease.getRatio(this._time/Ae):q&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(this._time===0?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==Pt&&A>=0&&(this._active=!0),Pt===0&&(this._startAt&&(A>=0?this._startAt.render(A,!0,j):lt||(lt="_dummyGS")),this.vars.onStart&&(this._time!==0||Ae===0)&&(k||this._callback("onStart"))),Lt=this._firstPT;Lt;)Lt.f?Lt.t[Lt.p](Lt.c*this.ratio+Lt.s):Lt.t[Lt.p]=Lt.c*this.ratio+Lt.s,Lt=Lt._next;this._onUpdate&&(0>A&&this._startAt&&A!==-1e-4&&this._startAt.render(A,!0,j),k||(this._time!==Pt||q||j)&&this._callback("onUpdate")),lt&&(!this._gc||j)&&(0>A&&this._startAt&&!this._onUpdate&&A!==-1e-4&&this._startAt.render(A,!0,j),q&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!k&&this.vars[lt]&&this._callback(lt),Ae===0&&this._rawPrevTime===Ht&&Ft!==Ht&&(this._rawPrevTime=0))}},nt._kill=function(A,k,j){if(A==="all"&&(A=null),A==null&&(k==null||k===this.target))return this._lazy=!1,this._enabled(!1,!1);k=typeof k!="string"?k||this._targets||this.target:ie.selector(k)||k;var q,lt,Lt,Ft,Pt,Ae,Se,te,Pe,pi=j&&this._time&&j._startTime===this._startTime&&this._timeline===j._timeline,Mi=this._firstPT;if((Z(k)||ze(k))&&typeof k[0]!="number")for(q=k.length;--q>-1;)this._kill(A,k[q],j)&&(Ae=!0);else{if(this._targets){for(q=this._targets.length;--q>-1;)if(k===this._targets[q]){Pt=this._propLookup[q]||{},this._overwrittenProps=this._overwrittenProps||[],lt=this._overwrittenProps[q]=A?this._overwrittenProps[q]||{}:"all";break}}else{if(k!==this.target)return!1;Pt=this._propLookup,lt=this._overwrittenProps=A?this._overwrittenProps||{}:"all"}if(Pt){if(Se=A||Pt,te=A!==lt&<!=="all"&&A!==Pt&&(typeof A!="object"||!A._tempKill),j&&(ie.onOverwrite||this.vars.onOverwrite)){for(Lt in Se)Pt[Lt]&&(Pe||(Pe=[]),Pe.push(Lt));if((Pe||!A)&&!wn(this,j,k,Pe))return!1}for(Lt in Se)(Ft=Pt[Lt])&&(pi&&(Ft.f?Ft.t[Ft.p](Ft.s):Ft.t[Ft.p]=Ft.s,Ae=!0),Ft.pg&&Ft.t._kill(Se)&&(Ae=!0),Ft.pg&&Ft.t._overwriteProps.length!==0||(Ft._prev?Ft._prev._next=Ft._next:Ft===this._firstPT&&(this._firstPT=Ft._next),Ft._next&&(Ft._next._prev=Ft._prev),Ft._next=Ft._prev=null),delete Pt[Lt]),te&&(lt[Lt]=1);!this._firstPT&&this._initted&&Mi&&this._enabled(!1,!1)}}return Ae},nt.invalidate=function(){return this._notifyPluginsOfEnabled&&ie._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],se.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-Ht,this.render(Math.min(0,-this._delay))),this},nt._enabled=function(A,k){if(bt||Tt.wake(),A&&this._gc){var j,q=this._targets;if(q)for(j=q.length;--j>-1;)this._siblings[j]=Je(q[j],this,!0);else this._siblings=Je(this.target,this,!0)}return se.prototype._enabled.call(this,A,k),this._notifyPluginsOfEnabled&&this._firstPT?ie._onPluginEvent(A?"_onEnable":"_onDisable",this):!1},ie.to=function(A,k,j){return new ie(A,k,j)},ie.from=function(A,k,j){return j.runBackwards=!0,j.immediateRender=j.immediateRender!=0,new ie(A,k,j)},ie.fromTo=function(A,k,j,q){return q.startAt=j,q.immediateRender=q.immediateRender!=0&&j.immediateRender!=0,new ie(A,k,q)},ie.delayedCall=function(A,k,j,q,lt){return new ie(k,0,{delay:A,onComplete:k,onCompleteParams:j,callbackScope:q,onReverseComplete:k,onReverseCompleteParams:j,immediateRender:!1,lazy:!1,useFrames:lt,overwrite:0})},ie.set=function(A,k){return new ie(A,0,k)},ie.getTweensOf=function(A,k){if(A==null)return[];A=typeof A!="string"?A:ie.selector(A)||A;var j,q,lt,Lt;if((Z(A)||ze(A))&&typeof A[0]!="number"){for(j=A.length,q=[];--j>-1;)q=q.concat(ie.getTweensOf(A[j],k));for(j=q.length;--j>-1;)for(Lt=q[j],lt=j;--lt>-1;)Lt===q[lt]&&q.splice(j,1)}else if(A._gsTweenID)for(q=Je(A).concat(),j=q.length;--j>-1;)(q[j]._gc||k&&!q[j].isActive())&&q.splice(j,1);return q||[]},ie.killTweensOf=ie.killDelayedCallsTo=function(A,k,j){typeof k=="object"&&(j=k,k=!1);for(var q=ie.getTweensOf(A,k),lt=q.length;--lt>-1;)q[lt]._kill(j,A)};var Bi=E("plugins.TweenPlugin",function(A,k){this._overwriteProps=(A||"").split(","),this._propName=this._overwriteProps[0],this._priority=k||0,this._super=Bi.prototype},!0);if(nt=Bi.prototype,Bi.version="1.19.0",Bi.API=2,nt._firstPT=null,nt._addTween=Pi,nt.setRatio=Zi,nt._kill=function(A){var k,j=this._overwriteProps,q=this._firstPT;if(A[this._propName]!=null)this._overwriteProps=[];else for(k=j.length;--k>-1;)A[j[k]]!=null&&j.splice(k,1);for(;q;)A[q.n]!=null&&(q._next&&(q._next._prev=q._prev),q._prev?(q._prev._next=q._next,q._prev=null):this._firstPT===q&&(this._firstPT=q._next)),q=q._next;return!1},nt._mod=nt._roundProps=function(A){for(var k,j=this._firstPT;j;)k=A[this._propName]||j.n!=null&&A[j.n.split(this._propName+"_").join("")],k&&typeof k=="function"&&(j.f===2?j.t._applyPT.m=k:j.m=k),j=j._next},ie._onPluginEvent=function(A,k){var j,q,lt,Lt,Ft,Pt=k._firstPT;if(A==="_onInitAllProps"){for(;Pt;){for(Ft=Pt._next,q=lt;q&&q.pr>Pt.pr;)q=q._next;(Pt._prev=q?q._prev:Lt)?Pt._prev._next=Pt:lt=Pt,(Pt._next=q)?q._prev=Pt:Lt=Pt,Pt=Ft}Pt=k._firstPT=lt}for(;Pt;)Pt.pg&&typeof Pt.t[A]=="function"&&Pt.t[A]()&&(j=!0),Pt=Pt._next;return j},Bi.activate=function(A){for(var k=A.length;--k>-1;)A[k].API===Bi.API&&(ni[new A[k]()._propName]=A[k]);return!0},B.plugin=function(A){if(!(A&&A.propName&&A.init&&A.API))throw"illegal plugin definition.";var k,j=A.propName,q=A.priority||0,lt=A.overwriteProps,Lt={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},Ft=E("plugins."+j.charAt(0).toUpperCase()+j.substr(1)+"Plugin",function(){Bi.call(this,j,q),this._overwriteProps=lt||[]},A.global===!0),Pt=Ft.prototype=new Bi(j);Pt.constructor=Ft,Ft.API=A.API;for(k in Lt)typeof A[k]=="function"&&(Pt[Lt[k]]=A[k]);return Ft.version=A.version,Bi.activate([Ft]),Ft},Mt=g._gsQueue){for(qt=0;qt<Mt.length;qt++)Mt[qt]();for(nt in _)_[nt].func||g.console.log("GSAP encountered missing dependency: "+nt)}bt=!1}(typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window,"TweenMax");const qu={class:"modal-background"},Yu=["innerHTML"],Zu={name:"MapModali"},Fh=ke.defineComponent({...Zu,props:{},setup(g,{expose:ht}){const M=ke.ref(""),_t=ke.ref(""),mt=Mt=>{_t.value=Mt,M.value="five"},S=()=>{M.value=M.value+" out"};return ke.onMounted(()=>{}),ht({text:_t,show:mt,hide:S}),(Mt,qt)=>(ke.openBlock(),ke.createElementBlock("div",{id:"modal-container",class:ke.normalizeClass(M.value),onClick:S},[ke.createElementVNode("div",qu,[ke.createElementVNode("div",{class:"modal",onClick:qt[0]||(qt[0]=nt=>{nt.stopPropagation()})},[ke.createElementVNode("p",{style:{"white-space":"pre-line","line-height":"1",margin:"0",color:"#fff"},innerHTML:_t.value},null,8,Yu)])])],2))}}),Ym="",Ju={class:"bim_background_plate"},$u={class:"content"},Qu=ke.createElementVNode("canvas",{class:"landscape"},null,-1),Ku={class:"content__title"},tc=ke.createElementVNode("div",{class:"overlay"},null,-1),ec={name:"BimBackgroundPlate"},Gh=ke.defineComponent({...ec,setup(g){const ht=()=>{let mt=`
|
|
14
14
|
vec3 mod289(vec3 x)
|
|
15
15
|
{
|
|
16
16
|
return x - floor(x * (1.0 / 289.0)) * 289.0;
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
fogDepth = -mvPosition.z;
|
|
226
226
|
|
|
227
227
|
}
|
|
228
|
-
`,
|
|
228
|
+
`,S=`
|
|
229
229
|
uniform float time;
|
|
230
230
|
uniform vec3 color;
|
|
231
231
|
uniform sampler2D pallete;
|
|
@@ -248,30 +248,30 @@
|
|
|
248
248
|
float fogFactor = smoothstep( fogNear, fogFar, fogDepth );
|
|
249
249
|
gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
|
|
250
250
|
#endif
|
|
251
|
-
}`;var mt=document.querySelector(".landscape"),Ct=window.innerWidth,Y=window.innerHeight,ht,wt,ct,Pt,Ot={x:0,y:0,xDamped:0,yDamped:0},xt=typeof window.orientation<"u";Q();function Q(){H(),m(),f(),b(),xt?window.addEventListener("touchmove",G,{passive:!1}):window.addEventListener("mousemove",G),window.addEventListener("resize",M),M()}function H(){ht=new THREE.Scene;var st=new THREE.Color(3355443);ht.background=st,ht.fog=new THREE.Fog(st,0,400),C(),ct=new THREE.PerspectiveCamera(60,Ct/Y,.1,1e4),ct.position.y=8,ct.position.z=4;let it=new THREE.AmbientLight(16777215,1);ht.add(it),wt=new THREE.WebGLRenderer({canvas:mt,antialias:!0}),wt.setPixelRatio=devicePixelRatio,wt.setSize(Ct,Y)}function m(){var st=new THREE.PlaneBufferGeometry(100,400,400,400),it={time:{type:"f",value:0},scroll:{type:"f",value:0},distortCenter:{type:"f",value:.1},roadWidth:{type:"f",value:.5},pallete:{type:"t",value:null},speed:{type:"f",value:3},maxHeight:{type:"f",value:10},color:new THREE.Color(1,1,1)},Lt=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.merge([THREE.ShaderLib.basic.uniforms,it]),vertexShader:at,fragmentShader:x,wireframe:!1,fog:!0});Pt=new THREE.Mesh(st,Lt),Pt.position.z=-180,Pt.rotation.x=-Math.PI/2,ht.add(Pt)}function f(){new THREE.TextureLoader().load("",function(st){Pt.material.uniforms.pallete.value=st,Pt.material.needsUpdate=!0})}function C(){C=new THREE.Sky,C.scale.setScalar(45e4),C.material.uniforms.turbidity.value=13,C.material.uniforms.rayleigh.value=1.2,C.material.uniforms.luminance.value=1,C.material.uniforms.mieCoefficient.value=.1,C.material.uniforms.mieDirectionalG.value=.58,ht.add(C);let st=new THREE.Mesh(new THREE.SphereBufferGeometry(2e4,16,8),new THREE.MeshBasicMaterial({color:16777215}));st.visible=!1,ht.add(st);var it=Math.PI*-.002,Lt=2*Math.PI*-.25;st.position.x=4e5*Math.cos(Lt),st.position.y=4e5*Math.sin(Lt)*Math.sin(it),st.position.z=4e5*Math.sin(Lt)*Math.cos(it),C.material.uniforms.sunPosition.value.copy(st.position)}function M(){Ct=window.innerWidth,Y=window.innerHeight,ct.aspect=Ct/Y,ct.updateProjectionMatrix(),wt.setSize(Ct,Y)}function G(st){st.preventDefault();var it,Lt;st.type=="mousemove"?(it=st.clientX,Lt=st.clientY):(it=st.changedTouches[0].clientX,Lt=st.changedTouches[0].clientY),Ot.x=it,Ot.y=Lt}function b(){requestAnimationFrame(b),Ot.xDamped=q(Ot.xDamped,Ot.x,.1),Ot.yDamped=q(Ot.yDamped,Ot.y,.1);var st=performance.now()*.001;Pt.material.uniforms.time.value=st,Pt.material.uniforms.scroll.value=st+F(Ot.yDamped,0,Y,0,4),Pt.material.uniforms.distortCenter.value=Math.sin(st)*.1,Pt.material.uniforms.roadWidth.value=F(Ot.xDamped,0,Ct,1,4.5),ct.position.y=F(Ot.yDamped,0,Y,4,11),wt.render(ht,ct)}function F(st,it,Lt,bt,Gt){return bt+(Gt-bt)*((st-it)/(Lt-it))}function q(st,it,Lt){return(1-Lt)*st+Lt*it}},Z=()=>{const at=document.querySelector(".overlay"),x=document.querySelector(".content__title");charming(x);const mt=Array.from(x.querySelectorAll("span"));TweenMax.to(at,2,{ease:Quad.easeOut,opacity:0}),TweenMax.set(mt,{opacity:0}),TweenMax.staggerTo(mt,1.5,{ease:Expo.easeOut,startAt:{rotationX:-100,z:-1e3},opacity:1,rotationX:0,z:0},.1)},ft=()=>{pt(),Z()};return Ee.onMounted(()=>{ft()}),(at,x)=>(Ee.openBlock(),Ee.createElementBlock("div",Wa,[Ee.createElementVNode("div",Xa,[qa,Ee.createElementVNode("h2",Ya,[Ee.renderSlot(at.$slots,"default")])]),Za]))}}),Eh="";(function(p,pt){typeof Ii=="object"&&typeof module<"u"?pt(Ii):typeof define=="function"&&define.amd?define(["exports"],pt):pt(p.THREE={})})(window,function(p){function pt(){}function Z(t,e){this.x=t||0,this.y=e||0}function ft(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function at(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._w=n!==void 0?n:1}function x(t,e,i){this.x=t||0,this.y=e||0,this.z=i||0}function mt(){this.elements=[1,0,0,0,1,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function Ct(t,e,i,n,r,o,s,a,h,l){Object.defineProperty(this,"id",{value:oh++}),this.uuid=Se.generateUUID(),this.name="",this.image=t!==void 0?t:Ct.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=e!==void 0?e:Ct.DEFAULT_MAPPING,this.wrapS=i!==void 0?i:1001,this.wrapT=n!==void 0?n:1001,this.magFilter=r!==void 0?r:1006,this.minFilter=o!==void 0?o:1008,this.anisotropy=h!==void 0?h:1,this.format=s!==void 0?s:1023,this.type=a!==void 0?a:1009,this.offset=new Z(0,0),this.repeat=new Z(1,1),this.center=new Z(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new mt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=l!==void 0?l:3e3,this.version=0,this.onUpdate=null}function Y(t,e,i,n){this.x=t||0,this.y=e||0,this.z=i||0,this.w=n!==void 0?n:1}function ht(t,e,i){this.width=t,this.height=e,this.scissor=new Y(0,0,t,e),this.scissorTest=!1,this.viewport=new Y(0,0,t,e),i=i||{},i.minFilter===void 0&&(i.minFilter=1006),this.texture=new Ct(void 0,void 0,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!0,this.depthBuffer=i.depthBuffer!==void 0?i.depthBuffer:!0,this.stencilBuffer=i.stencilBuffer!==void 0?i.stencilBuffer:!0,this.depthTexture=i.depthTexture!==void 0?i.depthTexture:null}function wt(t,e,i){ht.call(this,t,e,i),this.activeMipMapLevel=this.activeCubeFace=0}function ct(t,e,i,n,r,o,s,a,h,l,c,u){Ct.call(this,null,o,s,a,h,l,n,r,c,u),this.image={data:t,width:e,height:i},this.magFilter=h!==void 0?h:1003,this.minFilter=l!==void 0?l:1003,this.flipY=this.generateMipmaps=!1,this.unpackAlignment=1}function Pt(t,e){this.min=t!==void 0?t:new x(1/0,1/0,1/0),this.max=e!==void 0?e:new x(-1/0,-1/0,-1/0)}function Ot(t,e){this.center=t!==void 0?t:new x,this.radius=e!==void 0?e:0}function xt(t,e){this.normal=t!==void 0?t:new x(1,0,0),this.constant=e!==void 0?e:0}function Q(t,e,i,n,r,o){this.planes=[t!==void 0?t:new xt,e!==void 0?e:new xt,i!==void 0?i:new xt,n!==void 0?n:new xt,r!==void 0?r:new xt,o!==void 0?o:new xt]}function H(t,e,i){return e===void 0&&i===void 0?this.set(t):this.setRGB(t,e,i)}function m(){function t(r,o){i!==!1&&(n(r,o),e.requestAnimationFrame(t))}var e=null,i=!1,n=null;return{start:function(){i!==!0&&n!==null&&(e.requestAnimationFrame(t),i=!0)},stop:function(){i=!1},setAnimationLoop:function(r){n=r},setContext:function(r){e=r}}}function f(t){function e(n,r){var o=n.array,s=n.dynamic?35048:35044,a=t.createBuffer();return t.bindBuffer(r,a),t.bufferData(r,o,s),n.onUploadCallback(),r=5126,o instanceof Float32Array?r=5126:o instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):o instanceof Uint16Array?r=5123:o instanceof Int16Array?r=5122:o instanceof Uint32Array?r=5125:o instanceof Int32Array?r=5124:o instanceof Int8Array?r=5120:o instanceof Uint8Array&&(r=5121),{buffer:a,type:r,bytesPerElement:o.BYTES_PER_ELEMENT,version:n.version}}var i=new WeakMap;return{get:function(n){return n.isInterleavedBufferAttribute&&(n=n.data),i.get(n)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=i.get(n);r&&(t.deleteBuffer(r.buffer),i.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var o=i.get(n);if(o===void 0)i.set(n,e(n,r));else if(o.version<n.version){var s=n,a=s.array,h=s.updateRange;t.bindBuffer(r,o.buffer),s.dynamic===!1?t.bufferData(r,a,35044):h.count===-1?t.bufferSubData(r,0,a):h.count===0?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,h.offset*a.BYTES_PER_ELEMENT,a.subarray(h.offset,h.offset+h.count)),h.count=-1),o.version=n.version}}}}function C(t,e,i,n,r,o){this.a=t,this.b=e,this.c=i,this.normal=n&&n.isVector3?n:new x,this.vertexNormals=Array.isArray(n)?n:[],this.color=r&&r.isColor?r:new H,this.vertexColors=Array.isArray(r)?r:[],this.materialIndex=o!==void 0?o:0}function M(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._order=n||M.DefaultOrder}function G(){this.mask=1}function b(){Object.defineProperty(this,"id",{value:ah++}),this.uuid=Se.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=b.DefaultUp.clone();var t=new x,e=new M,i=new at,n=new x(1,1,1);e.onChange(function(){i.setFromEuler(e,!1)}),i.onChange(function(){e.setFromQuaternion(i,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new ft},normalMatrix:{value:new mt}}),this.matrix=new ft,this.matrixWorld=new ft,this.matrixAutoUpdate=b.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new G,this.visible=!0,this.receiveShadow=this.castShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function F(){Object.defineProperty(this,"id",{value:hh+=2}),this.uuid=Se.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function q(t,e,i){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=i===!0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function st(t,e,i){q.call(this,new Int8Array(t),e,i)}function it(t,e,i){q.call(this,new Uint8Array(t),e,i)}function Lt(t,e,i){q.call(this,new Uint8ClampedArray(t),e,i)}function bt(t,e,i){q.call(this,new Int16Array(t),e,i)}function Gt(t,e,i){q.call(this,new Uint16Array(t),e,i)}function Vt(t,e,i){q.call(this,new Int32Array(t),e,i)}function ie(t,e,i){q.call(this,new Uint32Array(t),e,i)}function ut(t,e,i){q.call(this,new Float32Array(t),e,i)}function kt(t,e,i){q.call(this,new Float64Array(t),e,i)}function Me(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function gi(t){if(t.length===0)return-1/0;for(var e=t[0],i=1,n=t.length;i<n;++i)t[i]>e&&(e=t[i]);return e}function Rt(){Object.defineProperty(this,"id",{value:lh+=2}),this.uuid=Se.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.drawRange={start:0,count:1/0},this.userData={}}function Fe(t,e,i,n,r,o){F.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:o},this.fromBufferGeometry(new vi(t,e,i,n,r,o)),this.mergeVertices()}function vi(t,e,i,n,r,o){function s(w,S,P,k,N,J,V,ot,T,A,tt){var _t=J/T,vt=V/A,lt=J/2,Ht=V/2,Dt=ot/2;V=T+1;var $t=A+1,Xt=J=0,Qt,re,me=new x;for(re=0;re<$t;re++){var Ae=re*vt-Ht;for(Qt=0;Qt<V;Qt++)me[w]=(Qt*_t-lt)*k,me[S]=Ae*N,me[P]=Dt,l.push(me.x,me.y,me.z),me[w]=0,me[S]=0,me[P]=0<ot?1:-1,c.push(me.x,me.y,me.z),u.push(Qt/T),u.push(1-re/A),J+=1}for(re=0;re<A;re++)for(Qt=0;Qt<T;Qt++)w=d+Qt+V*(re+1),S=d+(Qt+1)+V*(re+1),P=d+(Qt+1)+V*re,h.push(d+Qt+V*re,w,P),h.push(w,S,P),Xt+=6;a.addGroup(g,Xt,tt),g+=Xt,d+=J}Rt.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:o};var a=this;t=t||1,e=e||1,i=i||1,n=Math.floor(n)||1,r=Math.floor(r)||1,o=Math.floor(o)||1;var h=[],l=[],c=[],u=[],d=0,g=0;s("z","y","x",-1,-1,i,e,t,o,r,0),s("z","y","x",1,-1,i,e,-t,o,r,1),s("x","z","y",1,1,t,i,e,n,o,2),s("x","z","y",1,-1,t,i,-e,n,o,3),s("x","y","z",1,-1,t,e,i,n,r,4),s("x","y","z",-1,-1,t,e,-i,n,r,5),this.setIndex(h),this.addAttribute("position",new ut(l,3)),this.addAttribute("normal",new ut(c,3)),this.addAttribute("uv",new ut(u,2))}function Ti(t,e,i,n){F.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new oi(t,e,i,n)),this.mergeVertices()}function oi(t,e,i,n){Rt.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},t=t||1,e=e||1;var r=t/2,o=e/2;i=Math.floor(i)||1,n=Math.floor(n)||1;var s=i+1,a=n+1,h=t/i,l=e/n,c=[],u=[],d=[],g=[];for(t=0;t<a;t++){var w=t*l-o;for(e=0;e<s;e++)u.push(e*h-r,-w,0),d.push(0,0,1),g.push(e/i),g.push(1-t/n)}for(t=0;t<n;t++)for(e=0;e<i;e++)r=e+s*(t+1),o=e+1+s*(t+1),a=e+1+s*t,c.push(e+s*t,r,a),c.push(r,o,a);this.setIndex(c),this.addAttribute("position",new ut(u,3)),this.addAttribute("normal",new ut(d,3)),this.addAttribute("uv",new ut(g,2))}function fe(){Object.defineProperty(this,"id",{value:ch++}),this.uuid=Se.generateUUID(),this.name="",this.type="Material",this.lights=this.fog=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=0,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null,this.depthFunc=3,this.depthWrite=this.depthTest=!0,this.clippingPlanes=null,this.clipShadows=this.clipIntersection=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetUnits=this.polygonOffsetFactor=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.userData={},this.needsUpdate=!0}function Je(t){fe.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=`void main() {
|
|
251
|
+
}`;var Mt=document.querySelector(".landscape"),qt=window.innerWidth,nt=window.innerHeight,Tt,bt,gt,Nt,Ht={x:0,y:0,xDamped:0,yDamped:0},Ct=typeof window.orientation<"u";st();function st(){Z(),_(),y(),z(),Ct?window.addEventListener("touchmove",Y,{passive:!1}):window.addEventListener("mousemove",Y),window.addEventListener("resize",E),E()}function Z(){Tt=new THREE.Scene;var yt=new THREE.Color(3355443);Tt.background=yt,Tt.fog=new THREE.Fog(yt,0,400),B(),gt=new THREE.PerspectiveCamera(60,qt/nt,.1,1e4),gt.position.y=8,gt.position.z=4;let ft=new THREE.AmbientLight(16777215,1);Tt.add(ft),bt=new THREE.WebGLRenderer({canvas:Mt,antialias:!0}),bt.setPixelRatio=devicePixelRatio,bt.setSize(qt,nt)}function _(){var yt=new THREE.PlaneBufferGeometry(100,400,400,400),ft={time:{type:"f",value:0},scroll:{type:"f",value:0},distortCenter:{type:"f",value:.1},roadWidth:{type:"f",value:.5},pallete:{type:"t",value:null},speed:{type:"f",value:3},maxHeight:{type:"f",value:10},color:new THREE.Color(1,1,1)},zt=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.merge([THREE.ShaderLib.basic.uniforms,ft]),vertexShader:mt,fragmentShader:S,wireframe:!1,fog:!0});Nt=new THREE.Mesh(yt,zt),Nt.position.z=-180,Nt.rotation.x=-Math.PI/2,Tt.add(Nt)}function y(){new THREE.TextureLoader().load("",function(yt){Nt.material.uniforms.pallete.value=yt,Nt.material.needsUpdate=!0})}function B(){B=new THREE.Sky,B.scale.setScalar(45e4),B.material.uniforms.turbidity.value=13,B.material.uniforms.rayleigh.value=1.2,B.material.uniforms.luminance.value=1,B.material.uniforms.mieCoefficient.value=.1,B.material.uniforms.mieDirectionalG.value=.58,Tt.add(B);let yt=new THREE.Mesh(new THREE.SphereBufferGeometry(2e4,16,8),new THREE.MeshBasicMaterial({color:16777215}));yt.visible=!1,Tt.add(yt);var ft=Math.PI*-.002,zt=2*Math.PI*-.25;yt.position.x=4e5*Math.cos(zt),yt.position.y=4e5*Math.sin(zt)*Math.sin(ft),yt.position.z=4e5*Math.sin(zt)*Math.cos(ft),B.material.uniforms.sunPosition.value.copy(yt.position)}function E(){qt=window.innerWidth,nt=window.innerHeight,gt.aspect=qt/nt,gt.updateProjectionMatrix(),bt.setSize(qt,nt)}function Y(yt){yt.preventDefault();var ft,zt;yt.type=="mousemove"?(ft=yt.clientX,zt=yt.clientY):(ft=yt.changedTouches[0].clientX,zt=yt.changedTouches[0].clientY),Ht.x=ft,Ht.y=zt}function z(){requestAnimationFrame(z),Ht.xDamped=et(Ht.xDamped,Ht.x,.1),Ht.yDamped=et(Ht.yDamped,Ht.y,.1);var yt=performance.now()*.001;Nt.material.uniforms.time.value=yt,Nt.material.uniforms.scroll.value=yt+X(Ht.yDamped,0,nt,0,4),Nt.material.uniforms.distortCenter.value=Math.sin(yt)*.1,Nt.material.uniforms.roadWidth.value=X(Ht.xDamped,0,qt,1,4.5),gt.position.y=X(Ht.yDamped,0,nt,4,11),bt.render(Tt,gt)}function X(yt,ft,zt,Yt,re){return Yt+(re-Yt)*((yt-ft)/(zt-ft))}function et(yt,ft,zt){return(1-zt)*yt+zt*ft}},M=()=>{const mt=document.querySelector(".overlay"),S=document.querySelector(".content__title");charming(S);const Mt=Array.from(S.querySelectorAll("span"));TweenMax.to(mt,2,{ease:Quad.easeOut,opacity:0}),TweenMax.set(Mt,{opacity:0}),TweenMax.staggerTo(Mt,1.5,{ease:Expo.easeOut,startAt:{rotationX:-100,z:-1e3},opacity:1,rotationX:0,z:0},.1)},_t=()=>{ht(),M()};return ke.onMounted(()=>{_t()}),(mt,S)=>(ke.openBlock(),ke.createElementBlock("div",Ju,[ke.createElementVNode("div",$u,[Qu,ke.createElementVNode("h2",Ku,[ke.renderSlot(mt.$slots,"default")])]),tc]))}}),Zm="";(function(g,ht){typeof dn=="object"&&typeof module<"u"?ht(dn):typeof define=="function"&&define.amd?define(["exports"],ht):ht(g.THREE={})})(window,function(g){function ht(){}function M(t,e){this.x=t||0,this.y=e||0}function _t(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function mt(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._w=n!==void 0?n:1}function S(t,e,i){this.x=t||0,this.y=e||0,this.z=i||0}function Mt(){this.elements=[1,0,0,0,1,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function qt(t,e,i,n,o,s,l,h,c,p){Object.defineProperty(this,"id",{value:$o++}),this.uuid=$e.generateUUID(),this.name="",this.image=t!==void 0?t:qt.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=e!==void 0?e:qt.DEFAULT_MAPPING,this.wrapS=i!==void 0?i:1001,this.wrapT=n!==void 0?n:1001,this.magFilter=o!==void 0?o:1006,this.minFilter=s!==void 0?s:1008,this.anisotropy=c!==void 0?c:1,this.format=l!==void 0?l:1023,this.type=h!==void 0?h:1009,this.offset=new M(0,0),this.repeat=new M(1,1),this.center=new M(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Mt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=p!==void 0?p:3e3,this.version=0,this.onUpdate=null}function nt(t,e,i,n){this.x=t||0,this.y=e||0,this.z=i||0,this.w=n!==void 0?n:1}function Tt(t,e,i){this.width=t,this.height=e,this.scissor=new nt(0,0,t,e),this.scissorTest=!1,this.viewport=new nt(0,0,t,e),i=i||{},i.minFilter===void 0&&(i.minFilter=1006),this.texture=new qt(void 0,void 0,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!0,this.depthBuffer=i.depthBuffer!==void 0?i.depthBuffer:!0,this.stencilBuffer=i.stencilBuffer!==void 0?i.stencilBuffer:!0,this.depthTexture=i.depthTexture!==void 0?i.depthTexture:null}function bt(t,e,i){Tt.call(this,t,e,i),this.activeMipMapLevel=this.activeCubeFace=0}function gt(t,e,i,n,o,s,l,h,c,p,f,d){qt.call(this,null,s,l,h,c,p,n,o,f,d),this.image={data:t,width:e,height:i},this.magFilter=c!==void 0?c:1003,this.minFilter=p!==void 0?p:1003,this.flipY=this.generateMipmaps=!1,this.unpackAlignment=1}function Nt(t,e){this.min=t!==void 0?t:new S(1/0,1/0,1/0),this.max=e!==void 0?e:new S(-1/0,-1/0,-1/0)}function Ht(t,e){this.center=t!==void 0?t:new S,this.radius=e!==void 0?e:0}function Ct(t,e){this.normal=t!==void 0?t:new S(1,0,0),this.constant=e!==void 0?e:0}function st(t,e,i,n,o,s){this.planes=[t!==void 0?t:new Ct,e!==void 0?e:new Ct,i!==void 0?i:new Ct,n!==void 0?n:new Ct,o!==void 0?o:new Ct,s!==void 0?s:new Ct]}function Z(t,e,i){return e===void 0&&i===void 0?this.set(t):this.setRGB(t,e,i)}function _(){function t(o,s){i!==!1&&(n(o,s),e.requestAnimationFrame(t))}var e=null,i=!1,n=null;return{start:function(){i!==!0&&n!==null&&(e.requestAnimationFrame(t),i=!0)},stop:function(){i=!1},setAnimationLoop:function(o){n=o},setContext:function(o){e=o}}}function y(t){function e(n,o){var s=n.array,l=n.dynamic?35048:35044,h=t.createBuffer();return t.bindBuffer(o,h),t.bufferData(o,s,l),n.onUploadCallback(),o=5126,s instanceof Float32Array?o=5126:s instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):s instanceof Uint16Array?o=5123:s instanceof Int16Array?o=5122:s instanceof Uint32Array?o=5125:s instanceof Int32Array?o=5124:s instanceof Int8Array?o=5120:s instanceof Uint8Array&&(o=5121),{buffer:h,type:o,bytesPerElement:s.BYTES_PER_ELEMENT,version:n.version}}var i=new WeakMap;return{get:function(n){return n.isInterleavedBufferAttribute&&(n=n.data),i.get(n)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var o=i.get(n);o&&(t.deleteBuffer(o.buffer),i.delete(n))},update:function(n,o){n.isInterleavedBufferAttribute&&(n=n.data);var s=i.get(n);if(s===void 0)i.set(n,e(n,o));else if(s.version<n.version){var l=n,h=l.array,c=l.updateRange;t.bindBuffer(o,s.buffer),l.dynamic===!1?t.bufferData(o,h,35044):c.count===-1?t.bufferSubData(o,0,h):c.count===0?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(o,c.offset*h.BYTES_PER_ELEMENT,h.subarray(c.offset,c.offset+c.count)),c.count=-1),s.version=n.version}}}}function B(t,e,i,n,o,s){this.a=t,this.b=e,this.c=i,this.normal=n&&n.isVector3?n:new S,this.vertexNormals=Array.isArray(n)?n:[],this.color=o&&o.isColor?o:new Z,this.vertexColors=Array.isArray(o)?o:[],this.materialIndex=s!==void 0?s:0}function E(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._order=n||E.DefaultOrder}function Y(){this.mask=1}function z(){Object.defineProperty(this,"id",{value:hh++}),this.uuid=$e.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=z.DefaultUp.clone();var t=new S,e=new E,i=new mt,n=new S(1,1,1);e.onChange(function(){i.setFromEuler(e,!1)}),i.onChange(function(){e.setFromQuaternion(i,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new _t},normalMatrix:{value:new Mt}}),this.matrix=new _t,this.matrixWorld=new _t,this.matrixAutoUpdate=z.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Y,this.visible=!0,this.receiveShadow=this.castShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function X(){Object.defineProperty(this,"id",{value:uh+=2}),this.uuid=$e.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function et(t,e,i){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=i===!0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function yt(t,e,i){et.call(this,new Int8Array(t),e,i)}function ft(t,e,i){et.call(this,new Uint8Array(t),e,i)}function zt(t,e,i){et.call(this,new Uint8ClampedArray(t),e,i)}function Yt(t,e,i){et.call(this,new Int16Array(t),e,i)}function re(t,e,i){et.call(this,new Uint16Array(t),e,i)}function se(t,e,i){et.call(this,new Int32Array(t),e,i)}function we(t,e,i){et.call(this,new Uint32Array(t),e,i)}function Et(t,e,i){et.call(this,new Float32Array(t),e,i)}function ie(t,e,i){et.call(this,new Float64Array(t),e,i)}function ze(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function rn(t){if(t.length===0)return-1/0;for(var e=t[0],i=1,n=t.length;i<n;++i)t[i]>e&&(e=t[i]);return e}function Ut(){Object.defineProperty(this,"id",{value:ch+=2}),this.uuid=$e.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.drawRange={start:0,count:1/0},this.userData={}}function Qe(t,e,i,n,o,s){X.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:o,depthSegments:s},this.fromBufferGeometry(new Ii(t,e,i,n,o,s)),this.mergeVertices()}function Ii(t,e,i,n,o,s){function l(P,R,I,$,W,ot,Q,wt,C,D,ct){var Dt=ot/C,Rt=Q/D,St=ot/2,oe=Q/2,$t=wt/2;Q=C+1;var me=D+1,ue=ot=0,Vt,Ee,Be=new S;for(Ee=0;Ee<me;Ee++){var Ze=Ee*Rt-oe;for(Vt=0;Vt<Q;Vt++)Be[P]=(Vt*Dt-St)*$,Be[R]=Ze*W,Be[I]=$t,p.push(Be.x,Be.y,Be.z),Be[P]=0,Be[R]=0,Be[I]=0<wt?1:-1,f.push(Be.x,Be.y,Be.z),d.push(Vt/C),d.push(1-Ee/D),ot+=1}for(Ee=0;Ee<D;Ee++)for(Vt=0;Vt<C;Vt++)P=v+Vt+Q*(Ee+1),R=v+(Vt+1)+Q*(Ee+1),I=v+(Vt+1)+Q*Ee,c.push(v+Vt+Q*Ee,P,I),c.push(P,R,I),ue+=6;h.addGroup(x,ue,ct),x+=ue,v+=ot}Ut.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:o,depthSegments:s};var h=this;t=t||1,e=e||1,i=i||1,n=Math.floor(n)||1,o=Math.floor(o)||1,s=Math.floor(s)||1;var c=[],p=[],f=[],d=[],v=0,x=0;l("z","y","x",-1,-1,i,e,t,s,o,0),l("z","y","x",1,-1,i,e,-t,s,o,1),l("x","z","y",1,1,t,i,e,n,s,2),l("x","z","y",1,-1,t,i,-e,n,s,3),l("x","y","z",1,-1,t,e,i,n,o,4),l("x","y","z",-1,-1,t,e,-i,n,o,5),this.setIndex(c),this.addAttribute("position",new Et(p,3)),this.addAttribute("normal",new Et(f,3)),this.addAttribute("uv",new Et(d,2))}function Pn(t,e,i,n){X.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new Zi(t,e,i,n)),this.mergeVertices()}function Zi(t,e,i,n){Ut.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},t=t||1,e=e||1;var o=t/2,s=e/2;i=Math.floor(i)||1,n=Math.floor(n)||1;var l=i+1,h=n+1,c=t/i,p=e/n,f=[],d=[],v=[],x=[];for(t=0;t<h;t++){var P=t*p-s;for(e=0;e<l;e++)d.push(e*c-o,-P,0),v.push(0,0,1),x.push(e/i),x.push(1-t/n)}for(t=0;t<n;t++)for(e=0;e<i;e++)o=e+l*(t+1),s=e+1+l*(t+1),h=e+1+l*t,f.push(e+l*t,o,h),f.push(o,s,h);this.setIndex(f),this.addAttribute("position",new Et(d,3)),this.addAttribute("normal",new Et(v,3)),this.addAttribute("uv",new Et(x,2))}function Oe(){Object.defineProperty(this,"id",{value:kl++}),this.uuid=$e.generateUUID(),this.name="",this.type="Material",this.lights=this.fog=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=0,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null,this.depthFunc=3,this.depthWrite=this.depthTest=!0,this.clippingPlanes=null,this.clipShadows=this.clipIntersection=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetUnits=this.polygonOffsetFactor=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.userData={},this.needsUpdate=!0}function Pi(t){Oe.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=`void main() {
|
|
252
252
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
253
253
|
}`,this.fragmentShader=`void main() {
|
|
254
254
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
255
|
-
}`,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,t!==void 0&&(t.attributes!==void 0&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function bi(t,e){this.origin=t!==void 0?t:new x,this.direction=e!==void 0?e:new x}function Ce(t,e,i){this.a=t!==void 0?t:new x,this.b=e!==void 0?e:new x,this.c=i!==void 0?i:new x}function je(t){fe.call(this),this.type="MeshBasicMaterial",this.color=new H(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.lights=this.morphTargets=this.skinning=!1,this.setValues(t)}function Ke(t,e){b.call(this),this.type="Mesh",this.geometry=t!==void 0?t:new Rt,this.material=e!==void 0?e:new je({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function Mn(t,e,i,n){function r(l,c){e.buffers.color.setClear(l.r,l.g,l.b,c,n)}var o=new H(0),s=0,a,h;return{getClearColor:function(){return o},setClearColor:function(l,c){o.set(l),s=c!==void 0?c:1,r(o,s)},getClearAlpha:function(){return s},setClearAlpha:function(l){s=l,r(o,s)},render:function(l,c,u,d){c=c.background,c===null?r(o,s):c&&c.isColor&&(r(c,1),d=!0),(t.autoClear||d)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),c&&(c.isCubeTexture||c.isWebGLRenderTargetCube)?(h===void 0&&(h=new Ke(new vi(1,1,1),new Je({type:"BackgroundCubeMaterial",uniforms:_i.clone(pn.cube.uniforms),vertexShader:pn.cube.vertexShader,fragmentShader:pn.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1})),h.geometry.removeAttribute("normal"),h.geometry.removeAttribute("uv"),h.onBeforeRender=function(g,w,S){this.matrixWorld.copyPosition(S.matrixWorld)},i.update(h)),h.material.uniforms.tCube.value=c.isWebGLRenderTargetCube?c.texture:c,h.material.uniforms.tFlip.value=c.isWebGLRenderTargetCube?1:-1,l.push(h,h.geometry,h.material,0,null)):c&&c.isTexture&&(a===void 0&&(a=new Ke(new oi(2,2),new Je({type:"BackgroundMaterial",uniforms:_i.clone(pn.background.uniforms),vertexShader:pn.background.vertexShader,fragmentShader:pn.background.fragmentShader,side:0,depthTest:!0,depthWrite:!1,fog:!1})),a.geometry.removeAttribute("normal"),i.update(a)),a.material.uniforms.t2D.value=c,c.matrixAutoUpdate===!0&&c.updateMatrix(),a.material.uniforms.uvTransform.value.copy(c.matrix),l.push(a,a.geometry,a.material,0,null))}}}function Rn(t,e,i,n){var r;this.setMode=function(o){r=o},this.render=function(o,s){t.drawArrays(r,o,s),i.update(s,r)},this.renderInstances=function(o,s,a){if(n.isWebGL2)var h=t;else if(h=e.get("ANGLE_instanced_arrays"),h===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}h[n.isWebGL2?"drawArraysInstanced":"drawArraysInstancedANGLE"](r,s,a,o.maxInstancedCount),i.update(a,r,o.maxInstancedCount)}}function Vi(t,e,i){function n(k){if(k==="highp"){if(0<t.getShaderPrecisionFormat(35633,36338).precision&&0<t.getShaderPrecisionFormat(35632,36338).precision)return"highp";k="mediump"}return k==="mediump"&&0<t.getShaderPrecisionFormat(35633,36337).precision&&0<t.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var r,o=typeof WebGL2RenderingContext<"u"&&t instanceof WebGL2RenderingContext,s=i.precision!==void 0?i.precision:"highp",a=n(s);a!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",a,"instead."),s=a),i=i.logarithmicDepthBuffer===!0,a=t.getParameter(34930);var h=t.getParameter(35660),l=t.getParameter(3379),c=t.getParameter(34076),u=t.getParameter(34921),d=t.getParameter(36347),g=t.getParameter(36348),w=t.getParameter(36349),S=0<h,P=o||!!e.get("OES_texture_float");return{isWebGL2:o,getMaxAnisotropy:function(){if(r!==void 0)return r;var k=e.get("EXT_texture_filter_anisotropic");return r=k!==null?t.getParameter(k.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:n,precision:s,logarithmicDepthBuffer:i,maxTextures:a,maxVertexTextures:h,maxTextureSize:l,maxCubemapSize:c,maxAttributes:u,maxVertexUniforms:d,maxVaryings:g,maxFragmentUniforms:w,vertexTextures:S,floatFragmentTextures:P,floatVertexTextures:S&&P}}function Di(){function t(){l.value!==n&&(l.value=n,l.needsUpdate=0<r),i.numPlanes=r,i.numIntersection=0}function e(c,u,d,g){var w=c!==null?c.length:0,S=null;if(w!==0){if(S=l.value,g!==!0||S===null)for(g=d+4*w,u=u.matrixWorldInverse,h.getNormalMatrix(u),(S===null||S.length<g)&&(S=new Float32Array(g)),g=0;g!==w;++g,d+=4)a.copy(c[g]).applyMatrix4(u,h),a.normal.toArray(S,d),S[d+3]=a.constant;l.value=S,l.needsUpdate=!0}return i.numPlanes=w,S}var i=this,n=null,r=0,o=!1,s=!1,a=new xt,h=new mt,l={value:null,needsUpdate:!1};this.uniform=l,this.numIntersection=this.numPlanes=0,this.init=function(c,u,d){var g=c.length!==0||u||r!==0||o;return o=u,n=e(c,d,0),r=c.length,g},this.beginShadows=function(){s=!0,e(null)},this.endShadows=function(){s=!1,t()},this.setState=function(c,u,d,g,w,S){if(!o||c===null||c.length===0||s&&!d)s?e(null):t();else{d=s?0:r;var P=4*d,k=w.clippingState||null;for(l.value=k,k=e(c,g,P,S),c=0;c!==P;++c)k[c]=n[c];w.clippingState=k,this.numIntersection=u?this.numPlanes:0,this.numPlanes+=d}}}function en(t){var e={};return{get:function(i){if(e[i]!==void 0)return e[i];switch(i){case"WEBGL_depth_texture":var n=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=t.getExtension(i)}return n===null&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),e[i]=n}}}function ci(t,e,i){function n(s){var a=s.target;s=r[a.id],s.index!==null&&e.remove(s.index);for(var h in s.attributes)e.remove(s.attributes[h]);a.removeEventListener("dispose",n),delete r[a.id],(h=o[s.id])&&(e.remove(h),delete o[s.id]),i.memory.geometries--}var r={},o={};return{get:function(s,a){var h=r[a.id];return h||(a.addEventListener("dispose",n),a.isBufferGeometry?h=a:a.isGeometry&&(a._bufferGeometry===void 0&&(a._bufferGeometry=new Rt().setFromObject(s)),h=a._bufferGeometry),r[a.id]=h,i.memory.geometries++,h)},update:function(s){var a=s.index,h=s.attributes;a!==null&&e.update(a,34963);for(var l in h)e.update(h[l],34962);s=s.morphAttributes;for(l in s){a=s[l],h=0;for(var c=a.length;h<c;h++)e.update(a[h],34962)}},getWireframeAttribute:function(s){var a=o[s.id];if(a)return a;a=[];var h=s.index,l=s.attributes;if(h!==null){h=h.array,l=0;for(var c=h.length;l<c;l+=3){var u=h[l+0],d=h[l+1],g=h[l+2];a.push(u,d,d,g,g,u)}}else for(h=l.position.array,l=0,c=h.length/3-1;l<c;l+=3)u=l+0,d=l+1,g=l+2,a.push(u,d,d,g,g,u);return a=new(65535<gi(a)?ie:Gt)(a,1),e.update(a,34963),o[s.id]=a}}}function Oe(t,e,i,n){var r,o,s;this.setMode=function(a){r=a},this.setIndex=function(a){o=a.type,s=a.bytesPerElement},this.render=function(a,h){t.drawElements(r,h,o,a*s),i.update(h,r)},this.renderInstances=function(a,h,l){if(n.isWebGL2)var c=t;else if(c=e.get("ANGLE_instanced_arrays"),c===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}c[n.isWebGL2?"drawElementsInstanced":"drawElementsInstancedANGLE"](r,l,o,h*s,a.maxInstancedCount),i.update(l,r,a.maxInstancedCount)}}function Si(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(i,n,r){switch(r=r||1,e.calls++,n){case 4:e.triangles+=i/3*r;break;case 5:case 6:e.triangles+=r*(i-2);break;case 1:e.lines+=i/2*r;break;case 3:e.lines+=r*(i-1);break;case 2:e.lines+=r*i;break;case 0:e.points+=r*i;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function Tn(t,e){return Math.abs(e[1])-Math.abs(t[1])}function nn(t){var e={},i=new Float32Array(8);return{update:function(n,r,o,s){var a=n.morphTargetInfluences,h=a.length;if(n=e[r.id],n===void 0){n=[];for(var l=0;l<h;l++)n[l]=[l,0];e[r.id]=n}var c=o.morphTargets&&r.morphAttributes.position;for(o=o.morphNormals&&r.morphAttributes.normal,l=0;l<h;l++){var u=n[l];u[1]!==0&&(c&&r.removeAttribute("morphTarget"+l),o&&r.removeAttribute("morphNormal"+l))}for(l=0;l<h;l++)u=n[l],u[0]=l,u[1]=a[l];for(n.sort(Tn),l=0;8>l;l++){if((u=n[l])&&(a=u[0],h=u[1])){c&&r.addAttribute("morphTarget"+l,c[a]),o&&r.addAttribute("morphNormal"+l,o[a]),i[l]=h;continue}i[l]=0}s.getUniforms().setValue(t,"morphTargetInfluences",i)}}}function Ri(t,e){var i={};return{update:function(n){var r=e.render.frame,o=n.geometry,s=t.get(n,o);return i[s.id]!==r&&(o.isGeometry&&s.updateFromObject(n),t.update(s),i[s.id]=r),s},dispose:function(){i={}}}}function _(t,e,i,n,r,o,s,a,h,l){t=t!==void 0?t:[],Ct.call(this,t,e!==void 0?e:301,i,n,r,o,s,a,h,l),this.flipY=!1}function D(t,e,i,n){Ct.call(this,null),this.image={data:t,width:e,height:i,depth:n},this.minFilter=this.magFilter=1003,this.flipY=this.generateMipmaps=!1}function B(t,e,i){var n=t[0];if(0>=n||0<n)return t;var r=e*i,o=fa[r];if(o===void 0&&(o=new Float32Array(r),fa[r]=o),e!==0)for(n.toArray(o,0),n=1,r=0;n!==e;++n)r+=i,t[n].toArray(o,r);return o}function U(t,e){if(t.length!==e.length)return!1;for(var i=0,n=t.length;i<n;i++)if(t[i]!==e[i])return!1;return!0}function $(t,e){for(var i=0,n=e.length;i<n;i++)t[i]=e[i]}function gt(t,e){var i=ma[e];i===void 0&&(i=new Int32Array(e),ma[e]=i);for(var n=0;n!==e;++n)i[n]=t.allocTextureUnit();return i}function Tt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1f(this.addr,e),i[0]=e)}function dt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1i(this.addr,e),i[0]=e)}function ae(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),i[0]=e.x,i[1]=e.y):U(i,e)||(t.uniform2fv(this.addr,e),$(i,e))}function se(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y||i[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),i[0]=e.x,i[1]=e.y,i[2]=e.z):e.r!==void 0?(i[0]!==e.r||i[1]!==e.g||i[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),i[0]=e.r,i[1]=e.g,i[2]=e.b):U(i,e)||(t.uniform3fv(this.addr,e),$(i,e))}function Ut(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y||i[2]!==e.z||i[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),i[0]=e.x,i[1]=e.y,i[2]=e.z,i[3]=e.w):U(i,e)||(t.uniform4fv(this.addr,e),$(i,e))}function he(t,e){var i=this.cache,n=e.elements;n===void 0?U(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),$(i,e)):U(i,n)||(ya.set(n),t.uniformMatrix2fv(this.addr,!1,ya),$(i,n))}function ze(t,e){var i=this.cache,n=e.elements;n===void 0?U(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),$(i,e)):U(i,n)||(va.set(n),t.uniformMatrix3fv(this.addr,!1,va),$(i,n))}function Xe(t,e){var i=this.cache,n=e.elements;n===void 0?U(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),$(i,e)):U(i,n)||(ga.set(n),t.uniformMatrix4fv(this.addr,!1,ga),$(i,n))}function Re(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTexture2D(e||pa,r)}function Ve(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTexture3D(e||uh,r)}function gn(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTextureCube(e||da,r)}function Wi(t,e){var i=this.cache;U(i,e)||(t.uniform2iv(this.addr,e),$(i,e))}function si(t,e){var i=this.cache;U(i,e)||(t.uniform3iv(this.addr,e),$(i,e))}function Dr(t,e){var i=this.cache;U(i,e)||(t.uniform4iv(this.addr,e),$(i,e))}function Qe(t){switch(t){case 5126:return Tt;case 35664:return ae;case 35665:return se;case 35666:return Ut;case 35674:return he;case 35675:return ze;case 35676:return Xe;case 35678:case 36198:return Re;case 35679:return Ve;case 35680:return gn;case 5124:case 35670:return dt;case 35667:case 35671:return Wi;case 35668:case 35672:return si;case 35669:case 35673:return Dr}}function Ko(t,e){var i=this.cache;U(i,e)||(t.uniform1fv(this.addr,e),$(i,e))}function rn(t,e){var i=this.cache;U(i,e)||(t.uniform1iv(this.addr,e),$(i,e))}function Mo(t,e){var i=this.cache;e=B(e,this.size,2),U(i,e)||(t.uniform2fv(this.addr,e),this.updateCache(e))}function ui(t,e){var i=this.cache;e=B(e,this.size,3),U(i,e)||(t.uniform3fv(this.addr,e),this.updateCache(e))}function zr(t,e){var i=this.cache;e=B(e,this.size,4),U(i,e)||(t.uniform4fv(this.addr,e),this.updateCache(e))}function Cn(t,e){var i=this.cache;e=B(e,this.size,4),U(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),this.updateCache(e))}function Gi(t,e){var i=this.cache;e=B(e,this.size,9),U(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),this.updateCache(e))}function Kn(t,e){var i=this.cache;e=B(e,this.size,16),U(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),this.updateCache(e))}function ts(t,e,i){var n=this.cache,r=e.length,o=gt(i,r);for(U(n,o)===!1&&(t.uniform1iv(this.addr,o),$(n,o)),t=0;t!==r;++t)i.setTexture2D(e[t]||pa,o[t])}function To(t,e,i){var n=this.cache,r=e.length,o=gt(i,r);for(U(n,o)===!1&&(t.uniform1iv(this.addr,o),$(n,o)),t=0;t!==r;++t)i.setTextureCube(e[t]||da,o[t])}function Sn(t){switch(t){case 5126:return Ko;case 35664:return Mo;case 35665:return ui;case 35666:return zr;case 35674:return Cn;case 35675:return Gi;case 35676:return Kn;case 35678:return ts;case 35680:return To;case 5124:case 35670:return rn;case 35667:case 35671:return Wi;case 35668:case 35672:return si;case 35669:case 35673:return Dr}}function es(t,e,i){this.id=t,this.addr=i,this.cache=[],this.setValue=Qe(e.type)}function tr(t,e,i){this.id=t,this.addr=i,this.cache=[],this.size=e.size,this.setValue=Sn(e.type)}function Nr(t){this.id=t,this.seq=[],this.map={}}function on(t,e,i){this.seq=[],this.map={},this.renderer=i,i=t.getProgramParameter(e,35718);for(var n=0;n<i;++n){var r=t.getActiveUniform(e,n),o=t.getUniformLocation(e,r.name),s=this,a=r.name,h=a.length;for(Cs.lastIndex=0;;){var l=Cs.exec(a),c=Cs.lastIndex,u=l[1],d=l[3];if(l[2]==="]"&&(u|=0),d===void 0||d==="["&&c+2===h){a=s,r=d===void 0?new es(u,r,o):new tr(u,r,o),a.seq.push(r),a.map[r.id]=r;break}else d=s.map[u],d===void 0&&(d=new Nr(u),u=s,s=d,u.seq.push(s),u.map[s.id]=s),s=d}}}function Br(t){t=t.split(`
|
|
255
|
+
}`,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,t!==void 0&&(t.attributes!==void 0&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function In(t,e){this.origin=t!==void 0?t:new S,this.direction=e!==void 0?e:new S}function ni(t,e,i){this.a=t!==void 0?t:new S,this.b=e!==void 0?e:new S,this.c=i!==void 0?i:new S}function ci(t){Oe.call(this),this.type="MeshBasicMaterial",this.color=new Z(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.lights=this.morphTargets=this.skinning=!1,this.setValues(t)}function Fi(t,e){z.call(this),this.type="Mesh",this.geometry=t!==void 0?t:new Ut,this.material=e!==void 0?e:new ci({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function yr(t,e,i,n){function o(p,f){e.buffers.color.setClear(p.r,p.g,p.b,f,n)}var s=new Z(0),l=0,h,c;return{getClearColor:function(){return s},setClearColor:function(p,f){s.set(p),l=f!==void 0?f:1,o(s,l)},getClearAlpha:function(){return l},setClearAlpha:function(p){l=p,o(s,l)},render:function(p,f,d,v){f=f.background,f===null?o(s,l):f&&f.isColor&&(o(f,1),v=!0),(t.autoClear||v)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),f&&(f.isCubeTexture||f.isWebGLRenderTargetCube)?(c===void 0&&(c=new Fi(new Ii(1,1,1),new Pi({type:"BackgroundCubeMaterial",uniforms:_n.clone(kr.cube.uniforms),vertexShader:kr.cube.vertexShader,fragmentShader:kr.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1})),c.geometry.removeAttribute("normal"),c.geometry.removeAttribute("uv"),c.onBeforeRender=function(x,P,R){this.matrixWorld.copyPosition(R.matrixWorld)},i.update(c)),c.material.uniforms.tCube.value=f.isWebGLRenderTargetCube?f.texture:f,c.material.uniforms.tFlip.value=f.isWebGLRenderTargetCube?1:-1,p.push(c,c.geometry,c.material,0,null)):f&&f.isTexture&&(h===void 0&&(h=new Fi(new Zi(2,2),new Pi({type:"BackgroundMaterial",uniforms:_n.clone(kr.background.uniforms),vertexShader:kr.background.vertexShader,fragmentShader:kr.background.fragmentShader,side:0,depthTest:!0,depthWrite:!1,fog:!1})),h.geometry.removeAttribute("normal"),i.update(h)),h.material.uniforms.t2D.value=f,f.matrixAutoUpdate===!0&&f.updateMatrix(),h.material.uniforms.uvTransform.value.copy(f.matrix),p.push(h,h.geometry,h.material,0,null))}}}function Lr(t,e,i,n){var o;this.setMode=function(s){o=s},this.render=function(s,l){t.drawArrays(o,s,l),i.update(l,o)},this.renderInstances=function(s,l,h){if(n.isWebGL2)var c=t;else if(c=e.get("ANGLE_instanced_arrays"),c===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}c[n.isWebGL2?"drawArraysInstanced":"drawArraysInstancedANGLE"](o,l,h,s.maxInstancedCount),i.update(h,o,s.maxInstancedCount)}}function $n(t,e,i){function n($){if($==="highp"){if(0<t.getShaderPrecisionFormat(35633,36338).precision&&0<t.getShaderPrecisionFormat(35632,36338).precision)return"highp";$="mediump"}return $==="mediump"&&0<t.getShaderPrecisionFormat(35633,36337).precision&&0<t.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var o,s=typeof WebGL2RenderingContext<"u"&&t instanceof WebGL2RenderingContext,l=i.precision!==void 0?i.precision:"highp",h=n(l);h!==l&&(console.warn("THREE.WebGLRenderer:",l,"not supported, using",h,"instead."),l=h),i=i.logarithmicDepthBuffer===!0,h=t.getParameter(34930);var c=t.getParameter(35660),p=t.getParameter(3379),f=t.getParameter(34076),d=t.getParameter(34921),v=t.getParameter(36347),x=t.getParameter(36348),P=t.getParameter(36349),R=0<c,I=s||!!e.get("OES_texture_float");return{isWebGL2:s,getMaxAnisotropy:function(){if(o!==void 0)return o;var $=e.get("EXT_texture_filter_anisotropic");return o=$!==null?t.getParameter($.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:n,precision:l,logarithmicDepthBuffer:i,maxTextures:h,maxVertexTextures:c,maxTextureSize:p,maxCubemapSize:f,maxAttributes:d,maxVertexUniforms:v,maxVaryings:x,maxFragmentUniforms:P,vertexTextures:R,floatFragmentTextures:I,floatVertexTextures:R&&I}}function Gi(){function t(){p.value!==n&&(p.value=n,p.needsUpdate=0<o),i.numPlanes=o,i.numIntersection=0}function e(f,d,v,x){var P=f!==null?f.length:0,R=null;if(P!==0){if(R=p.value,x!==!0||R===null)for(x=v+4*P,d=d.matrixWorldInverse,c.getNormalMatrix(d),(R===null||R.length<x)&&(R=new Float32Array(x)),x=0;x!==P;++x,v+=4)h.copy(f[x]).applyMatrix4(d,c),h.normal.toArray(R,v),R[v+3]=h.constant;p.value=R,p.needsUpdate=!0}return i.numPlanes=P,R}var i=this,n=null,o=0,s=!1,l=!1,h=new Ct,c=new Mt,p={value:null,needsUpdate:!1};this.uniform=p,this.numIntersection=this.numPlanes=0,this.init=function(f,d,v){var x=f.length!==0||d||o!==0||s;return s=d,n=e(f,v,0),o=f.length,x},this.beginShadows=function(){l=!0,e(null)},this.endShadows=function(){l=!1,t()},this.setState=function(f,d,v,x,P,R){if(!s||f===null||f.length===0||l&&!v)l?e(null):t();else{v=l?0:o;var I=4*v,$=P.clippingState||null;for(p.value=$,$=e(f,x,I,R),f=0;f!==I;++f)$[f]=n[f];P.clippingState=$,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=v}}}function Gn(t){var e={};return{get:function(i){if(e[i]!==void 0)return e[i];switch(i){case"WEBGL_depth_texture":var n=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=t.getExtension(i)}return n===null&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),e[i]=n}}}function on(t,e,i){function n(l){var h=l.target;l=o[h.id],l.index!==null&&e.remove(l.index);for(var c in l.attributes)e.remove(l.attributes[c]);h.removeEventListener("dispose",n),delete o[h.id],(c=s[l.id])&&(e.remove(c),delete s[l.id]),i.memory.geometries--}var o={},s={};return{get:function(l,h){var c=o[h.id];return c||(h.addEventListener("dispose",n),h.isBufferGeometry?c=h:h.isGeometry&&(h._bufferGeometry===void 0&&(h._bufferGeometry=new Ut().setFromObject(l)),c=h._bufferGeometry),o[h.id]=c,i.memory.geometries++,c)},update:function(l){var h=l.index,c=l.attributes;h!==null&&e.update(h,34963);for(var p in c)e.update(c[p],34962);l=l.morphAttributes;for(p in l){h=l[p],c=0;for(var f=h.length;c<f;c++)e.update(h[c],34962)}},getWireframeAttribute:function(l){var h=s[l.id];if(h)return h;h=[];var c=l.index,p=l.attributes;if(c!==null){c=c.array,p=0;for(var f=c.length;p<f;p+=3){var d=c[p+0],v=c[p+1],x=c[p+2];h.push(d,v,v,x,x,d)}}else for(c=p.position.array,p=0,f=c.length/3-1;p<f;p+=3)d=p+0,v=p+1,x=p+2,h.push(d,v,v,x,x,d);return h=new(65535<rn(h)?we:re)(h,1),e.update(h,34963),s[l.id]=h}}}function Je(t,e,i,n){var o,s,l;this.setMode=function(h){o=h},this.setIndex=function(h){s=h.type,l=h.bytesPerElement},this.render=function(h,c){t.drawElements(o,c,s,h*l),i.update(c,o)},this.renderInstances=function(h,c,p){if(n.isWebGL2)var f=t;else if(f=e.get("ANGLE_instanced_arrays"),f===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}f[n.isWebGL2?"drawElementsInstanced":"drawElementsInstancedANGLE"](o,p,s,c*l,h.maxInstancedCount),i.update(p,o,h.maxInstancedCount)}}function wn(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(i,n,o){switch(o=o||1,e.calls++,n){case 4:e.triangles+=i/3*o;break;case 5:case 6:e.triangles+=o*(i-2);break;case 1:e.lines+=i/2*o;break;case 3:e.lines+=o*(i-1);break;case 2:e.lines+=o*i;break;case 0:e.points+=o*i;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function ho(t,e){return Math.abs(e[1])-Math.abs(t[1])}function Hn(t){var e={},i=new Float32Array(8);return{update:function(n,o,s,l){var h=n.morphTargetInfluences,c=h.length;if(n=e[o.id],n===void 0){n=[];for(var p=0;p<c;p++)n[p]=[p,0];e[o.id]=n}var f=s.morphTargets&&o.morphAttributes.position;for(s=s.morphNormals&&o.morphAttributes.normal,p=0;p<c;p++){var d=n[p];d[1]!==0&&(f&&o.removeAttribute("morphTarget"+p),s&&o.removeAttribute("morphNormal"+p))}for(p=0;p<c;p++)d=n[p],d[0]=p,d[1]=h[p];for(n.sort(ho),p=0;8>p;p++){if((d=n[p])&&(h=d[0],c=d[1])){f&&o.addAttribute("morphTarget"+p,f[h]),s&&o.addAttribute("morphNormal"+p,s[h]),i[p]=c;continue}i[p]=0}l.getUniforms().setValue(t,"morphTargetInfluences",i)}}}function Bi(t,e){var i={};return{update:function(n){var o=e.render.frame,s=n.geometry,l=t.get(n,s);return i[l.id]!==o&&(s.isGeometry&&l.updateFromObject(n),t.update(l),i[l.id]=o),l},dispose:function(){i={}}}}function A(t,e,i,n,o,s,l,h,c,p){t=t!==void 0?t:[],qt.call(this,t,e!==void 0?e:301,i,n,o,s,l,h,c,p),this.flipY=!1}function k(t,e,i,n){qt.call(this,null),this.image={data:t,width:e,height:i,depth:n},this.minFilter=this.magFilter=1003,this.flipY=this.generateMipmaps=!1}function j(t,e,i){var n=t[0];if(0>=n||0<n)return t;var o=e*i,s=Ha[o];if(s===void 0&&(s=new Float32Array(o),Ha[o]=s),e!==0)for(n.toArray(s,0),n=1,o=0;n!==e;++n)o+=i,t[n].toArray(s,o);return s}function q(t,e){if(t.length!==e.length)return!1;for(var i=0,n=t.length;i<n;i++)if(t[i]!==e[i])return!1;return!0}function lt(t,e){for(var i=0,n=e.length;i<n;i++)t[i]=e[i]}function Lt(t,e){var i=Ds[e];i===void 0&&(i=new Int32Array(e),Ds[e]=i);for(var n=0;n!==e;++n)i[n]=t.allocTextureUnit();return i}function Ft(t,e){var i=this.cache;i[0]!==e&&(t.uniform1f(this.addr,e),i[0]=e)}function Pt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1i(this.addr,e),i[0]=e)}function Ae(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),i[0]=e.x,i[1]=e.y):q(i,e)||(t.uniform2fv(this.addr,e),lt(i,e))}function Se(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y||i[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),i[0]=e.x,i[1]=e.y,i[2]=e.z):e.r!==void 0?(i[0]!==e.r||i[1]!==e.g||i[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),i[0]=e.r,i[1]=e.g,i[2]=e.b):q(i,e)||(t.uniform3fv(this.addr,e),lt(i,e))}function te(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y||i[2]!==e.z||i[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),i[0]=e.x,i[1]=e.y,i[2]=e.z,i[3]=e.w):q(i,e)||(t.uniform4fv(this.addr,e),lt(i,e))}function Pe(t,e){var i=this.cache,n=e.elements;n===void 0?q(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),lt(i,e)):q(i,n)||(ml.set(n),t.uniformMatrix2fv(this.addr,!1,ml),lt(i,n))}function pi(t,e){var i=this.cache,n=e.elements;n===void 0?q(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),lt(i,e)):q(i,n)||(Wl.set(n),t.uniformMatrix3fv(this.addr,!1,Wl),lt(i,n))}function Mi(t,e){var i=this.cache,n=e.elements;n===void 0?q(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),lt(i,e)):q(i,n)||(da.set(n),t.uniformMatrix4fv(this.addr,!1,da),lt(i,n))}function ti(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTexture2D(e||dl,o)}function gi(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTexture3D(e||ph,o)}function Zr(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTextureCube(e||Vl,o)}function sr(t,e){var i=this.cache;q(i,e)||(t.uniform2iv(this.addr,e),lt(i,e))}function Ji(t,e){var i=this.cache;q(i,e)||(t.uniform3iv(this.addr,e),lt(i,e))}function ss(t,e){var i=this.cache;q(i,e)||(t.uniform4iv(this.addr,e),lt(i,e))}function Di(t){switch(t){case 5126:return Ft;case 35664:return Ae;case 35665:return Se;case 35666:return te;case 35674:return Pe;case 35675:return pi;case 35676:return Mi;case 35678:case 36198:return ti;case 35679:return gi;case 35680:return Zr;case 5124:case 35670:return Pt;case 35667:case 35671:return sr;case 35668:case 35672:return Ji;case 35669:case 35673:return ss}}function Qa(t,e){var i=this.cache;q(i,e)||(t.uniform1fv(this.addr,e),lt(i,e))}function Cr(t,e){var i=this.cache;q(i,e)||(t.uniform1iv(this.addr,e),lt(i,e))}function Ta(t,e){var i=this.cache;e=j(e,this.size,2),q(i,e)||(t.uniform2fv(this.addr,e),this.updateCache(e))}function sn(t,e){var i=this.cache;e=j(e,this.size,3),q(i,e)||(t.uniform3fv(this.addr,e),this.updateCache(e))}function as(t,e){var i=this.cache;e=j(e,this.size,4),q(i,e)||(t.uniform4fv(this.addr,e),this.updateCache(e))}function Lo(t,e){var i=this.cache;e=j(e,this.size,4),q(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),this.updateCache(e))}function Qn(t,e){var i=this.cache;e=j(e,this.size,9),q(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),this.updateCache(e))}function ls(t,e){var i=this.cache;e=j(e,this.size,16),q(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),this.updateCache(e))}function Hs(t,e,i){var n=this.cache,o=e.length,s=Lt(i,o);for(q(n,s)===!1&&(t.uniform1iv(this.addr,s),lt(n,s)),t=0;t!==o;++t)i.setTexture2D(e[t]||dl,s[t])}function Sa(t,e,i){var n=this.cache,o=e.length,s=Lt(i,o);for(q(n,s)===!1&&(t.uniform1iv(this.addr,s),lt(n,s)),t=0;t!==o;++t)i.setTextureCube(e[t]||Vl,s[t])}function Rr(t){switch(t){case 5126:return Qa;case 35664:return Ta;case 35665:return sn;case 35666:return as;case 35674:return Lo;case 35675:return Qn;case 35676:return ls;case 35678:return Hs;case 35680:return Sa;case 5124:case 35670:return Cr;case 35667:case 35671:return sr;case 35668:case 35672:return Ji;case 35669:case 35673:return ss}}function Ka(t,e,i){this.id=t,this.addr=i,this.cache=[],this.setValue=Di(e.type)}function hs(t,e,i){this.id=t,this.addr=i,this.cache=[],this.size=e.size,this.setValue=Rr(e.type)}function ks(t){this.id=t,this.seq=[],this.map={}}function br(t,e,i){this.seq=[],this.map={},this.renderer=i,i=t.getProgramParameter(e,35718);for(var n=0;n<i;++n){var o=t.getActiveUniform(e,n),s=t.getUniformLocation(e,o.name),l=this,h=o.name,c=h.length;for(gl.lastIndex=0;;){var p=gl.exec(h),f=gl.lastIndex,d=p[1],v=p[3];if(p[2]==="]"&&(d|=0),v===void 0||v==="["&&f+2===c){h=l,o=v===void 0?new Ka(d,o,s):new hs(d,o,s),h.seq.push(o),h.map[o.id]=o;break}else v=l.map[d],v===void 0&&(v=new ks(d),d=l,l=v,d.seq.push(l),d.map[l.id]=l),l=v}}}function Vs(t){t=t.split(`
|
|
256
256
|
`);for(var e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join(`
|
|
257
|
-
`)}function
|
|
258
|
-
`)}function
|
|
259
|
-
`)}function
|
|
260
|
-
`),0<
|
|
261
|
-
`),e=[
|
|
257
|
+
`)}function us(t,e,i){var n=t.createShader(e);return t.shaderSource(n,i),t.compileShader(n),t.getShaderParameter(n,35713)===!1&&console.error("THREE.WebGLShader: Shader couldn't compile."),t.getShaderInfoLog(n)!==""&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===35633?"vertex":"fragment",t.getShaderInfoLog(n),Vs(i)),n}function cs(t){switch(t){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw Error("unsupported encoding: "+t)}}function Or(t,e){return e=cs(e),"vec4 "+t+"( vec4 value ) { return "+e[0]+"ToLinear"+e[1]+"; }"}function Ea(t,e){return e=cs(e),"vec4 "+t+"( vec4 value ) { return LinearTo"+e[0]+e[1]+"; }"}function tl(t,e){switch(e){case 1:e="Linear";break;case 2:e="Reinhard";break;case 3:e="Uncharted2";break;case 4:e="OptimizedCineon";break;default:throw Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}function el(t,e,i){return t=t||{},[t.derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap&&!e.objectSpaceNormalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&i.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&i.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&i.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Ro).join(`
|
|
258
|
+
`)}function Co(t){var e=[],i;for(i in t){var n=t[i];n!==!1&&e.push("#define "+i+" "+n)}return e.join(`
|
|
259
|
+
`)}function Ro(t){return t!==""}function Aa(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function Pa(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function _r(t){return t.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,function(e,i){if(e=hi[i],e===void 0)throw Error("Can not resolve #include <"+i+">");return _r(e)})}function w(t){return t.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(e,i,n,o){for(e="",i=parseInt(i);i<parseInt(n);i++)e+=o.replace(/\[ i \]/g,"[ "+i+" ]");return e})}function b(t,e,i,n,o,s,l){var h=t.context,c=n.defines,p=o.vertexShader,f=o.fragmentShader,d="SHADOWMAP_TYPE_BASIC";s.shadowMapType===1?d="SHADOWMAP_TYPE_PCF":s.shadowMapType===2&&(d="SHADOWMAP_TYPE_PCF_SOFT");var v="ENVMAP_TYPE_CUBE",x="ENVMAP_MODE_REFLECTION",P="ENVMAP_BLENDING_MULTIPLY";if(s.envMap){switch(n.envMap.mapping){case 301:case 302:v="ENVMAP_TYPE_CUBE";break;case 306:case 307:v="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:v="ENVMAP_TYPE_EQUIREC";break;case 305:v="ENVMAP_TYPE_SPHERE"}switch(n.envMap.mapping){case 302:case 304:x="ENVMAP_MODE_REFRACTION"}switch(n.combine){case 0:P="ENVMAP_BLENDING_MULTIPLY";break;case 1:P="ENVMAP_BLENDING_MIX";break;case 2:P="ENVMAP_BLENDING_ADD"}}var R=0<t.gammaFactor?t.gammaFactor:1,I=l.isWebGL2?"":el(n.extensions,s,e),$=Co(c),W=h.createProgram();n.isRawShaderMaterial?(c=[$].filter(Ro).join(`
|
|
260
|
+
`),0<c.length&&(c+=`
|
|
261
|
+
`),e=[I,$].filter(Ro).join(`
|
|
262
262
|
`),0<e.length&&(e+=`
|
|
263
|
-
`)):(
|
|
264
|
-
`].filter(
|
|
265
|
-
`),e=[
|
|
266
|
-
`].filter(
|
|
267
|
-
`)),
|
|
263
|
+
`)):(c=["precision "+s.precision+" float;","precision "+s.precision+" int;","#define SHADER_NAME "+o.name,$,s.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+R,"#define MAX_BONES "+s.maxBones,s.useFog&&s.fog?"#define USE_FOG":"",s.useFog&&s.fogExp?"#define FOG_EXP2":"",s.map?"#define USE_MAP":"",s.envMap?"#define USE_ENVMAP":"",s.envMap?"#define "+x:"",s.lightMap?"#define USE_LIGHTMAP":"",s.aoMap?"#define USE_AOMAP":"",s.emissiveMap?"#define USE_EMISSIVEMAP":"",s.bumpMap?"#define USE_BUMPMAP":"",s.normalMap?"#define USE_NORMALMAP":"",s.normalMap&&s.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",s.displacementMap&&s.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",s.specularMap?"#define USE_SPECULARMAP":"",s.roughnessMap?"#define USE_ROUGHNESSMAP":"",s.metalnessMap?"#define USE_METALNESSMAP":"",s.alphaMap?"#define USE_ALPHAMAP":"",s.vertexColors?"#define USE_COLOR":"",s.flatShading?"#define FLAT_SHADED":"",s.skinning?"#define USE_SKINNING":"",s.useVertexTexture?"#define BONE_TEXTURE":"",s.morphTargets?"#define USE_MORPHTARGETS":"",s.morphNormals&&s.flatShading===!1?"#define USE_MORPHNORMALS":"",s.doubleSided?"#define DOUBLE_SIDED":"",s.flipSided?"#define FLIP_SIDED":"",s.shadowMapEnabled?"#define USE_SHADOWMAP":"",s.shadowMapEnabled?"#define "+d:"",s.sizeAttenuation?"#define USE_SIZEATTENUATION":"",s.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",s.logarithmicDepthBuffer&&(l.isWebGL2||e.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR"," attribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",`
|
|
264
|
+
`].filter(Ro).join(`
|
|
265
|
+
`),e=[I,"precision "+s.precision+" float;","precision "+s.precision+" int;","#define SHADER_NAME "+o.name,$,s.alphaTest?"#define ALPHATEST "+s.alphaTest+(s.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+R,s.useFog&&s.fog?"#define USE_FOG":"",s.useFog&&s.fogExp?"#define FOG_EXP2":"",s.map?"#define USE_MAP":"",s.envMap?"#define USE_ENVMAP":"",s.envMap?"#define "+v:"",s.envMap?"#define "+x:"",s.envMap?"#define "+P:"",s.lightMap?"#define USE_LIGHTMAP":"",s.aoMap?"#define USE_AOMAP":"",s.emissiveMap?"#define USE_EMISSIVEMAP":"",s.bumpMap?"#define USE_BUMPMAP":"",s.normalMap?"#define USE_NORMALMAP":"",s.normalMap&&s.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",s.specularMap?"#define USE_SPECULARMAP":"",s.roughnessMap?"#define USE_ROUGHNESSMAP":"",s.metalnessMap?"#define USE_METALNESSMAP":"",s.alphaMap?"#define USE_ALPHAMAP":"",s.vertexColors?"#define USE_COLOR":"",s.gradientMap?"#define USE_GRADIENTMAP":"",s.flatShading?"#define FLAT_SHADED":"",s.doubleSided?"#define DOUBLE_SIDED":"",s.flipSided?"#define FLIP_SIDED":"",s.shadowMapEnabled?"#define USE_SHADOWMAP":"",s.shadowMapEnabled?"#define "+d:"",s.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",s.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",s.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",s.logarithmicDepthBuffer&&(l.isWebGL2||e.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"",s.envMap&&(l.isWebGL2||e.get("EXT_shader_texture_lod"))?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",s.toneMapping!==0?"#define TONE_MAPPING":"",s.toneMapping!==0?hi.tonemapping_pars_fragment:"",s.toneMapping!==0?tl("toneMapping",s.toneMapping):"",s.dithering?"#define DITHERING":"",s.outputEncoding||s.mapEncoding||s.matcapEncoding||s.envMapEncoding||s.emissiveMapEncoding?hi.encodings_pars_fragment:"",s.mapEncoding?Or("mapTexelToLinear",s.mapEncoding):"",s.matcapEncoding?Or("matcapTexelToLinear",s.matcapEncoding):"",s.envMapEncoding?Or("envMapTexelToLinear",s.envMapEncoding):"",s.emissiveMapEncoding?Or("emissiveMapTexelToLinear",s.emissiveMapEncoding):"",s.outputEncoding?Ea("linearToOutputTexel",s.outputEncoding):"",s.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",`
|
|
266
|
+
`].filter(Ro).join(`
|
|
267
|
+
`)),p=_r(p),p=Aa(p,s),p=Pa(p,s),f=_r(f),f=Aa(f,s),f=Pa(f,s),p=w(p),f=w(f),l.isWebGL2&&!n.isRawShaderMaterial&&(l=!1,d=/^\s*#version\s+300\s+es\s*\n/,n.isShaderMaterial&&p.match(d)!==null&&f.match(d)!==null&&(l=!0,p=p.replace(d,""),f=f.replace(d,"")),c=`#version 300 es
|
|
268
268
|
|
|
269
269
|
#define attribute in
|
|
270
270
|
#define varying out
|
|
271
271
|
#define texture2D texture
|
|
272
|
-
`+
|
|
272
|
+
`+c,e=[`#version 300 es
|
|
273
273
|
|
|
274
|
-
#define varying in`,
|
|
274
|
+
#define varying in`,l?"":"out highp vec4 pc_fragColor;",l?"":"#define gl_FragColor pc_fragColor",`#define gl_FragDepthEXT gl_FragDepth
|
|
275
275
|
#define texture2D texture
|
|
276
276
|
#define textureCube texture
|
|
277
277
|
#define texture2DProj textureProj
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
#define texture2DProjGradEXT textureProjGrad
|
|
283
283
|
#define textureCubeGradEXT textureGrad`].join(`
|
|
284
284
|
`)+`
|
|
285
|
-
`+e),c=e+c,l=er(a,35633,h+l),c=er(a,35632,c),a.attachShader(N,l),a.attachShader(N,c),n.index0AttributeName!==void 0?a.bindAttribLocation(N,0,n.index0AttributeName):o.morphTargets===!0&&a.bindAttribLocation(N,0,"position"),a.linkProgram(N),o=a.getProgramInfoLog(N).trim(),s=a.getShaderInfoLog(l).trim(),u=a.getShaderInfoLog(c).trim(),g=d=!0,a.getProgramParameter(N,35714)===!1?(d=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"35715",a.getProgramParameter(N,35715),"gl.getProgramInfoLog",o,s,u)):o!==""?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",o):(s===""||u==="")&&(g=!1),g&&(this.diagnostics={runnable:d,material:n,programLog:o,vertexShader:{log:s,prefix:h},fragmentShader:{log:u,prefix:e}}),a.deleteShader(l),a.deleteShader(c);var J;this.getUniforms=function(){return J===void 0&&(J=new on(a,N,t)),J};var V;return this.getAttributes=function(){if(V===void 0){for(var ot={},T=a.getProgramParameter(N,35721),A=0;A<T;A++){var tt=a.getActiveAttrib(N,A).name;ot[tt]=a.getAttribLocation(N,tt)}V=ot}return V},this.destroy=function(){a.deleteProgram(N),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=r.name,this.id=ph++,this.code=i,this.usedTimes=1,this.program=N,this.vertexShader=l,this.fragmentShader=c,this}function R(t,e,i){function n(a,h){if(a)a.isTexture?l=a.encoding:a.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),l=a.texture.encoding);else var l=3e3;return l===3e3&&h&&(l=3007),l}var r=[],o={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},s="precision supportsVertexTextures map mapEncoding matcapEncoding envMap envMapMode envMapEncoding lightMap aoMap emissiveMap emissiveMapEncoding bumpMap normalMap objectSpaceNormalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap combine vertexColors fog useFog fogExp flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights numRectAreaLights shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes numClipIntersection depthPacking dithering".split(" ");this.getParameters=function(a,h,l,c,u,d,g){var w=o[a.type];if(g.isSkinnedMesh){var S=g.skeleton.bones;if(i.floatVertexTextures)S=1024;else{var P=Math.min(Math.floor((i.maxVertexUniforms-20)/4),S.length);P<S.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+S.length+" bones. This GPU supports "+P+"."),S=0):S=P}}else S=0;P=i.precision,a.precision!==null&&(P=i.getMaxPrecision(a.precision),P!==a.precision&&console.warn("THREE.WebGLProgram.getParameters:",a.precision,"not supported, using",P,"instead."));var k=t.getRenderTarget();return{shaderID:w,precision:P,supportsVertexTextures:i.vertexTextures,outputEncoding:n(k?k.texture:null,t.gammaOutput),map:!!a.map,mapEncoding:n(a.map,t.gammaInput),matcap:!!a.matcap,matcapEncoding:n(a.matcap,t.gammaInput),envMap:!!a.envMap,envMapMode:a.envMap&&a.envMap.mapping,envMapEncoding:n(a.envMap,t.gammaInput),envMapCubeUV:!!a.envMap&&(a.envMap.mapping===306||a.envMap.mapping===307),lightMap:!!a.lightMap,aoMap:!!a.aoMap,emissiveMap:!!a.emissiveMap,emissiveMapEncoding:n(a.emissiveMap,t.gammaInput),bumpMap:!!a.bumpMap,normalMap:!!a.normalMap,objectSpaceNormalMap:a.normalMapType===1,displacementMap:!!a.displacementMap,roughnessMap:!!a.roughnessMap,metalnessMap:!!a.metalnessMap,specularMap:!!a.specularMap,alphaMap:!!a.alphaMap,gradientMap:!!a.gradientMap,combine:a.combine,vertexColors:a.vertexColors,fog:!!c,useFog:a.fog,fogExp:c&&c.isFogExp2,flatShading:a.flatShading,sizeAttenuation:a.sizeAttenuation,logarithmicDepthBuffer:i.logarithmicDepthBuffer,skinning:a.skinning&&0<S,maxBones:S,useVertexTexture:i.floatVertexTextures,morphTargets:a.morphTargets,morphNormals:a.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:h.directional.length,numPointLights:h.point.length,numSpotLights:h.spot.length,numRectAreaLights:h.rectArea.length,numHemiLights:h.hemi.length,numClippingPlanes:u,numClipIntersection:d,dithering:a.dithering,shadowMapEnabled:t.shadowMap.enabled&&g.receiveShadow&&0<l.length,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:a.premultipliedAlpha,alphaTest:a.alphaTest,doubleSided:a.side===2,flipSided:a.side===1,depthPacking:a.depthPacking!==void 0?a.depthPacking:!1}},this.getProgramCode=function(a,h){var l=[];if(h.shaderID?l.push(h.shaderID):(l.push(a.fragmentShader),l.push(a.vertexShader)),a.defines!==void 0)for(var c in a.defines)l.push(c),l.push(a.defines[c]);for(c=0;c<s.length;c++)l.push(h[s[c]]);return l.push(a.onBeforeCompile.toString()),l.push(t.gammaOutput),l.push(t.gammaFactor),l.join()},this.acquireProgram=function(a,h,l,c){for(var u,d=0,g=r.length;d<g;d++){var w=r[d];if(w.code===c){u=w,++u.usedTimes;break}}return u===void 0&&(u=new E(t,e,c,a,h,l,i),r.push(u)),u},this.releaseProgram=function(a){if(--a.usedTimes===0){var h=r.indexOf(a);r[h]=r[r.length-1],r.pop(),a.destroy()}},this.programs=r}function L(){var t=new WeakMap;return{get:function(e){var i=t.get(e);return i===void 0&&(i={},t.set(e,i)),i},remove:function(e){t.delete(e)},update:function(e,i,n){t.get(e)[i]=n},dispose:function(){t=new WeakMap}}}function y(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function X(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function O(){var t=[],e=0,i=[],n=[];return{opaque:i,transparent:n,init:function(){e=0,i.length=0,n.length=0},push:function(r,o,s,a,h){var l=t[e];l===void 0?(l={id:r.id,object:r,geometry:o,material:s,program:s.program,renderOrder:r.renderOrder,z:a,group:h},t[e]=l):(l.id=r.id,l.object=r,l.geometry=o,l.material=s,l.program=s.program,l.renderOrder=r.renderOrder,l.z=a,l.group=h),(s.transparent===!0?n:i).push(l),e++},sort:function(){1<i.length&&i.sort(y),1<n.length&&n.sort(X)}}}function K(){var t={};return{get:function(e,i){return e=e.id+","+i.id,i=t[e],i===void 0&&(i=new O,t[e]=i),i},dispose:function(){t={}}}}function rt(){var t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];switch(e.type){case"DirectionalLight":var i={direction:new x,color:new H,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Z};break;case"SpotLight":i={position:new x,direction:new x,color:new H,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Z};break;case"PointLight":i={position:new x,color:new H,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Z,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":i={direction:new x,skyColor:new H,groundColor:new H};break;case"RectAreaLight":i={color:new H,position:new x,halfWidth:new x,halfHeight:new x}}return t[e.id]=i}}}function et(){var t=new rt,e={id:dh++,hash:{stateID:-1,directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,shadowsLength:-1},ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},i=new x,n=new ft,r=new ft;return{setup:function(o,s,a){var h=0,l=0,c=0,u=0,d=0,g=0,w=0,S=0;a=a.matrixWorldInverse;for(var P=0,k=o.length;P<k;P++){var N=o[P],J=N.color,V=N.intensity,ot=N.distance,T=N.shadow&&N.shadow.map?N.shadow.map.texture:null;if(N.isAmbientLight)h+=J.r*V,l+=J.g*V,c+=J.b*V;else if(N.isDirectionalLight){var A=t.get(N);A.color.copy(N.color).multiplyScalar(N.intensity),A.direction.setFromMatrixPosition(N.matrixWorld),i.setFromMatrixPosition(N.target.matrixWorld),A.direction.sub(i),A.direction.transformDirection(a),(A.shadow=N.castShadow)&&(J=N.shadow,A.shadowBias=J.bias,A.shadowRadius=J.radius,A.shadowMapSize=J.mapSize),e.directionalShadowMap[u]=T,e.directionalShadowMatrix[u]=N.shadow.matrix,e.directional[u]=A,u++}else N.isSpotLight?(A=t.get(N),A.position.setFromMatrixPosition(N.matrixWorld),A.position.applyMatrix4(a),A.color.copy(J).multiplyScalar(V),A.distance=ot,A.direction.setFromMatrixPosition(N.matrixWorld),i.setFromMatrixPosition(N.target.matrixWorld),A.direction.sub(i),A.direction.transformDirection(a),A.coneCos=Math.cos(N.angle),A.penumbraCos=Math.cos(N.angle*(1-N.penumbra)),A.decay=N.decay,(A.shadow=N.castShadow)&&(J=N.shadow,A.shadowBias=J.bias,A.shadowRadius=J.radius,A.shadowMapSize=J.mapSize),e.spotShadowMap[g]=T,e.spotShadowMatrix[g]=N.shadow.matrix,e.spot[g]=A,g++):N.isRectAreaLight?(A=t.get(N),A.color.copy(J).multiplyScalar(V),A.position.setFromMatrixPosition(N.matrixWorld),A.position.applyMatrix4(a),r.identity(),n.copy(N.matrixWorld),n.premultiply(a),r.extractRotation(n),A.halfWidth.set(.5*N.width,0,0),A.halfHeight.set(0,.5*N.height,0),A.halfWidth.applyMatrix4(r),A.halfHeight.applyMatrix4(r),e.rectArea[w]=A,w++):N.isPointLight?(A=t.get(N),A.position.setFromMatrixPosition(N.matrixWorld),A.position.applyMatrix4(a),A.color.copy(N.color).multiplyScalar(N.intensity),A.distance=N.distance,A.decay=N.decay,(A.shadow=N.castShadow)&&(J=N.shadow,A.shadowBias=J.bias,A.shadowRadius=J.radius,A.shadowMapSize=J.mapSize,A.shadowCameraNear=J.camera.near,A.shadowCameraFar=J.camera.far),e.pointShadowMap[d]=T,e.pointShadowMatrix[d]=N.shadow.matrix,e.point[d]=A,d++):N.isHemisphereLight&&(A=t.get(N),A.direction.setFromMatrixPosition(N.matrixWorld),A.direction.transformDirection(a),A.direction.normalize(),A.skyColor.copy(N.color).multiplyScalar(V),A.groundColor.copy(N.groundColor).multiplyScalar(V),e.hemi[S]=A,S++)}e.ambient[0]=h,e.ambient[1]=l,e.ambient[2]=c,e.directional.length=u,e.spot.length=g,e.rectArea.length=w,e.point.length=d,e.hemi.length=S,e.hash.stateID=e.id,e.hash.directionalLength=u,e.hash.pointLength=d,e.hash.spotLength=g,e.hash.rectAreaLength=w,e.hash.hemiLength=S,e.hash.shadowsLength=s.length},state:e}}function W(){var t=new et,e=[],i=[];return{init:function(){e.length=0,i.length=0},state:{lightsArray:e,shadowsArray:i,lights:t},setupLights:function(n){t.setup(e,i,n)},pushLight:function(n){e.push(n)},pushShadow:function(n){i.push(n)}}}function St(){var t={};return{get:function(e,i){if(t[e.id]===void 0){var n=new W;t[e.id]={},t[e.id][i.id]=n}else t[e.id][i.id]===void 0?(n=new W,t[e.id][i.id]=n):n=t[e.id][i.id];return n},dispose:function(){t={}}}}function Et(t){fe.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.lights=this.fog=!1,this.setValues(t)}function yt(t){fe.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new x,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.lights=this.fog=!1,this.setValues(t)}function Nt(t,e,i){function n(T,A,tt,_t,vt,lt){var Ht=T.geometry,Dt=u,$t=T.customDepthMaterial;return tt&&(Dt=d,$t=T.customDistanceMaterial),$t?Dt=$t:($t=!1,A.morphTargets&&(Ht&&Ht.isBufferGeometry?$t=Ht.morphAttributes&&Ht.morphAttributes.position&&0<Ht.morphAttributes.position.length:Ht&&Ht.isGeometry&&($t=Ht.morphTargets&&0<Ht.morphTargets.length)),T.isSkinnedMesh&&A.skinning===!1&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",T),T=T.isSkinnedMesh&&A.skinning,Ht=0,$t&&(Ht|=1),T&&(Ht|=2),Dt=Dt[Ht]),t.localClippingEnabled&&A.clipShadows===!0&&A.clippingPlanes.length!==0&&(Ht=Dt.uuid,$t=A.uuid,T=g[Ht],T===void 0&&(T={},g[Ht]=T),Ht=T[$t],Ht===void 0&&(Ht=Dt.clone(),T[$t]=Ht),Dt=Ht),Dt.visible=A.visible,Dt.wireframe=A.wireframe,Dt.side=A.shadowSide!=null?A.shadowSide:w[A.side],Dt.clipShadows=A.clipShadows,Dt.clippingPlanes=A.clippingPlanes,Dt.clipIntersection=A.clipIntersection,Dt.wireframeLinewidth=A.wireframeLinewidth,Dt.linewidth=A.linewidth,tt&&Dt.isMeshDistanceMaterial&&(Dt.referencePosition.copy(_t),Dt.nearDistance=vt,Dt.farDistance=lt),Dt}function r(T,A,tt,_t){if(T.visible!==!1){if(T.layers.test(A.layers)&&(T.isMesh||T.isLine||T.isPoints)&&T.castShadow&&(!T.frustumCulled||o.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(tt.matrixWorldInverse,T.matrixWorld);var vt=e.update(T),lt=T.material;if(Array.isArray(lt))for(var Ht=vt.groups,Dt=0,$t=Ht.length;Dt<$t;Dt++){var Xt=Ht[Dt],Qt=lt[Xt.materialIndex];Qt&&Qt.visible&&(Qt=n(T,Qt,_t,c,tt.near,tt.far),t.renderBufferDirect(tt,null,vt,Qt,T,Xt))}else lt.visible&&(Qt=n(T,lt,_t,c,tt.near,tt.far),t.renderBufferDirect(tt,null,vt,Qt,T,null))}for(T=T.children,vt=0,lt=T.length;vt<lt;vt++)r(T[vt],A,tt,_t)}}var o=new Q,s=new ft,a=new Z,h=new Z(i,i),l=new x,c=new x,u=Array(4),d=Array(4),g={},w={0:1,1:0,2:2},S=[new x(1,0,0),new x(-1,0,0),new x(0,0,1),new x(0,0,-1),new x(0,1,0),new x(0,-1,0)],P=[new x(0,1,0),new x(0,1,0),new x(0,1,0),new x(0,1,0),new x(0,0,1),new x(0,0,-1)],k=[new Y,new Y,new Y,new Y,new Y,new Y];for(i=0;i!==4;++i){var N=(i&1)!==0,J=(i&2)!==0,V=new Et({depthPacking:3201,morphTargets:N,skinning:J});u[i]=V,N=new yt({morphTargets:N,skinning:J}),d[i]=N}var ot=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(T,A,tt){if(ot.enabled!==!1&&(ot.autoUpdate!==!1||ot.needsUpdate!==!1)&&T.length!==0){var _t=t.state;_t.disable(3042),_t.buffers.color.setClear(1,1,1,1),_t.buffers.depth.setTest(!0),_t.setScissorTest(!1);for(var vt,lt=0,Ht=T.length;lt<Ht;lt++){var Dt=T[lt];vt=Dt.shadow;var $t=Dt&&Dt.isPointLight;if(vt===void 0)console.warn("THREE.WebGLShadowMap:",Dt,"has no shadow.");else{var Xt=vt.camera;if(a.copy(vt.mapSize),a.min(h),$t){var Qt=a.x,re=a.y;k[0].set(2*Qt,re,Qt,re),k[1].set(0,re,Qt,re),k[2].set(3*Qt,re,Qt,re),k[3].set(Qt,re,Qt,re),k[4].set(3*Qt,0,Qt,re),k[5].set(Qt,0,Qt,re),a.x*=4,a.y*=2}for(vt.map===null&&(vt.map=new ht(a.x,a.y,{minFilter:1003,magFilter:1003,format:1023}),vt.map.texture.name=Dt.name+".shadowMap",Xt.updateProjectionMatrix()),vt.isSpotLightShadow&&vt.update(Dt),Qt=vt.map,re=vt.matrix,c.setFromMatrixPosition(Dt.matrixWorld),Xt.position.copy(c),$t?(vt=6,re.makeTranslation(-c.x,-c.y,-c.z)):(vt=1,l.setFromMatrixPosition(Dt.target.matrixWorld),Xt.lookAt(l),Xt.updateMatrixWorld(),re.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),re.multiply(Xt.projectionMatrix),re.multiply(Xt.matrixWorldInverse)),t.setRenderTarget(Qt),t.clear(),Dt=0;Dt<vt;Dt++)$t&&(l.copy(Xt.position),l.add(S[Dt]),Xt.up.copy(P[Dt]),Xt.lookAt(l),Xt.updateMatrixWorld(),_t.viewport(k[Dt])),s.multiplyMatrices(Xt.projectionMatrix,Xt.matrixWorldInverse),o.setFromMatrix(s),r(A,tt,Xt,$t)}}ot.needsUpdate=!1}}}function At(t,e,i,n){function r(nt,ye,Te){var Ze=new Uint8Array(4),Yt=t.createTexture();for(t.bindTexture(nt,Yt),t.texParameteri(nt,10241,9728),t.texParameteri(nt,10240,9728),nt=0;nt<Te;nt++)t.texImage2D(ye+nt,0,6408,1,1,0,6408,5121,Ze);return Yt}function o(nt,ye){k[nt]=1,N[nt]===0&&(t.enableVertexAttribArray(nt),N[nt]=1),J[nt]!==ye&&((n.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](nt,ye),J[nt]=ye)}function s(nt){V[nt]!==!0&&(t.enable(nt),V[nt]=!0)}function a(nt){V[nt]!==!1&&(t.disable(nt),V[nt]=!1)}function h(nt,ye,Te,Ze,Yt,ue,_e,Be){if(nt===0)A&&(a(3042),A=!1);else if(A||(s(3042),A=!0),nt!==5){if(nt!==tt||Be!==Xt){if((_t!==100||Ht!==100)&&(t.blendEquation(32774),Ht=_t=100),Be)switch(nt){case 1:t.blendFuncSeparate(1,771,1,771);break;case 2:t.blendFunc(1,1);break;case 3:t.blendFuncSeparate(0,0,769,771);break;case 4:t.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",nt)}else switch(nt){case 1:t.blendFuncSeparate(770,771,1,771);break;case 2:t.blendFunc(770,1);break;case 3:t.blendFunc(0,769);break;case 4:t.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",nt)}$t=Dt=lt=vt=null,tt=nt,Xt=Be}}else Yt=Yt||ye,ue=ue||Te,_e=_e||Ze,(ye!==_t||Yt!==Ht)&&(t.blendEquationSeparate(i.convert(ye),i.convert(Yt)),_t=ye,Ht=Yt),(Te!==vt||Ze!==lt||ue!==Dt||_e!==$t)&&(t.blendFuncSeparate(i.convert(Te),i.convert(Ze),i.convert(ue),i.convert(_e)),vt=Te,lt=Ze,Dt=ue,$t=_e),tt=nt,Xt=null}function l(nt){Qt!==nt&&(nt?t.frontFace(2304):t.frontFace(2305),Qt=nt)}function c(nt){nt!==0?(s(2884),nt!==re&&(nt===1?t.cullFace(1029):nt===2?t.cullFace(1028):t.cullFace(1032))):a(2884),re=nt}function u(nt,ye,Te){nt?(s(32823),(Ae!==ye||fi!==Te)&&(t.polygonOffset(ye,Te),Ae=ye,fi=Te)):a(32823)}function d(nt){nt===void 0&&(nt=33984+li-1),pi!==nt&&(t.activeTexture(nt),pi=nt)}var g=new function(){var nt=!1,ye=new Y,Te=null,Ze=new Y(0,0,0,0);return{setMask:function(Yt){Te===Yt||nt||(t.colorMask(Yt,Yt,Yt,Yt),Te=Yt)},setLocked:function(Yt){nt=Yt},setClear:function(Yt,ue,_e,Be,De){De===!0&&(Yt*=Be,ue*=Be,_e*=Be),ye.set(Yt,ue,_e,Be),Ze.equals(ye)===!1&&(t.clearColor(Yt,ue,_e,Be),Ze.copy(ye))},reset:function(){nt=!1,Te=null,Ze.set(-1,0,0,0)}}},w=new function(){var nt=!1,ye=null,Te=null,Ze=null;return{setTest:function(Yt){Yt?s(2929):a(2929)},setMask:function(Yt){ye===Yt||nt||(t.depthMask(Yt),ye=Yt)},setFunc:function(Yt){if(Te!==Yt){if(Yt)switch(Yt){case 0:t.depthFunc(512);break;case 1:t.depthFunc(519);break;case 2:t.depthFunc(513);break;case 3:t.depthFunc(515);break;case 4:t.depthFunc(514);break;case 5:t.depthFunc(518);break;case 6:t.depthFunc(516);break;case 7:t.depthFunc(517);break;default:t.depthFunc(515)}else t.depthFunc(515);Te=Yt}},setLocked:function(Yt){nt=Yt},setClear:function(Yt){Ze!==Yt&&(t.clearDepth(Yt),Ze=Yt)},reset:function(){nt=!1,Ze=Te=ye=null}}},S=new function(){var nt=!1,ye=null,Te=null,Ze=null,Yt=null,ue=null,_e=null,Be=null,De=null;return{setTest:function(Mt){Mt?s(2960):a(2960)},setMask:function(Mt){ye===Mt||nt||(t.stencilMask(Mt),ye=Mt)},setFunc:function(Mt,xe,ve){(Te!==Mt||Ze!==xe||Yt!==ve)&&(t.stencilFunc(Mt,xe,ve),Te=Mt,Ze=xe,Yt=ve)},setOp:function(Mt,xe,ve){(ue!==Mt||_e!==xe||Be!==ve)&&(t.stencilOp(Mt,xe,ve),ue=Mt,_e=xe,Be=ve)},setLocked:function(Mt){nt=Mt},setClear:function(Mt){De!==Mt&&(t.clearStencil(Mt),De=Mt)},reset:function(){nt=!1,De=Be=_e=ue=Yt=Ze=Te=ye=null}}},P=t.getParameter(34921),k=new Uint8Array(P),N=new Uint8Array(P),J=new Uint8Array(P),V={},ot=null,T=null,A=null,tt=null,_t=null,vt=null,lt=null,Ht=null,Dt=null,$t=null,Xt=!1,Qt=null,re=null,me=null,Ae=null,fi=null,li=t.getParameter(35661),Ye=!1;P=0,P=t.getParameter(7938),P.indexOf("WebGL")!==-1?(P=parseFloat(/^WebGL ([0-9])/.exec(P)[1]),Ye=1<=P):P.indexOf("OpenGL ES")!==-1&&(P=parseFloat(/^OpenGL ES ([0-9])/.exec(P)[1]),Ye=2<=P);var pi=null,ti={},Mi=new Y,qt=new Y,ge={};return ge[3553]=r(3553,3553,1),ge[34067]=r(34067,34069,6),g.setClear(0,0,0,1),w.setClear(1),S.setClear(0),s(2929),w.setFunc(3),l(!1),c(1),s(2884),h(0),{buffers:{color:g,depth:w,stencil:S},initAttributes:function(){for(var nt=0,ye=k.length;nt<ye;nt++)k[nt]=0},enableAttribute:function(nt){o(nt,0)},enableAttributeAndDivisor:o,disableUnusedAttributes:function(){for(var nt=0,ye=N.length;nt!==ye;++nt)N[nt]!==k[nt]&&(t.disableVertexAttribArray(nt),N[nt]=0)},enable:s,disable:a,getCompressedTextureFormats:function(){if(ot===null&&(ot=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var nt=t.getParameter(34467),ye=0;ye<nt.length;ye++)ot.push(nt[ye]);return ot},useProgram:function(nt){return T!==nt?(t.useProgram(nt),T=nt,!0):!1},setBlending:h,setMaterial:function(nt,ye){nt.side===2?a(2884):s(2884);var Te=nt.side===1;ye&&(Te=!Te),l(Te),nt.blending===1&&nt.transparent===!1?h(0):h(nt.blending,nt.blendEquation,nt.blendSrc,nt.blendDst,nt.blendEquationAlpha,nt.blendSrcAlpha,nt.blendDstAlpha,nt.premultipliedAlpha),w.setFunc(nt.depthFunc),w.setTest(nt.depthTest),w.setMask(nt.depthWrite),g.setMask(nt.colorWrite),u(nt.polygonOffset,nt.polygonOffsetFactor,nt.polygonOffsetUnits)},setFlipSided:l,setCullFace:c,setLineWidth:function(nt){nt!==me&&(Ye&&t.lineWidth(nt),me=nt)},setPolygonOffset:u,setScissorTest:function(nt){nt?s(3089):a(3089)},activeTexture:d,bindTexture:function(nt,ye){pi===null&&d();var Te=ti[pi];Te===void 0&&(Te={type:void 0,texture:void 0},ti[pi]=Te),(Te.type!==nt||Te.texture!==ye)&&(t.bindTexture(nt,ye||ge[nt]),Te.type=nt,Te.texture=ye)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(nt){console.error("THREE.WebGLState:",nt)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(nt){console.error("THREE.WebGLState:",nt)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(nt){console.error("THREE.WebGLState:",nt)}},scissor:function(nt){Mi.equals(nt)===!1&&(t.scissor(nt.x,nt.y,nt.z,nt.w),Mi.copy(nt))},viewport:function(nt){qt.equals(nt)===!1&&(t.viewport(nt.x,nt.y,nt.z,nt.w),qt.copy(nt))},reset:function(){for(var nt=0;nt<N.length;nt++)N[nt]===1&&(t.disableVertexAttribArray(nt),N[nt]=0);V={},pi=ot=null,ti={},re=Qt=tt=T=null,g.reset(),w.reset(),S.reset()}}}function oe(t,e,i,n,r,o,s){function a(T,A){if(T.width>A||T.height>A){if("data"in T){console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+T.width+"x"+T.height+").");return}A/=Math.max(T.width,T.height);var tt=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return tt.width=Math.floor(T.width*A),tt.height=Math.floor(T.height*A),tt.getContext("2d").drawImage(T,0,0,T.width,T.height,0,0,tt.width,tt.height),console.warn("THREE.WebGLRenderer: image is too big ("+T.width+"x"+T.height+"). Resized to "+tt.width+"x"+tt.height),tt}return T}function h(T){return Se.isPowerOfTwo(T.width)&&Se.isPowerOfTwo(T.height)}function l(T,A){return T.generateMipmaps&&A&&T.minFilter!==1003&&T.minFilter!==1006}function c(T,A,tt,_t){t.generateMipmap(T),n.get(A).__maxMipLevel=Math.log(Math.max(tt,_t))*Math.LOG2E}function u(T,A){if(!r.isWebGL2)return T;if(T===6403){if(A===5126)return 33326;if(A===5131)return 33325;if(A===5121)return 33321}if(T===6407){if(A===5126)return 34837;if(A===5131)return 34843;if(A===5121)return 32849}if(T===6408){if(A===5126)return 34836;if(A===5131)return 34842;if(A===5121)return 32856}return T}function d(T){return T===1003||T===1004||T===1005?9728:9729}function g(T){T=T.target,T.removeEventListener("dispose",g);t:{var A=n.get(T);if(T.image&&A.__image__webglTextureCube)t.deleteTexture(A.__image__webglTextureCube);else{if(A.__webglInit===void 0)break t;t.deleteTexture(A.__webglTexture)}n.remove(T)}T.isVideoTexture&&delete V[T.id],s.memory.textures--}function w(T){T=T.target,T.removeEventListener("dispose",w);var A=n.get(T),tt=n.get(T.texture);if(T){if(tt.__webglTexture!==void 0&&t.deleteTexture(tt.__webglTexture),T.depthTexture&&T.depthTexture.dispose(),T.isWebGLRenderTargetCube)for(tt=0;6>tt;tt++)t.deleteFramebuffer(A.__webglFramebuffer[tt]),A.__webglDepthbuffer&&t.deleteRenderbuffer(A.__webglDepthbuffer[tt]);else t.deleteFramebuffer(A.__webglFramebuffer),A.__webglDepthbuffer&&t.deleteRenderbuffer(A.__webglDepthbuffer);n.remove(T.texture),n.remove(T)}s.memory.textures--}function S(T,A){var tt=n.get(T);if(T.isVideoTexture){var _t=T.id,vt=s.render.frame;V[_t]!==vt&&(V[_t]=vt,T.update())}if(0<T.version&&tt.__version!==T.version)if(_t=T.image,_t===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(_t.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{k(tt,T,A);return}i.activeTexture(33984+A),i.bindTexture(3553,tt.__webglTexture)}function P(T,A,tt){tt?(t.texParameteri(T,10242,o.convert(A.wrapS)),t.texParameteri(T,10243,o.convert(A.wrapT)),t.texParameteri(T,10240,o.convert(A.magFilter)),t.texParameteri(T,10241,o.convert(A.minFilter))):(t.texParameteri(T,10242,33071),t.texParameteri(T,10243,33071),A.wrapS===1001&&A.wrapT===1001||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(T,10240,d(A.magFilter)),t.texParameteri(T,10241,d(A.minFilter)),A.minFilter!==1003&&A.minFilter!==1006&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!(tt=e.get("EXT_texture_filter_anisotropic"))||A.type===1015&&e.get("OES_texture_float_linear")===null||A.type===1016&&(r.isWebGL2||e.get("OES_texture_half_float_linear"))===null||!(1<A.anisotropy||n.get(A).__currentAnisotropy)||(t.texParameterf(T,tt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(A.anisotropy,r.getMaxAnisotropy())),n.get(A).__currentAnisotropy=A.anisotropy)}function k(T,A,tt){var _t=A.isDataTexture3D?32879:3553;T.__webglInit===void 0&&(T.__webglInit=!0,A.addEventListener("dispose",g),T.__webglTexture=t.createTexture(),s.memory.textures++),i.activeTexture(33984+tt),i.bindTexture(_t,T.__webglTexture),t.pixelStorei(37440,A.flipY),t.pixelStorei(37441,A.premultiplyAlpha),t.pixelStorei(3317,A.unpackAlignment),tt=a(A.image,r.maxTextureSize);var vt=r.isWebGL2?!1:A.wrapS!==1001||A.wrapT!==1001||A.minFilter!==1003&&A.minFilter!==1006;vt&&h(tt)===!1&&(tt instanceof HTMLImageElement||tt instanceof HTMLCanvasElement||tt instanceof ImageBitmap)&&(ot===void 0&&(ot=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),ot.width=Se.floorPowerOfTwo(tt.width),ot.height=Se.floorPowerOfTwo(tt.height),ot.getContext("2d").drawImage(tt,0,0,ot.width,ot.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+tt.width+"x"+tt.height+"). Resized to "+ot.width+"x"+ot.height),tt=ot),vt=h(tt);var lt=o.convert(A.format),Ht=o.convert(A.type),Dt=u(lt,Ht);P(_t,A,vt);var $t=A.mipmaps;if(A.isDepthTexture){if(Dt=6402,A.type===1015){if(!r.isWebGL2)throw Error("Float Depth Texture only supported in WebGL2.0");Dt=36012}else r.isWebGL2&&(Dt=33189);A.format===1026&&Dt===6402&&A.type!==1012&&A.type!==1014&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),A.type=1012,Ht=o.convert(A.type)),A.format===1027&&(Dt=34041,A.type!==1020&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),A.type=1020,Ht=o.convert(A.type))),i.texImage2D(3553,0,Dt,tt.width,tt.height,0,lt,Ht,null)}else if(A.isDataTexture)if(0<$t.length&&vt){for(var Xt=0,Qt=$t.length;Xt<Qt;Xt++)_t=$t[Xt],i.texImage2D(3553,Xt,Dt,_t.width,_t.height,0,lt,Ht,_t.data);A.generateMipmaps=!1,T.__maxMipLevel=$t.length-1}else i.texImage2D(3553,0,Dt,tt.width,tt.height,0,lt,Ht,tt.data),T.__maxMipLevel=0;else if(A.isCompressedTexture){for(Xt=0,Qt=$t.length;Xt<Qt;Xt++)_t=$t[Xt],A.format!==1023&&A.format!==1022?-1<i.getCompressedTextureFormats().indexOf(lt)?i.compressedTexImage2D(3553,Xt,Dt,_t.width,_t.height,0,_t.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):i.texImage2D(3553,Xt,Dt,_t.width,_t.height,0,lt,Ht,_t.data);T.__maxMipLevel=$t.length-1}else if(A.isDataTexture3D)i.texImage3D(32879,0,Dt,tt.width,tt.height,tt.depth,0,lt,Ht,tt.data),T.__maxMipLevel=0;else if(0<$t.length&&vt){for(Xt=0,Qt=$t.length;Xt<Qt;Xt++)_t=$t[Xt],i.texImage2D(3553,Xt,Dt,lt,Ht,_t);A.generateMipmaps=!1,T.__maxMipLevel=$t.length-1}else i.texImage2D(3553,0,Dt,lt,Ht,tt),T.__maxMipLevel=0;l(A,vt)&&c(3553,A,tt.width,tt.height),T.__version=A.version,A.onUpdate&&A.onUpdate(A)}function N(T,A,tt,_t){var vt=o.convert(A.texture.format),lt=o.convert(A.texture.type),Ht=u(vt,lt);i.texImage2D(_t,0,Ht,A.width,A.height,0,vt,lt,null),t.bindFramebuffer(36160,T),t.framebufferTexture2D(36160,tt,_t,n.get(A.texture).__webglTexture,0),t.bindFramebuffer(36160,null)}function J(T,A){t.bindRenderbuffer(36161,T),A.depthBuffer&&!A.stencilBuffer?(t.renderbufferStorage(36161,33189,A.width,A.height),t.framebufferRenderbuffer(36160,36096,36161,T)):A.depthBuffer&&A.stencilBuffer?(t.renderbufferStorage(36161,34041,A.width,A.height),t.framebufferRenderbuffer(36160,33306,36161,T)):t.renderbufferStorage(36161,32854,A.width,A.height),t.bindRenderbuffer(36161,null)}var V={},ot;this.setTexture2D=S,this.setTexture3D=function(T,A){var tt=n.get(T);0<T.version&&tt.__version!==T.version?k(tt,T,A):(i.activeTexture(33984+A),i.bindTexture(32879,tt.__webglTexture))},this.setTextureCube=function(T,A){var tt=n.get(T);if(T.image.length===6)if(0<T.version&&tt.__version!==T.version){tt.__image__webglTextureCube||(T.addEventListener("dispose",g),tt.__image__webglTextureCube=t.createTexture(),s.memory.textures++),i.activeTexture(33984+A),i.bindTexture(34067,tt.__image__webglTextureCube),t.pixelStorei(37440,T.flipY),A=T&&T.isCompressedTexture;for(var _t=T.image[0]&&T.image[0].isDataTexture,vt=[],lt=0;6>lt;lt++)vt[lt]=A||_t?_t?T.image[lt].image:T.image[lt]:a(T.image[lt],r.maxCubemapSize);var Ht=vt[0],Dt=h(Ht),$t=o.convert(T.format),Xt=o.convert(T.type),Qt=u($t,Xt);for(P(34067,T,Dt),lt=0;6>lt;lt++)if(A)for(var re,me=vt[lt].mipmaps,Ae=0,fi=me.length;Ae<fi;Ae++)re=me[Ae],T.format!==1023&&T.format!==1022?-1<i.getCompressedTextureFormats().indexOf($t)?i.compressedTexImage2D(34069+lt,Ae,Qt,re.width,re.height,0,re.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):i.texImage2D(34069+lt,Ae,Qt,re.width,re.height,0,$t,Xt,re.data);else _t?i.texImage2D(34069+lt,0,Qt,vt[lt].width,vt[lt].height,0,$t,Xt,vt[lt].data):i.texImage2D(34069+lt,0,Qt,$t,Xt,vt[lt]);tt.__maxMipLevel=A?me.length-1:0,l(T,Dt)&&c(34067,T,Ht.width,Ht.height),tt.__version=T.version,T.onUpdate&&T.onUpdate(T)}else i.activeTexture(33984+A),i.bindTexture(34067,tt.__image__webglTextureCube)},this.setTextureCubeDynamic=function(T,A){i.activeTexture(33984+A),i.bindTexture(34067,n.get(T).__webglTexture)},this.setupRenderTarget=function(T){var A=n.get(T),tt=n.get(T.texture);T.addEventListener("dispose",w),tt.__webglTexture=t.createTexture(),s.memory.textures++;var _t=T.isWebGLRenderTargetCube===!0,vt=h(T);if(_t){A.__webglFramebuffer=[];for(var lt=0;6>lt;lt++)A.__webglFramebuffer[lt]=t.createFramebuffer()}else A.__webglFramebuffer=t.createFramebuffer();if(_t){for(i.bindTexture(34067,tt.__webglTexture),P(34067,T.texture,vt),lt=0;6>lt;lt++)N(A.__webglFramebuffer[lt],T,36064,34069+lt);l(T.texture,vt)&&c(34067,T.texture,T.width,T.height),i.bindTexture(34067,null)}else i.bindTexture(3553,tt.__webglTexture),P(3553,T.texture,vt),N(A.__webglFramebuffer,T,36064,3553),l(T.texture,vt)&&c(3553,T.texture,T.width,T.height),i.bindTexture(3553,null);if(T.depthBuffer){if(A=n.get(T),tt=T.isWebGLRenderTargetCube===!0,T.depthTexture){if(tt)throw Error("target.depthTexture not supported in Cube render targets");if(T&&T.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,A.__webglFramebuffer),!T.depthTexture||!T.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");if(n.get(T.depthTexture).__webglTexture&&T.depthTexture.image.width===T.width&&T.depthTexture.image.height===T.height||(T.depthTexture.image.width=T.width,T.depthTexture.image.height=T.height,T.depthTexture.needsUpdate=!0),S(T.depthTexture,0),A=n.get(T.depthTexture).__webglTexture,T.depthTexture.format===1026)t.framebufferTexture2D(36160,36096,3553,A,0);else if(T.depthTexture.format===1027)t.framebufferTexture2D(36160,33306,3553,A,0);else throw Error("Unknown depthTexture format")}else if(tt)for(A.__webglDepthbuffer=[],tt=0;6>tt;tt++)t.bindFramebuffer(36160,A.__webglFramebuffer[tt]),A.__webglDepthbuffer[tt]=t.createRenderbuffer(),J(A.__webglDepthbuffer[tt],T);else t.bindFramebuffer(36160,A.__webglFramebuffer),A.__webglDepthbuffer=t.createRenderbuffer(),J(A.__webglDepthbuffer,T);t.bindFramebuffer(36160,null)}},this.updateRenderTargetMipmap=function(T){var A=T.texture,tt=h(T);if(l(A,tt)){tt=T.isWebGLRenderTargetCube?34067:3553;var _t=n.get(A).__webglTexture;i.bindTexture(tt,_t),c(tt,A,T.width,T.height),i.bindTexture(tt,null)}}}function ne(t,e,i){return{convert:function(n){if(n===1e3)return 10497;if(n===1001)return 33071;if(n===1002)return 33648;if(n===1003)return 9728;if(n===1004)return 9984;if(n===1005)return 9986;if(n===1006)return 9729;if(n===1007)return 9985;if(n===1008)return 9987;if(n===1009)return 5121;if(n===1017)return 32819;if(n===1018)return 32820;if(n===1019)return 33635;if(n===1010)return 5120;if(n===1011)return 5122;if(n===1012)return 5123;if(n===1013)return 5124;if(n===1014)return 5125;if(n===1015)return 5126;if(n===1016){if(i.isWebGL2)return 5131;var r=e.get("OES_texture_half_float");if(r!==null)return r.HALF_FLOAT_OES}if(n===1021)return 6406;if(n===1022)return 6407;if(n===1023)return 6408;if(n===1024)return 6409;if(n===1025)return 6410;if(n===1026)return 6402;if(n===1027)return 34041;if(n===1028)return 6403;if(n===100)return 32774;if(n===101)return 32778;if(n===102)return 32779;if(n===200)return 0;if(n===201)return 1;if(n===202)return 768;if(n===203)return 769;if(n===204)return 770;if(n===205)return 771;if(n===206)return 772;if(n===207)return 773;if(n===208)return 774;if(n===209)return 775;if(n===210)return 776;if((n===33776||n===33777||n===33778||n===33779)&&(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null)){if(n===33776)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===33777)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===33778)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===33779)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===35840||n===35841||n===35842||n===35843)&&(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null)){if(n===35840)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===35841)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===35842)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===35843)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===36196&&(r=e.get("WEBGL_compressed_texture_etc1"),r!==null))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===37808||n===37809||n===37810||n===37811||n===37812||n===37813||n===37814||n===37815||n===37816||n===37817||n===37818||n===37819||n===37820||n===37821)&&(r=e.get("WEBGL_compressed_texture_astc"),r!==null))return n;if(n===103||n===104){if(i.isWebGL2){if(n===103)return 32775;if(n===104)return 32776}if(r=e.get("EXT_blend_minmax"),r!==null){if(n===103)return r.MIN_EXT;if(n===104)return r.MAX_EXT}}if(n===1020){if(i.isWebGL2)return 34042;if(r=e.get("WEBGL_depth_texture"),r!==null)return r.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Pe(){b.call(this),this.type="Group"}function Kt(){b.call(this),this.type="Camera",this.matrixWorldInverse=new ft,this.projectionMatrix=new ft,this.projectionMatrixInverse=new ft}function Bt(t,e,i,n){Kt.call(this),this.type="PerspectiveCamera",this.fov=t!==void 0?t:50,this.zoom=1,this.near=i!==void 0?i:.1,this.far=n!==void 0?n:2e3,this.focus=10,this.aspect=e!==void 0?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function te(t){Bt.call(this),this.cameras=t||[]}function It(t,e,i){_a.setFromMatrixPosition(e.matrixWorld),xa.setFromMatrixPosition(i.matrixWorld);var n=_a.distanceTo(xa),r=e.projectionMatrix.elements,o=i.projectionMatrix.elements,s=r[14]/(r[10]-1);i=r[14]/(r[10]+1);var a=(r[9]+1)/r[5],h=(r[9]-1)/r[5],l=(r[8]-1)/r[0],c=(o[8]+1)/o[0];r=s*l,o=s*c,c=n/(-l+c),l=c*-l,e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(l),t.translateZ(c),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.getInverse(t.matrixWorld),e=s+c,s=i+c,t.projectionMatrix.makePerspective(r-l,o+(n-l),a*i/s*e,h*i/s*e,e,s)}function Le(t){function e(){return r!==null&&r.isPresenting===!0}function i(){if(e()){var T=r.getEyeParameters("left"),A=T.renderWidth*c;T=T.renderHeight*c,J=t.getPixelRatio(),N=t.getSize(),t.setDrawingBufferSize(2*A,T,1),ot.start()}else n.enabled&&t.setDrawingBufferSize(N.width,N.height,J),ot.stop()}var n=this,r=null,o=null,s=null,a=[],h=new ft,l=new ft,c=1,u="stage";typeof window<"u"&&"VRFrameData"in window&&(o=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",i,!1));var d=new ft,g=new at,w=new x,S=new Bt;S.bounds=new Y(0,0,.5,1),S.layers.enable(1);var P=new Bt;P.bounds=new Y(.5,0,.5,1),P.layers.enable(2);var k=new te([S,P]);k.layers.enable(1),k.layers.enable(2);var N,J,V=[];this.enabled=!1,this.getController=function(T){var A=a[T];return A===void 0&&(A=new Pe,A.matrixAutoUpdate=!1,A.visible=!1,a[T]=A),A},this.getDevice=function(){return r},this.setDevice=function(T){T!==void 0&&(r=T),ot.setContext(T)},this.setFramebufferScaleFactor=function(T){c=T},this.setFrameOfReferenceType=function(T){u=T},this.setPoseTarget=function(T){T!==void 0&&(s=T)},this.getCamera=function(T){var A=u==="stage"?1.6:0;if(r===null)return T.position.set(0,A,0),T;if(r.depthNear=T.near,r.depthFar=T.far,r.getFrameData(o),u==="stage"){var tt=r.stageParameters;tt?h.fromArray(tt.sittingToStandingTransform):h.makeTranslation(0,A,0)}if(A=o.pose,tt=s!==null?s:T,tt.matrix.copy(h),tt.matrix.decompose(tt.position,tt.quaternion,tt.scale),A.orientation!==null&&(g.fromArray(A.orientation),tt.quaternion.multiply(g)),A.position!==null&&(g.setFromRotationMatrix(h),w.fromArray(A.position),w.applyQuaternion(g),tt.position.add(w)),tt.updateMatrixWorld(),r.isPresenting===!1)return T;S.near=T.near,P.near=T.near,S.far=T.far,P.far=T.far,S.matrixWorldInverse.fromArray(o.leftViewMatrix),P.matrixWorldInverse.fromArray(o.rightViewMatrix),l.getInverse(h),u==="stage"&&(S.matrixWorldInverse.multiply(l),P.matrixWorldInverse.multiply(l)),T=tt.parent,T!==null&&(d.getInverse(T.matrixWorld),S.matrixWorldInverse.multiply(d),P.matrixWorldInverse.multiply(d)),S.matrixWorld.getInverse(S.matrixWorldInverse),P.matrixWorld.getInverse(P.matrixWorldInverse),S.projectionMatrix.fromArray(o.leftProjectionMatrix),P.projectionMatrix.fromArray(o.rightProjectionMatrix),It(k,S,P),T=r.getLayers(),T.length&&(T=T[0],T.leftBounds!==null&&T.leftBounds.length===4&&S.bounds.fromArray(T.leftBounds),T.rightBounds!==null&&T.rightBounds.length===4&&P.bounds.fromArray(T.rightBounds));t:for(T=0;T<a.length;T++){A=a[T];e:{tt=T;for(var _t=navigator.getGamepads&&navigator.getGamepads(),vt=0,lt=0,Ht=_t.length;vt<Ht;vt++){var Dt=_t[vt];if(Dt&&(Dt.id==="Daydream Controller"||Dt.id==="Gear VR Controller"||Dt.id==="Oculus Go Controller"||Dt.id==="OpenVR Gamepad"||Dt.id.startsWith("Oculus Touch")||Dt.id.startsWith("Spatial Controller"))){if(lt===tt){tt=Dt;break e}lt++}}tt=void 0}if(tt!==void 0&&tt.pose!==void 0){if(tt.pose===null)break t;_t=tt.pose,_t.hasPosition===!1&&A.position.set(.2,-.6,-.05),_t.position!==null&&A.position.fromArray(_t.position),_t.orientation!==null&&A.quaternion.fromArray(_t.orientation),A.matrix.compose(A.position,A.quaternion,A.scale),A.matrix.premultiply(h),A.matrix.decompose(A.position,A.quaternion,A.scale),A.matrixWorldNeedsUpdate=!0,A.visible=!0,_t=tt.id==="Daydream Controller"?0:1,V[T]!==tt.buttons[_t].pressed&&(V[T]=tt.buttons[_t].pressed,V[T]===!0?A.dispatchEvent({type:"selectstart"}):(A.dispatchEvent({type:"selectend"}),A.dispatchEvent({type:"select"})))}else A.visible=!1}return k},this.getStandingMatrix=function(){return h},this.isPresenting=e;var ot=new m;this.setAnimationLoop=function(T){ot.setAnimationLoop(T)},this.submitFrame=function(){e()&&r.submitFrame()},this.dispose=function(){typeof window<"u"&&window.removeEventListener("vrdisplaypresentchange",i)}}function Zt(t){function e(){return a!==null&&l!==null}function i(J){var V=d[g.indexOf(J.inputSource)];V&&V.dispatchEvent({type:J.type})}function n(){t.setFramebuffer(null),N.stop()}function r(J,V){V===null?J.matrixWorld.copy(J.matrix):J.matrixWorld.multiplyMatrices(V.matrixWorld,J.matrix),J.matrixWorldInverse.getInverse(J.matrixWorld)}var o=t.context,s=null,a=null,h=1,l=null,c="stage",u=null,d=[],g=[],w=new Bt;w.layers.enable(1),w.viewport=new Y;var S=new Bt;S.layers.enable(2),S.viewport=new Y;var P=new te([w,S]);P.layers.enable(1),P.layers.enable(2),this.enabled=!1,this.getController=function(J){var V=d[J];return V===void 0&&(V=new Pe,V.matrixAutoUpdate=!1,V.visible=!1,d[J]=V),V},this.getDevice=function(){return s},this.setDevice=function(J){J!==void 0&&(s=J),J instanceof XRDevice&&o.setCompatibleXRDevice(J)},this.setFramebufferScaleFactor=function(J){h=J},this.setFrameOfReferenceType=function(J){c=J},this.setSession=function(J){a=J,a!==null&&(a.addEventListener("select",i),a.addEventListener("selectstart",i),a.addEventListener("selectend",i),a.addEventListener("end",n),a.baseLayer=new XRWebGLLayer(a,o,{framebufferScaleFactor:h}),a.requestFrameOfReference(c).then(function(V){l=V,t.setFramebuffer(a.baseLayer.framebuffer),N.setContext(a),N.start()}),g=a.getInputSources(),a.addEventListener("inputsourceschange",function(){g=a.getInputSources(),console.log(g);for(var V=0;V<d.length;V++)d[V].userData.inputSource=g[V]}))},this.getCamera=function(J){if(e()){var V=J.parent,ot=P.cameras;r(P,V);for(var T=0;T<ot.length;T++)r(ot[T],V);for(J.matrixWorld.copy(P.matrixWorld),J=J.children,T=0,V=J.length;T<V;T++)J[T].updateMatrixWorld(!0);return It(P,w,S),P}return J},this.isPresenting=e;var k=null,N=new m;N.setAnimationLoop(function(J,V){if(u=V.getDevicePose(l),u!==null)for(var ot=a.baseLayer,T=V.views,A=0;A<T.length;A++){var tt=T[A],_t=ot.getViewport(tt),vt=u.getViewMatrix(tt),lt=P.cameras[A];lt.matrix.fromArray(vt).getInverse(lt.matrix),lt.projectionMatrix.fromArray(tt.projectionMatrix),lt.viewport.set(_t.x,_t.y,_t.width,_t.height),A===0&&P.matrix.copy(lt.matrix)}for(A=0;A<d.length;A++){if(ot=d[A],(T=g[A])&&(T=V.getInputPose(T,l),T!==null)){"targetRay"in T?ot.matrix.elements=T.targetRay.transformMatrix:"pointerMatrix"in T&&(ot.matrix.elements=T.pointerMatrix),ot.matrix.decompose(ot.position,ot.rotation,ot.scale),ot.visible=!0;continue}ot.visible=!1}k&&k(J)}),this.setAnimationLoop=function(J){k=J},this.dispose=function(){},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}function Ft(t){var e;function i(){xe=new en(Mt),ve=new Vi(Mt,xe,t),ve.isWebGL2||(xe.get("WEBGL_depth_texture"),xe.get("OES_texture_float"),xe.get("OES_texture_half_float"),xe.get("OES_texture_half_float_linear"),xe.get("OES_standard_derivatives"),xe.get("OES_element_index_uint"),xe.get("ANGLE_instanced_arrays")),xe.get("OES_texture_float_linear"),dn=new ne(Mt,xe,ve),we=new At(Mt,xe,dn,ve),we.scissor(Ye.copy(ye).multiplyScalar(ge)),we.viewport(li.copy(nt).multiplyScalar(ge)),Ui=new Si,mi=new L,Ln=new oe(Mt,xe,we,mi,ve,dn,Ui),Jo=new f(Mt),Bs=new ci(Mt,Jo,Ui),Cr=new Ri(Bs,Ui),Ea=new nn(Mt),Jn=new R(lt,xe,ve),Qo=new K,Or=new St,bn=new Mn(lt,we,Cr,T),Pa=new Rn(Mt,xe,Ui,ve),Aa=new Oe(Mt,xe,Ui,ve),Ui.programs=Jn.programs,lt.context=Mt,lt.capabilities=ve,lt.extensions=xe,lt.properties=mi,lt.renderLists=Qo,lt.state=we,lt.info=Ui}function n(I){I.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),Ht=!0}function r(){console.log("THREE.WebGLRenderer: Context Restored."),Ht=!1,i()}function o(I){I=I.target,I.removeEventListener("dispose",o),s(I),mi.remove(I)}function s(I){var j=mi.get(I).program;I.program=void 0,j!==void 0&&Jn.releaseProgram(j)}function a(I,j){I.render(function(z){lt.renderBufferImmediate(z,j)})}function h(I,j,z){if(I.visible!==!1){if(I.layers.test(j.layers)){if(I.isLight)vt.pushLight(I),I.castShadow&&vt.pushShadow(I);else if(I.isSprite){if(!I.frustumCulled||Ze.intersectsSprite(I)){z&&De.setFromMatrixPosition(I.matrixWorld).applyMatrix4(Be);var Wt=Cr.update(I),ee=I.material;_t.push(I,Wt,ee,De.z,null)}}else if(I.isImmediateRenderObject)z&&De.setFromMatrixPosition(I.matrixWorld).applyMatrix4(Be),_t.push(I,null,I.material,De.z,null);else if((I.isMesh||I.isLine||I.isPoints)&&(I.isSkinnedMesh&&I.skeleton.update(),!I.frustumCulled||Ze.intersectsObject(I)))if(z&&De.setFromMatrixPosition(I.matrixWorld).applyMatrix4(Be),Wt=Cr.update(I),ee=I.material,Array.isArray(ee))for(var ce=Wt.groups,jt=0,de=ce.length;jt<de;jt++){var Ue=ce[jt],ni=ee[Ue.materialIndex];ni&&ni.visible&&_t.push(I,Wt,ni,De.z,Ue)}else ee.visible&&_t.push(I,Wt,ee,De.z,null)}for(I=I.children,jt=0,de=I.length;jt<de;jt++)h(I[jt],j,z)}}function l(I,j,z,Wt){for(var ee=0,ce=I.length;ee<ce;ee++){var jt=I[ee],de=jt.object,Ue=jt.geometry,ni=Wt===void 0?jt.material:Wt;if(jt=jt.group,z.isArrayCamera){fi=z;for(var zt=z.cameras,mn=0,Li=zt.length;mn<Li;mn++){var di=zt[mn];if(de.layers.test(di.layers)){if("viewport"in di)we.viewport(li.copy(di.viewport));else{var Fi=di.bounds;we.viewport(li.set(Fi.x*Mi,Fi.y*qt,Fi.z*Mi,Fi.w*qt).multiplyScalar(ge))}vt.setupLights(di),c(de,j,di,Ue,ni,jt)}}}else fi=null,c(de,j,z,Ue,ni,jt)}}function c(I,j,z,Wt,ee,ce){if(I.onBeforeRender(lt,j,z,Wt,ee,ce),vt=Or.get(j,fi||z),I.modelViewMatrix.multiplyMatrices(z.matrixWorldInverse,I.matrixWorld),I.normalMatrix.getNormalMatrix(I.modelViewMatrix),I.isImmediateRenderObject){we.setMaterial(ee);var jt=d(z,j.fog,ee,I);re=e=null,me=!1,a(I,jt)}else lt.renderBufferDirect(z,j.fog,Wt,ee,I,ce);I.onAfterRender(lt,j,z,Wt,ee,ce),vt=Or.get(j,fi||z)}function u(I,j,z){var Wt=mi.get(I),ee=vt.state.lights,ce=Wt.lightsHash,jt=ee.state.hash;z=Jn.getParameters(I,ee.state,vt.state.shadowsArray,j,Yt.numPlanes,Yt.numIntersection,z);var de=Jn.getProgramCode(I,z),Ue=Wt.program,ni=!0;if(Ue===void 0)I.addEventListener("dispose",o);else if(Ue.code!==de)s(I);else{if(ce.stateID!==jt.stateID||ce.directionalLength!==jt.directionalLength||ce.pointLength!==jt.pointLength||ce.spotLength!==jt.spotLength||ce.rectAreaLength!==jt.rectAreaLength||ce.hemiLength!==jt.hemiLength||ce.shadowsLength!==jt.shadowsLength)ce.stateID=jt.stateID,ce.directionalLength=jt.directionalLength,ce.pointLength=jt.pointLength,ce.spotLength=jt.spotLength,ce.rectAreaLength=jt.rectAreaLength,ce.hemiLength=jt.hemiLength,ce.shadowsLength=jt.shadowsLength;else if(z.shaderID!==void 0)return;ni=!1}if(ni&&(z.shaderID?(de=pn[z.shaderID],Wt.shader={name:I.type,uniforms:_i.clone(de.uniforms),vertexShader:de.vertexShader,fragmentShader:de.fragmentShader}):Wt.shader={name:I.type,uniforms:I.uniforms,vertexShader:I.vertexShader,fragmentShader:I.fragmentShader},I.onBeforeCompile(Wt.shader,lt),de=Jn.getProgramCode(I,z),Ue=Jn.acquireProgram(I,Wt.shader,z,de),Wt.program=Ue,I.program=Ue),z=Ue.getAttributes(),I.morphTargets)for(de=I.numSupportedMorphTargets=0;de<lt.maxMorphTargets;de++)0<=z["morphTarget"+de]&&I.numSupportedMorphTargets++;if(I.morphNormals)for(de=I.numSupportedMorphNormals=0;de<lt.maxMorphNormals;de++)0<=z["morphNormal"+de]&&I.numSupportedMorphNormals++;z=Wt.shader.uniforms,(!I.isShaderMaterial&&!I.isRawShaderMaterial||I.clipping===!0)&&(Wt.numClippingPlanes=Yt.numPlanes,Wt.numIntersection=Yt.numIntersection,z.clippingPlanes=Yt.uniform),Wt.fog=j,ce===void 0&&(Wt.lightsHash=ce={}),ce.stateID=jt.stateID,ce.directionalLength=jt.directionalLength,ce.pointLength=jt.pointLength,ce.spotLength=jt.spotLength,ce.rectAreaLength=jt.rectAreaLength,ce.hemiLength=jt.hemiLength,ce.shadowsLength=jt.shadowsLength,I.lights&&(z.ambientLightColor.value=ee.state.ambient,z.directionalLights.value=ee.state.directional,z.spotLights.value=ee.state.spot,z.rectAreaLights.value=ee.state.rectArea,z.pointLights.value=ee.state.point,z.hemisphereLights.value=ee.state.hemi,z.directionalShadowMap.value=ee.state.directionalShadowMap,z.directionalShadowMatrix.value=ee.state.directionalShadowMatrix,z.spotShadowMap.value=ee.state.spotShadowMap,z.spotShadowMatrix.value=ee.state.spotShadowMatrix,z.pointShadowMap.value=ee.state.pointShadowMap,z.pointShadowMatrix.value=ee.state.pointShadowMatrix),I=Wt.program.getUniforms(),I=on.seqWithValue(I.seq,z),Wt.uniformsList=I}function d(I,j,z,Wt){ti=0;var ee=mi.get(z),ce=ee.lightsHash,jt=vt.state.lights.state.hash;ue&&(_e||I!==Ae)&&Yt.setState(z.clippingPlanes,z.clipIntersection,z.clipShadows,I,ee,I===Ae&&z.id===Qt),z.needsUpdate===!1&&(ee.program===void 0||z.fog&&ee.fog!==j?z.needsUpdate=!0:(!z.lights||ce.stateID===jt.stateID&&ce.directionalLength===jt.directionalLength&&ce.pointLength===jt.pointLength&&ce.spotLength===jt.spotLength&&ce.rectAreaLength===jt.rectAreaLength&&ce.hemiLength===jt.hemiLength&&ce.shadowsLength===jt.shadowsLength)&&(ee.numClippingPlanes===void 0||ee.numClippingPlanes===Yt.numPlanes&&ee.numIntersection===Yt.numIntersection)||(z.needsUpdate=!0)),z.needsUpdate&&(u(z,j,Wt),z.needsUpdate=!1);var de=!1,Ue=!1,ni=!1;ce=ee.program,jt=ce.getUniforms();var zt=ee.shader.uniforms;if(we.useProgram(ce.program)&&(ni=Ue=de=!0),z.id!==Qt&&(Qt=z.id,Ue=!0),(de||Ae!==I)&&(jt.setValue(Mt,"projectionMatrix",I.projectionMatrix),ve.logarithmicDepthBuffer&&jt.setValue(Mt,"logDepthBufFC",2/(Math.log(I.far+1)/Math.LN2)),Ae!==I&&(Ae=I,ni=Ue=!0),(z.isShaderMaterial||z.isMeshPhongMaterial||z.isMeshStandardMaterial||z.envMap)&&(de=jt.map.cameraPosition,de!==void 0&&de.setValue(Mt,De.setFromMatrixPosition(I.matrixWorld))),(z.isMeshPhongMaterial||z.isMeshLambertMaterial||z.isMeshBasicMaterial||z.isMeshStandardMaterial||z.isShaderMaterial||z.skinning)&&jt.setValue(Mt,"viewMatrix",I.matrixWorldInverse)),z.skinning&&(jt.setOptional(Mt,Wt,"bindMatrix"),jt.setOptional(Mt,Wt,"bindMatrixInverse"),I=Wt.skeleton))if(de=I.bones,ve.floatVertexTextures){if(I.boneTexture===void 0){de=Math.sqrt(4*de.length),de=Se.ceilPowerOfTwo(de),de=Math.max(de,4);var mn=new Float32Array(de*de*4);mn.set(I.boneMatrices);var Li=new ct(mn,de,de,1023,1015);Li.needsUpdate=!0,I.boneMatrices=mn,I.boneTexture=Li,I.boneTextureSize=de}jt.setValue(Mt,"boneTexture",I.boneTexture),jt.setValue(Mt,"boneTextureSize",I.boneTextureSize)}else jt.setOptional(Mt,I,"boneMatrices");return Ue&&(jt.setValue(Mt,"toneMappingExposure",lt.toneMappingExposure),jt.setValue(Mt,"toneMappingWhitePoint",lt.toneMappingWhitePoint),z.lights&&(Ue=ni,zt.ambientLightColor.needsUpdate=Ue,zt.directionalLights.needsUpdate=Ue,zt.pointLights.needsUpdate=Ue,zt.spotLights.needsUpdate=Ue,zt.rectAreaLights.needsUpdate=Ue,zt.hemisphereLights.needsUpdate=Ue),j&&z.fog&&(zt.fogColor.value=j.color,j.isFog?(zt.fogNear.value=j.near,zt.fogFar.value=j.far):j.isFogExp2&&(zt.fogDensity.value=j.density)),z.isMeshBasicMaterial?g(zt,z):z.isMeshLambertMaterial?(g(zt,z),z.emissiveMap&&(zt.emissiveMap.value=z.emissiveMap)):z.isMeshPhongMaterial?(g(zt,z),z.isMeshToonMaterial?(w(zt,z),z.gradientMap&&(zt.gradientMap.value=z.gradientMap)):w(zt,z)):z.isMeshStandardMaterial?(g(zt,z),z.isMeshPhysicalMaterial?(S(zt,z),zt.reflectivity.value=z.reflectivity,zt.clearCoat.value=z.clearCoat,zt.clearCoatRoughness.value=z.clearCoatRoughness):S(zt,z)):z.isMeshMatcapMaterial?(g(zt,z),z.matcap&&(zt.matcap.value=z.matcap),z.bumpMap&&(zt.bumpMap.value=z.bumpMap,zt.bumpScale.value=z.bumpScale,z.side===1&&(zt.bumpScale.value*=-1)),z.normalMap&&(zt.normalMap.value=z.normalMap,zt.normalScale.value.copy(z.normalScale),z.side===1&&zt.normalScale.value.negate()),z.displacementMap&&(zt.displacementMap.value=z.displacementMap,zt.displacementScale.value=z.displacementScale,zt.displacementBias.value=z.displacementBias)):z.isMeshDepthMaterial?(g(zt,z),z.displacementMap&&(zt.displacementMap.value=z.displacementMap,zt.displacementScale.value=z.displacementScale,zt.displacementBias.value=z.displacementBias)):z.isMeshDistanceMaterial?(g(zt,z),z.displacementMap&&(zt.displacementMap.value=z.displacementMap,zt.displacementScale.value=z.displacementScale,zt.displacementBias.value=z.displacementBias),zt.referencePosition.value.copy(z.referencePosition),zt.nearDistance.value=z.nearDistance,zt.farDistance.value=z.farDistance):z.isMeshNormalMaterial?(g(zt,z),z.bumpMap&&(zt.bumpMap.value=z.bumpMap,zt.bumpScale.value=z.bumpScale,z.side===1&&(zt.bumpScale.value*=-1)),z.normalMap&&(zt.normalMap.value=z.normalMap,zt.normalScale.value.copy(z.normalScale),z.side===1&&zt.normalScale.value.negate()),z.displacementMap&&(zt.displacementMap.value=z.displacementMap,zt.displacementScale.value=z.displacementScale,zt.displacementBias.value=z.displacementBias)):z.isLineBasicMaterial?(zt.diffuse.value=z.color,zt.opacity.value=z.opacity,z.isLineDashedMaterial&&(zt.dashSize.value=z.dashSize,zt.totalSize.value=z.dashSize+z.gapSize,zt.scale.value=z.scale)):z.isPointsMaterial?(zt.diffuse.value=z.color,zt.opacity.value=z.opacity,zt.size.value=z.size*ge,zt.scale.value=.5*qt,zt.map.value=z.map,z.map!==null&&(z.map.matrixAutoUpdate===!0&&z.map.updateMatrix(),zt.uvTransform.value.copy(z.map.matrix))):z.isSpriteMaterial?(zt.diffuse.value=z.color,zt.opacity.value=z.opacity,zt.rotation.value=z.rotation,zt.map.value=z.map,z.map!==null&&(z.map.matrixAutoUpdate===!0&&z.map.updateMatrix(),zt.uvTransform.value.copy(z.map.matrix))):z.isShadowMaterial&&(zt.color.value=z.color,zt.opacity.value=z.opacity),zt.ltc_1!==void 0&&(zt.ltc_1.value=le.LTC_1),zt.ltc_2!==void 0&&(zt.ltc_2.value=le.LTC_2),on.upload(Mt,ee.uniformsList,zt,lt)),z.isShaderMaterial&&z.uniformsNeedUpdate===!0&&(on.upload(Mt,ee.uniformsList,zt,lt),z.uniformsNeedUpdate=!1),z.isSpriteMaterial&&jt.setValue(Mt,"center",Wt.center),jt.setValue(Mt,"modelViewMatrix",Wt.modelViewMatrix),jt.setValue(Mt,"normalMatrix",Wt.normalMatrix),jt.setValue(Mt,"modelMatrix",Wt.matrixWorld),ce}function g(I,j){if(I.opacity.value=j.opacity,j.color&&(I.diffuse.value=j.color),j.emissive&&I.emissive.value.copy(j.emissive).multiplyScalar(j.emissiveIntensity),j.map&&(I.map.value=j.map),j.alphaMap&&(I.alphaMap.value=j.alphaMap),j.specularMap&&(I.specularMap.value=j.specularMap),j.envMap&&(I.envMap.value=j.envMap,I.flipEnvMap.value=j.envMap&&j.envMap.isCubeTexture?-1:1,I.reflectivity.value=j.reflectivity,I.refractionRatio.value=j.refractionRatio,I.maxMipLevel.value=mi.get(j.envMap).__maxMipLevel),j.lightMap&&(I.lightMap.value=j.lightMap,I.lightMapIntensity.value=j.lightMapIntensity),j.aoMap&&(I.aoMap.value=j.aoMap,I.aoMapIntensity.value=j.aoMapIntensity),j.map)var z=j.map;else j.specularMap?z=j.specularMap:j.displacementMap?z=j.displacementMap:j.normalMap?z=j.normalMap:j.bumpMap?z=j.bumpMap:j.roughnessMap?z=j.roughnessMap:j.metalnessMap?z=j.metalnessMap:j.alphaMap?z=j.alphaMap:j.emissiveMap&&(z=j.emissiveMap);z!==void 0&&(z.isWebGLRenderTarget&&(z=z.texture),z.matrixAutoUpdate===!0&&z.updateMatrix(),I.uvTransform.value.copy(z.matrix))}function w(I,j){I.specular.value=j.specular,I.shininess.value=Math.max(j.shininess,1e-4),j.emissiveMap&&(I.emissiveMap.value=j.emissiveMap),j.bumpMap&&(I.bumpMap.value=j.bumpMap,I.bumpScale.value=j.bumpScale,j.side===1&&(I.bumpScale.value*=-1)),j.normalMap&&(I.normalMap.value=j.normalMap,I.normalScale.value.copy(j.normalScale),j.side===1&&I.normalScale.value.negate()),j.displacementMap&&(I.displacementMap.value=j.displacementMap,I.displacementScale.value=j.displacementScale,I.displacementBias.value=j.displacementBias)}function S(I,j){I.roughness.value=j.roughness,I.metalness.value=j.metalness,j.roughnessMap&&(I.roughnessMap.value=j.roughnessMap),j.metalnessMap&&(I.metalnessMap.value=j.metalnessMap),j.emissiveMap&&(I.emissiveMap.value=j.emissiveMap),j.bumpMap&&(I.bumpMap.value=j.bumpMap,I.bumpScale.value=j.bumpScale,j.side===1&&(I.bumpScale.value*=-1)),j.normalMap&&(I.normalMap.value=j.normalMap,I.normalScale.value.copy(j.normalScale),j.side===1&&I.normalScale.value.negate()),j.displacementMap&&(I.displacementMap.value=j.displacementMap,I.displacementScale.value=j.displacementScale,I.displacementBias.value=j.displacementBias),j.envMap&&(I.envMapIntensity.value=j.envMapIntensity)}console.log("THREE.WebGLRenderer","98"),t=t||{};var P=t.canvas!==void 0?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),k=t.context!==void 0?t.context:null,N=t.alpha!==void 0?t.alpha:!1,J=t.depth!==void 0?t.depth:!0,V=t.stencil!==void 0?t.stencil:!0,ot=t.antialias!==void 0?t.antialias:!1,T=t.premultipliedAlpha!==void 0?t.premultipliedAlpha:!0,A=t.preserveDrawingBuffer!==void 0?t.preserveDrawingBuffer:!1,tt=t.powerPreference!==void 0?t.powerPreference:"default",_t=null,vt=null;this.domElement=P,this.context=null,this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1,this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var lt=this,Ht=!1,Dt=null,$t=null,Xt=null,Qt=-1,re=e=null,me=!1,Ae=null,fi=null,li=new Y,Ye=new Y,pi=null,ti=0,Mi=P.width,qt=P.height,ge=1,nt=new Y(0,0,Mi,qt),ye=new Y(0,0,Mi,qt),Te=!1,Ze=new Q,Yt=new Di,ue=!1,_e=!1,Be=new ft,De=new x;try{N={alpha:N,depth:J,stencil:V,antialias:ot,premultipliedAlpha:T,preserveDrawingBuffer:A,powerPreference:tt},P.addEventListener("webglcontextlost",n,!1),P.addEventListener("webglcontextrestored",r,!1);var Mt=k||P.getContext("webgl",N)||P.getContext("experimental-webgl",N);if(Mt===null)throw P.getContext("webgl")!==null?Error("Error creating WebGL context with your selected attributes."):Error("Error creating WebGL context.");Mt.getShaderPrecisionFormat===void 0&&(Mt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(I){console.error("THREE.WebGLRenderer: "+I.message)}var xe,ve,we,Ui,mi,Ln,Jo,Bs,Cr,Jn,Qo,Or,bn,Ea,Pa,Aa,dn;i();var fn=null;typeof navigator<"u"&&(fn="xr"in navigator?new Zt(lt):new Le(lt)),this.vr=fn;var La=new Nt(lt,Cr,ve.maxTextureSize);this.shadowMap=La,this.getContext=function(){return Mt},this.getContextAttributes=function(){return Mt.getContextAttributes()},this.forceContextLoss=function(){var I=xe.get("WEBGL_lose_context");I&&I.loseContext()},this.forceContextRestore=function(){var I=xe.get("WEBGL_lose_context");I&&I.restoreContext()},this.getPixelRatio=function(){return ge},this.setPixelRatio=function(I){I!==void 0&&(ge=I,this.setSize(Mi,qt,!1))},this.getSize=function(){return{width:Mi,height:qt}},this.setSize=function(I,j,z){fn.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(Mi=I,qt=j,P.width=I*ge,P.height=j*ge,z!==!1&&(P.style.width=I+"px",P.style.height=j+"px"),this.setViewport(0,0,I,j))},this.getDrawingBufferSize=function(){return{width:Mi*ge,height:qt*ge}},this.setDrawingBufferSize=function(I,j,z){Mi=I,qt=j,ge=z,P.width=I*z,P.height=j*z,this.setViewport(0,0,I,j)},this.getCurrentViewport=function(){return li},this.setViewport=function(I,j,z,Wt){nt.set(I,qt-j-Wt,z,Wt),we.viewport(li.copy(nt).multiplyScalar(ge))},this.setScissor=function(I,j,z,Wt){ye.set(I,qt-j-Wt,z,Wt),we.scissor(Ye.copy(ye).multiplyScalar(ge))},this.setScissorTest=function(I){we.setScissorTest(Te=I)},this.getClearColor=function(){return bn.getClearColor()},this.setClearColor=function(){bn.setClearColor.apply(bn,arguments)},this.getClearAlpha=function(){return bn.getClearAlpha()},this.setClearAlpha=function(){bn.setClearAlpha.apply(bn,arguments)},this.clear=function(I,j,z){var Wt=0;(I===void 0||I)&&(Wt|=16384),(j===void 0||j)&&(Wt|=256),(z===void 0||z)&&(Wt|=1024),Mt.clear(Wt)},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(){P.removeEventListener("webglcontextlost",n,!1),P.removeEventListener("webglcontextrestored",r,!1),Qo.dispose(),Or.dispose(),mi.dispose(),Cr.dispose(),fn.dispose(),$o.stop()},this.renderBufferImmediate=function(I,j){we.initAttributes();var z=mi.get(I);I.hasPositions&&!z.position&&(z.position=Mt.createBuffer()),I.hasNormals&&!z.normal&&(z.normal=Mt.createBuffer()),I.hasUvs&&!z.uv&&(z.uv=Mt.createBuffer()),I.hasColors&&!z.color&&(z.color=Mt.createBuffer()),j=j.getAttributes(),I.hasPositions&&(Mt.bindBuffer(34962,z.position),Mt.bufferData(34962,I.positionArray,35048),we.enableAttribute(j.position),Mt.vertexAttribPointer(j.position,3,5126,!1,0,0)),I.hasNormals&&(Mt.bindBuffer(34962,z.normal),Mt.bufferData(34962,I.normalArray,35048),we.enableAttribute(j.normal),Mt.vertexAttribPointer(j.normal,3,5126,!1,0,0)),I.hasUvs&&(Mt.bindBuffer(34962,z.uv),Mt.bufferData(34962,I.uvArray,35048),we.enableAttribute(j.uv),Mt.vertexAttribPointer(j.uv,2,5126,!1,0,0)),I.hasColors&&(Mt.bindBuffer(34962,z.color),Mt.bufferData(34962,I.colorArray,35048),we.enableAttribute(j.color),Mt.vertexAttribPointer(j.color,3,5126,!1,0,0)),we.disableUnusedAttributes(),Mt.drawArrays(4,0,I.count),I.count=0},this.renderBufferDirect=function(I,j,z,Wt,ee,ce){var jt=ee.isMesh&&0>ee.normalMatrix.determinant();we.setMaterial(Wt,jt);var de=d(I,j,Wt,ee),Ue=!1;(e!==z.id||re!==de.id||me!==(Wt.wireframe===!0))&&(e=z.id,re=de.id,me=Wt.wireframe===!0,Ue=!0),ee.morphTargetInfluences&&(Ea.update(ee,z,Wt,de),Ue=!0),jt=z.index;var ni=z.attributes.position;if(j=1,Wt.wireframe===!0&&(jt=Bs.getWireframeAttribute(z),j=2),I=Pa,jt!==null){var zt=Jo.get(jt);I=Aa,I.setIndex(zt)}if(Ue){if(z&&z.isInstancedBufferGeometry&!ve.isWebGL2&&xe.get("ANGLE_instanced_arrays")===null)console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{we.initAttributes(),Ue=z.attributes,de=de.getAttributes();var mn=Wt.defaultAttributeValues;for($n in de){var Li=de[$n];if(0<=Li){var di=Ue[$n];if(di!==void 0){var Fi=di.normalized,ba=di.itemSize,Qn=Jo.get(di);if(Qn!==void 0){var Ra=Qn.buffer,Ca=Qn.type;if(Qn=Qn.bytesPerElement,di.isInterleavedBufferAttribute){var Ir=di.data,yh=Ir.stride;di=di.offset,Ir&&Ir.isInstancedInterleavedBuffer?(we.enableAttributeAndDivisor(Li,Ir.meshPerAttribute),z.maxInstancedCount===void 0&&(z.maxInstancedCount=Ir.meshPerAttribute*Ir.count)):we.enableAttribute(Li),Mt.bindBuffer(34962,Ra),Mt.vertexAttribPointer(Li,ba,Ca,Fi,yh*Qn,di*Qn)}else di.isInstancedBufferAttribute?(we.enableAttributeAndDivisor(Li,di.meshPerAttribute),z.maxInstancedCount===void 0&&(z.maxInstancedCount=di.meshPerAttribute*di.count)):we.enableAttribute(Li),Mt.bindBuffer(34962,Ra),Mt.vertexAttribPointer(Li,ba,Ca,Fi,0,0)}}else if(mn!==void 0&&(Fi=mn[$n],Fi!==void 0))switch(Fi.length){case 2:Mt.vertexAttrib2fv(Li,Fi);break;case 3:Mt.vertexAttrib3fv(Li,Fi);break;case 4:Mt.vertexAttrib4fv(Li,Fi);break;default:Mt.vertexAttrib1fv(Li,Fi)}}}we.disableUnusedAttributes()}jt!==null&&Mt.bindBuffer(34963,zt.buffer)}zt=1/0,jt!==null?zt=jt.count:ni!==void 0&&(zt=ni.count),jt=z.drawRange.start*j,ni=ce!==null?ce.start*j:0;var $n=Math.max(jt,ni);if(ce=Math.max(0,Math.min(zt,jt+z.drawRange.count*j,ni+(ce!==null?ce.count*j:1/0))-1-$n+1),ce!==0){if(ee.isMesh)if(Wt.wireframe===!0)we.setLineWidth(Wt.wireframeLinewidth*($t===null?ge:1)),I.setMode(1);else switch(ee.drawMode){case 0:I.setMode(4);break;case 1:I.setMode(5);break;case 2:I.setMode(6)}else ee.isLine?(Wt=Wt.linewidth,Wt===void 0&&(Wt=1),we.setLineWidth(Wt*($t===null?ge:1)),ee.isLineSegments?I.setMode(1):ee.isLineLoop?I.setMode(2):I.setMode(3)):ee.isPoints?I.setMode(0):ee.isSprite&&I.setMode(4);z&&z.isInstancedBufferGeometry?0<z.maxInstancedCount&&I.renderInstances(z,$n,ce):I.render($n,ce)}},this.compile=function(I,j){vt=Or.get(I,j),vt.init(),I.traverse(function(z){z.isLight&&(vt.pushLight(z),z.castShadow&&vt.pushShadow(z))}),vt.setupLights(j),I.traverse(function(z){if(z.material)if(Array.isArray(z.material))for(var Wt=0;Wt<z.material.length;Wt++)u(z.material[Wt],I.fog,z);else u(z.material,I.fog,z)})};var Us=null,$o=new m;$o.setAnimationLoop(function(I){fn.isPresenting()||Us&&Us(I)}),typeof window<"u"&&$o.setContext(window),this.setAnimationLoop=function(I){Us=I,fn.setAnimationLoop(I),$o.start()},this.render=function(I,j,z,Wt){if(!j||!j.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!Ht){re=e=null,me=!1,Qt=-1,Ae=null,I.autoUpdate===!0&&I.updateMatrixWorld(),j.parent===null&&j.updateMatrixWorld(),fn.enabled&&(j=fn.getCamera(j)),vt=Or.get(I,j),vt.init(),I.onBeforeRender(lt,I,j,z),Be.multiplyMatrices(j.projectionMatrix,j.matrixWorldInverse),Ze.setFromMatrix(Be),_e=this.localClippingEnabled,ue=Yt.init(this.clippingPlanes,_e,j),_t=Qo.get(I,j),_t.init(),h(I,j,lt.sortObjects),lt.sortObjects===!0&&_t.sort(),ue&&Yt.beginShadows(),La.render(vt.state.shadowsArray,I,j),vt.setupLights(j),ue&&Yt.endShadows(),this.info.autoReset&&this.info.reset(),z===void 0&&(z=null),this.setRenderTarget(z),bn.render(_t,I,j,Wt),Wt=_t.opaque;var ee=_t.transparent;if(I.overrideMaterial){var ce=I.overrideMaterial;Wt.length&&l(Wt,I,j,ce),ee.length&&l(ee,I,j,ce)}else Wt.length&&l(Wt,I,j),ee.length&&l(ee,I,j);z&&Ln.updateRenderTargetMipmap(z),we.buffers.depth.setTest(!0),we.buffers.depth.setMask(!0),we.buffers.color.setMask(!0),we.setPolygonOffset(!1),I.onAfterRender(lt,I,j),fn.enabled&&fn.submitFrame(),vt=_t=null}},this.allocTextureUnit=function(){var I=ti;return I>=ve.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+I+" texture units while this GPU supports only "+ve.maxTextures),ti+=1,I},this.setTexture2D=function(){var I=!1;return function(j,z){j&&j.isWebGLRenderTarget&&(I||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),I=!0),j=j.texture),Ln.setTexture2D(j,z)}}(),this.setTexture3D=function(){return function(I,j){Ln.setTexture3D(I,j)}}(),this.setTexture=function(){var I=!1;return function(j,z){I||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),I=!0),Ln.setTexture2D(j,z)}}(),this.setTextureCube=function(){var I=!1;return function(j,z){j&&j.isWebGLRenderTargetCube&&(I||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),I=!0),j=j.texture),j&&j.isCubeTexture||Array.isArray(j.image)&&j.image.length===6?Ln.setTextureCube(j,z):Ln.setTextureCubeDynamic(j,z)}}(),this.setFramebuffer=function(I){Dt=I},this.getRenderTarget=function(){return $t},this.setRenderTarget=function(I){($t=I)&&mi.get(I).__webglFramebuffer===void 0&&Ln.setupRenderTarget(I);var j=Dt,z=!1;I?(j=mi.get(I).__webglFramebuffer,I.isWebGLRenderTargetCube&&(j=j[I.activeCubeFace],z=!0),li.copy(I.viewport),Ye.copy(I.scissor),pi=I.scissorTest):(li.copy(nt).multiplyScalar(ge),Ye.copy(ye).multiplyScalar(ge),pi=Te),Xt!==j&&(Mt.bindFramebuffer(36160,j),Xt=j),we.viewport(li),we.scissor(Ye),we.setScissorTest(pi),z&&(z=mi.get(I.texture),Mt.framebufferTexture2D(36160,36064,34069+I.activeCubeFace,z.__webglTexture,I.activeMipMapLevel))},this.readRenderTargetPixels=function(I,j,z,Wt,ee,ce){if(I&&I.isWebGLRenderTarget){var jt=mi.get(I).__webglFramebuffer;if(jt){var de=!1;jt!==Xt&&(Mt.bindFramebuffer(36160,jt),de=!0);try{var Ue=I.texture,ni=Ue.format,zt=Ue.type;ni!==1023&&dn.convert(ni)!==Mt.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):zt===1009||dn.convert(zt)===Mt.getParameter(35738)||zt===1015&&(ve.isWebGL2||xe.get("OES_texture_float")||xe.get("WEBGL_color_buffer_float"))||zt===1016&&(ve.isWebGL2?xe.get("EXT_color_buffer_float"):xe.get("EXT_color_buffer_half_float"))?Mt.checkFramebufferStatus(36160)===36053?0<=j&&j<=I.width-Wt&&0<=z&&z<=I.height-ee&&Mt.readPixels(j,z,Wt,ee,dn.convert(ni),dn.convert(zt),ce):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{de&&Mt.bindFramebuffer(36160,Xt)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(I,j,z){var Wt=j.image.width,ee=j.image.height,ce=dn.convert(j.format);this.setTexture2D(j,0),Mt.copyTexImage2D(3553,z||0,ce,I.x,I.y,Wt,ee,0)},this.copyTextureToTexture=function(I,j,z,Wt){var ee=j.image.width,ce=j.image.height,jt=dn.convert(z.format),de=dn.convert(z.type);this.setTexture2D(z,0),j.isDataTexture?Mt.texSubImage2D(3553,Wt||0,I.x,I.y,ee,ce,jt,de,j.image.data):Mt.texSubImage2D(3553,Wt||0,I.x,I.y,jt,de,j.image)}}function Jt(t,e){this.name="",this.color=new H(t),this.density=e!==void 0?e:25e-5}function yi(t,e,i){this.name="",this.color=new H(t),this.near=e!==void 0?e:1,this.far=i!==void 0?i:1e3}function qi(){b.call(this),this.type="Scene",this.overrideMaterial=this.fog=this.background=null,this.autoUpdate=!0}function Ge(t,e){this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function He(t,e,i,n){this.data=t,this.itemSize=e,this.offset=i,this.normalized=n===!0}function We(t){fe.call(this),this.type="SpriteMaterial",this.color=new H(16777215),this.map=null,this.rotation=0,this.sizeAttenuation=!0,this.lights=!1,this.transparent=!0,this.setValues(t)}function ei(t){if(b.call(this),this.type="Sprite",Rr===void 0){Rr=new Rt;var e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);e=new Ge(e,5),Rr.setIndex([0,1,2,0,2,3]),Rr.addAttribute("position",new He(e,3,0,!1)),Rr.addAttribute("uv",new He(e,2,3,!1))}this.geometry=Rr,this.material=t!==void 0?t:new We,this.center=new Z(.5,.5)}function ii(){b.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function ai(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),e===void 0)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],t=0,e=this.bones.length;t<e;t++)this.boneInverses.push(new ft)}function hi(){b.call(this),this.type="Bone"}function ke(t,e){Ke.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new ft,this.bindMatrixInverse=new ft,t=this.initBones(),t=new ai(t),this.bind(t,this.matrixWorld),this.normalizeSkinWeights()}function Ne(t){fe.call(this),this.type="LineBasicMaterial",this.color=new H(16777215),this.linewidth=1,this.linejoin=this.linecap="round",this.lights=!1,this.setValues(t)}function qe(t,e,i){i===1&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),b.call(this),this.type="Line",this.geometry=t!==void 0?t:new Rt,this.material=e!==void 0?e:new Ne({color:16777215*Math.random()})}function be(t,e){qe.call(this,t,e),this.type="LineSegments"}function an(t,e){qe.call(this,t,e),this.type="LineLoop"}function xi(t){fe.call(this),this.type="PointsMaterial",this.color=new H(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=this.morphTargets=!1,this.setValues(t)}function nr(t,e){b.call(this),this.type="Points",this.geometry=t!==void 0?t:new Rt,this.material=e!==void 0?e:new xi({color:16777215*Math.random()})}function os(t,e,i,n,r,o,s,a,h){Ct.call(this,t,e,i,n,r,o,s,a,h),this.generateMipmaps=!1}function rr(t,e,i,n,r,o,s,a,h,l,c,u){Ct.call(this,null,o,s,a,h,l,n,r,c,u),this.image={width:e,height:i},this.mipmaps=t,this.generateMipmaps=this.flipY=!1}function Ur(t,e,i,n,r,o,s,a,h){Ct.call(this,t,e,i,n,r,o,s,a,h),this.needsUpdate=!0}function Fr(t,e,i,n,r,o,s,a,h,l){if(l=l!==void 0?l:1026,l!==1026&&l!==1027)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&l===1026&&(i=1012),i===void 0&&l===1027&&(i=1020),Ct.call(this,null,n,r,o,s,a,l,i,h),this.image={width:t,height:e},this.magFilter=s!==void 0?s:1003,this.minFilter=a!==void 0?a:1003,this.generateMipmaps=this.flipY=!1}function or(t){Rt.call(this),this.type="WireframeGeometry";var e=[],i,n,r,o=[0,0],s={},a=["a","b","c"];if(t&&t.isGeometry){var h=t.faces,l=0;for(n=h.length;l<n;l++){var c=h[l];for(i=0;3>i;i++){var u=c[a[i]],d=c[a[(i+1)%3]];o[0]=Math.min(u,d),o[1]=Math.max(u,d),u=o[0]+","+o[1],s[u]===void 0&&(s[u]={index1:o[0],index2:o[1]})}}for(u in s)l=s[u],a=t.vertices[l.index1],e.push(a.x,a.y,a.z),a=t.vertices[l.index2],e.push(a.x,a.y,a.z)}else if(t&&t.isBufferGeometry)if(a=new x,t.index!==null){h=t.attributes.position,c=t.index;var g=t.groups;for(g.length===0&&(g=[{start:0,count:c.count,materialIndex:0}]),t=0,r=g.length;t<r;++t)for(l=g[t],i=l.start,n=l.count,l=i,n=i+n;l<n;l+=3)for(i=0;3>i;i++)u=c.getX(l+i),d=c.getX(l+(i+1)%3),o[0]=Math.min(u,d),o[1]=Math.max(u,d),u=o[0]+","+o[1],s[u]===void 0&&(s[u]={index1:o[0],index2:o[1]});for(u in s)l=s[u],a.fromBufferAttribute(h,l.index1),e.push(a.x,a.y,a.z),a.fromBufferAttribute(h,l.index2),e.push(a.x,a.y,a.z)}else for(h=t.attributes.position,l=0,n=h.count/3;l<n;l++)for(i=0;3>i;i++)s=3*l+i,a.fromBufferAttribute(h,s),e.push(a.x,a.y,a.z),s=3*l+(i+1)%3,a.fromBufferAttribute(h,s),e.push(a.x,a.y,a.z);this.addAttribute("position",new ut(e,3))}function Gr(t,e,i){F.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:i},this.fromBufferGeometry(new sr(t,e,i)),this.mergeVertices()}function sr(t,e,i){Rt.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:i};var n=[],r=[],o=[],s=[],a=new x,h=new x,l=new x,c=new x,u=new x,d,g;3>t.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var w=e+1;for(d=0;d<=i;d++){var S=d/i;for(g=0;g<=e;g++){var P=g/e;t(P,S,h),r.push(h.x,h.y,h.z),0<=P-1e-5?(t(P-1e-5,S,l),c.subVectors(h,l)):(t(P+1e-5,S,l),c.subVectors(l,h)),0<=S-1e-5?(t(P,S-1e-5,l),u.subVectors(h,l)):(t(P,S+1e-5,l),u.subVectors(l,h)),a.crossVectors(c,u).normalize(),o.push(a.x,a.y,a.z),s.push(P,S)}}for(d=0;d<i;d++)for(g=0;g<e;g++)t=d*w+g+1,a=(d+1)*w+g+1,h=(d+1)*w+g,n.push(d*w+g,t,h),n.push(t,a,h);this.setIndex(n),this.addAttribute("position",new ut(r,3)),this.addAttribute("normal",new ut(o,3)),this.addAttribute("uv",new ut(s,2))}function Hr(t,e,i,n){F.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},this.fromBufferGeometry(new zi(t,e,i,n)),this.mergeVertices()}function zi(t,e,i,n){function r(l){a.push(l.x,l.y,l.z)}function o(l,c){l*=3,c.x=t[l+0],c.y=t[l+1],c.z=t[l+2]}function s(l,c,u,d){0>d&&l.x===1&&(h[c]=l.x-1),u.x===0&&u.z===0&&(h[c]=d/2/Math.PI+.5)}Rt.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},i=i||1,n=n||0;var a=[],h=[];(function(l){for(var c=new x,u=new x,d=new x,g=0;g<e.length;g+=3){o(e[g+0],c),o(e[g+1],u),o(e[g+2],d);var w,S,P=c,k=u,N=d,J=Math.pow(2,l),V=[];for(S=0;S<=J;S++){V[S]=[];var ot=P.clone().lerp(N,S/J),T=k.clone().lerp(N,S/J),A=J-S;for(w=0;w<=A;w++)V[S][w]=w===0&&S===J?ot:ot.clone().lerp(T,w/A)}for(S=0;S<J;S++)for(w=0;w<2*(J-S)-1;w++)P=Math.floor(w/2),w%2===0?(r(V[S][P+1]),r(V[S+1][P]),r(V[S][P])):(r(V[S][P+1]),r(V[S+1][P+1]),r(V[S+1][P]))}})(n),function(l){for(var c=new x,u=0;u<a.length;u+=3)c.x=a[u+0],c.y=a[u+1],c.z=a[u+2],c.normalize().multiplyScalar(l),a[u+0]=c.x,a[u+1]=c.y,a[u+2]=c.z}(i),function(){for(var l=new x,c=0;c<a.length;c+=3)l.x=a[c+0],l.y=a[c+1],l.z=a[c+2],h.push(Math.atan2(l.z,-l.x)/2/Math.PI+.5,1-(Math.atan2(-l.y,Math.sqrt(l.x*l.x+l.z*l.z))/Math.PI+.5));l=new x,c=new x;for(var u=new x,d=new x,g=new Z,w=new Z,S=new Z,P=0,k=0;P<a.length;P+=9,k+=6){l.set(a[P+0],a[P+1],a[P+2]),c.set(a[P+3],a[P+4],a[P+5]),u.set(a[P+6],a[P+7],a[P+8]),g.set(h[k+0],h[k+1]),w.set(h[k+2],h[k+3]),S.set(h[k+4],h[k+5]),d.copy(l).add(c).add(u).divideScalar(3);var N=Math.atan2(d.z,-d.x);s(g,k+0,l,N),s(w,k+2,c,N),s(S,k+4,u,N)}for(l=0;l<h.length;l+=6)c=h[l+0],u=h[l+2],d=h[l+4],g=Math.min(c,u,d),.9<Math.max(c,u,d)&&.1>g&&(.2>c&&(h[l+0]+=1),.2>u&&(h[l+2]+=1),.2>d&&(h[l+4]+=1))}(),this.addAttribute("position",new ut(a,3)),this.addAttribute("normal",new ut(a.slice(),3)),this.addAttribute("uv",new ut(h,2)),n===0?this.computeVertexNormals():this.normalizeNormals()}function kr(t,e){F.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new ar(t,e)),this.mergeVertices()}function ar(t,e){zi.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,e),this.type="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function jr(t,e){F.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Dn(t,e)),this.mergeVertices()}function Dn(t,e){zi.call(this,[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],t,e),this.type="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Vr(t,e){F.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new hr(t,e)),this.mergeVertices()}function hr(t,e){var i=(1+Math.sqrt(5))/2;zi.call(this,[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,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],t,e),this.type="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Wr(t,e){F.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lr(t,e)),this.mergeVertices()}function lr(t,e){var i=(1+Math.sqrt(5))/2,n=1/i;zi.call(this,[-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,-n,-i,0,-n,i,0,n,-i,0,n,i,-n,-i,0,-n,i,0,n,-i,0,n,i,0,-i,0,-n,i,0,-n,-i,0,n,i,0,n],[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],t,e),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Xr(t,e,i,n,r,o){F.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:r},o!==void 0&&console.warn("THREE.TubeGeometry: taper has been removed."),t=new cr(t,e,i,n,r),this.tangents=t.tangents,this.normals=t.normals,this.binormals=t.binormals,this.fromBufferGeometry(t),this.mergeVertices()}function cr(t,e,i,n,r){function o(k){c=t.getPointAt(k/e,c);var N=s.normals[k];for(k=s.binormals[k],d=0;d<=n;d++){var J=d/n*Math.PI*2,V=Math.sin(J);J=-Math.cos(J),h.x=J*N.x+V*k.x,h.y=J*N.y+V*k.y,h.z=J*N.z+V*k.z,h.normalize(),w.push(h.x,h.y,h.z),a.x=c.x+i*h.x,a.y=c.y+i*h.y,a.z=c.z+i*h.z,g.push(a.x,a.y,a.z)}}Rt.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:r},e=e||64,i=i||1,n=n||8,r=r||!1;var s=t.computeFrenetFrames(e,r);this.tangents=s.tangents,this.normals=s.normals,this.binormals=s.binormals;var a=new x,h=new x,l=new Z,c=new x,u,d,g=[],w=[],S=[],P=[];for(u=0;u<e;u++)o(u);for(o(r===!1?e:0),u=0;u<=e;u++)for(d=0;d<=n;d++)l.x=u/e,l.y=d/n,S.push(l.x,l.y);(function(){for(d=1;d<=e;d++)for(u=1;u<=n;u++){var k=(n+1)*d+(u-1),N=(n+1)*d+u,J=(n+1)*(d-1)+u;P.push((n+1)*(d-1)+(u-1),k,J),P.push(k,N,J)}})(),this.setIndex(P),this.addAttribute("position",new ut(g,3)),this.addAttribute("normal",new ut(w,3)),this.addAttribute("uv",new ut(S,2))}function qr(t,e,i,n,r,o,s){F.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:r,q:o},s!==void 0&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new ur(t,e,i,n,r,o)),this.mergeVertices()}function ur(t,e,i,n,r,o){function s(T,A,tt,_t,vt){var lt=Math.sin(T);A=tt/A*T,tt=Math.cos(A),vt.x=_t*(2+tt)*.5*Math.cos(T),vt.y=_t*(2+tt)*lt*.5,vt.z=_t*Math.sin(A)*.5}Rt.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:r,q:o},t=t||1,e=e||.4,i=Math.floor(i)||64,n=Math.floor(n)||8,r=r||2,o=o||3;var a=[],h=[],l=[],c=[],u,d=new x,g=new x,w=new x,S=new x,P=new x,k=new x,N=new x;for(u=0;u<=i;++u){var J=u/i*r*Math.PI*2;for(s(J,r,o,t,w),s(J+.01,r,o,t,S),k.subVectors(S,w),N.addVectors(S,w),P.crossVectors(k,N),N.crossVectors(P,k),P.normalize(),N.normalize(),J=0;J<=n;++J){var V=J/n*Math.PI*2,ot=-e*Math.cos(V);V=e*Math.sin(V),d.x=w.x+(ot*N.x+V*P.x),d.y=w.y+(ot*N.y+V*P.y),d.z=w.z+(ot*N.z+V*P.z),h.push(d.x,d.y,d.z),g.subVectors(d,w).normalize(),l.push(g.x,g.y,g.z),c.push(u/i),c.push(J/n)}}for(J=1;J<=i;J++)for(u=1;u<=n;u++)t=(n+1)*J+(u-1),e=(n+1)*J+u,r=(n+1)*(J-1)+u,a.push((n+1)*(J-1)+(u-1),t,r),a.push(t,e,r);this.setIndex(a),this.addAttribute("position",new ut(h,3)),this.addAttribute("normal",new ut(l,3)),this.addAttribute("uv",new ut(c,2))}function Yr(t,e,i,n,r){F.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},this.fromBufferGeometry(new pr(t,e,i,n,r)),this.mergeVertices()}function pr(t,e,i,n,r){Rt.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},t=t||1,e=e||.4,i=Math.floor(i)||8,n=Math.floor(n)||6,r=r||2*Math.PI;var o=[],s=[],a=[],h=[],l=new x,c=new x,u=new x,d,g;for(d=0;d<=i;d++)for(g=0;g<=n;g++){var w=g/n*r,S=d/i*Math.PI*2;c.x=(t+e*Math.cos(S))*Math.cos(w),c.y=(t+e*Math.cos(S))*Math.sin(w),c.z=e*Math.sin(S),s.push(c.x,c.y,c.z),l.x=t*Math.cos(w),l.y=t*Math.sin(w),u.subVectors(c,l).normalize(),a.push(u.x,u.y,u.z),h.push(g/n),h.push(d/i)}for(d=1;d<=i;d++)for(g=1;g<=n;g++)t=(n+1)*(d-1)+g-1,e=(n+1)*(d-1)+g,r=(n+1)*d+g,o.push((n+1)*d+g-1,t,r),o.push(t,e,r);this.setIndex(o),this.addAttribute("position",new ut(s,3)),this.addAttribute("normal",new ut(a,3)),this.addAttribute("uv",new ut(h,2))}function js(t,e,i,n,r){for(var o,s=0,a=e,h=i-n;a<i;a+=n)s+=(t[h]-t[a])*(t[a+1]+t[h+1]),h=a;if(r===0<s)for(r=e;r<i;r+=n)o=Xs(r,t[r],t[r+1],o);else for(r=i-n;r>=e;r-=n)o=Xs(r,t[r],t[r+1],o);return o&&zn(o,o.next)&&($r(o),o=o.next),o}function Zr(t,e){if(!t)return t;e||(e=t);do{var i=!1;if(t.steiner||!zn(t,t.next)&&Ci(t.prev,t,t.next)!==0)t=t.next;else{if($r(t),t=e=t.prev,t===t.next)break;i=!0}}while(i||t!==e);return e}function Jr(t,e,i,n,r,o,s){if(t){if(!s&&o){var a=t,h=a;do h.z===null&&(h.z=ss(h.x,h.y,n,r,o)),h.prevZ=h.prev,h=h.nextZ=h.next;while(h!==a);h.prevZ.nextZ=null,h.prevZ=null,a=h;var l,c,u,d,g=1;do{h=a;var w=a=null;for(c=0;h;){c++;var S=h;for(l=u=0;l<g&&(u++,S=S.nextZ,S);l++);for(d=g;0<u||0<d&&S;)u!==0&&(d===0||!S||h.z<=S.z)?(l=h,h=h.nextZ,u--):(l=S,S=S.nextZ,d--),w?w.nextZ=l:a=l,l.prevZ=w,w=l;h=S}w.nextZ=null,g*=2}while(1<c)}for(a=t;t.prev!==t.next;){if(h=t.prev,S=t.next,o)t:{w=t,d=n;var P=r,k=o;if(c=w.prev,u=w,g=w.next,0<=Ci(c,u,g))w=!1;else{var N=c.x>u.x?c.x>g.x?c.x:g.x:u.x>g.x?u.x:g.x,J=c.y>u.y?c.y>g.y?c.y:g.y:u.y>g.y?u.y:g.y;for(l=ss(c.x<u.x?c.x<g.x?c.x:g.x:u.x<g.x?u.x:g.x,c.y<u.y?c.y<g.y?c.y:g.y:u.y<g.y?u.y:g.y,d,P,k),d=ss(N,J,d,P,k),P=w.nextZ;P&&P.z<=d;){if(P!==w.prev&&P!==w.next&&Po(c.x,c.y,u.x,u.y,g.x,g.y,P.x,P.y)&&0<=Ci(P.prev,P,P.next)){w=!1;break t}P=P.nextZ}for(P=w.prevZ;P&&P.z>=l;){if(P!==w.prev&&P!==w.next&&Po(c.x,c.y,u.x,u.y,g.x,g.y,P.x,P.y)&&0<=Ci(P.prev,P,P.next)){w=!1;break t}P=P.prevZ}w=!0}}else t:if(w=t,c=w.prev,u=w,g=w.next,0<=Ci(c,u,g))w=!1;else{for(l=w.next.next;l!==w.prev;){if(Po(c.x,c.y,u.x,u.y,g.x,g.y,l.x,l.y)&&0<=Ci(l.prev,l,l.next)){w=!1;break t}l=l.next}w=!0}if(w)e.push(h.i/i),e.push(t.i/i),e.push(S.i/i),$r(t),a=t=S.next;else if(t=S,t===a){if(!s)Jr(Zr(t),e,i,n,r,o,1);else if(s===1){s=e,a=i,h=t;do S=h.prev,w=h.next.next,!zn(S,w)&&Vs(S,h,h.next,w)&&Qr(S,w)&&Qr(w,S)&&(s.push(S.i/a),s.push(h.i/a),s.push(w.i/a),$r(h),$r(h.next),h=t=w),h=h.next;while(h!==t);t=h,Jr(t,e,i,n,r,o,2)}else if(s===2)t:{s=t;do{for(a=s.next.next;a!==s.prev;){if(h=s.i!==a.i){if(h=s,S=a,w=h.next.i!==S.i&&h.prev.i!==S.i){e:{w=h;do{if(w.i!==h.i&&w.next.i!==h.i&&w.i!==S.i&&w.next.i!==S.i&&Vs(w,w.next,h,S)){w=!0;break e}w=w.next}while(w!==h);w=!1}w=!w}if(w=w&&Qr(h,S)&&Qr(S,h)){w=h,c=!1,u=(h.x+S.x)/2,S=(h.y+S.y)/2;do w.y>S!=w.next.y>S&&w.next.y!==w.y&&u<(w.next.x-w.x)*(S-w.y)/(w.next.y-w.y)+w.x&&(c=!c),w=w.next;while(w!==h);w=c}h=w}if(h){t=Ws(s,a),s=Zr(s,s.next),t=Zr(t,t.next),Jr(s,e,i,n,r,o),Jr(t,e,i,n,r,o);break t}a=a.next}s=s.next}while(s!==t)}break}}}}function th(t,e){return t.x-e.x}function eh(t,e){var i=e,n=t.x,r=t.y,o=-1/0;do{if(r<=i.y&&r>=i.next.y&&i.next.y!==i.y){var s=i.x+(r-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=n&&s>o){if(o=s,s===n){if(r===i.y)return i;if(r===i.next.y)return i.next}var a=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!a)return null;if(n===o)return a.prev;e=a,s=a.x;var h=a.y,l=1/0;for(i=a.next;i!==e;){if(n>=i.x&&i.x>=s&&n!==i.x&&Po(r<h?n:o,r,s,h,r<h?o:n,r,i.x,i.y)){var c=Math.abs(r-i.y)/(n-i.x);(c<l||c===l&&i.x>a.x)&&Qr(i,t)&&(a=i,l=c)}i=i.next}return a}function ss(t,e,i,n,r){return t=32767*(t-i)*r,e=32767*(e-n)*r,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,(t|t<<1)&1431655765|((e|e<<1)&1431655765)<<1}function ih(t){var e=t,i=t;do e.x<i.x&&(i=e),e=e.next;while(e!==t);return i}function Po(t,e,i,n,r,o,s,a){return 0<=(r-s)*(e-a)-(t-s)*(o-a)&&0<=(t-s)*(n-a)-(i-s)*(e-a)&&0<=(i-s)*(o-a)-(r-s)*(n-a)}function Ci(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function zn(t,e){return t.x===e.x&&t.y===e.y}function Vs(t,e,i,n){return zn(t,e)&&zn(i,n)||zn(t,n)&&zn(i,e)?!0:0<Ci(t,e,i)!=0<Ci(t,e,n)&&0<Ci(i,n,t)!=0<Ci(i,n,e)}function Qr(t,e){return 0>Ci(t.prev,t,t.next)?0<=Ci(t,e,t.next)&&0<=Ci(t,t.prev,e):0>Ci(t,e,t.prev)||0>Ci(t,t.next,e)}function Ws(t,e){var i=new as(t.i,t.x,t.y),n=new as(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function Xs(t,e,i,n){return t=new as(t,e,i),n?(t.next=n.next,t.prev=n,n.next.prev=t,n.next=t):(t.prev=t,t.next=t),t}function $r(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function as(t,e,i){this.i=t,this.x=e,this.y=i,this.nextZ=this.prevZ=this.z=this.next=this.prev=null,this.steiner=!1}function qs(t){var e=t.length;2<e&&t[e-1].equals(t[0])&&t.pop()}function Ys(t,e){for(var i=0;i<e.length;i++)t.push(e[i].x),t.push(e[i].y)}function Nn(t,e){F.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new hn(t,e)),this.mergeVertices()}function hn(t,e){function i(h){function l(ue,_e,Be){return _e||console.error("THREE.ExtrudeGeometry: vec does not exist"),_e.clone().multiplyScalar(Be).add(ue)}function c(ue,_e,Be){var De=ue.x-_e.x,Mt=ue.y-_e.y,xe=Be.x-ue.x,ve=Be.y-ue.y,we=De*De+Mt*Mt;if(Math.abs(De*ve-Mt*xe)>Number.EPSILON){var Ui=Math.sqrt(we),mi=Math.sqrt(xe*xe+ve*ve);if(we=_e.x-Mt/Ui,_e=_e.y+De/Ui,ve=((Be.x-ve/mi-we)*ve-(Be.y+xe/mi-_e)*xe)/(De*ve-Mt*xe),xe=we+De*ve-ue.x,De=_e+Mt*ve-ue.y,Mt=xe*xe+De*De,2>=Mt)return new Z(xe,De);Mt=Math.sqrt(Mt/2)}else ue=!1,De>Number.EPSILON?xe>Number.EPSILON&&(ue=!0):De<-Number.EPSILON?xe<-Number.EPSILON&&(ue=!0):Math.sign(Mt)===Math.sign(ve)&&(ue=!0),ue?(xe=-Mt,Mt=Math.sqrt(we)):(xe=De,De=Mt,Mt=Math.sqrt(we/2));return new Z(xe/Mt,De/Mt)}function u(ue,_e){for(qt=ue.length;0<=--qt;){var Be=qt,De=qt-1;0>De&&(De=ue.length-1);var Mt,xe=N+2*A;for(Mt=0;Mt<xe;Mt++){var ve=pi*Mt,we=pi*(Mt+1),Ui=_e+De+ve,mi=_e+De+we;we=_e+Be+we,w(_e+Be+ve),w(Ui),w(we),w(Ui),w(mi),w(we),ve=r.length/3,ve=_t.generateSideWallUV(n,r,ve-6,ve-3,ve-2,ve-1),S(ve[0]),S(ve[1]),S(ve[3]),S(ve[1]),S(ve[2]),S(ve[3])}}}function d(ue,_e,Be){P.push(ue),P.push(_e),P.push(Be)}function g(ue,_e,Be){w(ue),w(_e),w(Be),ue=r.length/3,ue=_t.generateTopUV(n,r,ue-3,ue-2,ue-1),S(ue[0]),S(ue[1]),S(ue[2])}function w(ue){r.push(P[3*ue]),r.push(P[3*ue+1]),r.push(P[3*ue+2])}function S(ue){o.push(ue.x),o.push(ue.y)}var P=[],k=e.curveSegments!==void 0?e.curveSegments:12,N=e.steps!==void 0?e.steps:1,J=e.depth!==void 0?e.depth:100,V=e.bevelEnabled!==void 0?e.bevelEnabled:!0,ot=e.bevelThickness!==void 0?e.bevelThickness:6,T=e.bevelSize!==void 0?e.bevelSize:ot-2,A=e.bevelSegments!==void 0?e.bevelSegments:3,tt=e.extrudePath,_t=e.UVGenerator!==void 0?e.UVGenerator:mh;e.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),J=e.amount);var vt=!1;if(tt){var lt=tt.getSpacedPoints(N);vt=!0,V=!1;var Ht=tt.computeFrenetFrames(N,!1),Dt=new x,$t=new x,Xt=new x}V||(T=ot=A=0);var Qt;k=h.extractPoints(k),h=k.shape;var re=k.holes;if(!wn.isClockWise(h)){h=h.reverse();var me=0;for(Qt=re.length;me<Qt;me++){var Ae=re[me];wn.isClockWise(Ae)&&(re[me]=Ae.reverse())}}var fi=wn.triangulateShape(h,re),li=h;for(me=0,Qt=re.length;me<Qt;me++)Ae=re[me],h=h.concat(Ae);var Ye,pi=h.length,ti,Mi=fi.length;k=[];var qt=0,ge=li.length,nt=ge-1;for(Ye=qt+1;qt<ge;qt++,nt++,Ye++)nt===ge&&(nt=0),Ye===ge&&(Ye=0),k[qt]=c(li[qt],li[nt],li[Ye]);tt=[];var ye=k.concat();for(me=0,Qt=re.length;me<Qt;me++){Ae=re[me];var Te=[];for(qt=0,ge=Ae.length,nt=ge-1,Ye=qt+1;qt<ge;qt++,nt++,Ye++)nt===ge&&(nt=0),Ye===ge&&(Ye=0),Te[qt]=c(Ae[qt],Ae[nt],Ae[Ye]);tt.push(Te),ye=ye.concat(Te)}for(nt=0;nt<A;nt++){ge=nt/A;var Ze=ot*Math.cos(ge*Math.PI/2);for(Ye=T*Math.sin(ge*Math.PI/2),qt=0,ge=li.length;qt<ge;qt++){var Yt=l(li[qt],k[qt],Ye);d(Yt.x,Yt.y,-Ze)}for(me=0,Qt=re.length;me<Qt;me++)for(Ae=re[me],Te=tt[me],qt=0,ge=Ae.length;qt<ge;qt++)Yt=l(Ae[qt],Te[qt],Ye),d(Yt.x,Yt.y,-Ze)}for(Ye=T,qt=0;qt<pi;qt++)Yt=V?l(h[qt],ye[qt],Ye):h[qt],vt?($t.copy(Ht.normals[0]).multiplyScalar(Yt.x),Dt.copy(Ht.binormals[0]).multiplyScalar(Yt.y),Xt.copy(lt[0]).add($t).add(Dt),d(Xt.x,Xt.y,Xt.z)):d(Yt.x,Yt.y,0);for(ge=1;ge<=N;ge++)for(qt=0;qt<pi;qt++)Yt=V?l(h[qt],ye[qt],Ye):h[qt],vt?($t.copy(Ht.normals[ge]).multiplyScalar(Yt.x),Dt.copy(Ht.binormals[ge]).multiplyScalar(Yt.y),Xt.copy(lt[ge]).add($t).add(Dt),d(Xt.x,Xt.y,Xt.z)):d(Yt.x,Yt.y,J/N*ge);for(nt=A-1;0<=nt;nt--){for(ge=nt/A,Ze=ot*Math.cos(ge*Math.PI/2),Ye=T*Math.sin(ge*Math.PI/2),qt=0,ge=li.length;qt<ge;qt++)Yt=l(li[qt],k[qt],Ye),d(Yt.x,Yt.y,J+Ze);for(me=0,Qt=re.length;me<Qt;me++)for(Ae=re[me],Te=tt[me],qt=0,ge=Ae.length;qt<ge;qt++)Yt=l(Ae[qt],Te[qt],Ye),vt?d(Yt.x,Yt.y+lt[N-1].y,lt[N-1].x+Ze):d(Yt.x,Yt.y,J+Ze)}(function(){var ue=r.length/3;if(V){var _e=0*pi;for(qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[2]+_e,ti[1]+_e,ti[0]+_e);for(_e=pi*(N+2*A),qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[0]+_e,ti[1]+_e,ti[2]+_e)}else{for(qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[2],ti[1],ti[0]);for(qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[0]+pi*N,ti[1]+pi*N,ti[2]+pi*N)}n.addGroup(ue,r.length/3-ue,0)})(),function(){var ue=r.length/3,_e=0;for(u(li,_e),_e+=li.length,me=0,Qt=re.length;me<Qt;me++)Ae=re[me],u(Ae,_e),_e+=Ae.length;n.addGroup(ue,r.length/3-ue,1)}()}Rt.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];for(var n=this,r=[],o=[],s=0,a=t.length;s<a;s++)i(t[s]);this.addAttribute("position",new ut(r,3)),this.addAttribute("uv",new ut(o,2)),this.computeVertexNormals()}function Zs(t,e,i){if(i.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++)i.shapes.push(t[n].uuid);else i.shapes.push(t.uuid);return e.extrudePath!==void 0&&(i.options.extrudePath=e.extrudePath.toJSON()),i}function Kr(t,e){F.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new dr(t,e)),this.mergeVertices()}function dr(t,e){e=e||{};var i=e.font;if(!i||!i.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new F;t=i.generateShapes(t,e.size),e.depth=e.height!==void 0?e.height:50,e.bevelThickness===void 0&&(e.bevelThickness=10),e.bevelSize===void 0&&(e.bevelSize=8),e.bevelEnabled===void 0&&(e.bevelEnabled=!1),hn.call(this,t,e),this.type="TextBufferGeometry"}function to(t,e,i,n,r,o,s){F.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new Bn(t,e,i,n,r,o,s)),this.mergeVertices()}function Bn(t,e,i,n,r,o,s){Rt.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:o,thetaLength:s},t=t||1,e=Math.max(3,Math.floor(e)||8),i=Math.max(2,Math.floor(i)||6),n=n!==void 0?n:0,r=r!==void 0?r:2*Math.PI,o=o!==void 0?o:0,s=s!==void 0?s:Math.PI;var a=o+s,h,l,c=0,u=[],d=new x,g=new x,w=[],S=[],P=[],k=[];for(l=0;l<=i;l++){var N=[],J=l/i;for(h=0;h<=e;h++){var V=h/e;d.x=-t*Math.cos(n+V*r)*Math.sin(o+J*s),d.y=t*Math.cos(o+J*s),d.z=t*Math.sin(n+V*r)*Math.sin(o+J*s),S.push(d.x,d.y,d.z),g.set(d.x,d.y,d.z).normalize(),P.push(g.x,g.y,g.z),k.push(V,1-J),N.push(c++)}u.push(N)}for(l=0;l<i;l++)for(h=0;h<e;h++)t=u[l][h+1],n=u[l][h],r=u[l+1][h],s=u[l+1][h+1],(l!==0||0<o)&&w.push(t,n,s),(l!==i-1||a<Math.PI)&&w.push(n,r,s);this.setIndex(w),this.addAttribute("position",new ut(S,3)),this.addAttribute("normal",new ut(P,3)),this.addAttribute("uv",new ut(k,2))}function eo(t,e,i,n,r,o){F.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:o},this.fromBufferGeometry(new fr(t,e,i,n,r,o)),this.mergeVertices()}function fr(t,e,i,n,r,o){Rt.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:o},t=t||.5,e=e||1,r=r!==void 0?r:0,o=o!==void 0?o:2*Math.PI,i=i!==void 0?Math.max(3,i):8,n=n!==void 0?Math.max(1,n):1;var s=[],a=[],h=[],l=[],c=t,u=(e-t)/n,d=new x,g=new Z,w,S;for(w=0;w<=n;w++){for(S=0;S<=i;S++)t=r+S/i*o,d.x=c*Math.cos(t),d.y=c*Math.sin(t),a.push(d.x,d.y,d.z),h.push(0,0,1),g.x=(d.x/e+1)/2,g.y=(d.y/e+1)/2,l.push(g.x,g.y);c+=u}for(w=0;w<n;w++)for(e=w*(i+1),S=0;S<i;S++)t=S+e,r=t+i+1,o=t+i+2,c=t+1,s.push(t,r,c),s.push(r,o,c);this.setIndex(s),this.addAttribute("position",new ut(a,3)),this.addAttribute("normal",new ut(h,3)),this.addAttribute("uv",new ut(l,2))}function io(t,e,i,n){F.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},this.fromBufferGeometry(new mr(t,e,i,n)),this.mergeVertices()}function mr(t,e,i,n){Rt.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},e=Math.floor(e)||12,i=i||0,n=n||2*Math.PI,n=Se.clamp(n,0,2*Math.PI);var r=[],o=[],s=[],a=1/e,h=new x,l=new Z,c;for(c=0;c<=e;c++){var u=i+c*a*n,d=Math.sin(u),g=Math.cos(u);for(u=0;u<=t.length-1;u++)h.x=t[u].x*d,h.y=t[u].y,h.z=t[u].x*g,o.push(h.x,h.y,h.z),l.x=c/e,l.y=u/(t.length-1),s.push(l.x,l.y)}for(c=0;c<e;c++)for(u=0;u<t.length-1;u++)i=u+c*t.length,a=i+t.length,h=i+t.length+1,l=i+1,r.push(i,a,l),r.push(a,h,l);if(this.setIndex(r),this.addAttribute("position",new ut(o,3)),this.addAttribute("uv",new ut(s,2)),this.computeVertexNormals(),n===2*Math.PI)for(n=this.attributes.normal.array,r=new x,o=new x,s=new x,i=e*t.length*3,u=c=0;c<t.length;c++,u+=3)r.x=n[u+0],r.y=n[u+1],r.z=n[u+2],o.x=n[i+u+0],o.y=n[i+u+1],o.z=n[i+u+2],s.addVectors(r,o).normalize(),n[u+0]=n[i+u+0]=s.x,n[u+1]=n[i+u+1]=s.y,n[u+2]=n[i+u+2]=s.z}function Un(t,e){F.call(this),this.type="ShapeGeometry",typeof e=="object"&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new Fn(t,e)),this.mergeVertices()}function Fn(t,e){function i(c){var u,d=r.length/3;c=c.extractPoints(e);var g=c.shape,w=c.holes;if(wn.isClockWise(g)===!1)for(g=g.reverse(),c=0,u=w.length;c<u;c++){var S=w[c];wn.isClockWise(S)===!0&&(w[c]=S.reverse())}var P=wn.triangulateShape(g,w);for(c=0,u=w.length;c<u;c++)S=w[c],g=g.concat(S);for(c=0,u=g.length;c<u;c++)S=g[c],r.push(S.x,S.y,0),o.push(0,0,1),s.push(S.x,S.y);for(c=0,u=P.length;c<u;c++)g=P[c],n.push(g[0]+d,g[1]+d,g[2]+d),h+=3}Rt.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],o=[],s=[],a=0,h=0;if(Array.isArray(t)===!1)i(t);else for(var l=0;l<t.length;l++)i(t[l]),this.addGroup(a,h,l),a+=h,h=0;this.setIndex(n),this.addAttribute("position",new ut(r,3)),this.addAttribute("normal",new ut(o,3)),this.addAttribute("uv",new ut(s,2))}function Js(t,e){if(e.shapes=[],Array.isArray(t))for(var i=0,n=t.length;i<n;i++)e.shapes.push(t[i].uuid);else e.shapes.push(t.uuid);return e}function gr(t,e){Rt.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e};var i=[];e=Math.cos(Se.DEG2RAD*(e!==void 0?e:1));var n=[0,0],r={},o=["a","b","c"];if(t.isBufferGeometry){var s=new F;s.fromBufferGeometry(t)}else s=t.clone();s.mergeVertices(),s.computeFaceNormals(),t=s.vertices,s=s.faces;for(var a=0,h=s.length;a<h;a++)for(var l=s[a],c=0;3>c;c++){var u=l[o[c]],d=l[o[(c+1)%3]];n[0]=Math.min(u,d),n[1]=Math.max(u,d),u=n[0]+","+n[1],r[u]===void 0?r[u]={index1:n[0],index2:n[1],face1:a,face2:void 0}:r[u].face2=a}for(u in r)n=r[u],(n.face2===void 0||s[n.face1].normal.dot(s[n.face2].normal)<=e)&&(o=t[n.index1],i.push(o.x,o.y,o.z),o=t[n.index2],i.push(o.x,o.y,o.z));this.addAttribute("position",new ut(i,3))}function Gn(t,e,i,n,r,o,s,a){F.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:o,thetaStart:s,thetaLength:a},this.fromBufferGeometry(new vn(t,e,i,n,r,o,s,a)),this.mergeVertices()}function vn(t,e,i,n,r,o,s,a){function h(N){var J,V=new Z,ot=new x,T=0,A=N===!0?t:e,tt=N===!0?1:-1,_t=w;for(J=1;J<=n;J++)u.push(0,P*tt,0),d.push(0,tt,0),g.push(.5,.5),w++;var vt=w;for(J=0;J<=n;J++){var lt=J/n*a+s,Ht=Math.cos(lt);lt=Math.sin(lt),ot.x=A*lt,ot.y=P*tt,ot.z=A*Ht,u.push(ot.x,ot.y,ot.z),d.push(0,tt,0),V.x=.5*Ht+.5,V.y=.5*lt*tt+.5,g.push(V.x,V.y),w++}for(J=0;J<n;J++)V=_t+J,ot=vt+J,N===!0?c.push(ot,ot+1,V):c.push(ot+1,ot,V),T+=3;l.addGroup(k,T,N===!0?1:2),k+=T}Rt.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:o,thetaStart:s,thetaLength:a};var l=this;t=t!==void 0?t:1,e=e!==void 0?e:1,i=i||1,n=Math.floor(n)||8,r=Math.floor(r)||1,o=o!==void 0?o:!1,s=s!==void 0?s:0,a=a!==void 0?a:2*Math.PI;var c=[],u=[],d=[],g=[],w=0,S=[],P=i/2,k=0;(function(){var N,J,V=new x,ot=new x,T=0,A=(e-t)/i;for(J=0;J<=r;J++){var tt=[],_t=J/r,vt=_t*(e-t)+t;for(N=0;N<=n;N++){var lt=N/n,Ht=lt*a+s,Dt=Math.sin(Ht);Ht=Math.cos(Ht),ot.x=vt*Dt,ot.y=-_t*i+P,ot.z=vt*Ht,u.push(ot.x,ot.y,ot.z),V.set(Dt,A,Ht).normalize(),d.push(V.x,V.y,V.z),g.push(lt,1-_t),tt.push(w++)}S.push(tt)}for(N=0;N<n;N++)for(J=0;J<r;J++)V=S[J+1][N],ot=S[J+1][N+1],A=S[J][N+1],c.push(S[J][N],V,A),c.push(V,ot,A),T+=6;l.addGroup(k,T,0),k+=T})(),o===!1&&(0<t&&h(!0),0<e&&h(!1)),this.setIndex(c),this.addAttribute("position",new ut(u,3)),this.addAttribute("normal",new ut(d,3)),this.addAttribute("uv",new ut(g,2))}function no(t,e,i,n,r,o,s){Gn.call(this,0,t,e,i,n,r,o,s),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:o,thetaLength:s}}function ro(t,e,i,n,r,o,s){vn.call(this,0,t,e,i,n,r,o,s),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:o,thetaLength:s}}function oo(t,e,i,n){F.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new vr(t,e,i,n)),this.mergeVertices()}function vr(t,e,i,n){Rt.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},t=t||1,e=e!==void 0?Math.max(3,e):8,i=i!==void 0?i:0,n=n!==void 0?n:2*Math.PI;var r=[],o=[],s=[],a=[],h,l=new x,c=new Z;o.push(0,0,0),s.push(0,0,1),a.push(.5,.5);var u=0;for(h=3;u<=e;u++,h+=3){var d=i+u/e*n;l.x=t*Math.cos(d),l.y=t*Math.sin(d),o.push(l.x,l.y,l.z),s.push(0,0,1),c.x=(o[h]/t+1)/2,c.y=(o[h+1]/t+1)/2,a.push(c.x,c.y)}for(h=1;h<=e;h++)r.push(h,h+1,0);this.setIndex(r),this.addAttribute("position",new ut(o,3)),this.addAttribute("normal",new ut(s,3)),this.addAttribute("uv",new ut(a,2))}function Hn(t){fe.call(this),this.type="ShadowMaterial",this.color=new H(0),this.transparent=!0,this.setValues(t)}function yr(t){Je.call(this,t),this.type="RawShaderMaterial"}function ln(t){fe.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new H(16777215),this.metalness=this.roughness=.5,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function kn(t){ln.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoatRoughness=this.clearCoat=0,this.setValues(t)}function Yi(t){fe.call(this),this.type="MeshPhongMaterial",this.color=new H(16777215),this.specular=new H(1118481),this.shininess=30,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function jn(t){Yi.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Vn(t){fe.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.morphNormals=this.morphTargets=this.skinning=this.lights=this.fog=!1,this.setValues(t)}function Wn(t){fe.call(this),this.type="MeshLambertMaterial",this.color=new H(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function Xn(t){if(fe.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new H(16777215),this.bumpMap=this.map=this.matcap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.lights=this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t),this.matcap===null){t=document.createElement("canvas"),t.width=1,t.height=1;var e=t.getContext("2d");e.fillStyle="#fff",e.fillRect(0,0,1,1),this.matcap=new THREE.CanvasTexture(t)}}function qn(t){Ne.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}function Hi(t,e,i,n){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=n!==void 0?n:new e.constructor(i),this.sampleValues=e,this.valueSize=i}function Ao(t,e,i,n){Hi.call(this,t,e,i,n),this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function so(t,e,i,n){Hi.call(this,t,e,i,n)}function Lo(t,e,i,n){Hi.call(this,t,e,i,n)}function wi(t,e,i,n){if(t===void 0)throw Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ai.convertArray(e,this.TimeBufferType),this.values=Ai.convertArray(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}function bo(t,e,i){wi.call(this,t,e,i)}function Ro(t,e,i,n){wi.call(this,t,e,i,n)}function _r(t,e,i,n){wi.call(this,t,e,i,n)}function Co(t,e,i,n){Hi.call(this,t,e,i,n)}function ao(t,e,i,n){wi.call(this,t,e,i,n)}function Oo(t,e,i,n){wi.call(this,t,e,i,n)}function xr(t,e,i,n){wi.call(this,t,e,i,n)}function ki(t,e,i){this.name=t,this.tracks=i,this.duration=e!==void 0?e:-1,this.uuid=Se.generateUUID(),0>this.duration&&this.resetDuration()}function nh(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return _r;case"vector":case"vector2":case"vector3":case"vector4":return xr;case"color":return Ro;case"quaternion":return ao;case"bool":case"boolean":return bo;case"string":return Oo}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function rh(t){if(t.type===void 0)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=nh(t.type);if(t.times===void 0){var i=[],n=[];Ai.flattenJSON(t.keys,i,n,"value"),t.times=i,t.values=n}return e.parse!==void 0?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}function hs(t,e,i){var n=this,r=!1,o=0,s=0,a=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(h){s++,r===!1&&n.onStart!==void 0&&n.onStart(h,o,s),r=!0},this.itemEnd=function(h){o++,n.onProgress!==void 0&&n.onProgress(h,o,s),o===s&&(r=!1,n.onLoad!==void 0)&&n.onLoad()},this.itemError=function(h){n.onError!==void 0&&n.onError(h)},this.resolveURL=function(h){return a?a(h):h},this.setURLModifier=function(h){return a=h,this}}function Xi(t){this.manager=t!==void 0?t:Oi}function Qs(t){this.manager=t!==void 0?t:Oi}function $s(t){this.manager=t!==void 0?t:Oi,this._parser=null}function ls(t){this.manager=t!==void 0?t:Oi,this._parser=null}function ho(t){this.manager=t!==void 0?t:Oi}function cs(t){this.manager=t!==void 0?t:Oi}function Io(t){this.manager=t!==void 0?t:Oi}function pe(){this.type="Curve",this.arcLengthDivisions=200}function ji(t,e,i,n,r,o,s,a){pe.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=i||1,this.yRadius=n||1,this.aStartAngle=r||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=s||!1,this.aRotation=a||0}function wr(t,e,i,n,r,o){ji.call(this,t,e,i,i,n,r,o),this.type="ArcCurve"}function us(){var t=0,e=0,i=0,n=0;return{initCatmullRom:function(r,o,s,a,h){r=h*(s-r),a=h*(a-o),t=o,e=r,i=-3*o+3*s-2*r-a,n=2*o-2*s+r+a},initNonuniformCatmullRom:function(r,o,s,a,h,l,c){r=((o-r)/h-(s-r)/(h+l)+(s-o)/l)*l,a=((s-o)/l-(a-o)/(l+c)+(a-s)/c)*l,t=o,e=r,i=-3*o+3*s-2*r-a,n=2*o-2*s+r+a},calc:function(r){var o=r*r;return t+e*r+i*o+n*o*r}}}function Ei(t,e,i,n){pe.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=i||"centripetal",this.tension=n||.5}function Ks(t,e,i,n,r){e=.5*(n-e),r=.5*(r-i);var o=t*t;return(2*i-2*n+e+r)*t*o+(-3*i+3*n-2*e-r)*o+e*t+i}function lo(t,e,i,n){var r=1-t;return r*r*e+2*(1-t)*t*i+t*t*n}function co(t,e,i,n,r){var o=1-t,s=1-t;return o*o*o*e+3*s*s*t*i+3*(1-t)*t*t*n+t*t*t*r}function Zi(t,e,i,n){pe.call(this),this.type="CubicBezierCurve",this.v0=t||new Z,this.v1=e||new Z,this.v2=i||new Z,this.v3=n||new Z}function cn(t,e,i,n){pe.call(this),this.type="CubicBezierCurve3",this.v0=t||new x,this.v1=e||new x,this.v2=i||new x,this.v3=n||new x}function Ni(t,e){pe.call(this),this.type="LineCurve",this.v1=t||new Z,this.v2=e||new Z}function Ji(t,e){pe.call(this),this.type="LineCurve3",this.v1=t||new x,this.v2=e||new x}function Qi(t,e,i){pe.call(this),this.type="QuadraticBezierCurve",this.v0=t||new Z,this.v1=e||new Z,this.v2=i||new Z}function un(t,e,i){pe.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new x,this.v1=e||new x,this.v2=i||new x}function $i(t){pe.call(this),this.type="SplineCurve",this.points=t||[]}function yn(){pe.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Ki(t){yn.call(this),this.type="Path",this.currentPoint=new Z,t&&this.setFromPoints(t)}function Pn(t){Ki.call(this,t),this.uuid=Se.generateUUID(),this.type="Shape",this.holes=[]}function ri(t,e){b.call(this),this.type="Light",this.color=new H(t),this.intensity=e!==void 0?e:1,this.receiveShadow=void 0}function Do(t,e,i){ri.call(this,t,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(b.DefaultUp),this.updateMatrix(),this.groundColor=new H(e)}function Yn(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new Z(512,512),this.map=null,this.matrix=new ft}function zo(){Yn.call(this,new Bt(50,1,.5,500))}function No(t,e,i,n,r,o){ri.call(this,t,e),this.type="SpotLight",this.position.copy(b.DefaultUp),this.updateMatrix(),this.target=new b,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(s){this.intensity=s/Math.PI}}),this.distance=i!==void 0?i:0,this.angle=n!==void 0?n:Math.PI/3,this.penumbra=r!==void 0?r:0,this.decay=o!==void 0?o:1,this.shadow=new zo}function Bo(t,e,i,n){ri.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(r){this.intensity=r/(4*Math.PI)}}),this.distance=i!==void 0?i:0,this.decay=n!==void 0?n:1,this.shadow=new Yn(new Bt(90,1,.5,500))}function uo(t,e,i,n,r,o){Kt.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t!==void 0?t:-1,this.right=e!==void 0?e:1,this.top=i!==void 0?i:1,this.bottom=n!==void 0?n:-1,this.near=r!==void 0?r:.1,this.far=o!==void 0?o:2e3,this.updateProjectionMatrix()}function Uo(){Yn.call(this,new uo(-5,5,5,-5,.5,500))}function Fo(t,e){ri.call(this,t,e),this.type="DirectionalLight",this.position.copy(b.DefaultUp),this.updateMatrix(),this.target=new b,this.shadow=new Uo}function Go(t,e){ri.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function Ho(t,e,i,n){ri.call(this,t,e),this.type="RectAreaLight",this.width=i!==void 0?i:10,this.height=n!==void 0?n:10}function ko(t){this.manager=t!==void 0?t:Oi,this.textures={}}function ps(t){this.manager=t!==void 0?t:Oi}function Mr(){}function jo(t){typeof t=="boolean"&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=t!==void 0?t:Oi,this.withCredentials=!1}function ds(t){this.manager=t!==void 0?t:Oi,this.resourcePath=""}function fs(t){typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=t!==void 0?t:Oi,this.options=void 0}function ms(){this.type="ShapePath",this.color=new H,this.subPaths=[],this.currentPath=null}function gs(t){this.type="Font",this.data=t}function ta(t){this.manager=t!==void 0?t:Oi}function vs(t){this.manager=t!==void 0?t:Oi}function ea(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Bt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Bt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function po(t,e,i,n){b.call(this),this.type="CubeCamera";var r=new Bt(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new x(1,0,0)),this.add(r);var o=new Bt(90,1,t,e);o.up.set(0,-1,0),o.lookAt(new x(-1,0,0)),this.add(o);var s=new Bt(90,1,t,e);s.up.set(0,0,1),s.lookAt(new x(0,1,0)),this.add(s);var a=new Bt(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new x(0,-1,0)),this.add(a);var h=new Bt(90,1,t,e);h.up.set(0,-1,0),h.lookAt(new x(0,0,1)),this.add(h);var l=new Bt(90,1,t,e);l.up.set(0,-1,0),l.lookAt(new x(0,0,-1)),this.add(l),n=n||{format:1022,magFilter:1006,minFilter:1006},this.renderTarget=new wt(i,i,n),this.renderTarget.texture.name="CubeCamera",this.update=function(c,u){this.parent===null&&this.updateMatrixWorld();var d=this.renderTarget,g=d.texture.generateMipmaps;d.texture.generateMipmaps=!1,d.activeCubeFace=0,c.render(u,r,d),d.activeCubeFace=1,c.render(u,o,d),d.activeCubeFace=2,c.render(u,s,d),d.activeCubeFace=3,c.render(u,a,d),d.activeCubeFace=4,c.render(u,h,d),d.texture.generateMipmaps=g,d.activeCubeFace=5,c.render(u,l,d),c.setRenderTarget(null)},this.clear=function(c,u,d,g){for(var w=this.renderTarget,S=0;6>S;S++)w.activeCubeFace=S,c.setRenderTarget(w),c.clear(u,d,g);c.setRenderTarget(null)}}function ys(t){this.autoStart=t!==void 0?t:!0,this.elapsedTime=this.oldTime=this.startTime=0,this.running=!1}function _s(){b.call(this),this.type="AudioListener",this.context=zs.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0}function Tr(t){b.call(this),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.offset=this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function xs(t){Tr.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function ws(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=e!==void 0?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function Ms(t,e,i){switch(this.binding=t,this.valueSize=i,t=Float64Array,e){case"quaternion":e=this._slerp;break;case"string":case"bool":t=Array,e=this._select;break;default:e=this._lerp}this.buffer=new t(4*i),this._mixBufferRegion=e,this.referenceCount=this.useCount=this.cumulativeWeight=0}function ia(t,e,i){i=i||Pi.parseTrackName(e),this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function Pi(t,e,i){this.path=e,this.parsedPath=i||Pi.parseTrackName(e),this.node=Pi.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function na(){this.uuid=Se.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,i=arguments.length;e!==i;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}function ra(t,e,i){this._mixer=t,this._clip=e,this._localRoot=i||null,t=e.tracks,e=t.length,i=Array(e);for(var n={endingStart:2400,endingEnd:2400},r=0;r!==e;++r){var o=t[r].createInterpolant(null);i[r]=o,o.settings=n}this._interpolantSettings=n,this._interpolants=i,this._propertyBindings=Array(e),this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Ts(t){this._root=t,this._initMemoryManager(),this.time=this._accuIndex=0,this.timeScale=1}function Vo(t,e){typeof t=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=e),this.value=t}function Ss(){Rt.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Es(t,e,i){Ge.call(this,t,e),this.meshPerAttribute=i||1}function Ps(t,e,i,n){typeof i=="number"&&(n=i,i=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),q.call(this,t,e,i),this.meshPerAttribute=n||1}function oa(t,e,i,n){this.ray=new bi(t,e),this.near=i||0,this.far=n||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function sa(t,e){return t.distance-e.distance}function As(t,e,i,n){if(t.visible!==!1&&(t.raycast(e,i),n===!0)){t=t.children,n=0;for(var r=t.length;n<r;n++)As(t[n],e,i,!0)}}function aa(t,e,i){return this.radius=t!==void 0?t:1,this.phi=e!==void 0?e:0,this.theta=i!==void 0?i:0,this}function ha(t,e,i){return this.radius=t!==void 0?t:1,this.theta=e!==void 0?e:0,this.y=i!==void 0?i:0,this}function Ls(t,e){this.min=t!==void 0?t:new Z(1/0,1/0),this.max=e!==void 0?e:new Z(-1/0,-1/0)}function bs(t,e){this.start=t!==void 0?t:new x,this.end=e!==void 0?e:new x}function fo(t){b.call(this),this.material=t,this.render=function(){}}function mo(t,e,i,n){this.object=t,this.size=e!==void 0?e:1,t=i!==void 0?i:16711680,n=n!==void 0?n:1,e=0,(i=this.object.geometry)&&i.isGeometry?e=3*i.faces.length:i&&i.isBufferGeometry&&(e=i.attributes.normal.count),i=new Rt,e=new ut(6*e,3),i.addAttribute("position",e),be.call(this,i,new Ne({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Sr(t,e){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new Rt,e=[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(var i=0,n=1;32>i;i++,n++){var r=i/32*Math.PI*2,o=n/32*Math.PI*2;e.push(Math.cos(r),Math.sin(r),1,Math.cos(o),Math.sin(o),1)}t.addAttribute("position",new ut(e,3)),e=new Ne({fog:!1}),this.cone=new be(t,e),this.add(this.cone),this.update()}function la(t){var e=[];t&&t.isBone&&e.push(t);for(var i=0;i<t.children.length;i++)e.push.apply(e,la(t.children[i]));return e}function Er(t){for(var e=la(t),i=new Rt,n=[],r=[],o=new H(0,0,1),s=new H(0,1,0),a=0;a<e.length;a++){var h=e[a];h.parent&&h.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),r.push(o.r,o.g,o.b),r.push(s.r,s.g,s.b))}i.addAttribute("position",new ut(n,3)),i.addAttribute("color",new ut(r,3)),n=new Ne({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0}),be.call(this,i,n),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Pr(t,e,i){this.light=t,this.light.updateMatrixWorld(),this.color=i,t=new Bn(e,4,2),e=new je({wireframe:!0,fog:!1}),Ke.call(this,t,e),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Ar(t,e){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new Ne({fog:!1}),e=new Rt,e.addAttribute("position",new q(new Float32Array(15),3)),this.line=new qe(e,t),this.add(this.line),this.update()}function Lr(t,e,i){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,t=new Dn(e),t.rotateY(.5*Math.PI),this.material=new je({wireframe:!0,fog:!1}),this.color===void 0&&(this.material.vertexColors=2),e=t.getAttribute("position"),e=new Float32Array(3*e.count),t.addAttribute("color",new q(e,3)),this.add(new Ke(t,this.material)),this.update()}function go(t,e,i,n){t=t||10,e=e||10,i=new H(i!==void 0?i:4473924),n=new H(n!==void 0?n:8947848);var r=e/2,o=t/e,s=t/2;t=[];for(var a=[],h=0,l=0,c=-s;h<=e;h++,c+=o){t.push(-s,0,c,s,0,c),t.push(c,0,-s,c,0,s);var u=h===r?i:n;u.toArray(a,l),l+=3,u.toArray(a,l),l+=3,u.toArray(a,l),l+=3,u.toArray(a,l),l+=3}e=new Rt,e.addAttribute("position",new ut(t,3)),e.addAttribute("color",new ut(a,3)),i=new Ne({vertexColors:2}),be.call(this,e,i)}function Wo(t,e,i,n,r,o){t=t||10,e=e||16,i=i||8,n=n||64,r=new H(r!==void 0?r:4473924),o=new H(o!==void 0?o:8947848);var s=[],a=[],h;for(h=0;h<=e;h++){var l=h/e*2*Math.PI,c=Math.sin(l)*t;l=Math.cos(l)*t,s.push(0,0,0),s.push(c,0,l);var u=h&1?r:o;a.push(u.r,u.g,u.b),a.push(u.r,u.g,u.b)}for(h=0;h<=i;h++){u=h&1?r:o;var d=t-t/i*h;for(e=0;e<n;e++)l=e/n*2*Math.PI,c=Math.sin(l)*d,l=Math.cos(l)*d,s.push(c,0,l),a.push(u.r,u.g,u.b),l=(e+1)/n*2*Math.PI,c=Math.sin(l)*d,l=Math.cos(l)*d,s.push(c,0,l),a.push(u.r,u.g,u.b)}t=new Rt,t.addAttribute("position",new ut(s,3)),t.addAttribute("color",new ut(a,3)),s=new Ne({vertexColors:2}),be.call(this,t,s)}function vo(t,e,i,n){this.object=t,this.size=e!==void 0?e:1,t=i!==void 0?i:16776960,n=n!==void 0?n:1,e=0,(i=this.object.geometry)&&i.isGeometry?e=i.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead."),i=new Rt,e=new ut(6*e,3),i.addAttribute("position",e),be.call(this,i,new Ne({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function br(t,e,i){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,e===void 0&&(e=1),t=new Rt,t.addAttribute("position",new ut([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3)),e=new Ne({fog:!1}),this.lightPlane=new qe(t,e),this.add(this.lightPlane),t=new Rt,t.addAttribute("position",new ut([0,0,0,0,0,1],3)),this.targetLine=new qe(t,e),this.add(this.targetLine),this.update()}function yo(t){function e(g,w,S){i(g,S),i(w,S)}function i(g,w){o.push(0,0,0),s.push(w.r,w.g,w.b),a[g]===void 0&&(a[g]=[]),a[g].push(o.length/3-1)}var n=new Rt,r=new Ne({color:16777215,vertexColors:1}),o=[],s=[],a={},h=new H(16755200),l=new H(16711680),c=new H(43775),u=new H(16777215),d=new H(3355443);e("n1","n2",h),e("n2","n4",h),e("n4","n3",h),e("n3","n1",h),e("f1","f2",h),e("f2","f4",h),e("f4","f3",h),e("f3","f1",h),e("n1","f1",h),e("n2","f2",h),e("n3","f3",h),e("n4","f4",h),e("p","n1",l),e("p","n2",l),e("p","n3",l),e("p","n4",l),e("u1","u2",c),e("u2","u3",c),e("u3","u1",c),e("c","t",u),e("p","c",d),e("cn1","cn2",d),e("cn3","cn4",d),e("cf1","cf2",d),e("cf3","cf4",d),n.addAttribute("position",new ut(o,3)),n.addAttribute("color",new ut(s,3)),be.call(this,n,r),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}function _n(t,e){this.object=t,e===void 0&&(e=16776960),t=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]);var i=new Float32Array(24),n=new Rt;n.setIndex(new q(t,1)),n.addAttribute("position",new q(i,3)),be.call(this,n,new Ne({color:e})),this.matrixAutoUpdate=!1,this.update()}function _o(t,e){this.type="Box3Helper",this.box=t,t=e!==void 0?e:16776960,e=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]);var i=new Rt;i.setIndex(new q(e,1)),i.addAttribute("position",new ut([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)),be.call(this,i,new Ne({color:t})),this.geometry.computeBoundingSphere()}function xo(t,e,i){this.type="PlaneHelper",this.plane=t,this.size=e===void 0?1:e,t=i!==void 0?i:16776960,e=new Rt,e.addAttribute("position",new ut([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)),e.computeBoundingSphere(),qe.call(this,e,new Ne({color:t})),e=new Rt,e.addAttribute("position",new ut([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),e.computeBoundingSphere(),this.add(new Ke(e,new je({color:t,opacity:.2,transparent:!0,depthWrite:!1})))}function xn(t,e,i,n,r,o){b.call(this),t===void 0&&(t=new THREE.Vector3(0,0,1)),e===void 0&&(e=new THREE.Vector3(0,0,0)),i===void 0&&(i=1),n===void 0&&(n=16776960),r===void 0&&(r=.2*i),o===void 0&&(o=.2*r),Zo===void 0&&(Zo=new Rt,Zo.addAttribute("position",new ut([0,0,0,0,1,0],3)),Ns=new vn(0,.5,1,5,1),Ns.translate(0,-.5,0)),this.position.copy(e),this.line=new qe(Zo,new Ne({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Ke(Ns,new je({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,r,o)}function wo(t){t=t||1;var e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t];t=new Rt,t.addAttribute("position",new ut(e,3)),t.addAttribute("color",new ut([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),e=new Ne({vertexColors:2}),be.call(this,t,e)}function ca(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom",this.closed=!0}function ua(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom"}function Rs(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom"}Number.EPSILON===void 0&&(Number.EPSILON=Math.pow(2,-52)),Number.isInteger===void 0&&(Number.isInteger=function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}),Math.sign===void 0&&(Math.sign=function(t){return 0>t?-1:0<t?1:+t}),!("name"in Function.prototype)&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),Object.assign===void 0&&function(){Object.assign=function(t){if(t==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(n!=null)for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}}(),Object.assign(pt.prototype,{addEventListener:function(t,e){this._listeners===void 0&&(this._listeners={});var i=this._listeners;i[t]===void 0&&(i[t]=[]),i[t].indexOf(e)===-1&&i[t].push(e)},hasEventListener:function(t,e){if(this._listeners===void 0)return!1;var i=this._listeners;return i[t]!==void 0&&i[t].indexOf(e)!==-1},removeEventListener:function(t,e){this._listeners!==void 0&&(t=this._listeners[t],t!==void 0&&(e=t.indexOf(e),e!==-1&&t.splice(e,1)))},dispatchEvent:function(t){if(this._listeners!==void 0){var e=this._listeners[t.type];if(e!==void 0){t.target=this,e=e.slice(0);for(var i=0,n=e.length;i<n;i++)e[i].call(this,t)}}}});var Se={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;256>e;e++)t[e]=(16>e?"0":"")+e.toString(16);return function(){var i=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,o=4294967295*Math.random()|0;return(t[i&255]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]+"-"+t[n&255]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[r&63|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[o&255]+t[o>>8&255]+t[o>>16&255]+t[o>>24&255]).toUpperCase()}}(),clamp:function(t,e,i){return Math.max(e,Math.min(i,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,i,n,r){return n+(t-e)*(r-n)/(i-e)},lerp:function(t,e,i){return(1-i)*t+i*e},smoothstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*(3-2*t))},smootherstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*t*(t*(6*t-15)+10))},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*Se.DEG2RAD},radToDeg:function(t){return t*Se.RAD2DEG},isPowerOfTwo:function(t){return(t&t-1)===0&&t!==0},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};Object.defineProperties(Z.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(Z.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.y=this.x=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return e!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return e!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,i=this.y;return t=t.elements,this.x=t[0]*e+t[3]*i+t[6],this.y=t[1]*e+t[4]*i+t[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(){var t=new Z,e=new Z;return function(i,n){return t.set(i,i),e.set(n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return 0>t&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x;return t=this.y-t.y,e*e+t*t},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return e===void 0&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,i){return i!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var i=Math.cos(e);e=Math.sin(e);var n=this.x-t.x,r=this.y-t.y;return this.x=n*i-r*e+t.x,this.y=n*e+r*i+t.y,this}}),Object.assign(ft.prototype,{isMatrix4:!0,set:function(t,e,i,n,r,o,s,a,h,l,c,u,d,g,w,S){var P=this.elements;return P[0]=t,P[4]=e,P[8]=i,P[12]=n,P[1]=r,P[5]=o,P[9]=s,P[13]=a,P[2]=h,P[6]=l,P[10]=c,P[14]=u,P[3]=d,P[7]=g,P[11]=w,P[15]=S,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return new ft().fromArray(this.elements)},copy:function(t){var e=this.elements;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},copyPosition:function(t){var e=this.elements;return t=t.elements,e[12]=t[12],e[13]=t[13],e[14]=t[14],this},extractBasis:function(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this},extractRotation:function(){var t=new x;return function(e){var i=this.elements,n=e.elements,r=1/t.setFromMatrixColumn(e,0).length(),o=1/t.setFromMatrixColumn(e,1).length();return e=1/t.setFromMatrixColumn(e,2).length(),i[0]=n[0]*r,i[1]=n[1]*r,i[2]=n[2]*r,i[3]=0,i[4]=n[4]*o,i[5]=n[5]*o,i[6]=n[6]*o,i[7]=0,i[8]=n[8]*e,i[9]=n[9]*e,i[10]=n[10]*e,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}}(),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,i=t.x,n=t.y,r=t.z,o=Math.cos(i);i=Math.sin(i);var s=Math.cos(n);n=Math.sin(n);var a=Math.cos(r);if(r=Math.sin(r),t.order==="XYZ"){t=o*a;var h=o*r,l=i*a,c=i*r;e[0]=s*a,e[4]=-s*r,e[8]=n,e[1]=h+l*n,e[5]=t-c*n,e[9]=-i*s,e[2]=c-t*n,e[6]=l+h*n,e[10]=o*s}else t.order==="YXZ"?(t=s*a,h=s*r,l=n*a,c=n*r,e[0]=t+c*i,e[4]=l*i-h,e[8]=o*n,e[1]=o*r,e[5]=o*a,e[9]=-i,e[2]=h*i-l,e[6]=c+t*i,e[10]=o*s):t.order==="ZXY"?(t=s*a,h=s*r,l=n*a,c=n*r,e[0]=t-c*i,e[4]=-o*r,e[8]=l+h*i,e[1]=h+l*i,e[5]=o*a,e[9]=c-t*i,e[2]=-o*n,e[6]=i,e[10]=o*s):t.order==="ZYX"?(t=o*a,h=o*r,l=i*a,c=i*r,e[0]=s*a,e[4]=l*n-h,e[8]=t*n+c,e[1]=s*r,e[5]=c*n+t,e[9]=h*n-l,e[2]=-n,e[6]=i*s,e[10]=o*s):t.order==="YZX"?(t=o*s,h=o*n,l=i*s,c=i*n,e[0]=s*a,e[4]=c-t*r,e[8]=l*r+h,e[1]=r,e[5]=o*a,e[9]=-i*a,e[2]=-n*a,e[6]=h*r+l,e[10]=t-c*r):t.order==="XZY"&&(t=o*s,h=o*n,l=i*s,c=i*n,e[0]=s*a,e[4]=-r,e[8]=n*a,e[1]=t*r+c,e[5]=o*a,e[9]=h*r-l,e[2]=l*r-h,e[6]=i*a,e[10]=c*r+t);return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(){var t=new x(0,0,0),e=new x(1,1,1);return function(i){return this.compose(t,i,e)}}(),lookAt:function(){var t=new x,e=new x,i=new x;return function(n,r,o){var s=this.elements;return i.subVectors(n,r),i.lengthSq()===0&&(i.z=1),i.normalize(),t.crossVectors(o,i),t.lengthSq()===0&&(Math.abs(o.z)===1?i.x+=1e-4:i.z+=1e-4,i.normalize(),t.crossVectors(o,i)),t.normalize(),e.crossVectors(i,t),s[0]=t.x,s[4]=e.x,s[8]=i.x,s[1]=t.y,s[5]=e.y,s[9]=i.y,s[2]=t.z,s[6]=e.z,s[10]=i.z,this}}(),multiply:function(t,e){return e!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements;e=this.elements,t=i[0];var r=i[4],o=i[8],s=i[12],a=i[1],h=i[5],l=i[9],c=i[13],u=i[2],d=i[6],g=i[10],w=i[14],S=i[3],P=i[7],k=i[11];i=i[15];var N=n[0],J=n[4],V=n[8],ot=n[12],T=n[1],A=n[5],tt=n[9],_t=n[13],vt=n[2],lt=n[6],Ht=n[10],Dt=n[14],$t=n[3],Xt=n[7],Qt=n[11];return n=n[15],e[0]=t*N+r*T+o*vt+s*$t,e[4]=t*J+r*A+o*lt+s*Xt,e[8]=t*V+r*tt+o*Ht+s*Qt,e[12]=t*ot+r*_t+o*Dt+s*n,e[1]=a*N+h*T+l*vt+c*$t,e[5]=a*J+h*A+l*lt+c*Xt,e[9]=a*V+h*tt+l*Ht+c*Qt,e[13]=a*ot+h*_t+l*Dt+c*n,e[2]=u*N+d*T+g*vt+w*$t,e[6]=u*J+d*A+g*lt+w*Xt,e[10]=u*V+d*tt+g*Ht+w*Qt,e[14]=u*ot+d*_t+g*Dt+w*n,e[3]=S*N+P*T+k*vt+i*$t,e[7]=S*J+P*A+k*lt+i*Xt,e[11]=S*V+P*tt+k*Ht+i*Qt,e[15]=S*ot+P*_t+k*Dt+i*n,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToBufferAttribute:function(){var t=new x;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix4(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],i=t[4],n=t[8],r=t[12],o=t[1],s=t[5],a=t[9],h=t[13],l=t[2],c=t[6],u=t[10],d=t[14];return t[3]*(+r*a*c-n*h*c-r*s*u+i*h*u+n*s*d-i*a*d)+t[7]*(+e*a*d-e*h*u+r*o*u-n*o*d+n*h*l-r*a*l)+t[11]*(+e*h*c-e*s*d-r*o*c+i*o*d+r*s*l-i*h*l)+t[15]*(-n*s*l-e*a*c+e*s*u+n*o*c-i*o*u+i*a*l)},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var i=this.elements,n=t.elements;t=n[0];var r=n[1],o=n[2],s=n[3],a=n[4],h=n[5],l=n[6],c=n[7],u=n[8],d=n[9],g=n[10],w=n[11],S=n[12],P=n[13],k=n[14];n=n[15];var N=d*k*c-P*g*c+P*l*w-h*k*w-d*l*n+h*g*n,J=S*g*c-u*k*c-S*l*w+a*k*w+u*l*n-a*g*n,V=u*P*c-S*d*c+S*h*w-a*P*w-u*h*n+a*d*n,ot=S*d*l-u*P*l-S*h*g+a*P*g+u*h*k-a*d*k,T=t*N+r*J+o*V+s*ot;if(T===0){if(e===!0)throw Error("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/T,i[0]=N*e,i[1]=(P*g*s-d*k*s-P*o*w+r*k*w+d*o*n-r*g*n)*e,i[2]=(h*k*s-P*l*s+P*o*c-r*k*c-h*o*n+r*l*n)*e,i[3]=(d*l*s-h*g*s-d*o*c+r*g*c+h*o*w-r*l*w)*e,i[4]=J*e,i[5]=(u*k*s-S*g*s+S*o*w-t*k*w-u*o*n+t*g*n)*e,i[6]=(S*l*s-a*k*s-S*o*c+t*k*c+a*o*n-t*l*n)*e,i[7]=(a*g*s-u*l*s+u*o*c-t*g*c-a*o*w+t*l*w)*e,i[8]=V*e,i[9]=(S*d*s-u*P*s-S*r*w+t*P*w+u*r*n-t*d*n)*e,i[10]=(a*P*s-S*h*s+S*r*c-t*P*c-a*r*n+t*h*n)*e,i[11]=(u*h*s-a*d*s-u*r*c+t*d*c+a*r*w-t*h*w)*e,i[12]=ot*e,i[13]=(u*P*o-S*d*o+S*r*g-t*P*g-u*r*k+t*d*k)*e,i[14]=(S*h*o-a*P*o-S*r*l+t*P*l+a*r*k-t*h*k)*e,i[15]=(a*d*o-u*h*o+u*r*l-t*d*l-a*r*g+t*h*g)*e,this},scale:function(t){var e=this.elements,i=t.x,n=t.y;return t=t.z,e[0]*=i,e[4]*=n,e[8]*=t,e[1]*=i,e[5]*=n,e[9]*=t,e[2]*=i,e[6]*=n,e[10]*=t,e[3]*=i,e[7]*=n,e[11]*=t,this},getMaxScaleOnAxis:function(){var t=this.elements;return Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1]+t[2]*t[2],t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))},makeTranslation:function(t,e,i){return this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(1,0,0,0,0,e,-t,0,0,t,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,0,t,0,0,1,0,0,-t,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,-t,0,0,t,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var i=Math.cos(e);e=Math.sin(e);var n=1-i,r=t.x,o=t.y;t=t.z;var s=n*r,a=n*o;return this.set(s*r+i,s*o-e*t,s*t+e*o,0,s*o+e*t,a*o+i,a*t-e*r,0,s*t-e*o,a*t+e*r,n*t*t+i,0,0,0,0,1),this},makeScale:function(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this},makeShear:function(t,e,i){return this.set(1,e,i,0,t,1,i,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,i){var n=this.elements,r=e._x,o=e._y,s=e._z,a=e._w,h=r+r,l=o+o,c=s+s;e=r*h;var u=r*l;r*=c;var d=o*l;o*=c,s*=c,h*=a,l*=a,a*=c,c=i.x;var g=i.y;return i=i.z,n[0]=(1-(d+s))*c,n[1]=(u+a)*c,n[2]=(r-l)*c,n[3]=0,n[4]=(u-a)*g,n[5]=(1-(e+s))*g,n[6]=(o+h)*g,n[7]=0,n[8]=(r+l)*i,n[9]=(o-h)*i,n[10]=(1-(e+d))*i,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this},decompose:function(){var t=new x,e=new ft;return function(i,n,r){var o=this.elements,s=t.set(o[0],o[1],o[2]).length(),a=t.set(o[4],o[5],o[6]).length(),h=t.set(o[8],o[9],o[10]).length();0>this.determinant()&&(s=-s),i.x=o[12],i.y=o[13],i.z=o[14],e.copy(this),i=1/s,o=1/a;var l=1/h;return e.elements[0]*=i,e.elements[1]*=i,e.elements[2]*=i,e.elements[4]*=o,e.elements[5]*=o,e.elements[6]*=o,e.elements[8]*=l,e.elements[9]*=l,e.elements[10]*=l,n.setFromRotationMatrix(e),r.x=s,r.y=a,r.z=h,this}}(),makePerspective:function(t,e,i,n,r,o){o===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var s=this.elements;return s[0]=2*r/(e-t),s[4]=0,s[8]=(e+t)/(e-t),s[12]=0,s[1]=0,s[5]=2*r/(i-n),s[9]=(i+n)/(i-n),s[13]=0,s[2]=0,s[6]=0,s[10]=-(o+r)/(o-r),s[14]=-2*o*r/(o-r),s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this},makeOrthographic:function(t,e,i,n,r,o){var s=this.elements,a=1/(e-t),h=1/(i-n),l=1/(o-r);return s[0]=2*a,s[4]=0,s[8]=0,s[12]=-((e+t)*a),s[1]=0,s[5]=2*h,s[9]=0,s[13]=-((i+n)*h),s[2]=0,s[6]=0,s[10]=-2*l,s[14]=-((o+r)*l),s[3]=0,s[7]=0,s[11]=0,s[15]=1,this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;16>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;16>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}),Object.assign(at,{slerp:function(t,e,i,n){return i.copy(t).slerp(e,n)},slerpFlat:function(t,e,i,n,r,o,s){var a=i[n+0],h=i[n+1],l=i[n+2];i=i[n+3],n=r[o+0];var c=r[o+1],u=r[o+2];if(r=r[o+3],i!==r||a!==n||h!==c||l!==u){o=1-s;var d=a*n+h*c+l*u+i*r,g=0<=d?1:-1,w=1-d*d;w>Number.EPSILON&&(w=Math.sqrt(w),d=Math.atan2(w,d*g),o=Math.sin(o*d)/w,s=Math.sin(s*d)/w),g*=s,a=a*o+n*g,h=h*o+c*g,l=l*o+u*g,i=i*o+r*g,o===1-s&&(s=1/Math.sqrt(a*a+h*h+l*l+i*i),a*=s,h*=s,l*=s,i*=s)}t[e]=a,t[e+1]=h,t[e+2]=l,t[e+3]=i}}),Object.defineProperties(at.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(at.prototype,{isQuaternion:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var i=t._x,n=t._y,r=t._z;t=t.order;var o=Math.cos,s=Math.sin,a=o(i/2),h=o(n/2);return o=o(r/2),i=s(i/2),n=s(n/2),r=s(r/2),t==="XYZ"?(this._x=i*h*o+a*n*r,this._y=a*n*o-i*h*r,this._z=a*h*r+i*n*o,this._w=a*h*o-i*n*r):t==="YXZ"?(this._x=i*h*o+a*n*r,this._y=a*n*o-i*h*r,this._z=a*h*r-i*n*o,this._w=a*h*o+i*n*r):t==="ZXY"?(this._x=i*h*o-a*n*r,this._y=a*n*o+i*h*r,this._z=a*h*r+i*n*o,this._w=a*h*o-i*n*r):t==="ZYX"?(this._x=i*h*o-a*n*r,this._y=a*n*o+i*h*r,this._z=a*h*r-i*n*o,this._w=a*h*o+i*n*r):t==="YZX"?(this._x=i*h*o+a*n*r,this._y=a*n*o+i*h*r,this._z=a*h*r-i*n*o,this._w=a*h*o-i*n*r):t==="XZY"&&(this._x=i*h*o-a*n*r,this._y=a*n*o-i*h*r,this._z=a*h*r+i*n*o,this._w=a*h*o+i*n*r),e!==!1&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){e/=2;var i=Math.sin(e);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(e),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e=t.elements,i=e[0];t=e[4];var n=e[8],r=e[1],o=e[5],s=e[9],a=e[2],h=e[6];e=e[10];var l=i+o+e;return 0<l?(i=.5/Math.sqrt(l+1),this._w=.25/i,this._x=(h-s)*i,this._y=(n-a)*i,this._z=(r-t)*i):i>o&&i>e?(i=2*Math.sqrt(1+i-o-e),this._w=(h-s)/i,this._x=.25*i,this._y=(t+r)/i,this._z=(n+a)/i):o>e?(i=2*Math.sqrt(1+o-i-e),this._w=(n-a)/i,this._x=(t+r)/i,this._y=.25*i,this._z=(s+h)/i):(i=2*Math.sqrt(1+e-i-o),this._w=(r-t)/i,this._x=(n+a)/i,this._y=(s+h)/i,this._z=.25*i),this.onChangeCallback(),this},setFromUnitVectors:function(){var t=new x,e;return function(i,n){return t===void 0&&(t=new x),e=i.dot(n)+1,1e-6>e?(e=0,Math.abs(i.x)>Math.abs(i.z)?t.set(-i.y,i.x,0):t.set(0,-i.z,i.y)):t.crossVectors(i,n),this._x=t.x,this._y=t.y,this._z=t.z,this._w=e,this.normalize()}}(),angleTo:function(t){return 2*Math.acos(Math.abs(Se.clamp(this.dot(t),-1,1)))},rotateTowards:function(t,e){var i=this.angleTo(t);return i===0?this:(this.slerp(t,Math.min(1,e/i)),this)},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return t===0?(this._z=this._y=this._x=0,this._w=1):(t=1/t,this._x*=t,this._y*=t,this._z*=t,this._w*=t),this.onChangeCallback(),this},multiply:function(t,e){return e!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var i=t._x,n=t._y,r=t._z;t=t._w;var o=e._x,s=e._y,a=e._z;return e=e._w,this._x=i*e+t*o+n*a-r*s,this._y=n*e+t*s+r*o-i*a,this._z=r*e+t*a+i*s-n*o,this._w=t*e-i*o-n*s-r*a,this.onChangeCallback(),this},slerp:function(t,e){if(e===0)return this;if(e===1)return this.copy(t);var i=this._x,n=this._y,r=this._z,o=this._w,s=o*t._w+i*t._x+n*t._y+r*t._z;if(0>s?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),1<=s)return this._w=o,this._x=i,this._y=n,this._z=r,this;if(t=1-s*s,t<=Number.EPSILON)return s=1-e,this._w=s*o+e*this._w,this._x=s*i+e*this._x,this._y=s*n+e*this._y,this._z=s*r+e*this._z,this.normalize();t=Math.sqrt(t);var a=Math.atan2(t,s);return s=Math.sin((1-e)*a)/t,e=Math.sin(e*a)/t,this._w=o*s+this._w*e,this._x=i*s+this._x*e,this._y=n*s+this._y*e,this._z=r*s+this._z*e,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return e===void 0&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(x.prototype,{isVector3:!0,set:function(t,e,i){return this.x=t,this.y=e,this.z=i,this},setScalar:function(t){return this.z=this.y=this.x=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return e!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return e!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return e!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t=new at;return function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(t.setFromEuler(e))}}(),applyAxisAngle:function(){var t=new at;return function(e,i){return this.applyQuaternion(t.setFromAxisAngle(e,i))}}(),applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[3]*i+t[6]*n,this.y=t[1]*e+t[4]*i+t[7]*n,this.z=t[2]*e+t[5]*i+t[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z;t=t.elements;var r=1/(t[3]*e+t[7]*i+t[11]*n+t[15]);return this.x=(t[0]*e+t[4]*i+t[8]*n+t[12])*r,this.y=(t[1]*e+t[5]*i+t[9]*n+t[13])*r,this.z=(t[2]*e+t[6]*i+t[10]*n+t[14])*r,this},applyQuaternion:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,o=t.y,s=t.z;t=t.w;var a=t*e+o*n-s*i,h=t*i+s*e-r*n,l=t*n+r*i-o*e;return e=-r*e-o*i-s*n,this.x=a*t+e*-r+h*-s-l*-o,this.y=h*t+e*-o+l*-r-a*-s,this.z=l*t+e*-s+a*-o-h*-r,this},project:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)},unproject:function(){var t=new ft;return function(e){return this.applyMatrix4(t.getInverse(e.projectionMatrix)).applyMatrix4(e.matrixWorld)}}(),transformDirection:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n,this.y=t[1]*e+t[5]*i+t[9]*n,this.z=t[2]*e+t[6]*i+t[10]*n,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new x,e=new x;return function(i,n){return t.set(i,i,i),e.set(n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},cross:function(t,e){return e!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var i=t.x,n=t.y;t=t.z;var r=e.x,o=e.y;return e=e.z,this.x=n*e-t*o,this.y=t*r-i*e,this.z=i*o-n*r,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new x;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new x;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){return t=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq()),Math.acos(Se.clamp(t,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,i=this.y-t.y;return t=this.z-t.z,e*e+i*i+t*t},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)},setFromSphericalCoords:function(t,e,i){var n=Math.sin(e)*t;return this.x=n*Math.sin(i),this.y=Math.cos(e)*t,this.z=n*Math.cos(i),this},setFromCylindrical:function(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)},setFromCylindricalCoords:function(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this},setFromMatrixPosition:function(t){return t=t.elements,this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length();return t=this.setFromMatrixColumn(t,2).length(),this.x=e,this.y=i,this.z=t,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return e===void 0&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,i){return i!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(mt.prototype,{isMatrix3:!0,set:function(t,e,i,n,r,o,s,a,h){var l=this.elements;return l[0]=t,l[1]=n,l[2]=s,l[3]=e,l[4]=r,l[5]=a,l[6]=i,l[7]=o,l[8]=h,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return new this.constructor().fromArray(this.elements)},copy:function(t){var e=this.elements;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},setFromMatrix4:function(t){return t=t.elements,this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(){var t=new x;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix3(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements;e=this.elements,t=i[0];var r=i[3],o=i[6],s=i[1],a=i[4],h=i[7],l=i[2],c=i[5];i=i[8];var u=n[0],d=n[3],g=n[6],w=n[1],S=n[4],P=n[7],k=n[2],N=n[5];return n=n[8],e[0]=t*u+r*w+o*k,e[3]=t*d+r*S+o*N,e[6]=t*g+r*P+o*n,e[1]=s*u+a*w+h*k,e[4]=s*d+a*S+h*N,e[7]=s*g+a*P+h*n,e[2]=l*u+c*w+i*k,e[5]=l*d+c*S+i*N,e[8]=l*g+c*P+i*n,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],i=t[1],n=t[2],r=t[3],o=t[4],s=t[5],a=t[6],h=t[7];return t=t[8],e*o*t-e*s*h-i*r*t+i*s*a+n*r*h-n*o*a},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var i=t.elements;t=this.elements;var n=i[0],r=i[1],o=i[2],s=i[3],a=i[4],h=i[5],l=i[6],c=i[7];i=i[8];var u=i*a-h*c,d=h*l-i*s,g=c*s-a*l,w=n*u+r*d+o*g;if(w===0){if(e===!0)throw Error("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/w,t[0]=u*e,t[1]=(o*c-i*r)*e,t[2]=(h*r-o*a)*e,t[3]=d*e,t[4]=(i*n-o*l)*e,t[5]=(o*s-h*n)*e,t[6]=g*e,t[7]=(r*l-c*n)*e,t[8]=(a*n-r*s)*e,this},transpose:function(){var t=this.elements,e=t[1];return 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:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},setUvTransform:function(t,e,i,n,r,o,s){var a=Math.cos(r);r=Math.sin(r),this.set(i*a,i*r,-i*(a*o+r*s)+o+t,-n*r,n*a,-n*(-r*o+a*s)+s+e,0,0,1)},scale:function(t,e){var i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=e,i[4]*=e,i[7]*=e,this},rotate:function(t){var e=Math.cos(t);t=Math.sin(t);var i=this.elements,n=i[0],r=i[3],o=i[6],s=i[1],a=i[4],h=i[7];return i[0]=e*n+t*s,i[3]=e*r+t*a,i[6]=e*o+t*h,i[1]=-t*n+e*s,i[4]=-t*r+e*a,i[7]=-t*o+e*h,this},translate:function(t,e){var i=this.elements;return i[0]+=t*i[2],i[3]+=t*i[5],i[6]+=t*i[8],i[1]+=e*i[2],i[4]+=e*i[5],i[7]+=e*i[8],this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;9>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;9>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}});var An={getDataURL:function(t){if(typeof HTMLCanvasElement>"u")return t.src;if(t instanceof HTMLCanvasElement)var e=t;else{e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),e.width=t.width,e.height=t.height;var i=e.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height)}return 2048<e.width||2048<e.height?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}},oh=0;Ct.DEFAULT_IMAGE=void 0,Ct.DEFAULT_MAPPING=300,Ct.prototype=Object.assign(Object.create(pt.prototype),{constructor:Ct,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];var i={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,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(this.image!==void 0){var n=this.image;if(n.uuid===void 0&&(n.uuid=Se.generateUUID()),!e&&t.images[n.uuid]===void 0){if(Array.isArray(n))for(var r=[],o=0,s=n.length;o<s;o++)r.push(An.getDataURL(n[o]));else r=An.getDataURL(n);t.images[n.uuid]={uuid:n.uuid,url:r}}i.image=n.uuid}return e||(t.textures[this.uuid]=i),i},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping!==300)return t;if(t.applyMatrix3(this.matrix),0>t.x||1<t.x)switch(this.wrapS){case 1e3:t.x-=Math.floor(t.x);break;case 1001:t.x=0>t.x?0:1;break;case 1002:t.x=Math.abs(Math.floor(t.x)%2)===1?Math.ceil(t.x)-t.x:t.x-Math.floor(t.x)}if(0>t.y||1<t.y)switch(this.wrapT){case 1e3:t.y-=Math.floor(t.y);break;case 1001:t.y=0>t.y?0:1;break;case 1002:t.y=Math.abs(Math.floor(t.y)%2)===1?Math.ceil(t.y)-t.y:t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}}),Object.defineProperty(Ct.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(Y.prototype,{isVector4:!0,set:function(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this},setScalar:function(t){return this.w=this.z=this.y=this.x=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this},add:function(t,e){return e!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return e!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=this.w;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n+t[12]*r,this.y=t[1]*e+t[5]*i+t[9]*n+t[13]*r,this.z=t[2]*e+t[6]*i+t[10]*n+t[14]*r,this.w=t[3]*e+t[7]*i+t[11]*n+t[15]*r,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return 1e-4>e?(this.x=1,this.z=this.y=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){t=t.elements;var e=t[0],i=t[4],n=t[8],r=t[1],o=t[5],s=t[9],a=t[2],h=t[6],l=t[10];return .01>Math.abs(i-r)&&.01>Math.abs(n-a)&&.01>Math.abs(s-h)?.1>Math.abs(i+r)&&.1>Math.abs(n+a)&&.1>Math.abs(s+h)&&.1>Math.abs(e+o+l-3)?(this.set(1,0,0,0),this):(t=Math.PI,e=(e+1)/2,o=(o+1)/2,l=(l+1)/2,i=(i+r)/4,n=(n+a)/4,s=(s+h)/4,e>o&&e>l?.01>e?(h=0,i=a=.707106781):(h=Math.sqrt(e),a=i/h,i=n/h):o>l?.01>o?(h=.707106781,a=0,i=.707106781):(a=Math.sqrt(o),h=i/a,i=s/a):.01>l?(a=h=.707106781,i=0):(i=Math.sqrt(l),h=n/i,a=s/i),this.set(h,a,i,t),this):(t=Math.sqrt((h-s)*(h-s)+(n-a)*(n-a)+(r-i)*(r-i)),.001>Math.abs(t)&&(t=1),this.x=(h-s)/t,this.y=(n-a)/t,this.z=(r-i)/t,this.w=Math.acos((e+o+l-1)/2),this)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(i,n){return t===void 0&&(t=new Y,e=new Y),t.set(i,i,i,i),e.set(n,n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){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:function(){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:function(){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:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return e===void 0&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,i){return i!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),ht.prototype=Object.assign(Object.create(pt.prototype),{constructor:ht,isWebGLRenderTarget:!0,setSize:function(t,e){(this.width!==t||this.height!==e)&&(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),wt.prototype=Object.create(ht.prototype),wt.prototype.constructor=wt,wt.prototype.isWebGLRenderTargetCube=!0,ct.prototype=Object.create(Ct.prototype),ct.prototype.constructor=ct,ct.prototype.isDataTexture=!0,Object.assign(Pt.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,i=1/0,n=1/0,r=-1/0,o=-1/0,s=-1/0,a=0,h=t.length;a<h;a+=3){var l=t[a],c=t[a+1],u=t[a+2];l<e&&(e=l),c<i&&(i=c),u<n&&(n=u),l>r&&(r=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(e,i,n),this.max.set(r,o,s),this},setFromBufferAttribute:function(t){for(var e=1/0,i=1/0,n=1/0,r=-1/0,o=-1/0,s=-1/0,a=0,h=t.count;a<h;a++){var l=t.getX(a),c=t.getY(a),u=t.getZ(a);l<e&&(e=l),c<i&&(i=c),u<n&&(n=u),l>r&&(r=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(e,i,n),this.max.set(r,o,s),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new x;return function(e,i){return i=t.copy(i).multiplyScalar(.5),this.min.copy(e).sub(i),this.max.copy(e).add(i),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){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:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return t===void 0&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new x),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return t===void 0&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new x),this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},expandByObject:function(){function t(o){var s=o.geometry;if(s!==void 0){if(s.isGeometry)for(s=s.vertices,i=0,n=s.length;i<n;i++)r.copy(s[i]),r.applyMatrix4(o.matrixWorld),e.expandByPoint(r);else if(s.isBufferGeometry&&(s=s.attributes.position,s!==void 0))for(i=0,n=s.count;i<n;i++)r.fromBufferAttribute(s,i).applyMatrix4(o.matrixWorld),e.expandByPoint(r)}}var e,i,n,r=new x;return function(o){return e=this,o.updateMatrixWorld(!0),o.traverse(t),this}}(),containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new x),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsSphere:function(){var t=new x;return function(e){return this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){if(0<t.normal.x)var e=t.normal.x*this.min.x,i=t.normal.x*this.max.x;else e=t.normal.x*this.max.x,i=t.normal.x*this.min.x;return 0<t.normal.y?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),0<t.normal.z?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant},intersectsTriangle:function(){function t(u){var d,g=0;for(d=u.length-3;g<=d;g+=3){a.fromArray(u,g);var w=l.x*Math.abs(a.x)+l.y*Math.abs(a.y)+l.z*Math.abs(a.z),S=e.dot(a),P=i.dot(a),k=n.dot(a);if(Math.max(-Math.max(S,P,k),Math.min(S,P,k))>w)return!1}return!0}var e=new x,i=new x,n=new x,r=new x,o=new x,s=new x,a=new x,h=new x,l=new x,c=new x;return function(u){return this.isEmpty()||(this.getCenter(h),l.subVectors(this.max,h),e.subVectors(u.a,h),i.subVectors(u.b,h),n.subVectors(u.c,h),r.subVectors(i,e),o.subVectors(n,i),s.subVectors(e,n),u=[0,-r.z,r.y,0,-o.z,o.y,0,-s.z,s.y,r.z,0,-r.x,o.z,0,-o.x,s.z,0,-s.x,-r.y,r.x,0,-o.y,o.x,0,-s.y,s.x,0],!t(u))||(u=[1,0,0,0,1,0,0,0,1],!t(u))?!1:(c.crossVectors(r,o),u=[c.x,c.y,c.z],t(u))}}(),clampPoint:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new x),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new x;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new x;return function(e){return e===void 0&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new Ot),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new x,new x,new x,new x,new x,new x,new x,new x];return function(e){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(Ot.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new Pt;return function(e,i){var n=this.center;i!==void 0?n.copy(i):t.setFromPoints(e).getCenter(n);for(var r=i=0,o=e.length;r<o;r++)i=Math.max(i,n.distanceToSquared(e[r]));return this.radius=Math.sqrt(i),this}}(),clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return 0>=this.radius},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var i=this.center.distanceToSquared(t);return e===void 0&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new x),e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return t===void 0&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new Pt),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius*=t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(xt.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,i,n){return this.normal.set(t,e,i),this.constant=n,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new x,e=new x;return function(i,n,r){return n=t.subVectors(r,n).cross(e.subVectors(i,n)).normalize(),this.setFromNormalAndCoplanarPoint(n,i),this}}(),clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return e===void 0&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new x),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new x;return function(e,i){i===void 0&&(console.warn("THREE.Plane: .intersectLine() target is now required"),i=new x);var n=e.delta(t),r=this.normal.dot(n);if(r===0){if(this.distanceToPoint(e.start)===0)return i.copy(e.start)}else if(r=-(e.start.dot(this.normal)+this.constant)/r,!(0>r||1<r))return i.copy(n).multiplyScalar(r).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start);return t=this.distanceToPoint(t.end),0>e&&0<t||0>t&&0<e},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return t===void 0&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new x),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new x,e=new mt;return function(i,n){return n=n||e.getNormalMatrix(i),i=this.coplanarPoint(t).applyMatrix4(i),n=this.normal.applyMatrix3(n).normalize(),this.constant=-i.dot(n),this}}(),translate:function(t){return this.constant-=t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}}),Object.assign(Q.prototype,{set:function(t,e,i,n,r,o){var s=this.planes;return s[0].copy(t),s[1].copy(e),s[2].copy(i),s[3].copy(n),s[4].copy(r),s[5].copy(o),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){for(var e=this.planes,i=0;6>i;i++)e[i].copy(t.planes[i]);return this},setFromMatrix:function(t){var e=this.planes,i=t.elements;t=i[0];var n=i[1],r=i[2],o=i[3],s=i[4],a=i[5],h=i[6],l=i[7],c=i[8],u=i[9],d=i[10],g=i[11],w=i[12],S=i[13],P=i[14];return i=i[15],e[0].setComponents(o-t,l-s,g-c,i-w).normalize(),e[1].setComponents(o+t,l+s,g+c,i+w).normalize(),e[2].setComponents(o+n,l+a,g+u,i+S).normalize(),e[3].setComponents(o-n,l-a,g-u,i-S).normalize(),e[4].setComponents(o-r,l-h,g-d,i-P).normalize(),e[5].setComponents(o+r,l+h,g+d,i+P).normalize(),this},intersectsObject:function(){var t=new Ot;return function(e){var i=e.geometry;return i.boundingSphere===null&&i.computeBoundingSphere(),t.copy(i.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new Ot;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){var e=this.planes,i=t.center;t=-t.radius;for(var n=0;6>n;n++)if(e[n].distanceToPoint(i)<t)return!1;return!0},intersectsBox:function(){var t=new x;return function(e){for(var i=this.planes,n=0;6>n;n++){var r=i[n];if(t.x=0<r.normal.x?e.max.x:e.min.x,t.y=0<r.normal.y?e.max.y:e.min.y,t.z=0<r.normal.z?e.max.z:e.min.z,0>r.distanceToPoint(t))return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,i=0;6>i;i++)if(0>e[i].distanceToPoint(t))return!1;return!0}});var Ie={alphamap_fragment:`#ifdef USE_ALPHAMAP
|
|
285
|
+
`+e),f=e+f,p=us(h,35633,c+p),f=us(h,35632,f),h.attachShader(W,p),h.attachShader(W,f),n.index0AttributeName!==void 0?h.bindAttribLocation(W,0,n.index0AttributeName):s.morphTargets===!0&&h.bindAttribLocation(W,0,"position"),h.linkProgram(W),s=h.getProgramInfoLog(W).trim(),l=h.getShaderInfoLog(p).trim(),d=h.getShaderInfoLog(f).trim(),x=v=!0,h.getProgramParameter(W,35714)===!1?(v=!1,console.error("THREE.WebGLProgram: shader error: ",h.getError(),"35715",h.getProgramParameter(W,35715),"gl.getProgramInfoLog",s,l,d)):s!==""?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",s):(l===""||d==="")&&(x=!1),x&&(this.diagnostics={runnable:v,material:n,programLog:s,vertexShader:{log:l,prefix:c},fragmentShader:{log:d,prefix:e}}),h.deleteShader(p),h.deleteShader(f);var ot;this.getUniforms=function(){return ot===void 0&&(ot=new br(h,W,t)),ot};var Q;return this.getAttributes=function(){if(Q===void 0){for(var wt={},C=h.getProgramParameter(W,35721),D=0;D<C;D++){var ct=h.getActiveAttrib(W,D).name;wt[ct]=h.getAttribLocation(W,ct)}Q=wt}return Q},this.destroy=function(){h.deleteProgram(W),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=o.name,this.id=ro++,this.code=i,this.usedTimes=1,this.program=W,this.vertexShader=p,this.fragmentShader=f,this}function U(t,e,i){function n(h,c){if(h)h.isTexture?p=h.encoding:h.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),p=h.texture.encoding);else var p=3e3;return p===3e3&&c&&(p=3007),p}var o=[],s={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},l="precision supportsVertexTextures map mapEncoding matcapEncoding envMap envMapMode envMapEncoding lightMap aoMap emissiveMap emissiveMapEncoding bumpMap normalMap objectSpaceNormalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap combine vertexColors fog useFog fogExp flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights numRectAreaLights shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes numClipIntersection depthPacking dithering".split(" ");this.getParameters=function(h,c,p,f,d,v,x){var P=s[h.type];if(x.isSkinnedMesh){var R=x.skeleton.bones;if(i.floatVertexTextures)R=1024;else{var I=Math.min(Math.floor((i.maxVertexUniforms-20)/4),R.length);I<R.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+R.length+" bones. This GPU supports "+I+"."),R=0):R=I}}else R=0;I=i.precision,h.precision!==null&&(I=i.getMaxPrecision(h.precision),I!==h.precision&&console.warn("THREE.WebGLProgram.getParameters:",h.precision,"not supported, using",I,"instead."));var $=t.getRenderTarget();return{shaderID:P,precision:I,supportsVertexTextures:i.vertexTextures,outputEncoding:n($?$.texture:null,t.gammaOutput),map:!!h.map,mapEncoding:n(h.map,t.gammaInput),matcap:!!h.matcap,matcapEncoding:n(h.matcap,t.gammaInput),envMap:!!h.envMap,envMapMode:h.envMap&&h.envMap.mapping,envMapEncoding:n(h.envMap,t.gammaInput),envMapCubeUV:!!h.envMap&&(h.envMap.mapping===306||h.envMap.mapping===307),lightMap:!!h.lightMap,aoMap:!!h.aoMap,emissiveMap:!!h.emissiveMap,emissiveMapEncoding:n(h.emissiveMap,t.gammaInput),bumpMap:!!h.bumpMap,normalMap:!!h.normalMap,objectSpaceNormalMap:h.normalMapType===1,displacementMap:!!h.displacementMap,roughnessMap:!!h.roughnessMap,metalnessMap:!!h.metalnessMap,specularMap:!!h.specularMap,alphaMap:!!h.alphaMap,gradientMap:!!h.gradientMap,combine:h.combine,vertexColors:h.vertexColors,fog:!!f,useFog:h.fog,fogExp:f&&f.isFogExp2,flatShading:h.flatShading,sizeAttenuation:h.sizeAttenuation,logarithmicDepthBuffer:i.logarithmicDepthBuffer,skinning:h.skinning&&0<R,maxBones:R,useVertexTexture:i.floatVertexTextures,morphTargets:h.morphTargets,morphNormals:h.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:c.directional.length,numPointLights:c.point.length,numSpotLights:c.spot.length,numRectAreaLights:c.rectArea.length,numHemiLights:c.hemi.length,numClippingPlanes:d,numClipIntersection:v,dithering:h.dithering,shadowMapEnabled:t.shadowMap.enabled&&x.receiveShadow&&0<p.length,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:h.premultipliedAlpha,alphaTest:h.alphaTest,doubleSided:h.side===2,flipSided:h.side===1,depthPacking:h.depthPacking!==void 0?h.depthPacking:!1}},this.getProgramCode=function(h,c){var p=[];if(c.shaderID?p.push(c.shaderID):(p.push(h.fragmentShader),p.push(h.vertexShader)),h.defines!==void 0)for(var f in h.defines)p.push(f),p.push(h.defines[f]);for(f=0;f<l.length;f++)p.push(c[l[f]]);return p.push(h.onBeforeCompile.toString()),p.push(t.gammaOutput),p.push(t.gammaFactor),p.join()},this.acquireProgram=function(h,c,p,f){for(var d,v=0,x=o.length;v<x;v++){var P=o[v];if(P.code===f){d=P,++d.usedTimes;break}}return d===void 0&&(d=new b(t,e,f,h,c,p,i),o.push(d)),d},this.releaseProgram=function(h){if(--h.usedTimes===0){var c=o.indexOf(h);o[c]=o[o.length-1],o.pop(),h.destroy()}},this.programs=o}function N(){var t=new WeakMap;return{get:function(e){var i=t.get(e);return i===void 0&&(i={},t.set(e,i)),i},remove:function(e){t.delete(e)},update:function(e,i,n){t.get(e)[i]=n},dispose:function(){t=new WeakMap}}}function T(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function it(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function F(){var t=[],e=0,i=[],n=[];return{opaque:i,transparent:n,init:function(){e=0,i.length=0,n.length=0},push:function(o,s,l,h,c){var p=t[e];p===void 0?(p={id:o.id,object:o,geometry:s,material:l,program:l.program,renderOrder:o.renderOrder,z:h,group:c},t[e]=p):(p.id=o.id,p.object=o,p.geometry=s,p.material=l,p.program=l.program,p.renderOrder=o.renderOrder,p.z=h,p.group=c),(l.transparent===!0?n:i).push(p),e++},sort:function(){1<i.length&&i.sort(T),1<n.length&&n.sort(it)}}}function ut(){var t={};return{get:function(e,i){return e=e.id+","+i.id,i=t[e],i===void 0&&(i=new F,t[e]=i),i},dispose:function(){t={}}}}function xt(){var t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];switch(e.type){case"DirectionalLight":var i={direction:new S,color:new Z,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new M};break;case"SpotLight":i={position:new S,direction:new S,color:new Z,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new M};break;case"PointLight":i={position:new S,color:new Z,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new M,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":i={direction:new S,skyColor:new Z,groundColor:new Z};break;case"RectAreaLight":i={color:new Z,position:new S,halfWidth:new S,halfHeight:new S}}return t[e.id]=i}}}function pt(){var t=new xt,e={id:vl++,hash:{stateID:-1,directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,shadowsLength:-1},ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},i=new S,n=new _t,o=new _t;return{setup:function(s,l,h){var c=0,p=0,f=0,d=0,v=0,x=0,P=0,R=0;h=h.matrixWorldInverse;for(var I=0,$=s.length;I<$;I++){var W=s[I],ot=W.color,Q=W.intensity,wt=W.distance,C=W.shadow&&W.shadow.map?W.shadow.map.texture:null;if(W.isAmbientLight)c+=ot.r*Q,p+=ot.g*Q,f+=ot.b*Q;else if(W.isDirectionalLight){var D=t.get(W);D.color.copy(W.color).multiplyScalar(W.intensity),D.direction.setFromMatrixPosition(W.matrixWorld),i.setFromMatrixPosition(W.target.matrixWorld),D.direction.sub(i),D.direction.transformDirection(h),(D.shadow=W.castShadow)&&(ot=W.shadow,D.shadowBias=ot.bias,D.shadowRadius=ot.radius,D.shadowMapSize=ot.mapSize),e.directionalShadowMap[d]=C,e.directionalShadowMatrix[d]=W.shadow.matrix,e.directional[d]=D,d++}else W.isSpotLight?(D=t.get(W),D.position.setFromMatrixPosition(W.matrixWorld),D.position.applyMatrix4(h),D.color.copy(ot).multiplyScalar(Q),D.distance=wt,D.direction.setFromMatrixPosition(W.matrixWorld),i.setFromMatrixPosition(W.target.matrixWorld),D.direction.sub(i),D.direction.transformDirection(h),D.coneCos=Math.cos(W.angle),D.penumbraCos=Math.cos(W.angle*(1-W.penumbra)),D.decay=W.decay,(D.shadow=W.castShadow)&&(ot=W.shadow,D.shadowBias=ot.bias,D.shadowRadius=ot.radius,D.shadowMapSize=ot.mapSize),e.spotShadowMap[x]=C,e.spotShadowMatrix[x]=W.shadow.matrix,e.spot[x]=D,x++):W.isRectAreaLight?(D=t.get(W),D.color.copy(ot).multiplyScalar(Q),D.position.setFromMatrixPosition(W.matrixWorld),D.position.applyMatrix4(h),o.identity(),n.copy(W.matrixWorld),n.premultiply(h),o.extractRotation(n),D.halfWidth.set(.5*W.width,0,0),D.halfHeight.set(0,.5*W.height,0),D.halfWidth.applyMatrix4(o),D.halfHeight.applyMatrix4(o),e.rectArea[P]=D,P++):W.isPointLight?(D=t.get(W),D.position.setFromMatrixPosition(W.matrixWorld),D.position.applyMatrix4(h),D.color.copy(W.color).multiplyScalar(W.intensity),D.distance=W.distance,D.decay=W.decay,(D.shadow=W.castShadow)&&(ot=W.shadow,D.shadowBias=ot.bias,D.shadowRadius=ot.radius,D.shadowMapSize=ot.mapSize,D.shadowCameraNear=ot.camera.near,D.shadowCameraFar=ot.camera.far),e.pointShadowMap[v]=C,e.pointShadowMatrix[v]=W.shadow.matrix,e.point[v]=D,v++):W.isHemisphereLight&&(D=t.get(W),D.direction.setFromMatrixPosition(W.matrixWorld),D.direction.transformDirection(h),D.direction.normalize(),D.skyColor.copy(W.color).multiplyScalar(Q),D.groundColor.copy(W.groundColor).multiplyScalar(Q),e.hemi[R]=D,R++)}e.ambient[0]=c,e.ambient[1]=p,e.ambient[2]=f,e.directional.length=d,e.spot.length=x,e.rectArea.length=P,e.point.length=v,e.hemi.length=R,e.hash.stateID=e.id,e.hash.directionalLength=d,e.hash.pointLength=v,e.hash.spotLength=x,e.hash.rectAreaLength=P,e.hash.hemiLength=R,e.hash.shadowsLength=l.length},state:e}}function tt(){var t=new pt,e=[],i=[];return{init:function(){e.length=0,i.length=0},state:{lightsArray:e,shadowsArray:i,lights:t},setupLights:function(n){t.setup(e,i,n)},pushLight:function(n){e.push(n)},pushShadow:function(n){i.push(n)}}}function jt(){var t={};return{get:function(e,i){if(t[e.id]===void 0){var n=new tt;t[e.id]={},t[e.id][i.id]=n}else t[e.id][i.id]===void 0?(n=new tt,t[e.id][i.id]=n):n=t[e.id][i.id];return n},dispose:function(){t={}}}}function kt(t){Oe.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.lights=this.fog=!1,this.setValues(t)}function It(t){Oe.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new S,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.lights=this.fog=!1,this.setValues(t)}function Kt(t,e,i){function n(C,D,ct,Dt,Rt,St){var oe=C.geometry,$t=d,me=C.customDepthMaterial;return ct&&($t=v,me=C.customDistanceMaterial),me?$t=me:(me=!1,D.morphTargets&&(oe&&oe.isBufferGeometry?me=oe.morphAttributes&&oe.morphAttributes.position&&0<oe.morphAttributes.position.length:oe&&oe.isGeometry&&(me=oe.morphTargets&&0<oe.morphTargets.length)),C.isSkinnedMesh&&D.skinning===!1&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",C),C=C.isSkinnedMesh&&D.skinning,oe=0,me&&(oe|=1),C&&(oe|=2),$t=$t[oe]),t.localClippingEnabled&&D.clipShadows===!0&&D.clippingPlanes.length!==0&&(oe=$t.uuid,me=D.uuid,C=x[oe],C===void 0&&(C={},x[oe]=C),oe=C[me],oe===void 0&&(oe=$t.clone(),C[me]=oe),$t=oe),$t.visible=D.visible,$t.wireframe=D.wireframe,$t.side=D.shadowSide!=null?D.shadowSide:P[D.side],$t.clipShadows=D.clipShadows,$t.clippingPlanes=D.clippingPlanes,$t.clipIntersection=D.clipIntersection,$t.wireframeLinewidth=D.wireframeLinewidth,$t.linewidth=D.linewidth,ct&&$t.isMeshDistanceMaterial&&($t.referencePosition.copy(Dt),$t.nearDistance=Rt,$t.farDistance=St),$t}function o(C,D,ct,Dt){if(C.visible!==!1){if(C.layers.test(D.layers)&&(C.isMesh||C.isLine||C.isPoints)&&C.castShadow&&(!C.frustumCulled||s.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(ct.matrixWorldInverse,C.matrixWorld);var Rt=e.update(C),St=C.material;if(Array.isArray(St))for(var oe=Rt.groups,$t=0,me=oe.length;$t<me;$t++){var ue=oe[$t],Vt=St[ue.materialIndex];Vt&&Vt.visible&&(Vt=n(C,Vt,Dt,f,ct.near,ct.far),t.renderBufferDirect(ct,null,Rt,Vt,C,ue))}else St.visible&&(Vt=n(C,St,Dt,f,ct.near,ct.far),t.renderBufferDirect(ct,null,Rt,Vt,C,null))}for(C=C.children,Rt=0,St=C.length;Rt<St;Rt++)o(C[Rt],D,ct,Dt)}}var s=new st,l=new _t,h=new M,c=new M(i,i),p=new S,f=new S,d=Array(4),v=Array(4),x={},P={0:1,1:0,2:2},R=[new S(1,0,0),new S(-1,0,0),new S(0,0,1),new S(0,0,-1),new S(0,1,0),new S(0,-1,0)],I=[new S(0,1,0),new S(0,1,0),new S(0,1,0),new S(0,1,0),new S(0,0,1),new S(0,0,-1)],$=[new nt,new nt,new nt,new nt,new nt,new nt];for(i=0;i!==4;++i){var W=(i&1)!==0,ot=(i&2)!==0,Q=new kt({depthPacking:3201,morphTargets:W,skinning:ot});d[i]=Q,W=new It({morphTargets:W,skinning:ot}),v[i]=W}var wt=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(C,D,ct){if(wt.enabled!==!1&&(wt.autoUpdate!==!1||wt.needsUpdate!==!1)&&C.length!==0){var Dt=t.state;Dt.disable(3042),Dt.buffers.color.setClear(1,1,1,1),Dt.buffers.depth.setTest(!0),Dt.setScissorTest(!1);for(var Rt,St=0,oe=C.length;St<oe;St++){var $t=C[St];Rt=$t.shadow;var me=$t&&$t.isPointLight;if(Rt===void 0)console.warn("THREE.WebGLShadowMap:",$t,"has no shadow.");else{var ue=Rt.camera;if(h.copy(Rt.mapSize),h.min(c),me){var Vt=h.x,Ee=h.y;$[0].set(2*Vt,Ee,Vt,Ee),$[1].set(0,Ee,Vt,Ee),$[2].set(3*Vt,Ee,Vt,Ee),$[3].set(Vt,Ee,Vt,Ee),$[4].set(3*Vt,0,Vt,Ee),$[5].set(Vt,0,Vt,Ee),h.x*=4,h.y*=2}for(Rt.map===null&&(Rt.map=new Tt(h.x,h.y,{minFilter:1003,magFilter:1003,format:1023}),Rt.map.texture.name=$t.name+".shadowMap",ue.updateProjectionMatrix()),Rt.isSpotLightShadow&&Rt.update($t),Vt=Rt.map,Ee=Rt.matrix,f.setFromMatrixPosition($t.matrixWorld),ue.position.copy(f),me?(Rt=6,Ee.makeTranslation(-f.x,-f.y,-f.z)):(Rt=1,p.setFromMatrixPosition($t.target.matrixWorld),ue.lookAt(p),ue.updateMatrixWorld(),Ee.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),Ee.multiply(ue.projectionMatrix),Ee.multiply(ue.matrixWorldInverse)),t.setRenderTarget(Vt),t.clear(),$t=0;$t<Rt;$t++)me&&(p.copy(ue.position),p.add(R[$t]),ue.up.copy(I[$t]),ue.lookAt(p),ue.updateMatrixWorld(),Dt.viewport($[$t])),l.multiplyMatrices(ue.projectionMatrix,ue.matrixWorldInverse),s.setFromMatrix(l),o(D,ct,ue,me)}}wt.needsUpdate=!1}}}function Xt(t,e,i,n){function o(vt,be,Fe){var Ai=new Uint8Array(4),pe=t.createTexture();for(t.bindTexture(vt,pe),t.texParameteri(vt,10241,9728),t.texParameteri(vt,10240,9728),vt=0;vt<Fe;vt++)t.texImage2D(be+vt,0,6408,1,1,0,6408,5121,Ai);return pe}function s(vt,be){$[vt]=1,W[vt]===0&&(t.enableVertexAttribArray(vt),W[vt]=1),ot[vt]!==be&&((n.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](vt,be),ot[vt]=be)}function l(vt){Q[vt]!==!0&&(t.enable(vt),Q[vt]=!0)}function h(vt){Q[vt]!==!1&&(t.disable(vt),Q[vt]=!1)}function c(vt,be,Fe,Ai,pe,Ce,He,fi){if(vt===0)D&&(h(3042),D=!1);else if(D||(l(3042),D=!0),vt!==5){if(vt!==ct||fi!==ue){if((Dt!==100||oe!==100)&&(t.blendEquation(32774),oe=Dt=100),fi)switch(vt){case 1:t.blendFuncSeparate(1,771,1,771);break;case 2:t.blendFunc(1,1);break;case 3:t.blendFuncSeparate(0,0,769,771);break;case 4:t.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",vt)}else switch(vt){case 1:t.blendFuncSeparate(770,771,1,771);break;case 2:t.blendFunc(770,1);break;case 3:t.blendFunc(0,769);break;case 4:t.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",vt)}me=$t=St=Rt=null,ct=vt,ue=fi}}else pe=pe||be,Ce=Ce||Fe,He=He||Ai,(be!==Dt||pe!==oe)&&(t.blendEquationSeparate(i.convert(be),i.convert(pe)),Dt=be,oe=pe),(Fe!==Rt||Ai!==St||Ce!==$t||He!==me)&&(t.blendFuncSeparate(i.convert(Fe),i.convert(Ai),i.convert(Ce),i.convert(He)),Rt=Fe,St=Ai,$t=Ce,me=He),ct=vt,ue=null}function p(vt){Vt!==vt&&(vt?t.frontFace(2304):t.frontFace(2305),Vt=vt)}function f(vt){vt!==0?(l(2884),vt!==Ee&&(vt===1?t.cullFace(1029):vt===2?t.cullFace(1028):t.cullFace(1032))):h(2884),Ee=vt}function d(vt,be,Fe){vt?(l(32823),(Ze!==be||un!==Fe)&&(t.polygonOffset(be,Fe),Ze=be,un=Fe)):h(32823)}function v(vt){vt===void 0&&(vt=33984+tn-1),Ei!==vt&&(t.activeTexture(vt),Ei=vt)}var x=new function(){var vt=!1,be=new nt,Fe=null,Ai=new nt(0,0,0,0);return{setMask:function(pe){Fe===pe||vt||(t.colorMask(pe,pe,pe,pe),Fe=pe)},setLocked:function(pe){vt=pe},setClear:function(pe,Ce,He,fi,ui){ui===!0&&(pe*=fi,Ce*=fi,He*=fi),be.set(pe,Ce,He,fi),Ai.equals(be)===!1&&(t.clearColor(pe,Ce,He,fi),Ai.copy(be))},reset:function(){vt=!1,Fe=null,Ai.set(-1,0,0,0)}}},P=new function(){var vt=!1,be=null,Fe=null,Ai=null;return{setTest:function(pe){pe?l(2929):h(2929)},setMask:function(pe){be===pe||vt||(t.depthMask(pe),be=pe)},setFunc:function(pe){if(Fe!==pe){if(pe)switch(pe){case 0:t.depthFunc(512);break;case 1:t.depthFunc(519);break;case 2:t.depthFunc(513);break;case 3:t.depthFunc(515);break;case 4:t.depthFunc(514);break;case 5:t.depthFunc(518);break;case 6:t.depthFunc(516);break;case 7:t.depthFunc(517);break;default:t.depthFunc(515)}else t.depthFunc(515);Fe=pe}},setLocked:function(pe){vt=pe},setClear:function(pe){Ai!==pe&&(t.clearDepth(pe),Ai=pe)},reset:function(){vt=!1,Ai=Fe=be=null}}},R=new function(){var vt=!1,be=null,Fe=null,Ai=null,pe=null,Ce=null,He=null,fi=null,ui=null;return{setTest:function(Bt){Bt?l(2960):h(2960)},setMask:function(Bt){be===Bt||vt||(t.stencilMask(Bt),be=Bt)},setFunc:function(Bt,Ge,Ie){(Fe!==Bt||Ai!==Ge||pe!==Ie)&&(t.stencilFunc(Bt,Ge,Ie),Fe=Bt,Ai=Ge,pe=Ie)},setOp:function(Bt,Ge,Ie){(Ce!==Bt||He!==Ge||fi!==Ie)&&(t.stencilOp(Bt,Ge,Ie),Ce=Bt,He=Ge,fi=Ie)},setLocked:function(Bt){vt=Bt},setClear:function(Bt){ui!==Bt&&(t.clearStencil(Bt),ui=Bt)},reset:function(){vt=!1,ui=fi=He=Ce=pe=Ai=Fe=be=null}}},I=t.getParameter(34921),$=new Uint8Array(I),W=new Uint8Array(I),ot=new Uint8Array(I),Q={},wt=null,C=null,D=null,ct=null,Dt=null,Rt=null,St=null,oe=null,$t=null,me=null,ue=!1,Vt=null,Ee=null,Be=null,Ze=null,un=null,tn=t.getParameter(35661),Ri=!1;I=0,I=t.getParameter(7938),I.indexOf("WebGL")!==-1?(I=parseFloat(/^WebGL ([0-9])/.exec(I)[1]),Ri=1<=I):I.indexOf("OpenGL ES")!==-1&&(I=parseFloat(/^OpenGL ES ([0-9])/.exec(I)[1]),Ri=2<=I);var Ei=null,Vi={},cn=new nt,ce=new nt,Ue={};return Ue[3553]=o(3553,3553,1),Ue[34067]=o(34067,34069,6),x.setClear(0,0,0,1),P.setClear(1),R.setClear(0),l(2929),P.setFunc(3),p(!1),f(1),l(2884),c(0),{buffers:{color:x,depth:P,stencil:R},initAttributes:function(){for(var vt=0,be=$.length;vt<be;vt++)$[vt]=0},enableAttribute:function(vt){s(vt,0)},enableAttributeAndDivisor:s,disableUnusedAttributes:function(){for(var vt=0,be=W.length;vt!==be;++vt)W[vt]!==$[vt]&&(t.disableVertexAttribArray(vt),W[vt]=0)},enable:l,disable:h,getCompressedTextureFormats:function(){if(wt===null&&(wt=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var vt=t.getParameter(34467),be=0;be<vt.length;be++)wt.push(vt[be]);return wt},useProgram:function(vt){return C!==vt?(t.useProgram(vt),C=vt,!0):!1},setBlending:c,setMaterial:function(vt,be){vt.side===2?h(2884):l(2884);var Fe=vt.side===1;be&&(Fe=!Fe),p(Fe),vt.blending===1&&vt.transparent===!1?c(0):c(vt.blending,vt.blendEquation,vt.blendSrc,vt.blendDst,vt.blendEquationAlpha,vt.blendSrcAlpha,vt.blendDstAlpha,vt.premultipliedAlpha),P.setFunc(vt.depthFunc),P.setTest(vt.depthTest),P.setMask(vt.depthWrite),x.setMask(vt.colorWrite),d(vt.polygonOffset,vt.polygonOffsetFactor,vt.polygonOffsetUnits)},setFlipSided:p,setCullFace:f,setLineWidth:function(vt){vt!==Be&&(Ri&&t.lineWidth(vt),Be=vt)},setPolygonOffset:d,setScissorTest:function(vt){vt?l(3089):h(3089)},activeTexture:v,bindTexture:function(vt,be){Ei===null&&v();var Fe=Vi[Ei];Fe===void 0&&(Fe={type:void 0,texture:void 0},Vi[Ei]=Fe),(Fe.type!==vt||Fe.texture!==be)&&(t.bindTexture(vt,be||Ue[vt]),Fe.type=vt,Fe.texture=be)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(vt){console.error("THREE.WebGLState:",vt)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(vt){console.error("THREE.WebGLState:",vt)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(vt){console.error("THREE.WebGLState:",vt)}},scissor:function(vt){cn.equals(vt)===!1&&(t.scissor(vt.x,vt.y,vt.z,vt.w),cn.copy(vt))},viewport:function(vt){ce.equals(vt)===!1&&(t.viewport(vt.x,vt.y,vt.z,vt.w),ce.copy(vt))},reset:function(){for(var vt=0;vt<W.length;vt++)W[vt]===1&&(t.disableVertexAttribArray(vt),W[vt]=0);Q={},Ei=wt=null,Vi={},Ee=Vt=ct=C=null,x.reset(),P.reset(),R.reset()}}}function Le(t,e,i,n,o,s,l){function h(C,D){if(C.width>D||C.height>D){if("data"in C){console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+C.width+"x"+C.height+").");return}D/=Math.max(C.width,C.height);var ct=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return ct.width=Math.floor(C.width*D),ct.height=Math.floor(C.height*D),ct.getContext("2d").drawImage(C,0,0,C.width,C.height,0,0,ct.width,ct.height),console.warn("THREE.WebGLRenderer: image is too big ("+C.width+"x"+C.height+"). Resized to "+ct.width+"x"+ct.height),ct}return C}function c(C){return $e.isPowerOfTwo(C.width)&&$e.isPowerOfTwo(C.height)}function p(C,D){return C.generateMipmaps&&D&&C.minFilter!==1003&&C.minFilter!==1006}function f(C,D,ct,Dt){t.generateMipmap(C),n.get(D).__maxMipLevel=Math.log(Math.max(ct,Dt))*Math.LOG2E}function d(C,D){if(!o.isWebGL2)return C;if(C===6403){if(D===5126)return 33326;if(D===5131)return 33325;if(D===5121)return 33321}if(C===6407){if(D===5126)return 34837;if(D===5131)return 34843;if(D===5121)return 32849}if(C===6408){if(D===5126)return 34836;if(D===5131)return 34842;if(D===5121)return 32856}return C}function v(C){return C===1003||C===1004||C===1005?9728:9729}function x(C){C=C.target,C.removeEventListener("dispose",x);t:{var D=n.get(C);if(C.image&&D.__image__webglTextureCube)t.deleteTexture(D.__image__webglTextureCube);else{if(D.__webglInit===void 0)break t;t.deleteTexture(D.__webglTexture)}n.remove(C)}C.isVideoTexture&&delete Q[C.id],l.memory.textures--}function P(C){C=C.target,C.removeEventListener("dispose",P);var D=n.get(C),ct=n.get(C.texture);if(C){if(ct.__webglTexture!==void 0&&t.deleteTexture(ct.__webglTexture),C.depthTexture&&C.depthTexture.dispose(),C.isWebGLRenderTargetCube)for(ct=0;6>ct;ct++)t.deleteFramebuffer(D.__webglFramebuffer[ct]),D.__webglDepthbuffer&&t.deleteRenderbuffer(D.__webglDepthbuffer[ct]);else t.deleteFramebuffer(D.__webglFramebuffer),D.__webglDepthbuffer&&t.deleteRenderbuffer(D.__webglDepthbuffer);n.remove(C.texture),n.remove(C)}l.memory.textures--}function R(C,D){var ct=n.get(C);if(C.isVideoTexture){var Dt=C.id,Rt=l.render.frame;Q[Dt]!==Rt&&(Q[Dt]=Rt,C.update())}if(0<C.version&&ct.__version!==C.version)if(Dt=C.image,Dt===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(Dt.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{$(ct,C,D);return}i.activeTexture(33984+D),i.bindTexture(3553,ct.__webglTexture)}function I(C,D,ct){ct?(t.texParameteri(C,10242,s.convert(D.wrapS)),t.texParameteri(C,10243,s.convert(D.wrapT)),t.texParameteri(C,10240,s.convert(D.magFilter)),t.texParameteri(C,10241,s.convert(D.minFilter))):(t.texParameteri(C,10242,33071),t.texParameteri(C,10243,33071),D.wrapS===1001&&D.wrapT===1001||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(C,10240,v(D.magFilter)),t.texParameteri(C,10241,v(D.minFilter)),D.minFilter!==1003&&D.minFilter!==1006&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!(ct=e.get("EXT_texture_filter_anisotropic"))||D.type===1015&&e.get("OES_texture_float_linear")===null||D.type===1016&&(o.isWebGL2||e.get("OES_texture_half_float_linear"))===null||!(1<D.anisotropy||n.get(D).__currentAnisotropy)||(t.texParameterf(C,ct.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(D.anisotropy,o.getMaxAnisotropy())),n.get(D).__currentAnisotropy=D.anisotropy)}function $(C,D,ct){var Dt=D.isDataTexture3D?32879:3553;C.__webglInit===void 0&&(C.__webglInit=!0,D.addEventListener("dispose",x),C.__webglTexture=t.createTexture(),l.memory.textures++),i.activeTexture(33984+ct),i.bindTexture(Dt,C.__webglTexture),t.pixelStorei(37440,D.flipY),t.pixelStorei(37441,D.premultiplyAlpha),t.pixelStorei(3317,D.unpackAlignment),ct=h(D.image,o.maxTextureSize);var Rt=o.isWebGL2?!1:D.wrapS!==1001||D.wrapT!==1001||D.minFilter!==1003&&D.minFilter!==1006;Rt&&c(ct)===!1&&(ct instanceof HTMLImageElement||ct instanceof HTMLCanvasElement||ct instanceof ImageBitmap)&&(wt===void 0&&(wt=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),wt.width=$e.floorPowerOfTwo(ct.width),wt.height=$e.floorPowerOfTwo(ct.height),wt.getContext("2d").drawImage(ct,0,0,wt.width,wt.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+ct.width+"x"+ct.height+"). Resized to "+wt.width+"x"+wt.height),ct=wt),Rt=c(ct);var St=s.convert(D.format),oe=s.convert(D.type),$t=d(St,oe);I(Dt,D,Rt);var me=D.mipmaps;if(D.isDepthTexture){if($t=6402,D.type===1015){if(!o.isWebGL2)throw Error("Float Depth Texture only supported in WebGL2.0");$t=36012}else o.isWebGL2&&($t=33189);D.format===1026&&$t===6402&&D.type!==1012&&D.type!==1014&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),D.type=1012,oe=s.convert(D.type)),D.format===1027&&($t=34041,D.type!==1020&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),D.type=1020,oe=s.convert(D.type))),i.texImage2D(3553,0,$t,ct.width,ct.height,0,St,oe,null)}else if(D.isDataTexture)if(0<me.length&&Rt){for(var ue=0,Vt=me.length;ue<Vt;ue++)Dt=me[ue],i.texImage2D(3553,ue,$t,Dt.width,Dt.height,0,St,oe,Dt.data);D.generateMipmaps=!1,C.__maxMipLevel=me.length-1}else i.texImage2D(3553,0,$t,ct.width,ct.height,0,St,oe,ct.data),C.__maxMipLevel=0;else if(D.isCompressedTexture){for(ue=0,Vt=me.length;ue<Vt;ue++)Dt=me[ue],D.format!==1023&&D.format!==1022?-1<i.getCompressedTextureFormats().indexOf(St)?i.compressedTexImage2D(3553,ue,$t,Dt.width,Dt.height,0,Dt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):i.texImage2D(3553,ue,$t,Dt.width,Dt.height,0,St,oe,Dt.data);C.__maxMipLevel=me.length-1}else if(D.isDataTexture3D)i.texImage3D(32879,0,$t,ct.width,ct.height,ct.depth,0,St,oe,ct.data),C.__maxMipLevel=0;else if(0<me.length&&Rt){for(ue=0,Vt=me.length;ue<Vt;ue++)Dt=me[ue],i.texImage2D(3553,ue,$t,St,oe,Dt);D.generateMipmaps=!1,C.__maxMipLevel=me.length-1}else i.texImage2D(3553,0,$t,St,oe,ct),C.__maxMipLevel=0;p(D,Rt)&&f(3553,D,ct.width,ct.height),C.__version=D.version,D.onUpdate&&D.onUpdate(D)}function W(C,D,ct,Dt){var Rt=s.convert(D.texture.format),St=s.convert(D.texture.type),oe=d(Rt,St);i.texImage2D(Dt,0,oe,D.width,D.height,0,Rt,St,null),t.bindFramebuffer(36160,C),t.framebufferTexture2D(36160,ct,Dt,n.get(D.texture).__webglTexture,0),t.bindFramebuffer(36160,null)}function ot(C,D){t.bindRenderbuffer(36161,C),D.depthBuffer&&!D.stencilBuffer?(t.renderbufferStorage(36161,33189,D.width,D.height),t.framebufferRenderbuffer(36160,36096,36161,C)):D.depthBuffer&&D.stencilBuffer?(t.renderbufferStorage(36161,34041,D.width,D.height),t.framebufferRenderbuffer(36160,33306,36161,C)):t.renderbufferStorage(36161,32854,D.width,D.height),t.bindRenderbuffer(36161,null)}var Q={},wt;this.setTexture2D=R,this.setTexture3D=function(C,D){var ct=n.get(C);0<C.version&&ct.__version!==C.version?$(ct,C,D):(i.activeTexture(33984+D),i.bindTexture(32879,ct.__webglTexture))},this.setTextureCube=function(C,D){var ct=n.get(C);if(C.image.length===6)if(0<C.version&&ct.__version!==C.version){ct.__image__webglTextureCube||(C.addEventListener("dispose",x),ct.__image__webglTextureCube=t.createTexture(),l.memory.textures++),i.activeTexture(33984+D),i.bindTexture(34067,ct.__image__webglTextureCube),t.pixelStorei(37440,C.flipY),D=C&&C.isCompressedTexture;for(var Dt=C.image[0]&&C.image[0].isDataTexture,Rt=[],St=0;6>St;St++)Rt[St]=D||Dt?Dt?C.image[St].image:C.image[St]:h(C.image[St],o.maxCubemapSize);var oe=Rt[0],$t=c(oe),me=s.convert(C.format),ue=s.convert(C.type),Vt=d(me,ue);for(I(34067,C,$t),St=0;6>St;St++)if(D)for(var Ee,Be=Rt[St].mipmaps,Ze=0,un=Be.length;Ze<un;Ze++)Ee=Be[Ze],C.format!==1023&&C.format!==1022?-1<i.getCompressedTextureFormats().indexOf(me)?i.compressedTexImage2D(34069+St,Ze,Vt,Ee.width,Ee.height,0,Ee.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):i.texImage2D(34069+St,Ze,Vt,Ee.width,Ee.height,0,me,ue,Ee.data);else Dt?i.texImage2D(34069+St,0,Vt,Rt[St].width,Rt[St].height,0,me,ue,Rt[St].data):i.texImage2D(34069+St,0,Vt,me,ue,Rt[St]);ct.__maxMipLevel=D?Be.length-1:0,p(C,$t)&&f(34067,C,oe.width,oe.height),ct.__version=C.version,C.onUpdate&&C.onUpdate(C)}else i.activeTexture(33984+D),i.bindTexture(34067,ct.__image__webglTextureCube)},this.setTextureCubeDynamic=function(C,D){i.activeTexture(33984+D),i.bindTexture(34067,n.get(C).__webglTexture)},this.setupRenderTarget=function(C){var D=n.get(C),ct=n.get(C.texture);C.addEventListener("dispose",P),ct.__webglTexture=t.createTexture(),l.memory.textures++;var Dt=C.isWebGLRenderTargetCube===!0,Rt=c(C);if(Dt){D.__webglFramebuffer=[];for(var St=0;6>St;St++)D.__webglFramebuffer[St]=t.createFramebuffer()}else D.__webglFramebuffer=t.createFramebuffer();if(Dt){for(i.bindTexture(34067,ct.__webglTexture),I(34067,C.texture,Rt),St=0;6>St;St++)W(D.__webglFramebuffer[St],C,36064,34069+St);p(C.texture,Rt)&&f(34067,C.texture,C.width,C.height),i.bindTexture(34067,null)}else i.bindTexture(3553,ct.__webglTexture),I(3553,C.texture,Rt),W(D.__webglFramebuffer,C,36064,3553),p(C.texture,Rt)&&f(3553,C.texture,C.width,C.height),i.bindTexture(3553,null);if(C.depthBuffer){if(D=n.get(C),ct=C.isWebGLRenderTargetCube===!0,C.depthTexture){if(ct)throw Error("target.depthTexture not supported in Cube render targets");if(C&&C.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,D.__webglFramebuffer),!C.depthTexture||!C.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");if(n.get(C.depthTexture).__webglTexture&&C.depthTexture.image.width===C.width&&C.depthTexture.image.height===C.height||(C.depthTexture.image.width=C.width,C.depthTexture.image.height=C.height,C.depthTexture.needsUpdate=!0),R(C.depthTexture,0),D=n.get(C.depthTexture).__webglTexture,C.depthTexture.format===1026)t.framebufferTexture2D(36160,36096,3553,D,0);else if(C.depthTexture.format===1027)t.framebufferTexture2D(36160,33306,3553,D,0);else throw Error("Unknown depthTexture format")}else if(ct)for(D.__webglDepthbuffer=[],ct=0;6>ct;ct++)t.bindFramebuffer(36160,D.__webglFramebuffer[ct]),D.__webglDepthbuffer[ct]=t.createRenderbuffer(),ot(D.__webglDepthbuffer[ct],C);else t.bindFramebuffer(36160,D.__webglFramebuffer),D.__webglDepthbuffer=t.createRenderbuffer(),ot(D.__webglDepthbuffer,C);t.bindFramebuffer(36160,null)}},this.updateRenderTargetMipmap=function(C){var D=C.texture,ct=c(C);if(p(D,ct)){ct=C.isWebGLRenderTargetCube?34067:3553;var Dt=n.get(D).__webglTexture;i.bindTexture(ct,Dt),f(ct,D,C.width,C.height),i.bindTexture(ct,null)}}}function Me(t,e,i){return{convert:function(n){if(n===1e3)return 10497;if(n===1001)return 33071;if(n===1002)return 33648;if(n===1003)return 9728;if(n===1004)return 9984;if(n===1005)return 9986;if(n===1006)return 9729;if(n===1007)return 9985;if(n===1008)return 9987;if(n===1009)return 5121;if(n===1017)return 32819;if(n===1018)return 32820;if(n===1019)return 33635;if(n===1010)return 5120;if(n===1011)return 5122;if(n===1012)return 5123;if(n===1013)return 5124;if(n===1014)return 5125;if(n===1015)return 5126;if(n===1016){if(i.isWebGL2)return 5131;var o=e.get("OES_texture_half_float");if(o!==null)return o.HALF_FLOAT_OES}if(n===1021)return 6406;if(n===1022)return 6407;if(n===1023)return 6408;if(n===1024)return 6409;if(n===1025)return 6410;if(n===1026)return 6402;if(n===1027)return 34041;if(n===1028)return 6403;if(n===100)return 32774;if(n===101)return 32778;if(n===102)return 32779;if(n===200)return 0;if(n===201)return 1;if(n===202)return 768;if(n===203)return 769;if(n===204)return 770;if(n===205)return 771;if(n===206)return 772;if(n===207)return 773;if(n===208)return 774;if(n===209)return 775;if(n===210)return 776;if((n===33776||n===33777||n===33778||n===33779)&&(o=e.get("WEBGL_compressed_texture_s3tc"),o!==null)){if(n===33776)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===33777)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===33778)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===33779)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===35840||n===35841||n===35842||n===35843)&&(o=e.get("WEBGL_compressed_texture_pvrtc"),o!==null)){if(n===35840)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===35841)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===35842)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===35843)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===36196&&(o=e.get("WEBGL_compressed_texture_etc1"),o!==null))return o.COMPRESSED_RGB_ETC1_WEBGL;if((n===37808||n===37809||n===37810||n===37811||n===37812||n===37813||n===37814||n===37815||n===37816||n===37817||n===37818||n===37819||n===37820||n===37821)&&(o=e.get("WEBGL_compressed_texture_astc"),o!==null))return n;if(n===103||n===104){if(i.isWebGL2){if(n===103)return 32775;if(n===104)return 32776}if(o=e.get("EXT_blend_minmax"),o!==null){if(n===103)return o.MIN_EXT;if(n===104)return o.MAX_EXT}}if(n===1020){if(i.isWebGL2)return 34042;if(o=e.get("WEBGL_depth_texture"),o!==null)return o.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Ye(){z.call(this),this.type="Group"}function ye(){z.call(this),this.type="Camera",this.matrixWorldInverse=new _t,this.projectionMatrix=new _t,this.projectionMatrixInverse=new _t}function ee(t,e,i,n){ye.call(this),this.type="PerspectiveCamera",this.fov=t!==void 0?t:50,this.zoom=1,this.near=i!==void 0?i:.1,this.far=n!==void 0?n:2e3,this.focus=10,this.aspect=e!==void 0?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function _e(t){ee.call(this),this.cameras=t||[]}function Zt(t,e,i){So.setFromMatrixPosition(e.matrixWorld),ir.setFromMatrixPosition(i.matrixWorld);var n=So.distanceTo(ir),o=e.projectionMatrix.elements,s=i.projectionMatrix.elements,l=o[14]/(o[10]-1);i=o[14]/(o[10]+1);var h=(o[9]+1)/o[5],c=(o[9]-1)/o[5],p=(o[8]-1)/o[0],f=(s[8]+1)/s[0];o=l*p,s=l*f,f=n/(-p+f),p=f*-p,e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(p),t.translateZ(f),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.getInverse(t.matrixWorld),e=l+f,l=i+f,t.projectionMatrix.makePerspective(o-p,s+(n-p),h*i/l*e,c*i/l*e,e,l)}function Ke(t){function e(){return o!==null&&o.isPresenting===!0}function i(){if(e()){var C=o.getEyeParameters("left"),D=C.renderWidth*f;C=C.renderHeight*f,ot=t.getPixelRatio(),W=t.getSize(),t.setDrawingBufferSize(2*D,C,1),wt.start()}else n.enabled&&t.setDrawingBufferSize(W.width,W.height,ot),wt.stop()}var n=this,o=null,s=null,l=null,h=[],c=new _t,p=new _t,f=1,d="stage";typeof window<"u"&&"VRFrameData"in window&&(s=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",i,!1));var v=new _t,x=new mt,P=new S,R=new ee;R.bounds=new nt(0,0,.5,1),R.layers.enable(1);var I=new ee;I.bounds=new nt(.5,0,.5,1),I.layers.enable(2);var $=new _e([R,I]);$.layers.enable(1),$.layers.enable(2);var W,ot,Q=[];this.enabled=!1,this.getController=function(C){var D=h[C];return D===void 0&&(D=new Ye,D.matrixAutoUpdate=!1,D.visible=!1,h[C]=D),D},this.getDevice=function(){return o},this.setDevice=function(C){C!==void 0&&(o=C),wt.setContext(C)},this.setFramebufferScaleFactor=function(C){f=C},this.setFrameOfReferenceType=function(C){d=C},this.setPoseTarget=function(C){C!==void 0&&(l=C)},this.getCamera=function(C){var D=d==="stage"?1.6:0;if(o===null)return C.position.set(0,D,0),C;if(o.depthNear=C.near,o.depthFar=C.far,o.getFrameData(s),d==="stage"){var ct=o.stageParameters;ct?c.fromArray(ct.sittingToStandingTransform):c.makeTranslation(0,D,0)}if(D=s.pose,ct=l!==null?l:C,ct.matrix.copy(c),ct.matrix.decompose(ct.position,ct.quaternion,ct.scale),D.orientation!==null&&(x.fromArray(D.orientation),ct.quaternion.multiply(x)),D.position!==null&&(x.setFromRotationMatrix(c),P.fromArray(D.position),P.applyQuaternion(x),ct.position.add(P)),ct.updateMatrixWorld(),o.isPresenting===!1)return C;R.near=C.near,I.near=C.near,R.far=C.far,I.far=C.far,R.matrixWorldInverse.fromArray(s.leftViewMatrix),I.matrixWorldInverse.fromArray(s.rightViewMatrix),p.getInverse(c),d==="stage"&&(R.matrixWorldInverse.multiply(p),I.matrixWorldInverse.multiply(p)),C=ct.parent,C!==null&&(v.getInverse(C.matrixWorld),R.matrixWorldInverse.multiply(v),I.matrixWorldInverse.multiply(v)),R.matrixWorld.getInverse(R.matrixWorldInverse),I.matrixWorld.getInverse(I.matrixWorldInverse),R.projectionMatrix.fromArray(s.leftProjectionMatrix),I.projectionMatrix.fromArray(s.rightProjectionMatrix),Zt($,R,I),C=o.getLayers(),C.length&&(C=C[0],C.leftBounds!==null&&C.leftBounds.length===4&&R.bounds.fromArray(C.leftBounds),C.rightBounds!==null&&C.rightBounds.length===4&&I.bounds.fromArray(C.rightBounds));t:for(C=0;C<h.length;C++){D=h[C];e:{ct=C;for(var Dt=navigator.getGamepads&&navigator.getGamepads(),Rt=0,St=0,oe=Dt.length;Rt<oe;Rt++){var $t=Dt[Rt];if($t&&($t.id==="Daydream Controller"||$t.id==="Gear VR Controller"||$t.id==="Oculus Go Controller"||$t.id==="OpenVR Gamepad"||$t.id.startsWith("Oculus Touch")||$t.id.startsWith("Spatial Controller"))){if(St===ct){ct=$t;break e}St++}}ct=void 0}if(ct!==void 0&&ct.pose!==void 0){if(ct.pose===null)break t;Dt=ct.pose,Dt.hasPosition===!1&&D.position.set(.2,-.6,-.05),Dt.position!==null&&D.position.fromArray(Dt.position),Dt.orientation!==null&&D.quaternion.fromArray(Dt.orientation),D.matrix.compose(D.position,D.quaternion,D.scale),D.matrix.premultiply(c),D.matrix.decompose(D.position,D.quaternion,D.scale),D.matrixWorldNeedsUpdate=!0,D.visible=!0,Dt=ct.id==="Daydream Controller"?0:1,Q[C]!==ct.buttons[Dt].pressed&&(Q[C]=ct.buttons[Dt].pressed,Q[C]===!0?D.dispatchEvent({type:"selectstart"}):(D.dispatchEvent({type:"selectend"}),D.dispatchEvent({type:"select"})))}else D.visible=!1}return $},this.getStandingMatrix=function(){return c},this.isPresenting=e;var wt=new _;this.setAnimationLoop=function(C){wt.setAnimationLoop(C)},this.submitFrame=function(){e()&&o.submitFrame()},this.dispose=function(){typeof window<"u"&&window.removeEventListener("vrdisplaypresentchange",i)}}function fe(t){function e(){return h!==null&&p!==null}function i(ot){var Q=v[x.indexOf(ot.inputSource)];Q&&Q.dispatchEvent({type:ot.type})}function n(){t.setFramebuffer(null),W.stop()}function o(ot,Q){Q===null?ot.matrixWorld.copy(ot.matrix):ot.matrixWorld.multiplyMatrices(Q.matrixWorld,ot.matrix),ot.matrixWorldInverse.getInverse(ot.matrixWorld)}var s=t.context,l=null,h=null,c=1,p=null,f="stage",d=null,v=[],x=[],P=new ee;P.layers.enable(1),P.viewport=new nt;var R=new ee;R.layers.enable(2),R.viewport=new nt;var I=new _e([P,R]);I.layers.enable(1),I.layers.enable(2),this.enabled=!1,this.getController=function(ot){var Q=v[ot];return Q===void 0&&(Q=new Ye,Q.matrixAutoUpdate=!1,Q.visible=!1,v[ot]=Q),Q},this.getDevice=function(){return l},this.setDevice=function(ot){ot!==void 0&&(l=ot),ot instanceof XRDevice&&s.setCompatibleXRDevice(ot)},this.setFramebufferScaleFactor=function(ot){c=ot},this.setFrameOfReferenceType=function(ot){f=ot},this.setSession=function(ot){h=ot,h!==null&&(h.addEventListener("select",i),h.addEventListener("selectstart",i),h.addEventListener("selectend",i),h.addEventListener("end",n),h.baseLayer=new XRWebGLLayer(h,s,{framebufferScaleFactor:c}),h.requestFrameOfReference(f).then(function(Q){p=Q,t.setFramebuffer(h.baseLayer.framebuffer),W.setContext(h),W.start()}),x=h.getInputSources(),h.addEventListener("inputsourceschange",function(){x=h.getInputSources(),console.log(x);for(var Q=0;Q<v.length;Q++)v[Q].userData.inputSource=x[Q]}))},this.getCamera=function(ot){if(e()){var Q=ot.parent,wt=I.cameras;o(I,Q);for(var C=0;C<wt.length;C++)o(wt[C],Q);for(ot.matrixWorld.copy(I.matrixWorld),ot=ot.children,C=0,Q=ot.length;C<Q;C++)ot[C].updateMatrixWorld(!0);return Zt(I,P,R),I}return ot},this.isPresenting=e;var $=null,W=new _;W.setAnimationLoop(function(ot,Q){if(d=Q.getDevicePose(p),d!==null)for(var wt=h.baseLayer,C=Q.views,D=0;D<C.length;D++){var ct=C[D],Dt=wt.getViewport(ct),Rt=d.getViewMatrix(ct),St=I.cameras[D];St.matrix.fromArray(Rt).getInverse(St.matrix),St.projectionMatrix.fromArray(ct.projectionMatrix),St.viewport.set(Dt.x,Dt.y,Dt.width,Dt.height),D===0&&I.matrix.copy(St.matrix)}for(D=0;D<v.length;D++){if(wt=v[D],(C=x[D])&&(C=Q.getInputPose(C,p),C!==null)){"targetRay"in C?wt.matrix.elements=C.targetRay.transformMatrix:"pointerMatrix"in C&&(wt.matrix.elements=C.pointerMatrix),wt.matrix.decompose(wt.position,wt.rotation,wt.scale),wt.visible=!0;continue}wt.visible=!1}$&&$(ot)}),this.setAnimationLoop=function(ot){$=ot},this.dispose=function(){},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}function ne(t){var e;function i(){Ge=new Gn(Bt),Ie=new $n(Bt,Ge,t),Ie.isWebGL2||(Ge.get("WEBGL_depth_texture"),Ge.get("OES_texture_float"),Ge.get("OES_texture_half_float"),Ge.get("OES_texture_half_float_linear"),Ge.get("OES_standard_derivatives"),Ge.get("OES_element_index_uint"),Ge.get("ANGLE_instanced_arrays")),Ge.get("OES_texture_float_linear"),gn=new Me(Bt,Ge,Ie),je=new Xt(Bt,Ge,gn,Ie),je.scissor(Ri.copy(be).multiplyScalar(Ue)),je.viewport(tn.copy(vt).multiplyScalar(Ue)),en=new wn,pn=new N,oo=new Le(Bt,Ge,je,pn,Ie,gn,en),Ns=new y(Bt),_l=new on(Bt,Ns,en),Bs=new Bi(_l,en),xl=new Hn(Bt),Ko=new U(St,Ge,Ie),ya=new ut,ts=new jt,Ao=new yr(St,je,Bs,C),wl=new Lr(Bt,Ge,en,Ie),Un=new Je(Bt,Ge,en,Ie),en.programs=Ko.programs,St.context=Bt,St.capabilities=Ie,St.extensions=Ge,St.properties=pn,St.renderLists=ya,St.state=je,St.info=en}function n(H){H.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),oe=!0}function o(){console.log("THREE.WebGLRenderer: Context Restored."),oe=!1,i()}function s(H){H=H.target,H.removeEventListener("dispose",s),l(H),pn.remove(H)}function l(H){var K=pn.get(H).program;H.program=void 0,K!==void 0&&Ko.releaseProgram(K)}function h(H,K){H.render(function(V){St.renderBufferImmediate(V,K)})}function c(H,K,V){if(H.visible!==!1){if(H.layers.test(K.layers)){if(H.isLight)Rt.pushLight(H),H.castShadow&&Rt.pushShadow(H);else if(H.isSprite){if(!H.frustumCulled||Ai.intersectsSprite(H)){V&&ui.setFromMatrixPosition(H.matrixWorld).applyMatrix4(fi);var ae=Bs.update(H),ge=H.material;Dt.push(H,ae,ge,ui.z,null)}}else if(H.isImmediateRenderObject)V&&ui.setFromMatrixPosition(H.matrixWorld).applyMatrix4(fi),Dt.push(H,null,H.material,ui.z,null);else if((H.isMesh||H.isLine||H.isPoints)&&(H.isSkinnedMesh&&H.skeleton.update(),!H.frustumCulled||Ai.intersectsObject(H)))if(V&&ui.setFromMatrixPosition(H.matrixWorld).applyMatrix4(fi),ae=Bs.update(H),ge=H.material,Array.isArray(ge))for(var Te=ae.groups,le=0,Ne=Te.length;le<Ne;le++){var mi=Te[le],Ni=ge[mi.materialIndex];Ni&&Ni.visible&&Dt.push(H,ae,Ni,ui.z,mi)}else ge.visible&&Dt.push(H,ae,ge,ui.z,null)}for(H=H.children,le=0,Ne=H.length;le<Ne;le++)c(H[le],K,V)}}function p(H,K,V,ae){for(var ge=0,Te=H.length;ge<Te;ge++){var le=H[ge],Ne=le.object,mi=le.geometry,Ni=ae===void 0?le.material:ae;if(le=le.group,V.isArrayCamera){un=V;for(var Qt=V.cameras,nr=0,xn=Qt.length;nr<xn;nr++){var Wi=Qt[nr];if(Ne.layers.test(Wi.layers)){if("viewport"in Wi)je.viewport(tn.copy(Wi.viewport));else{var Zn=Wi.bounds;je.viewport(tn.set(Zn.x*cn,Zn.y*ce,Zn.z*cn,Zn.w*ce).multiplyScalar(Ue))}Rt.setupLights(Wi),f(Ne,K,Wi,mi,Ni,le)}}}else un=null,f(Ne,K,V,mi,Ni,le)}}function f(H,K,V,ae,ge,Te){if(H.onBeforeRender(St,K,V,ae,ge,Te),Rt=ts.get(K,un||V),H.modelViewMatrix.multiplyMatrices(V.matrixWorldInverse,H.matrixWorld),H.normalMatrix.getNormalMatrix(H.modelViewMatrix),H.isImmediateRenderObject){je.setMaterial(ge);var le=v(V,K.fog,ge,H);Ee=e=null,Be=!1,h(H,le)}else St.renderBufferDirect(V,K.fog,ae,ge,H,Te);H.onAfterRender(St,K,V,ae,ge,Te),Rt=ts.get(K,un||V)}function d(H,K,V){var ae=pn.get(H),ge=Rt.state.lights,Te=ae.lightsHash,le=ge.state.hash;V=Ko.getParameters(H,ge.state,Rt.state.shadowsArray,K,pe.numPlanes,pe.numIntersection,V);var Ne=Ko.getProgramCode(H,V),mi=ae.program,Ni=!0;if(mi===void 0)H.addEventListener("dispose",s);else if(mi.code!==Ne)l(H);else{if(Te.stateID!==le.stateID||Te.directionalLength!==le.directionalLength||Te.pointLength!==le.pointLength||Te.spotLength!==le.spotLength||Te.rectAreaLength!==le.rectAreaLength||Te.hemiLength!==le.hemiLength||Te.shadowsLength!==le.shadowsLength)Te.stateID=le.stateID,Te.directionalLength=le.directionalLength,Te.pointLength=le.pointLength,Te.spotLength=le.spotLength,Te.rectAreaLength=le.rectAreaLength,Te.hemiLength=le.hemiLength,Te.shadowsLength=le.shadowsLength;else if(V.shaderID!==void 0)return;Ni=!1}if(Ni&&(V.shaderID?(Ne=kr[V.shaderID],ae.shader={name:H.type,uniforms:_n.clone(Ne.uniforms),vertexShader:Ne.vertexShader,fragmentShader:Ne.fragmentShader}):ae.shader={name:H.type,uniforms:H.uniforms,vertexShader:H.vertexShader,fragmentShader:H.fragmentShader},H.onBeforeCompile(ae.shader,St),Ne=Ko.getProgramCode(H,V),mi=Ko.acquireProgram(H,ae.shader,V,Ne),ae.program=mi,H.program=mi),V=mi.getAttributes(),H.morphTargets)for(Ne=H.numSupportedMorphTargets=0;Ne<St.maxMorphTargets;Ne++)0<=V["morphTarget"+Ne]&&H.numSupportedMorphTargets++;if(H.morphNormals)for(Ne=H.numSupportedMorphNormals=0;Ne<St.maxMorphNormals;Ne++)0<=V["morphNormal"+Ne]&&H.numSupportedMorphNormals++;V=ae.shader.uniforms,(!H.isShaderMaterial&&!H.isRawShaderMaterial||H.clipping===!0)&&(ae.numClippingPlanes=pe.numPlanes,ae.numIntersection=pe.numIntersection,V.clippingPlanes=pe.uniform),ae.fog=K,Te===void 0&&(ae.lightsHash=Te={}),Te.stateID=le.stateID,Te.directionalLength=le.directionalLength,Te.pointLength=le.pointLength,Te.spotLength=le.spotLength,Te.rectAreaLength=le.rectAreaLength,Te.hemiLength=le.hemiLength,Te.shadowsLength=le.shadowsLength,H.lights&&(V.ambientLightColor.value=ge.state.ambient,V.directionalLights.value=ge.state.directional,V.spotLights.value=ge.state.spot,V.rectAreaLights.value=ge.state.rectArea,V.pointLights.value=ge.state.point,V.hemisphereLights.value=ge.state.hemi,V.directionalShadowMap.value=ge.state.directionalShadowMap,V.directionalShadowMatrix.value=ge.state.directionalShadowMatrix,V.spotShadowMap.value=ge.state.spotShadowMap,V.spotShadowMatrix.value=ge.state.spotShadowMatrix,V.pointShadowMap.value=ge.state.pointShadowMap,V.pointShadowMatrix.value=ge.state.pointShadowMatrix),H=ae.program.getUniforms(),H=br.seqWithValue(H.seq,V),ae.uniformsList=H}function v(H,K,V,ae){Vi=0;var ge=pn.get(V),Te=ge.lightsHash,le=Rt.state.lights.state.hash;Ce&&(He||H!==Ze)&&pe.setState(V.clippingPlanes,V.clipIntersection,V.clipShadows,H,ge,H===Ze&&V.id===Vt),V.needsUpdate===!1&&(ge.program===void 0||V.fog&&ge.fog!==K?V.needsUpdate=!0:(!V.lights||Te.stateID===le.stateID&&Te.directionalLength===le.directionalLength&&Te.pointLength===le.pointLength&&Te.spotLength===le.spotLength&&Te.rectAreaLength===le.rectAreaLength&&Te.hemiLength===le.hemiLength&&Te.shadowsLength===le.shadowsLength)&&(ge.numClippingPlanes===void 0||ge.numClippingPlanes===pe.numPlanes&&ge.numIntersection===pe.numIntersection)||(V.needsUpdate=!0)),V.needsUpdate&&(d(V,K,ae),V.needsUpdate=!1);var Ne=!1,mi=!1,Ni=!1;Te=ge.program,le=Te.getUniforms();var Qt=ge.shader.uniforms;if(je.useProgram(Te.program)&&(Ni=mi=Ne=!0),V.id!==Vt&&(Vt=V.id,mi=!0),(Ne||Ze!==H)&&(le.setValue(Bt,"projectionMatrix",H.projectionMatrix),Ie.logarithmicDepthBuffer&&le.setValue(Bt,"logDepthBufFC",2/(Math.log(H.far+1)/Math.LN2)),Ze!==H&&(Ze=H,Ni=mi=!0),(V.isShaderMaterial||V.isMeshPhongMaterial||V.isMeshStandardMaterial||V.envMap)&&(Ne=le.map.cameraPosition,Ne!==void 0&&Ne.setValue(Bt,ui.setFromMatrixPosition(H.matrixWorld))),(V.isMeshPhongMaterial||V.isMeshLambertMaterial||V.isMeshBasicMaterial||V.isMeshStandardMaterial||V.isShaderMaterial||V.skinning)&&le.setValue(Bt,"viewMatrix",H.matrixWorldInverse)),V.skinning&&(le.setOptional(Bt,ae,"bindMatrix"),le.setOptional(Bt,ae,"bindMatrixInverse"),H=ae.skeleton))if(Ne=H.bones,Ie.floatVertexTextures){if(H.boneTexture===void 0){Ne=Math.sqrt(4*Ne.length),Ne=$e.ceilPowerOfTwo(Ne),Ne=Math.max(Ne,4);var nr=new Float32Array(Ne*Ne*4);nr.set(H.boneMatrices);var xn=new gt(nr,Ne,Ne,1023,1015);xn.needsUpdate=!0,H.boneMatrices=nr,H.boneTexture=xn,H.boneTextureSize=Ne}le.setValue(Bt,"boneTexture",H.boneTexture),le.setValue(Bt,"boneTextureSize",H.boneTextureSize)}else le.setOptional(Bt,H,"boneMatrices");return mi&&(le.setValue(Bt,"toneMappingExposure",St.toneMappingExposure),le.setValue(Bt,"toneMappingWhitePoint",St.toneMappingWhitePoint),V.lights&&(mi=Ni,Qt.ambientLightColor.needsUpdate=mi,Qt.directionalLights.needsUpdate=mi,Qt.pointLights.needsUpdate=mi,Qt.spotLights.needsUpdate=mi,Qt.rectAreaLights.needsUpdate=mi,Qt.hemisphereLights.needsUpdate=mi),K&&V.fog&&(Qt.fogColor.value=K.color,K.isFog?(Qt.fogNear.value=K.near,Qt.fogFar.value=K.far):K.isFogExp2&&(Qt.fogDensity.value=K.density)),V.isMeshBasicMaterial?x(Qt,V):V.isMeshLambertMaterial?(x(Qt,V),V.emissiveMap&&(Qt.emissiveMap.value=V.emissiveMap)):V.isMeshPhongMaterial?(x(Qt,V),V.isMeshToonMaterial?(P(Qt,V),V.gradientMap&&(Qt.gradientMap.value=V.gradientMap)):P(Qt,V)):V.isMeshStandardMaterial?(x(Qt,V),V.isMeshPhysicalMaterial?(R(Qt,V),Qt.reflectivity.value=V.reflectivity,Qt.clearCoat.value=V.clearCoat,Qt.clearCoatRoughness.value=V.clearCoatRoughness):R(Qt,V)):V.isMeshMatcapMaterial?(x(Qt,V),V.matcap&&(Qt.matcap.value=V.matcap),V.bumpMap&&(Qt.bumpMap.value=V.bumpMap,Qt.bumpScale.value=V.bumpScale,V.side===1&&(Qt.bumpScale.value*=-1)),V.normalMap&&(Qt.normalMap.value=V.normalMap,Qt.normalScale.value.copy(V.normalScale),V.side===1&&Qt.normalScale.value.negate()),V.displacementMap&&(Qt.displacementMap.value=V.displacementMap,Qt.displacementScale.value=V.displacementScale,Qt.displacementBias.value=V.displacementBias)):V.isMeshDepthMaterial?(x(Qt,V),V.displacementMap&&(Qt.displacementMap.value=V.displacementMap,Qt.displacementScale.value=V.displacementScale,Qt.displacementBias.value=V.displacementBias)):V.isMeshDistanceMaterial?(x(Qt,V),V.displacementMap&&(Qt.displacementMap.value=V.displacementMap,Qt.displacementScale.value=V.displacementScale,Qt.displacementBias.value=V.displacementBias),Qt.referencePosition.value.copy(V.referencePosition),Qt.nearDistance.value=V.nearDistance,Qt.farDistance.value=V.farDistance):V.isMeshNormalMaterial?(x(Qt,V),V.bumpMap&&(Qt.bumpMap.value=V.bumpMap,Qt.bumpScale.value=V.bumpScale,V.side===1&&(Qt.bumpScale.value*=-1)),V.normalMap&&(Qt.normalMap.value=V.normalMap,Qt.normalScale.value.copy(V.normalScale),V.side===1&&Qt.normalScale.value.negate()),V.displacementMap&&(Qt.displacementMap.value=V.displacementMap,Qt.displacementScale.value=V.displacementScale,Qt.displacementBias.value=V.displacementBias)):V.isLineBasicMaterial?(Qt.diffuse.value=V.color,Qt.opacity.value=V.opacity,V.isLineDashedMaterial&&(Qt.dashSize.value=V.dashSize,Qt.totalSize.value=V.dashSize+V.gapSize,Qt.scale.value=V.scale)):V.isPointsMaterial?(Qt.diffuse.value=V.color,Qt.opacity.value=V.opacity,Qt.size.value=V.size*Ue,Qt.scale.value=.5*ce,Qt.map.value=V.map,V.map!==null&&(V.map.matrixAutoUpdate===!0&&V.map.updateMatrix(),Qt.uvTransform.value.copy(V.map.matrix))):V.isSpriteMaterial?(Qt.diffuse.value=V.color,Qt.opacity.value=V.opacity,Qt.rotation.value=V.rotation,Qt.map.value=V.map,V.map!==null&&(V.map.matrixAutoUpdate===!0&&V.map.updateMatrix(),Qt.uvTransform.value.copy(V.map.matrix))):V.isShadowMaterial&&(Qt.color.value=V.color,Qt.opacity.value=V.opacity),Qt.ltc_1!==void 0&&(Qt.ltc_1.value=Re.LTC_1),Qt.ltc_2!==void 0&&(Qt.ltc_2.value=Re.LTC_2),br.upload(Bt,ge.uniformsList,Qt,St)),V.isShaderMaterial&&V.uniformsNeedUpdate===!0&&(br.upload(Bt,ge.uniformsList,Qt,St),V.uniformsNeedUpdate=!1),V.isSpriteMaterial&&le.setValue(Bt,"center",ae.center),le.setValue(Bt,"modelViewMatrix",ae.modelViewMatrix),le.setValue(Bt,"normalMatrix",ae.normalMatrix),le.setValue(Bt,"modelMatrix",ae.matrixWorld),Te}function x(H,K){if(H.opacity.value=K.opacity,K.color&&(H.diffuse.value=K.color),K.emissive&&H.emissive.value.copy(K.emissive).multiplyScalar(K.emissiveIntensity),K.map&&(H.map.value=K.map),K.alphaMap&&(H.alphaMap.value=K.alphaMap),K.specularMap&&(H.specularMap.value=K.specularMap),K.envMap&&(H.envMap.value=K.envMap,H.flipEnvMap.value=K.envMap&&K.envMap.isCubeTexture?-1:1,H.reflectivity.value=K.reflectivity,H.refractionRatio.value=K.refractionRatio,H.maxMipLevel.value=pn.get(K.envMap).__maxMipLevel),K.lightMap&&(H.lightMap.value=K.lightMap,H.lightMapIntensity.value=K.lightMapIntensity),K.aoMap&&(H.aoMap.value=K.aoMap,H.aoMapIntensity.value=K.aoMapIntensity),K.map)var V=K.map;else K.specularMap?V=K.specularMap:K.displacementMap?V=K.displacementMap:K.normalMap?V=K.normalMap:K.bumpMap?V=K.bumpMap:K.roughnessMap?V=K.roughnessMap:K.metalnessMap?V=K.metalnessMap:K.alphaMap?V=K.alphaMap:K.emissiveMap&&(V=K.emissiveMap);V!==void 0&&(V.isWebGLRenderTarget&&(V=V.texture),V.matrixAutoUpdate===!0&&V.updateMatrix(),H.uvTransform.value.copy(V.matrix))}function P(H,K){H.specular.value=K.specular,H.shininess.value=Math.max(K.shininess,1e-4),K.emissiveMap&&(H.emissiveMap.value=K.emissiveMap),K.bumpMap&&(H.bumpMap.value=K.bumpMap,H.bumpScale.value=K.bumpScale,K.side===1&&(H.bumpScale.value*=-1)),K.normalMap&&(H.normalMap.value=K.normalMap,H.normalScale.value.copy(K.normalScale),K.side===1&&H.normalScale.value.negate()),K.displacementMap&&(H.displacementMap.value=K.displacementMap,H.displacementScale.value=K.displacementScale,H.displacementBias.value=K.displacementBias)}function R(H,K){H.roughness.value=K.roughness,H.metalness.value=K.metalness,K.roughnessMap&&(H.roughnessMap.value=K.roughnessMap),K.metalnessMap&&(H.metalnessMap.value=K.metalnessMap),K.emissiveMap&&(H.emissiveMap.value=K.emissiveMap),K.bumpMap&&(H.bumpMap.value=K.bumpMap,H.bumpScale.value=K.bumpScale,K.side===1&&(H.bumpScale.value*=-1)),K.normalMap&&(H.normalMap.value=K.normalMap,H.normalScale.value.copy(K.normalScale),K.side===1&&H.normalScale.value.negate()),K.displacementMap&&(H.displacementMap.value=K.displacementMap,H.displacementScale.value=K.displacementScale,H.displacementBias.value=K.displacementBias),K.envMap&&(H.envMapIntensity.value=K.envMapIntensity)}console.log("THREE.WebGLRenderer","98"),t=t||{};var I=t.canvas!==void 0?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),$=t.context!==void 0?t.context:null,W=t.alpha!==void 0?t.alpha:!1,ot=t.depth!==void 0?t.depth:!0,Q=t.stencil!==void 0?t.stencil:!0,wt=t.antialias!==void 0?t.antialias:!1,C=t.premultipliedAlpha!==void 0?t.premultipliedAlpha:!0,D=t.preserveDrawingBuffer!==void 0?t.preserveDrawingBuffer:!1,ct=t.powerPreference!==void 0?t.powerPreference:"default",Dt=null,Rt=null;this.domElement=I,this.context=null,this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1,this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var St=this,oe=!1,$t=null,me=null,ue=null,Vt=-1,Ee=e=null,Be=!1,Ze=null,un=null,tn=new nt,Ri=new nt,Ei=null,Vi=0,cn=I.width,ce=I.height,Ue=1,vt=new nt(0,0,cn,ce),be=new nt(0,0,cn,ce),Fe=!1,Ai=new st,pe=new Gi,Ce=!1,He=!1,fi=new _t,ui=new S;try{W={alpha:W,depth:ot,stencil:Q,antialias:wt,premultipliedAlpha:C,preserveDrawingBuffer:D,powerPreference:ct},I.addEventListener("webglcontextlost",n,!1),I.addEventListener("webglcontextrestored",o,!1);var Bt=$||I.getContext("webgl",W)||I.getContext("experimental-webgl",W);if(Bt===null)throw I.getContext("webgl")!==null?Error("Error creating WebGL context with your selected attributes."):Error("Error creating WebGL context.");Bt.getShaderPrecisionFormat===void 0&&(Bt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(H){console.error("THREE.WebGLRenderer: "+H.message)}var Ge,Ie,je,en,pn,oo,Ns,_l,Bs,Ko,ya,ts,Ao,xl,wl,Un,gn;i();var jr=null;typeof navigator<"u"&&(jr="xr"in navigator?new fe(St):new Ke(St)),this.vr=jr;var Yl=new Kt(St,Bs,Ie.maxTextureSize);this.shadowMap=Yl,this.getContext=function(){return Bt},this.getContextAttributes=function(){return Bt.getContextAttributes()},this.forceContextLoss=function(){var H=Ge.get("WEBGL_lose_context");H&&H.loseContext()},this.forceContextRestore=function(){var H=Ge.get("WEBGL_lose_context");H&&H.restoreContext()},this.getPixelRatio=function(){return Ue},this.setPixelRatio=function(H){H!==void 0&&(Ue=H,this.setSize(cn,ce,!1))},this.getSize=function(){return{width:cn,height:ce}},this.setSize=function(H,K,V){jr.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(cn=H,ce=K,I.width=H*Ue,I.height=K*Ue,V!==!1&&(I.style.width=H+"px",I.style.height=K+"px"),this.setViewport(0,0,H,K))},this.getDrawingBufferSize=function(){return{width:cn*Ue,height:ce*Ue}},this.setDrawingBufferSize=function(H,K,V){cn=H,ce=K,Ue=V,I.width=H*V,I.height=K*V,this.setViewport(0,0,H,K)},this.getCurrentViewport=function(){return tn},this.setViewport=function(H,K,V,ae){vt.set(H,ce-K-ae,V,ae),je.viewport(tn.copy(vt).multiplyScalar(Ue))},this.setScissor=function(H,K,V,ae){be.set(H,ce-K-ae,V,ae),je.scissor(Ri.copy(be).multiplyScalar(Ue))},this.setScissorTest=function(H){je.setScissorTest(Fe=H)},this.getClearColor=function(){return Ao.getClearColor()},this.setClearColor=function(){Ao.setClearColor.apply(Ao,arguments)},this.getClearAlpha=function(){return Ao.getClearAlpha()},this.setClearAlpha=function(){Ao.setClearAlpha.apply(Ao,arguments)},this.clear=function(H,K,V){var ae=0;(H===void 0||H)&&(ae|=16384),(K===void 0||K)&&(ae|=256),(V===void 0||V)&&(ae|=1024),Bt.clear(ae)},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(){I.removeEventListener("webglcontextlost",n,!1),I.removeEventListener("webglcontextrestored",o,!1),ya.dispose(),ts.dispose(),pn.dispose(),Bs.dispose(),jr.dispose(),so.stop()},this.renderBufferImmediate=function(H,K){je.initAttributes();var V=pn.get(H);H.hasPositions&&!V.position&&(V.position=Bt.createBuffer()),H.hasNormals&&!V.normal&&(V.normal=Bt.createBuffer()),H.hasUvs&&!V.uv&&(V.uv=Bt.createBuffer()),H.hasColors&&!V.color&&(V.color=Bt.createBuffer()),K=K.getAttributes(),H.hasPositions&&(Bt.bindBuffer(34962,V.position),Bt.bufferData(34962,H.positionArray,35048),je.enableAttribute(K.position),Bt.vertexAttribPointer(K.position,3,5126,!1,0,0)),H.hasNormals&&(Bt.bindBuffer(34962,V.normal),Bt.bufferData(34962,H.normalArray,35048),je.enableAttribute(K.normal),Bt.vertexAttribPointer(K.normal,3,5126,!1,0,0)),H.hasUvs&&(Bt.bindBuffer(34962,V.uv),Bt.bufferData(34962,H.uvArray,35048),je.enableAttribute(K.uv),Bt.vertexAttribPointer(K.uv,2,5126,!1,0,0)),H.hasColors&&(Bt.bindBuffer(34962,V.color),Bt.bufferData(34962,H.colorArray,35048),je.enableAttribute(K.color),Bt.vertexAttribPointer(K.color,3,5126,!1,0,0)),je.disableUnusedAttributes(),Bt.drawArrays(4,0,H.count),H.count=0},this.renderBufferDirect=function(H,K,V,ae,ge,Te){var le=ge.isMesh&&0>ge.normalMatrix.determinant();je.setMaterial(ae,le);var Ne=v(H,K,ae,ge),mi=!1;(e!==V.id||Ee!==Ne.id||Be!==(ae.wireframe===!0))&&(e=V.id,Ee=Ne.id,Be=ae.wireframe===!0,mi=!0),ge.morphTargetInfluences&&(xl.update(ge,V,ae,Ne),mi=!0),le=V.index;var Ni=V.attributes.position;if(K=1,ae.wireframe===!0&&(le=_l.getWireframeAttribute(V),K=2),H=wl,le!==null){var Qt=Ns.get(le);H=Un,H.setIndex(Qt)}if(mi){if(V&&V.isInstancedBufferGeometry&!Ie.isWebGL2&&Ge.get("ANGLE_instanced_arrays")===null)console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{je.initAttributes(),mi=V.attributes,Ne=Ne.getAttributes();var nr=ae.defaultAttributeValues;for(Fn in Ne){var xn=Ne[Fn];if(0<=xn){var Wi=mi[Fn];if(Wi!==void 0){var Zn=Wi.normalized,Ml=Wi.itemSize,Xr=Ns.get(Wi);if(Xr!==void 0){var Tl=Xr.buffer,qa=Xr.type;if(Xr=Xr.bytesPerElement,Wi.isInterleavedBufferAttribute){var Fs=Wi.data,Zl=Fs.stride;Wi=Wi.offset,Fs&&Fs.isInstancedInterleavedBuffer?(je.enableAttributeAndDivisor(xn,Fs.meshPerAttribute),V.maxInstancedCount===void 0&&(V.maxInstancedCount=Fs.meshPerAttribute*Fs.count)):je.enableAttribute(xn),Bt.bindBuffer(34962,Tl),Bt.vertexAttribPointer(xn,Ml,qa,Zn,Zl*Xr,Wi*Xr)}else Wi.isInstancedBufferAttribute?(je.enableAttributeAndDivisor(xn,Wi.meshPerAttribute),V.maxInstancedCount===void 0&&(V.maxInstancedCount=Wi.meshPerAttribute*Wi.count)):je.enableAttribute(xn),Bt.bindBuffer(34962,Tl),Bt.vertexAttribPointer(xn,Ml,qa,Zn,0,0)}}else if(nr!==void 0&&(Zn=nr[Fn],Zn!==void 0))switch(Zn.length){case 2:Bt.vertexAttrib2fv(xn,Zn);break;case 3:Bt.vertexAttrib3fv(xn,Zn);break;case 4:Bt.vertexAttrib4fv(xn,Zn);break;default:Bt.vertexAttrib1fv(xn,Zn)}}}je.disableUnusedAttributes()}le!==null&&Bt.bindBuffer(34963,Qt.buffer)}Qt=1/0,le!==null?Qt=le.count:Ni!==void 0&&(Qt=Ni.count),le=V.drawRange.start*K,Ni=Te!==null?Te.start*K:0;var Fn=Math.max(le,Ni);if(Te=Math.max(0,Math.min(Qt,le+V.drawRange.count*K,Ni+(Te!==null?Te.count*K:1/0))-1-Fn+1),Te!==0){if(ge.isMesh)if(ae.wireframe===!0)je.setLineWidth(ae.wireframeLinewidth*(me===null?Ue:1)),H.setMode(1);else switch(ge.drawMode){case 0:H.setMode(4);break;case 1:H.setMode(5);break;case 2:H.setMode(6)}else ge.isLine?(ae=ae.linewidth,ae===void 0&&(ae=1),je.setLineWidth(ae*(me===null?Ue:1)),ge.isLineSegments?H.setMode(1):ge.isLineLoop?H.setMode(2):H.setMode(3)):ge.isPoints?H.setMode(0):ge.isSprite&&H.setMode(4);V&&V.isInstancedBufferGeometry?0<V.maxInstancedCount&&H.renderInstances(V,Fn,Te):H.render(Fn,Te)}},this.compile=function(H,K){Rt=ts.get(H,K),Rt.init(),H.traverse(function(V){V.isLight&&(Rt.pushLight(V),V.castShadow&&Rt.pushShadow(V))}),Rt.setupLights(K),H.traverse(function(V){if(V.material)if(Array.isArray(V.material))for(var ae=0;ae<V.material.length;ae++)d(V.material[ae],H.fog,V);else d(V.material,H.fog,V)})};var Us=null,so=new _;so.setAnimationLoop(function(H){jr.isPresenting()||Us&&Us(H)}),typeof window<"u"&&so.setContext(window),this.setAnimationLoop=function(H){Us=H,jr.setAnimationLoop(H),so.start()},this.render=function(H,K,V,ae){if(!K||!K.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!oe){Ee=e=null,Be=!1,Vt=-1,Ze=null,H.autoUpdate===!0&&H.updateMatrixWorld(),K.parent===null&&K.updateMatrixWorld(),jr.enabled&&(K=jr.getCamera(K)),Rt=ts.get(H,K),Rt.init(),H.onBeforeRender(St,H,K,V),fi.multiplyMatrices(K.projectionMatrix,K.matrixWorldInverse),Ai.setFromMatrix(fi),He=this.localClippingEnabled,Ce=pe.init(this.clippingPlanes,He,K),Dt=ya.get(H,K),Dt.init(),c(H,K,St.sortObjects),St.sortObjects===!0&&Dt.sort(),Ce&&pe.beginShadows(),Yl.render(Rt.state.shadowsArray,H,K),Rt.setupLights(K),Ce&&pe.endShadows(),this.info.autoReset&&this.info.reset(),V===void 0&&(V=null),this.setRenderTarget(V),Ao.render(Dt,H,K,ae),ae=Dt.opaque;var ge=Dt.transparent;if(H.overrideMaterial){var Te=H.overrideMaterial;ae.length&&p(ae,H,K,Te),ge.length&&p(ge,H,K,Te)}else ae.length&&p(ae,H,K),ge.length&&p(ge,H,K);V&&oo.updateRenderTargetMipmap(V),je.buffers.depth.setTest(!0),je.buffers.depth.setMask(!0),je.buffers.color.setMask(!0),je.setPolygonOffset(!1),H.onAfterRender(St,H,K),jr.enabled&&jr.submitFrame(),Rt=Dt=null}},this.allocTextureUnit=function(){var H=Vi;return H>=Ie.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+H+" texture units while this GPU supports only "+Ie.maxTextures),Vi+=1,H},this.setTexture2D=function(){var H=!1;return function(K,V){K&&K.isWebGLRenderTarget&&(H||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),H=!0),K=K.texture),oo.setTexture2D(K,V)}}(),this.setTexture3D=function(){return function(H,K){oo.setTexture3D(H,K)}}(),this.setTexture=function(){var H=!1;return function(K,V){H||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),H=!0),oo.setTexture2D(K,V)}}(),this.setTextureCube=function(){var H=!1;return function(K,V){K&&K.isWebGLRenderTargetCube&&(H||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),H=!0),K=K.texture),K&&K.isCubeTexture||Array.isArray(K.image)&&K.image.length===6?oo.setTextureCube(K,V):oo.setTextureCubeDynamic(K,V)}}(),this.setFramebuffer=function(H){$t=H},this.getRenderTarget=function(){return me},this.setRenderTarget=function(H){(me=H)&&pn.get(H).__webglFramebuffer===void 0&&oo.setupRenderTarget(H);var K=$t,V=!1;H?(K=pn.get(H).__webglFramebuffer,H.isWebGLRenderTargetCube&&(K=K[H.activeCubeFace],V=!0),tn.copy(H.viewport),Ri.copy(H.scissor),Ei=H.scissorTest):(tn.copy(vt).multiplyScalar(Ue),Ri.copy(be).multiplyScalar(Ue),Ei=Fe),ue!==K&&(Bt.bindFramebuffer(36160,K),ue=K),je.viewport(tn),je.scissor(Ri),je.setScissorTest(Ei),V&&(V=pn.get(H.texture),Bt.framebufferTexture2D(36160,36064,34069+H.activeCubeFace,V.__webglTexture,H.activeMipMapLevel))},this.readRenderTargetPixels=function(H,K,V,ae,ge,Te){if(H&&H.isWebGLRenderTarget){var le=pn.get(H).__webglFramebuffer;if(le){var Ne=!1;le!==ue&&(Bt.bindFramebuffer(36160,le),Ne=!0);try{var mi=H.texture,Ni=mi.format,Qt=mi.type;Ni!==1023&&gn.convert(Ni)!==Bt.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):Qt===1009||gn.convert(Qt)===Bt.getParameter(35738)||Qt===1015&&(Ie.isWebGL2||Ge.get("OES_texture_float")||Ge.get("WEBGL_color_buffer_float"))||Qt===1016&&(Ie.isWebGL2?Ge.get("EXT_color_buffer_float"):Ge.get("EXT_color_buffer_half_float"))?Bt.checkFramebufferStatus(36160)===36053?0<=K&&K<=H.width-ae&&0<=V&&V<=H.height-ge&&Bt.readPixels(K,V,ae,ge,gn.convert(Ni),gn.convert(Qt),Te):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{Ne&&Bt.bindFramebuffer(36160,ue)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(H,K,V){var ae=K.image.width,ge=K.image.height,Te=gn.convert(K.format);this.setTexture2D(K,0),Bt.copyTexImage2D(3553,V||0,Te,H.x,H.y,ae,ge,0)},this.copyTextureToTexture=function(H,K,V,ae){var ge=K.image.width,Te=K.image.height,le=gn.convert(V.format),Ne=gn.convert(V.type);this.setTexture2D(V,0),K.isDataTexture?Bt.texSubImage2D(3553,ae||0,H.x,H.y,ge,Te,le,Ne,K.image.data):Bt.texSubImage2D(3553,ae||0,H.x,H.y,le,Ne,K.image)}}function de(t,e){this.name="",this.color=new Z(t),this.density=e!==void 0?e:25e-5}function an(t,e,i){this.name="",this.color=new Z(t),this.near=e!==void 0?e:1,this.far=i!==void 0?i:1e3}function Ln(){z.call(this),this.type="Scene",this.overrideMaterial=this.fog=this.background=null,this.autoUpdate=!0}function vi(t,e){this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function yi(t,e,i,n){this.data=t,this.itemSize=e,this.offset=i,this.normalized=n===!0}function Si(t){Oe.call(this),this.type="SpriteMaterial",this.color=new Z(16777215),this.map=null,this.rotation=0,this.sizeAttenuation=!0,this.lights=!1,this.transparent=!0,this.setValues(t)}function Hi(t){if(z.call(this),this.type="Sprite",zs===void 0){zs=new Ut;var e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);e=new vi(e,5),zs.setIndex([0,1,2,0,2,3]),zs.addAttribute("position",new yi(e,3,0,!1)),zs.addAttribute("uv",new yi(e,2,3,!1))}this.geometry=zs,this.material=t!==void 0?t:new Si,this.center=new M(.5,.5)}function ki(){z.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Xi(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),e===void 0)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],t=0,e=this.bones.length;t<e;t++)this.boneInverses.push(new _t)}function qi(){z.call(this),this.type="Bone"}function Ti(t,e){Fi.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new _t,this.bindMatrixInverse=new _t,t=this.initBones(),t=new Xi(t),this.bind(t,this.matrixWorld),this.normalizeSkinWeights()}function _i(t){Oe.call(this),this.type="LineBasicMaterial",this.color=new Z(16777215),this.linewidth=1,this.linejoin=this.linecap="round",this.lights=!1,this.setValues(t)}function Li(t,e,i){i===1&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),z.call(this),this.type="Line",this.geometry=t!==void 0?t:new Ut,this.material=e!==void 0?e:new _i({color:16777215*Math.random()})}function ei(t,e){Li.call(this,t,e),this.type="LineSegments"}function Ir(t,e){Li.call(this,t,e),this.type="LineLoop"}function Mn(t){Oe.call(this),this.type="PointsMaterial",this.color=new Z(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=this.morphTargets=!1,this.setValues(t)}function ps(t,e){z.call(this),this.type="Points",this.geometry=t!==void 0?t:new Ut,this.material=e!==void 0?e:new Mn({color:16777215*Math.random()})}function il(t,e,i,n,o,s,l,h,c){qt.call(this,t,e,i,n,o,s,l,h,c),this.generateMipmaps=!1}function uo(t,e,i,n,o,s,l,h,c,p,f,d){qt.call(this,null,s,l,h,c,p,n,o,f,d),this.image={width:e,height:i},this.mipmaps=t,this.generateMipmaps=this.flipY=!1}function Ws(t,e,i,n,o,s,l,h,c){qt.call(this,t,e,i,n,o,s,l,h,c),this.needsUpdate=!0}function js(t,e,i,n,o,s,l,h,c,p){if(p=p!==void 0?p:1026,p!==1026&&p!==1027)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&p===1026&&(i=1012),i===void 0&&p===1027&&(i=1020),qt.call(this,null,n,o,s,l,h,p,i,c),this.image={width:t,height:e},this.magFilter=l!==void 0?l:1003,this.minFilter=h!==void 0?h:1003,this.generateMipmaps=this.flipY=!1}function fs(t){Ut.call(this),this.type="WireframeGeometry";var e=[],i,n,o,s=[0,0],l={},h=["a","b","c"];if(t&&t.isGeometry){var c=t.faces,p=0;for(n=c.length;p<n;p++){var f=c[p];for(i=0;3>i;i++){var d=f[h[i]],v=f[h[(i+1)%3]];s[0]=Math.min(d,v),s[1]=Math.max(d,v),d=s[0]+","+s[1],l[d]===void 0&&(l[d]={index1:s[0],index2:s[1]})}}for(d in l)p=l[d],h=t.vertices[p.index1],e.push(h.x,h.y,h.z),h=t.vertices[p.index2],e.push(h.x,h.y,h.z)}else if(t&&t.isBufferGeometry)if(h=new S,t.index!==null){c=t.attributes.position,f=t.index;var x=t.groups;for(x.length===0&&(x=[{start:0,count:f.count,materialIndex:0}]),t=0,o=x.length;t<o;++t)for(p=x[t],i=p.start,n=p.count,p=i,n=i+n;p<n;p+=3)for(i=0;3>i;i++)d=f.getX(p+i),v=f.getX(p+(i+1)%3),s[0]=Math.min(d,v),s[1]=Math.max(d,v),d=s[0]+","+s[1],l[d]===void 0&&(l[d]={index1:s[0],index2:s[1]});for(d in l)p=l[d],h.fromBufferAttribute(c,p.index1),e.push(h.x,h.y,h.z),h.fromBufferAttribute(c,p.index2),e.push(h.x,h.y,h.z)}else for(c=t.attributes.position,p=0,n=c.count/3;p<n;p++)for(i=0;3>i;i++)l=3*p+i,h.fromBufferAttribute(c,l),e.push(h.x,h.y,h.z),l=3*p+(i+1)%3,h.fromBufferAttribute(c,l),e.push(h.x,h.y,h.z);this.addAttribute("position",new Et(e,3))}function Xs(t,e,i){X.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:i},this.fromBufferGeometry(new ds(t,e,i)),this.mergeVertices()}function ds(t,e,i){Ut.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:i};var n=[],o=[],s=[],l=[],h=new S,c=new S,p=new S,f=new S,d=new S,v,x;3>t.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var P=e+1;for(v=0;v<=i;v++){var R=v/i;for(x=0;x<=e;x++){var I=x/e;t(I,R,c),o.push(c.x,c.y,c.z),0<=I-1e-5?(t(I-1e-5,R,p),f.subVectors(c,p)):(t(I+1e-5,R,p),f.subVectors(p,c)),0<=R-1e-5?(t(I,R-1e-5,p),d.subVectors(c,p)):(t(I,R+1e-5,p),d.subVectors(p,c)),h.crossVectors(f,d).normalize(),s.push(h.x,h.y,h.z),l.push(I,R)}}for(v=0;v<i;v++)for(x=0;x<e;x++)t=v*P+x+1,h=(v+1)*P+x+1,c=(v+1)*P+x,n.push(v*P+x,t,c),n.push(t,h,c);this.setIndex(n),this.addAttribute("position",new Et(o,3)),this.addAttribute("normal",new Et(s,3)),this.addAttribute("uv",new Et(l,2))}function Ci(t,e,i,n){X.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},this.fromBufferGeometry(new oi(t,e,i,n)),this.mergeVertices()}function oi(t,e,i,n){function o(p){h.push(p.x,p.y,p.z)}function s(p,f){p*=3,f.x=t[p+0],f.y=t[p+1],f.z=t[p+2]}function l(p,f,d,v){0>v&&p.x===1&&(c[f]=p.x-1),d.x===0&&d.z===0&&(c[f]=v/2/Math.PI+.5)}Ut.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},i=i||1,n=n||0;var h=[],c=[];(function(p){for(var f=new S,d=new S,v=new S,x=0;x<e.length;x+=3){s(e[x+0],f),s(e[x+1],d),s(e[x+2],v);var P,R,I=f,$=d,W=v,ot=Math.pow(2,p),Q=[];for(R=0;R<=ot;R++){Q[R]=[];var wt=I.clone().lerp(W,R/ot),C=$.clone().lerp(W,R/ot),D=ot-R;for(P=0;P<=D;P++)Q[R][P]=P===0&&R===ot?wt:wt.clone().lerp(C,P/D)}for(R=0;R<ot;R++)for(P=0;P<2*(ot-R)-1;P++)I=Math.floor(P/2),P%2===0?(o(Q[R][I+1]),o(Q[R+1][I]),o(Q[R][I])):(o(Q[R][I+1]),o(Q[R+1][I+1]),o(Q[R+1][I]))}})(n),function(p){for(var f=new S,d=0;d<h.length;d+=3)f.x=h[d+0],f.y=h[d+1],f.z=h[d+2],f.normalize().multiplyScalar(p),h[d+0]=f.x,h[d+1]=f.y,h[d+2]=f.z}(i),function(){for(var p=new S,f=0;f<h.length;f+=3)p.x=h[f+0],p.y=h[f+1],p.z=h[f+2],c.push(Math.atan2(p.z,-p.x)/2/Math.PI+.5,1-(Math.atan2(-p.y,Math.sqrt(p.x*p.x+p.z*p.z))/Math.PI+.5));p=new S,f=new S;for(var d=new S,v=new S,x=new M,P=new M,R=new M,I=0,$=0;I<h.length;I+=9,$+=6){p.set(h[I+0],h[I+1],h[I+2]),f.set(h[I+3],h[I+4],h[I+5]),d.set(h[I+6],h[I+7],h[I+8]),x.set(c[$+0],c[$+1]),P.set(c[$+2],c[$+3]),R.set(c[$+4],c[$+5]),v.copy(p).add(f).add(d).divideScalar(3);var W=Math.atan2(v.z,-v.x);l(x,$+0,p,W),l(P,$+2,f,W),l(R,$+4,d,W)}for(p=0;p<c.length;p+=6)f=c[p+0],d=c[p+2],v=c[p+4],x=Math.min(f,d,v),.9<Math.max(f,d,v)&&.1>x&&(.2>f&&(c[p+0]+=1),.2>d&&(c[p+2]+=1),.2>v&&(c[p+4]+=1))}(),this.addAttribute("position",new Et(h,3)),this.addAttribute("normal",new Et(h.slice(),3)),this.addAttribute("uv",new Et(c,2)),n===0?this.computeVertexNormals():this.normalizeNormals()}function qs(t,e){X.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new ms(t,e)),this.mergeVertices()}function ms(t,e){oi.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,e),this.type="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Ys(t,e){X.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new bo(t,e)),this.mergeVertices()}function bo(t,e){oi.call(this,[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],t,e),this.type="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Zs(t,e){X.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new gs(t,e)),this.mergeVertices()}function gs(t,e){var i=(1+Math.sqrt(5))/2;oi.call(this,[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,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],t,e),this.type="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vs(t,e){X.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new ys(t,e)),this.mergeVertices()}function ys(t,e){var i=(1+Math.sqrt(5))/2,n=1/i;oi.call(this,[-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,-n,-i,0,-n,i,0,n,-i,0,n,i,-n,-i,0,-n,i,0,n,-i,0,n,i,0,-i,0,-n,i,0,-n,-i,0,n,i,0,n],[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],t,e),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function $i(t,e,i,n,o,s){X.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:o},s!==void 0&&console.warn("THREE.TubeGeometry: taper has been removed."),t=new co(t,e,i,n,o),this.tangents=t.tangents,this.normals=t.normals,this.binormals=t.binormals,this.fromBufferGeometry(t),this.mergeVertices()}function co(t,e,i,n,o){function s($){f=t.getPointAt($/e,f);var W=l.normals[$];for($=l.binormals[$],v=0;v<=n;v++){var ot=v/n*Math.PI*2,Q=Math.sin(ot);ot=-Math.cos(ot),c.x=ot*W.x+Q*$.x,c.y=ot*W.y+Q*$.y,c.z=ot*W.z+Q*$.z,c.normalize(),P.push(c.x,c.y,c.z),h.x=f.x+i*c.x,h.y=f.y+i*c.y,h.z=f.z+i*c.z,x.push(h.x,h.y,h.z)}}Ut.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:o},e=e||64,i=i||1,n=n||8,o=o||!1;var l=t.computeFrenetFrames(e,o);this.tangents=l.tangents,this.normals=l.normals,this.binormals=l.binormals;var h=new S,c=new S,p=new M,f=new S,d,v,x=[],P=[],R=[],I=[];for(d=0;d<e;d++)s(d);for(s(o===!1?e:0),d=0;d<=e;d++)for(v=0;v<=n;v++)p.x=d/e,p.y=v/n,R.push(p.x,p.y);(function(){for(v=1;v<=e;v++)for(d=1;d<=n;d++){var $=(n+1)*v+(d-1),W=(n+1)*v+d,ot=(n+1)*(v-1)+d;I.push((n+1)*(v-1)+(d-1),$,ot),I.push($,W,ot)}})(),this.setIndex(I),this.addAttribute("position",new Et(x,3)),this.addAttribute("normal",new Et(P,3)),this.addAttribute("uv",new Et(R,2))}function xr(t,e,i,n,o,s,l){X.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:o,q:s},l!==void 0&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new Oo(t,e,i,n,o,s)),this.mergeVertices()}function Oo(t,e,i,n,o,s){function l(C,D,ct,Dt,Rt){var St=Math.sin(C);D=ct/D*C,ct=Math.cos(D),Rt.x=Dt*(2+ct)*.5*Math.cos(C),Rt.y=Dt*(2+ct)*St*.5,Rt.z=Dt*Math.sin(D)*.5}Ut.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:o,q:s},t=t||1,e=e||.4,i=Math.floor(i)||64,n=Math.floor(n)||8,o=o||2,s=s||3;var h=[],c=[],p=[],f=[],d,v=new S,x=new S,P=new S,R=new S,I=new S,$=new S,W=new S;for(d=0;d<=i;++d){var ot=d/i*o*Math.PI*2;for(l(ot,o,s,t,P),l(ot+.01,o,s,t,R),$.subVectors(R,P),W.addVectors(R,P),I.crossVectors($,W),W.crossVectors(I,$),I.normalize(),W.normalize(),ot=0;ot<=n;++ot){var Q=ot/n*Math.PI*2,wt=-e*Math.cos(Q);Q=e*Math.sin(Q),v.x=P.x+(wt*W.x+Q*I.x),v.y=P.y+(wt*W.y+Q*I.y),v.z=P.z+(wt*W.z+Q*I.z),c.push(v.x,v.y,v.z),x.subVectors(v,P).normalize(),p.push(x.x,x.y,x.z),f.push(d/i),f.push(ot/n)}}for(ot=1;ot<=i;ot++)for(d=1;d<=n;d++)t=(n+1)*ot+(d-1),e=(n+1)*ot+d,o=(n+1)*(ot-1)+d,h.push((n+1)*(ot-1)+(d-1),t,o),h.push(t,e,o);this.setIndex(h),this.addAttribute("position",new Et(c,3)),this.addAttribute("normal",new Et(p,3)),this.addAttribute("uv",new Et(f,2))}function Io(t,e,i,n,o){X.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:o},this.fromBufferGeometry(new Tn(t,e,i,n,o)),this.mergeVertices()}function Tn(t,e,i,n,o){Ut.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:o},t=t||1,e=e||.4,i=Math.floor(i)||8,n=Math.floor(n)||6,o=o||2*Math.PI;var s=[],l=[],h=[],c=[],p=new S,f=new S,d=new S,v,x;for(v=0;v<=i;v++)for(x=0;x<=n;x++){var P=x/n*o,R=v/i*Math.PI*2;f.x=(t+e*Math.cos(R))*Math.cos(P),f.y=(t+e*Math.cos(R))*Math.sin(P),f.z=e*Math.sin(R),l.push(f.x,f.y,f.z),p.x=t*Math.cos(P),p.y=t*Math.sin(P),d.subVectors(f,p).normalize(),h.push(d.x,d.y,d.z),c.push(x/n),c.push(v/i)}for(v=1;v<=i;v++)for(x=1;x<=n;x++)t=(n+1)*(v-1)+x-1,e=(n+1)*(v-1)+x,o=(n+1)*v+x,s.push((n+1)*v+x-1,t,o),s.push(t,e,o);this.setIndex(s),this.addAttribute("position",new Et(l,3)),this.addAttribute("normal",new Et(h,3)),this.addAttribute("uv",new Et(c,2))}function nl(t,e,i,n,o){for(var s,l=0,h=e,c=i-n;h<i;h+=n)l+=(t[c]-t[h])*(t[h+1]+t[c+1]),c=h;if(o===0<l)for(o=e;o<i;o+=n)s=Ra(o,t[o],t[o+1],s);else for(o=i-n;o>=e;o-=n)s=Ra(o,t[o],t[o+1],s);return s&&Do(s,s.next)&&(bi(s),s=s.next),s}function _s(t,e){if(!t)return t;e||(e=t);do{var i=!1;if(t.steiner||!Do(t,t.next)&&zi(t.prev,t,t.next)!==0)t=t.next;else{if(bi(t),t=e=t.prev,t===t.next)break;i=!0}}while(i||t!==e);return e}function xs(t,e,i,n,o,s,l){if(t){if(!l&&s){var h=t,c=h;do c.z===null&&(c.z=La(c.x,c.y,n,o,s)),c.prevZ=c.prev,c=c.nextZ=c.next;while(c!==h);c.prevZ.nextZ=null,c.prevZ=null,h=c;var p,f,d,v,x=1;do{c=h;var P=h=null;for(f=0;c;){f++;var R=c;for(p=d=0;p<x&&(d++,R=R.nextZ,R);p++);for(v=x;0<d||0<v&&R;)d!==0&&(v===0||!R||c.z<=R.z)?(p=c,c=c.nextZ,d--):(p=R,R=R.nextZ,v--),P?P.nextZ=p:h=p,p.prevZ=P,P=p;c=R}P.nextZ=null,x*=2}while(1<f)}for(h=t;t.prev!==t.next;){if(c=t.prev,R=t.next,s)t:{P=t,v=n;var I=o,$=s;if(f=P.prev,d=P,x=P.next,0<=zi(f,d,x))P=!1;else{var W=f.x>d.x?f.x>x.x?f.x:x.x:d.x>x.x?d.x:x.x,ot=f.y>d.y?f.y>x.y?f.y:x.y:d.y>x.y?d.y:x.y;for(p=La(f.x<d.x?f.x<x.x?f.x:x.x:d.x<x.x?d.x:x.x,f.y<d.y?f.y<x.y?f.y:x.y:d.y<x.y?d.y:x.y,v,I,$),v=La(W,ot,v,I,$),I=P.nextZ;I&&I.z<=v;){if(I!==P.prev&&I!==P.next&&Ca(f.x,f.y,d.x,d.y,x.x,x.y,I.x,I.y)&&0<=zi(I.prev,I,I.next)){P=!1;break t}I=I.nextZ}for(I=P.prevZ;I&&I.z>=p;){if(I!==P.prev&&I!==P.next&&Ca(f.x,f.y,d.x,d.y,x.x,x.y,I.x,I.y)&&0<=zi(I.prev,I,I.next)){P=!1;break t}I=I.prevZ}P=!0}}else t:if(P=t,f=P.prev,d=P,x=P.next,0<=zi(f,d,x))P=!1;else{for(p=P.next.next;p!==P.prev;){if(Ca(f.x,f.y,d.x,d.y,x.x,x.y,p.x,p.y)&&0<=zi(p.prev,p,p.next)){P=!1;break t}p=p.next}P=!0}if(P)e.push(c.i/i),e.push(t.i/i),e.push(R.i/i),bi(t),h=t=R.next;else if(t=R,t===h){if(!l)xs(_s(t),e,i,n,o,s,1);else if(l===1){l=e,h=i,c=t;do R=c.prev,P=c.next.next,!Do(R,P)&&rl(R,c,c.next,P)&&ar(R,P)&&ar(P,R)&&(l.push(R.i/h),l.push(c.i/h),l.push(P.i/h),bi(c),bi(c.next),c=t=P),c=c.next;while(c!==t);t=c,xs(t,e,i,n,o,s,2)}else if(l===2)t:{l=t;do{for(h=l.next.next;h!==l.prev;){if(c=l.i!==h.i){if(c=l,R=h,P=c.next.i!==R.i&&c.prev.i!==R.i){e:{P=c;do{if(P.i!==c.i&&P.next.i!==c.i&&P.i!==R.i&&P.next.i!==R.i&&rl(P,P.next,c,R)){P=!0;break e}P=P.next}while(P!==c);P=!1}P=!P}if(P=P&&ar(c,R)&&ar(R,c)){P=c,f=!1,d=(c.x+R.x)/2,R=(c.y+R.y)/2;do P.y>R!=P.next.y>R&&P.next.y!==P.y&&d<(P.next.x-P.x)*(R-P.y)/(P.next.y-P.y)+P.x&&(f=!f),P=P.next;while(P!==c);P=f}c=P}if(c){t=Js(l,h),l=_s(l,l.next),t=_s(t,t.next),xs(l,e,i,n,o,s),xs(t,e,i,n,o,s);break t}h=h.next}l=l.next}while(l!==t)}break}}}}function bl(t,e){return t.x-e.x}function Ol(t,e){var i=e,n=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var l=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(l<=n&&l>s){if(s=l,l===n){if(o===i.y)return i;if(o===i.next.y)return i.next}var h=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!h)return null;if(n===s)return h.prev;e=h,l=h.x;var c=h.y,p=1/0;for(i=h.next;i!==e;){if(n>=i.x&&i.x>=l&&n!==i.x&&Ca(o<c?n:s,o,l,c,o<c?s:n,o,i.x,i.y)){var f=Math.abs(o-i.y)/(n-i.x);(f<p||f===p&&i.x>h.x)&&ar(i,t)&&(h=i,p=f)}i=i.next}return h}function La(t,e,i,n,o){return t=32767*(t-i)*o,e=32767*(e-n)*o,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,(t|t<<1)&1431655765|((e|e<<1)&1431655765)<<1}function Kn(t){var e=t,i=t;do e.x<i.x&&(i=e),e=e.next;while(e!==t);return i}function Ca(t,e,i,n,o,s,l,h){return 0<=(o-l)*(e-h)-(t-l)*(s-h)&&0<=(t-l)*(n-h)-(i-l)*(e-h)&&0<=(i-l)*(s-h)-(o-l)*(n-h)}function zi(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function Do(t,e){return t.x===e.x&&t.y===e.y}function rl(t,e,i,n){return Do(t,e)&&Do(i,n)||Do(t,n)&&Do(i,e)?!0:0<zi(t,e,i)!=0<zi(t,e,n)&&0<zi(i,n,t)!=0<zi(i,n,e)}function ar(t,e){return 0>zi(t.prev,t,t.next)?0<=zi(t,e,t.next)&&0<=zi(t,t.prev,e):0>zi(t,e,t.prev)||0>zi(t,t.next,e)}function Js(t,e){var i=new Dr(t.i,t.x,t.y),n=new Dr(e.i,e.x,e.y),o=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=o,o.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function Ra(t,e,i,n){return t=new Dr(t,e,i),n?(t.next=n.next,t.prev=n,n.next.prev=t,n.next=t):(t.prev=t,t.next=t),t}function bi(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Dr(t,e,i){this.i=t,this.x=e,this.y=i,this.nextZ=this.prevZ=this.z=this.next=this.prev=null,this.steiner=!1}function ba(t){var e=t.length;2<e&&t[e-1].equals(t[0])&&t.pop()}function Il(t,e){for(var i=0;i<e.length;i++)t.push(e[i].x),t.push(e[i].y)}function Jr(t,e){X.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new zr(t,e)),this.mergeVertices()}function zr(t,e){function i(c){function p(Ce,He,fi){return He||console.error("THREE.ExtrudeGeometry: vec does not exist"),He.clone().multiplyScalar(fi).add(Ce)}function f(Ce,He,fi){var ui=Ce.x-He.x,Bt=Ce.y-He.y,Ge=fi.x-Ce.x,Ie=fi.y-Ce.y,je=ui*ui+Bt*Bt;if(Math.abs(ui*Ie-Bt*Ge)>Number.EPSILON){var en=Math.sqrt(je),pn=Math.sqrt(Ge*Ge+Ie*Ie);if(je=He.x-Bt/en,He=He.y+ui/en,Ie=((fi.x-Ie/pn-je)*Ie-(fi.y+Ge/pn-He)*Ge)/(ui*Ie-Bt*Ge),Ge=je+ui*Ie-Ce.x,ui=He+Bt*Ie-Ce.y,Bt=Ge*Ge+ui*ui,2>=Bt)return new M(Ge,ui);Bt=Math.sqrt(Bt/2)}else Ce=!1,ui>Number.EPSILON?Ge>Number.EPSILON&&(Ce=!0):ui<-Number.EPSILON?Ge<-Number.EPSILON&&(Ce=!0):Math.sign(Bt)===Math.sign(Ie)&&(Ce=!0),Ce?(Ge=-Bt,Bt=Math.sqrt(je)):(Ge=ui,ui=Bt,Bt=Math.sqrt(je/2));return new M(Ge/Bt,ui/Bt)}function d(Ce,He){for(ce=Ce.length;0<=--ce;){var fi=ce,ui=ce-1;0>ui&&(ui=Ce.length-1);var Bt,Ge=W+2*D;for(Bt=0;Bt<Ge;Bt++){var Ie=Ei*Bt,je=Ei*(Bt+1),en=He+ui+Ie,pn=He+ui+je;je=He+fi+je,P(He+fi+Ie),P(en),P(je),P(en),P(pn),P(je),Ie=o.length/3,Ie=Dt.generateSideWallUV(n,o,Ie-6,Ie-3,Ie-2,Ie-1),R(Ie[0]),R(Ie[1]),R(Ie[3]),R(Ie[1]),R(Ie[2]),R(Ie[3])}}}function v(Ce,He,fi){I.push(Ce),I.push(He),I.push(fi)}function x(Ce,He,fi){P(Ce),P(He),P(fi),Ce=o.length/3,Ce=Dt.generateTopUV(n,o,Ce-3,Ce-2,Ce-1),R(Ce[0]),R(Ce[1]),R(Ce[2])}function P(Ce){o.push(I[3*Ce]),o.push(I[3*Ce+1]),o.push(I[3*Ce+2])}function R(Ce){s.push(Ce.x),s.push(Ce.y)}var I=[],$=e.curveSegments!==void 0?e.curveSegments:12,W=e.steps!==void 0?e.steps:1,ot=e.depth!==void 0?e.depth:100,Q=e.bevelEnabled!==void 0?e.bevelEnabled:!0,wt=e.bevelThickness!==void 0?e.bevelThickness:6,C=e.bevelSize!==void 0?e.bevelSize:wt-2,D=e.bevelSegments!==void 0?e.bevelSegments:3,ct=e.extrudePath,Dt=e.UVGenerator!==void 0?e.UVGenerator:ma;e.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),ot=e.amount);var Rt=!1;if(ct){var St=ct.getSpacedPoints(W);Rt=!0,Q=!1;var oe=ct.computeFrenetFrames(W,!1),$t=new S,me=new S,ue=new S}Q||(C=wt=D=0);var Vt;$=c.extractPoints($),c=$.shape;var Ee=$.holes;if(!Vr.isClockWise(c)){c=c.reverse();var Be=0;for(Vt=Ee.length;Be<Vt;Be++){var Ze=Ee[Be];Vr.isClockWise(Ze)&&(Ee[Be]=Ze.reverse())}}var un=Vr.triangulateShape(c,Ee),tn=c;for(Be=0,Vt=Ee.length;Be<Vt;Be++)Ze=Ee[Be],c=c.concat(Ze);var Ri,Ei=c.length,Vi,cn=un.length;$=[];var ce=0,Ue=tn.length,vt=Ue-1;for(Ri=ce+1;ce<Ue;ce++,vt++,Ri++)vt===Ue&&(vt=0),Ri===Ue&&(Ri=0),$[ce]=f(tn[ce],tn[vt],tn[Ri]);ct=[];var be=$.concat();for(Be=0,Vt=Ee.length;Be<Vt;Be++){Ze=Ee[Be];var Fe=[];for(ce=0,Ue=Ze.length,vt=Ue-1,Ri=ce+1;ce<Ue;ce++,vt++,Ri++)vt===Ue&&(vt=0),Ri===Ue&&(Ri=0),Fe[ce]=f(Ze[ce],Ze[vt],Ze[Ri]);ct.push(Fe),be=be.concat(Fe)}for(vt=0;vt<D;vt++){Ue=vt/D;var Ai=wt*Math.cos(Ue*Math.PI/2);for(Ri=C*Math.sin(Ue*Math.PI/2),ce=0,Ue=tn.length;ce<Ue;ce++){var pe=p(tn[ce],$[ce],Ri);v(pe.x,pe.y,-Ai)}for(Be=0,Vt=Ee.length;Be<Vt;Be++)for(Ze=Ee[Be],Fe=ct[Be],ce=0,Ue=Ze.length;ce<Ue;ce++)pe=p(Ze[ce],Fe[ce],Ri),v(pe.x,pe.y,-Ai)}for(Ri=C,ce=0;ce<Ei;ce++)pe=Q?p(c[ce],be[ce],Ri):c[ce],Rt?(me.copy(oe.normals[0]).multiplyScalar(pe.x),$t.copy(oe.binormals[0]).multiplyScalar(pe.y),ue.copy(St[0]).add(me).add($t),v(ue.x,ue.y,ue.z)):v(pe.x,pe.y,0);for(Ue=1;Ue<=W;Ue++)for(ce=0;ce<Ei;ce++)pe=Q?p(c[ce],be[ce],Ri):c[ce],Rt?(me.copy(oe.normals[Ue]).multiplyScalar(pe.x),$t.copy(oe.binormals[Ue]).multiplyScalar(pe.y),ue.copy(St[Ue]).add(me).add($t),v(ue.x,ue.y,ue.z)):v(pe.x,pe.y,ot/W*Ue);for(vt=D-1;0<=vt;vt--){for(Ue=vt/D,Ai=wt*Math.cos(Ue*Math.PI/2),Ri=C*Math.sin(Ue*Math.PI/2),ce=0,Ue=tn.length;ce<Ue;ce++)pe=p(tn[ce],$[ce],Ri),v(pe.x,pe.y,ot+Ai);for(Be=0,Vt=Ee.length;Be<Vt;Be++)for(Ze=Ee[Be],Fe=ct[Be],ce=0,Ue=Ze.length;ce<Ue;ce++)pe=p(Ze[ce],Fe[ce],Ri),Rt?v(pe.x,pe.y+St[W-1].y,St[W-1].x+Ai):v(pe.x,pe.y,ot+Ai)}(function(){var Ce=o.length/3;if(Q){var He=0*Ei;for(ce=0;ce<cn;ce++)Vi=un[ce],x(Vi[2]+He,Vi[1]+He,Vi[0]+He);for(He=Ei*(W+2*D),ce=0;ce<cn;ce++)Vi=un[ce],x(Vi[0]+He,Vi[1]+He,Vi[2]+He)}else{for(ce=0;ce<cn;ce++)Vi=un[ce],x(Vi[2],Vi[1],Vi[0]);for(ce=0;ce<cn;ce++)Vi=un[ce],x(Vi[0]+Ei*W,Vi[1]+Ei*W,Vi[2]+Ei*W)}n.addGroup(Ce,o.length/3-Ce,0)})(),function(){var Ce=o.length/3,He=0;for(d(tn,He),He+=tn.length,Be=0,Vt=Ee.length;Be<Vt;Be++)Ze=Ee[Be],d(Ze,He),He+=Ze.length;n.addGroup(Ce,o.length/3-Ce,1)}()}Ut.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];for(var n=this,o=[],s=[],l=0,h=t.length;l<h;l++)i(t[l]);this.addAttribute("position",new Et(o,3)),this.addAttribute("uv",new Et(s,2)),this.computeVertexNormals()}function Dl(t,e,i){if(i.shapes=[],Array.isArray(t))for(var n=0,o=t.length;n<o;n++)i.shapes.push(t[n].uuid);else i.shapes.push(t.uuid);return e.extrudePath!==void 0&&(i.options.extrudePath=e.extrudePath.toJSON()),i}function $s(t,e){X.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new zo(t,e)),this.mergeVertices()}function zo(t,e){e=e||{};var i=e.font;if(!i||!i.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new X;t=i.generateShapes(t,e.size),e.depth=e.height!==void 0?e.height:50,e.bevelThickness===void 0&&(e.bevelThickness=10),e.bevelSize===void 0&&(e.bevelSize=8),e.bevelEnabled===void 0&&(e.bevelEnabled=!1),zr.call(this,t,e),this.type="TextBufferGeometry"}function po(t,e,i,n,o,s,l){X.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:o,thetaStart:s,thetaLength:l},this.fromBufferGeometry(new lr(t,e,i,n,o,s,l)),this.mergeVertices()}function lr(t,e,i,n,o,s,l){Ut.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:o,thetaStart:s,thetaLength:l},t=t||1,e=Math.max(3,Math.floor(e)||8),i=Math.max(2,Math.floor(i)||6),n=n!==void 0?n:0,o=o!==void 0?o:2*Math.PI,s=s!==void 0?s:0,l=l!==void 0?l:Math.PI;var h=s+l,c,p,f=0,d=[],v=new S,x=new S,P=[],R=[],I=[],$=[];for(p=0;p<=i;p++){var W=[],ot=p/i;for(c=0;c<=e;c++){var Q=c/e;v.x=-t*Math.cos(n+Q*o)*Math.sin(s+ot*l),v.y=t*Math.cos(s+ot*l),v.z=t*Math.sin(n+Q*o)*Math.sin(s+ot*l),R.push(v.x,v.y,v.z),x.set(v.x,v.y,v.z).normalize(),I.push(x.x,x.y,x.z),$.push(Q,1-ot),W.push(f++)}d.push(W)}for(p=0;p<i;p++)for(c=0;c<e;c++)t=d[p][c+1],n=d[p][c],o=d[p+1][c],l=d[p+1][c+1],(p!==0||0<s)&&P.push(t,n,l),(p!==i-1||h<Math.PI)&&P.push(n,o,l);this.setIndex(P),this.addAttribute("position",new Et(R,3)),this.addAttribute("normal",new Et(I,3)),this.addAttribute("uv",new Et($,2))}function Qs(t,e,i,n,o,s){X.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new No(t,e,i,n,o,s)),this.mergeVertices()}function No(t,e,i,n,o,s){Ut.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:o,thetaLength:s},t=t||.5,e=e||1,o=o!==void 0?o:0,s=s!==void 0?s:2*Math.PI,i=i!==void 0?Math.max(3,i):8,n=n!==void 0?Math.max(1,n):1;var l=[],h=[],c=[],p=[],f=t,d=(e-t)/n,v=new S,x=new M,P,R;for(P=0;P<=n;P++){for(R=0;R<=i;R++)t=o+R/i*s,v.x=f*Math.cos(t),v.y=f*Math.sin(t),h.push(v.x,v.y,v.z),c.push(0,0,1),x.x=(v.x/e+1)/2,x.y=(v.y/e+1)/2,p.push(x.x,x.y);f+=d}for(P=0;P<n;P++)for(e=P*(i+1),R=0;R<i;R++)t=R+e,o=t+i+1,s=t+i+2,f=t+1,l.push(t,o,f),l.push(o,s,f);this.setIndex(l),this.addAttribute("position",new Et(h,3)),this.addAttribute("normal",new Et(c,3)),this.addAttribute("uv",new Et(p,2))}function ws(t,e,i,n){X.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},this.fromBufferGeometry(new fo(t,e,i,n)),this.mergeVertices()}function fo(t,e,i,n){Ut.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},e=Math.floor(e)||12,i=i||0,n=n||2*Math.PI,n=$e.clamp(n,0,2*Math.PI);var o=[],s=[],l=[],h=1/e,c=new S,p=new M,f;for(f=0;f<=e;f++){var d=i+f*h*n,v=Math.sin(d),x=Math.cos(d);for(d=0;d<=t.length-1;d++)c.x=t[d].x*v,c.y=t[d].y,c.z=t[d].x*x,s.push(c.x,c.y,c.z),p.x=f/e,p.y=d/(t.length-1),l.push(p.x,p.y)}for(f=0;f<e;f++)for(d=0;d<t.length-1;d++)i=d+f*t.length,h=i+t.length,c=i+t.length+1,p=i+1,o.push(i,h,p),o.push(h,c,p);if(this.setIndex(o),this.addAttribute("position",new Et(s,3)),this.addAttribute("uv",new Et(l,2)),this.computeVertexNormals(),n===2*Math.PI)for(n=this.attributes.normal.array,o=new S,s=new S,l=new S,i=e*t.length*3,d=f=0;f<t.length;f++,d+=3)o.x=n[d+0],o.y=n[d+1],o.z=n[d+2],s.x=n[i+d+0],s.y=n[i+d+1],s.z=n[i+d+2],l.addVectors(o,s).normalize(),n[d+0]=n[i+d+0]=l.x,n[d+1]=n[i+d+1]=l.y,n[d+2]=n[i+d+2]=l.z}function $r(t,e){X.call(this),this.type="ShapeGeometry",typeof e=="object"&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){function i(f){var d,v=o.length/3;f=f.extractPoints(e);var x=f.shape,P=f.holes;if(Vr.isClockWise(x)===!1)for(x=x.reverse(),f=0,d=P.length;f<d;f++){var R=P[f];Vr.isClockWise(R)===!0&&(P[f]=R.reverse())}var I=Vr.triangulateShape(x,P);for(f=0,d=P.length;f<d;f++)R=P[f],x=x.concat(R);for(f=0,d=x.length;f<d;f++)R=x[f],o.push(R.x,R.y,0),s.push(0,0,1),l.push(R.x,R.y);for(f=0,d=I.length;f<d;f++)x=I[f],n.push(x[0]+v,x[1]+v,x[2]+v),c+=3}Ut.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],o=[],s=[],l=[],h=0,c=0;if(Array.isArray(t)===!1)i(t);else for(var p=0;p<t.length;p++)i(t[p]),this.addGroup(h,c,p),h+=c,c=0;this.setIndex(n),this.addAttribute("position",new Et(o,3)),this.addAttribute("normal",new Et(s,3)),this.addAttribute("uv",new Et(l,2))}function zl(t,e){if(e.shapes=[],Array.isArray(t))for(var i=0,n=t.length;i<n;i++)e.shapes.push(t[i].uuid);else e.shapes.push(t.uuid);return e}function go(t,e){Ut.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e};var i=[];e=Math.cos($e.DEG2RAD*(e!==void 0?e:1));var n=[0,0],o={},s=["a","b","c"];if(t.isBufferGeometry){var l=new X;l.fromBufferGeometry(t)}else l=t.clone();l.mergeVertices(),l.computeFaceNormals(),t=l.vertices,l=l.faces;for(var h=0,c=l.length;h<c;h++)for(var p=l[h],f=0;3>f;f++){var d=p[s[f]],v=p[s[(f+1)%3]];n[0]=Math.min(d,v),n[1]=Math.max(d,v),d=n[0]+","+n[1],o[d]===void 0?o[d]={index1:n[0],index2:n[1],face1:h,face2:void 0}:o[d].face2=h}for(d in o)n=o[d],(n.face2===void 0||l[n.face1].normal.dot(l[n.face2].normal)<=e)&&(s=t[n.index1],i.push(s.x,s.y,s.z),s=t[n.index2],i.push(s.x,s.y,s.z));this.addAttribute("position",new Et(i,3))}function Qr(t,e,i,n,o,s,l,h){X.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:o,openEnded:s,thetaStart:l,thetaLength:h},this.fromBufferGeometry(new Kr(t,e,i,n,o,s,l,h)),this.mergeVertices()}function Kr(t,e,i,n,o,s,l,h){function c(W){var ot,Q=new M,wt=new S,C=0,D=W===!0?t:e,ct=W===!0?1:-1,Dt=P;for(ot=1;ot<=n;ot++)d.push(0,I*ct,0),v.push(0,ct,0),x.push(.5,.5),P++;var Rt=P;for(ot=0;ot<=n;ot++){var St=ot/n*h+l,oe=Math.cos(St);St=Math.sin(St),wt.x=D*St,wt.y=I*ct,wt.z=D*oe,d.push(wt.x,wt.y,wt.z),v.push(0,ct,0),Q.x=.5*oe+.5,Q.y=.5*St*ct+.5,x.push(Q.x,Q.y),P++}for(ot=0;ot<n;ot++)Q=Dt+ot,wt=Rt+ot,W===!0?f.push(wt,wt+1,Q):f.push(wt+1,wt,Q),C+=3;p.addGroup($,C,W===!0?1:2),$+=C}Ut.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:o,openEnded:s,thetaStart:l,thetaLength:h};var p=this;t=t!==void 0?t:1,e=e!==void 0?e:1,i=i||1,n=Math.floor(n)||8,o=Math.floor(o)||1,s=s!==void 0?s:!1,l=l!==void 0?l:0,h=h!==void 0?h:2*Math.PI;var f=[],d=[],v=[],x=[],P=0,R=[],I=i/2,$=0;(function(){var W,ot,Q=new S,wt=new S,C=0,D=(e-t)/i;for(ot=0;ot<=o;ot++){var ct=[],Dt=ot/o,Rt=Dt*(e-t)+t;for(W=0;W<=n;W++){var St=W/n,oe=St*h+l,$t=Math.sin(oe);oe=Math.cos(oe),wt.x=Rt*$t,wt.y=-Dt*i+I,wt.z=Rt*oe,d.push(wt.x,wt.y,wt.z),Q.set($t,D,oe).normalize(),v.push(Q.x,Q.y,Q.z),x.push(St,1-Dt),ct.push(P++)}R.push(ct)}for(W=0;W<n;W++)for(ot=0;ot<o;ot++)Q=R[ot+1][W],wt=R[ot+1][W+1],D=R[ot][W+1],f.push(R[ot][W],Q,D),f.push(Q,wt,D),C+=6;p.addGroup($,C,0),$+=C})(),s===!1&&(0<t&&c(!0),0<e&&c(!1)),this.setIndex(f),this.addAttribute("position",new Et(d,3)),this.addAttribute("normal",new Et(v,3)),this.addAttribute("uv",new Et(x,2))}function Ms(t,e,i,n,o,s,l){Qr.call(this,0,t,e,i,n,o,s,l),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:o,thetaStart:s,thetaLength:l}}function Sn(t,e,i,n,o,s,l){Kr.call(this,0,t,e,i,n,o,s,l),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:o,thetaStart:s,thetaLength:l}}function Bo(t,e,i,n){X.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new Nr(t,e,i,n)),this.mergeVertices()}function Nr(t,e,i,n){Ut.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},t=t||1,e=e!==void 0?Math.max(3,e):8,i=i!==void 0?i:0,n=n!==void 0?n:2*Math.PI;var o=[],s=[],l=[],h=[],c,p=new S,f=new M;s.push(0,0,0),l.push(0,0,1),h.push(.5,.5);var d=0;for(c=3;d<=e;d++,c+=3){var v=i+d/e*n;p.x=t*Math.cos(v),p.y=t*Math.sin(v),s.push(p.x,p.y,p.z),l.push(0,0,1),f.x=(s[c]/t+1)/2,f.y=(s[c+1]/t+1)/2,h.push(f.x,f.y)}for(c=1;c<=e;c++)o.push(c,c+1,0);this.setIndex(o),this.addAttribute("position",new Et(s,3)),this.addAttribute("normal",new Et(l,3)),this.addAttribute("uv",new Et(h,2))}function vo(t){Oe.call(this),this.type="ShadowMaterial",this.color=new Z(0),this.transparent=!0,this.setValues(t)}function Uo(t){Pi.call(this,t),this.type="RawShaderMaterial"}function Br(t){Oe.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Z(16777215),this.metalness=this.roughness=.5,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Z(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new M(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function Fo(t){Br.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoatRoughness=this.clearCoat=0,this.setValues(t)}function wr(t){Oe.call(this),this.type="MeshPhongMaterial",this.color=new Z(16777215),this.specular=new Z(1118481),this.shininess=30,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Z(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new M(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function Go(t){wr.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ho(t){Oe.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new M(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.morphNormals=this.morphTargets=this.skinning=this.lights=this.fog=!1,this.setValues(t)}function hr(t){Oe.call(this),this.type="MeshLambertMaterial",this.color=new Z(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Z(0),this.emissiveIntensity=1,this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function ko(t){if(Oe.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Z(16777215),this.bumpMap=this.map=this.matcap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new M(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.lights=this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t),this.matcap===null){t=document.createElement("canvas"),t.width=1,t.height=1;var e=t.getContext("2d");e.fillStyle="#fff",e.fillRect(0,0,1,1),this.matcap=new THREE.CanvasTexture(t)}}function Vo(t){_i.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}function Dn(t,e,i,n){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=n!==void 0?n:new e.constructor(i),this.sampleValues=e,this.valueSize=i}function Ks(t,e,i,n){Dn.call(this,t,e,i,n),this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function ur(t,e,i,n){Dn.call(this,t,e,i,n)}function Wo(t,e,i,n){Dn.call(this,t,e,i,n)}function En(t,e,i,n){if(t===void 0)throw Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Rn.convertArray(e,this.TimeBufferType),this.values=Rn.convertArray(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}function Oa(t,e,i){En.call(this,t,e,i)}function Ia(t,e,i,n){En.call(this,t,e,i,n)}function Mr(t,e,i,n){En.call(this,t,e,i,n)}function kn(t,e,i,n){Dn.call(this,t,e,i,n)}function Ts(t,e,i,n){En.call(this,t,e,i,n)}function Da(t,e,i,n){En.call(this,t,e,i,n)}function Ss(t,e,i,n){En.call(this,t,e,i,n)}function tr(t,e,i){this.name=t,this.tracks=i,this.duration=e!==void 0?e:-1,this.uuid=$e.generateUUID(),0>this.duration&&this.resetDuration()}function ah(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Mr;case"vector":case"vector2":case"vector3":case"vector4":return Ss;case"color":return Ia;case"quaternion":return Ts;case"bool":case"boolean":return Oa;case"string":return Da}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function lh(t){if(t.type===void 0)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=ah(t.type);if(t.times===void 0){var i=[],n=[];Rn.flattenJSON(t.keys,i,n,"value"),t.times=i,t.values=n}return e.parse!==void 0?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}function yo(t,e,i){var n=this,o=!1,s=0,l=0,h=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(c){l++,o===!1&&n.onStart!==void 0&&n.onStart(c,s,l),o=!0},this.itemEnd=function(c){s++,n.onProgress!==void 0&&n.onProgress(c,s,l),s===l&&(o=!1,n.onLoad!==void 0)&&n.onLoad()},this.itemError=function(c){n.onError!==void 0&&n.onError(c)},this.resolveURL=function(c){return h?h(c):c},this.setURLModifier=function(c){return h=c,this}}function at(t){this.manager=t!==void 0?t:Bn}function Ot(t){this.manager=t!==void 0?t:Bn}function At(t){this.manager=t!==void 0?t:Bn,this._parser=null}function xe(t){this.manager=t!==void 0?t:Bn,this._parser=null}function We(t){this.manager=t!==void 0?t:Bn}function xi(t){this.manager=t!==void 0?t:Bn}function Yi(t){this.manager=t!==void 0?t:Bn}function he(){this.type="Curve",this.arcLengthDivisions=200}function zn(t,e,i,n,o,s,l,h){he.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=i||1,this.yRadius=n||1,this.aStartAngle=o||0,this.aEndAngle=s||2*Math.PI,this.aClockwise=l||!1,this.aRotation=h||0}function Es(t,e,i,n,o,s){zn.call(this,t,e,i,i,n,o,s),this.type="ArcCurve"}function Vn(){var t=0,e=0,i=0,n=0;return{initCatmullRom:function(o,s,l,h,c){o=c*(l-o),h=c*(h-s),t=s,e=o,i=-3*s+3*l-2*o-h,n=2*s-2*l+o+h},initNonuniformCatmullRom:function(o,s,l,h,c,p,f){o=((s-o)/c-(l-o)/(c+p)+(l-s)/p)*p,h=((l-s)/p-(h-s)/(p+f)+(h-l)/f)*p,t=s,e=o,i=-3*s+3*l-2*o-h,n=2*s-2*l+o+h},calc:function(o){var s=o*o;return t+e*o+i*s+n*s*o}}}function mn(t,e,i,n){he.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=i||"centripetal",this.tension=n||.5}function Nl(t,e,i,n,o){e=.5*(n-e),o=.5*(o-i);var s=t*t;return(2*i-2*n+e+o)*t*s+(-3*i+3*n-2*e-o)*s+e*t+i}function Ur(t,e,i,n){var o=1-t;return o*o*e+2*(1-t)*t*i+t*t*n}function _o(t,e,i,n,o){var s=1-t,l=1-t;return s*s*s*e+3*l*l*t*i+3*(1-t)*t*t*n+t*t*t*o}function Wn(t,e,i,n){he.call(this),this.type="CubicBezierCurve",this.v0=t||new M,this.v1=e||new M,this.v2=i||new M,this.v3=n||new M}function ai(t,e,i,n){he.call(this),this.type="CubicBezierCurve3",this.v0=t||new S,this.v1=e||new S,this.v2=i||new S,this.v3=n||new S}function jn(t,e){he.call(this),this.type="LineCurve",this.v1=t||new M,this.v2=e||new M}function cr(t,e){he.call(this),this.type="LineCurve3",this.v1=t||new S,this.v2=e||new S}function Xn(t,e,i){he.call(this),this.type="QuadraticBezierCurve",this.v0=t||new M,this.v1=e||new M,this.v2=i||new M}function Fr(t,e,i){he.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new S,this.v1=e||new S,this.v2=i||new S}function Tr(t){he.call(this),this.type="SplineCurve",this.points=t||[]}function to(){he.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function qn(t){to.call(this),this.type="Path",this.currentPoint=new M,t&&this.setFromPoints(t)}function Nn(t){qn.call(this,t),this.uuid=$e.generateUUID(),this.type="Shape",this.holes=[]}function Ui(t,e){z.call(this),this.type="Light",this.color=new Z(t),this.intensity=e!==void 0?e:1,this.receiveShadow=void 0}function ta(t,e,i){Ui.call(this,t,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(z.DefaultUp),this.updateMatrix(),this.groundColor=new Z(e)}function Gr(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new M(512,512),this.map=null,this.matrix=new _t}function ea(){Gr.call(this,new ee(50,1,.5,500))}function ia(t,e,i,n,o,s){Ui.call(this,t,e),this.type="SpotLight",this.position.copy(z.DefaultUp),this.updateMatrix(),this.target=new z,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(l){this.intensity=l/Math.PI}}),this.distance=i!==void 0?i:0,this.angle=n!==void 0?n:Math.PI/3,this.penumbra=o!==void 0?o:0,this.decay=s!==void 0?s:1,this.shadow=new ea}function jo(t,e,i,n){Ui.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(o){this.intensity=o/(4*Math.PI)}}),this.distance=i!==void 0?i:0,this.decay=n!==void 0?n:1,this.shadow=new Gr(new ee(90,1,.5,500))}function As(t,e,i,n,o,s){ye.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t!==void 0?t:-1,this.right=e!==void 0?e:1,this.top=i!==void 0?i:1,this.bottom=n!==void 0?n:-1,this.near=o!==void 0?o:.1,this.far=s!==void 0?s:2e3,this.updateProjectionMatrix()}function xo(){Gr.call(this,new As(-5,5,5,-5,.5,500))}function Hr(t,e){Ui.call(this,t,e),this.type="DirectionalLight",this.position.copy(z.DefaultUp),this.updateMatrix(),this.target=new z,this.shadow=new xo}function Xo(t,e){Ui.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function za(t,e,i,n){Ui.call(this,t,e),this.type="RectAreaLight",this.width=i!==void 0?i:10,this.height=n!==void 0?n:10}function Na(t){this.manager=t!==void 0?t:Bn,this.textures={}}function ol(t){this.manager=t!==void 0?t:Bn}function eo(){}function qo(t){typeof t=="boolean"&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=t!==void 0?t:Bn,this.withCredentials=!1}function na(t){this.manager=t!==void 0?t:Bn,this.resourcePath=""}function sl(t){typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=t!==void 0?t:Bn,this.options=void 0}function Ba(){this.type="ShapePath",this.color=new Z,this.subPaths=[],this.currentPath=null}function al(t){this.type="Font",this.data=t}function Bl(t){this.manager=t!==void 0?t:Bn}function Qi(t){this.manager=t!==void 0?t:Bn}function An(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new ee,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new ee,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function ra(t,e,i,n){z.call(this),this.type="CubeCamera";var o=new ee(90,1,t,e);o.up.set(0,-1,0),o.lookAt(new S(1,0,0)),this.add(o);var s=new ee(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new S(-1,0,0)),this.add(s);var l=new ee(90,1,t,e);l.up.set(0,0,1),l.lookAt(new S(0,1,0)),this.add(l);var h=new ee(90,1,t,e);h.up.set(0,0,-1),h.lookAt(new S(0,-1,0)),this.add(h);var c=new ee(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new S(0,0,1)),this.add(c);var p=new ee(90,1,t,e);p.up.set(0,-1,0),p.lookAt(new S(0,0,-1)),this.add(p),n=n||{format:1022,magFilter:1006,minFilter:1006},this.renderTarget=new bt(i,i,n),this.renderTarget.texture.name="CubeCamera",this.update=function(f,d){this.parent===null&&this.updateMatrixWorld();var v=this.renderTarget,x=v.texture.generateMipmaps;v.texture.generateMipmaps=!1,v.activeCubeFace=0,f.render(d,o,v),v.activeCubeFace=1,f.render(d,s,v),v.activeCubeFace=2,f.render(d,l,v),v.activeCubeFace=3,f.render(d,h,v),v.activeCubeFace=4,f.render(d,c,v),v.texture.generateMipmaps=x,v.activeCubeFace=5,f.render(d,p,v),f.setRenderTarget(null)},this.clear=function(f,d,v,x){for(var P=this.renderTarget,R=0;6>R;R++)P.activeCubeFace=R,f.setRenderTarget(P),f.clear(d,v,x);f.setRenderTarget(null)}}function ll(t){this.autoStart=t!==void 0?t:!0,this.elapsedTime=this.oldTime=this.startTime=0,this.running=!1}function Ua(){z.call(this),this.type="AudioListener",this.context=yl.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0}function Ps(t){z.call(this),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.offset=this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function oa(t){Ps.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function Yo(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=e!==void 0?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function sa(t,e,i){switch(this.binding=t,this.valueSize=i,t=Float64Array,e){case"quaternion":e=this._slerp;break;case"string":case"bool":t=Array,e=this._select;break;default:e=this._lerp}this.buffer=new t(4*i),this._mixBufferRegion=e,this.referenceCount=this.useCount=this.cumulativeWeight=0}function Zo(t,e,i){i=i||ln.parseTrackName(e),this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function ln(t,e,i){this.path=e,this.parsedPath=i||ln.parseTrackName(e),this.node=ln.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Ls(){this.uuid=$e.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,i=arguments.length;e!==i;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}function aa(t,e,i){this._mixer=t,this._clip=e,this._localRoot=i||null,t=e.tracks,e=t.length,i=Array(e);for(var n={endingStart:2400,endingEnd:2400},o=0;o!==e;++o){var s=t[o].createInterpolant(null);i[o]=s,s.settings=n}this._interpolantSettings=n,this._interpolants=i,this._propertyBindings=Array(e),this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function wo(t){this._root=t,this._initMemoryManager(),this.time=this._accuIndex=0,this.timeScale=1}function Fa(t,e){typeof t=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=e),this.value=t}function hl(){Ut.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function ul(t,e,i){vi.call(this,t,e),this.meshPerAttribute=i||1}function cl(t,e,i,n){typeof i=="number"&&(n=i,i=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),et.call(this,t,e,i),this.meshPerAttribute=n||1}function Ul(t,e,i,n){this.ray=new In(t,e),this.near=i||0,this.far=n||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function la(t,e){return t.distance-e.distance}function Jo(t,e,i,n){if(t.visible!==!1&&(t.raycast(e,i),n===!0)){t=t.children,n=0;for(var o=t.length;n<o;n++)Jo(t[n],e,i,!0)}}function pl(t,e,i){return this.radius=t!==void 0?t:1,this.phi=e!==void 0?e:0,this.theta=i!==void 0?i:0,this}function O(t,e,i){return this.radius=t!==void 0?t:1,this.theta=e!==void 0?e:0,this.y=i!==void 0?i:0,this}function Mo(t,e){this.min=t!==void 0?t:new M(1/0,1/0),this.max=e!==void 0?e:new M(-1/0,-1/0)}function Cs(t,e){this.start=t!==void 0?t:new S,this.end=e!==void 0?e:new S}function Cn(t){z.call(this),this.material=t,this.render=function(){}}function ri(t,e,i,n){this.object=t,this.size=e!==void 0?e:1,t=i!==void 0?i:16711680,n=n!==void 0?n:1,e=0,(i=this.object.geometry)&&i.isGeometry?e=3*i.faces.length:i&&i.isBufferGeometry&&(e=i.attributes.normal.count),i=new Ut,e=new Et(6*e,3),i.addAttribute("position",e),ei.call(this,i,new _i({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Rs(t,e){z.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new Ut,e=[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(var i=0,n=1;32>i;i++,n++){var o=i/32*Math.PI*2,s=n/32*Math.PI*2;e.push(Math.cos(o),Math.sin(o),1,Math.cos(s),Math.sin(s),1)}t.addAttribute("position",new Et(e,3)),e=new _i({fog:!1}),this.cone=new ei(t,e),this.add(this.cone),this.update()}function Fl(t){var e=[];t&&t.isBone&&e.push(t);for(var i=0;i<t.children.length;i++)e.push.apply(e,Fl(t.children[i]));return e}function bs(t){for(var e=Fl(t),i=new Ut,n=[],o=[],s=new Z(0,0,1),l=new Z(0,1,0),h=0;h<e.length;h++){var c=e[h];c.parent&&c.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),o.push(s.r,s.g,s.b),o.push(l.r,l.g,l.b))}i.addAttribute("position",new Et(n,3)),i.addAttribute("color",new Et(o,3)),n=new _i({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0}),ei.call(this,i,n),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function pr(t,e,i){this.light=t,this.light.updateMatrixWorld(),this.color=i,t=new lr(e,4,2),e=new ci({wireframe:!0,fog:!1}),Fi.call(this,t,e),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Os(t,e){z.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new _i({fog:!1}),e=new Ut,e.addAttribute("position",new et(new Float32Array(15),3)),this.line=new Li(e,t),this.add(this.line),this.update()}function Is(t,e,i){z.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,t=new bo(e),t.rotateY(.5*Math.PI),this.material=new ci({wireframe:!0,fog:!1}),this.color===void 0&&(this.material.vertexColors=2),e=t.getAttribute("position"),e=new Float32Array(3*e.count),t.addAttribute("color",new et(e,3)),this.add(new Fi(t,this.material)),this.update()}function ha(t,e,i,n){t=t||10,e=e||10,i=new Z(i!==void 0?i:4473924),n=new Z(n!==void 0?n:8947848);var o=e/2,s=t/e,l=t/2;t=[];for(var h=[],c=0,p=0,f=-l;c<=e;c++,f+=s){t.push(-l,0,f,l,0,f),t.push(f,0,-l,f,0,l);var d=c===o?i:n;d.toArray(h,p),p+=3,d.toArray(h,p),p+=3,d.toArray(h,p),p+=3,d.toArray(h,p),p+=3}e=new Ut,e.addAttribute("position",new Et(t,3)),e.addAttribute("color",new Et(h,3)),i=new _i({vertexColors:2}),ei.call(this,e,i)}function Ga(t,e,i,n,o,s){t=t||10,e=e||16,i=i||8,n=n||64,o=new Z(o!==void 0?o:4473924),s=new Z(s!==void 0?s:8947848);var l=[],h=[],c;for(c=0;c<=e;c++){var p=c/e*2*Math.PI,f=Math.sin(p)*t;p=Math.cos(p)*t,l.push(0,0,0),l.push(f,0,p);var d=c&1?o:s;h.push(d.r,d.g,d.b),h.push(d.r,d.g,d.b)}for(c=0;c<=i;c++){d=c&1?o:s;var v=t-t/i*c;for(e=0;e<n;e++)p=e/n*2*Math.PI,f=Math.sin(p)*v,p=Math.cos(p)*v,l.push(f,0,p),h.push(d.r,d.g,d.b),p=(e+1)/n*2*Math.PI,f=Math.sin(p)*v,p=Math.cos(p)*v,l.push(f,0,p),h.push(d.r,d.g,d.b)}t=new Ut,t.addAttribute("position",new Et(l,3)),t.addAttribute("color",new Et(h,3)),l=new _i({vertexColors:2}),ei.call(this,t,l)}function ua(t,e,i,n){this.object=t,this.size=e!==void 0?e:1,t=i!==void 0?i:16776960,n=n!==void 0?n:1,e=0,(i=this.object.geometry)&&i.isGeometry?e=i.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead."),i=new Ut,e=new Et(6*e,3),i.addAttribute("position",e),ei.call(this,i,new _i({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Yn(t,e,i){z.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,e===void 0&&(e=1),t=new Ut,t.addAttribute("position",new Et([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3)),e=new _i({fog:!1}),this.lightPlane=new Li(t,e),this.add(this.lightPlane),t=new Ut,t.addAttribute("position",new Et([0,0,0,0,0,1],3)),this.targetLine=new Li(t,e),this.add(this.targetLine),this.update()}function ca(t){function e(x,P,R){i(x,R),i(P,R)}function i(x,P){s.push(0,0,0),l.push(P.r,P.g,P.b),h[x]===void 0&&(h[x]=[]),h[x].push(s.length/3-1)}var n=new Ut,o=new _i({color:16777215,vertexColors:1}),s=[],l=[],h={},c=new Z(16755200),p=new Z(16711680),f=new Z(43775),d=new Z(16777215),v=new Z(3355443);e("n1","n2",c),e("n2","n4",c),e("n4","n3",c),e("n3","n1",c),e("f1","f2",c),e("f2","f4",c),e("f4","f3",c),e("f3","f1",c),e("n1","f1",c),e("n2","f2",c),e("n3","f3",c),e("n4","f4",c),e("p","n1",p),e("p","n2",p),e("p","n3",p),e("p","n4",p),e("u1","u2",f),e("u2","u3",f),e("u3","u1",f),e("c","t",d),e("p","c",v),e("cn1","cn2",v),e("cn3","cn4",v),e("cf1","cf2",v),e("cf3","cf4",v),n.addAttribute("position",new Et(s,3)),n.addAttribute("color",new Et(l,3)),ei.call(this,n,o),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=h,this.update()}function io(t,e){this.object=t,e===void 0&&(e=16776960),t=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]);var i=new Float32Array(24),n=new Ut;n.setIndex(new et(t,1)),n.addAttribute("position",new et(i,3)),ei.call(this,n,new _i({color:e})),this.matrixAutoUpdate=!1,this.update()}function pa(t,e){this.type="Box3Helper",this.box=t,t=e!==void 0?e:16776960,e=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]);var i=new Ut;i.setIndex(new et(e,1)),i.addAttribute("position",new Et([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)),ei.call(this,i,new _i({color:t})),this.geometry.computeBoundingSphere()}function fa(t,e,i){this.type="PlaneHelper",this.plane=t,this.size=e===void 0?1:e,t=i!==void 0?i:16776960,e=new Ut,e.addAttribute("position",new Et([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)),e.computeBoundingSphere(),Li.call(this,e,new _i({color:t})),e=new Ut,e.addAttribute("position",new Et([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),e.computeBoundingSphere(),this.add(new Fi(e,new ci({color:t,opacity:.2,transparent:!0,depthWrite:!1})))}function no(t,e,i,n,o,s){z.call(this),t===void 0&&(t=new THREE.Vector3(0,0,1)),e===void 0&&(e=new THREE.Vector3(0,0,0)),i===void 0&&(i=1),n===void 0&&(n=16776960),o===void 0&&(o=.2*i),s===void 0&&(s=.2*o),Xa===void 0&&(Xa=new Ut,Xa.addAttribute("position",new Et([0,0,0,0,1,0],3)),va=new Kr(0,.5,1,5,1),va.translate(0,-.5,0)),this.position.copy(e),this.line=new Li(Xa,new _i({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Fi(va,new ci({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,o,s)}function er(t){t=t||1;var e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t];t=new Ut,t.addAttribute("position",new Et(e,3)),t.addAttribute("color",new Et([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),e=new _i({vertexColors:2}),ei.call(this,t,e)}function Gl(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),mn.call(this,t),this.type="catmullrom",this.closed=!0}function Hl(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),mn.call(this,t),this.type="catmullrom"}function fl(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),mn.call(this,t),this.type="catmullrom"}Number.EPSILON===void 0&&(Number.EPSILON=Math.pow(2,-52)),Number.isInteger===void 0&&(Number.isInteger=function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}),Math.sign===void 0&&(Math.sign=function(t){return 0>t?-1:0<t?1:+t}),!("name"in Function.prototype)&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),Object.assign===void 0&&function(){Object.assign=function(t){if(t==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(n!=null)for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}}(),Object.assign(ht.prototype,{addEventListener:function(t,e){this._listeners===void 0&&(this._listeners={});var i=this._listeners;i[t]===void 0&&(i[t]=[]),i[t].indexOf(e)===-1&&i[t].push(e)},hasEventListener:function(t,e){if(this._listeners===void 0)return!1;var i=this._listeners;return i[t]!==void 0&&i[t].indexOf(e)!==-1},removeEventListener:function(t,e){this._listeners!==void 0&&(t=this._listeners[t],t!==void 0&&(e=t.indexOf(e),e!==-1&&t.splice(e,1)))},dispatchEvent:function(t){if(this._listeners!==void 0){var e=this._listeners[t.type];if(e!==void 0){t.target=this,e=e.slice(0);for(var i=0,n=e.length;i<n;i++)e[i].call(this,t)}}}});var $e={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;256>e;e++)t[e]=(16>e?"0":"")+e.toString(16);return function(){var i=4294967295*Math.random()|0,n=4294967295*Math.random()|0,o=4294967295*Math.random()|0,s=4294967295*Math.random()|0;return(t[i&255]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]+"-"+t[n&255]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[o&63|128]+t[o>>8&255]+"-"+t[o>>16&255]+t[o>>24&255]+t[s&255]+t[s>>8&255]+t[s>>16&255]+t[s>>24&255]).toUpperCase()}}(),clamp:function(t,e,i){return Math.max(e,Math.min(i,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,i,n,o){return n+(t-e)*(o-n)/(i-e)},lerp:function(t,e,i){return(1-i)*t+i*e},smoothstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*(3-2*t))},smootherstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*t*(t*(6*t-15)+10))},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*$e.DEG2RAD},radToDeg:function(t){return t*$e.RAD2DEG},isPowerOfTwo:function(t){return(t&t-1)===0&&t!==0},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};Object.defineProperties(M.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(M.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.y=this.x=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return e!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return e!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,i=this.y;return t=t.elements,this.x=t[0]*e+t[3]*i+t[6],this.y=t[1]*e+t[4]*i+t[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(){var t=new M,e=new M;return function(i,n){return t.set(i,i),e.set(n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return 0>t&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x;return t=this.y-t.y,e*e+t*t},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return e===void 0&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,i){return i!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var i=Math.cos(e);e=Math.sin(e);var n=this.x-t.x,o=this.y-t.y;return this.x=n*i-o*e+t.x,this.y=n*e+o*i+t.y,this}}),Object.assign(_t.prototype,{isMatrix4:!0,set:function(t,e,i,n,o,s,l,h,c,p,f,d,v,x,P,R){var I=this.elements;return I[0]=t,I[4]=e,I[8]=i,I[12]=n,I[1]=o,I[5]=s,I[9]=l,I[13]=h,I[2]=c,I[6]=p,I[10]=f,I[14]=d,I[3]=v,I[7]=x,I[11]=P,I[15]=R,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return new _t().fromArray(this.elements)},copy:function(t){var e=this.elements;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},copyPosition:function(t){var e=this.elements;return t=t.elements,e[12]=t[12],e[13]=t[13],e[14]=t[14],this},extractBasis:function(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this},extractRotation:function(){var t=new S;return function(e){var i=this.elements,n=e.elements,o=1/t.setFromMatrixColumn(e,0).length(),s=1/t.setFromMatrixColumn(e,1).length();return e=1/t.setFromMatrixColumn(e,2).length(),i[0]=n[0]*o,i[1]=n[1]*o,i[2]=n[2]*o,i[3]=0,i[4]=n[4]*s,i[5]=n[5]*s,i[6]=n[6]*s,i[7]=0,i[8]=n[8]*e,i[9]=n[9]*e,i[10]=n[10]*e,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}}(),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,i=t.x,n=t.y,o=t.z,s=Math.cos(i);i=Math.sin(i);var l=Math.cos(n);n=Math.sin(n);var h=Math.cos(o);if(o=Math.sin(o),t.order==="XYZ"){t=s*h;var c=s*o,p=i*h,f=i*o;e[0]=l*h,e[4]=-l*o,e[8]=n,e[1]=c+p*n,e[5]=t-f*n,e[9]=-i*l,e[2]=f-t*n,e[6]=p+c*n,e[10]=s*l}else t.order==="YXZ"?(t=l*h,c=l*o,p=n*h,f=n*o,e[0]=t+f*i,e[4]=p*i-c,e[8]=s*n,e[1]=s*o,e[5]=s*h,e[9]=-i,e[2]=c*i-p,e[6]=f+t*i,e[10]=s*l):t.order==="ZXY"?(t=l*h,c=l*o,p=n*h,f=n*o,e[0]=t-f*i,e[4]=-s*o,e[8]=p+c*i,e[1]=c+p*i,e[5]=s*h,e[9]=f-t*i,e[2]=-s*n,e[6]=i,e[10]=s*l):t.order==="ZYX"?(t=s*h,c=s*o,p=i*h,f=i*o,e[0]=l*h,e[4]=p*n-c,e[8]=t*n+f,e[1]=l*o,e[5]=f*n+t,e[9]=c*n-p,e[2]=-n,e[6]=i*l,e[10]=s*l):t.order==="YZX"?(t=s*l,c=s*n,p=i*l,f=i*n,e[0]=l*h,e[4]=f-t*o,e[8]=p*o+c,e[1]=o,e[5]=s*h,e[9]=-i*h,e[2]=-n*h,e[6]=c*o+p,e[10]=t-f*o):t.order==="XZY"&&(t=s*l,c=s*n,p=i*l,f=i*n,e[0]=l*h,e[4]=-o,e[8]=n*h,e[1]=t*o+f,e[5]=s*h,e[9]=c*o-p,e[2]=p*o-c,e[6]=i*h,e[10]=f*o+t);return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(){var t=new S(0,0,0),e=new S(1,1,1);return function(i){return this.compose(t,i,e)}}(),lookAt:function(){var t=new S,e=new S,i=new S;return function(n,o,s){var l=this.elements;return i.subVectors(n,o),i.lengthSq()===0&&(i.z=1),i.normalize(),t.crossVectors(s,i),t.lengthSq()===0&&(Math.abs(s.z)===1?i.x+=1e-4:i.z+=1e-4,i.normalize(),t.crossVectors(s,i)),t.normalize(),e.crossVectors(i,t),l[0]=t.x,l[4]=e.x,l[8]=i.x,l[1]=t.y,l[5]=e.y,l[9]=i.y,l[2]=t.z,l[6]=e.z,l[10]=i.z,this}}(),multiply:function(t,e){return e!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements;e=this.elements,t=i[0];var o=i[4],s=i[8],l=i[12],h=i[1],c=i[5],p=i[9],f=i[13],d=i[2],v=i[6],x=i[10],P=i[14],R=i[3],I=i[7],$=i[11];i=i[15];var W=n[0],ot=n[4],Q=n[8],wt=n[12],C=n[1],D=n[5],ct=n[9],Dt=n[13],Rt=n[2],St=n[6],oe=n[10],$t=n[14],me=n[3],ue=n[7],Vt=n[11];return n=n[15],e[0]=t*W+o*C+s*Rt+l*me,e[4]=t*ot+o*D+s*St+l*ue,e[8]=t*Q+o*ct+s*oe+l*Vt,e[12]=t*wt+o*Dt+s*$t+l*n,e[1]=h*W+c*C+p*Rt+f*me,e[5]=h*ot+c*D+p*St+f*ue,e[9]=h*Q+c*ct+p*oe+f*Vt,e[13]=h*wt+c*Dt+p*$t+f*n,e[2]=d*W+v*C+x*Rt+P*me,e[6]=d*ot+v*D+x*St+P*ue,e[10]=d*Q+v*ct+x*oe+P*Vt,e[14]=d*wt+v*Dt+x*$t+P*n,e[3]=R*W+I*C+$*Rt+i*me,e[7]=R*ot+I*D+$*St+i*ue,e[11]=R*Q+I*ct+$*oe+i*Vt,e[15]=R*wt+I*Dt+$*$t+i*n,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToBufferAttribute:function(){var t=new S;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix4(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],i=t[4],n=t[8],o=t[12],s=t[1],l=t[5],h=t[9],c=t[13],p=t[2],f=t[6],d=t[10],v=t[14];return t[3]*(+o*h*f-n*c*f-o*l*d+i*c*d+n*l*v-i*h*v)+t[7]*(+e*h*v-e*c*d+o*s*d-n*s*v+n*c*p-o*h*p)+t[11]*(+e*c*f-e*l*v-o*s*f+i*s*v+o*l*p-i*c*p)+t[15]*(-n*l*p-e*h*f+e*l*d+n*s*f-i*s*d+i*h*p)},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var i=this.elements,n=t.elements;t=n[0];var o=n[1],s=n[2],l=n[3],h=n[4],c=n[5],p=n[6],f=n[7],d=n[8],v=n[9],x=n[10],P=n[11],R=n[12],I=n[13],$=n[14];n=n[15];var W=v*$*f-I*x*f+I*p*P-c*$*P-v*p*n+c*x*n,ot=R*x*f-d*$*f-R*p*P+h*$*P+d*p*n-h*x*n,Q=d*I*f-R*v*f+R*c*P-h*I*P-d*c*n+h*v*n,wt=R*v*p-d*I*p-R*c*x+h*I*x+d*c*$-h*v*$,C=t*W+o*ot+s*Q+l*wt;if(C===0){if(e===!0)throw Error("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/C,i[0]=W*e,i[1]=(I*x*l-v*$*l-I*s*P+o*$*P+v*s*n-o*x*n)*e,i[2]=(c*$*l-I*p*l+I*s*f-o*$*f-c*s*n+o*p*n)*e,i[3]=(v*p*l-c*x*l-v*s*f+o*x*f+c*s*P-o*p*P)*e,i[4]=ot*e,i[5]=(d*$*l-R*x*l+R*s*P-t*$*P-d*s*n+t*x*n)*e,i[6]=(R*p*l-h*$*l-R*s*f+t*$*f+h*s*n-t*p*n)*e,i[7]=(h*x*l-d*p*l+d*s*f-t*x*f-h*s*P+t*p*P)*e,i[8]=Q*e,i[9]=(R*v*l-d*I*l-R*o*P+t*I*P+d*o*n-t*v*n)*e,i[10]=(h*I*l-R*c*l+R*o*f-t*I*f-h*o*n+t*c*n)*e,i[11]=(d*c*l-h*v*l-d*o*f+t*v*f+h*o*P-t*c*P)*e,i[12]=wt*e,i[13]=(d*I*s-R*v*s+R*o*x-t*I*x-d*o*$+t*v*$)*e,i[14]=(R*c*s-h*I*s-R*o*p+t*I*p+h*o*$-t*c*$)*e,i[15]=(h*v*s-d*c*s+d*o*p-t*v*p-h*o*x+t*c*x)*e,this},scale:function(t){var e=this.elements,i=t.x,n=t.y;return t=t.z,e[0]*=i,e[4]*=n,e[8]*=t,e[1]*=i,e[5]*=n,e[9]*=t,e[2]*=i,e[6]*=n,e[10]*=t,e[3]*=i,e[7]*=n,e[11]*=t,this},getMaxScaleOnAxis:function(){var t=this.elements;return Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1]+t[2]*t[2],t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))},makeTranslation:function(t,e,i){return this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(1,0,0,0,0,e,-t,0,0,t,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,0,t,0,0,1,0,0,-t,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,-t,0,0,t,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var i=Math.cos(e);e=Math.sin(e);var n=1-i,o=t.x,s=t.y;t=t.z;var l=n*o,h=n*s;return this.set(l*o+i,l*s-e*t,l*t+e*s,0,l*s+e*t,h*s+i,h*t-e*o,0,l*t-e*s,h*t+e*o,n*t*t+i,0,0,0,0,1),this},makeScale:function(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this},makeShear:function(t,e,i){return this.set(1,e,i,0,t,1,i,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,i){var n=this.elements,o=e._x,s=e._y,l=e._z,h=e._w,c=o+o,p=s+s,f=l+l;e=o*c;var d=o*p;o*=f;var v=s*p;s*=f,l*=f,c*=h,p*=h,h*=f,f=i.x;var x=i.y;return i=i.z,n[0]=(1-(v+l))*f,n[1]=(d+h)*f,n[2]=(o-p)*f,n[3]=0,n[4]=(d-h)*x,n[5]=(1-(e+l))*x,n[6]=(s+c)*x,n[7]=0,n[8]=(o+p)*i,n[9]=(s-c)*i,n[10]=(1-(e+v))*i,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this},decompose:function(){var t=new S,e=new _t;return function(i,n,o){var s=this.elements,l=t.set(s[0],s[1],s[2]).length(),h=t.set(s[4],s[5],s[6]).length(),c=t.set(s[8],s[9],s[10]).length();0>this.determinant()&&(l=-l),i.x=s[12],i.y=s[13],i.z=s[14],e.copy(this),i=1/l,s=1/h;var p=1/c;return e.elements[0]*=i,e.elements[1]*=i,e.elements[2]*=i,e.elements[4]*=s,e.elements[5]*=s,e.elements[6]*=s,e.elements[8]*=p,e.elements[9]*=p,e.elements[10]*=p,n.setFromRotationMatrix(e),o.x=l,o.y=h,o.z=c,this}}(),makePerspective:function(t,e,i,n,o,s){s===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var l=this.elements;return l[0]=2*o/(e-t),l[4]=0,l[8]=(e+t)/(e-t),l[12]=0,l[1]=0,l[5]=2*o/(i-n),l[9]=(i+n)/(i-n),l[13]=0,l[2]=0,l[6]=0,l[10]=-(s+o)/(s-o),l[14]=-2*s*o/(s-o),l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this},makeOrthographic:function(t,e,i,n,o,s){var l=this.elements,h=1/(e-t),c=1/(i-n),p=1/(s-o);return l[0]=2*h,l[4]=0,l[8]=0,l[12]=-((e+t)*h),l[1]=0,l[5]=2*c,l[9]=0,l[13]=-((i+n)*c),l[2]=0,l[6]=0,l[10]=-2*p,l[14]=-((s+o)*p),l[3]=0,l[7]=0,l[11]=0,l[15]=1,this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;16>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;16>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}),Object.assign(mt,{slerp:function(t,e,i,n){return i.copy(t).slerp(e,n)},slerpFlat:function(t,e,i,n,o,s,l){var h=i[n+0],c=i[n+1],p=i[n+2];i=i[n+3],n=o[s+0];var f=o[s+1],d=o[s+2];if(o=o[s+3],i!==o||h!==n||c!==f||p!==d){s=1-l;var v=h*n+c*f+p*d+i*o,x=0<=v?1:-1,P=1-v*v;P>Number.EPSILON&&(P=Math.sqrt(P),v=Math.atan2(P,v*x),s=Math.sin(s*v)/P,l=Math.sin(l*v)/P),x*=l,h=h*s+n*x,c=c*s+f*x,p=p*s+d*x,i=i*s+o*x,s===1-l&&(l=1/Math.sqrt(h*h+c*c+p*p+i*i),h*=l,c*=l,p*=l,i*=l)}t[e]=h,t[e+1]=c,t[e+2]=p,t[e+3]=i}}),Object.defineProperties(mt.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(mt.prototype,{isQuaternion:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var i=t._x,n=t._y,o=t._z;t=t.order;var s=Math.cos,l=Math.sin,h=s(i/2),c=s(n/2);return s=s(o/2),i=l(i/2),n=l(n/2),o=l(o/2),t==="XYZ"?(this._x=i*c*s+h*n*o,this._y=h*n*s-i*c*o,this._z=h*c*o+i*n*s,this._w=h*c*s-i*n*o):t==="YXZ"?(this._x=i*c*s+h*n*o,this._y=h*n*s-i*c*o,this._z=h*c*o-i*n*s,this._w=h*c*s+i*n*o):t==="ZXY"?(this._x=i*c*s-h*n*o,this._y=h*n*s+i*c*o,this._z=h*c*o+i*n*s,this._w=h*c*s-i*n*o):t==="ZYX"?(this._x=i*c*s-h*n*o,this._y=h*n*s+i*c*o,this._z=h*c*o-i*n*s,this._w=h*c*s+i*n*o):t==="YZX"?(this._x=i*c*s+h*n*o,this._y=h*n*s+i*c*o,this._z=h*c*o-i*n*s,this._w=h*c*s-i*n*o):t==="XZY"&&(this._x=i*c*s-h*n*o,this._y=h*n*s-i*c*o,this._z=h*c*o+i*n*s,this._w=h*c*s+i*n*o),e!==!1&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){e/=2;var i=Math.sin(e);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(e),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e=t.elements,i=e[0];t=e[4];var n=e[8],o=e[1],s=e[5],l=e[9],h=e[2],c=e[6];e=e[10];var p=i+s+e;return 0<p?(i=.5/Math.sqrt(p+1),this._w=.25/i,this._x=(c-l)*i,this._y=(n-h)*i,this._z=(o-t)*i):i>s&&i>e?(i=2*Math.sqrt(1+i-s-e),this._w=(c-l)/i,this._x=.25*i,this._y=(t+o)/i,this._z=(n+h)/i):s>e?(i=2*Math.sqrt(1+s-i-e),this._w=(n-h)/i,this._x=(t+o)/i,this._y=.25*i,this._z=(l+c)/i):(i=2*Math.sqrt(1+e-i-s),this._w=(o-t)/i,this._x=(n+h)/i,this._y=(l+c)/i,this._z=.25*i),this.onChangeCallback(),this},setFromUnitVectors:function(){var t=new S,e;return function(i,n){return t===void 0&&(t=new S),e=i.dot(n)+1,1e-6>e?(e=0,Math.abs(i.x)>Math.abs(i.z)?t.set(-i.y,i.x,0):t.set(0,-i.z,i.y)):t.crossVectors(i,n),this._x=t.x,this._y=t.y,this._z=t.z,this._w=e,this.normalize()}}(),angleTo:function(t){return 2*Math.acos(Math.abs($e.clamp(this.dot(t),-1,1)))},rotateTowards:function(t,e){var i=this.angleTo(t);return i===0?this:(this.slerp(t,Math.min(1,e/i)),this)},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return t===0?(this._z=this._y=this._x=0,this._w=1):(t=1/t,this._x*=t,this._y*=t,this._z*=t,this._w*=t),this.onChangeCallback(),this},multiply:function(t,e){return e!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var i=t._x,n=t._y,o=t._z;t=t._w;var s=e._x,l=e._y,h=e._z;return e=e._w,this._x=i*e+t*s+n*h-o*l,this._y=n*e+t*l+o*s-i*h,this._z=o*e+t*h+i*l-n*s,this._w=t*e-i*s-n*l-o*h,this.onChangeCallback(),this},slerp:function(t,e){if(e===0)return this;if(e===1)return this.copy(t);var i=this._x,n=this._y,o=this._z,s=this._w,l=s*t._w+i*t._x+n*t._y+o*t._z;if(0>l?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,l=-l):this.copy(t),1<=l)return this._w=s,this._x=i,this._y=n,this._z=o,this;if(t=1-l*l,t<=Number.EPSILON)return l=1-e,this._w=l*s+e*this._w,this._x=l*i+e*this._x,this._y=l*n+e*this._y,this._z=l*o+e*this._z,this.normalize();t=Math.sqrt(t);var h=Math.atan2(t,l);return l=Math.sin((1-e)*h)/t,e=Math.sin(e*h)/t,this._w=s*l+this._w*e,this._x=i*l+this._x*e,this._y=n*l+this._y*e,this._z=o*l+this._z*e,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return e===void 0&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(S.prototype,{isVector3:!0,set:function(t,e,i){return this.x=t,this.y=e,this.z=i,this},setScalar:function(t){return this.z=this.y=this.x=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return e!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return e!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return e!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t=new mt;return function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(t.setFromEuler(e))}}(),applyAxisAngle:function(){var t=new mt;return function(e,i){return this.applyQuaternion(t.setFromAxisAngle(e,i))}}(),applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[3]*i+t[6]*n,this.y=t[1]*e+t[4]*i+t[7]*n,this.z=t[2]*e+t[5]*i+t[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z;t=t.elements;var o=1/(t[3]*e+t[7]*i+t[11]*n+t[15]);return this.x=(t[0]*e+t[4]*i+t[8]*n+t[12])*o,this.y=(t[1]*e+t[5]*i+t[9]*n+t[13])*o,this.z=(t[2]*e+t[6]*i+t[10]*n+t[14])*o,this},applyQuaternion:function(t){var e=this.x,i=this.y,n=this.z,o=t.x,s=t.y,l=t.z;t=t.w;var h=t*e+s*n-l*i,c=t*i+l*e-o*n,p=t*n+o*i-s*e;return e=-o*e-s*i-l*n,this.x=h*t+e*-o+c*-l-p*-s,this.y=c*t+e*-s+p*-o-h*-l,this.z=p*t+e*-l+h*-s-c*-o,this},project:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)},unproject:function(){var t=new _t;return function(e){return this.applyMatrix4(t.getInverse(e.projectionMatrix)).applyMatrix4(e.matrixWorld)}}(),transformDirection:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n,this.y=t[1]*e+t[5]*i+t[9]*n,this.z=t[2]*e+t[6]*i+t[10]*n,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new S,e=new S;return function(i,n){return t.set(i,i,i),e.set(n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},cross:function(t,e){return e!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var i=t.x,n=t.y;t=t.z;var o=e.x,s=e.y;return e=e.z,this.x=n*e-t*s,this.y=t*o-i*e,this.z=i*s-n*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new S;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new S;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){return t=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq()),Math.acos($e.clamp(t,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,i=this.y-t.y;return t=this.z-t.z,e*e+i*i+t*t},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)},setFromSphericalCoords:function(t,e,i){var n=Math.sin(e)*t;return this.x=n*Math.sin(i),this.y=Math.cos(e)*t,this.z=n*Math.cos(i),this},setFromCylindrical:function(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)},setFromCylindricalCoords:function(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this},setFromMatrixPosition:function(t){return t=t.elements,this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length();return t=this.setFromMatrixColumn(t,2).length(),this.x=e,this.y=i,this.z=t,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return e===void 0&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,i){return i!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Mt.prototype,{isMatrix3:!0,set:function(t,e,i,n,o,s,l,h,c){var p=this.elements;return p[0]=t,p[1]=n,p[2]=l,p[3]=e,p[4]=o,p[5]=h,p[6]=i,p[7]=s,p[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return new this.constructor().fromArray(this.elements)},copy:function(t){var e=this.elements;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},setFromMatrix4:function(t){return t=t.elements,this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(){var t=new S;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix3(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements;e=this.elements,t=i[0];var o=i[3],s=i[6],l=i[1],h=i[4],c=i[7],p=i[2],f=i[5];i=i[8];var d=n[0],v=n[3],x=n[6],P=n[1],R=n[4],I=n[7],$=n[2],W=n[5];return n=n[8],e[0]=t*d+o*P+s*$,e[3]=t*v+o*R+s*W,e[6]=t*x+o*I+s*n,e[1]=l*d+h*P+c*$,e[4]=l*v+h*R+c*W,e[7]=l*x+h*I+c*n,e[2]=p*d+f*P+i*$,e[5]=p*v+f*R+i*W,e[8]=p*x+f*I+i*n,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],i=t[1],n=t[2],o=t[3],s=t[4],l=t[5],h=t[6],c=t[7];return t=t[8],e*s*t-e*l*c-i*o*t+i*l*h+n*o*c-n*s*h},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var i=t.elements;t=this.elements;var n=i[0],o=i[1],s=i[2],l=i[3],h=i[4],c=i[5],p=i[6],f=i[7];i=i[8];var d=i*h-c*f,v=c*p-i*l,x=f*l-h*p,P=n*d+o*v+s*x;if(P===0){if(e===!0)throw Error("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/P,t[0]=d*e,t[1]=(s*f-i*o)*e,t[2]=(c*o-s*h)*e,t[3]=v*e,t[4]=(i*n-s*p)*e,t[5]=(s*l-c*n)*e,t[6]=x*e,t[7]=(o*p-f*n)*e,t[8]=(h*n-o*l)*e,this},transpose:function(){var t=this.elements,e=t[1];return 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:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},setUvTransform:function(t,e,i,n,o,s,l){var h=Math.cos(o);o=Math.sin(o),this.set(i*h,i*o,-i*(h*s+o*l)+s+t,-n*o,n*h,-n*(-o*s+h*l)+l+e,0,0,1)},scale:function(t,e){var i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=e,i[4]*=e,i[7]*=e,this},rotate:function(t){var e=Math.cos(t);t=Math.sin(t);var i=this.elements,n=i[0],o=i[3],s=i[6],l=i[1],h=i[4],c=i[7];return i[0]=e*n+t*l,i[3]=e*o+t*h,i[6]=e*s+t*c,i[1]=-t*n+e*l,i[4]=-t*o+e*h,i[7]=-t*s+e*c,this},translate:function(t,e){var i=this.elements;return i[0]+=t*i[2],i[3]+=t*i[5],i[6]+=t*i[8],i[1]+=e*i[2],i[4]+=e*i[5],i[7]+=e*i[8],this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;9>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;9>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}});var To={getDataURL:function(t){if(typeof HTMLCanvasElement>"u")return t.src;if(t instanceof HTMLCanvasElement)var e=t;else{e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),e.width=t.width,e.height=t.height;var i=e.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height)}return 2048<e.width||2048<e.height?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}},$o=0;qt.DEFAULT_IMAGE=void 0,qt.DEFAULT_MAPPING=300,qt.prototype=Object.assign(Object.create(ht.prototype),{constructor:qt,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];var i={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,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(this.image!==void 0){var n=this.image;if(n.uuid===void 0&&(n.uuid=$e.generateUUID()),!e&&t.images[n.uuid]===void 0){if(Array.isArray(n))for(var o=[],s=0,l=n.length;s<l;s++)o.push(To.getDataURL(n[s]));else o=To.getDataURL(n);t.images[n.uuid]={uuid:n.uuid,url:o}}i.image=n.uuid}return e||(t.textures[this.uuid]=i),i},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping!==300)return t;if(t.applyMatrix3(this.matrix),0>t.x||1<t.x)switch(this.wrapS){case 1e3:t.x-=Math.floor(t.x);break;case 1001:t.x=0>t.x?0:1;break;case 1002:t.x=Math.abs(Math.floor(t.x)%2)===1?Math.ceil(t.x)-t.x:t.x-Math.floor(t.x)}if(0>t.y||1<t.y)switch(this.wrapT){case 1e3:t.y-=Math.floor(t.y);break;case 1001:t.y=0>t.y?0:1;break;case 1002:t.y=Math.abs(Math.floor(t.y)%2)===1?Math.ceil(t.y)-t.y:t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}}),Object.defineProperty(qt.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(nt.prototype,{isVector4:!0,set:function(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this},setScalar:function(t){return this.w=this.z=this.y=this.x=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this},add:function(t,e){return e!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return e!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,o=this.w;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n+t[12]*o,this.y=t[1]*e+t[5]*i+t[9]*n+t[13]*o,this.z=t[2]*e+t[6]*i+t[10]*n+t[14]*o,this.w=t[3]*e+t[7]*i+t[11]*n+t[15]*o,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return 1e-4>e?(this.x=1,this.z=this.y=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){t=t.elements;var e=t[0],i=t[4],n=t[8],o=t[1],s=t[5],l=t[9],h=t[2],c=t[6],p=t[10];return .01>Math.abs(i-o)&&.01>Math.abs(n-h)&&.01>Math.abs(l-c)?.1>Math.abs(i+o)&&.1>Math.abs(n+h)&&.1>Math.abs(l+c)&&.1>Math.abs(e+s+p-3)?(this.set(1,0,0,0),this):(t=Math.PI,e=(e+1)/2,s=(s+1)/2,p=(p+1)/2,i=(i+o)/4,n=(n+h)/4,l=(l+c)/4,e>s&&e>p?.01>e?(c=0,i=h=.707106781):(c=Math.sqrt(e),h=i/c,i=n/c):s>p?.01>s?(c=.707106781,h=0,i=.707106781):(h=Math.sqrt(s),c=i/h,i=l/h):.01>p?(h=c=.707106781,i=0):(i=Math.sqrt(p),c=n/i,h=l/i),this.set(c,h,i,t),this):(t=Math.sqrt((c-l)*(c-l)+(n-h)*(n-h)+(o-i)*(o-i)),.001>Math.abs(t)&&(t=1),this.x=(c-l)/t,this.y=(n-h)/t,this.z=(o-i)/t,this.w=Math.acos((e+s+p-1)/2),this)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(i,n){return t===void 0&&(t=new nt,e=new nt),t.set(i,i,i,i),e.set(n,n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){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:function(){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:function(){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:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return e===void 0&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,i){return i!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),Tt.prototype=Object.assign(Object.create(ht.prototype),{constructor:Tt,isWebGLRenderTarget:!0,setSize:function(t,e){(this.width!==t||this.height!==e)&&(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),bt.prototype=Object.create(Tt.prototype),bt.prototype.constructor=bt,bt.prototype.isWebGLRenderTargetCube=!0,gt.prototype=Object.create(qt.prototype),gt.prototype.constructor=gt,gt.prototype.isDataTexture=!0,Object.assign(Nt.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,i=1/0,n=1/0,o=-1/0,s=-1/0,l=-1/0,h=0,c=t.length;h<c;h+=3){var p=t[h],f=t[h+1],d=t[h+2];p<e&&(e=p),f<i&&(i=f),d<n&&(n=d),p>o&&(o=p),f>s&&(s=f),d>l&&(l=d)}return this.min.set(e,i,n),this.max.set(o,s,l),this},setFromBufferAttribute:function(t){for(var e=1/0,i=1/0,n=1/0,o=-1/0,s=-1/0,l=-1/0,h=0,c=t.count;h<c;h++){var p=t.getX(h),f=t.getY(h),d=t.getZ(h);p<e&&(e=p),f<i&&(i=f),d<n&&(n=d),p>o&&(o=p),f>s&&(s=f),d>l&&(l=d)}return this.min.set(e,i,n),this.max.set(o,s,l),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new S;return function(e,i){return i=t.copy(i).multiplyScalar(.5),this.min.copy(e).sub(i),this.max.copy(e).add(i),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){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:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return t===void 0&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new S),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return t===void 0&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new S),this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},expandByObject:function(){function t(s){var l=s.geometry;if(l!==void 0){if(l.isGeometry)for(l=l.vertices,i=0,n=l.length;i<n;i++)o.copy(l[i]),o.applyMatrix4(s.matrixWorld),e.expandByPoint(o);else if(l.isBufferGeometry&&(l=l.attributes.position,l!==void 0))for(i=0,n=l.count;i<n;i++)o.fromBufferAttribute(l,i).applyMatrix4(s.matrixWorld),e.expandByPoint(o)}}var e,i,n,o=new S;return function(s){return e=this,s.updateMatrixWorld(!0),s.traverse(t),this}}(),containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new S),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsSphere:function(){var t=new S;return function(e){return this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){if(0<t.normal.x)var e=t.normal.x*this.min.x,i=t.normal.x*this.max.x;else e=t.normal.x*this.max.x,i=t.normal.x*this.min.x;return 0<t.normal.y?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),0<t.normal.z?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant},intersectsTriangle:function(){function t(d){var v,x=0;for(v=d.length-3;x<=v;x+=3){h.fromArray(d,x);var P=p.x*Math.abs(h.x)+p.y*Math.abs(h.y)+p.z*Math.abs(h.z),R=e.dot(h),I=i.dot(h),$=n.dot(h);if(Math.max(-Math.max(R,I,$),Math.min(R,I,$))>P)return!1}return!0}var e=new S,i=new S,n=new S,o=new S,s=new S,l=new S,h=new S,c=new S,p=new S,f=new S;return function(d){return this.isEmpty()||(this.getCenter(c),p.subVectors(this.max,c),e.subVectors(d.a,c),i.subVectors(d.b,c),n.subVectors(d.c,c),o.subVectors(i,e),s.subVectors(n,i),l.subVectors(e,n),d=[0,-o.z,o.y,0,-s.z,s.y,0,-l.z,l.y,o.z,0,-o.x,s.z,0,-s.x,l.z,0,-l.x,-o.y,o.x,0,-s.y,s.x,0,-l.y,l.x,0],!t(d))||(d=[1,0,0,0,1,0,0,0,1],!t(d))?!1:(f.crossVectors(o,s),d=[f.x,f.y,f.z],t(d))}}(),clampPoint:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new S),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new S;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new S;return function(e){return e===void 0&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new Ht),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new S,new S,new S,new S,new S,new S,new S,new S];return function(e){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(Ht.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new Nt;return function(e,i){var n=this.center;i!==void 0?n.copy(i):t.setFromPoints(e).getCenter(n);for(var o=i=0,s=e.length;o<s;o++)i=Math.max(i,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(i),this}}(),clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return 0>=this.radius},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var i=this.center.distanceToSquared(t);return e===void 0&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new S),e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return t===void 0&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new Nt),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius*=t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(Ct.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,i,n){return this.normal.set(t,e,i),this.constant=n,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new S,e=new S;return function(i,n,o){return n=t.subVectors(o,n).cross(e.subVectors(i,n)).normalize(),this.setFromNormalAndCoplanarPoint(n,i),this}}(),clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return e===void 0&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new S),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new S;return function(e,i){i===void 0&&(console.warn("THREE.Plane: .intersectLine() target is now required"),i=new S);var n=e.delta(t),o=this.normal.dot(n);if(o===0){if(this.distanceToPoint(e.start)===0)return i.copy(e.start)}else if(o=-(e.start.dot(this.normal)+this.constant)/o,!(0>o||1<o))return i.copy(n).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start);return t=this.distanceToPoint(t.end),0>e&&0<t||0>t&&0<e},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return t===void 0&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new S),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new S,e=new Mt;return function(i,n){return n=n||e.getNormalMatrix(i),i=this.coplanarPoint(t).applyMatrix4(i),n=this.normal.applyMatrix3(n).normalize(),this.constant=-i.dot(n),this}}(),translate:function(t){return this.constant-=t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}}),Object.assign(st.prototype,{set:function(t,e,i,n,o,s){var l=this.planes;return l[0].copy(t),l[1].copy(e),l[2].copy(i),l[3].copy(n),l[4].copy(o),l[5].copy(s),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){for(var e=this.planes,i=0;6>i;i++)e[i].copy(t.planes[i]);return this},setFromMatrix:function(t){var e=this.planes,i=t.elements;t=i[0];var n=i[1],o=i[2],s=i[3],l=i[4],h=i[5],c=i[6],p=i[7],f=i[8],d=i[9],v=i[10],x=i[11],P=i[12],R=i[13],I=i[14];return i=i[15],e[0].setComponents(s-t,p-l,x-f,i-P).normalize(),e[1].setComponents(s+t,p+l,x+f,i+P).normalize(),e[2].setComponents(s+n,p+h,x+d,i+R).normalize(),e[3].setComponents(s-n,p-h,x-d,i-R).normalize(),e[4].setComponents(s-o,p-c,x-v,i-I).normalize(),e[5].setComponents(s+o,p+c,x+v,i+I).normalize(),this},intersectsObject:function(){var t=new Ht;return function(e){var i=e.geometry;return i.boundingSphere===null&&i.computeBoundingSphere(),t.copy(i.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new Ht;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){var e=this.planes,i=t.center;t=-t.radius;for(var n=0;6>n;n++)if(e[n].distanceToPoint(i)<t)return!1;return!0},intersectsBox:function(){var t=new S;return function(e){for(var i=this.planes,n=0;6>n;n++){var o=i[n];if(t.x=0<o.normal.x?e.max.x:e.min.x,t.y=0<o.normal.y?e.max.y:e.min.y,t.z=0<o.normal.z?e.max.z:e.min.z,0>o.distanceToPoint(t))return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,i=0;6>i;i++)if(0>e[i].distanceToPoint(t))return!1;return!0}});var hi={alphamap_fragment:`#ifdef USE_ALPHAMAP
|
|
286
286
|
diffuseColor.a *= texture2D( alphaMap, vUv ).g;
|
|
287
287
|
#endif
|
|
288
288
|
`,alphamap_pars_fragment:`#ifdef USE_ALPHAMAP
|
|
@@ -2567,7 +2567,33 @@ void main() {
|
|
|
2567
2567
|
#include <clipping_planes_vertex>
|
|
2568
2568
|
#include <fog_vertex>
|
|
2569
2569
|
}
|
|
2570
|
-
`},_i={merge:function(t){for(var e={},i=0;i<t.length;i++){var n=this.clone(t[i]),r;for(r in n)e[r]=n[r]}return e},clone:function(t){var e={},i;for(i in t){e[i]={};for(var n in t[i]){var r=t[i][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture)?e[i][n]=r.clone():Array.isArray(r)?e[i][n]=r.slice():e[i][n]=r}}return e}},sh={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};Object.assign(H.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this},setScalar:function(t){return this.b=this.g=this.r=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this},setRGB:function(t,e,i){return this.r=t,this.g=e,this.b=i,this},setHSL:function(){function t(e,i,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?e+6*(i-e)*n:.5>n?i:n<2/3?e+6*(i-e)*(2/3-n):e}return function(e,i,n){return e=Se.euclideanModulo(e,1),i=Se.clamp(i,0,1),n=Se.clamp(n,0,1),i===0?this.r=this.g=this.b=n:(i=.5>=n?n*(1+i):n+i-n*i,n=2*n-i,this.r=t(n,i,e+1/3),this.g=t(n,i,e),this.b=t(n,i,e-1/3)),this}}(),setStyle:function(t){function e(s){s!==void 0&&1>parseFloat(s)&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n=i[2];switch(i[1]){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))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,e(i[5]),this;if(i=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))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,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n)){n=parseFloat(i[1])/360;var r=parseInt(i[2],10)/100,o=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(n,r,o)}}}else if(i=/^#([A-Fa-f0-9]+)$/.exec(t)){if(i=i[1],n=i.length,n===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(n===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 t&&0<t.length&&(i=sh[t],i!==void 0?this.setHex(i):console.warn("THREE.Color: Unknown color "+t)),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return e===void 0&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){return e===void 0&&(e=2),e=0<e?1/e:1,this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},copySRGBToLinear:function(){function t(e){return .04045>e?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),copyLinearToSRGB:function(){function t(e){return .0031308>e?12.92*e:1.055*Math.pow(e,.41666)-.055}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){t===void 0&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e=this.r,i=this.g,n=this.b,r=Math.max(e,i,n),o=Math.min(e,i,n),s,a=(o+r)/2;if(o===r)o=s=0;else{var h=r-o;switch(o=.5>=a?h/(r+o):h/(2-r-o),r){case e:s=(i-n)/h+(i<n?6:0);break;case i:s=(n-e)/h+2;break;case n:s=(e-i)/h+4}s/=6}return t.h=s,t.s=o,t.l=a,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var t={};return function(e,i,n){return this.getHSL(t),t.h+=e,t.s+=i,t.l+=n,this.setHSL(t.h,t.s,t.l),this}}(),add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},lerpHSL:function(){var t={h:0,s:0,l:0},e={h:0,s:0,l:0};return function(i,n){this.getHSL(t),i.getHSL(e),i=Se.lerp(t.h,e.h,n);var r=Se.lerp(t.s,e.s,n);return n=Se.lerp(t.l,e.l,n),this.setHSL(i,r,n),this}}(),equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return e===void 0&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var le={common:{diffuse:{value:new H(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new mt},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Z(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new H(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new H(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new mt}},sprite:{diffuse:{value:new H(15658734)},opacity:{value:1},center:{value:new Z(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new mt}}},pn={basic:{uniforms:_i.merge([le.common,le.specularmap,le.envmap,le.aomap,le.lightmap,le.fog]),vertexShader:Ie.meshbasic_vert,fragmentShader:Ie.meshbasic_frag},lambert:{uniforms:_i.merge([le.common,le.specularmap,le.envmap,le.aomap,le.lightmap,le.emissivemap,le.fog,le.lights,{emissive:{value:new H(0)}}]),vertexShader:Ie.meshlambert_vert,fragmentShader:Ie.meshlambert_frag},phong:{uniforms:_i.merge([le.common,le.specularmap,le.envmap,le.aomap,le.lightmap,le.emissivemap,le.bumpmap,le.normalmap,le.displacementmap,le.gradientmap,le.fog,le.lights,{emissive:{value:new H(0)},specular:{value:new H(1118481)},shininess:{value:30}}]),vertexShader:Ie.meshphong_vert,fragmentShader:Ie.meshphong_frag},standard:{uniforms:_i.merge([le.common,le.envmap,le.aomap,le.lightmap,le.emissivemap,le.bumpmap,le.normalmap,le.displacementmap,le.roughnessmap,le.metalnessmap,le.fog,le.lights,{emissive:{value:new H(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Ie.meshphysical_vert,fragmentShader:Ie.meshphysical_frag},matcap:{uniforms:_i.merge([le.common,le.bumpmap,le.normalmap,le.displacementmap,le.fog,{matcap:{value:null}}]),vertexShader:Ie.meshmatcap_vert,fragmentShader:Ie.meshmatcap_frag},points:{uniforms:_i.merge([le.points,le.fog]),vertexShader:Ie.points_vert,fragmentShader:Ie.points_frag},dashed:{uniforms:_i.merge([le.common,le.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ie.linedashed_vert,fragmentShader:Ie.linedashed_frag},depth:{uniforms:_i.merge([le.common,le.displacementmap]),vertexShader:Ie.depth_vert,fragmentShader:Ie.depth_frag},normal:{uniforms:_i.merge([le.common,le.bumpmap,le.normalmap,le.displacementmap,{opacity:{value:1}}]),vertexShader:Ie.normal_vert,fragmentShader:Ie.normal_frag},sprite:{uniforms:_i.merge([le.sprite,le.fog]),vertexShader:Ie.sprite_vert,fragmentShader:Ie.sprite_frag},background:{uniforms:{uvTransform:{value:new mt},t2D:{value:null}},vertexShader:Ie.background_vert,fragmentShader:Ie.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ie.cube_vert,fragmentShader:Ie.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ie.equirect_vert,fragmentShader:Ie.equirect_frag},distanceRGBA:{uniforms:_i.merge([le.common,le.displacementmap,{referencePosition:{value:new x},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ie.distanceRGBA_vert,fragmentShader:Ie.distanceRGBA_frag},shadow:{uniforms:_i.merge([le.lights,le.fog,{color:{value:new H(0)},opacity:{value:1}}]),vertexShader:Ie.shadow_vert,fragmentShader:Ie.shadow_frag}};pn.physical={uniforms:_i.merge([pn.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:Ie.meshphysical_vert,fragmentShader:Ie.meshphysical_frag},Object.assign(C.prototype,{clone:function(){return new this.constructor().copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,i=t.vertexNormals.length;e<i;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,i=t.vertexColors.length;e<i;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}}),M.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),M.DefaultOrder="XYZ",Object.defineProperties(M.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(M.prototype,{isEuler:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._order=n||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,i){var n=Se.clamp,r=t.elements;t=r[0];var o=r[4],s=r[8],a=r[1],h=r[5],l=r[9],c=r[2],u=r[6];return r=r[10],e=e||this._order,e==="XYZ"?(this._y=Math.asin(n(s,-1,1)),.99999>Math.abs(s)?(this._x=Math.atan2(-l,r),this._z=Math.atan2(-o,t)):(this._x=Math.atan2(u,h),this._z=0)):e==="YXZ"?(this._x=Math.asin(-n(l,-1,1)),.99999>Math.abs(l)?(this._y=Math.atan2(s,r),this._z=Math.atan2(a,h)):(this._y=Math.atan2(-c,t),this._z=0)):e==="ZXY"?(this._x=Math.asin(n(u,-1,1)),.99999>Math.abs(u)?(this._y=Math.atan2(-c,r),this._z=Math.atan2(-o,h)):(this._y=0,this._z=Math.atan2(a,t))):e==="ZYX"?(this._y=Math.asin(-n(c,-1,1)),.99999>Math.abs(c)?(this._x=Math.atan2(u,r),this._z=Math.atan2(a,t)):(this._x=0,this._z=Math.atan2(-o,h))):e==="YZX"?(this._z=Math.asin(n(a,-1,1)),.99999>Math.abs(a)?(this._x=Math.atan2(-l,h),this._y=Math.atan2(-c,t)):(this._x=0,this._y=Math.atan2(s,r))):e==="XZY"?(this._z=Math.asin(-n(o,-1,1)),.99999>Math.abs(o)?(this._x=Math.atan2(u,h),this._y=Math.atan2(s,t)):(this._x=Math.atan2(-l,r),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,i!==!1&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new ft;return function(e,i,n){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,i,n)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new at;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new x(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(G.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask=this.mask|1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return(this.mask&t.mask)!==0}});var ah=0;b.DefaultUp=new x(0,1,0),b.DefaultMatrixAutoUpdate=!0,b.prototype=Object.assign(Object.create(pt.prototype),{constructor:b,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new at;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new at;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new x(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new x(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new x(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new x;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new x(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new x(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new x(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new ft;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new at,e=new ft,i=new x,n=new x;return function(r,o,s){r.isVector3?i.copy(r):i.set(r,o,s),r=this.parent,this.updateWorldMatrix(!0,!1),n.setFromMatrixPosition(this.matrixWorld),this.isCamera?e.lookAt(n,i,this.up):e.lookAt(i,n,this.up),this.quaternion.setFromRotationMatrix(e),r&&(e.extractRotation(r.matrixWorld),t.setFromRotationMatrix(e),this.quaternion.premultiply(t.inverse()))}}(),add:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.parent!==null&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}return e=this.children.indexOf(t),e!==-1&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(e,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var i=0,n=this.children.length;i<n;i++){var r=this.children[i].getObjectByProperty(t,e);if(r!==void 0)return r}},getWorldPosition:function(t){return t===void 0&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new x),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new x,e=new x;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),i=new at),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,e),i}}(),getWorldScale:function(){var t=new x,e=new at;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),i=new x),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,i),i}}(),getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),t=new x),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()},raycast:function(){},traverse:function(t){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverse(t)},traverseVisible:function(t){if(this.visible!==!1){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].updateMatrixWorld(t)},updateWorldMatrix:function(t,e){var i=this.parent;if(t===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),e===!0)for(t=this.children,e=0,i=t.length;e<i;e++)t[e].updateWorldMatrix(!1,!0)},toJSON:function(t){function e(c,u){return c[u.uuid]===void 0&&(c[u.uuid]=u.toJSON(t)),u.uuid}function i(c){var u=[],d;for(d in c){var g=c[d];delete g.metadata,u.push(g)}return u}var n=t===void 0||typeof t=="string",r={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},r.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var o={};if(o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isMesh||this.isLine||this.isPoints){o.geometry=e(t.geometries,this.geometry);var s=this.geometry.parameters;if(s!==void 0&&s.shapes!==void 0)if(s=s.shapes,Array.isArray(s))for(var a=0,h=s.length;a<h;a++)e(t.shapes,s[a]);else e(t.shapes,s)}if(this.material!==void 0)if(Array.isArray(this.material)){for(s=[],a=0,h=this.material.length;a<h;a++)s.push(e(t.materials,this.material[a]));o.material=s}else o.material=e(t.materials,this.material);if(0<this.children.length)for(o.children=[],a=0;a<this.children.length;a++)o.children.push(this.children[a].toJSON(t).object);if(n){n=i(t.geometries),a=i(t.materials),h=i(t.textures);var l=i(t.images);s=i(t.shapes),0<n.length&&(r.geometries=n),0<a.length&&(r.materials=a),0<h.length&&(r.textures=h),0<l.length&&(r.images=l),0<s.length&&(r.shapes=s)}return r.object=o,r},clone:function(t){return new this.constructor().copy(this,t)},copy:function(t,e){if(e===void 0&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(e=0;e<t.children.length;e++)this.add(t.children[e].clone());return this}});var hh=0;F.prototype=Object.assign(Object.create(pt.prototype),{constructor:F,isGeometry:!0,applyMatrix:function(t){for(var e=new mt().getNormalMatrix(t),i=0,n=this.vertices.length;i<n;i++)this.vertices[i].applyMatrix4(t);for(i=0,n=this.faces.length;i<n;i++){t=this.faces[i],t.normal.applyMatrix3(e).normalize();for(var r=0,o=t.vertexNormals.length;r<o;r++)t.vertexNormals[r].applyMatrix3(e).normalize()}return this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this.normalsNeedUpdate=this.verticesNeedUpdate=!0,this},rotateX:function(){var t=new ft;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new ft;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new ft;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new ft;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new ft;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new b;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(w,S,P,k){var N=a===void 0?[]:[i.colors[w].clone(),i.colors[S].clone(),i.colors[P].clone()],J=s===void 0?[]:[new x().fromArray(s,3*w),new x().fromArray(s,3*S),new x().fromArray(s,3*P)];k=new C(w,S,P,J,N,k),i.faces.push(k),h!==void 0&&i.faceVertexUvs[0].push([new Z().fromArray(h,2*w),new Z().fromArray(h,2*S),new Z().fromArray(h,2*P)]),l!==void 0&&i.faceVertexUvs[1].push([new Z().fromArray(l,2*w),new Z().fromArray(l,2*S),new Z().fromArray(l,2*P)])}var i=this,n=t.index!==null?t.index.array:void 0,r=t.attributes,o=r.position.array,s=r.normal!==void 0?r.normal.array:void 0,a=r.color!==void 0?r.color.array:void 0,h=r.uv!==void 0?r.uv.array:void 0,l=r.uv2!==void 0?r.uv2.array:void 0;l!==void 0&&(this.faceVertexUvs[1]=[]);for(var c=r=0;r<o.length;r+=3,c+=2)i.vertices.push(new x().fromArray(o,r)),a!==void 0&&i.colors.push(new H().fromArray(a,r));var u=t.groups;if(0<u.length)for(r=0;r<u.length;r++){o=u[r];var d=o.start,g=o.count;for(c=d,d+=g;c<d;c+=3)n!==void 0?e(n[c],n[c+1],n[c+2],o.materialIndex):e(c,c+1,c+2,o.materialIndex)}else if(n!==void 0)for(r=0;r<n.length;r+=3)e(n[r],n[r+1],n[r+2]);else for(r=0;r<o.length/3;r+=3)e(r,r+1,r+2);return this.computeFaceNormals(),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){var t=new x;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius;e=e===0?1:1/e;var i=new ft;return i.set(e,0,0,-e*t.x,0,e,0,-e*t.y,0,0,e,-e*t.z,0,0,0,1),this.applyMatrix(i),this},computeFaceNormals:function(){for(var t=new x,e=new x,i=0,n=this.faces.length;i<n;i++){var r=this.faces[i],o=this.vertices[r.a],s=this.vertices[r.b];t.subVectors(this.vertices[r.c],s),e.subVectors(o,s),t.cross(e),t.normalize(),r.normal.copy(t)}},computeVertexNormals:function(t){t===void 0&&(t=!0);var e,i=Array(this.vertices.length),n=0;for(e=this.vertices.length;n<e;n++)i[n]=new x;if(t){var r=new x,o=new x;for(t=0,n=this.faces.length;t<n;t++){e=this.faces[t];var s=this.vertices[e.a],a=this.vertices[e.b],h=this.vertices[e.c];r.subVectors(h,a),o.subVectors(s,a),r.cross(o),i[e.a].add(r),i[e.b].add(r),i[e.c].add(r)}}else for(this.computeFaceNormals(),t=0,n=this.faces.length;t<n;t++)e=this.faces[t],i[e.a].add(e.normal),i[e.b].add(e.normal),i[e.c].add(e.normal);for(n=0,e=this.vertices.length;n<e;n++)i[n].normalize();for(t=0,n=this.faces.length;t<n;t++)e=this.faces[t],s=e.vertexNormals,s.length===3?(s[0].copy(i[e.a]),s[1].copy(i[e.b]),s[2].copy(i[e.c])):(s[0]=i[e.a].clone(),s[1]=i[e.b].clone(),s[2]=i[e.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t;this.computeFaceNormals();var e=0;for(t=this.faces.length;e<t;e++){var i=this.faces[e],n=i.vertexNormals;n.length===3?(n[0].copy(i.normal),n[1].copy(i.normal),n[2].copy(i.normal)):(n[0]=i.normal.clone(),n[1]=i.normal.clone(),n[2]=i.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,i=0;for(e=this.faces.length;i<e;i++){var n=this.faces[i];n.__originalFaceNormal?n.__originalFaceNormal.copy(n.normal):n.__originalFaceNormal=n.normal.clone(),n.__originalVertexNormals||(n.__originalVertexNormals=[]);var r=0;for(t=n.vertexNormals.length;r<t;r++)n.__originalVertexNormals[r]?n.__originalVertexNormals[r].copy(n.vertexNormals[r]):n.__originalVertexNormals[r]=n.vertexNormals[r].clone()}var o=new F;for(o.faces=this.faces,r=0,t=this.morphTargets.length;r<t;r++){if(!this.morphNormals[r]){this.morphNormals[r]={},this.morphNormals[r].faceNormals=[],this.morphNormals[r].vertexNormals=[],n=this.morphNormals[r].faceNormals;var s=this.morphNormals[r].vertexNormals;for(i=0,e=this.faces.length;i<e;i++){var a=new x,h={a:new x,b:new x,c:new x};n.push(a),s.push(h)}}for(s=this.morphNormals[r],o.vertices=this.morphTargets[r].vertices,o.computeFaceNormals(),o.computeVertexNormals(),i=0,e=this.faces.length;i<e;i++)n=this.faces[i],a=s.faceNormals[i],h=s.vertexNormals[i],a.copy(n.normal),h.a.copy(n.vertexNormals[0]),h.b.copy(n.vertexNormals[1]),h.c.copy(n.vertexNormals[2])}for(i=0,e=this.faces.length;i<e;i++)n=this.faces[i],n.normal=n.__originalFaceNormal,n.vertexNormals=n.__originalVertexNormals},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new Pt),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new Ot),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,r=this.vertices.length,o=this.vertices,s=t.vertices,a=this.faces,h=t.faces,l=this.faceVertexUvs[0],c=t.faceVertexUvs[0],u=this.colors,d=t.colors;i===void 0&&(i=0),e!==void 0&&(n=new mt().getNormalMatrix(e)),t=0;for(var g=s.length;t<g;t++){var w=s[t].clone();e!==void 0&&w.applyMatrix4(e),o.push(w)}for(t=0,g=d.length;t<g;t++)u.push(d[t].clone());for(t=0,g=h.length;t<g;t++){s=h[t];var S=s.vertexNormals;for(d=s.vertexColors,u=new C(s.a+r,s.b+r,s.c+r),u.normal.copy(s.normal),n!==void 0&&u.normal.applyMatrix3(n).normalize(),e=0,o=S.length;e<o;e++)w=S[e].clone(),n!==void 0&&w.applyMatrix3(n).normalize(),u.vertexNormals.push(w);for(u.color.copy(s.color),e=0,o=d.length;e<o;e++)w=d[e],u.vertexColors.push(w.clone());u.materialIndex=s.materialIndex+i,a.push(u)}for(t=0,g=c.length;t<g;t++)if(i=c[t],n=[],i!==void 0){for(e=0,o=i.length;e<o;e++)n.push(i[e].clone());l.push(n)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t={},e=[],i=[],n=Math.pow(10,4),r,o=0;for(r=this.vertices.length;o<r;o++){var s=this.vertices[o];s=Math.round(s.x*n)+"_"+Math.round(s.y*n)+"_"+Math.round(s.z*n),t[s]===void 0?(t[s]=o,e.push(this.vertices[o]),i[o]=e.length-1):i[o]=i[t[s]]}for(t=[],o=0,r=this.faces.length;o<r;o++)for(n=this.faces[o],n.a=i[n.a],n.b=i[n.b],n.c=i[n.c],n=[n.a,n.b,n.c],s=0;3>s;s++)if(n[s]===n[(s+1)%3]){t.push(o);break}for(o=t.length-1;0<=o;o--)for(n=t[o],this.faces.splice(n,1),i=0,r=this.faceVertexUvs.length;i<r;i++)this.faceVertexUvs[i].splice(n,1);return o=this.vertices.length-e.length,this.vertices=e,o},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new x(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,i=0;i<e;i++)t[i]._id=i;t.sort(function(h,l){return h.materialIndex-l.materialIndex});var n=this.faceVertexUvs[0],r=this.faceVertexUvs[1],o,s;for(n&&n.length===e&&(o=[]),r&&r.length===e&&(s=[]),i=0;i<e;i++){var a=t[i]._id;o&&o.push(n[a]),s&&s.push(r[a])}o&&(this.faceVertexUvs[0]=o),s&&(this.faceVertexUvs[1]=s)},toJSON:function(){function t(ot,T,A){return A?ot|1<<T:ot&~(1<<T)}function e(ot){var T=ot.x.toString()+ot.y.toString()+ot.z.toString();return l[T]!==void 0||(l[T]=h.length/3,h.push(ot.x,ot.y,ot.z)),l[T]}function i(ot){var T=ot.r.toString()+ot.g.toString()+ot.b.toString();return u[T]!==void 0||(u[T]=c.length,c.push(ot.getHex())),u[T]}function n(ot){var T=ot.x.toString()+ot.y.toString();return g[T]!==void 0||(g[T]=d.length/2,d.push(ot.x,ot.y)),g[T]}var r={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.parameters!==void 0){var o=this.parameters,s;for(s in o)o[s]!==void 0&&(r[s]=o[s]);return r}for(o=[],s=0;s<this.vertices.length;s++){var a=this.vertices[s];o.push(a.x,a.y,a.z)}a=[];var h=[],l={},c=[],u={},d=[],g={};for(s=0;s<this.faces.length;s++){var w=this.faces[s],S=this.faceVertexUvs[0][s]!==void 0,P=0<w.normal.length(),k=0<w.vertexNormals.length,N=w.color.r!==1||w.color.g!==1||w.color.b!==1,J=0<w.vertexColors.length,V=0;V=t(V,0,0),V=t(V,1,!0),V=t(V,2,!1),V=t(V,3,S),V=t(V,4,P),V=t(V,5,k),V=t(V,6,N),V=t(V,7,J),a.push(V),a.push(w.a,w.b,w.c),a.push(w.materialIndex),S&&(S=this.faceVertexUvs[0][s],a.push(n(S[0]),n(S[1]),n(S[2]))),P&&a.push(e(w.normal)),k&&(P=w.vertexNormals,a.push(e(P[0]),e(P[1]),e(P[2]))),N&&a.push(i(w.color)),J&&(w=w.vertexColors,a.push(i(w[0]),i(w[1]),i(w[2])))}return r.data={},r.data.vertices=o,r.data.normals=h,0<c.length&&(r.data.colors=c),0<d.length&&(r.data.uvs=[d]),r.data.faces=a,r},clone:function(){return new F().copy(this)},copy:function(t){var e,i,n;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var r=t.vertices,o=0;for(e=r.length;o<e;o++)this.vertices.push(r[o].clone());for(r=t.colors,o=0,e=r.length;o<e;o++)this.colors.push(r[o].clone());for(r=t.faces,o=0,e=r.length;o<e;o++)this.faces.push(r[o].clone());for(o=0,e=t.faceVertexUvs.length;o<e;o++){var s=t.faceVertexUvs[o];for(this.faceVertexUvs[o]===void 0&&(this.faceVertexUvs[o]=[]),r=0,i=s.length;r<i;r++){var a=s[r],h=[],l=0;for(n=a.length;l<n;l++)h.push(a[l].clone());this.faceVertexUvs[o].push(h)}}for(l=t.morphTargets,o=0,e=l.length;o<e;o++){if(n={},n.name=l[o].name,l[o].vertices!==void 0)for(n.vertices=[],r=0,i=l[o].vertices.length;r<i;r++)n.vertices.push(l[o].vertices[r].clone());if(l[o].normals!==void 0)for(n.normals=[],r=0,i=l[o].normals.length;r<i;r++)n.normals.push(l[o].normals[r].clone());this.morphTargets.push(n)}for(l=t.morphNormals,o=0,e=l.length;o<e;o++){if(n={},l[o].vertexNormals!==void 0)for(n.vertexNormals=[],r=0,i=l[o].vertexNormals.length;r<i;r++)s=l[o].vertexNormals[r],a={},a.a=s.a.clone(),a.b=s.b.clone(),a.c=s.c.clone(),n.vertexNormals.push(a);if(l[o].faceNormals!==void 0)for(n.faceNormals=[],r=0,i=l[o].faceNormals.length;r<i;r++)n.faceNormals.push(l[o].faceNormals[r].clone());this.morphNormals.push(n)}for(r=t.skinWeights,o=0,e=r.length;o<e;o++)this.skinWeights.push(r[o].clone());for(r=t.skinIndices,o=0,e=r.length;o<e;o++)this.skinIndices.push(r[o].clone());for(r=t.lineDistances,o=0,e=r.length;o<e;o++)this.lineDistances.push(r[o]);return o=t.boundingBox,o!==null&&(this.boundingBox=o.clone()),o=t.boundingSphere,o!==null&&(this.boundingSphere=o.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(q.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(q.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=t!==void 0?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,r=this.itemSize;n<r;n++)this.array[t+n]=e.array[i+n];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),o=new H),e[i++]=o.r,e[i++]=o.g,e[i++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),o=new Z),e[i++]=o.x,e[i++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),o=new x),e[i++]=o.x,e[i++]=o.y,e[i++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),o=new Y),e[i++]=o.x,e[i++]=o.y,e[i++]=o.z,e[i++]=o.w}return this},set:function(t,e){return e===void 0&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=r,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),st.prototype=Object.create(q.prototype),st.prototype.constructor=st,it.prototype=Object.create(q.prototype),it.prototype.constructor=it,Lt.prototype=Object.create(q.prototype),Lt.prototype.constructor=Lt,bt.prototype=Object.create(q.prototype),bt.prototype.constructor=bt,Gt.prototype=Object.create(q.prototype),Gt.prototype.constructor=Gt,Vt.prototype=Object.create(q.prototype),Vt.prototype.constructor=Vt,ie.prototype=Object.create(q.prototype),ie.prototype.constructor=ie,ut.prototype=Object.create(q.prototype),ut.prototype.constructor=ut,kt.prototype=Object.create(q.prototype),kt.prototype.constructor=kt,Object.assign(Me.prototype,{computeGroups:function(t){var e=[],i=void 0;t=t.faces;for(var n=0;n<t.length;n++){var r=t[n];if(r.materialIndex!==i){i=r.materialIndex,o!==void 0&&(o.count=3*n-o.start,e.push(o));var o={start:3*n,materialIndex:i}}}o!==void 0&&(o.count=3*n-o.start,e.push(o)),this.groups=e},fromGeometry:function(t){var e=t.faces,i=t.vertices,n=t.faceVertexUvs,r=n[0]&&0<n[0].length,o=n[1]&&0<n[1].length,s=t.morphTargets,a=s.length;if(0<a){for(var h=[],l=0;l<a;l++)h[l]={name:s[l].name,data:[]};this.morphTargets.position=h}var c=t.morphNormals,u=c.length;if(0<u){var d=[];for(l=0;l<u;l++)d[l]={name:c[l].name,data:[]};this.morphTargets.normal=d}var g=t.skinIndices,w=t.skinWeights,S=g.length===i.length,P=w.length===i.length;for(0<i.length&&e.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),l=0;l<e.length;l++){var k=e[l];this.vertices.push(i[k.a],i[k.b],i[k.c]);var N=k.vertexNormals;for(N.length===3?this.normals.push(N[0],N[1],N[2]):(N=k.normal,this.normals.push(N,N,N)),N=k.vertexColors,N.length===3?this.colors.push(N[0],N[1],N[2]):(N=k.color,this.colors.push(N,N,N)),r===!0&&(N=n[0][l],N!==void 0?this.uvs.push(N[0],N[1],N[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",l),this.uvs.push(new Z,new Z,new Z))),o===!0&&(N=n[1][l],N!==void 0?this.uvs2.push(N[0],N[1],N[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",l),this.uvs2.push(new Z,new Z,new Z))),N=0;N<a;N++){var J=s[N].vertices;h[N].data.push(J[k.a],J[k.b],J[k.c])}for(N=0;N<u;N++)J=c[N].vertexNormals[l],d[N].data.push(J.a,J.b,J.c);S&&this.skinIndices.push(g[k.a],g[k.b],g[k.c]),P&&this.skinWeights.push(w[k.a],w[k.b],w[k.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var lh=1;Rt.prototype=Object.assign(Object.create(pt.prototype),{constructor:Rt,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(65535<gi(t)?ie:Gt)(t,1):this.index=t},addAttribute:function(t,e,i){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?t==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(t,new q(e,i)))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,i){this.groups.push({start:t,count:e,materialIndex:i!==void 0?i:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;return e!==void 0&&(t.applyToBufferAttribute(e),e.needsUpdate=!0),e=this.attributes.normal,e!==void 0&&(new mt().getNormalMatrix(t).applyToBufferAttribute(e),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},rotateX:function(){var t=new ft;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new ft;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new ft;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new ft;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new ft;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new b;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new x;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){t=new ut(3*e.vertices.length,3);var i=new ut(3*e.colors.length,3);this.addAttribute("position",t.copyVector3sArray(e.vertices)),this.addAttribute("color",i.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length&&(t=new ut(e.lineDistances.length,1),this.addAttribute("lineDistance",t.copyArray(e.lineDistances))),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];e.push(r.x,r.y,r.z||0)}return this.addAttribute("position",new ut(e,3)),this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var i=e.__directGeometry;if(e.elementsNeedUpdate===!0&&(i=void 0,e.elementsNeedUpdate=!1),i===void 0)return this.fromGeometry(e);i.verticesNeedUpdate=e.verticesNeedUpdate,i.normalsNeedUpdate=e.normalsNeedUpdate,i.colorsNeedUpdate=e.colorsNeedUpdate,i.uvsNeedUpdate=e.uvsNeedUpdate,i.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=i}return e.verticesNeedUpdate===!0&&(i=this.attributes.position,i!==void 0&&(i.copyVector3sArray(e.vertices),i.needsUpdate=!0),e.verticesNeedUpdate=!1),e.normalsNeedUpdate===!0&&(i=this.attributes.normal,i!==void 0&&(i.copyVector3sArray(e.normals),i.needsUpdate=!0),e.normalsNeedUpdate=!1),e.colorsNeedUpdate===!0&&(i=this.attributes.color,i!==void 0&&(i.copyColorsArray(e.colors),i.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(i=this.attributes.uv,i!==void 0&&(i.copyVector2sArray(e.uvs),i.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(i=this.attributes.lineDistance,i!==void 0&&(i.copyArray(e.lineDistances),i.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=new Me().fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);this.addAttribute("position",new q(e,3).copyVector3sArray(t.vertices)),0<t.normals.length&&(e=new Float32Array(3*t.normals.length),this.addAttribute("normal",new q(e,3).copyVector3sArray(t.normals))),0<t.colors.length&&(e=new Float32Array(3*t.colors.length),this.addAttribute("color",new q(e,3).copyColorsArray(t.colors))),0<t.uvs.length&&(e=new Float32Array(2*t.uvs.length),this.addAttribute("uv",new q(e,2).copyVector2sArray(t.uvs))),0<t.uvs2.length&&(e=new Float32Array(2*t.uvs2.length),this.addAttribute("uv2",new q(e,2).copyVector2sArray(t.uvs2))),this.groups=t.groups;for(var i in t.morphTargets){e=[];for(var n=t.morphTargets[i],r=0,o=n.length;r<o;r++){var s=n[r],a=new ut(3*s.data.length,3);a.name=s.name,e.push(a.copyVector3sArray(s.data))}this.morphAttributes[i]=e}return 0<t.skinIndices.length&&(i=new ut(4*t.skinIndices.length,4),this.addAttribute("skinIndex",i.copyVector4sArray(t.skinIndices))),0<t.skinWeights.length&&(i=new ut(4*t.skinWeights.length,4),this.addAttribute("skinWeight",i.copyVector4sArray(t.skinWeights))),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new Pt);var t=this.attributes.position;t!==void 0?this.boundingBox.setFromBufferAttribute(t):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:function(){var t=new Pt,e=new x;return function(){this.boundingSphere===null&&(this.boundingSphere=new Ot);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var r=0,o=0,s=i.count;o<s;o++)e.x=i.getX(o),e.y=i.getY(o),e.z=i.getZ(o),r=Math.max(r,n.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes;if(e.position){var i=e.position.array;if(e.normal===void 0)this.addAttribute("normal",new q(new Float32Array(i.length),3));else for(var n=e.normal.array,r=0,o=n.length;r<o;r++)n[r]=0;n=e.normal.array;var s=new x,a=new x,h=new x,l=new x,c=new x;if(t){var u=t.array;for(r=0,o=t.count;r<o;r+=3){t=3*u[r+0];var d=3*u[r+1],g=3*u[r+2];s.fromArray(i,t),a.fromArray(i,d),h.fromArray(i,g),l.subVectors(h,a),c.subVectors(s,a),l.cross(c),n[t]+=l.x,n[t+1]+=l.y,n[t+2]+=l.z,n[d]+=l.x,n[d+1]+=l.y,n[d+2]+=l.z,n[g]+=l.x,n[g+1]+=l.y,n[g+2]+=l.z}}else for(r=0,o=i.length;r<o;r+=9)s.fromArray(i,r),a.fromArray(i,r+3),h.fromArray(i,r+6),l.subVectors(h,a),c.subVectors(s,a),l.cross(c),n[r]=l.x,n[r+1]=l.y,n[r+2]=l.z,n[r+3]=l.x,n[r+4]=l.y,n[r+5]=l.z,n[r+6]=l.x,n[r+7]=l.y,n[r+8]=l.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){e===void 0&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var i=this.attributes,n;for(n in i)if(t.attributes[n]!==void 0){var r=i[n].array,o=t.attributes[n],s=o.array,a=0;for(o=o.itemSize*e;a<s.length;a++,o++)r[o]=s[a]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new x;return function(){for(var e=this.attributes.normal,i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.normalize(),e.setXYZ(i,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Rt,e=this.index.array,i=this.attributes,n;for(n in i){var r=i[n],o=r.array,s=r.itemSize,a=new o.constructor(e.length*s),h=0;r=0;for(var l=e.length;r<l;r++)for(var c=e[r]*s,u=0;u<s;u++)a[h++]=o[c++];t.addAttribute(n,new q(a,s))}for(e=this.groups,r=0,l=e.length;r<l;r++)i=e[r],t.addGroup(i.start,i.count,i.materialIndex);return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),0<Object.keys(this.userData).length&&(t.userData=this.userData),this.parameters!==void 0){var e=this.parameters;for(r in e)e[r]!==void 0&&(t[r]=e[r]);return t}t.data={attributes:{}};var i=this.index;i!==null&&(e=Array.prototype.slice.call(i.array),t.data.index={type:i.array.constructor.name,array:e}),i=this.attributes;for(r in i){var n=i[r];e=Array.prototype.slice.call(n.array),t.data.attributes[r]={itemSize:n.itemSize,type:n.array.constructor.name,array:e,normalized:n.normalized}}var r=this.groups;return 0<r.length&&(t.data.groups=JSON.parse(JSON.stringify(r))),r=this.boundingSphere,r!==null&&(t.data.boundingSphere={center:r.center.toArray(),radius:r.radius}),t},clone:function(){return new Rt().copy(this)},copy:function(t){var e;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var i=t.index;i!==null&&this.setIndex(i.clone()),i=t.attributes;for(s in i)this.addAttribute(s,i[s].clone());var n=t.morphAttributes;for(s in n){var r=[],o=n[s];for(i=0,e=o.length;i<e;i++)r.push(o[i].clone());this.morphAttributes[s]=r}var s=t.groups;for(i=0,e=s.length;i<e;i++)n=s[i],this.addGroup(n.start,n.count,n.materialIndex);return s=t.boundingBox,s!==null&&(this.boundingBox=s.clone()),s=t.boundingSphere,s!==null&&(this.boundingSphere=s.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Fe.prototype=Object.create(F.prototype),Fe.prototype.constructor=Fe,vi.prototype=Object.create(Rt.prototype),vi.prototype.constructor=vi,Ti.prototype=Object.create(F.prototype),Ti.prototype.constructor=Ti,oi.prototype=Object.create(Rt.prototype),oi.prototype.constructor=oi;var ch=0;fe.prototype=Object.assign(Object.create(pt.prototype),{constructor:fe,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(t!==void 0)for(var e in t){var i=t[e];if(i===void 0)console.warn("THREE.Material: '"+e+"' parameter is undefined.");else if(e==="shading")console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===1;else{var n=this[e];n===void 0?console.warn("THREE."+this.type+": '"+e+"' is not a property of this material."):n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]=i}}},toJSON:function(t){function e(r){var o=[],s;for(s in r){var a=r[s];delete a.metadata,o.push(a)}return o}var i=t===void 0||typeof t=="string";i&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};return 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.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),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.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity,this.combine!==void 0&&(n.combine=this.combine),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.size!==void 0&&(n.size=this.size),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.flatShading===!0&&(n.flatShading=this.flatShading),this.side!==0&&(n.side=this.side),this.vertexColors!==0&&(n.vertexColors=this.vertexColors),1>this.opacity&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,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!==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),0<this.alphaTest&&(n.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),1<this.wireframeLinewidth&&(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.skinning===!0&&(n.skinning=!0),this.visible===!1&&(n.visible=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),i&&(i=e(t.textures),t=e(t.images),0<i.length&&(n.textures=i),0<t.length&&(n.images=t)),n},clone:function(){return new this.constructor().copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,i=null;if(e!==null){var n=e.length;i=Array(n);for(var r=0;r!==n;++r)i[r]=e[r].clone()}return this.clippingPlanes=i,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Je.prototype=Object.create(fe.prototype),Je.prototype.constructor=Je,Je.prototype.isShaderMaterial=!0,Je.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=_i.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},Je.prototype.toJSON=function(t){var e=fe.prototype.toJSON.call(this,t);e.uniforms={};for(var i in this.uniforms){var n=this.uniforms[i].value;e.uniforms[i]=n.isTexture?{type:"t",value:n.toJSON(t).uuid}:n.isColor?{type:"c",value:n.getHex()}:n.isVector2?{type:"v2",value:n.toArray()}:n.isVector3?{type:"v3",value:n.toArray()}:n.isVector4?{type:"v4",value:n.toArray()}:n.isMatrix4?{type:"m4",value:n.toArray()}:{value:n}}return 0<Object.keys(this.defines).length&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(bi.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return e===void 0&&(console.warn("THREE.Ray: .at() target is now required"),e=new x),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new x;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){return e===void 0&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new x),e.subVectors(t,this.origin),t=e.dot(this.direction),0>t?e.copy(this.origin):e.copy(this.direction).multiplyScalar(t).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new x;return function(e){var i=t.subVectors(e,this.origin).dot(this.direction);return 0>i?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(i).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new x,e=new x,i=new x;return function(n,r,o,s){t.copy(n).add(r).multiplyScalar(.5),e.copy(r).sub(n).normalize(),i.copy(this.origin).sub(t);var a=.5*n.distanceTo(r),h=-this.direction.dot(e),l=i.dot(this.direction),c=-i.dot(e),u=i.lengthSq(),d=Math.abs(1-h*h);if(0<d){n=h*c-l,r=h*l-c;var g=a*d;0<=n?r>=-g?r<=g?(a=1/d,n*=a,r*=a,h=n*(n+h*r+2*l)+r*(h*n+r+2*c)+u):(r=a,n=Math.max(0,-(h*r+l)),h=-n*n+r*(r+2*c)+u):(r=-a,n=Math.max(0,-(h*r+l)),h=-n*n+r*(r+2*c)+u):r<=-g?(n=Math.max(0,-(-h*a+l)),r=0<n?-a:Math.min(Math.max(-a,-c),a),h=-n*n+r*(r+2*c)+u):r<=g?(n=0,r=Math.min(Math.max(-a,-c),a),h=r*(r+2*c)+u):(n=Math.max(0,-(h*a+l)),r=0<n?a:Math.min(Math.max(-a,-c),a),h=-n*n+r*(r+2*c)+u)}else r=0<h?-a:a,n=Math.max(0,-(h*r+l)),h=-n*n+r*(r+2*c)+u;return o&&o.copy(this.direction).multiplyScalar(n).add(this.origin),s&&s.copy(e).multiplyScalar(r).add(t),h}}(),intersectSphere:function(){var t=new x;return function(e,i){t.subVectors(e.center,this.origin);var n=t.dot(this.direction),r=t.dot(t)-n*n;return e=e.radius*e.radius,r>e?null:(e=Math.sqrt(e-r),r=n-e,n+=e,0>r&&0>n?null:0>r?this.at(n,i):this.at(r,i))}}(),intersectsSphere:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);return e===0?t.distanceToPoint(this.origin)===0?0:null:(t=-(this.origin.dot(t.normal)+t.constant)/e,0<=t?t:null)},intersectPlane:function(t,e){return t=this.distanceToPlane(t),t===null?null:this.at(t,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return e===0||0>t.normal.dot(this.direction)*e},intersectBox:function(t,e){var i=1/this.direction.x,n=1/this.direction.y,r=1/this.direction.z,o=this.origin;if(0<=i){var s=(t.min.x-o.x)*i;i*=t.max.x-o.x}else s=(t.max.x-o.x)*i,i*=t.min.x-o.x;if(0<=n){var a=(t.min.y-o.y)*n;n*=t.max.y-o.y}else a=(t.max.y-o.y)*n,n*=t.min.y-o.y;return s>n||a>i||((a>s||s!==s)&&(s=a),(n<i||i!==i)&&(i=n),0<=r?(a=(t.min.z-o.z)*r,t=(t.max.z-o.z)*r):(a=(t.max.z-o.z)*r,t=(t.min.z-o.z)*r),s>t||a>i)?null:((a>s||s!==s)&&(s=a),(t<i||i!==i)&&(i=t),0>i?null:this.at(0<=s?s:i,e))},intersectsBox:function(){var t=new x;return function(e){return this.intersectBox(e,t)!==null}}(),intersectTriangle:function(){var t=new x,e=new x,i=new x,n=new x;return function(r,o,s,a,h){if(e.subVectors(o,r),i.subVectors(s,r),n.crossVectors(e,i),o=this.direction.dot(n),0<o){if(a)return null;a=1}else if(0>o)a=-1,o=-o;else return null;return t.subVectors(this.origin,r),r=a*this.direction.dot(i.crossVectors(t,i)),0>r||(s=a*this.direction.dot(e.cross(t)),0>s||r+s>o)?null:(r=-a*t.dot(n),0>r?null:this.at(r/o,h))}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(Ce,{getNormal:function(){var t=new x;return function(e,i,n,r){return r===void 0&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new x),r.subVectors(n,i),t.subVectors(e,i),r.cross(t),e=r.lengthSq(),0<e?r.multiplyScalar(1/Math.sqrt(e)):r.set(0,0,0)}}(),getBarycoord:function(){var t=new x,e=new x,i=new x;return function(n,r,o,s,a){t.subVectors(s,r),e.subVectors(o,r),i.subVectors(n,r),n=t.dot(t),r=t.dot(e),o=t.dot(i);var h=e.dot(e);s=e.dot(i);var l=n*h-r*r;return a===void 0&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),a=new x),l===0?a.set(-2,-1,-1):(l=1/l,h=(h*o-r*s)*l,n=(n*s-r*o)*l,a.set(1-h-n,n,h))}}(),containsPoint:function(){var t=new x;return function(e,i,n,r){return Ce.getBarycoord(e,i,n,r,t),0<=t.x&&0<=t.y&&1>=t.x+t.y}}(),getUV:function(){var t=new x;return function(e,i,n,r,o,s,a,h){return this.getBarycoord(e,i,n,r,t),h.set(0,0),h.addScaledVector(o,t.x),h.addScaledVector(s,t.y),h.addScaledVector(a,t.z),h}}()}),Object.assign(Ce.prototype,{set:function(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this},setFromPointsAndIndices:function(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new x,e=new x;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new x),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return Ce.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new x),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return Ce.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return Ce.containsPoint(t,this.a,this.b,this.c)},getUV:function(t,e,i,n,r){return Ce.getUV(t,this.a,this.b,this.c,e,i,n,r)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new x,e=new x,i=new x,n=new x,r=new x,o=new x;return function(s,a){a===void 0&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),a=new x);var h=this.a,l=this.b,c=this.c;t.subVectors(l,h),e.subVectors(c,h),n.subVectors(s,h);var u=t.dot(n),d=e.dot(n);if(0>=u&&0>=d)return a.copy(h);r.subVectors(s,l);var g=t.dot(r),w=e.dot(r);if(0<=g&&w<=g)return a.copy(l);var S=u*w-g*d;if(0>=S&&0<=u&&0>=g)return l=u/(u-g),a.copy(h).addScaledVector(t,l);o.subVectors(s,c),s=t.dot(o);var P=e.dot(o);return 0<=P&&s<=P?a.copy(c):(u=s*d-u*P,0>=u&&0<=d&&0>=P?(S=d/(d-P),a.copy(h).addScaledVector(e,S)):(d=g*P-s*w,0>=d&&0<=w-g&&0<=s-P?(i.subVectors(c,l),S=(w-g)/(w-g+(s-P)),a.copy(l).addScaledVector(i,S)):(c=1/(d+u+S),l=u*c,S*=c,a.copy(h).addScaledVector(t,l).addScaledVector(e,S))))}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),je.prototype=Object.create(fe.prototype),je.prototype.constructor=je,je.prototype.isMeshBasicMaterial=!0,je.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},Ke.prototype=Object.assign(Object.create(b.prototype),{constructor:Ke,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return b.prototype.copy.call(this,t),this.drawMode=t.drawMode,t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t=this.geometry;if(t.isBufferGeometry){t=t.morphAttributes;var e=Object.keys(t);if(0<e.length){var i=t[e[0]];if(i!==void 0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++){var n=i[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}else if(i=t.morphTargets,i!==void 0&&0<i.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++)n=i[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t},raycast:function(){function t(P,k,N,J,V,ot,T,A){return(k.side===1?J.intersectTriangle(T,ot,V,!0,A):J.intersectTriangle(V,ot,T,k.side!==2,A))===null?null:(S.copy(A),S.applyMatrix4(P.matrixWorld),k=N.ray.origin.distanceTo(S),k<N.near||k>N.far?null:{distance:k,point:S.clone(),object:P})}function e(P,k,N,J,V,ot,T,A,tt){return o.fromBufferAttribute(V,T),s.fromBufferAttribute(V,A),a.fromBufferAttribute(V,tt),(P=t(P,k,N,J,o,s,a,w))&&(ot&&(u.fromBufferAttribute(ot,T),d.fromBufferAttribute(ot,A),g.fromBufferAttribute(ot,tt),P.uv=Ce.getUV(w,o,s,a,u,d,g,new Z)),ot=new C(T,A,tt),Ce.getNormal(o,s,a,ot.normal),P.face=ot),P}var i=new ft,n=new bi,r=new Ot,o=new x,s=new x,a=new x,h=new x,l=new x,c=new x,u=new Z,d=new Z,g=new Z,w=new x,S=new x;return function(P,k){var N=this.geometry,J=this.material,V=this.matrixWorld;if(J!==void 0&&(N.boundingSphere===null&&N.computeBoundingSphere(),r.copy(N.boundingSphere),r.applyMatrix4(V),P.ray.intersectsSphere(r)!==!1&&(i.getInverse(V),n.copy(P.ray).applyMatrix4(i),N.boundingBox===null||n.intersectsBox(N.boundingBox)!==!1))){if(N.isBufferGeometry){var ot=N.index,T=N.attributes.position,A=N.attributes.uv,tt=N.groups;N=N.drawRange;var _t;if(ot!==null)if(Array.isArray(J)){var vt=0;for(_t=tt.length;vt<_t;vt++){var lt=tt[vt],Ht=J[lt.materialIndex];V=Math.max(lt.start,N.start);var Dt=Math.min(lt.start+lt.count,N.start+N.count);for(lt=V;lt<Dt;lt+=3){V=ot.getX(lt);var $t=ot.getX(lt+1),Xt=ot.getX(lt+2);(V=e(this,Ht,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(lt/3),k.push(V))}}}else for(V=Math.max(0,N.start),Dt=Math.min(ot.count,N.start+N.count),vt=V,_t=Dt;vt<_t;vt+=3)V=ot.getX(vt),$t=ot.getX(vt+1),Xt=ot.getX(vt+2),(V=e(this,J,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(vt/3),k.push(V));else if(T!==void 0)if(Array.isArray(J))for(vt=0,_t=tt.length;vt<_t;vt++)for(lt=tt[vt],Ht=J[lt.materialIndex],V=Math.max(lt.start,N.start),Dt=Math.min(lt.start+lt.count,N.start+N.count),lt=V;lt<Dt;lt+=3)V=lt,$t=lt+1,Xt=lt+2,(V=e(this,Ht,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(lt/3),k.push(V));else for(V=Math.max(0,N.start),Dt=Math.min(T.count,N.start+N.count),vt=V,_t=Dt;vt<_t;vt+=3)V=vt,$t=vt+1,Xt=vt+2,(V=e(this,J,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(vt/3),k.push(V))}else if(N.isGeometry){for(T=Array.isArray(J),A=N.vertices,tt=N.faces,V=N.faceVertexUvs[0],0<V.length&&(ot=V),lt=0,Dt=tt.length;lt<Dt;lt++)if($t=tt[lt],V=T?J[$t.materialIndex]:J,V!==void 0){if(vt=A[$t.a],_t=A[$t.b],Ht=A[$t.c],V.morphTargets===!0){Xt=N.morphTargets;var Qt=this.morphTargetInfluences;o.set(0,0,0),s.set(0,0,0),a.set(0,0,0);for(var re=0,me=Xt.length;re<me;re++){var Ae=Qt[re];if(Ae!==0){var fi=Xt[re].vertices;o.addScaledVector(h.subVectors(fi[$t.a],vt),Ae),s.addScaledVector(l.subVectors(fi[$t.b],_t),Ae),a.addScaledVector(c.subVectors(fi[$t.c],Ht),Ae)}}o.add(vt),s.add(_t),a.add(Ht),vt=o,_t=s,Ht=a}(V=t(this,V,P,n,vt,_t,Ht,w))&&(ot&&ot[lt]&&(Xt=ot[lt],u.copy(Xt[0]),d.copy(Xt[1]),g.copy(Xt[2]),V.uv=Ce.getUV(w,vt,_t,Ht,u,d,g,new Z)),V.face=$t,V.faceIndex=lt,k.push(V))}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),_.prototype=Object.create(Ct.prototype),_.prototype.constructor=_,_.prototype.isCubeTexture=!0,Object.defineProperty(_.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),D.prototype=Object.create(Ct.prototype),D.prototype.constructor=D,D.prototype.isDataTexture3D=!0;var pa=new Ct,uh=new D,da=new _,fa=[],ma=[],ga=new Float32Array(16),va=new Float32Array(9),ya=new Float32Array(4);tr.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),$(e,t)},Nr.prototype.setValue=function(t,e,i){for(var n=this.seq,r=0,o=n.length;r!==o;++r){var s=n[r];s.setValue(t,e[s.id],i)}};var Cs=/([\w\d_]+)(\])?(\[|\.)?/g;on.prototype.setValue=function(t,e,i){e=this.map[e],e!==void 0&&e.setValue(t,i,this.renderer)},on.prototype.setOptional=function(t,e,i){e=e[i],e!==void 0&&this.setValue(t,i,e)},on.upload=function(t,e,i,n){for(var r=0,o=e.length;r!==o;++r){var s=e[r],a=i[s.id];a.needsUpdate!==!1&&s.setValue(t,a.value,n)}},on.seqWithValue=function(t,e){for(var i=[],n=0,r=t.length;n!==r;++n){var o=t[n];o.id in e&&i.push(o)}return i};var ph=0,dh=0;Et.prototype=Object.create(fe.prototype),Et.prototype.constructor=Et,Et.prototype.isMeshDepthMaterial=!0,Et.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},yt.prototype=Object.create(fe.prototype),yt.prototype.constructor=yt,yt.prototype.isMeshDistanceMaterial=!0,yt.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pe.prototype=Object.assign(Object.create(b.prototype),{constructor:Pe,isGroup:!0}),Kt.prototype=Object.assign(Object.create(b.prototype),{constructor:Kt,isCamera:!0,copy:function(t,e){return b.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this},getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new x),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){b.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return new this.constructor().copy(this)}}),Bt.prototype=Object.assign(Object.create(Kt.prototype),{constructor:Bt,isPerspectiveCamera:!0,copy:function(t,e){return Kt.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){t=.5*this.getFilmHeight()/t,this.fov=2*Se.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Se.DEG2RAD*this.fov);return .5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Se.RAD2DEG*Math.atan(Math.tan(.5*Se.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,i,n,r,o){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Se.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,r=-.5*n,o=this.view;if(this.view!==null&&this.view.enabled){var s=o.fullWidth,a=o.fullHeight;r+=o.offsetX*n/s,e-=o.offsetY*i/a,n*=o.width/s,i*=o.height/a}o=this.filmOffset,o!==0&&(r+=t*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,e,e-i,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=b.prototype.toJSON.call(this,t),t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),te.prototype=Object.assign(Object.create(Bt.prototype),{constructor:te,isArrayCamera:!0});var _a=new x,xa=new x;Jt.prototype.isFogExp2=!0,Jt.prototype.clone=function(){return new Jt(this.color,this.density)},Jt.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},yi.prototype.isFog=!0,yi.prototype.clone=function(){return new yi(this.color,this.near,this.far)},yi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},qi.prototype=Object.assign(Object.create(b.prototype),{constructor:qi,copy:function(t,e){return b.prototype.copy.call(this,t,e),t.background!==null&&(this.background=t.background.clone()),t.fog!==null&&(this.fog=t.fog.clone()),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=b.prototype.toJSON.call(this,t);return this.background!==null&&(e.object.background=this.background.toJSON(t)),this.fog!==null&&(e.object.fog=this.fog.toJSON()),e}}),Object.defineProperty(Ge.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(Ge.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=t!==void 0?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.stride,i*=e.stride;for(var n=0,r=this.stride;n<r;n++)this.array[t+n]=e.array[i+n];return this},set:function(t,e){return e===void 0&&(e=0),this.array.set(t,e),this},clone:function(){return new this.constructor().copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Object.defineProperties(He.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(He.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this.data.array[t+3]=r,this}}),We.prototype=Object.create(fe.prototype),We.prototype.constructor=We,We.prototype.isSpriteMaterial=!0,We.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this};var Rr;ei.prototype=Object.assign(Object.create(b.prototype),{constructor:ei,isSprite:!0,raycast:function(){function t(g,w,S,P,k,N){r.subVectors(g,S).addScalar(.5).multiply(P),k!==void 0?(o.x=N*r.x-k*r.y,o.y=k*r.x+N*r.y):o.copy(r),g.copy(w),g.x+=o.x,g.y+=o.y,g.applyMatrix4(s)}var e=new x,i=new x,n=new x,r=new Z,o=new Z,s=new ft,a=new x,h=new x,l=new x,c=new Z,u=new Z,d=new Z;return function(g,w){i.setFromMatrixScale(this.matrixWorld),s.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var S=this.material.rotation;if(S!==0)var P=Math.cos(S),k=Math.sin(S);S=this.center,t(a.set(-.5,-.5,0),n,S,i,k,P),t(h.set(.5,-.5,0),n,S,i,k,P),t(l.set(.5,.5,0),n,S,i,k,P),c.set(0,0),u.set(1,0),d.set(1,1);var N=g.ray.intersectTriangle(a,h,l,!1,e);N===null&&(t(h.set(-.5,.5,0),n,S,i,k,P),u.set(0,1),N=g.ray.intersectTriangle(a,l,h,!1,e),N===null)||(k=g.ray.origin.distanceTo(e),k<g.near||k>g.far||w.push({distance:k,point:e.clone(),uv:Ce.getUV(e,a,h,l,c,u,d,new Z),face:null,object:this}))}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return b.prototype.copy.call(this,t),t.center!==void 0&&this.center.copy(t.center),this}}),ii.prototype=Object.assign(Object.create(b.prototype),{constructor:ii,copy:function(t){b.prototype.copy.call(this,t,!1),t=t.levels;for(var e=0,i=t.length;e<i;e++){var n=t[e];this.addLevel(n.object.clone(),n.distance)}return this},addLevel:function(t,e){e===void 0&&(e=0),e=Math.abs(e);for(var i=this.levels,n=0;n<i.length&&!(e<i[n].distance);n++);i.splice(n,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,i=1,n=e.length;i<n&&!(t<e[i].distance);i++);return e[i-1].object},raycast:function(){var t=new x;return function(e,i){t.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(t);this.getObjectForDistance(n).raycast(e,i)}}(),update:function(){var t=new x,e=new x;return function(i){var n=this.levels;if(1<n.length){t.setFromMatrixPosition(i.matrixWorld),e.setFromMatrixPosition(this.matrixWorld),i=t.distanceTo(e),n[0].object.visible=!0;for(var r=1,o=n.length;r<o&&i>=n[r].distance;r++)n[r-1].object.visible=!1,n[r].object.visible=!0;for(;r<o;r++)n[r].object.visible=!1}}}(),toJSON:function(t){t=b.prototype.toJSON.call(this,t),t.object.levels=[];for(var e=this.levels,i=0,n=e.length;i<n;i++){var r=e[i];t.object.levels.push({object:r.object.uuid,distance:r.distance})}return t}}),Object.assign(ai.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new ft;this.bones[t]&&i.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(i)}},pose:function(){var t,e,i=0;for(e=this.bones.length;i<e;i++)(t=this.bones[i])&&t.matrixWorld.getInverse(this.boneInverses[i]);for(i=0,e=this.bones.length;i<e;i++)(t=this.bones[i])&&(t.parent&&t.parent.isBone?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},update:function(){var t=new ft,e=new ft;return function(){for(var i=this.bones,n=this.boneInverses,r=this.boneMatrices,o=this.boneTexture,s=0,a=i.length;s<a;s++)t.multiplyMatrices(i[s]?i[s].matrixWorld:e,n[s]),t.toArray(r,16*s);o!==void 0&&(o.needsUpdate=!0)}}(),clone:function(){return new ai(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,i=this.bones.length;e<i;e++){var n=this.bones[e];if(n.name===t)return n}}}),hi.prototype=Object.assign(Object.create(b.prototype),{constructor:hi,isBone:!0}),ke.prototype=Object.assign(Object.create(Ke.prototype),{constructor:ke,isSkinnedMesh:!0,initBones:function(){var t=[],e;if(this.geometry&&this.geometry.bones!==void 0){var i=0;for(e=this.geometry.bones.length;i<e;i++){var n=this.geometry.bones[i],r=new hi;t.push(r),r.name=n.name,r.position.fromArray(n.pos),r.quaternion.fromArray(n.rotq),n.scl!==void 0&&r.scale.fromArray(n.scl)}for(i=0,e=this.geometry.bones.length;i<e;i++)n=this.geometry.bones[i],n.parent!==-1&&n.parent!==null&&t[n.parent]!==void 0?t[n.parent].add(t[i]):this.add(t[i])}return this.updateMatrixWorld(!0),t},bind:function(t,e){this.skeleton=t,e===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t;if(this.geometry&&this.geometry.isGeometry)for(t=0;t<this.geometry.skinWeights.length;t++){var e=this.geometry.skinWeights[t],i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){e=new Y;var n=this.geometry.attributes.skinWeight;for(t=0;t<n.count;t++)e.x=n.getX(t),e.y=n.getY(t),e.z=n.getZ(t),e.w=n.getW(t),i=1/e.manhattanLength(),i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),n.setXYZW(t,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(t){Ke.prototype.updateMatrixWorld.call(this,t),this.bindMode==="attached"?this.bindMatrixInverse.getInverse(this.matrixWorld):this.bindMode==="detached"?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ne.prototype=Object.create(fe.prototype),Ne.prototype.constructor=Ne,Ne.prototype.isLineBasicMaterial=!0,Ne.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},qe.prototype=Object.assign(Object.create(b.prototype),{constructor:qe,isLine:!0,computeLineDistances:function(){var t=new x,e=new x;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,r=[0],o=1,s=n.count;o<s;o++)t.fromBufferAttribute(n,o-1),e.fromBufferAttribute(n,o),r[o]=r[o-1],r[o]+=t.distanceTo(e);i.addAttribute("lineDistance",new ut(r,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,r=i.lineDistances,r[0]=0,o=1,s=n.length;o<s;o++)r[o]=r[o-1],r[o]+=n[o-1].distanceTo(n[o]);return this}}(),raycast:function(){var t=new ft,e=new bi,i=new Ot;return function(n,r){var o=n.linePrecision,s=this.geometry,a=this.matrixWorld;if(s.boundingSphere===null&&s.computeBoundingSphere(),i.copy(s.boundingSphere),i.applyMatrix4(a),i.radius+=o,n.ray.intersectsSphere(i)!==!1){t.getInverse(a),e.copy(n.ray).applyMatrix4(t),o/=(this.scale.x+this.scale.y+this.scale.z)/3,o*=o;var h=new x,l=new x;a=new x;var c=new x,u=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var d=s.index,g=s.attributes.position.array;if(d!==null){d=d.array,s=0;for(var w=d.length-1;s<w;s+=u){var S=d[s+1];h.fromArray(g,3*d[s]),l.fromArray(g,3*S),S=e.distanceSqToSegment(h,l,c,a),S>o||(c.applyMatrix4(this.matrixWorld),S=n.ray.origin.distanceTo(c),S<n.near||S>n.far||r.push({distance:S,point:a.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}}else for(s=0,w=g.length/3-1;s<w;s+=u)h.fromArray(g,3*s),l.fromArray(g,3*s+3),S=e.distanceSqToSegment(h,l,c,a),S>o||(c.applyMatrix4(this.matrixWorld),S=n.ray.origin.distanceTo(c),S<n.near||S>n.far||r.push({distance:S,point:a.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}else if(s.isGeometry)for(h=s.vertices,l=h.length,s=0;s<l-1;s+=u)S=e.distanceSqToSegment(h[s],h[s+1],c,a),S>o||(c.applyMatrix4(this.matrixWorld),S=n.ray.origin.distanceTo(c),S<n.near||S>n.far||r.push({distance:S,point:a.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}}}(),copy:function(t){return b.prototype.copy.call(this,t),this.geometry.copy(t.geometry),this.material.copy(t.material),this},clone:function(){return new this.constructor().copy(this)}}),be.prototype=Object.assign(Object.create(qe.prototype),{constructor:be,isLineSegments:!0,computeLineDistances:function(){var t=new x,e=new x;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,r=[],o=0,s=n.count;o<s;o+=2)t.fromBufferAttribute(n,o),e.fromBufferAttribute(n,o+1),r[o]=o===0?0:r[o-1],r[o+1]=r[o]+t.distanceTo(e);i.addAttribute("lineDistance",new ut(r,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,r=i.lineDistances,o=0,s=n.length;o<s;o+=2)t.copy(n[o]),e.copy(n[o+1]),r[o]=o===0?0:r[o-1],r[o+1]=r[o]+t.distanceTo(e);return this}}()}),an.prototype=Object.assign(Object.create(qe.prototype),{constructor:an,isLineLoop:!0}),xi.prototype=Object.create(fe.prototype),xi.prototype.constructor=xi,xi.prototype.isPointsMaterial=!0,xi.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.morphTargets=t.morphTargets,this},nr.prototype=Object.assign(Object.create(b.prototype),{constructor:nr,isPoints:!0,raycast:function(){var t=new ft,e=new bi,i=new Ot;return function(n,r){function o(P,k){var N=e.distanceSqToPoint(P);N<c&&(e.closestPointToPoint(P,u),u.applyMatrix4(h),P=n.ray.origin.distanceTo(u),P<n.near||P>n.far||r.push({distance:P,distanceToRay:Math.sqrt(N),point:u.clone(),index:k,face:null,object:s}))}var s=this,a=this.geometry,h=this.matrixWorld,l=n.params.Points.threshold;if(a.boundingSphere===null&&a.computeBoundingSphere(),i.copy(a.boundingSphere),i.applyMatrix4(h),i.radius+=l,n.ray.intersectsSphere(i)!==!1){t.getInverse(h),e.copy(n.ray).applyMatrix4(t),l/=(this.scale.x+this.scale.y+this.scale.z)/3;var c=l*l;l=new x;var u=new x;if(a.isBufferGeometry){var d=a.index;if(a=a.attributes.position.array,d!==null){var g=d.array;d=0;for(var w=g.length;d<w;d++){var S=g[d];l.fromArray(a,3*S),o(l,S)}}else for(d=0,g=a.length/3;d<g;d++)l.fromArray(a,3*d),o(l,d)}else for(l=a.vertices,d=0,g=l.length;d<g;d++)o(l[d],d)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),os.prototype=Object.assign(Object.create(Ct.prototype),{constructor:os,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),rr.prototype=Object.create(Ct.prototype),rr.prototype.constructor=rr,rr.prototype.isCompressedTexture=!0,Ur.prototype=Object.create(Ct.prototype),Ur.prototype.constructor=Ur,Ur.prototype.isCanvasTexture=!0,Fr.prototype=Object.create(Ct.prototype),Fr.prototype.constructor=Fr,Fr.prototype.isDepthTexture=!0,or.prototype=Object.create(Rt.prototype),or.prototype.constructor=or,Gr.prototype=Object.create(F.prototype),Gr.prototype.constructor=Gr,sr.prototype=Object.create(Rt.prototype),sr.prototype.constructor=sr,Hr.prototype=Object.create(F.prototype),Hr.prototype.constructor=Hr,zi.prototype=Object.create(Rt.prototype),zi.prototype.constructor=zi,kr.prototype=Object.create(F.prototype),kr.prototype.constructor=kr,ar.prototype=Object.create(zi.prototype),ar.prototype.constructor=ar,jr.prototype=Object.create(F.prototype),jr.prototype.constructor=jr,Dn.prototype=Object.create(zi.prototype),Dn.prototype.constructor=Dn,Vr.prototype=Object.create(F.prototype),Vr.prototype.constructor=Vr,hr.prototype=Object.create(zi.prototype),hr.prototype.constructor=hr,Wr.prototype=Object.create(F.prototype),Wr.prototype.constructor=Wr,lr.prototype=Object.create(zi.prototype),lr.prototype.constructor=lr,Xr.prototype=Object.create(F.prototype),Xr.prototype.constructor=Xr,cr.prototype=Object.create(Rt.prototype),cr.prototype.constructor=cr,qr.prototype=Object.create(F.prototype),qr.prototype.constructor=qr,ur.prototype=Object.create(Rt.prototype),ur.prototype.constructor=ur,Yr.prototype=Object.create(F.prototype),Yr.prototype.constructor=Yr,pr.prototype=Object.create(Rt.prototype),pr.prototype.constructor=pr;var fh={triangulate:function(t,e,i){i=i||2;var n=e&&e.length,r=n?e[0]*i:t.length,o=js(t,0,r,i,!0),s=[];if(!o)return s;var a;if(n){var h=i;n=[];var l,c=0;for(l=e.length;c<l;c++){var u=e[c]*h,d=c<l-1?e[c+1]*h:t.length;u=js(t,u,d,h,!1),u===u.next&&(u.steiner=!0),n.push(ih(u))}for(n.sort(th),c=0;c<n.length;c++)e=n[c],h=o,(h=eh(e,h))&&(e=Ws(h,e),Zr(e,e.next)),o=Zr(o,o.next)}if(t.length>80*i){var g=a=t[0],w=n=t[1];for(h=i;h<r;h+=i)c=t[h],e=t[h+1],c<g&&(g=c),e<w&&(w=e),c>a&&(a=c),e>n&&(n=e);a=Math.max(a-g,n-w),a=a!==0?1/a:0}return Jr(o,s,i,g,w,a),s}},wn={area:function(t){for(var e=t.length,i=0,n=e-1,r=0;r<e;n=r++)i+=t[n].x*t[r].y-t[r].x*t[n].y;return .5*i},isClockWise:function(t){return 0>wn.area(t)},triangulateShape:function(t,e){var i=[],n=[],r=[];qs(t),Ys(i,t);var o=t.length;for(e.forEach(qs),t=0;t<e.length;t++)n.push(o),o+=e[t].length,Ys(i,e[t]);for(e=fh.triangulate(i,n),t=0;t<e.length;t+=3)r.push(e.slice(t,t+3));return r}};Nn.prototype=Object.create(F.prototype),Nn.prototype.constructor=Nn,Nn.prototype.toJSON=function(){var t=F.prototype.toJSON.call(this);return Zs(this.parameters.shapes,this.parameters.options,t)},hn.prototype=Object.create(Rt.prototype),hn.prototype.constructor=hn,hn.prototype.toJSON=function(){var t=Rt.prototype.toJSON.call(this);return Zs(this.parameters.shapes,this.parameters.options,t)};var mh={generateTopUV:function(t,e,i,n,r){t=e[3*n],n=e[3*n+1];var o=e[3*r];return r=e[3*r+1],[new Z(e[3*i],e[3*i+1]),new Z(t,n),new Z(o,r)]},generateSideWallUV:function(t,e,i,n,r,o){t=e[3*i];var s=e[3*i+1];i=e[3*i+2];var a=e[3*n],h=e[3*n+1];n=e[3*n+2];var l=e[3*r],c=e[3*r+1];r=e[3*r+2];var u=e[3*o],d=e[3*o+1];return e=e[3*o+2],.01>Math.abs(s-h)?[new Z(t,1-i),new Z(a,1-n),new Z(l,1-r),new Z(u,1-e)]:[new Z(s,1-i),new Z(h,1-n),new Z(c,1-r),new Z(d,1-e)]}};Kr.prototype=Object.create(F.prototype),Kr.prototype.constructor=Kr,dr.prototype=Object.create(hn.prototype),dr.prototype.constructor=dr,to.prototype=Object.create(F.prototype),to.prototype.constructor=to,Bn.prototype=Object.create(Rt.prototype),Bn.prototype.constructor=Bn,eo.prototype=Object.create(F.prototype),eo.prototype.constructor=eo,fr.prototype=Object.create(Rt.prototype),fr.prototype.constructor=fr,io.prototype=Object.create(F.prototype),io.prototype.constructor=io,mr.prototype=Object.create(Rt.prototype),mr.prototype.constructor=mr,Un.prototype=Object.create(F.prototype),Un.prototype.constructor=Un,Un.prototype.toJSON=function(){var t=F.prototype.toJSON.call(this);return Js(this.parameters.shapes,t)},Fn.prototype=Object.create(Rt.prototype),Fn.prototype.constructor=Fn,Fn.prototype.toJSON=function(){var t=Rt.prototype.toJSON.call(this);return Js(this.parameters.shapes,t)},gr.prototype=Object.create(Rt.prototype),gr.prototype.constructor=gr,Gn.prototype=Object.create(F.prototype),Gn.prototype.constructor=Gn,vn.prototype=Object.create(Rt.prototype),vn.prototype.constructor=vn,no.prototype=Object.create(Gn.prototype),no.prototype.constructor=no,ro.prototype=Object.create(vn.prototype),ro.prototype.constructor=ro,oo.prototype=Object.create(F.prototype),oo.prototype.constructor=oo,vr.prototype=Object.create(Rt.prototype),vr.prototype.constructor=vr;var Bi=Object.freeze({WireframeGeometry:or,ParametricGeometry:Gr,ParametricBufferGeometry:sr,TetrahedronGeometry:kr,TetrahedronBufferGeometry:ar,OctahedronGeometry:jr,OctahedronBufferGeometry:Dn,IcosahedronGeometry:Vr,IcosahedronBufferGeometry:hr,DodecahedronGeometry:Wr,DodecahedronBufferGeometry:lr,PolyhedronGeometry:Hr,PolyhedronBufferGeometry:zi,TubeGeometry:Xr,TubeBufferGeometry:cr,TorusKnotGeometry:qr,TorusKnotBufferGeometry:ur,TorusGeometry:Yr,TorusBufferGeometry:pr,TextGeometry:Kr,TextBufferGeometry:dr,SphereGeometry:to,SphereBufferGeometry:Bn,RingGeometry:eo,RingBufferGeometry:fr,PlaneGeometry:Ti,PlaneBufferGeometry:oi,LatheGeometry:io,LatheBufferGeometry:mr,ShapeGeometry:Un,ShapeBufferGeometry:Fn,ExtrudeGeometry:Nn,ExtrudeBufferGeometry:hn,EdgesGeometry:gr,ConeGeometry:no,ConeBufferGeometry:ro,CylinderGeometry:Gn,CylinderBufferGeometry:vn,CircleGeometry:oo,CircleBufferGeometry:vr,BoxGeometry:Fe,BoxBufferGeometry:vi});Hn.prototype=Object.create(fe.prototype),Hn.prototype.constructor=Hn,Hn.prototype.isShadowMaterial=!0,Hn.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this},yr.prototype=Object.create(Je.prototype),yr.prototype.constructor=yr,yr.prototype.isRawShaderMaterial=!0,ln.prototype=Object.create(fe.prototype),ln.prototype.constructor=ln,ln.prototype.isMeshStandardMaterial=!0,ln.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},kn.prototype=Object.create(ln.prototype),kn.prototype.constructor=kn,kn.prototype.isMeshPhysicalMaterial=!0,kn.prototype.copy=function(t){return ln.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},Yi.prototype=Object.create(fe.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isMeshPhongMaterial=!0,Yi.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},jn.prototype=Object.create(Yi.prototype),jn.prototype.constructor=jn,jn.prototype.isMeshToonMaterial=!0,jn.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Vn.prototype=Object.create(fe.prototype),Vn.prototype.constructor=Vn,Vn.prototype.isMeshNormalMaterial=!0,Vn.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Wn.prototype=Object.create(fe.prototype),Wn.prototype.constructor=Wn,Wn.prototype.isMeshLambertMaterial=!0,Wn.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Xn.prototype=Object.create(fe.prototype),Xn.prototype.constructor=Xn,Xn.prototype.isMeshMatcapMaterial=!0,Xn.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},qn.prototype=Object.create(Ne.prototype),qn.prototype.constructor=qn,qn.prototype.isLineDashedMaterial=!0,qn.prototype.copy=function(t){return Ne.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var gh=Object.freeze({ShadowMaterial:Hn,SpriteMaterial:We,RawShaderMaterial:yr,ShaderMaterial:Je,PointsMaterial:xi,MeshPhysicalMaterial:kn,MeshStandardMaterial:ln,MeshPhongMaterial:Yi,MeshToonMaterial:jn,MeshNormalMaterial:Vn,MeshLambertMaterial:Wn,MeshDepthMaterial:Et,MeshDistanceMaterial:yt,MeshBasicMaterial:je,MeshMatcapMaterial:Xn,LineDashedMaterial:qn,LineBasicMaterial:Ne,Material:fe}),Ai={arraySlice:function(t,e,i){return Ai.isTypedArray(t)?new t.constructor(t.subarray(e,i!==void 0?i:t.length)):t.slice(e,i)},convertArray:function(t,e,i){return!t||!i&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,i=Array(e),n=0;n!==e;++n)i[n]=n;return i.sort(function(r,o){return t[r]-t[o]}),i},sortedArray:function(t,e,i){for(var n=t.length,r=new t.constructor(n),o=0,s=0;s!==n;++o)for(var a=i[o]*e,h=0;h!==e;++h)r[s++]=t[a+h];return r},flattenJSON:function(t,e,i,n){for(var r=1,o=t[0];o!==void 0&&o[n]===void 0;)o=t[r++];if(o!==void 0){var s=o[n];if(s!==void 0)if(Array.isArray(s))do s=o[n],s!==void 0&&(e.push(o.time),i.push.apply(i,s)),o=t[r++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[n],s!==void 0&&(e.push(o.time),s.toArray(i,i.length)),o=t[r++];while(o!==void 0);else do s=o[n],s!==void 0&&(e.push(o.time),i.push(s)),o=t[r++];while(o!==void 0)}}};Object.assign(Hi.prototype,{evaluate:function(t){var e=this.parameterPositions,i=this._cachedIndex,n=e[i],r=e[i-1];t:{e:{i:{n:if(!(t<n)){for(var o=i+2;;){if(n===void 0){if(t<r)break n;return this._cachedIndex=i=e.length,this.afterEnd_(i-1,t,r)}if(i===o)break;if(r=n,n=e[++i],t<n)break e}n=e.length;break i}if(t>=r)break t;for(o=e[1],t<o&&(i=2,r=o),o=i-2;;){if(r===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===o)break;if(n=r,r=e[--i-1],t>=r)break e}n=i,i=0}for(;i<n;)r=i+n>>>1,t<e[r]?n=r:i=r+1;if(n=e[i],r=e[i-1],r===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(n===void 0)return this._cachedIndex=i=e.length,this.afterEnd_(i-1,r,t)}this._cachedIndex=i,this.intervalChanged_(i,r,n)}return this.interpolate_(i,r,t,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){var e=this.resultBuffer,i=this.sampleValues,n=this.valueSize;t*=n;for(var r=0;r!==n;++r)e[r]=i[t+r];return e},interpolate_:function(){throw Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(Hi.prototype,{beforeStart_:Hi.prototype.copySampleValue_,afterEnd_:Hi.prototype.copySampleValue_}),Ao.prototype=Object.assign(Object.create(Hi.prototype),{constructor:Ao,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,r=t-2,o=t+1,s=n[r],a=n[o];if(s===void 0)switch(this.getSettings_().endingStart){case 2401:r=t,s=2*e-i;break;case 2402:r=n.length-2,s=e+n[r]-n[r+1];break;default:r=t,s=i}if(a===void 0)switch(this.getSettings_().endingEnd){case 2401:o=t,a=2*i-e;break;case 2402:o=1,a=i+n[1]-n[0];break;default:o=t-1,a=e}t=.5*(i-e),n=this.valueSize,this._weightPrev=t/(e-s),this._weightNext=t/(a-i),this._offsetPrev=r*n,this._offsetNext=o*n},interpolate_:function(t,e,i,n){var r=this.resultBuffer,o=this.sampleValues,s=this.valueSize;t*=s;var a=t-s,h=this._offsetPrev,l=this._offsetNext,c=this._weightPrev,u=this._weightNext,d=(i-e)/(n-e);for(i=d*d,n=i*d,e=-c*n+2*c*i-c*d,c=(1+c)*n+(-1.5-2*c)*i+(-.5+c)*d+1,d=(-1-u)*n+(1.5+u)*i+.5*d,u=u*n-u*i,i=0;i!==s;++i)r[i]=e*o[h+i]+c*o[a+i]+d*o[t+i]+u*o[l+i];return r}}),so.prototype=Object.assign(Object.create(Hi.prototype),{constructor:so,interpolate_:function(t,e,i,n){var r=this.resultBuffer,o=this.sampleValues,s=this.valueSize;t*=s;var a=t-s;for(e=(i-e)/(n-e),i=1-e,n=0;n!==s;++n)r[n]=o[a+n]*i+o[t+n]*e;return r}}),Lo.prototype=Object.assign(Object.create(Hi.prototype),{constructor:Lo,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(wi,{toJSON:function(t){var e=t.constructor;if(e.toJSON!==void 0)e=e.toJSON(t);else{e={name:t.name,times:Ai.convertArray(t.times,Array),values:Ai.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e}}),Object.assign(wi.prototype,{constructor:wi,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new Lo(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new so(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Ao(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){switch(t){case 2300:var e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(e===void 0){if(e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name,this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(e);return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(t!==0)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]+=t;return this},scale:function(t){if(t!==1)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]*=t;return this},trim:function(t,e){for(var i=this.times,n=i.length,r=0,o=n-1;r!==n&&i[r]<t;)++r;for(;o!==-1&&i[o]>e;)--o;return++o,(r!==0||o!==n)&&(r>=o&&(o=Math.max(o,1),r=o-1),t=this.getValueSize(),this.times=Ai.arraySlice(i,r,o),this.values=Ai.arraySlice(this.values,r*t,o*t)),this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var i=this.times;e=this.values;var n=i.length;n===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var r=null,o=0;o!==n;o++){var s=i[o];if(typeof s=="number"&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),t=!1;break}if(r!==null&&r>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,s,r),t=!1;break}r=s}if(e!==void 0&&Ai.isTypedArray(e)){for(o=0,i=e.length;o!==i;++o)if(n=e[o],isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,n),t=!1;break}}return t},optimize:function(){for(var t=this.times,e=this.values,i=this.getValueSize(),n=this.getInterpolation()===2302,r=1,o=t.length-1,s=1;s<o;++s){var a=!1,h=t[s];if(h!==t[s+1]&&(s!==1||h!==h[0]))if(n)a=!0;else{var l=s*i,c=l-i,u=l+i;for(h=0;h!==i;++h){var d=e[l+h];if(d!==e[c+h]||d!==e[u+h]){a=!0;break}}}if(a){if(s!==r)for(t[r]=t[s],a=s*i,l=r*i,h=0;h!==i;++h)e[l+h]=e[a+h];++r}}if(0<o){for(t[r]=t[o],a=o*i,l=r*i,h=0;h!==i;++h)e[l+h]=e[a+h];++r}return r!==t.length&&(this.times=Ai.arraySlice(t,0,r),this.values=Ai.arraySlice(e,0,r*i)),this}}),bo.prototype=Object.assign(Object.create(wi.prototype),{constructor:bo,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ro.prototype=Object.assign(Object.create(wi.prototype),{constructor:Ro,ValueTypeName:"color"}),_r.prototype=Object.assign(Object.create(wi.prototype),{constructor:_r,ValueTypeName:"number"}),Co.prototype=Object.assign(Object.create(Hi.prototype),{constructor:Co,interpolate_:function(t,e,i,n){var r=this.resultBuffer,o=this.sampleValues,s=this.valueSize;for(t*=s,e=(i-e)/(n-e),i=t+s;t!==i;t+=4)at.slerpFlat(r,0,o,t-s,o,t,e);return r}}),ao.prototype=Object.assign(Object.create(wi.prototype),{constructor:ao,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new Co(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),Oo.prototype=Object.assign(Object.create(wi.prototype),{constructor:Oo,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),xr.prototype=Object.assign(Object.create(wi.prototype),{constructor:xr,ValueTypeName:"vector"}),Object.assign(ki,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),r=0,o=i.length;r!==o;++r)e.push(rh(i[r]).scale(n));return new ki(t.name,t.duration,e)},toJSON:function(t){var e=[],i=t.tracks;t={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid};for(var n=0,r=i.length;n!==r;++n)e.push(wi.toJSON(i[n]));return t},CreateFromMorphTargetSequence:function(t,e,i,n){for(var r=e.length,o=[],s=0;s<r;s++){var a=[],h=[];a.push((s+r-1)%r,s,(s+1)%r),h.push(0,1,0);var l=Ai.getKeyframeOrder(a);a=Ai.sortedArray(a,1,l),h=Ai.sortedArray(h,1,l),n||a[0]!==0||(a.push(r),h.push(h[0])),o.push(new _r(".morphTargetInfluences["+e[s].name+"]",a,h).scale(1/i))}return new ki(t,-1,o)},findByName:function(t,e){var i=t;for(Array.isArray(t)||(i=t.geometry&&t.geometry.animations||t.animations),t=0;t<i.length;t++)if(i[t].name===e)return i[t];return null},CreateClipsFromMorphTargetSequences:function(t,e,i){for(var n={},r=/^([\w-]*?)([\d]+)$/,o=0,s=t.length;o<s;o++){var a=t[o],h=a.name.match(r);if(h&&1<h.length){var l=h[1];(h=n[l])||(n[l]=h=[]),h.push(a)}}t=[];for(l in n)t.push(ki.CreateFromMorphTargetSequence(l,n[l],e,i));return t},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var i=function(S,P,k,N,J){if(k.length!==0){var V=[],ot=[];Ai.flattenJSON(k,V,ot,N),V.length!==0&&J.push(new S(P,V,ot))}},n=[],r=t.name||"default",o=t.length||-1,s=t.fps||30;t=t.hierarchy||[];for(var a=0;a<t.length;a++){var h=t[a].keys;if(h&&h.length!==0)if(h[0].morphTargets){o={};for(var l=0;l<h.length;l++)if(h[l].morphTargets)for(var c=0;c<h[l].morphTargets.length;c++)o[h[l].morphTargets[c]]=-1;for(var u in o){var d=[],g=[];for(c=0;c!==h[l].morphTargets.length;++c){var w=h[l];d.push(w.time),g.push(w.morphTarget===u?1:0)}n.push(new _r(".morphTargetInfluence["+u+"]",d,g))}o=o.length*(s||1)}else l=".bones["+e[a].name+"]",i(xr,l+".position",h,"pos",n),i(ao,l+".quaternion",h,"rot",n),i(xr,l+".scale",h,"scl",n)}return n.length===0?null:new ki(r,o,n)}}),Object.assign(ki.prototype,{resetDuration:function(){for(var t=0,e=0,i=this.tracks.length;e!==i;++e){var n=this.tracks[e];t=Math.max(t,n.times[n.times.length-1])}return this.duration=t,this},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},validate:function(){for(var t=!0,e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}});var Zn={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},Oi=new hs,tn={};Object.assign(Xi.prototype,{load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,o=Zn.get(t);if(o!==void 0)return r.manager.itemStart(t),setTimeout(function(){e&&e(o),r.manager.itemEnd(t)},0),o;if(tn[t]!==void 0)tn[t].push({onLoad:e,onProgress:i,onError:n});else{var s=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(s){i=s[1];var a=!!s[2];s=s[3],s=decodeURIComponent(s),a&&(s=atob(s));try{var h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":var l=new Uint8Array(s.length);for(a=0;a<s.length;a++)l[a]=s.charCodeAt(a);var c=h==="blob"?new Blob([l.buffer],{type:i}):l.buffer;break;case"document":c=new DOMParser().parseFromString(s,i);break;case"json":c=JSON.parse(s);break;default:c=s}setTimeout(function(){e&&e(c),r.manager.itemEnd(t)},0)}catch(d){setTimeout(function(){n&&n(d),r.manager.itemError(t),r.manager.itemEnd(t)},0)}}else{tn[t]=[],tn[t].push({onLoad:e,onProgress:i,onError:n});var u=new XMLHttpRequest;u.open("GET",t,!0),u.addEventListener("load",function(d){var g=this.response;Zn.add(t,g);var w=tn[t];if(delete tn[t],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var S=0,P=w.length;S<P;S++){var k=w[S];k.onLoad&&k.onLoad(g)}}else{for(S=0,P=w.length;S<P;S++)k=w[S],k.onError&&k.onError(d);r.manager.itemError(t)}r.manager.itemEnd(t)},!1),u.addEventListener("progress",function(d){for(var g=tn[t],w=0,S=g.length;w<S;w++){var P=g[w];P.onProgress&&P.onProgress(d)}},!1),u.addEventListener("error",function(d){var g=tn[t];delete tn[t];for(var w=0,S=g.length;w<S;w++){var P=g[w];P.onError&&P.onError(d)}r.manager.itemError(t),r.manager.itemEnd(t)},!1),u.addEventListener("abort",function(d){var g=tn[t];delete tn[t];for(var w=0,S=g.length;w<S;w++){var P=g[w];P.onError&&P.onError(d)}r.manager.itemError(t),r.manager.itemEnd(t)},!1),this.responseType!==void 0&&(u.responseType=this.responseType),this.withCredentials!==void 0&&(u.withCredentials=this.withCredentials),u.overrideMimeType&&u.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(a in this.requestHeader)u.setRequestHeader(a,this.requestHeader[a]);u.send(null)}return r.manager.itemStart(t),u}},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Qs.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(r.manager);o.setPath(r.path),o.load(t,function(s){e(r.parse(JSON.parse(s)))},i,n)},parse:function(t,e){for(var i=[],n=0;n<t.length;n++){var r=ki.parse(t[n]);i.push(r)}e(i)},setPath:function(t){return this.path=t,this}}),Object.assign($s.prototype,{load:function(t,e,i,n){function r(d){h.load(t[d],function(g){g=o._parser(g,!0),s[d]={width:g.width,height:g.height,format:g.format,mipmaps:g.mipmaps},l+=1,l===6&&(g.mipmapCount===1&&(a.minFilter=1006),a.format=g.format,a.needsUpdate=!0,e&&e(a))},i,n)}var o=this,s=[],a=new rr;a.image=s;var h=new Xi(this.manager);if(h.setPath(this.path),h.setResponseType("arraybuffer"),Array.isArray(t))for(var l=0,c=0,u=t.length;c<u;++c)r(c);else h.load(t,function(d){if(d=o._parser(d,!0),d.isCubemap)for(var g=d.mipmaps.length/d.mipmapCount,w=0;w<g;w++){s[w]={mipmaps:[]};for(var S=0;S<d.mipmapCount;S++)s[w].mipmaps.push(d.mipmaps[w*d.mipmapCount+S]),s[w].format=d.format,s[w].width=d.width,s[w].height=d.height}else a.image.width=d.width,a.image.height=d.height,a.mipmaps=d.mipmaps;d.mipmapCount===1&&(a.minFilter=1006),a.format=d.format,a.needsUpdate=!0,e&&e(a)},i,n);return a},setPath:function(t){return this.path=t,this}}),Object.assign(ls.prototype,{load:function(t,e,i,n){var r=this,o=new ct,s=new Xi(this.manager);return s.setResponseType("arraybuffer"),s.setPath(this.path),s.load(t,function(a){(a=r._parser(a))&&(a.image!==void 0?o.image=a.image:a.data!==void 0&&(o.image.width=a.width,o.image.height=a.height,o.image.data=a.data),o.wrapS=a.wrapS!==void 0?a.wrapS:1001,o.wrapT=a.wrapT!==void 0?a.wrapT:1001,o.magFilter=a.magFilter!==void 0?a.magFilter:1006,o.minFilter=a.minFilter!==void 0?a.minFilter:1008,o.anisotropy=a.anisotropy!==void 0?a.anisotropy:1,a.format!==void 0&&(o.format=a.format),a.type!==void 0&&(o.type=a.type),a.mipmaps!==void 0&&(o.mipmaps=a.mipmaps),a.mipmapCount===1&&(o.minFilter=1006),o.needsUpdate=!0,e&&e(o,a))},i,n),o},setPath:function(t){return this.path=t,this}}),Object.assign(ho.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function r(){h.removeEventListener("load",r,!1),h.removeEventListener("error",o,!1),Zn.add(t,this),e&&e(this),s.manager.itemEnd(t)}function o(l){h.removeEventListener("load",r,!1),h.removeEventListener("error",o,!1),n&&n(l),s.manager.itemError(t),s.manager.itemEnd(t)}t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var s=this,a=Zn.get(t);if(a!==void 0)return s.manager.itemStart(t),setTimeout(function(){e&&e(a),s.manager.itemEnd(t)},0),a;var h=document.createElementNS("http://www.w3.org/1999/xhtml","img");return h.addEventListener("load",r,!1),h.addEventListener("error",o,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(h.crossOrigin=this.crossOrigin),s.manager.itemStart(t),h.src=t,h},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(cs.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function r(h){s.load(t[h],function(l){o.images[h]=l,a++,a===6&&(o.needsUpdate=!0,e&&e(o))},void 0,n)}var o=new _,s=new ho(this.manager);s.setCrossOrigin(this.crossOrigin),s.setPath(this.path);var a=0;for(i=0;i<t.length;++i)r(i);return o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Io.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var r=new Ct,o=new ho(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(s){r.image=s,s=0<t.search(/\.jpe?g$/i)||t.search(/^data:image\/jpeg/)===0,r.format=s?1022:1023,r.needsUpdate=!0,e!==void 0&&e(r)},i,n),r},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(pe.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){return t=this.getUtoTmapping(t),this.getPoint(t,e)},getPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getSpacedPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(t===void 0&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e=[],i=this.getPoint(0),n,r=0;for(e.push(0),n=1;n<=t;n++){var o=this.getPoint(n/t);r+=o.distanceTo(i),e.push(r),i=o}return this.cacheArcLengths=e},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var i=this.getLengths(),n=i.length;e=e||t*i[n-1];for(var r=0,o=n-1,s;r<=o;)if(t=Math.floor(r+(o-r)/2),s=i[t]-e,0>s)r=t+1;else if(0<s)o=t-1;else{o=t;break}return t=o,i[t]===e?t/(n-1):(r=i[t],(t+(e-r)/(i[t+1]-r))/(n-1))},getTangent:function(t){var e=t-1e-4;return t+=1e-4,0>e&&(e=0),1<t&&(t=1),e=this.getPoint(e),this.getPoint(t).clone().sub(e).normalize()},getTangentAt:function(t){return t=this.getUtoTmapping(t),this.getTangent(t)},computeFrenetFrames:function(t,e){var i=new x,n=[],r=[],o=[],s=new x,a=new ft,h;for(h=0;h<=t;h++){var l=h/t;n[h]=this.getTangentAt(l),n[h].normalize()}r[0]=new x,o[0]=new x,h=Number.MAX_VALUE,l=Math.abs(n[0].x);var c=Math.abs(n[0].y),u=Math.abs(n[0].z);for(l<=h&&(h=l,i.set(1,0,0)),c<=h&&(h=c,i.set(0,1,0)),u<=h&&i.set(0,0,1),s.crossVectors(n[0],i).normalize(),r[0].crossVectors(n[0],s),o[0].crossVectors(n[0],r[0]),h=1;h<=t;h++)r[h]=r[h-1].clone(),o[h]=o[h-1].clone(),s.crossVectors(n[h-1],n[h]),s.length()>Number.EPSILON&&(s.normalize(),i=Math.acos(Se.clamp(n[h-1].dot(n[h]),-1,1)),r[h].applyMatrix4(a.makeRotationAxis(s,i))),o[h].crossVectors(n[h],r[h]);if(e===!0)for(i=Math.acos(Se.clamp(r[0].dot(r[t]),-1,1)),i/=t,0<n[0].dot(s.crossVectors(r[0],r[t]))&&(i=-i),h=1;h<=t;h++)r[h].applyMatrix4(a.makeRotationAxis(n[h],i*h)),o[h].crossVectors(n[h],r[h]);return{tangents:n,normals:r,binormals:o}},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),ji.prototype=Object.create(pe.prototype),ji.prototype.constructor=ji,ji.prototype.isEllipseCurve=!0,ji.prototype.getPoint=function(t,e){e=e||new Z;for(var i=2*Math.PI,n=this.aEndAngle-this.aStartAngle,r=Math.abs(n)<Number.EPSILON;0>n;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=r?0:i),this.aClockwise!==!0||r||(n=n===i?-i:n-i),i=this.aStartAngle+t*n,t=this.aX+this.xRadius*Math.cos(i);var o=this.aY+this.yRadius*Math.sin(i);return this.aRotation!==0&&(i=Math.cos(this.aRotation),n=Math.sin(this.aRotation),r=t-this.aX,o-=this.aY,t=r*i-o*n+this.aX,o=r*n+o*i+this.aY),e.set(t,o)},ji.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},ji.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},ji.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},wr.prototype=Object.create(ji.prototype),wr.prototype.constructor=wr,wr.prototype.isArcCurve=!0;var Xo=new x,Os=new us,Is=new us,Ds=new us;Ei.prototype=Object.create(pe.prototype),Ei.prototype.constructor=Ei,Ei.prototype.isCatmullRomCurve3=!0,Ei.prototype.getPoint=function(t,e){e=e||new x;var i=this.points,n=i.length;t*=n-(this.closed?0:1);var r=Math.floor(t);if(t-=r,this.closed?r+=0<r?0:(Math.floor(Math.abs(r)/n)+1)*n:t===0&&r===n-1&&(r=n-2,t=1),this.closed||0<r)var o=i[(r-1)%n];else Xo.subVectors(i[0],i[1]).add(i[0]),o=Xo;var s=i[r%n],a=i[(r+1)%n];if(this.closed||r+2<n?i=i[(r+2)%n]:(Xo.subVectors(i[n-1],i[n-2]).add(i[n-1]),i=Xo),this.curveType==="centripetal"||this.curveType==="chordal"){var h=this.curveType==="chordal"?.5:.25;n=Math.pow(o.distanceToSquared(s),h),r=Math.pow(s.distanceToSquared(a),h),h=Math.pow(a.distanceToSquared(i),h),1e-4>r&&(r=1),1e-4>n&&(n=r),1e-4>h&&(h=r),Os.initNonuniformCatmullRom(o.x,s.x,a.x,i.x,n,r,h),Is.initNonuniformCatmullRom(o.y,s.y,a.y,i.y,n,r,h),Ds.initNonuniformCatmullRom(o.z,s.z,a.z,i.z,n,r,h)}else this.curveType==="catmullrom"&&(Os.initCatmullRom(o.x,s.x,a.x,i.x,this.tension),Is.initCatmullRom(o.y,s.y,a.y,i.y,this.tension),Ds.initCatmullRom(o.z,s.z,a.z,i.z,this.tension));return e.set(Os.calc(t),Is.calc(t),Ds.calc(t)),e},Ei.prototype.copy=function(t){pe.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Ei.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Ei.prototype.fromJSON=function(t){pe.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new x().fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Zi.prototype=Object.create(pe.prototype),Zi.prototype.constructor=Zi,Zi.prototype.isCubicBezierCurve=!0,Zi.prototype.getPoint=function(t,e){e=e||new Z;var i=this.v0,n=this.v1,r=this.v2,o=this.v3;return e.set(co(t,i.x,n.x,r.x,o.x),co(t,i.y,n.y,r.y,o.y)),e},Zi.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Zi.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Zi.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},cn.prototype=Object.create(pe.prototype),cn.prototype.constructor=cn,cn.prototype.isCubicBezierCurve3=!0,cn.prototype.getPoint=function(t,e){e=e||new x;var i=this.v0,n=this.v1,r=this.v2,o=this.v3;return e.set(co(t,i.x,n.x,r.x,o.x),co(t,i.y,n.y,r.y,o.y),co(t,i.z,n.z,r.z,o.z)),e},cn.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},cn.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},cn.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ni.prototype=Object.create(pe.prototype),Ni.prototype.constructor=Ni,Ni.prototype.isLineCurve=!0,Ni.prototype.getPoint=function(t,e){return e=e||new Z,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},Ni.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ni.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ni.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ni.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ni.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Ji.prototype=Object.create(pe.prototype),Ji.prototype.constructor=Ji,Ji.prototype.isLineCurve3=!0,Ji.prototype.getPoint=function(t,e){return e=e||new x,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},Ji.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ji.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ji.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ji.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qi.prototype=Object.create(pe.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isQuadraticBezierCurve=!0,Qi.prototype.getPoint=function(t,e){e=e||new Z;var i=this.v0,n=this.v1,r=this.v2;return e.set(lo(t,i.x,n.x,r.x),lo(t,i.y,n.y,r.y)),e},Qi.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qi.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qi.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},un.prototype=Object.create(pe.prototype),un.prototype.constructor=un,un.prototype.isQuadraticBezierCurve3=!0,un.prototype.getPoint=function(t,e){e=e||new x;var i=this.v0,n=this.v1,r=this.v2;return e.set(lo(t,i.x,n.x,r.x),lo(t,i.y,n.y,r.y),lo(t,i.z,n.z,r.z)),e},un.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},un.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},un.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$i.prototype=Object.create(pe.prototype),$i.prototype.constructor=$i,$i.prototype.isSplineCurve=!0,$i.prototype.getPoint=function(t,e){e=e||new Z;var i=this.points,n=(i.length-1)*t;t=Math.floor(n),n-=t;var r=i[t===0?t:t-1],o=i[t],s=i[t>i.length-2?i.length-1:t+1];return i=i[t>i.length-3?i.length-1:t+2],e.set(Ks(n,r.x,o.x,s.x,i.x),Ks(n,r.y,o.y,s.y,i.y)),e},$i.prototype.copy=function(t){pe.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this},$i.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t},$i.prototype.fromJSON=function(t){pe.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new Z().fromArray(n))}return this};var wa=Object.freeze({ArcCurve:wr,CatmullRomCurve3:Ei,CubicBezierCurve:Zi,CubicBezierCurve3:cn,EllipseCurve:ji,LineCurve:Ni,LineCurve3:Ji,QuadraticBezierCurve:Qi,QuadraticBezierCurve3:un,SplineCurve:$i});yn.prototype=Object.assign(Object.create(pe.prototype),{constructor:yn,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new Ni(e,t))},getPoint:function(t){var e=t*this.getLength(),i=this.getCurveLengths();for(t=0;t<i.length;){if(i[t]>=e)return e=i[t]-e,t=this.curves[t],i=t.getLength(),t.getPointAt(i===0?0:1-e/i);t++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0,n=this.curves.length;i<n;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t},getSpacedPoints:function(t){t===void 0&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e=[],i,n=0,r=this.curves;n<r.length;n++){var o=r[n];o=o.getPoints(o&&o.isEllipseCurve?2*t:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?t*o.points.length:t);for(var s=0;s<o.length;s++){var a=o[s];i&&i.equals(a)||(e.push(a),i=a)}}return this.autoClose&&1<e.length&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},copy:function(t){pe.prototype.copy.call(this,t),this.curves=[];for(var e=0,i=t.curves.length;e<i;e++)this.curves.push(t.curves[e].clone());return this.autoClose=t.autoClose,this},toJSON:function(){var t=pe.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,i=this.curves.length;e<i;e++)t.curves.push(this.curves[e].toJSON());return t},fromJSON:function(t){pe.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,i=t.curves.length;e<i;e++){var n=t.curves[e];this.curves.push(new wa[n.type]().fromJSON(n))}return this}}),Ki.prototype=Object.assign(Object.create(yn.prototype),{constructor:Ki,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var i=new Ni(this.currentPoint.clone(),new Z(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){t=new Qi(this.currentPoint.clone(),new Z(t,e),new Z(i,n)),this.curves.push(t),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,r,o){t=new Zi(this.currentPoint.clone(),new Z(t,e),new Z(i,n),new Z(r,o)),this.curves.push(t),this.currentPoint.set(r,o)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t);e=new $i(e),this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,r,o){this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,n,r,o)},absarc:function(t,e,i,n,r,o){this.absellipse(t,e,i,i,n,r,o)},ellipse:function(t,e,i,n,r,o,s,a){this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,n,r,o,s,a)},absellipse:function(t,e,i,n,r,o,s,a){t=new ji(t,e,i,n,r,o,s,a),0<this.curves.length&&(e=t.getPoint(0),e.equals(this.currentPoint)||this.lineTo(e.x,e.y)),this.curves.push(t),t=t.getPoint(1),this.currentPoint.copy(t)},copy:function(t){return yn.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=yn.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return yn.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Pn.prototype=Object.assign(Object.create(Ki.prototype),{constructor:Pn,getPointsHoles:function(t){for(var e=[],i=0,n=this.holes.length;i<n;i++)e[i]=this.holes[i].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){Ki.prototype.copy.call(this,t),this.holes=[];for(var e=0,i=t.holes.length;e<i;e++)this.holes.push(t.holes[e].clone());return this},toJSON:function(){var t=Ki.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,i=this.holes.length;e<i;e++)t.holes.push(this.holes[e].toJSON());return t},fromJSON:function(t){Ki.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,i=t.holes.length;e<i;e++){var n=t.holes[e];this.holes.push(new Ki().fromJSON(n))}return this}}),ri.prototype=Object.assign(Object.create(b.prototype),{constructor:ri,isLight:!0,copy:function(t){return b.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){return t=b.prototype.toJSON.call(this,t),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}}),Do.prototype=Object.assign(Object.create(ri.prototype),{constructor:Do,isHemisphereLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Yn.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return new this.constructor().copy(this)},toJSON:function(){var t={};return this.bias!==0&&(t.bias=this.bias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),zo.prototype=Object.assign(Object.create(Yn.prototype),{constructor:zo,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*Se.RAD2DEG*t.angle,n=this.mapSize.width/this.mapSize.height;t=t.distance||e.far,(i!==e.fov||n!==e.aspect||t!==e.far)&&(e.fov=i,e.aspect=n,e.far=t,e.updateProjectionMatrix())}}),No.prototype=Object.assign(Object.create(ri.prototype),{constructor:No,isSpotLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Bo.prototype=Object.assign(Object.create(ri.prototype),{constructor:Bo,isPointLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),uo.prototype=Object.assign(Object.create(Kt.prototype),{constructor:uo,isOrthographicCamera:!0,copy:function(t,e){return Kt.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this},setViewOffset:function(t,e,i,n,r,o){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=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,r=i-t;if(i+=t,t=n+e,e=n-e,this.view!==null&&this.view.enabled){i=this.zoom/(this.view.width/this.view.fullWidth),e=this.zoom/(this.view.height/this.view.fullHeight);var o=(this.right-this.left)/this.view.width;n=(this.top-this.bottom)/this.view.height,r+=this.view.offsetX/i*o,i=r+this.view.width/i*o,t-=this.view.offsetY/e*n,e=t-this.view.height/e*n}this.projectionMatrix.makeOrthographic(r,i,t,e,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=b.prototype.toJSON.call(this,t),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}}),Uo.prototype=Object.assign(Object.create(Yn.prototype),{constructor:Uo}),Fo.prototype=Object.assign(Object.create(ri.prototype),{constructor:Fo,isDirectionalLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Go.prototype=Object.assign(Object.create(ri.prototype),{constructor:Go,isAmbientLight:!0}),Ho.prototype=Object.assign(Object.create(ri.prototype),{constructor:Ho,isRectAreaLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){return t=ri.prototype.toJSON.call(this,t),t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(ko.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(r.manager);o.setPath(r.path),o.load(t,function(s){e(r.parse(JSON.parse(s)))},i,n)},parse:function(t){function e(s){return i[s]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",s),i[s]}var i=this.textures,n=new gh[t.type];if(t.uuid!==void 0&&(n.uuid=t.uuid),t.name!==void 0&&(n.name=t.name),t.color!==void 0&&n.color.setHex(t.color),t.roughness!==void 0&&(n.roughness=t.roughness),t.metalness!==void 0&&(n.metalness=t.metalness),t.emissive!==void 0&&n.emissive.setHex(t.emissive),t.specular!==void 0&&n.specular.setHex(t.specular),t.shininess!==void 0&&(n.shininess=t.shininess),t.clearCoat!==void 0&&(n.clearCoat=t.clearCoat),t.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=t.clearCoatRoughness),t.vertexColors!==void 0&&(n.vertexColors=t.vertexColors),t.fog!==void 0&&(n.fog=t.fog),t.flatShading!==void 0&&(n.flatShading=t.flatShading),t.blending!==void 0&&(n.blending=t.blending),t.combine!==void 0&&(n.combine=t.combine),t.side!==void 0&&(n.side=t.side),t.opacity!==void 0&&(n.opacity=t.opacity),t.transparent!==void 0&&(n.transparent=t.transparent),t.alphaTest!==void 0&&(n.alphaTest=t.alphaTest),t.depthTest!==void 0&&(n.depthTest=t.depthTest),t.depthWrite!==void 0&&(n.depthWrite=t.depthWrite),t.colorWrite!==void 0&&(n.colorWrite=t.colorWrite),t.wireframe!==void 0&&(n.wireframe=t.wireframe),t.wireframeLinewidth!==void 0&&(n.wireframeLinewidth=t.wireframeLinewidth),t.wireframeLinecap!==void 0&&(n.wireframeLinecap=t.wireframeLinecap),t.wireframeLinejoin!==void 0&&(n.wireframeLinejoin=t.wireframeLinejoin),t.rotation!==void 0&&(n.rotation=t.rotation),t.linewidth!==1&&(n.linewidth=t.linewidth),t.dashSize!==void 0&&(n.dashSize=t.dashSize),t.gapSize!==void 0&&(n.gapSize=t.gapSize),t.scale!==void 0&&(n.scale=t.scale),t.polygonOffset!==void 0&&(n.polygonOffset=t.polygonOffset),t.polygonOffsetFactor!==void 0&&(n.polygonOffsetFactor=t.polygonOffsetFactor),t.polygonOffsetUnits!==void 0&&(n.polygonOffsetUnits=t.polygonOffsetUnits),t.skinning!==void 0&&(n.skinning=t.skinning),t.morphTargets!==void 0&&(n.morphTargets=t.morphTargets),t.dithering!==void 0&&(n.dithering=t.dithering),t.visible!==void 0&&(n.visible=t.visible),t.userData!==void 0&&(n.userData=t.userData),t.uniforms!==void 0)for(var r in t.uniforms){var o=t.uniforms[r];switch(n.uniforms[r]={},o.type){case"t":n.uniforms[r].value=e(o.value);break;case"c":n.uniforms[r].value=new H().setHex(o.value);break;case"v2":n.uniforms[r].value=new Z().fromArray(o.value);break;case"v3":n.uniforms[r].value=new x().fromArray(o.value);break;case"v4":n.uniforms[r].value=new Y().fromArray(o.value);break;case"m4":n.uniforms[r].value=new ft().fromArray(o.value);break;default:n.uniforms[r].value=o.value}}return t.defines!==void 0&&(n.defines=t.defines),t.vertexShader!==void 0&&(n.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(n.fragmentShader=t.fragmentShader),t.shading!==void 0&&(n.flatShading=t.shading===1),t.size!==void 0&&(n.size=t.size),t.sizeAttenuation!==void 0&&(n.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(n.map=e(t.map)),t.alphaMap!==void 0&&(n.alphaMap=e(t.alphaMap),n.transparent=!0),t.bumpMap!==void 0&&(n.bumpMap=e(t.bumpMap)),t.bumpScale!==void 0&&(n.bumpScale=t.bumpScale),t.normalMap!==void 0&&(n.normalMap=e(t.normalMap)),t.normalMapType!==void 0&&(n.normalMapType=t.normalMapType),t.normalScale!==void 0&&(r=t.normalScale,Array.isArray(r)===!1&&(r=[r,r]),n.normalScale=new Z().fromArray(r)),t.displacementMap!==void 0&&(n.displacementMap=e(t.displacementMap)),t.displacementScale!==void 0&&(n.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(n.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(n.roughnessMap=e(t.roughnessMap)),t.metalnessMap!==void 0&&(n.metalnessMap=e(t.metalnessMap)),t.emissiveMap!==void 0&&(n.emissiveMap=e(t.emissiveMap)),t.emissiveIntensity!==void 0&&(n.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(n.specularMap=e(t.specularMap)),t.envMap!==void 0&&(n.envMap=e(t.envMap)),t.envMapIntensity!==void 0&&(n.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(n.reflectivity=t.reflectivity),t.lightMap!==void 0&&(n.lightMap=e(t.lightMap)),t.lightMapIntensity!==void 0&&(n.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(n.aoMap=e(t.aoMap)),t.aoMapIntensity!==void 0&&(n.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(n.gradientMap=e(t.gradientMap)),n},setPath:function(t){return this.path=t,this},setTextures:function(t){return this.textures=t,this}});var qo={decodeText:function(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);for(var e="",i=0,n=t.length;i<n;i++)e+=String.fromCharCode(t[i]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return e===-1?"./":t.substr(0,e+1)}};Object.assign(ps.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(r.manager);o.setPath(r.path),o.load(t,function(s){e(r.parse(JSON.parse(s)))},i,n)},parse:function(t){var e=new Rt,i=t.data.index;i!==void 0&&(i=new Ma[i.type](i.array),e.setIndex(new q(i,1)));var n=t.data.attributes;for(o in n){var r=n[o];i=new Ma[r.type](r.array),e.addAttribute(o,new q(i,r.itemSize,r.normalized))}var o=t.data.groups||t.data.drawcalls||t.data.offsets;if(o!==void 0)for(i=0,n=o.length;i!==n;++i)r=o[i],e.addGroup(r.start,r.count,r.materialIndex);return t=t.data.boundingSphere,t!==void 0&&(o=new x,t.center!==void 0&&o.fromArray(t.center),e.boundingSphere=new Ot(o,t.radius)),e},setPath:function(t){return this.path=t,this}});var Ma={Int8Array,Uint8Array,Uint8ClampedArray:typeof Uint8ClampedArray<"u"?Uint8ClampedArray:Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};Mr.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,i=0,n=e.length;i<n;i+=2){var r=e[i+1];if(e[i].test(t))return r}return null}},Object.assign(Mr.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,i){for(var n=[],r=0;r<t.length;++r)n[r]=this.createMaterial(t[r],e,i);return n},createMaterial:function(){var t={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},e=new H,i=new Io,n=new ko;return function(r,o,s){function a(d,g,w,S,P){d=o+d;var k=Mr.Handlers.get(d);return k!==null?d=k.load(d):(i.setCrossOrigin(s),d=i.load(d)),g!==void 0&&(d.repeat.fromArray(g),g[0]!==1&&(d.wrapS=1e3),g[1]!==1&&(d.wrapT=1e3)),w!==void 0&&d.offset.fromArray(w),S!==void 0&&(S[0]==="repeat"&&(d.wrapS=1e3),S[0]==="mirror"&&(d.wrapS=1002),S[1]==="repeat"&&(d.wrapT=1e3),S[1]==="mirror"&&(d.wrapT=1002)),P!==void 0&&(d.anisotropy=P),g=Se.generateUUID(),h[g]=d,g}var h={},l={uuid:Se.generateUUID(),type:"MeshLambertMaterial"},c;for(c in r){var u=r[c];switch(c){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":l.name=u;break;case"blending":l.blending=t[u];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",c,"is no longer supported.");break;case"colorDiffuse":l.color=e.fromArray(u).getHex();break;case"colorSpecular":l.specular=e.fromArray(u).getHex();break;case"colorEmissive":l.emissive=e.fromArray(u).getHex();break;case"specularCoef":l.shininess=u;break;case"shading":u.toLowerCase()==="basic"&&(l.type="MeshBasicMaterial"),u.toLowerCase()==="phong"&&(l.type="MeshPhongMaterial"),u.toLowerCase()==="standard"&&(l.type="MeshStandardMaterial");break;case"mapDiffuse":l.map=a(u,r.mapDiffuseRepeat,r.mapDiffuseOffset,r.mapDiffuseWrap,r.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":l.emissiveMap=a(u,r.mapEmissiveRepeat,r.mapEmissiveOffset,r.mapEmissiveWrap,r.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":l.lightMap=a(u,r.mapLightRepeat,r.mapLightOffset,r.mapLightWrap,r.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":l.aoMap=a(u,r.mapAORepeat,r.mapAOOffset,r.mapAOWrap,r.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":l.bumpMap=a(u,r.mapBumpRepeat,r.mapBumpOffset,r.mapBumpWrap,r.mapBumpAnisotropy);break;case"mapBumpScale":l.bumpScale=u;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":l.normalMap=a(u,r.mapNormalRepeat,r.mapNormalOffset,r.mapNormalWrap,r.mapNormalAnisotropy);break;case"mapNormalFactor":l.normalScale=u;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":l.specularMap=a(u,r.mapSpecularRepeat,r.mapSpecularOffset,r.mapSpecularWrap,r.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":l.metalnessMap=a(u,r.mapMetalnessRepeat,r.mapMetalnessOffset,r.mapMetalnessWrap,r.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":l.roughnessMap=a(u,r.mapRoughnessRepeat,r.mapRoughnessOffset,r.mapRoughnessWrap,r.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":l.alphaMap=a(u,r.mapAlphaRepeat,r.mapAlphaOffset,r.mapAlphaWrap,r.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":l.side=1;break;case"doubleSided":l.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),l.opacity=u;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":l[c]=u;break;case"vertexColors":u===!0&&(l.vertexColors=2),u==="face"&&(l.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",c,u)}}return l.type==="MeshBasicMaterial"&&delete l.emissive,l.type!=="MeshPhongMaterial"&&delete l.specular,1>l.opacity&&(l.transparent=!0),n.setTextures(h),n.parse(l)}}()}),Object.assign(jo.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var r=this,o=this.path===void 0?qo.extractUrlBase(t):this.path,s=new Xi(this.manager);s.setPath(this.path),s.setWithCredentials(this.withCredentials),s.load(t,function(a){a=JSON.parse(a);var h=a.metadata;if(h!==void 0&&(h=h.type,h!==void 0&&h.toLowerCase()==="object")){console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");return}a=r.parse(a,o),e(a.geometry,a.materials)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(){return function(t,e){t.data!==void 0&&(t=t.data),t.scale=t.scale!==void 0?1/t.scale:1;var i=new F,n=t,r,o,s,a=n.faces,h=n.vertices,l=n.normals,c=n.colors,u=n.scale,d=0;if(n.uvs!==void 0){for(r=0;r<n.uvs.length;r++)n.uvs[r].length&&d++;for(r=0;r<d;r++)i.faceVertexUvs[r]=[]}var g=0;for(s=h.length;g<s;)r=new x,r.x=h[g++]*u,r.y=h[g++]*u,r.z=h[g++]*u,i.vertices.push(r);for(g=0,s=a.length;g<s;){h=a[g++];var w=h&1,S=h&2;r=h&8;var P=h&16,k=h&32;if(u=h&64,h&=128,w){w=new C,w.a=a[g],w.b=a[g+1],w.c=a[g+3];var N=new C;if(N.a=a[g+1],N.b=a[g+2],N.c=a[g+3],g+=4,S&&(S=a[g++],w.materialIndex=S,N.materialIndex=S),S=i.faces.length,r)for(r=0;r<d;r++){var J=n.uvs[r];for(i.faceVertexUvs[r][S]=[],i.faceVertexUvs[r][S+1]=[],o=0;4>o;o++){var V=a[g++],ot=J[2*V];V=J[2*V+1],ot=new Z(ot,V),o!==2&&i.faceVertexUvs[r][S].push(ot),o!==0&&i.faceVertexUvs[r][S+1].push(ot)}}if(P&&(P=3*a[g++],w.normal.set(l[P++],l[P++],l[P]),N.normal.copy(w.normal)),k)for(r=0;4>r;r++)P=3*a[g++],k=new x(l[P++],l[P++],l[P]),r!==2&&w.vertexNormals.push(k),r!==0&&N.vertexNormals.push(k);if(u&&(u=a[g++],u=c[u],w.color.setHex(u),N.color.setHex(u)),h)for(r=0;4>r;r++)u=a[g++],u=c[u],r!==2&&w.vertexColors.push(new H(u)),r!==0&&N.vertexColors.push(new H(u));i.faces.push(w),i.faces.push(N)}else{if(w=new C,w.a=a[g++],w.b=a[g++],w.c=a[g++],S&&(S=a[g++],w.materialIndex=S),S=i.faces.length,r)for(r=0;r<d;r++)for(J=n.uvs[r],i.faceVertexUvs[r][S]=[],o=0;3>o;o++)V=a[g++],ot=J[2*V],V=J[2*V+1],ot=new Z(ot,V),i.faceVertexUvs[r][S].push(ot);if(P&&(P=3*a[g++],w.normal.set(l[P++],l[P++],l[P])),k)for(r=0;3>r;r++)P=3*a[g++],k=new x(l[P++],l[P++],l[P]),w.vertexNormals.push(k);if(u&&(u=a[g++],w.color.setHex(c[u])),h)for(r=0;3>r;r++)u=a[g++],w.vertexColors.push(new H(c[u]));i.faces.push(w)}}if(n=t,g=n.influencesPerVertex!==void 0?n.influencesPerVertex:2,n.skinWeights)for(s=0,a=n.skinWeights.length;s<a;s+=g)i.skinWeights.push(new Y(n.skinWeights[s],1<g?n.skinWeights[s+1]:0,2<g?n.skinWeights[s+2]:0,3<g?n.skinWeights[s+3]:0));if(n.skinIndices)for(s=0,a=n.skinIndices.length;s<a;s+=g)i.skinIndices.push(new Y(n.skinIndices[s],1<g?n.skinIndices[s+1]:0,2<g?n.skinIndices[s+2]:0,3<g?n.skinIndices[s+3]:0));if(i.bones=n.bones,i.bones&&0<i.bones.length&&(i.skinWeights.length!==i.skinIndices.length||i.skinIndices.length!==i.vertices.length)&&console.warn("When skinning, number of vertices ("+i.vertices.length+"), skinIndices ("+i.skinIndices.length+"), and skinWeights ("+i.skinWeights.length+") should match."),s=t,a=s.scale,s.morphTargets!==void 0)for(n=0,g=s.morphTargets.length;n<g;n++)for(i.morphTargets[n]={},i.morphTargets[n].name=s.morphTargets[n].name,i.morphTargets[n].vertices=[],l=i.morphTargets[n].vertices,c=s.morphTargets[n].vertices,d=0,h=c.length;d<h;d+=3)u=new x,u.x=c[d]*a,u.y=c[d+1]*a,u.z=c[d+2]*a,l.push(u);if(s.morphColors!==void 0&&0<s.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),a=i.faces,s=s.morphColors[0].colors,n=0,g=a.length;n<g;n++)a[n].color.fromArray(s,3*n);for(s=t,n=[],g=[],s.animation!==void 0&&g.push(s.animation),s.animations!==void 0&&(s.animations.length?g=g.concat(s.animations):g.push(s.animations)),s=0;s<g.length;s++)(a=ki.parseAnimation(g[s],i.bones))&&n.push(a);return i.morphTargets&&(g=ki.CreateClipsFromMorphTargetSequences(i.morphTargets,10),n=n.concat(g)),0<n.length&&(i.animations=n),i.computeFaceNormals(),i.computeBoundingSphere(),t.materials===void 0||t.materials.length===0?{geometry:i}:(t=Mr.prototype.initMaterials(t.materials,this.resourcePath||e,this.crossOrigin),{geometry:i,materials:t})}}()}),Object.assign(ds.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var r=this,o=this.path===void 0?qo.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||o,o=new Xi(r.manager),o.setPath(this.path),o.load(t,function(s){var a=null;try{a=JSON.parse(s)}catch(h){n!==void 0&&n(h),console.error("THREE:ObjectLoader: Can't parse "+t+".",h.message);return}s=a.metadata,s===void 0||s.type===void 0||s.type.toLowerCase()==="geometry"?console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead."):r.parse(a,e)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var i=this.parseShape(t.shapes);i=this.parseGeometries(t.geometries,i);var n=this.parseImages(t.images,function(){e!==void 0&&e(r)});n=this.parseTextures(t.textures,n),n=this.parseMaterials(t.materials,n);var r=this.parseObject(t.object,i,n);return t.animations&&(r.animations=this.parseAnimations(t.animations)),t.images!==void 0&&t.images.length!==0||e===void 0||e(r),r},parseShape:function(t){var e={};if(t!==void 0)for(var i=0,n=t.length;i<n;i++){var r=new Pn().fromJSON(t[i]);e[r.uuid]=r}return e},parseGeometries:function(t,e){var i={};if(t!==void 0)for(var n=new jo,r=new ps,o=0,s=t.length;o<s;o++){var a=t[o];switch(a.type){case"PlaneGeometry":case"PlaneBufferGeometry":var h=new Bi[a.type](a.width,a.height,a.widthSegments,a.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":h=new Bi[a.type](a.width,a.height,a.depth,a.widthSegments,a.heightSegments,a.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":h=new Bi[a.type](a.radius,a.segments,a.thetaStart,a.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":h=new Bi[a.type](a.radiusTop,a.radiusBottom,a.height,a.radialSegments,a.heightSegments,a.openEnded,a.thetaStart,a.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":h=new Bi[a.type](a.radius,a.height,a.radialSegments,a.heightSegments,a.openEnded,a.thetaStart,a.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":h=new Bi[a.type](a.radius,a.widthSegments,a.heightSegments,a.phiStart,a.phiLength,a.thetaStart,a.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":h=new Bi[a.type](a.radius,a.detail);break;case"RingGeometry":case"RingBufferGeometry":h=new Bi[a.type](a.innerRadius,a.outerRadius,a.thetaSegments,a.phiSegments,a.thetaStart,a.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":h=new Bi[a.type](a.radius,a.tube,a.radialSegments,a.tubularSegments,a.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":h=new Bi[a.type](a.radius,a.tube,a.tubularSegments,a.radialSegments,a.p,a.q);break;case"LatheGeometry":case"LatheBufferGeometry":h=new Bi[a.type](a.points,a.segments,a.phiStart,a.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":h=new Bi[a.type](a.vertices,a.indices,a.radius,a.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":h=[];for(var l=0,c=a.shapes.length;l<c;l++){var u=e[a.shapes[l]];h.push(u)}h=new Bi[a.type](h,a.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(h=[],l=0,c=a.shapes.length;l<c;l++)u=e[a.shapes[l]],h.push(u);l=a.options.extrudePath,l!==void 0&&(a.options.extrudePath=new wa[l.type]().fromJSON(l)),h=new Bi[a.type](h,a.options);break;case"BufferGeometry":h=r.parse(a);break;case"Geometry":h=n.parse(a,this.resourcePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+a.type+'"');continue}h.uuid=a.uuid,a.name!==void 0&&(h.name=a.name),h.isBufferGeometry===!0&&a.userData!==void 0&&(h.userData=a.userData),i[a.uuid]=h}return i},parseMaterials:function(t,e){var i={},n={};if(t!==void 0){var r=new ko;r.setTextures(e),e=0;for(var o=t.length;e<o;e++){var s=t[e];if(s.type==="MultiMaterial"){for(var a=[],h=0;h<s.materials.length;h++){var l=s.materials[h];i[l.uuid]===void 0&&(i[l.uuid]=r.parse(l)),a.push(i[l.uuid])}n[s.uuid]=a}else n[s.uuid]=r.parse(s),i[s.uuid]=n[s.uuid]}}return n},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],r=ki.parse(n);n.uuid!==void 0&&(r.uuid=n.uuid),e.push(r)}return e},parseImages:function(t,e){function i(d){return n.manager.itemStart(d),o.load(d,function(){n.manager.itemEnd(d)},void 0,function(){n.manager.itemError(d),n.manager.itemEnd(d)})}var n=this,r={};if(t!==void 0&&0<t.length){e=new hs(e);var o=new ho(e);o.setCrossOrigin(this.crossOrigin),e=0;for(var s=t.length;e<s;e++){var a=t[e],h=a.url;if(Array.isArray(h)){r[a.uuid]=[];for(var l=0,c=h.length;l<c;l++){var u=h[l];u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(u)?u:n.resourcePath+u,r[a.uuid].push(i(u))}}else u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(a.url)?a.url:n.resourcePath+a.url,r[a.uuid]=i(u)}}return r},parseTextures:function(t,e){function i(h,l){return typeof h=="number"?h:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",h),l[h])}var n={};if(t!==void 0)for(var r=0,o=t.length;r<o;r++){var s=t[r];s.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),e[s.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",s.image);var a=Array.isArray(e[s.image])?new _(e[s.image]):new Ct(e[s.image]);a.needsUpdate=!0,a.uuid=s.uuid,s.name!==void 0&&(a.name=s.name),s.mapping!==void 0&&(a.mapping=i(s.mapping,vh)),s.offset!==void 0&&a.offset.fromArray(s.offset),s.repeat!==void 0&&a.repeat.fromArray(s.repeat),s.center!==void 0&&a.center.fromArray(s.center),s.rotation!==void 0&&(a.rotation=s.rotation),s.wrap!==void 0&&(a.wrapS=i(s.wrap[0],Ta),a.wrapT=i(s.wrap[1],Ta)),s.format!==void 0&&(a.format=s.format),s.minFilter!==void 0&&(a.minFilter=i(s.minFilter,Sa)),s.magFilter!==void 0&&(a.magFilter=i(s.magFilter,Sa)),s.anisotropy!==void 0&&(a.anisotropy=s.anisotropy),s.flipY!==void 0&&(a.flipY=s.flipY),n[s.uuid]=a}return n},parseObject:function(t,e,i){function n(l){return e[l]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",l),e[l]}function r(l){if(l!==void 0){if(Array.isArray(l)){for(var c=[],u=0,d=l.length;u<d;u++){var g=l[u];i[g]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",g),c.push(i[g])}return c}return i[l]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",l),i[l]}}switch(t.type){case"Scene":var o=new qi;t.background!==void 0&&Number.isInteger(t.background)&&(o.background=new H(t.background)),t.fog!==void 0&&(t.fog.type==="Fog"?o.fog=new yi(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(o.fog=new Jt(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":o=new Bt(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(o.focus=t.focus),t.zoom!==void 0&&(o.zoom=t.zoom),t.filmGauge!==void 0&&(o.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(o.filmOffset=t.filmOffset),t.view!==void 0&&(o.view=Object.assign({},t.view));break;case"OrthographicCamera":o=new uo(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(o.zoom=t.zoom),t.view!==void 0&&(o.view=Object.assign({},t.view));break;case"AmbientLight":o=new Go(t.color,t.intensity);break;case"DirectionalLight":o=new Fo(t.color,t.intensity);break;case"PointLight":o=new Bo(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":o=new Ho(t.color,t.intensity,t.width,t.height);break;case"SpotLight":o=new No(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":o=new Do(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":o=n(t.geometry);var s=r(t.material);o=o.bones&&0<o.bones.length?new ke(o,s):new Ke(o,s);break;case"LOD":o=new ii;break;case"Line":o=new qe(n(t.geometry),r(t.material),t.mode);break;case"LineLoop":o=new an(n(t.geometry),r(t.material));break;case"LineSegments":o=new be(n(t.geometry),r(t.material));break;case"PointCloud":case"Points":o=new nr(n(t.geometry),r(t.material));break;case"Sprite":o=new ei(r(t.material));break;case"Group":o=new Pe;break;default:o=new b}if(o.uuid=t.uuid,t.name!==void 0&&(o.name=t.name),t.matrix!==void 0?(o.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=t.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(t.position!==void 0&&o.position.fromArray(t.position),t.rotation!==void 0&&o.rotation.fromArray(t.rotation),t.quaternion!==void 0&&o.quaternion.fromArray(t.quaternion),t.scale!==void 0&&o.scale.fromArray(t.scale)),t.castShadow!==void 0&&(o.castShadow=t.castShadow),t.receiveShadow!==void 0&&(o.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(o.shadow.bias=t.shadow.bias),t.shadow.radius!==void 0&&(o.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(o.visible=t.visible),t.frustumCulled!==void 0&&(o.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(o.renderOrder=t.renderOrder),t.userData!==void 0&&(o.userData=t.userData),t.layers!==void 0&&(o.layers.mask=t.layers),t.children!==void 0){s=t.children;for(var a=0;a<s.length;a++)o.add(this.parseObject(s[a],e,i))}if(t.type==="LOD")for(t=t.levels,s=0;s<t.length;s++){a=t[s];var h=o.getObjectByProperty("uuid",a.object);h!==void 0&&o.addLevel(h,a.distance)}return o}});var vh={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Ta={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Sa={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};fs.prototype={constructor:fs,setOptions:function(t){return this.options=t,this},load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,o=Zn.get(t);if(o!==void 0)return r.manager.itemStart(t),setTimeout(function(){e&&e(o),r.manager.itemEnd(t)},0),o;fetch(t).then(function(s){return s.blob()}).then(function(s){return createImageBitmap(s,r.options)}).then(function(s){Zn.add(t,s),e&&e(s),r.manager.itemEnd(t)}).catch(function(s){n&&n(s),r.manager.itemError(t),r.manager.itemEnd(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(ms.prototype,{moveTo:function(t,e){this.currentPath=new Ki,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,i,n){this.currentPath.quadraticCurveTo(t,e,i,n)},bezierCurveTo:function(t,e,i,n,r,o){this.currentPath.bezierCurveTo(t,e,i,n,r,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(P){for(var k=[],N=0,J=P.length;N<J;N++){var V=P[N],ot=new Pn;ot.curves=V.curves,k.push(ot)}return k}function n(P,k){for(var N=k.length,J=!1,V=N-1,ot=0;ot<N;V=ot++){var T=k[V],A=k[ot],tt=A.x-T.x,_t=A.y-T.y;if(Math.abs(_t)>Number.EPSILON){if(0>_t&&(T=k[ot],tt=-tt,A=k[V],_t=-_t),!(P.y<T.y||P.y>A.y))if(P.y===T.y){if(P.x===T.x)return!0}else{if(V=_t*(P.x-T.x)-tt*(P.y-T.y),V===0)return!0;0>V||(J=!J)}}else if(P.y===T.y&&(A.x<=P.x&&P.x<=T.x||T.x<=P.x&&P.x<=A.x))return!0}return J}var r=wn.isClockWise,o=this.subPaths;if(o.length===0)return[];if(e===!0)return i(o);if(e=[],o.length===1){var s=o[0],a=new Pn;return a.curves=s.curves,e.push(a),e}var h=!r(o[0].getPoints());h=t?!h:h,a=[];var l=[],c=[],u=0;l[u]=void 0,c[u]=[];for(var d=0,g=o.length;d<g;d++){s=o[d];var w=s.getPoints(),S=r(w);(S=t?!S:S)?(!h&&l[u]&&u++,l[u]={s:new Pn,p:w},l[u].s.curves=s.curves,h&&u++,c[u]=[]):c[u].push({h:s,p:w[0]})}if(!l[0])return i(o);if(1<l.length){for(d=!1,t=[],r=0,o=l.length;r<o;r++)a[r]=[];for(r=0,o=l.length;r<o;r++)for(s=c[r],S=0;S<s.length;S++){for(h=s[S],u=!0,w=0;w<l.length;w++)n(h.p,l[w].p)&&(r!==w&&t.push({froms:r,tos:w,hole:S}),u?(u=!1,a[w].push(h)):d=!0);u&&a[r].push(h)}0<t.length&&(d||(c=a))}for(d=0,r=l.length;d<r;d++)for(a=l[d].s,e.push(a),t=c[d],o=0,s=t.length;o<s;o++)a.holes.push(t[o].h);return e}}),Object.assign(gs.prototype,{isFont:!0,generateShapes:function(t,e){e===void 0&&(e=100);var i=[],n=e;e=this.data;var r=Array.from?Array.from(t):String(t).split("");n/=e.resolution;var o=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*n;t=[];for(var s=0,a=0,h=0;h<r.length;h++){var l=r[h];if(l===`
|
|
2571
|
-
`)s=0,a-=o;else{var c=n,u=s,d=a;if(l=e.glyphs[l]||e.glyphs["?"]){var g=new ms;if(l.o)for(var w=l._cachedOutline||(l._cachedOutline=l.o.split(" ")),S=0,P=w.length;S<P;)switch(w[S++]){case"m":var k=w[S++]*c+u,N=w[S++]*c+d;g.moveTo(k,N);break;case"l":k=w[S++]*c+u,N=w[S++]*c+d,g.lineTo(k,N);break;case"q":var J=w[S++]*c+u,V=w[S++]*c+d,ot=w[S++]*c+u,T=w[S++]*c+d;g.quadraticCurveTo(ot,T,J,V);break;case"b":J=w[S++]*c+u,V=w[S++]*c+d,ot=w[S++]*c+u,T=w[S++]*c+d,k=w[S++]*c+u,N=w[S++]*c+d,g.bezierCurveTo(ot,T,k,N,J,V)}c={offsetX:l.ha*c,path:g}}else c=void 0;s+=c.offsetX,t.push(c.path)}}for(e=0,r=t.length;e<r;e++)Array.prototype.push.apply(i,t[e].toShapes());return i}}),Object.assign(ta.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(this.manager);o.setPath(this.path),o.load(t,function(s){try{var a=JSON.parse(s)}catch{console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),a=JSON.parse(s.substring(65,s.length-2))}s=r.parse(a),e&&e(s)},i,n)},parse:function(t){return new gs(t)},setPath:function(t){return this.path=t,this}});var Yo,zs={getContext:function(){return Yo===void 0&&(Yo=new(window.AudioContext||window.webkitAudioContext)),Yo},setContext:function(t){Yo=t}};Object.assign(vs.prototype,{load:function(t,e,i,n){var r=new Xi(this.manager);r.setResponseType("arraybuffer"),r.setPath(this.path),r.load(t,function(o){o=o.slice(0),zs.getContext().decodeAudioData(o,function(s){e(s)})},i,n)},setPath:function(t){return this.path=t,this}}),Object.assign(ea.prototype,{update:function(){var t,e,i,n,r,o,s,a,h=new ft,l=new ft;return function(c){if(t!==this||e!==c.focus||i!==c.fov||n!==c.aspect*this.aspect||r!==c.near||o!==c.far||s!==c.zoom||a!==this.eyeSep){t=this,e=c.focus,i=c.fov,n=c.aspect*this.aspect,r=c.near,o=c.far,s=c.zoom;var u=c.projectionMatrix.clone();a=this.eyeSep/2;var d=a*r/e,g=r*Math.tan(Se.DEG2RAD*i*.5)/s;l.elements[12]=-a,h.elements[12]=a;var w=-g*n+d,S=g*n+d;u.elements[0]=2*r/(S-w),u.elements[8]=(S+w)/(S-w),this.cameraL.projectionMatrix.copy(u),w=-g*n-d,S=g*n-d,u.elements[0]=2*r/(S-w),u.elements[8]=(S+w)/(S-w),this.cameraR.projectionMatrix.copy(u)}this.cameraL.matrixWorld.copy(c.matrixWorld).multiply(l),this.cameraR.matrixWorld.copy(c.matrixWorld).multiply(h)}}()}),po.prototype=Object.create(b.prototype),po.prototype.constructor=po,Object.assign(ys.prototype,{start:function(){this.oldTime=this.startTime=(typeof performance>"u"?Date:performance).now(),this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.autoStart=this.running=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=(typeof performance>"u"?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),_s.prototype=Object.assign(Object.create(b.prototype),{constructor:_s,getInput:function(){return this.gain},removeFilter:function(){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:function(){return this.filter},setFilter:function(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this},updateMatrixWorld:function(){var t=new x,e=new at,i=new x,n=new x,r=new ys;return function(o){b.prototype.updateMatrixWorld.call(this,o),o=this.context.listener;var s=this.up;if(this.timeDelta=r.getDelta(),this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),o.positionX){var a=this.context.currentTime+this.timeDelta;o.positionX.linearRampToValueAtTime(t.x,a),o.positionY.linearRampToValueAtTime(t.y,a),o.positionZ.linearRampToValueAtTime(t.z,a),o.forwardX.linearRampToValueAtTime(n.x,a),o.forwardY.linearRampToValueAtTime(n.y,a),o.forwardZ.linearRampToValueAtTime(n.z,a),o.upX.linearRampToValueAtTime(s.x,a),o.upY.linearRampToValueAtTime(s.y,a),o.upZ.linearRampToValueAtTime(s.z,a)}else o.setPosition(t.x,t.y,t.z),o.setOrientation(n.x,n.y,n.z,s.x,s.y,s.z)}}()}),Tr.prototype=Object.assign(Object.create(b.prototype),{constructor:Tr,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setMediaElementSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(this.isPlaying===!0)console.warn("THREE.Audio: Audio is already playing.");else if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else{var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}},pause:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.isPlaying===!0&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.source.onended=null,this.offset=0,this.isPlaying=!1,this},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),this.isPlaying===!0?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.playbackRate=t,this.isPlaying===!0&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.loop=t,this.isPlaying===!0&&(this.source.loop=this.loop),this},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),xs.prototype=Object.assign(Object.create(Tr.prototype),{constructor:xs,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){return this.panner.refDistance=t,this},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){return this.panner.rolloffFactor=t,this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){return this.panner.distanceModel=t,this},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){return this.panner.maxDistance=t,this},setDirectionalCone:function(t,e,i){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=i,this},updateMatrixWorld:function(){var t=new x,e=new at,i=new x,n=new x;return function(r){if(b.prototype.updateMatrixWorld.call(this,r),r=this.panner,this.matrixWorld.decompose(t,e,i),n.set(0,0,1).applyQuaternion(e),r.positionX){var o=this.context.currentTime+this.listener.timeDelta;r.positionX.linearRampToValueAtTime(t.x,o),r.positionY.linearRampToValueAtTime(t.y,o),r.positionZ.linearRampToValueAtTime(t.z,o),r.orientationX.linearRampToValueAtTime(n.x,o),r.orientationY.linearRampToValueAtTime(n.y,o),r.orientationZ.linearRampToValueAtTime(n.z,o)}else r.setPosition(t.x,t.y,t.z),r.setOrientation(n.x,n.y,n.z)}}()}),Object.assign(ws.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),i=0;i<e.length;i++)t+=e[i];return t/e.length}}),Object.assign(Ms.prototype,{accumulate:function(t,e){var i=this.buffer,n=this.valueSize;t=t*n+n;var r=this.cumulativeWeight;if(r===0){for(r=0;r!==n;++r)i[t+r]=i[r];r=e}else r+=e,this._mixBufferRegion(i,t,0,e/r,n);this.cumulativeWeight=r},apply:function(t){var e=this.valueSize,i=this.buffer;t=t*e+e;var n=this.cumulativeWeight,r=this.binding;this.cumulativeWeight=0,1>n&&this._mixBufferRegion(i,t,3*e,1-n,e),n=e;for(var o=e+e;n!==o;++n)if(i[n]!==i[n+e]){r.setValue(i,t);break}},saveOriginalState:function(){var t=this.buffer,e=this.valueSize,i=3*e;this.binding.getValue(t,i);for(var n=e;n!==i;++n)t[n]=t[i+n%e];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(t,e,i,n,r){if(.5<=n)for(n=0;n!==r;++n)t[e+n]=t[i+n]},_slerp:function(t,e,i,n){at.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,r){for(var o=1-n,s=0;s!==r;++s){var a=e+s;t[a]=t[a]*o+t[i+s]*n}}}),Object.assign(ia.prototype,{getValue:function(t,e){this.bind();var i=this._bindings[this._targetGroup.nCachedObjects_];i!==void 0&&i.getValue(t,e)},setValue:function(t,e){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,r=i.length;n!==r;++n)i[n].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}),Object.assign(Pi,{Composite:ia,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new Pi.Composite(t,e,i):new Pi(t,e,i)},sanitizeNodeName:function(){var t=/[\[\]\.:\/]/g;return function(e){return e.replace(/\s/g,"_").replace(t,"")}}(),parseTrackName:function(){var t="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",e=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");t=/(WCOD+)?/.source.replace("WCOD",t);var i=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),n=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),r=new RegExp("^"+e+t+i+n+"$"),o=["material","materials","bones"];return function(s){var a=r.exec(s);if(!a)throw Error("PropertyBinding: Cannot parse trackName: "+s);a={nodeName:a[2],objectName:a[3],objectIndex:a[4],propertyName:a[5],propertyIndex:a[6]};var h=a.nodeName&&a.nodeName.lastIndexOf(".");if(h!==void 0&&h!==-1){var l=a.nodeName.substring(h+1);o.indexOf(l)!==-1&&(a.nodeName=a.nodeName.substring(0,h),a.objectName=l)}if(a.propertyName===null||a.propertyName.length===0)throw Error("PropertyBinding: can not parse propertyName from trackName: "+s);return a}}(),findNode:function(t,e){if(!e||e===""||e==="root"||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){var i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){var n=function(r){for(var o=0;o<r.length;o++){var s=r[o];if(s.name===e||s.uuid===e||(s=n(s.children)))return s}return null};if(t=n(t.children))return t}return null}}),Object.assign(Pi.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)t[e++]=i[n]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++]},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,i=e.objectName,n=e.propertyName,r=e.propertyIndex;if(t||(this.node=t=Pi.findNode(this.rootNode,e.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var o=e.objectIndex;switch(i){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}for(t=t.skeleton.bones,i=0;i<t.length;i++)if(t[i].name===o){o=i;break}break;default:if(t[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(o!==void 0){if(t[o]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[o]}}if(o=t[n],o===void 0)console.error("THREE.PropertyBinding: Trying to update property for track: "+e.nodeName+"."+n+" but it wasn't found.",t);else{if(e=this.Versioning.None,this.targetObject=t,t.needsUpdate!==void 0?e=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(e=this.Versioning.MatrixWorldNeedsUpdate),i=this.BindingType.Direct,r!==void 0){if(n==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}for(i=0;i<this.node.geometry.morphAttributes.position.length;i++)if(t.geometry.morphAttributes.position[i].name===r){r=i;break}}else{if(!t.geometry.morphTargets){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);return}for(i=0;i<this.node.geometry.morphTargets.length;i++)if(t.geometry.morphTargets[i].name===r){r=i;break}}}i=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=r}else o.fromArray!==void 0&&o.toArray!==void 0?(i=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(i=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=n;this.getValue=this.GetterByBindingType[i],this.setValue=this.SetterByBindingTypeAndVersioning[i][e]}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(Pi.prototype,{_getValue_unbound:Pi.prototype.getValue,_setValue_unbound:Pi.prototype.setValue}),Object.assign(na.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length,h=void 0,l=0,c=arguments.length;l!==c;++l){var u=arguments[l],d=u.uuid,g=n[d];if(g===void 0){g=e++,n[d]=g,t.push(u),d=0;for(var w=a;d!==w;++d)s[d].push(new Pi(u,r[d],o[d]))}else if(g<i){h=t[g];var S=--i;for(w=t[S],n[w.uuid]=g,t[g]=w,n[d]=S,t[S]=u,d=0,w=a;d!==w;++d){var P=s[d],k=P[g];P[g]=P[S],k===void 0&&(k=new Pi(u,r[d],o[d])),P[S]=k}}else t[g]!==h&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=i},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,i=this._indicesByUUID,n=this._bindings,r=n.length,o=0,s=arguments.length;o!==s;++o){var a=arguments[o],h=a.uuid,l=i[h];if(l!==void 0&&l>=e){var c=e++,u=t[c];for(i[u.uuid]=l,t[l]=u,i[h]=c,t[c]=a,a=0,h=r;a!==h;++a){u=n[a];var d=u[l];u[l]=u[c],u[c]=d}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,o=r.length,s=0,a=arguments.length;s!==a;++s){var h=arguments[s].uuid,l=n[h];if(l!==void 0)if(delete n[h],l<i){h=--i;var c=t[h],u=--e,d=t[u];for(n[c.uuid]=l,t[l]=c,n[d.uuid]=h,t[h]=d,t.pop(),c=0,d=o;c!==d;++c){var g=r[c],w=g[u];g[l]=g[h],g[h]=w,g.pop()}}else for(u=--e,d=t[u],n[d.uuid]=l,t[l]=d,t.pop(),c=0,d=o;c!==d;++c)g=r[c],g[l]=g[u],g.pop()}this.nCachedObjects_=i},subscribe_:function(t,e){var i=this._bindingsIndicesByPath,n=i[t],r=this._bindings;if(n!==void 0)return r[n];var o=this._paths,s=this._parsedPaths,a=this._objects,h=this.nCachedObjects_,l=Array(a.length);for(n=r.length,i[t]=n,o.push(t),s.push(e),r.push(l),i=h,n=a.length;i!==n;++i)l[i]=new Pi(a[i],t,e);return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){var n=this._paths,r=this._parsedPaths,o=this._bindings,s=o.length-1,a=o[s];e[t[s]]=i,o[i]=a,o.pop(),r[i]=r[s],r.pop(),n[i]=n[s],n.pop()}}}),Object.assign(ra.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,i){if(t.fadeOut(e),this.fadeIn(e),i){i=this._clip.duration;var n=t._clip.duration,r=i/n;t.warp(1,n/i,e),this.warp(r,1,e)}return this},crossFadeTo:function(t,e,i){return t.crossFadeFrom(this,e,i)},stopFading:function(){var t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,i){var n=this._mixer,r=n.time,o=this._timeScaleInterpolant,s=this.timeScale;return o===null&&(this._timeScaleInterpolant=o=n._lendControlInterpolant()),n=o.parameterPositions,o=o.sampleValues,n[0]=r,n[1]=r+i,o[0]=t/s,o[1]=e/s,this},stopWarping:function(){var t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,i,n){if(this.enabled){var r=this._startTime;if(r!==null){if(e=(t-r)*i,0>e||i===0)return;this._startTime=null,e*=i}if(e*=this._updateTimeScale(t),i=this._updateTime(e),t=this._updateWeight(t),0<t){e=this._interpolants,r=this._propertyBindings;for(var o=0,s=e.length;o!==s;++o)e[o].evaluate(i),r[o].accumulate(n,t)}}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var i=this._weightInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),n===0&&(this.enabled=!1))}}return this._effectiveWeight=e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var i=this._timeScaleInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e},_updateTime:function(t){var e=this.time+t,i=this._clip.duration,n=this.loop,r=this._loopCount,o=n===2202;if(t===0)return r===-1?e:o&&(r&1)===1?i-e:e;if(n===2200)t:{if(r===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1)),e>=i)e=i;else if(0>e)e=0;else break t;this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:0>t?-1:1})}else{if(r===-1&&(0<=t?(r=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),e>=i||0>e){n=Math.floor(e/i),e-=i*n,r+=Math.abs(n);var s=this.repetitions-r;0>=s?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=0<t?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<t?1:-1})):(s===1?(t=0>t,this._setEndings(t,!t,o)):this._setEndings(!1,!1,o),this._loopCount=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n}))}if(o&&(r&1)===1)return this.time=e,i-e}return this.time=e},_setEndings:function(t,e,i){var n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(n.endingStart=t?this.zeroSlopeAtStart?2401:2400:2402,n.endingEnd=e?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(t,e,i){var n=this._mixer,r=n.time,o=this._weightInterpolant;return o===null&&(this._weightInterpolant=o=n._lendControlInterpolant()),n=o.parameterPositions,o=o.sampleValues,n[0]=r,o[0]=e,n[1]=r+t,o[1]=i,this}}),Ts.prototype=Object.assign(Object.create(pt.prototype),{constructor:Ts,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,r=n.length,o=t._propertyBindings;t=t._interpolants;var s=i.uuid,a=this._bindingsByRootAndName,h=a[s];for(h===void 0&&(h={},a[s]=h),a=0;a!==r;++a){var l=n[a],c=l.name,u=h[c];if(u===void 0){if(u=o[a],u!==void 0){u._cacheIndex===null&&(++u.referenceCount,this._addInactiveBinding(u,s,c));continue}u=new Ms(Pi.create(i,c,e&&e._propertyBindings[a].binding.parsedPath),l.ValueTypeName,l.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,s,c)}o[a]=u,t[a].resultBuffer=u.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){var e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}for(e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];r.useCount++===0&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];--r.useCount===0&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){return t=t._cacheIndex,t!==null&&t<this._nActiveActions},_addInactiveAction:function(t,e,i){var n=this._actions,r=this._actionsByClip,o=r[e];o===void 0?(o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,r[e]=o):(e=o.knownActions,t._byClipCacheIndex=e.length,e.push(t)),t._cacheIndex=n.length,n.push(t),o.actionByRoot[i]=t},_removeInactiveAction:function(t){var e=this._actions,i=e[e.length-1],n=t._cacheIndex;i._cacheIndex=n,e[n]=i,e.pop(),t._cacheIndex=null,e=t._clip.uuid,i=this._actionsByClip,n=i[e];var r=n.knownActions,o=r[r.length-1],s=t._byClipCacheIndex;o._byClipCacheIndex=s,r[s]=o,r.pop(),t._byClipCacheIndex=null,delete n.actionByRoot[(t._localRoot||this._root).uuid],r.length===0&&delete i[e],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){t=t._propertyBindings;for(var e=0,i=t.length;e!==i;++e){var n=t[e];--n.referenceCount===0&&this._removeInactiveBinding(n)}},_lendAction:function(t){var e=this._actions,i=t._cacheIndex,n=this._nActiveActions++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackAction:function(t){var e=this._actions,i=t._cacheIndex,n=--this._nActiveActions,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_addInactiveBinding:function(t,e,i){var n=this._bindingsByRootAndName,r=n[e],o=this._bindings;r===void 0&&(r={},n[e]=r),r[i]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid;i=i.path;var r=this._bindingsByRootAndName,o=r[n],s=e[e.length-1];t=t._cacheIndex,s._cacheIndex=t,e[t]=s,e.pop(),delete o[i];t:{for(var a in o)break t;delete r[n]}},_lendBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=this._nActiveBindings++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=--this._nActiveBindings,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return i===void 0&&(i=new so(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),i.__cacheIndex=e,t[e]=i),i},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,i=t.__cacheIndex,n=--this._nActiveControlInterpolants,r=e[n];t.__cacheIndex=n,e[n]=t,r.__cacheIndex=i,e[i]=r},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var i=e||this._root,n=i.uuid;i=typeof t=="string"?ki.findByName(i,t):t,t=i!==null?i.uuid:t;var r=this._actionsByClip[t],o=null;if(r!==void 0){if(o=r.actionByRoot[n],o!==void 0)return o;o=r.knownActions[0],i===null&&(i=o._clip)}return i===null?null:(e=new ra(this,i,e),this._bindAction(e,o),this._addInactiveAction(e,t,n),e)},existingAction:function(t,e){var i=e||this._root;return e=i.uuid,i=typeof t=="string"?ki.findByName(i,t):t,t=this._actionsByClip[i?i.uuid:t],t!==void 0&&t.actionByRoot[e]||null},stopAllAction:function(){for(var t=this._actions,e=this._nActiveActions,i=this._bindings,n=this._nActiveBindings,r=this._nActiveBindings=this._nActiveActions=0;r!==e;++r)t[r].reset();for(r=0;r!==n;++r)i[r].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,i=this._nActiveActions,n=this.time+=t,r=Math.sign(t),o=this._accuIndex^=1,s=0;s!==i;++s)e[s]._update(n,t,r,o);for(t=this._bindings,e=this._nActiveBindings,s=0;s!==e;++s)t[s].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions;t=t.uuid;var i=this._actionsByClip,n=i[t];if(n!==void 0){n=n.knownActions;for(var r=0,o=n.length;r!==o;++r){var s=n[r];this._deactivateAction(s);var a=s._cacheIndex,h=e[e.length-1];s._cacheIndex=null,s._byClipCacheIndex=null,h._cacheIndex=a,e[a]=h,e.pop(),this._removeInactiveBindingsForAction(s)}delete i[t]}},uncacheRoot:function(t){t=t.uuid;var e=this._actionsByClip;for(n in e){var i=e[n].actionByRoot[t];i!==void 0&&(this._deactivateAction(i),this._removeInactiveAction(i))}var n=this._bindingsByRootAndName[t];if(n!==void 0)for(var r in n)t=n[r],t.restoreOriginalState(),this._removeInactiveBinding(t)},uncacheAction:function(t,e){t=this.existingAction(t,e),t!==null&&(this._deactivateAction(t),this._removeInactiveAction(t))}}),Vo.prototype.clone=function(){return new Vo(this.value.clone===void 0?this.value:this.value.clone())},Ss.prototype=Object.assign(Object.create(Rt.prototype),{constructor:Ss,isInstancedBufferGeometry:!0,copy:function(t){return Rt.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return new this.constructor().copy(this)}}),Es.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Es,isInstancedInterleavedBuffer:!0,copy:function(t){return Ge.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Ps.prototype=Object.assign(Object.create(q.prototype),{constructor:Ps,isInstancedBufferAttribute:!0,copy:function(t){return q.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(oa.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,i){return i=i||[],As(t,this,i,e),i.sort(sa),i},intersectObjects:function(t,e,i){if(i=i||[],Array.isArray(t)===!1)return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),i;for(var n=0,r=t.length;n<r;n++)As(t[n],this,i,e);return i.sort(sa),i}}),Object.assign(aa.prototype,{set:function(t,e,i){return this.radius=t,this.phi=e,this.theta=i,this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,i){return this.radius=Math.sqrt(t*t+e*e+i*i),this.radius===0?this.phi=this.theta=0:(this.theta=Math.atan2(t,i),this.phi=Math.acos(Se.clamp(e/this.radius,-1,1))),this}}),Object.assign(ha.prototype,{set:function(t,e,i){return this.radius=t,this.theta=e,this.y=i,this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,i){return this.radius=Math.sqrt(t*t+i*i),this.theta=Math.atan2(t,i),this.y=e,this}}),Object.assign(Ls.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Z;return function(e,i){return i=t.copy(i).multiplyScalar(.5),this.min.copy(e).sub(i),this.max.copy(e).add(i),this}}(),clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return t===void 0&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new Z),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return t===void 0&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new Z),this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return e===void 0&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new Z),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)},clampPoint:function(t,e){return e===void 0&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new Z),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Z;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(bs.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return t===void 0&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new x),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return t===void 0&&(console.warn("THREE.Line3: .delta() target is now required"),t=new x),t.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){return e===void 0&&(console.warn("THREE.Line3: .at() target is now required"),e=new x),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new x,e=new x;return function(i,n){return t.subVectors(i,this.start),e.subVectors(this.end,this.start),i=e.dot(e),i=e.dot(t)/i,n&&(i=Se.clamp(i,0,1)),i}}(),closestPointToPoint:function(t,e,i){return t=this.closestPointToPointParameter(t,e),i===void 0&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),i=new x),this.delta(i).multiplyScalar(t).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),fo.prototype=Object.create(b.prototype),fo.prototype.constructor=fo,fo.prototype.isImmediateRenderObject=!0,mo.prototype=Object.create(be.prototype),mo.prototype.constructor=mo,mo.prototype.update=function(){var t=new x,e=new x,i=new mt;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var r=this.object.matrixWorld,o=this.geometry.attributes.position,s=this.object.geometry;if(s&&s.isGeometry)for(var a=s.vertices,h=s.faces,l=s=0,c=h.length;l<c;l++)for(var u=h[l],d=0,g=u.vertexNormals.length;d<g;d++){var w=u.vertexNormals[d];t.copy(a[u[n[d]]]).applyMatrix4(r),e.copy(w).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(s,t.x,t.y,t.z),s+=1,o.setXYZ(s,e.x,e.y,e.z),s+=1}else if(s&&s.isBufferGeometry)for(n=s.attributes.position,a=s.attributes.normal,d=s=0,g=n.count;d<g;d++)t.set(n.getX(d),n.getY(d),n.getZ(d)).applyMatrix4(r),e.set(a.getX(d),a.getY(d),a.getZ(d)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(s,t.x,t.y,t.z),s+=1,o.setXYZ(s,e.x,e.y,e.z),s+=1;o.needsUpdate=!0}}(),Sr.prototype=Object.create(b.prototype),Sr.prototype.constructor=Sr,Sr.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Sr.prototype.update=function(){var t=new x,e=new x;return function(){this.light.updateMatrixWorld();var i=this.light.distance?this.light.distance:1e3,n=i*Math.tan(this.light.angle);this.cone.scale.set(n,n,i),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Er.prototype=Object.create(be.prototype),Er.prototype.constructor=Er,Er.prototype.updateMatrixWorld=function(){var t=new x,e=new ft,i=new ft;return function(n){var r=this.bones,o=this.geometry,s=o.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var a=0,h=0;a<r.length;a++){var l=r[a];l.parent&&l.parent.isBone&&(e.multiplyMatrices(i,l.matrixWorld),t.setFromMatrixPosition(e),s.setXYZ(h,t.x,t.y,t.z),e.multiplyMatrices(i,l.parent.matrixWorld),t.setFromMatrixPosition(e),s.setXYZ(h+1,t.x,t.y,t.z),h+=2)}o.getAttribute("position").needsUpdate=!0,b.prototype.updateMatrixWorld.call(this,n)}}(),Pr.prototype=Object.create(Ke.prototype),Pr.prototype.constructor=Pr,Pr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Pr.prototype.update=function(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Ar.prototype=Object.create(b.prototype),Ar.prototype.constructor=Ar,Ar.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Ar.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,i=this.line.geometry.attributes.position,n=i.array;n[0]=t,n[1]=-e,n[2]=0,n[3]=t,n[4]=e,n[5]=0,n[6]=-t,n[7]=e,n[8]=0,n[9]=-t,n[10]=-e,n[11]=0,n[12]=t,n[13]=-e,n[14]=0,i.needsUpdate=!0,this.color!==void 0?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Lr.prototype=Object.create(b.prototype),Lr.prototype.constructor=Lr,Lr.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Lr.prototype.update=function(){var t=new x,e=new H,i=new H;return function(){var n=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{var r=n.geometry.getAttribute("color");e.copy(this.light.color),i.copy(this.light.groundColor);for(var o=0,s=r.count;o<s;o++){var a=o<s/2?e:i;r.setXYZ(o,a.r,a.g,a.b)}r.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),go.prototype=Object.create(be.prototype),go.prototype.constructor=go,Wo.prototype=Object.create(be.prototype),Wo.prototype.constructor=Wo,vo.prototype=Object.create(be.prototype),vo.prototype.constructor=vo,vo.prototype.update=function(){var t=new x,e=new x,i=new mt;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var n=this.object.matrixWorld,r=this.geometry.attributes.position,o=this.object.geometry,s=o.vertices;o=o.faces;for(var a=0,h=0,l=o.length;h<l;h++){var c=o[h],u=c.normal;t.copy(s[c.a]).add(s[c.b]).add(s[c.c]).divideScalar(3).applyMatrix4(n),e.copy(u).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),r.setXYZ(a,t.x,t.y,t.z),a+=1,r.setXYZ(a,e.x,e.y,e.z),a+=1}r.needsUpdate=!0}}(),br.prototype=Object.create(b.prototype),br.prototype.constructor=br,br.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},br.prototype.update=function(){var t=new x,e=new x,i=new x;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),i.subVectors(e,t),this.lightPlane.lookAt(i),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(i),this.targetLine.scale.z=i.length()}}(),yo.prototype=Object.create(be.prototype),yo.prototype.constructor=yo,yo.prototype.update=function(){function t(o,s,a,h){if(n.set(s,a,h).unproject(r),o=i[o],o!==void 0)for(s=e.getAttribute("position"),a=0,h=o.length;a<h;a++)s.setXYZ(o[a],n.x,n.y,n.z)}var e,i,n=new x,r=new Kt;return function(){e=this.geometry,i=this.pointMap,r.projectionMatrix.copy(this.camera.projectionMatrix),t("c",0,0,-1),t("t",0,0,1),t("n1",-1,-1,-1),t("n2",1,-1,-1),t("n3",-1,1,-1),t("n4",1,1,-1),t("f1",-1,-1,1),t("f2",1,-1,1),t("f3",-1,1,1),t("f4",1,1,1),t("u1",.7,1.1,-1),t("u2",-.7,1.1,-1),t("u3",0,2,-1),t("cf1",-1,0,1),t("cf2",1,0,1),t("cf3",0,-1,1),t("cf4",0,1,1),t("cn1",-1,0,-1),t("cn2",1,0,-1),t("cn3",0,-1,-1),t("cn4",0,1,-1),e.getAttribute("position").needsUpdate=!0}}(),_n.prototype=Object.create(be.prototype),_n.prototype.constructor=_n,_n.prototype.update=function(){var t=new Pt;return function(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&t.setFromObject(this.object),!t.isEmpty()){e=t.min;var i=t.max,n=this.geometry.attributes.position,r=n.array;r[0]=i.x,r[1]=i.y,r[2]=i.z,r[3]=e.x,r[4]=i.y,r[5]=i.z,r[6]=e.x,r[7]=e.y,r[8]=i.z,r[9]=i.x,r[10]=e.y,r[11]=i.z,r[12]=i.x,r[13]=i.y,r[14]=e.z,r[15]=e.x,r[16]=i.y,r[17]=e.z,r[18]=e.x,r[19]=e.y,r[20]=e.z,r[21]=i.x,r[22]=e.y,r[23]=e.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),_n.prototype.setFromObject=function(t){return this.object=t,this.update(),this},_n.prototype.copy=function(t){return be.prototype.copy.call(this,t),this.object=t.object,this},_n.prototype.clone=function(){return new this.constructor().copy(this)},_o.prototype=Object.create(be.prototype),_o.prototype.constructor=_o,_o.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),b.prototype.updateMatrixWorld.call(this,t))},xo.prototype=Object.create(qe.prototype),xo.prototype.constructor=xo,xo.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;1e-8>Math.abs(e)&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=0>e?1:0,this.lookAt(this.plane.normal),b.prototype.updateMatrixWorld.call(this,t)};var Zo,Ns;xn.prototype=Object.create(b.prototype),xn.prototype.constructor=xn,xn.prototype.setDirection=function(){var t=new x,e;return function(i){.99999<i.y?this.quaternion.set(0,0,0,1):-.99999>i.y?this.quaternion.set(1,0,0,0):(t.set(i.z,0,-i.x).normalize(),e=Math.acos(i.y),this.quaternion.setFromAxisAngle(t,e))}}(),xn.prototype.setLength=function(t,e,i){e===void 0&&(e=.2*t),i===void 0&&(i=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()},xn.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},xn.prototype.copy=function(t){return b.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},xn.prototype.clone=function(){return new this.constructor().copy(this)},wo.prototype=Object.create(be.prototype),wo.prototype.constructor=wo,pe.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(pe.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(yn.prototype,{createPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getPoints(t),this.createGeometry(t)},createSpacedPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getSpacedPoints(t),this.createGeometry(t)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new F,i=0,n=t.length;i<n;i++){var r=t[i];e.vertices.push(new x(r.x,r.y,r.z||0))}return e}}),Object.assign(Ki.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),ca.prototype=Object.create(Ei.prototype),ua.prototype=Object.create(Ei.prototype),Rs.prototype=Object.create(Ei.prototype),Object.assign(Rs.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),go.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Er.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Mr.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),qo.extractUrlBase(t)}}),Object.assign(jo.prototype,{setTexturePath:function(t){return console.warn("THREE.JSONLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(ds.prototype,{setTexturePath:function(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(Ls.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(Pt.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),bs.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Se,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Se.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Se.ceilPowerOfTwo(t)}}),Object.assign(mt.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(ft.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return t===void 0&&(t=new x),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,i,n,r,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,n,i,r,o)}}),xt.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},at.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(bi.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(Ce.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(Ce,{barycoordFromPoint:function(t,e,i,n,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Ce.getBarycoord(t,e,i,n,r)},normal:function(t,e,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Ce.getNormal(t,e,i,n)}}),Object.assign(Pn.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Nn(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Un(this,t)}}),Object.assign(Z.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(x.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,i){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Y.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(F.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(b.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(b.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},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.")}}}),Object.defineProperties(ii.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(ai.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(pe.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Bt.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(ri.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(q.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Rt.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,i){i!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Rt.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}}}),Object.assign(hn.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Vo.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(fe.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 H}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===1}}}),Object.defineProperties(Yi.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(Je.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Ft.prototype,{clearTarget:function(t,e,i,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(t),this.clear(e,i,n)},animate:function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Ft.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},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.")}}}),Object.defineProperties(Nt.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(ht.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Le.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}}),Tr.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return new vs().load(t,function(i){e.setBuffer(i)}),this},ws.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},po.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},An.crossOrigin=void 0,An.loadTexture=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var r=new Io;return r.setCrossOrigin(this.crossOrigin),t=r.load(t,i,void 0,n),e&&(t.mapping=e),t},An.loadTextureCube=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var r=new cs;return r.setCrossOrigin(this.crossOrigin),t=r.load(t,i,void 0,n),e&&(t.mapping=e),t},An.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},An.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},p.WebGLRenderTargetCube=wt,p.WebGLRenderTarget=ht,p.WebGLRenderer=Ft,p.ShaderLib=pn,p.UniformsLib=le,p.UniformsUtils=_i,p.ShaderChunk=Ie,p.FogExp2=Jt,p.Fog=yi,p.Scene=qi,p.Sprite=ei,p.LOD=ii,p.SkinnedMesh=ke,p.Skeleton=ai,p.Bone=hi,p.Mesh=Ke,p.LineSegments=be,p.LineLoop=an,p.Line=qe,p.Points=nr,p.Group=Pe,p.VideoTexture=os,p.DataTexture=ct,p.DataTexture3D=D,p.CompressedTexture=rr,p.CubeTexture=_,p.CanvasTexture=Ur,p.DepthTexture=Fr,p.Texture=Ct,p.AnimationLoader=Qs,p.CompressedTextureLoader=$s,p.DataTextureLoader=ls,p.CubeTextureLoader=cs,p.TextureLoader=Io,p.ObjectLoader=ds,p.MaterialLoader=ko,p.BufferGeometryLoader=ps,p.DefaultLoadingManager=Oi,p.LoadingManager=hs,p.JSONLoader=jo,p.ImageLoader=ho,p.ImageBitmapLoader=fs,p.FontLoader=ta,p.FileLoader=Xi,p.Loader=Mr,p.LoaderUtils=qo,p.Cache=Zn,p.AudioLoader=vs,p.SpotLightShadow=zo,p.SpotLight=No,p.PointLight=Bo,p.RectAreaLight=Ho,p.HemisphereLight=Do,p.DirectionalLightShadow=Uo,p.DirectionalLight=Fo,p.AmbientLight=Go,p.LightShadow=Yn,p.Light=ri,p.StereoCamera=ea,p.PerspectiveCamera=Bt,p.OrthographicCamera=uo,p.CubeCamera=po,p.ArrayCamera=te,p.Camera=Kt,p.AudioListener=_s,p.PositionalAudio=xs,p.AudioContext=zs,p.AudioAnalyser=ws,p.Audio=Tr,p.VectorKeyframeTrack=xr,p.StringKeyframeTrack=Oo,p.QuaternionKeyframeTrack=ao,p.NumberKeyframeTrack=_r,p.ColorKeyframeTrack=Ro,p.BooleanKeyframeTrack=bo,p.PropertyMixer=Ms,p.PropertyBinding=Pi,p.KeyframeTrack=wi,p.AnimationUtils=Ai,p.AnimationObjectGroup=na,p.AnimationMixer=Ts,p.AnimationClip=ki,p.Uniform=Vo,p.InstancedBufferGeometry=Ss,p.BufferGeometry=Rt,p.Geometry=F,p.InterleavedBufferAttribute=He,p.InstancedInterleavedBuffer=Es,p.InterleavedBuffer=Ge,p.InstancedBufferAttribute=Ps,p.Face3=C,p.Object3D=b,p.Raycaster=oa,p.Layers=G,p.EventDispatcher=pt,p.Clock=ys,p.QuaternionLinearInterpolant=Co,p.LinearInterpolant=so,p.DiscreteInterpolant=Lo,p.CubicInterpolant=Ao,p.Interpolant=Hi,p.Triangle=Ce,p.Math=Se,p.Spherical=aa,p.Cylindrical=ha,p.Plane=xt,p.Frustum=Q,p.Sphere=Ot,p.Ray=bi,p.Matrix4=ft,p.Matrix3=mt,p.Box3=Pt,p.Box2=Ls,p.Line3=bs,p.Euler=M,p.Vector4=Y,p.Vector3=x,p.Vector2=Z,p.Quaternion=at,p.Color=H,p.ImmediateRenderObject=fo,p.VertexNormalsHelper=mo,p.SpotLightHelper=Sr,p.SkeletonHelper=Er,p.PointLightHelper=Pr,p.RectAreaLightHelper=Ar,p.HemisphereLightHelper=Lr,p.GridHelper=go,p.PolarGridHelper=Wo,p.FaceNormalsHelper=vo,p.DirectionalLightHelper=br,p.CameraHelper=yo,p.BoxHelper=_n,p.Box3Helper=_o,p.PlaneHelper=xo,p.ArrowHelper=xn,p.AxesHelper=wo,p.Shape=Pn,p.Path=Ki,p.ShapePath=ms,p.Font=gs,p.CurvePath=yn,p.Curve=pe,p.ImageUtils=An,p.ShapeUtils=wn,p.WebGLUtils=ne,p.WireframeGeometry=or,p.ParametricGeometry=Gr,p.ParametricBufferGeometry=sr,p.TetrahedronGeometry=kr,p.TetrahedronBufferGeometry=ar,p.OctahedronGeometry=jr,p.OctahedronBufferGeometry=Dn,p.IcosahedronGeometry=Vr,p.IcosahedronBufferGeometry=hr,p.DodecahedronGeometry=Wr,p.DodecahedronBufferGeometry=lr,p.PolyhedronGeometry=Hr,p.PolyhedronBufferGeometry=zi,p.TubeGeometry=Xr,p.TubeBufferGeometry=cr,p.TorusKnotGeometry=qr,p.TorusKnotBufferGeometry=ur,p.TorusGeometry=Yr,p.TorusBufferGeometry=pr,p.TextGeometry=Kr,p.TextBufferGeometry=dr,p.SphereGeometry=to,p.SphereBufferGeometry=Bn,p.RingGeometry=eo,p.RingBufferGeometry=fr,p.PlaneGeometry=Ti,p.PlaneBufferGeometry=oi,p.LatheGeometry=io,p.LatheBufferGeometry=mr,p.ShapeGeometry=Un,p.ShapeBufferGeometry=Fn,p.ExtrudeGeometry=Nn,p.ExtrudeBufferGeometry=hn,p.EdgesGeometry=gr,p.ConeGeometry=no,p.ConeBufferGeometry=ro,p.CylinderGeometry=Gn,p.CylinderBufferGeometry=vn,p.CircleGeometry=oo,p.CircleBufferGeometry=vr,p.BoxGeometry=Fe,p.BoxBufferGeometry=vi,p.ShadowMaterial=Hn,p.SpriteMaterial=We,p.RawShaderMaterial=yr,p.ShaderMaterial=Je,p.PointsMaterial=xi,p.MeshPhysicalMaterial=kn,p.MeshStandardMaterial=ln,p.MeshPhongMaterial=Yi,p.MeshToonMaterial=jn,p.MeshNormalMaterial=Vn,p.MeshLambertMaterial=Wn,p.MeshDepthMaterial=Et,p.MeshDistanceMaterial=yt,p.MeshBasicMaterial=je,p.MeshMatcapMaterial=Xn,p.LineDashedMaterial=qn,p.LineBasicMaterial=Ne,p.Material=fe,p.Float64BufferAttribute=kt,p.Float32BufferAttribute=ut,p.Uint32BufferAttribute=ie,p.Int32BufferAttribute=Vt,p.Uint16BufferAttribute=Gt,p.Int16BufferAttribute=bt,p.Uint8ClampedBufferAttribute=Lt,p.Uint8BufferAttribute=it,p.Int8BufferAttribute=st,p.BufferAttribute=q,p.ArcCurve=wr,p.CatmullRomCurve3=Ei,p.CubicBezierCurve=Zi,p.CubicBezierCurve3=cn,p.EllipseCurve=ji,p.LineCurve=Ni,p.LineCurve3=Ji,p.QuadraticBezierCurve=Qi,p.QuadraticBezierCurve3=un,p.SplineCurve=$i,p.REVISION="98",p.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},p.CullFaceNone=0,p.CullFaceBack=1,p.CullFaceFront=2,p.CullFaceFrontBack=3,p.FrontFaceDirectionCW=0,p.FrontFaceDirectionCCW=1,p.BasicShadowMap=0,p.PCFShadowMap=1,p.PCFSoftShadowMap=2,p.FrontSide=0,p.BackSide=1,p.DoubleSide=2,p.FlatShading=1,p.SmoothShading=2,p.NoColors=0,p.FaceColors=1,p.VertexColors=2,p.NoBlending=0,p.NormalBlending=1,p.AdditiveBlending=2,p.SubtractiveBlending=3,p.MultiplyBlending=4,p.CustomBlending=5,p.AddEquation=100,p.SubtractEquation=101,p.ReverseSubtractEquation=102,p.MinEquation=103,p.MaxEquation=104,p.ZeroFactor=200,p.OneFactor=201,p.SrcColorFactor=202,p.OneMinusSrcColorFactor=203,p.SrcAlphaFactor=204,p.OneMinusSrcAlphaFactor=205,p.DstAlphaFactor=206,p.OneMinusDstAlphaFactor=207,p.DstColorFactor=208,p.OneMinusDstColorFactor=209,p.SrcAlphaSaturateFactor=210,p.NeverDepth=0,p.AlwaysDepth=1,p.LessDepth=2,p.LessEqualDepth=3,p.EqualDepth=4,p.GreaterEqualDepth=5,p.GreaterDepth=6,p.NotEqualDepth=7,p.MultiplyOperation=0,p.MixOperation=1,p.AddOperation=2,p.NoToneMapping=0,p.LinearToneMapping=1,p.ReinhardToneMapping=2,p.Uncharted2ToneMapping=3,p.CineonToneMapping=4,p.UVMapping=300,p.CubeReflectionMapping=301,p.CubeRefractionMapping=302,p.EquirectangularReflectionMapping=303,p.EquirectangularRefractionMapping=304,p.SphericalReflectionMapping=305,p.CubeUVReflectionMapping=306,p.CubeUVRefractionMapping=307,p.RepeatWrapping=1e3,p.ClampToEdgeWrapping=1001,p.MirroredRepeatWrapping=1002,p.NearestFilter=1003,p.NearestMipMapNearestFilter=1004,p.NearestMipMapLinearFilter=1005,p.LinearFilter=1006,p.LinearMipMapNearestFilter=1007,p.LinearMipMapLinearFilter=1008,p.UnsignedByteType=1009,p.ByteType=1010,p.ShortType=1011,p.UnsignedShortType=1012,p.IntType=1013,p.UnsignedIntType=1014,p.FloatType=1015,p.HalfFloatType=1016,p.UnsignedShort4444Type=1017,p.UnsignedShort5551Type=1018,p.UnsignedShort565Type=1019,p.UnsignedInt248Type=1020,p.AlphaFormat=1021,p.RGBFormat=1022,p.RGBAFormat=1023,p.LuminanceFormat=1024,p.LuminanceAlphaFormat=1025,p.RGBEFormat=1023,p.DepthFormat=1026,p.DepthStencilFormat=1027,p.RedFormat=1028,p.RGB_S3TC_DXT1_Format=33776,p.RGBA_S3TC_DXT1_Format=33777,p.RGBA_S3TC_DXT3_Format=33778,p.RGBA_S3TC_DXT5_Format=33779,p.RGB_PVRTC_4BPPV1_Format=35840,p.RGB_PVRTC_2BPPV1_Format=35841,p.RGBA_PVRTC_4BPPV1_Format=35842,p.RGBA_PVRTC_2BPPV1_Format=35843,p.RGB_ETC1_Format=36196,p.RGBA_ASTC_4x4_Format=37808,p.RGBA_ASTC_5x4_Format=37809,p.RGBA_ASTC_5x5_Format=37810,p.RGBA_ASTC_6x5_Format=37811,p.RGBA_ASTC_6x6_Format=37812,p.RGBA_ASTC_8x5_Format=37813,p.RGBA_ASTC_8x6_Format=37814,p.RGBA_ASTC_8x8_Format=37815,p.RGBA_ASTC_10x5_Format=37816,p.RGBA_ASTC_10x6_Format=37817,p.RGBA_ASTC_10x8_Format=37818,p.RGBA_ASTC_10x10_Format=37819,p.RGBA_ASTC_12x10_Format=37820,p.RGBA_ASTC_12x12_Format=37821,p.LoopOnce=2200,p.LoopRepeat=2201,p.LoopPingPong=2202,p.InterpolateDiscrete=2300,p.InterpolateLinear=2301,p.InterpolateSmooth=2302,p.ZeroCurvatureEnding=2400,p.ZeroSlopeEnding=2401,p.WrapAroundEnding=2402,p.TrianglesDrawMode=0,p.TriangleStripDrawMode=1,p.TriangleFanDrawMode=2,p.LinearEncoding=3e3,p.sRGBEncoding=3001,p.GammaEncoding=3007,p.RGBEEncoding=3002,p.LogLuvEncoding=3003,p.RGBM7Encoding=3004,p.RGBM16Encoding=3005,p.RGBDEncoding=3006,p.BasicDepthPacking=3200,p.RGBADepthPacking=3201,p.TangentSpaceNormalMap=0,p.ObjectSpaceNormalMap=1,p.CubeGeometry=Fe,p.Face4=function(t,e,i,n,r,o,s){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new C(t,e,i,r,o,s)},p.LineStrip=0,p.LinePieces=1,p.MeshFaceMaterial=function(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t},p.MultiMaterial=function(t){return t===void 0&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t},p.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new nr(t,e)},p.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ei(t)},p.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new nr(t,e)},p.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new xi(t)},p.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new xi(t)},p.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new xi(t)},p.Vertex=function(t,e,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new x(t,e,i)},p.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new q(t,e).setDynamic(!0)},p.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new st(t,e)},p.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new it(t,e)},p.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Lt(t,e)},p.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new bt(t,e)},p.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gt(t,e)},p.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new Vt(t,e)},p.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new ie(t,e)},p.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new ut(t,e)},p.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new kt(t,e)},p.ClosedSplineCurve3=ca,p.SplineCurve3=ua,p.Spline=Rs,p.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new wo(t)},p.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new _n(t,e)},p.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new be(new gr(t.geometry),new Ne({color:e!==void 0?e:16777215}))},p.WireframeHelper=function(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new be(new or(t.geometry),new Ne({color:e!==void 0?e:16777215}))},p.XHRLoader=function(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Xi(t)},p.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new ls(t)},p.GeometryUtils={merge:function(t,e,i){if(console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh){e.matrixAutoUpdate&&e.updateMatrix();var n=e.matrix;e=e.geometry}t.merge(e,n,i)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},p.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}},p.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},p.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}},p.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(p,"__esModule",{value:!0})}),THREE.Sky=function(){var p=THREE.Sky.SkyShader,pt=new THREE.ShaderMaterial({fragmentShader:p.fragmentShader,vertexShader:p.vertexShader,uniforms:THREE.UniformsUtils.clone(p.uniforms),side:THREE.BackSide});THREE.Mesh.call(this,new THREE.BoxBufferGeometry(1,1,1),pt)},THREE.Sky.prototype=Object.create(THREE.Mesh.prototype),THREE.Sky.SkyShader={uniforms:{luminance:{value:1},turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new THREE.Vector3}},vertexShader:["uniform vec3 sunPosition;","uniform float rayleigh;","uniform float turbidity;","uniform float mieCoefficient;","varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","const vec3 up = vec3( 0.0, 1.0, 0.0 );","const float e = 2.71828182845904523536028747135266249775724709369995957;","const float pi = 3.141592653589793238462643383279502884197169;","const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );","const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );","const float v = 4.0;","const vec3 K = vec3( 0.686, 0.678, 0.666 );","const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );","const float cutoffAngle = 1.6110731556870734;","const float steepness = 1.5;","const float EE = 1000.0;","float sunIntensity( float zenithAngleCos ) {"," zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );"," return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );","}","vec3 totalMie( float T ) {"," float c = ( 0.2 * T ) * 10E-18;"," return 0.434 * c * MieConst;","}","void main() {"," vec4 worldPosition = modelMatrix * vec4( position, 1.0 );"," vWorldPosition = worldPosition.xyz;"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );"," gl_Position.z = gl_Position.w;"," vSunDirection = normalize( sunPosition );"," vSunE = sunIntensity( dot( vSunDirection, up ) );"," vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );"," float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );"," vBetaR = totalRayleigh * rayleighCoefficient;"," vBetaM = totalMie( turbidity ) * mieCoefficient;","}"].join(`
|
|
2570
|
+
`},_n={merge:function(t){for(var e={},i=0;i<t.length;i++){var n=this.clone(t[i]),o;for(o in n)e[o]=n[o]}return e},clone:function(t){var e={},i;for(i in t){e[i]={};for(var n in t[i]){var o=t[i][n];o&&(o.isColor||o.isMatrix3||o.isMatrix4||o.isVector2||o.isVector3||o.isVector4||o.isTexture)?e[i][n]=o.clone():Array.isArray(o)?e[i][n]=o.slice():e[i][n]=o}}return e}},Sr={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};Object.assign(Z.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this},setScalar:function(t){return this.b=this.g=this.r=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this},setRGB:function(t,e,i){return this.r=t,this.g=e,this.b=i,this},setHSL:function(){function t(e,i,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?e+6*(i-e)*n:.5>n?i:n<2/3?e+6*(i-e)*(2/3-n):e}return function(e,i,n){return e=$e.euclideanModulo(e,1),i=$e.clamp(i,0,1),n=$e.clamp(n,0,1),i===0?this.r=this.g=this.b=n:(i=.5>=n?n*(1+i):n+i-n*i,n=2*n-i,this.r=t(n,i,e+1/3),this.g=t(n,i,e),this.b=t(n,i,e-1/3)),this}}(),setStyle:function(t){function e(l){l!==void 0&&1>parseFloat(l)&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n=i[2];switch(i[1]){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))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,e(i[5]),this;if(i=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))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,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n)){n=parseFloat(i[1])/360;var o=parseInt(i[2],10)/100,s=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(n,o,s)}}}else if(i=/^#([A-Fa-f0-9]+)$/.exec(t)){if(i=i[1],n=i.length,n===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(n===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 t&&0<t.length&&(i=Sr[t],i!==void 0?this.setHex(i):console.warn("THREE.Color: Unknown color "+t)),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return e===void 0&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){return e===void 0&&(e=2),e=0<e?1/e:1,this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},copySRGBToLinear:function(){function t(e){return .04045>e?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),copyLinearToSRGB:function(){function t(e){return .0031308>e?12.92*e:1.055*Math.pow(e,.41666)-.055}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){t===void 0&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e=this.r,i=this.g,n=this.b,o=Math.max(e,i,n),s=Math.min(e,i,n),l,h=(s+o)/2;if(s===o)s=l=0;else{var c=o-s;switch(s=.5>=h?c/(o+s):c/(2-o-s),o){case e:l=(i-n)/c+(i<n?6:0);break;case i:l=(n-e)/c+2;break;case n:l=(e-i)/c+4}l/=6}return t.h=l,t.s=s,t.l=h,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var t={};return function(e,i,n){return this.getHSL(t),t.h+=e,t.s+=i,t.l+=n,this.setHSL(t.h,t.s,t.l),this}}(),add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},lerpHSL:function(){var t={h:0,s:0,l:0},e={h:0,s:0,l:0};return function(i,n){this.getHSL(t),i.getHSL(e),i=$e.lerp(t.h,e.h,n);var o=$e.lerp(t.s,e.s,n);return n=$e.lerp(t.l,e.l,n),this.setHSL(i,o,n),this}}(),equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return e===void 0&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var Re={common:{diffuse:{value:new Z(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Mt},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new M(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Z(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new Z(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Mt}},sprite:{diffuse:{value:new Z(15658734)},opacity:{value:1},center:{value:new M(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new Mt}}},kr={basic:{uniforms:_n.merge([Re.common,Re.specularmap,Re.envmap,Re.aomap,Re.lightmap,Re.fog]),vertexShader:hi.meshbasic_vert,fragmentShader:hi.meshbasic_frag},lambert:{uniforms:_n.merge([Re.common,Re.specularmap,Re.envmap,Re.aomap,Re.lightmap,Re.emissivemap,Re.fog,Re.lights,{emissive:{value:new Z(0)}}]),vertexShader:hi.meshlambert_vert,fragmentShader:hi.meshlambert_frag},phong:{uniforms:_n.merge([Re.common,Re.specularmap,Re.envmap,Re.aomap,Re.lightmap,Re.emissivemap,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.gradientmap,Re.fog,Re.lights,{emissive:{value:new Z(0)},specular:{value:new Z(1118481)},shininess:{value:30}}]),vertexShader:hi.meshphong_vert,fragmentShader:hi.meshphong_frag},standard:{uniforms:_n.merge([Re.common,Re.envmap,Re.aomap,Re.lightmap,Re.emissivemap,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.roughnessmap,Re.metalnessmap,Re.fog,Re.lights,{emissive:{value:new Z(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:hi.meshphysical_vert,fragmentShader:hi.meshphysical_frag},matcap:{uniforms:_n.merge([Re.common,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.fog,{matcap:{value:null}}]),vertexShader:hi.meshmatcap_vert,fragmentShader:hi.meshmatcap_frag},points:{uniforms:_n.merge([Re.points,Re.fog]),vertexShader:hi.points_vert,fragmentShader:hi.points_frag},dashed:{uniforms:_n.merge([Re.common,Re.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:hi.linedashed_vert,fragmentShader:hi.linedashed_frag},depth:{uniforms:_n.merge([Re.common,Re.displacementmap]),vertexShader:hi.depth_vert,fragmentShader:hi.depth_frag},normal:{uniforms:_n.merge([Re.common,Re.bumpmap,Re.normalmap,Re.displacementmap,{opacity:{value:1}}]),vertexShader:hi.normal_vert,fragmentShader:hi.normal_frag},sprite:{uniforms:_n.merge([Re.sprite,Re.fog]),vertexShader:hi.sprite_vert,fragmentShader:hi.sprite_frag},background:{uniforms:{uvTransform:{value:new Mt},t2D:{value:null}},vertexShader:hi.background_vert,fragmentShader:hi.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:hi.cube_vert,fragmentShader:hi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:hi.equirect_vert,fragmentShader:hi.equirect_frag},distanceRGBA:{uniforms:_n.merge([Re.common,Re.displacementmap,{referencePosition:{value:new S},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:hi.distanceRGBA_vert,fragmentShader:hi.distanceRGBA_frag},shadow:{uniforms:_n.merge([Re.lights,Re.fog,{color:{value:new Z(0)},opacity:{value:1}}]),vertexShader:hi.shadow_vert,fragmentShader:hi.shadow_frag}};kr.physical={uniforms:_n.merge([kr.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:hi.meshphysical_vert,fragmentShader:hi.meshphysical_frag},Object.assign(B.prototype,{clone:function(){return new this.constructor().copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,i=t.vertexNormals.length;e<i;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,i=t.vertexColors.length;e<i;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}}),E.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),E.DefaultOrder="XYZ",Object.defineProperties(E.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(E.prototype,{isEuler:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._order=n||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,i){var n=$e.clamp,o=t.elements;t=o[0];var s=o[4],l=o[8],h=o[1],c=o[5],p=o[9],f=o[2],d=o[6];return o=o[10],e=e||this._order,e==="XYZ"?(this._y=Math.asin(n(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(-p,o),this._z=Math.atan2(-s,t)):(this._x=Math.atan2(d,c),this._z=0)):e==="YXZ"?(this._x=Math.asin(-n(p,-1,1)),.99999>Math.abs(p)?(this._y=Math.atan2(l,o),this._z=Math.atan2(h,c)):(this._y=Math.atan2(-f,t),this._z=0)):e==="ZXY"?(this._x=Math.asin(n(d,-1,1)),.99999>Math.abs(d)?(this._y=Math.atan2(-f,o),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(h,t))):e==="ZYX"?(this._y=Math.asin(-n(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(d,o),this._z=Math.atan2(h,t)):(this._x=0,this._z=Math.atan2(-s,c))):e==="YZX"?(this._z=Math.asin(n(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(-p,c),this._y=Math.atan2(-f,t)):(this._x=0,this._y=Math.atan2(l,o))):e==="XZY"?(this._z=Math.asin(-n(s,-1,1)),.99999>Math.abs(s)?(this._x=Math.atan2(d,c),this._y=Math.atan2(l,t)):(this._x=Math.atan2(-p,o),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,i!==!1&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new _t;return function(e,i,n){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,i,n)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new mt;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new S(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(Y.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask=this.mask|1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return(this.mask&t.mask)!==0}});var hh=0;z.DefaultUp=new S(0,1,0),z.DefaultMatrixAutoUpdate=!0,z.prototype=Object.assign(Object.create(ht.prototype),{constructor:z,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new mt;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new mt;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new S(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new S(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new S(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new S;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new S(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new S(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new S(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new _t;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new mt,e=new _t,i=new S,n=new S;return function(o,s,l){o.isVector3?i.copy(o):i.set(o,s,l),o=this.parent,this.updateWorldMatrix(!0,!1),n.setFromMatrixPosition(this.matrixWorld),this.isCamera?e.lookAt(n,i,this.up):e.lookAt(i,n,this.up),this.quaternion.setFromRotationMatrix(e),o&&(e.extractRotation(o.matrixWorld),t.setFromRotationMatrix(e),this.quaternion.premultiply(t.inverse()))}}(),add:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.parent!==null&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}return e=this.children.indexOf(t),e!==-1&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(e,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var i=0,n=this.children.length;i<n;i++){var o=this.children[i].getObjectByProperty(t,e);if(o!==void 0)return o}},getWorldPosition:function(t){return t===void 0&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new S),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new S,e=new S;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),i=new mt),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,e),i}}(),getWorldScale:function(){var t=new S,e=new mt;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),i=new S),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,i),i}}(),getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),t=new S),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()},raycast:function(){},traverse:function(t){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverse(t)},traverseVisible:function(t){if(this.visible!==!1){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].updateMatrixWorld(t)},updateWorldMatrix:function(t,e){var i=this.parent;if(t===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),e===!0)for(t=this.children,e=0,i=t.length;e<i;e++)t[e].updateWorldMatrix(!1,!0)},toJSON:function(t){function e(f,d){return f[d.uuid]===void 0&&(f[d.uuid]=d.toJSON(t)),d.uuid}function i(f){var d=[],v;for(v in f){var x=f[v];delete x.metadata,d.push(x)}return d}var n=t===void 0||typeof t=="string",o={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},o.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var s={};if(s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.castShadow===!0&&(s.castShadow=!0),this.receiveShadow===!0&&(s.receiveShadow=!0),this.visible===!1&&(s.visible=!1),this.frustumCulled===!1&&(s.frustumCulled=!1),this.renderOrder!==0&&(s.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isMesh||this.isLine||this.isPoints){s.geometry=e(t.geometries,this.geometry);var l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0)if(l=l.shapes,Array.isArray(l))for(var h=0,c=l.length;h<c;h++)e(t.shapes,l[h]);else e(t.shapes,l)}if(this.material!==void 0)if(Array.isArray(this.material)){for(l=[],h=0,c=this.material.length;h<c;h++)l.push(e(t.materials,this.material[h]));s.material=l}else s.material=e(t.materials,this.material);if(0<this.children.length)for(s.children=[],h=0;h<this.children.length;h++)s.children.push(this.children[h].toJSON(t).object);if(n){n=i(t.geometries),h=i(t.materials),c=i(t.textures);var p=i(t.images);l=i(t.shapes),0<n.length&&(o.geometries=n),0<h.length&&(o.materials=h),0<c.length&&(o.textures=c),0<p.length&&(o.images=p),0<l.length&&(o.shapes=l)}return o.object=s,o},clone:function(t){return new this.constructor().copy(this,t)},copy:function(t,e){if(e===void 0&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(e=0;e<t.children.length;e++)this.add(t.children[e].clone());return this}});var uh=0;X.prototype=Object.assign(Object.create(ht.prototype),{constructor:X,isGeometry:!0,applyMatrix:function(t){for(var e=new Mt().getNormalMatrix(t),i=0,n=this.vertices.length;i<n;i++)this.vertices[i].applyMatrix4(t);for(i=0,n=this.faces.length;i<n;i++){t=this.faces[i],t.normal.applyMatrix3(e).normalize();for(var o=0,s=t.vertexNormals.length;o<s;o++)t.vertexNormals[o].applyMatrix3(e).normalize()}return this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this.normalsNeedUpdate=this.verticesNeedUpdate=!0,this},rotateX:function(){var t=new _t;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new _t;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new _t;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new _t;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new _t;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new z;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(P,R,I,$){var W=h===void 0?[]:[i.colors[P].clone(),i.colors[R].clone(),i.colors[I].clone()],ot=l===void 0?[]:[new S().fromArray(l,3*P),new S().fromArray(l,3*R),new S().fromArray(l,3*I)];$=new B(P,R,I,ot,W,$),i.faces.push($),c!==void 0&&i.faceVertexUvs[0].push([new M().fromArray(c,2*P),new M().fromArray(c,2*R),new M().fromArray(c,2*I)]),p!==void 0&&i.faceVertexUvs[1].push([new M().fromArray(p,2*P),new M().fromArray(p,2*R),new M().fromArray(p,2*I)])}var i=this,n=t.index!==null?t.index.array:void 0,o=t.attributes,s=o.position.array,l=o.normal!==void 0?o.normal.array:void 0,h=o.color!==void 0?o.color.array:void 0,c=o.uv!==void 0?o.uv.array:void 0,p=o.uv2!==void 0?o.uv2.array:void 0;p!==void 0&&(this.faceVertexUvs[1]=[]);for(var f=o=0;o<s.length;o+=3,f+=2)i.vertices.push(new S().fromArray(s,o)),h!==void 0&&i.colors.push(new Z().fromArray(h,o));var d=t.groups;if(0<d.length)for(o=0;o<d.length;o++){s=d[o];var v=s.start,x=s.count;for(f=v,v+=x;f<v;f+=3)n!==void 0?e(n[f],n[f+1],n[f+2],s.materialIndex):e(f,f+1,f+2,s.materialIndex)}else if(n!==void 0)for(o=0;o<n.length;o+=3)e(n[o],n[o+1],n[o+2]);else for(o=0;o<s.length/3;o+=3)e(o,o+1,o+2);return this.computeFaceNormals(),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){var t=new S;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius;e=e===0?1:1/e;var i=new _t;return i.set(e,0,0,-e*t.x,0,e,0,-e*t.y,0,0,e,-e*t.z,0,0,0,1),this.applyMatrix(i),this},computeFaceNormals:function(){for(var t=new S,e=new S,i=0,n=this.faces.length;i<n;i++){var o=this.faces[i],s=this.vertices[o.a],l=this.vertices[o.b];t.subVectors(this.vertices[o.c],l),e.subVectors(s,l),t.cross(e),t.normalize(),o.normal.copy(t)}},computeVertexNormals:function(t){t===void 0&&(t=!0);var e,i=Array(this.vertices.length),n=0;for(e=this.vertices.length;n<e;n++)i[n]=new S;if(t){var o=new S,s=new S;for(t=0,n=this.faces.length;t<n;t++){e=this.faces[t];var l=this.vertices[e.a],h=this.vertices[e.b],c=this.vertices[e.c];o.subVectors(c,h),s.subVectors(l,h),o.cross(s),i[e.a].add(o),i[e.b].add(o),i[e.c].add(o)}}else for(this.computeFaceNormals(),t=0,n=this.faces.length;t<n;t++)e=this.faces[t],i[e.a].add(e.normal),i[e.b].add(e.normal),i[e.c].add(e.normal);for(n=0,e=this.vertices.length;n<e;n++)i[n].normalize();for(t=0,n=this.faces.length;t<n;t++)e=this.faces[t],l=e.vertexNormals,l.length===3?(l[0].copy(i[e.a]),l[1].copy(i[e.b]),l[2].copy(i[e.c])):(l[0]=i[e.a].clone(),l[1]=i[e.b].clone(),l[2]=i[e.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t;this.computeFaceNormals();var e=0;for(t=this.faces.length;e<t;e++){var i=this.faces[e],n=i.vertexNormals;n.length===3?(n[0].copy(i.normal),n[1].copy(i.normal),n[2].copy(i.normal)):(n[0]=i.normal.clone(),n[1]=i.normal.clone(),n[2]=i.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,i=0;for(e=this.faces.length;i<e;i++){var n=this.faces[i];n.__originalFaceNormal?n.__originalFaceNormal.copy(n.normal):n.__originalFaceNormal=n.normal.clone(),n.__originalVertexNormals||(n.__originalVertexNormals=[]);var o=0;for(t=n.vertexNormals.length;o<t;o++)n.__originalVertexNormals[o]?n.__originalVertexNormals[o].copy(n.vertexNormals[o]):n.__originalVertexNormals[o]=n.vertexNormals[o].clone()}var s=new X;for(s.faces=this.faces,o=0,t=this.morphTargets.length;o<t;o++){if(!this.morphNormals[o]){this.morphNormals[o]={},this.morphNormals[o].faceNormals=[],this.morphNormals[o].vertexNormals=[],n=this.morphNormals[o].faceNormals;var l=this.morphNormals[o].vertexNormals;for(i=0,e=this.faces.length;i<e;i++){var h=new S,c={a:new S,b:new S,c:new S};n.push(h),l.push(c)}}for(l=this.morphNormals[o],s.vertices=this.morphTargets[o].vertices,s.computeFaceNormals(),s.computeVertexNormals(),i=0,e=this.faces.length;i<e;i++)n=this.faces[i],h=l.faceNormals[i],c=l.vertexNormals[i],h.copy(n.normal),c.a.copy(n.vertexNormals[0]),c.b.copy(n.vertexNormals[1]),c.c.copy(n.vertexNormals[2])}for(i=0,e=this.faces.length;i<e;i++)n=this.faces[i],n.normal=n.__originalFaceNormal,n.vertexNormals=n.__originalVertexNormals},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new Nt),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new Ht),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,o=this.vertices.length,s=this.vertices,l=t.vertices,h=this.faces,c=t.faces,p=this.faceVertexUvs[0],f=t.faceVertexUvs[0],d=this.colors,v=t.colors;i===void 0&&(i=0),e!==void 0&&(n=new Mt().getNormalMatrix(e)),t=0;for(var x=l.length;t<x;t++){var P=l[t].clone();e!==void 0&&P.applyMatrix4(e),s.push(P)}for(t=0,x=v.length;t<x;t++)d.push(v[t].clone());for(t=0,x=c.length;t<x;t++){l=c[t];var R=l.vertexNormals;for(v=l.vertexColors,d=new B(l.a+o,l.b+o,l.c+o),d.normal.copy(l.normal),n!==void 0&&d.normal.applyMatrix3(n).normalize(),e=0,s=R.length;e<s;e++)P=R[e].clone(),n!==void 0&&P.applyMatrix3(n).normalize(),d.vertexNormals.push(P);for(d.color.copy(l.color),e=0,s=v.length;e<s;e++)P=v[e],d.vertexColors.push(P.clone());d.materialIndex=l.materialIndex+i,h.push(d)}for(t=0,x=f.length;t<x;t++)if(i=f[t],n=[],i!==void 0){for(e=0,s=i.length;e<s;e++)n.push(i[e].clone());p.push(n)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t={},e=[],i=[],n=Math.pow(10,4),o,s=0;for(o=this.vertices.length;s<o;s++){var l=this.vertices[s];l=Math.round(l.x*n)+"_"+Math.round(l.y*n)+"_"+Math.round(l.z*n),t[l]===void 0?(t[l]=s,e.push(this.vertices[s]),i[s]=e.length-1):i[s]=i[t[l]]}for(t=[],s=0,o=this.faces.length;s<o;s++)for(n=this.faces[s],n.a=i[n.a],n.b=i[n.b],n.c=i[n.c],n=[n.a,n.b,n.c],l=0;3>l;l++)if(n[l]===n[(l+1)%3]){t.push(s);break}for(s=t.length-1;0<=s;s--)for(n=t[s],this.faces.splice(n,1),i=0,o=this.faceVertexUvs.length;i<o;i++)this.faceVertexUvs[i].splice(n,1);return s=this.vertices.length-e.length,this.vertices=e,s},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new S(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,i=0;i<e;i++)t[i]._id=i;t.sort(function(c,p){return c.materialIndex-p.materialIndex});var n=this.faceVertexUvs[0],o=this.faceVertexUvs[1],s,l;for(n&&n.length===e&&(s=[]),o&&o.length===e&&(l=[]),i=0;i<e;i++){var h=t[i]._id;s&&s.push(n[h]),l&&l.push(o[h])}s&&(this.faceVertexUvs[0]=s),l&&(this.faceVertexUvs[1]=l)},toJSON:function(){function t(wt,C,D){return D?wt|1<<C:wt&~(1<<C)}function e(wt){var C=wt.x.toString()+wt.y.toString()+wt.z.toString();return p[C]!==void 0||(p[C]=c.length/3,c.push(wt.x,wt.y,wt.z)),p[C]}function i(wt){var C=wt.r.toString()+wt.g.toString()+wt.b.toString();return d[C]!==void 0||(d[C]=f.length,f.push(wt.getHex())),d[C]}function n(wt){var C=wt.x.toString()+wt.y.toString();return x[C]!==void 0||(x[C]=v.length/2,v.push(wt.x,wt.y)),x[C]}var o={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.parameters!==void 0){var s=this.parameters,l;for(l in s)s[l]!==void 0&&(o[l]=s[l]);return o}for(s=[],l=0;l<this.vertices.length;l++){var h=this.vertices[l];s.push(h.x,h.y,h.z)}h=[];var c=[],p={},f=[],d={},v=[],x={};for(l=0;l<this.faces.length;l++){var P=this.faces[l],R=this.faceVertexUvs[0][l]!==void 0,I=0<P.normal.length(),$=0<P.vertexNormals.length,W=P.color.r!==1||P.color.g!==1||P.color.b!==1,ot=0<P.vertexColors.length,Q=0;Q=t(Q,0,0),Q=t(Q,1,!0),Q=t(Q,2,!1),Q=t(Q,3,R),Q=t(Q,4,I),Q=t(Q,5,$),Q=t(Q,6,W),Q=t(Q,7,ot),h.push(Q),h.push(P.a,P.b,P.c),h.push(P.materialIndex),R&&(R=this.faceVertexUvs[0][l],h.push(n(R[0]),n(R[1]),n(R[2]))),I&&h.push(e(P.normal)),$&&(I=P.vertexNormals,h.push(e(I[0]),e(I[1]),e(I[2]))),W&&h.push(i(P.color)),ot&&(P=P.vertexColors,h.push(i(P[0]),i(P[1]),i(P[2])))}return o.data={},o.data.vertices=s,o.data.normals=c,0<f.length&&(o.data.colors=f),0<v.length&&(o.data.uvs=[v]),o.data.faces=h,o},clone:function(){return new X().copy(this)},copy:function(t){var e,i,n;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var o=t.vertices,s=0;for(e=o.length;s<e;s++)this.vertices.push(o[s].clone());for(o=t.colors,s=0,e=o.length;s<e;s++)this.colors.push(o[s].clone());for(o=t.faces,s=0,e=o.length;s<e;s++)this.faces.push(o[s].clone());for(s=0,e=t.faceVertexUvs.length;s<e;s++){var l=t.faceVertexUvs[s];for(this.faceVertexUvs[s]===void 0&&(this.faceVertexUvs[s]=[]),o=0,i=l.length;o<i;o++){var h=l[o],c=[],p=0;for(n=h.length;p<n;p++)c.push(h[p].clone());this.faceVertexUvs[s].push(c)}}for(p=t.morphTargets,s=0,e=p.length;s<e;s++){if(n={},n.name=p[s].name,p[s].vertices!==void 0)for(n.vertices=[],o=0,i=p[s].vertices.length;o<i;o++)n.vertices.push(p[s].vertices[o].clone());if(p[s].normals!==void 0)for(n.normals=[],o=0,i=p[s].normals.length;o<i;o++)n.normals.push(p[s].normals[o].clone());this.morphTargets.push(n)}for(p=t.morphNormals,s=0,e=p.length;s<e;s++){if(n={},p[s].vertexNormals!==void 0)for(n.vertexNormals=[],o=0,i=p[s].vertexNormals.length;o<i;o++)l=p[s].vertexNormals[o],h={},h.a=l.a.clone(),h.b=l.b.clone(),h.c=l.c.clone(),n.vertexNormals.push(h);if(p[s].faceNormals!==void 0)for(n.faceNormals=[],o=0,i=p[s].faceNormals.length;o<i;o++)n.faceNormals.push(p[s].faceNormals[o].clone());this.morphNormals.push(n)}for(o=t.skinWeights,s=0,e=o.length;s<e;s++)this.skinWeights.push(o[s].clone());for(o=t.skinIndices,s=0,e=o.length;s<e;s++)this.skinIndices.push(o[s].clone());for(o=t.lineDistances,s=0,e=o.length;s<e;s++)this.lineDistances.push(o[s]);return s=t.boundingBox,s!==null&&(this.boundingBox=s.clone()),s=t.boundingSphere,s!==null&&(this.boundingSphere=s.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(et.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(et.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=t!==void 0?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,o=this.itemSize;n<o;n++)this.array[t+n]=e.array[i+n];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),s=new Z),e[i++]=s.r,e[i++]=s.g,e[i++]=s.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),s=new M),e[i++]=s.x,e[i++]=s.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),s=new S),e[i++]=s.x,e[i++]=s.y,e[i++]=s.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),s=new nt),e[i++]=s.x,e[i++]=s.y,e[i++]=s.z,e[i++]=s.w}return this},set:function(t,e){return e===void 0&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this},setXYZW:function(t,e,i,n,o){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=o,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),yt.prototype=Object.create(et.prototype),yt.prototype.constructor=yt,ft.prototype=Object.create(et.prototype),ft.prototype.constructor=ft,zt.prototype=Object.create(et.prototype),zt.prototype.constructor=zt,Yt.prototype=Object.create(et.prototype),Yt.prototype.constructor=Yt,re.prototype=Object.create(et.prototype),re.prototype.constructor=re,se.prototype=Object.create(et.prototype),se.prototype.constructor=se,we.prototype=Object.create(et.prototype),we.prototype.constructor=we,Et.prototype=Object.create(et.prototype),Et.prototype.constructor=Et,ie.prototype=Object.create(et.prototype),ie.prototype.constructor=ie,Object.assign(ze.prototype,{computeGroups:function(t){var e=[],i=void 0;t=t.faces;for(var n=0;n<t.length;n++){var o=t[n];if(o.materialIndex!==i){i=o.materialIndex,s!==void 0&&(s.count=3*n-s.start,e.push(s));var s={start:3*n,materialIndex:i}}}s!==void 0&&(s.count=3*n-s.start,e.push(s)),this.groups=e},fromGeometry:function(t){var e=t.faces,i=t.vertices,n=t.faceVertexUvs,o=n[0]&&0<n[0].length,s=n[1]&&0<n[1].length,l=t.morphTargets,h=l.length;if(0<h){for(var c=[],p=0;p<h;p++)c[p]={name:l[p].name,data:[]};this.morphTargets.position=c}var f=t.morphNormals,d=f.length;if(0<d){var v=[];for(p=0;p<d;p++)v[p]={name:f[p].name,data:[]};this.morphTargets.normal=v}var x=t.skinIndices,P=t.skinWeights,R=x.length===i.length,I=P.length===i.length;for(0<i.length&&e.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),p=0;p<e.length;p++){var $=e[p];this.vertices.push(i[$.a],i[$.b],i[$.c]);var W=$.vertexNormals;for(W.length===3?this.normals.push(W[0],W[1],W[2]):(W=$.normal,this.normals.push(W,W,W)),W=$.vertexColors,W.length===3?this.colors.push(W[0],W[1],W[2]):(W=$.color,this.colors.push(W,W,W)),o===!0&&(W=n[0][p],W!==void 0?this.uvs.push(W[0],W[1],W[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",p),this.uvs.push(new M,new M,new M))),s===!0&&(W=n[1][p],W!==void 0?this.uvs2.push(W[0],W[1],W[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",p),this.uvs2.push(new M,new M,new M))),W=0;W<h;W++){var ot=l[W].vertices;c[W].data.push(ot[$.a],ot[$.b],ot[$.c])}for(W=0;W<d;W++)ot=f[W].vertexNormals[p],v[W].data.push(ot.a,ot.b,ot.c);R&&this.skinIndices.push(x[$.a],x[$.b],x[$.c]),I&&this.skinWeights.push(P[$.a],P[$.b],P[$.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var ch=1;Ut.prototype=Object.assign(Object.create(ht.prototype),{constructor:Ut,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(65535<rn(t)?we:re)(t,1):this.index=t},addAttribute:function(t,e,i){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?t==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(t,new et(e,i)))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,i){this.groups.push({start:t,count:e,materialIndex:i!==void 0?i:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;return e!==void 0&&(t.applyToBufferAttribute(e),e.needsUpdate=!0),e=this.attributes.normal,e!==void 0&&(new Mt().getNormalMatrix(t).applyToBufferAttribute(e),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},rotateX:function(){var t=new _t;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new _t;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new _t;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new _t;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new _t;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new z;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new S;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){t=new Et(3*e.vertices.length,3);var i=new Et(3*e.colors.length,3);this.addAttribute("position",t.copyVector3sArray(e.vertices)),this.addAttribute("color",i.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length&&(t=new Et(e.lineDistances.length,1),this.addAttribute("lineDistance",t.copyArray(e.lineDistances))),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var o=t[i];e.push(o.x,o.y,o.z||0)}return this.addAttribute("position",new Et(e,3)),this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var i=e.__directGeometry;if(e.elementsNeedUpdate===!0&&(i=void 0,e.elementsNeedUpdate=!1),i===void 0)return this.fromGeometry(e);i.verticesNeedUpdate=e.verticesNeedUpdate,i.normalsNeedUpdate=e.normalsNeedUpdate,i.colorsNeedUpdate=e.colorsNeedUpdate,i.uvsNeedUpdate=e.uvsNeedUpdate,i.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=i}return e.verticesNeedUpdate===!0&&(i=this.attributes.position,i!==void 0&&(i.copyVector3sArray(e.vertices),i.needsUpdate=!0),e.verticesNeedUpdate=!1),e.normalsNeedUpdate===!0&&(i=this.attributes.normal,i!==void 0&&(i.copyVector3sArray(e.normals),i.needsUpdate=!0),e.normalsNeedUpdate=!1),e.colorsNeedUpdate===!0&&(i=this.attributes.color,i!==void 0&&(i.copyColorsArray(e.colors),i.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(i=this.attributes.uv,i!==void 0&&(i.copyVector2sArray(e.uvs),i.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(i=this.attributes.lineDistance,i!==void 0&&(i.copyArray(e.lineDistances),i.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=new ze().fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);this.addAttribute("position",new et(e,3).copyVector3sArray(t.vertices)),0<t.normals.length&&(e=new Float32Array(3*t.normals.length),this.addAttribute("normal",new et(e,3).copyVector3sArray(t.normals))),0<t.colors.length&&(e=new Float32Array(3*t.colors.length),this.addAttribute("color",new et(e,3).copyColorsArray(t.colors))),0<t.uvs.length&&(e=new Float32Array(2*t.uvs.length),this.addAttribute("uv",new et(e,2).copyVector2sArray(t.uvs))),0<t.uvs2.length&&(e=new Float32Array(2*t.uvs2.length),this.addAttribute("uv2",new et(e,2).copyVector2sArray(t.uvs2))),this.groups=t.groups;for(var i in t.morphTargets){e=[];for(var n=t.morphTargets[i],o=0,s=n.length;o<s;o++){var l=n[o],h=new Et(3*l.data.length,3);h.name=l.name,e.push(h.copyVector3sArray(l.data))}this.morphAttributes[i]=e}return 0<t.skinIndices.length&&(i=new Et(4*t.skinIndices.length,4),this.addAttribute("skinIndex",i.copyVector4sArray(t.skinIndices))),0<t.skinWeights.length&&(i=new Et(4*t.skinWeights.length,4),this.addAttribute("skinWeight",i.copyVector4sArray(t.skinWeights))),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new Nt);var t=this.attributes.position;t!==void 0?this.boundingBox.setFromBufferAttribute(t):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:function(){var t=new Nt,e=new S;return function(){this.boundingSphere===null&&(this.boundingSphere=new Ht);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var o=0,s=0,l=i.count;s<l;s++)e.x=i.getX(s),e.y=i.getY(s),e.z=i.getZ(s),o=Math.max(o,n.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(o),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes;if(e.position){var i=e.position.array;if(e.normal===void 0)this.addAttribute("normal",new et(new Float32Array(i.length),3));else for(var n=e.normal.array,o=0,s=n.length;o<s;o++)n[o]=0;n=e.normal.array;var l=new S,h=new S,c=new S,p=new S,f=new S;if(t){var d=t.array;for(o=0,s=t.count;o<s;o+=3){t=3*d[o+0];var v=3*d[o+1],x=3*d[o+2];l.fromArray(i,t),h.fromArray(i,v),c.fromArray(i,x),p.subVectors(c,h),f.subVectors(l,h),p.cross(f),n[t]+=p.x,n[t+1]+=p.y,n[t+2]+=p.z,n[v]+=p.x,n[v+1]+=p.y,n[v+2]+=p.z,n[x]+=p.x,n[x+1]+=p.y,n[x+2]+=p.z}}else for(o=0,s=i.length;o<s;o+=9)l.fromArray(i,o),h.fromArray(i,o+3),c.fromArray(i,o+6),p.subVectors(c,h),f.subVectors(l,h),p.cross(f),n[o]=p.x,n[o+1]=p.y,n[o+2]=p.z,n[o+3]=p.x,n[o+4]=p.y,n[o+5]=p.z,n[o+6]=p.x,n[o+7]=p.y,n[o+8]=p.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){e===void 0&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var i=this.attributes,n;for(n in i)if(t.attributes[n]!==void 0){var o=i[n].array,s=t.attributes[n],l=s.array,h=0;for(s=s.itemSize*e;h<l.length;h++,s++)o[s]=l[h]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new S;return function(){for(var e=this.attributes.normal,i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.normalize(),e.setXYZ(i,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Ut,e=this.index.array,i=this.attributes,n;for(n in i){var o=i[n],s=o.array,l=o.itemSize,h=new s.constructor(e.length*l),c=0;o=0;for(var p=e.length;o<p;o++)for(var f=e[o]*l,d=0;d<l;d++)h[c++]=s[f++];t.addAttribute(n,new et(h,l))}for(e=this.groups,o=0,p=e.length;o<p;o++)i=e[o],t.addGroup(i.start,i.count,i.materialIndex);return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),0<Object.keys(this.userData).length&&(t.userData=this.userData),this.parameters!==void 0){var e=this.parameters;for(o in e)e[o]!==void 0&&(t[o]=e[o]);return t}t.data={attributes:{}};var i=this.index;i!==null&&(e=Array.prototype.slice.call(i.array),t.data.index={type:i.array.constructor.name,array:e}),i=this.attributes;for(o in i){var n=i[o];e=Array.prototype.slice.call(n.array),t.data.attributes[o]={itemSize:n.itemSize,type:n.array.constructor.name,array:e,normalized:n.normalized}}var o=this.groups;return 0<o.length&&(t.data.groups=JSON.parse(JSON.stringify(o))),o=this.boundingSphere,o!==null&&(t.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),t},clone:function(){return new Ut().copy(this)},copy:function(t){var e;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var i=t.index;i!==null&&this.setIndex(i.clone()),i=t.attributes;for(l in i)this.addAttribute(l,i[l].clone());var n=t.morphAttributes;for(l in n){var o=[],s=n[l];for(i=0,e=s.length;i<e;i++)o.push(s[i].clone());this.morphAttributes[l]=o}var l=t.groups;for(i=0,e=l.length;i<e;i++)n=l[i],this.addGroup(n.start,n.count,n.materialIndex);return l=t.boundingBox,l!==null&&(this.boundingBox=l.clone()),l=t.boundingSphere,l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Qe.prototype=Object.create(X.prototype),Qe.prototype.constructor=Qe,Ii.prototype=Object.create(Ut.prototype),Ii.prototype.constructor=Ii,Pn.prototype=Object.create(X.prototype),Pn.prototype.constructor=Pn,Zi.prototype=Object.create(Ut.prototype),Zi.prototype.constructor=Zi;var kl=0;Oe.prototype=Object.assign(Object.create(ht.prototype),{constructor:Oe,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(t!==void 0)for(var e in t){var i=t[e];if(i===void 0)console.warn("THREE.Material: '"+e+"' parameter is undefined.");else if(e==="shading")console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===1;else{var n=this[e];n===void 0?console.warn("THREE."+this.type+": '"+e+"' is not a property of this material."):n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]=i}}},toJSON:function(t){function e(o){var s=[],l;for(l in o){var h=o[l];delete h.metadata,s.push(h)}return s}var i=t===void 0||typeof t=="string";i&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};return 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.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),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.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity,this.combine!==void 0&&(n.combine=this.combine),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.size!==void 0&&(n.size=this.size),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.flatShading===!0&&(n.flatShading=this.flatShading),this.side!==0&&(n.side=this.side),this.vertexColors!==0&&(n.vertexColors=this.vertexColors),1>this.opacity&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,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!==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),0<this.alphaTest&&(n.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),1<this.wireframeLinewidth&&(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.skinning===!0&&(n.skinning=!0),this.visible===!1&&(n.visible=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),i&&(i=e(t.textures),t=e(t.images),0<i.length&&(n.textures=i),0<t.length&&(n.images=t)),n},clone:function(){return new this.constructor().copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,i=null;if(e!==null){var n=e.length;i=Array(n);for(var o=0;o!==n;++o)i[o]=e[o].clone()}return this.clippingPlanes=i,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Pi.prototype=Object.create(Oe.prototype),Pi.prototype.constructor=Pi,Pi.prototype.isShaderMaterial=!0,Pi.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=_n.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},Pi.prototype.toJSON=function(t){var e=Oe.prototype.toJSON.call(this,t);e.uniforms={};for(var i in this.uniforms){var n=this.uniforms[i].value;e.uniforms[i]=n.isTexture?{type:"t",value:n.toJSON(t).uuid}:n.isColor?{type:"c",value:n.getHex()}:n.isVector2?{type:"v2",value:n.toArray()}:n.isVector3?{type:"v3",value:n.toArray()}:n.isVector4?{type:"v4",value:n.toArray()}:n.isMatrix4?{type:"m4",value:n.toArray()}:{value:n}}return 0<Object.keys(this.defines).length&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(In.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return e===void 0&&(console.warn("THREE.Ray: .at() target is now required"),e=new S),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new S;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){return e===void 0&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new S),e.subVectors(t,this.origin),t=e.dot(this.direction),0>t?e.copy(this.origin):e.copy(this.direction).multiplyScalar(t).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new S;return function(e){var i=t.subVectors(e,this.origin).dot(this.direction);return 0>i?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(i).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new S,e=new S,i=new S;return function(n,o,s,l){t.copy(n).add(o).multiplyScalar(.5),e.copy(o).sub(n).normalize(),i.copy(this.origin).sub(t);var h=.5*n.distanceTo(o),c=-this.direction.dot(e),p=i.dot(this.direction),f=-i.dot(e),d=i.lengthSq(),v=Math.abs(1-c*c);if(0<v){n=c*f-p,o=c*p-f;var x=h*v;0<=n?o>=-x?o<=x?(h=1/v,n*=h,o*=h,c=n*(n+c*o+2*p)+o*(c*n+o+2*f)+d):(o=h,n=Math.max(0,-(c*o+p)),c=-n*n+o*(o+2*f)+d):(o=-h,n=Math.max(0,-(c*o+p)),c=-n*n+o*(o+2*f)+d):o<=-x?(n=Math.max(0,-(-c*h+p)),o=0<n?-h:Math.min(Math.max(-h,-f),h),c=-n*n+o*(o+2*f)+d):o<=x?(n=0,o=Math.min(Math.max(-h,-f),h),c=o*(o+2*f)+d):(n=Math.max(0,-(c*h+p)),o=0<n?h:Math.min(Math.max(-h,-f),h),c=-n*n+o*(o+2*f)+d)}else o=0<c?-h:h,n=Math.max(0,-(c*o+p)),c=-n*n+o*(o+2*f)+d;return s&&s.copy(this.direction).multiplyScalar(n).add(this.origin),l&&l.copy(e).multiplyScalar(o).add(t),c}}(),intersectSphere:function(){var t=new S;return function(e,i){t.subVectors(e.center,this.origin);var n=t.dot(this.direction),o=t.dot(t)-n*n;return e=e.radius*e.radius,o>e?null:(e=Math.sqrt(e-o),o=n-e,n+=e,0>o&&0>n?null:0>o?this.at(n,i):this.at(o,i))}}(),intersectsSphere:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);return e===0?t.distanceToPoint(this.origin)===0?0:null:(t=-(this.origin.dot(t.normal)+t.constant)/e,0<=t?t:null)},intersectPlane:function(t,e){return t=this.distanceToPlane(t),t===null?null:this.at(t,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return e===0||0>t.normal.dot(this.direction)*e},intersectBox:function(t,e){var i=1/this.direction.x,n=1/this.direction.y,o=1/this.direction.z,s=this.origin;if(0<=i){var l=(t.min.x-s.x)*i;i*=t.max.x-s.x}else l=(t.max.x-s.x)*i,i*=t.min.x-s.x;if(0<=n){var h=(t.min.y-s.y)*n;n*=t.max.y-s.y}else h=(t.max.y-s.y)*n,n*=t.min.y-s.y;return l>n||h>i||((h>l||l!==l)&&(l=h),(n<i||i!==i)&&(i=n),0<=o?(h=(t.min.z-s.z)*o,t=(t.max.z-s.z)*o):(h=(t.max.z-s.z)*o,t=(t.min.z-s.z)*o),l>t||h>i)?null:((h>l||l!==l)&&(l=h),(t<i||i!==i)&&(i=t),0>i?null:this.at(0<=l?l:i,e))},intersectsBox:function(){var t=new S;return function(e){return this.intersectBox(e,t)!==null}}(),intersectTriangle:function(){var t=new S,e=new S,i=new S,n=new S;return function(o,s,l,h,c){if(e.subVectors(s,o),i.subVectors(l,o),n.crossVectors(e,i),s=this.direction.dot(n),0<s){if(h)return null;h=1}else if(0>s)h=-1,s=-s;else return null;return t.subVectors(this.origin,o),o=h*this.direction.dot(i.crossVectors(t,i)),0>o||(l=h*this.direction.dot(e.cross(t)),0>l||o+l>s)?null:(o=-h*t.dot(n),0>o?null:this.at(o/s,c))}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(ni,{getNormal:function(){var t=new S;return function(e,i,n,o){return o===void 0&&(console.warn("THREE.Triangle: .getNormal() target is now required"),o=new S),o.subVectors(n,i),t.subVectors(e,i),o.cross(t),e=o.lengthSq(),0<e?o.multiplyScalar(1/Math.sqrt(e)):o.set(0,0,0)}}(),getBarycoord:function(){var t=new S,e=new S,i=new S;return function(n,o,s,l,h){t.subVectors(l,o),e.subVectors(s,o),i.subVectors(n,o),n=t.dot(t),o=t.dot(e),s=t.dot(i);var c=e.dot(e);l=e.dot(i);var p=n*c-o*o;return h===void 0&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),h=new S),p===0?h.set(-2,-1,-1):(p=1/p,c=(c*s-o*l)*p,n=(n*l-o*s)*p,h.set(1-c-n,n,c))}}(),containsPoint:function(){var t=new S;return function(e,i,n,o){return ni.getBarycoord(e,i,n,o,t),0<=t.x&&0<=t.y&&1>=t.x+t.y}}(),getUV:function(){var t=new S;return function(e,i,n,o,s,l,h,c){return this.getBarycoord(e,i,n,o,t),c.set(0,0),c.addScaledVector(s,t.x),c.addScaledVector(l,t.y),c.addScaledVector(h,t.z),c}}()}),Object.assign(ni.prototype,{set:function(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this},setFromPointsAndIndices:function(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new S,e=new S;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new S),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return ni.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new S),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return ni.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return ni.containsPoint(t,this.a,this.b,this.c)},getUV:function(t,e,i,n,o){return ni.getUV(t,this.a,this.b,this.c,e,i,n,o)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new S,e=new S,i=new S,n=new S,o=new S,s=new S;return function(l,h){h===void 0&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),h=new S);var c=this.a,p=this.b,f=this.c;t.subVectors(p,c),e.subVectors(f,c),n.subVectors(l,c);var d=t.dot(n),v=e.dot(n);if(0>=d&&0>=v)return h.copy(c);o.subVectors(l,p);var x=t.dot(o),P=e.dot(o);if(0<=x&&P<=x)return h.copy(p);var R=d*P-x*v;if(0>=R&&0<=d&&0>=x)return p=d/(d-x),h.copy(c).addScaledVector(t,p);s.subVectors(l,f),l=t.dot(s);var I=e.dot(s);return 0<=I&&l<=I?h.copy(f):(d=l*v-d*I,0>=d&&0<=v&&0>=I?(R=v/(v-I),h.copy(c).addScaledVector(e,R)):(v=x*I-l*P,0>=v&&0<=P-x&&0<=l-I?(i.subVectors(f,p),R=(P-x)/(P-x+(l-I)),h.copy(p).addScaledVector(i,R)):(f=1/(v+d+R),p=d*f,R*=f,h.copy(c).addScaledVector(t,p).addScaledVector(e,R))))}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),ci.prototype=Object.create(Oe.prototype),ci.prototype.constructor=ci,ci.prototype.isMeshBasicMaterial=!0,ci.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},Fi.prototype=Object.assign(Object.create(z.prototype),{constructor:Fi,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return z.prototype.copy.call(this,t),this.drawMode=t.drawMode,t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t=this.geometry;if(t.isBufferGeometry){t=t.morphAttributes;var e=Object.keys(t);if(0<e.length){var i=t[e[0]];if(i!==void 0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++){var n=i[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}else if(i=t.morphTargets,i!==void 0&&0<i.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++)n=i[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t},raycast:function(){function t(I,$,W,ot,Q,wt,C,D){return($.side===1?ot.intersectTriangle(C,wt,Q,!0,D):ot.intersectTriangle(Q,wt,C,$.side!==2,D))===null?null:(R.copy(D),R.applyMatrix4(I.matrixWorld),$=W.ray.origin.distanceTo(R),$<W.near||$>W.far?null:{distance:$,point:R.clone(),object:I})}function e(I,$,W,ot,Q,wt,C,D,ct){return s.fromBufferAttribute(Q,C),l.fromBufferAttribute(Q,D),h.fromBufferAttribute(Q,ct),(I=t(I,$,W,ot,s,l,h,P))&&(wt&&(d.fromBufferAttribute(wt,C),v.fromBufferAttribute(wt,D),x.fromBufferAttribute(wt,ct),I.uv=ni.getUV(P,s,l,h,d,v,x,new M)),wt=new B(C,D,ct),ni.getNormal(s,l,h,wt.normal),I.face=wt),I}var i=new _t,n=new In,o=new Ht,s=new S,l=new S,h=new S,c=new S,p=new S,f=new S,d=new M,v=new M,x=new M,P=new S,R=new S;return function(I,$){var W=this.geometry,ot=this.material,Q=this.matrixWorld;if(ot!==void 0&&(W.boundingSphere===null&&W.computeBoundingSphere(),o.copy(W.boundingSphere),o.applyMatrix4(Q),I.ray.intersectsSphere(o)!==!1&&(i.getInverse(Q),n.copy(I.ray).applyMatrix4(i),W.boundingBox===null||n.intersectsBox(W.boundingBox)!==!1))){if(W.isBufferGeometry){var wt=W.index,C=W.attributes.position,D=W.attributes.uv,ct=W.groups;W=W.drawRange;var Dt;if(wt!==null)if(Array.isArray(ot)){var Rt=0;for(Dt=ct.length;Rt<Dt;Rt++){var St=ct[Rt],oe=ot[St.materialIndex];Q=Math.max(St.start,W.start);var $t=Math.min(St.start+St.count,W.start+W.count);for(St=Q;St<$t;St+=3){Q=wt.getX(St);var me=wt.getX(St+1),ue=wt.getX(St+2);(Q=e(this,oe,I,n,C,D,Q,me,ue))&&(Q.faceIndex=Math.floor(St/3),$.push(Q))}}}else for(Q=Math.max(0,W.start),$t=Math.min(wt.count,W.start+W.count),Rt=Q,Dt=$t;Rt<Dt;Rt+=3)Q=wt.getX(Rt),me=wt.getX(Rt+1),ue=wt.getX(Rt+2),(Q=e(this,ot,I,n,C,D,Q,me,ue))&&(Q.faceIndex=Math.floor(Rt/3),$.push(Q));else if(C!==void 0)if(Array.isArray(ot))for(Rt=0,Dt=ct.length;Rt<Dt;Rt++)for(St=ct[Rt],oe=ot[St.materialIndex],Q=Math.max(St.start,W.start),$t=Math.min(St.start+St.count,W.start+W.count),St=Q;St<$t;St+=3)Q=St,me=St+1,ue=St+2,(Q=e(this,oe,I,n,C,D,Q,me,ue))&&(Q.faceIndex=Math.floor(St/3),$.push(Q));else for(Q=Math.max(0,W.start),$t=Math.min(C.count,W.start+W.count),Rt=Q,Dt=$t;Rt<Dt;Rt+=3)Q=Rt,me=Rt+1,ue=Rt+2,(Q=e(this,ot,I,n,C,D,Q,me,ue))&&(Q.faceIndex=Math.floor(Rt/3),$.push(Q))}else if(W.isGeometry){for(C=Array.isArray(ot),D=W.vertices,ct=W.faces,Q=W.faceVertexUvs[0],0<Q.length&&(wt=Q),St=0,$t=ct.length;St<$t;St++)if(me=ct[St],Q=C?ot[me.materialIndex]:ot,Q!==void 0){if(Rt=D[me.a],Dt=D[me.b],oe=D[me.c],Q.morphTargets===!0){ue=W.morphTargets;var Vt=this.morphTargetInfluences;s.set(0,0,0),l.set(0,0,0),h.set(0,0,0);for(var Ee=0,Be=ue.length;Ee<Be;Ee++){var Ze=Vt[Ee];if(Ze!==0){var un=ue[Ee].vertices;s.addScaledVector(c.subVectors(un[me.a],Rt),Ze),l.addScaledVector(p.subVectors(un[me.b],Dt),Ze),h.addScaledVector(f.subVectors(un[me.c],oe),Ze)}}s.add(Rt),l.add(Dt),h.add(oe),Rt=s,Dt=l,oe=h}(Q=t(this,Q,I,n,Rt,Dt,oe,P))&&(wt&&wt[St]&&(ue=wt[St],d.copy(ue[0]),v.copy(ue[1]),x.copy(ue[2]),Q.uv=ni.getUV(P,Rt,Dt,oe,d,v,x,new M)),Q.face=me,Q.faceIndex=St,$.push(Q))}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),A.prototype=Object.create(qt.prototype),A.prototype.constructor=A,A.prototype.isCubeTexture=!0,Object.defineProperty(A.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),k.prototype=Object.create(qt.prototype),k.prototype.constructor=k,k.prototype.isDataTexture3D=!0;var dl=new qt,ph=new k,Vl=new A,Ha=[],Ds=[],da=new Float32Array(16),Wl=new Float32Array(9),ml=new Float32Array(4);hs.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),lt(e,t)},ks.prototype.setValue=function(t,e,i){for(var n=this.seq,o=0,s=n.length;o!==s;++o){var l=n[o];l.setValue(t,e[l.id],i)}};var gl=/([\w\d_]+)(\])?(\[|\.)?/g;br.prototype.setValue=function(t,e,i){e=this.map[e],e!==void 0&&e.setValue(t,i,this.renderer)},br.prototype.setOptional=function(t,e,i){e=e[i],e!==void 0&&this.setValue(t,i,e)},br.upload=function(t,e,i,n){for(var o=0,s=e.length;o!==s;++o){var l=e[o],h=i[l.id];h.needsUpdate!==!1&&l.setValue(t,h.value,n)}},br.seqWithValue=function(t,e){for(var i=[],n=0,o=t.length;n!==o;++n){var s=t[n];s.id in e&&i.push(s)}return i};var ro=0,vl=0;kt.prototype=Object.create(Oe.prototype),kt.prototype.constructor=kt,kt.prototype.isMeshDepthMaterial=!0,kt.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},It.prototype=Object.create(Oe.prototype),It.prototype.constructor=It,It.prototype.isMeshDistanceMaterial=!0,It.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Ye.prototype=Object.assign(Object.create(z.prototype),{constructor:Ye,isGroup:!0}),ye.prototype=Object.assign(Object.create(z.prototype),{constructor:ye,isCamera:!0,copy:function(t,e){return z.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this},getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new S),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){z.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return new this.constructor().copy(this)}}),ee.prototype=Object.assign(Object.create(ye.prototype),{constructor:ee,isPerspectiveCamera:!0,copy:function(t,e){return ye.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){t=.5*this.getFilmHeight()/t,this.fov=2*$e.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*$e.DEG2RAD*this.fov);return .5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*$e.RAD2DEG*Math.atan(Math.tan(.5*$e.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,i,n,o,s){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*$e.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,o=-.5*n,s=this.view;if(this.view!==null&&this.view.enabled){var l=s.fullWidth,h=s.fullHeight;o+=s.offsetX*n/l,e-=s.offsetY*i/h,n*=s.width/l,i*=s.height/h}s=this.filmOffset,s!==0&&(o+=t*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+n,e,e-i,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=z.prototype.toJSON.call(this,t),t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),_e.prototype=Object.assign(Object.create(ee.prototype),{constructor:_e,isArrayCamera:!0});var So=new S,ir=new S;de.prototype.isFogExp2=!0,de.prototype.clone=function(){return new de(this.color,this.density)},de.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},an.prototype.isFog=!0,an.prototype.clone=function(){return new an(this.color,this.near,this.far)},an.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},Ln.prototype=Object.assign(Object.create(z.prototype),{constructor:Ln,copy:function(t,e){return z.prototype.copy.call(this,t,e),t.background!==null&&(this.background=t.background.clone()),t.fog!==null&&(this.fog=t.fog.clone()),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=z.prototype.toJSON.call(this,t);return this.background!==null&&(e.object.background=this.background.toJSON(t)),this.fog!==null&&(e.object.fog=this.fog.toJSON()),e}}),Object.defineProperty(vi.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(vi.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=t!==void 0?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.stride,i*=e.stride;for(var n=0,o=this.stride;n<o;n++)this.array[t+n]=e.array[i+n];return this},set:function(t,e){return e===void 0&&(e=0),this.array.set(t,e),this},clone:function(){return new this.constructor().copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Object.defineProperties(yi.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(yi.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this},setXYZW:function(t,e,i,n,o){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this.data.array[t+3]=o,this}}),Si.prototype=Object.create(Oe.prototype),Si.prototype.constructor=Si,Si.prototype.isSpriteMaterial=!0,Si.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this};var zs;Hi.prototype=Object.assign(Object.create(z.prototype),{constructor:Hi,isSprite:!0,raycast:function(){function t(x,P,R,I,$,W){o.subVectors(x,R).addScalar(.5).multiply(I),$!==void 0?(s.x=W*o.x-$*o.y,s.y=$*o.x+W*o.y):s.copy(o),x.copy(P),x.x+=s.x,x.y+=s.y,x.applyMatrix4(l)}var e=new S,i=new S,n=new S,o=new M,s=new M,l=new _t,h=new S,c=new S,p=new S,f=new M,d=new M,v=new M;return function(x,P){i.setFromMatrixScale(this.matrixWorld),l.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var R=this.material.rotation;if(R!==0)var I=Math.cos(R),$=Math.sin(R);R=this.center,t(h.set(-.5,-.5,0),n,R,i,$,I),t(c.set(.5,-.5,0),n,R,i,$,I),t(p.set(.5,.5,0),n,R,i,$,I),f.set(0,0),d.set(1,0),v.set(1,1);var W=x.ray.intersectTriangle(h,c,p,!1,e);W===null&&(t(c.set(-.5,.5,0),n,R,i,$,I),d.set(0,1),W=x.ray.intersectTriangle(h,p,c,!1,e),W===null)||($=x.ray.origin.distanceTo(e),$<x.near||$>x.far||P.push({distance:$,point:e.clone(),uv:ni.getUV(e,h,c,p,f,d,v,new M),face:null,object:this}))}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return z.prototype.copy.call(this,t),t.center!==void 0&&this.center.copy(t.center),this}}),ki.prototype=Object.assign(Object.create(z.prototype),{constructor:ki,copy:function(t){z.prototype.copy.call(this,t,!1),t=t.levels;for(var e=0,i=t.length;e<i;e++){var n=t[e];this.addLevel(n.object.clone(),n.distance)}return this},addLevel:function(t,e){e===void 0&&(e=0),e=Math.abs(e);for(var i=this.levels,n=0;n<i.length&&!(e<i[n].distance);n++);i.splice(n,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,i=1,n=e.length;i<n&&!(t<e[i].distance);i++);return e[i-1].object},raycast:function(){var t=new S;return function(e,i){t.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(t);this.getObjectForDistance(n).raycast(e,i)}}(),update:function(){var t=new S,e=new S;return function(i){var n=this.levels;if(1<n.length){t.setFromMatrixPosition(i.matrixWorld),e.setFromMatrixPosition(this.matrixWorld),i=t.distanceTo(e),n[0].object.visible=!0;for(var o=1,s=n.length;o<s&&i>=n[o].distance;o++)n[o-1].object.visible=!1,n[o].object.visible=!0;for(;o<s;o++)n[o].object.visible=!1}}}(),toJSON:function(t){t=z.prototype.toJSON.call(this,t),t.object.levels=[];for(var e=this.levels,i=0,n=e.length;i<n;i++){var o=e[i];t.object.levels.push({object:o.object.uuid,distance:o.distance})}return t}}),Object.assign(Xi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new _t;this.bones[t]&&i.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(i)}},pose:function(){var t,e,i=0;for(e=this.bones.length;i<e;i++)(t=this.bones[i])&&t.matrixWorld.getInverse(this.boneInverses[i]);for(i=0,e=this.bones.length;i<e;i++)(t=this.bones[i])&&(t.parent&&t.parent.isBone?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},update:function(){var t=new _t,e=new _t;return function(){for(var i=this.bones,n=this.boneInverses,o=this.boneMatrices,s=this.boneTexture,l=0,h=i.length;l<h;l++)t.multiplyMatrices(i[l]?i[l].matrixWorld:e,n[l]),t.toArray(o,16*l);s!==void 0&&(s.needsUpdate=!0)}}(),clone:function(){return new Xi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,i=this.bones.length;e<i;e++){var n=this.bones[e];if(n.name===t)return n}}}),qi.prototype=Object.assign(Object.create(z.prototype),{constructor:qi,isBone:!0}),Ti.prototype=Object.assign(Object.create(Fi.prototype),{constructor:Ti,isSkinnedMesh:!0,initBones:function(){var t=[],e;if(this.geometry&&this.geometry.bones!==void 0){var i=0;for(e=this.geometry.bones.length;i<e;i++){var n=this.geometry.bones[i],o=new qi;t.push(o),o.name=n.name,o.position.fromArray(n.pos),o.quaternion.fromArray(n.rotq),n.scl!==void 0&&o.scale.fromArray(n.scl)}for(i=0,e=this.geometry.bones.length;i<e;i++)n=this.geometry.bones[i],n.parent!==-1&&n.parent!==null&&t[n.parent]!==void 0?t[n.parent].add(t[i]):this.add(t[i])}return this.updateMatrixWorld(!0),t},bind:function(t,e){this.skeleton=t,e===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t;if(this.geometry&&this.geometry.isGeometry)for(t=0;t<this.geometry.skinWeights.length;t++){var e=this.geometry.skinWeights[t],i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){e=new nt;var n=this.geometry.attributes.skinWeight;for(t=0;t<n.count;t++)e.x=n.getX(t),e.y=n.getY(t),e.z=n.getZ(t),e.w=n.getW(t),i=1/e.manhattanLength(),i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),n.setXYZW(t,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(t){Fi.prototype.updateMatrixWorld.call(this,t),this.bindMode==="attached"?this.bindMatrixInverse.getInverse(this.matrixWorld):this.bindMode==="detached"?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),_i.prototype=Object.create(Oe.prototype),_i.prototype.constructor=_i,_i.prototype.isLineBasicMaterial=!0,_i.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Li.prototype=Object.assign(Object.create(z.prototype),{constructor:Li,isLine:!0,computeLineDistances:function(){var t=new S,e=new S;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[0],s=1,l=n.count;s<l;s++)t.fromBufferAttribute(n,s-1),e.fromBufferAttribute(n,s),o[s]=o[s-1],o[s]+=t.distanceTo(e);i.addAttribute("lineDistance",new Et(o,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,o=i.lineDistances,o[0]=0,s=1,l=n.length;s<l;s++)o[s]=o[s-1],o[s]+=n[s-1].distanceTo(n[s]);return this}}(),raycast:function(){var t=new _t,e=new In,i=new Ht;return function(n,o){var s=n.linePrecision,l=this.geometry,h=this.matrixWorld;if(l.boundingSphere===null&&l.computeBoundingSphere(),i.copy(l.boundingSphere),i.applyMatrix4(h),i.radius+=s,n.ray.intersectsSphere(i)!==!1){t.getInverse(h),e.copy(n.ray).applyMatrix4(t),s/=(this.scale.x+this.scale.y+this.scale.z)/3,s*=s;var c=new S,p=new S;h=new S;var f=new S,d=this&&this.isLineSegments?2:1;if(l.isBufferGeometry){var v=l.index,x=l.attributes.position.array;if(v!==null){v=v.array,l=0;for(var P=v.length-1;l<P;l+=d){var R=v[l+1];c.fromArray(x,3*v[l]),p.fromArray(x,3*R),R=e.distanceSqToSegment(c,p,f,h),R>s||(f.applyMatrix4(this.matrixWorld),R=n.ray.origin.distanceTo(f),R<n.near||R>n.far||o.push({distance:R,point:h.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}}else for(l=0,P=x.length/3-1;l<P;l+=d)c.fromArray(x,3*l),p.fromArray(x,3*l+3),R=e.distanceSqToSegment(c,p,f,h),R>s||(f.applyMatrix4(this.matrixWorld),R=n.ray.origin.distanceTo(f),R<n.near||R>n.far||o.push({distance:R,point:h.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}else if(l.isGeometry)for(c=l.vertices,p=c.length,l=0;l<p-1;l+=d)R=e.distanceSqToSegment(c[l],c[l+1],f,h),R>s||(f.applyMatrix4(this.matrixWorld),R=n.ray.origin.distanceTo(f),R<n.near||R>n.far||o.push({distance:R,point:h.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}}}(),copy:function(t){return z.prototype.copy.call(this,t),this.geometry.copy(t.geometry),this.material.copy(t.material),this},clone:function(){return new this.constructor().copy(this)}}),ei.prototype=Object.assign(Object.create(Li.prototype),{constructor:ei,isLineSegments:!0,computeLineDistances:function(){var t=new S,e=new S;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[],s=0,l=n.count;s<l;s+=2)t.fromBufferAttribute(n,s),e.fromBufferAttribute(n,s+1),o[s]=s===0?0:o[s-1],o[s+1]=o[s]+t.distanceTo(e);i.addAttribute("lineDistance",new Et(o,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,o=i.lineDistances,s=0,l=n.length;s<l;s+=2)t.copy(n[s]),e.copy(n[s+1]),o[s]=s===0?0:o[s-1],o[s+1]=o[s]+t.distanceTo(e);return this}}()}),Ir.prototype=Object.assign(Object.create(Li.prototype),{constructor:Ir,isLineLoop:!0}),Mn.prototype=Object.create(Oe.prototype),Mn.prototype.constructor=Mn,Mn.prototype.isPointsMaterial=!0,Mn.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.morphTargets=t.morphTargets,this},ps.prototype=Object.assign(Object.create(z.prototype),{constructor:ps,isPoints:!0,raycast:function(){var t=new _t,e=new In,i=new Ht;return function(n,o){function s(I,$){var W=e.distanceSqToPoint(I);W<f&&(e.closestPointToPoint(I,d),d.applyMatrix4(c),I=n.ray.origin.distanceTo(d),I<n.near||I>n.far||o.push({distance:I,distanceToRay:Math.sqrt(W),point:d.clone(),index:$,face:null,object:l}))}var l=this,h=this.geometry,c=this.matrixWorld,p=n.params.Points.threshold;if(h.boundingSphere===null&&h.computeBoundingSphere(),i.copy(h.boundingSphere),i.applyMatrix4(c),i.radius+=p,n.ray.intersectsSphere(i)!==!1){t.getInverse(c),e.copy(n.ray).applyMatrix4(t),p/=(this.scale.x+this.scale.y+this.scale.z)/3;var f=p*p;p=new S;var d=new S;if(h.isBufferGeometry){var v=h.index;if(h=h.attributes.position.array,v!==null){var x=v.array;v=0;for(var P=x.length;v<P;v++){var R=x[v];p.fromArray(h,3*R),s(p,R)}}else for(v=0,x=h.length/3;v<x;v++)p.fromArray(h,3*v),s(p,v)}else for(p=h.vertices,v=0,x=p.length;v<x;v++)s(p[v],v)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),il.prototype=Object.assign(Object.create(qt.prototype),{constructor:il,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),uo.prototype=Object.create(qt.prototype),uo.prototype.constructor=uo,uo.prototype.isCompressedTexture=!0,Ws.prototype=Object.create(qt.prototype),Ws.prototype.constructor=Ws,Ws.prototype.isCanvasTexture=!0,js.prototype=Object.create(qt.prototype),js.prototype.constructor=js,js.prototype.isDepthTexture=!0,fs.prototype=Object.create(Ut.prototype),fs.prototype.constructor=fs,Xs.prototype=Object.create(X.prototype),Xs.prototype.constructor=Xs,ds.prototype=Object.create(Ut.prototype),ds.prototype.constructor=ds,Ci.prototype=Object.create(X.prototype),Ci.prototype.constructor=Ci,oi.prototype=Object.create(Ut.prototype),oi.prototype.constructor=oi,qs.prototype=Object.create(X.prototype),qs.prototype.constructor=qs,ms.prototype=Object.create(oi.prototype),ms.prototype.constructor=ms,Ys.prototype=Object.create(X.prototype),Ys.prototype.constructor=Ys,bo.prototype=Object.create(oi.prototype),bo.prototype.constructor=bo,Zs.prototype=Object.create(X.prototype),Zs.prototype.constructor=Zs,gs.prototype=Object.create(oi.prototype),gs.prototype.constructor=gs,vs.prototype=Object.create(X.prototype),vs.prototype.constructor=vs,ys.prototype=Object.create(oi.prototype),ys.prototype.constructor=ys,$i.prototype=Object.create(X.prototype),$i.prototype.constructor=$i,co.prototype=Object.create(Ut.prototype),co.prototype.constructor=co,xr.prototype=Object.create(X.prototype),xr.prototype.constructor=xr,Oo.prototype=Object.create(Ut.prototype),Oo.prototype.constructor=Oo,Io.prototype=Object.create(X.prototype),Io.prototype.constructor=Io,Tn.prototype=Object.create(Ut.prototype),Tn.prototype.constructor=Tn;var jl={triangulate:function(t,e,i){i=i||2;var n=e&&e.length,o=n?e[0]*i:t.length,s=nl(t,0,o,i,!0),l=[];if(!s)return l;var h;if(n){var c=i;n=[];var p,f=0;for(p=e.length;f<p;f++){var d=e[f]*c,v=f<p-1?e[f+1]*c:t.length;d=nl(t,d,v,c,!1),d===d.next&&(d.steiner=!0),n.push(Kn(d))}for(n.sort(bl),f=0;f<n.length;f++)e=n[f],c=s,(c=Ol(e,c))&&(e=Js(c,e),_s(e,e.next)),s=_s(s,s.next)}if(t.length>80*i){var x=h=t[0],P=n=t[1];for(c=i;c<o;c+=i)f=t[c],e=t[c+1],f<x&&(x=f),e<P&&(P=e),f>h&&(h=f),e>n&&(n=e);h=Math.max(h-x,n-P),h=h!==0?1/h:0}return xs(s,l,i,x,P,h),l}},Vr={area:function(t){for(var e=t.length,i=0,n=e-1,o=0;o<e;n=o++)i+=t[n].x*t[o].y-t[o].x*t[n].y;return .5*i},isClockWise:function(t){return 0>Vr.area(t)},triangulateShape:function(t,e){var i=[],n=[],o=[];ba(t),Il(i,t);var s=t.length;for(e.forEach(ba),t=0;t<e.length;t++)n.push(s),s+=e[t].length,Il(i,e[t]);for(e=jl.triangulate(i,n),t=0;t<e.length;t+=3)o.push(e.slice(t,t+3));return o}};Jr.prototype=Object.create(X.prototype),Jr.prototype.constructor=Jr,Jr.prototype.toJSON=function(){var t=X.prototype.toJSON.call(this);return Dl(this.parameters.shapes,this.parameters.options,t)},zr.prototype=Object.create(Ut.prototype),zr.prototype.constructor=zr,zr.prototype.toJSON=function(){var t=Ut.prototype.toJSON.call(this);return Dl(this.parameters.shapes,this.parameters.options,t)};var ma={generateTopUV:function(t,e,i,n,o){t=e[3*n],n=e[3*n+1];var s=e[3*o];return o=e[3*o+1],[new M(e[3*i],e[3*i+1]),new M(t,n),new M(s,o)]},generateSideWallUV:function(t,e,i,n,o,s){t=e[3*i];var l=e[3*i+1];i=e[3*i+2];var h=e[3*n],c=e[3*n+1];n=e[3*n+2];var p=e[3*o],f=e[3*o+1];o=e[3*o+2];var d=e[3*s],v=e[3*s+1];return e=e[3*s+2],.01>Math.abs(l-c)?[new M(t,1-i),new M(h,1-n),new M(p,1-o),new M(d,1-e)]:[new M(l,1-i),new M(c,1-n),new M(f,1-o),new M(v,1-e)]}};$s.prototype=Object.create(X.prototype),$s.prototype.constructor=$s,zo.prototype=Object.create(zr.prototype),zo.prototype.constructor=zo,po.prototype=Object.create(X.prototype),po.prototype.constructor=po,lr.prototype=Object.create(Ut.prototype),lr.prototype.constructor=lr,Qs.prototype=Object.create(X.prototype),Qs.prototype.constructor=Qs,No.prototype=Object.create(Ut.prototype),No.prototype.constructor=No,ws.prototype=Object.create(X.prototype),ws.prototype.constructor=ws,fo.prototype=Object.create(Ut.prototype),fo.prototype.constructor=fo,$r.prototype=Object.create(X.prototype),$r.prototype.constructor=$r,$r.prototype.toJSON=function(){var t=X.prototype.toJSON.call(this);return zl(this.parameters.shapes,t)},mo.prototype=Object.create(Ut.prototype),mo.prototype.constructor=mo,mo.prototype.toJSON=function(){var t=Ut.prototype.toJSON.call(this);return zl(this.parameters.shapes,t)},go.prototype=Object.create(Ut.prototype),go.prototype.constructor=go,Qr.prototype=Object.create(X.prototype),Qr.prototype.constructor=Qr,Kr.prototype=Object.create(Ut.prototype),Kr.prototype.constructor=Kr,Ms.prototype=Object.create(Qr.prototype),Ms.prototype.constructor=Ms,Sn.prototype=Object.create(Kr.prototype),Sn.prototype.constructor=Sn,Bo.prototype=Object.create(X.prototype),Bo.prototype.constructor=Bo,Nr.prototype=Object.create(Ut.prototype),Nr.prototype.constructor=Nr;var Ki=Object.freeze({WireframeGeometry:fs,ParametricGeometry:Xs,ParametricBufferGeometry:ds,TetrahedronGeometry:qs,TetrahedronBufferGeometry:ms,OctahedronGeometry:Ys,OctahedronBufferGeometry:bo,IcosahedronGeometry:Zs,IcosahedronBufferGeometry:gs,DodecahedronGeometry:vs,DodecahedronBufferGeometry:ys,PolyhedronGeometry:Ci,PolyhedronBufferGeometry:oi,TubeGeometry:$i,TubeBufferGeometry:co,TorusKnotGeometry:xr,TorusKnotBufferGeometry:Oo,TorusGeometry:Io,TorusBufferGeometry:Tn,TextGeometry:$s,TextBufferGeometry:zo,SphereGeometry:po,SphereBufferGeometry:lr,RingGeometry:Qs,RingBufferGeometry:No,PlaneGeometry:Pn,PlaneBufferGeometry:Zi,LatheGeometry:ws,LatheBufferGeometry:fo,ShapeGeometry:$r,ShapeBufferGeometry:mo,ExtrudeGeometry:Jr,ExtrudeBufferGeometry:zr,EdgesGeometry:go,ConeGeometry:Ms,ConeBufferGeometry:Sn,CylinderGeometry:Qr,CylinderBufferGeometry:Kr,CircleGeometry:Bo,CircleBufferGeometry:Nr,BoxGeometry:Qe,BoxBufferGeometry:Ii});vo.prototype=Object.create(Oe.prototype),vo.prototype.constructor=vo,vo.prototype.isShadowMaterial=!0,vo.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this},Uo.prototype=Object.create(Pi.prototype),Uo.prototype.constructor=Uo,Uo.prototype.isRawShaderMaterial=!0,Br.prototype=Object.create(Oe.prototype),Br.prototype.constructor=Br,Br.prototype.isMeshStandardMaterial=!0,Br.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Fo.prototype=Object.create(Br.prototype),Fo.prototype.constructor=Fo,Fo.prototype.isMeshPhysicalMaterial=!0,Fo.prototype.copy=function(t){return Br.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},wr.prototype=Object.create(Oe.prototype),wr.prototype.constructor=wr,wr.prototype.isMeshPhongMaterial=!0,wr.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Go.prototype=Object.create(wr.prototype),Go.prototype.constructor=Go,Go.prototype.isMeshToonMaterial=!0,Go.prototype.copy=function(t){return wr.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ho.prototype=Object.create(Oe.prototype),Ho.prototype.constructor=Ho,Ho.prototype.isMeshNormalMaterial=!0,Ho.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},hr.prototype=Object.create(Oe.prototype),hr.prototype.constructor=hr,hr.prototype.isMeshLambertMaterial=!0,hr.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},ko.prototype=Object.create(Oe.prototype),ko.prototype.constructor=ko,ko.prototype.isMeshMatcapMaterial=!0,ko.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Vo.prototype=Object.create(_i.prototype),Vo.prototype.constructor=Vo,Vo.prototype.isLineDashedMaterial=!0,Vo.prototype.copy=function(t){return _i.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Xl=Object.freeze({ShadowMaterial:vo,SpriteMaterial:Si,RawShaderMaterial:Uo,ShaderMaterial:Pi,PointsMaterial:Mn,MeshPhysicalMaterial:Fo,MeshStandardMaterial:Br,MeshPhongMaterial:wr,MeshToonMaterial:Go,MeshNormalMaterial:Ho,MeshLambertMaterial:hr,MeshDepthMaterial:kt,MeshDistanceMaterial:It,MeshBasicMaterial:ci,MeshMatcapMaterial:ko,LineDashedMaterial:Vo,LineBasicMaterial:_i,Material:Oe}),Rn={arraySlice:function(t,e,i){return Rn.isTypedArray(t)?new t.constructor(t.subarray(e,i!==void 0?i:t.length)):t.slice(e,i)},convertArray:function(t,e,i){return!t||!i&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,i=Array(e),n=0;n!==e;++n)i[n]=n;return i.sort(function(o,s){return t[o]-t[s]}),i},sortedArray:function(t,e,i){for(var n=t.length,o=new t.constructor(n),s=0,l=0;l!==n;++s)for(var h=i[s]*e,c=0;c!==e;++c)o[l++]=t[h+c];return o},flattenJSON:function(t,e,i,n){for(var o=1,s=t[0];s!==void 0&&s[n]===void 0;)s=t[o++];if(s!==void 0){var l=s[n];if(l!==void 0)if(Array.isArray(l))do l=s[n],l!==void 0&&(e.push(s.time),i.push.apply(i,l)),s=t[o++];while(s!==void 0);else if(l.toArray!==void 0)do l=s[n],l!==void 0&&(e.push(s.time),l.toArray(i,i.length)),s=t[o++];while(s!==void 0);else do l=s[n],l!==void 0&&(e.push(s.time),i.push(l)),s=t[o++];while(s!==void 0)}}};Object.assign(Dn.prototype,{evaluate:function(t){var e=this.parameterPositions,i=this._cachedIndex,n=e[i],o=e[i-1];t:{e:{i:{n:if(!(t<n)){for(var s=i+2;;){if(n===void 0){if(t<o)break n;return this._cachedIndex=i=e.length,this.afterEnd_(i-1,t,o)}if(i===s)break;if(o=n,n=e[++i],t<n)break e}n=e.length;break i}if(t>=o)break t;for(s=e[1],t<s&&(i=2,o=s),s=i-2;;){if(o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===s)break;if(n=o,o=e[--i-1],t>=o)break e}n=i,i=0}for(;i<n;)o=i+n>>>1,t<e[o]?n=o:i=o+1;if(n=e[i],o=e[i-1],o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(n===void 0)return this._cachedIndex=i=e.length,this.afterEnd_(i-1,o,t)}this._cachedIndex=i,this.intervalChanged_(i,o,n)}return this.interpolate_(i,o,t,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){var e=this.resultBuffer,i=this.sampleValues,n=this.valueSize;t*=n;for(var o=0;o!==n;++o)e[o]=i[t+o];return e},interpolate_:function(){throw Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(Dn.prototype,{beforeStart_:Dn.prototype.copySampleValue_,afterEnd_:Dn.prototype.copySampleValue_}),Ks.prototype=Object.assign(Object.create(Dn.prototype),{constructor:Ks,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,o=t-2,s=t+1,l=n[o],h=n[s];if(l===void 0)switch(this.getSettings_().endingStart){case 2401:o=t,l=2*e-i;break;case 2402:o=n.length-2,l=e+n[o]-n[o+1];break;default:o=t,l=i}if(h===void 0)switch(this.getSettings_().endingEnd){case 2401:s=t,h=2*i-e;break;case 2402:s=1,h=i+n[1]-n[0];break;default:s=t-1,h=e}t=.5*(i-e),n=this.valueSize,this._weightPrev=t/(e-l),this._weightNext=t/(h-i),this._offsetPrev=o*n,this._offsetNext=s*n},interpolate_:function(t,e,i,n){var o=this.resultBuffer,s=this.sampleValues,l=this.valueSize;t*=l;var h=t-l,c=this._offsetPrev,p=this._offsetNext,f=this._weightPrev,d=this._weightNext,v=(i-e)/(n-e);for(i=v*v,n=i*v,e=-f*n+2*f*i-f*v,f=(1+f)*n+(-1.5-2*f)*i+(-.5+f)*v+1,v=(-1-d)*n+(1.5+d)*i+.5*v,d=d*n-d*i,i=0;i!==l;++i)o[i]=e*s[c+i]+f*s[h+i]+v*s[t+i]+d*s[p+i];return o}}),ur.prototype=Object.assign(Object.create(Dn.prototype),{constructor:ur,interpolate_:function(t,e,i,n){var o=this.resultBuffer,s=this.sampleValues,l=this.valueSize;t*=l;var h=t-l;for(e=(i-e)/(n-e),i=1-e,n=0;n!==l;++n)o[n]=s[h+n]*i+s[t+n]*e;return o}}),Wo.prototype=Object.assign(Object.create(Dn.prototype),{constructor:Wo,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(En,{toJSON:function(t){var e=t.constructor;if(e.toJSON!==void 0)e=e.toJSON(t);else{e={name:t.name,times:Rn.convertArray(t.times,Array),values:Rn.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e}}),Object.assign(En.prototype,{constructor:En,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new Wo(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new ur(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Ks(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){switch(t){case 2300:var e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(e===void 0){if(e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name,this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(e);return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(t!==0)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]+=t;return this},scale:function(t){if(t!==1)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]*=t;return this},trim:function(t,e){for(var i=this.times,n=i.length,o=0,s=n-1;o!==n&&i[o]<t;)++o;for(;s!==-1&&i[s]>e;)--s;return++s,(o!==0||s!==n)&&(o>=s&&(s=Math.max(s,1),o=s-1),t=this.getValueSize(),this.times=Rn.arraySlice(i,o,s),this.values=Rn.arraySlice(this.values,o*t,s*t)),this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var i=this.times;e=this.values;var n=i.length;n===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,s=0;s!==n;s++){var l=i[s];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,l),t=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,l,o),t=!1;break}o=l}if(e!==void 0&&Rn.isTypedArray(e)){for(s=0,i=e.length;s!==i;++s)if(n=e[s],isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,n),t=!1;break}}return t},optimize:function(){for(var t=this.times,e=this.values,i=this.getValueSize(),n=this.getInterpolation()===2302,o=1,s=t.length-1,l=1;l<s;++l){var h=!1,c=t[l];if(c!==t[l+1]&&(l!==1||c!==c[0]))if(n)h=!0;else{var p=l*i,f=p-i,d=p+i;for(c=0;c!==i;++c){var v=e[p+c];if(v!==e[f+c]||v!==e[d+c]){h=!0;break}}}if(h){if(l!==o)for(t[o]=t[l],h=l*i,p=o*i,c=0;c!==i;++c)e[p+c]=e[h+c];++o}}if(0<s){for(t[o]=t[s],h=s*i,p=o*i,c=0;c!==i;++c)e[p+c]=e[h+c];++o}return o!==t.length&&(this.times=Rn.arraySlice(t,0,o),this.values=Rn.arraySlice(e,0,o*i)),this}}),Oa.prototype=Object.assign(Object.create(En.prototype),{constructor:Oa,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ia.prototype=Object.assign(Object.create(En.prototype),{constructor:Ia,ValueTypeName:"color"}),Mr.prototype=Object.assign(Object.create(En.prototype),{constructor:Mr,ValueTypeName:"number"}),kn.prototype=Object.assign(Object.create(Dn.prototype),{constructor:kn,interpolate_:function(t,e,i,n){var o=this.resultBuffer,s=this.sampleValues,l=this.valueSize;for(t*=l,e=(i-e)/(n-e),i=t+l;t!==i;t+=4)mt.slerpFlat(o,0,s,t-l,s,t,e);return o}}),Ts.prototype=Object.assign(Object.create(En.prototype),{constructor:Ts,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new kn(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),Da.prototype=Object.assign(Object.create(En.prototype),{constructor:Da,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ss.prototype=Object.assign(Object.create(En.prototype),{constructor:Ss,ValueTypeName:"vector"}),Object.assign(tr,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),o=0,s=i.length;o!==s;++o)e.push(lh(i[o]).scale(n));return new tr(t.name,t.duration,e)},toJSON:function(t){var e=[],i=t.tracks;t={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid};for(var n=0,o=i.length;n!==o;++n)e.push(En.toJSON(i[n]));return t},CreateFromMorphTargetSequence:function(t,e,i,n){for(var o=e.length,s=[],l=0;l<o;l++){var h=[],c=[];h.push((l+o-1)%o,l,(l+1)%o),c.push(0,1,0);var p=Rn.getKeyframeOrder(h);h=Rn.sortedArray(h,1,p),c=Rn.sortedArray(c,1,p),n||h[0]!==0||(h.push(o),c.push(c[0])),s.push(new Mr(".morphTargetInfluences["+e[l].name+"]",h,c).scale(1/i))}return new tr(t,-1,s)},findByName:function(t,e){var i=t;for(Array.isArray(t)||(i=t.geometry&&t.geometry.animations||t.animations),t=0;t<i.length;t++)if(i[t].name===e)return i[t];return null},CreateClipsFromMorphTargetSequences:function(t,e,i){for(var n={},o=/^([\w-]*?)([\d]+)$/,s=0,l=t.length;s<l;s++){var h=t[s],c=h.name.match(o);if(c&&1<c.length){var p=c[1];(c=n[p])||(n[p]=c=[]),c.push(h)}}t=[];for(p in n)t.push(tr.CreateFromMorphTargetSequence(p,n[p],e,i));return t},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var i=function(R,I,$,W,ot){if($.length!==0){var Q=[],wt=[];Rn.flattenJSON($,Q,wt,W),Q.length!==0&&ot.push(new R(I,Q,wt))}},n=[],o=t.name||"default",s=t.length||-1,l=t.fps||30;t=t.hierarchy||[];for(var h=0;h<t.length;h++){var c=t[h].keys;if(c&&c.length!==0)if(c[0].morphTargets){s={};for(var p=0;p<c.length;p++)if(c[p].morphTargets)for(var f=0;f<c[p].morphTargets.length;f++)s[c[p].morphTargets[f]]=-1;for(var d in s){var v=[],x=[];for(f=0;f!==c[p].morphTargets.length;++f){var P=c[p];v.push(P.time),x.push(P.morphTarget===d?1:0)}n.push(new Mr(".morphTargetInfluence["+d+"]",v,x))}s=s.length*(l||1)}else p=".bones["+e[h].name+"]",i(Ss,p+".position",c,"pos",n),i(Ts,p+".quaternion",c,"rot",n),i(Ss,p+".scale",c,"scl",n)}return n.length===0?null:new tr(o,s,n)}}),Object.assign(tr.prototype,{resetDuration:function(){for(var t=0,e=0,i=this.tracks.length;e!==i;++e){var n=this.tracks[e];t=Math.max(t,n.times[n.times.length-1])}return this.duration=t,this},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},validate:function(){for(var t=!0,e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}});var Wr={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},Bn=new yo,fr={};Object.assign(at.prototype,{load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var o=this,s=Wr.get(t);if(s!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;if(fr[t]!==void 0)fr[t].push({onLoad:e,onProgress:i,onError:n});else{var l=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(l){i=l[1];var h=!!l[2];l=l[3],l=decodeURIComponent(l),h&&(l=atob(l));try{var c=(this.responseType||"").toLowerCase();switch(c){case"arraybuffer":case"blob":var p=new Uint8Array(l.length);for(h=0;h<l.length;h++)p[h]=l.charCodeAt(h);var f=c==="blob"?new Blob([p.buffer],{type:i}):p.buffer;break;case"document":f=new DOMParser().parseFromString(l,i);break;case"json":f=JSON.parse(l);break;default:f=l}setTimeout(function(){e&&e(f),o.manager.itemEnd(t)},0)}catch(v){setTimeout(function(){n&&n(v),o.manager.itemError(t),o.manager.itemEnd(t)},0)}}else{fr[t]=[],fr[t].push({onLoad:e,onProgress:i,onError:n});var d=new XMLHttpRequest;d.open("GET",t,!0),d.addEventListener("load",function(v){var x=this.response;Wr.add(t,x);var P=fr[t];if(delete fr[t],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var R=0,I=P.length;R<I;R++){var $=P[R];$.onLoad&&$.onLoad(x)}}else{for(R=0,I=P.length;R<I;R++)$=P[R],$.onError&&$.onError(v);o.manager.itemError(t)}o.manager.itemEnd(t)},!1),d.addEventListener("progress",function(v){for(var x=fr[t],P=0,R=x.length;P<R;P++){var I=x[P];I.onProgress&&I.onProgress(v)}},!1),d.addEventListener("error",function(v){var x=fr[t];delete fr[t];for(var P=0,R=x.length;P<R;P++){var I=x[P];I.onError&&I.onError(v)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),d.addEventListener("abort",function(v){var x=fr[t];delete fr[t];for(var P=0,R=x.length;P<R;P++){var I=x[P];I.onError&&I.onError(v)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),this.responseType!==void 0&&(d.responseType=this.responseType),this.withCredentials!==void 0&&(d.withCredentials=this.withCredentials),d.overrideMimeType&&d.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(h in this.requestHeader)d.setRequestHeader(h,this.requestHeader[h]);d.send(null)}return o.manager.itemStart(t),d}},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Ot.prototype,{load:function(t,e,i,n){var o=this,s=new at(o.manager);s.setPath(o.path),s.load(t,function(l){e(o.parse(JSON.parse(l)))},i,n)},parse:function(t,e){for(var i=[],n=0;n<t.length;n++){var o=tr.parse(t[n]);i.push(o)}e(i)},setPath:function(t){return this.path=t,this}}),Object.assign(At.prototype,{load:function(t,e,i,n){function o(v){c.load(t[v],function(x){x=s._parser(x,!0),l[v]={width:x.width,height:x.height,format:x.format,mipmaps:x.mipmaps},p+=1,p===6&&(x.mipmapCount===1&&(h.minFilter=1006),h.format=x.format,h.needsUpdate=!0,e&&e(h))},i,n)}var s=this,l=[],h=new uo;h.image=l;var c=new at(this.manager);if(c.setPath(this.path),c.setResponseType("arraybuffer"),Array.isArray(t))for(var p=0,f=0,d=t.length;f<d;++f)o(f);else c.load(t,function(v){if(v=s._parser(v,!0),v.isCubemap)for(var x=v.mipmaps.length/v.mipmapCount,P=0;P<x;P++){l[P]={mipmaps:[]};for(var R=0;R<v.mipmapCount;R++)l[P].mipmaps.push(v.mipmaps[P*v.mipmapCount+R]),l[P].format=v.format,l[P].width=v.width,l[P].height=v.height}else h.image.width=v.width,h.image.height=v.height,h.mipmaps=v.mipmaps;v.mipmapCount===1&&(h.minFilter=1006),h.format=v.format,h.needsUpdate=!0,e&&e(h)},i,n);return h},setPath:function(t){return this.path=t,this}}),Object.assign(xe.prototype,{load:function(t,e,i,n){var o=this,s=new gt,l=new at(this.manager);return l.setResponseType("arraybuffer"),l.setPath(this.path),l.load(t,function(h){(h=o._parser(h))&&(h.image!==void 0?s.image=h.image:h.data!==void 0&&(s.image.width=h.width,s.image.height=h.height,s.image.data=h.data),s.wrapS=h.wrapS!==void 0?h.wrapS:1001,s.wrapT=h.wrapT!==void 0?h.wrapT:1001,s.magFilter=h.magFilter!==void 0?h.magFilter:1006,s.minFilter=h.minFilter!==void 0?h.minFilter:1008,s.anisotropy=h.anisotropy!==void 0?h.anisotropy:1,h.format!==void 0&&(s.format=h.format),h.type!==void 0&&(s.type=h.type),h.mipmaps!==void 0&&(s.mipmaps=h.mipmaps),h.mipmapCount===1&&(s.minFilter=1006),s.needsUpdate=!0,e&&e(s,h))},i,n),s},setPath:function(t){return this.path=t,this}}),Object.assign(We.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(){c.removeEventListener("load",o,!1),c.removeEventListener("error",s,!1),Wr.add(t,this),e&&e(this),l.manager.itemEnd(t)}function s(p){c.removeEventListener("load",o,!1),c.removeEventListener("error",s,!1),n&&n(p),l.manager.itemError(t),l.manager.itemEnd(t)}t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var l=this,h=Wr.get(t);if(h!==void 0)return l.manager.itemStart(t),setTimeout(function(){e&&e(h),l.manager.itemEnd(t)},0),h;var c=document.createElementNS("http://www.w3.org/1999/xhtml","img");return c.addEventListener("load",o,!1),c.addEventListener("error",s,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(c.crossOrigin=this.crossOrigin),l.manager.itemStart(t),c.src=t,c},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(xi.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(c){l.load(t[c],function(p){s.images[c]=p,h++,h===6&&(s.needsUpdate=!0,e&&e(s))},void 0,n)}var s=new A,l=new We(this.manager);l.setCrossOrigin(this.crossOrigin),l.setPath(this.path);var h=0;for(i=0;i<t.length;++i)o(i);return s},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Yi.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=new qt,s=new We(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(t,function(l){o.image=l,l=0<t.search(/\.jpe?g$/i)||t.search(/^data:image\/jpeg/)===0,o.format=l?1022:1023,o.needsUpdate=!0,e!==void 0&&e(o)},i,n),o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(he.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){return t=this.getUtoTmapping(t),this.getPoint(t,e)},getPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getSpacedPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(t===void 0&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e=[],i=this.getPoint(0),n,o=0;for(e.push(0),n=1;n<=t;n++){var s=this.getPoint(n/t);o+=s.distanceTo(i),e.push(o),i=s}return this.cacheArcLengths=e},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var i=this.getLengths(),n=i.length;e=e||t*i[n-1];for(var o=0,s=n-1,l;o<=s;)if(t=Math.floor(o+(s-o)/2),l=i[t]-e,0>l)o=t+1;else if(0<l)s=t-1;else{s=t;break}return t=s,i[t]===e?t/(n-1):(o=i[t],(t+(e-o)/(i[t+1]-o))/(n-1))},getTangent:function(t){var e=t-1e-4;return t+=1e-4,0>e&&(e=0),1<t&&(t=1),e=this.getPoint(e),this.getPoint(t).clone().sub(e).normalize()},getTangentAt:function(t){return t=this.getUtoTmapping(t),this.getTangent(t)},computeFrenetFrames:function(t,e){var i=new S,n=[],o=[],s=[],l=new S,h=new _t,c;for(c=0;c<=t;c++){var p=c/t;n[c]=this.getTangentAt(p),n[c].normalize()}o[0]=new S,s[0]=new S,c=Number.MAX_VALUE,p=Math.abs(n[0].x);var f=Math.abs(n[0].y),d=Math.abs(n[0].z);for(p<=c&&(c=p,i.set(1,0,0)),f<=c&&(c=f,i.set(0,1,0)),d<=c&&i.set(0,0,1),l.crossVectors(n[0],i).normalize(),o[0].crossVectors(n[0],l),s[0].crossVectors(n[0],o[0]),c=1;c<=t;c++)o[c]=o[c-1].clone(),s[c]=s[c-1].clone(),l.crossVectors(n[c-1],n[c]),l.length()>Number.EPSILON&&(l.normalize(),i=Math.acos($e.clamp(n[c-1].dot(n[c]),-1,1)),o[c].applyMatrix4(h.makeRotationAxis(l,i))),s[c].crossVectors(n[c],o[c]);if(e===!0)for(i=Math.acos($e.clamp(o[0].dot(o[t]),-1,1)),i/=t,0<n[0].dot(l.crossVectors(o[0],o[t]))&&(i=-i),c=1;c<=t;c++)o[c].applyMatrix4(h.makeRotationAxis(n[c],i*c)),s[c].crossVectors(n[c],o[c]);return{tangents:n,normals:o,binormals:s}},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),zn.prototype=Object.create(he.prototype),zn.prototype.constructor=zn,zn.prototype.isEllipseCurve=!0,zn.prototype.getPoint=function(t,e){e=e||new M;for(var i=2*Math.PI,n=this.aEndAngle-this.aStartAngle,o=Math.abs(n)<Number.EPSILON;0>n;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=o?0:i),this.aClockwise!==!0||o||(n=n===i?-i:n-i),i=this.aStartAngle+t*n,t=this.aX+this.xRadius*Math.cos(i);var s=this.aY+this.yRadius*Math.sin(i);return this.aRotation!==0&&(i=Math.cos(this.aRotation),n=Math.sin(this.aRotation),o=t-this.aX,s-=this.aY,t=o*i-s*n+this.aX,s=o*n+s*i+this.aY),e.set(t,s)},zn.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},zn.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},zn.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Es.prototype=Object.create(zn.prototype),Es.prototype.constructor=Es,Es.prototype.isArcCurve=!0;var hn=new S,ga=new Vn,ka=new Vn,dr=new Vn;mn.prototype=Object.create(he.prototype),mn.prototype.constructor=mn,mn.prototype.isCatmullRomCurve3=!0,mn.prototype.getPoint=function(t,e){e=e||new S;var i=this.points,n=i.length;t*=n-(this.closed?0:1);var o=Math.floor(t);if(t-=o,this.closed?o+=0<o?0:(Math.floor(Math.abs(o)/n)+1)*n:t===0&&o===n-1&&(o=n-2,t=1),this.closed||0<o)var s=i[(o-1)%n];else hn.subVectors(i[0],i[1]).add(i[0]),s=hn;var l=i[o%n],h=i[(o+1)%n];if(this.closed||o+2<n?i=i[(o+2)%n]:(hn.subVectors(i[n-1],i[n-2]).add(i[n-1]),i=hn),this.curveType==="centripetal"||this.curveType==="chordal"){var c=this.curveType==="chordal"?.5:.25;n=Math.pow(s.distanceToSquared(l),c),o=Math.pow(l.distanceToSquared(h),c),c=Math.pow(h.distanceToSquared(i),c),1e-4>o&&(o=1),1e-4>n&&(n=o),1e-4>c&&(c=o),ga.initNonuniformCatmullRom(s.x,l.x,h.x,i.x,n,o,c),ka.initNonuniformCatmullRom(s.y,l.y,h.y,i.y,n,o,c),dr.initNonuniformCatmullRom(s.z,l.z,h.z,i.z,n,o,c)}else this.curveType==="catmullrom"&&(ga.initCatmullRom(s.x,l.x,h.x,i.x,this.tension),ka.initCatmullRom(s.y,l.y,h.y,i.y,this.tension),dr.initCatmullRom(s.z,l.z,h.z,i.z,this.tension));return e.set(ga.calc(t),ka.calc(t),dr.calc(t)),e},mn.prototype.copy=function(t){he.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},mn.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},mn.prototype.fromJSON=function(t){he.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new S().fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wn.prototype=Object.create(he.prototype),Wn.prototype.constructor=Wn,Wn.prototype.isCubicBezierCurve=!0,Wn.prototype.getPoint=function(t,e){e=e||new M;var i=this.v0,n=this.v1,o=this.v2,s=this.v3;return e.set(_o(t,i.x,n.x,o.x,s.x),_o(t,i.y,n.y,o.y,s.y)),e},Wn.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Wn.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Wn.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},ai.prototype=Object.create(he.prototype),ai.prototype.constructor=ai,ai.prototype.isCubicBezierCurve3=!0,ai.prototype.getPoint=function(t,e){e=e||new S;var i=this.v0,n=this.v1,o=this.v2,s=this.v3;return e.set(_o(t,i.x,n.x,o.x,s.x),_o(t,i.y,n.y,o.y,s.y),_o(t,i.z,n.z,o.z,s.z)),e},ai.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},ai.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},ai.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},jn.prototype=Object.create(he.prototype),jn.prototype.constructor=jn,jn.prototype.isLineCurve=!0,jn.prototype.getPoint=function(t,e){return e=e||new M,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},jn.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},jn.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},jn.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},jn.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},jn.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},cr.prototype=Object.create(he.prototype),cr.prototype.constructor=cr,cr.prototype.isLineCurve3=!0,cr.prototype.getPoint=function(t,e){return e=e||new S,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},cr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},cr.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},cr.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},cr.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Xn.prototype=Object.create(he.prototype),Xn.prototype.constructor=Xn,Xn.prototype.isQuadraticBezierCurve=!0,Xn.prototype.getPoint=function(t,e){e=e||new M;var i=this.v0,n=this.v1,o=this.v2;return e.set(Ur(t,i.x,n.x,o.x),Ur(t,i.y,n.y,o.y)),e},Xn.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Xn.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Xn.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Fr.prototype=Object.create(he.prototype),Fr.prototype.constructor=Fr,Fr.prototype.isQuadraticBezierCurve3=!0,Fr.prototype.getPoint=function(t,e){e=e||new S;var i=this.v0,n=this.v1,o=this.v2;return e.set(Ur(t,i.x,n.x,o.x),Ur(t,i.y,n.y,o.y),Ur(t,i.z,n.z,o.z)),e},Fr.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Fr.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Fr.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Tr.prototype=Object.create(he.prototype),Tr.prototype.constructor=Tr,Tr.prototype.isSplineCurve=!0,Tr.prototype.getPoint=function(t,e){e=e||new M;var i=this.points,n=(i.length-1)*t;t=Math.floor(n),n-=t;var o=i[t===0?t:t-1],s=i[t],l=i[t>i.length-2?i.length-1:t+1];return i=i[t>i.length-3?i.length-1:t+2],e.set(Nl(n,o.x,s.x,l.x,i.x),Nl(n,o.y,s.y,l.y,i.y)),e},Tr.prototype.copy=function(t){he.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this},Tr.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t},Tr.prototype.fromJSON=function(t){he.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new M().fromArray(n))}return this};var Va=Object.freeze({ArcCurve:Es,CatmullRomCurve3:mn,CubicBezierCurve:Wn,CubicBezierCurve3:ai,EllipseCurve:zn,LineCurve:jn,LineCurve3:cr,QuadraticBezierCurve:Xn,QuadraticBezierCurve3:Fr,SplineCurve:Tr});to.prototype=Object.assign(Object.create(he.prototype),{constructor:to,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new jn(e,t))},getPoint:function(t){var e=t*this.getLength(),i=this.getCurveLengths();for(t=0;t<i.length;){if(i[t]>=e)return e=i[t]-e,t=this.curves[t],i=t.getLength(),t.getPointAt(i===0?0:1-e/i);t++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0,n=this.curves.length;i<n;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t},getSpacedPoints:function(t){t===void 0&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e=[],i,n=0,o=this.curves;n<o.length;n++){var s=o[n];s=s.getPoints(s&&s.isEllipseCurve?2*t:s&&(s.isLineCurve||s.isLineCurve3)?1:s&&s.isSplineCurve?t*s.points.length:t);for(var l=0;l<s.length;l++){var h=s[l];i&&i.equals(h)||(e.push(h),i=h)}}return this.autoClose&&1<e.length&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},copy:function(t){he.prototype.copy.call(this,t),this.curves=[];for(var e=0,i=t.curves.length;e<i;e++)this.curves.push(t.curves[e].clone());return this.autoClose=t.autoClose,this},toJSON:function(){var t=he.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,i=this.curves.length;e<i;e++)t.curves.push(this.curves[e].toJSON());return t},fromJSON:function(t){he.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,i=t.curves.length;e<i;e++){var n=t.curves[e];this.curves.push(new Va[n.type]().fromJSON(n))}return this}}),qn.prototype=Object.assign(Object.create(to.prototype),{constructor:qn,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var i=new jn(this.currentPoint.clone(),new M(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){t=new Xn(this.currentPoint.clone(),new M(t,e),new M(i,n)),this.curves.push(t),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,o,s){t=new Wn(this.currentPoint.clone(),new M(t,e),new M(i,n),new M(o,s)),this.curves.push(t),this.currentPoint.set(o,s)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t);e=new Tr(e),this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,o,s){this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,s)},absarc:function(t,e,i,n,o,s){this.absellipse(t,e,i,i,n,o,s)},ellipse:function(t,e,i,n,o,s,l,h){this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,s,l,h)},absellipse:function(t,e,i,n,o,s,l,h){t=new zn(t,e,i,n,o,s,l,h),0<this.curves.length&&(e=t.getPoint(0),e.equals(this.currentPoint)||this.lineTo(e.x,e.y)),this.curves.push(t),t=t.getPoint(1),this.currentPoint.copy(t)},copy:function(t){return to.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=to.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return to.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Nn.prototype=Object.assign(Object.create(qn.prototype),{constructor:Nn,getPointsHoles:function(t){for(var e=[],i=0,n=this.holes.length;i<n;i++)e[i]=this.holes[i].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){qn.prototype.copy.call(this,t),this.holes=[];for(var e=0,i=t.holes.length;e<i;e++)this.holes.push(t.holes[e].clone());return this},toJSON:function(){var t=qn.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,i=this.holes.length;e<i;e++)t.holes.push(this.holes[e].toJSON());return t},fromJSON:function(t){qn.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,i=t.holes.length;e<i;e++){var n=t.holes[e];this.holes.push(new qn().fromJSON(n))}return this}}),Ui.prototype=Object.assign(Object.create(z.prototype),{constructor:Ui,isLight:!0,copy:function(t){return z.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){return t=z.prototype.toJSON.call(this,t),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}}),ta.prototype=Object.assign(Object.create(Ui.prototype),{constructor:ta,isHemisphereLight:!0,copy:function(t){return Ui.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Gr.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return new this.constructor().copy(this)},toJSON:function(){var t={};return this.bias!==0&&(t.bias=this.bias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),ea.prototype=Object.assign(Object.create(Gr.prototype),{constructor:ea,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*$e.RAD2DEG*t.angle,n=this.mapSize.width/this.mapSize.height;t=t.distance||e.far,(i!==e.fov||n!==e.aspect||t!==e.far)&&(e.fov=i,e.aspect=n,e.far=t,e.updateProjectionMatrix())}}),ia.prototype=Object.assign(Object.create(Ui.prototype),{constructor:ia,isSpotLight:!0,copy:function(t){return Ui.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),jo.prototype=Object.assign(Object.create(Ui.prototype),{constructor:jo,isPointLight:!0,copy:function(t){return Ui.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),As.prototype=Object.assign(Object.create(ye.prototype),{constructor:As,isOrthographicCamera:!0,copy:function(t,e){return ye.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this},setViewOffset:function(t,e,i,n,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=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,o=i-t;if(i+=t,t=n+e,e=n-e,this.view!==null&&this.view.enabled){i=this.zoom/(this.view.width/this.view.fullWidth),e=this.zoom/(this.view.height/this.view.fullHeight);var s=(this.right-this.left)/this.view.width;n=(this.top-this.bottom)/this.view.height,o+=this.view.offsetX/i*s,i=o+this.view.width/i*s,t-=this.view.offsetY/e*n,e=t-this.view.height/e*n}this.projectionMatrix.makeOrthographic(o,i,t,e,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=z.prototype.toJSON.call(this,t),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}}),xo.prototype=Object.assign(Object.create(Gr.prototype),{constructor:xo}),Hr.prototype=Object.assign(Object.create(Ui.prototype),{constructor:Hr,isDirectionalLight:!0,copy:function(t){return Ui.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Xo.prototype=Object.assign(Object.create(Ui.prototype),{constructor:Xo,isAmbientLight:!0}),za.prototype=Object.assign(Object.create(Ui.prototype),{constructor:za,isRectAreaLight:!0,copy:function(t){return Ui.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){return t=Ui.prototype.toJSON.call(this,t),t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(Na.prototype,{load:function(t,e,i,n){var o=this,s=new at(o.manager);s.setPath(o.path),s.load(t,function(l){e(o.parse(JSON.parse(l)))},i,n)},parse:function(t){function e(l){return i[l]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",l),i[l]}var i=this.textures,n=new Xl[t.type];if(t.uuid!==void 0&&(n.uuid=t.uuid),t.name!==void 0&&(n.name=t.name),t.color!==void 0&&n.color.setHex(t.color),t.roughness!==void 0&&(n.roughness=t.roughness),t.metalness!==void 0&&(n.metalness=t.metalness),t.emissive!==void 0&&n.emissive.setHex(t.emissive),t.specular!==void 0&&n.specular.setHex(t.specular),t.shininess!==void 0&&(n.shininess=t.shininess),t.clearCoat!==void 0&&(n.clearCoat=t.clearCoat),t.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=t.clearCoatRoughness),t.vertexColors!==void 0&&(n.vertexColors=t.vertexColors),t.fog!==void 0&&(n.fog=t.fog),t.flatShading!==void 0&&(n.flatShading=t.flatShading),t.blending!==void 0&&(n.blending=t.blending),t.combine!==void 0&&(n.combine=t.combine),t.side!==void 0&&(n.side=t.side),t.opacity!==void 0&&(n.opacity=t.opacity),t.transparent!==void 0&&(n.transparent=t.transparent),t.alphaTest!==void 0&&(n.alphaTest=t.alphaTest),t.depthTest!==void 0&&(n.depthTest=t.depthTest),t.depthWrite!==void 0&&(n.depthWrite=t.depthWrite),t.colorWrite!==void 0&&(n.colorWrite=t.colorWrite),t.wireframe!==void 0&&(n.wireframe=t.wireframe),t.wireframeLinewidth!==void 0&&(n.wireframeLinewidth=t.wireframeLinewidth),t.wireframeLinecap!==void 0&&(n.wireframeLinecap=t.wireframeLinecap),t.wireframeLinejoin!==void 0&&(n.wireframeLinejoin=t.wireframeLinejoin),t.rotation!==void 0&&(n.rotation=t.rotation),t.linewidth!==1&&(n.linewidth=t.linewidth),t.dashSize!==void 0&&(n.dashSize=t.dashSize),t.gapSize!==void 0&&(n.gapSize=t.gapSize),t.scale!==void 0&&(n.scale=t.scale),t.polygonOffset!==void 0&&(n.polygonOffset=t.polygonOffset),t.polygonOffsetFactor!==void 0&&(n.polygonOffsetFactor=t.polygonOffsetFactor),t.polygonOffsetUnits!==void 0&&(n.polygonOffsetUnits=t.polygonOffsetUnits),t.skinning!==void 0&&(n.skinning=t.skinning),t.morphTargets!==void 0&&(n.morphTargets=t.morphTargets),t.dithering!==void 0&&(n.dithering=t.dithering),t.visible!==void 0&&(n.visible=t.visible),t.userData!==void 0&&(n.userData=t.userData),t.uniforms!==void 0)for(var o in t.uniforms){var s=t.uniforms[o];switch(n.uniforms[o]={},s.type){case"t":n.uniforms[o].value=e(s.value);break;case"c":n.uniforms[o].value=new Z().setHex(s.value);break;case"v2":n.uniforms[o].value=new M().fromArray(s.value);break;case"v3":n.uniforms[o].value=new S().fromArray(s.value);break;case"v4":n.uniforms[o].value=new nt().fromArray(s.value);break;case"m4":n.uniforms[o].value=new _t().fromArray(s.value);break;default:n.uniforms[o].value=s.value}}return t.defines!==void 0&&(n.defines=t.defines),t.vertexShader!==void 0&&(n.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(n.fragmentShader=t.fragmentShader),t.shading!==void 0&&(n.flatShading=t.shading===1),t.size!==void 0&&(n.size=t.size),t.sizeAttenuation!==void 0&&(n.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(n.map=e(t.map)),t.alphaMap!==void 0&&(n.alphaMap=e(t.alphaMap),n.transparent=!0),t.bumpMap!==void 0&&(n.bumpMap=e(t.bumpMap)),t.bumpScale!==void 0&&(n.bumpScale=t.bumpScale),t.normalMap!==void 0&&(n.normalMap=e(t.normalMap)),t.normalMapType!==void 0&&(n.normalMapType=t.normalMapType),t.normalScale!==void 0&&(o=t.normalScale,Array.isArray(o)===!1&&(o=[o,o]),n.normalScale=new M().fromArray(o)),t.displacementMap!==void 0&&(n.displacementMap=e(t.displacementMap)),t.displacementScale!==void 0&&(n.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(n.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(n.roughnessMap=e(t.roughnessMap)),t.metalnessMap!==void 0&&(n.metalnessMap=e(t.metalnessMap)),t.emissiveMap!==void 0&&(n.emissiveMap=e(t.emissiveMap)),t.emissiveIntensity!==void 0&&(n.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(n.specularMap=e(t.specularMap)),t.envMap!==void 0&&(n.envMap=e(t.envMap)),t.envMapIntensity!==void 0&&(n.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(n.reflectivity=t.reflectivity),t.lightMap!==void 0&&(n.lightMap=e(t.lightMap)),t.lightMapIntensity!==void 0&&(n.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(n.aoMap=e(t.aoMap)),t.aoMapIntensity!==void 0&&(n.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(n.gradientMap=e(t.gradientMap)),n},setPath:function(t){return this.path=t,this},setTextures:function(t){return this.textures=t,this}});var Qo={decodeText:function(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);for(var e="",i=0,n=t.length;i<n;i++)e+=String.fromCharCode(t[i]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return e===-1?"./":t.substr(0,e+1)}};Object.assign(ol.prototype,{load:function(t,e,i,n){var o=this,s=new at(o.manager);s.setPath(o.path),s.load(t,function(l){e(o.parse(JSON.parse(l)))},i,n)},parse:function(t){var e=new Ut,i=t.data.index;i!==void 0&&(i=new Eo[i.type](i.array),e.setIndex(new et(i,1)));var n=t.data.attributes;for(s in n){var o=n[s];i=new Eo[o.type](o.array),e.addAttribute(s,new et(i,o.itemSize,o.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(s!==void 0)for(i=0,n=s.length;i!==n;++i)o=s[i],e.addGroup(o.start,o.count,o.materialIndex);return t=t.data.boundingSphere,t!==void 0&&(s=new S,t.center!==void 0&&s.fromArray(t.center),e.boundingSphere=new Ht(s,t.radius)),e},setPath:function(t){return this.path=t,this}});var Eo={Int8Array,Uint8Array,Uint8ClampedArray:typeof Uint8ClampedArray<"u"?Uint8ClampedArray:Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};eo.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,i=0,n=e.length;i<n;i+=2){var o=e[i+1];if(e[i].test(t))return o}return null}},Object.assign(eo.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,i){for(var n=[],o=0;o<t.length;++o)n[o]=this.createMaterial(t[o],e,i);return n},createMaterial:function(){var t={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},e=new Z,i=new Yi,n=new Na;return function(o,s,l){function h(v,x,P,R,I){v=s+v;var $=eo.Handlers.get(v);return $!==null?v=$.load(v):(i.setCrossOrigin(l),v=i.load(v)),x!==void 0&&(v.repeat.fromArray(x),x[0]!==1&&(v.wrapS=1e3),x[1]!==1&&(v.wrapT=1e3)),P!==void 0&&v.offset.fromArray(P),R!==void 0&&(R[0]==="repeat"&&(v.wrapS=1e3),R[0]==="mirror"&&(v.wrapS=1002),R[1]==="repeat"&&(v.wrapT=1e3),R[1]==="mirror"&&(v.wrapT=1002)),I!==void 0&&(v.anisotropy=I),x=$e.generateUUID(),c[x]=v,x}var c={},p={uuid:$e.generateUUID(),type:"MeshLambertMaterial"},f;for(f in o){var d=o[f];switch(f){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":p.name=d;break;case"blending":p.blending=t[d];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",f,"is no longer supported.");break;case"colorDiffuse":p.color=e.fromArray(d).getHex();break;case"colorSpecular":p.specular=e.fromArray(d).getHex();break;case"colorEmissive":p.emissive=e.fromArray(d).getHex();break;case"specularCoef":p.shininess=d;break;case"shading":d.toLowerCase()==="basic"&&(p.type="MeshBasicMaterial"),d.toLowerCase()==="phong"&&(p.type="MeshPhongMaterial"),d.toLowerCase()==="standard"&&(p.type="MeshStandardMaterial");break;case"mapDiffuse":p.map=h(d,o.mapDiffuseRepeat,o.mapDiffuseOffset,o.mapDiffuseWrap,o.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":p.emissiveMap=h(d,o.mapEmissiveRepeat,o.mapEmissiveOffset,o.mapEmissiveWrap,o.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":p.lightMap=h(d,o.mapLightRepeat,o.mapLightOffset,o.mapLightWrap,o.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":p.aoMap=h(d,o.mapAORepeat,o.mapAOOffset,o.mapAOWrap,o.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":p.bumpMap=h(d,o.mapBumpRepeat,o.mapBumpOffset,o.mapBumpWrap,o.mapBumpAnisotropy);break;case"mapBumpScale":p.bumpScale=d;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":p.normalMap=h(d,o.mapNormalRepeat,o.mapNormalOffset,o.mapNormalWrap,o.mapNormalAnisotropy);break;case"mapNormalFactor":p.normalScale=d;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":p.specularMap=h(d,o.mapSpecularRepeat,o.mapSpecularOffset,o.mapSpecularWrap,o.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":p.metalnessMap=h(d,o.mapMetalnessRepeat,o.mapMetalnessOffset,o.mapMetalnessWrap,o.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":p.roughnessMap=h(d,o.mapRoughnessRepeat,o.mapRoughnessOffset,o.mapRoughnessWrap,o.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":p.alphaMap=h(d,o.mapAlphaRepeat,o.mapAlphaOffset,o.mapAlphaWrap,o.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":p.side=1;break;case"doubleSided":p.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),p.opacity=d;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":p[f]=d;break;case"vertexColors":d===!0&&(p.vertexColors=2),d==="face"&&(p.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",f,d)}}return p.type==="MeshBasicMaterial"&&delete p.emissive,p.type!=="MeshPhongMaterial"&&delete p.specular,1>p.opacity&&(p.transparent=!0),n.setTextures(c),n.parse(p)}}()}),Object.assign(qo.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,s=this.path===void 0?Qo.extractUrlBase(t):this.path,l=new at(this.manager);l.setPath(this.path),l.setWithCredentials(this.withCredentials),l.load(t,function(h){h=JSON.parse(h);var c=h.metadata;if(c!==void 0&&(c=c.type,c!==void 0&&c.toLowerCase()==="object")){console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");return}h=o.parse(h,s),e(h.geometry,h.materials)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(){return function(t,e){t.data!==void 0&&(t=t.data),t.scale=t.scale!==void 0?1/t.scale:1;var i=new X,n=t,o,s,l,h=n.faces,c=n.vertices,p=n.normals,f=n.colors,d=n.scale,v=0;if(n.uvs!==void 0){for(o=0;o<n.uvs.length;o++)n.uvs[o].length&&v++;for(o=0;o<v;o++)i.faceVertexUvs[o]=[]}var x=0;for(l=c.length;x<l;)o=new S,o.x=c[x++]*d,o.y=c[x++]*d,o.z=c[x++]*d,i.vertices.push(o);for(x=0,l=h.length;x<l;){c=h[x++];var P=c&1,R=c&2;o=c&8;var I=c&16,$=c&32;if(d=c&64,c&=128,P){P=new B,P.a=h[x],P.b=h[x+1],P.c=h[x+3];var W=new B;if(W.a=h[x+1],W.b=h[x+2],W.c=h[x+3],x+=4,R&&(R=h[x++],P.materialIndex=R,W.materialIndex=R),R=i.faces.length,o)for(o=0;o<v;o++){var ot=n.uvs[o];for(i.faceVertexUvs[o][R]=[],i.faceVertexUvs[o][R+1]=[],s=0;4>s;s++){var Q=h[x++],wt=ot[2*Q];Q=ot[2*Q+1],wt=new M(wt,Q),s!==2&&i.faceVertexUvs[o][R].push(wt),s!==0&&i.faceVertexUvs[o][R+1].push(wt)}}if(I&&(I=3*h[x++],P.normal.set(p[I++],p[I++],p[I]),W.normal.copy(P.normal)),$)for(o=0;4>o;o++)I=3*h[x++],$=new S(p[I++],p[I++],p[I]),o!==2&&P.vertexNormals.push($),o!==0&&W.vertexNormals.push($);if(d&&(d=h[x++],d=f[d],P.color.setHex(d),W.color.setHex(d)),c)for(o=0;4>o;o++)d=h[x++],d=f[d],o!==2&&P.vertexColors.push(new Z(d)),o!==0&&W.vertexColors.push(new Z(d));i.faces.push(P),i.faces.push(W)}else{if(P=new B,P.a=h[x++],P.b=h[x++],P.c=h[x++],R&&(R=h[x++],P.materialIndex=R),R=i.faces.length,o)for(o=0;o<v;o++)for(ot=n.uvs[o],i.faceVertexUvs[o][R]=[],s=0;3>s;s++)Q=h[x++],wt=ot[2*Q],Q=ot[2*Q+1],wt=new M(wt,Q),i.faceVertexUvs[o][R].push(wt);if(I&&(I=3*h[x++],P.normal.set(p[I++],p[I++],p[I])),$)for(o=0;3>o;o++)I=3*h[x++],$=new S(p[I++],p[I++],p[I]),P.vertexNormals.push($);if(d&&(d=h[x++],P.color.setHex(f[d])),c)for(o=0;3>o;o++)d=h[x++],P.vertexColors.push(new Z(f[d]));i.faces.push(P)}}if(n=t,x=n.influencesPerVertex!==void 0?n.influencesPerVertex:2,n.skinWeights)for(l=0,h=n.skinWeights.length;l<h;l+=x)i.skinWeights.push(new nt(n.skinWeights[l],1<x?n.skinWeights[l+1]:0,2<x?n.skinWeights[l+2]:0,3<x?n.skinWeights[l+3]:0));if(n.skinIndices)for(l=0,h=n.skinIndices.length;l<h;l+=x)i.skinIndices.push(new nt(n.skinIndices[l],1<x?n.skinIndices[l+1]:0,2<x?n.skinIndices[l+2]:0,3<x?n.skinIndices[l+3]:0));if(i.bones=n.bones,i.bones&&0<i.bones.length&&(i.skinWeights.length!==i.skinIndices.length||i.skinIndices.length!==i.vertices.length)&&console.warn("When skinning, number of vertices ("+i.vertices.length+"), skinIndices ("+i.skinIndices.length+"), and skinWeights ("+i.skinWeights.length+") should match."),l=t,h=l.scale,l.morphTargets!==void 0)for(n=0,x=l.morphTargets.length;n<x;n++)for(i.morphTargets[n]={},i.morphTargets[n].name=l.morphTargets[n].name,i.morphTargets[n].vertices=[],p=i.morphTargets[n].vertices,f=l.morphTargets[n].vertices,v=0,c=f.length;v<c;v+=3)d=new S,d.x=f[v]*h,d.y=f[v+1]*h,d.z=f[v+2]*h,p.push(d);if(l.morphColors!==void 0&&0<l.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),h=i.faces,l=l.morphColors[0].colors,n=0,x=h.length;n<x;n++)h[n].color.fromArray(l,3*n);for(l=t,n=[],x=[],l.animation!==void 0&&x.push(l.animation),l.animations!==void 0&&(l.animations.length?x=x.concat(l.animations):x.push(l.animations)),l=0;l<x.length;l++)(h=tr.parseAnimation(x[l],i.bones))&&n.push(h);return i.morphTargets&&(x=tr.CreateClipsFromMorphTargetSequences(i.morphTargets,10),n=n.concat(x)),0<n.length&&(i.animations=n),i.computeFaceNormals(),i.computeBoundingSphere(),t.materials===void 0||t.materials.length===0?{geometry:i}:(t=eo.prototype.initMaterials(t.materials,this.resourcePath||e,this.crossOrigin),{geometry:i,materials:t})}}()}),Object.assign(na.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,s=this.path===void 0?Qo.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||s,s=new at(o.manager),s.setPath(this.path),s.load(t,function(l){var h=null;try{h=JSON.parse(l)}catch(c){n!==void 0&&n(c),console.error("THREE:ObjectLoader: Can't parse "+t+".",c.message);return}l=h.metadata,l===void 0||l.type===void 0||l.type.toLowerCase()==="geometry"?console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead."):o.parse(h,e)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var i=this.parseShape(t.shapes);i=this.parseGeometries(t.geometries,i);var n=this.parseImages(t.images,function(){e!==void 0&&e(o)});n=this.parseTextures(t.textures,n),n=this.parseMaterials(t.materials,n);var o=this.parseObject(t.object,i,n);return t.animations&&(o.animations=this.parseAnimations(t.animations)),t.images!==void 0&&t.images.length!==0||e===void 0||e(o),o},parseShape:function(t){var e={};if(t!==void 0)for(var i=0,n=t.length;i<n;i++){var o=new Nn().fromJSON(t[i]);e[o.uuid]=o}return e},parseGeometries:function(t,e){var i={};if(t!==void 0)for(var n=new qo,o=new ol,s=0,l=t.length;s<l;s++){var h=t[s];switch(h.type){case"PlaneGeometry":case"PlaneBufferGeometry":var c=new Ki[h.type](h.width,h.height,h.widthSegments,h.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":c=new Ki[h.type](h.width,h.height,h.depth,h.widthSegments,h.heightSegments,h.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":c=new Ki[h.type](h.radius,h.segments,h.thetaStart,h.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":c=new Ki[h.type](h.radiusTop,h.radiusBottom,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":c=new Ki[h.type](h.radius,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":c=new Ki[h.type](h.radius,h.widthSegments,h.heightSegments,h.phiStart,h.phiLength,h.thetaStart,h.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":c=new Ki[h.type](h.radius,h.detail);break;case"RingGeometry":case"RingBufferGeometry":c=new Ki[h.type](h.innerRadius,h.outerRadius,h.thetaSegments,h.phiSegments,h.thetaStart,h.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":c=new Ki[h.type](h.radius,h.tube,h.radialSegments,h.tubularSegments,h.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":c=new Ki[h.type](h.radius,h.tube,h.tubularSegments,h.radialSegments,h.p,h.q);break;case"LatheGeometry":case"LatheBufferGeometry":c=new Ki[h.type](h.points,h.segments,h.phiStart,h.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":c=new Ki[h.type](h.vertices,h.indices,h.radius,h.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":c=[];for(var p=0,f=h.shapes.length;p<f;p++){var d=e[h.shapes[p]];c.push(d)}c=new Ki[h.type](c,h.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(c=[],p=0,f=h.shapes.length;p<f;p++)d=e[h.shapes[p]],c.push(d);p=h.options.extrudePath,p!==void 0&&(h.options.extrudePath=new Va[p.type]().fromJSON(p)),c=new Ki[h.type](c,h.options);break;case"BufferGeometry":c=o.parse(h);break;case"Geometry":c=n.parse(h,this.resourcePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+h.type+'"');continue}c.uuid=h.uuid,h.name!==void 0&&(c.name=h.name),c.isBufferGeometry===!0&&h.userData!==void 0&&(c.userData=h.userData),i[h.uuid]=c}return i},parseMaterials:function(t,e){var i={},n={};if(t!==void 0){var o=new Na;o.setTextures(e),e=0;for(var s=t.length;e<s;e++){var l=t[e];if(l.type==="MultiMaterial"){for(var h=[],c=0;c<l.materials.length;c++){var p=l.materials[c];i[p.uuid]===void 0&&(i[p.uuid]=o.parse(p)),h.push(i[p.uuid])}n[l.uuid]=h}else n[l.uuid]=o.parse(l),i[l.uuid]=n[l.uuid]}}return n},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],o=tr.parse(n);n.uuid!==void 0&&(o.uuid=n.uuid),e.push(o)}return e},parseImages:function(t,e){function i(v){return n.manager.itemStart(v),s.load(v,function(){n.manager.itemEnd(v)},void 0,function(){n.manager.itemError(v),n.manager.itemEnd(v)})}var n=this,o={};if(t!==void 0&&0<t.length){e=new yo(e);var s=new We(e);s.setCrossOrigin(this.crossOrigin),e=0;for(var l=t.length;e<l;e++){var h=t[e],c=h.url;if(Array.isArray(c)){o[h.uuid]=[];for(var p=0,f=c.length;p<f;p++){var d=c[p];d=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(d)?d:n.resourcePath+d,o[h.uuid].push(i(d))}}else d=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h.url)?h.url:n.resourcePath+h.url,o[h.uuid]=i(d)}}return o},parseTextures:function(t,e){function i(c,p){return typeof c=="number"?c:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",c),p[c])}var n={};if(t!==void 0)for(var o=0,s=t.length;o<s;o++){var l=t[o];l.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',l.uuid),e[l.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",l.image);var h=Array.isArray(e[l.image])?new A(e[l.image]):new qt(e[l.image]);h.needsUpdate=!0,h.uuid=l.uuid,l.name!==void 0&&(h.name=l.name),l.mapping!==void 0&&(h.mapping=i(l.mapping,ql)),l.offset!==void 0&&h.offset.fromArray(l.offset),l.repeat!==void 0&&h.repeat.fromArray(l.repeat),l.center!==void 0&&h.center.fromArray(l.center),l.rotation!==void 0&&(h.rotation=l.rotation),l.wrap!==void 0&&(h.wrapS=i(l.wrap[0],bn),h.wrapT=i(l.wrap[1],bn)),l.format!==void 0&&(h.format=l.format),l.minFilter!==void 0&&(h.minFilter=i(l.minFilter,Wa)),l.magFilter!==void 0&&(h.magFilter=i(l.magFilter,Wa)),l.anisotropy!==void 0&&(h.anisotropy=l.anisotropy),l.flipY!==void 0&&(h.flipY=l.flipY),n[l.uuid]=h}return n},parseObject:function(t,e,i){function n(p){return e[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",p),e[p]}function o(p){if(p!==void 0){if(Array.isArray(p)){for(var f=[],d=0,v=p.length;d<v;d++){var x=p[d];i[x]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",x),f.push(i[x])}return f}return i[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",p),i[p]}}switch(t.type){case"Scene":var s=new Ln;t.background!==void 0&&Number.isInteger(t.background)&&(s.background=new Z(t.background)),t.fog!==void 0&&(t.fog.type==="Fog"?s.fog=new an(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(s.fog=new de(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":s=new ee(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(s.focus=t.focus),t.zoom!==void 0&&(s.zoom=t.zoom),t.filmGauge!==void 0&&(s.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(s.filmOffset=t.filmOffset),t.view!==void 0&&(s.view=Object.assign({},t.view));break;case"OrthographicCamera":s=new As(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(s.zoom=t.zoom),t.view!==void 0&&(s.view=Object.assign({},t.view));break;case"AmbientLight":s=new Xo(t.color,t.intensity);break;case"DirectionalLight":s=new Hr(t.color,t.intensity);break;case"PointLight":s=new jo(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":s=new za(t.color,t.intensity,t.width,t.height);break;case"SpotLight":s=new ia(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":s=new ta(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":s=n(t.geometry);var l=o(t.material);s=s.bones&&0<s.bones.length?new Ti(s,l):new Fi(s,l);break;case"LOD":s=new ki;break;case"Line":s=new Li(n(t.geometry),o(t.material),t.mode);break;case"LineLoop":s=new Ir(n(t.geometry),o(t.material));break;case"LineSegments":s=new ei(n(t.geometry),o(t.material));break;case"PointCloud":case"Points":s=new ps(n(t.geometry),o(t.material));break;case"Sprite":s=new Hi(o(t.material));break;case"Group":s=new Ye;break;default:s=new z}if(s.uuid=t.uuid,t.name!==void 0&&(s.name=t.name),t.matrix!==void 0?(s.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=t.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(t.position!==void 0&&s.position.fromArray(t.position),t.rotation!==void 0&&s.rotation.fromArray(t.rotation),t.quaternion!==void 0&&s.quaternion.fromArray(t.quaternion),t.scale!==void 0&&s.scale.fromArray(t.scale)),t.castShadow!==void 0&&(s.castShadow=t.castShadow),t.receiveShadow!==void 0&&(s.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(s.shadow.bias=t.shadow.bias),t.shadow.radius!==void 0&&(s.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(s.visible=t.visible),t.frustumCulled!==void 0&&(s.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(s.renderOrder=t.renderOrder),t.userData!==void 0&&(s.userData=t.userData),t.layers!==void 0&&(s.layers.mask=t.layers),t.children!==void 0){l=t.children;for(var h=0;h<l.length;h++)s.add(this.parseObject(l[h],e,i))}if(t.type==="LOD")for(t=t.levels,l=0;l<t.length;l++){h=t[l];var c=s.getObjectByProperty("uuid",h.object);c!==void 0&&s.addLevel(c,h.distance)}return s}});var ql={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},bn={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Wa={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};sl.prototype={constructor:sl,setOptions:function(t){return this.options=t,this},load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var o=this,s=Wr.get(t);if(s!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;fetch(t).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,o.options)}).then(function(l){Wr.add(t,l),e&&e(l),o.manager.itemEnd(t)}).catch(function(l){n&&n(l),o.manager.itemError(t),o.manager.itemEnd(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Ba.prototype,{moveTo:function(t,e){this.currentPath=new qn,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,i,n){this.currentPath.quadraticCurveTo(t,e,i,n)},bezierCurveTo:function(t,e,i,n,o,s){this.currentPath.bezierCurveTo(t,e,i,n,o,s)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(I){for(var $=[],W=0,ot=I.length;W<ot;W++){var Q=I[W],wt=new Nn;wt.curves=Q.curves,$.push(wt)}return $}function n(I,$){for(var W=$.length,ot=!1,Q=W-1,wt=0;wt<W;Q=wt++){var C=$[Q],D=$[wt],ct=D.x-C.x,Dt=D.y-C.y;if(Math.abs(Dt)>Number.EPSILON){if(0>Dt&&(C=$[wt],ct=-ct,D=$[Q],Dt=-Dt),!(I.y<C.y||I.y>D.y))if(I.y===C.y){if(I.x===C.x)return!0}else{if(Q=Dt*(I.x-C.x)-ct*(I.y-C.y),Q===0)return!0;0>Q||(ot=!ot)}}else if(I.y===C.y&&(D.x<=I.x&&I.x<=C.x||C.x<=I.x&&I.x<=D.x))return!0}return ot}var o=Vr.isClockWise,s=this.subPaths;if(s.length===0)return[];if(e===!0)return i(s);if(e=[],s.length===1){var l=s[0],h=new Nn;return h.curves=l.curves,e.push(h),e}var c=!o(s[0].getPoints());c=t?!c:c,h=[];var p=[],f=[],d=0;p[d]=void 0,f[d]=[];for(var v=0,x=s.length;v<x;v++){l=s[v];var P=l.getPoints(),R=o(P);(R=t?!R:R)?(!c&&p[d]&&d++,p[d]={s:new Nn,p:P},p[d].s.curves=l.curves,c&&d++,f[d]=[]):f[d].push({h:l,p:P[0]})}if(!p[0])return i(s);if(1<p.length){for(v=!1,t=[],o=0,s=p.length;o<s;o++)h[o]=[];for(o=0,s=p.length;o<s;o++)for(l=f[o],R=0;R<l.length;R++){for(c=l[R],d=!0,P=0;P<p.length;P++)n(c.p,p[P].p)&&(o!==P&&t.push({froms:o,tos:P,hole:R}),d?(d=!1,h[P].push(c)):v=!0);d&&h[o].push(c)}0<t.length&&(v||(f=h))}for(v=0,o=p.length;v<o;v++)for(h=p[v].s,e.push(h),t=f[v],s=0,l=t.length;s<l;s++)h.holes.push(t[s].h);return e}}),Object.assign(al.prototype,{isFont:!0,generateShapes:function(t,e){e===void 0&&(e=100);var i=[],n=e;e=this.data;var o=Array.from?Array.from(t):String(t).split("");n/=e.resolution;var s=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*n;t=[];for(var l=0,h=0,c=0;c<o.length;c++){var p=o[c];if(p===`
|
|
2571
|
+
`)l=0,h-=s;else{var f=n,d=l,v=h;if(p=e.glyphs[p]||e.glyphs["?"]){var x=new Ba;if(p.o)for(var P=p._cachedOutline||(p._cachedOutline=p.o.split(" ")),R=0,I=P.length;R<I;)switch(P[R++]){case"m":var $=P[R++]*f+d,W=P[R++]*f+v;x.moveTo($,W);break;case"l":$=P[R++]*f+d,W=P[R++]*f+v,x.lineTo($,W);break;case"q":var ot=P[R++]*f+d,Q=P[R++]*f+v,wt=P[R++]*f+d,C=P[R++]*f+v;x.quadraticCurveTo(wt,C,ot,Q);break;case"b":ot=P[R++]*f+d,Q=P[R++]*f+v,wt=P[R++]*f+d,C=P[R++]*f+v,$=P[R++]*f+d,W=P[R++]*f+v,x.bezierCurveTo(wt,C,$,W,ot,Q)}f={offsetX:p.ha*f,path:x}}else f=void 0;l+=f.offsetX,t.push(f.path)}}for(e=0,o=t.length;e<o;e++)Array.prototype.push.apply(i,t[e].toShapes());return i}}),Object.assign(Bl.prototype,{load:function(t,e,i,n){var o=this,s=new at(this.manager);s.setPath(this.path),s.load(t,function(l){try{var h=JSON.parse(l)}catch{console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),h=JSON.parse(l.substring(65,l.length-2))}l=o.parse(h),e&&e(l)},i,n)},parse:function(t){return new al(t)},setPath:function(t){return this.path=t,this}});var ja,yl={getContext:function(){return ja===void 0&&(ja=new(window.AudioContext||window.webkitAudioContext)),ja},setContext:function(t){ja=t}};Object.assign(Qi.prototype,{load:function(t,e,i,n){var o=new at(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.load(t,function(s){s=s.slice(0),yl.getContext().decodeAudioData(s,function(l){e(l)})},i,n)},setPath:function(t){return this.path=t,this}}),Object.assign(An.prototype,{update:function(){var t,e,i,n,o,s,l,h,c=new _t,p=new _t;return function(f){if(t!==this||e!==f.focus||i!==f.fov||n!==f.aspect*this.aspect||o!==f.near||s!==f.far||l!==f.zoom||h!==this.eyeSep){t=this,e=f.focus,i=f.fov,n=f.aspect*this.aspect,o=f.near,s=f.far,l=f.zoom;var d=f.projectionMatrix.clone();h=this.eyeSep/2;var v=h*o/e,x=o*Math.tan($e.DEG2RAD*i*.5)/l;p.elements[12]=-h,c.elements[12]=h;var P=-x*n+v,R=x*n+v;d.elements[0]=2*o/(R-P),d.elements[8]=(R+P)/(R-P),this.cameraL.projectionMatrix.copy(d),P=-x*n-v,R=x*n-v,d.elements[0]=2*o/(R-P),d.elements[8]=(R+P)/(R-P),this.cameraR.projectionMatrix.copy(d)}this.cameraL.matrixWorld.copy(f.matrixWorld).multiply(p),this.cameraR.matrixWorld.copy(f.matrixWorld).multiply(c)}}()}),ra.prototype=Object.create(z.prototype),ra.prototype.constructor=ra,Object.assign(ll.prototype,{start:function(){this.oldTime=this.startTime=(typeof performance>"u"?Date:performance).now(),this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.autoStart=this.running=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=(typeof performance>"u"?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Ua.prototype=Object.assign(Object.create(z.prototype),{constructor:Ua,getInput:function(){return this.gain},removeFilter:function(){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:function(){return this.filter},setFilter:function(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this},updateMatrixWorld:function(){var t=new S,e=new mt,i=new S,n=new S,o=new ll;return function(s){z.prototype.updateMatrixWorld.call(this,s),s=this.context.listener;var l=this.up;if(this.timeDelta=o.getDelta(),this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),s.positionX){var h=this.context.currentTime+this.timeDelta;s.positionX.linearRampToValueAtTime(t.x,h),s.positionY.linearRampToValueAtTime(t.y,h),s.positionZ.linearRampToValueAtTime(t.z,h),s.forwardX.linearRampToValueAtTime(n.x,h),s.forwardY.linearRampToValueAtTime(n.y,h),s.forwardZ.linearRampToValueAtTime(n.z,h),s.upX.linearRampToValueAtTime(l.x,h),s.upY.linearRampToValueAtTime(l.y,h),s.upZ.linearRampToValueAtTime(l.z,h)}else s.setPosition(t.x,t.y,t.z),s.setOrientation(n.x,n.y,n.z,l.x,l.y,l.z)}}()}),Ps.prototype=Object.assign(Object.create(z.prototype),{constructor:Ps,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setMediaElementSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(this.isPlaying===!0)console.warn("THREE.Audio: Audio is already playing.");else if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else{var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}},pause:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.isPlaying===!0&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.source.onended=null,this.offset=0,this.isPlaying=!1,this},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),this.isPlaying===!0?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.playbackRate=t,this.isPlaying===!0&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.loop=t,this.isPlaying===!0&&(this.source.loop=this.loop),this},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),oa.prototype=Object.assign(Object.create(Ps.prototype),{constructor:oa,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){return this.panner.refDistance=t,this},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){return this.panner.rolloffFactor=t,this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){return this.panner.distanceModel=t,this},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){return this.panner.maxDistance=t,this},setDirectionalCone:function(t,e,i){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=i,this},updateMatrixWorld:function(){var t=new S,e=new mt,i=new S,n=new S;return function(o){if(z.prototype.updateMatrixWorld.call(this,o),o=this.panner,this.matrixWorld.decompose(t,e,i),n.set(0,0,1).applyQuaternion(e),o.positionX){var s=this.context.currentTime+this.listener.timeDelta;o.positionX.linearRampToValueAtTime(t.x,s),o.positionY.linearRampToValueAtTime(t.y,s),o.positionZ.linearRampToValueAtTime(t.z,s),o.orientationX.linearRampToValueAtTime(n.x,s),o.orientationY.linearRampToValueAtTime(n.y,s),o.orientationZ.linearRampToValueAtTime(n.z,s)}else o.setPosition(t.x,t.y,t.z),o.setOrientation(n.x,n.y,n.z)}}()}),Object.assign(Yo.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),i=0;i<e.length;i++)t+=e[i];return t/e.length}}),Object.assign(sa.prototype,{accumulate:function(t,e){var i=this.buffer,n=this.valueSize;t=t*n+n;var o=this.cumulativeWeight;if(o===0){for(o=0;o!==n;++o)i[t+o]=i[o];o=e}else o+=e,this._mixBufferRegion(i,t,0,e/o,n);this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,i=this.buffer;t=t*e+e;var n=this.cumulativeWeight,o=this.binding;this.cumulativeWeight=0,1>n&&this._mixBufferRegion(i,t,3*e,1-n,e),n=e;for(var s=e+e;n!==s;++n)if(i[n]!==i[n+e]){o.setValue(i,t);break}},saveOriginalState:function(){var t=this.buffer,e=this.valueSize,i=3*e;this.binding.getValue(t,i);for(var n=e;n!==i;++n)t[n]=t[i+n%e];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(t,e,i,n,o){if(.5<=n)for(n=0;n!==o;++n)t[e+n]=t[i+n]},_slerp:function(t,e,i,n){mt.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,o){for(var s=1-n,l=0;l!==o;++l){var h=e+l;t[h]=t[h]*s+t[i+l]*n}}}),Object.assign(Zo.prototype,{getValue:function(t,e){this.bind();var i=this._bindings[this._targetGroup.nCachedObjects_];i!==void 0&&i.getValue(t,e)},setValue:function(t,e){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,o=i.length;n!==o;++n)i[n].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}),Object.assign(ln,{Composite:Zo,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new ln.Composite(t,e,i):new ln(t,e,i)},sanitizeNodeName:function(){var t=/[\[\]\.:\/]/g;return function(e){return e.replace(/\s/g,"_").replace(t,"")}}(),parseTrackName:function(){var t="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",e=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");t=/(WCOD+)?/.source.replace("WCOD",t);var i=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),n=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),o=new RegExp("^"+e+t+i+n+"$"),s=["material","materials","bones"];return function(l){var h=o.exec(l);if(!h)throw Error("PropertyBinding: Cannot parse trackName: "+l);h={nodeName:h[2],objectName:h[3],objectIndex:h[4],propertyName:h[5],propertyIndex:h[6]};var c=h.nodeName&&h.nodeName.lastIndexOf(".");if(c!==void 0&&c!==-1){var p=h.nodeName.substring(c+1);s.indexOf(p)!==-1&&(h.nodeName=h.nodeName.substring(0,c),h.objectName=p)}if(h.propertyName===null||h.propertyName.length===0)throw Error("PropertyBinding: can not parse propertyName from trackName: "+l);return h}}(),findNode:function(t,e){if(!e||e===""||e==="root"||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){var i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){var n=function(o){for(var s=0;s<o.length;s++){var l=o[s];if(l.name===e||l.uuid===e||(l=n(l.children)))return l}return null};if(t=n(t.children))return t}return null}}),Object.assign(ln.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var i=this.resolvedProperty,n=0,o=i.length;n!==o;++n)t[e++]=i[n]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var i=this.resolvedProperty,n=0,o=i.length;n!==o;++n)i[n]=t[e++]},function(t,e){for(var i=this.resolvedProperty,n=0,o=i.length;n!==o;++n)i[n]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var i=this.resolvedProperty,n=0,o=i.length;n!==o;++n)i[n]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,i=e.objectName,n=e.propertyName,o=e.propertyIndex;if(t||(this.node=t=ln.findNode(this.rootNode,e.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var s=e.objectIndex;switch(i){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}for(t=t.skeleton.bones,i=0;i<t.length;i++)if(t[i].name===s){s=i;break}break;default:if(t[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(s!==void 0){if(t[s]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[s]}}if(s=t[n],s===void 0)console.error("THREE.PropertyBinding: Trying to update property for track: "+e.nodeName+"."+n+" but it wasn't found.",t);else{if(e=this.Versioning.None,this.targetObject=t,t.needsUpdate!==void 0?e=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(e=this.Versioning.MatrixWorldNeedsUpdate),i=this.BindingType.Direct,o!==void 0){if(n==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}for(i=0;i<this.node.geometry.morphAttributes.position.length;i++)if(t.geometry.morphAttributes.position[i].name===o){o=i;break}}else{if(!t.geometry.morphTargets){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);return}for(i=0;i<this.node.geometry.morphTargets.length;i++)if(t.geometry.morphTargets[i].name===o){o=i;break}}}i=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=o}else s.fromArray!==void 0&&s.toArray!==void 0?(i=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(i=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=n;this.getValue=this.GetterByBindingType[i],this.setValue=this.SetterByBindingTypeAndVersioning[i][e]}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(ln.prototype,{_getValue_unbound:ln.prototype.getValue,_setValue_unbound:ln.prototype.setValue}),Object.assign(Ls.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._paths,s=this._parsedPaths,l=this._bindings,h=l.length,c=void 0,p=0,f=arguments.length;p!==f;++p){var d=arguments[p],v=d.uuid,x=n[v];if(x===void 0){x=e++,n[v]=x,t.push(d),v=0;for(var P=h;v!==P;++v)l[v].push(new ln(d,o[v],s[v]))}else if(x<i){c=t[x];var R=--i;for(P=t[R],n[P.uuid]=x,t[x]=P,n[v]=R,t[R]=d,v=0,P=h;v!==P;++v){var I=l[v],$=I[x];I[x]=I[R],$===void 0&&($=new ln(d,o[v],s[v])),I[R]=$}}else t[x]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=i},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,i=this._indicesByUUID,n=this._bindings,o=n.length,s=0,l=arguments.length;s!==l;++s){var h=arguments[s],c=h.uuid,p=i[c];if(p!==void 0&&p>=e){var f=e++,d=t[f];for(i[d.uuid]=p,t[p]=d,i[c]=f,t[f]=h,h=0,c=o;h!==c;++h){d=n[h];var v=d[p];d[p]=d[f],d[f]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._bindings,s=o.length,l=0,h=arguments.length;l!==h;++l){var c=arguments[l].uuid,p=n[c];if(p!==void 0)if(delete n[c],p<i){c=--i;var f=t[c],d=--e,v=t[d];for(n[f.uuid]=p,t[p]=f,n[v.uuid]=c,t[c]=v,t.pop(),f=0,v=s;f!==v;++f){var x=o[f],P=x[d];x[p]=x[c],x[c]=P,x.pop()}}else for(d=--e,v=t[d],n[v.uuid]=p,t[p]=v,t.pop(),f=0,v=s;f!==v;++f)x=o[f],x[p]=x[d],x.pop()}this.nCachedObjects_=i},subscribe_:function(t,e){var i=this._bindingsIndicesByPath,n=i[t],o=this._bindings;if(n!==void 0)return o[n];var s=this._paths,l=this._parsedPaths,h=this._objects,c=this.nCachedObjects_,p=Array(h.length);for(n=o.length,i[t]=n,s.push(t),l.push(e),o.push(p),i=c,n=h.length;i!==n;++i)p[i]=new ln(h[i],t,e);return p},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){var n=this._paths,o=this._parsedPaths,s=this._bindings,l=s.length-1,h=s[l];e[t[l]]=i,s[i]=h,s.pop(),o[i]=o[l],o.pop(),n[i]=n[l],n.pop()}}}),Object.assign(aa.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,i){if(t.fadeOut(e),this.fadeIn(e),i){i=this._clip.duration;var n=t._clip.duration,o=i/n;t.warp(1,n/i,e),this.warp(o,1,e)}return this},crossFadeTo:function(t,e,i){return t.crossFadeFrom(this,e,i)},stopFading:function(){var t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,i){var n=this._mixer,o=n.time,s=this._timeScaleInterpolant,l=this.timeScale;return s===null&&(this._timeScaleInterpolant=s=n._lendControlInterpolant()),n=s.parameterPositions,s=s.sampleValues,n[0]=o,n[1]=o+i,s[0]=t/l,s[1]=e/l,this},stopWarping:function(){var t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,i,n){if(this.enabled){var o=this._startTime;if(o!==null){if(e=(t-o)*i,0>e||i===0)return;this._startTime=null,e*=i}if(e*=this._updateTimeScale(t),i=this._updateTime(e),t=this._updateWeight(t),0<t){e=this._interpolants,o=this._propertyBindings;for(var s=0,l=e.length;s!==l;++s)e[s].evaluate(i),o[s].accumulate(n,t)}}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var i=this._weightInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),n===0&&(this.enabled=!1))}}return this._effectiveWeight=e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var i=this._timeScaleInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e},_updateTime:function(t){var e=this.time+t,i=this._clip.duration,n=this.loop,o=this._loopCount,s=n===2202;if(t===0)return o===-1?e:s&&(o&1)===1?i-e:e;if(n===2200)t:{if(o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1)),e>=i)e=i;else if(0>e)e=0;else break t;this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:0>t?-1:1})}else{if(o===-1&&(0<=t?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),e>=i||0>e){n=Math.floor(e/i),e-=i*n,o+=Math.abs(n);var l=this.repetitions-o;0>=l?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=0<t?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<t?1:-1})):(l===1?(t=0>t,this._setEndings(t,!t,s)):this._setEndings(!1,!1,s),this._loopCount=o,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n}))}if(s&&(o&1)===1)return this.time=e,i-e}return this.time=e},_setEndings:function(t,e,i){var n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(n.endingStart=t?this.zeroSlopeAtStart?2401:2400:2402,n.endingEnd=e?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(t,e,i){var n=this._mixer,o=n.time,s=this._weightInterpolant;return s===null&&(this._weightInterpolant=s=n._lendControlInterpolant()),n=s.parameterPositions,s=s.sampleValues,n[0]=o,s[0]=e,n[1]=o+t,s[1]=i,this}}),wo.prototype=Object.assign(Object.create(ht.prototype),{constructor:wo,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,o=n.length,s=t._propertyBindings;t=t._interpolants;var l=i.uuid,h=this._bindingsByRootAndName,c=h[l];for(c===void 0&&(c={},h[l]=c),h=0;h!==o;++h){var p=n[h],f=p.name,d=c[f];if(d===void 0){if(d=s[h],d!==void 0){d._cacheIndex===null&&(++d.referenceCount,this._addInactiveBinding(d,l,f));continue}d=new sa(ln.create(i,f,e&&e._propertyBindings[h].binding.parsedPath),p.ValueTypeName,p.getValueSize()),++d.referenceCount,this._addInactiveBinding(d,l,f)}s[h]=d,t[h].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){var e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}for(e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var o=e[i];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var o=e[i];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){return t=t._cacheIndex,t!==null&&t<this._nActiveActions},_addInactiveAction:function(t,e,i){var n=this._actions,o=this._actionsByClip,s=o[e];s===void 0?(s={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,o[e]=s):(e=s.knownActions,t._byClipCacheIndex=e.length,e.push(t)),t._cacheIndex=n.length,n.push(t),s.actionByRoot[i]=t},_removeInactiveAction:function(t){var e=this._actions,i=e[e.length-1],n=t._cacheIndex;i._cacheIndex=n,e[n]=i,e.pop(),t._cacheIndex=null,e=t._clip.uuid,i=this._actionsByClip,n=i[e];var o=n.knownActions,s=o[o.length-1],l=t._byClipCacheIndex;s._byClipCacheIndex=l,o[l]=s,o.pop(),t._byClipCacheIndex=null,delete n.actionByRoot[(t._localRoot||this._root).uuid],o.length===0&&delete i[e],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){t=t._propertyBindings;for(var e=0,i=t.length;e!==i;++e){var n=t[e];--n.referenceCount===0&&this._removeInactiveBinding(n)}},_lendAction:function(t){var e=this._actions,i=t._cacheIndex,n=this._nActiveActions++,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_takeBackAction:function(t){var e=this._actions,i=t._cacheIndex,n=--this._nActiveActions,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_addInactiveBinding:function(t,e,i){var n=this._bindingsByRootAndName,o=n[e],s=this._bindings;o===void 0&&(o={},n[e]=o),o[i]=t,t._cacheIndex=s.length,s.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid;i=i.path;var o=this._bindingsByRootAndName,s=o[n],l=e[e.length-1];t=t._cacheIndex,l._cacheIndex=t,e[t]=l,e.pop(),delete s[i];t:{for(var h in s)break t;delete o[n]}},_lendBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=this._nActiveBindings++,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_takeBackBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=--this._nActiveBindings,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return i===void 0&&(i=new ur(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),i.__cacheIndex=e,t[e]=i),i},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,i=t.__cacheIndex,n=--this._nActiveControlInterpolants,o=e[n];t.__cacheIndex=n,e[n]=t,o.__cacheIndex=i,e[i]=o},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var i=e||this._root,n=i.uuid;i=typeof t=="string"?tr.findByName(i,t):t,t=i!==null?i.uuid:t;var o=this._actionsByClip[t],s=null;if(o!==void 0){if(s=o.actionByRoot[n],s!==void 0)return s;s=o.knownActions[0],i===null&&(i=s._clip)}return i===null?null:(e=new aa(this,i,e),this._bindAction(e,s),this._addInactiveAction(e,t,n),e)},existingAction:function(t,e){var i=e||this._root;return e=i.uuid,i=typeof t=="string"?tr.findByName(i,t):t,t=this._actionsByClip[i?i.uuid:t],t!==void 0&&t.actionByRoot[e]||null},stopAllAction:function(){for(var t=this._actions,e=this._nActiveActions,i=this._bindings,n=this._nActiveBindings,o=this._nActiveBindings=this._nActiveActions=0;o!==e;++o)t[o].reset();for(o=0;o!==n;++o)i[o].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,i=this._nActiveActions,n=this.time+=t,o=Math.sign(t),s=this._accuIndex^=1,l=0;l!==i;++l)e[l]._update(n,t,o,s);for(t=this._bindings,e=this._nActiveBindings,l=0;l!==e;++l)t[l].apply(s);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions;t=t.uuid;var i=this._actionsByClip,n=i[t];if(n!==void 0){n=n.knownActions;for(var o=0,s=n.length;o!==s;++o){var l=n[o];this._deactivateAction(l);var h=l._cacheIndex,c=e[e.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,c._cacheIndex=h,e[h]=c,e.pop(),this._removeInactiveBindingsForAction(l)}delete i[t]}},uncacheRoot:function(t){t=t.uuid;var e=this._actionsByClip;for(n in e){var i=e[n].actionByRoot[t];i!==void 0&&(this._deactivateAction(i),this._removeInactiveAction(i))}var n=this._bindingsByRootAndName[t];if(n!==void 0)for(var o in n)t=n[o],t.restoreOriginalState(),this._removeInactiveBinding(t)},uncacheAction:function(t,e){t=this.existingAction(t,e),t!==null&&(this._deactivateAction(t),this._removeInactiveAction(t))}}),Fa.prototype.clone=function(){return new Fa(this.value.clone===void 0?this.value:this.value.clone())},hl.prototype=Object.assign(Object.create(Ut.prototype),{constructor:hl,isInstancedBufferGeometry:!0,copy:function(t){return Ut.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return new this.constructor().copy(this)}}),ul.prototype=Object.assign(Object.create(vi.prototype),{constructor:ul,isInstancedInterleavedBuffer:!0,copy:function(t){return vi.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),cl.prototype=Object.assign(Object.create(et.prototype),{constructor:cl,isInstancedBufferAttribute:!0,copy:function(t){return et.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Ul.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,i){return i=i||[],Jo(t,this,i,e),i.sort(la),i},intersectObjects:function(t,e,i){if(i=i||[],Array.isArray(t)===!1)return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),i;for(var n=0,o=t.length;n<o;n++)Jo(t[n],this,i,e);return i.sort(la),i}}),Object.assign(pl.prototype,{set:function(t,e,i){return this.radius=t,this.phi=e,this.theta=i,this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,i){return this.radius=Math.sqrt(t*t+e*e+i*i),this.radius===0?this.phi=this.theta=0:(this.theta=Math.atan2(t,i),this.phi=Math.acos($e.clamp(e/this.radius,-1,1))),this}}),Object.assign(O.prototype,{set:function(t,e,i){return this.radius=t,this.theta=e,this.y=i,this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,i){return this.radius=Math.sqrt(t*t+i*i),this.theta=Math.atan2(t,i),this.y=e,this}}),Object.assign(Mo.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new M;return function(e,i){return i=t.copy(i).multiplyScalar(.5),this.min.copy(e).sub(i),this.max.copy(e).add(i),this}}(),clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return t===void 0&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new M),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return t===void 0&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new M),this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return e===void 0&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new M),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)},clampPoint:function(t,e){return e===void 0&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new M),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new M;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(Cs.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return t===void 0&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new S),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return t===void 0&&(console.warn("THREE.Line3: .delta() target is now required"),t=new S),t.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){return e===void 0&&(console.warn("THREE.Line3: .at() target is now required"),e=new S),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new S,e=new S;return function(i,n){return t.subVectors(i,this.start),e.subVectors(this.end,this.start),i=e.dot(e),i=e.dot(t)/i,n&&(i=$e.clamp(i,0,1)),i}}(),closestPointToPoint:function(t,e,i){return t=this.closestPointToPointParameter(t,e),i===void 0&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),i=new S),this.delta(i).multiplyScalar(t).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),Cn.prototype=Object.create(z.prototype),Cn.prototype.constructor=Cn,Cn.prototype.isImmediateRenderObject=!0,ri.prototype=Object.create(ei.prototype),ri.prototype.constructor=ri,ri.prototype.update=function(){var t=new S,e=new S,i=new Mt;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var o=this.object.matrixWorld,s=this.geometry.attributes.position,l=this.object.geometry;if(l&&l.isGeometry)for(var h=l.vertices,c=l.faces,p=l=0,f=c.length;p<f;p++)for(var d=c[p],v=0,x=d.vertexNormals.length;v<x;v++){var P=d.vertexNormals[v];t.copy(h[d[n[v]]]).applyMatrix4(o),e.copy(P).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),s.setXYZ(l,t.x,t.y,t.z),l+=1,s.setXYZ(l,e.x,e.y,e.z),l+=1}else if(l&&l.isBufferGeometry)for(n=l.attributes.position,h=l.attributes.normal,v=l=0,x=n.count;v<x;v++)t.set(n.getX(v),n.getY(v),n.getZ(v)).applyMatrix4(o),e.set(h.getX(v),h.getY(v),h.getZ(v)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),s.setXYZ(l,t.x,t.y,t.z),l+=1,s.setXYZ(l,e.x,e.y,e.z),l+=1;s.needsUpdate=!0}}(),Rs.prototype=Object.create(z.prototype),Rs.prototype.constructor=Rs,Rs.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Rs.prototype.update=function(){var t=new S,e=new S;return function(){this.light.updateMatrixWorld();var i=this.light.distance?this.light.distance:1e3,n=i*Math.tan(this.light.angle);this.cone.scale.set(n,n,i),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),bs.prototype=Object.create(ei.prototype),bs.prototype.constructor=bs,bs.prototype.updateMatrixWorld=function(){var t=new S,e=new _t,i=new _t;return function(n){var o=this.bones,s=this.geometry,l=s.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var h=0,c=0;h<o.length;h++){var p=o[h];p.parent&&p.parent.isBone&&(e.multiplyMatrices(i,p.matrixWorld),t.setFromMatrixPosition(e),l.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(i,p.parent.matrixWorld),t.setFromMatrixPosition(e),l.setXYZ(c+1,t.x,t.y,t.z),c+=2)}s.getAttribute("position").needsUpdate=!0,z.prototype.updateMatrixWorld.call(this,n)}}(),pr.prototype=Object.create(Fi.prototype),pr.prototype.constructor=pr,pr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},pr.prototype.update=function(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Os.prototype=Object.create(z.prototype),Os.prototype.constructor=Os,Os.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Os.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,i=this.line.geometry.attributes.position,n=i.array;n[0]=t,n[1]=-e,n[2]=0,n[3]=t,n[4]=e,n[5]=0,n[6]=-t,n[7]=e,n[8]=0,n[9]=-t,n[10]=-e,n[11]=0,n[12]=t,n[13]=-e,n[14]=0,i.needsUpdate=!0,this.color!==void 0?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Is.prototype=Object.create(z.prototype),Is.prototype.constructor=Is,Is.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Is.prototype.update=function(){var t=new S,e=new Z,i=new Z;return function(){var n=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{var o=n.geometry.getAttribute("color");e.copy(this.light.color),i.copy(this.light.groundColor);for(var s=0,l=o.count;s<l;s++){var h=s<l/2?e:i;o.setXYZ(s,h.r,h.g,h.b)}o.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),ha.prototype=Object.create(ei.prototype),ha.prototype.constructor=ha,Ga.prototype=Object.create(ei.prototype),Ga.prototype.constructor=Ga,ua.prototype=Object.create(ei.prototype),ua.prototype.constructor=ua,ua.prototype.update=function(){var t=new S,e=new S,i=new Mt;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var n=this.object.matrixWorld,o=this.geometry.attributes.position,s=this.object.geometry,l=s.vertices;s=s.faces;for(var h=0,c=0,p=s.length;c<p;c++){var f=s[c],d=f.normal;t.copy(l[f.a]).add(l[f.b]).add(l[f.c]).divideScalar(3).applyMatrix4(n),e.copy(d).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(h,t.x,t.y,t.z),h+=1,o.setXYZ(h,e.x,e.y,e.z),h+=1}o.needsUpdate=!0}}(),Yn.prototype=Object.create(z.prototype),Yn.prototype.constructor=Yn,Yn.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Yn.prototype.update=function(){var t=new S,e=new S,i=new S;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),i.subVectors(e,t),this.lightPlane.lookAt(i),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(i),this.targetLine.scale.z=i.length()}}(),ca.prototype=Object.create(ei.prototype),ca.prototype.constructor=ca,ca.prototype.update=function(){function t(s,l,h,c){if(n.set(l,h,c).unproject(o),s=i[s],s!==void 0)for(l=e.getAttribute("position"),h=0,c=s.length;h<c;h++)l.setXYZ(s[h],n.x,n.y,n.z)}var e,i,n=new S,o=new ye;return function(){e=this.geometry,i=this.pointMap,o.projectionMatrix.copy(this.camera.projectionMatrix),t("c",0,0,-1),t("t",0,0,1),t("n1",-1,-1,-1),t("n2",1,-1,-1),t("n3",-1,1,-1),t("n4",1,1,-1),t("f1",-1,-1,1),t("f2",1,-1,1),t("f3",-1,1,1),t("f4",1,1,1),t("u1",.7,1.1,-1),t("u2",-.7,1.1,-1),t("u3",0,2,-1),t("cf1",-1,0,1),t("cf2",1,0,1),t("cf3",0,-1,1),t("cf4",0,1,1),t("cn1",-1,0,-1),t("cn2",1,0,-1),t("cn3",0,-1,-1),t("cn4",0,1,-1),e.getAttribute("position").needsUpdate=!0}}(),io.prototype=Object.create(ei.prototype),io.prototype.constructor=io,io.prototype.update=function(){var t=new Nt;return function(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&t.setFromObject(this.object),!t.isEmpty()){e=t.min;var i=t.max,n=this.geometry.attributes.position,o=n.array;o[0]=i.x,o[1]=i.y,o[2]=i.z,o[3]=e.x,o[4]=i.y,o[5]=i.z,o[6]=e.x,o[7]=e.y,o[8]=i.z,o[9]=i.x,o[10]=e.y,o[11]=i.z,o[12]=i.x,o[13]=i.y,o[14]=e.z,o[15]=e.x,o[16]=i.y,o[17]=e.z,o[18]=e.x,o[19]=e.y,o[20]=e.z,o[21]=i.x,o[22]=e.y,o[23]=e.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),io.prototype.setFromObject=function(t){return this.object=t,this.update(),this},io.prototype.copy=function(t){return ei.prototype.copy.call(this,t),this.object=t.object,this},io.prototype.clone=function(){return new this.constructor().copy(this)},pa.prototype=Object.create(ei.prototype),pa.prototype.constructor=pa,pa.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),z.prototype.updateMatrixWorld.call(this,t))},fa.prototype=Object.create(Li.prototype),fa.prototype.constructor=fa,fa.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;1e-8>Math.abs(e)&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=0>e?1:0,this.lookAt(this.plane.normal),z.prototype.updateMatrixWorld.call(this,t)};var Xa,va;no.prototype=Object.create(z.prototype),no.prototype.constructor=no,no.prototype.setDirection=function(){var t=new S,e;return function(i){.99999<i.y?this.quaternion.set(0,0,0,1):-.99999>i.y?this.quaternion.set(1,0,0,0):(t.set(i.z,0,-i.x).normalize(),e=Math.acos(i.y),this.quaternion.setFromAxisAngle(t,e))}}(),no.prototype.setLength=function(t,e,i){e===void 0&&(e=.2*t),i===void 0&&(i=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()},no.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},no.prototype.copy=function(t){return z.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},no.prototype.clone=function(){return new this.constructor().copy(this)},er.prototype=Object.create(ei.prototype),er.prototype.constructor=er,he.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(he.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(to.prototype,{createPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getPoints(t),this.createGeometry(t)},createSpacedPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getSpacedPoints(t),this.createGeometry(t)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new X,i=0,n=t.length;i<n;i++){var o=t[i];e.vertices.push(new S(o.x,o.y,o.z||0))}return e}}),Object.assign(qn.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Gl.prototype=Object.create(mn.prototype),Hl.prototype=Object.create(mn.prototype),fl.prototype=Object.create(mn.prototype),Object.assign(fl.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),ha.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},bs.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(eo.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Qo.extractUrlBase(t)}}),Object.assign(qo.prototype,{setTexturePath:function(t){return console.warn("THREE.JSONLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(na.prototype,{setTexturePath:function(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(Mo.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(Nt.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),Cs.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign($e,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),$e.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),$e.ceilPowerOfTwo(t)}}),Object.assign(Mt.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(_t.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return t===void 0&&(t=new S),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,i,n,o,s){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,n,i,o,s)}}),Ct.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},mt.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(In.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(ni.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(ni,{barycoordFromPoint:function(t,e,i,n,o){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),ni.getBarycoord(t,e,i,n,o)},normal:function(t,e,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),ni.getNormal(t,e,i,n)}}),Object.assign(Nn.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Jr(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new $r(this,t)}}),Object.assign(M.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(S.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,i){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(nt.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(X.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(z.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(z.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},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.")}}}),Object.defineProperties(ki.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Xi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(he.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),ee.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(Ui.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(et.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Ut.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,i){i!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Ut.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}}}),Object.assign(zr.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Fa.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(Oe.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 Z}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===1}}}),Object.defineProperties(wr.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(Pi.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(ne.prototype,{clearTarget:function(t,e,i,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(t),this.clear(e,i,n)},animate:function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(ne.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},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.")}}}),Object.defineProperties(Kt.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(Tt.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ke.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}}),Ps.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return new Qi().load(t,function(i){e.setBuffer(i)}),this},Yo.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},ra.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},To.crossOrigin=void 0,To.loadTexture=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var o=new Yi;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},To.loadTextureCube=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var o=new xi;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},To.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},To.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},g.WebGLRenderTargetCube=bt,g.WebGLRenderTarget=Tt,g.WebGLRenderer=ne,g.ShaderLib=kr,g.UniformsLib=Re,g.UniformsUtils=_n,g.ShaderChunk=hi,g.FogExp2=de,g.Fog=an,g.Scene=Ln,g.Sprite=Hi,g.LOD=ki,g.SkinnedMesh=Ti,g.Skeleton=Xi,g.Bone=qi,g.Mesh=Fi,g.LineSegments=ei,g.LineLoop=Ir,g.Line=Li,g.Points=ps,g.Group=Ye,g.VideoTexture=il,g.DataTexture=gt,g.DataTexture3D=k,g.CompressedTexture=uo,g.CubeTexture=A,g.CanvasTexture=Ws,g.DepthTexture=js,g.Texture=qt,g.AnimationLoader=Ot,g.CompressedTextureLoader=At,g.DataTextureLoader=xe,g.CubeTextureLoader=xi,g.TextureLoader=Yi,g.ObjectLoader=na,g.MaterialLoader=Na,g.BufferGeometryLoader=ol,g.DefaultLoadingManager=Bn,g.LoadingManager=yo,g.JSONLoader=qo,g.ImageLoader=We,g.ImageBitmapLoader=sl,g.FontLoader=Bl,g.FileLoader=at,g.Loader=eo,g.LoaderUtils=Qo,g.Cache=Wr,g.AudioLoader=Qi,g.SpotLightShadow=ea,g.SpotLight=ia,g.PointLight=jo,g.RectAreaLight=za,g.HemisphereLight=ta,g.DirectionalLightShadow=xo,g.DirectionalLight=Hr,g.AmbientLight=Xo,g.LightShadow=Gr,g.Light=Ui,g.StereoCamera=An,g.PerspectiveCamera=ee,g.OrthographicCamera=As,g.CubeCamera=ra,g.ArrayCamera=_e,g.Camera=ye,g.AudioListener=Ua,g.PositionalAudio=oa,g.AudioContext=yl,g.AudioAnalyser=Yo,g.Audio=Ps,g.VectorKeyframeTrack=Ss,g.StringKeyframeTrack=Da,g.QuaternionKeyframeTrack=Ts,g.NumberKeyframeTrack=Mr,g.ColorKeyframeTrack=Ia,g.BooleanKeyframeTrack=Oa,g.PropertyMixer=sa,g.PropertyBinding=ln,g.KeyframeTrack=En,g.AnimationUtils=Rn,g.AnimationObjectGroup=Ls,g.AnimationMixer=wo,g.AnimationClip=tr,g.Uniform=Fa,g.InstancedBufferGeometry=hl,g.BufferGeometry=Ut,g.Geometry=X,g.InterleavedBufferAttribute=yi,g.InstancedInterleavedBuffer=ul,g.InterleavedBuffer=vi,g.InstancedBufferAttribute=cl,g.Face3=B,g.Object3D=z,g.Raycaster=Ul,g.Layers=Y,g.EventDispatcher=ht,g.Clock=ll,g.QuaternionLinearInterpolant=kn,g.LinearInterpolant=ur,g.DiscreteInterpolant=Wo,g.CubicInterpolant=Ks,g.Interpolant=Dn,g.Triangle=ni,g.Math=$e,g.Spherical=pl,g.Cylindrical=O,g.Plane=Ct,g.Frustum=st,g.Sphere=Ht,g.Ray=In,g.Matrix4=_t,g.Matrix3=Mt,g.Box3=Nt,g.Box2=Mo,g.Line3=Cs,g.Euler=E,g.Vector4=nt,g.Vector3=S,g.Vector2=M,g.Quaternion=mt,g.Color=Z,g.ImmediateRenderObject=Cn,g.VertexNormalsHelper=ri,g.SpotLightHelper=Rs,g.SkeletonHelper=bs,g.PointLightHelper=pr,g.RectAreaLightHelper=Os,g.HemisphereLightHelper=Is,g.GridHelper=ha,g.PolarGridHelper=Ga,g.FaceNormalsHelper=ua,g.DirectionalLightHelper=Yn,g.CameraHelper=ca,g.BoxHelper=io,g.Box3Helper=pa,g.PlaneHelper=fa,g.ArrowHelper=no,g.AxesHelper=er,g.Shape=Nn,g.Path=qn,g.ShapePath=Ba,g.Font=al,g.CurvePath=to,g.Curve=he,g.ImageUtils=To,g.ShapeUtils=Vr,g.WebGLUtils=Me,g.WireframeGeometry=fs,g.ParametricGeometry=Xs,g.ParametricBufferGeometry=ds,g.TetrahedronGeometry=qs,g.TetrahedronBufferGeometry=ms,g.OctahedronGeometry=Ys,g.OctahedronBufferGeometry=bo,g.IcosahedronGeometry=Zs,g.IcosahedronBufferGeometry=gs,g.DodecahedronGeometry=vs,g.DodecahedronBufferGeometry=ys,g.PolyhedronGeometry=Ci,g.PolyhedronBufferGeometry=oi,g.TubeGeometry=$i,g.TubeBufferGeometry=co,g.TorusKnotGeometry=xr,g.TorusKnotBufferGeometry=Oo,g.TorusGeometry=Io,g.TorusBufferGeometry=Tn,g.TextGeometry=$s,g.TextBufferGeometry=zo,g.SphereGeometry=po,g.SphereBufferGeometry=lr,g.RingGeometry=Qs,g.RingBufferGeometry=No,g.PlaneGeometry=Pn,g.PlaneBufferGeometry=Zi,g.LatheGeometry=ws,g.LatheBufferGeometry=fo,g.ShapeGeometry=$r,g.ShapeBufferGeometry=mo,g.ExtrudeGeometry=Jr,g.ExtrudeBufferGeometry=zr,g.EdgesGeometry=go,g.ConeGeometry=Ms,g.ConeBufferGeometry=Sn,g.CylinderGeometry=Qr,g.CylinderBufferGeometry=Kr,g.CircleGeometry=Bo,g.CircleBufferGeometry=Nr,g.BoxGeometry=Qe,g.BoxBufferGeometry=Ii,g.ShadowMaterial=vo,g.SpriteMaterial=Si,g.RawShaderMaterial=Uo,g.ShaderMaterial=Pi,g.PointsMaterial=Mn,g.MeshPhysicalMaterial=Fo,g.MeshStandardMaterial=Br,g.MeshPhongMaterial=wr,g.MeshToonMaterial=Go,g.MeshNormalMaterial=Ho,g.MeshLambertMaterial=hr,g.MeshDepthMaterial=kt,g.MeshDistanceMaterial=It,g.MeshBasicMaterial=ci,g.MeshMatcapMaterial=ko,g.LineDashedMaterial=Vo,g.LineBasicMaterial=_i,g.Material=Oe,g.Float64BufferAttribute=ie,g.Float32BufferAttribute=Et,g.Uint32BufferAttribute=we,g.Int32BufferAttribute=se,g.Uint16BufferAttribute=re,g.Int16BufferAttribute=Yt,g.Uint8ClampedBufferAttribute=zt,g.Uint8BufferAttribute=ft,g.Int8BufferAttribute=yt,g.BufferAttribute=et,g.ArcCurve=Es,g.CatmullRomCurve3=mn,g.CubicBezierCurve=Wn,g.CubicBezierCurve3=ai,g.EllipseCurve=zn,g.LineCurve=jn,g.LineCurve3=cr,g.QuadraticBezierCurve=Xn,g.QuadraticBezierCurve3=Fr,g.SplineCurve=Tr,g.REVISION="98",g.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},g.CullFaceNone=0,g.CullFaceBack=1,g.CullFaceFront=2,g.CullFaceFrontBack=3,g.FrontFaceDirectionCW=0,g.FrontFaceDirectionCCW=1,g.BasicShadowMap=0,g.PCFShadowMap=1,g.PCFSoftShadowMap=2,g.FrontSide=0,g.BackSide=1,g.DoubleSide=2,g.FlatShading=1,g.SmoothShading=2,g.NoColors=0,g.FaceColors=1,g.VertexColors=2,g.NoBlending=0,g.NormalBlending=1,g.AdditiveBlending=2,g.SubtractiveBlending=3,g.MultiplyBlending=4,g.CustomBlending=5,g.AddEquation=100,g.SubtractEquation=101,g.ReverseSubtractEquation=102,g.MinEquation=103,g.MaxEquation=104,g.ZeroFactor=200,g.OneFactor=201,g.SrcColorFactor=202,g.OneMinusSrcColorFactor=203,g.SrcAlphaFactor=204,g.OneMinusSrcAlphaFactor=205,g.DstAlphaFactor=206,g.OneMinusDstAlphaFactor=207,g.DstColorFactor=208,g.OneMinusDstColorFactor=209,g.SrcAlphaSaturateFactor=210,g.NeverDepth=0,g.AlwaysDepth=1,g.LessDepth=2,g.LessEqualDepth=3,g.EqualDepth=4,g.GreaterEqualDepth=5,g.GreaterDepth=6,g.NotEqualDepth=7,g.MultiplyOperation=0,g.MixOperation=1,g.AddOperation=2,g.NoToneMapping=0,g.LinearToneMapping=1,g.ReinhardToneMapping=2,g.Uncharted2ToneMapping=3,g.CineonToneMapping=4,g.UVMapping=300,g.CubeReflectionMapping=301,g.CubeRefractionMapping=302,g.EquirectangularReflectionMapping=303,g.EquirectangularRefractionMapping=304,g.SphericalReflectionMapping=305,g.CubeUVReflectionMapping=306,g.CubeUVRefractionMapping=307,g.RepeatWrapping=1e3,g.ClampToEdgeWrapping=1001,g.MirroredRepeatWrapping=1002,g.NearestFilter=1003,g.NearestMipMapNearestFilter=1004,g.NearestMipMapLinearFilter=1005,g.LinearFilter=1006,g.LinearMipMapNearestFilter=1007,g.LinearMipMapLinearFilter=1008,g.UnsignedByteType=1009,g.ByteType=1010,g.ShortType=1011,g.UnsignedShortType=1012,g.IntType=1013,g.UnsignedIntType=1014,g.FloatType=1015,g.HalfFloatType=1016,g.UnsignedShort4444Type=1017,g.UnsignedShort5551Type=1018,g.UnsignedShort565Type=1019,g.UnsignedInt248Type=1020,g.AlphaFormat=1021,g.RGBFormat=1022,g.RGBAFormat=1023,g.LuminanceFormat=1024,g.LuminanceAlphaFormat=1025,g.RGBEFormat=1023,g.DepthFormat=1026,g.DepthStencilFormat=1027,g.RedFormat=1028,g.RGB_S3TC_DXT1_Format=33776,g.RGBA_S3TC_DXT1_Format=33777,g.RGBA_S3TC_DXT3_Format=33778,g.RGBA_S3TC_DXT5_Format=33779,g.RGB_PVRTC_4BPPV1_Format=35840,g.RGB_PVRTC_2BPPV1_Format=35841,g.RGBA_PVRTC_4BPPV1_Format=35842,g.RGBA_PVRTC_2BPPV1_Format=35843,g.RGB_ETC1_Format=36196,g.RGBA_ASTC_4x4_Format=37808,g.RGBA_ASTC_5x4_Format=37809,g.RGBA_ASTC_5x5_Format=37810,g.RGBA_ASTC_6x5_Format=37811,g.RGBA_ASTC_6x6_Format=37812,g.RGBA_ASTC_8x5_Format=37813,g.RGBA_ASTC_8x6_Format=37814,g.RGBA_ASTC_8x8_Format=37815,g.RGBA_ASTC_10x5_Format=37816,g.RGBA_ASTC_10x6_Format=37817,g.RGBA_ASTC_10x8_Format=37818,g.RGBA_ASTC_10x10_Format=37819,g.RGBA_ASTC_12x10_Format=37820,g.RGBA_ASTC_12x12_Format=37821,g.LoopOnce=2200,g.LoopRepeat=2201,g.LoopPingPong=2202,g.InterpolateDiscrete=2300,g.InterpolateLinear=2301,g.InterpolateSmooth=2302,g.ZeroCurvatureEnding=2400,g.ZeroSlopeEnding=2401,g.WrapAroundEnding=2402,g.TrianglesDrawMode=0,g.TriangleStripDrawMode=1,g.TriangleFanDrawMode=2,g.LinearEncoding=3e3,g.sRGBEncoding=3001,g.GammaEncoding=3007,g.RGBEEncoding=3002,g.LogLuvEncoding=3003,g.RGBM7Encoding=3004,g.RGBM16Encoding=3005,g.RGBDEncoding=3006,g.BasicDepthPacking=3200,g.RGBADepthPacking=3201,g.TangentSpaceNormalMap=0,g.ObjectSpaceNormalMap=1,g.CubeGeometry=Qe,g.Face4=function(t,e,i,n,o,s,l){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new B(t,e,i,o,s,l)},g.LineStrip=0,g.LinePieces=1,g.MeshFaceMaterial=function(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t},g.MultiMaterial=function(t){return t===void 0&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t},g.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new ps(t,e)},g.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Hi(t)},g.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new ps(t,e)},g.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Mn(t)},g.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Mn(t)},g.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Mn(t)},g.Vertex=function(t,e,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new S(t,e,i)},g.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new et(t,e).setDynamic(!0)},g.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new yt(t,e)},g.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new ft(t,e)},g.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zt(t,e)},g.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new Yt(t,e)},g.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new re(t,e)},g.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new se(t,e)},g.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new we(t,e)},g.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Et(t,e)},g.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new ie(t,e)},g.ClosedSplineCurve3=Gl,g.SplineCurve3=Hl,g.Spline=fl,g.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new er(t)},g.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new io(t,e)},g.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new ei(new go(t.geometry),new _i({color:e!==void 0?e:16777215}))},g.WireframeHelper=function(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new ei(new fs(t.geometry),new _i({color:e!==void 0?e:16777215}))},g.XHRLoader=function(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new at(t)},g.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new xe(t)},g.GeometryUtils={merge:function(t,e,i){if(console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh){e.matrixAutoUpdate&&e.updateMatrix();var n=e.matrix;e=e.geometry}t.merge(e,n,i)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},g.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}},g.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},g.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}},g.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(g,"__esModule",{value:!0})}),THREE.Sky=function(){var g=THREE.Sky.SkyShader,ht=new THREE.ShaderMaterial({fragmentShader:g.fragmentShader,vertexShader:g.vertexShader,uniforms:THREE.UniformsUtils.clone(g.uniforms),side:THREE.BackSide});THREE.Mesh.call(this,new THREE.BoxBufferGeometry(1,1,1),ht)},THREE.Sky.prototype=Object.create(THREE.Mesh.prototype),THREE.Sky.SkyShader={uniforms:{luminance:{value:1},turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new THREE.Vector3}},vertexShader:["uniform vec3 sunPosition;","uniform float rayleigh;","uniform float turbidity;","uniform float mieCoefficient;","varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","const vec3 up = vec3( 0.0, 1.0, 0.0 );","const float e = 2.71828182845904523536028747135266249775724709369995957;","const float pi = 3.141592653589793238462643383279502884197169;","const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );","const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );","const float v = 4.0;","const vec3 K = vec3( 0.686, 0.678, 0.666 );","const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );","const float cutoffAngle = 1.6110731556870734;","const float steepness = 1.5;","const float EE = 1000.0;","float sunIntensity( float zenithAngleCos ) {"," zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );"," return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );","}","vec3 totalMie( float T ) {"," float c = ( 0.2 * T ) * 10E-18;"," return 0.434 * c * MieConst;","}","void main() {"," vec4 worldPosition = modelMatrix * vec4( position, 1.0 );"," vWorldPosition = worldPosition.xyz;"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );"," gl_Position.z = gl_Position.w;"," vSunDirection = normalize( sunPosition );"," vSunE = sunIntensity( dot( vSunDirection, up ) );"," vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );"," float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );"," vBetaR = totalRayleigh * rayleighCoefficient;"," vBetaM = totalMie( turbidity ) * mieCoefficient;","}"].join(`
|
|
2572
2572
|
`),fragmentShader:["varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","uniform float luminance;","uniform float mieDirectionalG;","const vec3 cameraPos = vec3( 0.0, 1.0, 0.0 );","const float pi = 3.141592653589793238462643383279502884197169;","const float n = 1.0003;","const float N = 2.545E25;","const float rayleighZenithLength = 8.4E3;","const float mieZenithLength = 1.25E3;","const vec3 up = vec3( 0.0, 1.0, 0.0 );","const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;","const float THREE_OVER_SIXTEENPI = 0.05968310365946075;","const float ONE_OVER_FOURPI = 0.07957747154594767;","float rayleighPhase( float cosTheta ) {"," return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) );","}","float hgPhase( float cosTheta, float g ) {"," float g2 = pow( g, 2.0 );"," float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 );"," return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse );","}","const float A = 0.15;","const float B = 0.50;","const float C = 0.10;","const float D = 0.20;","const float E = 0.02;","const float F = 0.30;","const float whiteScale = 1.0748724675633854;","vec3 Uncharted2Tonemap( vec3 x ) {"," return ( ( x * ( A * x + C * B ) + D * E ) / ( x * ( A * x + B ) + D * F ) ) - E / F;","}","void main() {"," float zenithAngle = acos( max( 0.0, dot( up, normalize( vWorldPosition - cameraPos ) ) ) );"," float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) );"," float sR = rayleighZenithLength * inverse;"," float sM = mieZenithLength * inverse;"," vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) );"," float cosTheta = dot( normalize( vWorldPosition - cameraPos ), vSunDirection );"," float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 );"," vec3 betaRTheta = vBetaR * rPhase;"," float mPhase = hgPhase( cosTheta, mieDirectionalG );"," vec3 betaMTheta = vBetaM * mPhase;"," vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) );"," Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) );"," vec3 direction = normalize( vWorldPosition - cameraPos );"," float theta = acos( direction.y ); // elevation --> y-axis, [-pi/2, pi/2]"," float phi = atan( direction.z, direction.x ); // azimuth --> x-axis [-pi/2, pi/2]"," vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 );"," vec3 L0 = vec3( 0.1 ) * Fex;"," float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta );"," L0 += ( vSunE * 19000.0 * Fex ) * sundisk;"," vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 );"," vec3 curr = Uncharted2Tonemap( ( log2( 2.0 / pow( luminance, 4.0 ) ) ) * texColor );"," vec3 color = curr * whiteScale;"," vec3 retColor = pow( color, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) );"," gl_FragColor = vec4( retColor, 1.0 );","}"].join(`
|
|
2573
|
-
`)},function(
|
|
2573
|
+
`)},function(g){typeof module>"u"?window.charming=g:module.exports=g}(function(g,ht){ht=ht||{};var M=ht.tagName||"span",_t=ht.classPrefix!=null?ht.classPrefix:"char",mt=1,S=function(Mt){for(var qt=Mt.parentNode,nt=Mt.nodeValue,Tt=nt.length,bt=-1;++bt<Tt;){var gt=document.createElement(M);_t&&(gt.className=_t+mt,mt++),gt.appendChild(document.createTextNode(nt[bt])),qt.insertBefore(gt,Mt)}qt.removeChild(Mt)};return function Mt(qt){for(var nt=[].slice.call(qt.childNodes),Tt=nt.length,bt=-1;++bt<Tt;)Mt(nt[bt]);qt.nodeType===Node.TEXT_NODE&&S(qt)}(g),g});class ic{constructor(ht,M=[]){mars3d?(this.map=ht,this.tilesetLayer,this.modelArr=M,this.bimObliquePhotographyId=[],this.editDate={id:null}):console.error("未引入指定插件")}pushModel(ht){this.modelArr.push(ht)}add(ht,M){const _t=new Map([["click",mars3d.EventType.click]]);return new Promise((mt,S)=>{let Mt,qt,nt,Tt,bt,gt,Nt,Ht,Ct;if(typeof ht!="object"){let Z=this.query(ht);Z||S("缺少树结构");let{id:_,bimModelExcavationDetails:y,bimModel:B}=Z;Mt=_,qt=B.modelType,nt=B.tender,Tt=B.releasedDistance,bt=B.modelName,gt=B.isDynamicReleased,Nt={bimModelExcavationDetails:y},Ht=Z.url,Ct=B.modelColor}else Mt=ht.modelId,qt=ht.modelType,nt=ht.tender,Tt=ht.releasedDistance,bt=ht.modelTitle,gt=ht.permission,Nt=ht.customize,Ht=ht.url,Ct=ht.color;let st=this.map.getLayer(ht,"modelId");if(st)return mt(st),!1;if(Ht.indexOf("tileset.json")<0)return console.error("链接不完整",bt),mt({tite:"【模型】"+bt+"数据地址有误",type:"error",id:Mt,url:Ht}),!1;new Cesium.Resource({url:Ht}).fetchJson().then(_=>{let y=null,B={enabled:!0,precise:!1},E=[];Ct&&(y={color:{conditions:[["true","rgba(255, 255, 0, 1)"]]}}),window.bimClip&&window.bimClip.activeObj[Mt]&&(Object.keys(window.bimClip.activeObj[Mt]).forEach(Y=>{let{item:z}=window.bimClip.activeObj[Mt][Y],{bimModelExcavationDetails:X}=z,{excavationDetails:et}=X;E.push({positions:JSON.parse(et).excavationDetails,id:Number(Y)})}),E.length>0&&(B.area=E)),this.tilesetLayer=new mars3d.layer.TilesetLayer({modelId:Mt,modelType:qt,tender:nt,releasedDistance:Tt,modelTitle:bt,permission:gt,customize:Nt,url:encodeURI(Ht),flat:{precise:!1},skipLevelOfDetail:!0,loadSiblings:!0,cullRequestsWhileMoving:!0,cullRequestsWhileMovingMultiplier:10,preferLeaves:!0,progressiveResolutionHeightFraction:.5,dynamicScreenSpaceError:!0,preloadWhenHidden:!1,style:y,clip:B,cacheBytes:1073741824*2,maximumCacheOverflowBytes:2147483648*2}),this.tilesetLayer.bindPopup(Y=>{if(Y.graphic){const z=Y.graphic.attr;let X=null,et=null;return JSON.stringify(z)!=="{}"?(z.name&&(X=z.name.lastIndexOf("@")),X&&X>-1&&(et=z.name.slice(0,X)),z.name?` <span>${et||z.name}</span> `:` <span>${bt}</span> `):` <span>${bt}</span> `}else return` <span>${bt}</span> `}),this.tilesetLayer.readyPromise.then(Y=>{console.log("加载完成",this.tilesetLayer,Y),mt(Y);let{modelId:z}=Y.options;Y.clip.options.area.forEach(X=>{window.bimClip.activeObj[z][X.id].id==null&&(window.bimClip.activeObj[z][X.id].id=X.id)})}).catch(Y=>{mt()}),this.tilesetLayer.on("click",Y=>{Y.layer.style==null&&Y.layer.openHighlight({color:"rgba(255,0,0,1)"},!0)}),M&&Object.keys(M).forEach(Y=>{this.tilesetLayer.on(_t.get(Y),z=>{M[Y](z)})}),qt==0&&this.bimObliquePhotographyId.push(Mt),this.map.addLayer(this.tilesetLayer)}).catch(_=>{console.error("数据加载失败",bt),mt({tite:"【模型】"+bt+"数据加载失败",type:"error",id:Mt,url:Ht})})})}remove(ht){this.map.getLayer(ht,"modelId")&&(this.map.getLayer(ht,"modelId").closeHighlight(),this.map.removeLayer(this.map.getLayer(ht,"modelId")))}selected(ht,M=!0){return new Promise((_t,mt)=>{let S=this.map.getLayer(ht,"modelId");S?(M&&S.flyTo(),S.style==null&&S.openHighlight({color:"rgba(255,0,0,1)"},!0),_t(S)):this.add(ht).then(Mt=>{Mt&&(M&&Mt.flyTo(),Mt.style==null&&Mt.openHighlight({color:"rgba(255,0,0,1)"},!0),_t(Mt))})})}initial(){this.modelArr=[],this.bimObliquePhotographyId=[],this.tilesetLayer=null}query(ht){return this.modelArr.length==0?!1:this.modelArr.find(M=>M.id==ht)}postEditDate(ht){this.editDate={id:ht}}editColor(ht,M,_t="true"){let mt=this.map.getLayer(ht,"modelId");if(this.postEditDate(ht),M)mt.style={color:{conditions:[[_t,M]]}};else{let S=this.query(ht).modelColor;S?mt.style={color:{conditions:[[_t,S]]}}:mt.style=null}}editOpacity(ht,M){this.map.getLayer(ht,"modelId").opacity=M}addClip(ht){return new Promise((M,_t)=>{window.bimClip?M(bimClip.clipModelAdd(ht)):_t("挖洞工具未初始化")})}removeClip(ht){window.bimClip?window.bimClip.clipModelremoveClip(ht):console.log("挖洞工具未初始化")}}const Pl=g=>Object.prototype.toString.call(g)==="[object Object]";function Ll(){const g=Array.from(arguments);if(g.length<2)return g[0];let ht=g[0];return g.shift(),g.forEach(M=>{if(Pl(M)){Pl(ht)||(ht={});for(let _t in M)ht[_t]&&Pl(M[_t])?ht[_t]=Ll(ht[_t],M[_t]):ht[_t]=M[_t]}else M instanceof Array&&(ht instanceof Array||(ht=[]),M.forEach((_t,mt)=>{Pl(_t)?ht[mt]=Ll(ht[mt]):ht[mt]=_t}))}),ht}let Cl={};const nc=(g,ht)=>(Cl={},console.log("ZHANG",g,ht),g.difference&&g.difference.length>0&&g.difference.forEach(M=>{Ll(Cl,{[M]:g.vectorStyle[M]})}),ht.difference&&ht.difference.length>0&&ht.difference.forEach(M=>{Ll(Cl,{label:{[M]:ht.labelStyle[M]}})}),Cl);var $a=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rc(g){return g&&g.__esModule&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g}var Rl={exports:{}};/**
|
|
2574
|
+
* @license
|
|
2575
|
+
* Lodash <https://lodash.com/>
|
|
2576
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
2577
|
+
* Released under MIT license <https://lodash.com/license>
|
|
2578
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
2579
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
2580
|
+
*/Rl.exports,function(g,ht){(function(){var M,_t="4.17.21",mt=200,S="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",Mt="Expected a function",qt="Invalid `variable` option passed into `_.template`",nt="__lodash_hash_undefined__",Tt=500,bt="__lodash_placeholder__",gt=1,Nt=2,Ht=4,Ct=1,st=2,Z=1,_=2,y=4,B=8,E=16,Y=32,z=64,X=128,et=256,yt=512,ft=30,zt="...",Yt=800,re=16,se=1,we=2,Et=3,ie=1/0,ze=9007199254740991,rn=17976931348623157e292,Ut=0/0,Qe=4294967295,Ii=Qe-1,Pn=Qe>>>1,Zi=[["ary",X],["bind",Z],["bindKey",_],["curry",B],["curryRight",E],["flip",yt],["partial",Y],["partialRight",z],["rearg",et]],Oe="[object Arguments]",Pi="[object Array]",In="[object AsyncFunction]",ni="[object Boolean]",ci="[object Date]",Fi="[object DOMException]",yr="[object Error]",Lr="[object Function]",$n="[object GeneratorFunction]",Gi="[object Map]",Gn="[object Number]",on="[object Null]",Je="[object Object]",wn="[object Promise]",ho="[object Proxy]",Hn="[object RegExp]",Bi="[object Set]",A="[object String]",k="[object Symbol]",j="[object Undefined]",q="[object WeakMap]",lt="[object WeakSet]",Lt="[object ArrayBuffer]",Ft="[object DataView]",Pt="[object Float32Array]",Ae="[object Float64Array]",Se="[object Int8Array]",te="[object Int16Array]",Pe="[object Int32Array]",pi="[object Uint8Array]",Mi="[object Uint8ClampedArray]",ti="[object Uint16Array]",gi="[object Uint32Array]",Zr=/\b__p \+= '';/g,sr=/\b(__p \+=) '' \+/g,Ji=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ss=/&(?:amp|lt|gt|quot|#39);/g,Di=/[&<>"']/g,Qa=RegExp(ss.source),Cr=RegExp(Di.source),Ta=/<%-([\s\S]+?)%>/g,sn=/<%([\s\S]+?)%>/g,as=/<%=([\s\S]+?)%>/g,Lo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qn=/^\w*$/,ls=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hs=/[\\^$.*+?()[\]{}|]/g,Sa=RegExp(Hs.source),Rr=/^\s+/,Ka=/\s/,hs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ks=/\{\n\/\* \[wrapped with (.+)\] \*/,br=/,? & /,Vs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,us=/[()=,{}\[\]\/\s]/,cs=/\\(\\)?/g,Or=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ea=/\w*$/,tl=/^[-+]0x[0-9a-f]+$/i,el=/^0b[01]+$/i,Co=/^\[object .+?Constructor\]$/,Ro=/^0o[0-7]+$/i,Aa=/^(?:0|[1-9]\d*)$/,Pa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_r=/($^)/,w=/['\n\r\u2028\u2029\\]/g,b="\\ud800-\\udfff",U="\\u0300-\\u036f",N="\\ufe20-\\ufe2f",T="\\u20d0-\\u20ff",it=U+N+T,F="\\u2700-\\u27bf",ut="a-z\\xdf-\\xf6\\xf8-\\xff",xt="\\xac\\xb1\\xd7\\xf7",pt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",tt="\\u2000-\\u206f",jt=" \\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",kt="A-Z\\xc0-\\xd6\\xd8-\\xde",It="\\ufe0e\\ufe0f",Kt=xt+pt+tt+jt,Xt="['’]",Le="["+b+"]",Me="["+Kt+"]",Ye="["+it+"]",ye="\\d+",ee="["+F+"]",_e="["+ut+"]",Zt="[^"+b+Kt+ye+F+ut+kt+"]",Ke="\\ud83c[\\udffb-\\udfff]",fe="(?:"+Ye+"|"+Ke+")",ne="[^"+b+"]",de="(?:\\ud83c[\\udde6-\\uddff]){2}",an="[\\ud800-\\udbff][\\udc00-\\udfff]",Ln="["+kt+"]",vi="\\u200d",yi="(?:"+_e+"|"+Zt+")",Si="(?:"+Ln+"|"+Zt+")",Hi="(?:"+Xt+"(?:d|ll|m|re|s|t|ve))?",ki="(?:"+Xt+"(?:D|LL|M|RE|S|T|VE))?",Xi=fe+"?",qi="["+It+"]?",Ti="(?:"+vi+"(?:"+[ne,de,an].join("|")+")"+qi+Xi+")*",_i="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Li="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ei=qi+Xi+Ti,Ir="(?:"+[ee,de,an].join("|")+")"+ei,Mn="(?:"+[ne+Ye+"?",Ye,de,an,Le].join("|")+")",ps=RegExp(Xt,"g"),il=RegExp(Ye,"g"),uo=RegExp(Ke+"(?="+Ke+")|"+Mn+ei,"g"),Ws=RegExp([Ln+"?"+_e+"+"+Hi+"(?="+[Me,Ln,"$"].join("|")+")",Si+"+"+ki+"(?="+[Me,Ln+yi,"$"].join("|")+")",Ln+"?"+yi+"+"+Hi,Ln+"+"+ki,Li,_i,ye,Ir].join("|"),"g"),js=RegExp("["+vi+b+it+It+"]"),fs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xs=["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"],ds=-1,Ci={};Ci[Pt]=Ci[Ae]=Ci[Se]=Ci[te]=Ci[Pe]=Ci[pi]=Ci[Mi]=Ci[ti]=Ci[gi]=!0,Ci[Oe]=Ci[Pi]=Ci[Lt]=Ci[ni]=Ci[Ft]=Ci[ci]=Ci[yr]=Ci[Lr]=Ci[Gi]=Ci[Gn]=Ci[Je]=Ci[Hn]=Ci[Bi]=Ci[A]=Ci[q]=!1;var oi={};oi[Oe]=oi[Pi]=oi[Lt]=oi[Ft]=oi[ni]=oi[ci]=oi[Pt]=oi[Ae]=oi[Se]=oi[te]=oi[Pe]=oi[Gi]=oi[Gn]=oi[Je]=oi[Hn]=oi[Bi]=oi[A]=oi[k]=oi[pi]=oi[Mi]=oi[ti]=oi[gi]=!0,oi[yr]=oi[Lr]=oi[q]=!1;var qs={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ms={"&":"&","<":"<",">":">",'"':""","'":"'"},Ys={"&":"&","<":"<",">":">",""":'"',"'":"'"},bo={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Zs=parseFloat,gs=parseInt,vs=typeof $a=="object"&&$a&&$a.Object===Object&&$a,ys=typeof self=="object"&&self&&self.Object===Object&&self,$i=vs||ys||Function("return this")(),co=ht&&!ht.nodeType&&ht,xr=co&&!0&&g&&!g.nodeType&&g,Oo=xr&&xr.exports===co,Io=Oo&&vs.process,Tn=function(){try{var at=xr&&xr.require&&xr.require("util").types;return at||Io&&Io.binding&&Io.binding("util")}catch{}}(),nl=Tn&&Tn.isArrayBuffer,_s=Tn&&Tn.isDate,xs=Tn&&Tn.isMap,bl=Tn&&Tn.isRegExp,Ol=Tn&&Tn.isSet,La=Tn&&Tn.isTypedArray;function Kn(at,Ot,At){switch(At.length){case 0:return at.call(Ot);case 1:return at.call(Ot,At[0]);case 2:return at.call(Ot,At[0],At[1]);case 3:return at.call(Ot,At[0],At[1],At[2])}return at.apply(Ot,At)}function Ca(at,Ot,At,xe){for(var We=-1,xi=at==null?0:at.length;++We<xi;){var Yi=at[We];Ot(xe,Yi,At(Yi),at)}return xe}function zi(at,Ot){for(var At=-1,xe=at==null?0:at.length;++At<xe&&Ot(at[At],At,at)!==!1;);return at}function Do(at,Ot){for(var At=at==null?0:at.length;At--&&Ot(at[At],At,at)!==!1;);return at}function rl(at,Ot){for(var At=-1,xe=at==null?0:at.length;++At<xe;)if(!Ot(at[At],At,at))return!1;return!0}function ar(at,Ot){for(var At=-1,xe=at==null?0:at.length,We=0,xi=[];++At<xe;){var Yi=at[At];Ot(Yi,At,at)&&(xi[We++]=Yi)}return xi}function Js(at,Ot){var At=at==null?0:at.length;return!!At&&lr(at,Ot,0)>-1}function Ra(at,Ot,At){for(var xe=-1,We=at==null?0:at.length;++xe<We;)if(At(Ot,at[xe]))return!0;return!1}function bi(at,Ot){for(var At=-1,xe=at==null?0:at.length,We=Array(xe);++At<xe;)We[At]=Ot(at[At],At,at);return We}function Dr(at,Ot){for(var At=-1,xe=Ot.length,We=at.length;++At<xe;)at[We+At]=Ot[At];return at}function ba(at,Ot,At,xe){var We=-1,xi=at==null?0:at.length;for(xe&&xi&&(At=at[++We]);++We<xi;)At=Ot(At,at[We],We,at);return At}function Il(at,Ot,At,xe){var We=at==null?0:at.length;for(xe&&We&&(At=at[--We]);We--;)At=Ot(At,at[We],We,at);return At}function Jr(at,Ot){for(var At=-1,xe=at==null?0:at.length;++At<xe;)if(Ot(at[At],At,at))return!0;return!1}var zr=fo("length");function Dl(at){return at.split("")}function $s(at){return at.match(Vs)||[]}function zo(at,Ot,At){var xe;return At(at,function(We,xi,Yi){if(Ot(We,xi,Yi))return xe=xi,!1}),xe}function po(at,Ot,At,xe){for(var We=at.length,xi=At+(xe?1:-1);xe?xi--:++xi<We;)if(Ot(at[xi],xi,at))return xi;return-1}function lr(at,Ot,At){return Ot===Ot?Oa(at,Ot,At):po(at,No,At)}function Qs(at,Ot,At,xe){for(var We=At-1,xi=at.length;++We<xi;)if(xe(at[We],Ot))return We;return-1}function No(at){return at!==at}function ws(at,Ot){var At=at==null?0:at.length;return At?go(at,Ot)/At:Ut}function fo(at){return function(Ot){return Ot==null?M:Ot[at]}}function $r(at){return function(Ot){return at==null?M:at[Ot]}}function mo(at,Ot,At,xe,We){return We(at,function(xi,Yi,he){At=xe?(xe=!1,xi):Ot(At,xi,Yi,he)}),At}function zl(at,Ot){var At=at.length;for(at.sort(Ot);At--;)at[At]=at[At].value;return at}function go(at,Ot){for(var At,xe=-1,We=at.length;++xe<We;){var xi=Ot(at[xe]);xi!==M&&(At=At===M?xi:At+xi)}return At}function Qr(at,Ot){for(var At=-1,xe=Array(at);++At<at;)xe[At]=Ot(At);return xe}function Kr(at,Ot){return bi(Ot,function(At){return[At,at[At]]})}function Ms(at){return at&&at.slice(0,Ts(at)+1).replace(Rr,"")}function Sn(at){return function(Ot){return at(Ot)}}function Bo(at,Ot){return bi(Ot,function(At){return at[At]})}function Nr(at,Ot){return at.has(Ot)}function vo(at,Ot){for(var At=-1,xe=at.length;++At<xe&&lr(Ot,at[At],0)>-1;);return At}function Uo(at,Ot){for(var At=at.length;At--&&lr(Ot,at[At],0)>-1;);return At}function Br(at,Ot){for(var At=at.length,xe=0;At--;)at[At]===Ot&&++xe;return xe}var Fo=$r(qs),wr=$r(ms);function Go(at){return"\\"+bo[at]}function Ho(at,Ot){return at==null?M:at[Ot]}function hr(at){return js.test(at)}function ko(at){return fs.test(at)}function Vo(at){for(var Ot,At=[];!(Ot=at.next()).done;)At.push(Ot.value);return At}function Dn(at){var Ot=-1,At=Array(at.size);return at.forEach(function(xe,We){At[++Ot]=[We,xe]}),At}function Ks(at,Ot){return function(At){return at(Ot(At))}}function ur(at,Ot){for(var At=-1,xe=at.length,We=0,xi=[];++At<xe;){var Yi=at[At];(Yi===Ot||Yi===bt)&&(at[At]=bt,xi[We++]=At)}return xi}function Wo(at){var Ot=-1,At=Array(at.size);return at.forEach(function(xe){At[++Ot]=xe}),At}function En(at){var Ot=-1,At=Array(at.size);return at.forEach(function(xe){At[++Ot]=[xe,xe]}),At}function Oa(at,Ot,At){for(var xe=At-1,We=at.length;++xe<We;)if(at[xe]===Ot)return xe;return-1}function Ia(at,Ot,At){for(var xe=At+1;xe--;)if(at[xe]===Ot)return xe;return xe}function Mr(at){return hr(at)?Ss(at):zr(at)}function kn(at){return hr(at)?tr(at):Dl(at)}function Ts(at){for(var Ot=at.length;Ot--&&Ka.test(at.charAt(Ot)););return Ot}var Da=$r(Ys);function Ss(at){for(var Ot=uo.lastIndex=0;uo.test(at);)++Ot;return Ot}function tr(at){return at.match(uo)||[]}function ah(at){return at.match(Ws)||[]}var lh=function at(Ot){Ot=Ot==null?$i:yo.defaults($i.Object(),Ot,yo.pick($i,Xs));var At=Ot.Array,xe=Ot.Date,We=Ot.Error,xi=Ot.Function,Yi=Ot.Math,he=Ot.Object,zn=Ot.RegExp,Es=Ot.String,Vn=Ot.TypeError,mn=At.prototype,Nl=xi.prototype,Ur=he.prototype,_o=Ot["__core-js_shared__"],Wn=Nl.toString,ai=Ur.hasOwnProperty,jn=0,cr=function(){var r=/[^.]+$/.exec(_o&&_o.keys&&_o.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Xn=Ur.toString,Fr=Wn.call(he),Tr=$i._,to=zn("^"+Wn.call(ai).replace(Hs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qn=Oo?Ot.Buffer:M,Nn=Ot.Symbol,Ui=Ot.Uint8Array,ta=qn?qn.allocUnsafe:M,Gr=Ks(he.getPrototypeOf,he),ea=he.create,ia=Ur.propertyIsEnumerable,jo=mn.splice,As=Nn?Nn.isConcatSpreadable:M,xo=Nn?Nn.iterator:M,Hr=Nn?Nn.toStringTag:M,Xo=function(){try{var r=_a(he,"defineProperty");return r({},"",{}),r}catch{}}(),za=Ot.clearTimeout!==$i.clearTimeout&&Ot.clearTimeout,Na=xe&&xe.now!==$i.Date.now&&xe.now,ol=Ot.setTimeout!==$i.setTimeout&&Ot.setTimeout,eo=Yi.ceil,qo=Yi.floor,na=he.getOwnPropertySymbols,sl=qn?qn.isBuffer:M,Ba=Ot.isFinite,al=mn.join,Bl=Ks(he.keys,he),Qi=Yi.max,An=Yi.min,ra=xe.now,ll=Ot.parseInt,Ua=Yi.random,Ps=mn.reverse,oa=_a(Ot,"DataView"),Yo=_a(Ot,"Map"),sa=_a(Ot,"Promise"),Zo=_a(Ot,"Set"),ln=_a(Ot,"WeakMap"),Ls=_a(he,"create"),aa=ln&&new ln,wo={},Fa=xa(oa),hl=xa(Yo),ul=xa(sa),cl=xa(Zo),Ul=xa(ln),la=Nn?Nn.prototype:M,Jo=la?la.valueOf:M,pl=la?la.toString:M;function O(r){if(fn(r)&&!ii(r)&&!(r instanceof ri)){if(r instanceof Cn)return r;if(ai.call(r,"__wrapped__"))return eu(r)}return new Cn(r)}var Mo=function(){function r(){}return function(a){if(!nn(a))return{};if(ea)return ea(a);r.prototype=a;var u=new r;return r.prototype=M,u}}();function Cs(){}function Cn(r,a){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=M}O.templateSettings={escape:Ta,evaluate:sn,interpolate:as,variable:"",imports:{_:O}},O.prototype=Cs.prototype,O.prototype.constructor=O,Cn.prototype=Mo(Cs.prototype),Cn.prototype.constructor=Cn;function ri(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Qe,this.__views__=[]}function Rs(){var r=new ri(this.__wrapped__);return r.__actions__=Un(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Un(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Un(this.__views__),r}function Fl(){if(this.__filtered__){var r=new ri(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function bs(){var r=this.__wrapped__.value(),a=this.__dir__,u=ii(r),m=a<0,L=u?r.length:0,G=dc(0,L,this.__views__),J=G.start,rt=G.end,dt=rt-J,Gt=m?rt:J-1,Wt=this.__iteratees__,Jt=Wt.length,ve=0,De=An(dt,this.__takeCount__);if(!u||!m&&L==dt&&De==dt)return He(r,this.__actions__);var Xe=[];t:for(;dt--&&ve<De;){Gt+=a;for(var li=-1,qe=r[Gt];++li<Jt;){var di=Wt[li],wi=di.iteratee,Ar=di.type,or=wi(qe);if(Ar==we)qe=or;else if(!or){if(Ar==se)continue t;break t}}Xe[ve++]=qe}return Xe}ri.prototype=Mo(Cs.prototype),ri.prototype.constructor=ri;function pr(r){var a=-1,u=r==null?0:r.length;for(this.clear();++a<u;){var m=r[a];this.set(m[0],m[1])}}function Os(){this.__data__=Ls?Ls(null):{},this.size=0}function Is(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}function ha(r){var a=this.__data__;if(Ls){var u=a[r];return u===nt?M:u}return ai.call(a,r)?a[r]:M}function Ga(r){var a=this.__data__;return Ls?a[r]!==M:ai.call(a,r)}function ua(r,a){var u=this.__data__;return this.size+=this.has(r)?0:1,u[r]=Ls&&a===M?nt:a,this}pr.prototype.clear=Os,pr.prototype.delete=Is,pr.prototype.get=ha,pr.prototype.has=Ga,pr.prototype.set=ua;function Yn(r){var a=-1,u=r==null?0:r.length;for(this.clear();++a<u;){var m=r[a];this.set(m[0],m[1])}}function ca(){this.__data__=[],this.size=0}function io(r){var a=this.__data__,u=da(a,r);if(u<0)return!1;var m=a.length-1;return u==m?a.pop():jo.call(a,u,1),--this.size,!0}function pa(r){var a=this.__data__,u=da(a,r);return u<0?M:a[u][1]}function fa(r){return da(this.__data__,r)>-1}function no(r,a){var u=this.__data__,m=da(u,r);return m<0?(++this.size,u.push([r,a])):u[m][1]=a,this}Yn.prototype.clear=ca,Yn.prototype.delete=io,Yn.prototype.get=pa,Yn.prototype.has=fa,Yn.prototype.set=no;function er(r){var a=-1,u=r==null?0:r.length;for(this.clear();++a<u;){var m=r[a];this.set(m[0],m[1])}}function Gl(){this.size=0,this.__data__={hash:new pr,map:new(Yo||Yn),string:new pr}}function Hl(r){var a=$l(this,r).delete(r);return this.size-=a?1:0,a}function fl(r){return $l(this,r).get(r)}function $e(r){return $l(this,r).has(r)}function To(r,a){var u=$l(this,r),m=u.size;return u.set(r,a),this.size+=u.size==m?0:1,this}er.prototype.clear=Gl,er.prototype.delete=Hl,er.prototype.get=fl,er.prototype.has=$e,er.prototype.set=To;function $o(r){var a=-1,u=r==null?0:r.length;for(this.__data__=new er;++a<u;)this.add(r[a])}function hi(r){return this.__data__.set(r,nt),this}function _n(r){return this.__data__.has(r)}$o.prototype.add=$o.prototype.push=hi,$o.prototype.has=_n;function Sr(r){var a=this.__data__=new Yn(r);this.size=a.size}function Re(){this.__data__=new Yn,this.size=0}function kr(r){var a=this.__data__,u=a.delete(r);return this.size=a.size,u}function hh(r){return this.__data__.get(r)}function uh(r){return this.__data__.has(r)}function ch(r,a){var u=this.__data__;if(u instanceof Yn){var m=u.__data__;if(!Yo||m.length<mt-1)return m.push([r,a]),this.size=++u.size,this;u=this.__data__=new er(m)}return u.set(r,a),this.size=u.size,this}Sr.prototype.clear=Re,Sr.prototype.delete=kr,Sr.prototype.get=hh,Sr.prototype.has=uh,Sr.prototype.set=ch;function kl(r,a){var u=ii(r),m=!u&&wa(r),L=!u&&!m&&Gs(r),G=!u&&!m&&!L&&Za(r),J=u||m||L||G,rt=J?Qr(r.length,Es):[],dt=rt.length;for(var Gt in r)(a||ai.call(r,Gt))&&!(J&&(Gt=="length"||L&&(Gt=="offset"||Gt=="parent")||G&&(Gt=="buffer"||Gt=="byteLength"||Gt=="byteOffset")||is(Gt,dt)))&&rt.push(Gt);return rt}function dl(r){var a=r.length;return a?r[$t(0,a-1)]:M}function ph(r,a){return Ql(Un(r),So(a,0,r.length))}function Vl(r){return Ql(Un(r))}function Ha(r,a,u){(u!==M&&!ao(r[a],u)||u===M&&!(a in r))&&ro(r,a,u)}function Ds(r,a,u){var m=r[a];(!(ai.call(r,a)&&ao(m,u))||u===M&&!(a in r))&&ro(r,a,u)}function da(r,a){for(var u=r.length;u--;)if(ao(r[u][0],a))return u;return-1}function Wl(r,a,u,m){return Ki(r,function(L,G,J){a(m,L,u(L),J)}),m}function ml(r,a){return r&&gn(a,On(a),r)}function gl(r,a){return r&&gn(a,gr(a),r)}function ro(r,a,u){a=="__proto__"&&Xo?Xo(r,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):r[a]=u}function vl(r,a){for(var u=-1,m=a.length,L=At(m),G=r==null;++u<m;)L[u]=G?M:Lh(r,a[u]);return L}function So(r,a,u){return r===r&&(u!==M&&(r=r<=u?r:u),a!==M&&(r=r>=a?r:a)),r}function ir(r,a,u,m,L,G){var J,rt=a>,dt=a&Nt,Gt=a&Ht;if(u&&(J=L?u(r,m,L,G):u(r)),J!==M)return J;if(!nn(r))return r;var Wt=ii(r);if(Wt){if(J=gc(r),!rt)return Un(r,J)}else{var Jt=Jn(r),ve=Jt==Lr||Jt==$n;if(Gs(r))return oo(r,rt);if(Jt==Je||Jt==Oe||ve&&!L){if(J=dt||ve?{}:Xh(r),!rt)return dt?Yl(r,gl(J,r)):jr(r,ml(J,r))}else{if(!oi[Jt])return L?r:{};J=vc(r,Jt,rt)}}G||(G=new Sr);var De=G.get(r);if(De)return De;G.set(r,J),wu(r)?r.forEach(function(qe){J.add(ir(qe,a,u,qe,r,G))}):_u(r)&&r.forEach(function(qe,di){J.set(di,ir(qe,a,u,di,r,G))});var Xe=Gt?dt?dh:fh:dt?gr:On,li=Wt?M:Xe(r);return zi(li||r,function(qe,di){li&&(di=qe,qe=r[di]),Ds(J,di,ir(qe,a,u,di,r,G))}),J}function zs(r){var a=On(r);return function(u){return jl(u,r,a)}}function jl(r,a,u){var m=u.length;if(r==null)return!m;for(r=he(r);m--;){var L=u[m],G=a[L],J=r[L];if(J===M&&!(L in r)||!G(J))return!1}return!0}function Vr(r,a,u){if(typeof r!="function")throw new Vn(Mt);return El(function(){r.apply(M,u)},a)}function ma(r,a,u,m){var L=-1,G=Js,J=!0,rt=r.length,dt=[],Gt=a.length;if(!rt)return dt;u&&(a=bi(a,Sn(u))),m?(G=Ra,J=!1):a.length>=mt&&(G=Nr,J=!1,a=new $o(a));t:for(;++L<rt;){var Wt=r[L],Jt=u==null?Wt:u(Wt);if(Wt=m||Wt!==0?Wt:0,J&&Jt===Jt){for(var ve=Gt;ve--;)if(a[ve]===Jt)continue t;dt.push(Wt)}else G(a,Jt,m)||dt.push(Wt)}return dt}var Ki=H(dr),Xl=H(Va,!0);function Rn(r,a){var u=!0;return Ki(r,function(m,L,G){return u=!!a(m,L,G),u}),u}function Wr(r,a,u){for(var m=-1,L=r.length;++m<L;){var G=r[m],J=a(G);if(J!=null&&(rt===M?J===J&&!Er(J):u(J,rt)))var rt=J,dt=G}return dt}function Bn(r,a,u,m){var L=r.length;for(u=si(u),u<0&&(u=-u>L?0:L+u),m=m===M||m>L?L:si(m),m<0&&(m+=L),m=u>m?0:Tu(m);u<m;)r[u++]=a;return r}function fr(r,a){var u=[];return Ki(r,function(m,L,G){a(m,L,G)&&u.push(m)}),u}function hn(r,a,u,m,L){var G=-1,J=r.length;for(u||(u=_c),L||(L=[]);++G<J;){var rt=r[G];a>0&&u(rt)?a>1?hn(rt,a-1,u,m,L):Dr(L,rt):m||(L[L.length]=rt)}return L}var ga=K(),ka=K(!0);function dr(r,a){return r&&ga(r,a,On)}function Va(r,a){return r&&ka(r,a,On)}function Qo(r,a){return ar(a,function(u){return ns(r[u])})}function Eo(r,a){a=Ie(a,r);for(var u=0,m=a.length;r!=null&&u<m;)r=r[Po(a[u++])];return u&&u==m?r:M}function ql(r,a,u){var m=a(r);return ii(r)?m:Dr(m,u(r))}function bn(r){return r==null?r===M?j:on:Hr&&Hr in he(r)?fc(r):Ac(r)}function Wa(r,a){return r>a}function ja(r,a){return r!=null&&ai.call(r,a)}function yl(r,a){return r!=null&&a in he(r)}function Xa(r,a,u){return r>=An(a,u)&&r<Qi(a,u)}function va(r,a,u){for(var m=u?Ra:Js,L=r[0].length,G=r.length,J=G,rt=At(G),dt=1/0,Gt=[];J--;){var Wt=r[J];J&&a&&(Wt=bi(Wt,Sn(a))),dt=An(Wt.length,dt),rt[J]=!u&&(a||L>=120&&Wt.length>=120)?new $o(J&&Wt):M}Wt=r[0];var Jt=-1,ve=rt[0];t:for(;++Jt<L&&Gt.length<dt;){var De=Wt[Jt],Xe=a?a(De):De;if(De=u||De!==0?De:0,!(ve?Nr(ve,Xe):m(Gt,Xe,u))){for(J=G;--J;){var li=rt[J];if(!(li?Nr(li,Xe):m(r[J],Xe,u)))continue t}ve&&ve.push(Xe),Gt.push(De)}}return Gt}function t(r,a,u,m){return dr(r,function(L,G,J){a(m,u(L),G,J)}),m}function e(r,a,u){a=Ie(a,r),r=Jh(r,a);var m=r==null?r:r[Po(qr(a))];return m==null?M:Kn(m,r,u)}function i(r){return fn(r)&&bn(r)==Oe}function n(r){return fn(r)&&bn(r)==Lt}function o(r){return fn(r)&&bn(r)==ci}function s(r,a,u,m,L){return r===a?!0:r==null||a==null||!fn(r)&&!fn(a)?r!==r&&a!==a:l(r,a,u,m,s,L)}function l(r,a,u,m,L,G){var J=ii(r),rt=ii(a),dt=J?Pi:Jn(r),Gt=rt?Pi:Jn(a);dt=dt==Oe?Je:dt,Gt=Gt==Oe?Je:Gt;var Wt=dt==Je,Jt=Gt==Je,ve=dt==Gt;if(ve&&Gs(r)){if(!Gs(a))return!1;J=!0,Wt=!1}if(ve&&!Wt)return G||(G=new Sr),J||Za(r)?Vh(r,a,u,m,L,G):cc(r,a,dt,u,m,L,G);if(!(u&Ct)){var De=Wt&&ai.call(r,"__wrapped__"),Xe=Jt&&ai.call(a,"__wrapped__");if(De||Xe){var li=De?r.value():r,qe=Xe?a.value():a;return G||(G=new Sr),L(li,qe,u,m,G)}}return ve?(G||(G=new Sr),pc(r,a,u,m,L,G)):!1}function h(r){return fn(r)&&Jn(r)==Gi}function c(r,a,u,m){var L=u.length,G=L,J=!m;if(r==null)return!G;for(r=he(r);L--;){var rt=u[L];if(J&&rt[2]?rt[1]!==r[rt[0]]:!(rt[0]in r))return!1}for(;++L<G;){rt=u[L];var dt=rt[0],Gt=r[dt],Wt=rt[1];if(J&&rt[2]){if(Gt===M&&!(dt in r))return!1}else{var Jt=new Sr;if(m)var ve=m(Gt,Wt,dt,r,a,Jt);if(!(ve===M?s(Wt,Gt,Ct|st,m,Jt):ve))return!1}}return!0}function p(r){if(!nn(r)||wc(r))return!1;var a=ns(r)?to:Co;return a.test(xa(r))}function f(r){return fn(r)&&bn(r)==Hn}function d(r){return fn(r)&&Jn(r)==Bi}function v(r){return fn(r)&&rh(r.length)&&!!Ci[bn(r)]}function x(r){return typeof r=="function"?r:r==null?vr:typeof r=="object"?ii(r)?ot(r[0],r[1]):W(r):Du(r)}function P(r){if(!Sl(r))return Bl(r);var a=[];for(var u in he(r))ai.call(r,u)&&u!="constructor"&&a.push(u);return a}function R(r){if(!nn(r))return Ec(r);var a=Sl(r),u=[];for(var m in r)m=="constructor"&&(a||!ai.call(r,m))||u.push(m);return u}function I(r,a){return r<a}function $(r,a){var u=-1,m=mr(r)?At(r.length):[];return Ki(r,function(L,G,J){m[++u]=a(L,G,J)}),m}function W(r){var a=gh(r);return a.length==1&&a[0][2]?Yh(a[0][0],a[0][1]):function(u){return u===r||c(u,r,a)}}function ot(r,a){return yh(r)&&qh(a)?Yh(Po(r),a):function(u){var m=Lh(u,r);return m===M&&m===a?Ch(u,r):s(a,m,Ct|st)}}function Q(r,a,u,m,L){r!==a&&ga(a,function(G,J){if(L||(L=new Sr),nn(G))wt(r,a,J,u,Q,m,L);else{var rt=m?m(xh(r,J),G,J+"",r,a,L):M;rt===M&&(rt=G),Ha(r,J,rt)}},gr)}function wt(r,a,u,m,L,G,J){var rt=xh(r,u),dt=xh(a,u),Gt=J.get(dt);if(Gt){Ha(r,u,Gt);return}var Wt=G?G(rt,dt,u+"",r,a,J):M,Jt=Wt===M;if(Jt){var ve=ii(dt),De=!ve&&Gs(dt),Xe=!ve&&!De&&Za(dt);Wt=dt,ve||De||Xe?ii(rt)?Wt=rt:vn(rt)?Wt=Un(rt):De?(Jt=!1,Wt=oo(dt,!0)):Xe?(Jt=!1,Wt=ya(dt,!0)):Wt=[]:Al(dt)||wa(dt)?(Wt=rt,wa(rt)?Wt=Su(rt):(!nn(rt)||ns(rt))&&(Wt=Xh(dt))):Jt=!1}Jt&&(J.set(dt,Wt),L(Wt,dt,m,G,J),J.delete(dt)),Ha(r,u,Wt)}function C(r,a){var u=r.length;if(u)return a+=a<0?u:0,is(a,u)?r[a]:M}function D(r,a,u){a.length?a=bi(a,function(G){return ii(G)?function(J){return Eo(J,G.length===1?G[0]:G)}:G}):a=[vr];var m=-1;a=bi(a,Sn(Ve()));var L=$(r,function(G,J,rt){var dt=bi(a,function(Gt){return Gt(G)});return{criteria:dt,index:++m,value:G}});return zl(L,function(G,J){return Ao(G,J,u)})}function ct(r,a){return Dt(r,a,function(u,m){return Ch(r,m)})}function Dt(r,a,u){for(var m=-1,L=a.length,G={};++m<L;){var J=a[m],rt=Eo(r,J);u(rt,J)&&Ze(G,Ie(J,r),rt)}return G}function Rt(r){return function(a){return Eo(a,r)}}function St(r,a,u,m){var L=m?Qs:lr,G=-1,J=a.length,rt=r;for(r===a&&(a=Un(a)),u&&(rt=bi(r,Sn(u)));++G<J;)for(var dt=0,Gt=a[G],Wt=u?u(Gt):Gt;(dt=L(rt,Wt,dt,m))>-1;)rt!==r&&jo.call(rt,dt,1),jo.call(r,dt,1);return r}function oe(r,a){for(var u=r?a.length:0,m=u-1;u--;){var L=a[u];if(u==m||L!==G){var G=L;is(L)?jo.call(r,L,1):Ai(r,L)}}return r}function $t(r,a){return r+qo(Ua()*(a-r+1))}function me(r,a,u,m){for(var L=-1,G=Qi(eo((a-r)/(u||1)),0),J=At(G);G--;)J[m?G:++L]=r,r+=u;return J}function ue(r,a){var u="";if(!r||a<1||a>ze)return u;do a%2&&(u+=r),a=qo(a/2),a&&(r+=r);while(a);return u}function Vt(r,a){return wh(Zh(r,a,vr),r+"")}function Ee(r){return dl(Ja(r))}function Be(r,a){var u=Ja(r);return Ql(u,So(a,0,u.length))}function Ze(r,a,u,m){if(!nn(r))return r;a=Ie(a,r);for(var L=-1,G=a.length,J=G-1,rt=r;rt!=null&&++L<G;){var dt=Po(a[L]),Gt=u;if(dt==="__proto__"||dt==="constructor"||dt==="prototype")return r;if(L!=J){var Wt=rt[dt];Gt=m?m(Wt,dt,rt):M,Gt===M&&(Gt=nn(Wt)?Wt:is(a[L+1])?[]:{})}Ds(rt,dt,Gt),rt=rt[dt]}return r}var un=aa?function(r,a){return aa.set(r,a),r}:vr,tn=Xo?function(r,a){return Xo(r,"toString",{configurable:!0,enumerable:!1,value:bh(a),writable:!0})}:vr;function Ri(r){return Ql(Ja(r))}function Ei(r,a,u){var m=-1,L=r.length;a<0&&(a=-a>L?0:L+a),u=u>L?L:u,u<0&&(u+=L),L=a>u?0:u-a>>>0,a>>>=0;for(var G=At(L);++m<L;)G[m]=r[m+a];return G}function Vi(r,a){var u;return Ki(r,function(m,L,G){return u=a(m,L,G),!u}),!!u}function cn(r,a,u){var m=0,L=r==null?m:r.length;if(typeof a=="number"&&a===a&&L<=Pn){for(;m<L;){var G=m+L>>>1,J=r[G];J!==null&&!Er(J)&&(u?J<=a:J<a)?m=G+1:L=G}return L}return ce(r,a,vr,u)}function ce(r,a,u,m){var L=0,G=r==null?0:r.length;if(G===0)return 0;a=u(a);for(var J=a!==a,rt=a===null,dt=Er(a),Gt=a===M;L<G;){var Wt=qo((L+G)/2),Jt=u(r[Wt]),ve=Jt!==M,De=Jt===null,Xe=Jt===Jt,li=Er(Jt);if(J)var qe=m||Xe;else Gt?qe=Xe&&(m||ve):rt?qe=Xe&&ve&&(m||!De):dt?qe=Xe&&ve&&!De&&(m||!li):De||li?qe=!1:qe=m?Jt<=a:Jt<a;qe?L=Wt+1:G=Wt}return An(G,Ii)}function Ue(r,a){for(var u=-1,m=r.length,L=0,G=[];++u<m;){var J=r[u],rt=a?a(J):J;if(!u||!ao(rt,dt)){var dt=rt;G[L++]=J===0?0:J}}return G}function vt(r){return typeof r=="number"?r:Er(r)?Ut:+r}function be(r){if(typeof r=="string")return r;if(ii(r))return bi(r,be)+"";if(Er(r))return pl?pl.call(r):"";var a=r+"";return a=="0"&&1/r==-ie?"-0":a}function Fe(r,a,u){var m=-1,L=Js,G=r.length,J=!0,rt=[],dt=rt;if(u)J=!1,L=Ra;else if(G>=mt){var Gt=a?null:Fs(r);if(Gt)return Wo(Gt);J=!1,L=Nr,dt=new $o}else dt=a?[]:rt;t:for(;++m<G;){var Wt=r[m],Jt=a?a(Wt):Wt;if(Wt=u||Wt!==0?Wt:0,J&&Jt===Jt){for(var ve=dt.length;ve--;)if(dt[ve]===Jt)continue t;a&&dt.push(Jt),rt.push(Wt)}else L(dt,Jt,u)||(dt!==rt&&dt.push(Jt),rt.push(Wt))}return rt}function Ai(r,a){return a=Ie(a,r),r=Jh(r,a),r==null||delete r[Po(qr(a))]}function pe(r,a,u,m){return Ze(r,a,u(Eo(r,a)),m)}function Ce(r,a,u,m){for(var L=r.length,G=m?L:-1;(m?G--:++G<L)&&a(r[G],G,r););return u?Ei(r,m?0:G,m?G+1:L):Ei(r,m?G+1:0,m?L:G)}function He(r,a){var u=r;return u instanceof ri&&(u=u.value()),ba(a,function(m,L){return L.func.apply(L.thisArg,Dr([m],L.args))},u)}function fi(r,a,u){var m=r.length;if(m<2)return m?Fe(r[0]):[];for(var L=-1,G=At(m);++L<m;)for(var J=r[L],rt=-1;++rt<m;)rt!=L&&(G[L]=ma(G[L]||J,r[rt],a,u));return Fe(hn(G,1),a,u)}function ui(r,a,u){for(var m=-1,L=r.length,G=a.length,J={};++m<L;){var rt=m<G?a[m]:M;u(J,r[m],rt)}return J}function Bt(r){return vn(r)?r:[]}function Ge(r){return typeof r=="function"?r:vr}function Ie(r,a){return ii(r)?r:yh(r,a)?[r]:tu(Oi(r))}var je=Vt;function en(r,a,u){var m=r.length;return u=u===M?m:u,!a&&u>=m?r:Ei(r,a,u)}var pn=za||function(r){return $i.clearTimeout(r)};function oo(r,a){if(a)return r.slice();var u=r.length,m=ta?ta(u):new r.constructor(u);return r.copy(m),m}function Ns(r){var a=new r.constructor(r.byteLength);return new Ui(a).set(new Ui(r)),a}function _l(r,a){var u=a?Ns(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.byteLength)}function Bs(r){var a=new r.constructor(r.source,Ea.exec(r));return a.lastIndex=r.lastIndex,a}function Ko(r){return Jo?he(Jo.call(r)):{}}function ya(r,a){var u=a?Ns(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.length)}function ts(r,a){if(r!==a){var u=r!==M,m=r===null,L=r===r,G=Er(r),J=a!==M,rt=a===null,dt=a===a,Gt=Er(a);if(!rt&&!Gt&&!G&&r>a||G&&J&&dt&&!rt&&!Gt||m&&J&&dt||!u&&dt||!L)return 1;if(!m&&!G&&!Gt&&r<a||Gt&&u&&L&&!m&&!G||rt&&u&&L||!J&&L||!dt)return-1}return 0}function Ao(r,a,u){for(var m=-1,L=r.criteria,G=a.criteria,J=L.length,rt=u.length;++m<J;){var dt=ts(L[m],G[m]);if(dt){if(m>=rt)return dt;var Gt=u[m];return dt*(Gt=="desc"?-1:1)}}return r.index-a.index}function xl(r,a,u,m){for(var L=-1,G=r.length,J=u.length,rt=-1,dt=a.length,Gt=Qi(G-J,0),Wt=At(dt+Gt),Jt=!m;++rt<dt;)Wt[rt]=a[rt];for(;++L<J;)(Jt||L<G)&&(Wt[u[L]]=r[L]);for(;Gt--;)Wt[rt++]=r[L++];return Wt}function wl(r,a,u,m){for(var L=-1,G=r.length,J=-1,rt=u.length,dt=-1,Gt=a.length,Wt=Qi(G-rt,0),Jt=At(Wt+Gt),ve=!m;++L<Wt;)Jt[L]=r[L];for(var De=L;++dt<Gt;)Jt[De+dt]=a[dt];for(;++J<rt;)(ve||L<G)&&(Jt[De+u[J]]=r[L++]);return Jt}function Un(r,a){var u=-1,m=r.length;for(a||(a=At(m));++u<m;)a[u]=r[u];return a}function gn(r,a,u,m){var L=!u;u||(u={});for(var G=-1,J=a.length;++G<J;){var rt=a[G],dt=m?m(u[rt],r[rt],rt,u,r):M;dt===M&&(dt=r[rt]),L?ro(u,rt,dt):Ds(u,rt,dt)}return u}function jr(r,a){return gn(r,vh(r),a)}function Yl(r,a){return gn(r,Wh(r),a)}function Us(r,a){return function(u,m){var L=ii(u)?Ca:Wl,G=a?a():{};return L(u,r,Ve(m,2),G)}}function so(r){return Vt(function(a,u){var m=-1,L=u.length,G=L>1?u[L-1]:M,J=L>2?u[2]:M;for(G=r.length>3&&typeof G=="function"?(L--,G):M,J&&rr(u[0],u[1],J)&&(G=L<3?M:G,L=1),a=he(a);++m<L;){var rt=u[m];rt&&r(a,rt,m,G)}return a})}function H(r,a){return function(u,m){if(u==null)return u;if(!mr(u))return r(u,m);for(var L=u.length,G=a?L:-1,J=he(u);(a?G--:++G<L)&&m(J[G],G,J)!==!1;);return u}}function K(r){return function(a,u,m){for(var L=-1,G=he(a),J=m(a),rt=J.length;rt--;){var dt=J[r?rt:++L];if(u(G[dt],dt,G)===!1)break}return a}}function V(r,a,u){var m=a&Z,L=Te(r);function G(){var J=this&&this!==$i&&this instanceof G?L:r;return J.apply(m?u:this,arguments)}return G}function ae(r){return function(a){a=Oi(a);var u=hr(a)?kn(a):M,m=u?u[0]:a.charAt(0),L=u?en(u,1).join(""):a.slice(1);return m[r]()+L}}function ge(r){return function(a){return ba(Ou(bu(a).replace(ps,"")),r,"")}}function Te(r){return function(){var a=arguments;switch(a.length){case 0:return new r;case 1:return new r(a[0]);case 2:return new r(a[0],a[1]);case 3:return new r(a[0],a[1],a[2]);case 4:return new r(a[0],a[1],a[2],a[3]);case 5:return new r(a[0],a[1],a[2],a[3],a[4]);case 6:return new r(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new r(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=Mo(r.prototype),m=r.apply(u,a);return nn(m)?m:u}}function le(r,a,u){var m=Te(r);function L(){for(var G=arguments.length,J=At(G),rt=G,dt=Ya(L);rt--;)J[rt]=arguments[rt];var Gt=G<3&&J[0]!==dt&&J[G-1]!==dt?[]:ur(J,dt);if(G-=Gt.length,G<u)return Tl(r,a,Ni,L.placeholder,M,J,Gt,M,M,u-G);var Wt=this&&this!==$i&&this instanceof L?m:r;return Kn(Wt,this,J)}return L}function Ne(r){return function(a,u,m){var L=he(a);if(!mr(a)){var G=Ve(u,3);a=On(a),u=function(rt){return G(L[rt],rt,L)}}var J=r(a,u,m);return J>-1?L[G?a[J]:J]:M}}function mi(r){return es(function(a){var u=a.length,m=u,L=Cn.prototype.thru;for(r&&a.reverse();m--;){var G=a[m];if(typeof G!="function")throw new Vn(Mt);if(L&&!J&&Jl(G)=="wrapper")var J=new Cn([],!0)}for(m=J?m:u;++m<u;){G=a[m];var rt=Jl(G),dt=rt=="wrapper"?mh(G):M;dt&&_h(dt[0])&&dt[1]==(X|B|Y|et)&&!dt[4].length&&dt[9]==1?J=J[Jl(dt[0])].apply(J,dt[3]):J=G.length==1&&_h(G)?J[rt]():J.thru(G)}return function(){var Gt=arguments,Wt=Gt[0];if(J&&Gt.length==1&&ii(Wt))return J.plant(Wt).value();for(var Jt=0,ve=u?a[Jt].apply(this,Gt):Wt;++Jt<u;)ve=a[Jt].call(this,ve);return ve}})}function Ni(r,a,u,m,L,G,J,rt,dt,Gt){var Wt=a&X,Jt=a&Z,ve=a&_,De=a&(B|E),Xe=a&yt,li=ve?M:Te(r);function qe(){for(var di=arguments.length,wi=At(di),Ar=di;Ar--;)wi[Ar]=arguments[Ar];if(De)var or=Ya(qe),Pr=Br(wi,or);if(m&&(wi=xl(wi,m,L,De)),G&&(wi=wl(wi,G,J,De)),di-=Pr,De&&di<Gt){var yn=ur(wi,or);return Tl(r,a,Ni,qe.placeholder,u,wi,yn,rt,dt,Gt-di)}var lo=Jt?u:this,os=ve?lo[r]:r;return di=wi.length,rt?wi=Pc(wi,rt):Xe&&di>1&&wi.reverse(),Wt&&dt<di&&(wi.length=dt),this&&this!==$i&&this instanceof qe&&(os=li||Te(os)),os.apply(lo,wi)}return qe}function Qt(r,a){return function(u,m){return t(u,r,a(m),{})}}function nr(r,a){return function(u,m){var L;if(u===M&&m===M)return a;if(u!==M&&(L=u),m!==M){if(L===M)return m;typeof u=="string"||typeof m=="string"?(u=be(u),m=be(m)):(u=vt(u),m=vt(m)),L=r(u,m)}return L}}function xn(r){return es(function(a){return a=bi(a,Sn(Ve())),Vt(function(u){var m=this;return r(a,function(L){return Kn(L,m,u)})})})}function Wi(r,a){a=a===M?" ":be(a);var u=a.length;if(u<2)return u?ue(a,r):a;var m=ue(a,eo(r/Mr(a)));return hr(a)?en(kn(m),0,r).join(""):m.slice(0,r)}function Zn(r,a,u,m){var L=a&Z,G=Te(r);function J(){for(var rt=-1,dt=arguments.length,Gt=-1,Wt=m.length,Jt=At(Wt+dt),ve=this&&this!==$i&&this instanceof J?G:r;++Gt<Wt;)Jt[Gt]=m[Gt];for(;dt--;)Jt[Gt++]=arguments[++rt];return Kn(ve,L?u:this,Jt)}return J}function Ml(r){return function(a,u,m){return m&&typeof m!="number"&&rr(a,u,m)&&(u=m=M),a=rs(a),u===M?(u=a,a=0):u=rs(u),m=m===M?a<u?1:-1:rs(m),me(a,u,m,r)}}function Xr(r){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=Yr(a),u=Yr(u)),r(a,u)}}function Tl(r,a,u,m,L,G,J,rt,dt,Gt){var Wt=a&B,Jt=Wt?J:M,ve=Wt?M:J,De=Wt?G:M,Xe=Wt?M:G;a|=Wt?Y:z,a&=~(Wt?z:Y),a&y||(a&=~(Z|_));var li=[r,a,L,De,Jt,Xe,ve,rt,dt,Gt],qe=u.apply(M,li);return _h(r)&&$h(qe,li),qe.placeholder=m,Qh(qe,r,a)}function qa(r){var a=Yi[r];return function(u,m){if(u=Yr(u),m=m==null?0:An(si(m),292),m&&Ba(u)){var L=(Oi(u)+"e").split("e"),G=a(L[0]+"e"+(+L[1]+m));return L=(Oi(G)+"e").split("e"),+(L[0]+"e"+(+L[1]-m))}return a(u)}}var Fs=Zo&&1/Wo(new Zo([,-0]))[1]==ie?function(r){return new Zo(r)}:Dh;function Zl(r){return function(a){var u=Jn(a);return u==Gi?Dn(a):u==Bi?En(a):Kr(a,r(a))}}function Fn(r,a,u,m,L,G,J,rt){var dt=a&_;if(!dt&&typeof r!="function")throw new Vn(Mt);var Gt=m?m.length:0;if(Gt||(a&=~(Y|z),m=L=M),J=J===M?J:Qi(si(J),0),rt=rt===M?rt:si(rt),Gt-=L?L.length:0,a&z){var Wt=m,Jt=L;m=L=M}var ve=dt?M:mh(r),De=[r,a,u,m,L,Wt,Jt,G,J,rt];if(ve&&Sc(De,ve),r=De[0],a=De[1],u=De[2],m=De[3],L=De[4],rt=De[9]=De[9]===M?dt?0:r.length:Qi(De[9]-Gt,0),!rt&&a&(B|E)&&(a&=~(B|E)),!a||a==Z)var Xe=V(r,a,u);else a==B||a==E?Xe=le(r,a,rt):(a==Y||a==(Z|Y))&&!L.length?Xe=Zn(r,a,u,m):Xe=Ni.apply(M,De);var li=ve?un:$h;return Qh(li(Xe,De),r,a)}function Hh(r,a,u,m){return r===M||ao(r,Ur[u])&&!ai.call(m,u)?a:r}function kh(r,a,u,m,L,G){return nn(r)&&nn(a)&&(G.set(a,r),Q(r,a,M,kh,G),G.delete(a)),r}function uc(r){return Al(r)?M:r}function Vh(r,a,u,m,L,G){var J=u&Ct,rt=r.length,dt=a.length;if(rt!=dt&&!(J&&dt>rt))return!1;var Gt=G.get(r),Wt=G.get(a);if(Gt&&Wt)return Gt==a&&Wt==r;var Jt=-1,ve=!0,De=u&st?new $o:M;for(G.set(r,a),G.set(a,r);++Jt<rt;){var Xe=r[Jt],li=a[Jt];if(m)var qe=J?m(li,Xe,Jt,a,r,G):m(Xe,li,Jt,r,a,G);if(qe!==M){if(qe)continue;ve=!1;break}if(De){if(!Jr(a,function(di,wi){if(!Nr(De,wi)&&(Xe===di||L(Xe,di,u,m,G)))return De.push(wi)})){ve=!1;break}}else if(!(Xe===li||L(Xe,li,u,m,G))){ve=!1;break}}return G.delete(r),G.delete(a),ve}function cc(r,a,u,m,L,G,J){switch(u){case Ft:if(r.byteLength!=a.byteLength||r.byteOffset!=a.byteOffset)return!1;r=r.buffer,a=a.buffer;case Lt:return!(r.byteLength!=a.byteLength||!G(new Ui(r),new Ui(a)));case ni:case ci:case Gn:return ao(+r,+a);case yr:return r.name==a.name&&r.message==a.message;case Hn:case A:return r==a+"";case Gi:var rt=Dn;case Bi:var dt=m&Ct;if(rt||(rt=Wo),r.size!=a.size&&!dt)return!1;var Gt=J.get(r);if(Gt)return Gt==a;m|=st,J.set(r,a);var Wt=Vh(rt(r),rt(a),m,L,G,J);return J.delete(r),Wt;case k:if(Jo)return Jo.call(r)==Jo.call(a)}return!1}function pc(r,a,u,m,L,G){var J=u&Ct,rt=fh(r),dt=rt.length,Gt=fh(a),Wt=Gt.length;if(dt!=Wt&&!J)return!1;for(var Jt=dt;Jt--;){var ve=rt[Jt];if(!(J?ve in a:ai.call(a,ve)))return!1}var De=G.get(r),Xe=G.get(a);if(De&&Xe)return De==a&&Xe==r;var li=!0;G.set(r,a),G.set(a,r);for(var qe=J;++Jt<dt;){ve=rt[Jt];var di=r[ve],wi=a[ve];if(m)var Ar=J?m(wi,di,ve,a,r,G):m(di,wi,ve,r,a,G);if(!(Ar===M?di===wi||L(di,wi,u,m,G):Ar)){li=!1;break}qe||(qe=ve=="constructor")}if(li&&!qe){var or=r.constructor,Pr=a.constructor;or!=Pr&&"constructor"in r&&"constructor"in a&&!(typeof or=="function"&&or instanceof or&&typeof Pr=="function"&&Pr instanceof Pr)&&(li=!1)}return G.delete(r),G.delete(a),li}function es(r){return wh(Zh(r,M,ru),r+"")}function fh(r){return ql(r,On,vh)}function dh(r){return ql(r,gr,Wh)}var mh=aa?function(r){return aa.get(r)}:Dh;function Jl(r){for(var a=r.name+"",u=wo[a],m=ai.call(wo,a)?u.length:0;m--;){var L=u[m],G=L.func;if(G==null||G==r)return L.name}return a}function Ya(r){var a=ai.call(O,"placeholder")?O:r;return a.placeholder}function Ve(){var r=O.iteratee||Oh;return r=r===Oh?x:r,arguments.length?r(arguments[0],arguments[1]):r}function $l(r,a){var u=r.__data__;return xc(a)?u[typeof a=="string"?"string":"hash"]:u.map}function gh(r){for(var a=On(r),u=a.length;u--;){var m=a[u],L=r[m];a[u]=[m,L,qh(L)]}return a}function _a(r,a){var u=Ho(r,a);return p(u)?u:M}function fc(r){var a=ai.call(r,Hr),u=r[Hr];try{r[Hr]=M;var m=!0}catch{}var L=Xn.call(r);return m&&(a?r[Hr]=u:delete r[Hr]),L}var vh=na?function(r){return r==null?[]:(r=he(r),ar(na(r),function(a){return ia.call(r,a)}))}:zh,Wh=na?function(r){for(var a=[];r;)Dr(a,vh(r)),r=Gr(r);return a}:zh,Jn=bn;(oa&&Jn(new oa(new ArrayBuffer(1)))!=Ft||Yo&&Jn(new Yo)!=Gi||sa&&Jn(sa.resolve())!=wn||Zo&&Jn(new Zo)!=Bi||ln&&Jn(new ln)!=q)&&(Jn=function(r){var a=bn(r),u=a==Je?r.constructor:M,m=u?xa(u):"";if(m)switch(m){case Fa:return Ft;case hl:return Gi;case ul:return wn;case cl:return Bi;case Ul:return q}return a});function dc(r,a,u){for(var m=-1,L=u.length;++m<L;){var G=u[m],J=G.size;switch(G.type){case"drop":r+=J;break;case"dropRight":a-=J;break;case"take":a=An(a,r+J);break;case"takeRight":r=Qi(r,a-J);break}}return{start:r,end:a}}function mc(r){var a=r.match(ks);return a?a[1].split(br):[]}function jh(r,a,u){a=Ie(a,r);for(var m=-1,L=a.length,G=!1;++m<L;){var J=Po(a[m]);if(!(G=r!=null&&u(r,J)))break;r=r[J]}return G||++m!=L?G:(L=r==null?0:r.length,!!L&&rh(L)&&is(J,L)&&(ii(r)||wa(r)))}function gc(r){var a=r.length,u=new r.constructor(a);return a&&typeof r[0]=="string"&&ai.call(r,"index")&&(u.index=r.index,u.input=r.input),u}function Xh(r){return typeof r.constructor=="function"&&!Sl(r)?Mo(Gr(r)):{}}function vc(r,a,u){var m=r.constructor;switch(a){case Lt:return Ns(r);case ni:case ci:return new m(+r);case Ft:return _l(r,u);case Pt:case Ae:case Se:case te:case Pe:case pi:case Mi:case ti:case gi:return ya(r,u);case Gi:return new m;case Gn:case A:return new m(r);case Hn:return Bs(r);case Bi:return new m;case k:return Ko(r)}}function yc(r,a){var u=a.length;if(!u)return r;var m=u-1;return a[m]=(u>1?"& ":"")+a[m],a=a.join(u>2?", ":" "),r.replace(hs,`{
|
|
2581
|
+
/* [wrapped with `+a+`] */
|
|
2582
|
+
`)}function _c(r){return ii(r)||wa(r)||!!(As&&r&&r[As])}function is(r,a){var u=typeof r;return a=a??ze,!!a&&(u=="number"||u!="symbol"&&Aa.test(r))&&r>-1&&r%1==0&&r<a}function rr(r,a,u){if(!nn(u))return!1;var m=typeof a;return(m=="number"?mr(u)&&is(a,u.length):m=="string"&&a in u)?ao(u[a],r):!1}function yh(r,a){if(ii(r))return!1;var u=typeof r;return u=="number"||u=="symbol"||u=="boolean"||r==null||Er(r)?!0:Qn.test(r)||!Lo.test(r)||a!=null&&r in he(a)}function xc(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}function _h(r){var a=Jl(r),u=O[a];if(typeof u!="function"||!(a in ri.prototype))return!1;if(r===u)return!0;var m=mh(u);return!!m&&r===m[0]}function wc(r){return!!cr&&cr in r}var Mc=_o?ns:Nh;function Sl(r){var a=r&&r.constructor,u=typeof a=="function"&&a.prototype||Ur;return r===u}function qh(r){return r===r&&!nn(r)}function Yh(r,a){return function(u){return u==null?!1:u[r]===a&&(a!==M||r in he(u))}}function Tc(r){var a=ih(r,function(m){return u.size===Tt&&u.clear(),m}),u=a.cache;return a}function Sc(r,a){var u=r[1],m=a[1],L=u|m,G=L<(Z|_|X),J=m==X&&u==B||m==X&&u==et&&r[7].length<=a[8]||m==(X|et)&&a[7].length<=a[8]&&u==B;if(!(G||J))return r;m&Z&&(r[2]=a[2],L|=u&Z?0:y);var rt=a[3];if(rt){var dt=r[3];r[3]=dt?xl(dt,rt,a[4]):rt,r[4]=dt?ur(r[3],bt):a[4]}return rt=a[5],rt&&(dt=r[5],r[5]=dt?wl(dt,rt,a[6]):rt,r[6]=dt?ur(r[5],bt):a[6]),rt=a[7],rt&&(r[7]=rt),m&X&&(r[8]=r[8]==null?a[8]:An(r[8],a[8])),r[9]==null&&(r[9]=a[9]),r[0]=a[0],r[1]=L,r}function Ec(r){var a=[];if(r!=null)for(var u in he(r))a.push(u);return a}function Ac(r){return Xn.call(r)}function Zh(r,a,u){return a=Qi(a===M?r.length-1:a,0),function(){for(var m=arguments,L=-1,G=Qi(m.length-a,0),J=At(G);++L<G;)J[L]=m[a+L];L=-1;for(var rt=At(a+1);++L<a;)rt[L]=m[L];return rt[a]=u(J),Kn(r,this,rt)}}function Jh(r,a){return a.length<2?r:Eo(r,Ei(a,0,-1))}function Pc(r,a){for(var u=r.length,m=An(a.length,u),L=Un(r);m--;){var G=a[m];r[m]=is(G,u)?L[G]:M}return r}function xh(r,a){if(!(a==="constructor"&&typeof r[a]=="function")&&a!="__proto__")return r[a]}var $h=Kh(un),El=ol||function(r,a){return $i.setTimeout(r,a)},wh=Kh(tn);function Qh(r,a,u){var m=a+"";return wh(r,yc(m,Lc(mc(m),u)))}function Kh(r){var a=0,u=0;return function(){var m=ra(),L=re-(m-u);if(u=m,L>0){if(++a>=Yt)return arguments[0]}else a=0;return r.apply(M,arguments)}}function Ql(r,a){var u=-1,m=r.length,L=m-1;for(a=a===M?m:a;++u<a;){var G=$t(u,L),J=r[G];r[G]=r[u],r[u]=J}return r.length=a,r}var tu=Tc(function(r){var a=[];return r.charCodeAt(0)===46&&a.push(""),r.replace(ls,function(u,m,L,G){a.push(L?G.replace(cs,"$1"):m||u)}),a});function Po(r){if(typeof r=="string"||Er(r))return r;var a=r+"";return a=="0"&&1/r==-ie?"-0":a}function xa(r){if(r!=null){try{return Wn.call(r)}catch{}try{return r+""}catch{}}return""}function Lc(r,a){return zi(Zi,function(u){var m="_."+u[0];a&u[1]&&!Js(r,m)&&r.push(m)}),r.sort()}function eu(r){if(r instanceof ri)return r.clone();var a=new Cn(r.__wrapped__,r.__chain__);return a.__actions__=Un(r.__actions__),a.__index__=r.__index__,a.__values__=r.__values__,a}function Cc(r,a,u){(u?rr(r,a,u):a===M)?a=1:a=Qi(si(a),0);var m=r==null?0:r.length;if(!m||a<1)return[];for(var L=0,G=0,J=At(eo(m/a));L<m;)J[G++]=Ei(r,L,L+=a);return J}function Rc(r){for(var a=-1,u=r==null?0:r.length,m=0,L=[];++a<u;){var G=r[a];G&&(L[m++]=G)}return L}function bc(){var r=arguments.length;if(!r)return[];for(var a=At(r-1),u=arguments[0],m=r;m--;)a[m-1]=arguments[m];return Dr(ii(u)?Un(u):[u],hn(a,1))}var Oc=Vt(function(r,a){return vn(r)?ma(r,hn(a,1,vn,!0)):[]}),Ic=Vt(function(r,a){var u=qr(a);return vn(u)&&(u=M),vn(r)?ma(r,hn(a,1,vn,!0),Ve(u,2)):[]}),Dc=Vt(function(r,a){var u=qr(a);return vn(u)&&(u=M),vn(r)?ma(r,hn(a,1,vn,!0),M,u):[]});function zc(r,a,u){var m=r==null?0:r.length;return m?(a=u||a===M?1:si(a),Ei(r,a<0?0:a,m)):[]}function Nc(r,a,u){var m=r==null?0:r.length;return m?(a=u||a===M?1:si(a),a=m-a,Ei(r,0,a<0?0:a)):[]}function Bc(r,a){return r&&r.length?Ce(r,Ve(a,3),!0,!0):[]}function Uc(r,a){return r&&r.length?Ce(r,Ve(a,3),!0):[]}function Fc(r,a,u,m){var L=r==null?0:r.length;return L?(u&&typeof u!="number"&&rr(r,a,u)&&(u=0,m=L),Bn(r,a,u,m)):[]}function iu(r,a,u){var m=r==null?0:r.length;if(!m)return-1;var L=u==null?0:si(u);return L<0&&(L=Qi(m+L,0)),po(r,Ve(a,3),L)}function nu(r,a,u){var m=r==null?0:r.length;if(!m)return-1;var L=m-1;return u!==M&&(L=si(u),L=u<0?Qi(m+L,0):An(L,m-1)),po(r,Ve(a,3),L,!0)}function ru(r){var a=r==null?0:r.length;return a?hn(r,1):[]}function Gc(r){var a=r==null?0:r.length;return a?hn(r,ie):[]}function Hc(r,a){var u=r==null?0:r.length;return u?(a=a===M?1:si(a),hn(r,a)):[]}function kc(r){for(var a=-1,u=r==null?0:r.length,m={};++a<u;){var L=r[a];m[L[0]]=L[1]}return m}function ou(r){return r&&r.length?r[0]:M}function Vc(r,a,u){var m=r==null?0:r.length;if(!m)return-1;var L=u==null?0:si(u);return L<0&&(L=Qi(m+L,0)),lr(r,a,L)}function Wc(r){var a=r==null?0:r.length;return a?Ei(r,0,-1):[]}var jc=Vt(function(r){var a=bi(r,Bt);return a.length&&a[0]===r[0]?va(a):[]}),Xc=Vt(function(r){var a=qr(r),u=bi(r,Bt);return a===qr(u)?a=M:u.pop(),u.length&&u[0]===r[0]?va(u,Ve(a,2)):[]}),qc=Vt(function(r){var a=qr(r),u=bi(r,Bt);return a=typeof a=="function"?a:M,a&&u.pop(),u.length&&u[0]===r[0]?va(u,M,a):[]});function Yc(r,a){return r==null?"":al.call(r,a)}function qr(r){var a=r==null?0:r.length;return a?r[a-1]:M}function Zc(r,a,u){var m=r==null?0:r.length;if(!m)return-1;var L=m;return u!==M&&(L=si(u),L=L<0?Qi(m+L,0):An(L,m-1)),a===a?Ia(r,a,L):po(r,No,L,!0)}function Jc(r,a){return r&&r.length?C(r,si(a)):M}var $c=Vt(su);function su(r,a){return r&&r.length&&a&&a.length?St(r,a):r}function Qc(r,a,u){return r&&r.length&&a&&a.length?St(r,a,Ve(u,2)):r}function Kc(r,a,u){return r&&r.length&&a&&a.length?St(r,a,M,u):r}var tp=es(function(r,a){var u=r==null?0:r.length,m=vl(r,a);return oe(r,bi(a,function(L){return is(L,u)?+L:L}).sort(ts)),m});function ep(r,a){var u=[];if(!(r&&r.length))return u;var m=-1,L=[],G=r.length;for(a=Ve(a,3);++m<G;){var J=r[m];a(J,m,r)&&(u.push(J),L.push(m))}return oe(r,L),u}function Mh(r){return r==null?r:Ps.call(r)}function ip(r,a,u){var m=r==null?0:r.length;return m?(u&&typeof u!="number"&&rr(r,a,u)?(a=0,u=m):(a=a==null?0:si(a),u=u===M?m:si(u)),Ei(r,a,u)):[]}function np(r,a){return cn(r,a)}function rp(r,a,u){return ce(r,a,Ve(u,2))}function op(r,a){var u=r==null?0:r.length;if(u){var m=cn(r,a);if(m<u&&ao(r[m],a))return m}return-1}function sp(r,a){return cn(r,a,!0)}function ap(r,a,u){return ce(r,a,Ve(u,2),!0)}function lp(r,a){var u=r==null?0:r.length;if(u){var m=cn(r,a,!0)-1;if(ao(r[m],a))return m}return-1}function hp(r){return r&&r.length?Ue(r):[]}function up(r,a){return r&&r.length?Ue(r,Ve(a,2)):[]}function cp(r){var a=r==null?0:r.length;return a?Ei(r,1,a):[]}function pp(r,a,u){return r&&r.length?(a=u||a===M?1:si(a),Ei(r,0,a<0?0:a)):[]}function fp(r,a,u){var m=r==null?0:r.length;return m?(a=u||a===M?1:si(a),a=m-a,Ei(r,a<0?0:a,m)):[]}function dp(r,a){return r&&r.length?Ce(r,Ve(a,3),!1,!0):[]}function mp(r,a){return r&&r.length?Ce(r,Ve(a,3)):[]}var gp=Vt(function(r){return Fe(hn(r,1,vn,!0))}),vp=Vt(function(r){var a=qr(r);return vn(a)&&(a=M),Fe(hn(r,1,vn,!0),Ve(a,2))}),yp=Vt(function(r){var a=qr(r);return a=typeof a=="function"?a:M,Fe(hn(r,1,vn,!0),M,a)});function _p(r){return r&&r.length?Fe(r):[]}function xp(r,a){return r&&r.length?Fe(r,Ve(a,2)):[]}function wp(r,a){return a=typeof a=="function"?a:M,r&&r.length?Fe(r,M,a):[]}function Th(r){if(!(r&&r.length))return[];var a=0;return r=ar(r,function(u){if(vn(u))return a=Qi(u.length,a),!0}),Qr(a,function(u){return bi(r,fo(u))})}function au(r,a){if(!(r&&r.length))return[];var u=Th(r);return a==null?u:bi(u,function(m){return Kn(a,M,m)})}var Mp=Vt(function(r,a){return vn(r)?ma(r,a):[]}),Tp=Vt(function(r){return fi(ar(r,vn))}),Sp=Vt(function(r){var a=qr(r);return vn(a)&&(a=M),fi(ar(r,vn),Ve(a,2))}),Ep=Vt(function(r){var a=qr(r);return a=typeof a=="function"?a:M,fi(ar(r,vn),M,a)}),Ap=Vt(Th);function Pp(r,a){return ui(r||[],a||[],Ds)}function Lp(r,a){return ui(r||[],a||[],Ze)}var Cp=Vt(function(r){var a=r.length,u=a>1?r[a-1]:M;return u=typeof u=="function"?(r.pop(),u):M,au(r,u)});function lu(r){var a=O(r);return a.__chain__=!0,a}function Rp(r,a){return a(r),r}function Kl(r,a){return a(r)}var bp=es(function(r){var a=r.length,u=a?r[0]:0,m=this.__wrapped__,L=function(G){return vl(G,r)};return a>1||this.__actions__.length||!(m instanceof ri)||!is(u)?this.thru(L):(m=m.slice(u,+u+(a?1:0)),m.__actions__.push({func:Kl,args:[L],thisArg:M}),new Cn(m,this.__chain__).thru(function(G){return a&&!G.length&&G.push(M),G}))});function Op(){return lu(this)}function Ip(){return new Cn(this.value(),this.__chain__)}function Dp(){this.__values__===M&&(this.__values__=Mu(this.value()));var r=this.__index__>=this.__values__.length,a=r?M:this.__values__[this.__index__++];return{done:r,value:a}}function zp(){return this}function Np(r){for(var a,u=this;u instanceof Cs;){var m=eu(u);m.__index__=0,m.__values__=M,a?L.__wrapped__=m:a=m;var L=m;u=u.__wrapped__}return L.__wrapped__=r,a}function Bp(){var r=this.__wrapped__;if(r instanceof ri){var a=r;return this.__actions__.length&&(a=new ri(this)),a=a.reverse(),a.__actions__.push({func:Kl,args:[Mh],thisArg:M}),new Cn(a,this.__chain__)}return this.thru(Mh)}function Up(){return He(this.__wrapped__,this.__actions__)}var Fp=Us(function(r,a,u){ai.call(r,u)?++r[u]:ro(r,u,1)});function Gp(r,a,u){var m=ii(r)?rl:Rn;return u&&rr(r,a,u)&&(a=M),m(r,Ve(a,3))}function Hp(r,a){var u=ii(r)?ar:fr;return u(r,Ve(a,3))}var kp=Ne(iu),Vp=Ne(nu);function Wp(r,a){return hn(th(r,a),1)}function jp(r,a){return hn(th(r,a),ie)}function Xp(r,a,u){return u=u===M?1:si(u),hn(th(r,a),u)}function hu(r,a){var u=ii(r)?zi:Ki;return u(r,Ve(a,3))}function uu(r,a){var u=ii(r)?Do:Xl;return u(r,Ve(a,3))}var qp=Us(function(r,a,u){ai.call(r,u)?r[u].push(a):ro(r,u,[a])});function Yp(r,a,u,m){r=mr(r)?r:Ja(r),u=u&&!m?si(u):0;var L=r.length;return u<0&&(u=Qi(L+u,0)),oh(r)?u<=L&&r.indexOf(a,u)>-1:!!L&&lr(r,a,u)>-1}var Zp=Vt(function(r,a,u){var m=-1,L=typeof a=="function",G=mr(r)?At(r.length):[];return Ki(r,function(J){G[++m]=L?Kn(a,J,u):e(J,a,u)}),G}),Jp=Us(function(r,a,u){ro(r,u,a)});function th(r,a){var u=ii(r)?bi:$;return u(r,Ve(a,3))}function $p(r,a,u,m){return r==null?[]:(ii(a)||(a=a==null?[]:[a]),u=m?M:u,ii(u)||(u=u==null?[]:[u]),D(r,a,u))}var Qp=Us(function(r,a,u){r[u?0:1].push(a)},function(){return[[],[]]});function Kp(r,a,u){var m=ii(r)?ba:mo,L=arguments.length<3;return m(r,Ve(a,4),u,L,Ki)}function tf(r,a,u){var m=ii(r)?Il:mo,L=arguments.length<3;return m(r,Ve(a,4),u,L,Xl)}function ef(r,a){var u=ii(r)?ar:fr;return u(r,nh(Ve(a,3)))}function nf(r){var a=ii(r)?dl:Ee;return a(r)}function rf(r,a,u){(u?rr(r,a,u):a===M)?a=1:a=si(a);var m=ii(r)?ph:Be;return m(r,a)}function of(r){var a=ii(r)?Vl:Ri;return a(r)}function sf(r){if(r==null)return 0;if(mr(r))return oh(r)?Mr(r):r.length;var a=Jn(r);return a==Gi||a==Bi?r.size:P(r).length}function af(r,a,u){var m=ii(r)?Jr:Vi;return u&&rr(r,a,u)&&(a=M),m(r,Ve(a,3))}var lf=Vt(function(r,a){if(r==null)return[];var u=a.length;return u>1&&rr(r,a[0],a[1])?a=[]:u>2&&rr(a[0],a[1],a[2])&&(a=[a[0]]),D(r,hn(a,1),[])}),eh=Na||function(){return $i.Date.now()};function hf(r,a){if(typeof a!="function")throw new Vn(Mt);return r=si(r),function(){if(--r<1)return a.apply(this,arguments)}}function cu(r,a,u){return a=u?M:a,a=r&&a==null?r.length:a,Fn(r,X,M,M,M,M,a)}function pu(r,a){var u;if(typeof a!="function")throw new Vn(Mt);return r=si(r),function(){return--r>0&&(u=a.apply(this,arguments)),r<=1&&(a=M),u}}var Sh=Vt(function(r,a,u){var m=Z;if(u.length){var L=ur(u,Ya(Sh));m|=Y}return Fn(r,m,a,u,L)}),fu=Vt(function(r,a,u){var m=Z|_;if(u.length){var L=ur(u,Ya(fu));m|=Y}return Fn(a,m,r,u,L)});function du(r,a,u){a=u?M:a;var m=Fn(r,B,M,M,M,M,M,a);return m.placeholder=du.placeholder,m}function mu(r,a,u){a=u?M:a;var m=Fn(r,E,M,M,M,M,M,a);return m.placeholder=mu.placeholder,m}function gu(r,a,u){var m,L,G,J,rt,dt,Gt=0,Wt=!1,Jt=!1,ve=!0;if(typeof r!="function")throw new Vn(Mt);a=Yr(a)||0,nn(u)&&(Wt=!!u.leading,Jt="maxWait"in u,G=Jt?Qi(Yr(u.maxWait)||0,a):G,ve="trailing"in u?!!u.trailing:ve);function De(yn){var lo=m,os=L;return m=L=M,Gt=yn,J=r.apply(os,lo),J}function Xe(yn){return Gt=yn,rt=El(di,a),Wt?De(yn):J}function li(yn){var lo=yn-dt,os=yn-Gt,zu=a-lo;return Jt?An(zu,G-os):zu}function qe(yn){var lo=yn-dt,os=yn-Gt;return dt===M||lo>=a||lo<0||Jt&&os>=G}function di(){var yn=eh();if(qe(yn))return wi(yn);rt=El(di,li(yn))}function wi(yn){return rt=M,ve&&m?De(yn):(m=L=M,J)}function Ar(){rt!==M&&pn(rt),Gt=0,m=dt=L=rt=M}function or(){return rt===M?J:wi(eh())}function Pr(){var yn=eh(),lo=qe(yn);if(m=arguments,L=this,dt=yn,lo){if(rt===M)return Xe(dt);if(Jt)return pn(rt),rt=El(di,a),De(dt)}return rt===M&&(rt=El(di,a)),J}return Pr.cancel=Ar,Pr.flush=or,Pr}var uf=Vt(function(r,a){return Vr(r,1,a)}),cf=Vt(function(r,a,u){return Vr(r,Yr(a)||0,u)});function pf(r){return Fn(r,yt)}function ih(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new Vn(Mt);var u=function(){var m=arguments,L=a?a.apply(this,m):m[0],G=u.cache;if(G.has(L))return G.get(L);var J=r.apply(this,m);return u.cache=G.set(L,J)||G,J};return u.cache=new(ih.Cache||er),u}ih.Cache=er;function nh(r){if(typeof r!="function")throw new Vn(Mt);return function(){var a=arguments;switch(a.length){case 0:return!r.call(this);case 1:return!r.call(this,a[0]);case 2:return!r.call(this,a[0],a[1]);case 3:return!r.call(this,a[0],a[1],a[2])}return!r.apply(this,a)}}function ff(r){return pu(2,r)}var df=je(function(r,a){a=a.length==1&&ii(a[0])?bi(a[0],Sn(Ve())):bi(hn(a,1),Sn(Ve()));var u=a.length;return Vt(function(m){for(var L=-1,G=An(m.length,u);++L<G;)m[L]=a[L].call(this,m[L]);return Kn(r,this,m)})}),Eh=Vt(function(r,a){var u=ur(a,Ya(Eh));return Fn(r,Y,M,a,u)}),vu=Vt(function(r,a){var u=ur(a,Ya(vu));return Fn(r,z,M,a,u)}),mf=es(function(r,a){return Fn(r,et,M,M,M,a)});function gf(r,a){if(typeof r!="function")throw new Vn(Mt);return a=a===M?a:si(a),Vt(r,a)}function vf(r,a){if(typeof r!="function")throw new Vn(Mt);return a=a==null?0:Qi(si(a),0),Vt(function(u){var m=u[a],L=en(u,0,a);return m&&Dr(L,m),Kn(r,this,L)})}function yf(r,a,u){var m=!0,L=!0;if(typeof r!="function")throw new Vn(Mt);return nn(u)&&(m="leading"in u?!!u.leading:m,L="trailing"in u?!!u.trailing:L),gu(r,a,{leading:m,maxWait:a,trailing:L})}function _f(r){return cu(r,1)}function xf(r,a){return Eh(Ge(a),r)}function wf(){if(!arguments.length)return[];var r=arguments[0];return ii(r)?r:[r]}function Mf(r){return ir(r,Ht)}function Tf(r,a){return a=typeof a=="function"?a:M,ir(r,Ht,a)}function Sf(r){return ir(r,gt|Ht)}function Ef(r,a){return a=typeof a=="function"?a:M,ir(r,gt|Ht,a)}function Af(r,a){return a==null||jl(r,a,On(a))}function ao(r,a){return r===a||r!==r&&a!==a}var Pf=Xr(Wa),Lf=Xr(function(r,a){return r>=a}),wa=i(function(){return arguments}())?i:function(r){return fn(r)&&ai.call(r,"callee")&&!ia.call(r,"callee")},ii=At.isArray,Cf=nl?Sn(nl):n;function mr(r){return r!=null&&rh(r.length)&&!ns(r)}function vn(r){return fn(r)&&mr(r)}function Rf(r){return r===!0||r===!1||fn(r)&&bn(r)==ni}var Gs=sl||Nh,bf=_s?Sn(_s):o;function Of(r){return fn(r)&&r.nodeType===1&&!Al(r)}function If(r){if(r==null)return!0;if(mr(r)&&(ii(r)||typeof r=="string"||typeof r.splice=="function"||Gs(r)||Za(r)||wa(r)))return!r.length;var a=Jn(r);if(a==Gi||a==Bi)return!r.size;if(Sl(r))return!P(r).length;for(var u in r)if(ai.call(r,u))return!1;return!0}function Df(r,a){return s(r,a)}function zf(r,a,u){u=typeof u=="function"?u:M;var m=u?u(r,a):M;return m===M?s(r,a,M,u):!!m}function Ah(r){if(!fn(r))return!1;var a=bn(r);return a==yr||a==Fi||typeof r.message=="string"&&typeof r.name=="string"&&!Al(r)}function Nf(r){return typeof r=="number"&&Ba(r)}function ns(r){if(!nn(r))return!1;var a=bn(r);return a==Lr||a==$n||a==In||a==ho}function yu(r){return typeof r=="number"&&r==si(r)}function rh(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ze}function nn(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}function fn(r){return r!=null&&typeof r=="object"}var _u=xs?Sn(xs):h;function Bf(r,a){return r===a||c(r,a,gh(a))}function Uf(r,a,u){return u=typeof u=="function"?u:M,c(r,a,gh(a),u)}function Ff(r){return xu(r)&&r!=+r}function Gf(r){if(Mc(r))throw new We(S);return p(r)}function Hf(r){return r===null}function kf(r){return r==null}function xu(r){return typeof r=="number"||fn(r)&&bn(r)==Gn}function Al(r){if(!fn(r)||bn(r)!=Je)return!1;var a=Gr(r);if(a===null)return!0;var u=ai.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&Wn.call(u)==Fr}var Ph=bl?Sn(bl):f;function Vf(r){return yu(r)&&r>=-ze&&r<=ze}var wu=Ol?Sn(Ol):d;function oh(r){return typeof r=="string"||!ii(r)&&fn(r)&&bn(r)==A}function Er(r){return typeof r=="symbol"||fn(r)&&bn(r)==k}var Za=La?Sn(La):v;function Wf(r){return r===M}function jf(r){return fn(r)&&Jn(r)==q}function Xf(r){return fn(r)&&bn(r)==lt}var qf=Xr(I),Yf=Xr(function(r,a){return r<=a});function Mu(r){if(!r)return[];if(mr(r))return oh(r)?kn(r):Un(r);if(xo&&r[xo])return Vo(r[xo]());var a=Jn(r),u=a==Gi?Dn:a==Bi?Wo:Ja;return u(r)}function rs(r){if(!r)return r===0?r:0;if(r=Yr(r),r===ie||r===-ie){var a=r<0?-1:1;return a*rn}return r===r?r:0}function si(r){var a=rs(r),u=a%1;return a===a?u?a-u:a:0}function Tu(r){return r?So(si(r),0,Qe):0}function Yr(r){if(typeof r=="number")return r;if(Er(r))return Ut;if(nn(r)){var a=typeof r.valueOf=="function"?r.valueOf():r;r=nn(a)?a+"":a}if(typeof r!="string")return r===0?r:+r;r=Ms(r);var u=el.test(r);return u||Ro.test(r)?gs(r.slice(2),u?2:8):tl.test(r)?Ut:+r}function Su(r){return gn(r,gr(r))}function Zf(r){return r?So(si(r),-ze,ze):r===0?r:0}function Oi(r){return r==null?"":be(r)}var Jf=so(function(r,a){if(Sl(a)||mr(a)){gn(a,On(a),r);return}for(var u in a)ai.call(a,u)&&Ds(r,u,a[u])}),Eu=so(function(r,a){gn(a,gr(a),r)}),sh=so(function(r,a,u,m){gn(a,gr(a),r,m)}),$f=so(function(r,a,u,m){gn(a,On(a),r,m)}),Qf=es(vl);function Kf(r,a){var u=Mo(r);return a==null?u:ml(u,a)}var td=Vt(function(r,a){r=he(r);var u=-1,m=a.length,L=m>2?a[2]:M;for(L&&rr(a[0],a[1],L)&&(m=1);++u<m;)for(var G=a[u],J=gr(G),rt=-1,dt=J.length;++rt<dt;){var Gt=J[rt],Wt=r[Gt];(Wt===M||ao(Wt,Ur[Gt])&&!ai.call(r,Gt))&&(r[Gt]=G[Gt])}return r}),ed=Vt(function(r){return r.push(M,kh),Kn(Au,M,r)});function id(r,a){return zo(r,Ve(a,3),dr)}function nd(r,a){return zo(r,Ve(a,3),Va)}function rd(r,a){return r==null?r:ga(r,Ve(a,3),gr)}function od(r,a){return r==null?r:ka(r,Ve(a,3),gr)}function sd(r,a){return r&&dr(r,Ve(a,3))}function ad(r,a){return r&&Va(r,Ve(a,3))}function ld(r){return r==null?[]:Qo(r,On(r))}function hd(r){return r==null?[]:Qo(r,gr(r))}function Lh(r,a,u){var m=r==null?M:Eo(r,a);return m===M?u:m}function ud(r,a){return r!=null&&jh(r,a,ja)}function Ch(r,a){return r!=null&&jh(r,a,yl)}var cd=Qt(function(r,a,u){a!=null&&typeof a.toString!="function"&&(a=Xn.call(a)),r[a]=u},bh(vr)),pd=Qt(function(r,a,u){a!=null&&typeof a.toString!="function"&&(a=Xn.call(a)),ai.call(r,a)?r[a].push(u):r[a]=[u]},Ve),fd=Vt(e);function On(r){return mr(r)?kl(r):P(r)}function gr(r){return mr(r)?kl(r,!0):R(r)}function dd(r,a){var u={};return a=Ve(a,3),dr(r,function(m,L,G){ro(u,a(m,L,G),m)}),u}function md(r,a){var u={};return a=Ve(a,3),dr(r,function(m,L,G){ro(u,L,a(m,L,G))}),u}var gd=so(function(r,a,u){Q(r,a,u)}),Au=so(function(r,a,u,m){Q(r,a,u,m)}),vd=es(function(r,a){var u={};if(r==null)return u;var m=!1;a=bi(a,function(G){return G=Ie(G,r),m||(m=G.length>1),G}),gn(r,dh(r),u),m&&(u=ir(u,gt|Nt|Ht,uc));for(var L=a.length;L--;)Ai(u,a[L]);return u});function yd(r,a){return Pu(r,nh(Ve(a)))}var _d=es(function(r,a){return r==null?{}:ct(r,a)});function Pu(r,a){if(r==null)return{};var u=bi(dh(r),function(m){return[m]});return a=Ve(a),Dt(r,u,function(m,L){return a(m,L[0])})}function xd(r,a,u){a=Ie(a,r);var m=-1,L=a.length;for(L||(L=1,r=M);++m<L;){var G=r==null?M:r[Po(a[m])];G===M&&(m=L,G=u),r=ns(G)?G.call(r):G}return r}function wd(r,a,u){return r==null?r:Ze(r,a,u)}function Md(r,a,u,m){return m=typeof m=="function"?m:M,r==null?r:Ze(r,a,u,m)}var Lu=Zl(On),Cu=Zl(gr);function Td(r,a,u){var m=ii(r),L=m||Gs(r)||Za(r);if(a=Ve(a,4),u==null){var G=r&&r.constructor;L?u=m?new G:[]:nn(r)?u=ns(G)?Mo(Gr(r)):{}:u={}}return(L?zi:dr)(r,function(J,rt,dt){return a(u,J,rt,dt)}),u}function Sd(r,a){return r==null?!0:Ai(r,a)}function Ed(r,a,u){return r==null?r:pe(r,a,Ge(u))}function Ad(r,a,u,m){return m=typeof m=="function"?m:M,r==null?r:pe(r,a,Ge(u),m)}function Ja(r){return r==null?[]:Bo(r,On(r))}function Pd(r){return r==null?[]:Bo(r,gr(r))}function Ld(r,a,u){return u===M&&(u=a,a=M),u!==M&&(u=Yr(u),u=u===u?u:0),a!==M&&(a=Yr(a),a=a===a?a:0),So(Yr(r),a,u)}function Cd(r,a,u){return a=rs(a),u===M?(u=a,a=0):u=rs(u),r=Yr(r),Xa(r,a,u)}function Rd(r,a,u){if(u&&typeof u!="boolean"&&rr(r,a,u)&&(a=u=M),u===M&&(typeof a=="boolean"?(u=a,a=M):typeof r=="boolean"&&(u=r,r=M)),r===M&&a===M?(r=0,a=1):(r=rs(r),a===M?(a=r,r=0):a=rs(a)),r>a){var m=r;r=a,a=m}if(u||r%1||a%1){var L=Ua();return An(r+L*(a-r+Zs("1e-"+((L+"").length-1))),a)}return $t(r,a)}var bd=ge(function(r,a,u){return a=a.toLowerCase(),r+(u?Ru(a):a)});function Ru(r){return Rh(Oi(r).toLowerCase())}function bu(r){return r=Oi(r),r&&r.replace(Pa,Fo).replace(il,"")}function Od(r,a,u){r=Oi(r),a=be(a);var m=r.length;u=u===M?m:So(si(u),0,m);var L=u;return u-=a.length,u>=0&&r.slice(u,L)==a}function Id(r){return r=Oi(r),r&&Cr.test(r)?r.replace(Di,wr):r}function Dd(r){return r=Oi(r),r&&Sa.test(r)?r.replace(Hs,"\\$&"):r}var zd=ge(function(r,a,u){return r+(u?"-":"")+a.toLowerCase()}),Nd=ge(function(r,a,u){return r+(u?" ":"")+a.toLowerCase()}),Bd=ae("toLowerCase");function Ud(r,a,u){r=Oi(r),a=si(a);var m=a?Mr(r):0;if(!a||m>=a)return r;var L=(a-m)/2;return Wi(qo(L),u)+r+Wi(eo(L),u)}function Fd(r,a,u){r=Oi(r),a=si(a);var m=a?Mr(r):0;return a&&m<a?r+Wi(a-m,u):r}function Gd(r,a,u){r=Oi(r),a=si(a);var m=a?Mr(r):0;return a&&m<a?Wi(a-m,u)+r:r}function Hd(r,a,u){return u||a==null?a=0:a&&(a=+a),ll(Oi(r).replace(Rr,""),a||0)}function kd(r,a,u){return(u?rr(r,a,u):a===M)?a=1:a=si(a),ue(Oi(r),a)}function Vd(){var r=arguments,a=Oi(r[0]);return r.length<3?a:a.replace(r[1],r[2])}var Wd=ge(function(r,a,u){return r+(u?"_":"")+a.toLowerCase()});function jd(r,a,u){return u&&typeof u!="number"&&rr(r,a,u)&&(a=u=M),u=u===M?Qe:u>>>0,u?(r=Oi(r),r&&(typeof a=="string"||a!=null&&!Ph(a))&&(a=be(a),!a&&hr(r))?en(kn(r),0,u):r.split(a,u)):[]}var Xd=ge(function(r,a,u){return r+(u?" ":"")+Rh(a)});function qd(r,a,u){return r=Oi(r),u=u==null?0:So(si(u),0,r.length),a=be(a),r.slice(u,u+a.length)==a}function Yd(r,a,u){var m=O.templateSettings;u&&rr(r,a,u)&&(a=M),r=Oi(r),a=sh({},a,m,Hh);var L=sh({},a.imports,m.imports,Hh),G=On(L),J=Bo(L,G),rt,dt,Gt=0,Wt=a.interpolate||_r,Jt="__p += '",ve=zn((a.escape||_r).source+"|"+Wt.source+"|"+(Wt===as?Or:_r).source+"|"+(a.evaluate||_r).source+"|$","g"),De="//# sourceURL="+(ai.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ds+"]")+`
|
|
2583
|
+
`;r.replace(ve,function(qe,di,wi,Ar,or,Pr){return wi||(wi=Ar),Jt+=r.slice(Gt,Pr).replace(w,Go),di&&(rt=!0,Jt+=`' +
|
|
2584
|
+
__e(`+di+`) +
|
|
2585
|
+
'`),or&&(dt=!0,Jt+=`';
|
|
2586
|
+
`+or+`;
|
|
2587
|
+
__p += '`),wi&&(Jt+=`' +
|
|
2588
|
+
((__t = (`+wi+`)) == null ? '' : __t) +
|
|
2589
|
+
'`),Gt=Pr+qe.length,qe}),Jt+=`';
|
|
2590
|
+
`;var Xe=ai.call(a,"variable")&&a.variable;if(!Xe)Jt=`with (obj) {
|
|
2591
|
+
`+Jt+`
|
|
2592
|
+
}
|
|
2593
|
+
`;else if(us.test(Xe))throw new We(qt);Jt=(dt?Jt.replace(Zr,""):Jt).replace(sr,"$1").replace(Ji,"$1;"),Jt="function("+(Xe||"obj")+`) {
|
|
2594
|
+
`+(Xe?"":`obj || (obj = {});
|
|
2595
|
+
`)+"var __t, __p = ''"+(rt?", __e = _.escape":"")+(dt?`, __j = Array.prototype.join;
|
|
2596
|
+
function print() { __p += __j.call(arguments, '') }
|
|
2597
|
+
`:`;
|
|
2598
|
+
`)+Jt+`return __p
|
|
2599
|
+
}`;var li=Iu(function(){return xi(G,De+"return "+Jt).apply(M,J)});if(li.source=Jt,Ah(li))throw li;return li}function Zd(r){return Oi(r).toLowerCase()}function Jd(r){return Oi(r).toUpperCase()}function $d(r,a,u){if(r=Oi(r),r&&(u||a===M))return Ms(r);if(!r||!(a=be(a)))return r;var m=kn(r),L=kn(a),G=vo(m,L),J=Uo(m,L)+1;return en(m,G,J).join("")}function Qd(r,a,u){if(r=Oi(r),r&&(u||a===M))return r.slice(0,Ts(r)+1);if(!r||!(a=be(a)))return r;var m=kn(r),L=Uo(m,kn(a))+1;return en(m,0,L).join("")}function Kd(r,a,u){if(r=Oi(r),r&&(u||a===M))return r.replace(Rr,"");if(!r||!(a=be(a)))return r;var m=kn(r),L=vo(m,kn(a));return en(m,L).join("")}function tm(r,a){var u=ft,m=zt;if(nn(a)){var L="separator"in a?a.separator:L;u="length"in a?si(a.length):u,m="omission"in a?be(a.omission):m}r=Oi(r);var G=r.length;if(hr(r)){var J=kn(r);G=J.length}if(u>=G)return r;var rt=u-Mr(m);if(rt<1)return m;var dt=J?en(J,0,rt).join(""):r.slice(0,rt);if(L===M)return dt+m;if(J&&(rt+=dt.length-rt),Ph(L)){if(r.slice(rt).search(L)){var Gt,Wt=dt;for(L.global||(L=zn(L.source,Oi(Ea.exec(L))+"g")),L.lastIndex=0;Gt=L.exec(Wt);)var Jt=Gt.index;dt=dt.slice(0,Jt===M?rt:Jt)}}else if(r.indexOf(be(L),rt)!=rt){var ve=dt.lastIndexOf(L);ve>-1&&(dt=dt.slice(0,ve))}return dt+m}function em(r){return r=Oi(r),r&&Qa.test(r)?r.replace(ss,Da):r}var im=ge(function(r,a,u){return r+(u?" ":"")+a.toUpperCase()}),Rh=ae("toUpperCase");function Ou(r,a,u){return r=Oi(r),a=u?M:a,a===M?ko(r)?ah(r):$s(r):r.match(a)||[]}var Iu=Vt(function(r,a){try{return Kn(r,M,a)}catch(u){return Ah(u)?u:new We(u)}}),nm=es(function(r,a){return zi(a,function(u){u=Po(u),ro(r,u,Sh(r[u],r))}),r});function rm(r){var a=r==null?0:r.length,u=Ve();return r=a?bi(r,function(m){if(typeof m[1]!="function")throw new Vn(Mt);return[u(m[0]),m[1]]}):[],Vt(function(m){for(var L=-1;++L<a;){var G=r[L];if(Kn(G[0],this,m))return Kn(G[1],this,m)}})}function om(r){return zs(ir(r,gt))}function bh(r){return function(){return r}}function sm(r,a){return r==null||r!==r?a:r}var am=mi(),lm=mi(!0);function vr(r){return r}function Oh(r){return x(typeof r=="function"?r:ir(r,gt))}function hm(r){return W(ir(r,gt))}function um(r,a){return ot(r,ir(a,gt))}var cm=Vt(function(r,a){return function(u){return e(u,r,a)}}),pm=Vt(function(r,a){return function(u){return e(r,u,a)}});function Ih(r,a,u){var m=On(a),L=Qo(a,m);u==null&&!(nn(a)&&(L.length||!m.length))&&(u=a,a=r,r=this,L=Qo(a,On(a)));var G=!(nn(u)&&"chain"in u)||!!u.chain,J=ns(r);return zi(L,function(rt){var dt=a[rt];r[rt]=dt,J&&(r.prototype[rt]=function(){var Gt=this.__chain__;if(G||Gt){var Wt=r(this.__wrapped__),Jt=Wt.__actions__=Un(this.__actions__);return Jt.push({func:dt,args:arguments,thisArg:r}),Wt.__chain__=Gt,Wt}return dt.apply(r,Dr([this.value()],arguments))})}),r}function fm(){return $i._===this&&($i._=Tr),this}function Dh(){}function dm(r){return r=si(r),Vt(function(a){return C(a,r)})}var mm=xn(bi),gm=xn(rl),vm=xn(Jr);function Du(r){return yh(r)?fo(Po(r)):Rt(r)}function ym(r){return function(a){return r==null?M:Eo(r,a)}}var _m=Ml(),xm=Ml(!0);function zh(){return[]}function Nh(){return!1}function wm(){return{}}function Mm(){return""}function Tm(){return!0}function Sm(r,a){if(r=si(r),r<1||r>ze)return[];var u=Qe,m=An(r,Qe);a=Ve(a),r-=Qe;for(var L=Qr(m,a);++u<r;)a(u);return L}function Em(r){return ii(r)?bi(r,Po):Er(r)?[r]:Un(tu(Oi(r)))}function Am(r){var a=++jn;return Oi(r)+a}var Pm=nr(function(r,a){return r+a},0),Lm=qa("ceil"),Cm=nr(function(r,a){return r/a},1),Rm=qa("floor");function bm(r){return r&&r.length?Wr(r,vr,Wa):M}function Om(r,a){return r&&r.length?Wr(r,Ve(a,2),Wa):M}function Im(r){return ws(r,vr)}function Dm(r,a){return ws(r,Ve(a,2))}function zm(r){return r&&r.length?Wr(r,vr,I):M}function Nm(r,a){return r&&r.length?Wr(r,Ve(a,2),I):M}var Bm=nr(function(r,a){return r*a},1),Um=qa("round"),Fm=nr(function(r,a){return r-a},0);function Gm(r){return r&&r.length?go(r,vr):0}function Hm(r,a){return r&&r.length?go(r,Ve(a,2)):0}return O.after=hf,O.ary=cu,O.assign=Jf,O.assignIn=Eu,O.assignInWith=sh,O.assignWith=$f,O.at=Qf,O.before=pu,O.bind=Sh,O.bindAll=nm,O.bindKey=fu,O.castArray=wf,O.chain=lu,O.chunk=Cc,O.compact=Rc,O.concat=bc,O.cond=rm,O.conforms=om,O.constant=bh,O.countBy=Fp,O.create=Kf,O.curry=du,O.curryRight=mu,O.debounce=gu,O.defaults=td,O.defaultsDeep=ed,O.defer=uf,O.delay=cf,O.difference=Oc,O.differenceBy=Ic,O.differenceWith=Dc,O.drop=zc,O.dropRight=Nc,O.dropRightWhile=Bc,O.dropWhile=Uc,O.fill=Fc,O.filter=Hp,O.flatMap=Wp,O.flatMapDeep=jp,O.flatMapDepth=Xp,O.flatten=ru,O.flattenDeep=Gc,O.flattenDepth=Hc,O.flip=pf,O.flow=am,O.flowRight=lm,O.fromPairs=kc,O.functions=ld,O.functionsIn=hd,O.groupBy=qp,O.initial=Wc,O.intersection=jc,O.intersectionBy=Xc,O.intersectionWith=qc,O.invert=cd,O.invertBy=pd,O.invokeMap=Zp,O.iteratee=Oh,O.keyBy=Jp,O.keys=On,O.keysIn=gr,O.map=th,O.mapKeys=dd,O.mapValues=md,O.matches=hm,O.matchesProperty=um,O.memoize=ih,O.merge=gd,O.mergeWith=Au,O.method=cm,O.methodOf=pm,O.mixin=Ih,O.negate=nh,O.nthArg=dm,O.omit=vd,O.omitBy=yd,O.once=ff,O.orderBy=$p,O.over=mm,O.overArgs=df,O.overEvery=gm,O.overSome=vm,O.partial=Eh,O.partialRight=vu,O.partition=Qp,O.pick=_d,O.pickBy=Pu,O.property=Du,O.propertyOf=ym,O.pull=$c,O.pullAll=su,O.pullAllBy=Qc,O.pullAllWith=Kc,O.pullAt=tp,O.range=_m,O.rangeRight=xm,O.rearg=mf,O.reject=ef,O.remove=ep,O.rest=gf,O.reverse=Mh,O.sampleSize=rf,O.set=wd,O.setWith=Md,O.shuffle=of,O.slice=ip,O.sortBy=lf,O.sortedUniq=hp,O.sortedUniqBy=up,O.split=jd,O.spread=vf,O.tail=cp,O.take=pp,O.takeRight=fp,O.takeRightWhile=dp,O.takeWhile=mp,O.tap=Rp,O.throttle=yf,O.thru=Kl,O.toArray=Mu,O.toPairs=Lu,O.toPairsIn=Cu,O.toPath=Em,O.toPlainObject=Su,O.transform=Td,O.unary=_f,O.union=gp,O.unionBy=vp,O.unionWith=yp,O.uniq=_p,O.uniqBy=xp,O.uniqWith=wp,O.unset=Sd,O.unzip=Th,O.unzipWith=au,O.update=Ed,O.updateWith=Ad,O.values=Ja,O.valuesIn=Pd,O.without=Mp,O.words=Ou,O.wrap=xf,O.xor=Tp,O.xorBy=Sp,O.xorWith=Ep,O.zip=Ap,O.zipObject=Pp,O.zipObjectDeep=Lp,O.zipWith=Cp,O.entries=Lu,O.entriesIn=Cu,O.extend=Eu,O.extendWith=sh,Ih(O,O),O.add=Pm,O.attempt=Iu,O.camelCase=bd,O.capitalize=Ru,O.ceil=Lm,O.clamp=Ld,O.clone=Mf,O.cloneDeep=Sf,O.cloneDeepWith=Ef,O.cloneWith=Tf,O.conformsTo=Af,O.deburr=bu,O.defaultTo=sm,O.divide=Cm,O.endsWith=Od,O.eq=ao,O.escape=Id,O.escapeRegExp=Dd,O.every=Gp,O.find=kp,O.findIndex=iu,O.findKey=id,O.findLast=Vp,O.findLastIndex=nu,O.findLastKey=nd,O.floor=Rm,O.forEach=hu,O.forEachRight=uu,O.forIn=rd,O.forInRight=od,O.forOwn=sd,O.forOwnRight=ad,O.get=Lh,O.gt=Pf,O.gte=Lf,O.has=ud,O.hasIn=Ch,O.head=ou,O.identity=vr,O.includes=Yp,O.indexOf=Vc,O.inRange=Cd,O.invoke=fd,O.isArguments=wa,O.isArray=ii,O.isArrayBuffer=Cf,O.isArrayLike=mr,O.isArrayLikeObject=vn,O.isBoolean=Rf,O.isBuffer=Gs,O.isDate=bf,O.isElement=Of,O.isEmpty=If,O.isEqual=Df,O.isEqualWith=zf,O.isError=Ah,O.isFinite=Nf,O.isFunction=ns,O.isInteger=yu,O.isLength=rh,O.isMap=_u,O.isMatch=Bf,O.isMatchWith=Uf,O.isNaN=Ff,O.isNative=Gf,O.isNil=kf,O.isNull=Hf,O.isNumber=xu,O.isObject=nn,O.isObjectLike=fn,O.isPlainObject=Al,O.isRegExp=Ph,O.isSafeInteger=Vf,O.isSet=wu,O.isString=oh,O.isSymbol=Er,O.isTypedArray=Za,O.isUndefined=Wf,O.isWeakMap=jf,O.isWeakSet=Xf,O.join=Yc,O.kebabCase=zd,O.last=qr,O.lastIndexOf=Zc,O.lowerCase=Nd,O.lowerFirst=Bd,O.lt=qf,O.lte=Yf,O.max=bm,O.maxBy=Om,O.mean=Im,O.meanBy=Dm,O.min=zm,O.minBy=Nm,O.stubArray=zh,O.stubFalse=Nh,O.stubObject=wm,O.stubString=Mm,O.stubTrue=Tm,O.multiply=Bm,O.nth=Jc,O.noConflict=fm,O.noop=Dh,O.now=eh,O.pad=Ud,O.padEnd=Fd,O.padStart=Gd,O.parseInt=Hd,O.random=Rd,O.reduce=Kp,O.reduceRight=tf,O.repeat=kd,O.replace=Vd,O.result=xd,O.round=Um,O.runInContext=at,O.sample=nf,O.size=sf,O.snakeCase=Wd,O.some=af,O.sortedIndex=np,O.sortedIndexBy=rp,O.sortedIndexOf=op,O.sortedLastIndex=sp,O.sortedLastIndexBy=ap,O.sortedLastIndexOf=lp,O.startCase=Xd,O.startsWith=qd,O.subtract=Fm,O.sum=Gm,O.sumBy=Hm,O.template=Yd,O.times=Sm,O.toFinite=rs,O.toInteger=si,O.toLength=Tu,O.toLower=Zd,O.toNumber=Yr,O.toSafeInteger=Zf,O.toString=Oi,O.toUpper=Jd,O.trim=$d,O.trimEnd=Qd,O.trimStart=Kd,O.truncate=tm,O.unescape=em,O.uniqueId=Am,O.upperCase=im,O.upperFirst=Rh,O.each=hu,O.eachRight=uu,O.first=ou,Ih(O,function(){var r={};return dr(O,function(a,u){ai.call(O.prototype,u)||(r[u]=a)}),r}(),{chain:!1}),O.VERSION=_t,zi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){O[r].placeholder=O}),zi(["drop","take"],function(r,a){ri.prototype[r]=function(u){u=u===M?1:Qi(si(u),0);var m=this.__filtered__&&!a?new ri(this):this.clone();return m.__filtered__?m.__takeCount__=An(u,m.__takeCount__):m.__views__.push({size:An(u,Qe),type:r+(m.__dir__<0?"Right":"")}),m},ri.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),zi(["filter","map","takeWhile"],function(r,a){var u=a+1,m=u==se||u==Et;ri.prototype[r]=function(L){var G=this.clone();return G.__iteratees__.push({iteratee:Ve(L,3),type:u}),G.__filtered__=G.__filtered__||m,G}}),zi(["head","last"],function(r,a){var u="take"+(a?"Right":"");ri.prototype[r]=function(){return this[u](1).value()[0]}}),zi(["initial","tail"],function(r,a){var u="drop"+(a?"":"Right");ri.prototype[r]=function(){return this.__filtered__?new ri(this):this[u](1)}}),ri.prototype.compact=function(){return this.filter(vr)},ri.prototype.find=function(r){return this.filter(r).head()},ri.prototype.findLast=function(r){return this.reverse().find(r)},ri.prototype.invokeMap=Vt(function(r,a){return typeof r=="function"?new ri(this):this.map(function(u){return e(u,r,a)})}),ri.prototype.reject=function(r){return this.filter(nh(Ve(r)))},ri.prototype.slice=function(r,a){r=si(r);var u=this;return u.__filtered__&&(r>0||a<0)?new ri(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),a!==M&&(a=si(a),u=a<0?u.dropRight(-a):u.take(a-r)),u)},ri.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},ri.prototype.toArray=function(){return this.take(Qe)},dr(ri.prototype,function(r,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),m=/^(?:head|last)$/.test(a),L=O[m?"take"+(a=="last"?"Right":""):a],G=m||/^find/.test(a);L&&(O.prototype[a]=function(){var J=this.__wrapped__,rt=m?[1]:arguments,dt=J instanceof ri,Gt=rt[0],Wt=dt||ii(J),Jt=function(di){var wi=L.apply(O,Dr([di],rt));return m&&ve?wi[0]:wi};Wt&&u&&typeof Gt=="function"&&Gt.length!=1&&(dt=Wt=!1);var ve=this.__chain__,De=!!this.__actions__.length,Xe=G&&!ve,li=dt&&!De;if(!G&&Wt){J=li?J:new ri(this);var qe=r.apply(J,rt);return qe.__actions__.push({func:Kl,args:[Jt],thisArg:M}),new Cn(qe,ve)}return Xe&&li?r.apply(this,rt):(qe=this.thru(Jt),Xe?m?qe.value()[0]:qe.value():qe)})}),zi(["pop","push","shift","sort","splice","unshift"],function(r){var a=mn[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",m=/^(?:pop|shift)$/.test(r);O.prototype[r]=function(){var L=arguments;if(m&&!this.__chain__){var G=this.value();return a.apply(ii(G)?G:[],L)}return this[u](function(J){return a.apply(ii(J)?J:[],L)})}}),dr(ri.prototype,function(r,a){var u=O[a];if(u){var m=u.name+"";ai.call(wo,m)||(wo[m]=[]),wo[m].push({name:a,func:u})}}),wo[Ni(M,_).name]=[{name:"wrapper",func:M}],ri.prototype.clone=Rs,ri.prototype.reverse=Fl,ri.prototype.value=bs,O.prototype.at=bp,O.prototype.chain=Op,O.prototype.commit=Ip,O.prototype.next=Dp,O.prototype.plant=Np,O.prototype.reverse=Bp,O.prototype.toJSON=O.prototype.valueOf=O.prototype.value=Up,O.prototype.first=O.prototype.head,xo&&(O.prototype[xo]=zp),O},yo=lh();xr?((xr.exports=yo)._=yo,co._=yo):$i._=yo}).call($a)}(Rl,Rl.exports);var oc=Rl.exports;const sc=rc(oc);class ac{constructor(ht,M=[]){Nu(this,"simplifyFunc",ht=>{try{ht=turf.simplify(ht,{tolerance:5e-4,highQuality:!1,mutate:!0})}catch{}return ht});mars3d?(this.map=ht,this.vectorArr=M,this.geoJsonType=new Map([["Point"],["LineString"],["Polygon"],["MultiPoint"],["MultiLineString"],["MultiPolygon"]]),this.avoidanceArr=[],this.editDate={id:""}):console.error("未引入指定插件")}remove(ht){this.map.removeLayer(this.map.getLayer(ht,"vectorId")),window.dynamicMasking.remove(ht)}add(ht,M){return new Promise((_t,mt)=>{let S;if(typeof ht!="object"){let gt=this.map.getLayer(ht,"vectorId");if(gt)return _t(gt);S=this.query(ht)}else{let gt=this.map.getLayer(ht.id,"vectorId");if(gt)return _t(gt);S=ht}let{value:Mt,url:qt,id:nt,title:Tt}=S;new Cesium.Resource({url:qt}).fetchJson().then(gt=>{let{id:Nt,title:Ht,shpInfo:Ct}=S,{attributes:st,geometryType:Z,geometryCount:_,pointCount:y}=Ct,{width:B,materialType:E,materialOptions:Y,clampToGround:z,distanceDisplayCondition:X,distanceDisplayCondition_near:et,distanceDisplayCondition_far:yt,zIndex:ft,label:zt,fill:Yt,diffHeight:re,outline:se,outlineStyle:we,color:Et,pixelSize:ie,outlineColor:ze,outlineWidth:rn}=JSON.parse(st),Ut;switch(console.log("geometryType",Z),zt.color=Cesium.Color.fromCssColorString(zt.color).withAlpha(0),zt.outlineColor=Cesium.Color.fromCssColorString(zt.outlineColor).withAlpha(.001),zt.backgroundColor=Cesium.Color.fromCssColorString(zt.backgroundColor).withAlpha(.001),zt.background=!1,zt.outline=!1,zt.show=!1,Z){case"LineString":case"MultiLineString":zt.backgroundPadding=5,Ut=new mars3d.layer.GeoJsonLayer({data:gt,vectorId:Nt,format:y>1e4?this.simplifyFunc:null,symbol:{type:"polylineC",styleOptions:{width:B,clampToGround:z,distanceDisplayCondition:X,distanceDisplayCondition_far:yt,distanceDisplayCondition_near:et,materialType:E,materialOptions:Y,label:zt}},popup:` ${Ht} `,hasZIndex:!0,zIndex:ft});break;case"Polygon":case"MultiPolygon":console.log("attributes",E,Y),E=="PolyGrass"&&(Y={evenColor:new Cesium.Color(.25,.4,.1,1),oddColor:new Cesium.Color(.1,.1,.1,1),frequency:1.5}),Ut=new mars3d.layer.GeoJsonLayer({data:gt,vectorId:Nt,format:y>1e4?this.simplifyFunc:null,symbol:{type:"polygon",styleOptions:{fill:Yt,diffHeight:re,clampToGround:z,materialType:E,materialOptions:Y,distanceDisplayCondition:X,distanceDisplayCondition_far:yt,distanceDisplayCondition_near:et,outlineStyle:we,outline:se,label:zt}},popup:` ${Ht} `});break;case"Point":case"MultiPoint":console.log(JSON.parse(st)),Ut=new mars3d.layer.GeoJsonLayer({data:gt,vectorId:Nt,format:y>1e4?this.simplifyFunc:null,symbol:{type:"pointP",styleOptions:{color:Et,pixelSize:ie,outline:se,outlineColor:ze,outlineWidth:rn,visibleDepth:!1,label:zt}}});break}window.map.addLayer(Ut),Ut.bindPopup(Ii=>{console.log("event",Ii)});let Qe=sc.debounce(Ii=>{console.log("测试shp矢量加载完成"),window.dynamicMasking.add(Ii,JSON.parse(st))},500);Ut.readyPromise.then(Ii=>{Qe(Ii),_t(Ii)}).catch(Ii=>{console.error("测试shp矢量加载失败",Ii),_t({tite:"【矢量】"+modelTitle+"加载失败",type:"error",id:modelId,url:qt})})}).catch(gt=>{console.error("数据有误",gt),_t({tite:"【矢量】"+modelTitle+"数据有误",type:"error",id:modelId,url:qt})})})}updateData(ht){this.vectorArr=ht}processingKML(ht){let M,_t=2e3,mt=!0,{kmlInfo:S}=ht,{fill:Mt,areaColor:qt,areaSideColor:nt,transparency:Tt,isAreaSideColor:bt,minDistinct:gt,textDistinct:Nt,textSize:Ht,textColor:Ct,fontStyle:st,outLine:Z,sideColor:_,backGround:y,backGroundColor:B,clampToGround:E}=S;console.log("minDistinct",gt);let Y={fill:Mt,color:qt,opacity:Tt||.5,outline:bt,outlineColor:nt,outlineWidth:2,clampToGround:E,distanceDisplayCondition:!0,distanceDisplayCondition_far:Nt||1e6,distanceDisplayCondition_near:gt||0,classificationType:M,opacity:String(Tt)},z={text:"{name}",horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffsetY:-10,font_size:26,color:Ct||"#ffffff",font_family:st||"黑体",outline:Z||!0,outlineColor:_||"#000000",outlineWidth:4,scaleByDistance:!0,distanceDisplayCondition:!0,distanceDisplayCondition_far:Nt||1e6,distanceDisplayCondition_near:gt||0,background:y||!1,backgroundColor:B||"",visibleDepth:mt,clampToGround:E||!1,disableDepthTestDistance:_t};return{...Y,label:z}}selected(ht){this.map.getLayer(ht,"vectorId").flyTo()}query(ht){return this.vectorArr.length==0?!1:this.vectorArr.find(M=>M.id==ht)}editVector(ht,M,_t){let mt=this.map.getLayer(ht,"vectorId"),S=nc(M,_t);console.log("编辑数据",S),mt&&(mt.eachGraphic(Mt=>{Mt.label.show===!1&&(delete Mt.label.outline,delete Mt.label.background,delete Mt.label.outlineColor,delete Mt.label.backgroundColor),Mt.setStyle({...S})}),dynamicMasking.modify(ht,S))}nationalBoundaries(){let ht="./gis/nationalBoundaries.json",M=new mars3d.layer.GeoJsonLayer({name:"国界",url:ht,format:_t=>{try{_t=turf.simplify(_t,{tolerance:1e-5,highQuality:!1,mutate:!0})}catch(mt){console.error(mt)}return _t},symbol:{type:"polylineC",styleOptions:{width:2,materialType:"Color",materialOptions:{color:"#CD9B1D"},distanceDisplayCondition:!0,distanceDisplayCondition_near:1e3,distanceDisplayCondition_far:2e7,clampToGround:!0,classificationType:Cesium.ClassificationType.TERRAIN}}});map.addLayer(M)}}const lc=[Bh,Gh],hc={continuation:null,mapModali:null,install(g){if(lc.forEach((Mt,qt)=>{g.component(Mt.name,Mt)}),this.continuation){g.config.globalProperties.$continuation=this.continuation;return}let ht=ke.createApp(Uh),M=document.createElement("div"),_t=document.body;if(_t.appendChild(M),this.loading=ht.mount(M),g.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){g.config.globalProperties.$mapModali=this.mapModali;return}let mt=ke.createApp(Fh),S=document.createElement("div");_t.appendChild(S),this.mapModali=mt.mount(S),g.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};dn.BimBackgroundPlate=Gh,dn.BimCutscenes=Uh,dn.BimModel=ic,dn.BimVector=ac,dn.Button=Bh,dn.ChbimPlugins=hc,dn.MapModali=Fh,Object.defineProperty(dn,Symbol.toStringTag,{value:"Module"})});
|