chbim-plugins 0.0.134 → 0.0.136

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.
@@ -1,4 +1,4 @@
1
- (function(Pi,oi){typeof exports=="object"&&typeof module<"u"?oi(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],oi):(Pi=typeof globalThis<"u"?globalThis:Pi||self,oi(Pi["chbim-plugins"]={},Pi.Vue))})(this,function(Pi,oi){"use strict";var T1=Object.defineProperty;var M1=(Pi,oi,Ll)=>oi in Pi?T1(Pi,oi,{enumerable:!0,configurable:!0,writable:!0,value:Ll}):Pi[oi]=Ll;var Pl=(Pi,oi,Ll)=>(M1(Pi,typeof oi!="symbol"?oi+"":oi,Ll),Ll);const Ll="",Tf=((x,a)=>{const s=x.__vccOpts||x;for(const[c,d]of a)s[c]=d;return s})(Object.assign({name:"MukButton"},{props:{size:{type:String,default:"middle"},type:{type:String,default:"default"}},setup(x){return(a,s)=>(oi.openBlock(),oi.createElementBlock("button",{class:oi.normalizeClass(["muk-btn",[x.size,x.type]])},[oi.renderSlot(a.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-0e6d93cd"]]);class Gp{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 Hp={class:"mask js-mask"},Vp=oi.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),Wp=oi.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),jp=oi.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),Xp={class:"mask__inner"},qp={class:"logo logo--mask"},Yp={class:"js-logo",style:{color:"#fff"}},Zp=oi.createElementVNode("div",{class:"mask-line js-mask-line"},[oi.createElementVNode("div",{class:"mask-line__inner js-mask-line"})],-1),Jp={name:"BimCutscenes"},Mf=oi.defineComponent({...Jp,props:{text:{type:String,default:"CHBIM云平台"}},setup(x,{expose:a}){const s=oi.ref(null),c=()=>{s.value===null&&(s.value=new Gp)},d=()=>{c(),s.value.continuation()};return oi.onMounted(()=>{c()}),a({continuation:d}),(u,m)=>(oi.openBlock(),oi.createElementBlock("div",Hp,[Vp,Wp,jp,oi.createElementVNode("div",Xp,[oi.createElementVNode("figure",qp,[oi.createElementVNode("p",Yp,oi.toDisplayString(x.text),1)]),Zp])]))}}),C1="";/*!
1
+ (function(Pi,oi){typeof exports=="object"&&typeof module<"u"?oi(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],oi):(Pi=typeof globalThis<"u"?globalThis:Pi||self,oi(Pi["chbim-plugins"]={},Pi.Vue))})(this,function(Pi,oi){"use strict";var T1=Object.defineProperty;var M1=(Pi,oi,Ll)=>oi in Pi?T1(Pi,oi,{enumerable:!0,configurable:!0,writable:!0,value:Ll}):Pi[oi]=Ll;var Ba=(Pi,oi,Ll)=>(M1(Pi,typeof oi!="symbol"?oi+"":oi,Ll),Ll);const Ll="",Tf=((x,a)=>{const s=x.__vccOpts||x;for(const[c,d]of a)s[c]=d;return s})(Object.assign({name:"MukButton"},{props:{size:{type:String,default:"middle"},type:{type:String,default:"default"}},setup(x){return(a,s)=>(oi.openBlock(),oi.createElementBlock("button",{class:oi.normalizeClass(["muk-btn",[x.size,x.type]])},[oi.renderSlot(a.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-0e6d93cd"]]);class Gp{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 Hp={class:"mask js-mask"},Vp=oi.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),Wp=oi.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),jp=oi.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),Xp={class:"mask__inner"},qp={class:"logo logo--mask"},Yp={class:"js-logo",style:{color:"#fff"}},Zp=oi.createElementVNode("div",{class:"mask-line js-mask-line"},[oi.createElementVNode("div",{class:"mask-line__inner js-mask-line"})],-1),Jp={name:"BimCutscenes"},Mf=oi.defineComponent({...Jp,props:{text:{type:String,default:"CHBIM云平台"}},setup(x,{expose:a}){const s=oi.ref(null),c=()=>{s.value===null&&(s.value=new Gp)},d=()=>{c(),s.value.continuation()};return oi.onMounted(()=>{c()}),a({continuation:d}),(u,m)=>(oi.openBlock(),oi.createElementBlock("div",Hp,[Vp,Wp,jp,oi.createElementVNode("div",Xp,[oi.createElementVNode("figure",qp,[oi.createElementVNode("p",Yp,oi.toDisplayString(x.text),1)]),Zp])]))}}),C1="";/*!
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 ln=typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window;(ln._gsQueue||(ln._gsQueue=[])).push(function(){ln._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(x,a,s){var c=function(E){var L,T=[],M=E.length;for(L=0;L!==M;T.push(E[L++]));return T},d=function(E,L,T){var M,R,C=E.cycle;for(M in C)R=C[M],E[M]=typeof R=="function"?R(T,L[T]):R[T%R.length];delete E.cycle},u=function(E,L,T){s.call(this,E,L,T),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=u.prototype.render},m=1e-10,g=s._internals,_=g.isSelector,S=g.isArray,b=u.prototype=s.to({},.1,{}),O=[];u.version="2.0.2",b.constructor=u,b.kill()._gc=!1,u.killTweensOf=u.killDelayedCallsTo=s.killTweensOf,u.getTweensOf=s.getTweensOf,u.lagSmoothing=s.lagSmoothing,u.ticker=s.ticker,u.render=s.render,b.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),s.prototype.invalidate.call(this)},b.updateTo=function(E,L){var T,M=this.ratio,R=this.vars.immediateRender||E.immediateRender;L&&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(T in E)this.vars[T]=E[T];if(this._initted||R){if(L)this._initted=!1,R&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&s._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var C=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(C,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||R)for(var U,N=1/(1-M),X=this._firstPT;X;)U=X.s+X.c,X.c*=N,X.s=U-X.c,X=X._next}return this},b.render=function(E,L,T){this._initted||this._duration===0&&this.vars.repeat&&this.invalidate();var M,R,C,U,N,X,K,Z,ct,Rt=this._dirty?this.totalDuration():this._totalDuration,et=this._time,_t=this._totalTime,G=this._cycle,Pt=this._duration,Et=this._rawPrevTime;if(E>=Rt-1e-7&&E>=0?(this._totalTime=Rt,this._cycle=this._repeat,this._yoyo&&1&this._cycle?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=Pt,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(M=!0,R="onComplete",T=T||this._timeline.autoRemoveChildren),Pt===0&&(this._initted||!this.vars.lazy||T)&&(this._startTime===this._timeline._duration&&(E=0),(0>Et||0>=E&&E>=-1e-7||Et===m&&this.data!=="isPause")&&Et!==E&&(T=!0,Et>m&&(R="onReverseComplete")),this._rawPrevTime=Z=!L||E||Et===E?E:m)):1e-7>E?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(_t!==0||Pt===0&&Et>0)&&(R="onReverseComplete",M=this._reversed),0>E&&(this._active=!1,Pt===0&&(this._initted||!this.vars.lazy||T)&&(Et>=0&&(T=!0),this._rawPrevTime=Z=!L||E||Et===E?E:m)),this._initted||(T=!0)):(this._totalTime=this._time=E,this._repeat!==0&&(U=Pt+this._repeatDelay,this._cycle=this._totalTime/U>>0,this._cycle!==0&&this._cycle===this._totalTime/U&&E>=_t&&this._cycle--,this._time=this._totalTime-this._cycle*U,this._yoyo&&1&this._cycle&&(this._time=Pt-this._time,ct=this._yoyoEase||this.vars.yoyoEase,ct&&(this._yoyoEase||(ct!==!0||this._initted?this._yoyoEase=ct=ct===!0?this._ease:ct instanceof Ease?ct:Ease.map[ct]:(ct=this.vars.ease,this._yoyoEase=ct=ct?ct instanceof Ease?ct:typeof ct=="function"?new Ease(ct,this.vars.easeParams):Ease.map[ct]||s.defaultEase:s.defaultEase)),this.ratio=ct?1-ct.getRatio((Pt-this._time)/Pt):0)),this._time>Pt?this._time=Pt:this._time<0&&(this._time=0)),this._easeType&&!ct?(N=this._time/Pt,X=this._easeType,K=this._easePower,(X===1||X===3&&N>=.5)&&(N=1-N),X===3&&(N*=2),K===1?N*=N:K===2?N*=N*N:K===3?N*=N*N*N:K===4&&(N*=N*N*N*N),X===1?this.ratio=1-N:X===2?this.ratio=N:this._time/Pt<.5?this.ratio=N/2:this.ratio=1-N/2):ct||(this.ratio=this._ease.getRatio(this._time/Pt))),et===this._time&&!T&&G===this._cycle)return void(_t!==this._totalTime&&this._onUpdate&&(L||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!T&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=et,this._totalTime=_t,this._rawPrevTime=Et,this._cycle=G,g.lazyTweens.push(this),void(this._lazy=[E,L]);!this._time||M||ct?M&&this._ease._calcEnd&&!ct&&(this.ratio=this._ease.getRatio(this._time===0?0:1)):this.ratio=this._ease.getRatio(this._time/Pt)}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==et&&E>=0&&(this._active=!0),_t===0&&(this._initted===2&&E>0&&this._init(),this._startAt&&(E>=0?this._startAt.render(E,!0,T):R||(R="_dummyGS")),this.vars.onStart&&(this._totalTime!==0||Pt===0)&&(L||this._callback("onStart"))),C=this._firstPT;C;)C.f?C.t[C.p](C.c*this.ratio+C.s):C.t[C.p]=C.c*this.ratio+C.s,C=C._next;this._onUpdate&&(0>E&&this._startAt&&this._startTime&&this._startAt.render(E,!0,T),L||(this._totalTime!==_t||R)&&this._callback("onUpdate")),this._cycle!==G&&(L||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),R&&(!this._gc||T)&&(0>E&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(E,!0,T),M&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!L&&this.vars[R]&&this._callback(R),Pt===0&&this._rawPrevTime===m&&Z!==m&&(this._rawPrevTime=0))},u.to=function(E,L,T){return new u(E,L,T)},u.from=function(E,L,T){return T.runBackwards=!0,T.immediateRender=T.immediateRender!=0,new u(E,L,T)},u.fromTo=function(E,L,T,M){return M.startAt=T,M.immediateRender=M.immediateRender!=0&&T.immediateRender!=0,new u(E,L,M)},u.staggerTo=u.allTo=function(E,L,T,M,R,C,U){M=M||0;var N,X,K,Z,ct=0,Rt=[],et=function(){T.onComplete&&T.onComplete.apply(T.onCompleteScope||this,arguments),R.apply(U||T.callbackScope||this,C||O)},_t=T.cycle,G=T.startAt&&T.startAt.cycle;for(S(E)||(typeof E=="string"&&(E=s.selector(E)||E),_(E)&&(E=c(E))),E=E||[],0>M&&(E=c(E),E.reverse(),M*=-1),N=E.length-1,K=0;N>=K;K++){X={};for(Z in T)X[Z]=T[Z];if(_t&&(d(X,E,K),X.duration!=null&&(L=X.duration,delete X.duration)),G){G=X.startAt={};for(Z in T.startAt)G[Z]=T.startAt[Z];d(X.startAt,E,K)}X.delay=ct+(X.delay||0),K===N&&R&&(X.onComplete=et),Rt[K]=new u(E[K],L,X),ct+=M}return Rt},u.staggerFrom=u.allFrom=function(E,L,T,M,R,C,U){return T.runBackwards=!0,T.immediateRender=T.immediateRender!=0,u.staggerTo(E,L,T,M,R,C,U)},u.staggerFromTo=u.allFromTo=function(E,L,T,M,R,C,U,N){return M.startAt=T,M.immediateRender=M.immediateRender!=0&&T.immediateRender!=0,u.staggerTo(E,L,M,R,C,U,N)},u.delayedCall=function(E,L,T,M,R){return new u(L,0,{delay:E,onComplete:L,onCompleteParams:T,callbackScope:M,onReverseComplete:L,onReverseCompleteParams:T,immediateRender:!1,useFrames:R,overwrite:0})},u.set=function(E,L){return new u(E,0,L)},u.isTweening=function(E){return s.getTweensOf(E,!0).length>0};var k=function(E,L){for(var T=[],M=0,R=E._first;R;)R instanceof s?T[M++]=R:(L&&(T[M++]=R),T=T.concat(k(R,L)),M=T.length),R=R._next;return T},D=u.getAllTweens=function(E){return k(x._rootTimeline,E).concat(k(x._rootFramesTimeline,E))};u.killAll=function(E,L,T,M){L==null&&(L=!0),T==null&&(T=!0);var R,C,U,N=D(M!=0),X=N.length,K=L&&T&&M;for(U=0;X>U;U++)C=N[U],(K||C instanceof a||(R=C.target===C.vars.onComplete)&&T||L&&!R)&&(E?C.totalTime(C._reversed?0:C.totalDuration()):C._enabled(!1,!1))},u.killChildTweensOf=function(E,L){if(E!=null){var T,M,R,C,U,N=g.tweenLookup;if(typeof E=="string"&&(E=s.selector(E)||E),_(E)&&(E=c(E)),S(E))for(C=E.length;--C>-1;)u.killChildTweensOf(E[C],L);else{T=[];for(R in N)for(M=N[R].target.parentNode;M;)M===E&&(T=T.concat(N[R].tweens)),M=M.parentNode;for(U=T.length,C=0;U>C;C++)L&&T[C].totalTime(T[C].totalDuration()),T[C]._enabled(!1,!1)}}};var F=function(E,L,T,M){L=L!==!1,T=T!==!1,M=M!==!1;for(var R,C,U=D(M),N=L&&T&&M,X=U.length;--X>-1;)C=U[X],(N||C instanceof a||(R=C.target===C.vars.onComplete)&&T||L&&!R)&&C.paused(E)};return u.pauseAll=function(E,L,T){F(!0,E,L,T)},u.resumeAll=function(E,L,T){F(!1,E,L,T)},u.globalTimeScale=function(E){var L=x._rootTimeline,T=s.ticker.time;return arguments.length?(E=E||m,L._startTime=T-(T-L._startTime)*L._timeScale/E,L=x._rootFramesTimeline,T=s.ticker.frame,L._startTime=T-(T-L._startTime)*L._timeScale/E,L._timeScale=x._rootTimeline._timeScale=E,E):L._timeScale},b.progress=function(E,L){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-E:E)+this._cycle*(this._duration+this._repeatDelay),L):this._time/this.duration()},b.totalProgress=function(E,L){return arguments.length?this.totalTime(this.totalDuration()*E,L):this._totalTime/this.totalDuration()},b.time=function(E,L){return arguments.length?(this._dirty&&this.totalDuration(),E>this._duration&&(E=this._duration),this._yoyo&&1&this._cycle?E=this._duration-E+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(E+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(E,L)):this._time},b.duration=function(E){return arguments.length?x.prototype.duration.call(this,E):this._duration},b.totalDuration=function(E){return arguments.length?this._repeat===-1?this:this.duration((E-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)},b.repeat=function(E){return arguments.length?(this._repeat=E,this._uncache(!0)):this._repeat},b.repeatDelay=function(E){return arguments.length?(this._repeatDelay=E,this._uncache(!0)):this._repeatDelay},b.yoyo=function(E){return arguments.length?(this._yoyo=E,this):this._yoyo},u},!0),ln._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(x,a,s){var c=function(T){a.call(this,T),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var M,R,C=this.vars;for(R in C)M=C[R],_(M)&&M.join("").indexOf("{self}")!==-1&&(C[R]=this._swapSelfInParams(M));_(C.tweens)&&this.add(C.tweens,0,C.align,C.stagger)},d=1e-10,u=s._internals,m=c._internals={},g=u.isSelector,_=u.isArray,S=u.lazyTweens,b=u.lazyRender,O=ln._gsDefine.globals,k=function(T){var M,R={};for(M in T)R[M]=T[M];return R},D=function(T,M,R){var C,U,N=T.cycle;for(C in N)U=N[C],T[C]=typeof U=="function"?U(R,M[R]):U[R%U.length];delete T.cycle},F=m.pauseCallback=function(){},E=function(T){var M,R=[],C=T.length;for(M=0;M!==C;R.push(T[M++]));return R},L=c.prototype=new a;return c.version="2.0.2",L.constructor=c,L.kill()._gc=L._forcingPlayhead=L._hasPause=!1,L.to=function(T,M,R,C){var U=R.repeat&&O.TweenMax||s;return M?this.add(new U(T,M,R),C):this.set(T,R,C)},L.from=function(T,M,R,C){return this.add((R.repeat&&O.TweenMax||s).from(T,M,R),C)},L.fromTo=function(T,M,R,C,U){var N=C.repeat&&O.TweenMax||s;return M?this.add(N.fromTo(T,M,R,C),U):this.set(T,C,U)},L.staggerTo=function(T,M,R,C,U,N,X,K){var Z,ct,Rt=new c({onComplete:N,onCompleteParams:X,callbackScope:K,smoothChildTiming:this.smoothChildTiming}),et=R.cycle;for(typeof T=="string"&&(T=s.selector(T)||T),T=T||[],g(T)&&(T=E(T)),C=C||0,0>C&&(T=E(T),T.reverse(),C*=-1),ct=0;ct<T.length;ct++)Z=k(R),Z.startAt&&(Z.startAt=k(Z.startAt),Z.startAt.cycle&&D(Z.startAt,T,ct)),et&&(D(Z,T,ct),Z.duration!=null&&(M=Z.duration,delete Z.duration)),Rt.to(T[ct],M,Z,ct*C);return this.add(Rt,U)},L.staggerFrom=function(T,M,R,C,U,N,X,K){return R.immediateRender=R.immediateRender!=0,R.runBackwards=!0,this.staggerTo(T,M,R,C,U,N,X,K)},L.staggerFromTo=function(T,M,R,C,U,N,X,K,Z){return C.startAt=R,C.immediateRender=C.immediateRender!=0&&R.immediateRender!=0,this.staggerTo(T,M,C,U,N,X,K,Z)},L.call=function(T,M,R,C){return this.add(s.delayedCall(0,T,M,R),C)},L.set=function(T,M,R){return R=this._parseTimeOrLabel(R,0,!0),M.immediateRender==null&&(M.immediateRender=R===this._time&&!this._paused),this.add(new s(T,0,M),R)},c.exportRoot=function(T,M){T=T||{},T.smoothChildTiming==null&&(T.smoothChildTiming=!0);var R,C,U,N,X=new c(T),K=X._timeline;for(M==null&&(M=!0),K._remove(X,!0),X._startTime=0,X._rawPrevTime=X._time=X._totalTime=K._time,U=K._first;U;)N=U._next,M&&U instanceof s&&U.target===U.vars.onComplete||(C=U._startTime-U._delay,0>C&&(R=1),X.add(U,C)),U=N;return K.add(X,0),R&&X.totalDuration(),X},L.add=function(T,M,R,C){var U,N,X,K,Z,ct;if(typeof M!="number"&&(M=this._parseTimeOrLabel(M,0,!0,T)),!(T instanceof x)){if(T instanceof Array||T&&T.push&&_(T)){for(R=R||"normal",C=C||0,U=M,N=T.length,X=0;N>X;X++)_(K=T[X])&&(K=new c({tweens:K})),this.add(K,U),typeof K!="string"&&typeof K!="function"&&(R==="sequence"?U=K._startTime+K.totalDuration()/K._timeScale:R==="start"&&(K._startTime-=K.delay())),U+=C;return this._uncache(!0)}if(typeof T=="string")return this.addLabel(T,M);if(typeof T!="function")throw"Cannot add "+T+" into the timeline; it is not a tween, timeline, function, or string.";T=s.delayedCall(0,T)}if(a.prototype.add.call(this,T,M),T._time&&(U=Math.max(0,Math.min(T.totalDuration(),(this.rawTime()-T._startTime)*T._timeScale)),Math.abs(U-T._totalTime)>1e-5&&T.render(U,!1,!1)),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(Z=this,ct=Z.rawTime()>T._startTime;Z._timeline;)ct&&Z._timeline.smoothChildTiming?Z.totalTime(Z._totalTime,!0):Z._gc&&Z._enabled(!0,!1),Z=Z._timeline;return this},L.remove=function(T){if(T instanceof x){this._remove(T,!1);var M=T._timeline=T.vars.useFrames?x._rootFramesTimeline:x._rootTimeline;return T._startTime=(T._paused?T._pauseTime:M._time)-(T._reversed?T.totalDuration()-T._totalTime:T._totalTime)/T._timeScale,this}if(T instanceof Array||T&&T.push&&_(T)){for(var R=T.length;--R>-1;)this.remove(T[R]);return this}return typeof T=="string"?this.removeLabel(T):this.kill(null,T)},L._remove=function(T,M){a.prototype._remove.call(this,T,M);var R=this._last;return R?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},L.append=function(T,M){return this.add(T,this._parseTimeOrLabel(null,M,!0,T))},L.insert=L.insertMultiple=function(T,M,R,C){return this.add(T,M||0,R,C)},L.appendMultiple=function(T,M,R,C){return this.add(T,this._parseTimeOrLabel(null,M,!0,T),R,C)},L.addLabel=function(T,M){return this._labels[T]=this._parseTimeOrLabel(M),this},L.addPause=function(T,M,R,C){var U=s.delayedCall(0,F,R,C||this);return U.vars.onComplete=U.vars.onReverseComplete=M,U.data="isPause",this._hasPause=!0,this.add(U,T)},L.removeLabel=function(T){return delete this._labels[T],this},L.getLabelTime=function(T){return this._labels[T]!=null?this._labels[T]:-1},L._parseTimeOrLabel=function(T,M,R,C){var U,N;if(C instanceof x&&C.timeline===this)this.remove(C);else if(C&&(C instanceof Array||C.push&&_(C)))for(N=C.length;--N>-1;)C[N]instanceof x&&C[N].timeline===this&&this.remove(C[N]);if(U=typeof T!="number"||M?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,typeof M=="string")return this._parseTimeOrLabel(M,R&&typeof T=="number"&&this._labels[M]==null?T-U:0,R);if(M=M||0,typeof T!="string"||!isNaN(T)&&this._labels[T]==null)T==null&&(T=U);else{if(N=T.indexOf("="),N===-1)return this._labels[T]==null?R?this._labels[T]=U+M:M:this._labels[T]+M;M=parseInt(T.charAt(N-1)+"1",10)*Number(T.substr(N+1)),T=N>1?this._parseTimeOrLabel(T.substr(0,N-1),0,R):U}return Number(T)+M},L.seek=function(T,M){return this.totalTime(typeof T=="number"?T:this._parseTimeOrLabel(T),M!==!1)},L.stop=function(){return this.paused(!0)},L.gotoAndPlay=function(T,M){return this.play(T,M)},L.gotoAndStop=function(T,M){return this.pause(T,M)},L.render=function(T,M,R){this._gc&&this._enabled(!0,!1);var C,U,N,X,K,Z,ct,Rt=this._time,et=this._dirty?this.totalDuration():this._totalDuration,_t=this._startTime,G=this._timeScale,Pt=this._paused;if(Rt!==this._time&&(T+=this._time-Rt),T>=et-1e-7&&T>=0)this._totalTime=this._time=et,this._reversed||this._hasPausedChild()||(U=!0,X="onComplete",K=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=T&&T>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===d)&&this._rawPrevTime!==T&&this._first&&(K=!0,this._rawPrevTime>d&&(X="onReverseComplete"))),this._rawPrevTime=this._duration||!M||T||this._rawPrevTime===T?T:d,T=et+1e-4;else if(1e-7>T)if(this._totalTime=this._time=0,(Rt!==0||this._duration===0&&this._rawPrevTime!==d&&(this._rawPrevTime>0||0>T&&this._rawPrevTime>=0))&&(X="onReverseComplete",U=this._reversed),0>T)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(K=U=!0,X="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(K=!0),this._rawPrevTime=T;else{if(this._rawPrevTime=this._duration||!M||T||this._rawPrevTime===T?T:d,T===0&&U)for(C=this._first;C&&C._startTime===0;)C._duration||(U=!1),C=C._next;T=0,this._initted||(K=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!M){if(T>=Rt)for(C=this._first;C&&C._startTime<=T&&!Z;)C._duration||C.data!=="isPause"||C.ratio||C._startTime===0&&this._rawPrevTime===0||(Z=C),C=C._next;else for(C=this._last;C&&C._startTime>=T&&!Z;)C._duration||C.data==="isPause"&&C._rawPrevTime>0&&(Z=C),C=C._prev;Z&&(this._time=T=Z._startTime,this._totalTime=T+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=T}if(this._time!==Rt&&this._first||R||K||Z){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==Rt&&T>0&&(this._active=!0),Rt===0&&this.vars.onStart&&(this._time===0&&this._duration||M||this._callback("onStart")),ct=this._time,ct>=Rt)for(C=this._first;C&&(N=C._next,ct===this._time&&(!this._paused||Pt));)(C._active||C._startTime<=ct&&!C._paused&&!C._gc)&&(Z===C&&this.pause(),C._reversed?C.render((C._dirty?C.totalDuration():C._totalDuration)-(T-C._startTime)*C._timeScale,M,R):C.render((T-C._startTime)*C._timeScale,M,R)),C=N;else for(C=this._last;C&&(N=C._prev,ct===this._time&&(!this._paused||Pt));){if(C._active||C._startTime<=Rt&&!C._paused&&!C._gc){if(Z===C){for(Z=C._prev;Z&&Z.endTime()>this._time;)Z.render(Z._reversed?Z.totalDuration()-(T-Z._startTime)*Z._timeScale:(T-Z._startTime)*Z._timeScale,M,R),Z=Z._prev;Z=null,this.pause()}C._reversed?C.render((C._dirty?C.totalDuration():C._totalDuration)-(T-C._startTime)*C._timeScale,M,R):C.render((T-C._startTime)*C._timeScale,M,R)}C=N}this._onUpdate&&(M||(S.length&&b(),this._callback("onUpdate"))),X&&(this._gc||(_t===this._startTime||G!==this._timeScale)&&(this._time===0||et>=this.totalDuration())&&(U&&(S.length&&b(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!M&&this.vars[X]&&this._callback(X)))}},L._hasPausedChild=function(){for(var T=this._first;T;){if(T._paused||T instanceof c&&T._hasPausedChild())return!0;T=T._next}return!1},L.getChildren=function(T,M,R,C){C=C||-9999999999;for(var U=[],N=this._first,X=0;N;)N._startTime<C||(N instanceof s?M!==!1&&(U[X++]=N):(R!==!1&&(U[X++]=N),T!==!1&&(U=U.concat(N.getChildren(!0,M,R)),X=U.length))),N=N._next;return U},L.getTweensOf=function(T,M){var R,C,U=this._gc,N=[],X=0;for(U&&this._enabled(!0,!0),R=s.getTweensOf(T),C=R.length;--C>-1;)(R[C].timeline===this||M&&this._contains(R[C]))&&(N[X++]=R[C]);return U&&this._enabled(!1,!0),N},L.recent=function(){return this._recent},L._contains=function(T){for(var M=T.timeline;M;){if(M===this)return!0;M=M.timeline}return!1},L.shiftChildren=function(T,M,R){R=R||0;for(var C,U=this._first,N=this._labels;U;)U._startTime>=R&&(U._startTime+=T),U=U._next;if(M)for(C in N)N[C]>=R&&(N[C]+=T);return this._uncache(!0)},L._kill=function(T,M){if(!T&&!M)return this._enabled(!1,!1);for(var R=M?this.getTweensOf(M):this.getChildren(!0,!0,!1),C=R.length,U=!1;--C>-1;)R[C]._kill(T,M)&&(U=!0);return U},L.clear=function(T){var M=this.getChildren(!1,!0,!0),R=M.length;for(this._time=this._totalTime=0;--R>-1;)M[R]._enabled(!1,!1);return T!==!1&&(this._labels={}),this._uncache(!0)},L.invalidate=function(){for(var T=this._first;T;)T.invalidate(),T=T._next;return x.prototype.invalidate.call(this)},L._enabled=function(T,M){if(T===this._gc)for(var R=this._first;R;)R._enabled(T,!0),R=R._next;return a.prototype._enabled.call(this,T,M)},L.totalTime=function(T,M,R){this._forcingPlayhead=!0;var C=x.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,C},L.duration=function(T){return arguments.length?(this.duration()!==0&&T!==0&&this.timeScale(this._duration/T),this):(this._dirty&&this.totalDuration(),this._duration)},L.totalDuration=function(T){if(!arguments.length){if(this._dirty){for(var M,R,C=0,U=this._last,N=999999999999;U;)M=U._prev,U._dirty&&U.totalDuration(),U._startTime>N&&this._sortChildren&&!U._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(U,U._startTime-U._delay),this._calculatingDuration=0):N=U._startTime,U._startTime<0&&!U._paused&&(C-=U._startTime,this._timeline.smoothChildTiming&&(this._startTime+=U._startTime/this._timeScale,this._time-=U._startTime,this._totalTime-=U._startTime,this._rawPrevTime-=U._startTime),this.shiftChildren(-U._startTime,!1,-9999999999),N=0),R=U._startTime+U._totalDuration/U._timeScale,R>C&&(C=R),U=M;this._duration=this._totalDuration=C,this._dirty=!1}return this._totalDuration}return T&&this.totalDuration()?this.timeScale(this._totalDuration/T):this},L.paused=function(T){if(!T)for(var M=this._first,R=this._time;M;)M._startTime===R&&M.data==="isPause"&&(M._rawPrevTime=0),M=M._next;return x.prototype.paused.apply(this,arguments)},L.usesFrames=function(){for(var T=this._timeline;T._timeline;)T=T._timeline;return T===x._rootFramesTimeline},L.rawTime=function(T){return T&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(T)-this._startTime)*this._timeScale},c},!0),ln._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(x,a,s){var c=function(O){x.call(this,O),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},d=1e-10,u=a._internals,m=u.lazyTweens,g=u.lazyRender,_=ln._gsDefine.globals,S=new s(null,null,1,0),b=c.prototype=new x;return b.constructor=c,b.kill()._gc=!1,c.version="2.0.2",b.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),x.prototype.invalidate.call(this)},b.addCallback=function(O,k,D,F){return this.add(a.delayedCall(0,O,D,F),k)},b.removeCallback=function(O,k){if(O)if(k==null)this._kill(null,O);else for(var D=this.getTweensOf(O,!1),F=D.length,E=this._parseTimeOrLabel(k);--F>-1;)D[F]._startTime===E&&D[F]._enabled(!1,!1);return this},b.removePause=function(O){return this.removeCallback(x._internals.pauseCallback,O)},b.tweenTo=function(O,k){k=k||{};var D,F,E,L={ease:S,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},T=k.repeat&&_.TweenMax||a;for(F in k)L[F]=k[F];return L.time=this._parseTimeOrLabel(O),D=Math.abs(Number(L.time)-this._time)/this._timeScale||.001,E=new T(this,D,L),L.onStart=function(){E.target.paused(!0),E.vars.time===E.target.time()||D!==E.duration()||E.isFromTo||E.duration(Math.abs(E.vars.time-E.target.time())/E.target._timeScale).render(E.time(),!0,!0),k.onStart&&k.onStart.apply(k.onStartScope||k.callbackScope||E,k.onStartParams||[])},E},b.tweenFromTo=function(O,k,D){D=D||{},O=this._parseTimeOrLabel(O),D.startAt={onComplete:this.seek,onCompleteParams:[O],callbackScope:this},D.immediateRender=D.immediateRender!==!1;var F=this.tweenTo(k,D);return F.isFromTo=1,F.duration(Math.abs(F.vars.time-O)/this._timeScale||.001)},b.render=function(O,k,D){this._gc&&this._enabled(!0,!1);var F,E,L,T,M,R,C,U,N=this._time,X=this._dirty?this.totalDuration():this._totalDuration,K=this._duration,Z=this._totalTime,ct=this._startTime,Rt=this._timeScale,et=this._rawPrevTime,_t=this._paused,G=this._cycle;if(N!==this._time&&(O+=this._time-N),O>=X-1e-7&&O>=0)this._locked||(this._totalTime=X,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(E=!0,T="onComplete",M=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=O&&O>=-1e-7||0>et||et===d)&&et!==O&&this._first&&(M=!0,et>d&&(T="onReverseComplete"))),this._rawPrevTime=this._duration||!k||O||this._rawPrevTime===O?O:d,this._yoyo&&1&this._cycle?this._time=O=0:(this._time=K,O=K+1e-4);else if(1e-7>O)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(N!==0||K===0&&et!==d&&(et>0||0>O&&et>=0)&&!this._locked)&&(T="onReverseComplete",E=this._reversed),0>O)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(M=E=!0,T="onReverseComplete"):et>=0&&this._first&&(M=!0),this._rawPrevTime=O;else{if(this._rawPrevTime=K||!k||O||this._rawPrevTime===O?O:d,O===0&&E)for(F=this._first;F&&F._startTime===0;)F._duration||(E=!1),F=F._next;O=0,this._initted||(M=!0)}else if(K===0&&0>et&&(M=!0),this._time=this._rawPrevTime=O,this._locked||(this._totalTime=O,this._repeat!==0&&(R=K+this._repeatDelay,this._cycle=this._totalTime/R>>0,this._cycle!==0&&this._cycle===this._totalTime/R&&O>=Z&&this._cycle--,this._time=this._totalTime-this._cycle*R,this._yoyo&&1&this._cycle&&(this._time=K-this._time),this._time>K?(this._time=K,O=K+1e-4):this._time<0?this._time=O=0:O=this._time)),this._hasPause&&!this._forcingPlayhead&&!k){if(O=this._time,O>=N||this._repeat&&G!==this._cycle)for(F=this._first;F&&F._startTime<=O&&!C;)F._duration||F.data!=="isPause"||F.ratio||F._startTime===0&&this._rawPrevTime===0||(C=F),F=F._next;else for(F=this._last;F&&F._startTime>=O&&!C;)F._duration||F.data==="isPause"&&F._rawPrevTime>0&&(C=F),F=F._prev;C&&C._startTime<K&&(this._time=O=C._startTime,this._totalTime=O+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==G&&!this._locked){var Pt=this._yoyo&&(1&G)!==0,Et=Pt===(this._yoyo&&(1&this._cycle)!==0),At=this._totalTime,ce=this._cycle,re=this._rawPrevTime,Ft=this._time;if(this._totalTime=G*K,this._cycle<G?Pt=!Pt:this._totalTime+=K,this._time=N,this._rawPrevTime=K===0?et-1e-4:et,this._cycle=G,this._locked=!0,N=Pt?0:K,this.render(N,k,K===0),k||this._gc||this.vars.onRepeat&&(this._cycle=ce,this._locked=!1,this._callback("onRepeat")),N!==this._time||(Et&&(this._cycle=G,this._locked=!0,N=Pt?K+1e-4:-1e-4,this.render(N,!0,!1)),this._locked=!1,this._paused&&!_t))return;this._time=Ft,this._totalTime=At,this._cycle=ce,this._rawPrevTime=re}if(!(this._time!==N&&this._first||D||M||C))return void(Z!==this._totalTime&&this._onUpdate&&(k||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==Z&&O>0&&(this._active=!0),Z===0&&this.vars.onStart&&(this._totalTime===0&&this._totalDuration||k||this._callback("onStart")),U=this._time,U>=N)for(F=this._first;F&&(L=F._next,U===this._time&&(!this._paused||_t));)(F._active||F._startTime<=this._time&&!F._paused&&!F._gc)&&(C===F&&this.pause(),F._reversed?F.render((F._dirty?F.totalDuration():F._totalDuration)-(O-F._startTime)*F._timeScale,k,D):F.render((O-F._startTime)*F._timeScale,k,D)),F=L;else for(F=this._last;F&&(L=F._prev,U===this._time&&(!this._paused||_t));){if(F._active||F._startTime<=N&&!F._paused&&!F._gc){if(C===F){for(C=F._prev;C&&C.endTime()>this._time;)C.render(C._reversed?C.totalDuration()-(O-C._startTime)*C._timeScale:(O-C._startTime)*C._timeScale,k,D),C=C._prev;C=null,this.pause()}F._reversed?F.render((F._dirty?F.totalDuration():F._totalDuration)-(O-F._startTime)*F._timeScale,k,D):F.render((O-F._startTime)*F._timeScale,k,D)}F=L}this._onUpdate&&(k||(m.length&&g(),this._callback("onUpdate"))),T&&(this._locked||this._gc||(ct===this._startTime||Rt!==this._timeScale)&&(this._time===0||X>=this.totalDuration())&&(E&&(m.length&&g(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!k&&this.vars[T]&&this._callback(T)))},b.getActive=function(O,k,D){O==null&&(O=!0),k==null&&(k=!0),D==null&&(D=!1);var F,E,L=[],T=this.getChildren(O,k,D),M=0,R=T.length;for(F=0;R>F;F++)E=T[F],E.isActive()&&(L[M++]=E);return L},b.getLabelAfter=function(O){O||O!==0&&(O=this._time);var k,D=this.getLabelsArray(),F=D.length;for(k=0;F>k;k++)if(D[k].time>O)return D[k].name;return null},b.getLabelBefore=function(O){O==null&&(O=this._time);for(var k=this.getLabelsArray(),D=k.length;--D>-1;)if(k[D].time<O)return k[D].name;return null},b.getLabelsArray=function(){var O,k=[],D=0;for(O in this._labels)k[D++]={time:this._labels[O],name:O};return k.sort(function(F,E){return F.time-E.time}),k},b.invalidate=function(){return this._locked=!1,x.prototype.invalidate.call(this)},b.progress=function(O,k){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-O:O)+this._cycle*(this._duration+this._repeatDelay),k):this._time/this.duration()||0},b.totalProgress=function(O,k){return arguments.length?this.totalTime(this.totalDuration()*O,k):this._totalTime/this.totalDuration()||0},b.totalDuration=function(O){return arguments.length?this._repeat!==-1&&O?this.timeScale(this.totalDuration()/O):this:(this._dirty&&(x.prototype.totalDuration.call(this),this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},b.time=function(O,k){return arguments.length?(this._dirty&&this.totalDuration(),O>this._duration&&(O=this._duration),this._yoyo&&1&this._cycle?O=this._duration-O+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(O+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(O,k)):this._time},b.repeat=function(O){return arguments.length?(this._repeat=O,this._uncache(!0)):this._repeat},b.repeatDelay=function(O){return arguments.length?(this._repeatDelay=O,this._uncache(!0)):this._repeatDelay},b.yoyo=function(O){return arguments.length?(this._yoyo=O,this):this._yoyo},b.currentLabel=function(O){return arguments.length?this.seek(O,!0):this.getLabelBefore(this._time+1e-8)},c},!0),function(){var x=180/Math.PI,a=[],s=[],c=[],d={},u=ln._gsDefine.globals,m=function(T,M,R,C){R===C&&(R=C-(C-M)/1e6),T===M&&(M=T+(R-T)/1e6),this.a=T,this.b=M,this.c=R,this.d=C,this.da=C-T,this.ca=R-T,this.ba=M-T},g=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",_=function(T,M,R,C){var U={a:T},N={},X={},K={c:C},Z=(T+M)/2,ct=(M+R)/2,Rt=(R+C)/2,et=(Z+ct)/2,_t=(ct+Rt)/2,G=(_t-et)/8;return U.b=Z+(T-Z)/4,N.b=et+G,U.c=N.a=(U.b+N.b)/2,N.c=X.a=(et+_t)/2,X.b=_t-G,K.b=Rt+(C-Rt)/4,X.c=K.a=(X.b+K.b)/2,[U,N,X,K]},S=function(T,M,R,C,U){var N,X,K,Z,ct,Rt,et,_t,G,Pt,Et,At,ce,re=T.length-1,Ft=0,It=T[0].a;for(N=0;re>N;N++)ct=T[Ft],X=ct.a,K=ct.d,Z=T[Ft+1].d,U?(Et=a[N],At=s[N],ce=(At+Et)*M*.25/(C?.5:c[N]||.5),Rt=K-(K-X)*(C?.5*M:Et!==0?ce/Et:0),et=K+(Z-K)*(C?.5*M:At!==0?ce/At:0),_t=K-(Rt+((et-Rt)*(3*Et/(Et+At)+.5)/4||0))):(Rt=K-(K-X)*M*.5,et=K+(Z-K)*M*.5,_t=K-(Rt+et)/2),Rt+=_t,et+=_t,ct.c=G=Rt,N!==0?ct.b=It:ct.b=It=ct.a+.6*(ct.c-ct.a),ct.da=K-X,ct.ca=G-X,ct.ba=It-X,R?(Pt=_(X,It,G,K),T.splice(Ft,1,Pt[0],Pt[1],Pt[2],Pt[3]),Ft+=4):Ft++,It=et;ct=T[Ft],ct.b=It,ct.c=It+.4*(ct.d-It),ct.da=ct.d-ct.a,ct.ca=ct.c-ct.a,ct.ba=It-ct.a,R&&(Pt=_(ct.a,It,ct.c,ct.d),T.splice(Ft,1,Pt[0],Pt[1],Pt[2],Pt[3]))},b=function(T,M,R,C){var U,N,X,K,Z,ct,Rt=[];if(C)for(T=[C].concat(T),N=T.length;--N>-1;)typeof(ct=T[N][M])=="string"&&ct.charAt(1)==="="&&(T[N][M]=C[M]+Number(ct.charAt(0)+ct.substr(2)));if(U=T.length-2,0>U)return Rt[0]=new m(T[0][M],0,0,T[0][M]),Rt;for(N=0;U>N;N++)X=T[N][M],K=T[N+1][M],Rt[N]=new m(X,0,0,K),R&&(Z=T[N+2][M],a[N]=(a[N]||0)+(K-X)*(K-X),s[N]=(s[N]||0)+(Z-K)*(Z-K));return Rt[N]=new m(T[N][M],0,0,T[N+1][M]),Rt},O=function(T,M,R,C,U,N){var X,K,Z,ct,Rt,et,_t,G,Pt={},Et=[],At=N||T[0];U=typeof U=="string"?","+U+",":g,M==null&&(M=1);for(K in T[0])Et.push(K);if(T.length>1){for(G=T[T.length-1],_t=!0,X=Et.length;--X>-1;)if(K=Et[X],Math.abs(At[K]-G[K])>.05){_t=!1;break}_t&&(T=T.concat(),N&&T.unshift(N),T.push(T[1]),N=T[T.length-3])}for(a.length=s.length=c.length=0,X=Et.length;--X>-1;)K=Et[X],d[K]=U.indexOf(","+K+",")!==-1,Pt[K]=b(T,K,d[K],N);for(X=a.length;--X>-1;)a[X]=Math.sqrt(a[X]),s[X]=Math.sqrt(s[X]);if(!C){for(X=Et.length;--X>-1;)if(d[K])for(Z=Pt[Et[X]],et=Z.length-1,ct=0;et>ct;ct++)Rt=Z[ct+1].da/s[ct]+Z[ct].da/a[ct]||0,c[ct]=(c[ct]||0)+Rt*Rt;for(X=c.length;--X>-1;)c[X]=Math.sqrt(c[X])}for(X=Et.length,ct=R?4:1;--X>-1;)K=Et[X],Z=Pt[K],S(Z,M,R,C,d[K]),_t&&(Z.splice(0,ct),Z.splice(Z.length-ct,ct));return Pt},k=function(T,M,R){M=M||"soft";var C,U,N,X,K,Z,ct,Rt,et,_t,G,Pt={},Et=M==="cubic"?3:2,At=M==="soft",ce=[];if(At&&R&&(T=[R].concat(T)),T==null||T.length<Et+1)throw"invalid Bezier data";for(et in T[0])ce.push(et);for(Z=ce.length;--Z>-1;){for(et=ce[Z],Pt[et]=K=[],_t=0,Rt=T.length,ct=0;Rt>ct;ct++)C=R==null?T[ct][et]:typeof(G=T[ct][et])=="string"&&G.charAt(1)==="="?R[et]+Number(G.charAt(0)+G.substr(2)):Number(G),At&&ct>1&&Rt-1>ct&&(K[_t++]=(C+K[_t-2])/2),K[_t++]=C;for(Rt=_t-Et+1,_t=0,ct=0;Rt>ct;ct+=Et)C=K[ct],U=K[ct+1],N=K[ct+2],X=Et===2?0:K[ct+3],K[_t++]=G=Et===3?new m(C,U,N,X):new m(C,(2*U+C)/3,(2*U+N)/3,N);K.length=_t}return Pt},D=function(T,M,R){for(var C,U,N,X,K,Z,ct,Rt,et,_t,G,Pt=1/R,Et=T.length;--Et>-1;)for(_t=T[Et],N=_t.a,X=_t.d-N,K=_t.c-N,Z=_t.b-N,C=U=0,Rt=1;R>=Rt;Rt++)ct=Pt*Rt,et=1-ct,C=U-(U=(ct*ct*X+3*et*(ct*K+et*Z))*ct),G=Et*R+Rt-1,M[G]=(M[G]||0)+C*C},F=function(T,M){M=M>>0||6;var R,C,U,N,X=[],K=[],Z=0,ct=0,Rt=M-1,et=[],_t=[];for(R in T)D(T[R],X,M);for(U=X.length,C=0;U>C;C++)Z+=Math.sqrt(X[C]),N=C%M,_t[N]=Z,N===Rt&&(ct+=Z,N=C/M>>0,et[N]=_t,K[N]=ct,Z=0,_t=[]);return{length:ct,lengths:K,segments:et}},E=ln._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(T,M,R){this._target=T,M instanceof Array&&(M={values:M}),this._func={},this._mod={},this._props=[],this._timeRes=M.timeResolution==null?6:parseInt(M.timeResolution,10);var C,U,N,X,K,Z=M.values||[],ct={},Rt=Z[0],et=M.autoRotate||R.vars.orientToBezier;this._autoRotate=et?et instanceof Array?et:[["x","y","rotation",et===!0?0:Number(et)||0]]:null;for(C in Rt)this._props.push(C);for(N=this._props.length;--N>-1;)C=this._props[N],this._overwriteProps.push(C),U=this._func[C]=typeof T[C]=="function",ct[C]=U?T[C.indexOf("set")||typeof T["get"+C.substr(3)]!="function"?C:"get"+C.substr(3)]():parseFloat(T[C]),K||ct[C]!==Z[0][C]&&(K=ct);if(this._beziers=M.type!=="cubic"&&M.type!=="quadratic"&&M.type!=="soft"?O(Z,isNaN(M.curviness)?1:M.curviness,!1,M.type==="thruBasic",M.correlate,K):k(Z,M.type,ct),this._segCount=this._beziers[C].length,this._timeRes){var _t=F(this._beziers,this._timeRes);this._length=_t.length,this._lengths=_t.lengths,this._segments=_t.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(et=this._autoRotate)for(this._initialRotations=[],et[0]instanceof Array||(this._autoRotate=et=[et]),N=et.length;--N>-1;){for(X=0;3>X;X++)C=et[N][X],this._func[C]=typeof T[C]=="function"?T[C.indexOf("set")||typeof T["get"+C.substr(3)]!="function"?C:"get"+C.substr(3)]:!1;C=et[N][2],this._initialRotations[N]=(this._func[C]?this._func[C].call(this._target):this._target[C])||0,this._overwriteProps.push(C)}return this._startRatio=R.vars.runBackwards?1:0,!0},set:function(T){var M,R,C,U,N,X,K,Z,ct,Rt,et=this._segCount,_t=this._func,G=this._target,Pt=T!==this._startRatio;if(this._timeRes){if(ct=this._lengths,Rt=this._curSeg,T*=this._length,C=this._li,T>this._l2&&et-1>C){for(Z=et-1;Z>C&&(this._l2=ct[++C])<=T;);this._l1=ct[C-1],this._li=C,this._curSeg=Rt=this._segments[C],this._s2=Rt[this._s1=this._si=0]}else if(T<this._l1&&C>0){for(;C>0&&(this._l1=ct[--C])>=T;);C===0&&T<this._l1?this._l1=0:C++,this._l2=ct[C],this._li=C,this._curSeg=Rt=this._segments[C],this._s1=Rt[(this._si=Rt.length-1)-1]||0,this._s2=Rt[this._si]}if(M=C,T-=this._l1,C=this._si,T>this._s2&&C<Rt.length-1){for(Z=Rt.length-1;Z>C&&(this._s2=Rt[++C])<=T;);this._s1=Rt[C-1],this._si=C}else if(T<this._s1&&C>0){for(;C>0&&(this._s1=Rt[--C])>=T;);C===0&&T<this._s1?this._s1=0:C++,this._s2=Rt[C],this._si=C}X=(C+(T-this._s1)/(this._s2-this._s1))*this._prec||0}else M=0>T?0:T>=1?et-1:et*T>>0,X=(T-M*(1/et))*et;for(R=1-X,C=this._props.length;--C>-1;)U=this._props[C],N=this._beziers[U][M],K=(X*X*N.da+3*R*(X*N.ca+R*N.ba))*X+N.a,this._mod[U]&&(K=this._mod[U](K,G)),_t[U]?G[U](K):G[U]=K;if(this._autoRotate){var Et,At,ce,re,Ft,It,Nt,Pe=this._autoRotate;for(C=Pe.length;--C>-1;)U=Pe[C][2],It=Pe[C][3]||0,Nt=Pe[C][4]===!0?1:x,N=this._beziers[Pe[C][0]],Et=this._beziers[Pe[C][1]],N&&Et&&(N=N[M],Et=Et[M],At=N.a+(N.b-N.a)*X,re=N.b+(N.c-N.b)*X,At+=(re-At)*X,re+=(N.c+(N.d-N.c)*X-re)*X,ce=Et.a+(Et.b-Et.a)*X,Ft=Et.b+(Et.c-Et.b)*X,ce+=(Ft-ce)*X,Ft+=(Et.c+(Et.d-Et.c)*X-Ft)*X,K=Pt?Math.atan2(Ft-ce,re-At)*Nt+It:this._initialRotations[C],this._mod[U]&&(K=this._mod[U](K,G)),_t[U]?G[U](K):G[U]=K)}}}),L=E.prototype;E.bezierThrough=O,E.cubicToQuadratic=_,E._autoCSS=!0,E.quadraticToCubic=function(T,M,R){return new m(T,(2*M+T)/3,(2*M+R)/3,R)},E._cssRegister=function(){var T=u.CSSPlugin;if(T){var M=T._internals,R=M._parseToProxy,C=M._setPluginRatio,U=M.CSSPropTween;M._registerComplexSpecialProp("bezier",{parser:function(N,X,K,Z,ct,Rt){X instanceof Array&&(X={values:X}),Rt=new E;var et,_t,G,Pt=X.values,Et=Pt.length-1,At=[],ce={};if(0>Et)return ct;for(et=0;Et>=et;et++)G=R(N,Pt[et],Z,ct,Rt,Et!==et),At[et]=G.end;for(_t in X)ce[_t]=X[_t];return ce.values=At,ct=new U(N,"bezier",0,0,G.pt,2),ct.data=G,ct.plugin=Rt,ct.setRatio=C,ce.autoRotate===0&&(ce.autoRotate=!0),!ce.autoRotate||ce.autoRotate instanceof Array||(et=ce.autoRotate===!0?0:Number(ce.autoRotate),ce.autoRotate=G.end.left!=null?[["left","top","rotation",et,!1]]:G.end.x!=null?[["x","y","rotation",et,!1]]:!1),ce.autoRotate&&(Z._transform||Z._enableTransforms(!1),G.autoRotate=Z._target._gsTransform,G.proxy.rotation=G.autoRotate.rotation||0,Z._overwriteProps.push("rotation")),Rt._onInitTween(G.proxy,ce,Z._tween),ct}})}},L._mod=function(T){for(var M,R=this._overwriteProps,C=R.length;--C>-1;)M=T[R[C]],M&&typeof M=="function"&&(this._mod[R[C]]=M)},L._kill=function(T){var M,R,C=this._props;for(M in this._beziers)if(M in T)for(delete this._beziers[M],delete this._func[M],R=C.length;--R>-1;)C[R]===M&&C.splice(R,1);if(C=this._autoRotate)for(R=C.length;--R>-1;)T[C[R][2]]&&C.splice(R,1);return this._super._kill.call(this,T)}}(),ln._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(x,a){var s,c,d,u,m=function(){x.call(this,"css"),this._overwriteProps.length=0,this.setRatio=m.prototype.setRatio},g=ln._gsDefine.globals,_={},S=m.prototype=new x("css");S.constructor=m,m.version="2.0.2",m.API=2,m.defaultTransformPerspective=0,m.defaultSkewType="compensated",m.defaultSmoothOrigin=!0,S="px",m.suffixMap={top:S,right:S,bottom:S,left:S,width:S,height:S,fontSize:S,padding:S,margin:S,perspective:S,lineHeight:""};var b,O,k,D,F,E,L,T,M=/(?:\-|\.|\b)(\d|\.|e\-)+/g,R=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,C=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,U=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,N=/(?:\d|\-|\+|=|#|\.)*/g,X=/opacity *= *([^)]*)/i,K=/opacity:([^;]*)/i,Z=/alpha\(opacity *=.+?\)/i,ct=/^(rgb|hsl)/,Rt=/([A-Z])/g,et=/-([a-z])/gi,_t=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,G=function(V,tt){return tt.toUpperCase()},Pt=/(?:Left|Right|Width)/i,Et=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,At=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,ce=/,(?=[^\)]*(?:\(|$))/gi,re=/[\s,\(]/i,Ft=Math.PI/180,It=180/Math.PI,Nt={},Pe={style:{}},pe=ln.document||{createElement:function(){return Pe}},Wt=function(V,tt){return pe.createElementNS?pe.createElementNS(tt||"http://www.w3.org/1999/xhtml",V):pe.createElement(V)},$e=Wt("div"),Si=Wt("img"),Oe=m._internals={_specialProps:_},Ge=(ln.navigator||{}).userAgent||"",pi=function(){var V=Ge.indexOf("Android"),tt=Wt("a");return k=Ge.indexOf("Safari")!==-1&&Ge.indexOf("Chrome")===-1&&(V===-1||parseFloat(Ge.substr(V+8,2))>3),F=k&&parseFloat(Ge.substr(Ge.indexOf("Version/")+8,2))<6,D=Ge.indexOf("Firefox")!==-1,(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Ge)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Ge))&&(E=parseFloat(RegExp.$1)),tt?(tt.style.cssText="top:1px;opacity:.55;",/^0.55/.test(tt.style.opacity)):!1}(),Di=function(V){return X.test(typeof V=="string"?V:(V.currentStyle?V.currentStyle.filter:V.style.filter)||"")?parseFloat(RegExp.$1)/100:1},mn=function(V){ln.console&&console.log(V)},Qi="",W="",Jt=function(V,tt){tt=tt||$e;var lt,at,j=tt.style;if(j[V]!==void 0)return V;for(V=V.charAt(0).toUpperCase()+V.substr(1),lt=["O","Moz","ms","Ms","Webkit"],at=5;--at>-1&&j[lt[at]+V]===void 0;);return at>=0?(W=at===3?"ms":lt[at],Qi="-"+W.toLowerCase()+"-",W+V):null},jt=(typeof window<"u"?window:pe.defaultView||{getComputedStyle:function(){}}).getComputedStyle,dt=m.getStyle=function(V,tt,lt,at,j){var St;return pi||tt!=="opacity"?(!at&&V.style[tt]?St=V.style[tt]:(lt=lt||jt(V))?St=lt[tt]||lt.getPropertyValue(tt)||lt.getPropertyValue(tt.replace(Rt,"-$1").toLowerCase()):V.currentStyle&&(St=V.currentStyle[tt]),j==null||St&&St!=="none"&&St!=="auto"&&St!=="auto auto"?St:j):Di(V)},pt=Oe.convertToPixels=function(V,tt,lt,at,j){if(at==="px"||!at&&tt!=="lineHeight")return lt;if(at==="auto"||!lt)return 0;var St,ht,Ot,Ht=Pt.test(tt),kt=V,Mt=$e.style,he=0>lt,se=lt===1;if(he&&(lt=-lt),se&&(lt*=100),tt!=="lineHeight"||at)if(at==="%"&&tt.indexOf("border")!==-1)St=lt/100*(Ht?V.clientWidth:V.clientHeight);else{if(Mt.cssText="border:0 solid red;position:"+dt(V,"position")+";line-height:0;",at!=="%"&&kt.appendChild&&at.charAt(0)!=="v"&&at!=="rem")Mt[Ht?"borderLeftWidth":"borderTopWidth"]=lt+at;else{if(kt=V.parentNode||pe.body,dt(kt,"display").indexOf("flex")!==-1&&(Mt.position="absolute"),ht=kt._gsCache,Ot=a.ticker.frame,ht&&Ht&&ht.time===Ot)return ht.width*lt/100;Mt[Ht?"width":"height"]=lt+at}kt.appendChild($e),St=parseFloat($e[Ht?"offsetWidth":"offsetHeight"]),kt.removeChild($e),Ht&&at==="%"&&m.cacheWidths!==!1&&(ht=kt._gsCache=kt._gsCache||{},ht.time=Ot,ht.width=St/lt*100),St!==0||j||(St=pt(V,tt,lt,at,!0))}else ht=jt(V).lineHeight,V.style.lineHeight=lt,St=parseFloat(jt(V).lineHeight),V.style.lineHeight=ht;return se&&(St/=100),he?-St:St},Dt=Oe.calculateOffset=function(V,tt,lt){if(dt(V,"position",lt)!=="absolute")return 0;var at=tt==="left"?"Left":"Top",j=dt(V,"margin"+at,lt);return V["offset"+at]-(pt(V,tt,parseFloat(j),j.replace(N,""))||0)},ie=function(V,tt){var lt,at,j,St={};if(tt=tt||jt(V,null))if(lt=tt.length)for(;--lt>-1;)j=tt[lt],(j.indexOf("-transform")===-1||na===j)&&(St[j.replace(et,G)]=tt.getPropertyValue(j));else for(lt in tt)(lt.indexOf("Transform")===-1||Mn===lt)&&(St[lt]=tt[lt]);else if(tt=V.currentStyle||V.style)for(lt in tt)typeof lt=="string"&&St[lt]===void 0&&(St[lt.replace(et,G)]=tt[lt]);return pi||(St.opacity=Di(V)),at=uo(V,tt,!1),St.rotation=at.rotation,St.skewX=at.skewX,St.scaleX=at.scaleX,St.scaleY=at.scaleY,St.x=at.x,St.y=at.y,vr&&(St.z=at.z,St.rotationX=at.rotationX,St.rotationY=at.rotationY,St.scaleZ=at.scaleZ),St.filters&&delete St.filters,St},Kt=function(V,tt,lt,at,j){var St,ht,Ot,Ht={},kt=V.style;for(ht in lt)ht!=="cssText"&&ht!=="length"&&isNaN(ht)&&(tt[ht]!==(St=lt[ht])||j&&j[ht])&&ht.indexOf("Origin")===-1&&(typeof St=="number"||typeof St=="string")&&(Ht[ht]=St!=="auto"||ht!=="left"&&ht!=="top"?St!==""&&St!=="auto"&&St!=="none"||typeof tt[ht]!="string"||tt[ht].replace(U,"")===""?St:0:Dt(V,ht),kt[ht]!==void 0&&(Ot=new ni(kt,ht,kt[ht],Ot)));if(at)for(ht in at)ht!=="className"&&(Ht[ht]=at[ht]);return{difs:Ht,firstMPT:Ot}},z={width:["Left","Right"],height:["Top","Bottom"]},Q=["marginLeft","marginRight","marginTop","marginBottom"],st=function(V,tt,lt){if((V.nodeName+"").toLowerCase()==="svg")return(lt||jt(V))[tt]||0;if(V.getCTM&&Ja(V))return V.getBBox()[tt]||0;var at=parseFloat(tt==="width"?V.offsetWidth:V.offsetHeight),j=z[tt],St=j.length;for(lt=lt||jt(V,null);--St>-1;)at-=parseFloat(dt(V,"padding"+j[St],lt,!0))||0,at-=parseFloat(dt(V,"border"+j[St]+"Width",lt,!0))||0;return at},nt=function(V,tt){if(V==="contain"||V==="auto"||V==="auto auto")return V+" ";(V==null||V==="")&&(V="0 0");var lt,at=V.split(" "),j=V.indexOf("left")!==-1?"0%":V.indexOf("right")!==-1?"100%":at[0],St=V.indexOf("top")!==-1?"0%":V.indexOf("bottom")!==-1?"100%":at[1];if(at.length>3&&!tt){for(at=V.split(", ").join(",").split(","),V=[],lt=0;lt<at.length;lt++)V.push(nt(at[lt]));return V.join(",")}return St==null?St=j==="center"?"50%":"0":St==="center"&&(St="50%"),(j==="center"||isNaN(parseFloat(j))&&(j+"").indexOf("=")===-1)&&(j="50%"),V=j+" "+St+(at.length>2?" "+at[2]:""),tt&&(tt.oxp=j.indexOf("%")!==-1,tt.oyp=St.indexOf("%")!==-1,tt.oxr=j.charAt(1)==="=",tt.oyr=St.charAt(1)==="=",tt.ox=parseFloat(j.replace(U,"")),tt.oy=parseFloat(St.replace(U,"")),tt.v=V),tt||V},vt=function(V,tt){return typeof V=="function"&&(V=V(T,L)),typeof V=="string"&&V.charAt(1)==="="?parseInt(V.charAt(0)+"1",10)*parseFloat(V.substr(2)):parseFloat(V)-parseFloat(tt)||0},Gt=function(V,tt){typeof V=="function"&&(V=V(T,L));var lt=typeof V=="string"&&V.charAt(1)==="=";return typeof V=="string"&&V.charAt(V.length-2)==="v"&&(V=(lt?V.substr(0,2):0)+window["inner"+(V.substr(-2)==="vh"?"Height":"Width")]*(parseFloat(lt?V.substr(2):V)/100)),V==null?tt:lt?parseInt(V.charAt(0)+"1",10)*parseFloat(V.substr(2))+tt:parseFloat(V)||0},qt=function(V,tt,lt,at){var j,St,ht,Ot,Ht,kt=1e-6;return typeof V=="function"&&(V=V(T,L)),V==null?Ot=tt:typeof V=="number"?Ot=V:(j=360,St=V.split("_"),Ht=V.charAt(1)==="=",ht=(Ht?parseInt(V.charAt(0)+"1",10)*parseFloat(St[0].substr(2)):parseFloat(St[0]))*(V.indexOf("rad")===-1?1:It)-(Ht?0:tt),St.length&&(at&&(at[lt]=tt+ht),V.indexOf("short")!==-1&&(ht%=j,ht!==ht%(j/2)&&(ht=0>ht?ht+j:ht-j)),V.indexOf("_cw")!==-1&&0>ht?ht=(ht+9999999999*j)%j-(ht/j|0)*j:V.indexOf("ccw")!==-1&&ht>0&&(ht=(ht-9999999999*j)%j-(ht/j|0)*j)),Ot=tt+ht),kt>Ot&&Ot>-kt&&(Ot=0),Ot},Xt={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]},Ne=function(V,tt,lt){return V=0>V?V+1:V>1?V-1:V,255*(1>6*V?tt+(lt-tt)*V*6:.5>V?lt:2>3*V?tt+(lt-tt)*(2/3-V)*6:tt)+.5|0},Ie=m.parseColor=function(V,tt){var lt,at,j,St,ht,Ot,Ht,kt,Mt,he,se;if(V)if(typeof V=="number")lt=[V>>16,V>>8&255,255&V];else{if(V.charAt(V.length-1)===","&&(V=V.substr(0,V.length-1)),Xt[V])lt=Xt[V];else if(V.charAt(0)==="#")V.length===4&&(at=V.charAt(1),j=V.charAt(2),St=V.charAt(3),V="#"+at+at+j+j+St+St),V=parseInt(V.substr(1),16),lt=[V>>16,V>>8&255,255&V];else if(V.substr(0,3)==="hsl")if(lt=se=V.match(M),tt){if(V.indexOf("=")!==-1)return V.match(R)}else ht=Number(lt[0])%360/360,Ot=Number(lt[1])/100,Ht=Number(lt[2])/100,j=.5>=Ht?Ht*(Ot+1):Ht+Ot-Ht*Ot,at=2*Ht-j,lt.length>3&&(lt[3]=Number(lt[3])),lt[0]=Ne(ht+1/3,at,j),lt[1]=Ne(ht,at,j),lt[2]=Ne(ht-1/3,at,j);else lt=V.match(M)||Xt.transparent;lt[0]=Number(lt[0]),lt[1]=Number(lt[1]),lt[2]=Number(lt[2]),lt.length>3&&(lt[3]=Number(lt[3]))}else lt=Xt.black;return tt&&!se&&(at=lt[0]/255,j=lt[1]/255,St=lt[2]/255,kt=Math.max(at,j,St),Mt=Math.min(at,j,St),Ht=(kt+Mt)/2,kt===Mt?ht=Ot=0:(he=kt-Mt,Ot=Ht>.5?he/(2-kt-Mt):he/(kt+Mt),ht=kt===at?(j-St)/he+(St>j?6:0):kt===j?(St-at)/he+2:(at-j)/he+4,ht*=60),lt[0]=ht+.5|0,lt[1]=100*Ot+.5|0,lt[2]=100*Ht+.5|0),lt},ge=function(V,tt){var lt,at,j,St=V.match(we)||[],ht=0,Ot="";if(!St.length)return V;for(lt=0;lt<St.length;lt++)at=St[lt],j=V.substr(ht,V.indexOf(at,ht)-ht),ht+=j.length+at.length,at=Ie(at,tt),at.length===3&&at.push(1),Ot+=j+(tt?"hsla("+at[0]+","+at[1]+"%,"+at[2]+"%,"+at[3]:"rgba("+at.join(","))+")";return Ot+V.substr(ht)},we="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(S in Xt)we+="|"+S+"\\b";we=new RegExp(we+")","gi"),m.colorStringFilter=function(V){var tt,lt=V[0]+" "+V[1];we.test(lt)&&(tt=lt.indexOf("hsl(")!==-1||lt.indexOf("hsla(")!==-1,V[0]=ge(V[0],tt),V[1]=ge(V[1],tt)),we.lastIndex=0},a.defaultStringFilter||(a.defaultStringFilter=m.colorStringFilter);var yi=function(V,tt,lt,at){if(V==null)return function(se){return se};var j,St=tt?(V.match(we)||[""])[0]:"",ht=V.split(St).join("").match(C)||[],Ot=V.substr(0,V.indexOf(ht[0])),Ht=V.charAt(V.length-1)===")"?")":"",kt=V.indexOf(" ")!==-1?" ":",",Mt=ht.length,he=Mt>0?ht[0].replace(M,""):"";return Mt?j=tt?function(se){var te,ye,ue,je;if(typeof se=="number")se+=he;else if(at&&ce.test(se)){for(je=se.replace(ce,"|").split("|"),ue=0;ue<je.length;ue++)je[ue]=j(je[ue]);return je.join(",")}if(te=(se.match(we)||[St])[0],ye=se.split(te).join("").match(C)||[],ue=ye.length,Mt>ue--)for(;++ue<Mt;)ye[ue]=lt?ye[(ue-1)/2|0]:ht[ue];return Ot+ye.join(kt)+kt+te+Ht+(se.indexOf("inset")!==-1?" inset":"")}:function(se){var te,ye,ue;if(typeof se=="number")se+=he;else if(at&&ce.test(se)){for(ye=se.replace(ce,"|").split("|"),ue=0;ue<ye.length;ue++)ye[ue]=j(ye[ue]);return ye.join(",")}if(te=se.match(C)||[],ue=te.length,Mt>ue--)for(;++ue<Mt;)te[ue]=lt?te[(ue-1)/2|0]:ht[ue];return Ot+te.join(kt)+Ht}:function(se){return se}},Ei=function(V){return V=V.split(","),function(tt,lt,at,j,St,ht,Ot){var Ht,kt=(lt+"").split(" ");for(Ot={},Ht=0;4>Ht;Ht++)Ot[V[Ht]]=kt[Ht]=kt[Ht]||kt[(Ht-1)/2>>0];return j.parse(tt,Ot,St,ht)}},ni=(Oe._setPluginRatio=function(V){this.plugin.setRatio(V);for(var tt,lt,at,j,St,ht=this.data,Ot=ht.proxy,Ht=ht.firstMPT,kt=1e-6;Ht;)tt=Ot[Ht.v],Ht.r?tt=Ht.r(tt):kt>tt&&tt>-kt&&(tt=0),Ht.t[Ht.p]=tt,Ht=Ht._next;if(ht.autoRotate&&(ht.autoRotate.rotation=ht.mod?ht.mod.call(this._tween,Ot.rotation,this.t,this._tween):Ot.rotation),V===1||V===0)for(Ht=ht.firstMPT,St=V===1?"e":"b";Ht;){if(lt=Ht.t,lt.type){if(lt.type===1){for(j=lt.xs0+lt.s+lt.xs1,at=1;at<lt.l;at++)j+=lt["xn"+at]+lt["xs"+(at+1)];lt[St]=j}}else lt[St]=lt.s+lt.xs0;Ht=Ht._next}},function(V,tt,lt,at,j){this.t=V,this.p=tt,this.v=lt,this.r=j,at&&(at._prev=this,this._next=at)}),bi=(Oe._parseToProxy=function(V,tt,lt,at,j,St){var ht,Ot,Ht,kt,Mt,he=at,se={},te={},ye=lt._transform,ue=Nt;for(lt._transform=null,Nt=tt,at=Mt=lt.parse(V,tt,at,j),Nt=ue,St&&(lt._transform=ye,he&&(he._prev=null,he._prev&&(he._prev._next=null)));at&&at!==he;){if(at.type<=1&&(Ot=at.p,te[Ot]=at.s+at.c,se[Ot]=at.s,St||(kt=new ni(at,"s",Ot,kt,at.r),at.c=0),at.type===1))for(ht=at.l;--ht>0;)Ht="xn"+ht,Ot=at.p+"_"+Ht,te[Ot]=at.data[Ht],se[Ot]=at[Ht],St||(kt=new ni(at,Ht,Ot,kt,at.rxp[Ht]));at=at._next}return{proxy:se,end:te,firstMPT:kt,pt:Mt}},Oe.CSSPropTween=function(V,tt,lt,at,j,St,ht,Ot,Ht,kt,Mt){this.t=V,this.p=tt,this.s=lt,this.c=at,this.n=ht||tt,V instanceof bi||u.push(this.n),this.r=Ot&&(typeof Ot=="function"?Ot:Math.round),this.type=St||0,Ht&&(this.pr=Ht,s=!0),this.b=kt===void 0?lt:kt,this.e=Mt===void 0?lt+at:Mt,j&&(this._next=j,j._prev=this)}),qr=function(V,tt,lt,at,j,St){var ht=new bi(V,tt,lt,at-lt,j,-1,St);return ht.b=lt,ht.e=ht.xs0=at,ht},sr=m.parseComplex=function(V,tt,lt,at,j,St,ht,Ot,Ht,kt){lt=lt||St||"",typeof at=="function"&&(at=at(T,L)),ht=new bi(V,tt,0,0,ht,kt?2:1,null,!1,Ot,lt,at),at+="",j&&we.test(at+lt)&&(at=[lt,at],m.colorStringFilter(at),lt=at[0],at=at[1]);var Mt,he,se,te,ye,ue,je,He,ci,Be,_e,Fe,fe,mi=lt.split(", ").join(",").split(" "),Le=at.split(", ").join(",").split(" "),xe=mi.length,Re=b!==!1;for((at.indexOf(",")!==-1||lt.indexOf(",")!==-1)&&((at+lt).indexOf("rgb")!==-1||(at+lt).indexOf("hsl")!==-1?(mi=mi.join(" ").replace(ce,", ").split(" "),Le=Le.join(" ").replace(ce,", ").split(" ")):(mi=mi.join(" ").split(",").join(", ").split(" "),Le=Le.join(" ").split(",").join(", ").split(" ")),xe=mi.length),xe!==Le.length&&(mi=(St||"").split(" "),xe=mi.length),ht.plugin=Ht,ht.setRatio=kt,we.lastIndex=0,Mt=0;xe>Mt;Mt++)if(te=mi[Mt],ye=Le[Mt]+"",He=parseFloat(te),He||He===0)ht.appendXtra("",He,vt(ye,He),ye.replace(R,""),Re&&ye.indexOf("px")!==-1?Math.round:!1,!0);else if(j&&we.test(te))Fe=ye.indexOf(")")+1,Fe=")"+(Fe?ye.substr(Fe):""),fe=ye.indexOf("hsl")!==-1&&pi,Be=ye,te=Ie(te,fe),ye=Ie(ye,fe),ci=te.length+ye.length>6,ci&&!pi&&ye[3]===0?(ht["xs"+ht.l]+=ht.l?" transparent":"transparent",ht.e=ht.e.split(Le[Mt]).join("transparent")):(pi||(ci=!1),fe?ht.appendXtra(Be.substr(0,Be.indexOf("hsl"))+(ci?"hsla(":"hsl("),te[0],vt(ye[0],te[0]),",",!1,!0).appendXtra("",te[1],vt(ye[1],te[1]),"%,",!1).appendXtra("",te[2],vt(ye[2],te[2]),ci?"%,":"%"+Fe,!1):ht.appendXtra(Be.substr(0,Be.indexOf("rgb"))+(ci?"rgba(":"rgb("),te[0],ye[0]-te[0],",",Math.round,!0).appendXtra("",te[1],ye[1]-te[1],",",Math.round).appendXtra("",te[2],ye[2]-te[2],ci?",":Fe,Math.round),ci&&(te=te.length<4?1:te[3],ht.appendXtra("",te,(ye.length<4?1:ye[3])-te,Fe,!1))),we.lastIndex=0;else if(ue=te.match(M)){if(je=ye.match(R),!je||je.length!==ue.length)return ht;for(se=0,he=0;he<ue.length;he++)_e=ue[he],Be=te.indexOf(_e,se),ht.appendXtra(te.substr(se,Be-se),Number(_e),vt(je[he],_e),"",Re&&te.substr(Be+_e.length,2)==="px"?Math.round:!1,he===0),se=Be+_e.length;ht["xs"+ht.l]+=te.substr(se)}else ht["xs"+ht.l]+=ht.l||ht["xs"+ht.l]?" "+ye:ye;if(at.indexOf("=")!==-1&&ht.data){for(Fe=ht.xs0+ht.data.s,Mt=1;Mt<ht.l;Mt++)Fe+=ht["xs"+Mt]+ht.data["xn"+Mt];ht.e=Fe+ht["xs"+Mt]}return ht.l||(ht.type=-1,ht.xs0=ht.e),ht.xfirst||ht},sn=9;for(S=bi.prototype,S.l=S.pr=0;--sn>0;)S["xn"+sn]=0,S["xs"+sn]="";S.xs0="",S._next=S._prev=S.xfirst=S.data=S.plugin=S.setRatio=S.rxp=null,S.appendXtra=function(V,tt,lt,at,j,St){var ht=this,Ot=ht.l;return ht["xs"+Ot]+=St&&(Ot||ht["xs"+Ot])?" "+V:V||"",lt||Ot===0||ht.plugin?(ht.l++,ht.type=ht.setRatio?2:1,ht["xs"+ht.l]=at||"",Ot>0?(ht.data["xn"+Ot]=tt+lt,ht.rxp["xn"+Ot]=j,ht["xn"+Ot]=tt,ht.plugin||(ht.xfirst=new bi(ht,"xn"+Ot,tt,lt,ht.xfirst||ht,0,ht.n,j,ht.pr),ht.xfirst.xs0=0),ht):(ht.data={s:tt+lt},ht.rxp={},ht.s=tt,ht.c=lt,ht.r=j,ht)):(ht["xs"+Ot]+=tt+(at||""),ht)};var Ao=function(V,tt){tt=tt||{},this.p=tt.prefix&&Jt(V)||V,_[V]=_[this.p]=this,this.format=tt.formatter||yi(tt.defaultValue,tt.color,tt.collapsible,tt.multi),tt.parser&&(this.parse=tt.parser),this.clrs=tt.color,this.multi=tt.multi,this.keyword=tt.keyword,this.dflt=tt.defaultValue,this.pr=tt.priority||0},zi=Oe._registerComplexSpecialProp=function(V,tt,lt){typeof tt!="object"&&(tt={parser:lt});var at,j=V.split(","),St=tt.defaultValue;for(lt=lt||[St],at=0;at<j.length;at++)tt.prefix=at===0&&tt.prefix,tt.defaultValue=lt[at]||St,new Ao(j[at],tt)},qo=Oe._registerPluginProp=function(V){if(!_[V]){var tt=V.charAt(0).toUpperCase()+V.substr(1)+"Plugin";zi(V,{parser:function(lt,at,j,St,ht,Ot,Ht){var kt=g.com.greensock.plugins[tt];return kt?(kt._cssRegister(),_[j].parse(lt,at,j,St,ht,Ot,Ht)):(mn("Error: "+tt+" js file not loaded."),ht)}})}};S=Ao.prototype,S.parseComplex=function(V,tt,lt,at,j,St){var ht,Ot,Ht,kt,Mt,he,se=this.keyword;if(this.multi&&(ce.test(lt)||ce.test(tt)?(Ot=tt.replace(ce,"|").split("|"),Ht=lt.replace(ce,"|").split("|")):se&&(Ot=[tt],Ht=[lt])),Ht){for(kt=Ht.length>Ot.length?Ht.length:Ot.length,ht=0;kt>ht;ht++)tt=Ot[ht]=Ot[ht]||this.dflt,lt=Ht[ht]=Ht[ht]||this.dflt,se&&(Mt=tt.indexOf(se),he=lt.indexOf(se),Mt!==he&&(he===-1?Ot[ht]=Ot[ht].split(se).join(""):Mt===-1&&(Ot[ht]+=" "+se)));tt=Ot.join(", "),lt=Ht.join(", ")}return sr(V,this.p,tt,lt,this.clrs,this.dflt,at,this.pr,j,St)},S.parse=function(V,tt,lt,at,j,St,ht){return this.parseComplex(V.style,this.format(dt(V,this.p,d,!1,this.dflt)),this.format(tt),j,St)},m.registerSpecialProp=function(V,tt,lt){zi(V,{parser:function(at,j,St,ht,Ot,Ht,kt){var Mt=new bi(at,St,0,0,Ot,2,St,!1,lt);return Mt.plugin=Ht,Mt.setRatio=tt(at,j,ht._tween,St),Mt},priority:lt})},m.useSVGTransformAttr=!0;var ao,Vl="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Mn=Jt("transform"),na=Qi+"transform",gs=Jt("transformOrigin"),vr=Jt("perspective")!==null,ra=Oe.Transform=function(){this.perspective=parseFloat(m.defaultTransformPerspective)||0,this.force3D=m.defaultForce3D!==!1&&vr?m.defaultForce3D||"auto":!1},Ya=ln.SVGElement,Wl=function(V,tt,lt){var at,j=pe.createElementNS("http://www.w3.org/2000/svg",V),St=/([a-z])([A-Z])/g;for(at in lt)j.setAttributeNS(null,at.replace(St,"$1-$2").toLowerCase(),lt[at]);return tt.appendChild(j),j},lo=pe.documentElement||{},Oh=function(){var V,tt,lt,at=E||/Android/i.test(Ge)&&!ln.chrome;return pe.createElementNS&&!at&&(V=Wl("svg",lo),tt=Wl("rect",V,{width:100,height:50,x:100}),lt=tt.getBoundingClientRect().width,tt.style[gs]="50% 50%",tt.style[Mn]="scaleX(0.5)",at=lt===tt.getBoundingClientRect().width&&!(D&&vr),lo.removeChild(V)),at}(),oa=function(V,tt,lt,at,j,St){var ht,Ot,Ht,kt,Mt,he,se,te,ye,ue,je,He,ci,Be,_e=V._gsTransform,Fe=aa(V,!0);_e&&(ci=_e.xOrigin,Be=_e.yOrigin),(!at||(ht=at.split(" ")).length<2)&&(se=V.getBBox(),se.x===0&&se.y===0&&se.width+se.height===0&&(se={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}),tt=nt(tt).split(" "),ht=[(tt[0].indexOf("%")!==-1?parseFloat(tt[0])/100*se.width:parseFloat(tt[0]))+se.x,(tt[1].indexOf("%")!==-1?parseFloat(tt[1])/100*se.height:parseFloat(tt[1]))+se.y]),lt.xOrigin=kt=parseFloat(ht[0]),lt.yOrigin=Mt=parseFloat(ht[1]),at&&Fe!==sa&&(he=Fe[0],se=Fe[1],te=Fe[2],ye=Fe[3],ue=Fe[4],je=Fe[5],He=he*ye-se*te,He&&(Ot=kt*(ye/He)+Mt*(-te/He)+(te*je-ye*ue)/He,Ht=kt*(-se/He)+Mt*(he/He)-(he*je-se*ue)/He,kt=lt.xOrigin=ht[0]=Ot,Mt=lt.yOrigin=ht[1]=Ht)),_e&&(St&&(lt.xOffset=_e.xOffset,lt.yOffset=_e.yOffset,_e=lt),j||j!==!1&&m.defaultSmoothOrigin!==!1?(Ot=kt-ci,Ht=Mt-Be,_e.xOffset+=Ot*Fe[0]+Ht*Fe[2]-Ot,_e.yOffset+=Ot*Fe[1]+Ht*Fe[3]-Ht):_e.xOffset=_e.yOffset=0),St||V.setAttribute("data-svg-origin",ht.join(" "))},Za=function(V){var tt,lt=Wt("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),at=this.parentNode,j=this.nextSibling,St=this.style.cssText;if(lo.appendChild(lt),lt.appendChild(this),this.style.display="block",V)try{tt=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Za}catch{}else this._originalGetBBox&&(tt=this._originalGetBBox());return j?at.insertBefore(this,j):at.appendChild(this),lo.removeChild(lt),this.style.cssText=St,tt},ho=function(V){try{return V.getBBox()}catch{return Za.call(V,!0)}},Ja=function(V){return!(!Ya||!V.getCTM||V.parentNode&&!V.ownerSVGElement||!ho(V))},sa=[1,0,0,1,0,0],aa=function(V,tt){var lt,at,j,St,ht,Ot,Ht=V._gsTransform||new ra,kt=1e5,Mt=V.style;if(Mn?at=dt(V,na,null,!0):V.currentStyle&&(at=V.currentStyle.filter.match(Et),at=at&&at.length===4?[at[0].substr(4),Number(at[2].substr(4)),Number(at[1].substr(4)),at[3].substr(4),Ht.x||0,Ht.y||0].join(","):""),lt=!at||at==="none"||at==="matrix(1, 0, 0, 1, 0, 0)",!Mn||!(Ot=!jt(V)||jt(V).display==="none")&&V.parentNode||(Ot&&(St=Mt.display,Mt.display="block"),V.parentNode||(ht=1,lo.appendChild(V)),at=dt(V,na,null,!0),lt=!at||at==="none"||at==="matrix(1, 0, 0, 1, 0, 0)",St?Mt.display=St:Ot&&vs(Mt,"display"),ht&&lo.removeChild(V)),(Ht.svg||V.getCTM&&Ja(V))&&(lt&&(Mt[Mn]+"").indexOf("matrix")!==-1&&(at=Mt[Mn],lt=0),j=V.getAttribute("transform"),lt&&j&&(j=V.transform.baseVal.consolidate().matrix,at="matrix("+j.a+","+j.b+","+j.c+","+j.d+","+j.e+","+j.f+")",lt=0)),lt)return sa;for(j=(at||"").match(M)||[],sn=j.length;--sn>-1;)St=Number(j[sn]),j[sn]=(ht=St-(St|=0))?(ht*kt+(0>ht?-.5:.5)|0)/kt+St:St;return tt&&j.length>6?[j[0],j[1],j[4],j[5],j[12],j[13]]:j},uo=Oe.getTransform=function(V,tt,lt,at){if(V._gsTransform&&lt&&!at)return V._gsTransform;var j,St,ht,Ot,Ht,kt,Mt=lt?V._gsTransform||new ra:new ra,he=Mt.scaleX<0,se=2e-5,te=1e5,ye=vr&&(parseFloat(dt(V,gs,tt,!1,"0 0 0").split(" ")[2])||Mt.zOrigin)||0,ue=parseFloat(m.defaultTransformPerspective)||0;if(Mt.svg=!(!V.getCTM||!Ja(V)),Mt.svg&&(oa(V,dt(V,gs,tt,!1,"50% 50%")+"",Mt,V.getAttribute("data-svg-origin")),ao=m.useSVGTransformAttr||Oh),j=aa(V),j!==sa){if(j.length===16){var je,He,ci,Be,_e,Fe=j[0],fe=j[1],mi=j[2],Le=j[3],xe=j[4],Re=j[5],Sn=j[6],Xn=j[7],ki=j[8],Bi=j[9],Hi=j[10],nn=j[12],rn=j[13],un=j[14],cn=j[11],Gi=Math.atan2(Sn,Hi);Mt.zOrigin&&(un=-Mt.zOrigin,nn=ki*un-j[12],rn=Bi*un-j[13],un=Hi*un+Mt.zOrigin-j[14]),Mt.rotationX=Gi*It,Gi&&(Be=Math.cos(-Gi),_e=Math.sin(-Gi),je=xe*Be+ki*_e,He=Re*Be+Bi*_e,ci=Sn*Be+Hi*_e,ki=xe*-_e+ki*Be,Bi=Re*-_e+Bi*Be,Hi=Sn*-_e+Hi*Be,cn=Xn*-_e+cn*Be,xe=je,Re=He,Sn=ci),Gi=Math.atan2(-mi,Hi),Mt.rotationY=Gi*It,Gi&&(Be=Math.cos(-Gi),_e=Math.sin(-Gi),je=Fe*Be-ki*_e,He=fe*Be-Bi*_e,ci=mi*Be-Hi*_e,Bi=fe*_e+Bi*Be,Hi=mi*_e+Hi*Be,cn=Le*_e+cn*Be,Fe=je,fe=He,mi=ci),Gi=Math.atan2(fe,Fe),Mt.rotation=Gi*It,Gi&&(Be=Math.cos(Gi),_e=Math.sin(Gi),je=Fe*Be+fe*_e,He=xe*Be+Re*_e,ci=ki*Be+Bi*_e,fe=fe*Be-Fe*_e,Re=Re*Be-xe*_e,Bi=Bi*Be-ki*_e,Fe=je,xe=He,ki=ci),Mt.rotationX&&Math.abs(Mt.rotationX)+Math.abs(Mt.rotation)>359.9&&(Mt.rotationX=Mt.rotation=0,Mt.rotationY=180-Mt.rotationY),Gi=Math.atan2(xe,Re),Mt.scaleX=(Math.sqrt(Fe*Fe+fe*fe+mi*mi)*te+.5|0)/te,Mt.scaleY=(Math.sqrt(Re*Re+Sn*Sn)*te+.5|0)/te,Mt.scaleZ=(Math.sqrt(ki*ki+Bi*Bi+Hi*Hi)*te+.5|0)/te,Fe/=Mt.scaleX,xe/=Mt.scaleY,fe/=Mt.scaleX,Re/=Mt.scaleY,Math.abs(Gi)>se?(Mt.skewX=Gi*It,xe=0,Mt.skewType!=="simple"&&(Mt.scaleY*=1/Math.cos(Gi))):Mt.skewX=0,Mt.perspective=cn?1/(0>cn?-cn:cn):0,Mt.x=nn,Mt.y=rn,Mt.z=un,Mt.svg&&(Mt.x-=Mt.xOrigin-(Mt.xOrigin*Fe-Mt.yOrigin*xe),Mt.y-=Mt.yOrigin-(Mt.yOrigin*fe-Mt.xOrigin*Re))}else if(!vr||at||!j.length||Mt.x!==j[4]||Mt.y!==j[5]||!Mt.rotationX&&!Mt.rotationY){var Ni=j.length>=6,ji=Ni?j[0]:1,gi=j[1]||0,co=j[2]||0,Fn=Ni?j[3]:1;Mt.x=j[4]||0,Mt.y=j[5]||0,ht=Math.sqrt(ji*ji+gi*gi),Ot=Math.sqrt(Fn*Fn+co*co),Ht=ji||gi?Math.atan2(gi,ji)*It:Mt.rotation||0,kt=co||Fn?Math.atan2(co,Fn)*It+Ht:Mt.skewX||0,Mt.scaleX=ht,Mt.scaleY=Ot,Mt.rotation=Ht,Mt.skewX=kt,vr&&(Mt.rotationX=Mt.rotationY=Mt.z=0,Mt.perspective=ue,Mt.scaleZ=1),Mt.svg&&(Mt.x-=Mt.xOrigin-(Mt.xOrigin*ji+Mt.yOrigin*co),Mt.y-=Mt.yOrigin-(Mt.xOrigin*gi+Mt.yOrigin*Fn))}Math.abs(Mt.skewX)>90&&Math.abs(Mt.skewX)<270&&(he?(Mt.scaleX*=-1,Mt.skewX+=Mt.rotation<=0?180:-180,Mt.rotation+=Mt.rotation<=0?180:-180):(Mt.scaleY*=-1,Mt.skewX+=Mt.skewX<=0?180:-180)),Mt.zOrigin=ye;for(St in Mt)Mt[St]<se&&Mt[St]>-se&&(Mt[St]=0)}return lt&&(V._gsTransform=Mt,Mt.svg&&(ao&&V.style[Mn]?a.delayedCall(.001,function(){vs(V.style,Mn)}):!ao&&V.getAttribute("transform")&&a.delayedCall(.001,function(){V.removeAttribute("transform")}))),Mt},jl=function(V){var tt,lt,at=this.data,j=-at.rotation*Ft,St=j+at.skewX*Ft,ht=1e5,Ot=(Math.cos(j)*at.scaleX*ht|0)/ht,Ht=(Math.sin(j)*at.scaleX*ht|0)/ht,kt=(Math.sin(St)*-at.scaleY*ht|0)/ht,Mt=(Math.cos(St)*at.scaleY*ht|0)/ht,he=this.t.style,se=this.t.currentStyle;if(se){lt=Ht,Ht=-kt,kt=-lt,tt=se.filter,he.filter="";var te,ye,ue=this.t.offsetWidth,je=this.t.offsetHeight,He=se.position!=="absolute",ci="progid:DXImageTransform.Microsoft.Matrix(M11="+Ot+", M12="+Ht+", M21="+kt+", M22="+Mt,Be=at.x+ue*at.xPercent/100,_e=at.y+je*at.yPercent/100;if(at.ox!=null&&(te=(at.oxp?ue*at.ox*.01:at.ox)-ue/2,ye=(at.oyp?je*at.oy*.01:at.oy)-je/2,Be+=te-(te*Ot+ye*Ht),_e+=ye-(te*kt+ye*Mt)),He?(te=ue/2,ye=je/2,ci+=", Dx="+(te-(te*Ot+ye*Ht)+Be)+", Dy="+(ye-(te*kt+ye*Mt)+_e)+")"):ci+=", sizingMethod='auto expand')",tt.indexOf("DXImageTransform.Microsoft.Matrix(")!==-1?he.filter=tt.replace(At,ci):he.filter=ci+" "+tt,(V===0||V===1)&&Ot===1&&Ht===0&&kt===0&&Mt===1&&(He&&ci.indexOf("Dx=0, Dy=0")===-1||X.test(tt)&&parseFloat(RegExp.$1)!==100||tt.indexOf(tt.indexOf("Alpha"))===-1&&he.removeAttribute("filter")),!He){var Fe,fe,mi,Le=8>E?1:-1;for(te=at.ieOffsetX||0,ye=at.ieOffsetY||0,at.ieOffsetX=Math.round((ue-((0>Ot?-Ot:Ot)*ue+(0>Ht?-Ht:Ht)*je))/2+Be),at.ieOffsetY=Math.round((je-((0>Mt?-Mt:Mt)*je+(0>kt?-kt:kt)*ue))/2+_e),sn=0;4>sn;sn++)fe=Q[sn],Fe=se[fe],lt=Fe.indexOf("px")!==-1?parseFloat(Fe):pt(this.t,fe,parseFloat(Fe),Fe.replace(N,""))||0,mi=lt!==at[fe]?2>sn?-at.ieOffsetX:-at.ieOffsetY:2>sn?te-at.ieOffsetX:ye-at.ieOffsetY,he[fe]=(at[fe]=Math.round(lt-mi*(sn===0||sn===2?1:Le)))+"px"}}},Ih=Oe.set3DTransformRatio=Oe.setTransformRatio=function(V){var tt,lt,at,j,St,ht,Ot,Ht,kt,Mt,he,se,te,ye,ue,je,He,ci,Be,_e,Fe,fe,mi,Le=this.data,xe=this.t.style,Re=Le.rotation,Sn=Le.rotationX,Xn=Le.rotationY,ki=Le.scaleX,Bi=Le.scaleY,Hi=Le.scaleZ,nn=Le.x,rn=Le.y,un=Le.z,cn=Le.svg,Gi=Le.perspective,Ni=Le.force3D,ji=Le.skewY,gi=Le.skewX;if(ji&&(gi+=ji,Re+=ji),((V===1||V===0)&&Ni==="auto"&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!Ni)&&!un&&!Gi&&!Xn&&!Sn&&Hi===1||ao&&cn||!vr)return void(Re||gi||cn?(Re*=Ft,fe=gi*Ft,mi=1e5,lt=Math.cos(Re)*ki,St=Math.sin(Re)*ki,at=Math.sin(Re-fe)*-Bi,ht=Math.cos(Re-fe)*Bi,fe&&Le.skewType==="simple"&&(tt=Math.tan(fe-ji*Ft),tt=Math.sqrt(1+tt*tt),at*=tt,ht*=tt,ji&&(tt=Math.tan(ji*Ft),tt=Math.sqrt(1+tt*tt),lt*=tt,St*=tt)),cn&&(nn+=Le.xOrigin-(Le.xOrigin*lt+Le.yOrigin*at)+Le.xOffset,rn+=Le.yOrigin-(Le.xOrigin*St+Le.yOrigin*ht)+Le.yOffset,ao&&(Le.xPercent||Le.yPercent)&&(ue=this.t.getBBox(),nn+=.01*Le.xPercent*ue.width,rn+=.01*Le.yPercent*ue.height),ue=1e-6,ue>nn&&nn>-ue&&(nn=0),ue>rn&&rn>-ue&&(rn=0)),Be=(lt*mi|0)/mi+","+(St*mi|0)/mi+","+(at*mi|0)/mi+","+(ht*mi|0)/mi+","+nn+","+rn+")",cn&&ao?this.t.setAttribute("transform","matrix("+Be):xe[Mn]=(Le.xPercent||Le.yPercent?"translate("+Le.xPercent+"%,"+Le.yPercent+"%) matrix(":"matrix(")+Be):xe[Mn]=(Le.xPercent||Le.yPercent?"translate("+Le.xPercent+"%,"+Le.yPercent+"%) matrix(":"matrix(")+ki+",0,0,"+Bi+","+nn+","+rn+")");if(D&&(ue=1e-4,ue>ki&&ki>-ue&&(ki=Hi=2e-5),ue>Bi&&Bi>-ue&&(Bi=Hi=2e-5),!Gi||Le.z||Le.rotationX||Le.rotationY||(Gi=0)),Re||gi)Re*=Ft,je=lt=Math.cos(Re),He=St=Math.sin(Re),gi&&(Re-=gi*Ft,je=Math.cos(Re),He=Math.sin(Re),Le.skewType==="simple"&&(tt=Math.tan((gi-ji)*Ft),tt=Math.sqrt(1+tt*tt),je*=tt,He*=tt,Le.skewY&&(tt=Math.tan(ji*Ft),tt=Math.sqrt(1+tt*tt),lt*=tt,St*=tt))),at=-He,ht=je;else{if(!(Xn||Sn||Hi!==1||Gi||cn))return void(xe[Mn]=(Le.xPercent||Le.yPercent?"translate("+Le.xPercent+"%,"+Le.yPercent+"%) translate3d(":"translate3d(")+nn+"px,"+rn+"px,"+un+"px)"+(ki!==1||Bi!==1?" scale("+ki+","+Bi+")":""));lt=ht=1,at=St=0}Mt=1,j=Ot=Ht=kt=he=se=0,te=Gi?-1/Gi:0,ye=Le.zOrigin,ue=1e-6,_e=",",Fe="0",Re=Xn*Ft,Re&&(je=Math.cos(Re),He=Math.sin(Re),Ht=-He,he=te*-He,j=lt*He,Ot=St*He,Mt=je,te*=je,lt*=je,St*=je),Re=Sn*Ft,Re&&(je=Math.cos(Re),He=Math.sin(Re),tt=at*je+j*He,ci=ht*je+Ot*He,kt=Mt*He,se=te*He,j=at*-He+j*je,Ot=ht*-He+Ot*je,Mt*=je,te*=je,at=tt,ht=ci),Hi!==1&&(j*=Hi,Ot*=Hi,Mt*=Hi,te*=Hi),Bi!==1&&(at*=Bi,ht*=Bi,kt*=Bi,se*=Bi),ki!==1&&(lt*=ki,St*=ki,Ht*=ki,he*=ki),(ye||cn)&&(ye&&(nn+=j*-ye,rn+=Ot*-ye,un+=Mt*-ye+ye),cn&&(nn+=Le.xOrigin-(Le.xOrigin*lt+Le.yOrigin*at)+Le.xOffset,rn+=Le.yOrigin-(Le.xOrigin*St+Le.yOrigin*ht)+Le.yOffset),ue>nn&&nn>-ue&&(nn=Fe),ue>rn&&rn>-ue&&(rn=Fe),ue>un&&un>-ue&&(un=0)),Be=Le.xPercent||Le.yPercent?"translate("+Le.xPercent+"%,"+Le.yPercent+"%) matrix3d(":"matrix3d(",Be+=(ue>lt&&lt>-ue?Fe:lt)+_e+(ue>St&&St>-ue?Fe:St)+_e+(ue>Ht&&Ht>-ue?Fe:Ht),Be+=_e+(ue>he&&he>-ue?Fe:he)+_e+(ue>at&&at>-ue?Fe:at)+_e+(ue>ht&&ht>-ue?Fe:ht),Sn||Xn||Hi!==1?(Be+=_e+(ue>kt&&kt>-ue?Fe:kt)+_e+(ue>se&&se>-ue?Fe:se)+_e+(ue>j&&j>-ue?Fe:j),Be+=_e+(ue>Ot&&Ot>-ue?Fe:Ot)+_e+(ue>Mt&&Mt>-ue?Fe:Mt)+_e+(ue>te&&te>-ue?Fe:te)+_e):Be+=",0,0,0,0,1,0,",Be+=nn+_e+rn+_e+un+_e+(Gi?1+-un/Gi:1)+")",xe[Mn]=Be};S=ra.prototype,S.x=S.y=S.z=S.skewX=S.skewY=S.rotation=S.rotationX=S.rotationY=S.zOrigin=S.xPercent=S.yPercent=S.xOffset=S.yOffset=0,S.scaleX=S.scaleY=S.scaleZ=1,zi("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,tt,lt,at,j,St,ht){if(at._lastParsedTransform===ht)return j;at._lastParsedTransform=ht;var Ot,Ht=ht.scale&&typeof ht.scale=="function"?ht.scale:0;typeof ht[lt]=="function"&&(Ot=ht[lt],ht[lt]=tt),Ht&&(ht.scale=Ht(T,V));var kt,Mt,he,se,te,ye,ue,je,He,ci=V._gsTransform,Be=V.style,_e=1e-6,Fe=Vl.length,fe=ht,mi={},Le="transformOrigin",xe=uo(V,d,!0,fe.parseTransform),Re=fe.transform&&(typeof fe.transform=="function"?fe.transform(T,L):fe.transform);if(xe.skewType=fe.skewType||xe.skewType||m.defaultSkewType,at._transform=xe,"rotationZ"in fe&&(fe.rotation=fe.rotationZ),Re&&typeof Re=="string"&&Mn)Mt=$e.style,Mt[Mn]=Re,Mt.display="block",Mt.position="absolute",Re.indexOf("%")!==-1&&(Mt.width=dt(V,"width"),Mt.height=dt(V,"height")),pe.body.appendChild($e),kt=uo($e,null,!1),xe.skewType==="simple"&&(kt.scaleY*=Math.cos(kt.skewX*Ft)),xe.svg&&(ye=xe.xOrigin,ue=xe.yOrigin,kt.x-=xe.xOffset,kt.y-=xe.yOffset,(fe.transformOrigin||fe.svgOrigin)&&(Re={},oa(V,nt(fe.transformOrigin),Re,fe.svgOrigin,fe.smoothOrigin,!0),ye=Re.xOrigin,ue=Re.yOrigin,kt.x-=Re.xOffset-xe.xOffset,kt.y-=Re.yOffset-xe.yOffset),(ye||ue)&&(je=aa($e,!0),kt.x-=ye-(ye*je[0]+ue*je[2]),kt.y-=ue-(ye*je[1]+ue*je[3]))),pe.body.removeChild($e),kt.perspective||(kt.perspective=xe.perspective),fe.xPercent!=null&&(kt.xPercent=Gt(fe.xPercent,xe.xPercent)),fe.yPercent!=null&&(kt.yPercent=Gt(fe.yPercent,xe.yPercent));else if(typeof fe=="object"){if(kt={scaleX:Gt(fe.scaleX!=null?fe.scaleX:fe.scale,xe.scaleX),scaleY:Gt(fe.scaleY!=null?fe.scaleY:fe.scale,xe.scaleY),scaleZ:Gt(fe.scaleZ,xe.scaleZ),x:Gt(fe.x,xe.x),y:Gt(fe.y,xe.y),z:Gt(fe.z,xe.z),xPercent:Gt(fe.xPercent,xe.xPercent),yPercent:Gt(fe.yPercent,xe.yPercent),perspective:Gt(fe.transformPerspective,xe.perspective)},te=fe.directionalRotation,te!=null)if(typeof te=="object")for(Mt in te)fe[Mt]=te[Mt];else fe.rotation=te;typeof fe.x=="string"&&fe.x.indexOf("%")!==-1&&(kt.x=0,kt.xPercent=Gt(fe.x,xe.xPercent)),typeof fe.y=="string"&&fe.y.indexOf("%")!==-1&&(kt.y=0,kt.yPercent=Gt(fe.y,xe.yPercent)),kt.rotation=qt("rotation"in fe?fe.rotation:"shortRotation"in fe?fe.shortRotation+"_short":xe.rotation,xe.rotation,"rotation",mi),vr&&(kt.rotationX=qt("rotationX"in fe?fe.rotationX:"shortRotationX"in fe?fe.shortRotationX+"_short":xe.rotationX||0,xe.rotationX,"rotationX",mi),kt.rotationY=qt("rotationY"in fe?fe.rotationY:"shortRotationY"in fe?fe.shortRotationY+"_short":xe.rotationY||0,xe.rotationY,"rotationY",mi)),kt.skewX=qt(fe.skewX,xe.skewX),kt.skewY=qt(fe.skewY,xe.skewY)}for(vr&&fe.force3D!=null&&(xe.force3D=fe.force3D,se=!0),he=xe.force3D||xe.z||xe.rotationX||xe.rotationY||kt.z||kt.rotationX||kt.rotationY||kt.perspective,he||fe.scale==null||(kt.scaleZ=1);--Fe>-1;)He=Vl[Fe],Re=kt[He]-xe[He],(Re>_e||-_e>Re||fe[He]!=null||Nt[He]!=null)&&(se=!0,j=new bi(xe,He,xe[He],Re,j),He in mi&&(j.e=mi[He]),j.xs0=0,j.plugin=St,at._overwriteProps.push(j.n));return Re=fe.transformOrigin,xe.svg&&(Re||fe.svgOrigin)&&(ye=xe.xOffset,ue=xe.yOffset,oa(V,nt(Re),kt,fe.svgOrigin,fe.smoothOrigin),j=qr(xe,"xOrigin",(ci?xe:kt).xOrigin,kt.xOrigin,j,Le),j=qr(xe,"yOrigin",(ci?xe:kt).yOrigin,kt.yOrigin,j,Le),(ye!==xe.xOffset||ue!==xe.yOffset)&&(j=qr(xe,"xOffset",ci?ye:xe.xOffset,xe.xOffset,j,Le),j=qr(xe,"yOffset",ci?ue:xe.yOffset,xe.yOffset,j,Le)),Re="0px 0px"),(Re||vr&&he&&xe.zOrigin)&&(Mn?(se=!0,He=gs,Re=(Re||dt(V,He,d,!1,"50% 50%"))+"",j=new bi(Be,He,0,0,j,-1,Le),j.b=Be[He],j.plugin=St,vr?(Mt=xe.zOrigin,Re=Re.split(" "),xe.zOrigin=(Re.length>2&&(Mt===0||Re[2]!=="0px")?parseFloat(Re[2]):Mt)||0,j.xs0=j.e=Re[0]+" "+(Re[1]||"50%")+" 0px",j=new bi(xe,"zOrigin",0,0,j,-1,j.n),j.b=Mt,j.xs0=j.e=xe.zOrigin):j.xs0=j.e=Re):nt(Re+"",xe)),se&&(at._transformType=xe.svg&&ao||!he&&this._transformType!==3?2:3),Ot&&(ht[lt]=Ot),Ht&&(ht.scale=Ht),j},prefix:!0}),zi("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),zi("borderRadius",{defaultValue:"0px",parser:function(V,tt,lt,at,j,St){tt=this.format(tt);var ht,Ot,Ht,kt,Mt,he,se,te,ye,ue,je,He,ci,Be,_e,Fe,fe=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],mi=V.style;for(ye=parseFloat(V.offsetWidth),ue=parseFloat(V.offsetHeight),ht=tt.split(" "),Ot=0;Ot<fe.length;Ot++)this.p.indexOf("border")&&(fe[Ot]=Jt(fe[Ot])),Mt=kt=dt(V,fe[Ot],d,!1,"0px"),Mt.indexOf(" ")!==-1&&(kt=Mt.split(" "),Mt=kt[0],kt=kt[1]),he=Ht=ht[Ot],se=parseFloat(Mt),He=Mt.substr((se+"").length),ci=he.charAt(1)==="=",ci?(te=parseInt(he.charAt(0)+"1",10),he=he.substr(2),te*=parseFloat(he),je=he.substr((te+"").length-(0>te?1:0))||""):(te=parseFloat(he),je=he.substr((te+"").length)),je===""&&(je=c[lt]||He),je!==He&&(Be=pt(V,"borderLeft",se,He),_e=pt(V,"borderTop",se,He),je==="%"?(Mt=Be/ye*100+"%",kt=_e/ue*100+"%"):je==="em"?(Fe=pt(V,"borderLeft",1,"em"),Mt=Be/Fe+"em",kt=_e/Fe+"em"):(Mt=Be+"px",kt=_e+"px"),ci&&(he=parseFloat(Mt)+te+je,Ht=parseFloat(kt)+te+je)),j=sr(mi,fe[Ot],Mt+" "+kt,he+" "+Ht,!1,"0px",j);return j},prefix:!0,formatter:yi("0px 0px 0px 0px",!1,!0)}),zi("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(V,tt,lt,at,j,St){return sr(V.style,lt,this.format(dt(V,lt,d,!1,"0px 0px")),this.format(tt),!1,"0px",j)},prefix:!0,formatter:yi("0px 0px",!1,!0)}),zi("backgroundPosition",{defaultValue:"0 0",parser:function(V,tt,lt,at,j,St){var ht,Ot,Ht,kt,Mt,he,se="background-position",te=d||jt(V,null),ye=this.format((te?E?te.getPropertyValue(se+"-x")+" "+te.getPropertyValue(se+"-y"):te.getPropertyValue(se):V.currentStyle.backgroundPositionX+" "+V.currentStyle.backgroundPositionY)||"0 0"),ue=this.format(tt);if(ye.indexOf("%")!==-1!=(ue.indexOf("%")!==-1)&&ue.split(",").length<2&&(he=dt(V,"backgroundImage").replace(_t,""),he&&he!=="none")){for(ht=ye.split(" "),Ot=ue.split(" "),Si.setAttribute("src",he),Ht=2;--Ht>-1;)ye=ht[Ht],kt=ye.indexOf("%")!==-1,kt!==(Ot[Ht].indexOf("%")!==-1)&&(Mt=Ht===0?V.offsetWidth-Si.width:V.offsetHeight-Si.height,ht[Ht]=kt?parseFloat(ye)/100*Mt+"px":parseFloat(ye)/Mt*100+"%");ye=ht.join(" ")}return this.parseComplex(V.style,ye,ue,j,St)},formatter:nt}),zi("backgroundSize",{defaultValue:"0 0",formatter:function(V){return V+="",V.substr(0,2)==="co"?V:nt(V.indexOf(" ")===-1?V+" "+V:V)}}),zi("perspective",{defaultValue:"0px",prefix:!0}),zi("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),zi("transformStyle",{prefix:!0}),zi("backfaceVisibility",{prefix:!0}),zi("userSelect",{prefix:!0}),zi("margin",{parser:Ei("marginTop,marginRight,marginBottom,marginLeft")}),zi("padding",{parser:Ei("paddingTop,paddingRight,paddingBottom,paddingLeft")}),zi("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(V,tt,lt,at,j,St){var ht,Ot,Ht;return 9>E?(Ot=V.currentStyle,Ht=8>E?" ":",",ht="rect("+Ot.clipTop+Ht+Ot.clipRight+Ht+Ot.clipBottom+Ht+Ot.clipLeft+")",tt=this.format(tt).split(",").join(Ht)):(ht=this.format(dt(V,this.p,d,!1,this.dflt)),tt=this.format(tt)),this.parseComplex(V.style,ht,tt,j,St)}}),zi("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),zi("autoRound,strictUnits",{parser:function(V,tt,lt,at,j){return j}}),zi("border",{defaultValue:"0px solid #000",parser:function(V,tt,lt,at,j,St){var ht=dt(V,"borderTopWidth",d,!1,"0px"),Ot=this.format(tt).split(" "),Ht=Ot[0].replace(N,"");return Ht!=="px"&&(ht=parseFloat(ht)/pt(V,"borderTopWidth",1,Ht)+Ht),this.parseComplex(V.style,this.format(ht+" "+dt(V,"borderTopStyle",d,!1,"solid")+" "+dt(V,"borderTopColor",d,!1,"#000")),Ot.join(" "),j,St)},color:!0,formatter:function(V){var tt=V.split(" ");return tt[0]+" "+(tt[1]||"solid")+" "+(V.match(we)||["#000"])[0]}}),zi("borderWidth",{parser:Ei("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),zi("float,cssFloat,styleFloat",{parser:function(V,tt,lt,at,j,St){var ht=V.style,Ot="cssFloat"in ht?"cssFloat":"styleFloat";return new bi(ht,Ot,0,0,j,-1,lt,!1,0,ht[Ot],tt)}});var Dh=function(V){var tt,lt=this.t,at=lt.filter||dt(this.data,"filter")||"",j=this.s+this.c*V|0;j===100&&(at.indexOf("atrix(")===-1&&at.indexOf("radient(")===-1&&at.indexOf("oader(")===-1?(lt.removeAttribute("filter"),tt=!dt(this.data,"filter")):(lt.filter=at.replace(Z,""),tt=!0)),tt||(this.xn1&&(lt.filter=at=at||"alpha(opacity="+j+")"),at.indexOf("pacity")===-1?j===0&&this.xn1||(lt.filter=at+" alpha(opacity="+j+")"):lt.filter=at.replace(X,"opacity="+j))};zi("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(V,tt,lt,at,j,St){var ht=parseFloat(dt(V,"opacity",d,!1,"1")),Ot=V.style,Ht=lt==="autoAlpha";return typeof tt=="string"&&tt.charAt(1)==="="&&(tt=(tt.charAt(0)==="-"?-1:1)*parseFloat(tt.substr(2))+ht),Ht&&ht===1&&dt(V,"visibility",d)==="hidden"&&tt!==0&&(ht=0),pi?j=new bi(Ot,"opacity",ht,tt-ht,j):(j=new bi(Ot,"opacity",100*ht,100*(tt-ht),j),j.xn1=Ht?1:0,Ot.zoom=1,j.type=2,j.b="alpha(opacity="+j.s+")",j.e="alpha(opacity="+(j.s+j.c)+")",j.data=V,j.plugin=St,j.setRatio=Dh),Ht&&(j=new bi(Ot,"visibility",0,0,j,-1,null,!1,0,ht!==0?"inherit":"hidden",tt===0?"hidden":"inherit"),j.xs0="inherit",at._overwriteProps.push(j.n),at._overwriteProps.push(lt)),j}});var vs=function(V,tt){tt&&(V.removeProperty?((tt.substr(0,2)==="ms"||tt.substr(0,6)==="webkit")&&(tt="-"+tt),V.removeProperty(tt.replace(Rt,"-$1").toLowerCase())):V.removeAttribute(tt))},ys=function(V){if(this.t._gsClassPT=this,V===1||V===0){this.t.setAttribute("class",V===0?this.b:this.e);for(var tt=this.data,lt=this.t.style;tt;)tt.v?lt[tt.p]=tt.v:vs(lt,tt.p),tt=tt._next;V===1&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};zi("className",{parser:function(V,tt,lt,at,j,St,ht){var Ot,Ht,kt,Mt,he,se=V.getAttribute("class")||"",te=V.style.cssText;if(j=at._classNamePT=new bi(V,lt,0,0,j,2),j.setRatio=ys,j.pr=-11,s=!0,j.b=se,Ht=ie(V,d),kt=V._gsClassPT){for(Mt={},he=kt.data;he;)Mt[he.p]=1,he=he._next;kt.setRatio(1)}return V._gsClassPT=j,j.e=tt.charAt(1)!=="="?tt:se.replace(new RegExp("(?:\\s|^)"+tt.substr(2)+"(?![\\w-])"),"")+(tt.charAt(0)==="+"?" "+tt.substr(2):""),V.setAttribute("class",j.e),Ot=Kt(V,Ht,ie(V),ht,Mt),V.setAttribute("class",se),j.data=Ot.firstMPT,V.style.cssText=te,j=j.xfirst=at.parse(V,Ot.difs,j,St)}});var Xl=function(V){if((V===1||V===0)&&this.data._totalTime===this.data._totalDuration&&this.data.data!=="isFromStart"){var tt,lt,at,j,St,ht=this.t.style,Ot=_.transform.parse;if(this.e==="all")ht.cssText="",j=!0;else for(tt=this.e.split(" ").join("").split(","),at=tt.length;--at>-1;)lt=tt[at],_[lt]&&(_[lt].parse===Ot?j=!0:lt=lt==="transformOrigin"?gs:_[lt].p),vs(ht,lt);j&&(vs(ht,Mn),St=this.t._gsTransform,St&&(St.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(zi("clearProps",{parser:function(V,tt,lt,at,j){return j=new bi(V,lt,0,0,j,2),j.setRatio=Xl,j.e=tt,j.pr=-10,j.data=at._tween,s=!0,j}}),S="bezier,throwProps,physicsProps,physics2D".split(","),sn=S.length;sn--;)qo(S[sn]);S=m.prototype,S._firstPT=S._lastParsedTransform=S._transform=null,S._onInitTween=function(V,tt,lt,at){if(!V.nodeType)return!1;this._target=L=V,this._tween=lt,this._vars=tt,T=at,b=tt.autoRound,s=!1,c=tt.suffixMap||m.suffixMap,d=jt(V,""),u=this._overwriteProps;var j,St,ht,Ot,Ht,kt,Mt,he,se,te=V.style;if(O&&te.zIndex===""&&(j=dt(V,"zIndex",d),(j==="auto"||j==="")&&this._addLazySet(te,"zIndex",0)),typeof tt=="string"&&(Ot=te.cssText,j=ie(V,d),te.cssText=Ot+";"+tt,j=Kt(V,j,ie(V)).difs,!pi&&K.test(tt)&&(j.opacity=parseFloat(RegExp.$1)),tt=j,te.cssText=Ot),tt.className?this._firstPT=St=_.className.parse(V,tt.className,"className",this,null,null,tt):this._firstPT=St=this.parse(V,tt,null),this._transformType){for(se=this._transformType===3,Mn?k&&(O=!0,te.zIndex===""&&(Mt=dt(V,"zIndex",d),(Mt==="auto"||Mt==="")&&this._addLazySet(te,"zIndex",0)),F&&this._addLazySet(te,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(se?"visible":"hidden"))):te.zoom=1,ht=St;ht&&ht._next;)ht=ht._next;he=new bi(V,"transform",0,0,null,2),this._linkCSSP(he,null,ht),he.setRatio=Mn?Ih:jl,he.data=this._transform||uo(V,d,!0),he.tween=lt,he.pr=-1,u.pop()}if(s){for(;St;){for(kt=St._next,ht=Ot;ht&&ht.pr>St.pr;)ht=ht._next;(St._prev=ht?ht._prev:Ht)?St._prev._next=St:Ot=St,(St._next=ht)?ht._prev=St:Ht=St,St=kt}this._firstPT=Ot}return!0},S.parse=function(V,tt,lt,at){var j,St,ht,Ot,Ht,kt,Mt,he,se,te,ye=V.style;for(j in tt){if(kt=tt[j],typeof kt=="function"&&(kt=kt(T,L)),St=_[j])lt=St.parse(V,kt,j,this,lt,at,tt);else{if(j.substr(0,2)==="--"){this._tween._propLookup[j]=this._addTween.call(this._tween,V.style,"setProperty",jt(V).getPropertyValue(j)+"",kt+"",j,!1,j);continue}Ht=dt(V,j,d)+"",se=typeof kt=="string",j==="color"||j==="fill"||j==="stroke"||j.indexOf("Color")!==-1||se&&ct.test(kt)?(se||(kt=Ie(kt),kt=(kt.length>3?"rgba(":"rgb(")+kt.join(",")+")"),lt=sr(ye,j,Ht,kt,!0,"transparent",lt,0,at)):se&&re.test(kt)?lt=sr(ye,j,Ht,kt,!0,null,lt,0,at):(ht=parseFloat(Ht),Mt=ht||ht===0?Ht.substr((ht+"").length):"",(Ht===""||Ht==="auto")&&(j==="width"||j==="height"?(ht=st(V,j,d),Mt="px"):j==="left"||j==="top"?(ht=Dt(V,j,d),Mt="px"):(ht=j!=="opacity"?0:1,Mt="")),te=se&&kt.charAt(1)==="=",te?(Ot=parseInt(kt.charAt(0)+"1",10),kt=kt.substr(2),Ot*=parseFloat(kt),he=kt.replace(N,"")):(Ot=parseFloat(kt),he=se?kt.replace(N,""):""),he===""&&(he=j in c?c[j]:Mt),kt=Ot||Ot===0?(te?Ot+ht:Ot)+he:tt[j],Mt!==he&&(he!==""||j==="lineHeight")&&(Ot||Ot===0)&&ht&&(ht=pt(V,j,ht,Mt),he==="%"?(ht/=pt(V,j,100,"%")/100,tt.strictUnits!==!0&&(Ht=ht+"%")):he==="em"||he==="rem"||he==="vw"||he==="vh"?ht/=pt(V,j,1,he):he!=="px"&&(Ot=pt(V,j,Ot,he),he="px"),te&&(Ot||Ot===0)&&(kt=Ot+ht+he)),te&&(Ot+=ht),!ht&&ht!==0||!Ot&&Ot!==0?ye[j]!==void 0&&(kt||kt+""!="NaN"&&kt!=null)?(lt=new bi(ye,j,Ot||ht||0,0,lt,-1,j,!1,0,Ht,kt),lt.xs0=kt!=="none"||j!=="display"&&j.indexOf("Style")===-1?kt:Ht):mn("invalid "+j+" tween value: "+tt[j]):(lt=new bi(ye,j,ht,Ot-ht,lt,0,j,b!==!1&&(he==="px"||j==="zIndex"),0,Ht,kt),lt.xs0=he))}at&&lt&&!lt.plugin&&(lt.plugin=at)}return lt},S.setRatio=function(V){var tt,lt,at,j=this._firstPT,St=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(;j;){if(tt=j.c*V+j.s,j.r?tt=j.r(tt):St>tt&&tt>-St&&(tt=0),j.type)if(j.type===1)if(at=j.l,at===2)j.t[j.p]=j.xs0+tt+j.xs1+j.xn1+j.xs2;else if(at===3)j.t[j.p]=j.xs0+tt+j.xs1+j.xn1+j.xs2+j.xn2+j.xs3;else if(at===4)j.t[j.p]=j.xs0+tt+j.xs1+j.xn1+j.xs2+j.xn2+j.xs3+j.xn3+j.xs4;else if(at===5)j.t[j.p]=j.xs0+tt+j.xs1+j.xn1+j.xs2+j.xn2+j.xs3+j.xn3+j.xs4+j.xn4+j.xs5;else{for(lt=j.xs0+tt+j.xs1,at=1;at<j.l;at++)lt+=j["xn"+at]+j["xs"+(at+1)];j.t[j.p]=lt}else j.type===-1?j.t[j.p]=j.xs0:j.setRatio&&j.setRatio(V);else j.t[j.p]=tt+j.xs0;j=j._next}else for(;j;)j.type!==2?j.t[j.p]=j.b:j.setRatio(V),j=j._next;else for(;j;){if(j.type!==2)if(j.r&&j.type!==-1)if(tt=j.r(j.s+j.c),j.type){if(j.type===1){for(at=j.l,lt=j.xs0+tt+j.xs1,at=1;at<j.l;at++)lt+=j["xn"+at]+j["xs"+(at+1)];j.t[j.p]=lt}}else j.t[j.p]=tt+j.xs0;else j.t[j.p]=j.e;else j.setRatio(V);j=j._next}},S._enableTransforms=function(V){this._transform=this._transform||uo(this._target,d,!0),this._transformType=this._transform.svg&&ao||!V&&this._transformType!==3?2:3};var ql=function(V){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};S._addLazySet=function(V,tt,lt){var at=this._firstPT=new bi(V,tt,0,0,this._firstPT,2);at.e=lt,at.setRatio=ql,at.data=this},S._linkCSSP=function(V,tt,lt,at){return V&&(tt&&(tt._prev=V),V._next&&(V._next._prev=V._prev),V._prev?V._prev._next=V._next:this._firstPT===V&&(this._firstPT=V._next,at=!0),lt?lt._next=V:at||this._firstPT!==null||(this._firstPT=V),V._next=tt,V._prev=lt),V},S._mod=function(V){for(var tt=this._firstPT;tt;)typeof V[tt.p]=="function"&&(tt.r=V[tt.p]),tt=tt._next},S._kill=function(V){var tt,lt,at,j=V;if(V.autoAlpha||V.alpha){j={};for(lt in V)j[lt]=V[lt];j.opacity=1,j.autoAlpha&&(j.visibility=1)}for(V.className&&(tt=this._classNamePT)&&(at=tt.xfirst,at&&at._prev?this._linkCSSP(at._prev,tt._next,at._prev._prev):at===this._firstPT&&(this._firstPT=tt._next),tt._next&&this._linkCSSP(tt._next,tt._next._next,at._prev),this._classNamePT=null),tt=this._firstPT;tt;)tt.plugin&&tt.plugin!==lt&&tt.plugin._kill&&(tt.plugin._kill(V),lt=tt.plugin),tt=tt._next;return x.prototype._kill.call(this,j)};var Yr=function(V,tt,lt){var at,j,St,ht;if(V.slice)for(j=V.length;--j>-1;)Yr(V[j],tt,lt);else for(at=V.childNodes,j=at.length;--j>-1;)St=at[j],ht=St.type,St.style&&(tt.push(ie(St)),lt&&lt.push(St)),ht!==1&&ht!==9&&ht!==11||!St.childNodes.length||Yr(St,tt,lt)};return m.cascadeTo=function(V,tt,lt){var at,j,St,ht,Ot=a.to(V,tt,lt),Ht=[Ot],kt=[],Mt=[],he=[],se=a._internals.reservedProps;for(V=Ot._targets||Ot.target,Yr(V,kt,he),Ot.render(tt,!0,!0),Yr(V,Mt),Ot.render(0,!0,!0),Ot._enabled(!0),at=he.length;--at>-1;)if(j=Kt(he[at],kt[at],Mt[at]),j.firstMPT){j=j.difs;for(St in lt)se[St]&&(j[St]=lt[St]);ht={};for(St in j)ht[St]=kt[at][St];Ht.push(a.fromTo(he[at],tt,ht,j))}return Ht},x.activate([m]),m},!0),function(){var x=ln._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(d,u,m){return this._tween=m,!0}}),a=function(d){var u=1>d?Math.pow(10,(d+"").length-2):1;return function(m){return(Math.round(m/d)*d*u|0)/u}},s=function(d,u){for(;d;)d.f||d.blob||(d.m=u||Math.round),d=d._next},c=x.prototype;c._onInitAllProps=function(){var d,u,m,g,_=this._tween,S=_.vars.roundProps,b={},O=_._propLookup.roundProps;if(typeof S!="object"||S.push)for(typeof S=="string"&&(S=S.split(",")),m=S.length;--m>-1;)b[S[m]]=Math.round;else for(g in S)b[g]=a(S[g]);for(g in b)for(d=_._firstPT;d;)u=d._next,d.pg?d.t._mod(b):d.n===g&&(d.f===2&&d.t?s(d.t._firstPT,b[g]):(this._add(d.t,g,d.s,d.c,b[g]),u&&(u._prev=d._prev),d._prev?d._prev._next=u:_._firstPT===d&&(_._firstPT=u),d._next=d._prev=null,_._propLookup[g]=O)),d=u;return!1},c._add=function(d,u,m,g,_){this._addTween(d,u,m,m+g,u,_||Math.round),this._overwriteProps.push(u)}}(),function(){ln._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(x,a,s,c){var d,u;if(typeof x.setAttribute!="function")return!1;for(d in a)u=a[d],typeof u=="function"&&(u=u(c,x)),this._addTween(x,"setAttribute",x.getAttribute(d)+"",u+"",d,!1,d),this._overwriteProps.push(d);return!0}})}(),ln._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(x,a,s,c){typeof a!="object"&&(a={rotation:a}),this.finals={};var d,u,m,g,_,S,b=a.useRadians===!0?2*Math.PI:360,O=1e-6;for(d in a)d!=="useRadians"&&(g=a[d],typeof g=="function"&&(g=g(c,x)),S=(g+"").split("_"),u=S[0],m=parseFloat(typeof x[d]!="function"?x[d]:x[d.indexOf("set")||typeof x["get"+d.substr(3)]!="function"?d:"get"+d.substr(3)]()),g=this.finals[d]=typeof u=="string"&&u.charAt(1)==="="?m+parseInt(u.charAt(0)+"1",10)*Number(u.substr(2)):Number(u)||0,_=g-m,S.length&&(u=S.join("_"),u.indexOf("short")!==-1&&(_%=b,_!==_%(b/2)&&(_=0>_?_+b:_-b)),u.indexOf("_cw")!==-1&&0>_?_=(_+9999999999*b)%b-(_/b|0)*b:u.indexOf("ccw")!==-1&&_>0&&(_=(_-9999999999*b)%b-(_/b|0)*b)),(_>O||-O>_)&&(this._addTween(x,d,m,m+_,d),this._overwriteProps.push(d)));return!0},set:function(x){var a;if(x!==1)this._super.setRatio.call(this,x);else for(a=this._firstPT;a;)a.f?a.t[a.p](this.finals[a.p]):a.t[a.p]=this.finals[a.p],a=a._next}})._autoCSS=!0,ln._gsDefine("easing.Back",["easing.Ease"],function(x){var a,s,c,d,u=ln.GreenSockGlobals||ln,m=u.com.greensock,g=2*Math.PI,_=Math.PI/2,S=m._class,b=function(M,R){var C=S("easing."+M,function(){},!0),U=C.prototype=new x;return U.constructor=C,U.getRatio=R,C},O=x.register||function(){},k=function(M,R,C,U,N){var X=S("easing."+M,{easeOut:new R,easeIn:new C,easeInOut:new U},!0);return O(X,M),X},D=function(M,R,C){this.t=M,this.v=R,C&&(this.next=C,C.prev=this,this.c=C.v-R,this.gap=C.t-M)},F=function(M,R){var C=S("easing."+M,function(N){this._p1=N||N===0?N:1.70158,this._p2=1.525*this._p1},!0),U=C.prototype=new x;return U.constructor=C,U.getRatio=R,U.config=function(N){return new C(N)},C},E=k("Back",F("BackOut",function(M){return(M-=1)*M*((this._p1+1)*M+this._p1)+1}),F("BackIn",function(M){return M*M*((this._p1+1)*M-this._p1)}),F("BackInOut",function(M){return(M*=2)<1?.5*M*M*((this._p2+1)*M-this._p2):.5*((M-=2)*M*((this._p2+1)*M+this._p2)+2)})),L=S("easing.SlowMo",function(M,R,C){R=R||R===0?R:.7,M==null?M=.7:M>1&&(M=1),this._p=M!==1?R:0,this._p1=(1-M)/2,this._p2=M,this._p3=this._p1+this._p2,this._calcEnd=C===!0},!0),T=L.prototype=new x;return T.constructor=L,T.getRatio=function(M){var R=M+(.5-M)*this._p;return M<this._p1?this._calcEnd?1-(M=1-M/this._p1)*M:R-(M=1-M/this._p1)*M*M*M*R:M>this._p3?this._calcEnd?M===1?0:1-(M=(M-this._p3)/this._p1)*M:R+(M-R)*(M=(M-this._p3)/this._p1)*M*M*M:this._calcEnd?1:R},L.ease=new L(.7,.7),T.config=L.config=function(M,R,C){return new L(M,R,C)},a=S("easing.SteppedEase",function(M,R){M=M||1,this._p1=1/M,this._p2=M+(R?0:1),this._p3=R?1:0},!0),T=a.prototype=new x,T.constructor=a,T.getRatio=function(M){return 0>M?M=0:M>=1&&(M=.999999999),((this._p2*M|0)+this._p3)*this._p1},T.config=a.config=function(M,R){return new a(M,R)},s=S("easing.ExpoScaleEase",function(M,R,C){this._p1=Math.log(R/M),this._p2=R-M,this._p3=M,this._ease=C},!0),T=s.prototype=new x,T.constructor=s,T.getRatio=function(M){return this._ease&&(M=this._ease.getRatio(M)),(this._p3*Math.exp(this._p1*M)-this._p3)/this._p2},T.config=s.config=function(M,R,C){return new s(M,R,C)},c=S("easing.RoughEase",function(M){M=M||{};for(var R,C,U,N,X,K,Z=M.taper||"none",ct=[],Rt=0,et=0|(M.points||20),_t=et,G=M.randomize!==!1,Pt=M.clamp===!0,Et=M.template instanceof x?M.template:null,At=typeof M.strength=="number"?.4*M.strength:.4;--_t>-1;)R=G?Math.random():1/et*_t,C=Et?Et.getRatio(R):R,Z==="none"?U=At:Z==="out"?(N=1-R,U=N*N*At):Z==="in"?U=R*R*At:.5>R?(N=2*R,U=N*N*.5*At):(N=2*(1-R),U=N*N*.5*At),G?C+=Math.random()*U-.5*U:_t%2?C+=.5*U:C-=.5*U,Pt&&(C>1?C=1:0>C&&(C=0)),ct[Rt++]={x:R,y:C};for(ct.sort(function(ce,re){return ce.x-re.x}),K=new D(1,1,null),_t=et;--_t>-1;)X=ct[_t],K=new D(X.x,X.y,K);this._prev=new D(0,0,K.t!==0?K:K.next)},!0),T=c.prototype=new x,T.constructor=c,T.getRatio=function(M){var R=this._prev;if(M>R.t){for(;R.next&&M>=R.t;)R=R.next;R=R.prev}else for(;R.prev&&M<=R.t;)R=R.prev;return this._prev=R,R.v+(M-R.t)/R.gap*R.c},T.config=function(M){return new c(M)},c.ease=new c,k("Bounce",b("BounceOut",function(M){return 1/2.75>M?7.5625*M*M:2/2.75>M?7.5625*(M-=1.5/2.75)*M+.75:2.5/2.75>M?7.5625*(M-=2.25/2.75)*M+.9375:7.5625*(M-=2.625/2.75)*M+.984375}),b("BounceIn",function(M){return(M=1-M)<1/2.75?1-7.5625*M*M:2/2.75>M?1-(7.5625*(M-=1.5/2.75)*M+.75):2.5/2.75>M?1-(7.5625*(M-=2.25/2.75)*M+.9375):1-(7.5625*(M-=2.625/2.75)*M+.984375)}),b("BounceInOut",function(M){var R=.5>M;return M=R?1-2*M:2*M-1,M=1/2.75>M?7.5625*M*M:2/2.75>M?7.5625*(M-=1.5/2.75)*M+.75:2.5/2.75>M?7.5625*(M-=2.25/2.75)*M+.9375:7.5625*(M-=2.625/2.75)*M+.984375,R?.5*(1-M):.5*M+.5})),k("Circ",b("CircOut",function(M){return Math.sqrt(1-(M-=1)*M)}),b("CircIn",function(M){return-(Math.sqrt(1-M*M)-1)}),b("CircInOut",function(M){return(M*=2)<1?-.5*(Math.sqrt(1-M*M)-1):.5*(Math.sqrt(1-(M-=2)*M)+1)})),d=function(M,R,C){var U=S("easing."+M,function(X,K){this._p1=X>=1?X:1,this._p2=(K||C)/(1>X?X:1),this._p3=this._p2/g*(Math.asin(1/this._p1)||0),this._p2=g/this._p2},!0),N=U.prototype=new x;return N.constructor=U,N.getRatio=R,N.config=function(X,K){return new U(X,K)},U},k("Elastic",d("ElasticOut",function(M){return this._p1*Math.pow(2,-10*M)*Math.sin((M-this._p3)*this._p2)+1},.3),d("ElasticIn",function(M){return-(this._p1*Math.pow(2,10*(M-=1))*Math.sin((M-this._p3)*this._p2))},.3),d("ElasticInOut",function(M){return(M*=2)<1?-.5*(this._p1*Math.pow(2,10*(M-=1))*Math.sin((M-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(M-=1))*Math.sin((M-this._p3)*this._p2)*.5+1},.45)),k("Expo",b("ExpoOut",function(M){return 1-Math.pow(2,-10*M)}),b("ExpoIn",function(M){return Math.pow(2,10*(M-1))-.001}),b("ExpoInOut",function(M){return(M*=2)<1?.5*Math.pow(2,10*(M-1)):.5*(2-Math.pow(2,-10*(M-1)))})),k("Sine",b("SineOut",function(M){return Math.sin(M*_)}),b("SineIn",function(M){return-Math.cos(M*_)+1}),b("SineInOut",function(M){return-.5*(Math.cos(Math.PI*M)-1)})),S("easing.EaseLookup",{find:function(M){return x.map[M]}},!0),O(u.SlowMo,"SlowMo","ease,"),O(c,"RoughEase","ease,"),O(a,"SteppedEase","ease,"),E},!0)}),ln._gsDefine&&ln._gsQueue.pop()(),function(x,a){var s={},c=x.document,d=x.GreenSockGlobals=x.GreenSockGlobals||x,u=d[a];if(u)return typeof module<"u"&&module.exports&&(module.exports=u),u;var m,g,_,S,b,O=function(z){var Q,st=z.split("."),nt=d;for(Q=0;Q<st.length;Q++)nt[st[Q]]=nt=nt[st[Q]]||{};return nt},k=O("com.greensock"),D=1e-10,F=function(z){var Q,st=[],nt=z.length;for(Q=0;Q!==nt;st.push(z[Q++]));return st},E=function(){},L=function(){var z=Object.prototype.toString,Q=z.call([]);return function(st){return st!=null&&(st instanceof Array||typeof st=="object"&&!!st.push&&z.call(st)===Q)}}(),T={},M=function(z,Q,st,nt){this.sc=T[z]?T[z].sc:[],T[z]=this,this.gsClass=null,this.func=st;var vt=[];this.check=function(Gt){for(var qt,Xt,Ne,Ie,ge=Q.length,we=ge;--ge>-1;)(qt=T[Q[ge]]||new M(Q[ge],[])).gsClass?(vt[ge]=qt.gsClass,we--):Gt&&qt.sc.push(this);if(we===0&&st){if(Xt=("com.greensock."+z).split("."),Ne=Xt.pop(),Ie=O(Xt.join("."))[Ne]=this.gsClass=st.apply(st,vt),nt)if(d[Ne]=s[Ne]=Ie,typeof module<"u"&&module.exports)if(z===a){module.exports=s[a]=Ie;for(ge in s)Ie[ge]=s[ge]}else s[a]&&(s[a][Ne]=Ie);else typeof define=="function"&&define.amd&&define((x.GreenSockAMDPath?x.GreenSockAMDPath+"/":"")+z.split(".").pop(),[],function(){return Ie});for(ge=0;ge<this.sc.length;ge++)this.sc[ge].check()}},this.check(!0)},R=x._gsDefine=function(z,Q,st,nt){return new M(z,Q,st,nt)},C=k._class=function(z,Q,st){return Q=Q||function(){},R(z,[],function(){return Q},st),Q};R.globals=d;var U=[0,0,1,1],N=C("easing.Ease",function(z,Q,st,nt){this._func=z,this._type=st||0,this._power=nt||0,this._params=Q?U.concat(Q):U},!0),X=N.map={},K=N.register=function(z,Q,st,nt){for(var vt,Gt,qt,Xt,Ne=Q.split(","),Ie=Ne.length,ge=(st||"easeIn,easeOut,easeInOut").split(",");--Ie>-1;)for(Gt=Ne[Ie],vt=nt?C("easing."+Gt,null,!0):k.easing[Gt]||{},qt=ge.length;--qt>-1;)Xt=ge[qt],X[Gt+"."+Xt]=X[Xt+Gt]=vt[Xt]=z.getRatio?z:z[Xt]||new z};for(_=N.prototype,_._calcEnd=!1,_.getRatio=function(z){if(this._func)return this._params[0]=z,this._func.apply(null,this._params);var Q=this._type,st=this._power,nt=Q===1?1-z:Q===2?z:.5>z?2*z:2*(1-z);return st===1?nt*=nt:st===2?nt*=nt*nt:st===3?nt*=nt*nt*nt:st===4&&(nt*=nt*nt*nt*nt),Q===1?1-nt:Q===2?nt:.5>z?nt/2:1-nt/2},m=["Linear","Quad","Cubic","Quart","Quint,Strong"],g=m.length;--g>-1;)_=m[g]+",Power"+g,K(new N(null,null,1,g),_,"easeOut",!0),K(new N(null,null,2,g),_,"easeIn"+(g===0?",easeNone":"")),K(new N(null,null,3,g),_,"easeInOut");X.linear=k.easing.Linear.easeIn,X.swing=k.easing.Quad.easeInOut;var Z=C("events.EventDispatcher",function(z){this._listeners={},this._eventTarget=z||this});_=Z.prototype,_.addEventListener=function(z,Q,st,nt,vt){vt=vt||0;var Gt,qt,Xt=this._listeners[z],Ne=0;for(this!==S||b||S.wake(),Xt==null&&(this._listeners[z]=Xt=[]),qt=Xt.length;--qt>-1;)Gt=Xt[qt],Gt.c===Q&&Gt.s===st?Xt.splice(qt,1):Ne===0&&Gt.pr<vt&&(Ne=qt+1);Xt.splice(Ne,0,{c:Q,s:st,up:nt,pr:vt})},_.removeEventListener=function(z,Q){var st,nt=this._listeners[z];if(nt){for(st=nt.length;--st>-1;)if(nt[st].c===Q)return void nt.splice(st,1)}},_.dispatchEvent=function(z){var Q,st,nt,vt=this._listeners[z];if(vt)for(Q=vt.length,Q>1&&(vt=vt.slice(0)),st=this._eventTarget;--Q>-1;)nt=vt[Q],nt&&(nt.up?nt.c.call(nt.s||st,{type:z,target:st}):nt.c.call(nt.s||st))};var ct=x.requestAnimationFrame,Rt=x.cancelAnimationFrame,et=Date.now||function(){return new Date().getTime()},_t=et();for(m=["ms","moz","webkit","o"],g=m.length;--g>-1&&!ct;)ct=x[m[g]+"RequestAnimationFrame"],Rt=x[m[g]+"CancelAnimationFrame"]||x[m[g]+"CancelRequestAnimationFrame"];C("Ticker",function(z,Q){var st,nt,vt,Gt,qt,Xt=this,Ne=et(),Ie=Q!==!1&&ct?"auto":!1,ge=500,we=33,yi="tick",Ei=function(ni){var bi,qr,sr=et()-_t;sr>ge&&(Ne+=sr-we),_t+=sr,Xt.time=(_t-Ne)/1e3,bi=Xt.time-qt,(!st||bi>0||ni===!0)&&(Xt.frame++,qt+=bi+(bi>=Gt?.004:Gt-bi),qr=!0),ni!==!0&&(vt=nt(Ei)),qr&&Xt.dispatchEvent(yi)};Z.call(Xt),Xt.time=Xt.frame=0,Xt.tick=function(){Ei(!0)},Xt.lagSmoothing=function(ni,bi){return arguments.length?(ge=ni||1/D,void(we=Math.min(bi,ge,0))):1/D>ge},Xt.sleep=function(){vt!=null&&(Ie&&Rt?Rt(vt):clearTimeout(vt),nt=E,vt=null,Xt===S&&(b=!1))},Xt.wake=function(ni){vt!==null?Xt.sleep():ni?Ne+=-_t+(_t=et()):Xt.frame>10&&(_t=et()-ge+5),nt=st===0?E:Ie&&ct?ct:function(bi){return setTimeout(bi,1e3*(qt-Xt.time)+1|0)},Xt===S&&(b=!0),Ei(2)},Xt.fps=function(ni){return arguments.length?(st=ni,Gt=1/(st||60),qt=this.time+Gt,void Xt.wake()):st},Xt.useRAF=function(ni){return arguments.length?(Xt.sleep(),Ie=ni,void Xt.fps(st)):Ie},Xt.fps(z),setTimeout(function(){Ie==="auto"&&Xt.frame<5&&(c||{}).visibilityState!=="hidden"&&Xt.useRAF(!1)},1500)}),_=k.Ticker.prototype=new k.events.EventDispatcher,_.constructor=k.Ticker;var G=C("core.Animation",function(z,Q){if(this.vars=Q=Q||{},this._duration=this._totalDuration=z||0,this._delay=Number(Q.delay)||0,this._timeScale=1,this._active=Q.immediateRender===!0,this.data=Q.data,this._reversed=Q.reversed===!0,W){b||S.wake();var st=this.vars.useFrames?Qi:W;st.add(this,st._time),this.vars.paused&&this.paused(!0)}});S=G.ticker=new k.Ticker,_=G.prototype,_._dirty=_._gc=_._initted=_._paused=!1,_._totalTime=_._time=0,_._rawPrevTime=-1,_._next=_._last=_._onUpdate=_._timeline=_.timeline=null,_._paused=!1;var Pt=function(){b&&et()-_t>2e3&&((c||{}).visibilityState!=="hidden"||!S.lagSmoothing())&&S.wake();var z=setTimeout(Pt,2e3);z.unref&&z.unref()};Pt(),_.play=function(z,Q){return z!=null&&this.seek(z,Q),this.reversed(!1).paused(!1)},_.pause=function(z,Q){return z!=null&&this.seek(z,Q),this.paused(!0)},_.resume=function(z,Q){return z!=null&&this.seek(z,Q),this.paused(!1)},_.seek=function(z,Q){return this.totalTime(Number(z),Q!==!1)},_.restart=function(z,Q){return this.reversed(!1).paused(!1).totalTime(z?-this._delay:0,Q!==!1,!0)},_.reverse=function(z,Q){return z!=null&&this.seek(z||this.totalDuration(),Q),this.reversed(!0).paused(!1)},_.render=function(z,Q,st){},_.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},_.isActive=function(){var z,Q=this._timeline,st=this._startTime;return!Q||!this._gc&&!this._paused&&Q.isActive()&&(z=Q.rawTime(!0))>=st&&z<st+this.totalDuration()/this._timeScale-1e-7},_._enabled=function(z,Q){return b||S.wake(),this._gc=!z,this._active=this.isActive(),Q!==!0&&(z&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!z&&this.timeline&&this._timeline._remove(this,!0)),!1},_._kill=function(z,Q){return this._enabled(!1,!1)},_.kill=function(z,Q){return this._kill(z,Q),this},_._uncache=function(z){for(var Q=z?this:this.timeline;Q;)Q._dirty=!0,Q=Q.timeline;return this},_._swapSelfInParams=function(z){for(var Q=z.length,st=z.concat();--Q>-1;)z[Q]==="{self}"&&(st[Q]=this);return st},_._callback=function(z){var Q=this.vars,st=Q[z],nt=Q[z+"Params"],vt=Q[z+"Scope"]||Q.callbackScope||this,Gt=nt?nt.length:0;switch(Gt){case 0:st.call(vt);break;case 1:st.call(vt,nt[0]);break;case 2:st.call(vt,nt[0],nt[1]);break;default:st.apply(vt,nt)}},_.eventCallback=function(z,Q,st,nt){if((z||"").substr(0,2)==="on"){var vt=this.vars;if(arguments.length===1)return vt[z];Q==null?delete vt[z]:(vt[z]=Q,vt[z+"Params"]=L(st)&&st.join("").indexOf("{self}")!==-1?this._swapSelfInParams(st):st,vt[z+"Scope"]=nt),z==="onUpdate"&&(this._onUpdate=Q)}return this},_.delay=function(z){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+z-this._delay),this._delay=z,this):this._delay},_.duration=function(z){return arguments.length?(this._duration=this._totalDuration=z,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&z!==0&&this.totalTime(this._totalTime*(z/this._duration),!0),this):(this._dirty=!1,this._duration)},_.totalDuration=function(z){return this._dirty=!1,arguments.length?this.duration(z):this._totalDuration},_.time=function(z,Q){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(z>this._duration?this._duration:z,Q)):this._time},_.totalTime=function(z,Q,st){if(b||S.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>z&&!st&&(z+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var nt=this._totalDuration,vt=this._timeline;if(z>nt&&!st&&(z=nt),this._startTime=(this._paused?this._pauseTime:vt._time)-(this._reversed?nt-z:z)/this._timeScale,vt._dirty||this._uncache(!1),vt._timeline)for(;vt._timeline;)vt._timeline._time!==(vt._startTime+vt._totalTime)/vt._timeScale&&vt.totalTime(vt._totalTime,!0),vt=vt._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==z||this._duration===0)&&(Ft.length&&jt(),this.render(z,Q,!1),Ft.length&&jt())}return this},_.progress=_.totalProgress=function(z,Q){var st=this.duration();return arguments.length?this.totalTime(st*z,Q):st?this._time/st:this.ratio},_.startTime=function(z){return arguments.length?(z!==this._startTime&&(this._startTime=z,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,z-this._delay)),this):this._startTime},_.endTime=function(z){return this._startTime+(z!=0?this.totalDuration():this.duration())/this._timeScale},_.timeScale=function(z){if(!arguments.length)return this._timeScale;var Q,st;for(z=z||D,this._timeline&&this._timeline.smoothChildTiming&&(Q=this._pauseTime,st=Q||Q===0?Q:this._timeline.totalTime(),this._startTime=st-(st-this._startTime)*this._timeScale/z),this._timeScale=z,st=this.timeline;st&&st.timeline;)st._dirty=!0,st.totalDuration(),st=st.timeline;return this},_.reversed=function(z){return arguments.length?(z!=this._reversed&&(this._reversed=z,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},_.paused=function(z){if(!arguments.length)return this._paused;var Q,st,nt=this._timeline;return z!=this._paused&&nt&&(b||z||S.wake(),Q=nt.rawTime(),st=Q-this._pauseTime,!z&&nt.smoothChildTiming&&(this._startTime+=st,this._uncache(!1)),this._pauseTime=z?Q:null,this._paused=z,this._active=this.isActive(),!z&&st!==0&&this._initted&&this.duration()&&(Q=nt.smoothChildTiming?this._totalTime:(Q-this._startTime)/this._timeScale,this.render(Q,Q===this._totalTime,!0))),this._gc&&!z&&this._enabled(!0,!1),this};var Et=C("core.SimpleTimeline",function(z){G.call(this,0,z),this.autoRemoveChildren=this.smoothChildTiming=!0});_=Et.prototype=new G,_.constructor=Et,_.kill()._gc=!1,_._first=_._last=_._recent=null,_._sortChildren=!1,_.add=_.insert=function(z,Q,st,nt){var vt,Gt;if(z._startTime=Number(Q||0)+z._delay,z._paused&&this!==z._timeline&&(z._pauseTime=this.rawTime()-(z._timeline.rawTime()-z._pauseTime)),z.timeline&&z.timeline._remove(z,!0),z.timeline=z._timeline=this,z._gc&&z._enabled(!0,!0),vt=this._last,this._sortChildren)for(Gt=z._startTime;vt&&vt._startTime>Gt;)vt=vt._prev;return vt?(z._next=vt._next,vt._next=z):(z._next=this._first,this._first=z),z._next?z._next._prev=z:this._last=z,z._prev=vt,this._recent=z,this._timeline&&this._uncache(!0),this},_._remove=function(z,Q){return z.timeline===this&&(Q||z._enabled(!1,!0),z._prev?z._prev._next=z._next:this._first===z&&(this._first=z._next),z._next?z._next._prev=z._prev:this._last===z&&(this._last=z._prev),z._next=z._prev=z.timeline=null,z===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},_.render=function(z,Q,st){var nt,vt=this._first;for(this._totalTime=this._time=this._rawPrevTime=z;vt;)nt=vt._next,(vt._active||z>=vt._startTime&&!vt._paused&&!vt._gc)&&(vt._reversed?vt.render((vt._dirty?vt.totalDuration():vt._totalDuration)-(z-vt._startTime)*vt._timeScale,Q,st):vt.render((z-vt._startTime)*vt._timeScale,Q,st)),vt=nt},_.rawTime=function(){return b||S.wake(),this._totalTime};var At=C("TweenLite",function(z,Q,st){if(G.call(this,Q,st),this.render=At.prototype.render,z==null)throw"Cannot tween a null target.";this.target=z=typeof z!="string"?z:At.selector(z)||z;var nt,vt,Gt,qt=z.jquery||z.length&&z!==x&&z[0]&&(z[0]===x||z[0].nodeType&&z[0].style&&!z.nodeType),Xt=this.vars.overwrite;if(this._overwrite=Xt=Xt==null?mn[At.defaultOverwrite]:typeof Xt=="number"?Xt>>0:mn[Xt],(qt||z instanceof Array||z.push&&L(z))&&typeof z[0]!="number")for(this._targets=Gt=F(z),this._propLookup=[],this._siblings=[],nt=0;nt<Gt.length;nt++)vt=Gt[nt],vt?typeof vt!="string"?vt.length&&vt!==x&&vt[0]&&(vt[0]===x||vt[0].nodeType&&vt[0].style&&!vt.nodeType)?(Gt.splice(nt--,1),this._targets=Gt=Gt.concat(F(vt))):(this._siblings[nt]=dt(vt,this,!1),Xt===1&&this._siblings[nt].length>1&&Dt(vt,this,null,1,this._siblings[nt])):(vt=Gt[nt--]=At.selector(vt),typeof vt=="string"&&Gt.splice(nt+1,1)):Gt.splice(nt--,1);else this._propLookup={},this._siblings=dt(z,this,!1),Xt===1&&this._siblings.length>1&&Dt(z,this,null,1,this._siblings);(this.vars.immediateRender||Q===0&&this._delay===0&&this.vars.immediateRender!==!1)&&(this._time=-D,this.render(Math.min(0,-this._delay)))},!0),ce=function(z){return z&&z.length&&z!==x&&z[0]&&(z[0]===x||z[0].nodeType&&z[0].style&&!z.nodeType)},re=function(z,Q){var st,nt={};for(st in z)Di[st]||st in Q&&st!=="transform"&&st!=="x"&&st!=="y"&&st!=="width"&&st!=="height"&&st!=="className"&&st!=="border"||!(!Oe[st]||Oe[st]&&Oe[st]._autoCSS)||(nt[st]=z[st],delete z[st]);z.css=nt};_=At.prototype=new G,_.constructor=At,_.kill()._gc=!1,_.ratio=0,_._firstPT=_._targets=_._overwrittenProps=_._startAt=null,_._notifyPluginsOfEnabled=_._lazy=!1,At.version="2.0.2",At.defaultEase=_._ease=new N(null,null,1,1),At.defaultOverwrite="auto",At.ticker=S,At.autoSleep=120,At.lagSmoothing=function(z,Q){S.lagSmoothing(z,Q)},At.selector=x.$||x.jQuery||function(z){var Q=x.$||x.jQuery;return Q?(At.selector=Q,Q(z)):(c||(c=x.document),c?c.querySelectorAll?c.querySelectorAll(z):c.getElementById(z.charAt(0)==="#"?z.substr(1):z):z)};var Ft=[],It={},Nt=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Pe=/[\+-]=-?[\.\d]/,pe=function(z){for(var Q,st=this._firstPT,nt=1e-6;st;)Q=st.blob?z===1&&this.end!=null?this.end:z?this.join(""):this.start:st.c*z+st.s,st.m?Q=st.m.call(this._tween,Q,this._target||st.t,this._tween):nt>Q&&Q>-nt&&!st.blob&&(Q=0),st.f?st.fp?st.t[st.p](st.fp,Q):st.t[st.p](Q):st.t[st.p]=Q,st=st._next},Wt=function(z,Q,st,nt){var vt,Gt,qt,Xt,Ne,Ie,ge,we=[],yi=0,Ei="",ni=0;for(we.start=z,we.end=Q,z=we[0]=z+"",Q=we[1]=Q+"",st&&(st(we),z=we[0],Q=we[1]),we.length=0,vt=z.match(Nt)||[],Gt=Q.match(Nt)||[],nt&&(nt._next=null,nt.blob=1,we._firstPT=we._applyPT=nt),Ne=Gt.length,Xt=0;Ne>Xt;Xt++)ge=Gt[Xt],Ie=Q.substr(yi,Q.indexOf(ge,yi)-yi),Ei+=Ie||!Xt?Ie:",",yi+=Ie.length,ni?ni=(ni+1)%5:Ie.substr(-5)==="rgba("&&(ni=1),ge===vt[Xt]||vt.length<=Xt?Ei+=ge:(Ei&&(we.push(Ei),Ei=""),qt=parseFloat(vt[Xt]),we.push(qt),we._firstPT={_next:we._firstPT,t:we,p:we.length-1,s:qt,c:(ge.charAt(1)==="="?parseInt(ge.charAt(0)+"1",10)*parseFloat(ge.substr(2)):parseFloat(ge)-qt)||0,f:0,m:ni&&4>ni?Math.round:0}),yi+=ge.length;return Ei+=Q.substr(yi),Ei&&we.push(Ei),we.setRatio=pe,Pe.test(Q)&&(we.end=null),we},$e=function(z,Q,st,nt,vt,Gt,qt,Xt,Ne){typeof nt=="function"&&(nt=nt(Ne||0,z));var Ie,ge=typeof z[Q],we=ge!=="function"?"":Q.indexOf("set")||typeof z["get"+Q.substr(3)]!="function"?Q:"get"+Q.substr(3),yi=st!=="get"?st:we?qt?z[we](qt):z[we]():z[Q],Ei=typeof nt=="string"&&nt.charAt(1)==="=",ni={t:z,p:Q,s:yi,f:ge==="function",pg:0,n:vt||Q,m:Gt?typeof Gt=="function"?Gt:Math.round:0,pr:0,c:Ei?parseInt(nt.charAt(0)+"1",10)*parseFloat(nt.substr(2)):parseFloat(nt)-yi||0};return(typeof yi!="number"||typeof nt!="number"&&!Ei)&&(qt||isNaN(yi)||!Ei&&isNaN(nt)||typeof yi=="boolean"||typeof nt=="boolean"?(ni.fp=qt,Ie=Wt(yi,Ei?parseFloat(ni.s)+ni.c+(ni.s+"").replace(/[0-9\-\.]/g,""):nt,Xt||At.defaultStringFilter,ni),ni={t:Ie,p:"setRatio",s:0,c:1,f:2,pg:0,n:vt||Q,pr:0,m:0}):(ni.s=parseFloat(yi),Ei||(ni.c=parseFloat(nt)-ni.s||0))),ni.c?((ni._next=this._firstPT)&&(ni._next._prev=ni),this._firstPT=ni,ni):void 0},Si=At._internals={isArray:L,isSelector:ce,lazyTweens:Ft,blobDif:Wt},Oe=At._plugins={},Ge=Si.tweenLookup={},pi=0,Di=Si.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},mn={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},Qi=G._rootFramesTimeline=new Et,W=G._rootTimeline=new Et,Jt=30,jt=Si.lazyRender=function(){var z,Q=Ft.length;for(It={};--Q>-1;)z=Ft[Q],z&&z._lazy!==!1&&(z.render(z._lazy[0],z._lazy[1],!0),z._lazy=!1);Ft.length=0};W._startTime=S.time,Qi._startTime=S.frame,W._active=Qi._active=!0,setTimeout(jt,1),G._updateRoot=At.render=function(){var z,Q,st;if(Ft.length&&jt(),W.render((S.time-W._startTime)*W._timeScale,!1,!1),Qi.render((S.frame-Qi._startTime)*Qi._timeScale,!1,!1),Ft.length&&jt(),S.frame>=Jt){Jt=S.frame+(parseInt(At.autoSleep,10)||120);for(st in Ge){for(Q=Ge[st].tweens,z=Q.length;--z>-1;)Q[z]._gc&&Q.splice(z,1);Q.length===0&&delete Ge[st]}if(st=W._first,(!st||st._paused)&&At.autoSleep&&!Qi._first&&S._listeners.tick.length===1){for(;st&&st._paused;)st=st._next;st||S.sleep()}}},S.addEventListener("tick",G._updateRoot);var dt=function(z,Q,st){var nt,vt,Gt=z._gsTweenID;if(Ge[Gt||(z._gsTweenID=Gt="t"+pi++)]||(Ge[Gt]={target:z,tweens:[]}),Q&&(nt=Ge[Gt].tweens,nt[vt=nt.length]=Q,st))for(;--vt>-1;)nt[vt]===Q&&nt.splice(vt,1);return Ge[Gt].tweens},pt=function(z,Q,st,nt){var vt,Gt,qt=z.vars.onOverwrite;return qt&&(vt=qt(z,Q,st,nt)),qt=At.onOverwrite,qt&&(Gt=qt(z,Q,st,nt)),vt!==!1&&Gt!==!1},Dt=function(z,Q,st,nt,vt){var Gt,qt,Xt,Ne;if(nt===1||nt>=4){for(Ne=vt.length,Gt=0;Ne>Gt;Gt++)if((Xt=vt[Gt])!==Q)Xt._gc||Xt._kill(null,z,Q)&&(qt=!0);else if(nt===5)break;return qt}var Ie,ge=Q._startTime+D,we=[],yi=0,Ei=Q._duration===0;for(Gt=vt.length;--Gt>-1;)(Xt=vt[Gt])===Q||Xt._gc||Xt._paused||(Xt._timeline!==Q._timeline?(Ie=Ie||ie(Q,0,Ei),ie(Xt,Ie,Ei)===0&&(we[yi++]=Xt)):Xt._startTime<=ge&&Xt._startTime+Xt.totalDuration()/Xt._timeScale>ge&&((Ei||!Xt._initted)&&ge-Xt._startTime<=2e-10||(we[yi++]=Xt)));for(Gt=yi;--Gt>-1;)if(Xt=we[Gt],Ne=Xt._firstPT,nt===2&&Xt._kill(st,z,Q)&&(qt=!0),nt!==2||!Xt._firstPT&&Xt._initted&&Ne){if(nt!==2&&!pt(Xt,Q))continue;Xt._enabled(!1,!1)&&(qt=!0)}return qt},ie=function(z,Q,st){for(var nt=z._timeline,vt=nt._timeScale,Gt=z._startTime;nt._timeline;){if(Gt+=nt._startTime,vt*=nt._timeScale,nt._paused)return-100;nt=nt._timeline}return Gt/=vt,Gt>Q?Gt-Q:st&&Gt===Q||!z._initted&&2*D>Gt-Q?D:(Gt+=z.totalDuration()/z._timeScale/vt)>Q+D?0:Gt-Q-D};_._init=function(){var z,Q,st,nt,vt,Gt,qt=this.vars,Xt=this._overwrittenProps,Ne=this._duration,Ie=!!qt.immediateRender,ge=qt.ease;if(qt.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),vt={};for(nt in qt.startAt)vt[nt]=qt.startAt[nt];if(vt.data="isStart",vt.overwrite=!1,vt.immediateRender=!0,vt.lazy=Ie&&qt.lazy!==!1,vt.startAt=vt.delay=null,vt.onUpdate=qt.onUpdate,vt.onUpdateParams=qt.onUpdateParams,vt.onUpdateScope=qt.onUpdateScope||qt.callbackScope||this,this._startAt=At.to(this.target||{},0,vt),Ie){if(this._time>0)this._startAt=null;else if(Ne!==0)return}}else if(qt.runBackwards&&Ne!==0)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{this._time!==0&&(Ie=!1),st={};for(nt in qt)Di[nt]&&nt!=="autoCSS"||(st[nt]=qt[nt]);if(st.overwrite=0,st.data="isFromStart",st.lazy=Ie&&qt.lazy!==!1,st.immediateRender=Ie,this._startAt=At.to(this.target,0,st),Ie){if(this._time===0)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=ge=ge?ge instanceof N?ge:typeof ge=="function"?new N(ge,qt.easeParams):X[ge]||At.defaultEase:At.defaultEase,qt.easeParams instanceof Array&&ge.config&&(this._ease=ge.config.apply(ge,qt.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(Gt=this._targets.length,z=0;Gt>z;z++)this._initProps(this._targets[z],this._propLookup[z]={},this._siblings[z],Xt?Xt[z]:null,z)&&(Q=!0);else Q=this._initProps(this.target,this._propLookup,this._siblings,Xt,0);if(Q&&At._onPluginEvent("_onInitAllProps",this),Xt&&(this._firstPT||typeof this.target!="function"&&this._enabled(!1,!1)),qt.runBackwards)for(st=this._firstPT;st;)st.s+=st.c,st.c=-st.c,st=st._next;this._onUpdate=qt.onUpdate,this._initted=!0},_._initProps=function(z,Q,st,nt,vt){var Gt,qt,Xt,Ne,Ie,ge;if(z==null)return!1;It[z._gsTweenID]&&jt(),this.vars.css||z.style&&z!==x&&z.nodeType&&Oe.css&&this.vars.autoCSS!==!1&&re(this.vars,z);for(Gt in this.vars)if(ge=this.vars[Gt],Di[Gt])ge&&(ge instanceof Array||ge.push&&L(ge))&&ge.join("").indexOf("{self}")!==-1&&(this.vars[Gt]=ge=this._swapSelfInParams(ge,this));else if(Oe[Gt]&&(Ne=new Oe[Gt])._onInitTween(z,this.vars[Gt],this,vt)){for(this._firstPT=Ie={_next:this._firstPT,t:Ne,p:"setRatio",s:0,c:1,f:1,n:Gt,pg:1,pr:Ne._priority,m:0},qt=Ne._overwriteProps.length;--qt>-1;)Q[Ne._overwriteProps[qt]]=this._firstPT;(Ne._priority||Ne._onInitAllProps)&&(Xt=!0),(Ne._onDisable||Ne._onEnable)&&(this._notifyPluginsOfEnabled=!0),Ie._next&&(Ie._next._prev=Ie)}else Q[Gt]=$e.call(this,z,Gt,"get",ge,Gt,0,null,this.vars.stringFilter,vt);return nt&&this._kill(nt,z)?this._initProps(z,Q,st,nt,vt):this._overwrite>1&&this._firstPT&&st.length>1&&Dt(z,this,Q,this._overwrite,st)?(this._kill(Q,z),this._initProps(z,Q,st,nt,vt)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(It[z._gsTweenID]=!0),Xt)},_.render=function(z,Q,st){var nt,vt,Gt,qt,Xt=this._time,Ne=this._duration,Ie=this._rawPrevTime;if(z>=Ne-1e-7&&z>=0)this._totalTime=this._time=Ne,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(nt=!0,vt="onComplete",st=st||this._timeline.autoRemoveChildren),Ne===0&&(this._initted||!this.vars.lazy||st)&&(this._startTime===this._timeline._duration&&(z=0),(0>Ie||0>=z&&z>=-1e-7||Ie===D&&this.data!=="isPause")&&Ie!==z&&(st=!0,Ie>D&&(vt="onReverseComplete")),this._rawPrevTime=qt=!Q||z||Ie===z?z:D);else if(1e-7>z)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(Xt!==0||Ne===0&&Ie>0)&&(vt="onReverseComplete",nt=this._reversed),0>z&&(this._active=!1,Ne===0&&(this._initted||!this.vars.lazy||st)&&(Ie>=0&&(Ie!==D||this.data!=="isPause")&&(st=!0),this._rawPrevTime=qt=!Q||z||Ie===z?z:D)),(!this._initted||this._startAt&&this._startAt.progress())&&(st=!0);else if(this._totalTime=this._time=z,this._easeType){var ge=z/Ne,we=this._easeType,yi=this._easePower;(we===1||we===3&&ge>=.5)&&(ge=1-ge),we===3&&(ge*=2),yi===1?ge*=ge:yi===2?ge*=ge*ge:yi===3?ge*=ge*ge*ge:yi===4&&(ge*=ge*ge*ge*ge),we===1?this.ratio=1-ge:we===2?this.ratio=ge:.5>z/Ne?this.ratio=ge/2:this.ratio=1-ge/2}else this.ratio=this._ease.getRatio(z/Ne);if(this._time!==Xt||st){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!st&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=Xt,this._rawPrevTime=Ie,Ft.push(this),void(this._lazy=[z,Q]);this._time&&!nt?this.ratio=this._ease.getRatio(this._time/Ne):nt&&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!==Xt&&z>=0&&(this._active=!0),Xt===0&&(this._startAt&&(z>=0?this._startAt.render(z,!0,st):vt||(vt="_dummyGS")),this.vars.onStart&&(this._time!==0||Ne===0)&&(Q||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>z&&this._startAt&&z!==-1e-4&&this._startAt.render(z,!0,st),Q||(this._time!==Xt||nt||st)&&this._callback("onUpdate")),vt&&(!this._gc||st)&&(0>z&&this._startAt&&!this._onUpdate&&z!==-1e-4&&this._startAt.render(z,!0,st),nt&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!Q&&this.vars[vt]&&this._callback(vt),Ne===0&&this._rawPrevTime===D&&qt!==D&&(this._rawPrevTime=0))}},_._kill=function(z,Q,st){if(z==="all"&&(z=null),z==null&&(Q==null||Q===this.target))return this._lazy=!1,this._enabled(!1,!1);Q=typeof Q!="string"?Q||this._targets||this.target:At.selector(Q)||Q;var nt,vt,Gt,qt,Xt,Ne,Ie,ge,we,yi=st&&this._time&&st._startTime===this._startTime&&this._timeline===st._timeline,Ei=this._firstPT;if((L(Q)||ce(Q))&&typeof Q[0]!="number")for(nt=Q.length;--nt>-1;)this._kill(z,Q[nt],st)&&(Ne=!0);else{if(this._targets){for(nt=this._targets.length;--nt>-1;)if(Q===this._targets[nt]){Xt=this._propLookup[nt]||{},this._overwrittenProps=this._overwrittenProps||[],vt=this._overwrittenProps[nt]=z?this._overwrittenProps[nt]||{}:"all";break}}else{if(Q!==this.target)return!1;Xt=this._propLookup,vt=this._overwrittenProps=z?this._overwrittenProps||{}:"all"}if(Xt){if(Ie=z||Xt,ge=z!==vt&&vt!=="all"&&z!==Xt&&(typeof z!="object"||!z._tempKill),st&&(At.onOverwrite||this.vars.onOverwrite)){for(Gt in Ie)Xt[Gt]&&(we||(we=[]),we.push(Gt));if((we||!z)&&!pt(this,st,Q,we))return!1}for(Gt in Ie)(qt=Xt[Gt])&&(yi&&(qt.f?qt.t[qt.p](qt.s):qt.t[qt.p]=qt.s,Ne=!0),qt.pg&&qt.t._kill(Ie)&&(Ne=!0),qt.pg&&qt.t._overwriteProps.length!==0||(qt._prev?qt._prev._next=qt._next:qt===this._firstPT&&(this._firstPT=qt._next),qt._next&&(qt._next._prev=qt._prev),qt._next=qt._prev=null),delete Xt[Gt]),ge&&(vt[Gt]=1);!this._firstPT&&this._initted&&Ei&&this._enabled(!1,!1)}}return Ne},_.invalidate=function(){return this._notifyPluginsOfEnabled&&At._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],G.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-D,this.render(Math.min(0,-this._delay))),this},_._enabled=function(z,Q){if(b||S.wake(),z&&this._gc){var st,nt=this._targets;if(nt)for(st=nt.length;--st>-1;)this._siblings[st]=dt(nt[st],this,!0);else this._siblings=dt(this.target,this,!0)}return G.prototype._enabled.call(this,z,Q),this._notifyPluginsOfEnabled&&this._firstPT?At._onPluginEvent(z?"_onEnable":"_onDisable",this):!1},At.to=function(z,Q,st){return new At(z,Q,st)},At.from=function(z,Q,st){return st.runBackwards=!0,st.immediateRender=st.immediateRender!=0,new At(z,Q,st)},At.fromTo=function(z,Q,st,nt){return nt.startAt=st,nt.immediateRender=nt.immediateRender!=0&&st.immediateRender!=0,new At(z,Q,nt)},At.delayedCall=function(z,Q,st,nt,vt){return new At(Q,0,{delay:z,onComplete:Q,onCompleteParams:st,callbackScope:nt,onReverseComplete:Q,onReverseCompleteParams:st,immediateRender:!1,lazy:!1,useFrames:vt,overwrite:0})},At.set=function(z,Q){return new At(z,0,Q)},At.getTweensOf=function(z,Q){if(z==null)return[];z=typeof z!="string"?z:At.selector(z)||z;var st,nt,vt,Gt;if((L(z)||ce(z))&&typeof z[0]!="number"){for(st=z.length,nt=[];--st>-1;)nt=nt.concat(At.getTweensOf(z[st],Q));for(st=nt.length;--st>-1;)for(Gt=nt[st],vt=st;--vt>-1;)Gt===nt[vt]&&nt.splice(st,1)}else if(z._gsTweenID)for(nt=dt(z).concat(),st=nt.length;--st>-1;)(nt[st]._gc||Q&&!nt[st].isActive())&&nt.splice(st,1);return nt||[]},At.killTweensOf=At.killDelayedCallsTo=function(z,Q,st){typeof Q=="object"&&(st=Q,Q=!1);for(var nt=At.getTweensOf(z,Q),vt=nt.length;--vt>-1;)nt[vt]._kill(st,z)};var Kt=C("plugins.TweenPlugin",function(z,Q){this._overwriteProps=(z||"").split(","),this._propName=this._overwriteProps[0],this._priority=Q||0,this._super=Kt.prototype},!0);if(_=Kt.prototype,Kt.version="1.19.0",Kt.API=2,_._firstPT=null,_._addTween=$e,_.setRatio=pe,_._kill=function(z){var Q,st=this._overwriteProps,nt=this._firstPT;if(z[this._propName]!=null)this._overwriteProps=[];else for(Q=st.length;--Q>-1;)z[st[Q]]!=null&&st.splice(Q,1);for(;nt;)z[nt.n]!=null&&(nt._next&&(nt._next._prev=nt._prev),nt._prev?(nt._prev._next=nt._next,nt._prev=null):this._firstPT===nt&&(this._firstPT=nt._next)),nt=nt._next;return!1},_._mod=_._roundProps=function(z){for(var Q,st=this._firstPT;st;)Q=z[this._propName]||st.n!=null&&z[st.n.split(this._propName+"_").join("")],Q&&typeof Q=="function"&&(st.f===2?st.t._applyPT.m=Q:st.m=Q),st=st._next},At._onPluginEvent=function(z,Q){var st,nt,vt,Gt,qt,Xt=Q._firstPT;if(z==="_onInitAllProps"){for(;Xt;){for(qt=Xt._next,nt=vt;nt&&nt.pr>Xt.pr;)nt=nt._next;(Xt._prev=nt?nt._prev:Gt)?Xt._prev._next=Xt:vt=Xt,(Xt._next=nt)?nt._prev=Xt:Gt=Xt,Xt=qt}Xt=Q._firstPT=vt}for(;Xt;)Xt.pg&&typeof Xt.t[z]=="function"&&Xt.t[z]()&&(st=!0),Xt=Xt._next;return st},Kt.activate=function(z){for(var Q=z.length;--Q>-1;)z[Q].API===Kt.API&&(Oe[new z[Q]()._propName]=z[Q]);return!0},R.plugin=function(z){if(!(z&&z.propName&&z.init&&z.API))throw"illegal plugin definition.";var Q,st=z.propName,nt=z.priority||0,vt=z.overwriteProps,Gt={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},qt=C("plugins."+st.charAt(0).toUpperCase()+st.substr(1)+"Plugin",function(){Kt.call(this,st,nt),this._overwriteProps=vt||[]},z.global===!0),Xt=qt.prototype=new Kt(st);Xt.constructor=qt,qt.API=z.API;for(Q in Gt)typeof z[Q]=="function"&&(Xt[Gt[Q]]=z[Q]);return qt.version=z.version,Kt.activate([qt]),qt},m=x._gsQueue){for(g=0;g<m.length;g++)m[g]();for(_ in T)T[_].func||x.console.log("GSAP encountered missing dependency: "+_)}b=!1}(typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window,"TweenMax");const $p={class:"modal-background"},Kp=["innerHTML"],Qp={name:"MapModali"},Sf=oi.defineComponent({...Qp,props:{},setup(x,{expose:a}){const s=oi.ref(""),c=oi.ref(""),d=m=>{c.value=m,s.value="five"},u=()=>{s.value=s.value+" out"};return oi.onMounted(()=>{}),a({text:c,show:d,hide:u}),(m,g)=>(oi.openBlock(),oi.createElementBlock("div",{id:"modal-container",class:oi.normalizeClass(s.value),onClick:u},[oi.createElementVNode("div",$p,[oi.createElementVNode("div",{class:"modal",onClick:g[0]||(g[0]=_=>{_.stopPropagation()})},[oi.createElementVNode("p",{style:{"white-space":"pre-line","line-height":"1",margin:"0",color:"#fff"},innerHTML:c.value},null,8,Kp)])])],2))}}),A1="",tm={class:"bim_background_plate"},em={class:"content"},im=oi.createElementVNode("canvas",{class:"landscape"},null,-1),nm={class:"content__title"},rm=oi.createElementVNode("div",{class:"overlay"},null,-1),om={name:"BimBackgroundPlate"},Ef=oi.defineComponent({...om,setup(x){const a=()=>{let d=`
13
+ **/var ln=typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window;(ln._gsQueue||(ln._gsQueue=[])).push(function(){ln._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(x,a,s){var c=function(E){var L,T=[],M=E.length;for(L=0;L!==M;T.push(E[L++]));return T},d=function(E,L,T){var M,R,C=E.cycle;for(M in C)R=C[M],E[M]=typeof R=="function"?R(T,L[T]):R[T%R.length];delete E.cycle},u=function(E,L,T){s.call(this,E,L,T),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=u.prototype.render},m=1e-10,g=s._internals,_=g.isSelector,S=g.isArray,b=u.prototype=s.to({},.1,{}),I=[];u.version="2.0.2",b.constructor=u,b.kill()._gc=!1,u.killTweensOf=u.killDelayedCallsTo=s.killTweensOf,u.getTweensOf=s.getTweensOf,u.lagSmoothing=s.lagSmoothing,u.ticker=s.ticker,u.render=s.render,b.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),s.prototype.invalidate.call(this)},b.updateTo=function(E,L){var T,M=this.ratio,R=this.vars.immediateRender||E.immediateRender;L&&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(T in E)this.vars[T]=E[T];if(this._initted||R){if(L)this._initted=!1,R&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&s._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var C=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(C,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||R)for(var U,N=1/(1-M),X=this._firstPT;X;)U=X.s+X.c,X.c*=N,X.s=U-X.c,X=X._next}return this},b.render=function(E,L,T){this._initted||this._duration===0&&this.vars.repeat&&this.invalidate();var M,R,C,U,N,X,K,Z,ct,Rt=this._dirty?this.totalDuration():this._totalDuration,et=this._time,_t=this._totalTime,G=this._cycle,Pt=this._duration,Et=this._rawPrevTime;if(E>=Rt-1e-7&&E>=0?(this._totalTime=Rt,this._cycle=this._repeat,this._yoyo&&1&this._cycle?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=Pt,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(M=!0,R="onComplete",T=T||this._timeline.autoRemoveChildren),Pt===0&&(this._initted||!this.vars.lazy||T)&&(this._startTime===this._timeline._duration&&(E=0),(0>Et||0>=E&&E>=-1e-7||Et===m&&this.data!=="isPause")&&Et!==E&&(T=!0,Et>m&&(R="onReverseComplete")),this._rawPrevTime=Z=!L||E||Et===E?E:m)):1e-7>E?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(_t!==0||Pt===0&&Et>0)&&(R="onReverseComplete",M=this._reversed),0>E&&(this._active=!1,Pt===0&&(this._initted||!this.vars.lazy||T)&&(Et>=0&&(T=!0),this._rawPrevTime=Z=!L||E||Et===E?E:m)),this._initted||(T=!0)):(this._totalTime=this._time=E,this._repeat!==0&&(U=Pt+this._repeatDelay,this._cycle=this._totalTime/U>>0,this._cycle!==0&&this._cycle===this._totalTime/U&&E>=_t&&this._cycle--,this._time=this._totalTime-this._cycle*U,this._yoyo&&1&this._cycle&&(this._time=Pt-this._time,ct=this._yoyoEase||this.vars.yoyoEase,ct&&(this._yoyoEase||(ct!==!0||this._initted?this._yoyoEase=ct=ct===!0?this._ease:ct instanceof Ease?ct:Ease.map[ct]:(ct=this.vars.ease,this._yoyoEase=ct=ct?ct instanceof Ease?ct:typeof ct=="function"?new Ease(ct,this.vars.easeParams):Ease.map[ct]||s.defaultEase:s.defaultEase)),this.ratio=ct?1-ct.getRatio((Pt-this._time)/Pt):0)),this._time>Pt?this._time=Pt:this._time<0&&(this._time=0)),this._easeType&&!ct?(N=this._time/Pt,X=this._easeType,K=this._easePower,(X===1||X===3&&N>=.5)&&(N=1-N),X===3&&(N*=2),K===1?N*=N:K===2?N*=N*N:K===3?N*=N*N*N:K===4&&(N*=N*N*N*N),X===1?this.ratio=1-N:X===2?this.ratio=N:this._time/Pt<.5?this.ratio=N/2:this.ratio=1-N/2):ct||(this.ratio=this._ease.getRatio(this._time/Pt))),et===this._time&&!T&&G===this._cycle)return void(_t!==this._totalTime&&this._onUpdate&&(L||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!T&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=et,this._totalTime=_t,this._rawPrevTime=Et,this._cycle=G,g.lazyTweens.push(this),void(this._lazy=[E,L]);!this._time||M||ct?M&&this._ease._calcEnd&&!ct&&(this.ratio=this._ease.getRatio(this._time===0?0:1)):this.ratio=this._ease.getRatio(this._time/Pt)}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==et&&E>=0&&(this._active=!0),_t===0&&(this._initted===2&&E>0&&this._init(),this._startAt&&(E>=0?this._startAt.render(E,!0,T):R||(R="_dummyGS")),this.vars.onStart&&(this._totalTime!==0||Pt===0)&&(L||this._callback("onStart"))),C=this._firstPT;C;)C.f?C.t[C.p](C.c*this.ratio+C.s):C.t[C.p]=C.c*this.ratio+C.s,C=C._next;this._onUpdate&&(0>E&&this._startAt&&this._startTime&&this._startAt.render(E,!0,T),L||(this._totalTime!==_t||R)&&this._callback("onUpdate")),this._cycle!==G&&(L||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),R&&(!this._gc||T)&&(0>E&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(E,!0,T),M&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!L&&this.vars[R]&&this._callback(R),Pt===0&&this._rawPrevTime===m&&Z!==m&&(this._rawPrevTime=0))},u.to=function(E,L,T){return new u(E,L,T)},u.from=function(E,L,T){return T.runBackwards=!0,T.immediateRender=T.immediateRender!=0,new u(E,L,T)},u.fromTo=function(E,L,T,M){return M.startAt=T,M.immediateRender=M.immediateRender!=0&&T.immediateRender!=0,new u(E,L,M)},u.staggerTo=u.allTo=function(E,L,T,M,R,C,U){M=M||0;var N,X,K,Z,ct=0,Rt=[],et=function(){T.onComplete&&T.onComplete.apply(T.onCompleteScope||this,arguments),R.apply(U||T.callbackScope||this,C||I)},_t=T.cycle,G=T.startAt&&T.startAt.cycle;for(S(E)||(typeof E=="string"&&(E=s.selector(E)||E),_(E)&&(E=c(E))),E=E||[],0>M&&(E=c(E),E.reverse(),M*=-1),N=E.length-1,K=0;N>=K;K++){X={};for(Z in T)X[Z]=T[Z];if(_t&&(d(X,E,K),X.duration!=null&&(L=X.duration,delete X.duration)),G){G=X.startAt={};for(Z in T.startAt)G[Z]=T.startAt[Z];d(X.startAt,E,K)}X.delay=ct+(X.delay||0),K===N&&R&&(X.onComplete=et),Rt[K]=new u(E[K],L,X),ct+=M}return Rt},u.staggerFrom=u.allFrom=function(E,L,T,M,R,C,U){return T.runBackwards=!0,T.immediateRender=T.immediateRender!=0,u.staggerTo(E,L,T,M,R,C,U)},u.staggerFromTo=u.allFromTo=function(E,L,T,M,R,C,U,N){return M.startAt=T,M.immediateRender=M.immediateRender!=0&&T.immediateRender!=0,u.staggerTo(E,L,M,R,C,U,N)},u.delayedCall=function(E,L,T,M,R){return new u(L,0,{delay:E,onComplete:L,onCompleteParams:T,callbackScope:M,onReverseComplete:L,onReverseCompleteParams:T,immediateRender:!1,useFrames:R,overwrite:0})},u.set=function(E,L){return new u(E,0,L)},u.isTweening=function(E){return s.getTweensOf(E,!0).length>0};var k=function(E,L){for(var T=[],M=0,R=E._first;R;)R instanceof s?T[M++]=R:(L&&(T[M++]=R),T=T.concat(k(R,L)),M=T.length),R=R._next;return T},D=u.getAllTweens=function(E){return k(x._rootTimeline,E).concat(k(x._rootFramesTimeline,E))};u.killAll=function(E,L,T,M){L==null&&(L=!0),T==null&&(T=!0);var R,C,U,N=D(M!=0),X=N.length,K=L&&T&&M;for(U=0;X>U;U++)C=N[U],(K||C instanceof a||(R=C.target===C.vars.onComplete)&&T||L&&!R)&&(E?C.totalTime(C._reversed?0:C.totalDuration()):C._enabled(!1,!1))},u.killChildTweensOf=function(E,L){if(E!=null){var T,M,R,C,U,N=g.tweenLookup;if(typeof E=="string"&&(E=s.selector(E)||E),_(E)&&(E=c(E)),S(E))for(C=E.length;--C>-1;)u.killChildTweensOf(E[C],L);else{T=[];for(R in N)for(M=N[R].target.parentNode;M;)M===E&&(T=T.concat(N[R].tweens)),M=M.parentNode;for(U=T.length,C=0;U>C;C++)L&&T[C].totalTime(T[C].totalDuration()),T[C]._enabled(!1,!1)}}};var F=function(E,L,T,M){L=L!==!1,T=T!==!1,M=M!==!1;for(var R,C,U=D(M),N=L&&T&&M,X=U.length;--X>-1;)C=U[X],(N||C instanceof a||(R=C.target===C.vars.onComplete)&&T||L&&!R)&&C.paused(E)};return u.pauseAll=function(E,L,T){F(!0,E,L,T)},u.resumeAll=function(E,L,T){F(!1,E,L,T)},u.globalTimeScale=function(E){var L=x._rootTimeline,T=s.ticker.time;return arguments.length?(E=E||m,L._startTime=T-(T-L._startTime)*L._timeScale/E,L=x._rootFramesTimeline,T=s.ticker.frame,L._startTime=T-(T-L._startTime)*L._timeScale/E,L._timeScale=x._rootTimeline._timeScale=E,E):L._timeScale},b.progress=function(E,L){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-E:E)+this._cycle*(this._duration+this._repeatDelay),L):this._time/this.duration()},b.totalProgress=function(E,L){return arguments.length?this.totalTime(this.totalDuration()*E,L):this._totalTime/this.totalDuration()},b.time=function(E,L){return arguments.length?(this._dirty&&this.totalDuration(),E>this._duration&&(E=this._duration),this._yoyo&&1&this._cycle?E=this._duration-E+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(E+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(E,L)):this._time},b.duration=function(E){return arguments.length?x.prototype.duration.call(this,E):this._duration},b.totalDuration=function(E){return arguments.length?this._repeat===-1?this:this.duration((E-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)},b.repeat=function(E){return arguments.length?(this._repeat=E,this._uncache(!0)):this._repeat},b.repeatDelay=function(E){return arguments.length?(this._repeatDelay=E,this._uncache(!0)):this._repeatDelay},b.yoyo=function(E){return arguments.length?(this._yoyo=E,this):this._yoyo},u},!0),ln._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(x,a,s){var c=function(T){a.call(this,T),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var M,R,C=this.vars;for(R in C)M=C[R],_(M)&&M.join("").indexOf("{self}")!==-1&&(C[R]=this._swapSelfInParams(M));_(C.tweens)&&this.add(C.tweens,0,C.align,C.stagger)},d=1e-10,u=s._internals,m=c._internals={},g=u.isSelector,_=u.isArray,S=u.lazyTweens,b=u.lazyRender,I=ln._gsDefine.globals,k=function(T){var M,R={};for(M in T)R[M]=T[M];return R},D=function(T,M,R){var C,U,N=T.cycle;for(C in N)U=N[C],T[C]=typeof U=="function"?U(R,M[R]):U[R%U.length];delete T.cycle},F=m.pauseCallback=function(){},E=function(T){var M,R=[],C=T.length;for(M=0;M!==C;R.push(T[M++]));return R},L=c.prototype=new a;return c.version="2.0.2",L.constructor=c,L.kill()._gc=L._forcingPlayhead=L._hasPause=!1,L.to=function(T,M,R,C){var U=R.repeat&&I.TweenMax||s;return M?this.add(new U(T,M,R),C):this.set(T,R,C)},L.from=function(T,M,R,C){return this.add((R.repeat&&I.TweenMax||s).from(T,M,R),C)},L.fromTo=function(T,M,R,C,U){var N=C.repeat&&I.TweenMax||s;return M?this.add(N.fromTo(T,M,R,C),U):this.set(T,C,U)},L.staggerTo=function(T,M,R,C,U,N,X,K){var Z,ct,Rt=new c({onComplete:N,onCompleteParams:X,callbackScope:K,smoothChildTiming:this.smoothChildTiming}),et=R.cycle;for(typeof T=="string"&&(T=s.selector(T)||T),T=T||[],g(T)&&(T=E(T)),C=C||0,0>C&&(T=E(T),T.reverse(),C*=-1),ct=0;ct<T.length;ct++)Z=k(R),Z.startAt&&(Z.startAt=k(Z.startAt),Z.startAt.cycle&&D(Z.startAt,T,ct)),et&&(D(Z,T,ct),Z.duration!=null&&(M=Z.duration,delete Z.duration)),Rt.to(T[ct],M,Z,ct*C);return this.add(Rt,U)},L.staggerFrom=function(T,M,R,C,U,N,X,K){return R.immediateRender=R.immediateRender!=0,R.runBackwards=!0,this.staggerTo(T,M,R,C,U,N,X,K)},L.staggerFromTo=function(T,M,R,C,U,N,X,K,Z){return C.startAt=R,C.immediateRender=C.immediateRender!=0&&R.immediateRender!=0,this.staggerTo(T,M,C,U,N,X,K,Z)},L.call=function(T,M,R,C){return this.add(s.delayedCall(0,T,M,R),C)},L.set=function(T,M,R){return R=this._parseTimeOrLabel(R,0,!0),M.immediateRender==null&&(M.immediateRender=R===this._time&&!this._paused),this.add(new s(T,0,M),R)},c.exportRoot=function(T,M){T=T||{},T.smoothChildTiming==null&&(T.smoothChildTiming=!0);var R,C,U,N,X=new c(T),K=X._timeline;for(M==null&&(M=!0),K._remove(X,!0),X._startTime=0,X._rawPrevTime=X._time=X._totalTime=K._time,U=K._first;U;)N=U._next,M&&U instanceof s&&U.target===U.vars.onComplete||(C=U._startTime-U._delay,0>C&&(R=1),X.add(U,C)),U=N;return K.add(X,0),R&&X.totalDuration(),X},L.add=function(T,M,R,C){var U,N,X,K,Z,ct;if(typeof M!="number"&&(M=this._parseTimeOrLabel(M,0,!0,T)),!(T instanceof x)){if(T instanceof Array||T&&T.push&&_(T)){for(R=R||"normal",C=C||0,U=M,N=T.length,X=0;N>X;X++)_(K=T[X])&&(K=new c({tweens:K})),this.add(K,U),typeof K!="string"&&typeof K!="function"&&(R==="sequence"?U=K._startTime+K.totalDuration()/K._timeScale:R==="start"&&(K._startTime-=K.delay())),U+=C;return this._uncache(!0)}if(typeof T=="string")return this.addLabel(T,M);if(typeof T!="function")throw"Cannot add "+T+" into the timeline; it is not a tween, timeline, function, or string.";T=s.delayedCall(0,T)}if(a.prototype.add.call(this,T,M),T._time&&(U=Math.max(0,Math.min(T.totalDuration(),(this.rawTime()-T._startTime)*T._timeScale)),Math.abs(U-T._totalTime)>1e-5&&T.render(U,!1,!1)),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(Z=this,ct=Z.rawTime()>T._startTime;Z._timeline;)ct&&Z._timeline.smoothChildTiming?Z.totalTime(Z._totalTime,!0):Z._gc&&Z._enabled(!0,!1),Z=Z._timeline;return this},L.remove=function(T){if(T instanceof x){this._remove(T,!1);var M=T._timeline=T.vars.useFrames?x._rootFramesTimeline:x._rootTimeline;return T._startTime=(T._paused?T._pauseTime:M._time)-(T._reversed?T.totalDuration()-T._totalTime:T._totalTime)/T._timeScale,this}if(T instanceof Array||T&&T.push&&_(T)){for(var R=T.length;--R>-1;)this.remove(T[R]);return this}return typeof T=="string"?this.removeLabel(T):this.kill(null,T)},L._remove=function(T,M){a.prototype._remove.call(this,T,M);var R=this._last;return R?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},L.append=function(T,M){return this.add(T,this._parseTimeOrLabel(null,M,!0,T))},L.insert=L.insertMultiple=function(T,M,R,C){return this.add(T,M||0,R,C)},L.appendMultiple=function(T,M,R,C){return this.add(T,this._parseTimeOrLabel(null,M,!0,T),R,C)},L.addLabel=function(T,M){return this._labels[T]=this._parseTimeOrLabel(M),this},L.addPause=function(T,M,R,C){var U=s.delayedCall(0,F,R,C||this);return U.vars.onComplete=U.vars.onReverseComplete=M,U.data="isPause",this._hasPause=!0,this.add(U,T)},L.removeLabel=function(T){return delete this._labels[T],this},L.getLabelTime=function(T){return this._labels[T]!=null?this._labels[T]:-1},L._parseTimeOrLabel=function(T,M,R,C){var U,N;if(C instanceof x&&C.timeline===this)this.remove(C);else if(C&&(C instanceof Array||C.push&&_(C)))for(N=C.length;--N>-1;)C[N]instanceof x&&C[N].timeline===this&&this.remove(C[N]);if(U=typeof T!="number"||M?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,typeof M=="string")return this._parseTimeOrLabel(M,R&&typeof T=="number"&&this._labels[M]==null?T-U:0,R);if(M=M||0,typeof T!="string"||!isNaN(T)&&this._labels[T]==null)T==null&&(T=U);else{if(N=T.indexOf("="),N===-1)return this._labels[T]==null?R?this._labels[T]=U+M:M:this._labels[T]+M;M=parseInt(T.charAt(N-1)+"1",10)*Number(T.substr(N+1)),T=N>1?this._parseTimeOrLabel(T.substr(0,N-1),0,R):U}return Number(T)+M},L.seek=function(T,M){return this.totalTime(typeof T=="number"?T:this._parseTimeOrLabel(T),M!==!1)},L.stop=function(){return this.paused(!0)},L.gotoAndPlay=function(T,M){return this.play(T,M)},L.gotoAndStop=function(T,M){return this.pause(T,M)},L.render=function(T,M,R){this._gc&&this._enabled(!0,!1);var C,U,N,X,K,Z,ct,Rt=this._time,et=this._dirty?this.totalDuration():this._totalDuration,_t=this._startTime,G=this._timeScale,Pt=this._paused;if(Rt!==this._time&&(T+=this._time-Rt),T>=et-1e-7&&T>=0)this._totalTime=this._time=et,this._reversed||this._hasPausedChild()||(U=!0,X="onComplete",K=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=T&&T>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===d)&&this._rawPrevTime!==T&&this._first&&(K=!0,this._rawPrevTime>d&&(X="onReverseComplete"))),this._rawPrevTime=this._duration||!M||T||this._rawPrevTime===T?T:d,T=et+1e-4;else if(1e-7>T)if(this._totalTime=this._time=0,(Rt!==0||this._duration===0&&this._rawPrevTime!==d&&(this._rawPrevTime>0||0>T&&this._rawPrevTime>=0))&&(X="onReverseComplete",U=this._reversed),0>T)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(K=U=!0,X="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(K=!0),this._rawPrevTime=T;else{if(this._rawPrevTime=this._duration||!M||T||this._rawPrevTime===T?T:d,T===0&&U)for(C=this._first;C&&C._startTime===0;)C._duration||(U=!1),C=C._next;T=0,this._initted||(K=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!M){if(T>=Rt)for(C=this._first;C&&C._startTime<=T&&!Z;)C._duration||C.data!=="isPause"||C.ratio||C._startTime===0&&this._rawPrevTime===0||(Z=C),C=C._next;else for(C=this._last;C&&C._startTime>=T&&!Z;)C._duration||C.data==="isPause"&&C._rawPrevTime>0&&(Z=C),C=C._prev;Z&&(this._time=T=Z._startTime,this._totalTime=T+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=T}if(this._time!==Rt&&this._first||R||K||Z){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==Rt&&T>0&&(this._active=!0),Rt===0&&this.vars.onStart&&(this._time===0&&this._duration||M||this._callback("onStart")),ct=this._time,ct>=Rt)for(C=this._first;C&&(N=C._next,ct===this._time&&(!this._paused||Pt));)(C._active||C._startTime<=ct&&!C._paused&&!C._gc)&&(Z===C&&this.pause(),C._reversed?C.render((C._dirty?C.totalDuration():C._totalDuration)-(T-C._startTime)*C._timeScale,M,R):C.render((T-C._startTime)*C._timeScale,M,R)),C=N;else for(C=this._last;C&&(N=C._prev,ct===this._time&&(!this._paused||Pt));){if(C._active||C._startTime<=Rt&&!C._paused&&!C._gc){if(Z===C){for(Z=C._prev;Z&&Z.endTime()>this._time;)Z.render(Z._reversed?Z.totalDuration()-(T-Z._startTime)*Z._timeScale:(T-Z._startTime)*Z._timeScale,M,R),Z=Z._prev;Z=null,this.pause()}C._reversed?C.render((C._dirty?C.totalDuration():C._totalDuration)-(T-C._startTime)*C._timeScale,M,R):C.render((T-C._startTime)*C._timeScale,M,R)}C=N}this._onUpdate&&(M||(S.length&&b(),this._callback("onUpdate"))),X&&(this._gc||(_t===this._startTime||G!==this._timeScale)&&(this._time===0||et>=this.totalDuration())&&(U&&(S.length&&b(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!M&&this.vars[X]&&this._callback(X)))}},L._hasPausedChild=function(){for(var T=this._first;T;){if(T._paused||T instanceof c&&T._hasPausedChild())return!0;T=T._next}return!1},L.getChildren=function(T,M,R,C){C=C||-9999999999;for(var U=[],N=this._first,X=0;N;)N._startTime<C||(N instanceof s?M!==!1&&(U[X++]=N):(R!==!1&&(U[X++]=N),T!==!1&&(U=U.concat(N.getChildren(!0,M,R)),X=U.length))),N=N._next;return U},L.getTweensOf=function(T,M){var R,C,U=this._gc,N=[],X=0;for(U&&this._enabled(!0,!0),R=s.getTweensOf(T),C=R.length;--C>-1;)(R[C].timeline===this||M&&this._contains(R[C]))&&(N[X++]=R[C]);return U&&this._enabled(!1,!0),N},L.recent=function(){return this._recent},L._contains=function(T){for(var M=T.timeline;M;){if(M===this)return!0;M=M.timeline}return!1},L.shiftChildren=function(T,M,R){R=R||0;for(var C,U=this._first,N=this._labels;U;)U._startTime>=R&&(U._startTime+=T),U=U._next;if(M)for(C in N)N[C]>=R&&(N[C]+=T);return this._uncache(!0)},L._kill=function(T,M){if(!T&&!M)return this._enabled(!1,!1);for(var R=M?this.getTweensOf(M):this.getChildren(!0,!0,!1),C=R.length,U=!1;--C>-1;)R[C]._kill(T,M)&&(U=!0);return U},L.clear=function(T){var M=this.getChildren(!1,!0,!0),R=M.length;for(this._time=this._totalTime=0;--R>-1;)M[R]._enabled(!1,!1);return T!==!1&&(this._labels={}),this._uncache(!0)},L.invalidate=function(){for(var T=this._first;T;)T.invalidate(),T=T._next;return x.prototype.invalidate.call(this)},L._enabled=function(T,M){if(T===this._gc)for(var R=this._first;R;)R._enabled(T,!0),R=R._next;return a.prototype._enabled.call(this,T,M)},L.totalTime=function(T,M,R){this._forcingPlayhead=!0;var C=x.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,C},L.duration=function(T){return arguments.length?(this.duration()!==0&&T!==0&&this.timeScale(this._duration/T),this):(this._dirty&&this.totalDuration(),this._duration)},L.totalDuration=function(T){if(!arguments.length){if(this._dirty){for(var M,R,C=0,U=this._last,N=999999999999;U;)M=U._prev,U._dirty&&U.totalDuration(),U._startTime>N&&this._sortChildren&&!U._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(U,U._startTime-U._delay),this._calculatingDuration=0):N=U._startTime,U._startTime<0&&!U._paused&&(C-=U._startTime,this._timeline.smoothChildTiming&&(this._startTime+=U._startTime/this._timeScale,this._time-=U._startTime,this._totalTime-=U._startTime,this._rawPrevTime-=U._startTime),this.shiftChildren(-U._startTime,!1,-9999999999),N=0),R=U._startTime+U._totalDuration/U._timeScale,R>C&&(C=R),U=M;this._duration=this._totalDuration=C,this._dirty=!1}return this._totalDuration}return T&&this.totalDuration()?this.timeScale(this._totalDuration/T):this},L.paused=function(T){if(!T)for(var M=this._first,R=this._time;M;)M._startTime===R&&M.data==="isPause"&&(M._rawPrevTime=0),M=M._next;return x.prototype.paused.apply(this,arguments)},L.usesFrames=function(){for(var T=this._timeline;T._timeline;)T=T._timeline;return T===x._rootFramesTimeline},L.rawTime=function(T){return T&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(T)-this._startTime)*this._timeScale},c},!0),ln._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(x,a,s){var c=function(I){x.call(this,I),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},d=1e-10,u=a._internals,m=u.lazyTweens,g=u.lazyRender,_=ln._gsDefine.globals,S=new s(null,null,1,0),b=c.prototype=new x;return b.constructor=c,b.kill()._gc=!1,c.version="2.0.2",b.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),x.prototype.invalidate.call(this)},b.addCallback=function(I,k,D,F){return this.add(a.delayedCall(0,I,D,F),k)},b.removeCallback=function(I,k){if(I)if(k==null)this._kill(null,I);else for(var D=this.getTweensOf(I,!1),F=D.length,E=this._parseTimeOrLabel(k);--F>-1;)D[F]._startTime===E&&D[F]._enabled(!1,!1);return this},b.removePause=function(I){return this.removeCallback(x._internals.pauseCallback,I)},b.tweenTo=function(I,k){k=k||{};var D,F,E,L={ease:S,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},T=k.repeat&&_.TweenMax||a;for(F in k)L[F]=k[F];return L.time=this._parseTimeOrLabel(I),D=Math.abs(Number(L.time)-this._time)/this._timeScale||.001,E=new T(this,D,L),L.onStart=function(){E.target.paused(!0),E.vars.time===E.target.time()||D!==E.duration()||E.isFromTo||E.duration(Math.abs(E.vars.time-E.target.time())/E.target._timeScale).render(E.time(),!0,!0),k.onStart&&k.onStart.apply(k.onStartScope||k.callbackScope||E,k.onStartParams||[])},E},b.tweenFromTo=function(I,k,D){D=D||{},I=this._parseTimeOrLabel(I),D.startAt={onComplete:this.seek,onCompleteParams:[I],callbackScope:this},D.immediateRender=D.immediateRender!==!1;var F=this.tweenTo(k,D);return F.isFromTo=1,F.duration(Math.abs(F.vars.time-I)/this._timeScale||.001)},b.render=function(I,k,D){this._gc&&this._enabled(!0,!1);var F,E,L,T,M,R,C,U,N=this._time,X=this._dirty?this.totalDuration():this._totalDuration,K=this._duration,Z=this._totalTime,ct=this._startTime,Rt=this._timeScale,et=this._rawPrevTime,_t=this._paused,G=this._cycle;if(N!==this._time&&(I+=this._time-N),I>=X-1e-7&&I>=0)this._locked||(this._totalTime=X,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(E=!0,T="onComplete",M=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=I&&I>=-1e-7||0>et||et===d)&&et!==I&&this._first&&(M=!0,et>d&&(T="onReverseComplete"))),this._rawPrevTime=this._duration||!k||I||this._rawPrevTime===I?I:d,this._yoyo&&1&this._cycle?this._time=I=0:(this._time=K,I=K+1e-4);else if(1e-7>I)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(N!==0||K===0&&et!==d&&(et>0||0>I&&et>=0)&&!this._locked)&&(T="onReverseComplete",E=this._reversed),0>I)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(M=E=!0,T="onReverseComplete"):et>=0&&this._first&&(M=!0),this._rawPrevTime=I;else{if(this._rawPrevTime=K||!k||I||this._rawPrevTime===I?I:d,I===0&&E)for(F=this._first;F&&F._startTime===0;)F._duration||(E=!1),F=F._next;I=0,this._initted||(M=!0)}else if(K===0&&0>et&&(M=!0),this._time=this._rawPrevTime=I,this._locked||(this._totalTime=I,this._repeat!==0&&(R=K+this._repeatDelay,this._cycle=this._totalTime/R>>0,this._cycle!==0&&this._cycle===this._totalTime/R&&I>=Z&&this._cycle--,this._time=this._totalTime-this._cycle*R,this._yoyo&&1&this._cycle&&(this._time=K-this._time),this._time>K?(this._time=K,I=K+1e-4):this._time<0?this._time=I=0:I=this._time)),this._hasPause&&!this._forcingPlayhead&&!k){if(I=this._time,I>=N||this._repeat&&G!==this._cycle)for(F=this._first;F&&F._startTime<=I&&!C;)F._duration||F.data!=="isPause"||F.ratio||F._startTime===0&&this._rawPrevTime===0||(C=F),F=F._next;else for(F=this._last;F&&F._startTime>=I&&!C;)F._duration||F.data==="isPause"&&F._rawPrevTime>0&&(C=F),F=F._prev;C&&C._startTime<K&&(this._time=I=C._startTime,this._totalTime=I+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==G&&!this._locked){var Pt=this._yoyo&&(1&G)!==0,Et=Pt===(this._yoyo&&(1&this._cycle)!==0),At=this._totalTime,ce=this._cycle,re=this._rawPrevTime,Ft=this._time;if(this._totalTime=G*K,this._cycle<G?Pt=!Pt:this._totalTime+=K,this._time=N,this._rawPrevTime=K===0?et-1e-4:et,this._cycle=G,this._locked=!0,N=Pt?0:K,this.render(N,k,K===0),k||this._gc||this.vars.onRepeat&&(this._cycle=ce,this._locked=!1,this._callback("onRepeat")),N!==this._time||(Et&&(this._cycle=G,this._locked=!0,N=Pt?K+1e-4:-1e-4,this.render(N,!0,!1)),this._locked=!1,this._paused&&!_t))return;this._time=Ft,this._totalTime=At,this._cycle=ce,this._rawPrevTime=re}if(!(this._time!==N&&this._first||D||M||C))return void(Z!==this._totalTime&&this._onUpdate&&(k||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==Z&&I>0&&(this._active=!0),Z===0&&this.vars.onStart&&(this._totalTime===0&&this._totalDuration||k||this._callback("onStart")),U=this._time,U>=N)for(F=this._first;F&&(L=F._next,U===this._time&&(!this._paused||_t));)(F._active||F._startTime<=this._time&&!F._paused&&!F._gc)&&(C===F&&this.pause(),F._reversed?F.render((F._dirty?F.totalDuration():F._totalDuration)-(I-F._startTime)*F._timeScale,k,D):F.render((I-F._startTime)*F._timeScale,k,D)),F=L;else for(F=this._last;F&&(L=F._prev,U===this._time&&(!this._paused||_t));){if(F._active||F._startTime<=N&&!F._paused&&!F._gc){if(C===F){for(C=F._prev;C&&C.endTime()>this._time;)C.render(C._reversed?C.totalDuration()-(I-C._startTime)*C._timeScale:(I-C._startTime)*C._timeScale,k,D),C=C._prev;C=null,this.pause()}F._reversed?F.render((F._dirty?F.totalDuration():F._totalDuration)-(I-F._startTime)*F._timeScale,k,D):F.render((I-F._startTime)*F._timeScale,k,D)}F=L}this._onUpdate&&(k||(m.length&&g(),this._callback("onUpdate"))),T&&(this._locked||this._gc||(ct===this._startTime||Rt!==this._timeScale)&&(this._time===0||X>=this.totalDuration())&&(E&&(m.length&&g(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!k&&this.vars[T]&&this._callback(T)))},b.getActive=function(I,k,D){I==null&&(I=!0),k==null&&(k=!0),D==null&&(D=!1);var F,E,L=[],T=this.getChildren(I,k,D),M=0,R=T.length;for(F=0;R>F;F++)E=T[F],E.isActive()&&(L[M++]=E);return L},b.getLabelAfter=function(I){I||I!==0&&(I=this._time);var k,D=this.getLabelsArray(),F=D.length;for(k=0;F>k;k++)if(D[k].time>I)return D[k].name;return null},b.getLabelBefore=function(I){I==null&&(I=this._time);for(var k=this.getLabelsArray(),D=k.length;--D>-1;)if(k[D].time<I)return k[D].name;return null},b.getLabelsArray=function(){var I,k=[],D=0;for(I in this._labels)k[D++]={time:this._labels[I],name:I};return k.sort(function(F,E){return F.time-E.time}),k},b.invalidate=function(){return this._locked=!1,x.prototype.invalidate.call(this)},b.progress=function(I,k){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-I:I)+this._cycle*(this._duration+this._repeatDelay),k):this._time/this.duration()||0},b.totalProgress=function(I,k){return arguments.length?this.totalTime(this.totalDuration()*I,k):this._totalTime/this.totalDuration()||0},b.totalDuration=function(I){return arguments.length?this._repeat!==-1&&I?this.timeScale(this.totalDuration()/I):this:(this._dirty&&(x.prototype.totalDuration.call(this),this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},b.time=function(I,k){return arguments.length?(this._dirty&&this.totalDuration(),I>this._duration&&(I=this._duration),this._yoyo&&1&this._cycle?I=this._duration-I+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(I+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(I,k)):this._time},b.repeat=function(I){return arguments.length?(this._repeat=I,this._uncache(!0)):this._repeat},b.repeatDelay=function(I){return arguments.length?(this._repeatDelay=I,this._uncache(!0)):this._repeatDelay},b.yoyo=function(I){return arguments.length?(this._yoyo=I,this):this._yoyo},b.currentLabel=function(I){return arguments.length?this.seek(I,!0):this.getLabelBefore(this._time+1e-8)},c},!0),function(){var x=180/Math.PI,a=[],s=[],c=[],d={},u=ln._gsDefine.globals,m=function(T,M,R,C){R===C&&(R=C-(C-M)/1e6),T===M&&(M=T+(R-T)/1e6),this.a=T,this.b=M,this.c=R,this.d=C,this.da=C-T,this.ca=R-T,this.ba=M-T},g=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",_=function(T,M,R,C){var U={a:T},N={},X={},K={c:C},Z=(T+M)/2,ct=(M+R)/2,Rt=(R+C)/2,et=(Z+ct)/2,_t=(ct+Rt)/2,G=(_t-et)/8;return U.b=Z+(T-Z)/4,N.b=et+G,U.c=N.a=(U.b+N.b)/2,N.c=X.a=(et+_t)/2,X.b=_t-G,K.b=Rt+(C-Rt)/4,X.c=K.a=(X.b+K.b)/2,[U,N,X,K]},S=function(T,M,R,C,U){var N,X,K,Z,ct,Rt,et,_t,G,Pt,Et,At,ce,re=T.length-1,Ft=0,It=T[0].a;for(N=0;re>N;N++)ct=T[Ft],X=ct.a,K=ct.d,Z=T[Ft+1].d,U?(Et=a[N],At=s[N],ce=(At+Et)*M*.25/(C?.5:c[N]||.5),Rt=K-(K-X)*(C?.5*M:Et!==0?ce/Et:0),et=K+(Z-K)*(C?.5*M:At!==0?ce/At:0),_t=K-(Rt+((et-Rt)*(3*Et/(Et+At)+.5)/4||0))):(Rt=K-(K-X)*M*.5,et=K+(Z-K)*M*.5,_t=K-(Rt+et)/2),Rt+=_t,et+=_t,ct.c=G=Rt,N!==0?ct.b=It:ct.b=It=ct.a+.6*(ct.c-ct.a),ct.da=K-X,ct.ca=G-X,ct.ba=It-X,R?(Pt=_(X,It,G,K),T.splice(Ft,1,Pt[0],Pt[1],Pt[2],Pt[3]),Ft+=4):Ft++,It=et;ct=T[Ft],ct.b=It,ct.c=It+.4*(ct.d-It),ct.da=ct.d-ct.a,ct.ca=ct.c-ct.a,ct.ba=It-ct.a,R&&(Pt=_(ct.a,It,ct.c,ct.d),T.splice(Ft,1,Pt[0],Pt[1],Pt[2],Pt[3]))},b=function(T,M,R,C){var U,N,X,K,Z,ct,Rt=[];if(C)for(T=[C].concat(T),N=T.length;--N>-1;)typeof(ct=T[N][M])=="string"&&ct.charAt(1)==="="&&(T[N][M]=C[M]+Number(ct.charAt(0)+ct.substr(2)));if(U=T.length-2,0>U)return Rt[0]=new m(T[0][M],0,0,T[0][M]),Rt;for(N=0;U>N;N++)X=T[N][M],K=T[N+1][M],Rt[N]=new m(X,0,0,K),R&&(Z=T[N+2][M],a[N]=(a[N]||0)+(K-X)*(K-X),s[N]=(s[N]||0)+(Z-K)*(Z-K));return Rt[N]=new m(T[N][M],0,0,T[N+1][M]),Rt},I=function(T,M,R,C,U,N){var X,K,Z,ct,Rt,et,_t,G,Pt={},Et=[],At=N||T[0];U=typeof U=="string"?","+U+",":g,M==null&&(M=1);for(K in T[0])Et.push(K);if(T.length>1){for(G=T[T.length-1],_t=!0,X=Et.length;--X>-1;)if(K=Et[X],Math.abs(At[K]-G[K])>.05){_t=!1;break}_t&&(T=T.concat(),N&&T.unshift(N),T.push(T[1]),N=T[T.length-3])}for(a.length=s.length=c.length=0,X=Et.length;--X>-1;)K=Et[X],d[K]=U.indexOf(","+K+",")!==-1,Pt[K]=b(T,K,d[K],N);for(X=a.length;--X>-1;)a[X]=Math.sqrt(a[X]),s[X]=Math.sqrt(s[X]);if(!C){for(X=Et.length;--X>-1;)if(d[K])for(Z=Pt[Et[X]],et=Z.length-1,ct=0;et>ct;ct++)Rt=Z[ct+1].da/s[ct]+Z[ct].da/a[ct]||0,c[ct]=(c[ct]||0)+Rt*Rt;for(X=c.length;--X>-1;)c[X]=Math.sqrt(c[X])}for(X=Et.length,ct=R?4:1;--X>-1;)K=Et[X],Z=Pt[K],S(Z,M,R,C,d[K]),_t&&(Z.splice(0,ct),Z.splice(Z.length-ct,ct));return Pt},k=function(T,M,R){M=M||"soft";var C,U,N,X,K,Z,ct,Rt,et,_t,G,Pt={},Et=M==="cubic"?3:2,At=M==="soft",ce=[];if(At&&R&&(T=[R].concat(T)),T==null||T.length<Et+1)throw"invalid Bezier data";for(et in T[0])ce.push(et);for(Z=ce.length;--Z>-1;){for(et=ce[Z],Pt[et]=K=[],_t=0,Rt=T.length,ct=0;Rt>ct;ct++)C=R==null?T[ct][et]:typeof(G=T[ct][et])=="string"&&G.charAt(1)==="="?R[et]+Number(G.charAt(0)+G.substr(2)):Number(G),At&&ct>1&&Rt-1>ct&&(K[_t++]=(C+K[_t-2])/2),K[_t++]=C;for(Rt=_t-Et+1,_t=0,ct=0;Rt>ct;ct+=Et)C=K[ct],U=K[ct+1],N=K[ct+2],X=Et===2?0:K[ct+3],K[_t++]=G=Et===3?new m(C,U,N,X):new m(C,(2*U+C)/3,(2*U+N)/3,N);K.length=_t}return Pt},D=function(T,M,R){for(var C,U,N,X,K,Z,ct,Rt,et,_t,G,Pt=1/R,Et=T.length;--Et>-1;)for(_t=T[Et],N=_t.a,X=_t.d-N,K=_t.c-N,Z=_t.b-N,C=U=0,Rt=1;R>=Rt;Rt++)ct=Pt*Rt,et=1-ct,C=U-(U=(ct*ct*X+3*et*(ct*K+et*Z))*ct),G=Et*R+Rt-1,M[G]=(M[G]||0)+C*C},F=function(T,M){M=M>>0||6;var R,C,U,N,X=[],K=[],Z=0,ct=0,Rt=M-1,et=[],_t=[];for(R in T)D(T[R],X,M);for(U=X.length,C=0;U>C;C++)Z+=Math.sqrt(X[C]),N=C%M,_t[N]=Z,N===Rt&&(ct+=Z,N=C/M>>0,et[N]=_t,K[N]=ct,Z=0,_t=[]);return{length:ct,lengths:K,segments:et}},E=ln._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(T,M,R){this._target=T,M instanceof Array&&(M={values:M}),this._func={},this._mod={},this._props=[],this._timeRes=M.timeResolution==null?6:parseInt(M.timeResolution,10);var C,U,N,X,K,Z=M.values||[],ct={},Rt=Z[0],et=M.autoRotate||R.vars.orientToBezier;this._autoRotate=et?et instanceof Array?et:[["x","y","rotation",et===!0?0:Number(et)||0]]:null;for(C in Rt)this._props.push(C);for(N=this._props.length;--N>-1;)C=this._props[N],this._overwriteProps.push(C),U=this._func[C]=typeof T[C]=="function",ct[C]=U?T[C.indexOf("set")||typeof T["get"+C.substr(3)]!="function"?C:"get"+C.substr(3)]():parseFloat(T[C]),K||ct[C]!==Z[0][C]&&(K=ct);if(this._beziers=M.type!=="cubic"&&M.type!=="quadratic"&&M.type!=="soft"?I(Z,isNaN(M.curviness)?1:M.curviness,!1,M.type==="thruBasic",M.correlate,K):k(Z,M.type,ct),this._segCount=this._beziers[C].length,this._timeRes){var _t=F(this._beziers,this._timeRes);this._length=_t.length,this._lengths=_t.lengths,this._segments=_t.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(et=this._autoRotate)for(this._initialRotations=[],et[0]instanceof Array||(this._autoRotate=et=[et]),N=et.length;--N>-1;){for(X=0;3>X;X++)C=et[N][X],this._func[C]=typeof T[C]=="function"?T[C.indexOf("set")||typeof T["get"+C.substr(3)]!="function"?C:"get"+C.substr(3)]:!1;C=et[N][2],this._initialRotations[N]=(this._func[C]?this._func[C].call(this._target):this._target[C])||0,this._overwriteProps.push(C)}return this._startRatio=R.vars.runBackwards?1:0,!0},set:function(T){var M,R,C,U,N,X,K,Z,ct,Rt,et=this._segCount,_t=this._func,G=this._target,Pt=T!==this._startRatio;if(this._timeRes){if(ct=this._lengths,Rt=this._curSeg,T*=this._length,C=this._li,T>this._l2&&et-1>C){for(Z=et-1;Z>C&&(this._l2=ct[++C])<=T;);this._l1=ct[C-1],this._li=C,this._curSeg=Rt=this._segments[C],this._s2=Rt[this._s1=this._si=0]}else if(T<this._l1&&C>0){for(;C>0&&(this._l1=ct[--C])>=T;);C===0&&T<this._l1?this._l1=0:C++,this._l2=ct[C],this._li=C,this._curSeg=Rt=this._segments[C],this._s1=Rt[(this._si=Rt.length-1)-1]||0,this._s2=Rt[this._si]}if(M=C,T-=this._l1,C=this._si,T>this._s2&&C<Rt.length-1){for(Z=Rt.length-1;Z>C&&(this._s2=Rt[++C])<=T;);this._s1=Rt[C-1],this._si=C}else if(T<this._s1&&C>0){for(;C>0&&(this._s1=Rt[--C])>=T;);C===0&&T<this._s1?this._s1=0:C++,this._s2=Rt[C],this._si=C}X=(C+(T-this._s1)/(this._s2-this._s1))*this._prec||0}else M=0>T?0:T>=1?et-1:et*T>>0,X=(T-M*(1/et))*et;for(R=1-X,C=this._props.length;--C>-1;)U=this._props[C],N=this._beziers[U][M],K=(X*X*N.da+3*R*(X*N.ca+R*N.ba))*X+N.a,this._mod[U]&&(K=this._mod[U](K,G)),_t[U]?G[U](K):G[U]=K;if(this._autoRotate){var Et,At,ce,re,Ft,It,Nt,Pe=this._autoRotate;for(C=Pe.length;--C>-1;)U=Pe[C][2],It=Pe[C][3]||0,Nt=Pe[C][4]===!0?1:x,N=this._beziers[Pe[C][0]],Et=this._beziers[Pe[C][1]],N&&Et&&(N=N[M],Et=Et[M],At=N.a+(N.b-N.a)*X,re=N.b+(N.c-N.b)*X,At+=(re-At)*X,re+=(N.c+(N.d-N.c)*X-re)*X,ce=Et.a+(Et.b-Et.a)*X,Ft=Et.b+(Et.c-Et.b)*X,ce+=(Ft-ce)*X,Ft+=(Et.c+(Et.d-Et.c)*X-Ft)*X,K=Pt?Math.atan2(Ft-ce,re-At)*Nt+It:this._initialRotations[C],this._mod[U]&&(K=this._mod[U](K,G)),_t[U]?G[U](K):G[U]=K)}}}),L=E.prototype;E.bezierThrough=I,E.cubicToQuadratic=_,E._autoCSS=!0,E.quadraticToCubic=function(T,M,R){return new m(T,(2*M+T)/3,(2*M+R)/3,R)},E._cssRegister=function(){var T=u.CSSPlugin;if(T){var M=T._internals,R=M._parseToProxy,C=M._setPluginRatio,U=M.CSSPropTween;M._registerComplexSpecialProp("bezier",{parser:function(N,X,K,Z,ct,Rt){X instanceof Array&&(X={values:X}),Rt=new E;var et,_t,G,Pt=X.values,Et=Pt.length-1,At=[],ce={};if(0>Et)return ct;for(et=0;Et>=et;et++)G=R(N,Pt[et],Z,ct,Rt,Et!==et),At[et]=G.end;for(_t in X)ce[_t]=X[_t];return ce.values=At,ct=new U(N,"bezier",0,0,G.pt,2),ct.data=G,ct.plugin=Rt,ct.setRatio=C,ce.autoRotate===0&&(ce.autoRotate=!0),!ce.autoRotate||ce.autoRotate instanceof Array||(et=ce.autoRotate===!0?0:Number(ce.autoRotate),ce.autoRotate=G.end.left!=null?[["left","top","rotation",et,!1]]:G.end.x!=null?[["x","y","rotation",et,!1]]:!1),ce.autoRotate&&(Z._transform||Z._enableTransforms(!1),G.autoRotate=Z._target._gsTransform,G.proxy.rotation=G.autoRotate.rotation||0,Z._overwriteProps.push("rotation")),Rt._onInitTween(G.proxy,ce,Z._tween),ct}})}},L._mod=function(T){for(var M,R=this._overwriteProps,C=R.length;--C>-1;)M=T[R[C]],M&&typeof M=="function"&&(this._mod[R[C]]=M)},L._kill=function(T){var M,R,C=this._props;for(M in this._beziers)if(M in T)for(delete this._beziers[M],delete this._func[M],R=C.length;--R>-1;)C[R]===M&&C.splice(R,1);if(C=this._autoRotate)for(R=C.length;--R>-1;)T[C[R][2]]&&C.splice(R,1);return this._super._kill.call(this,T)}}(),ln._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(x,a){var s,c,d,u,m=function(){x.call(this,"css"),this._overwriteProps.length=0,this.setRatio=m.prototype.setRatio},g=ln._gsDefine.globals,_={},S=m.prototype=new x("css");S.constructor=m,m.version="2.0.2",m.API=2,m.defaultTransformPerspective=0,m.defaultSkewType="compensated",m.defaultSmoothOrigin=!0,S="px",m.suffixMap={top:S,right:S,bottom:S,left:S,width:S,height:S,fontSize:S,padding:S,margin:S,perspective:S,lineHeight:""};var b,I,k,D,F,E,L,T,M=/(?:\-|\.|\b)(\d|\.|e\-)+/g,R=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,C=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,U=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,N=/(?:\d|\-|\+|=|#|\.)*/g,X=/opacity *= *([^)]*)/i,K=/opacity:([^;]*)/i,Z=/alpha\(opacity *=.+?\)/i,ct=/^(rgb|hsl)/,Rt=/([A-Z])/g,et=/-([a-z])/gi,_t=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,G=function(V,tt){return tt.toUpperCase()},Pt=/(?:Left|Right|Width)/i,Et=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,At=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,ce=/,(?=[^\)]*(?:\(|$))/gi,re=/[\s,\(]/i,Ft=Math.PI/180,It=180/Math.PI,Nt={},Pe={style:{}},pe=ln.document||{createElement:function(){return Pe}},Wt=function(V,tt){return pe.createElementNS?pe.createElementNS(tt||"http://www.w3.org/1999/xhtml",V):pe.createElement(V)},$e=Wt("div"),Si=Wt("img"),Oe=m._internals={_specialProps:_},Ge=(ln.navigator||{}).userAgent||"",pi=function(){var V=Ge.indexOf("Android"),tt=Wt("a");return k=Ge.indexOf("Safari")!==-1&&Ge.indexOf("Chrome")===-1&&(V===-1||parseFloat(Ge.substr(V+8,2))>3),F=k&&parseFloat(Ge.substr(Ge.indexOf("Version/")+8,2))<6,D=Ge.indexOf("Firefox")!==-1,(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Ge)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Ge))&&(E=parseFloat(RegExp.$1)),tt?(tt.style.cssText="top:1px;opacity:.55;",/^0.55/.test(tt.style.opacity)):!1}(),Di=function(V){return X.test(typeof V=="string"?V:(V.currentStyle?V.currentStyle.filter:V.style.filter)||"")?parseFloat(RegExp.$1)/100:1},mn=function(V){ln.console&&console.log(V)},Qi="",W="",Jt=function(V,tt){tt=tt||$e;var lt,at,j=tt.style;if(j[V]!==void 0)return V;for(V=V.charAt(0).toUpperCase()+V.substr(1),lt=["O","Moz","ms","Ms","Webkit"],at=5;--at>-1&&j[lt[at]+V]===void 0;);return at>=0?(W=at===3?"ms":lt[at],Qi="-"+W.toLowerCase()+"-",W+V):null},jt=(typeof window<"u"?window:pe.defaultView||{getComputedStyle:function(){}}).getComputedStyle,dt=m.getStyle=function(V,tt,lt,at,j){var St;return pi||tt!=="opacity"?(!at&&V.style[tt]?St=V.style[tt]:(lt=lt||jt(V))?St=lt[tt]||lt.getPropertyValue(tt)||lt.getPropertyValue(tt.replace(Rt,"-$1").toLowerCase()):V.currentStyle&&(St=V.currentStyle[tt]),j==null||St&&St!=="none"&&St!=="auto"&&St!=="auto auto"?St:j):Di(V)},pt=Oe.convertToPixels=function(V,tt,lt,at,j){if(at==="px"||!at&&tt!=="lineHeight")return lt;if(at==="auto"||!lt)return 0;var St,ht,Ot,Ht=Pt.test(tt),kt=V,Mt=$e.style,he=0>lt,se=lt===1;if(he&&(lt=-lt),se&&(lt*=100),tt!=="lineHeight"||at)if(at==="%"&&tt.indexOf("border")!==-1)St=lt/100*(Ht?V.clientWidth:V.clientHeight);else{if(Mt.cssText="border:0 solid red;position:"+dt(V,"position")+";line-height:0;",at!=="%"&&kt.appendChild&&at.charAt(0)!=="v"&&at!=="rem")Mt[Ht?"borderLeftWidth":"borderTopWidth"]=lt+at;else{if(kt=V.parentNode||pe.body,dt(kt,"display").indexOf("flex")!==-1&&(Mt.position="absolute"),ht=kt._gsCache,Ot=a.ticker.frame,ht&&Ht&&ht.time===Ot)return ht.width*lt/100;Mt[Ht?"width":"height"]=lt+at}kt.appendChild($e),St=parseFloat($e[Ht?"offsetWidth":"offsetHeight"]),kt.removeChild($e),Ht&&at==="%"&&m.cacheWidths!==!1&&(ht=kt._gsCache=kt._gsCache||{},ht.time=Ot,ht.width=St/lt*100),St!==0||j||(St=pt(V,tt,lt,at,!0))}else ht=jt(V).lineHeight,V.style.lineHeight=lt,St=parseFloat(jt(V).lineHeight),V.style.lineHeight=ht;return se&&(St/=100),he?-St:St},Dt=Oe.calculateOffset=function(V,tt,lt){if(dt(V,"position",lt)!=="absolute")return 0;var at=tt==="left"?"Left":"Top",j=dt(V,"margin"+at,lt);return V["offset"+at]-(pt(V,tt,parseFloat(j),j.replace(N,""))||0)},ie=function(V,tt){var lt,at,j,St={};if(tt=tt||jt(V,null))if(lt=tt.length)for(;--lt>-1;)j=tt[lt],(j.indexOf("-transform")===-1||na===j)&&(St[j.replace(et,G)]=tt.getPropertyValue(j));else for(lt in tt)(lt.indexOf("Transform")===-1||Mn===lt)&&(St[lt]=tt[lt]);else if(tt=V.currentStyle||V.style)for(lt in tt)typeof lt=="string"&&St[lt]===void 0&&(St[lt.replace(et,G)]=tt[lt]);return pi||(St.opacity=Di(V)),at=uo(V,tt,!1),St.rotation=at.rotation,St.skewX=at.skewX,St.scaleX=at.scaleX,St.scaleY=at.scaleY,St.x=at.x,St.y=at.y,vr&&(St.z=at.z,St.rotationX=at.rotationX,St.rotationY=at.rotationY,St.scaleZ=at.scaleZ),St.filters&&delete St.filters,St},Kt=function(V,tt,lt,at,j){var St,ht,Ot,Ht={},kt=V.style;for(ht in lt)ht!=="cssText"&&ht!=="length"&&isNaN(ht)&&(tt[ht]!==(St=lt[ht])||j&&j[ht])&&ht.indexOf("Origin")===-1&&(typeof St=="number"||typeof St=="string")&&(Ht[ht]=St!=="auto"||ht!=="left"&&ht!=="top"?St!==""&&St!=="auto"&&St!=="none"||typeof tt[ht]!="string"||tt[ht].replace(U,"")===""?St:0:Dt(V,ht),kt[ht]!==void 0&&(Ot=new ni(kt,ht,kt[ht],Ot)));if(at)for(ht in at)ht!=="className"&&(Ht[ht]=at[ht]);return{difs:Ht,firstMPT:Ot}},z={width:["Left","Right"],height:["Top","Bottom"]},Q=["marginLeft","marginRight","marginTop","marginBottom"],st=function(V,tt,lt){if((V.nodeName+"").toLowerCase()==="svg")return(lt||jt(V))[tt]||0;if(V.getCTM&&$a(V))return V.getBBox()[tt]||0;var at=parseFloat(tt==="width"?V.offsetWidth:V.offsetHeight),j=z[tt],St=j.length;for(lt=lt||jt(V,null);--St>-1;)at-=parseFloat(dt(V,"padding"+j[St],lt,!0))||0,at-=parseFloat(dt(V,"border"+j[St]+"Width",lt,!0))||0;return at},nt=function(V,tt){if(V==="contain"||V==="auto"||V==="auto auto")return V+" ";(V==null||V==="")&&(V="0 0");var lt,at=V.split(" "),j=V.indexOf("left")!==-1?"0%":V.indexOf("right")!==-1?"100%":at[0],St=V.indexOf("top")!==-1?"0%":V.indexOf("bottom")!==-1?"100%":at[1];if(at.length>3&&!tt){for(at=V.split(", ").join(",").split(","),V=[],lt=0;lt<at.length;lt++)V.push(nt(at[lt]));return V.join(",")}return St==null?St=j==="center"?"50%":"0":St==="center"&&(St="50%"),(j==="center"||isNaN(parseFloat(j))&&(j+"").indexOf("=")===-1)&&(j="50%"),V=j+" "+St+(at.length>2?" "+at[2]:""),tt&&(tt.oxp=j.indexOf("%")!==-1,tt.oyp=St.indexOf("%")!==-1,tt.oxr=j.charAt(1)==="=",tt.oyr=St.charAt(1)==="=",tt.ox=parseFloat(j.replace(U,"")),tt.oy=parseFloat(St.replace(U,"")),tt.v=V),tt||V},vt=function(V,tt){return typeof V=="function"&&(V=V(T,L)),typeof V=="string"&&V.charAt(1)==="="?parseInt(V.charAt(0)+"1",10)*parseFloat(V.substr(2)):parseFloat(V)-parseFloat(tt)||0},Gt=function(V,tt){typeof V=="function"&&(V=V(T,L));var lt=typeof V=="string"&&V.charAt(1)==="=";return typeof V=="string"&&V.charAt(V.length-2)==="v"&&(V=(lt?V.substr(0,2):0)+window["inner"+(V.substr(-2)==="vh"?"Height":"Width")]*(parseFloat(lt?V.substr(2):V)/100)),V==null?tt:lt?parseInt(V.charAt(0)+"1",10)*parseFloat(V.substr(2))+tt:parseFloat(V)||0},qt=function(V,tt,lt,at){var j,St,ht,Ot,Ht,kt=1e-6;return typeof V=="function"&&(V=V(T,L)),V==null?Ot=tt:typeof V=="number"?Ot=V:(j=360,St=V.split("_"),Ht=V.charAt(1)==="=",ht=(Ht?parseInt(V.charAt(0)+"1",10)*parseFloat(St[0].substr(2)):parseFloat(St[0]))*(V.indexOf("rad")===-1?1:It)-(Ht?0:tt),St.length&&(at&&(at[lt]=tt+ht),V.indexOf("short")!==-1&&(ht%=j,ht!==ht%(j/2)&&(ht=0>ht?ht+j:ht-j)),V.indexOf("_cw")!==-1&&0>ht?ht=(ht+9999999999*j)%j-(ht/j|0)*j:V.indexOf("ccw")!==-1&&ht>0&&(ht=(ht-9999999999*j)%j-(ht/j|0)*j)),Ot=tt+ht),kt>Ot&&Ot>-kt&&(Ot=0),Ot},Xt={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]},Ne=function(V,tt,lt){return V=0>V?V+1:V>1?V-1:V,255*(1>6*V?tt+(lt-tt)*V*6:.5>V?lt:2>3*V?tt+(lt-tt)*(2/3-V)*6:tt)+.5|0},Ie=m.parseColor=function(V,tt){var lt,at,j,St,ht,Ot,Ht,kt,Mt,he,se;if(V)if(typeof V=="number")lt=[V>>16,V>>8&255,255&V];else{if(V.charAt(V.length-1)===","&&(V=V.substr(0,V.length-1)),Xt[V])lt=Xt[V];else if(V.charAt(0)==="#")V.length===4&&(at=V.charAt(1),j=V.charAt(2),St=V.charAt(3),V="#"+at+at+j+j+St+St),V=parseInt(V.substr(1),16),lt=[V>>16,V>>8&255,255&V];else if(V.substr(0,3)==="hsl")if(lt=se=V.match(M),tt){if(V.indexOf("=")!==-1)return V.match(R)}else ht=Number(lt[0])%360/360,Ot=Number(lt[1])/100,Ht=Number(lt[2])/100,j=.5>=Ht?Ht*(Ot+1):Ht+Ot-Ht*Ot,at=2*Ht-j,lt.length>3&&(lt[3]=Number(lt[3])),lt[0]=Ne(ht+1/3,at,j),lt[1]=Ne(ht,at,j),lt[2]=Ne(ht-1/3,at,j);else lt=V.match(M)||Xt.transparent;lt[0]=Number(lt[0]),lt[1]=Number(lt[1]),lt[2]=Number(lt[2]),lt.length>3&&(lt[3]=Number(lt[3]))}else lt=Xt.black;return tt&&!se&&(at=lt[0]/255,j=lt[1]/255,St=lt[2]/255,kt=Math.max(at,j,St),Mt=Math.min(at,j,St),Ht=(kt+Mt)/2,kt===Mt?ht=Ot=0:(he=kt-Mt,Ot=Ht>.5?he/(2-kt-Mt):he/(kt+Mt),ht=kt===at?(j-St)/he+(St>j?6:0):kt===j?(St-at)/he+2:(at-j)/he+4,ht*=60),lt[0]=ht+.5|0,lt[1]=100*Ot+.5|0,lt[2]=100*Ht+.5|0),lt},ge=function(V,tt){var lt,at,j,St=V.match(we)||[],ht=0,Ot="";if(!St.length)return V;for(lt=0;lt<St.length;lt++)at=St[lt],j=V.substr(ht,V.indexOf(at,ht)-ht),ht+=j.length+at.length,at=Ie(at,tt),at.length===3&&at.push(1),Ot+=j+(tt?"hsla("+at[0]+","+at[1]+"%,"+at[2]+"%,"+at[3]:"rgba("+at.join(","))+")";return Ot+V.substr(ht)},we="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(S in Xt)we+="|"+S+"\\b";we=new RegExp(we+")","gi"),m.colorStringFilter=function(V){var tt,lt=V[0]+" "+V[1];we.test(lt)&&(tt=lt.indexOf("hsl(")!==-1||lt.indexOf("hsla(")!==-1,V[0]=ge(V[0],tt),V[1]=ge(V[1],tt)),we.lastIndex=0},a.defaultStringFilter||(a.defaultStringFilter=m.colorStringFilter);var yi=function(V,tt,lt,at){if(V==null)return function(se){return se};var j,St=tt?(V.match(we)||[""])[0]:"",ht=V.split(St).join("").match(C)||[],Ot=V.substr(0,V.indexOf(ht[0])),Ht=V.charAt(V.length-1)===")"?")":"",kt=V.indexOf(" ")!==-1?" ":",",Mt=ht.length,he=Mt>0?ht[0].replace(M,""):"";return Mt?j=tt?function(se){var te,ye,ue,je;if(typeof se=="number")se+=he;else if(at&&ce.test(se)){for(je=se.replace(ce,"|").split("|"),ue=0;ue<je.length;ue++)je[ue]=j(je[ue]);return je.join(",")}if(te=(se.match(we)||[St])[0],ye=se.split(te).join("").match(C)||[],ue=ye.length,Mt>ue--)for(;++ue<Mt;)ye[ue]=lt?ye[(ue-1)/2|0]:ht[ue];return Ot+ye.join(kt)+kt+te+Ht+(se.indexOf("inset")!==-1?" inset":"")}:function(se){var te,ye,ue;if(typeof se=="number")se+=he;else if(at&&ce.test(se)){for(ye=se.replace(ce,"|").split("|"),ue=0;ue<ye.length;ue++)ye[ue]=j(ye[ue]);return ye.join(",")}if(te=se.match(C)||[],ue=te.length,Mt>ue--)for(;++ue<Mt;)te[ue]=lt?te[(ue-1)/2|0]:ht[ue];return Ot+te.join(kt)+Ht}:function(se){return se}},Ei=function(V){return V=V.split(","),function(tt,lt,at,j,St,ht,Ot){var Ht,kt=(lt+"").split(" ");for(Ot={},Ht=0;4>Ht;Ht++)Ot[V[Ht]]=kt[Ht]=kt[Ht]||kt[(Ht-1)/2>>0];return j.parse(tt,Ot,St,ht)}},ni=(Oe._setPluginRatio=function(V){this.plugin.setRatio(V);for(var tt,lt,at,j,St,ht=this.data,Ot=ht.proxy,Ht=ht.firstMPT,kt=1e-6;Ht;)tt=Ot[Ht.v],Ht.r?tt=Ht.r(tt):kt>tt&&tt>-kt&&(tt=0),Ht.t[Ht.p]=tt,Ht=Ht._next;if(ht.autoRotate&&(ht.autoRotate.rotation=ht.mod?ht.mod.call(this._tween,Ot.rotation,this.t,this._tween):Ot.rotation),V===1||V===0)for(Ht=ht.firstMPT,St=V===1?"e":"b";Ht;){if(lt=Ht.t,lt.type){if(lt.type===1){for(j=lt.xs0+lt.s+lt.xs1,at=1;at<lt.l;at++)j+=lt["xn"+at]+lt["xs"+(at+1)];lt[St]=j}}else lt[St]=lt.s+lt.xs0;Ht=Ht._next}},function(V,tt,lt,at,j){this.t=V,this.p=tt,this.v=lt,this.r=j,at&&(at._prev=this,this._next=at)}),bi=(Oe._parseToProxy=function(V,tt,lt,at,j,St){var ht,Ot,Ht,kt,Mt,he=at,se={},te={},ye=lt._transform,ue=Nt;for(lt._transform=null,Nt=tt,at=Mt=lt.parse(V,tt,at,j),Nt=ue,St&&(lt._transform=ye,he&&(he._prev=null,he._prev&&(he._prev._next=null)));at&&at!==he;){if(at.type<=1&&(Ot=at.p,te[Ot]=at.s+at.c,se[Ot]=at.s,St||(kt=new ni(at,"s",Ot,kt,at.r),at.c=0),at.type===1))for(ht=at.l;--ht>0;)Ht="xn"+ht,Ot=at.p+"_"+Ht,te[Ot]=at.data[Ht],se[Ot]=at[Ht],St||(kt=new ni(at,Ht,Ot,kt,at.rxp[Ht]));at=at._next}return{proxy:se,end:te,firstMPT:kt,pt:Mt}},Oe.CSSPropTween=function(V,tt,lt,at,j,St,ht,Ot,Ht,kt,Mt){this.t=V,this.p=tt,this.s=lt,this.c=at,this.n=ht||tt,V instanceof bi||u.push(this.n),this.r=Ot&&(typeof Ot=="function"?Ot:Math.round),this.type=St||0,Ht&&(this.pr=Ht,s=!0),this.b=kt===void 0?lt:kt,this.e=Mt===void 0?lt+at:Mt,j&&(this._next=j,j._prev=this)}),qr=function(V,tt,lt,at,j,St){var ht=new bi(V,tt,lt,at-lt,j,-1,St);return ht.b=lt,ht.e=ht.xs0=at,ht},sr=m.parseComplex=function(V,tt,lt,at,j,St,ht,Ot,Ht,kt){lt=lt||St||"",typeof at=="function"&&(at=at(T,L)),ht=new bi(V,tt,0,0,ht,kt?2:1,null,!1,Ot,lt,at),at+="",j&&we.test(at+lt)&&(at=[lt,at],m.colorStringFilter(at),lt=at[0],at=at[1]);var Mt,he,se,te,ye,ue,je,He,ci,Be,_e,Fe,fe,mi=lt.split(", ").join(",").split(" "),Le=at.split(", ").join(",").split(" "),xe=mi.length,Re=b!==!1;for((at.indexOf(",")!==-1||lt.indexOf(",")!==-1)&&((at+lt).indexOf("rgb")!==-1||(at+lt).indexOf("hsl")!==-1?(mi=mi.join(" ").replace(ce,", ").split(" "),Le=Le.join(" ").replace(ce,", ").split(" ")):(mi=mi.join(" ").split(",").join(", ").split(" "),Le=Le.join(" ").split(",").join(", ").split(" ")),xe=mi.length),xe!==Le.length&&(mi=(St||"").split(" "),xe=mi.length),ht.plugin=Ht,ht.setRatio=kt,we.lastIndex=0,Mt=0;xe>Mt;Mt++)if(te=mi[Mt],ye=Le[Mt]+"",He=parseFloat(te),He||He===0)ht.appendXtra("",He,vt(ye,He),ye.replace(R,""),Re&&ye.indexOf("px")!==-1?Math.round:!1,!0);else if(j&&we.test(te))Fe=ye.indexOf(")")+1,Fe=")"+(Fe?ye.substr(Fe):""),fe=ye.indexOf("hsl")!==-1&&pi,Be=ye,te=Ie(te,fe),ye=Ie(ye,fe),ci=te.length+ye.length>6,ci&&!pi&&ye[3]===0?(ht["xs"+ht.l]+=ht.l?" transparent":"transparent",ht.e=ht.e.split(Le[Mt]).join("transparent")):(pi||(ci=!1),fe?ht.appendXtra(Be.substr(0,Be.indexOf("hsl"))+(ci?"hsla(":"hsl("),te[0],vt(ye[0],te[0]),",",!1,!0).appendXtra("",te[1],vt(ye[1],te[1]),"%,",!1).appendXtra("",te[2],vt(ye[2],te[2]),ci?"%,":"%"+Fe,!1):ht.appendXtra(Be.substr(0,Be.indexOf("rgb"))+(ci?"rgba(":"rgb("),te[0],ye[0]-te[0],",",Math.round,!0).appendXtra("",te[1],ye[1]-te[1],",",Math.round).appendXtra("",te[2],ye[2]-te[2],ci?",":Fe,Math.round),ci&&(te=te.length<4?1:te[3],ht.appendXtra("",te,(ye.length<4?1:ye[3])-te,Fe,!1))),we.lastIndex=0;else if(ue=te.match(M)){if(je=ye.match(R),!je||je.length!==ue.length)return ht;for(se=0,he=0;he<ue.length;he++)_e=ue[he],Be=te.indexOf(_e,se),ht.appendXtra(te.substr(se,Be-se),Number(_e),vt(je[he],_e),"",Re&&te.substr(Be+_e.length,2)==="px"?Math.round:!1,he===0),se=Be+_e.length;ht["xs"+ht.l]+=te.substr(se)}else ht["xs"+ht.l]+=ht.l||ht["xs"+ht.l]?" "+ye:ye;if(at.indexOf("=")!==-1&&ht.data){for(Fe=ht.xs0+ht.data.s,Mt=1;Mt<ht.l;Mt++)Fe+=ht["xs"+Mt]+ht.data["xn"+Mt];ht.e=Fe+ht["xs"+Mt]}return ht.l||(ht.type=-1,ht.xs0=ht.e),ht.xfirst||ht},sn=9;for(S=bi.prototype,S.l=S.pr=0;--sn>0;)S["xn"+sn]=0,S["xs"+sn]="";S.xs0="",S._next=S._prev=S.xfirst=S.data=S.plugin=S.setRatio=S.rxp=null,S.appendXtra=function(V,tt,lt,at,j,St){var ht=this,Ot=ht.l;return ht["xs"+Ot]+=St&&(Ot||ht["xs"+Ot])?" "+V:V||"",lt||Ot===0||ht.plugin?(ht.l++,ht.type=ht.setRatio?2:1,ht["xs"+ht.l]=at||"",Ot>0?(ht.data["xn"+Ot]=tt+lt,ht.rxp["xn"+Ot]=j,ht["xn"+Ot]=tt,ht.plugin||(ht.xfirst=new bi(ht,"xn"+Ot,tt,lt,ht.xfirst||ht,0,ht.n,j,ht.pr),ht.xfirst.xs0=0),ht):(ht.data={s:tt+lt},ht.rxp={},ht.s=tt,ht.c=lt,ht.r=j,ht)):(ht["xs"+Ot]+=tt+(at||""),ht)};var Ao=function(V,tt){tt=tt||{},this.p=tt.prefix&&Jt(V)||V,_[V]=_[this.p]=this,this.format=tt.formatter||yi(tt.defaultValue,tt.color,tt.collapsible,tt.multi),tt.parser&&(this.parse=tt.parser),this.clrs=tt.color,this.multi=tt.multi,this.keyword=tt.keyword,this.dflt=tt.defaultValue,this.pr=tt.priority||0},zi=Oe._registerComplexSpecialProp=function(V,tt,lt){typeof tt!="object"&&(tt={parser:lt});var at,j=V.split(","),St=tt.defaultValue;for(lt=lt||[St],at=0;at<j.length;at++)tt.prefix=at===0&&tt.prefix,tt.defaultValue=lt[at]||St,new Ao(j[at],tt)},qo=Oe._registerPluginProp=function(V){if(!_[V]){var tt=V.charAt(0).toUpperCase()+V.substr(1)+"Plugin";zi(V,{parser:function(lt,at,j,St,ht,Ot,Ht){var kt=g.com.greensock.plugins[tt];return kt?(kt._cssRegister(),_[j].parse(lt,at,j,St,ht,Ot,Ht)):(mn("Error: "+tt+" js file not loaded."),ht)}})}};S=Ao.prototype,S.parseComplex=function(V,tt,lt,at,j,St){var ht,Ot,Ht,kt,Mt,he,se=this.keyword;if(this.multi&&(ce.test(lt)||ce.test(tt)?(Ot=tt.replace(ce,"|").split("|"),Ht=lt.replace(ce,"|").split("|")):se&&(Ot=[tt],Ht=[lt])),Ht){for(kt=Ht.length>Ot.length?Ht.length:Ot.length,ht=0;kt>ht;ht++)tt=Ot[ht]=Ot[ht]||this.dflt,lt=Ht[ht]=Ht[ht]||this.dflt,se&&(Mt=tt.indexOf(se),he=lt.indexOf(se),Mt!==he&&(he===-1?Ot[ht]=Ot[ht].split(se).join(""):Mt===-1&&(Ot[ht]+=" "+se)));tt=Ot.join(", "),lt=Ht.join(", ")}return sr(V,this.p,tt,lt,this.clrs,this.dflt,at,this.pr,j,St)},S.parse=function(V,tt,lt,at,j,St,ht){return this.parseComplex(V.style,this.format(dt(V,this.p,d,!1,this.dflt)),this.format(tt),j,St)},m.registerSpecialProp=function(V,tt,lt){zi(V,{parser:function(at,j,St,ht,Ot,Ht,kt){var Mt=new bi(at,St,0,0,Ot,2,St,!1,lt);return Mt.plugin=Ht,Mt.setRatio=tt(at,j,ht._tween,St),Mt},priority:lt})},m.useSVGTransformAttr=!0;var ao,Vl="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Mn=Jt("transform"),na=Qi+"transform",gs=Jt("transformOrigin"),vr=Jt("perspective")!==null,ra=Oe.Transform=function(){this.perspective=parseFloat(m.defaultTransformPerspective)||0,this.force3D=m.defaultForce3D!==!1&&vr?m.defaultForce3D||"auto":!1},Za=ln.SVGElement,Wl=function(V,tt,lt){var at,j=pe.createElementNS("http://www.w3.org/2000/svg",V),St=/([a-z])([A-Z])/g;for(at in lt)j.setAttributeNS(null,at.replace(St,"$1-$2").toLowerCase(),lt[at]);return tt.appendChild(j),j},lo=pe.documentElement||{},Oh=function(){var V,tt,lt,at=E||/Android/i.test(Ge)&&!ln.chrome;return pe.createElementNS&&!at&&(V=Wl("svg",lo),tt=Wl("rect",V,{width:100,height:50,x:100}),lt=tt.getBoundingClientRect().width,tt.style[gs]="50% 50%",tt.style[Mn]="scaleX(0.5)",at=lt===tt.getBoundingClientRect().width&&!(D&&vr),lo.removeChild(V)),at}(),oa=function(V,tt,lt,at,j,St){var ht,Ot,Ht,kt,Mt,he,se,te,ye,ue,je,He,ci,Be,_e=V._gsTransform,Fe=aa(V,!0);_e&&(ci=_e.xOrigin,Be=_e.yOrigin),(!at||(ht=at.split(" ")).length<2)&&(se=V.getBBox(),se.x===0&&se.y===0&&se.width+se.height===0&&(se={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}),tt=nt(tt).split(" "),ht=[(tt[0].indexOf("%")!==-1?parseFloat(tt[0])/100*se.width:parseFloat(tt[0]))+se.x,(tt[1].indexOf("%")!==-1?parseFloat(tt[1])/100*se.height:parseFloat(tt[1]))+se.y]),lt.xOrigin=kt=parseFloat(ht[0]),lt.yOrigin=Mt=parseFloat(ht[1]),at&&Fe!==sa&&(he=Fe[0],se=Fe[1],te=Fe[2],ye=Fe[3],ue=Fe[4],je=Fe[5],He=he*ye-se*te,He&&(Ot=kt*(ye/He)+Mt*(-te/He)+(te*je-ye*ue)/He,Ht=kt*(-se/He)+Mt*(he/He)-(he*je-se*ue)/He,kt=lt.xOrigin=ht[0]=Ot,Mt=lt.yOrigin=ht[1]=Ht)),_e&&(St&&(lt.xOffset=_e.xOffset,lt.yOffset=_e.yOffset,_e=lt),j||j!==!1&&m.defaultSmoothOrigin!==!1?(Ot=kt-ci,Ht=Mt-Be,_e.xOffset+=Ot*Fe[0]+Ht*Fe[2]-Ot,_e.yOffset+=Ot*Fe[1]+Ht*Fe[3]-Ht):_e.xOffset=_e.yOffset=0),St||V.setAttribute("data-svg-origin",ht.join(" "))},Ja=function(V){var tt,lt=Wt("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),at=this.parentNode,j=this.nextSibling,St=this.style.cssText;if(lo.appendChild(lt),lt.appendChild(this),this.style.display="block",V)try{tt=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Ja}catch{}else this._originalGetBBox&&(tt=this._originalGetBBox());return j?at.insertBefore(this,j):at.appendChild(this),lo.removeChild(lt),this.style.cssText=St,tt},ho=function(V){try{return V.getBBox()}catch{return Ja.call(V,!0)}},$a=function(V){return!(!Za||!V.getCTM||V.parentNode&&!V.ownerSVGElement||!ho(V))},sa=[1,0,0,1,0,0],aa=function(V,tt){var lt,at,j,St,ht,Ot,Ht=V._gsTransform||new ra,kt=1e5,Mt=V.style;if(Mn?at=dt(V,na,null,!0):V.currentStyle&&(at=V.currentStyle.filter.match(Et),at=at&&at.length===4?[at[0].substr(4),Number(at[2].substr(4)),Number(at[1].substr(4)),at[3].substr(4),Ht.x||0,Ht.y||0].join(","):""),lt=!at||at==="none"||at==="matrix(1, 0, 0, 1, 0, 0)",!Mn||!(Ot=!jt(V)||jt(V).display==="none")&&V.parentNode||(Ot&&(St=Mt.display,Mt.display="block"),V.parentNode||(ht=1,lo.appendChild(V)),at=dt(V,na,null,!0),lt=!at||at==="none"||at==="matrix(1, 0, 0, 1, 0, 0)",St?Mt.display=St:Ot&&vs(Mt,"display"),ht&&lo.removeChild(V)),(Ht.svg||V.getCTM&&$a(V))&&(lt&&(Mt[Mn]+"").indexOf("matrix")!==-1&&(at=Mt[Mn],lt=0),j=V.getAttribute("transform"),lt&&j&&(j=V.transform.baseVal.consolidate().matrix,at="matrix("+j.a+","+j.b+","+j.c+","+j.d+","+j.e+","+j.f+")",lt=0)),lt)return sa;for(j=(at||"").match(M)||[],sn=j.length;--sn>-1;)St=Number(j[sn]),j[sn]=(ht=St-(St|=0))?(ht*kt+(0>ht?-.5:.5)|0)/kt+St:St;return tt&&j.length>6?[j[0],j[1],j[4],j[5],j[12],j[13]]:j},uo=Oe.getTransform=function(V,tt,lt,at){if(V._gsTransform&&lt&&!at)return V._gsTransform;var j,St,ht,Ot,Ht,kt,Mt=lt?V._gsTransform||new ra:new ra,he=Mt.scaleX<0,se=2e-5,te=1e5,ye=vr&&(parseFloat(dt(V,gs,tt,!1,"0 0 0").split(" ")[2])||Mt.zOrigin)||0,ue=parseFloat(m.defaultTransformPerspective)||0;if(Mt.svg=!(!V.getCTM||!$a(V)),Mt.svg&&(oa(V,dt(V,gs,tt,!1,"50% 50%")+"",Mt,V.getAttribute("data-svg-origin")),ao=m.useSVGTransformAttr||Oh),j=aa(V),j!==sa){if(j.length===16){var je,He,ci,Be,_e,Fe=j[0],fe=j[1],mi=j[2],Le=j[3],xe=j[4],Re=j[5],Sn=j[6],Xn=j[7],ki=j[8],Bi=j[9],Hi=j[10],nn=j[12],rn=j[13],un=j[14],cn=j[11],Gi=Math.atan2(Sn,Hi);Mt.zOrigin&&(un=-Mt.zOrigin,nn=ki*un-j[12],rn=Bi*un-j[13],un=Hi*un+Mt.zOrigin-j[14]),Mt.rotationX=Gi*It,Gi&&(Be=Math.cos(-Gi),_e=Math.sin(-Gi),je=xe*Be+ki*_e,He=Re*Be+Bi*_e,ci=Sn*Be+Hi*_e,ki=xe*-_e+ki*Be,Bi=Re*-_e+Bi*Be,Hi=Sn*-_e+Hi*Be,cn=Xn*-_e+cn*Be,xe=je,Re=He,Sn=ci),Gi=Math.atan2(-mi,Hi),Mt.rotationY=Gi*It,Gi&&(Be=Math.cos(-Gi),_e=Math.sin(-Gi),je=Fe*Be-ki*_e,He=fe*Be-Bi*_e,ci=mi*Be-Hi*_e,Bi=fe*_e+Bi*Be,Hi=mi*_e+Hi*Be,cn=Le*_e+cn*Be,Fe=je,fe=He,mi=ci),Gi=Math.atan2(fe,Fe),Mt.rotation=Gi*It,Gi&&(Be=Math.cos(Gi),_e=Math.sin(Gi),je=Fe*Be+fe*_e,He=xe*Be+Re*_e,ci=ki*Be+Bi*_e,fe=fe*Be-Fe*_e,Re=Re*Be-xe*_e,Bi=Bi*Be-ki*_e,Fe=je,xe=He,ki=ci),Mt.rotationX&&Math.abs(Mt.rotationX)+Math.abs(Mt.rotation)>359.9&&(Mt.rotationX=Mt.rotation=0,Mt.rotationY=180-Mt.rotationY),Gi=Math.atan2(xe,Re),Mt.scaleX=(Math.sqrt(Fe*Fe+fe*fe+mi*mi)*te+.5|0)/te,Mt.scaleY=(Math.sqrt(Re*Re+Sn*Sn)*te+.5|0)/te,Mt.scaleZ=(Math.sqrt(ki*ki+Bi*Bi+Hi*Hi)*te+.5|0)/te,Fe/=Mt.scaleX,xe/=Mt.scaleY,fe/=Mt.scaleX,Re/=Mt.scaleY,Math.abs(Gi)>se?(Mt.skewX=Gi*It,xe=0,Mt.skewType!=="simple"&&(Mt.scaleY*=1/Math.cos(Gi))):Mt.skewX=0,Mt.perspective=cn?1/(0>cn?-cn:cn):0,Mt.x=nn,Mt.y=rn,Mt.z=un,Mt.svg&&(Mt.x-=Mt.xOrigin-(Mt.xOrigin*Fe-Mt.yOrigin*xe),Mt.y-=Mt.yOrigin-(Mt.yOrigin*fe-Mt.xOrigin*Re))}else if(!vr||at||!j.length||Mt.x!==j[4]||Mt.y!==j[5]||!Mt.rotationX&&!Mt.rotationY){var Ni=j.length>=6,ji=Ni?j[0]:1,gi=j[1]||0,co=j[2]||0,Fn=Ni?j[3]:1;Mt.x=j[4]||0,Mt.y=j[5]||0,ht=Math.sqrt(ji*ji+gi*gi),Ot=Math.sqrt(Fn*Fn+co*co),Ht=ji||gi?Math.atan2(gi,ji)*It:Mt.rotation||0,kt=co||Fn?Math.atan2(co,Fn)*It+Ht:Mt.skewX||0,Mt.scaleX=ht,Mt.scaleY=Ot,Mt.rotation=Ht,Mt.skewX=kt,vr&&(Mt.rotationX=Mt.rotationY=Mt.z=0,Mt.perspective=ue,Mt.scaleZ=1),Mt.svg&&(Mt.x-=Mt.xOrigin-(Mt.xOrigin*ji+Mt.yOrigin*co),Mt.y-=Mt.yOrigin-(Mt.xOrigin*gi+Mt.yOrigin*Fn))}Math.abs(Mt.skewX)>90&&Math.abs(Mt.skewX)<270&&(he?(Mt.scaleX*=-1,Mt.skewX+=Mt.rotation<=0?180:-180,Mt.rotation+=Mt.rotation<=0?180:-180):(Mt.scaleY*=-1,Mt.skewX+=Mt.skewX<=0?180:-180)),Mt.zOrigin=ye;for(St in Mt)Mt[St]<se&&Mt[St]>-se&&(Mt[St]=0)}return lt&&(V._gsTransform=Mt,Mt.svg&&(ao&&V.style[Mn]?a.delayedCall(.001,function(){vs(V.style,Mn)}):!ao&&V.getAttribute("transform")&&a.delayedCall(.001,function(){V.removeAttribute("transform")}))),Mt},jl=function(V){var tt,lt,at=this.data,j=-at.rotation*Ft,St=j+at.skewX*Ft,ht=1e5,Ot=(Math.cos(j)*at.scaleX*ht|0)/ht,Ht=(Math.sin(j)*at.scaleX*ht|0)/ht,kt=(Math.sin(St)*-at.scaleY*ht|0)/ht,Mt=(Math.cos(St)*at.scaleY*ht|0)/ht,he=this.t.style,se=this.t.currentStyle;if(se){lt=Ht,Ht=-kt,kt=-lt,tt=se.filter,he.filter="";var te,ye,ue=this.t.offsetWidth,je=this.t.offsetHeight,He=se.position!=="absolute",ci="progid:DXImageTransform.Microsoft.Matrix(M11="+Ot+", M12="+Ht+", M21="+kt+", M22="+Mt,Be=at.x+ue*at.xPercent/100,_e=at.y+je*at.yPercent/100;if(at.ox!=null&&(te=(at.oxp?ue*at.ox*.01:at.ox)-ue/2,ye=(at.oyp?je*at.oy*.01:at.oy)-je/2,Be+=te-(te*Ot+ye*Ht),_e+=ye-(te*kt+ye*Mt)),He?(te=ue/2,ye=je/2,ci+=", Dx="+(te-(te*Ot+ye*Ht)+Be)+", Dy="+(ye-(te*kt+ye*Mt)+_e)+")"):ci+=", sizingMethod='auto expand')",tt.indexOf("DXImageTransform.Microsoft.Matrix(")!==-1?he.filter=tt.replace(At,ci):he.filter=ci+" "+tt,(V===0||V===1)&&Ot===1&&Ht===0&&kt===0&&Mt===1&&(He&&ci.indexOf("Dx=0, Dy=0")===-1||X.test(tt)&&parseFloat(RegExp.$1)!==100||tt.indexOf(tt.indexOf("Alpha"))===-1&&he.removeAttribute("filter")),!He){var Fe,fe,mi,Le=8>E?1:-1;for(te=at.ieOffsetX||0,ye=at.ieOffsetY||0,at.ieOffsetX=Math.round((ue-((0>Ot?-Ot:Ot)*ue+(0>Ht?-Ht:Ht)*je))/2+Be),at.ieOffsetY=Math.round((je-((0>Mt?-Mt:Mt)*je+(0>kt?-kt:kt)*ue))/2+_e),sn=0;4>sn;sn++)fe=Q[sn],Fe=se[fe],lt=Fe.indexOf("px")!==-1?parseFloat(Fe):pt(this.t,fe,parseFloat(Fe),Fe.replace(N,""))||0,mi=lt!==at[fe]?2>sn?-at.ieOffsetX:-at.ieOffsetY:2>sn?te-at.ieOffsetX:ye-at.ieOffsetY,he[fe]=(at[fe]=Math.round(lt-mi*(sn===0||sn===2?1:Le)))+"px"}}},Ih=Oe.set3DTransformRatio=Oe.setTransformRatio=function(V){var tt,lt,at,j,St,ht,Ot,Ht,kt,Mt,he,se,te,ye,ue,je,He,ci,Be,_e,Fe,fe,mi,Le=this.data,xe=this.t.style,Re=Le.rotation,Sn=Le.rotationX,Xn=Le.rotationY,ki=Le.scaleX,Bi=Le.scaleY,Hi=Le.scaleZ,nn=Le.x,rn=Le.y,un=Le.z,cn=Le.svg,Gi=Le.perspective,Ni=Le.force3D,ji=Le.skewY,gi=Le.skewX;if(ji&&(gi+=ji,Re+=ji),((V===1||V===0)&&Ni==="auto"&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!Ni)&&!un&&!Gi&&!Xn&&!Sn&&Hi===1||ao&&cn||!vr)return void(Re||gi||cn?(Re*=Ft,fe=gi*Ft,mi=1e5,lt=Math.cos(Re)*ki,St=Math.sin(Re)*ki,at=Math.sin(Re-fe)*-Bi,ht=Math.cos(Re-fe)*Bi,fe&&Le.skewType==="simple"&&(tt=Math.tan(fe-ji*Ft),tt=Math.sqrt(1+tt*tt),at*=tt,ht*=tt,ji&&(tt=Math.tan(ji*Ft),tt=Math.sqrt(1+tt*tt),lt*=tt,St*=tt)),cn&&(nn+=Le.xOrigin-(Le.xOrigin*lt+Le.yOrigin*at)+Le.xOffset,rn+=Le.yOrigin-(Le.xOrigin*St+Le.yOrigin*ht)+Le.yOffset,ao&&(Le.xPercent||Le.yPercent)&&(ue=this.t.getBBox(),nn+=.01*Le.xPercent*ue.width,rn+=.01*Le.yPercent*ue.height),ue=1e-6,ue>nn&&nn>-ue&&(nn=0),ue>rn&&rn>-ue&&(rn=0)),Be=(lt*mi|0)/mi+","+(St*mi|0)/mi+","+(at*mi|0)/mi+","+(ht*mi|0)/mi+","+nn+","+rn+")",cn&&ao?this.t.setAttribute("transform","matrix("+Be):xe[Mn]=(Le.xPercent||Le.yPercent?"translate("+Le.xPercent+"%,"+Le.yPercent+"%) matrix(":"matrix(")+Be):xe[Mn]=(Le.xPercent||Le.yPercent?"translate("+Le.xPercent+"%,"+Le.yPercent+"%) matrix(":"matrix(")+ki+",0,0,"+Bi+","+nn+","+rn+")");if(D&&(ue=1e-4,ue>ki&&ki>-ue&&(ki=Hi=2e-5),ue>Bi&&Bi>-ue&&(Bi=Hi=2e-5),!Gi||Le.z||Le.rotationX||Le.rotationY||(Gi=0)),Re||gi)Re*=Ft,je=lt=Math.cos(Re),He=St=Math.sin(Re),gi&&(Re-=gi*Ft,je=Math.cos(Re),He=Math.sin(Re),Le.skewType==="simple"&&(tt=Math.tan((gi-ji)*Ft),tt=Math.sqrt(1+tt*tt),je*=tt,He*=tt,Le.skewY&&(tt=Math.tan(ji*Ft),tt=Math.sqrt(1+tt*tt),lt*=tt,St*=tt))),at=-He,ht=je;else{if(!(Xn||Sn||Hi!==1||Gi||cn))return void(xe[Mn]=(Le.xPercent||Le.yPercent?"translate("+Le.xPercent+"%,"+Le.yPercent+"%) translate3d(":"translate3d(")+nn+"px,"+rn+"px,"+un+"px)"+(ki!==1||Bi!==1?" scale("+ki+","+Bi+")":""));lt=ht=1,at=St=0}Mt=1,j=Ot=Ht=kt=he=se=0,te=Gi?-1/Gi:0,ye=Le.zOrigin,ue=1e-6,_e=",",Fe="0",Re=Xn*Ft,Re&&(je=Math.cos(Re),He=Math.sin(Re),Ht=-He,he=te*-He,j=lt*He,Ot=St*He,Mt=je,te*=je,lt*=je,St*=je),Re=Sn*Ft,Re&&(je=Math.cos(Re),He=Math.sin(Re),tt=at*je+j*He,ci=ht*je+Ot*He,kt=Mt*He,se=te*He,j=at*-He+j*je,Ot=ht*-He+Ot*je,Mt*=je,te*=je,at=tt,ht=ci),Hi!==1&&(j*=Hi,Ot*=Hi,Mt*=Hi,te*=Hi),Bi!==1&&(at*=Bi,ht*=Bi,kt*=Bi,se*=Bi),ki!==1&&(lt*=ki,St*=ki,Ht*=ki,he*=ki),(ye||cn)&&(ye&&(nn+=j*-ye,rn+=Ot*-ye,un+=Mt*-ye+ye),cn&&(nn+=Le.xOrigin-(Le.xOrigin*lt+Le.yOrigin*at)+Le.xOffset,rn+=Le.yOrigin-(Le.xOrigin*St+Le.yOrigin*ht)+Le.yOffset),ue>nn&&nn>-ue&&(nn=Fe),ue>rn&&rn>-ue&&(rn=Fe),ue>un&&un>-ue&&(un=0)),Be=Le.xPercent||Le.yPercent?"translate("+Le.xPercent+"%,"+Le.yPercent+"%) matrix3d(":"matrix3d(",Be+=(ue>lt&&lt>-ue?Fe:lt)+_e+(ue>St&&St>-ue?Fe:St)+_e+(ue>Ht&&Ht>-ue?Fe:Ht),Be+=_e+(ue>he&&he>-ue?Fe:he)+_e+(ue>at&&at>-ue?Fe:at)+_e+(ue>ht&&ht>-ue?Fe:ht),Sn||Xn||Hi!==1?(Be+=_e+(ue>kt&&kt>-ue?Fe:kt)+_e+(ue>se&&se>-ue?Fe:se)+_e+(ue>j&&j>-ue?Fe:j),Be+=_e+(ue>Ot&&Ot>-ue?Fe:Ot)+_e+(ue>Mt&&Mt>-ue?Fe:Mt)+_e+(ue>te&&te>-ue?Fe:te)+_e):Be+=",0,0,0,0,1,0,",Be+=nn+_e+rn+_e+un+_e+(Gi?1+-un/Gi:1)+")",xe[Mn]=Be};S=ra.prototype,S.x=S.y=S.z=S.skewX=S.skewY=S.rotation=S.rotationX=S.rotationY=S.zOrigin=S.xPercent=S.yPercent=S.xOffset=S.yOffset=0,S.scaleX=S.scaleY=S.scaleZ=1,zi("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,tt,lt,at,j,St,ht){if(at._lastParsedTransform===ht)return j;at._lastParsedTransform=ht;var Ot,Ht=ht.scale&&typeof ht.scale=="function"?ht.scale:0;typeof ht[lt]=="function"&&(Ot=ht[lt],ht[lt]=tt),Ht&&(ht.scale=Ht(T,V));var kt,Mt,he,se,te,ye,ue,je,He,ci=V._gsTransform,Be=V.style,_e=1e-6,Fe=Vl.length,fe=ht,mi={},Le="transformOrigin",xe=uo(V,d,!0,fe.parseTransform),Re=fe.transform&&(typeof fe.transform=="function"?fe.transform(T,L):fe.transform);if(xe.skewType=fe.skewType||xe.skewType||m.defaultSkewType,at._transform=xe,"rotationZ"in fe&&(fe.rotation=fe.rotationZ),Re&&typeof Re=="string"&&Mn)Mt=$e.style,Mt[Mn]=Re,Mt.display="block",Mt.position="absolute",Re.indexOf("%")!==-1&&(Mt.width=dt(V,"width"),Mt.height=dt(V,"height")),pe.body.appendChild($e),kt=uo($e,null,!1),xe.skewType==="simple"&&(kt.scaleY*=Math.cos(kt.skewX*Ft)),xe.svg&&(ye=xe.xOrigin,ue=xe.yOrigin,kt.x-=xe.xOffset,kt.y-=xe.yOffset,(fe.transformOrigin||fe.svgOrigin)&&(Re={},oa(V,nt(fe.transformOrigin),Re,fe.svgOrigin,fe.smoothOrigin,!0),ye=Re.xOrigin,ue=Re.yOrigin,kt.x-=Re.xOffset-xe.xOffset,kt.y-=Re.yOffset-xe.yOffset),(ye||ue)&&(je=aa($e,!0),kt.x-=ye-(ye*je[0]+ue*je[2]),kt.y-=ue-(ye*je[1]+ue*je[3]))),pe.body.removeChild($e),kt.perspective||(kt.perspective=xe.perspective),fe.xPercent!=null&&(kt.xPercent=Gt(fe.xPercent,xe.xPercent)),fe.yPercent!=null&&(kt.yPercent=Gt(fe.yPercent,xe.yPercent));else if(typeof fe=="object"){if(kt={scaleX:Gt(fe.scaleX!=null?fe.scaleX:fe.scale,xe.scaleX),scaleY:Gt(fe.scaleY!=null?fe.scaleY:fe.scale,xe.scaleY),scaleZ:Gt(fe.scaleZ,xe.scaleZ),x:Gt(fe.x,xe.x),y:Gt(fe.y,xe.y),z:Gt(fe.z,xe.z),xPercent:Gt(fe.xPercent,xe.xPercent),yPercent:Gt(fe.yPercent,xe.yPercent),perspective:Gt(fe.transformPerspective,xe.perspective)},te=fe.directionalRotation,te!=null)if(typeof te=="object")for(Mt in te)fe[Mt]=te[Mt];else fe.rotation=te;typeof fe.x=="string"&&fe.x.indexOf("%")!==-1&&(kt.x=0,kt.xPercent=Gt(fe.x,xe.xPercent)),typeof fe.y=="string"&&fe.y.indexOf("%")!==-1&&(kt.y=0,kt.yPercent=Gt(fe.y,xe.yPercent)),kt.rotation=qt("rotation"in fe?fe.rotation:"shortRotation"in fe?fe.shortRotation+"_short":xe.rotation,xe.rotation,"rotation",mi),vr&&(kt.rotationX=qt("rotationX"in fe?fe.rotationX:"shortRotationX"in fe?fe.shortRotationX+"_short":xe.rotationX||0,xe.rotationX,"rotationX",mi),kt.rotationY=qt("rotationY"in fe?fe.rotationY:"shortRotationY"in fe?fe.shortRotationY+"_short":xe.rotationY||0,xe.rotationY,"rotationY",mi)),kt.skewX=qt(fe.skewX,xe.skewX),kt.skewY=qt(fe.skewY,xe.skewY)}for(vr&&fe.force3D!=null&&(xe.force3D=fe.force3D,se=!0),he=xe.force3D||xe.z||xe.rotationX||xe.rotationY||kt.z||kt.rotationX||kt.rotationY||kt.perspective,he||fe.scale==null||(kt.scaleZ=1);--Fe>-1;)He=Vl[Fe],Re=kt[He]-xe[He],(Re>_e||-_e>Re||fe[He]!=null||Nt[He]!=null)&&(se=!0,j=new bi(xe,He,xe[He],Re,j),He in mi&&(j.e=mi[He]),j.xs0=0,j.plugin=St,at._overwriteProps.push(j.n));return Re=fe.transformOrigin,xe.svg&&(Re||fe.svgOrigin)&&(ye=xe.xOffset,ue=xe.yOffset,oa(V,nt(Re),kt,fe.svgOrigin,fe.smoothOrigin),j=qr(xe,"xOrigin",(ci?xe:kt).xOrigin,kt.xOrigin,j,Le),j=qr(xe,"yOrigin",(ci?xe:kt).yOrigin,kt.yOrigin,j,Le),(ye!==xe.xOffset||ue!==xe.yOffset)&&(j=qr(xe,"xOffset",ci?ye:xe.xOffset,xe.xOffset,j,Le),j=qr(xe,"yOffset",ci?ue:xe.yOffset,xe.yOffset,j,Le)),Re="0px 0px"),(Re||vr&&he&&xe.zOrigin)&&(Mn?(se=!0,He=gs,Re=(Re||dt(V,He,d,!1,"50% 50%"))+"",j=new bi(Be,He,0,0,j,-1,Le),j.b=Be[He],j.plugin=St,vr?(Mt=xe.zOrigin,Re=Re.split(" "),xe.zOrigin=(Re.length>2&&(Mt===0||Re[2]!=="0px")?parseFloat(Re[2]):Mt)||0,j.xs0=j.e=Re[0]+" "+(Re[1]||"50%")+" 0px",j=new bi(xe,"zOrigin",0,0,j,-1,j.n),j.b=Mt,j.xs0=j.e=xe.zOrigin):j.xs0=j.e=Re):nt(Re+"",xe)),se&&(at._transformType=xe.svg&&ao||!he&&this._transformType!==3?2:3),Ot&&(ht[lt]=Ot),Ht&&(ht.scale=Ht),j},prefix:!0}),zi("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),zi("borderRadius",{defaultValue:"0px",parser:function(V,tt,lt,at,j,St){tt=this.format(tt);var ht,Ot,Ht,kt,Mt,he,se,te,ye,ue,je,He,ci,Be,_e,Fe,fe=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],mi=V.style;for(ye=parseFloat(V.offsetWidth),ue=parseFloat(V.offsetHeight),ht=tt.split(" "),Ot=0;Ot<fe.length;Ot++)this.p.indexOf("border")&&(fe[Ot]=Jt(fe[Ot])),Mt=kt=dt(V,fe[Ot],d,!1,"0px"),Mt.indexOf(" ")!==-1&&(kt=Mt.split(" "),Mt=kt[0],kt=kt[1]),he=Ht=ht[Ot],se=parseFloat(Mt),He=Mt.substr((se+"").length),ci=he.charAt(1)==="=",ci?(te=parseInt(he.charAt(0)+"1",10),he=he.substr(2),te*=parseFloat(he),je=he.substr((te+"").length-(0>te?1:0))||""):(te=parseFloat(he),je=he.substr((te+"").length)),je===""&&(je=c[lt]||He),je!==He&&(Be=pt(V,"borderLeft",se,He),_e=pt(V,"borderTop",se,He),je==="%"?(Mt=Be/ye*100+"%",kt=_e/ue*100+"%"):je==="em"?(Fe=pt(V,"borderLeft",1,"em"),Mt=Be/Fe+"em",kt=_e/Fe+"em"):(Mt=Be+"px",kt=_e+"px"),ci&&(he=parseFloat(Mt)+te+je,Ht=parseFloat(kt)+te+je)),j=sr(mi,fe[Ot],Mt+" "+kt,he+" "+Ht,!1,"0px",j);return j},prefix:!0,formatter:yi("0px 0px 0px 0px",!1,!0)}),zi("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(V,tt,lt,at,j,St){return sr(V.style,lt,this.format(dt(V,lt,d,!1,"0px 0px")),this.format(tt),!1,"0px",j)},prefix:!0,formatter:yi("0px 0px",!1,!0)}),zi("backgroundPosition",{defaultValue:"0 0",parser:function(V,tt,lt,at,j,St){var ht,Ot,Ht,kt,Mt,he,se="background-position",te=d||jt(V,null),ye=this.format((te?E?te.getPropertyValue(se+"-x")+" "+te.getPropertyValue(se+"-y"):te.getPropertyValue(se):V.currentStyle.backgroundPositionX+" "+V.currentStyle.backgroundPositionY)||"0 0"),ue=this.format(tt);if(ye.indexOf("%")!==-1!=(ue.indexOf("%")!==-1)&&ue.split(",").length<2&&(he=dt(V,"backgroundImage").replace(_t,""),he&&he!=="none")){for(ht=ye.split(" "),Ot=ue.split(" "),Si.setAttribute("src",he),Ht=2;--Ht>-1;)ye=ht[Ht],kt=ye.indexOf("%")!==-1,kt!==(Ot[Ht].indexOf("%")!==-1)&&(Mt=Ht===0?V.offsetWidth-Si.width:V.offsetHeight-Si.height,ht[Ht]=kt?parseFloat(ye)/100*Mt+"px":parseFloat(ye)/Mt*100+"%");ye=ht.join(" ")}return this.parseComplex(V.style,ye,ue,j,St)},formatter:nt}),zi("backgroundSize",{defaultValue:"0 0",formatter:function(V){return V+="",V.substr(0,2)==="co"?V:nt(V.indexOf(" ")===-1?V+" "+V:V)}}),zi("perspective",{defaultValue:"0px",prefix:!0}),zi("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),zi("transformStyle",{prefix:!0}),zi("backfaceVisibility",{prefix:!0}),zi("userSelect",{prefix:!0}),zi("margin",{parser:Ei("marginTop,marginRight,marginBottom,marginLeft")}),zi("padding",{parser:Ei("paddingTop,paddingRight,paddingBottom,paddingLeft")}),zi("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(V,tt,lt,at,j,St){var ht,Ot,Ht;return 9>E?(Ot=V.currentStyle,Ht=8>E?" ":",",ht="rect("+Ot.clipTop+Ht+Ot.clipRight+Ht+Ot.clipBottom+Ht+Ot.clipLeft+")",tt=this.format(tt).split(",").join(Ht)):(ht=this.format(dt(V,this.p,d,!1,this.dflt)),tt=this.format(tt)),this.parseComplex(V.style,ht,tt,j,St)}}),zi("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),zi("autoRound,strictUnits",{parser:function(V,tt,lt,at,j){return j}}),zi("border",{defaultValue:"0px solid #000",parser:function(V,tt,lt,at,j,St){var ht=dt(V,"borderTopWidth",d,!1,"0px"),Ot=this.format(tt).split(" "),Ht=Ot[0].replace(N,"");return Ht!=="px"&&(ht=parseFloat(ht)/pt(V,"borderTopWidth",1,Ht)+Ht),this.parseComplex(V.style,this.format(ht+" "+dt(V,"borderTopStyle",d,!1,"solid")+" "+dt(V,"borderTopColor",d,!1,"#000")),Ot.join(" "),j,St)},color:!0,formatter:function(V){var tt=V.split(" ");return tt[0]+" "+(tt[1]||"solid")+" "+(V.match(we)||["#000"])[0]}}),zi("borderWidth",{parser:Ei("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),zi("float,cssFloat,styleFloat",{parser:function(V,tt,lt,at,j,St){var ht=V.style,Ot="cssFloat"in ht?"cssFloat":"styleFloat";return new bi(ht,Ot,0,0,j,-1,lt,!1,0,ht[Ot],tt)}});var Dh=function(V){var tt,lt=this.t,at=lt.filter||dt(this.data,"filter")||"",j=this.s+this.c*V|0;j===100&&(at.indexOf("atrix(")===-1&&at.indexOf("radient(")===-1&&at.indexOf("oader(")===-1?(lt.removeAttribute("filter"),tt=!dt(this.data,"filter")):(lt.filter=at.replace(Z,""),tt=!0)),tt||(this.xn1&&(lt.filter=at=at||"alpha(opacity="+j+")"),at.indexOf("pacity")===-1?j===0&&this.xn1||(lt.filter=at+" alpha(opacity="+j+")"):lt.filter=at.replace(X,"opacity="+j))};zi("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(V,tt,lt,at,j,St){var ht=parseFloat(dt(V,"opacity",d,!1,"1")),Ot=V.style,Ht=lt==="autoAlpha";return typeof tt=="string"&&tt.charAt(1)==="="&&(tt=(tt.charAt(0)==="-"?-1:1)*parseFloat(tt.substr(2))+ht),Ht&&ht===1&&dt(V,"visibility",d)==="hidden"&&tt!==0&&(ht=0),pi?j=new bi(Ot,"opacity",ht,tt-ht,j):(j=new bi(Ot,"opacity",100*ht,100*(tt-ht),j),j.xn1=Ht?1:0,Ot.zoom=1,j.type=2,j.b="alpha(opacity="+j.s+")",j.e="alpha(opacity="+(j.s+j.c)+")",j.data=V,j.plugin=St,j.setRatio=Dh),Ht&&(j=new bi(Ot,"visibility",0,0,j,-1,null,!1,0,ht!==0?"inherit":"hidden",tt===0?"hidden":"inherit"),j.xs0="inherit",at._overwriteProps.push(j.n),at._overwriteProps.push(lt)),j}});var vs=function(V,tt){tt&&(V.removeProperty?((tt.substr(0,2)==="ms"||tt.substr(0,6)==="webkit")&&(tt="-"+tt),V.removeProperty(tt.replace(Rt,"-$1").toLowerCase())):V.removeAttribute(tt))},ys=function(V){if(this.t._gsClassPT=this,V===1||V===0){this.t.setAttribute("class",V===0?this.b:this.e);for(var tt=this.data,lt=this.t.style;tt;)tt.v?lt[tt.p]=tt.v:vs(lt,tt.p),tt=tt._next;V===1&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};zi("className",{parser:function(V,tt,lt,at,j,St,ht){var Ot,Ht,kt,Mt,he,se=V.getAttribute("class")||"",te=V.style.cssText;if(j=at._classNamePT=new bi(V,lt,0,0,j,2),j.setRatio=ys,j.pr=-11,s=!0,j.b=se,Ht=ie(V,d),kt=V._gsClassPT){for(Mt={},he=kt.data;he;)Mt[he.p]=1,he=he._next;kt.setRatio(1)}return V._gsClassPT=j,j.e=tt.charAt(1)!=="="?tt:se.replace(new RegExp("(?:\\s|^)"+tt.substr(2)+"(?![\\w-])"),"")+(tt.charAt(0)==="+"?" "+tt.substr(2):""),V.setAttribute("class",j.e),Ot=Kt(V,Ht,ie(V),ht,Mt),V.setAttribute("class",se),j.data=Ot.firstMPT,V.style.cssText=te,j=j.xfirst=at.parse(V,Ot.difs,j,St)}});var Xl=function(V){if((V===1||V===0)&&this.data._totalTime===this.data._totalDuration&&this.data.data!=="isFromStart"){var tt,lt,at,j,St,ht=this.t.style,Ot=_.transform.parse;if(this.e==="all")ht.cssText="",j=!0;else for(tt=this.e.split(" ").join("").split(","),at=tt.length;--at>-1;)lt=tt[at],_[lt]&&(_[lt].parse===Ot?j=!0:lt=lt==="transformOrigin"?gs:_[lt].p),vs(ht,lt);j&&(vs(ht,Mn),St=this.t._gsTransform,St&&(St.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(zi("clearProps",{parser:function(V,tt,lt,at,j){return j=new bi(V,lt,0,0,j,2),j.setRatio=Xl,j.e=tt,j.pr=-10,j.data=at._tween,s=!0,j}}),S="bezier,throwProps,physicsProps,physics2D".split(","),sn=S.length;sn--;)qo(S[sn]);S=m.prototype,S._firstPT=S._lastParsedTransform=S._transform=null,S._onInitTween=function(V,tt,lt,at){if(!V.nodeType)return!1;this._target=L=V,this._tween=lt,this._vars=tt,T=at,b=tt.autoRound,s=!1,c=tt.suffixMap||m.suffixMap,d=jt(V,""),u=this._overwriteProps;var j,St,ht,Ot,Ht,kt,Mt,he,se,te=V.style;if(I&&te.zIndex===""&&(j=dt(V,"zIndex",d),(j==="auto"||j==="")&&this._addLazySet(te,"zIndex",0)),typeof tt=="string"&&(Ot=te.cssText,j=ie(V,d),te.cssText=Ot+";"+tt,j=Kt(V,j,ie(V)).difs,!pi&&K.test(tt)&&(j.opacity=parseFloat(RegExp.$1)),tt=j,te.cssText=Ot),tt.className?this._firstPT=St=_.className.parse(V,tt.className,"className",this,null,null,tt):this._firstPT=St=this.parse(V,tt,null),this._transformType){for(se=this._transformType===3,Mn?k&&(I=!0,te.zIndex===""&&(Mt=dt(V,"zIndex",d),(Mt==="auto"||Mt==="")&&this._addLazySet(te,"zIndex",0)),F&&this._addLazySet(te,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(se?"visible":"hidden"))):te.zoom=1,ht=St;ht&&ht._next;)ht=ht._next;he=new bi(V,"transform",0,0,null,2),this._linkCSSP(he,null,ht),he.setRatio=Mn?Ih:jl,he.data=this._transform||uo(V,d,!0),he.tween=lt,he.pr=-1,u.pop()}if(s){for(;St;){for(kt=St._next,ht=Ot;ht&&ht.pr>St.pr;)ht=ht._next;(St._prev=ht?ht._prev:Ht)?St._prev._next=St:Ot=St,(St._next=ht)?ht._prev=St:Ht=St,St=kt}this._firstPT=Ot}return!0},S.parse=function(V,tt,lt,at){var j,St,ht,Ot,Ht,kt,Mt,he,se,te,ye=V.style;for(j in tt){if(kt=tt[j],typeof kt=="function"&&(kt=kt(T,L)),St=_[j])lt=St.parse(V,kt,j,this,lt,at,tt);else{if(j.substr(0,2)==="--"){this._tween._propLookup[j]=this._addTween.call(this._tween,V.style,"setProperty",jt(V).getPropertyValue(j)+"",kt+"",j,!1,j);continue}Ht=dt(V,j,d)+"",se=typeof kt=="string",j==="color"||j==="fill"||j==="stroke"||j.indexOf("Color")!==-1||se&&ct.test(kt)?(se||(kt=Ie(kt),kt=(kt.length>3?"rgba(":"rgb(")+kt.join(",")+")"),lt=sr(ye,j,Ht,kt,!0,"transparent",lt,0,at)):se&&re.test(kt)?lt=sr(ye,j,Ht,kt,!0,null,lt,0,at):(ht=parseFloat(Ht),Mt=ht||ht===0?Ht.substr((ht+"").length):"",(Ht===""||Ht==="auto")&&(j==="width"||j==="height"?(ht=st(V,j,d),Mt="px"):j==="left"||j==="top"?(ht=Dt(V,j,d),Mt="px"):(ht=j!=="opacity"?0:1,Mt="")),te=se&&kt.charAt(1)==="=",te?(Ot=parseInt(kt.charAt(0)+"1",10),kt=kt.substr(2),Ot*=parseFloat(kt),he=kt.replace(N,"")):(Ot=parseFloat(kt),he=se?kt.replace(N,""):""),he===""&&(he=j in c?c[j]:Mt),kt=Ot||Ot===0?(te?Ot+ht:Ot)+he:tt[j],Mt!==he&&(he!==""||j==="lineHeight")&&(Ot||Ot===0)&&ht&&(ht=pt(V,j,ht,Mt),he==="%"?(ht/=pt(V,j,100,"%")/100,tt.strictUnits!==!0&&(Ht=ht+"%")):he==="em"||he==="rem"||he==="vw"||he==="vh"?ht/=pt(V,j,1,he):he!=="px"&&(Ot=pt(V,j,Ot,he),he="px"),te&&(Ot||Ot===0)&&(kt=Ot+ht+he)),te&&(Ot+=ht),!ht&&ht!==0||!Ot&&Ot!==0?ye[j]!==void 0&&(kt||kt+""!="NaN"&&kt!=null)?(lt=new bi(ye,j,Ot||ht||0,0,lt,-1,j,!1,0,Ht,kt),lt.xs0=kt!=="none"||j!=="display"&&j.indexOf("Style")===-1?kt:Ht):mn("invalid "+j+" tween value: "+tt[j]):(lt=new bi(ye,j,ht,Ot-ht,lt,0,j,b!==!1&&(he==="px"||j==="zIndex"),0,Ht,kt),lt.xs0=he))}at&&lt&&!lt.plugin&&(lt.plugin=at)}return lt},S.setRatio=function(V){var tt,lt,at,j=this._firstPT,St=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(;j;){if(tt=j.c*V+j.s,j.r?tt=j.r(tt):St>tt&&tt>-St&&(tt=0),j.type)if(j.type===1)if(at=j.l,at===2)j.t[j.p]=j.xs0+tt+j.xs1+j.xn1+j.xs2;else if(at===3)j.t[j.p]=j.xs0+tt+j.xs1+j.xn1+j.xs2+j.xn2+j.xs3;else if(at===4)j.t[j.p]=j.xs0+tt+j.xs1+j.xn1+j.xs2+j.xn2+j.xs3+j.xn3+j.xs4;else if(at===5)j.t[j.p]=j.xs0+tt+j.xs1+j.xn1+j.xs2+j.xn2+j.xs3+j.xn3+j.xs4+j.xn4+j.xs5;else{for(lt=j.xs0+tt+j.xs1,at=1;at<j.l;at++)lt+=j["xn"+at]+j["xs"+(at+1)];j.t[j.p]=lt}else j.type===-1?j.t[j.p]=j.xs0:j.setRatio&&j.setRatio(V);else j.t[j.p]=tt+j.xs0;j=j._next}else for(;j;)j.type!==2?j.t[j.p]=j.b:j.setRatio(V),j=j._next;else for(;j;){if(j.type!==2)if(j.r&&j.type!==-1)if(tt=j.r(j.s+j.c),j.type){if(j.type===1){for(at=j.l,lt=j.xs0+tt+j.xs1,at=1;at<j.l;at++)lt+=j["xn"+at]+j["xs"+(at+1)];j.t[j.p]=lt}}else j.t[j.p]=tt+j.xs0;else j.t[j.p]=j.e;else j.setRatio(V);j=j._next}},S._enableTransforms=function(V){this._transform=this._transform||uo(this._target,d,!0),this._transformType=this._transform.svg&&ao||!V&&this._transformType!==3?2:3};var ql=function(V){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};S._addLazySet=function(V,tt,lt){var at=this._firstPT=new bi(V,tt,0,0,this._firstPT,2);at.e=lt,at.setRatio=ql,at.data=this},S._linkCSSP=function(V,tt,lt,at){return V&&(tt&&(tt._prev=V),V._next&&(V._next._prev=V._prev),V._prev?V._prev._next=V._next:this._firstPT===V&&(this._firstPT=V._next,at=!0),lt?lt._next=V:at||this._firstPT!==null||(this._firstPT=V),V._next=tt,V._prev=lt),V},S._mod=function(V){for(var tt=this._firstPT;tt;)typeof V[tt.p]=="function"&&(tt.r=V[tt.p]),tt=tt._next},S._kill=function(V){var tt,lt,at,j=V;if(V.autoAlpha||V.alpha){j={};for(lt in V)j[lt]=V[lt];j.opacity=1,j.autoAlpha&&(j.visibility=1)}for(V.className&&(tt=this._classNamePT)&&(at=tt.xfirst,at&&at._prev?this._linkCSSP(at._prev,tt._next,at._prev._prev):at===this._firstPT&&(this._firstPT=tt._next),tt._next&&this._linkCSSP(tt._next,tt._next._next,at._prev),this._classNamePT=null),tt=this._firstPT;tt;)tt.plugin&&tt.plugin!==lt&&tt.plugin._kill&&(tt.plugin._kill(V),lt=tt.plugin),tt=tt._next;return x.prototype._kill.call(this,j)};var Yr=function(V,tt,lt){var at,j,St,ht;if(V.slice)for(j=V.length;--j>-1;)Yr(V[j],tt,lt);else for(at=V.childNodes,j=at.length;--j>-1;)St=at[j],ht=St.type,St.style&&(tt.push(ie(St)),lt&&lt.push(St)),ht!==1&&ht!==9&&ht!==11||!St.childNodes.length||Yr(St,tt,lt)};return m.cascadeTo=function(V,tt,lt){var at,j,St,ht,Ot=a.to(V,tt,lt),Ht=[Ot],kt=[],Mt=[],he=[],se=a._internals.reservedProps;for(V=Ot._targets||Ot.target,Yr(V,kt,he),Ot.render(tt,!0,!0),Yr(V,Mt),Ot.render(0,!0,!0),Ot._enabled(!0),at=he.length;--at>-1;)if(j=Kt(he[at],kt[at],Mt[at]),j.firstMPT){j=j.difs;for(St in lt)se[St]&&(j[St]=lt[St]);ht={};for(St in j)ht[St]=kt[at][St];Ht.push(a.fromTo(he[at],tt,ht,j))}return Ht},x.activate([m]),m},!0),function(){var x=ln._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(d,u,m){return this._tween=m,!0}}),a=function(d){var u=1>d?Math.pow(10,(d+"").length-2):1;return function(m){return(Math.round(m/d)*d*u|0)/u}},s=function(d,u){for(;d;)d.f||d.blob||(d.m=u||Math.round),d=d._next},c=x.prototype;c._onInitAllProps=function(){var d,u,m,g,_=this._tween,S=_.vars.roundProps,b={},I=_._propLookup.roundProps;if(typeof S!="object"||S.push)for(typeof S=="string"&&(S=S.split(",")),m=S.length;--m>-1;)b[S[m]]=Math.round;else for(g in S)b[g]=a(S[g]);for(g in b)for(d=_._firstPT;d;)u=d._next,d.pg?d.t._mod(b):d.n===g&&(d.f===2&&d.t?s(d.t._firstPT,b[g]):(this._add(d.t,g,d.s,d.c,b[g]),u&&(u._prev=d._prev),d._prev?d._prev._next=u:_._firstPT===d&&(_._firstPT=u),d._next=d._prev=null,_._propLookup[g]=I)),d=u;return!1},c._add=function(d,u,m,g,_){this._addTween(d,u,m,m+g,u,_||Math.round),this._overwriteProps.push(u)}}(),function(){ln._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(x,a,s,c){var d,u;if(typeof x.setAttribute!="function")return!1;for(d in a)u=a[d],typeof u=="function"&&(u=u(c,x)),this._addTween(x,"setAttribute",x.getAttribute(d)+"",u+"",d,!1,d),this._overwriteProps.push(d);return!0}})}(),ln._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(x,a,s,c){typeof a!="object"&&(a={rotation:a}),this.finals={};var d,u,m,g,_,S,b=a.useRadians===!0?2*Math.PI:360,I=1e-6;for(d in a)d!=="useRadians"&&(g=a[d],typeof g=="function"&&(g=g(c,x)),S=(g+"").split("_"),u=S[0],m=parseFloat(typeof x[d]!="function"?x[d]:x[d.indexOf("set")||typeof x["get"+d.substr(3)]!="function"?d:"get"+d.substr(3)]()),g=this.finals[d]=typeof u=="string"&&u.charAt(1)==="="?m+parseInt(u.charAt(0)+"1",10)*Number(u.substr(2)):Number(u)||0,_=g-m,S.length&&(u=S.join("_"),u.indexOf("short")!==-1&&(_%=b,_!==_%(b/2)&&(_=0>_?_+b:_-b)),u.indexOf("_cw")!==-1&&0>_?_=(_+9999999999*b)%b-(_/b|0)*b:u.indexOf("ccw")!==-1&&_>0&&(_=(_-9999999999*b)%b-(_/b|0)*b)),(_>I||-I>_)&&(this._addTween(x,d,m,m+_,d),this._overwriteProps.push(d)));return!0},set:function(x){var a;if(x!==1)this._super.setRatio.call(this,x);else for(a=this._firstPT;a;)a.f?a.t[a.p](this.finals[a.p]):a.t[a.p]=this.finals[a.p],a=a._next}})._autoCSS=!0,ln._gsDefine("easing.Back",["easing.Ease"],function(x){var a,s,c,d,u=ln.GreenSockGlobals||ln,m=u.com.greensock,g=2*Math.PI,_=Math.PI/2,S=m._class,b=function(M,R){var C=S("easing."+M,function(){},!0),U=C.prototype=new x;return U.constructor=C,U.getRatio=R,C},I=x.register||function(){},k=function(M,R,C,U,N){var X=S("easing."+M,{easeOut:new R,easeIn:new C,easeInOut:new U},!0);return I(X,M),X},D=function(M,R,C){this.t=M,this.v=R,C&&(this.next=C,C.prev=this,this.c=C.v-R,this.gap=C.t-M)},F=function(M,R){var C=S("easing."+M,function(N){this._p1=N||N===0?N:1.70158,this._p2=1.525*this._p1},!0),U=C.prototype=new x;return U.constructor=C,U.getRatio=R,U.config=function(N){return new C(N)},C},E=k("Back",F("BackOut",function(M){return(M-=1)*M*((this._p1+1)*M+this._p1)+1}),F("BackIn",function(M){return M*M*((this._p1+1)*M-this._p1)}),F("BackInOut",function(M){return(M*=2)<1?.5*M*M*((this._p2+1)*M-this._p2):.5*((M-=2)*M*((this._p2+1)*M+this._p2)+2)})),L=S("easing.SlowMo",function(M,R,C){R=R||R===0?R:.7,M==null?M=.7:M>1&&(M=1),this._p=M!==1?R:0,this._p1=(1-M)/2,this._p2=M,this._p3=this._p1+this._p2,this._calcEnd=C===!0},!0),T=L.prototype=new x;return T.constructor=L,T.getRatio=function(M){var R=M+(.5-M)*this._p;return M<this._p1?this._calcEnd?1-(M=1-M/this._p1)*M:R-(M=1-M/this._p1)*M*M*M*R:M>this._p3?this._calcEnd?M===1?0:1-(M=(M-this._p3)/this._p1)*M:R+(M-R)*(M=(M-this._p3)/this._p1)*M*M*M:this._calcEnd?1:R},L.ease=new L(.7,.7),T.config=L.config=function(M,R,C){return new L(M,R,C)},a=S("easing.SteppedEase",function(M,R){M=M||1,this._p1=1/M,this._p2=M+(R?0:1),this._p3=R?1:0},!0),T=a.prototype=new x,T.constructor=a,T.getRatio=function(M){return 0>M?M=0:M>=1&&(M=.999999999),((this._p2*M|0)+this._p3)*this._p1},T.config=a.config=function(M,R){return new a(M,R)},s=S("easing.ExpoScaleEase",function(M,R,C){this._p1=Math.log(R/M),this._p2=R-M,this._p3=M,this._ease=C},!0),T=s.prototype=new x,T.constructor=s,T.getRatio=function(M){return this._ease&&(M=this._ease.getRatio(M)),(this._p3*Math.exp(this._p1*M)-this._p3)/this._p2},T.config=s.config=function(M,R,C){return new s(M,R,C)},c=S("easing.RoughEase",function(M){M=M||{};for(var R,C,U,N,X,K,Z=M.taper||"none",ct=[],Rt=0,et=0|(M.points||20),_t=et,G=M.randomize!==!1,Pt=M.clamp===!0,Et=M.template instanceof x?M.template:null,At=typeof M.strength=="number"?.4*M.strength:.4;--_t>-1;)R=G?Math.random():1/et*_t,C=Et?Et.getRatio(R):R,Z==="none"?U=At:Z==="out"?(N=1-R,U=N*N*At):Z==="in"?U=R*R*At:.5>R?(N=2*R,U=N*N*.5*At):(N=2*(1-R),U=N*N*.5*At),G?C+=Math.random()*U-.5*U:_t%2?C+=.5*U:C-=.5*U,Pt&&(C>1?C=1:0>C&&(C=0)),ct[Rt++]={x:R,y:C};for(ct.sort(function(ce,re){return ce.x-re.x}),K=new D(1,1,null),_t=et;--_t>-1;)X=ct[_t],K=new D(X.x,X.y,K);this._prev=new D(0,0,K.t!==0?K:K.next)},!0),T=c.prototype=new x,T.constructor=c,T.getRatio=function(M){var R=this._prev;if(M>R.t){for(;R.next&&M>=R.t;)R=R.next;R=R.prev}else for(;R.prev&&M<=R.t;)R=R.prev;return this._prev=R,R.v+(M-R.t)/R.gap*R.c},T.config=function(M){return new c(M)},c.ease=new c,k("Bounce",b("BounceOut",function(M){return 1/2.75>M?7.5625*M*M:2/2.75>M?7.5625*(M-=1.5/2.75)*M+.75:2.5/2.75>M?7.5625*(M-=2.25/2.75)*M+.9375:7.5625*(M-=2.625/2.75)*M+.984375}),b("BounceIn",function(M){return(M=1-M)<1/2.75?1-7.5625*M*M:2/2.75>M?1-(7.5625*(M-=1.5/2.75)*M+.75):2.5/2.75>M?1-(7.5625*(M-=2.25/2.75)*M+.9375):1-(7.5625*(M-=2.625/2.75)*M+.984375)}),b("BounceInOut",function(M){var R=.5>M;return M=R?1-2*M:2*M-1,M=1/2.75>M?7.5625*M*M:2/2.75>M?7.5625*(M-=1.5/2.75)*M+.75:2.5/2.75>M?7.5625*(M-=2.25/2.75)*M+.9375:7.5625*(M-=2.625/2.75)*M+.984375,R?.5*(1-M):.5*M+.5})),k("Circ",b("CircOut",function(M){return Math.sqrt(1-(M-=1)*M)}),b("CircIn",function(M){return-(Math.sqrt(1-M*M)-1)}),b("CircInOut",function(M){return(M*=2)<1?-.5*(Math.sqrt(1-M*M)-1):.5*(Math.sqrt(1-(M-=2)*M)+1)})),d=function(M,R,C){var U=S("easing."+M,function(X,K){this._p1=X>=1?X:1,this._p2=(K||C)/(1>X?X:1),this._p3=this._p2/g*(Math.asin(1/this._p1)||0),this._p2=g/this._p2},!0),N=U.prototype=new x;return N.constructor=U,N.getRatio=R,N.config=function(X,K){return new U(X,K)},U},k("Elastic",d("ElasticOut",function(M){return this._p1*Math.pow(2,-10*M)*Math.sin((M-this._p3)*this._p2)+1},.3),d("ElasticIn",function(M){return-(this._p1*Math.pow(2,10*(M-=1))*Math.sin((M-this._p3)*this._p2))},.3),d("ElasticInOut",function(M){return(M*=2)<1?-.5*(this._p1*Math.pow(2,10*(M-=1))*Math.sin((M-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(M-=1))*Math.sin((M-this._p3)*this._p2)*.5+1},.45)),k("Expo",b("ExpoOut",function(M){return 1-Math.pow(2,-10*M)}),b("ExpoIn",function(M){return Math.pow(2,10*(M-1))-.001}),b("ExpoInOut",function(M){return(M*=2)<1?.5*Math.pow(2,10*(M-1)):.5*(2-Math.pow(2,-10*(M-1)))})),k("Sine",b("SineOut",function(M){return Math.sin(M*_)}),b("SineIn",function(M){return-Math.cos(M*_)+1}),b("SineInOut",function(M){return-.5*(Math.cos(Math.PI*M)-1)})),S("easing.EaseLookup",{find:function(M){return x.map[M]}},!0),I(u.SlowMo,"SlowMo","ease,"),I(c,"RoughEase","ease,"),I(a,"SteppedEase","ease,"),E},!0)}),ln._gsDefine&&ln._gsQueue.pop()(),function(x,a){var s={},c=x.document,d=x.GreenSockGlobals=x.GreenSockGlobals||x,u=d[a];if(u)return typeof module<"u"&&module.exports&&(module.exports=u),u;var m,g,_,S,b,I=function(z){var Q,st=z.split("."),nt=d;for(Q=0;Q<st.length;Q++)nt[st[Q]]=nt=nt[st[Q]]||{};return nt},k=I("com.greensock"),D=1e-10,F=function(z){var Q,st=[],nt=z.length;for(Q=0;Q!==nt;st.push(z[Q++]));return st},E=function(){},L=function(){var z=Object.prototype.toString,Q=z.call([]);return function(st){return st!=null&&(st instanceof Array||typeof st=="object"&&!!st.push&&z.call(st)===Q)}}(),T={},M=function(z,Q,st,nt){this.sc=T[z]?T[z].sc:[],T[z]=this,this.gsClass=null,this.func=st;var vt=[];this.check=function(Gt){for(var qt,Xt,Ne,Ie,ge=Q.length,we=ge;--ge>-1;)(qt=T[Q[ge]]||new M(Q[ge],[])).gsClass?(vt[ge]=qt.gsClass,we--):Gt&&qt.sc.push(this);if(we===0&&st){if(Xt=("com.greensock."+z).split("."),Ne=Xt.pop(),Ie=I(Xt.join("."))[Ne]=this.gsClass=st.apply(st,vt),nt)if(d[Ne]=s[Ne]=Ie,typeof module<"u"&&module.exports)if(z===a){module.exports=s[a]=Ie;for(ge in s)Ie[ge]=s[ge]}else s[a]&&(s[a][Ne]=Ie);else typeof define=="function"&&define.amd&&define((x.GreenSockAMDPath?x.GreenSockAMDPath+"/":"")+z.split(".").pop(),[],function(){return Ie});for(ge=0;ge<this.sc.length;ge++)this.sc[ge].check()}},this.check(!0)},R=x._gsDefine=function(z,Q,st,nt){return new M(z,Q,st,nt)},C=k._class=function(z,Q,st){return Q=Q||function(){},R(z,[],function(){return Q},st),Q};R.globals=d;var U=[0,0,1,1],N=C("easing.Ease",function(z,Q,st,nt){this._func=z,this._type=st||0,this._power=nt||0,this._params=Q?U.concat(Q):U},!0),X=N.map={},K=N.register=function(z,Q,st,nt){for(var vt,Gt,qt,Xt,Ne=Q.split(","),Ie=Ne.length,ge=(st||"easeIn,easeOut,easeInOut").split(",");--Ie>-1;)for(Gt=Ne[Ie],vt=nt?C("easing."+Gt,null,!0):k.easing[Gt]||{},qt=ge.length;--qt>-1;)Xt=ge[qt],X[Gt+"."+Xt]=X[Xt+Gt]=vt[Xt]=z.getRatio?z:z[Xt]||new z};for(_=N.prototype,_._calcEnd=!1,_.getRatio=function(z){if(this._func)return this._params[0]=z,this._func.apply(null,this._params);var Q=this._type,st=this._power,nt=Q===1?1-z:Q===2?z:.5>z?2*z:2*(1-z);return st===1?nt*=nt:st===2?nt*=nt*nt:st===3?nt*=nt*nt*nt:st===4&&(nt*=nt*nt*nt*nt),Q===1?1-nt:Q===2?nt:.5>z?nt/2:1-nt/2},m=["Linear","Quad","Cubic","Quart","Quint,Strong"],g=m.length;--g>-1;)_=m[g]+",Power"+g,K(new N(null,null,1,g),_,"easeOut",!0),K(new N(null,null,2,g),_,"easeIn"+(g===0?",easeNone":"")),K(new N(null,null,3,g),_,"easeInOut");X.linear=k.easing.Linear.easeIn,X.swing=k.easing.Quad.easeInOut;var Z=C("events.EventDispatcher",function(z){this._listeners={},this._eventTarget=z||this});_=Z.prototype,_.addEventListener=function(z,Q,st,nt,vt){vt=vt||0;var Gt,qt,Xt=this._listeners[z],Ne=0;for(this!==S||b||S.wake(),Xt==null&&(this._listeners[z]=Xt=[]),qt=Xt.length;--qt>-1;)Gt=Xt[qt],Gt.c===Q&&Gt.s===st?Xt.splice(qt,1):Ne===0&&Gt.pr<vt&&(Ne=qt+1);Xt.splice(Ne,0,{c:Q,s:st,up:nt,pr:vt})},_.removeEventListener=function(z,Q){var st,nt=this._listeners[z];if(nt){for(st=nt.length;--st>-1;)if(nt[st].c===Q)return void nt.splice(st,1)}},_.dispatchEvent=function(z){var Q,st,nt,vt=this._listeners[z];if(vt)for(Q=vt.length,Q>1&&(vt=vt.slice(0)),st=this._eventTarget;--Q>-1;)nt=vt[Q],nt&&(nt.up?nt.c.call(nt.s||st,{type:z,target:st}):nt.c.call(nt.s||st))};var ct=x.requestAnimationFrame,Rt=x.cancelAnimationFrame,et=Date.now||function(){return new Date().getTime()},_t=et();for(m=["ms","moz","webkit","o"],g=m.length;--g>-1&&!ct;)ct=x[m[g]+"RequestAnimationFrame"],Rt=x[m[g]+"CancelAnimationFrame"]||x[m[g]+"CancelRequestAnimationFrame"];C("Ticker",function(z,Q){var st,nt,vt,Gt,qt,Xt=this,Ne=et(),Ie=Q!==!1&&ct?"auto":!1,ge=500,we=33,yi="tick",Ei=function(ni){var bi,qr,sr=et()-_t;sr>ge&&(Ne+=sr-we),_t+=sr,Xt.time=(_t-Ne)/1e3,bi=Xt.time-qt,(!st||bi>0||ni===!0)&&(Xt.frame++,qt+=bi+(bi>=Gt?.004:Gt-bi),qr=!0),ni!==!0&&(vt=nt(Ei)),qr&&Xt.dispatchEvent(yi)};Z.call(Xt),Xt.time=Xt.frame=0,Xt.tick=function(){Ei(!0)},Xt.lagSmoothing=function(ni,bi){return arguments.length?(ge=ni||1/D,void(we=Math.min(bi,ge,0))):1/D>ge},Xt.sleep=function(){vt!=null&&(Ie&&Rt?Rt(vt):clearTimeout(vt),nt=E,vt=null,Xt===S&&(b=!1))},Xt.wake=function(ni){vt!==null?Xt.sleep():ni?Ne+=-_t+(_t=et()):Xt.frame>10&&(_t=et()-ge+5),nt=st===0?E:Ie&&ct?ct:function(bi){return setTimeout(bi,1e3*(qt-Xt.time)+1|0)},Xt===S&&(b=!0),Ei(2)},Xt.fps=function(ni){return arguments.length?(st=ni,Gt=1/(st||60),qt=this.time+Gt,void Xt.wake()):st},Xt.useRAF=function(ni){return arguments.length?(Xt.sleep(),Ie=ni,void Xt.fps(st)):Ie},Xt.fps(z),setTimeout(function(){Ie==="auto"&&Xt.frame<5&&(c||{}).visibilityState!=="hidden"&&Xt.useRAF(!1)},1500)}),_=k.Ticker.prototype=new k.events.EventDispatcher,_.constructor=k.Ticker;var G=C("core.Animation",function(z,Q){if(this.vars=Q=Q||{},this._duration=this._totalDuration=z||0,this._delay=Number(Q.delay)||0,this._timeScale=1,this._active=Q.immediateRender===!0,this.data=Q.data,this._reversed=Q.reversed===!0,W){b||S.wake();var st=this.vars.useFrames?Qi:W;st.add(this,st._time),this.vars.paused&&this.paused(!0)}});S=G.ticker=new k.Ticker,_=G.prototype,_._dirty=_._gc=_._initted=_._paused=!1,_._totalTime=_._time=0,_._rawPrevTime=-1,_._next=_._last=_._onUpdate=_._timeline=_.timeline=null,_._paused=!1;var Pt=function(){b&&et()-_t>2e3&&((c||{}).visibilityState!=="hidden"||!S.lagSmoothing())&&S.wake();var z=setTimeout(Pt,2e3);z.unref&&z.unref()};Pt(),_.play=function(z,Q){return z!=null&&this.seek(z,Q),this.reversed(!1).paused(!1)},_.pause=function(z,Q){return z!=null&&this.seek(z,Q),this.paused(!0)},_.resume=function(z,Q){return z!=null&&this.seek(z,Q),this.paused(!1)},_.seek=function(z,Q){return this.totalTime(Number(z),Q!==!1)},_.restart=function(z,Q){return this.reversed(!1).paused(!1).totalTime(z?-this._delay:0,Q!==!1,!0)},_.reverse=function(z,Q){return z!=null&&this.seek(z||this.totalDuration(),Q),this.reversed(!0).paused(!1)},_.render=function(z,Q,st){},_.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},_.isActive=function(){var z,Q=this._timeline,st=this._startTime;return!Q||!this._gc&&!this._paused&&Q.isActive()&&(z=Q.rawTime(!0))>=st&&z<st+this.totalDuration()/this._timeScale-1e-7},_._enabled=function(z,Q){return b||S.wake(),this._gc=!z,this._active=this.isActive(),Q!==!0&&(z&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!z&&this.timeline&&this._timeline._remove(this,!0)),!1},_._kill=function(z,Q){return this._enabled(!1,!1)},_.kill=function(z,Q){return this._kill(z,Q),this},_._uncache=function(z){for(var Q=z?this:this.timeline;Q;)Q._dirty=!0,Q=Q.timeline;return this},_._swapSelfInParams=function(z){for(var Q=z.length,st=z.concat();--Q>-1;)z[Q]==="{self}"&&(st[Q]=this);return st},_._callback=function(z){var Q=this.vars,st=Q[z],nt=Q[z+"Params"],vt=Q[z+"Scope"]||Q.callbackScope||this,Gt=nt?nt.length:0;switch(Gt){case 0:st.call(vt);break;case 1:st.call(vt,nt[0]);break;case 2:st.call(vt,nt[0],nt[1]);break;default:st.apply(vt,nt)}},_.eventCallback=function(z,Q,st,nt){if((z||"").substr(0,2)==="on"){var vt=this.vars;if(arguments.length===1)return vt[z];Q==null?delete vt[z]:(vt[z]=Q,vt[z+"Params"]=L(st)&&st.join("").indexOf("{self}")!==-1?this._swapSelfInParams(st):st,vt[z+"Scope"]=nt),z==="onUpdate"&&(this._onUpdate=Q)}return this},_.delay=function(z){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+z-this._delay),this._delay=z,this):this._delay},_.duration=function(z){return arguments.length?(this._duration=this._totalDuration=z,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&z!==0&&this.totalTime(this._totalTime*(z/this._duration),!0),this):(this._dirty=!1,this._duration)},_.totalDuration=function(z){return this._dirty=!1,arguments.length?this.duration(z):this._totalDuration},_.time=function(z,Q){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(z>this._duration?this._duration:z,Q)):this._time},_.totalTime=function(z,Q,st){if(b||S.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>z&&!st&&(z+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var nt=this._totalDuration,vt=this._timeline;if(z>nt&&!st&&(z=nt),this._startTime=(this._paused?this._pauseTime:vt._time)-(this._reversed?nt-z:z)/this._timeScale,vt._dirty||this._uncache(!1),vt._timeline)for(;vt._timeline;)vt._timeline._time!==(vt._startTime+vt._totalTime)/vt._timeScale&&vt.totalTime(vt._totalTime,!0),vt=vt._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==z||this._duration===0)&&(Ft.length&&jt(),this.render(z,Q,!1),Ft.length&&jt())}return this},_.progress=_.totalProgress=function(z,Q){var st=this.duration();return arguments.length?this.totalTime(st*z,Q):st?this._time/st:this.ratio},_.startTime=function(z){return arguments.length?(z!==this._startTime&&(this._startTime=z,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,z-this._delay)),this):this._startTime},_.endTime=function(z){return this._startTime+(z!=0?this.totalDuration():this.duration())/this._timeScale},_.timeScale=function(z){if(!arguments.length)return this._timeScale;var Q,st;for(z=z||D,this._timeline&&this._timeline.smoothChildTiming&&(Q=this._pauseTime,st=Q||Q===0?Q:this._timeline.totalTime(),this._startTime=st-(st-this._startTime)*this._timeScale/z),this._timeScale=z,st=this.timeline;st&&st.timeline;)st._dirty=!0,st.totalDuration(),st=st.timeline;return this},_.reversed=function(z){return arguments.length?(z!=this._reversed&&(this._reversed=z,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},_.paused=function(z){if(!arguments.length)return this._paused;var Q,st,nt=this._timeline;return z!=this._paused&&nt&&(b||z||S.wake(),Q=nt.rawTime(),st=Q-this._pauseTime,!z&&nt.smoothChildTiming&&(this._startTime+=st,this._uncache(!1)),this._pauseTime=z?Q:null,this._paused=z,this._active=this.isActive(),!z&&st!==0&&this._initted&&this.duration()&&(Q=nt.smoothChildTiming?this._totalTime:(Q-this._startTime)/this._timeScale,this.render(Q,Q===this._totalTime,!0))),this._gc&&!z&&this._enabled(!0,!1),this};var Et=C("core.SimpleTimeline",function(z){G.call(this,0,z),this.autoRemoveChildren=this.smoothChildTiming=!0});_=Et.prototype=new G,_.constructor=Et,_.kill()._gc=!1,_._first=_._last=_._recent=null,_._sortChildren=!1,_.add=_.insert=function(z,Q,st,nt){var vt,Gt;if(z._startTime=Number(Q||0)+z._delay,z._paused&&this!==z._timeline&&(z._pauseTime=this.rawTime()-(z._timeline.rawTime()-z._pauseTime)),z.timeline&&z.timeline._remove(z,!0),z.timeline=z._timeline=this,z._gc&&z._enabled(!0,!0),vt=this._last,this._sortChildren)for(Gt=z._startTime;vt&&vt._startTime>Gt;)vt=vt._prev;return vt?(z._next=vt._next,vt._next=z):(z._next=this._first,this._first=z),z._next?z._next._prev=z:this._last=z,z._prev=vt,this._recent=z,this._timeline&&this._uncache(!0),this},_._remove=function(z,Q){return z.timeline===this&&(Q||z._enabled(!1,!0),z._prev?z._prev._next=z._next:this._first===z&&(this._first=z._next),z._next?z._next._prev=z._prev:this._last===z&&(this._last=z._prev),z._next=z._prev=z.timeline=null,z===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},_.render=function(z,Q,st){var nt,vt=this._first;for(this._totalTime=this._time=this._rawPrevTime=z;vt;)nt=vt._next,(vt._active||z>=vt._startTime&&!vt._paused&&!vt._gc)&&(vt._reversed?vt.render((vt._dirty?vt.totalDuration():vt._totalDuration)-(z-vt._startTime)*vt._timeScale,Q,st):vt.render((z-vt._startTime)*vt._timeScale,Q,st)),vt=nt},_.rawTime=function(){return b||S.wake(),this._totalTime};var At=C("TweenLite",function(z,Q,st){if(G.call(this,Q,st),this.render=At.prototype.render,z==null)throw"Cannot tween a null target.";this.target=z=typeof z!="string"?z:At.selector(z)||z;var nt,vt,Gt,qt=z.jquery||z.length&&z!==x&&z[0]&&(z[0]===x||z[0].nodeType&&z[0].style&&!z.nodeType),Xt=this.vars.overwrite;if(this._overwrite=Xt=Xt==null?mn[At.defaultOverwrite]:typeof Xt=="number"?Xt>>0:mn[Xt],(qt||z instanceof Array||z.push&&L(z))&&typeof z[0]!="number")for(this._targets=Gt=F(z),this._propLookup=[],this._siblings=[],nt=0;nt<Gt.length;nt++)vt=Gt[nt],vt?typeof vt!="string"?vt.length&&vt!==x&&vt[0]&&(vt[0]===x||vt[0].nodeType&&vt[0].style&&!vt.nodeType)?(Gt.splice(nt--,1),this._targets=Gt=Gt.concat(F(vt))):(this._siblings[nt]=dt(vt,this,!1),Xt===1&&this._siblings[nt].length>1&&Dt(vt,this,null,1,this._siblings[nt])):(vt=Gt[nt--]=At.selector(vt),typeof vt=="string"&&Gt.splice(nt+1,1)):Gt.splice(nt--,1);else this._propLookup={},this._siblings=dt(z,this,!1),Xt===1&&this._siblings.length>1&&Dt(z,this,null,1,this._siblings);(this.vars.immediateRender||Q===0&&this._delay===0&&this.vars.immediateRender!==!1)&&(this._time=-D,this.render(Math.min(0,-this._delay)))},!0),ce=function(z){return z&&z.length&&z!==x&&z[0]&&(z[0]===x||z[0].nodeType&&z[0].style&&!z.nodeType)},re=function(z,Q){var st,nt={};for(st in z)Di[st]||st in Q&&st!=="transform"&&st!=="x"&&st!=="y"&&st!=="width"&&st!=="height"&&st!=="className"&&st!=="border"||!(!Oe[st]||Oe[st]&&Oe[st]._autoCSS)||(nt[st]=z[st],delete z[st]);z.css=nt};_=At.prototype=new G,_.constructor=At,_.kill()._gc=!1,_.ratio=0,_._firstPT=_._targets=_._overwrittenProps=_._startAt=null,_._notifyPluginsOfEnabled=_._lazy=!1,At.version="2.0.2",At.defaultEase=_._ease=new N(null,null,1,1),At.defaultOverwrite="auto",At.ticker=S,At.autoSleep=120,At.lagSmoothing=function(z,Q){S.lagSmoothing(z,Q)},At.selector=x.$||x.jQuery||function(z){var Q=x.$||x.jQuery;return Q?(At.selector=Q,Q(z)):(c||(c=x.document),c?c.querySelectorAll?c.querySelectorAll(z):c.getElementById(z.charAt(0)==="#"?z.substr(1):z):z)};var Ft=[],It={},Nt=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Pe=/[\+-]=-?[\.\d]/,pe=function(z){for(var Q,st=this._firstPT,nt=1e-6;st;)Q=st.blob?z===1&&this.end!=null?this.end:z?this.join(""):this.start:st.c*z+st.s,st.m?Q=st.m.call(this._tween,Q,this._target||st.t,this._tween):nt>Q&&Q>-nt&&!st.blob&&(Q=0),st.f?st.fp?st.t[st.p](st.fp,Q):st.t[st.p](Q):st.t[st.p]=Q,st=st._next},Wt=function(z,Q,st,nt){var vt,Gt,qt,Xt,Ne,Ie,ge,we=[],yi=0,Ei="",ni=0;for(we.start=z,we.end=Q,z=we[0]=z+"",Q=we[1]=Q+"",st&&(st(we),z=we[0],Q=we[1]),we.length=0,vt=z.match(Nt)||[],Gt=Q.match(Nt)||[],nt&&(nt._next=null,nt.blob=1,we._firstPT=we._applyPT=nt),Ne=Gt.length,Xt=0;Ne>Xt;Xt++)ge=Gt[Xt],Ie=Q.substr(yi,Q.indexOf(ge,yi)-yi),Ei+=Ie||!Xt?Ie:",",yi+=Ie.length,ni?ni=(ni+1)%5:Ie.substr(-5)==="rgba("&&(ni=1),ge===vt[Xt]||vt.length<=Xt?Ei+=ge:(Ei&&(we.push(Ei),Ei=""),qt=parseFloat(vt[Xt]),we.push(qt),we._firstPT={_next:we._firstPT,t:we,p:we.length-1,s:qt,c:(ge.charAt(1)==="="?parseInt(ge.charAt(0)+"1",10)*parseFloat(ge.substr(2)):parseFloat(ge)-qt)||0,f:0,m:ni&&4>ni?Math.round:0}),yi+=ge.length;return Ei+=Q.substr(yi),Ei&&we.push(Ei),we.setRatio=pe,Pe.test(Q)&&(we.end=null),we},$e=function(z,Q,st,nt,vt,Gt,qt,Xt,Ne){typeof nt=="function"&&(nt=nt(Ne||0,z));var Ie,ge=typeof z[Q],we=ge!=="function"?"":Q.indexOf("set")||typeof z["get"+Q.substr(3)]!="function"?Q:"get"+Q.substr(3),yi=st!=="get"?st:we?qt?z[we](qt):z[we]():z[Q],Ei=typeof nt=="string"&&nt.charAt(1)==="=",ni={t:z,p:Q,s:yi,f:ge==="function",pg:0,n:vt||Q,m:Gt?typeof Gt=="function"?Gt:Math.round:0,pr:0,c:Ei?parseInt(nt.charAt(0)+"1",10)*parseFloat(nt.substr(2)):parseFloat(nt)-yi||0};return(typeof yi!="number"||typeof nt!="number"&&!Ei)&&(qt||isNaN(yi)||!Ei&&isNaN(nt)||typeof yi=="boolean"||typeof nt=="boolean"?(ni.fp=qt,Ie=Wt(yi,Ei?parseFloat(ni.s)+ni.c+(ni.s+"").replace(/[0-9\-\.]/g,""):nt,Xt||At.defaultStringFilter,ni),ni={t:Ie,p:"setRatio",s:0,c:1,f:2,pg:0,n:vt||Q,pr:0,m:0}):(ni.s=parseFloat(yi),Ei||(ni.c=parseFloat(nt)-ni.s||0))),ni.c?((ni._next=this._firstPT)&&(ni._next._prev=ni),this._firstPT=ni,ni):void 0},Si=At._internals={isArray:L,isSelector:ce,lazyTweens:Ft,blobDif:Wt},Oe=At._plugins={},Ge=Si.tweenLookup={},pi=0,Di=Si.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},mn={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},Qi=G._rootFramesTimeline=new Et,W=G._rootTimeline=new Et,Jt=30,jt=Si.lazyRender=function(){var z,Q=Ft.length;for(It={};--Q>-1;)z=Ft[Q],z&&z._lazy!==!1&&(z.render(z._lazy[0],z._lazy[1],!0),z._lazy=!1);Ft.length=0};W._startTime=S.time,Qi._startTime=S.frame,W._active=Qi._active=!0,setTimeout(jt,1),G._updateRoot=At.render=function(){var z,Q,st;if(Ft.length&&jt(),W.render((S.time-W._startTime)*W._timeScale,!1,!1),Qi.render((S.frame-Qi._startTime)*Qi._timeScale,!1,!1),Ft.length&&jt(),S.frame>=Jt){Jt=S.frame+(parseInt(At.autoSleep,10)||120);for(st in Ge){for(Q=Ge[st].tweens,z=Q.length;--z>-1;)Q[z]._gc&&Q.splice(z,1);Q.length===0&&delete Ge[st]}if(st=W._first,(!st||st._paused)&&At.autoSleep&&!Qi._first&&S._listeners.tick.length===1){for(;st&&st._paused;)st=st._next;st||S.sleep()}}},S.addEventListener("tick",G._updateRoot);var dt=function(z,Q,st){var nt,vt,Gt=z._gsTweenID;if(Ge[Gt||(z._gsTweenID=Gt="t"+pi++)]||(Ge[Gt]={target:z,tweens:[]}),Q&&(nt=Ge[Gt].tweens,nt[vt=nt.length]=Q,st))for(;--vt>-1;)nt[vt]===Q&&nt.splice(vt,1);return Ge[Gt].tweens},pt=function(z,Q,st,nt){var vt,Gt,qt=z.vars.onOverwrite;return qt&&(vt=qt(z,Q,st,nt)),qt=At.onOverwrite,qt&&(Gt=qt(z,Q,st,nt)),vt!==!1&&Gt!==!1},Dt=function(z,Q,st,nt,vt){var Gt,qt,Xt,Ne;if(nt===1||nt>=4){for(Ne=vt.length,Gt=0;Ne>Gt;Gt++)if((Xt=vt[Gt])!==Q)Xt._gc||Xt._kill(null,z,Q)&&(qt=!0);else if(nt===5)break;return qt}var Ie,ge=Q._startTime+D,we=[],yi=0,Ei=Q._duration===0;for(Gt=vt.length;--Gt>-1;)(Xt=vt[Gt])===Q||Xt._gc||Xt._paused||(Xt._timeline!==Q._timeline?(Ie=Ie||ie(Q,0,Ei),ie(Xt,Ie,Ei)===0&&(we[yi++]=Xt)):Xt._startTime<=ge&&Xt._startTime+Xt.totalDuration()/Xt._timeScale>ge&&((Ei||!Xt._initted)&&ge-Xt._startTime<=2e-10||(we[yi++]=Xt)));for(Gt=yi;--Gt>-1;)if(Xt=we[Gt],Ne=Xt._firstPT,nt===2&&Xt._kill(st,z,Q)&&(qt=!0),nt!==2||!Xt._firstPT&&Xt._initted&&Ne){if(nt!==2&&!pt(Xt,Q))continue;Xt._enabled(!1,!1)&&(qt=!0)}return qt},ie=function(z,Q,st){for(var nt=z._timeline,vt=nt._timeScale,Gt=z._startTime;nt._timeline;){if(Gt+=nt._startTime,vt*=nt._timeScale,nt._paused)return-100;nt=nt._timeline}return Gt/=vt,Gt>Q?Gt-Q:st&&Gt===Q||!z._initted&&2*D>Gt-Q?D:(Gt+=z.totalDuration()/z._timeScale/vt)>Q+D?0:Gt-Q-D};_._init=function(){var z,Q,st,nt,vt,Gt,qt=this.vars,Xt=this._overwrittenProps,Ne=this._duration,Ie=!!qt.immediateRender,ge=qt.ease;if(qt.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),vt={};for(nt in qt.startAt)vt[nt]=qt.startAt[nt];if(vt.data="isStart",vt.overwrite=!1,vt.immediateRender=!0,vt.lazy=Ie&&qt.lazy!==!1,vt.startAt=vt.delay=null,vt.onUpdate=qt.onUpdate,vt.onUpdateParams=qt.onUpdateParams,vt.onUpdateScope=qt.onUpdateScope||qt.callbackScope||this,this._startAt=At.to(this.target||{},0,vt),Ie){if(this._time>0)this._startAt=null;else if(Ne!==0)return}}else if(qt.runBackwards&&Ne!==0)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{this._time!==0&&(Ie=!1),st={};for(nt in qt)Di[nt]&&nt!=="autoCSS"||(st[nt]=qt[nt]);if(st.overwrite=0,st.data="isFromStart",st.lazy=Ie&&qt.lazy!==!1,st.immediateRender=Ie,this._startAt=At.to(this.target,0,st),Ie){if(this._time===0)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=ge=ge?ge instanceof N?ge:typeof ge=="function"?new N(ge,qt.easeParams):X[ge]||At.defaultEase:At.defaultEase,qt.easeParams instanceof Array&&ge.config&&(this._ease=ge.config.apply(ge,qt.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(Gt=this._targets.length,z=0;Gt>z;z++)this._initProps(this._targets[z],this._propLookup[z]={},this._siblings[z],Xt?Xt[z]:null,z)&&(Q=!0);else Q=this._initProps(this.target,this._propLookup,this._siblings,Xt,0);if(Q&&At._onPluginEvent("_onInitAllProps",this),Xt&&(this._firstPT||typeof this.target!="function"&&this._enabled(!1,!1)),qt.runBackwards)for(st=this._firstPT;st;)st.s+=st.c,st.c=-st.c,st=st._next;this._onUpdate=qt.onUpdate,this._initted=!0},_._initProps=function(z,Q,st,nt,vt){var Gt,qt,Xt,Ne,Ie,ge;if(z==null)return!1;It[z._gsTweenID]&&jt(),this.vars.css||z.style&&z!==x&&z.nodeType&&Oe.css&&this.vars.autoCSS!==!1&&re(this.vars,z);for(Gt in this.vars)if(ge=this.vars[Gt],Di[Gt])ge&&(ge instanceof Array||ge.push&&L(ge))&&ge.join("").indexOf("{self}")!==-1&&(this.vars[Gt]=ge=this._swapSelfInParams(ge,this));else if(Oe[Gt]&&(Ne=new Oe[Gt])._onInitTween(z,this.vars[Gt],this,vt)){for(this._firstPT=Ie={_next:this._firstPT,t:Ne,p:"setRatio",s:0,c:1,f:1,n:Gt,pg:1,pr:Ne._priority,m:0},qt=Ne._overwriteProps.length;--qt>-1;)Q[Ne._overwriteProps[qt]]=this._firstPT;(Ne._priority||Ne._onInitAllProps)&&(Xt=!0),(Ne._onDisable||Ne._onEnable)&&(this._notifyPluginsOfEnabled=!0),Ie._next&&(Ie._next._prev=Ie)}else Q[Gt]=$e.call(this,z,Gt,"get",ge,Gt,0,null,this.vars.stringFilter,vt);return nt&&this._kill(nt,z)?this._initProps(z,Q,st,nt,vt):this._overwrite>1&&this._firstPT&&st.length>1&&Dt(z,this,Q,this._overwrite,st)?(this._kill(Q,z),this._initProps(z,Q,st,nt,vt)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(It[z._gsTweenID]=!0),Xt)},_.render=function(z,Q,st){var nt,vt,Gt,qt,Xt=this._time,Ne=this._duration,Ie=this._rawPrevTime;if(z>=Ne-1e-7&&z>=0)this._totalTime=this._time=Ne,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(nt=!0,vt="onComplete",st=st||this._timeline.autoRemoveChildren),Ne===0&&(this._initted||!this.vars.lazy||st)&&(this._startTime===this._timeline._duration&&(z=0),(0>Ie||0>=z&&z>=-1e-7||Ie===D&&this.data!=="isPause")&&Ie!==z&&(st=!0,Ie>D&&(vt="onReverseComplete")),this._rawPrevTime=qt=!Q||z||Ie===z?z:D);else if(1e-7>z)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(Xt!==0||Ne===0&&Ie>0)&&(vt="onReverseComplete",nt=this._reversed),0>z&&(this._active=!1,Ne===0&&(this._initted||!this.vars.lazy||st)&&(Ie>=0&&(Ie!==D||this.data!=="isPause")&&(st=!0),this._rawPrevTime=qt=!Q||z||Ie===z?z:D)),(!this._initted||this._startAt&&this._startAt.progress())&&(st=!0);else if(this._totalTime=this._time=z,this._easeType){var ge=z/Ne,we=this._easeType,yi=this._easePower;(we===1||we===3&&ge>=.5)&&(ge=1-ge),we===3&&(ge*=2),yi===1?ge*=ge:yi===2?ge*=ge*ge:yi===3?ge*=ge*ge*ge:yi===4&&(ge*=ge*ge*ge*ge),we===1?this.ratio=1-ge:we===2?this.ratio=ge:.5>z/Ne?this.ratio=ge/2:this.ratio=1-ge/2}else this.ratio=this._ease.getRatio(z/Ne);if(this._time!==Xt||st){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!st&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=Xt,this._rawPrevTime=Ie,Ft.push(this),void(this._lazy=[z,Q]);this._time&&!nt?this.ratio=this._ease.getRatio(this._time/Ne):nt&&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!==Xt&&z>=0&&(this._active=!0),Xt===0&&(this._startAt&&(z>=0?this._startAt.render(z,!0,st):vt||(vt="_dummyGS")),this.vars.onStart&&(this._time!==0||Ne===0)&&(Q||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>z&&this._startAt&&z!==-1e-4&&this._startAt.render(z,!0,st),Q||(this._time!==Xt||nt||st)&&this._callback("onUpdate")),vt&&(!this._gc||st)&&(0>z&&this._startAt&&!this._onUpdate&&z!==-1e-4&&this._startAt.render(z,!0,st),nt&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!Q&&this.vars[vt]&&this._callback(vt),Ne===0&&this._rawPrevTime===D&&qt!==D&&(this._rawPrevTime=0))}},_._kill=function(z,Q,st){if(z==="all"&&(z=null),z==null&&(Q==null||Q===this.target))return this._lazy=!1,this._enabled(!1,!1);Q=typeof Q!="string"?Q||this._targets||this.target:At.selector(Q)||Q;var nt,vt,Gt,qt,Xt,Ne,Ie,ge,we,yi=st&&this._time&&st._startTime===this._startTime&&this._timeline===st._timeline,Ei=this._firstPT;if((L(Q)||ce(Q))&&typeof Q[0]!="number")for(nt=Q.length;--nt>-1;)this._kill(z,Q[nt],st)&&(Ne=!0);else{if(this._targets){for(nt=this._targets.length;--nt>-1;)if(Q===this._targets[nt]){Xt=this._propLookup[nt]||{},this._overwrittenProps=this._overwrittenProps||[],vt=this._overwrittenProps[nt]=z?this._overwrittenProps[nt]||{}:"all";break}}else{if(Q!==this.target)return!1;Xt=this._propLookup,vt=this._overwrittenProps=z?this._overwrittenProps||{}:"all"}if(Xt){if(Ie=z||Xt,ge=z!==vt&&vt!=="all"&&z!==Xt&&(typeof z!="object"||!z._tempKill),st&&(At.onOverwrite||this.vars.onOverwrite)){for(Gt in Ie)Xt[Gt]&&(we||(we=[]),we.push(Gt));if((we||!z)&&!pt(this,st,Q,we))return!1}for(Gt in Ie)(qt=Xt[Gt])&&(yi&&(qt.f?qt.t[qt.p](qt.s):qt.t[qt.p]=qt.s,Ne=!0),qt.pg&&qt.t._kill(Ie)&&(Ne=!0),qt.pg&&qt.t._overwriteProps.length!==0||(qt._prev?qt._prev._next=qt._next:qt===this._firstPT&&(this._firstPT=qt._next),qt._next&&(qt._next._prev=qt._prev),qt._next=qt._prev=null),delete Xt[Gt]),ge&&(vt[Gt]=1);!this._firstPT&&this._initted&&Ei&&this._enabled(!1,!1)}}return Ne},_.invalidate=function(){return this._notifyPluginsOfEnabled&&At._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],G.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-D,this.render(Math.min(0,-this._delay))),this},_._enabled=function(z,Q){if(b||S.wake(),z&&this._gc){var st,nt=this._targets;if(nt)for(st=nt.length;--st>-1;)this._siblings[st]=dt(nt[st],this,!0);else this._siblings=dt(this.target,this,!0)}return G.prototype._enabled.call(this,z,Q),this._notifyPluginsOfEnabled&&this._firstPT?At._onPluginEvent(z?"_onEnable":"_onDisable",this):!1},At.to=function(z,Q,st){return new At(z,Q,st)},At.from=function(z,Q,st){return st.runBackwards=!0,st.immediateRender=st.immediateRender!=0,new At(z,Q,st)},At.fromTo=function(z,Q,st,nt){return nt.startAt=st,nt.immediateRender=nt.immediateRender!=0&&st.immediateRender!=0,new At(z,Q,nt)},At.delayedCall=function(z,Q,st,nt,vt){return new At(Q,0,{delay:z,onComplete:Q,onCompleteParams:st,callbackScope:nt,onReverseComplete:Q,onReverseCompleteParams:st,immediateRender:!1,lazy:!1,useFrames:vt,overwrite:0})},At.set=function(z,Q){return new At(z,0,Q)},At.getTweensOf=function(z,Q){if(z==null)return[];z=typeof z!="string"?z:At.selector(z)||z;var st,nt,vt,Gt;if((L(z)||ce(z))&&typeof z[0]!="number"){for(st=z.length,nt=[];--st>-1;)nt=nt.concat(At.getTweensOf(z[st],Q));for(st=nt.length;--st>-1;)for(Gt=nt[st],vt=st;--vt>-1;)Gt===nt[vt]&&nt.splice(st,1)}else if(z._gsTweenID)for(nt=dt(z).concat(),st=nt.length;--st>-1;)(nt[st]._gc||Q&&!nt[st].isActive())&&nt.splice(st,1);return nt||[]},At.killTweensOf=At.killDelayedCallsTo=function(z,Q,st){typeof Q=="object"&&(st=Q,Q=!1);for(var nt=At.getTweensOf(z,Q),vt=nt.length;--vt>-1;)nt[vt]._kill(st,z)};var Kt=C("plugins.TweenPlugin",function(z,Q){this._overwriteProps=(z||"").split(","),this._propName=this._overwriteProps[0],this._priority=Q||0,this._super=Kt.prototype},!0);if(_=Kt.prototype,Kt.version="1.19.0",Kt.API=2,_._firstPT=null,_._addTween=$e,_.setRatio=pe,_._kill=function(z){var Q,st=this._overwriteProps,nt=this._firstPT;if(z[this._propName]!=null)this._overwriteProps=[];else for(Q=st.length;--Q>-1;)z[st[Q]]!=null&&st.splice(Q,1);for(;nt;)z[nt.n]!=null&&(nt._next&&(nt._next._prev=nt._prev),nt._prev?(nt._prev._next=nt._next,nt._prev=null):this._firstPT===nt&&(this._firstPT=nt._next)),nt=nt._next;return!1},_._mod=_._roundProps=function(z){for(var Q,st=this._firstPT;st;)Q=z[this._propName]||st.n!=null&&z[st.n.split(this._propName+"_").join("")],Q&&typeof Q=="function"&&(st.f===2?st.t._applyPT.m=Q:st.m=Q),st=st._next},At._onPluginEvent=function(z,Q){var st,nt,vt,Gt,qt,Xt=Q._firstPT;if(z==="_onInitAllProps"){for(;Xt;){for(qt=Xt._next,nt=vt;nt&&nt.pr>Xt.pr;)nt=nt._next;(Xt._prev=nt?nt._prev:Gt)?Xt._prev._next=Xt:vt=Xt,(Xt._next=nt)?nt._prev=Xt:Gt=Xt,Xt=qt}Xt=Q._firstPT=vt}for(;Xt;)Xt.pg&&typeof Xt.t[z]=="function"&&Xt.t[z]()&&(st=!0),Xt=Xt._next;return st},Kt.activate=function(z){for(var Q=z.length;--Q>-1;)z[Q].API===Kt.API&&(Oe[new z[Q]()._propName]=z[Q]);return!0},R.plugin=function(z){if(!(z&&z.propName&&z.init&&z.API))throw"illegal plugin definition.";var Q,st=z.propName,nt=z.priority||0,vt=z.overwriteProps,Gt={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},qt=C("plugins."+st.charAt(0).toUpperCase()+st.substr(1)+"Plugin",function(){Kt.call(this,st,nt),this._overwriteProps=vt||[]},z.global===!0),Xt=qt.prototype=new Kt(st);Xt.constructor=qt,qt.API=z.API;for(Q in Gt)typeof z[Q]=="function"&&(Xt[Gt[Q]]=z[Q]);return qt.version=z.version,Kt.activate([qt]),qt},m=x._gsQueue){for(g=0;g<m.length;g++)m[g]();for(_ in T)T[_].func||x.console.log("GSAP encountered missing dependency: "+_)}b=!1}(typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window,"TweenMax");const $p={class:"modal-background"},Kp=["innerHTML"],Qp={name:"MapModali"},Sf=oi.defineComponent({...Qp,props:{},setup(x,{expose:a}){const s=oi.ref(""),c=oi.ref(""),d=m=>{c.value=m,s.value="five"},u=()=>{s.value=s.value+" out"};return oi.onMounted(()=>{}),a({text:c,show:d,hide:u}),(m,g)=>(oi.openBlock(),oi.createElementBlock("div",{id:"modal-container",class:oi.normalizeClass(s.value),onClick:u},[oi.createElementVNode("div",$p,[oi.createElementVNode("div",{class:"modal",onClick:g[0]||(g[0]=_=>{_.stopPropagation()})},[oi.createElementVNode("p",{style:{"white-space":"pre-line","line-height":"1",margin:"0",color:"#fff"},innerHTML:c.value},null,8,Kp)])])],2))}}),A1="",tm={class:"bim_background_plate"},em={class:"content"},im=oi.createElementVNode("canvas",{class:"landscape"},null,-1),nm={class:"content__title"},rm=oi.createElementVNode("div",{class:"overlay"},null,-1),om={name:"BimBackgroundPlate"},Ef=oi.defineComponent({...om,setup(x){const a=()=>{let d=`
14
14
  vec3 mod289(vec3 x)
15
15
  {
16
16
  return x - floor(x * (1.0 / 289.0)) * 289.0;
@@ -248,13 +248,13 @@
248
248
  float fogFactor = smoothstep( fogNear, fogFar, fogDepth );
249
249
  gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
250
250
  #endif
251
- }`;var m=document.querySelector(".landscape"),g=window.innerWidth,_=window.innerHeight,S,b,O,k,D={x:0,y:0,xDamped:0,yDamped:0},F=typeof window.orientation<"u";E();function E(){L(),T(),M(),N(),F?window.addEventListener("touchmove",U,{passive:!1}):window.addEventListener("mousemove",U),window.addEventListener("resize",C),C()}function L(){S=new THREE.Scene;var Z=new THREE.Color(3355443);S.background=Z,S.fog=new THREE.Fog(Z,0,400),R(),O=new THREE.PerspectiveCamera(60,g/_,.1,1e4),O.position.y=8,O.position.z=4;let ct=new THREE.AmbientLight(16777215,1);S.add(ct),b=new THREE.WebGLRenderer({canvas:m,antialias:!0}),b.setPixelRatio=devicePixelRatio,b.setSize(g,_)}function T(){var Z=new THREE.PlaneBufferGeometry(100,400,400,400),ct={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)},Rt=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.merge([THREE.ShaderLib.basic.uniforms,ct]),vertexShader:d,fragmentShader:u,wireframe:!1,fog:!0});k=new THREE.Mesh(Z,Rt),k.position.z=-180,k.rotation.x=-Math.PI/2,S.add(k)}function M(){new THREE.TextureLoader().load("",function(Z){k.material.uniforms.pallete.value=Z,k.material.needsUpdate=!0})}function R(){R=new THREE.Sky,R.scale.setScalar(45e4),R.material.uniforms.turbidity.value=13,R.material.uniforms.rayleigh.value=1.2,R.material.uniforms.luminance.value=1,R.material.uniforms.mieCoefficient.value=.1,R.material.uniforms.mieDirectionalG.value=.58,S.add(R);let Z=new THREE.Mesh(new THREE.SphereBufferGeometry(2e4,16,8),new THREE.MeshBasicMaterial({color:16777215}));Z.visible=!1,S.add(Z);var ct=Math.PI*-.002,Rt=2*Math.PI*-.25;Z.position.x=4e5*Math.cos(Rt),Z.position.y=4e5*Math.sin(Rt)*Math.sin(ct),Z.position.z=4e5*Math.sin(Rt)*Math.cos(ct),R.material.uniforms.sunPosition.value.copy(Z.position)}function C(){g=window.innerWidth,_=window.innerHeight,O.aspect=g/_,O.updateProjectionMatrix(),b.setSize(g,_)}function U(Z){Z.preventDefault();var ct,Rt;Z.type=="mousemove"?(ct=Z.clientX,Rt=Z.clientY):(ct=Z.changedTouches[0].clientX,Rt=Z.changedTouches[0].clientY),D.x=ct,D.y=Rt}function N(){requestAnimationFrame(N),D.xDamped=K(D.xDamped,D.x,.1),D.yDamped=K(D.yDamped,D.y,.1);var Z=performance.now()*.001;k.material.uniforms.time.value=Z,k.material.uniforms.scroll.value=Z+X(D.yDamped,0,_,0,4),k.material.uniforms.distortCenter.value=Math.sin(Z)*.1,k.material.uniforms.roadWidth.value=X(D.xDamped,0,g,1,4.5),O.position.y=X(D.yDamped,0,_,4,11),b.render(S,O)}function X(Z,ct,Rt,et,_t){return et+(_t-et)*((Z-ct)/(Rt-ct))}function K(Z,ct,Rt){return(1-Rt)*Z+Rt*ct}},s=()=>{const d=document.querySelector(".overlay"),u=document.querySelector(".content__title");charming(u);const m=Array.from(u.querySelectorAll("span"));TweenMax.to(d,2,{ease:Quad.easeOut,opacity:0}),TweenMax.set(m,{opacity:0}),TweenMax.staggerTo(m,1.5,{ease:Expo.easeOut,startAt:{rotationX:-100,z:-1e3},opacity:1,rotationX:0,z:0},.1)},c=()=>{a(),s()};return oi.onMounted(()=>{c()}),(d,u)=>(oi.openBlock(),oi.createElementBlock("div",tm,[oi.createElementVNode("div",em,[im,oi.createElementVNode("h2",nm,[oi.renderSlot(d.$slots,"default")])]),rm]))}}),P1="";(function(x,a){typeof Pi=="object"&&typeof module<"u"?a(Pi):typeof define=="function"&&define.amd?define(["exports"],a):a(x.THREE={})})(window,function(x){function a(){}function s(t,e){this.x=t||0,this.y=e||0}function c(){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 d(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._w=n!==void 0?n:1}function u(t,e,i){this.x=t||0,this.y=e||0,this.z=i||0}function m(){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 g(t,e,i,n,o,l,f,p,y,w){Object.defineProperty(this,"id",{value:Fs++}),this.uuid=di.generateUUID(),this.name="",this.image=t!==void 0?t:g.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=e!==void 0?e:g.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=l!==void 0?l:1008,this.anisotropy=y!==void 0?y:1,this.format=f!==void 0?f:1023,this.type=p!==void 0?p:1009,this.offset=new s(0,0),this.repeat=new s(1,1),this.center=new s(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new m,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=w!==void 0?w:3e3,this.version=0,this.onUpdate=null}function _(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.width=t,this.height=e,this.scissor=new _(0,0,t,e),this.scissorTest=!1,this.viewport=new _(0,0,t,e),i=i||{},i.minFilter===void 0&&(i.minFilter=1006),this.texture=new g(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 b(t,e,i){S.call(this,t,e,i),this.activeMipMapLevel=this.activeCubeFace=0}function O(t,e,i,n,o,l,f,p,y,w,A,P){g.call(this,null,l,f,p,y,w,n,o,A,P),this.image={data:t,width:e,height:i},this.magFilter=y!==void 0?y:1003,this.minFilter=w!==void 0?w:1003,this.flipY=this.generateMipmaps=!1,this.unpackAlignment=1}function k(t,e){this.min=t!==void 0?t:new u(1/0,1/0,1/0),this.max=e!==void 0?e:new u(-1/0,-1/0,-1/0)}function D(t,e){this.center=t!==void 0?t:new u,this.radius=e!==void 0?e:0}function F(t,e){this.normal=t!==void 0?t:new u(1,0,0),this.constant=e!==void 0?e:0}function E(t,e,i,n,o,l){this.planes=[t!==void 0?t:new F,e!==void 0?e:new F,i!==void 0?i:new F,n!==void 0?n:new F,o!==void 0?o:new F,l!==void 0?l:new F]}function L(t,e,i){return e===void 0&&i===void 0?this.set(t):this.setRGB(t,e,i)}function T(){function t(o,l){i!==!1&&(n(o,l),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 M(t){function e(n,o){var l=n.array,f=n.dynamic?35048:35044,p=t.createBuffer();return t.bindBuffer(o,p),t.bufferData(o,l,f),n.onUploadCallback(),o=5126,l instanceof Float32Array?o=5126:l instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):l instanceof Uint16Array?o=5123:l instanceof Int16Array?o=5122:l instanceof Uint32Array?o=5125:l instanceof Int32Array?o=5124:l instanceof Int8Array?o=5120:l instanceof Uint8Array&&(o=5121),{buffer:p,type:o,bytesPerElement:l.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 l=i.get(n);if(l===void 0)i.set(n,e(n,o));else if(l.version<n.version){var f=n,p=f.array,y=f.updateRange;t.bindBuffer(o,l.buffer),f.dynamic===!1?t.bufferData(o,p,35044):y.count===-1?t.bufferSubData(o,0,p):y.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,y.offset*p.BYTES_PER_ELEMENT,p.subarray(y.offset,y.offset+y.count)),y.count=-1),l.version=n.version}}}}function R(t,e,i,n,o,l){this.a=t,this.b=e,this.c=i,this.normal=n&&n.isVector3?n:new u,this.vertexNormals=Array.isArray(n)?n:[],this.color=o&&o.isColor?o:new L,this.vertexColors=Array.isArray(o)?o:[],this.materialIndex=l!==void 0?l:0}function C(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._order=n||C.DefaultOrder}function U(){this.mask=1}function N(){Object.defineProperty(this,"id",{value:qc++}),this.uuid=di.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=N.DefaultUp.clone();var t=new u,e=new C,i=new d,n=new u(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 c},normalMatrix:{value:new m}}),this.matrix=new c,this.matrixWorld=new c,this.matrixAutoUpdate=N.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new U,this.visible=!0,this.receiveShadow=this.castShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function X(){Object.defineProperty(this,"id",{value:Yc+=2}),this.uuid=di.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 K(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 Z(t,e,i){K.call(this,new Int8Array(t),e,i)}function ct(t,e,i){K.call(this,new Uint8Array(t),e,i)}function Rt(t,e,i){K.call(this,new Uint8ClampedArray(t),e,i)}function et(t,e,i){K.call(this,new Int16Array(t),e,i)}function _t(t,e,i){K.call(this,new Uint16Array(t),e,i)}function G(t,e,i){K.call(this,new Int32Array(t),e,i)}function Pt(t,e,i){K.call(this,new Uint32Array(t),e,i)}function Et(t,e,i){K.call(this,new Float32Array(t),e,i)}function At(t,e,i){K.call(this,new Float64Array(t),e,i)}function ce(){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 re(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 Ft(){Object.defineProperty(this,"id",{value:Zc+=2}),this.uuid=di.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 It(t,e,i,n,o,l){X.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:o,depthSegments:l},this.fromBufferGeometry(new Nt(t,e,i,n,o,l)),this.mergeVertices()}function Nt(t,e,i,n,o,l){function f(q,$,rt,xt,gt,Ct,wt,Vt,J,ot,zt){var ee=Ct/J,$t=wt/ot,Yt=Ct/2,Te=wt/2,me=Vt/2;wt=J+1;var De=ot+1,be=Ct=0,ae,We,Qe=new u;for(We=0;We<De;We++){var fi=We*$t-Te;for(ae=0;ae<wt;ae++)Qe[q]=(ae*ee-Yt)*xt,Qe[$]=fi*gt,Qe[rt]=me,w.push(Qe.x,Qe.y,Qe.z),Qe[q]=0,Qe[$]=0,Qe[rt]=0<Vt?1:-1,A.push(Qe.x,Qe.y,Qe.z),P.push(ae/J),P.push(1-We/ot),Ct+=1}for(We=0;We<ot;We++)for(ae=0;ae<J;ae++)q=B+ae+wt*(We+1),$=B+(ae+1)+wt*(We+1),rt=B+(ae+1)+wt*We,y.push(B+ae+wt*We,q,rt),y.push(q,$,rt),be+=6;p.addGroup(H,be,zt),H+=be,B+=Ct}Ft.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:o,depthSegments:l};var p=this;t=t||1,e=e||1,i=i||1,n=Math.floor(n)||1,o=Math.floor(o)||1,l=Math.floor(l)||1;var y=[],w=[],A=[],P=[],B=0,H=0;f("z","y","x",-1,-1,i,e,t,l,o,0),f("z","y","x",1,-1,i,e,-t,l,o,1),f("x","z","y",1,1,t,i,e,n,l,2),f("x","z","y",1,-1,t,i,-e,n,l,3),f("x","y","z",1,-1,t,e,i,n,o,4),f("x","y","z",-1,-1,t,e,-i,n,o,5),this.setIndex(y),this.addAttribute("position",new Et(w,3)),this.addAttribute("normal",new Et(A,3)),this.addAttribute("uv",new Et(P,2))}function Pe(t,e,i,n){X.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new pe(t,e,i,n)),this.mergeVertices()}function pe(t,e,i,n){Ft.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,l=e/2;i=Math.floor(i)||1,n=Math.floor(n)||1;var f=i+1,p=n+1,y=t/i,w=e/n,A=[],P=[],B=[],H=[];for(t=0;t<p;t++){var q=t*w-l;for(e=0;e<f;e++)P.push(e*y-o,-q,0),B.push(0,0,1),H.push(e/i),H.push(1-t/n)}for(t=0;t<n;t++)for(e=0;e<i;e++)o=e+f*(t+1),l=e+1+f*(t+1),p=e+1+f*t,A.push(e+f*t,o,p),A.push(o,l,p);this.setIndex(A),this.addAttribute("position",new Et(P,3)),this.addAttribute("normal",new Et(B,3)),this.addAttribute("uv",new Et(H,2))}function Wt(){Object.defineProperty(this,"id",{value:zu++}),this.uuid=di.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 $e(t){Wt.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=`void main() {
251
+ }`;var m=document.querySelector(".landscape"),g=window.innerWidth,_=window.innerHeight,S,b,I,k,D={x:0,y:0,xDamped:0,yDamped:0},F=typeof window.orientation<"u";E();function E(){L(),T(),M(),N(),F?window.addEventListener("touchmove",U,{passive:!1}):window.addEventListener("mousemove",U),window.addEventListener("resize",C),C()}function L(){S=new THREE.Scene;var Z=new THREE.Color(3355443);S.background=Z,S.fog=new THREE.Fog(Z,0,400),R(),I=new THREE.PerspectiveCamera(60,g/_,.1,1e4),I.position.y=8,I.position.z=4;let ct=new THREE.AmbientLight(16777215,1);S.add(ct),b=new THREE.WebGLRenderer({canvas:m,antialias:!0}),b.setPixelRatio=devicePixelRatio,b.setSize(g,_)}function T(){var Z=new THREE.PlaneBufferGeometry(100,400,400,400),ct={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)},Rt=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.merge([THREE.ShaderLib.basic.uniforms,ct]),vertexShader:d,fragmentShader:u,wireframe:!1,fog:!0});k=new THREE.Mesh(Z,Rt),k.position.z=-180,k.rotation.x=-Math.PI/2,S.add(k)}function M(){new THREE.TextureLoader().load("",function(Z){k.material.uniforms.pallete.value=Z,k.material.needsUpdate=!0})}function R(){R=new THREE.Sky,R.scale.setScalar(45e4),R.material.uniforms.turbidity.value=13,R.material.uniforms.rayleigh.value=1.2,R.material.uniforms.luminance.value=1,R.material.uniforms.mieCoefficient.value=.1,R.material.uniforms.mieDirectionalG.value=.58,S.add(R);let Z=new THREE.Mesh(new THREE.SphereBufferGeometry(2e4,16,8),new THREE.MeshBasicMaterial({color:16777215}));Z.visible=!1,S.add(Z);var ct=Math.PI*-.002,Rt=2*Math.PI*-.25;Z.position.x=4e5*Math.cos(Rt),Z.position.y=4e5*Math.sin(Rt)*Math.sin(ct),Z.position.z=4e5*Math.sin(Rt)*Math.cos(ct),R.material.uniforms.sunPosition.value.copy(Z.position)}function C(){g=window.innerWidth,_=window.innerHeight,I.aspect=g/_,I.updateProjectionMatrix(),b.setSize(g,_)}function U(Z){Z.preventDefault();var ct,Rt;Z.type=="mousemove"?(ct=Z.clientX,Rt=Z.clientY):(ct=Z.changedTouches[0].clientX,Rt=Z.changedTouches[0].clientY),D.x=ct,D.y=Rt}function N(){requestAnimationFrame(N),D.xDamped=K(D.xDamped,D.x,.1),D.yDamped=K(D.yDamped,D.y,.1);var Z=performance.now()*.001;k.material.uniforms.time.value=Z,k.material.uniforms.scroll.value=Z+X(D.yDamped,0,_,0,4),k.material.uniforms.distortCenter.value=Math.sin(Z)*.1,k.material.uniforms.roadWidth.value=X(D.xDamped,0,g,1,4.5),I.position.y=X(D.yDamped,0,_,4,11),b.render(S,I)}function X(Z,ct,Rt,et,_t){return et+(_t-et)*((Z-ct)/(Rt-ct))}function K(Z,ct,Rt){return(1-Rt)*Z+Rt*ct}},s=()=>{const d=document.querySelector(".overlay"),u=document.querySelector(".content__title");charming(u);const m=Array.from(u.querySelectorAll("span"));TweenMax.to(d,2,{ease:Quad.easeOut,opacity:0}),TweenMax.set(m,{opacity:0}),TweenMax.staggerTo(m,1.5,{ease:Expo.easeOut,startAt:{rotationX:-100,z:-1e3},opacity:1,rotationX:0,z:0},.1)},c=()=>{a(),s()};return oi.onMounted(()=>{c()}),(d,u)=>(oi.openBlock(),oi.createElementBlock("div",tm,[oi.createElementVNode("div",em,[im,oi.createElementVNode("h2",nm,[oi.renderSlot(d.$slots,"default")])]),rm]))}}),P1="";(function(x,a){typeof Pi=="object"&&typeof module<"u"?a(Pi):typeof define=="function"&&define.amd?define(["exports"],a):a(x.THREE={})})(window,function(x){function a(){}function s(t,e){this.x=t||0,this.y=e||0}function c(){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 d(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._w=n!==void 0?n:1}function u(t,e,i){this.x=t||0,this.y=e||0,this.z=i||0}function m(){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 g(t,e,i,n,o,l,f,p,y,w){Object.defineProperty(this,"id",{value:Fs++}),this.uuid=di.generateUUID(),this.name="",this.image=t!==void 0?t:g.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=e!==void 0?e:g.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=l!==void 0?l:1008,this.anisotropy=y!==void 0?y:1,this.format=f!==void 0?f:1023,this.type=p!==void 0?p:1009,this.offset=new s(0,0),this.repeat=new s(1,1),this.center=new s(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new m,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=w!==void 0?w:3e3,this.version=0,this.onUpdate=null}function _(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.width=t,this.height=e,this.scissor=new _(0,0,t,e),this.scissorTest=!1,this.viewport=new _(0,0,t,e),i=i||{},i.minFilter===void 0&&(i.minFilter=1006),this.texture=new g(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 b(t,e,i){S.call(this,t,e,i),this.activeMipMapLevel=this.activeCubeFace=0}function I(t,e,i,n,o,l,f,p,y,w,A,P){g.call(this,null,l,f,p,y,w,n,o,A,P),this.image={data:t,width:e,height:i},this.magFilter=y!==void 0?y:1003,this.minFilter=w!==void 0?w:1003,this.flipY=this.generateMipmaps=!1,this.unpackAlignment=1}function k(t,e){this.min=t!==void 0?t:new u(1/0,1/0,1/0),this.max=e!==void 0?e:new u(-1/0,-1/0,-1/0)}function D(t,e){this.center=t!==void 0?t:new u,this.radius=e!==void 0?e:0}function F(t,e){this.normal=t!==void 0?t:new u(1,0,0),this.constant=e!==void 0?e:0}function E(t,e,i,n,o,l){this.planes=[t!==void 0?t:new F,e!==void 0?e:new F,i!==void 0?i:new F,n!==void 0?n:new F,o!==void 0?o:new F,l!==void 0?l:new F]}function L(t,e,i){return e===void 0&&i===void 0?this.set(t):this.setRGB(t,e,i)}function T(){function t(o,l){i!==!1&&(n(o,l),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 M(t){function e(n,o){var l=n.array,f=n.dynamic?35048:35044,p=t.createBuffer();return t.bindBuffer(o,p),t.bufferData(o,l,f),n.onUploadCallback(),o=5126,l instanceof Float32Array?o=5126:l instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):l instanceof Uint16Array?o=5123:l instanceof Int16Array?o=5122:l instanceof Uint32Array?o=5125:l instanceof Int32Array?o=5124:l instanceof Int8Array?o=5120:l instanceof Uint8Array&&(o=5121),{buffer:p,type:o,bytesPerElement:l.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 l=i.get(n);if(l===void 0)i.set(n,e(n,o));else if(l.version<n.version){var f=n,p=f.array,y=f.updateRange;t.bindBuffer(o,l.buffer),f.dynamic===!1?t.bufferData(o,p,35044):y.count===-1?t.bufferSubData(o,0,p):y.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,y.offset*p.BYTES_PER_ELEMENT,p.subarray(y.offset,y.offset+y.count)),y.count=-1),l.version=n.version}}}}function R(t,e,i,n,o,l){this.a=t,this.b=e,this.c=i,this.normal=n&&n.isVector3?n:new u,this.vertexNormals=Array.isArray(n)?n:[],this.color=o&&o.isColor?o:new L,this.vertexColors=Array.isArray(o)?o:[],this.materialIndex=l!==void 0?l:0}function C(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._order=n||C.DefaultOrder}function U(){this.mask=1}function N(){Object.defineProperty(this,"id",{value:qc++}),this.uuid=di.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=N.DefaultUp.clone();var t=new u,e=new C,i=new d,n=new u(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 c},normalMatrix:{value:new m}}),this.matrix=new c,this.matrixWorld=new c,this.matrixAutoUpdate=N.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new U,this.visible=!0,this.receiveShadow=this.castShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function X(){Object.defineProperty(this,"id",{value:Yc+=2}),this.uuid=di.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 K(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 Z(t,e,i){K.call(this,new Int8Array(t),e,i)}function ct(t,e,i){K.call(this,new Uint8Array(t),e,i)}function Rt(t,e,i){K.call(this,new Uint8ClampedArray(t),e,i)}function et(t,e,i){K.call(this,new Int16Array(t),e,i)}function _t(t,e,i){K.call(this,new Uint16Array(t),e,i)}function G(t,e,i){K.call(this,new Int32Array(t),e,i)}function Pt(t,e,i){K.call(this,new Uint32Array(t),e,i)}function Et(t,e,i){K.call(this,new Float32Array(t),e,i)}function At(t,e,i){K.call(this,new Float64Array(t),e,i)}function ce(){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 re(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 Ft(){Object.defineProperty(this,"id",{value:Zc+=2}),this.uuid=di.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 It(t,e,i,n,o,l){X.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:o,depthSegments:l},this.fromBufferGeometry(new Nt(t,e,i,n,o,l)),this.mergeVertices()}function Nt(t,e,i,n,o,l){function f(q,$,rt,xt,gt,Ct,wt,Vt,J,ot,zt){var ee=Ct/J,$t=wt/ot,Yt=Ct/2,Te=wt/2,me=Vt/2;wt=J+1;var De=ot+1,be=Ct=0,ae,We,Qe=new u;for(We=0;We<De;We++){var fi=We*$t-Te;for(ae=0;ae<wt;ae++)Qe[q]=(ae*ee-Yt)*xt,Qe[$]=fi*gt,Qe[rt]=me,w.push(Qe.x,Qe.y,Qe.z),Qe[q]=0,Qe[$]=0,Qe[rt]=0<Vt?1:-1,A.push(Qe.x,Qe.y,Qe.z),P.push(ae/J),P.push(1-We/ot),Ct+=1}for(We=0;We<ot;We++)for(ae=0;ae<J;ae++)q=B+ae+wt*(We+1),$=B+(ae+1)+wt*(We+1),rt=B+(ae+1)+wt*We,y.push(B+ae+wt*We,q,rt),y.push(q,$,rt),be+=6;p.addGroup(H,be,zt),H+=be,B+=Ct}Ft.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:o,depthSegments:l};var p=this;t=t||1,e=e||1,i=i||1,n=Math.floor(n)||1,o=Math.floor(o)||1,l=Math.floor(l)||1;var y=[],w=[],A=[],P=[],B=0,H=0;f("z","y","x",-1,-1,i,e,t,l,o,0),f("z","y","x",1,-1,i,e,-t,l,o,1),f("x","z","y",1,1,t,i,e,n,l,2),f("x","z","y",1,-1,t,i,-e,n,l,3),f("x","y","z",1,-1,t,e,i,n,o,4),f("x","y","z",-1,-1,t,e,-i,n,o,5),this.setIndex(y),this.addAttribute("position",new Et(w,3)),this.addAttribute("normal",new Et(A,3)),this.addAttribute("uv",new Et(P,2))}function Pe(t,e,i,n){X.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new pe(t,e,i,n)),this.mergeVertices()}function pe(t,e,i,n){Ft.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,l=e/2;i=Math.floor(i)||1,n=Math.floor(n)||1;var f=i+1,p=n+1,y=t/i,w=e/n,A=[],P=[],B=[],H=[];for(t=0;t<p;t++){var q=t*w-l;for(e=0;e<f;e++)P.push(e*y-o,-q,0),B.push(0,0,1),H.push(e/i),H.push(1-t/n)}for(t=0;t<n;t++)for(e=0;e<i;e++)o=e+f*(t+1),l=e+1+f*(t+1),p=e+1+f*t,A.push(e+f*t,o,p),A.push(o,l,p);this.setIndex(A),this.addAttribute("position",new Et(P,3)),this.addAttribute("normal",new Et(B,3)),this.addAttribute("uv",new Et(H,2))}function Wt(){Object.defineProperty(this,"id",{value:zu++}),this.uuid=di.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 $e(t){Wt.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 Si(t,e){this.origin=t!==void 0?t:new u,this.direction=e!==void 0?e:new u}function Oe(t,e,i){this.a=t!==void 0?t:new u,this.b=e!==void 0?e:new u,this.c=i!==void 0?i:new u}function Ge(t){Wt.call(this),this.type="MeshBasicMaterial",this.color=new L(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 pi(t,e){N.call(this),this.type="Mesh",this.geometry=t!==void 0?t:new Ft,this.material=e!==void 0?e:new Ge({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function Di(t,e,i,n){function o(w,A){e.buffers.color.setClear(w.r,w.g,w.b,A,n)}var l=new L(0),f=0,p,y;return{getClearColor:function(){return l},setClearColor:function(w,A){l.set(w),f=A!==void 0?A:1,o(l,f)},getClearAlpha:function(){return f},setClearAlpha:function(w){f=w,o(l,f)},render:function(w,A,P,B){A=A.background,A===null?o(l,f):A&&A.isColor&&(o(A,1),B=!0),(t.autoClear||B)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),A&&(A.isCubeTexture||A.isWebGLRenderTargetCube)?(y===void 0&&(y=new pi(new Nt(1,1,1),new $e({type:"BackgroundCubeMaterial",uniforms:Bn.clone(wo.cube.uniforms),vertexShader:wo.cube.vertexShader,fragmentShader:wo.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1})),y.geometry.removeAttribute("normal"),y.geometry.removeAttribute("uv"),y.onBeforeRender=function(H,q,$){this.matrixWorld.copyPosition($.matrixWorld)},i.update(y)),y.material.uniforms.tCube.value=A.isWebGLRenderTargetCube?A.texture:A,y.material.uniforms.tFlip.value=A.isWebGLRenderTargetCube?1:-1,w.push(y,y.geometry,y.material,0,null)):A&&A.isTexture&&(p===void 0&&(p=new pi(new pe(2,2),new $e({type:"BackgroundMaterial",uniforms:Bn.clone(wo.background.uniforms),vertexShader:wo.background.vertexShader,fragmentShader:wo.background.fragmentShader,side:0,depthTest:!0,depthWrite:!1,fog:!1})),p.geometry.removeAttribute("normal"),i.update(p)),p.material.uniforms.t2D.value=A,A.matrixAutoUpdate===!0&&A.updateMatrix(),p.material.uniforms.uvTransform.value.copy(A.matrix),w.push(p,p.geometry,p.material,0,null))}}}function mn(t,e,i,n){var o;this.setMode=function(l){o=l},this.render=function(l,f){t.drawArrays(o,l,f),i.update(f,o)},this.renderInstances=function(l,f,p){if(n.isWebGL2)var y=t;else if(y=e.get("ANGLE_instanced_arrays"),y===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}y[n.isWebGL2?"drawArraysInstanced":"drawArraysInstancedANGLE"](o,f,p,l.maxInstancedCount),i.update(p,o,l.maxInstancedCount)}}function Qi(t,e,i){function n(xt){if(xt==="highp"){if(0<t.getShaderPrecisionFormat(35633,36338).precision&&0<t.getShaderPrecisionFormat(35632,36338).precision)return"highp";xt="mediump"}return xt==="mediump"&&0<t.getShaderPrecisionFormat(35633,36337).precision&&0<t.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var o,l=typeof WebGL2RenderingContext<"u"&&t instanceof WebGL2RenderingContext,f=i.precision!==void 0?i.precision:"highp",p=n(f);p!==f&&(console.warn("THREE.WebGLRenderer:",f,"not supported, using",p,"instead."),f=p),i=i.logarithmicDepthBuffer===!0,p=t.getParameter(34930);var y=t.getParameter(35660),w=t.getParameter(3379),A=t.getParameter(34076),P=t.getParameter(34921),B=t.getParameter(36347),H=t.getParameter(36348),q=t.getParameter(36349),$=0<y,rt=l||!!e.get("OES_texture_float");return{isWebGL2:l,getMaxAnisotropy:function(){if(o!==void 0)return o;var xt=e.get("EXT_texture_filter_anisotropic");return o=xt!==null?t.getParameter(xt.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:n,precision:f,logarithmicDepthBuffer:i,maxTextures:p,maxVertexTextures:y,maxTextureSize:w,maxCubemapSize:A,maxAttributes:P,maxVertexUniforms:B,maxVaryings:H,maxFragmentUniforms:q,vertexTextures:$,floatFragmentTextures:rt,floatVertexTextures:$&&rt}}function W(){function t(){w.value!==n&&(w.value=n,w.needsUpdate=0<o),i.numPlanes=o,i.numIntersection=0}function e(A,P,B,H){var q=A!==null?A.length:0,$=null;if(q!==0){if($=w.value,H!==!0||$===null)for(H=B+4*q,P=P.matrixWorldInverse,y.getNormalMatrix(P),($===null||$.length<H)&&($=new Float32Array(H)),H=0;H!==q;++H,B+=4)p.copy(A[H]).applyMatrix4(P,y),p.normal.toArray($,B),$[B+3]=p.constant;w.value=$,w.needsUpdate=!0}return i.numPlanes=q,$}var i=this,n=null,o=0,l=!1,f=!1,p=new F,y=new m,w={value:null,needsUpdate:!1};this.uniform=w,this.numIntersection=this.numPlanes=0,this.init=function(A,P,B){var H=A.length!==0||P||o!==0||l;return l=P,n=e(A,B,0),o=A.length,H},this.beginShadows=function(){f=!0,e(null)},this.endShadows=function(){f=!1,t()},this.setState=function(A,P,B,H,q,$){if(!l||A===null||A.length===0||f&&!B)f?e(null):t();else{B=f?0:o;var rt=4*B,xt=q.clippingState||null;for(w.value=xt,xt=e(A,H,rt,$),A=0;A!==rt;++A)xt[A]=n[A];q.clippingState=xt,this.numIntersection=P?this.numPlanes:0,this.numPlanes+=B}}}function Jt(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 jt(t,e,i){function n(f){var p=f.target;f=o[p.id],f.index!==null&&e.remove(f.index);for(var y in f.attributes)e.remove(f.attributes[y]);p.removeEventListener("dispose",n),delete o[p.id],(y=l[f.id])&&(e.remove(y),delete l[f.id]),i.memory.geometries--}var o={},l={};return{get:function(f,p){var y=o[p.id];return y||(p.addEventListener("dispose",n),p.isBufferGeometry?y=p:p.isGeometry&&(p._bufferGeometry===void 0&&(p._bufferGeometry=new Ft().setFromObject(f)),y=p._bufferGeometry),o[p.id]=y,i.memory.geometries++,y)},update:function(f){var p=f.index,y=f.attributes;p!==null&&e.update(p,34963);for(var w in y)e.update(y[w],34962);f=f.morphAttributes;for(w in f){p=f[w],y=0;for(var A=p.length;y<A;y++)e.update(p[y],34962)}},getWireframeAttribute:function(f){var p=l[f.id];if(p)return p;p=[];var y=f.index,w=f.attributes;if(y!==null){y=y.array,w=0;for(var A=y.length;w<A;w+=3){var P=y[w+0],B=y[w+1],H=y[w+2];p.push(P,B,B,H,H,P)}}else for(y=w.position.array,w=0,A=y.length/3-1;w<A;w+=3)P=w+0,B=w+1,H=w+2,p.push(P,B,B,H,H,P);return p=new(65535<re(p)?Pt:_t)(p,1),e.update(p,34963),l[f.id]=p}}}function dt(t,e,i,n){var o,l,f;this.setMode=function(p){o=p},this.setIndex=function(p){l=p.type,f=p.bytesPerElement},this.render=function(p,y){t.drawElements(o,y,l,p*f),i.update(y,o)},this.renderInstances=function(p,y,w){if(n.isWebGL2)var A=t;else if(A=e.get("ANGLE_instanced_arrays"),A===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}A[n.isWebGL2?"drawElementsInstanced":"drawElementsInstancedANGLE"](o,w,l,y*f,p.maxInstancedCount),i.update(w,o,p.maxInstancedCount)}}function pt(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 Dt(t,e){return Math.abs(e[1])-Math.abs(t[1])}function ie(t){var e={},i=new Float32Array(8);return{update:function(n,o,l,f){var p=n.morphTargetInfluences,y=p.length;if(n=e[o.id],n===void 0){n=[];for(var w=0;w<y;w++)n[w]=[w,0];e[o.id]=n}var A=l.morphTargets&&o.morphAttributes.position;for(l=l.morphNormals&&o.morphAttributes.normal,w=0;w<y;w++){var P=n[w];P[1]!==0&&(A&&o.removeAttribute("morphTarget"+w),l&&o.removeAttribute("morphNormal"+w))}for(w=0;w<y;w++)P=n[w],P[0]=w,P[1]=p[w];for(n.sort(Dt),w=0;8>w;w++){if((P=n[w])&&(p=P[0],y=P[1])){A&&o.addAttribute("morphTarget"+w,A[p]),l&&o.addAttribute("morphNormal"+w,l[p]),i[w]=y;continue}i[w]=0}f.getUniforms().setValue(t,"morphTargetInfluences",i)}}}function Kt(t,e){var i={};return{update:function(n){var o=e.render.frame,l=n.geometry,f=t.get(n,l);return i[f.id]!==o&&(l.isGeometry&&f.updateFromObject(n),t.update(f),i[f.id]=o),f},dispose:function(){i={}}}}function z(t,e,i,n,o,l,f,p,y,w){t=t!==void 0?t:[],g.call(this,t,e!==void 0?e:301,i,n,o,l,f,p,y,w),this.flipY=!1}function Q(t,e,i,n){g.call(this,null),this.image={data:t,width:e,height:i,depth:n},this.minFilter=this.magFilter=1003,this.flipY=this.generateMipmaps=!1}function st(t,e,i){var n=t[0];if(0>=n||0<n)return t;var o=e*i,l=ah[o];if(l===void 0&&(l=new Float32Array(o),ah[o]=l),e!==0)for(n.toArray(l,0),n=1,o=0;n!==e;++n)o+=i,t[n].toArray(l,o);return l}function nt(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 vt(t,e){for(var i=0,n=e.length;i<n;i++)t[i]=e[i]}function Gt(t,e){var i=La[e];i===void 0&&(i=new Int32Array(e),La[e]=i);for(var n=0;n!==e;++n)i[n]=t.allocTextureUnit();return i}function qt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1f(this.addr,e),i[0]=e)}function Xt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1i(this.addr,e),i[0]=e)}function Ne(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):nt(i,e)||(t.uniform2fv(this.addr,e),vt(i,e))}function Ie(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):nt(i,e)||(t.uniform3fv(this.addr,e),vt(i,e))}function ge(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):nt(i,e)||(t.uniform4fv(this.addr,e),vt(i,e))}function we(t,e){var i=this.cache,n=e.elements;n===void 0?nt(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),vt(i,e)):nt(i,n)||(Yh.set(n),t.uniformMatrix2fv(this.addr,!1,Yh),vt(i,n))}function yi(t,e){var i=this.cache,n=e.elements;n===void 0?nt(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),vt(i,e)):nt(i,n)||(Bu.set(n),t.uniformMatrix3fv(this.addr,!1,Bu),vt(i,n))}function Ei(t,e){var i=this.cache,n=e.elements;n===void 0?nt(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),vt(i,e)):nt(i,n)||(wl.set(n),t.uniformMatrix4fv(this.addr,!1,wl),vt(i,n))}function ni(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTexture2D(e||qh,o)}function bi(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTexture3D(e||Jc,o)}function qr(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTextureCube(e||ku,o)}function sr(t,e){var i=this.cache;nt(i,e)||(t.uniform2iv(this.addr,e),vt(i,e))}function sn(t,e){var i=this.cache;nt(i,e)||(t.uniform3iv(this.addr,e),vt(i,e))}function Ao(t,e){var i=this.cache;nt(i,e)||(t.uniform4iv(this.addr,e),vt(i,e))}function zi(t){switch(t){case 5126:return qt;case 35664:return Ne;case 35665:return Ie;case 35666:return ge;case 35674:return we;case 35675:return yi;case 35676:return Ei;case 35678:case 36198:return ni;case 35679:return bi;case 35680:return qr;case 5124:case 35670:return Xt;case 35667:case 35671:return sr;case 35668:case 35672:return sn;case 35669:case 35673:return Ao}}function qo(t,e){var i=this.cache;nt(i,e)||(t.uniform1fv(this.addr,e),vt(i,e))}function ao(t,e){var i=this.cache;nt(i,e)||(t.uniform1iv(this.addr,e),vt(i,e))}function Vl(t,e){var i=this.cache;e=st(e,this.size,2),nt(i,e)||(t.uniform2fv(this.addr,e),this.updateCache(e))}function Mn(t,e){var i=this.cache;e=st(e,this.size,3),nt(i,e)||(t.uniform3fv(this.addr,e),this.updateCache(e))}function na(t,e){var i=this.cache;e=st(e,this.size,4),nt(i,e)||(t.uniform4fv(this.addr,e),this.updateCache(e))}function gs(t,e){var i=this.cache;e=st(e,this.size,4),nt(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),this.updateCache(e))}function vr(t,e){var i=this.cache;e=st(e,this.size,9),nt(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),this.updateCache(e))}function ra(t,e){var i=this.cache;e=st(e,this.size,16),nt(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),this.updateCache(e))}function Ya(t,e,i){var n=this.cache,o=e.length,l=Gt(i,o);for(nt(n,l)===!1&&(t.uniform1iv(this.addr,l),vt(n,l)),t=0;t!==o;++t)i.setTexture2D(e[t]||qh,l[t])}function Wl(t,e,i){var n=this.cache,o=e.length,l=Gt(i,o);for(nt(n,l)===!1&&(t.uniform1iv(this.addr,l),vt(n,l)),t=0;t!==o;++t)i.setTextureCube(e[t]||ku,l[t])}function lo(t){switch(t){case 5126:return qo;case 35664:return Vl;case 35665:return Mn;case 35666:return na;case 35674:return gs;case 35675:return vr;case 35676:return ra;case 35678:return Ya;case 35680:return Wl;case 5124:case 35670:return ao;case 35667:case 35671:return sr;case 35668:case 35672:return sn;case 35669:case 35673:return Ao}}function Oh(t,e,i){this.id=t,this.addr=i,this.cache=[],this.setValue=zi(e.type)}function oa(t,e,i){this.id=t,this.addr=i,this.cache=[],this.size=e.size,this.setValue=lo(e.type)}function Za(t){this.id=t,this.seq=[],this.map={}}function ho(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),l=t.getUniformLocation(e,o.name),f=this,p=o.name,y=p.length;for(Zh.lastIndex=0;;){var w=Zh.exec(p),A=Zh.lastIndex,P=w[1],B=w[3];if(w[2]==="]"&&(P|=0),B===void 0||B==="["&&A+2===y){p=f,o=B===void 0?new Oh(P,o,l):new oa(P,o,l),p.seq.push(o),p.map[o.id]=o;break}else B=f.map[P],B===void 0&&(B=new Za(P),P=f,f=B,P.seq.push(f),P.map[f.id]=f),f=B}}}function Ja(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 Si(t,e){this.origin=t!==void 0?t:new u,this.direction=e!==void 0?e:new u}function Oe(t,e,i){this.a=t!==void 0?t:new u,this.b=e!==void 0?e:new u,this.c=i!==void 0?i:new u}function Ge(t){Wt.call(this),this.type="MeshBasicMaterial",this.color=new L(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 pi(t,e){N.call(this),this.type="Mesh",this.geometry=t!==void 0?t:new Ft,this.material=e!==void 0?e:new Ge({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function Di(t,e,i,n){function o(w,A){e.buffers.color.setClear(w.r,w.g,w.b,A,n)}var l=new L(0),f=0,p,y;return{getClearColor:function(){return l},setClearColor:function(w,A){l.set(w),f=A!==void 0?A:1,o(l,f)},getClearAlpha:function(){return f},setClearAlpha:function(w){f=w,o(l,f)},render:function(w,A,P,B){A=A.background,A===null?o(l,f):A&&A.isColor&&(o(A,1),B=!0),(t.autoClear||B)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),A&&(A.isCubeTexture||A.isWebGLRenderTargetCube)?(y===void 0&&(y=new pi(new Nt(1,1,1),new $e({type:"BackgroundCubeMaterial",uniforms:Bn.clone(wo.cube.uniforms),vertexShader:wo.cube.vertexShader,fragmentShader:wo.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1})),y.geometry.removeAttribute("normal"),y.geometry.removeAttribute("uv"),y.onBeforeRender=function(H,q,$){this.matrixWorld.copyPosition($.matrixWorld)},i.update(y)),y.material.uniforms.tCube.value=A.isWebGLRenderTargetCube?A.texture:A,y.material.uniforms.tFlip.value=A.isWebGLRenderTargetCube?1:-1,w.push(y,y.geometry,y.material,0,null)):A&&A.isTexture&&(p===void 0&&(p=new pi(new pe(2,2),new $e({type:"BackgroundMaterial",uniforms:Bn.clone(wo.background.uniforms),vertexShader:wo.background.vertexShader,fragmentShader:wo.background.fragmentShader,side:0,depthTest:!0,depthWrite:!1,fog:!1})),p.geometry.removeAttribute("normal"),i.update(p)),p.material.uniforms.t2D.value=A,A.matrixAutoUpdate===!0&&A.updateMatrix(),p.material.uniforms.uvTransform.value.copy(A.matrix),w.push(p,p.geometry,p.material,0,null))}}}function mn(t,e,i,n){var o;this.setMode=function(l){o=l},this.render=function(l,f){t.drawArrays(o,l,f),i.update(f,o)},this.renderInstances=function(l,f,p){if(n.isWebGL2)var y=t;else if(y=e.get("ANGLE_instanced_arrays"),y===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}y[n.isWebGL2?"drawArraysInstanced":"drawArraysInstancedANGLE"](o,f,p,l.maxInstancedCount),i.update(p,o,l.maxInstancedCount)}}function Qi(t,e,i){function n(xt){if(xt==="highp"){if(0<t.getShaderPrecisionFormat(35633,36338).precision&&0<t.getShaderPrecisionFormat(35632,36338).precision)return"highp";xt="mediump"}return xt==="mediump"&&0<t.getShaderPrecisionFormat(35633,36337).precision&&0<t.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var o,l=typeof WebGL2RenderingContext<"u"&&t instanceof WebGL2RenderingContext,f=i.precision!==void 0?i.precision:"highp",p=n(f);p!==f&&(console.warn("THREE.WebGLRenderer:",f,"not supported, using",p,"instead."),f=p),i=i.logarithmicDepthBuffer===!0,p=t.getParameter(34930);var y=t.getParameter(35660),w=t.getParameter(3379),A=t.getParameter(34076),P=t.getParameter(34921),B=t.getParameter(36347),H=t.getParameter(36348),q=t.getParameter(36349),$=0<y,rt=l||!!e.get("OES_texture_float");return{isWebGL2:l,getMaxAnisotropy:function(){if(o!==void 0)return o;var xt=e.get("EXT_texture_filter_anisotropic");return o=xt!==null?t.getParameter(xt.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:n,precision:f,logarithmicDepthBuffer:i,maxTextures:p,maxVertexTextures:y,maxTextureSize:w,maxCubemapSize:A,maxAttributes:P,maxVertexUniforms:B,maxVaryings:H,maxFragmentUniforms:q,vertexTextures:$,floatFragmentTextures:rt,floatVertexTextures:$&&rt}}function W(){function t(){w.value!==n&&(w.value=n,w.needsUpdate=0<o),i.numPlanes=o,i.numIntersection=0}function e(A,P,B,H){var q=A!==null?A.length:0,$=null;if(q!==0){if($=w.value,H!==!0||$===null)for(H=B+4*q,P=P.matrixWorldInverse,y.getNormalMatrix(P),($===null||$.length<H)&&($=new Float32Array(H)),H=0;H!==q;++H,B+=4)p.copy(A[H]).applyMatrix4(P,y),p.normal.toArray($,B),$[B+3]=p.constant;w.value=$,w.needsUpdate=!0}return i.numPlanes=q,$}var i=this,n=null,o=0,l=!1,f=!1,p=new F,y=new m,w={value:null,needsUpdate:!1};this.uniform=w,this.numIntersection=this.numPlanes=0,this.init=function(A,P,B){var H=A.length!==0||P||o!==0||l;return l=P,n=e(A,B,0),o=A.length,H},this.beginShadows=function(){f=!0,e(null)},this.endShadows=function(){f=!1,t()},this.setState=function(A,P,B,H,q,$){if(!l||A===null||A.length===0||f&&!B)f?e(null):t();else{B=f?0:o;var rt=4*B,xt=q.clippingState||null;for(w.value=xt,xt=e(A,H,rt,$),A=0;A!==rt;++A)xt[A]=n[A];q.clippingState=xt,this.numIntersection=P?this.numPlanes:0,this.numPlanes+=B}}}function Jt(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 jt(t,e,i){function n(f){var p=f.target;f=o[p.id],f.index!==null&&e.remove(f.index);for(var y in f.attributes)e.remove(f.attributes[y]);p.removeEventListener("dispose",n),delete o[p.id],(y=l[f.id])&&(e.remove(y),delete l[f.id]),i.memory.geometries--}var o={},l={};return{get:function(f,p){var y=o[p.id];return y||(p.addEventListener("dispose",n),p.isBufferGeometry?y=p:p.isGeometry&&(p._bufferGeometry===void 0&&(p._bufferGeometry=new Ft().setFromObject(f)),y=p._bufferGeometry),o[p.id]=y,i.memory.geometries++,y)},update:function(f){var p=f.index,y=f.attributes;p!==null&&e.update(p,34963);for(var w in y)e.update(y[w],34962);f=f.morphAttributes;for(w in f){p=f[w],y=0;for(var A=p.length;y<A;y++)e.update(p[y],34962)}},getWireframeAttribute:function(f){var p=l[f.id];if(p)return p;p=[];var y=f.index,w=f.attributes;if(y!==null){y=y.array,w=0;for(var A=y.length;w<A;w+=3){var P=y[w+0],B=y[w+1],H=y[w+2];p.push(P,B,B,H,H,P)}}else for(y=w.position.array,w=0,A=y.length/3-1;w<A;w+=3)P=w+0,B=w+1,H=w+2,p.push(P,B,B,H,H,P);return p=new(65535<re(p)?Pt:_t)(p,1),e.update(p,34963),l[f.id]=p}}}function dt(t,e,i,n){var o,l,f;this.setMode=function(p){o=p},this.setIndex=function(p){l=p.type,f=p.bytesPerElement},this.render=function(p,y){t.drawElements(o,y,l,p*f),i.update(y,o)},this.renderInstances=function(p,y,w){if(n.isWebGL2)var A=t;else if(A=e.get("ANGLE_instanced_arrays"),A===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}A[n.isWebGL2?"drawElementsInstanced":"drawElementsInstancedANGLE"](o,w,l,y*f,p.maxInstancedCount),i.update(w,o,p.maxInstancedCount)}}function pt(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 Dt(t,e){return Math.abs(e[1])-Math.abs(t[1])}function ie(t){var e={},i=new Float32Array(8);return{update:function(n,o,l,f){var p=n.morphTargetInfluences,y=p.length;if(n=e[o.id],n===void 0){n=[];for(var w=0;w<y;w++)n[w]=[w,0];e[o.id]=n}var A=l.morphTargets&&o.morphAttributes.position;for(l=l.morphNormals&&o.morphAttributes.normal,w=0;w<y;w++){var P=n[w];P[1]!==0&&(A&&o.removeAttribute("morphTarget"+w),l&&o.removeAttribute("morphNormal"+w))}for(w=0;w<y;w++)P=n[w],P[0]=w,P[1]=p[w];for(n.sort(Dt),w=0;8>w;w++){if((P=n[w])&&(p=P[0],y=P[1])){A&&o.addAttribute("morphTarget"+w,A[p]),l&&o.addAttribute("morphNormal"+w,l[p]),i[w]=y;continue}i[w]=0}f.getUniforms().setValue(t,"morphTargetInfluences",i)}}}function Kt(t,e){var i={};return{update:function(n){var o=e.render.frame,l=n.geometry,f=t.get(n,l);return i[f.id]!==o&&(l.isGeometry&&f.updateFromObject(n),t.update(f),i[f.id]=o),f},dispose:function(){i={}}}}function z(t,e,i,n,o,l,f,p,y,w){t=t!==void 0?t:[],g.call(this,t,e!==void 0?e:301,i,n,o,l,f,p,y,w),this.flipY=!1}function Q(t,e,i,n){g.call(this,null),this.image={data:t,width:e,height:i,depth:n},this.minFilter=this.magFilter=1003,this.flipY=this.generateMipmaps=!1}function st(t,e,i){var n=t[0];if(0>=n||0<n)return t;var o=e*i,l=ah[o];if(l===void 0&&(l=new Float32Array(o),ah[o]=l),e!==0)for(n.toArray(l,0),n=1,o=0;n!==e;++n)o+=i,t[n].toArray(l,o);return l}function nt(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 vt(t,e){for(var i=0,n=e.length;i<n;i++)t[i]=e[i]}function Gt(t,e){var i=La[e];i===void 0&&(i=new Int32Array(e),La[e]=i);for(var n=0;n!==e;++n)i[n]=t.allocTextureUnit();return i}function qt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1f(this.addr,e),i[0]=e)}function Xt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1i(this.addr,e),i[0]=e)}function Ne(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):nt(i,e)||(t.uniform2fv(this.addr,e),vt(i,e))}function Ie(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):nt(i,e)||(t.uniform3fv(this.addr,e),vt(i,e))}function ge(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):nt(i,e)||(t.uniform4fv(this.addr,e),vt(i,e))}function we(t,e){var i=this.cache,n=e.elements;n===void 0?nt(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),vt(i,e)):nt(i,n)||(Yh.set(n),t.uniformMatrix2fv(this.addr,!1,Yh),vt(i,n))}function yi(t,e){var i=this.cache,n=e.elements;n===void 0?nt(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),vt(i,e)):nt(i,n)||(Bu.set(n),t.uniformMatrix3fv(this.addr,!1,Bu),vt(i,n))}function Ei(t,e){var i=this.cache,n=e.elements;n===void 0?nt(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),vt(i,e)):nt(i,n)||(Tl.set(n),t.uniformMatrix4fv(this.addr,!1,Tl),vt(i,n))}function ni(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTexture2D(e||qh,o)}function bi(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTexture3D(e||Jc,o)}function qr(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTextureCube(e||ku,o)}function sr(t,e){var i=this.cache;nt(i,e)||(t.uniform2iv(this.addr,e),vt(i,e))}function sn(t,e){var i=this.cache;nt(i,e)||(t.uniform3iv(this.addr,e),vt(i,e))}function Ao(t,e){var i=this.cache;nt(i,e)||(t.uniform4iv(this.addr,e),vt(i,e))}function zi(t){switch(t){case 5126:return qt;case 35664:return Ne;case 35665:return Ie;case 35666:return ge;case 35674:return we;case 35675:return yi;case 35676:return Ei;case 35678:case 36198:return ni;case 35679:return bi;case 35680:return qr;case 5124:case 35670:return Xt;case 35667:case 35671:return sr;case 35668:case 35672:return sn;case 35669:case 35673:return Ao}}function qo(t,e){var i=this.cache;nt(i,e)||(t.uniform1fv(this.addr,e),vt(i,e))}function ao(t,e){var i=this.cache;nt(i,e)||(t.uniform1iv(this.addr,e),vt(i,e))}function Vl(t,e){var i=this.cache;e=st(e,this.size,2),nt(i,e)||(t.uniform2fv(this.addr,e),this.updateCache(e))}function Mn(t,e){var i=this.cache;e=st(e,this.size,3),nt(i,e)||(t.uniform3fv(this.addr,e),this.updateCache(e))}function na(t,e){var i=this.cache;e=st(e,this.size,4),nt(i,e)||(t.uniform4fv(this.addr,e),this.updateCache(e))}function gs(t,e){var i=this.cache;e=st(e,this.size,4),nt(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),this.updateCache(e))}function vr(t,e){var i=this.cache;e=st(e,this.size,9),nt(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),this.updateCache(e))}function ra(t,e){var i=this.cache;e=st(e,this.size,16),nt(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),this.updateCache(e))}function Za(t,e,i){var n=this.cache,o=e.length,l=Gt(i,o);for(nt(n,l)===!1&&(t.uniform1iv(this.addr,l),vt(n,l)),t=0;t!==o;++t)i.setTexture2D(e[t]||qh,l[t])}function Wl(t,e,i){var n=this.cache,o=e.length,l=Gt(i,o);for(nt(n,l)===!1&&(t.uniform1iv(this.addr,l),vt(n,l)),t=0;t!==o;++t)i.setTextureCube(e[t]||ku,l[t])}function lo(t){switch(t){case 5126:return qo;case 35664:return Vl;case 35665:return Mn;case 35666:return na;case 35674:return gs;case 35675:return vr;case 35676:return ra;case 35678:return Za;case 35680:return Wl;case 5124:case 35670:return ao;case 35667:case 35671:return sr;case 35668:case 35672:return sn;case 35669:case 35673:return Ao}}function Oh(t,e,i){this.id=t,this.addr=i,this.cache=[],this.setValue=zi(e.type)}function oa(t,e,i){this.id=t,this.addr=i,this.cache=[],this.size=e.size,this.setValue=lo(e.type)}function Ja(t){this.id=t,this.seq=[],this.map={}}function ho(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),l=t.getUniformLocation(e,o.name),f=this,p=o.name,y=p.length;for(Zh.lastIndex=0;;){var w=Zh.exec(p),A=Zh.lastIndex,P=w[1],B=w[3];if(w[2]==="]"&&(P|=0),B===void 0||B==="["&&A+2===y){p=f,o=B===void 0?new Oh(P,o,l):new oa(P,o,l),p.seq.push(o),p.map[o.id]=o;break}else B=f.map[P],B===void 0&&(B=new Ja(P),P=f,f=B,P.seq.push(f),P.map[f.id]=f),f=B}}}function $a(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 sa(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),Ja(i)),n}function aa(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 uo(t,e){return e=aa(e),"vec4 "+t+"( vec4 value ) { return "+e[0]+"ToLinear"+e[1]+"; }"}function jl(t,e){return e=aa(e),"vec4 "+t+"( vec4 value ) { return LinearTo"+e[0]+e[1]+"; }"}function Ih(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 Dh(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(ys).join(`
257
+ `)}function sa(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),$a(i)),n}function aa(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 uo(t,e){return e=aa(e),"vec4 "+t+"( vec4 value ) { return "+e[0]+"ToLinear"+e[1]+"; }"}function jl(t,e){return e=aa(e),"vec4 "+t+"( vec4 value ) { return LinearTo"+e[0]+e[1]+"; }"}function Ih(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 Dh(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(ys).join(`
258
258
  `)}function vs(t){var e=[],i;for(i in t){var n=t[i];n!==!1&&e.push("#define "+i+" "+n)}return e.join(`
259
259
  `)}function ys(t){return t!==""}function Xl(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 ql(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function Yr(t){return t.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,function(e,i){if(e=Ci[i],e===void 0)throw Error("Can not resolve #include <"+i+">");return Yr(e)})}function V(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 tt(t,e,i,n,o,l,f){var p=t.context,y=n.defines,w=o.vertexShader,A=o.fragmentShader,P="SHADOWMAP_TYPE_BASIC";l.shadowMapType===1?P="SHADOWMAP_TYPE_PCF":l.shadowMapType===2&&(P="SHADOWMAP_TYPE_PCF_SOFT");var B="ENVMAP_TYPE_CUBE",H="ENVMAP_MODE_REFLECTION",q="ENVMAP_BLENDING_MULTIPLY";if(l.envMap){switch(n.envMap.mapping){case 301:case 302:B="ENVMAP_TYPE_CUBE";break;case 306:case 307:B="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:B="ENVMAP_TYPE_EQUIREC";break;case 305:B="ENVMAP_TYPE_SPHERE"}switch(n.envMap.mapping){case 302:case 304:H="ENVMAP_MODE_REFRACTION"}switch(n.combine){case 0:q="ENVMAP_BLENDING_MULTIPLY";break;case 1:q="ENVMAP_BLENDING_MIX";break;case 2:q="ENVMAP_BLENDING_ADD"}}var $=0<t.gammaFactor?t.gammaFactor:1,rt=f.isWebGL2?"":Dh(n.extensions,l,e),xt=vs(y),gt=p.createProgram();n.isRawShaderMaterial?(y=[xt].filter(ys).join(`
260
260
  `),0<y.length&&(y+=`
@@ -282,7 +282,7 @@
282
282
  #define texture2DProjGradEXT textureProjGrad
283
283
  #define textureCubeGradEXT textureGrad`].join(`
284
284
  `)+`
285
- `+e),A=e+A,w=sa(p,35633,y+w),A=sa(p,35632,A),p.attachShader(gt,w),p.attachShader(gt,A),n.index0AttributeName!==void 0?p.bindAttribLocation(gt,0,n.index0AttributeName):l.morphTargets===!0&&p.bindAttribLocation(gt,0,"position"),p.linkProgram(gt),l=p.getProgramInfoLog(gt).trim(),f=p.getShaderInfoLog(w).trim(),P=p.getShaderInfoLog(A).trim(),H=B=!0,p.getProgramParameter(gt,35714)===!1?(B=!1,console.error("THREE.WebGLProgram: shader error: ",p.getError(),"35715",p.getProgramParameter(gt,35715),"gl.getProgramInfoLog",l,f,P)):l!==""?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",l):(f===""||P==="")&&(H=!1),H&&(this.diagnostics={runnable:B,material:n,programLog:l,vertexShader:{log:f,prefix:y},fragmentShader:{log:P,prefix:e}}),p.deleteShader(w),p.deleteShader(A);var Ct;this.getUniforms=function(){return Ct===void 0&&(Ct=new ho(p,gt,t)),Ct};var wt;return this.getAttributes=function(){if(wt===void 0){for(var Vt={},J=p.getProgramParameter(gt,35721),ot=0;ot<J;ot++){var zt=p.getActiveAttrib(gt,ot).name;Vt[zt]=p.getAttribLocation(gt,zt)}wt=Vt}return wt},this.destroy=function(){p.deleteProgram(gt),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=Bo++,this.code=i,this.usedTimes=1,this.program=gt,this.vertexShader=w,this.fragmentShader=A,this}function lt(t,e,i){function n(p,y){if(p)p.isTexture?w=p.encoding:p.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),w=p.texture.encoding);else var w=3e3;return w===3e3&&y&&(w=3007),w}var o=[],l={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"},f="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(p,y,w,A,P,B,H){var q=l[p.type];if(H.isSkinnedMesh){var $=H.skeleton.bones;if(i.floatVertexTextures)$=1024;else{var rt=Math.min(Math.floor((i.maxVertexUniforms-20)/4),$.length);rt<$.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+$.length+" bones. This GPU supports "+rt+"."),$=0):$=rt}}else $=0;rt=i.precision,p.precision!==null&&(rt=i.getMaxPrecision(p.precision),rt!==p.precision&&console.warn("THREE.WebGLProgram.getParameters:",p.precision,"not supported, using",rt,"instead."));var xt=t.getRenderTarget();return{shaderID:q,precision:rt,supportsVertexTextures:i.vertexTextures,outputEncoding:n(xt?xt.texture:null,t.gammaOutput),map:!!p.map,mapEncoding:n(p.map,t.gammaInput),matcap:!!p.matcap,matcapEncoding:n(p.matcap,t.gammaInput),envMap:!!p.envMap,envMapMode:p.envMap&&p.envMap.mapping,envMapEncoding:n(p.envMap,t.gammaInput),envMapCubeUV:!!p.envMap&&(p.envMap.mapping===306||p.envMap.mapping===307),lightMap:!!p.lightMap,aoMap:!!p.aoMap,emissiveMap:!!p.emissiveMap,emissiveMapEncoding:n(p.emissiveMap,t.gammaInput),bumpMap:!!p.bumpMap,normalMap:!!p.normalMap,objectSpaceNormalMap:p.normalMapType===1,displacementMap:!!p.displacementMap,roughnessMap:!!p.roughnessMap,metalnessMap:!!p.metalnessMap,specularMap:!!p.specularMap,alphaMap:!!p.alphaMap,gradientMap:!!p.gradientMap,combine:p.combine,vertexColors:p.vertexColors,fog:!!A,useFog:p.fog,fogExp:A&&A.isFogExp2,flatShading:p.flatShading,sizeAttenuation:p.sizeAttenuation,logarithmicDepthBuffer:i.logarithmicDepthBuffer,skinning:p.skinning&&0<$,maxBones:$,useVertexTexture:i.floatVertexTextures,morphTargets:p.morphTargets,morphNormals:p.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:y.directional.length,numPointLights:y.point.length,numSpotLights:y.spot.length,numRectAreaLights:y.rectArea.length,numHemiLights:y.hemi.length,numClippingPlanes:P,numClipIntersection:B,dithering:p.dithering,shadowMapEnabled:t.shadowMap.enabled&&H.receiveShadow&&0<w.length,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:p.premultipliedAlpha,alphaTest:p.alphaTest,doubleSided:p.side===2,flipSided:p.side===1,depthPacking:p.depthPacking!==void 0?p.depthPacking:!1}},this.getProgramCode=function(p,y){var w=[];if(y.shaderID?w.push(y.shaderID):(w.push(p.fragmentShader),w.push(p.vertexShader)),p.defines!==void 0)for(var A in p.defines)w.push(A),w.push(p.defines[A]);for(A=0;A<f.length;A++)w.push(y[f[A]]);return w.push(p.onBeforeCompile.toString()),w.push(t.gammaOutput),w.push(t.gammaFactor),w.join()},this.acquireProgram=function(p,y,w,A){for(var P,B=0,H=o.length;B<H;B++){var q=o[B];if(q.code===A){P=q,++P.usedTimes;break}}return P===void 0&&(P=new tt(t,e,A,p,y,w,i),o.push(P)),P},this.releaseProgram=function(p){if(--p.usedTimes===0){var y=o.indexOf(p);o[y]=o[o.length-1],o.pop(),p.destroy()}},this.programs=o}function at(){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 j(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 St(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function ht(){var t=[],e=0,i=[],n=[];return{opaque:i,transparent:n,init:function(){e=0,i.length=0,n.length=0},push:function(o,l,f,p,y){var w=t[e];w===void 0?(w={id:o.id,object:o,geometry:l,material:f,program:f.program,renderOrder:o.renderOrder,z:p,group:y},t[e]=w):(w.id=o.id,w.object=o,w.geometry=l,w.material=f,w.program=f.program,w.renderOrder=o.renderOrder,w.z=p,w.group=y),(f.transparent===!0?n:i).push(w),e++},sort:function(){1<i.length&&i.sort(j),1<n.length&&n.sort(St)}}}function Ot(){var t={};return{get:function(e,i){return e=e.id+","+i.id,i=t[e],i===void 0&&(i=new ht,t[e]=i),i},dispose:function(){t={}}}}function Ht(){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 u,color:new L,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new s};break;case"SpotLight":i={position:new u,direction:new u,color:new L,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new s};break;case"PointLight":i={position:new u,color:new L,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new s,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":i={direction:new u,skyColor:new L,groundColor:new L};break;case"RectAreaLight":i={color:new L,position:new u,halfWidth:new u,halfHeight:new u}}return t[e.id]=i}}}function kt(){var t=new Ht,e={id:Jh++,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 u,n=new c,o=new c;return{setup:function(l,f,p){var y=0,w=0,A=0,P=0,B=0,H=0,q=0,$=0;p=p.matrixWorldInverse;for(var rt=0,xt=l.length;rt<xt;rt++){var gt=l[rt],Ct=gt.color,wt=gt.intensity,Vt=gt.distance,J=gt.shadow&&gt.shadow.map?gt.shadow.map.texture:null;if(gt.isAmbientLight)y+=Ct.r*wt,w+=Ct.g*wt,A+=Ct.b*wt;else if(gt.isDirectionalLight){var ot=t.get(gt);ot.color.copy(gt.color).multiplyScalar(gt.intensity),ot.direction.setFromMatrixPosition(gt.matrixWorld),i.setFromMatrixPosition(gt.target.matrixWorld),ot.direction.sub(i),ot.direction.transformDirection(p),(ot.shadow=gt.castShadow)&&(Ct=gt.shadow,ot.shadowBias=Ct.bias,ot.shadowRadius=Ct.radius,ot.shadowMapSize=Ct.mapSize),e.directionalShadowMap[P]=J,e.directionalShadowMatrix[P]=gt.shadow.matrix,e.directional[P]=ot,P++}else gt.isSpotLight?(ot=t.get(gt),ot.position.setFromMatrixPosition(gt.matrixWorld),ot.position.applyMatrix4(p),ot.color.copy(Ct).multiplyScalar(wt),ot.distance=Vt,ot.direction.setFromMatrixPosition(gt.matrixWorld),i.setFromMatrixPosition(gt.target.matrixWorld),ot.direction.sub(i),ot.direction.transformDirection(p),ot.coneCos=Math.cos(gt.angle),ot.penumbraCos=Math.cos(gt.angle*(1-gt.penumbra)),ot.decay=gt.decay,(ot.shadow=gt.castShadow)&&(Ct=gt.shadow,ot.shadowBias=Ct.bias,ot.shadowRadius=Ct.radius,ot.shadowMapSize=Ct.mapSize),e.spotShadowMap[H]=J,e.spotShadowMatrix[H]=gt.shadow.matrix,e.spot[H]=ot,H++):gt.isRectAreaLight?(ot=t.get(gt),ot.color.copy(Ct).multiplyScalar(wt),ot.position.setFromMatrixPosition(gt.matrixWorld),ot.position.applyMatrix4(p),o.identity(),n.copy(gt.matrixWorld),n.premultiply(p),o.extractRotation(n),ot.halfWidth.set(.5*gt.width,0,0),ot.halfHeight.set(0,.5*gt.height,0),ot.halfWidth.applyMatrix4(o),ot.halfHeight.applyMatrix4(o),e.rectArea[q]=ot,q++):gt.isPointLight?(ot=t.get(gt),ot.position.setFromMatrixPosition(gt.matrixWorld),ot.position.applyMatrix4(p),ot.color.copy(gt.color).multiplyScalar(gt.intensity),ot.distance=gt.distance,ot.decay=gt.decay,(ot.shadow=gt.castShadow)&&(Ct=gt.shadow,ot.shadowBias=Ct.bias,ot.shadowRadius=Ct.radius,ot.shadowMapSize=Ct.mapSize,ot.shadowCameraNear=Ct.camera.near,ot.shadowCameraFar=Ct.camera.far),e.pointShadowMap[B]=J,e.pointShadowMatrix[B]=gt.shadow.matrix,e.point[B]=ot,B++):gt.isHemisphereLight&&(ot=t.get(gt),ot.direction.setFromMatrixPosition(gt.matrixWorld),ot.direction.transformDirection(p),ot.direction.normalize(),ot.skyColor.copy(gt.color).multiplyScalar(wt),ot.groundColor.copy(gt.groundColor).multiplyScalar(wt),e.hemi[$]=ot,$++)}e.ambient[0]=y,e.ambient[1]=w,e.ambient[2]=A,e.directional.length=P,e.spot.length=H,e.rectArea.length=q,e.point.length=B,e.hemi.length=$,e.hash.stateID=e.id,e.hash.directionalLength=P,e.hash.pointLength=B,e.hash.spotLength=H,e.hash.rectAreaLength=q,e.hash.hemiLength=$,e.hash.shadowsLength=f.length},state:e}}function Mt(){var t=new kt,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 he(){var t={};return{get:function(e,i){if(t[e.id]===void 0){var n=new Mt;t[e.id]={},t[e.id][i.id]=n}else t[e.id][i.id]===void 0?(n=new Mt,t[e.id][i.id]=n):n=t[e.id][i.id];return n},dispose:function(){t={}}}}function se(t){Wt.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 te(t){Wt.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new u,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 ye(t,e,i){function n(J,ot,zt,ee,$t,Yt){var Te=J.geometry,me=P,De=J.customDepthMaterial;return zt&&(me=B,De=J.customDistanceMaterial),De?me=De:(De=!1,ot.morphTargets&&(Te&&Te.isBufferGeometry?De=Te.morphAttributes&&Te.morphAttributes.position&&0<Te.morphAttributes.position.length:Te&&Te.isGeometry&&(De=Te.morphTargets&&0<Te.morphTargets.length)),J.isSkinnedMesh&&ot.skinning===!1&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",J),J=J.isSkinnedMesh&&ot.skinning,Te=0,De&&(Te|=1),J&&(Te|=2),me=me[Te]),t.localClippingEnabled&&ot.clipShadows===!0&&ot.clippingPlanes.length!==0&&(Te=me.uuid,De=ot.uuid,J=H[Te],J===void 0&&(J={},H[Te]=J),Te=J[De],Te===void 0&&(Te=me.clone(),J[De]=Te),me=Te),me.visible=ot.visible,me.wireframe=ot.wireframe,me.side=ot.shadowSide!=null?ot.shadowSide:q[ot.side],me.clipShadows=ot.clipShadows,me.clippingPlanes=ot.clippingPlanes,me.clipIntersection=ot.clipIntersection,me.wireframeLinewidth=ot.wireframeLinewidth,me.linewidth=ot.linewidth,zt&&me.isMeshDistanceMaterial&&(me.referencePosition.copy(ee),me.nearDistance=$t,me.farDistance=Yt),me}function o(J,ot,zt,ee){if(J.visible!==!1){if(J.layers.test(ot.layers)&&(J.isMesh||J.isLine||J.isPoints)&&J.castShadow&&(!J.frustumCulled||l.intersectsObject(J))){J.modelViewMatrix.multiplyMatrices(zt.matrixWorldInverse,J.matrixWorld);var $t=e.update(J),Yt=J.material;if(Array.isArray(Yt))for(var Te=$t.groups,me=0,De=Te.length;me<De;me++){var be=Te[me],ae=Yt[be.materialIndex];ae&&ae.visible&&(ae=n(J,ae,ee,A,zt.near,zt.far),t.renderBufferDirect(zt,null,$t,ae,J,be))}else Yt.visible&&(ae=n(J,Yt,ee,A,zt.near,zt.far),t.renderBufferDirect(zt,null,$t,ae,J,null))}for(J=J.children,$t=0,Yt=J.length;$t<Yt;$t++)o(J[$t],ot,zt,ee)}}var l=new E,f=new c,p=new s,y=new s(i,i),w=new u,A=new u,P=Array(4),B=Array(4),H={},q={0:1,1:0,2:2},$=[new u(1,0,0),new u(-1,0,0),new u(0,0,1),new u(0,0,-1),new u(0,1,0),new u(0,-1,0)],rt=[new u(0,1,0),new u(0,1,0),new u(0,1,0),new u(0,1,0),new u(0,0,1),new u(0,0,-1)],xt=[new _,new _,new _,new _,new _,new _];for(i=0;i!==4;++i){var gt=(i&1)!==0,Ct=(i&2)!==0,wt=new se({depthPacking:3201,morphTargets:gt,skinning:Ct});P[i]=wt,gt=new te({morphTargets:gt,skinning:Ct}),B[i]=gt}var Vt=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(J,ot,zt){if(Vt.enabled!==!1&&(Vt.autoUpdate!==!1||Vt.needsUpdate!==!1)&&J.length!==0){var ee=t.state;ee.disable(3042),ee.buffers.color.setClear(1,1,1,1),ee.buffers.depth.setTest(!0),ee.setScissorTest(!1);for(var $t,Yt=0,Te=J.length;Yt<Te;Yt++){var me=J[Yt];$t=me.shadow;var De=me&&me.isPointLight;if($t===void 0)console.warn("THREE.WebGLShadowMap:",me,"has no shadow.");else{var be=$t.camera;if(p.copy($t.mapSize),p.min(y),De){var ae=p.x,We=p.y;xt[0].set(2*ae,We,ae,We),xt[1].set(0,We,ae,We),xt[2].set(3*ae,We,ae,We),xt[3].set(ae,We,ae,We),xt[4].set(3*ae,0,ae,We),xt[5].set(ae,0,ae,We),p.x*=4,p.y*=2}for($t.map===null&&($t.map=new S(p.x,p.y,{minFilter:1003,magFilter:1003,format:1023}),$t.map.texture.name=me.name+".shadowMap",be.updateProjectionMatrix()),$t.isSpotLightShadow&&$t.update(me),ae=$t.map,We=$t.matrix,A.setFromMatrixPosition(me.matrixWorld),be.position.copy(A),De?($t=6,We.makeTranslation(-A.x,-A.y,-A.z)):($t=1,w.setFromMatrixPosition(me.target.matrixWorld),be.lookAt(w),be.updateMatrixWorld(),We.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),We.multiply(be.projectionMatrix),We.multiply(be.matrixWorldInverse)),t.setRenderTarget(ae),t.clear(),me=0;me<$t;me++)De&&(w.copy(be.position),w.add($[me]),be.up.copy(rt[me]),be.lookAt(w),be.updateMatrixWorld(),ee.viewport(xt[me])),f.multiplyMatrices(be.projectionMatrix,be.matrixWorldInverse),l.setFromMatrix(f),o(ot,zt,be,De)}}Vt.needsUpdate=!1}}}function ue(t,e,i,n){function o(Ut,Ye,ei){var Wi=new Uint8Array(4),Ae=t.createTexture();for(t.bindTexture(Ut,Ae),t.texParameteri(Ut,10241,9728),t.texParameteri(Ut,10240,9728),Ut=0;Ut<ei;Ut++)t.texImage2D(Ye+Ut,0,6408,1,1,0,6408,5121,Wi);return Ae}function l(Ut,Ye){xt[Ut]=1,gt[Ut]===0&&(t.enableVertexAttribArray(Ut),gt[Ut]=1),Ct[Ut]!==Ye&&((n.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](Ut,Ye),Ct[Ut]=Ye)}function f(Ut){wt[Ut]!==!0&&(t.enable(Ut),wt[Ut]=!0)}function p(Ut){wt[Ut]!==!1&&(t.disable(Ut),wt[Ut]=!1)}function y(Ut,Ye,ei,Wi,Ae,Xe,ri,Li){if(Ut===0)ot&&(p(3042),ot=!1);else if(ot||(f(3042),ot=!0),Ut!==5){if(Ut!==zt||Li!==be){if((ee!==100||Te!==100)&&(t.blendEquation(32774),Te=ee=100),Li)switch(Ut){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: ",Ut)}else switch(Ut){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: ",Ut)}De=me=Yt=$t=null,zt=Ut,be=Li}}else Ae=Ae||Ye,Xe=Xe||ei,ri=ri||Wi,(Ye!==ee||Ae!==Te)&&(t.blendEquationSeparate(i.convert(Ye),i.convert(Ae)),ee=Ye,Te=Ae),(ei!==$t||Wi!==Yt||Xe!==me||ri!==De)&&(t.blendFuncSeparate(i.convert(ei),i.convert(Wi),i.convert(Xe),i.convert(ri)),$t=ei,Yt=Wi,me=Xe,De=ri),zt=Ut,be=null}function w(Ut){ae!==Ut&&(Ut?t.frontFace(2304):t.frontFace(2305),ae=Ut)}function A(Ut){Ut!==0?(f(2884),Ut!==We&&(Ut===1?t.cullFace(1029):Ut===2?t.cullFace(1028):t.cullFace(1032))):p(2884),We=Ut}function P(Ut,Ye,ei){Ut?(f(32823),(fi!==Ye||Cn!==ei)&&(t.polygonOffset(Ye,ei),fi=Ye,Cn=ei)):p(32823)}function B(Ut){Ut===void 0&&(Ut=33984+_n-1),Vi!==Ut&&(t.activeTexture(Ut),Vi=Ut)}var H=new function(){var Ut=!1,Ye=new _,ei=null,Wi=new _(0,0,0,0);return{setMask:function(Ae){ei===Ae||Ut||(t.colorMask(Ae,Ae,Ae,Ae),ei=Ae)},setLocked:function(Ae){Ut=Ae},setClear:function(Ae,Xe,ri,Li,Ai){Ai===!0&&(Ae*=Li,Xe*=Li,ri*=Li),Ye.set(Ae,Xe,ri,Li),Wi.equals(Ye)===!1&&(t.clearColor(Ae,Xe,ri,Li),Wi.copy(Ye))},reset:function(){Ut=!1,ei=null,Wi.set(-1,0,0,0)}}},q=new function(){var Ut=!1,Ye=null,ei=null,Wi=null;return{setTest:function(Ae){Ae?f(2929):p(2929)},setMask:function(Ae){Ye===Ae||Ut||(t.depthMask(Ae),Ye=Ae)},setFunc:function(Ae){if(ei!==Ae){if(Ae)switch(Ae){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);ei=Ae}},setLocked:function(Ae){Ut=Ae},setClear:function(Ae){Wi!==Ae&&(t.clearDepth(Ae),Wi=Ae)},reset:function(){Ut=!1,Wi=ei=Ye=null}}},$=new function(){var Ut=!1,Ye=null,ei=null,Wi=null,Ae=null,Xe=null,ri=null,Li=null,Ai=null;return{setTest:function(ne){ne?f(2960):p(2960)},setMask:function(ne){Ye===ne||Ut||(t.stencilMask(ne),Ye=ne)},setFunc:function(ne,ii,Ze){(ei!==ne||Wi!==ii||Ae!==Ze)&&(t.stencilFunc(ne,ii,Ze),ei=ne,Wi=ii,Ae=Ze)},setOp:function(ne,ii,Ze){(Xe!==ne||ri!==ii||Li!==Ze)&&(t.stencilOp(ne,ii,Ze),Xe=ne,ri=ii,Li=Ze)},setLocked:function(ne){Ut=ne},setClear:function(ne){Ai!==ne&&(t.clearStencil(ne),Ai=ne)},reset:function(){Ut=!1,Ai=Li=ri=Xe=Ae=Wi=ei=Ye=null}}},rt=t.getParameter(34921),xt=new Uint8Array(rt),gt=new Uint8Array(rt),Ct=new Uint8Array(rt),wt={},Vt=null,J=null,ot=null,zt=null,ee=null,$t=null,Yt=null,Te=null,me=null,De=null,be=!1,ae=null,We=null,Qe=null,fi=null,Cn=null,_n=t.getParameter(35661),qi=!1;rt=0,rt=t.getParameter(7938),rt.indexOf("WebGL")!==-1?(rt=parseFloat(/^WebGL ([0-9])/.exec(rt)[1]),qi=1<=rt):rt.indexOf("OpenGL ES")!==-1&&(rt=parseFloat(/^OpenGL ES ([0-9])/.exec(rt)[1]),qi=2<=rt);var Vi=null,on={},An=new _,Ce=new _,ti={};return ti[3553]=o(3553,3553,1),ti[34067]=o(34067,34069,6),H.setClear(0,0,0,1),q.setClear(1),$.setClear(0),f(2929),q.setFunc(3),w(!1),A(1),f(2884),y(0),{buffers:{color:H,depth:q,stencil:$},initAttributes:function(){for(var Ut=0,Ye=xt.length;Ut<Ye;Ut++)xt[Ut]=0},enableAttribute:function(Ut){l(Ut,0)},enableAttributeAndDivisor:l,disableUnusedAttributes:function(){for(var Ut=0,Ye=gt.length;Ut!==Ye;++Ut)gt[Ut]!==xt[Ut]&&(t.disableVertexAttribArray(Ut),gt[Ut]=0)},enable:f,disable:p,getCompressedTextureFormats:function(){if(Vt===null&&(Vt=[],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 Ut=t.getParameter(34467),Ye=0;Ye<Ut.length;Ye++)Vt.push(Ut[Ye]);return Vt},useProgram:function(Ut){return J!==Ut?(t.useProgram(Ut),J=Ut,!0):!1},setBlending:y,setMaterial:function(Ut,Ye){Ut.side===2?p(2884):f(2884);var ei=Ut.side===1;Ye&&(ei=!ei),w(ei),Ut.blending===1&&Ut.transparent===!1?y(0):y(Ut.blending,Ut.blendEquation,Ut.blendSrc,Ut.blendDst,Ut.blendEquationAlpha,Ut.blendSrcAlpha,Ut.blendDstAlpha,Ut.premultipliedAlpha),q.setFunc(Ut.depthFunc),q.setTest(Ut.depthTest),q.setMask(Ut.depthWrite),H.setMask(Ut.colorWrite),P(Ut.polygonOffset,Ut.polygonOffsetFactor,Ut.polygonOffsetUnits)},setFlipSided:w,setCullFace:A,setLineWidth:function(Ut){Ut!==Qe&&(qi&&t.lineWidth(Ut),Qe=Ut)},setPolygonOffset:P,setScissorTest:function(Ut){Ut?f(3089):p(3089)},activeTexture:B,bindTexture:function(Ut,Ye){Vi===null&&B();var ei=on[Vi];ei===void 0&&(ei={type:void 0,texture:void 0},on[Vi]=ei),(ei.type!==Ut||ei.texture!==Ye)&&(t.bindTexture(Ut,Ye||ti[Ut]),ei.type=Ut,ei.texture=Ye)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(Ut){console.error("THREE.WebGLState:",Ut)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(Ut){console.error("THREE.WebGLState:",Ut)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(Ut){console.error("THREE.WebGLState:",Ut)}},scissor:function(Ut){An.equals(Ut)===!1&&(t.scissor(Ut.x,Ut.y,Ut.z,Ut.w),An.copy(Ut))},viewport:function(Ut){Ce.equals(Ut)===!1&&(t.viewport(Ut.x,Ut.y,Ut.z,Ut.w),Ce.copy(Ut))},reset:function(){for(var Ut=0;Ut<gt.length;Ut++)gt[Ut]===1&&(t.disableVertexAttribArray(Ut),gt[Ut]=0);wt={},Vi=Vt=null,on={},We=ae=zt=J=null,H.reset(),q.reset(),$.reset()}}}function je(t,e,i,n,o,l,f){function p(J,ot){if(J.width>ot||J.height>ot){if("data"in J){console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+J.width+"x"+J.height+").");return}ot/=Math.max(J.width,J.height);var zt=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return zt.width=Math.floor(J.width*ot),zt.height=Math.floor(J.height*ot),zt.getContext("2d").drawImage(J,0,0,J.width,J.height,0,0,zt.width,zt.height),console.warn("THREE.WebGLRenderer: image is too big ("+J.width+"x"+J.height+"). Resized to "+zt.width+"x"+zt.height),zt}return J}function y(J){return di.isPowerOfTwo(J.width)&&di.isPowerOfTwo(J.height)}function w(J,ot){return J.generateMipmaps&&ot&&J.minFilter!==1003&&J.minFilter!==1006}function A(J,ot,zt,ee){t.generateMipmap(J),n.get(ot).__maxMipLevel=Math.log(Math.max(zt,ee))*Math.LOG2E}function P(J,ot){if(!o.isWebGL2)return J;if(J===6403){if(ot===5126)return 33326;if(ot===5131)return 33325;if(ot===5121)return 33321}if(J===6407){if(ot===5126)return 34837;if(ot===5131)return 34843;if(ot===5121)return 32849}if(J===6408){if(ot===5126)return 34836;if(ot===5131)return 34842;if(ot===5121)return 32856}return J}function B(J){return J===1003||J===1004||J===1005?9728:9729}function H(J){J=J.target,J.removeEventListener("dispose",H);t:{var ot=n.get(J);if(J.image&&ot.__image__webglTextureCube)t.deleteTexture(ot.__image__webglTextureCube);else{if(ot.__webglInit===void 0)break t;t.deleteTexture(ot.__webglTexture)}n.remove(J)}J.isVideoTexture&&delete wt[J.id],f.memory.textures--}function q(J){J=J.target,J.removeEventListener("dispose",q);var ot=n.get(J),zt=n.get(J.texture);if(J){if(zt.__webglTexture!==void 0&&t.deleteTexture(zt.__webglTexture),J.depthTexture&&J.depthTexture.dispose(),J.isWebGLRenderTargetCube)for(zt=0;6>zt;zt++)t.deleteFramebuffer(ot.__webglFramebuffer[zt]),ot.__webglDepthbuffer&&t.deleteRenderbuffer(ot.__webglDepthbuffer[zt]);else t.deleteFramebuffer(ot.__webglFramebuffer),ot.__webglDepthbuffer&&t.deleteRenderbuffer(ot.__webglDepthbuffer);n.remove(J.texture),n.remove(J)}f.memory.textures--}function $(J,ot){var zt=n.get(J);if(J.isVideoTexture){var ee=J.id,$t=f.render.frame;wt[ee]!==$t&&(wt[ee]=$t,J.update())}if(0<J.version&&zt.__version!==J.version)if(ee=J.image,ee===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(ee.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{xt(zt,J,ot);return}i.activeTexture(33984+ot),i.bindTexture(3553,zt.__webglTexture)}function rt(J,ot,zt){zt?(t.texParameteri(J,10242,l.convert(ot.wrapS)),t.texParameteri(J,10243,l.convert(ot.wrapT)),t.texParameteri(J,10240,l.convert(ot.magFilter)),t.texParameteri(J,10241,l.convert(ot.minFilter))):(t.texParameteri(J,10242,33071),t.texParameteri(J,10243,33071),ot.wrapS===1001&&ot.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(J,10240,B(ot.magFilter)),t.texParameteri(J,10241,B(ot.minFilter)),ot.minFilter!==1003&&ot.minFilter!==1006&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!(zt=e.get("EXT_texture_filter_anisotropic"))||ot.type===1015&&e.get("OES_texture_float_linear")===null||ot.type===1016&&(o.isWebGL2||e.get("OES_texture_half_float_linear"))===null||!(1<ot.anisotropy||n.get(ot).__currentAnisotropy)||(t.texParameterf(J,zt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(ot.anisotropy,o.getMaxAnisotropy())),n.get(ot).__currentAnisotropy=ot.anisotropy)}function xt(J,ot,zt){var ee=ot.isDataTexture3D?32879:3553;J.__webglInit===void 0&&(J.__webglInit=!0,ot.addEventListener("dispose",H),J.__webglTexture=t.createTexture(),f.memory.textures++),i.activeTexture(33984+zt),i.bindTexture(ee,J.__webglTexture),t.pixelStorei(37440,ot.flipY),t.pixelStorei(37441,ot.premultiplyAlpha),t.pixelStorei(3317,ot.unpackAlignment),zt=p(ot.image,o.maxTextureSize);var $t=o.isWebGL2?!1:ot.wrapS!==1001||ot.wrapT!==1001||ot.minFilter!==1003&&ot.minFilter!==1006;$t&&y(zt)===!1&&(zt instanceof HTMLImageElement||zt instanceof HTMLCanvasElement||zt instanceof ImageBitmap)&&(Vt===void 0&&(Vt=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),Vt.width=di.floorPowerOfTwo(zt.width),Vt.height=di.floorPowerOfTwo(zt.height),Vt.getContext("2d").drawImage(zt,0,0,Vt.width,Vt.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+zt.width+"x"+zt.height+"). Resized to "+Vt.width+"x"+Vt.height),zt=Vt),$t=y(zt);var Yt=l.convert(ot.format),Te=l.convert(ot.type),me=P(Yt,Te);rt(ee,ot,$t);var De=ot.mipmaps;if(ot.isDepthTexture){if(me=6402,ot.type===1015){if(!o.isWebGL2)throw Error("Float Depth Texture only supported in WebGL2.0");me=36012}else o.isWebGL2&&(me=33189);ot.format===1026&&me===6402&&ot.type!==1012&&ot.type!==1014&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),ot.type=1012,Te=l.convert(ot.type)),ot.format===1027&&(me=34041,ot.type!==1020&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),ot.type=1020,Te=l.convert(ot.type))),i.texImage2D(3553,0,me,zt.width,zt.height,0,Yt,Te,null)}else if(ot.isDataTexture)if(0<De.length&&$t){for(var be=0,ae=De.length;be<ae;be++)ee=De[be],i.texImage2D(3553,be,me,ee.width,ee.height,0,Yt,Te,ee.data);ot.generateMipmaps=!1,J.__maxMipLevel=De.length-1}else i.texImage2D(3553,0,me,zt.width,zt.height,0,Yt,Te,zt.data),J.__maxMipLevel=0;else if(ot.isCompressedTexture){for(be=0,ae=De.length;be<ae;be++)ee=De[be],ot.format!==1023&&ot.format!==1022?-1<i.getCompressedTextureFormats().indexOf(Yt)?i.compressedTexImage2D(3553,be,me,ee.width,ee.height,0,ee.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):i.texImage2D(3553,be,me,ee.width,ee.height,0,Yt,Te,ee.data);J.__maxMipLevel=De.length-1}else if(ot.isDataTexture3D)i.texImage3D(32879,0,me,zt.width,zt.height,zt.depth,0,Yt,Te,zt.data),J.__maxMipLevel=0;else if(0<De.length&&$t){for(be=0,ae=De.length;be<ae;be++)ee=De[be],i.texImage2D(3553,be,me,Yt,Te,ee);ot.generateMipmaps=!1,J.__maxMipLevel=De.length-1}else i.texImage2D(3553,0,me,Yt,Te,zt),J.__maxMipLevel=0;w(ot,$t)&&A(3553,ot,zt.width,zt.height),J.__version=ot.version,ot.onUpdate&&ot.onUpdate(ot)}function gt(J,ot,zt,ee){var $t=l.convert(ot.texture.format),Yt=l.convert(ot.texture.type),Te=P($t,Yt);i.texImage2D(ee,0,Te,ot.width,ot.height,0,$t,Yt,null),t.bindFramebuffer(36160,J),t.framebufferTexture2D(36160,zt,ee,n.get(ot.texture).__webglTexture,0),t.bindFramebuffer(36160,null)}function Ct(J,ot){t.bindRenderbuffer(36161,J),ot.depthBuffer&&!ot.stencilBuffer?(t.renderbufferStorage(36161,33189,ot.width,ot.height),t.framebufferRenderbuffer(36160,36096,36161,J)):ot.depthBuffer&&ot.stencilBuffer?(t.renderbufferStorage(36161,34041,ot.width,ot.height),t.framebufferRenderbuffer(36160,33306,36161,J)):t.renderbufferStorage(36161,32854,ot.width,ot.height),t.bindRenderbuffer(36161,null)}var wt={},Vt;this.setTexture2D=$,this.setTexture3D=function(J,ot){var zt=n.get(J);0<J.version&&zt.__version!==J.version?xt(zt,J,ot):(i.activeTexture(33984+ot),i.bindTexture(32879,zt.__webglTexture))},this.setTextureCube=function(J,ot){var zt=n.get(J);if(J.image.length===6)if(0<J.version&&zt.__version!==J.version){zt.__image__webglTextureCube||(J.addEventListener("dispose",H),zt.__image__webglTextureCube=t.createTexture(),f.memory.textures++),i.activeTexture(33984+ot),i.bindTexture(34067,zt.__image__webglTextureCube),t.pixelStorei(37440,J.flipY),ot=J&&J.isCompressedTexture;for(var ee=J.image[0]&&J.image[0].isDataTexture,$t=[],Yt=0;6>Yt;Yt++)$t[Yt]=ot||ee?ee?J.image[Yt].image:J.image[Yt]:p(J.image[Yt],o.maxCubemapSize);var Te=$t[0],me=y(Te),De=l.convert(J.format),be=l.convert(J.type),ae=P(De,be);for(rt(34067,J,me),Yt=0;6>Yt;Yt++)if(ot)for(var We,Qe=$t[Yt].mipmaps,fi=0,Cn=Qe.length;fi<Cn;fi++)We=Qe[fi],J.format!==1023&&J.format!==1022?-1<i.getCompressedTextureFormats().indexOf(De)?i.compressedTexImage2D(34069+Yt,fi,ae,We.width,We.height,0,We.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):i.texImage2D(34069+Yt,fi,ae,We.width,We.height,0,De,be,We.data);else ee?i.texImage2D(34069+Yt,0,ae,$t[Yt].width,$t[Yt].height,0,De,be,$t[Yt].data):i.texImage2D(34069+Yt,0,ae,De,be,$t[Yt]);zt.__maxMipLevel=ot?Qe.length-1:0,w(J,me)&&A(34067,J,Te.width,Te.height),zt.__version=J.version,J.onUpdate&&J.onUpdate(J)}else i.activeTexture(33984+ot),i.bindTexture(34067,zt.__image__webglTextureCube)},this.setTextureCubeDynamic=function(J,ot){i.activeTexture(33984+ot),i.bindTexture(34067,n.get(J).__webglTexture)},this.setupRenderTarget=function(J){var ot=n.get(J),zt=n.get(J.texture);J.addEventListener("dispose",q),zt.__webglTexture=t.createTexture(),f.memory.textures++;var ee=J.isWebGLRenderTargetCube===!0,$t=y(J);if(ee){ot.__webglFramebuffer=[];for(var Yt=0;6>Yt;Yt++)ot.__webglFramebuffer[Yt]=t.createFramebuffer()}else ot.__webglFramebuffer=t.createFramebuffer();if(ee){for(i.bindTexture(34067,zt.__webglTexture),rt(34067,J.texture,$t),Yt=0;6>Yt;Yt++)gt(ot.__webglFramebuffer[Yt],J,36064,34069+Yt);w(J.texture,$t)&&A(34067,J.texture,J.width,J.height),i.bindTexture(34067,null)}else i.bindTexture(3553,zt.__webglTexture),rt(3553,J.texture,$t),gt(ot.__webglFramebuffer,J,36064,3553),w(J.texture,$t)&&A(3553,J.texture,J.width,J.height),i.bindTexture(3553,null);if(J.depthBuffer){if(ot=n.get(J),zt=J.isWebGLRenderTargetCube===!0,J.depthTexture){if(zt)throw Error("target.depthTexture not supported in Cube render targets");if(J&&J.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,ot.__webglFramebuffer),!J.depthTexture||!J.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");if(n.get(J.depthTexture).__webglTexture&&J.depthTexture.image.width===J.width&&J.depthTexture.image.height===J.height||(J.depthTexture.image.width=J.width,J.depthTexture.image.height=J.height,J.depthTexture.needsUpdate=!0),$(J.depthTexture,0),ot=n.get(J.depthTexture).__webglTexture,J.depthTexture.format===1026)t.framebufferTexture2D(36160,36096,3553,ot,0);else if(J.depthTexture.format===1027)t.framebufferTexture2D(36160,33306,3553,ot,0);else throw Error("Unknown depthTexture format")}else if(zt)for(ot.__webglDepthbuffer=[],zt=0;6>zt;zt++)t.bindFramebuffer(36160,ot.__webglFramebuffer[zt]),ot.__webglDepthbuffer[zt]=t.createRenderbuffer(),Ct(ot.__webglDepthbuffer[zt],J);else t.bindFramebuffer(36160,ot.__webglFramebuffer),ot.__webglDepthbuffer=t.createRenderbuffer(),Ct(ot.__webglDepthbuffer,J);t.bindFramebuffer(36160,null)}},this.updateRenderTargetMipmap=function(J){var ot=J.texture,zt=y(J);if(w(ot,zt)){zt=J.isWebGLRenderTargetCube?34067:3553;var ee=n.get(ot).__webglTexture;i.bindTexture(zt,ee),A(zt,ot,J.width,J.height),i.bindTexture(zt,null)}}}function He(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 ci(){N.call(this),this.type="Group"}function Be(){N.call(this),this.type="Camera",this.matrixWorldInverse=new c,this.projectionMatrix=new c,this.projectionMatrixInverse=new c}function _e(t,e,i,n){Be.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 Fe(t){_e.call(this),this.cameras=t||[]}function fe(t,e,i){as.setFromMatrixPosition(e.matrixWorld),wr.setFromMatrixPosition(i.matrixWorld);var n=as.distanceTo(wr),o=e.projectionMatrix.elements,l=i.projectionMatrix.elements,f=o[14]/(o[10]-1);i=o[14]/(o[10]+1);var p=(o[9]+1)/o[5],y=(o[9]-1)/o[5],w=(o[8]-1)/o[0],A=(l[8]+1)/l[0];o=f*w,l=f*A,A=n/(-w+A),w=A*-w,e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(w),t.translateZ(A),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.getInverse(t.matrixWorld),e=f+A,f=i+A,t.projectionMatrix.makePerspective(o-w,l+(n-w),p*i/f*e,y*i/f*e,e,f)}function mi(t){function e(){return o!==null&&o.isPresenting===!0}function i(){if(e()){var J=o.getEyeParameters("left"),ot=J.renderWidth*A;J=J.renderHeight*A,Ct=t.getPixelRatio(),gt=t.getSize(),t.setDrawingBufferSize(2*ot,J,1),Vt.start()}else n.enabled&&t.setDrawingBufferSize(gt.width,gt.height,Ct),Vt.stop()}var n=this,o=null,l=null,f=null,p=[],y=new c,w=new c,A=1,P="stage";typeof window<"u"&&"VRFrameData"in window&&(l=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",i,!1));var B=new c,H=new d,q=new u,$=new _e;$.bounds=new _(0,0,.5,1),$.layers.enable(1);var rt=new _e;rt.bounds=new _(.5,0,.5,1),rt.layers.enable(2);var xt=new Fe([$,rt]);xt.layers.enable(1),xt.layers.enable(2);var gt,Ct,wt=[];this.enabled=!1,this.getController=function(J){var ot=p[J];return ot===void 0&&(ot=new ci,ot.matrixAutoUpdate=!1,ot.visible=!1,p[J]=ot),ot},this.getDevice=function(){return o},this.setDevice=function(J){J!==void 0&&(o=J),Vt.setContext(J)},this.setFramebufferScaleFactor=function(J){A=J},this.setFrameOfReferenceType=function(J){P=J},this.setPoseTarget=function(J){J!==void 0&&(f=J)},this.getCamera=function(J){var ot=P==="stage"?1.6:0;if(o===null)return J.position.set(0,ot,0),J;if(o.depthNear=J.near,o.depthFar=J.far,o.getFrameData(l),P==="stage"){var zt=o.stageParameters;zt?y.fromArray(zt.sittingToStandingTransform):y.makeTranslation(0,ot,0)}if(ot=l.pose,zt=f!==null?f:J,zt.matrix.copy(y),zt.matrix.decompose(zt.position,zt.quaternion,zt.scale),ot.orientation!==null&&(H.fromArray(ot.orientation),zt.quaternion.multiply(H)),ot.position!==null&&(H.setFromRotationMatrix(y),q.fromArray(ot.position),q.applyQuaternion(H),zt.position.add(q)),zt.updateMatrixWorld(),o.isPresenting===!1)return J;$.near=J.near,rt.near=J.near,$.far=J.far,rt.far=J.far,$.matrixWorldInverse.fromArray(l.leftViewMatrix),rt.matrixWorldInverse.fromArray(l.rightViewMatrix),w.getInverse(y),P==="stage"&&($.matrixWorldInverse.multiply(w),rt.matrixWorldInverse.multiply(w)),J=zt.parent,J!==null&&(B.getInverse(J.matrixWorld),$.matrixWorldInverse.multiply(B),rt.matrixWorldInverse.multiply(B)),$.matrixWorld.getInverse($.matrixWorldInverse),rt.matrixWorld.getInverse(rt.matrixWorldInverse),$.projectionMatrix.fromArray(l.leftProjectionMatrix),rt.projectionMatrix.fromArray(l.rightProjectionMatrix),fe(xt,$,rt),J=o.getLayers(),J.length&&(J=J[0],J.leftBounds!==null&&J.leftBounds.length===4&&$.bounds.fromArray(J.leftBounds),J.rightBounds!==null&&J.rightBounds.length===4&&rt.bounds.fromArray(J.rightBounds));t:for(J=0;J<p.length;J++){ot=p[J];e:{zt=J;for(var ee=navigator.getGamepads&&navigator.getGamepads(),$t=0,Yt=0,Te=ee.length;$t<Te;$t++){var me=ee[$t];if(me&&(me.id==="Daydream Controller"||me.id==="Gear VR Controller"||me.id==="Oculus Go Controller"||me.id==="OpenVR Gamepad"||me.id.startsWith("Oculus Touch")||me.id.startsWith("Spatial Controller"))){if(Yt===zt){zt=me;break e}Yt++}}zt=void 0}if(zt!==void 0&&zt.pose!==void 0){if(zt.pose===null)break t;ee=zt.pose,ee.hasPosition===!1&&ot.position.set(.2,-.6,-.05),ee.position!==null&&ot.position.fromArray(ee.position),ee.orientation!==null&&ot.quaternion.fromArray(ee.orientation),ot.matrix.compose(ot.position,ot.quaternion,ot.scale),ot.matrix.premultiply(y),ot.matrix.decompose(ot.position,ot.quaternion,ot.scale),ot.matrixWorldNeedsUpdate=!0,ot.visible=!0,ee=zt.id==="Daydream Controller"?0:1,wt[J]!==zt.buttons[ee].pressed&&(wt[J]=zt.buttons[ee].pressed,wt[J]===!0?ot.dispatchEvent({type:"selectstart"}):(ot.dispatchEvent({type:"selectend"}),ot.dispatchEvent({type:"select"})))}else ot.visible=!1}return xt},this.getStandingMatrix=function(){return y},this.isPresenting=e;var Vt=new T;this.setAnimationLoop=function(J){Vt.setAnimationLoop(J)},this.submitFrame=function(){e()&&o.submitFrame()},this.dispose=function(){typeof window<"u"&&window.removeEventListener("vrdisplaypresentchange",i)}}function Le(t){function e(){return p!==null&&w!==null}function i(Ct){var wt=B[H.indexOf(Ct.inputSource)];wt&&wt.dispatchEvent({type:Ct.type})}function n(){t.setFramebuffer(null),gt.stop()}function o(Ct,wt){wt===null?Ct.matrixWorld.copy(Ct.matrix):Ct.matrixWorld.multiplyMatrices(wt.matrixWorld,Ct.matrix),Ct.matrixWorldInverse.getInverse(Ct.matrixWorld)}var l=t.context,f=null,p=null,y=1,w=null,A="stage",P=null,B=[],H=[],q=new _e;q.layers.enable(1),q.viewport=new _;var $=new _e;$.layers.enable(2),$.viewport=new _;var rt=new Fe([q,$]);rt.layers.enable(1),rt.layers.enable(2),this.enabled=!1,this.getController=function(Ct){var wt=B[Ct];return wt===void 0&&(wt=new ci,wt.matrixAutoUpdate=!1,wt.visible=!1,B[Ct]=wt),wt},this.getDevice=function(){return f},this.setDevice=function(Ct){Ct!==void 0&&(f=Ct),Ct instanceof XRDevice&&l.setCompatibleXRDevice(Ct)},this.setFramebufferScaleFactor=function(Ct){y=Ct},this.setFrameOfReferenceType=function(Ct){A=Ct},this.setSession=function(Ct){p=Ct,p!==null&&(p.addEventListener("select",i),p.addEventListener("selectstart",i),p.addEventListener("selectend",i),p.addEventListener("end",n),p.baseLayer=new XRWebGLLayer(p,l,{framebufferScaleFactor:y}),p.requestFrameOfReference(A).then(function(wt){w=wt,t.setFramebuffer(p.baseLayer.framebuffer),gt.setContext(p),gt.start()}),H=p.getInputSources(),p.addEventListener("inputsourceschange",function(){H=p.getInputSources(),console.log(H);for(var wt=0;wt<B.length;wt++)B[wt].userData.inputSource=H[wt]}))},this.getCamera=function(Ct){if(e()){var wt=Ct.parent,Vt=rt.cameras;o(rt,wt);for(var J=0;J<Vt.length;J++)o(Vt[J],wt);for(Ct.matrixWorld.copy(rt.matrixWorld),Ct=Ct.children,J=0,wt=Ct.length;J<wt;J++)Ct[J].updateMatrixWorld(!0);return fe(rt,q,$),rt}return Ct},this.isPresenting=e;var xt=null,gt=new T;gt.setAnimationLoop(function(Ct,wt){if(P=wt.getDevicePose(w),P!==null)for(var Vt=p.baseLayer,J=wt.views,ot=0;ot<J.length;ot++){var zt=J[ot],ee=Vt.getViewport(zt),$t=P.getViewMatrix(zt),Yt=rt.cameras[ot];Yt.matrix.fromArray($t).getInverse(Yt.matrix),Yt.projectionMatrix.fromArray(zt.projectionMatrix),Yt.viewport.set(ee.x,ee.y,ee.width,ee.height),ot===0&&rt.matrix.copy(Yt.matrix)}for(ot=0;ot<B.length;ot++){if(Vt=B[ot],(J=H[ot])&&(J=wt.getInputPose(J,w),J!==null)){"targetRay"in J?Vt.matrix.elements=J.targetRay.transformMatrix:"pointerMatrix"in J&&(Vt.matrix.elements=J.pointerMatrix),Vt.matrix.decompose(Vt.position,Vt.rotation,Vt.scale),Vt.visible=!0;continue}Vt.visible=!1}xt&&xt(Ct)}),this.setAnimationLoop=function(Ct){xt=Ct},this.dispose=function(){},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}function xe(t){var e;function i(){ii=new Jt(ne),Ze=new Qi(ne,ii,t),Ze.isWebGL2||(ii.get("WEBGL_depth_texture"),ii.get("OES_texture_float"),ii.get("OES_texture_half_float"),ii.get("OES_texture_half_float_linear"),ii.get("OES_standard_derivatives"),ii.get("OES_element_index_uint"),ii.get("ANGLE_instanced_arrays")),ii.get("OES_texture_float_linear"),In=new He(ne,ii,Ze),li=new ue(ne,ii,In,Ze),li.scissor(qi.copy(Ye).multiplyScalar(ti)),li.viewport(_n.copy(Ut).multiplyScalar(ti)),xn=new pt,Pn=new at,No=new je(ne,ii,li,Pn,Ze,In,xn),Oa=new M(ne),Kh=new jt(ne,Oa,xn),Ia=new Kt(Kh,xn),Qh=new ie(ne),Gs=new lt(Yt,ii,Ze),El=new Ot,Hs=new he,hs=new Di(Yt,li,Ia,J),tu=new mn(ne,ii,xn,Ze),er=new dt(ne,ii,xn,Ze),xn.programs=Gs.programs,Yt.context=ne,Yt.capabilities=Ze,Yt.extensions=ii,Yt.properties=Pn,Yt.renderLists=El,Yt.state=li,Yt.info=xn}function n(ft){ft.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),Te=!0}function o(){console.log("THREE.WebGLRenderer: Context Restored."),Te=!1,i()}function l(ft){ft=ft.target,ft.removeEventListener("dispose",l),f(ft),Pn.remove(ft)}function f(ft){var Tt=Pn.get(ft).program;ft.program=void 0,Tt!==void 0&&Gs.releaseProgram(Tt)}function p(ft,Tt){ft.render(function(mt){Yt.renderBufferImmediate(mt,Tt)})}function y(ft,Tt,mt){if(ft.visible!==!1){if(ft.layers.test(Tt.layers)){if(ft.isLight)$t.pushLight(ft),ft.castShadow&&$t.pushShadow(ft);else if(ft.isSprite){if(!ft.frustumCulled||Wi.intersectsSprite(ft)){mt&&Ai.setFromMatrixPosition(ft.matrixWorld).applyMatrix4(Li);var Me=Ia.update(ft),ze=ft.material;ee.push(ft,Me,ze,Ai.z,null)}}else if(ft.isImmediateRenderObject)mt&&Ai.setFromMatrixPosition(ft.matrixWorld).applyMatrix4(Li),ee.push(ft,null,ft.material,Ai.z,null);else if((ft.isMesh||ft.isLine||ft.isPoints)&&(ft.isSkinnedMesh&&ft.skeleton.update(),!ft.frustumCulled||Wi.intersectsObject(ft)))if(mt&&Ai.setFromMatrixPosition(ft.matrixWorld).applyMatrix4(Li),Me=Ia.update(ft),ze=ft.material,Array.isArray(ze))for(var Ve=Me.groups,Se=0,Ke=Ve.length;Se<Ke;Se++){var Oi=Ve[Se],$i=ze[Oi.materialIndex];$i&&$i.visible&&ee.push(ft,Me,$i,Ai.z,Oi)}else ze.visible&&ee.push(ft,Me,ze,Ai.z,null)}for(ft=ft.children,Se=0,Ke=ft.length;Se<Ke;Se++)y(ft[Se],Tt,mt)}}function w(ft,Tt,mt,Me){for(var ze=0,Ve=ft.length;ze<Ve;ze++){var Se=ft[ze],Ke=Se.object,Oi=Se.geometry,$i=Me===void 0?Se.material:Me;if(Se=Se.group,mt.isArrayCamera){Cn=mt;for(var ve=mt.cameras,Tr=0,Nn=ve.length;Tr<Nn;Tr++){var an=ve[Tr];if(Ke.layers.test(an.layers)){if("viewport"in an)li.viewport(_n.copy(an.viewport));else{var pr=an.bounds;li.viewport(_n.set(pr.x*An,pr.y*Ce,pr.z*An,pr.w*Ce).multiplyScalar(ti))}$t.setupLights(an),A(Ke,Tt,an,Oi,$i,Se)}}}else Cn=null,A(Ke,Tt,mt,Oi,$i,Se)}}function A(ft,Tt,mt,Me,ze,Ve){if(ft.onBeforeRender(Yt,Tt,mt,Me,ze,Ve),$t=Hs.get(Tt,Cn||mt),ft.modelViewMatrix.multiplyMatrices(mt.matrixWorldInverse,ft.matrixWorld),ft.normalMatrix.getNormalMatrix(ft.modelViewMatrix),ft.isImmediateRenderObject){li.setMaterial(ze);var Se=B(mt,Tt.fog,ze,ft);We=e=null,Qe=!1,p(ft,Se)}else Yt.renderBufferDirect(mt,Tt.fog,Me,ze,ft,Ve);ft.onAfterRender(Yt,Tt,mt,Me,ze,Ve),$t=Hs.get(Tt,Cn||mt)}function P(ft,Tt,mt){var Me=Pn.get(ft),ze=$t.state.lights,Ve=Me.lightsHash,Se=ze.state.hash;mt=Gs.getParameters(ft,ze.state,$t.state.shadowsArray,Tt,Ae.numPlanes,Ae.numIntersection,mt);var Ke=Gs.getProgramCode(ft,mt),Oi=Me.program,$i=!0;if(Oi===void 0)ft.addEventListener("dispose",l);else if(Oi.code!==Ke)f(ft);else{if(Ve.stateID!==Se.stateID||Ve.directionalLength!==Se.directionalLength||Ve.pointLength!==Se.pointLength||Ve.spotLength!==Se.spotLength||Ve.rectAreaLength!==Se.rectAreaLength||Ve.hemiLength!==Se.hemiLength||Ve.shadowsLength!==Se.shadowsLength)Ve.stateID=Se.stateID,Ve.directionalLength=Se.directionalLength,Ve.pointLength=Se.pointLength,Ve.spotLength=Se.spotLength,Ve.rectAreaLength=Se.rectAreaLength,Ve.hemiLength=Se.hemiLength,Ve.shadowsLength=Se.shadowsLength;else if(mt.shaderID!==void 0)return;$i=!1}if($i&&(mt.shaderID?(Ke=wo[mt.shaderID],Me.shader={name:ft.type,uniforms:Bn.clone(Ke.uniforms),vertexShader:Ke.vertexShader,fragmentShader:Ke.fragmentShader}):Me.shader={name:ft.type,uniforms:ft.uniforms,vertexShader:ft.vertexShader,fragmentShader:ft.fragmentShader},ft.onBeforeCompile(Me.shader,Yt),Ke=Gs.getProgramCode(ft,mt),Oi=Gs.acquireProgram(ft,Me.shader,mt,Ke),Me.program=Oi,ft.program=Oi),mt=Oi.getAttributes(),ft.morphTargets)for(Ke=ft.numSupportedMorphTargets=0;Ke<Yt.maxMorphTargets;Ke++)0<=mt["morphTarget"+Ke]&&ft.numSupportedMorphTargets++;if(ft.morphNormals)for(Ke=ft.numSupportedMorphNormals=0;Ke<Yt.maxMorphNormals;Ke++)0<=mt["morphNormal"+Ke]&&ft.numSupportedMorphNormals++;mt=Me.shader.uniforms,(!ft.isShaderMaterial&&!ft.isRawShaderMaterial||ft.clipping===!0)&&(Me.numClippingPlanes=Ae.numPlanes,Me.numIntersection=Ae.numIntersection,mt.clippingPlanes=Ae.uniform),Me.fog=Tt,Ve===void 0&&(Me.lightsHash=Ve={}),Ve.stateID=Se.stateID,Ve.directionalLength=Se.directionalLength,Ve.pointLength=Se.pointLength,Ve.spotLength=Se.spotLength,Ve.rectAreaLength=Se.rectAreaLength,Ve.hemiLength=Se.hemiLength,Ve.shadowsLength=Se.shadowsLength,ft.lights&&(mt.ambientLightColor.value=ze.state.ambient,mt.directionalLights.value=ze.state.directional,mt.spotLights.value=ze.state.spot,mt.rectAreaLights.value=ze.state.rectArea,mt.pointLights.value=ze.state.point,mt.hemisphereLights.value=ze.state.hemi,mt.directionalShadowMap.value=ze.state.directionalShadowMap,mt.directionalShadowMatrix.value=ze.state.directionalShadowMatrix,mt.spotShadowMap.value=ze.state.spotShadowMap,mt.spotShadowMatrix.value=ze.state.spotShadowMatrix,mt.pointShadowMap.value=ze.state.pointShadowMap,mt.pointShadowMatrix.value=ze.state.pointShadowMatrix),ft=Me.program.getUniforms(),ft=ho.seqWithValue(ft.seq,mt),Me.uniformsList=ft}function B(ft,Tt,mt,Me){on=0;var ze=Pn.get(mt),Ve=ze.lightsHash,Se=$t.state.lights.state.hash;Xe&&(ri||ft!==fi)&&Ae.setState(mt.clippingPlanes,mt.clipIntersection,mt.clipShadows,ft,ze,ft===fi&&mt.id===ae),mt.needsUpdate===!1&&(ze.program===void 0||mt.fog&&ze.fog!==Tt?mt.needsUpdate=!0:(!mt.lights||Ve.stateID===Se.stateID&&Ve.directionalLength===Se.directionalLength&&Ve.pointLength===Se.pointLength&&Ve.spotLength===Se.spotLength&&Ve.rectAreaLength===Se.rectAreaLength&&Ve.hemiLength===Se.hemiLength&&Ve.shadowsLength===Se.shadowsLength)&&(ze.numClippingPlanes===void 0||ze.numClippingPlanes===Ae.numPlanes&&ze.numIntersection===Ae.numIntersection)||(mt.needsUpdate=!0)),mt.needsUpdate&&(P(mt,Tt,Me),mt.needsUpdate=!1);var Ke=!1,Oi=!1,$i=!1;Ve=ze.program,Se=Ve.getUniforms();var ve=ze.shader.uniforms;if(li.useProgram(Ve.program)&&($i=Oi=Ke=!0),mt.id!==ae&&(ae=mt.id,Oi=!0),(Ke||fi!==ft)&&(Se.setValue(ne,"projectionMatrix",ft.projectionMatrix),Ze.logarithmicDepthBuffer&&Se.setValue(ne,"logDepthBufFC",2/(Math.log(ft.far+1)/Math.LN2)),fi!==ft&&(fi=ft,$i=Oi=!0),(mt.isShaderMaterial||mt.isMeshPhongMaterial||mt.isMeshStandardMaterial||mt.envMap)&&(Ke=Se.map.cameraPosition,Ke!==void 0&&Ke.setValue(ne,Ai.setFromMatrixPosition(ft.matrixWorld))),(mt.isMeshPhongMaterial||mt.isMeshLambertMaterial||mt.isMeshBasicMaterial||mt.isMeshStandardMaterial||mt.isShaderMaterial||mt.skinning)&&Se.setValue(ne,"viewMatrix",ft.matrixWorldInverse)),mt.skinning&&(Se.setOptional(ne,Me,"bindMatrix"),Se.setOptional(ne,Me,"bindMatrixInverse"),ft=Me.skeleton))if(Ke=ft.bones,Ze.floatVertexTextures){if(ft.boneTexture===void 0){Ke=Math.sqrt(4*Ke.length),Ke=di.ceilPowerOfTwo(Ke),Ke=Math.max(Ke,4);var Tr=new Float32Array(Ke*Ke*4);Tr.set(ft.boneMatrices);var Nn=new O(Tr,Ke,Ke,1023,1015);Nn.needsUpdate=!0,ft.boneMatrices=Tr,ft.boneTexture=Nn,ft.boneTextureSize=Ke}Se.setValue(ne,"boneTexture",ft.boneTexture),Se.setValue(ne,"boneTextureSize",ft.boneTextureSize)}else Se.setOptional(ne,ft,"boneMatrices");return Oi&&(Se.setValue(ne,"toneMappingExposure",Yt.toneMappingExposure),Se.setValue(ne,"toneMappingWhitePoint",Yt.toneMappingWhitePoint),mt.lights&&(Oi=$i,ve.ambientLightColor.needsUpdate=Oi,ve.directionalLights.needsUpdate=Oi,ve.pointLights.needsUpdate=Oi,ve.spotLights.needsUpdate=Oi,ve.rectAreaLights.needsUpdate=Oi,ve.hemisphereLights.needsUpdate=Oi),Tt&&mt.fog&&(ve.fogColor.value=Tt.color,Tt.isFog?(ve.fogNear.value=Tt.near,ve.fogFar.value=Tt.far):Tt.isFogExp2&&(ve.fogDensity.value=Tt.density)),mt.isMeshBasicMaterial?H(ve,mt):mt.isMeshLambertMaterial?(H(ve,mt),mt.emissiveMap&&(ve.emissiveMap.value=mt.emissiveMap)):mt.isMeshPhongMaterial?(H(ve,mt),mt.isMeshToonMaterial?(q(ve,mt),mt.gradientMap&&(ve.gradientMap.value=mt.gradientMap)):q(ve,mt)):mt.isMeshStandardMaterial?(H(ve,mt),mt.isMeshPhysicalMaterial?($(ve,mt),ve.reflectivity.value=mt.reflectivity,ve.clearCoat.value=mt.clearCoat,ve.clearCoatRoughness.value=mt.clearCoatRoughness):$(ve,mt)):mt.isMeshMatcapMaterial?(H(ve,mt),mt.matcap&&(ve.matcap.value=mt.matcap),mt.bumpMap&&(ve.bumpMap.value=mt.bumpMap,ve.bumpScale.value=mt.bumpScale,mt.side===1&&(ve.bumpScale.value*=-1)),mt.normalMap&&(ve.normalMap.value=mt.normalMap,ve.normalScale.value.copy(mt.normalScale),mt.side===1&&ve.normalScale.value.negate()),mt.displacementMap&&(ve.displacementMap.value=mt.displacementMap,ve.displacementScale.value=mt.displacementScale,ve.displacementBias.value=mt.displacementBias)):mt.isMeshDepthMaterial?(H(ve,mt),mt.displacementMap&&(ve.displacementMap.value=mt.displacementMap,ve.displacementScale.value=mt.displacementScale,ve.displacementBias.value=mt.displacementBias)):mt.isMeshDistanceMaterial?(H(ve,mt),mt.displacementMap&&(ve.displacementMap.value=mt.displacementMap,ve.displacementScale.value=mt.displacementScale,ve.displacementBias.value=mt.displacementBias),ve.referencePosition.value.copy(mt.referencePosition),ve.nearDistance.value=mt.nearDistance,ve.farDistance.value=mt.farDistance):mt.isMeshNormalMaterial?(H(ve,mt),mt.bumpMap&&(ve.bumpMap.value=mt.bumpMap,ve.bumpScale.value=mt.bumpScale,mt.side===1&&(ve.bumpScale.value*=-1)),mt.normalMap&&(ve.normalMap.value=mt.normalMap,ve.normalScale.value.copy(mt.normalScale),mt.side===1&&ve.normalScale.value.negate()),mt.displacementMap&&(ve.displacementMap.value=mt.displacementMap,ve.displacementScale.value=mt.displacementScale,ve.displacementBias.value=mt.displacementBias)):mt.isLineBasicMaterial?(ve.diffuse.value=mt.color,ve.opacity.value=mt.opacity,mt.isLineDashedMaterial&&(ve.dashSize.value=mt.dashSize,ve.totalSize.value=mt.dashSize+mt.gapSize,ve.scale.value=mt.scale)):mt.isPointsMaterial?(ve.diffuse.value=mt.color,ve.opacity.value=mt.opacity,ve.size.value=mt.size*ti,ve.scale.value=.5*Ce,ve.map.value=mt.map,mt.map!==null&&(mt.map.matrixAutoUpdate===!0&&mt.map.updateMatrix(),ve.uvTransform.value.copy(mt.map.matrix))):mt.isSpriteMaterial?(ve.diffuse.value=mt.color,ve.opacity.value=mt.opacity,ve.rotation.value=mt.rotation,ve.map.value=mt.map,mt.map!==null&&(mt.map.matrixAutoUpdate===!0&&mt.map.updateMatrix(),ve.uvTransform.value.copy(mt.map.matrix))):mt.isShadowMaterial&&(ve.color.value=mt.color,ve.opacity.value=mt.opacity),ve.ltc_1!==void 0&&(ve.ltc_1.value=qe.LTC_1),ve.ltc_2!==void 0&&(ve.ltc_2.value=qe.LTC_2),ho.upload(ne,ze.uniformsList,ve,Yt)),mt.isShaderMaterial&&mt.uniformsNeedUpdate===!0&&(ho.upload(ne,ze.uniformsList,ve,Yt),mt.uniformsNeedUpdate=!1),mt.isSpriteMaterial&&Se.setValue(ne,"center",Me.center),Se.setValue(ne,"modelViewMatrix",Me.modelViewMatrix),Se.setValue(ne,"normalMatrix",Me.normalMatrix),Se.setValue(ne,"modelMatrix",Me.matrixWorld),Ve}function H(ft,Tt){if(ft.opacity.value=Tt.opacity,Tt.color&&(ft.diffuse.value=Tt.color),Tt.emissive&&ft.emissive.value.copy(Tt.emissive).multiplyScalar(Tt.emissiveIntensity),Tt.map&&(ft.map.value=Tt.map),Tt.alphaMap&&(ft.alphaMap.value=Tt.alphaMap),Tt.specularMap&&(ft.specularMap.value=Tt.specularMap),Tt.envMap&&(ft.envMap.value=Tt.envMap,ft.flipEnvMap.value=Tt.envMap&&Tt.envMap.isCubeTexture?-1:1,ft.reflectivity.value=Tt.reflectivity,ft.refractionRatio.value=Tt.refractionRatio,ft.maxMipLevel.value=Pn.get(Tt.envMap).__maxMipLevel),Tt.lightMap&&(ft.lightMap.value=Tt.lightMap,ft.lightMapIntensity.value=Tt.lightMapIntensity),Tt.aoMap&&(ft.aoMap.value=Tt.aoMap,ft.aoMapIntensity.value=Tt.aoMapIntensity),Tt.map)var mt=Tt.map;else Tt.specularMap?mt=Tt.specularMap:Tt.displacementMap?mt=Tt.displacementMap:Tt.normalMap?mt=Tt.normalMap:Tt.bumpMap?mt=Tt.bumpMap:Tt.roughnessMap?mt=Tt.roughnessMap:Tt.metalnessMap?mt=Tt.metalnessMap:Tt.alphaMap?mt=Tt.alphaMap:Tt.emissiveMap&&(mt=Tt.emissiveMap);mt!==void 0&&(mt.isWebGLRenderTarget&&(mt=mt.texture),mt.matrixAutoUpdate===!0&&mt.updateMatrix(),ft.uvTransform.value.copy(mt.matrix))}function q(ft,Tt){ft.specular.value=Tt.specular,ft.shininess.value=Math.max(Tt.shininess,1e-4),Tt.emissiveMap&&(ft.emissiveMap.value=Tt.emissiveMap),Tt.bumpMap&&(ft.bumpMap.value=Tt.bumpMap,ft.bumpScale.value=Tt.bumpScale,Tt.side===1&&(ft.bumpScale.value*=-1)),Tt.normalMap&&(ft.normalMap.value=Tt.normalMap,ft.normalScale.value.copy(Tt.normalScale),Tt.side===1&&ft.normalScale.value.negate()),Tt.displacementMap&&(ft.displacementMap.value=Tt.displacementMap,ft.displacementScale.value=Tt.displacementScale,ft.displacementBias.value=Tt.displacementBias)}function $(ft,Tt){ft.roughness.value=Tt.roughness,ft.metalness.value=Tt.metalness,Tt.roughnessMap&&(ft.roughnessMap.value=Tt.roughnessMap),Tt.metalnessMap&&(ft.metalnessMap.value=Tt.metalnessMap),Tt.emissiveMap&&(ft.emissiveMap.value=Tt.emissiveMap),Tt.bumpMap&&(ft.bumpMap.value=Tt.bumpMap,ft.bumpScale.value=Tt.bumpScale,Tt.side===1&&(ft.bumpScale.value*=-1)),Tt.normalMap&&(ft.normalMap.value=Tt.normalMap,ft.normalScale.value.copy(Tt.normalScale),Tt.side===1&&ft.normalScale.value.negate()),Tt.displacementMap&&(ft.displacementMap.value=Tt.displacementMap,ft.displacementScale.value=Tt.displacementScale,ft.displacementBias.value=Tt.displacementBias),Tt.envMap&&(ft.envMapIntensity.value=Tt.envMapIntensity)}console.log("THREE.WebGLRenderer","98"),t=t||{};var rt=t.canvas!==void 0?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),xt=t.context!==void 0?t.context:null,gt=t.alpha!==void 0?t.alpha:!1,Ct=t.depth!==void 0?t.depth:!0,wt=t.stencil!==void 0?t.stencil:!0,Vt=t.antialias!==void 0?t.antialias:!1,J=t.premultipliedAlpha!==void 0?t.premultipliedAlpha:!0,ot=t.preserveDrawingBuffer!==void 0?t.preserveDrawingBuffer:!1,zt=t.powerPreference!==void 0?t.powerPreference:"default",ee=null,$t=null;this.domElement=rt,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 Yt=this,Te=!1,me=null,De=null,be=null,ae=-1,We=e=null,Qe=!1,fi=null,Cn=null,_n=new _,qi=new _,Vi=null,on=0,An=rt.width,Ce=rt.height,ti=1,Ut=new _(0,0,An,Ce),Ye=new _(0,0,An,Ce),ei=!1,Wi=new E,Ae=new W,Xe=!1,ri=!1,Li=new c,Ai=new u;try{gt={alpha:gt,depth:Ct,stencil:wt,antialias:Vt,premultipliedAlpha:J,preserveDrawingBuffer:ot,powerPreference:zt},rt.addEventListener("webglcontextlost",n,!1),rt.addEventListener("webglcontextrestored",o,!1);var ne=xt||rt.getContext("webgl",gt)||rt.getContext("experimental-webgl",gt);if(ne===null)throw rt.getContext("webgl")!==null?Error("Error creating WebGL context with your selected attributes."):Error("Error creating WebGL context.");ne.getShaderPrecisionFormat===void 0&&(ne.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(ft){console.error("THREE.WebGLRenderer: "+ft.message)}var ii,Ze,li,xn,Pn,No,Oa,Kh,Ia,Gs,El,Hs,hs,Qh,tu,er,In;i();var So=null;typeof navigator<"u"&&(So="xr"in navigator?new Le(Yt):new mi(Yt)),this.vr=So;var Gu=new ye(Yt,Ia,Ze.maxTextureSize);this.shadowMap=Gu,this.getContext=function(){return ne},this.getContextAttributes=function(){return ne.getContextAttributes()},this.forceContextLoss=function(){var ft=ii.get("WEBGL_lose_context");ft&&ft.loseContext()},this.forceContextRestore=function(){var ft=ii.get("WEBGL_lose_context");ft&&ft.restoreContext()},this.getPixelRatio=function(){return ti},this.setPixelRatio=function(ft){ft!==void 0&&(ti=ft,this.setSize(An,Ce,!1))},this.getSize=function(){return{width:An,height:Ce}},this.setSize=function(ft,Tt,mt){So.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(An=ft,Ce=Tt,rt.width=ft*ti,rt.height=Tt*ti,mt!==!1&&(rt.style.width=ft+"px",rt.style.height=Tt+"px"),this.setViewport(0,0,ft,Tt))},this.getDrawingBufferSize=function(){return{width:An*ti,height:Ce*ti}},this.setDrawingBufferSize=function(ft,Tt,mt){An=ft,Ce=Tt,ti=mt,rt.width=ft*mt,rt.height=Tt*mt,this.setViewport(0,0,ft,Tt)},this.getCurrentViewport=function(){return _n},this.setViewport=function(ft,Tt,mt,Me){Ut.set(ft,Ce-Tt-Me,mt,Me),li.viewport(_n.copy(Ut).multiplyScalar(ti))},this.setScissor=function(ft,Tt,mt,Me){Ye.set(ft,Ce-Tt-Me,mt,Me),li.scissor(qi.copy(Ye).multiplyScalar(ti))},this.setScissorTest=function(ft){li.setScissorTest(ei=ft)},this.getClearColor=function(){return hs.getClearColor()},this.setClearColor=function(){hs.setClearColor.apply(hs,arguments)},this.getClearAlpha=function(){return hs.getClearAlpha()},this.setClearAlpha=function(){hs.setClearAlpha.apply(hs,arguments)},this.clear=function(ft,Tt,mt){var Me=0;(ft===void 0||ft)&&(Me|=16384),(Tt===void 0||Tt)&&(Me|=256),(mt===void 0||mt)&&(Me|=1024),ne.clear(Me)},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(){rt.removeEventListener("webglcontextlost",n,!1),rt.removeEventListener("webglcontextrestored",o,!1),El.dispose(),Hs.dispose(),Pn.dispose(),Ia.dispose(),So.dispose(),Fo.stop()},this.renderBufferImmediate=function(ft,Tt){li.initAttributes();var mt=Pn.get(ft);ft.hasPositions&&!mt.position&&(mt.position=ne.createBuffer()),ft.hasNormals&&!mt.normal&&(mt.normal=ne.createBuffer()),ft.hasUvs&&!mt.uv&&(mt.uv=ne.createBuffer()),ft.hasColors&&!mt.color&&(mt.color=ne.createBuffer()),Tt=Tt.getAttributes(),ft.hasPositions&&(ne.bindBuffer(34962,mt.position),ne.bufferData(34962,ft.positionArray,35048),li.enableAttribute(Tt.position),ne.vertexAttribPointer(Tt.position,3,5126,!1,0,0)),ft.hasNormals&&(ne.bindBuffer(34962,mt.normal),ne.bufferData(34962,ft.normalArray,35048),li.enableAttribute(Tt.normal),ne.vertexAttribPointer(Tt.normal,3,5126,!1,0,0)),ft.hasUvs&&(ne.bindBuffer(34962,mt.uv),ne.bufferData(34962,ft.uvArray,35048),li.enableAttribute(Tt.uv),ne.vertexAttribPointer(Tt.uv,2,5126,!1,0,0)),ft.hasColors&&(ne.bindBuffer(34962,mt.color),ne.bufferData(34962,ft.colorArray,35048),li.enableAttribute(Tt.color),ne.vertexAttribPointer(Tt.color,3,5126,!1,0,0)),li.disableUnusedAttributes(),ne.drawArrays(4,0,ft.count),ft.count=0},this.renderBufferDirect=function(ft,Tt,mt,Me,ze,Ve){var Se=ze.isMesh&&0>ze.normalMatrix.determinant();li.setMaterial(Me,Se);var Ke=B(ft,Tt,Me,ze),Oi=!1;(e!==mt.id||We!==Ke.id||Qe!==(Me.wireframe===!0))&&(e=mt.id,We=Ke.id,Qe=Me.wireframe===!0,Oi=!0),ze.morphTargetInfluences&&(Qh.update(ze,mt,Me,Ke),Oi=!0),Se=mt.index;var $i=mt.attributes.position;if(Tt=1,Me.wireframe===!0&&(Se=Kh.getWireframeAttribute(mt),Tt=2),ft=tu,Se!==null){var ve=Oa.get(Se);ft=er,ft.setIndex(ve)}if(Oi){if(mt&&mt.isInstancedBufferGeometry&!Ze.isWebGL2&&ii.get("ANGLE_instanced_arrays")===null)console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{li.initAttributes(),Oi=mt.attributes,Ke=Ke.getAttributes();var Tr=Me.defaultAttributeValues;for(ir in Ke){var Nn=Ke[ir];if(0<=Nn){var an=Oi[ir];if(an!==void 0){var pr=an.normalized,eu=an.itemSize,Eo=Oa.get(an);if(Eo!==void 0){var iu=Eo.buffer,dh=Eo.type;if(Eo=Eo.bytesPerElement,an.isInterleavedBufferAttribute){var za=an.data,Hu=za.stride;an=an.offset,za&&za.isInstancedInterleavedBuffer?(li.enableAttributeAndDivisor(Nn,za.meshPerAttribute),mt.maxInstancedCount===void 0&&(mt.maxInstancedCount=za.meshPerAttribute*za.count)):li.enableAttribute(Nn),ne.bindBuffer(34962,iu),ne.vertexAttribPointer(Nn,eu,dh,pr,Hu*Eo,an*Eo)}else an.isInstancedBufferAttribute?(li.enableAttributeAndDivisor(Nn,an.meshPerAttribute),mt.maxInstancedCount===void 0&&(mt.maxInstancedCount=an.meshPerAttribute*an.count)):li.enableAttribute(Nn),ne.bindBuffer(34962,iu),ne.vertexAttribPointer(Nn,eu,dh,pr,0,0)}}else if(Tr!==void 0&&(pr=Tr[ir],pr!==void 0))switch(pr.length){case 2:ne.vertexAttrib2fv(Nn,pr);break;case 3:ne.vertexAttrib3fv(Nn,pr);break;case 4:ne.vertexAttrib4fv(Nn,pr);break;default:ne.vertexAttrib1fv(Nn,pr)}}}li.disableUnusedAttributes()}Se!==null&&ne.bindBuffer(34963,ve.buffer)}ve=1/0,Se!==null?ve=Se.count:$i!==void 0&&(ve=$i.count),Se=mt.drawRange.start*Tt,$i=Ve!==null?Ve.start*Tt:0;var ir=Math.max(Se,$i);if(Ve=Math.max(0,Math.min(ve,Se+mt.drawRange.count*Tt,$i+(Ve!==null?Ve.count*Tt:1/0))-1-ir+1),Ve!==0){if(ze.isMesh)if(Me.wireframe===!0)li.setLineWidth(Me.wireframeLinewidth*(De===null?ti:1)),ft.setMode(1);else switch(ze.drawMode){case 0:ft.setMode(4);break;case 1:ft.setMode(5);break;case 2:ft.setMode(6)}else ze.isLine?(Me=Me.linewidth,Me===void 0&&(Me=1),li.setLineWidth(Me*(De===null?ti:1)),ze.isLineSegments?ft.setMode(1):ze.isLineLoop?ft.setMode(2):ft.setMode(3)):ze.isPoints?ft.setMode(0):ze.isSprite&&ft.setMode(4);mt&&mt.isInstancedBufferGeometry?0<mt.maxInstancedCount&&ft.renderInstances(mt,ir,Ve):ft.render(ir,Ve)}},this.compile=function(ft,Tt){$t=Hs.get(ft,Tt),$t.init(),ft.traverse(function(mt){mt.isLight&&($t.pushLight(mt),mt.castShadow&&$t.pushShadow(mt))}),$t.setupLights(Tt),ft.traverse(function(mt){if(mt.material)if(Array.isArray(mt.material))for(var Me=0;Me<mt.material.length;Me++)P(mt.material[Me],ft.fog,mt);else P(mt.material,ft.fog,mt)})};var Da=null,Fo=new T;Fo.setAnimationLoop(function(ft){So.isPresenting()||Da&&Da(ft)}),typeof window<"u"&&Fo.setContext(window),this.setAnimationLoop=function(ft){Da=ft,So.setAnimationLoop(ft),Fo.start()},this.render=function(ft,Tt,mt,Me){if(!Tt||!Tt.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!Te){We=e=null,Qe=!1,ae=-1,fi=null,ft.autoUpdate===!0&&ft.updateMatrixWorld(),Tt.parent===null&&Tt.updateMatrixWorld(),So.enabled&&(Tt=So.getCamera(Tt)),$t=Hs.get(ft,Tt),$t.init(),ft.onBeforeRender(Yt,ft,Tt,mt),Li.multiplyMatrices(Tt.projectionMatrix,Tt.matrixWorldInverse),Wi.setFromMatrix(Li),ri=this.localClippingEnabled,Xe=Ae.init(this.clippingPlanes,ri,Tt),ee=El.get(ft,Tt),ee.init(),y(ft,Tt,Yt.sortObjects),Yt.sortObjects===!0&&ee.sort(),Xe&&Ae.beginShadows(),Gu.render($t.state.shadowsArray,ft,Tt),$t.setupLights(Tt),Xe&&Ae.endShadows(),this.info.autoReset&&this.info.reset(),mt===void 0&&(mt=null),this.setRenderTarget(mt),hs.render(ee,ft,Tt,Me),Me=ee.opaque;var ze=ee.transparent;if(ft.overrideMaterial){var Ve=ft.overrideMaterial;Me.length&&w(Me,ft,Tt,Ve),ze.length&&w(ze,ft,Tt,Ve)}else Me.length&&w(Me,ft,Tt),ze.length&&w(ze,ft,Tt);mt&&No.updateRenderTargetMipmap(mt),li.buffers.depth.setTest(!0),li.buffers.depth.setMask(!0),li.buffers.color.setMask(!0),li.setPolygonOffset(!1),ft.onAfterRender(Yt,ft,Tt),So.enabled&&So.submitFrame(),$t=ee=null}},this.allocTextureUnit=function(){var ft=on;return ft>=Ze.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+ft+" texture units while this GPU supports only "+Ze.maxTextures),on+=1,ft},this.setTexture2D=function(){var ft=!1;return function(Tt,mt){Tt&&Tt.isWebGLRenderTarget&&(ft||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),ft=!0),Tt=Tt.texture),No.setTexture2D(Tt,mt)}}(),this.setTexture3D=function(){return function(ft,Tt){No.setTexture3D(ft,Tt)}}(),this.setTexture=function(){var ft=!1;return function(Tt,mt){ft||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),ft=!0),No.setTexture2D(Tt,mt)}}(),this.setTextureCube=function(){var ft=!1;return function(Tt,mt){Tt&&Tt.isWebGLRenderTargetCube&&(ft||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),ft=!0),Tt=Tt.texture),Tt&&Tt.isCubeTexture||Array.isArray(Tt.image)&&Tt.image.length===6?No.setTextureCube(Tt,mt):No.setTextureCubeDynamic(Tt,mt)}}(),this.setFramebuffer=function(ft){me=ft},this.getRenderTarget=function(){return De},this.setRenderTarget=function(ft){(De=ft)&&Pn.get(ft).__webglFramebuffer===void 0&&No.setupRenderTarget(ft);var Tt=me,mt=!1;ft?(Tt=Pn.get(ft).__webglFramebuffer,ft.isWebGLRenderTargetCube&&(Tt=Tt[ft.activeCubeFace],mt=!0),_n.copy(ft.viewport),qi.copy(ft.scissor),Vi=ft.scissorTest):(_n.copy(Ut).multiplyScalar(ti),qi.copy(Ye).multiplyScalar(ti),Vi=ei),be!==Tt&&(ne.bindFramebuffer(36160,Tt),be=Tt),li.viewport(_n),li.scissor(qi),li.setScissorTest(Vi),mt&&(mt=Pn.get(ft.texture),ne.framebufferTexture2D(36160,36064,34069+ft.activeCubeFace,mt.__webglTexture,ft.activeMipMapLevel))},this.readRenderTargetPixels=function(ft,Tt,mt,Me,ze,Ve){if(ft&&ft.isWebGLRenderTarget){var Se=Pn.get(ft).__webglFramebuffer;if(Se){var Ke=!1;Se!==be&&(ne.bindFramebuffer(36160,Se),Ke=!0);try{var Oi=ft.texture,$i=Oi.format,ve=Oi.type;$i!==1023&&In.convert($i)!==ne.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):ve===1009||In.convert(ve)===ne.getParameter(35738)||ve===1015&&(Ze.isWebGL2||ii.get("OES_texture_float")||ii.get("WEBGL_color_buffer_float"))||ve===1016&&(Ze.isWebGL2?ii.get("EXT_color_buffer_float"):ii.get("EXT_color_buffer_half_float"))?ne.checkFramebufferStatus(36160)===36053?0<=Tt&&Tt<=ft.width-Me&&0<=mt&&mt<=ft.height-ze&&ne.readPixels(Tt,mt,Me,ze,In.convert($i),In.convert(ve),Ve):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{Ke&&ne.bindFramebuffer(36160,be)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(ft,Tt,mt){var Me=Tt.image.width,ze=Tt.image.height,Ve=In.convert(Tt.format);this.setTexture2D(Tt,0),ne.copyTexImage2D(3553,mt||0,Ve,ft.x,ft.y,Me,ze,0)},this.copyTextureToTexture=function(ft,Tt,mt,Me){var ze=Tt.image.width,Ve=Tt.image.height,Se=In.convert(mt.format),Ke=In.convert(mt.type);this.setTexture2D(mt,0),Tt.isDataTexture?ne.texSubImage2D(3553,Me||0,ft.x,ft.y,ze,Ve,Se,Ke,Tt.image.data):ne.texSubImage2D(3553,Me||0,ft.x,ft.y,Se,Ke,Tt.image)}}function Re(t,e){this.name="",this.color=new L(t),this.density=e!==void 0?e:25e-5}function Sn(t,e,i){this.name="",this.color=new L(t),this.near=e!==void 0?e:1,this.far=i!==void 0?i:1e3}function Xn(){N.call(this),this.type="Scene",this.overrideMaterial=this.fog=this.background=null,this.autoUpdate=!0}function ki(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 Bi(t,e,i,n){this.data=t,this.itemSize=e,this.offset=i,this.normalized=n===!0}function Hi(t){Wt.call(this),this.type="SpriteMaterial",this.color=new L(16777215),this.map=null,this.rotation=0,this.sizeAttenuation=!0,this.lights=!1,this.transparent=!0,this.setValues(t)}function nn(t){if(N.call(this),this.type="Sprite",Ra===void 0){Ra=new Ft;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 ki(e,5),Ra.setIndex([0,1,2,0,2,3]),Ra.addAttribute("position",new Bi(e,3,0,!1)),Ra.addAttribute("uv",new Bi(e,2,3,!1))}this.geometry=Ra,this.material=t!==void 0?t:new Hi,this.center=new s(.5,.5)}function rn(){N.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function un(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 c)}function cn(){N.call(this),this.type="Bone"}function Gi(t,e){pi.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new c,this.bindMatrixInverse=new c,t=this.initBones(),t=new un(t),this.bind(t,this.matrixWorld),this.normalizeSkinWeights()}function Ni(t){Wt.call(this),this.type="LineBasicMaterial",this.color=new L(16777215),this.linewidth=1,this.linejoin=this.linecap="round",this.lights=!1,this.setValues(t)}function ji(t,e,i){i===1&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),N.call(this),this.type="Line",this.geometry=t!==void 0?t:new Ft,this.material=e!==void 0?e:new Ni({color:16777215*Math.random()})}function gi(t,e){ji.call(this,t,e),this.type="LineSegments"}function co(t,e){ji.call(this,t,e),this.type="LineLoop"}function Fn(t){Wt.call(this),this.type="PointsMaterial",this.color=new L(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=this.morphTargets=!1,this.setValues(t)}function la(t,e){N.call(this),this.type="Points",this.geometry=t!==void 0?t:new Ft,this.material=e!==void 0?e:new Fn({color:16777215*Math.random()})}function zh(t,e,i,n,o,l,f,p,y){g.call(this,t,e,i,n,o,l,f,p,y),this.generateMipmaps=!1}function Yo(t,e,i,n,o,l,f,p,y,w,A,P){g.call(this,null,l,f,p,y,w,n,o,A,P),this.image={width:e,height:i},this.mipmaps=t,this.generateMipmaps=this.flipY=!1}function $a(t,e,i,n,o,l,f,p,y){g.call(this,t,e,i,n,o,l,f,p,y),this.needsUpdate=!0}function Ka(t,e,i,n,o,l,f,p,y,w){if(w=w!==void 0?w:1026,w!==1026&&w!==1027)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&w===1026&&(i=1012),i===void 0&&w===1027&&(i=1020),g.call(this,null,n,o,l,f,p,w,i,y),this.image={width:t,height:e},this.magFilter=f!==void 0?f:1003,this.minFilter=p!==void 0?p:1003,this.generateMipmaps=this.flipY=!1}function ha(t){Ft.call(this),this.type="WireframeGeometry";var e=[],i,n,o,l=[0,0],f={},p=["a","b","c"];if(t&&t.isGeometry){var y=t.faces,w=0;for(n=y.length;w<n;w++){var A=y[w];for(i=0;3>i;i++){var P=A[p[i]],B=A[p[(i+1)%3]];l[0]=Math.min(P,B),l[1]=Math.max(P,B),P=l[0]+","+l[1],f[P]===void 0&&(f[P]={index1:l[0],index2:l[1]})}}for(P in f)w=f[P],p=t.vertices[w.index1],e.push(p.x,p.y,p.z),p=t.vertices[w.index2],e.push(p.x,p.y,p.z)}else if(t&&t.isBufferGeometry)if(p=new u,t.index!==null){y=t.attributes.position,A=t.index;var H=t.groups;for(H.length===0&&(H=[{start:0,count:A.count,materialIndex:0}]),t=0,o=H.length;t<o;++t)for(w=H[t],i=w.start,n=w.count,w=i,n=i+n;w<n;w+=3)for(i=0;3>i;i++)P=A.getX(w+i),B=A.getX(w+(i+1)%3),l[0]=Math.min(P,B),l[1]=Math.max(P,B),P=l[0]+","+l[1],f[P]===void 0&&(f[P]={index1:l[0],index2:l[1]});for(P in f)w=f[P],p.fromBufferAttribute(y,w.index1),e.push(p.x,p.y,p.z),p.fromBufferAttribute(y,w.index2),e.push(p.x,p.y,p.z)}else for(y=t.attributes.position,w=0,n=y.count/3;w<n;w++)for(i=0;3>i;i++)f=3*w+i,p.fromBufferAttribute(y,f),e.push(p.x,p.y,p.z),f=3*w+(i+1)%3,p.fromBufferAttribute(y,f),e.push(p.x,p.y,p.z);this.addAttribute("position",new Et(e,3))}function Qa(t,e,i){X.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:i},this.fromBufferGeometry(new ua(t,e,i)),this.mergeVertices()}function ua(t,e,i){Ft.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:i};var n=[],o=[],l=[],f=[],p=new u,y=new u,w=new u,A=new u,P=new u,B,H;3>t.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var q=e+1;for(B=0;B<=i;B++){var $=B/i;for(H=0;H<=e;H++){var rt=H/e;t(rt,$,y),o.push(y.x,y.y,y.z),0<=rt-1e-5?(t(rt-1e-5,$,w),A.subVectors(y,w)):(t(rt+1e-5,$,w),A.subVectors(w,y)),0<=$-1e-5?(t(rt,$-1e-5,w),P.subVectors(y,w)):(t(rt,$+1e-5,w),P.subVectors(w,y)),p.crossVectors(A,P).normalize(),l.push(p.x,p.y,p.z),f.push(rt,$)}}for(B=0;B<i;B++)for(H=0;H<e;H++)t=B*q+H+1,p=(B+1)*q+H+1,y=(B+1)*q+H,n.push(B*q+H,t,y),n.push(t,p,y);this.setIndex(n),this.addAttribute("position",new Et(o,3)),this.addAttribute("normal",new Et(l,3)),this.addAttribute("uv",new Et(f,2))}function Xi(t,e,i,n){X.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},this.fromBufferGeometry(new xi(t,e,i,n)),this.mergeVertices()}function xi(t,e,i,n){function o(w){p.push(w.x,w.y,w.z)}function l(w,A){w*=3,A.x=t[w+0],A.y=t[w+1],A.z=t[w+2]}function f(w,A,P,B){0>B&&w.x===1&&(y[A]=w.x-1),P.x===0&&P.z===0&&(y[A]=B/2/Math.PI+.5)}Ft.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},i=i||1,n=n||0;var p=[],y=[];(function(w){for(var A=new u,P=new u,B=new u,H=0;H<e.length;H+=3){l(e[H+0],A),l(e[H+1],P),l(e[H+2],B);var q,$,rt=A,xt=P,gt=B,Ct=Math.pow(2,w),wt=[];for($=0;$<=Ct;$++){wt[$]=[];var Vt=rt.clone().lerp(gt,$/Ct),J=xt.clone().lerp(gt,$/Ct),ot=Ct-$;for(q=0;q<=ot;q++)wt[$][q]=q===0&&$===Ct?Vt:Vt.clone().lerp(J,q/ot)}for($=0;$<Ct;$++)for(q=0;q<2*(Ct-$)-1;q++)rt=Math.floor(q/2),q%2===0?(o(wt[$][rt+1]),o(wt[$+1][rt]),o(wt[$][rt])):(o(wt[$][rt+1]),o(wt[$+1][rt+1]),o(wt[$+1][rt]))}})(n),function(w){for(var A=new u,P=0;P<p.length;P+=3)A.x=p[P+0],A.y=p[P+1],A.z=p[P+2],A.normalize().multiplyScalar(w),p[P+0]=A.x,p[P+1]=A.y,p[P+2]=A.z}(i),function(){for(var w=new u,A=0;A<p.length;A+=3)w.x=p[A+0],w.y=p[A+1],w.z=p[A+2],y.push(Math.atan2(w.z,-w.x)/2/Math.PI+.5,1-(Math.atan2(-w.y,Math.sqrt(w.x*w.x+w.z*w.z))/Math.PI+.5));w=new u,A=new u;for(var P=new u,B=new u,H=new s,q=new s,$=new s,rt=0,xt=0;rt<p.length;rt+=9,xt+=6){w.set(p[rt+0],p[rt+1],p[rt+2]),A.set(p[rt+3],p[rt+4],p[rt+5]),P.set(p[rt+6],p[rt+7],p[rt+8]),H.set(y[xt+0],y[xt+1]),q.set(y[xt+2],y[xt+3]),$.set(y[xt+4],y[xt+5]),B.copy(w).add(A).add(P).divideScalar(3);var gt=Math.atan2(B.z,-B.x);f(H,xt+0,w,gt),f(q,xt+2,A,gt),f($,xt+4,P,gt)}for(w=0;w<y.length;w+=6)A=y[w+0],P=y[w+2],B=y[w+4],H=Math.min(A,P,B),.9<Math.max(A,P,B)&&.1>H&&(.2>A&&(y[w+0]+=1),.2>P&&(y[w+2]+=1),.2>B&&(y[w+4]+=1))}(),this.addAttribute("position",new Et(p,3)),this.addAttribute("normal",new Et(p.slice(),3)),this.addAttribute("uv",new Et(y,2)),n===0?this.computeVertexNormals():this.normalizeNormals()}function tl(t,e){X.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new ca(t,e)),this.mergeVertices()}function ca(t,e){xi.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 el(t,e){X.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new _s(t,e)),this.mergeVertices()}function _s(t,e){xi.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 il(t,e){X.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new fa(t,e)),this.mergeVertices()}function fa(t,e){var i=(1+Math.sqrt(5))/2;xi.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 da(t,e){X.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new pa(t,e)),this.mergeVertices()}function pa(t,e){var i=(1+Math.sqrt(5))/2,n=1/i;xi.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 gn(t,e,i,n,o,l){X.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:o},l!==void 0&&console.warn("THREE.TubeGeometry: taper has been removed."),t=new Zo(t,e,i,n,o),this.tangents=t.tangents,this.normals=t.normals,this.binormals=t.binormals,this.fromBufferGeometry(t),this.mergeVertices()}function Zo(t,e,i,n,o){function l(xt){A=t.getPointAt(xt/e,A);var gt=f.normals[xt];for(xt=f.binormals[xt],B=0;B<=n;B++){var Ct=B/n*Math.PI*2,wt=Math.sin(Ct);Ct=-Math.cos(Ct),y.x=Ct*gt.x+wt*xt.x,y.y=Ct*gt.y+wt*xt.y,y.z=Ct*gt.z+wt*xt.z,y.normalize(),q.push(y.x,y.y,y.z),p.x=A.x+i*y.x,p.y=A.y+i*y.y,p.z=A.z+i*y.z,H.push(p.x,p.y,p.z)}}Ft.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 f=t.computeFrenetFrames(e,o);this.tangents=f.tangents,this.normals=f.normals,this.binormals=f.binormals;var p=new u,y=new u,w=new s,A=new u,P,B,H=[],q=[],$=[],rt=[];for(P=0;P<e;P++)l(P);for(l(o===!1?e:0),P=0;P<=e;P++)for(B=0;B<=n;B++)w.x=P/e,w.y=B/n,$.push(w.x,w.y);(function(){for(B=1;B<=e;B++)for(P=1;P<=n;P++){var xt=(n+1)*B+(P-1),gt=(n+1)*B+P,Ct=(n+1)*(B-1)+P;rt.push((n+1)*(B-1)+(P-1),xt,Ct),rt.push(xt,gt,Ct)}})(),this.setIndex(rt),this.addAttribute("position",new Et(H,3)),this.addAttribute("normal",new Et(q,3)),this.addAttribute("uv",new Et($,2))}function Zr(t,e,i,n,o,l,f){X.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:o,q:l},f!==void 0&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xs(t,e,i,n,o,l)),this.mergeVertices()}function xs(t,e,i,n,o,l){function f(J,ot,zt,ee,$t){var Yt=Math.sin(J);ot=zt/ot*J,zt=Math.cos(ot),$t.x=ee*(2+zt)*.5*Math.cos(J),$t.y=ee*(2+zt)*Yt*.5,$t.z=ee*Math.sin(ot)*.5}Ft.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:o,q:l},t=t||1,e=e||.4,i=Math.floor(i)||64,n=Math.floor(n)||8,o=o||2,l=l||3;var p=[],y=[],w=[],A=[],P,B=new u,H=new u,q=new u,$=new u,rt=new u,xt=new u,gt=new u;for(P=0;P<=i;++P){var Ct=P/i*o*Math.PI*2;for(f(Ct,o,l,t,q),f(Ct+.01,o,l,t,$),xt.subVectors($,q),gt.addVectors($,q),rt.crossVectors(xt,gt),gt.crossVectors(rt,xt),rt.normalize(),gt.normalize(),Ct=0;Ct<=n;++Ct){var wt=Ct/n*Math.PI*2,Vt=-e*Math.cos(wt);wt=e*Math.sin(wt),B.x=q.x+(Vt*gt.x+wt*rt.x),B.y=q.y+(Vt*gt.y+wt*rt.y),B.z=q.z+(Vt*gt.z+wt*rt.z),y.push(B.x,B.y,B.z),H.subVectors(B,q).normalize(),w.push(H.x,H.y,H.z),A.push(P/i),A.push(Ct/n)}}for(Ct=1;Ct<=i;Ct++)for(P=1;P<=n;P++)t=(n+1)*Ct+(P-1),e=(n+1)*Ct+P,o=(n+1)*(Ct-1)+P,p.push((n+1)*(Ct-1)+(P-1),t,o),p.push(t,e,o);this.setIndex(p),this.addAttribute("position",new Et(y,3)),this.addAttribute("normal",new Et(w,3)),this.addAttribute("uv",new Et(A,2))}function ws(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 Un(t,e,i,n,o)),this.mergeVertices()}function Un(t,e,i,n,o){Ft.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 l=[],f=[],p=[],y=[],w=new u,A=new u,P=new u,B,H;for(B=0;B<=i;B++)for(H=0;H<=n;H++){var q=H/n*o,$=B/i*Math.PI*2;A.x=(t+e*Math.cos($))*Math.cos(q),A.y=(t+e*Math.cos($))*Math.sin(q),A.z=e*Math.sin($),f.push(A.x,A.y,A.z),w.x=t*Math.cos(q),w.y=t*Math.sin(q),P.subVectors(A,w).normalize(),p.push(P.x,P.y,P.z),y.push(H/n),y.push(B/i)}for(B=1;B<=i;B++)for(H=1;H<=n;H++)t=(n+1)*(B-1)+H-1,e=(n+1)*(B-1)+H,o=(n+1)*B+H,l.push((n+1)*B+H-1,t,o),l.push(t,e,o);this.setIndex(l),this.addAttribute("position",new Et(f,3)),this.addAttribute("normal",new Et(p,3)),this.addAttribute("uv",new Et(y,2))}function kh(t,e,i,n,o){for(var l,f=0,p=e,y=i-n;p<i;p+=n)f+=(t[y]-t[p])*(t[p+1]+t[y+1]),y=p;if(o===0<f)for(o=e;o<i;o+=n)l=Jl(o,t[o],t[o+1],l);else for(o=i-n;o>=e;o-=n)l=Jl(o,t[o],t[o+1],l);return l&&Ts(l,l.next)&&(Yi(l),l=l.next),l}function ma(t,e){if(!t)return t;e||(e=t);do{var i=!1;if(t.steiner||!Ts(t,t.next)&&Ji(t.prev,t,t.next)!==0)t=t.next;else{if(Yi(t),t=e=t.prev,t===t.next)break;i=!0}}while(i||t!==e);return e}function ga(t,e,i,n,o,l,f){if(t){if(!f&&l){var p=t,y=p;do y.z===null&&(y.z=Yl(y.x,y.y,n,o,l)),y.prevZ=y.prev,y=y.nextZ=y.next;while(y!==p);y.prevZ.nextZ=null,y.prevZ=null,p=y;var w,A,P,B,H=1;do{y=p;var q=p=null;for(A=0;y;){A++;var $=y;for(w=P=0;w<H&&(P++,$=$.nextZ,$);w++);for(B=H;0<P||0<B&&$;)P!==0&&(B===0||!$||y.z<=$.z)?(w=y,y=y.nextZ,P--):(w=$,$=$.nextZ,B--),q?q.nextZ=w:p=w,w.prevZ=q,q=w;y=$}q.nextZ=null,H*=2}while(1<A)}for(p=t;t.prev!==t.next;){if(y=t.prev,$=t.next,l)t:{q=t,B=n;var rt=o,xt=l;if(A=q.prev,P=q,H=q.next,0<=Ji(A,P,H))q=!1;else{var gt=A.x>P.x?A.x>H.x?A.x:H.x:P.x>H.x?P.x:H.x,Ct=A.y>P.y?A.y>H.y?A.y:H.y:P.y>H.y?P.y:H.y;for(w=Yl(A.x<P.x?A.x<H.x?A.x:H.x:P.x<H.x?P.x:H.x,A.y<P.y?A.y<H.y?A.y:H.y:P.y<H.y?P.y:H.y,B,rt,xt),B=Yl(gt,Ct,B,rt,xt),rt=q.nextZ;rt&&rt.z<=B;){if(rt!==q.prev&&rt!==q.next&&Zl(A.x,A.y,P.x,P.y,H.x,H.y,rt.x,rt.y)&&0<=Ji(rt.prev,rt,rt.next)){q=!1;break t}rt=rt.nextZ}for(rt=q.prevZ;rt&&rt.z>=w;){if(rt!==q.prev&&rt!==q.next&&Zl(A.x,A.y,P.x,P.y,H.x,H.y,rt.x,rt.y)&&0<=Ji(rt.prev,rt,rt.next)){q=!1;break t}rt=rt.prevZ}q=!0}}else t:if(q=t,A=q.prev,P=q,H=q.next,0<=Ji(A,P,H))q=!1;else{for(w=q.next.next;w!==q.prev;){if(Zl(A.x,A.y,P.x,P.y,H.x,H.y,w.x,w.y)&&0<=Ji(w.prev,w,w.next)){q=!1;break t}w=w.next}q=!0}if(q)e.push(y.i/i),e.push(t.i/i),e.push($.i/i),Yi(t),p=t=$.next;else if(t=$,t===p){if(!f)ga(ma(t),e,i,n,o,l,1);else if(f===1){f=e,p=i,y=t;do $=y.prev,q=y.next.next,!Ts($,q)&&Bh($,y,y.next,q)&&Rr($,q)&&Rr(q,$)&&(f.push($.i/p),f.push(y.i/p),f.push(q.i/p),Yi(y),Yi(y.next),y=t=q),y=y.next;while(y!==t);t=y,ga(t,e,i,n,o,l,2)}else if(f===2)t:{f=t;do{for(p=f.next.next;p!==f.prev;){if(y=f.i!==p.i){if(y=f,$=p,q=y.next.i!==$.i&&y.prev.i!==$.i){e:{q=y;do{if(q.i!==y.i&&q.next.i!==y.i&&q.i!==$.i&&q.next.i!==$.i&&Bh(q,q.next,y,$)){q=!0;break e}q=q.next}while(q!==y);q=!1}q=!q}if(q=q&&Rr(y,$)&&Rr($,y)){q=y,A=!1,P=(y.x+$.x)/2,$=(y.y+$.y)/2;do q.y>$!=q.next.y>$&&q.next.y!==q.y&&P<(q.next.x-q.x)*($-q.y)/(q.next.y-q.y)+q.x&&(A=!A),q=q.next;while(q!==y);q=A}y=q}if(y){t=nl(f,p),f=ma(f,f.next),t=ma(t,t.next),ga(f,e,i,n,o,l),ga(t,e,i,n,o,l);break t}p=p.next}f=f.next}while(f!==t)}break}}}}function Su(t,e){return t.x-e.x}function Eu(t,e){var i=e,n=t.x,o=t.y,l=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var f=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(f<=n&&f>l){if(l=f,f===n){if(o===i.y)return i;if(o===i.next.y)return i.next}var p=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!p)return null;if(n===l)return p.prev;e=p,f=p.x;var y=p.y,w=1/0;for(i=p.next;i!==e;){if(n>=i.x&&i.x>=f&&n!==i.x&&Zl(o<y?n:l,o,f,y,o<y?l:n,o,i.x,i.y)){var A=Math.abs(o-i.y)/(n-i.x);(A<w||A===w&&i.x>p.x)&&Rr(i,t)&&(p=i,w=A)}i=i.next}return p}function Yl(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 yr(t){var e=t,i=t;do e.x<i.x&&(i=e),e=e.next;while(e!==t);return i}function Zl(t,e,i,n,o,l,f,p){return 0<=(o-f)*(e-p)-(t-f)*(l-p)&&0<=(t-f)*(n-p)-(i-f)*(e-p)&&0<=(i-f)*(l-p)-(o-f)*(n-p)}function Ji(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function Ts(t,e){return t.x===e.x&&t.y===e.y}function Bh(t,e,i,n){return Ts(t,e)&&Ts(i,n)||Ts(t,n)&&Ts(i,e)?!0:0<Ji(t,e,i)!=0<Ji(t,e,n)&&0<Ji(i,n,t)!=0<Ji(i,n,e)}function Rr(t,e){return 0>Ji(t.prev,t,t.next)?0<=Ji(t,e,t.next)&&0<=Ji(t,t.prev,e):0>Ji(t,e,t.prev)||0>Ji(t,t.next,e)}function nl(t,e){var i=new fo(t.i,t.x,t.y),n=new fo(e.i,e.x,e.y),o=t.next,l=e.prev;return t.next=e,e.prev=t,i.next=o,o.prev=i,n.next=i,i.prev=n,l.next=n,n.prev=l,n}function Jl(t,e,i,n){return t=new fo(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 Yi(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 fo(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 $l(t){var e=t.length;2<e&&t[e-1].equals(t[0])&&t.pop()}function bu(t,e){for(var i=0;i<e.length;i++)t.push(e[i].x),t.push(e[i].y)}function Po(t,e){X.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){function i(y){function w(Xe,ri,Li){return ri||console.error("THREE.ExtrudeGeometry: vec does not exist"),ri.clone().multiplyScalar(Li).add(Xe)}function A(Xe,ri,Li){var Ai=Xe.x-ri.x,ne=Xe.y-ri.y,ii=Li.x-Xe.x,Ze=Li.y-Xe.y,li=Ai*Ai+ne*ne;if(Math.abs(Ai*Ze-ne*ii)>Number.EPSILON){var xn=Math.sqrt(li),Pn=Math.sqrt(ii*ii+Ze*Ze);if(li=ri.x-ne/xn,ri=ri.y+Ai/xn,Ze=((Li.x-Ze/Pn-li)*Ze-(Li.y+ii/Pn-ri)*ii)/(Ai*Ze-ne*ii),ii=li+Ai*Ze-Xe.x,Ai=ri+ne*Ze-Xe.y,ne=ii*ii+Ai*Ai,2>=ne)return new s(ii,Ai);ne=Math.sqrt(ne/2)}else Xe=!1,Ai>Number.EPSILON?ii>Number.EPSILON&&(Xe=!0):Ai<-Number.EPSILON?ii<-Number.EPSILON&&(Xe=!0):Math.sign(ne)===Math.sign(Ze)&&(Xe=!0),Xe?(ii=-ne,ne=Math.sqrt(li)):(ii=Ai,Ai=ne,ne=Math.sqrt(li/2));return new s(ii/ne,Ai/ne)}function P(Xe,ri){for(Ce=Xe.length;0<=--Ce;){var Li=Ce,Ai=Ce-1;0>Ai&&(Ai=Xe.length-1);var ne,ii=gt+2*ot;for(ne=0;ne<ii;ne++){var Ze=Vi*ne,li=Vi*(ne+1),xn=ri+Ai+Ze,Pn=ri+Ai+li;li=ri+Li+li,q(ri+Li+Ze),q(xn),q(li),q(xn),q(Pn),q(li),Ze=o.length/3,Ze=ee.generateSideWallUV(n,o,Ze-6,Ze-3,Ze-2,Ze-1),$(Ze[0]),$(Ze[1]),$(Ze[3]),$(Ze[1]),$(Ze[2]),$(Ze[3])}}}function B(Xe,ri,Li){rt.push(Xe),rt.push(ri),rt.push(Li)}function H(Xe,ri,Li){q(Xe),q(ri),q(Li),Xe=o.length/3,Xe=ee.generateTopUV(n,o,Xe-3,Xe-2,Xe-1),$(Xe[0]),$(Xe[1]),$(Xe[2])}function q(Xe){o.push(rt[3*Xe]),o.push(rt[3*Xe+1]),o.push(rt[3*Xe+2])}function $(Xe){l.push(Xe.x),l.push(Xe.y)}var rt=[],xt=e.curveSegments!==void 0?e.curveSegments:12,gt=e.steps!==void 0?e.steps:1,Ct=e.depth!==void 0?e.depth:100,wt=e.bevelEnabled!==void 0?e.bevelEnabled:!0,Vt=e.bevelThickness!==void 0?e.bevelThickness:6,J=e.bevelSize!==void 0?e.bevelSize:Vt-2,ot=e.bevelSegments!==void 0?e.bevelSegments:3,zt=e.extrudePath,ee=e.UVGenerator!==void 0?e.UVGenerator:Tl;e.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),Ct=e.amount);var $t=!1;if(zt){var Yt=zt.getSpacedPoints(gt);$t=!0,wt=!1;var Te=zt.computeFrenetFrames(gt,!1),me=new u,De=new u,be=new u}wt||(J=Vt=ot=0);var ae;xt=y.extractPoints(xt),y=xt.shape;var We=xt.holes;if(!To.isClockWise(y)){y=y.reverse();var Qe=0;for(ae=We.length;Qe<ae;Qe++){var fi=We[Qe];To.isClockWise(fi)&&(We[Qe]=fi.reverse())}}var Cn=To.triangulateShape(y,We),_n=y;for(Qe=0,ae=We.length;Qe<ae;Qe++)fi=We[Qe],y=y.concat(fi);var qi,Vi=y.length,on,An=Cn.length;xt=[];var Ce=0,ti=_n.length,Ut=ti-1;for(qi=Ce+1;Ce<ti;Ce++,Ut++,qi++)Ut===ti&&(Ut=0),qi===ti&&(qi=0),xt[Ce]=A(_n[Ce],_n[Ut],_n[qi]);zt=[];var Ye=xt.concat();for(Qe=0,ae=We.length;Qe<ae;Qe++){fi=We[Qe];var ei=[];for(Ce=0,ti=fi.length,Ut=ti-1,qi=Ce+1;Ce<ti;Ce++,Ut++,qi++)Ut===ti&&(Ut=0),qi===ti&&(qi=0),ei[Ce]=A(fi[Ce],fi[Ut],fi[qi]);zt.push(ei),Ye=Ye.concat(ei)}for(Ut=0;Ut<ot;Ut++){ti=Ut/ot;var Wi=Vt*Math.cos(ti*Math.PI/2);for(qi=J*Math.sin(ti*Math.PI/2),Ce=0,ti=_n.length;Ce<ti;Ce++){var Ae=w(_n[Ce],xt[Ce],qi);B(Ae.x,Ae.y,-Wi)}for(Qe=0,ae=We.length;Qe<ae;Qe++)for(fi=We[Qe],ei=zt[Qe],Ce=0,ti=fi.length;Ce<ti;Ce++)Ae=w(fi[Ce],ei[Ce],qi),B(Ae.x,Ae.y,-Wi)}for(qi=J,Ce=0;Ce<Vi;Ce++)Ae=wt?w(y[Ce],Ye[Ce],qi):y[Ce],$t?(De.copy(Te.normals[0]).multiplyScalar(Ae.x),me.copy(Te.binormals[0]).multiplyScalar(Ae.y),be.copy(Yt[0]).add(De).add(me),B(be.x,be.y,be.z)):B(Ae.x,Ae.y,0);for(ti=1;ti<=gt;ti++)for(Ce=0;Ce<Vi;Ce++)Ae=wt?w(y[Ce],Ye[Ce],qi):y[Ce],$t?(De.copy(Te.normals[ti]).multiplyScalar(Ae.x),me.copy(Te.binormals[ti]).multiplyScalar(Ae.y),be.copy(Yt[ti]).add(De).add(me),B(be.x,be.y,be.z)):B(Ae.x,Ae.y,Ct/gt*ti);for(Ut=ot-1;0<=Ut;Ut--){for(ti=Ut/ot,Wi=Vt*Math.cos(ti*Math.PI/2),qi=J*Math.sin(ti*Math.PI/2),Ce=0,ti=_n.length;Ce<ti;Ce++)Ae=w(_n[Ce],xt[Ce],qi),B(Ae.x,Ae.y,Ct+Wi);for(Qe=0,ae=We.length;Qe<ae;Qe++)for(fi=We[Qe],ei=zt[Qe],Ce=0,ti=fi.length;Ce<ti;Ce++)Ae=w(fi[Ce],ei[Ce],qi),$t?B(Ae.x,Ae.y+Yt[gt-1].y,Yt[gt-1].x+Wi):B(Ae.x,Ae.y,Ct+Wi)}(function(){var Xe=o.length/3;if(wt){var ri=0*Vi;for(Ce=0;Ce<An;Ce++)on=Cn[Ce],H(on[2]+ri,on[1]+ri,on[0]+ri);for(ri=Vi*(gt+2*ot),Ce=0;Ce<An;Ce++)on=Cn[Ce],H(on[0]+ri,on[1]+ri,on[2]+ri)}else{for(Ce=0;Ce<An;Ce++)on=Cn[Ce],H(on[2],on[1],on[0]);for(Ce=0;Ce<An;Ce++)on=Cn[Ce],H(on[0]+Vi*gt,on[1]+Vi*gt,on[2]+Vi*gt)}n.addGroup(Xe,o.length/3-Xe,0)})(),function(){var Xe=o.length/3,ri=0;for(P(_n,ri),ri+=_n.length,Qe=0,ae=We.length;Qe<ae;Qe++)fi=We[Qe],P(fi,ri),ri+=fi.length;n.addGroup(Xe,o.length/3-Xe,1)}()}Ft.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];for(var n=this,o=[],l=[],f=0,p=t.length;f<p;f++)i(t[f]);this.addAttribute("position",new Et(o,3)),this.addAttribute("uv",new Et(l,2)),this.computeVertexNormals()}function Cu(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 rl(t,e){X.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new Ms(t,e)),this.mergeVertices()}function Ms(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),po.call(this,t,e),this.type="TextBufferGeometry"}function Jo(t,e,i,n,o,l,f){X.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:o,thetaStart:l,thetaLength:f},this.fromBufferGeometry(new Or(t,e,i,n,o,l,f)),this.mergeVertices()}function Or(t,e,i,n,o,l,f){Ft.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:o,thetaStart:l,thetaLength:f},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,l=l!==void 0?l:0,f=f!==void 0?f:Math.PI;var p=l+f,y,w,A=0,P=[],B=new u,H=new u,q=[],$=[],rt=[],xt=[];for(w=0;w<=i;w++){var gt=[],Ct=w/i;for(y=0;y<=e;y++){var wt=y/e;B.x=-t*Math.cos(n+wt*o)*Math.sin(l+Ct*f),B.y=t*Math.cos(l+Ct*f),B.z=t*Math.sin(n+wt*o)*Math.sin(l+Ct*f),$.push(B.x,B.y,B.z),H.set(B.x,B.y,B.z).normalize(),rt.push(H.x,H.y,H.z),xt.push(wt,1-Ct),gt.push(A++)}P.push(gt)}for(w=0;w<i;w++)for(y=0;y<e;y++)t=P[w][y+1],n=P[w][y],o=P[w+1][y],f=P[w+1][y+1],(w!==0||0<l)&&q.push(t,n,f),(w!==i-1||p<Math.PI)&&q.push(n,o,f);this.setIndex(q),this.addAttribute("position",new Et($,3)),this.addAttribute("normal",new Et(rt,3)),this.addAttribute("uv",new Et(xt,2))}function ol(t,e,i,n,o,l){X.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:o,thetaLength:l},this.fromBufferGeometry(new Ss(t,e,i,n,o,l)),this.mergeVertices()}function Ss(t,e,i,n,o,l){Ft.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:o,thetaLength:l},t=t||.5,e=e||1,o=o!==void 0?o:0,l=l!==void 0?l:2*Math.PI,i=i!==void 0?Math.max(3,i):8,n=n!==void 0?Math.max(1,n):1;var f=[],p=[],y=[],w=[],A=t,P=(e-t)/n,B=new u,H=new s,q,$;for(q=0;q<=n;q++){for($=0;$<=i;$++)t=o+$/i*l,B.x=A*Math.cos(t),B.y=A*Math.sin(t),p.push(B.x,B.y,B.z),y.push(0,0,1),H.x=(B.x/e+1)/2,H.y=(B.y/e+1)/2,w.push(H.x,H.y);A+=P}for(q=0;q<n;q++)for(e=q*(i+1),$=0;$<i;$++)t=$+e,o=t+i+1,l=t+i+2,A=t+1,f.push(t,o,A),f.push(o,l,A);this.setIndex(f),this.addAttribute("position",new Et(p,3)),this.addAttribute("normal",new Et(y,3)),this.addAttribute("uv",new Et(w,2))}function va(t,e,i,n){X.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},this.fromBufferGeometry(new $o(t,e,i,n)),this.mergeVertices()}function $o(t,e,i,n){Ft.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=di.clamp(n,0,2*Math.PI);var o=[],l=[],f=[],p=1/e,y=new u,w=new s,A;for(A=0;A<=e;A++){var P=i+A*p*n,B=Math.sin(P),H=Math.cos(P);for(P=0;P<=t.length-1;P++)y.x=t[P].x*B,y.y=t[P].y,y.z=t[P].x*H,l.push(y.x,y.y,y.z),w.x=A/e,w.y=P/(t.length-1),f.push(w.x,w.y)}for(A=0;A<e;A++)for(P=0;P<t.length-1;P++)i=P+A*t.length,p=i+t.length,y=i+t.length+1,w=i+1,o.push(i,p,w),o.push(p,y,w);if(this.setIndex(o),this.addAttribute("position",new Et(l,3)),this.addAttribute("uv",new Et(f,2)),this.computeVertexNormals(),n===2*Math.PI)for(n=this.attributes.normal.array,o=new u,l=new u,f=new u,i=e*t.length*3,P=A=0;A<t.length;A++,P+=3)o.x=n[P+0],o.y=n[P+1],o.z=n[P+2],l.x=n[i+P+0],l.y=n[i+P+1],l.z=n[i+P+2],f.addVectors(o,l).normalize(),n[P+0]=n[i+P+0]=f.x,n[P+1]=n[i+P+1]=f.y,n[P+2]=n[i+P+2]=f.z}function Lo(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 Ko(t,e)),this.mergeVertices()}function Ko(t,e){function i(A){var P,B=o.length/3;A=A.extractPoints(e);var H=A.shape,q=A.holes;if(To.isClockWise(H)===!1)for(H=H.reverse(),A=0,P=q.length;A<P;A++){var $=q[A];To.isClockWise($)===!0&&(q[A]=$.reverse())}var rt=To.triangulateShape(H,q);for(A=0,P=q.length;A<P;A++)$=q[A],H=H.concat($);for(A=0,P=H.length;A<P;A++)$=H[A],o.push($.x,$.y,0),l.push(0,0,1),f.push($.x,$.y);for(A=0,P=rt.length;A<P;A++)H=rt[A],n.push(H[0]+B,H[1]+B,H[2]+B),y+=3}Ft.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],o=[],l=[],f=[],p=0,y=0;if(Array.isArray(t)===!1)i(t);else for(var w=0;w<t.length;w++)i(t[w]),this.addGroup(p,y,w),p+=y,y=0;this.setIndex(n),this.addAttribute("position",new Et(o,3)),this.addAttribute("normal",new Et(l,3)),this.addAttribute("uv",new Et(f,2))}function Au(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 Qo(t,e){Ft.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e};var i=[];e=Math.cos(di.DEG2RAD*(e!==void 0?e:1));var n=[0,0],o={},l=["a","b","c"];if(t.isBufferGeometry){var f=new X;f.fromBufferGeometry(t)}else f=t.clone();f.mergeVertices(),f.computeFaceNormals(),t=f.vertices,f=f.faces;for(var p=0,y=f.length;p<y;p++)for(var w=f[p],A=0;3>A;A++){var P=w[l[A]],B=w[l[(A+1)%3]];n[0]=Math.min(P,B),n[1]=Math.max(P,B),P=n[0]+","+n[1],o[P]===void 0?o[P]={index1:n[0],index2:n[1],face1:p,face2:void 0}:o[P].face2=p}for(P in o)n=o[P],(n.face2===void 0||f[n.face1].normal.dot(f[n.face2].normal)<=e)&&(l=t[n.index1],i.push(l.x,l.y,l.z),l=t[n.index2],i.push(l.x,l.y,l.z));this.addAttribute("position",new Et(i,3))}function Ro(t,e,i,n,o,l,f,p){X.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:o,openEnded:l,thetaStart:f,thetaLength:p},this.fromBufferGeometry(new Oo(t,e,i,n,o,l,f,p)),this.mergeVertices()}function Oo(t,e,i,n,o,l,f,p){function y(gt){var Ct,wt=new s,Vt=new u,J=0,ot=gt===!0?t:e,zt=gt===!0?1:-1,ee=q;for(Ct=1;Ct<=n;Ct++)P.push(0,rt*zt,0),B.push(0,zt,0),H.push(.5,.5),q++;var $t=q;for(Ct=0;Ct<=n;Ct++){var Yt=Ct/n*p+f,Te=Math.cos(Yt);Yt=Math.sin(Yt),Vt.x=ot*Yt,Vt.y=rt*zt,Vt.z=ot*Te,P.push(Vt.x,Vt.y,Vt.z),B.push(0,zt,0),wt.x=.5*Te+.5,wt.y=.5*Yt*zt+.5,H.push(wt.x,wt.y),q++}for(Ct=0;Ct<n;Ct++)wt=ee+Ct,Vt=$t+Ct,gt===!0?A.push(Vt,Vt+1,wt):A.push(Vt+1,Vt,wt),J+=3;w.addGroup(xt,J,gt===!0?1:2),xt+=J}Ft.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:o,openEnded:l,thetaStart:f,thetaLength:p};var w=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,l=l!==void 0?l:!1,f=f!==void 0?f:0,p=p!==void 0?p:2*Math.PI;var A=[],P=[],B=[],H=[],q=0,$=[],rt=i/2,xt=0;(function(){var gt,Ct,wt=new u,Vt=new u,J=0,ot=(e-t)/i;for(Ct=0;Ct<=o;Ct++){var zt=[],ee=Ct/o,$t=ee*(e-t)+t;for(gt=0;gt<=n;gt++){var Yt=gt/n,Te=Yt*p+f,me=Math.sin(Te);Te=Math.cos(Te),Vt.x=$t*me,Vt.y=-ee*i+rt,Vt.z=$t*Te,P.push(Vt.x,Vt.y,Vt.z),wt.set(me,ot,Te).normalize(),B.push(wt.x,wt.y,wt.z),H.push(Yt,1-ee),zt.push(q++)}$.push(zt)}for(gt=0;gt<n;gt++)for(Ct=0;Ct<o;Ct++)wt=$[Ct+1][gt],Vt=$[Ct+1][gt+1],ot=$[Ct][gt+1],A.push($[Ct][gt],wt,ot),A.push(wt,Vt,ot),J+=6;w.addGroup(xt,J,0),xt+=J})(),l===!1&&(0<t&&y(!0),0<e&&y(!1)),this.setIndex(A),this.addAttribute("position",new Et(P,3)),this.addAttribute("normal",new Et(B,3)),this.addAttribute("uv",new Et(H,2))}function ya(t,e,i,n,o,l,f){Ro.call(this,0,t,e,i,n,o,l,f),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:o,thetaStart:l,thetaLength:f}}function Gn(t,e,i,n,o,l,f){Oo.call(this,0,t,e,i,n,o,l,f),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:o,thetaStart:l,thetaLength:f}}function Es(t,e,i,n){X.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new mo(t,e,i,n)),this.mergeVertices()}function mo(t,e,i,n){Ft.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=[],l=[],f=[],p=[],y,w=new u,A=new s;l.push(0,0,0),f.push(0,0,1),p.push(.5,.5);var P=0;for(y=3;P<=e;P++,y+=3){var B=i+P/e*n;w.x=t*Math.cos(B),w.y=t*Math.sin(B),l.push(w.x,w.y,w.z),f.push(0,0,1),A.x=(l[y]/t+1)/2,A.y=(l[y+1]/t+1)/2,p.push(A.x,A.y)}for(y=1;y<=e;y++)o.push(y,y+1,0);this.setIndex(o),this.addAttribute("position",new Et(l,3)),this.addAttribute("normal",new Et(f,3)),this.addAttribute("uv",new Et(p,2))}function ts(t){Wt.call(this),this.type="ShadowMaterial",this.color=new L(0),this.transparent=!0,this.setValues(t)}function bs(t){$e.call(this,t),this.type="RawShaderMaterial"}function go(t){Wt.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new L(16777215),this.metalness=this.roughness=.5,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new L(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new s(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 Cs(t){go.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoatRoughness=this.clearCoat=0,this.setValues(t)}function Jr(t){Wt.call(this),this.type="MeshPhongMaterial",this.color=new L(16777215),this.specular=new L(1118481),this.shininess=30,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new L(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new s(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 As(t){Jr.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ps(t){Wt.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new s(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 Ir(t){Wt.call(this),this.type="MeshLambertMaterial",this.color=new L(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new L(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 Ls(t){if(Wt.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new L(16777215),this.bumpMap=this.map=this.matcap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new s(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 Rs(t){Ni.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}function $n(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 sl(t,e,i,n){$n.call(this,t,e,i,n),this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function Dr(t,e,i,n){$n.call(this,t,e,i,n)}function Os(t,e,i,n){$n.call(this,t,e,i,n)}function Hn(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=Yn.convertArray(e,this.TimeBufferType),this.values=Yn.convertArray(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}function Kl(t,e,i){Hn.call(this,t,e,i)}function Ql(t,e,i,n){Hn.call(this,t,e,i,n)}function $r(t,e,i,n){Hn.call(this,t,e,i,n)}function ar(t,e,i,n){$n.call(this,t,e,i,n)}function _a(t,e,i,n){Hn.call(this,t,e,i,n)}function th(t,e,i,n){Hn.call(this,t,e,i,n)}function xa(t,e,i,n){Hn.call(this,t,e,i,n)}function _r(t,e,i){this.name=t,this.tracks=i,this.duration=e!==void 0?e:-1,this.uuid=di.generateUUID(),0>this.duration&&this.resetDuration()}function jc(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 xa;case"color":return Ql;case"quaternion":return _a;case"bool":case"boolean":return Kl;case"string":return th}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function Xc(t){if(t.type===void 0)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=jc(t.type);if(t.times===void 0){var i=[],n=[];Yn.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 es(t,e,i){var n=this,o=!1,l=0,f=0,p=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(y){f++,o===!1&&n.onStart!==void 0&&n.onStart(y,l,f),o=!0},this.itemEnd=function(y){l++,n.onProgress!==void 0&&n.onProgress(y,l,f),l===f&&(o=!1,n.onLoad!==void 0)&&n.onLoad()},this.itemError=function(y){n.onError!==void 0&&n.onError(y)},this.resolveURL=function(y){return p?p(y):y},this.setURLModifier=function(y){return p=y,this}}function Lt(t){this.manager=t!==void 0?t:tr}function Qt(t){this.manager=t!==void 0?t:tr}function Zt(t){this.manager=t!==void 0?t:tr,this._parser=null}function Ue(t){this.manager=t!==void 0?t:tr,this._parser=null}function ai(t){this.manager=t!==void 0?t:tr}function Fi(t){this.manager=t!==void 0?t:tr}function fn(t){this.manager=t!==void 0?t:tr}function Ee(){this.type="Curve",this.arcLengthDivisions=200}function Kn(t,e,i,n,o,l,f,p){Ee.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=l||2*Math.PI,this.aClockwise=f||!1,this.aRotation=p||0}function wa(t,e,i,n,o,l){Kn.call(this,t,e,i,i,n,o,l),this.type="ArcCurve"}function lr(){var t=0,e=0,i=0,n=0;return{initCatmullRom:function(o,l,f,p,y){o=y*(f-o),p=y*(p-l),t=l,e=o,i=-3*l+3*f-2*o-p,n=2*l-2*f+o+p},initNonuniformCatmullRom:function(o,l,f,p,y,w,A){o=((l-o)/y-(f-o)/(y+w)+(f-l)/w)*w,p=((f-l)/w-(p-l)/(w+A)+(p-f)/A)*w,t=l,e=o,i=-3*l+3*f-2*o-p,n=2*l-2*f+o+p},calc:function(o){var l=o*o;return t+e*o+i*l+n*l*o}}}function On(t,e,i,n){Ee.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=i||"centripetal",this.tension=n||.5}function Pu(t,e,i,n,o){e=.5*(n-e),o=.5*(o-i);var l=t*t;return(2*i-2*n+e+o)*t*l+(-3*i+3*n-2*e-o)*l+e*t+i}function vo(t,e,i,n){var o=1-t;return o*o*e+2*(1-t)*t*i+t*t*n}function is(t,e,i,n,o){var l=1-t,f=1-t;return l*l*l*e+3*f*f*t*i+3*(1-t)*t*t*n+t*t*t*o}function hr(t,e,i,n){Ee.call(this),this.type="CubicBezierCurve",this.v0=t||new s,this.v1=e||new s,this.v2=i||new s,this.v3=n||new s}function Ti(t,e,i,n){Ee.call(this),this.type="CubicBezierCurve3",this.v0=t||new u,this.v1=e||new u,this.v2=i||new u,this.v3=n||new u}function ur(t,e){Ee.call(this),this.type="LineCurve",this.v1=t||new s,this.v2=e||new s}function zr(t,e){Ee.call(this),this.type="LineCurve3",this.v1=t||new u,this.v2=e||new u}function cr(t,e,i){Ee.call(this),this.type="QuadraticBezierCurve",this.v0=t||new s,this.v1=e||new s,this.v2=i||new s}function yo(t,e,i){Ee.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new u,this.v1=e||new u,this.v2=i||new u}function Kr(t){Ee.call(this),this.type="SplineCurve",this.points=t||[]}function Io(){Ee.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function fr(t){Io.call(this),this.type="Path",this.currentPoint=new s,t&&this.setFromPoints(t)}function Qn(t){fr.call(this,t),this.uuid=di.generateUUID(),this.type="Shape",this.holes=[]}function tn(t,e){N.call(this),this.type="Light",this.color=new L(t),this.intensity=e!==void 0?e:1,this.receiveShadow=void 0}function al(t,e,i){tn.call(this,t,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(N.DefaultUp),this.updateMatrix(),this.groundColor=new L(e)}function _o(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new s(512,512),this.map=null,this.matrix=new c}function ll(){_o.call(this,new _e(50,1,.5,500))}function hl(t,e,i,n,o,l){tn.call(this,t,e),this.type="SpotLight",this.position.copy(N.DefaultUp),this.updateMatrix(),this.target=new N,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(f){this.intensity=f/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=l!==void 0?l:1,this.shadow=new ll}function Is(t,e,i,n){tn.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 _o(new _e(90,1,.5,500))}function Ta(t,e,i,n,o,l){Be.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=l!==void 0?l:2e3,this.updateProjectionMatrix()}function ns(){_o.call(this,new Ta(-5,5,5,-5,.5,500))}function xo(t,e){tn.call(this,t,e),this.type="DirectionalLight",this.position.copy(N.DefaultUp),this.updateMatrix(),this.target=new N,this.shadow=new ns}function Ds(t,e){tn.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function eh(t,e,i,n){tn.call(this,t,e),this.type="RectAreaLight",this.width=i!==void 0?i:10,this.height=n!==void 0?n:10}function ih(t){this.manager=t!==void 0?t:tr,this.textures={}}function Nh(t){this.manager=t!==void 0?t:tr}function Do(){}function zs(t){typeof t=="boolean"&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=t!==void 0?t:tr,this.withCredentials=!1}function ul(t){this.manager=t!==void 0?t:tr,this.resourcePath=""}function Fh(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:tr,this.options=void 0}function nh(){this.type="ShapePath",this.color=new L,this.subPaths=[],this.currentPath=null}function Uh(t){this.type="Font",this.data=t}function Lu(t){this.manager=t!==void 0?t:tr}function vn(t){this.manager=t!==void 0?t:tr}function Vn(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new _e,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new _e,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function cl(t,e,i,n){N.call(this),this.type="CubeCamera";var o=new _e(90,1,t,e);o.up.set(0,-1,0),o.lookAt(new u(1,0,0)),this.add(o);var l=new _e(90,1,t,e);l.up.set(0,-1,0),l.lookAt(new u(-1,0,0)),this.add(l);var f=new _e(90,1,t,e);f.up.set(0,0,1),f.lookAt(new u(0,1,0)),this.add(f);var p=new _e(90,1,t,e);p.up.set(0,0,-1),p.lookAt(new u(0,-1,0)),this.add(p);var y=new _e(90,1,t,e);y.up.set(0,-1,0),y.lookAt(new u(0,0,1)),this.add(y);var w=new _e(90,1,t,e);w.up.set(0,-1,0),w.lookAt(new u(0,0,-1)),this.add(w),n=n||{format:1022,magFilter:1006,minFilter:1006},this.renderTarget=new b(i,i,n),this.renderTarget.texture.name="CubeCamera",this.update=function(A,P){this.parent===null&&this.updateMatrixWorld();var B=this.renderTarget,H=B.texture.generateMipmaps;B.texture.generateMipmaps=!1,B.activeCubeFace=0,A.render(P,o,B),B.activeCubeFace=1,A.render(P,l,B),B.activeCubeFace=2,A.render(P,f,B),B.activeCubeFace=3,A.render(P,p,B),B.activeCubeFace=4,A.render(P,y,B),B.texture.generateMipmaps=H,B.activeCubeFace=5,A.render(P,w,B),A.setRenderTarget(null)},this.clear=function(A,P,B,H){for(var q=this.renderTarget,$=0;6>$;$++)q.activeCubeFace=$,A.setRenderTarget(q),A.clear(P,B,H);A.setRenderTarget(null)}}function Gh(t){this.autoStart=t!==void 0?t:!0,this.elapsedTime=this.oldTime=this.startTime=0,this.running=!1}function rh(){N.call(this),this.type="AudioListener",this.context=$h.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0}function Ma(t){N.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 fl(t){Ma.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function ks(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 dl(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 Bs(t,e,i){i=i||En.parseTrackName(e),this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function En(t,e,i){this.path=e,this.parsedPath=i||En.parseTrackName(e),this.node=En.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Sa(){this.uuid=di.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 pl(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 l=t[o].createInterpolant(null);i[o]=l,l.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 rs(t){this._root=t,this._initMemoryManager(),this.time=this._accuIndex=0,this.timeScale=1}function oh(t,e){typeof t=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=e),this.value=t}function Hh(){Ft.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Vh(t,e,i){ki.call(this,t,e),this.meshPerAttribute=i||1}function Wh(t,e,i,n){typeof i=="number"&&(n=i,i=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),K.call(this,t,e,i),this.meshPerAttribute=n||1}function Ru(t,e,i,n){this.ray=new Si(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 ml(t,e){return t.distance-e.distance}function Ns(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++)Ns(t[n],e,i,!0)}}function jh(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 it(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 os(t,e){this.min=t!==void 0?t:new s(1/0,1/0),this.max=e!==void 0?e:new s(-1/0,-1/0)}function Ea(t,e){this.start=t!==void 0?t:new u,this.end=e!==void 0?e:new u}function qn(t){N.call(this),this.material=t,this.render=function(){}}function _i(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 Ft,e=new Et(6*e,3),i.addAttribute("position",e),gi.call(this,i,new Ni({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function ba(t,e){N.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new Ft,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,l=n/32*Math.PI*2;e.push(Math.cos(o),Math.sin(o),1,Math.cos(l),Math.sin(l),1)}t.addAttribute("position",new Et(e,3)),e=new Ni({fog:!1}),this.cone=new gi(t,e),this.add(this.cone),this.update()}function Ou(t){var e=[];t&&t.isBone&&e.push(t);for(var i=0;i<t.children.length;i++)e.push.apply(e,Ou(t.children[i]));return e}function Ca(t){for(var e=Ou(t),i=new Ft,n=[],o=[],l=new L(0,0,1),f=new L(0,1,0),p=0;p<e.length;p++){var y=e[p];y.parent&&y.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),o.push(l.r,l.g,l.b),o.push(f.r,f.g,f.b))}i.addAttribute("position",new Et(n,3)),i.addAttribute("color",new Et(o,3)),n=new Ni({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0}),gi.call(this,i,n),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function kr(t,e,i){this.light=t,this.light.updateMatrixWorld(),this.color=i,t=new Or(e,4,2),e=new Ge({wireframe:!0,fog:!1}),pi.call(this,t,e),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Aa(t,e){N.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new Ni({fog:!1}),e=new Ft,e.addAttribute("position",new K(new Float32Array(15),3)),this.line=new ji(e,t),this.add(this.line),this.update()}function Pa(t,e,i){N.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,t=new _s(e),t.rotateY(.5*Math.PI),this.material=new Ge({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 K(e,3)),this.add(new pi(t,this.material)),this.update()}function gl(t,e,i,n){t=t||10,e=e||10,i=new L(i!==void 0?i:4473924),n=new L(n!==void 0?n:8947848);var o=e/2,l=t/e,f=t/2;t=[];for(var p=[],y=0,w=0,A=-f;y<=e;y++,A+=l){t.push(-f,0,A,f,0,A),t.push(A,0,-f,A,0,f);var P=y===o?i:n;P.toArray(p,w),w+=3,P.toArray(p,w),w+=3,P.toArray(p,w),w+=3,P.toArray(p,w),w+=3}e=new Ft,e.addAttribute("position",new Et(t,3)),e.addAttribute("color",new Et(p,3)),i=new Ni({vertexColors:2}),gi.call(this,e,i)}function sh(t,e,i,n,o,l){t=t||10,e=e||16,i=i||8,n=n||64,o=new L(o!==void 0?o:4473924),l=new L(l!==void 0?l:8947848);var f=[],p=[],y;for(y=0;y<=e;y++){var w=y/e*2*Math.PI,A=Math.sin(w)*t;w=Math.cos(w)*t,f.push(0,0,0),f.push(A,0,w);var P=y&1?o:l;p.push(P.r,P.g,P.b),p.push(P.r,P.g,P.b)}for(y=0;y<=i;y++){P=y&1?o:l;var B=t-t/i*y;for(e=0;e<n;e++)w=e/n*2*Math.PI,A=Math.sin(w)*B,w=Math.cos(w)*B,f.push(A,0,w),p.push(P.r,P.g,P.b),w=(e+1)/n*2*Math.PI,A=Math.sin(w)*B,w=Math.cos(w)*B,f.push(A,0,w),p.push(P.r,P.g,P.b)}t=new Ft,t.addAttribute("position",new Et(f,3)),t.addAttribute("color",new Et(p,3)),f=new Ni({vertexColors:2}),gi.call(this,t,f)}function vl(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 Ft,e=new Et(6*e,3),i.addAttribute("position",e),gi.call(this,i,new Ni({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function dr(t,e,i){N.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 Ft,t.addAttribute("position",new Et([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3)),e=new Ni({fog:!1}),this.lightPlane=new ji(t,e),this.add(this.lightPlane),t=new Ft,t.addAttribute("position",new Et([0,0,0,0,0,1],3)),this.targetLine=new ji(t,e),this.add(this.targetLine),this.update()}function yl(t){function e(H,q,$){i(H,$),i(q,$)}function i(H,q){l.push(0,0,0),f.push(q.r,q.g,q.b),p[H]===void 0&&(p[H]=[]),p[H].push(l.length/3-1)}var n=new Ft,o=new Ni({color:16777215,vertexColors:1}),l=[],f=[],p={},y=new L(16755200),w=new L(16711680),A=new L(43775),P=new L(16777215),B=new L(3355443);e("n1","n2",y),e("n2","n4",y),e("n4","n3",y),e("n3","n1",y),e("f1","f2",y),e("f2","f4",y),e("f4","f3",y),e("f3","f1",y),e("n1","f1",y),e("n2","f2",y),e("n3","f3",y),e("n4","f4",y),e("p","n1",w),e("p","n2",w),e("p","n3",w),e("p","n4",w),e("u1","u2",A),e("u2","u3",A),e("u3","u1",A),e("c","t",P),e("p","c",B),e("cn1","cn2",B),e("cn3","cn4",B),e("cf1","cf2",B),e("cf3","cf4",B),n.addAttribute("position",new Et(l,3)),n.addAttribute("color",new Et(f,3)),gi.call(this,n,o),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=p,this.update()}function zo(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 Ft;n.setIndex(new K(t,1)),n.addAttribute("position",new K(i,3)),gi.call(this,n,new Ni({color:e})),this.matrixAutoUpdate=!1,this.update()}function _l(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 Ft;i.setIndex(new K(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)),gi.call(this,i,new Ni({color:t})),this.geometry.computeBoundingSphere()}function xl(t,e,i){this.type="PlaneHelper",this.plane=t,this.size=e===void 0?1:e,t=i!==void 0?i:16776960,e=new Ft,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(),ji.call(this,e,new Ni({color:t})),e=new Ft,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 pi(e,new Ge({color:t,opacity:.2,transparent:!0,depthWrite:!1})))}function ko(t,e,i,n,o,l){N.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),l===void 0&&(l=.2*o),fh===void 0&&(fh=new Ft,fh.addAttribute("position",new Et([0,0,0,0,1,0],3)),Sl=new Oo(0,.5,1,5,1),Sl.translate(0,-.5,0)),this.position.copy(e),this.line=new ji(fh,new Ni({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new pi(Sl,new Ge({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,o,l)}function xr(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 Ft,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 Ni({vertexColors:2}),gi.call(this,t,e)}function Iu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),On.call(this,t),this.type="catmullrom",this.closed=!0}function Du(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),On.call(this,t),this.type="catmullrom"}function Xh(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),On.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(a.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 di={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,l=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[l&255]+t[l>>8&255]+t[l>>16&255]+t[l>>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*di.DEG2RAD},radToDeg:function(t){return t*di.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(s.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(s.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 s,e=new s;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(c.prototype,{isMatrix4:!0,set:function(t,e,i,n,o,l,f,p,y,w,A,P,B,H,q,$){var rt=this.elements;return rt[0]=t,rt[4]=e,rt[8]=i,rt[12]=n,rt[1]=o,rt[5]=l,rt[9]=f,rt[13]=p,rt[2]=y,rt[6]=w,rt[10]=A,rt[14]=P,rt[3]=B,rt[7]=H,rt[11]=q,rt[15]=$,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 c().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 u;return function(e){var i=this.elements,n=e.elements,o=1/t.setFromMatrixColumn(e,0).length(),l=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]*l,i[5]=n[5]*l,i[6]=n[6]*l,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,l=Math.cos(i);i=Math.sin(i);var f=Math.cos(n);n=Math.sin(n);var p=Math.cos(o);if(o=Math.sin(o),t.order==="XYZ"){t=l*p;var y=l*o,w=i*p,A=i*o;e[0]=f*p,e[4]=-f*o,e[8]=n,e[1]=y+w*n,e[5]=t-A*n,e[9]=-i*f,e[2]=A-t*n,e[6]=w+y*n,e[10]=l*f}else t.order==="YXZ"?(t=f*p,y=f*o,w=n*p,A=n*o,e[0]=t+A*i,e[4]=w*i-y,e[8]=l*n,e[1]=l*o,e[5]=l*p,e[9]=-i,e[2]=y*i-w,e[6]=A+t*i,e[10]=l*f):t.order==="ZXY"?(t=f*p,y=f*o,w=n*p,A=n*o,e[0]=t-A*i,e[4]=-l*o,e[8]=w+y*i,e[1]=y+w*i,e[5]=l*p,e[9]=A-t*i,e[2]=-l*n,e[6]=i,e[10]=l*f):t.order==="ZYX"?(t=l*p,y=l*o,w=i*p,A=i*o,e[0]=f*p,e[4]=w*n-y,e[8]=t*n+A,e[1]=f*o,e[5]=A*n+t,e[9]=y*n-w,e[2]=-n,e[6]=i*f,e[10]=l*f):t.order==="YZX"?(t=l*f,y=l*n,w=i*f,A=i*n,e[0]=f*p,e[4]=A-t*o,e[8]=w*o+y,e[1]=o,e[5]=l*p,e[9]=-i*p,e[2]=-n*p,e[6]=y*o+w,e[10]=t-A*o):t.order==="XZY"&&(t=l*f,y=l*n,w=i*f,A=i*n,e[0]=f*p,e[4]=-o,e[8]=n*p,e[1]=t*o+A,e[5]=l*p,e[9]=y*o-w,e[2]=w*o-y,e[6]=i*p,e[10]=A*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 u(0,0,0),e=new u(1,1,1);return function(i){return this.compose(t,i,e)}}(),lookAt:function(){var t=new u,e=new u,i=new u;return function(n,o,l){var f=this.elements;return i.subVectors(n,o),i.lengthSq()===0&&(i.z=1),i.normalize(),t.crossVectors(l,i),t.lengthSq()===0&&(Math.abs(l.z)===1?i.x+=1e-4:i.z+=1e-4,i.normalize(),t.crossVectors(l,i)),t.normalize(),e.crossVectors(i,t),f[0]=t.x,f[4]=e.x,f[8]=i.x,f[1]=t.y,f[5]=e.y,f[9]=i.y,f[2]=t.z,f[6]=e.z,f[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],l=i[8],f=i[12],p=i[1],y=i[5],w=i[9],A=i[13],P=i[2],B=i[6],H=i[10],q=i[14],$=i[3],rt=i[7],xt=i[11];i=i[15];var gt=n[0],Ct=n[4],wt=n[8],Vt=n[12],J=n[1],ot=n[5],zt=n[9],ee=n[13],$t=n[2],Yt=n[6],Te=n[10],me=n[14],De=n[3],be=n[7],ae=n[11];return n=n[15],e[0]=t*gt+o*J+l*$t+f*De,e[4]=t*Ct+o*ot+l*Yt+f*be,e[8]=t*wt+o*zt+l*Te+f*ae,e[12]=t*Vt+o*ee+l*me+f*n,e[1]=p*gt+y*J+w*$t+A*De,e[5]=p*Ct+y*ot+w*Yt+A*be,e[9]=p*wt+y*zt+w*Te+A*ae,e[13]=p*Vt+y*ee+w*me+A*n,e[2]=P*gt+B*J+H*$t+q*De,e[6]=P*Ct+B*ot+H*Yt+q*be,e[10]=P*wt+B*zt+H*Te+q*ae,e[14]=P*Vt+B*ee+H*me+q*n,e[3]=$*gt+rt*J+xt*$t+i*De,e[7]=$*Ct+rt*ot+xt*Yt+i*be,e[11]=$*wt+rt*zt+xt*Te+i*ae,e[15]=$*Vt+rt*ee+xt*me+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 u;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],l=t[1],f=t[5],p=t[9],y=t[13],w=t[2],A=t[6],P=t[10],B=t[14];return t[3]*(+o*p*A-n*y*A-o*f*P+i*y*P+n*f*B-i*p*B)+t[7]*(+e*p*B-e*y*P+o*l*P-n*l*B+n*y*w-o*p*w)+t[11]*(+e*y*A-e*f*B-o*l*A+i*l*B+o*f*w-i*y*w)+t[15]*(-n*f*w-e*p*A+e*f*P+n*l*A-i*l*P+i*p*w)},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],l=n[2],f=n[3],p=n[4],y=n[5],w=n[6],A=n[7],P=n[8],B=n[9],H=n[10],q=n[11],$=n[12],rt=n[13],xt=n[14];n=n[15];var gt=B*xt*A-rt*H*A+rt*w*q-y*xt*q-B*w*n+y*H*n,Ct=$*H*A-P*xt*A-$*w*q+p*xt*q+P*w*n-p*H*n,wt=P*rt*A-$*B*A+$*y*q-p*rt*q-P*y*n+p*B*n,Vt=$*B*w-P*rt*w-$*y*H+p*rt*H+P*y*xt-p*B*xt,J=t*gt+o*Ct+l*wt+f*Vt;if(J===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/J,i[0]=gt*e,i[1]=(rt*H*f-B*xt*f-rt*l*q+o*xt*q+B*l*n-o*H*n)*e,i[2]=(y*xt*f-rt*w*f+rt*l*A-o*xt*A-y*l*n+o*w*n)*e,i[3]=(B*w*f-y*H*f-B*l*A+o*H*A+y*l*q-o*w*q)*e,i[4]=Ct*e,i[5]=(P*xt*f-$*H*f+$*l*q-t*xt*q-P*l*n+t*H*n)*e,i[6]=($*w*f-p*xt*f-$*l*A+t*xt*A+p*l*n-t*w*n)*e,i[7]=(p*H*f-P*w*f+P*l*A-t*H*A-p*l*q+t*w*q)*e,i[8]=wt*e,i[9]=($*B*f-P*rt*f-$*o*q+t*rt*q+P*o*n-t*B*n)*e,i[10]=(p*rt*f-$*y*f+$*o*A-t*rt*A-p*o*n+t*y*n)*e,i[11]=(P*y*f-p*B*f-P*o*A+t*B*A+p*o*q-t*y*q)*e,i[12]=Vt*e,i[13]=(P*rt*l-$*B*l+$*o*H-t*rt*H-P*o*xt+t*B*xt)*e,i[14]=($*y*l-p*rt*l-$*o*w+t*rt*w+p*o*xt-t*y*xt)*e,i[15]=(p*B*l-P*y*l+P*o*w-t*B*w-p*o*H+t*y*H)*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,l=t.y;t=t.z;var f=n*o,p=n*l;return this.set(f*o+i,f*l-e*t,f*t+e*l,0,f*l+e*t,p*l+i,p*t-e*o,0,f*t-e*l,p*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,l=e._y,f=e._z,p=e._w,y=o+o,w=l+l,A=f+f;e=o*y;var P=o*w;o*=A;var B=l*w;l*=A,f*=A,y*=p,w*=p,p*=A,A=i.x;var H=i.y;return i=i.z,n[0]=(1-(B+f))*A,n[1]=(P+p)*A,n[2]=(o-w)*A,n[3]=0,n[4]=(P-p)*H,n[5]=(1-(e+f))*H,n[6]=(l+y)*H,n[7]=0,n[8]=(o+w)*i,n[9]=(l-y)*i,n[10]=(1-(e+B))*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 u,e=new c;return function(i,n,o){var l=this.elements,f=t.set(l[0],l[1],l[2]).length(),p=t.set(l[4],l[5],l[6]).length(),y=t.set(l[8],l[9],l[10]).length();0>this.determinant()&&(f=-f),i.x=l[12],i.y=l[13],i.z=l[14],e.copy(this),i=1/f,l=1/p;var w=1/y;return e.elements[0]*=i,e.elements[1]*=i,e.elements[2]*=i,e.elements[4]*=l,e.elements[5]*=l,e.elements[6]*=l,e.elements[8]*=w,e.elements[9]*=w,e.elements[10]*=w,n.setFromRotationMatrix(e),o.x=f,o.y=p,o.z=y,this}}(),makePerspective:function(t,e,i,n,o,l){l===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var f=this.elements;return f[0]=2*o/(e-t),f[4]=0,f[8]=(e+t)/(e-t),f[12]=0,f[1]=0,f[5]=2*o/(i-n),f[9]=(i+n)/(i-n),f[13]=0,f[2]=0,f[6]=0,f[10]=-(l+o)/(l-o),f[14]=-2*l*o/(l-o),f[3]=0,f[7]=0,f[11]=-1,f[15]=0,this},makeOrthographic:function(t,e,i,n,o,l){var f=this.elements,p=1/(e-t),y=1/(i-n),w=1/(l-o);return f[0]=2*p,f[4]=0,f[8]=0,f[12]=-((e+t)*p),f[1]=0,f[5]=2*y,f[9]=0,f[13]=-((i+n)*y),f[2]=0,f[6]=0,f[10]=-2*w,f[14]=-((l+o)*w),f[3]=0,f[7]=0,f[11]=0,f[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(d,{slerp:function(t,e,i,n){return i.copy(t).slerp(e,n)},slerpFlat:function(t,e,i,n,o,l,f){var p=i[n+0],y=i[n+1],w=i[n+2];i=i[n+3],n=o[l+0];var A=o[l+1],P=o[l+2];if(o=o[l+3],i!==o||p!==n||y!==A||w!==P){l=1-f;var B=p*n+y*A+w*P+i*o,H=0<=B?1:-1,q=1-B*B;q>Number.EPSILON&&(q=Math.sqrt(q),B=Math.atan2(q,B*H),l=Math.sin(l*B)/q,f=Math.sin(f*B)/q),H*=f,p=p*l+n*H,y=y*l+A*H,w=w*l+P*H,i=i*l+o*H,l===1-f&&(f=1/Math.sqrt(p*p+y*y+w*w+i*i),p*=f,y*=f,w*=f,i*=f)}t[e]=p,t[e+1]=y,t[e+2]=w,t[e+3]=i}}),Object.defineProperties(d.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(d.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 l=Math.cos,f=Math.sin,p=l(i/2),y=l(n/2);return l=l(o/2),i=f(i/2),n=f(n/2),o=f(o/2),t==="XYZ"?(this._x=i*y*l+p*n*o,this._y=p*n*l-i*y*o,this._z=p*y*o+i*n*l,this._w=p*y*l-i*n*o):t==="YXZ"?(this._x=i*y*l+p*n*o,this._y=p*n*l-i*y*o,this._z=p*y*o-i*n*l,this._w=p*y*l+i*n*o):t==="ZXY"?(this._x=i*y*l-p*n*o,this._y=p*n*l+i*y*o,this._z=p*y*o+i*n*l,this._w=p*y*l-i*n*o):t==="ZYX"?(this._x=i*y*l-p*n*o,this._y=p*n*l+i*y*o,this._z=p*y*o-i*n*l,this._w=p*y*l+i*n*o):t==="YZX"?(this._x=i*y*l+p*n*o,this._y=p*n*l+i*y*o,this._z=p*y*o-i*n*l,this._w=p*y*l-i*n*o):t==="XZY"&&(this._x=i*y*l-p*n*o,this._y=p*n*l-i*y*o,this._z=p*y*o+i*n*l,this._w=p*y*l+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],l=e[5],f=e[9],p=e[2],y=e[6];e=e[10];var w=i+l+e;return 0<w?(i=.5/Math.sqrt(w+1),this._w=.25/i,this._x=(y-f)*i,this._y=(n-p)*i,this._z=(o-t)*i):i>l&&i>e?(i=2*Math.sqrt(1+i-l-e),this._w=(y-f)/i,this._x=.25*i,this._y=(t+o)/i,this._z=(n+p)/i):l>e?(i=2*Math.sqrt(1+l-i-e),this._w=(n-p)/i,this._x=(t+o)/i,this._y=.25*i,this._z=(f+y)/i):(i=2*Math.sqrt(1+e-i-l),this._w=(o-t)/i,this._x=(n+p)/i,this._y=(f+y)/i,this._z=.25*i),this.onChangeCallback(),this},setFromUnitVectors:function(){var t=new u,e;return function(i,n){return t===void 0&&(t=new u),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(di.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 l=e._x,f=e._y,p=e._z;return e=e._w,this._x=i*e+t*l+n*p-o*f,this._y=n*e+t*f+o*l-i*p,this._z=o*e+t*p+i*f-n*l,this._w=t*e-i*l-n*f-o*p,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,l=this._w,f=l*t._w+i*t._x+n*t._y+o*t._z;if(0>f?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,f=-f):this.copy(t),1<=f)return this._w=l,this._x=i,this._y=n,this._z=o,this;if(t=1-f*f,t<=Number.EPSILON)return f=1-e,this._w=f*l+e*this._w,this._x=f*i+e*this._x,this._y=f*n+e*this._y,this._z=f*o+e*this._z,this.normalize();t=Math.sqrt(t);var p=Math.atan2(t,f);return f=Math.sin((1-e)*p)/t,e=Math.sin(e*p)/t,this._w=l*f+this._w*e,this._x=i*f+this._x*e,this._y=n*f+this._y*e,this._z=o*f+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(u.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 d;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 d;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,l=t.y,f=t.z;t=t.w;var p=t*e+l*n-f*i,y=t*i+f*e-o*n,w=t*n+o*i-l*e;return e=-o*e-l*i-f*n,this.x=p*t+e*-o+y*-f-w*-l,this.y=y*t+e*-l+w*-o-p*-f,this.z=w*t+e*-f+p*-l-y*-o,this},project:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)},unproject:function(){var t=new c;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 u,e=new u;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,l=e.y;return e=e.z,this.x=n*e-t*l,this.y=t*o-i*e,this.z=i*l-n*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new u;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new u;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(di.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(m.prototype,{isMatrix3:!0,set:function(t,e,i,n,o,l,f,p,y){var w=this.elements;return w[0]=t,w[1]=n,w[2]=f,w[3]=e,w[4]=o,w[5]=p,w[6]=i,w[7]=l,w[8]=y,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 u;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],l=i[6],f=i[1],p=i[4],y=i[7],w=i[2],A=i[5];i=i[8];var P=n[0],B=n[3],H=n[6],q=n[1],$=n[4],rt=n[7],xt=n[2],gt=n[5];return n=n[8],e[0]=t*P+o*q+l*xt,e[3]=t*B+o*$+l*gt,e[6]=t*H+o*rt+l*n,e[1]=f*P+p*q+y*xt,e[4]=f*B+p*$+y*gt,e[7]=f*H+p*rt+y*n,e[2]=w*P+A*q+i*xt,e[5]=w*B+A*$+i*gt,e[8]=w*H+A*rt+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],l=t[4],f=t[5],p=t[6],y=t[7];return t=t[8],e*l*t-e*f*y-i*o*t+i*f*p+n*o*y-n*l*p},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],l=i[2],f=i[3],p=i[4],y=i[5],w=i[6],A=i[7];i=i[8];var P=i*p-y*A,B=y*w-i*f,H=A*f-p*w,q=n*P+o*B+l*H;if(q===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/q,t[0]=P*e,t[1]=(l*A-i*o)*e,t[2]=(y*o-l*p)*e,t[3]=B*e,t[4]=(i*n-l*w)*e,t[5]=(l*f-y*n)*e,t[6]=H*e,t[7]=(o*w-A*n)*e,t[8]=(p*n-o*f)*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,l,f){var p=Math.cos(o);o=Math.sin(o),this.set(i*p,i*o,-i*(p*l+o*f)+l+t,-n*o,n*p,-n*(-o*l+p*f)+f+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],l=i[6],f=i[1],p=i[4],y=i[7];return i[0]=e*n+t*f,i[3]=e*o+t*p,i[6]=e*l+t*y,i[1]=-t*n+e*f,i[4]=-t*o+e*p,i[7]=-t*l+e*y,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 ss={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")}},Fs=0;g.DEFAULT_IMAGE=void 0,g.DEFAULT_MAPPING=300,g.prototype=Object.assign(Object.create(a.prototype),{constructor:g,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=di.generateUUID()),!e&&t.images[n.uuid]===void 0){if(Array.isArray(n))for(var o=[],l=0,f=n.length;l<f;l++)o.push(ss.getDataURL(n[l]));else o=ss.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(g.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(_.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],l=t[5],f=t[9],p=t[2],y=t[6],w=t[10];return .01>Math.abs(i-o)&&.01>Math.abs(n-p)&&.01>Math.abs(f-y)?.1>Math.abs(i+o)&&.1>Math.abs(n+p)&&.1>Math.abs(f+y)&&.1>Math.abs(e+l+w-3)?(this.set(1,0,0,0),this):(t=Math.PI,e=(e+1)/2,l=(l+1)/2,w=(w+1)/2,i=(i+o)/4,n=(n+p)/4,f=(f+y)/4,e>l&&e>w?.01>e?(y=0,i=p=.707106781):(y=Math.sqrt(e),p=i/y,i=n/y):l>w?.01>l?(y=.707106781,p=0,i=.707106781):(p=Math.sqrt(l),y=i/p,i=f/p):.01>w?(p=y=.707106781,i=0):(i=Math.sqrt(w),y=n/i,p=f/i),this.set(y,p,i,t),this):(t=Math.sqrt((y-f)*(y-f)+(n-p)*(n-p)+(o-i)*(o-i)),.001>Math.abs(t)&&(t=1),this.x=(y-f)/t,this.y=(n-p)/t,this.z=(o-i)/t,this.w=Math.acos((e+l+w-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 _,e=new _),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}}),S.prototype=Object.assign(Object.create(a.prototype),{constructor:S,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"})}}),b.prototype=Object.create(S.prototype),b.prototype.constructor=b,b.prototype.isWebGLRenderTargetCube=!0,O.prototype=Object.create(g.prototype),O.prototype.constructor=O,O.prototype.isDataTexture=!0,Object.assign(k.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,l=-1/0,f=-1/0,p=0,y=t.length;p<y;p+=3){var w=t[p],A=t[p+1],P=t[p+2];w<e&&(e=w),A<i&&(i=A),P<n&&(n=P),w>o&&(o=w),A>l&&(l=A),P>f&&(f=P)}return this.min.set(e,i,n),this.max.set(o,l,f),this},setFromBufferAttribute:function(t){for(var e=1/0,i=1/0,n=1/0,o=-1/0,l=-1/0,f=-1/0,p=0,y=t.count;p<y;p++){var w=t.getX(p),A=t.getY(p),P=t.getZ(p);w<e&&(e=w),A<i&&(i=A),P<n&&(n=P),w>o&&(o=w),A>l&&(l=A),P>f&&(f=P)}return this.min.set(e,i,n),this.max.set(o,l,f),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 u;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 u),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 u),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(l){var f=l.geometry;if(f!==void 0){if(f.isGeometry)for(f=f.vertices,i=0,n=f.length;i<n;i++)o.copy(f[i]),o.applyMatrix4(l.matrixWorld),e.expandByPoint(o);else if(f.isBufferGeometry&&(f=f.attributes.position,f!==void 0))for(i=0,n=f.count;i<n;i++)o.fromBufferAttribute(f,i).applyMatrix4(l.matrixWorld),e.expandByPoint(o)}}var e,i,n,o=new u;return function(l){return e=this,l.updateMatrixWorld(!0),l.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 u),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 u;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(P){var B,H=0;for(B=P.length-3;H<=B;H+=3){p.fromArray(P,H);var q=w.x*Math.abs(p.x)+w.y*Math.abs(p.y)+w.z*Math.abs(p.z),$=e.dot(p),rt=i.dot(p),xt=n.dot(p);if(Math.max(-Math.max($,rt,xt),Math.min($,rt,xt))>q)return!1}return!0}var e=new u,i=new u,n=new u,o=new u,l=new u,f=new u,p=new u,y=new u,w=new u,A=new u;return function(P){return this.isEmpty()||(this.getCenter(y),w.subVectors(this.max,y),e.subVectors(P.a,y),i.subVectors(P.b,y),n.subVectors(P.c,y),o.subVectors(i,e),l.subVectors(n,i),f.subVectors(e,n),P=[0,-o.z,o.y,0,-l.z,l.y,0,-f.z,f.y,o.z,0,-o.x,l.z,0,-l.x,f.z,0,-f.x,-o.y,o.x,0,-l.y,l.x,0,-f.y,f.x,0],!t(P))||(P=[1,0,0,0,1,0,0,0,1],!t(P))?!1:(A.crossVectors(o,l),P=[A.x,A.y,A.z],t(P))}}(),clampPoint:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new u),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new u;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new u;return function(e){return e===void 0&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new D),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 u,new u,new u,new u,new u,new u,new u,new u];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(D.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new k;return function(e,i){var n=this.center;i!==void 0?n.copy(i):t.setFromPoints(e).getCenter(n);for(var o=i=0,l=e.length;o<l;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 u),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 k),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(F.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 u,e=new u;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 u),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new u;return function(e,i){i===void 0&&(console.warn("THREE.Plane: .intersectLine() target is now required"),i=new u);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 u),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new u,e=new m;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(E.prototype,{set:function(t,e,i,n,o,l){var f=this.planes;return f[0].copy(t),f[1].copy(e),f[2].copy(i),f[3].copy(n),f[4].copy(o),f[5].copy(l),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],l=i[3],f=i[4],p=i[5],y=i[6],w=i[7],A=i[8],P=i[9],B=i[10],H=i[11],q=i[12],$=i[13],rt=i[14];return i=i[15],e[0].setComponents(l-t,w-f,H-A,i-q).normalize(),e[1].setComponents(l+t,w+f,H+A,i+q).normalize(),e[2].setComponents(l+n,w+p,H+P,i+$).normalize(),e[3].setComponents(l-n,w-p,H-P,i-$).normalize(),e[4].setComponents(l-o,w-y,H-B,i-rt).normalize(),e[5].setComponents(l+o,w+y,H+B,i+rt).normalize(),this},intersectsObject:function(){var t=new D;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 D;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 u;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 Ci={alphamap_fragment:`#ifdef USE_ALPHAMAP
285
+ `+e),A=e+A,w=sa(p,35633,y+w),A=sa(p,35632,A),p.attachShader(gt,w),p.attachShader(gt,A),n.index0AttributeName!==void 0?p.bindAttribLocation(gt,0,n.index0AttributeName):l.morphTargets===!0&&p.bindAttribLocation(gt,0,"position"),p.linkProgram(gt),l=p.getProgramInfoLog(gt).trim(),f=p.getShaderInfoLog(w).trim(),P=p.getShaderInfoLog(A).trim(),H=B=!0,p.getProgramParameter(gt,35714)===!1?(B=!1,console.error("THREE.WebGLProgram: shader error: ",p.getError(),"35715",p.getProgramParameter(gt,35715),"gl.getProgramInfoLog",l,f,P)):l!==""?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",l):(f===""||P==="")&&(H=!1),H&&(this.diagnostics={runnable:B,material:n,programLog:l,vertexShader:{log:f,prefix:y},fragmentShader:{log:P,prefix:e}}),p.deleteShader(w),p.deleteShader(A);var Ct;this.getUniforms=function(){return Ct===void 0&&(Ct=new ho(p,gt,t)),Ct};var wt;return this.getAttributes=function(){if(wt===void 0){for(var Vt={},J=p.getProgramParameter(gt,35721),ot=0;ot<J;ot++){var zt=p.getActiveAttrib(gt,ot).name;Vt[zt]=p.getAttribLocation(gt,zt)}wt=Vt}return wt},this.destroy=function(){p.deleteProgram(gt),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=Bo++,this.code=i,this.usedTimes=1,this.program=gt,this.vertexShader=w,this.fragmentShader=A,this}function lt(t,e,i){function n(p,y){if(p)p.isTexture?w=p.encoding:p.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),w=p.texture.encoding);else var w=3e3;return w===3e3&&y&&(w=3007),w}var o=[],l={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"},f="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(p,y,w,A,P,B,H){var q=l[p.type];if(H.isSkinnedMesh){var $=H.skeleton.bones;if(i.floatVertexTextures)$=1024;else{var rt=Math.min(Math.floor((i.maxVertexUniforms-20)/4),$.length);rt<$.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+$.length+" bones. This GPU supports "+rt+"."),$=0):$=rt}}else $=0;rt=i.precision,p.precision!==null&&(rt=i.getMaxPrecision(p.precision),rt!==p.precision&&console.warn("THREE.WebGLProgram.getParameters:",p.precision,"not supported, using",rt,"instead."));var xt=t.getRenderTarget();return{shaderID:q,precision:rt,supportsVertexTextures:i.vertexTextures,outputEncoding:n(xt?xt.texture:null,t.gammaOutput),map:!!p.map,mapEncoding:n(p.map,t.gammaInput),matcap:!!p.matcap,matcapEncoding:n(p.matcap,t.gammaInput),envMap:!!p.envMap,envMapMode:p.envMap&&p.envMap.mapping,envMapEncoding:n(p.envMap,t.gammaInput),envMapCubeUV:!!p.envMap&&(p.envMap.mapping===306||p.envMap.mapping===307),lightMap:!!p.lightMap,aoMap:!!p.aoMap,emissiveMap:!!p.emissiveMap,emissiveMapEncoding:n(p.emissiveMap,t.gammaInput),bumpMap:!!p.bumpMap,normalMap:!!p.normalMap,objectSpaceNormalMap:p.normalMapType===1,displacementMap:!!p.displacementMap,roughnessMap:!!p.roughnessMap,metalnessMap:!!p.metalnessMap,specularMap:!!p.specularMap,alphaMap:!!p.alphaMap,gradientMap:!!p.gradientMap,combine:p.combine,vertexColors:p.vertexColors,fog:!!A,useFog:p.fog,fogExp:A&&A.isFogExp2,flatShading:p.flatShading,sizeAttenuation:p.sizeAttenuation,logarithmicDepthBuffer:i.logarithmicDepthBuffer,skinning:p.skinning&&0<$,maxBones:$,useVertexTexture:i.floatVertexTextures,morphTargets:p.morphTargets,morphNormals:p.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:y.directional.length,numPointLights:y.point.length,numSpotLights:y.spot.length,numRectAreaLights:y.rectArea.length,numHemiLights:y.hemi.length,numClippingPlanes:P,numClipIntersection:B,dithering:p.dithering,shadowMapEnabled:t.shadowMap.enabled&&H.receiveShadow&&0<w.length,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:p.premultipliedAlpha,alphaTest:p.alphaTest,doubleSided:p.side===2,flipSided:p.side===1,depthPacking:p.depthPacking!==void 0?p.depthPacking:!1}},this.getProgramCode=function(p,y){var w=[];if(y.shaderID?w.push(y.shaderID):(w.push(p.fragmentShader),w.push(p.vertexShader)),p.defines!==void 0)for(var A in p.defines)w.push(A),w.push(p.defines[A]);for(A=0;A<f.length;A++)w.push(y[f[A]]);return w.push(p.onBeforeCompile.toString()),w.push(t.gammaOutput),w.push(t.gammaFactor),w.join()},this.acquireProgram=function(p,y,w,A){for(var P,B=0,H=o.length;B<H;B++){var q=o[B];if(q.code===A){P=q,++P.usedTimes;break}}return P===void 0&&(P=new tt(t,e,A,p,y,w,i),o.push(P)),P},this.releaseProgram=function(p){if(--p.usedTimes===0){var y=o.indexOf(p);o[y]=o[o.length-1],o.pop(),p.destroy()}},this.programs=o}function at(){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 j(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 St(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function ht(){var t=[],e=0,i=[],n=[];return{opaque:i,transparent:n,init:function(){e=0,i.length=0,n.length=0},push:function(o,l,f,p,y){var w=t[e];w===void 0?(w={id:o.id,object:o,geometry:l,material:f,program:f.program,renderOrder:o.renderOrder,z:p,group:y},t[e]=w):(w.id=o.id,w.object=o,w.geometry=l,w.material=f,w.program=f.program,w.renderOrder=o.renderOrder,w.z=p,w.group=y),(f.transparent===!0?n:i).push(w),e++},sort:function(){1<i.length&&i.sort(j),1<n.length&&n.sort(St)}}}function Ot(){var t={};return{get:function(e,i){return e=e.id+","+i.id,i=t[e],i===void 0&&(i=new ht,t[e]=i),i},dispose:function(){t={}}}}function Ht(){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 u,color:new L,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new s};break;case"SpotLight":i={position:new u,direction:new u,color:new L,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new s};break;case"PointLight":i={position:new u,color:new L,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new s,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":i={direction:new u,skyColor:new L,groundColor:new L};break;case"RectAreaLight":i={color:new L,position:new u,halfWidth:new u,halfHeight:new u}}return t[e.id]=i}}}function kt(){var t=new Ht,e={id:Jh++,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 u,n=new c,o=new c;return{setup:function(l,f,p){var y=0,w=0,A=0,P=0,B=0,H=0,q=0,$=0;p=p.matrixWorldInverse;for(var rt=0,xt=l.length;rt<xt;rt++){var gt=l[rt],Ct=gt.color,wt=gt.intensity,Vt=gt.distance,J=gt.shadow&&gt.shadow.map?gt.shadow.map.texture:null;if(gt.isAmbientLight)y+=Ct.r*wt,w+=Ct.g*wt,A+=Ct.b*wt;else if(gt.isDirectionalLight){var ot=t.get(gt);ot.color.copy(gt.color).multiplyScalar(gt.intensity),ot.direction.setFromMatrixPosition(gt.matrixWorld),i.setFromMatrixPosition(gt.target.matrixWorld),ot.direction.sub(i),ot.direction.transformDirection(p),(ot.shadow=gt.castShadow)&&(Ct=gt.shadow,ot.shadowBias=Ct.bias,ot.shadowRadius=Ct.radius,ot.shadowMapSize=Ct.mapSize),e.directionalShadowMap[P]=J,e.directionalShadowMatrix[P]=gt.shadow.matrix,e.directional[P]=ot,P++}else gt.isSpotLight?(ot=t.get(gt),ot.position.setFromMatrixPosition(gt.matrixWorld),ot.position.applyMatrix4(p),ot.color.copy(Ct).multiplyScalar(wt),ot.distance=Vt,ot.direction.setFromMatrixPosition(gt.matrixWorld),i.setFromMatrixPosition(gt.target.matrixWorld),ot.direction.sub(i),ot.direction.transformDirection(p),ot.coneCos=Math.cos(gt.angle),ot.penumbraCos=Math.cos(gt.angle*(1-gt.penumbra)),ot.decay=gt.decay,(ot.shadow=gt.castShadow)&&(Ct=gt.shadow,ot.shadowBias=Ct.bias,ot.shadowRadius=Ct.radius,ot.shadowMapSize=Ct.mapSize),e.spotShadowMap[H]=J,e.spotShadowMatrix[H]=gt.shadow.matrix,e.spot[H]=ot,H++):gt.isRectAreaLight?(ot=t.get(gt),ot.color.copy(Ct).multiplyScalar(wt),ot.position.setFromMatrixPosition(gt.matrixWorld),ot.position.applyMatrix4(p),o.identity(),n.copy(gt.matrixWorld),n.premultiply(p),o.extractRotation(n),ot.halfWidth.set(.5*gt.width,0,0),ot.halfHeight.set(0,.5*gt.height,0),ot.halfWidth.applyMatrix4(o),ot.halfHeight.applyMatrix4(o),e.rectArea[q]=ot,q++):gt.isPointLight?(ot=t.get(gt),ot.position.setFromMatrixPosition(gt.matrixWorld),ot.position.applyMatrix4(p),ot.color.copy(gt.color).multiplyScalar(gt.intensity),ot.distance=gt.distance,ot.decay=gt.decay,(ot.shadow=gt.castShadow)&&(Ct=gt.shadow,ot.shadowBias=Ct.bias,ot.shadowRadius=Ct.radius,ot.shadowMapSize=Ct.mapSize,ot.shadowCameraNear=Ct.camera.near,ot.shadowCameraFar=Ct.camera.far),e.pointShadowMap[B]=J,e.pointShadowMatrix[B]=gt.shadow.matrix,e.point[B]=ot,B++):gt.isHemisphereLight&&(ot=t.get(gt),ot.direction.setFromMatrixPosition(gt.matrixWorld),ot.direction.transformDirection(p),ot.direction.normalize(),ot.skyColor.copy(gt.color).multiplyScalar(wt),ot.groundColor.copy(gt.groundColor).multiplyScalar(wt),e.hemi[$]=ot,$++)}e.ambient[0]=y,e.ambient[1]=w,e.ambient[2]=A,e.directional.length=P,e.spot.length=H,e.rectArea.length=q,e.point.length=B,e.hemi.length=$,e.hash.stateID=e.id,e.hash.directionalLength=P,e.hash.pointLength=B,e.hash.spotLength=H,e.hash.rectAreaLength=q,e.hash.hemiLength=$,e.hash.shadowsLength=f.length},state:e}}function Mt(){var t=new kt,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 he(){var t={};return{get:function(e,i){if(t[e.id]===void 0){var n=new Mt;t[e.id]={},t[e.id][i.id]=n}else t[e.id][i.id]===void 0?(n=new Mt,t[e.id][i.id]=n):n=t[e.id][i.id];return n},dispose:function(){t={}}}}function se(t){Wt.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 te(t){Wt.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new u,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 ye(t,e,i){function n(J,ot,zt,ee,$t,Yt){var Te=J.geometry,me=P,De=J.customDepthMaterial;return zt&&(me=B,De=J.customDistanceMaterial),De?me=De:(De=!1,ot.morphTargets&&(Te&&Te.isBufferGeometry?De=Te.morphAttributes&&Te.morphAttributes.position&&0<Te.morphAttributes.position.length:Te&&Te.isGeometry&&(De=Te.morphTargets&&0<Te.morphTargets.length)),J.isSkinnedMesh&&ot.skinning===!1&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",J),J=J.isSkinnedMesh&&ot.skinning,Te=0,De&&(Te|=1),J&&(Te|=2),me=me[Te]),t.localClippingEnabled&&ot.clipShadows===!0&&ot.clippingPlanes.length!==0&&(Te=me.uuid,De=ot.uuid,J=H[Te],J===void 0&&(J={},H[Te]=J),Te=J[De],Te===void 0&&(Te=me.clone(),J[De]=Te),me=Te),me.visible=ot.visible,me.wireframe=ot.wireframe,me.side=ot.shadowSide!=null?ot.shadowSide:q[ot.side],me.clipShadows=ot.clipShadows,me.clippingPlanes=ot.clippingPlanes,me.clipIntersection=ot.clipIntersection,me.wireframeLinewidth=ot.wireframeLinewidth,me.linewidth=ot.linewidth,zt&&me.isMeshDistanceMaterial&&(me.referencePosition.copy(ee),me.nearDistance=$t,me.farDistance=Yt),me}function o(J,ot,zt,ee){if(J.visible!==!1){if(J.layers.test(ot.layers)&&(J.isMesh||J.isLine||J.isPoints)&&J.castShadow&&(!J.frustumCulled||l.intersectsObject(J))){J.modelViewMatrix.multiplyMatrices(zt.matrixWorldInverse,J.matrixWorld);var $t=e.update(J),Yt=J.material;if(Array.isArray(Yt))for(var Te=$t.groups,me=0,De=Te.length;me<De;me++){var be=Te[me],ae=Yt[be.materialIndex];ae&&ae.visible&&(ae=n(J,ae,ee,A,zt.near,zt.far),t.renderBufferDirect(zt,null,$t,ae,J,be))}else Yt.visible&&(ae=n(J,Yt,ee,A,zt.near,zt.far),t.renderBufferDirect(zt,null,$t,ae,J,null))}for(J=J.children,$t=0,Yt=J.length;$t<Yt;$t++)o(J[$t],ot,zt,ee)}}var l=new E,f=new c,p=new s,y=new s(i,i),w=new u,A=new u,P=Array(4),B=Array(4),H={},q={0:1,1:0,2:2},$=[new u(1,0,0),new u(-1,0,0),new u(0,0,1),new u(0,0,-1),new u(0,1,0),new u(0,-1,0)],rt=[new u(0,1,0),new u(0,1,0),new u(0,1,0),new u(0,1,0),new u(0,0,1),new u(0,0,-1)],xt=[new _,new _,new _,new _,new _,new _];for(i=0;i!==4;++i){var gt=(i&1)!==0,Ct=(i&2)!==0,wt=new se({depthPacking:3201,morphTargets:gt,skinning:Ct});P[i]=wt,gt=new te({morphTargets:gt,skinning:Ct}),B[i]=gt}var Vt=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(J,ot,zt){if(Vt.enabled!==!1&&(Vt.autoUpdate!==!1||Vt.needsUpdate!==!1)&&J.length!==0){var ee=t.state;ee.disable(3042),ee.buffers.color.setClear(1,1,1,1),ee.buffers.depth.setTest(!0),ee.setScissorTest(!1);for(var $t,Yt=0,Te=J.length;Yt<Te;Yt++){var me=J[Yt];$t=me.shadow;var De=me&&me.isPointLight;if($t===void 0)console.warn("THREE.WebGLShadowMap:",me,"has no shadow.");else{var be=$t.camera;if(p.copy($t.mapSize),p.min(y),De){var ae=p.x,We=p.y;xt[0].set(2*ae,We,ae,We),xt[1].set(0,We,ae,We),xt[2].set(3*ae,We,ae,We),xt[3].set(ae,We,ae,We),xt[4].set(3*ae,0,ae,We),xt[5].set(ae,0,ae,We),p.x*=4,p.y*=2}for($t.map===null&&($t.map=new S(p.x,p.y,{minFilter:1003,magFilter:1003,format:1023}),$t.map.texture.name=me.name+".shadowMap",be.updateProjectionMatrix()),$t.isSpotLightShadow&&$t.update(me),ae=$t.map,We=$t.matrix,A.setFromMatrixPosition(me.matrixWorld),be.position.copy(A),De?($t=6,We.makeTranslation(-A.x,-A.y,-A.z)):($t=1,w.setFromMatrixPosition(me.target.matrixWorld),be.lookAt(w),be.updateMatrixWorld(),We.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),We.multiply(be.projectionMatrix),We.multiply(be.matrixWorldInverse)),t.setRenderTarget(ae),t.clear(),me=0;me<$t;me++)De&&(w.copy(be.position),w.add($[me]),be.up.copy(rt[me]),be.lookAt(w),be.updateMatrixWorld(),ee.viewport(xt[me])),f.multiplyMatrices(be.projectionMatrix,be.matrixWorldInverse),l.setFromMatrix(f),o(ot,zt,be,De)}}Vt.needsUpdate=!1}}}function ue(t,e,i,n){function o(Ut,Ye,ei){var Wi=new Uint8Array(4),Ae=t.createTexture();for(t.bindTexture(Ut,Ae),t.texParameteri(Ut,10241,9728),t.texParameteri(Ut,10240,9728),Ut=0;Ut<ei;Ut++)t.texImage2D(Ye+Ut,0,6408,1,1,0,6408,5121,Wi);return Ae}function l(Ut,Ye){xt[Ut]=1,gt[Ut]===0&&(t.enableVertexAttribArray(Ut),gt[Ut]=1),Ct[Ut]!==Ye&&((n.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](Ut,Ye),Ct[Ut]=Ye)}function f(Ut){wt[Ut]!==!0&&(t.enable(Ut),wt[Ut]=!0)}function p(Ut){wt[Ut]!==!1&&(t.disable(Ut),wt[Ut]=!1)}function y(Ut,Ye,ei,Wi,Ae,Xe,ri,Li){if(Ut===0)ot&&(p(3042),ot=!1);else if(ot||(f(3042),ot=!0),Ut!==5){if(Ut!==zt||Li!==be){if((ee!==100||Te!==100)&&(t.blendEquation(32774),Te=ee=100),Li)switch(Ut){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: ",Ut)}else switch(Ut){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: ",Ut)}De=me=Yt=$t=null,zt=Ut,be=Li}}else Ae=Ae||Ye,Xe=Xe||ei,ri=ri||Wi,(Ye!==ee||Ae!==Te)&&(t.blendEquationSeparate(i.convert(Ye),i.convert(Ae)),ee=Ye,Te=Ae),(ei!==$t||Wi!==Yt||Xe!==me||ri!==De)&&(t.blendFuncSeparate(i.convert(ei),i.convert(Wi),i.convert(Xe),i.convert(ri)),$t=ei,Yt=Wi,me=Xe,De=ri),zt=Ut,be=null}function w(Ut){ae!==Ut&&(Ut?t.frontFace(2304):t.frontFace(2305),ae=Ut)}function A(Ut){Ut!==0?(f(2884),Ut!==We&&(Ut===1?t.cullFace(1029):Ut===2?t.cullFace(1028):t.cullFace(1032))):p(2884),We=Ut}function P(Ut,Ye,ei){Ut?(f(32823),(fi!==Ye||Cn!==ei)&&(t.polygonOffset(Ye,ei),fi=Ye,Cn=ei)):p(32823)}function B(Ut){Ut===void 0&&(Ut=33984+_n-1),Vi!==Ut&&(t.activeTexture(Ut),Vi=Ut)}var H=new function(){var Ut=!1,Ye=new _,ei=null,Wi=new _(0,0,0,0);return{setMask:function(Ae){ei===Ae||Ut||(t.colorMask(Ae,Ae,Ae,Ae),ei=Ae)},setLocked:function(Ae){Ut=Ae},setClear:function(Ae,Xe,ri,Li,Ai){Ai===!0&&(Ae*=Li,Xe*=Li,ri*=Li),Ye.set(Ae,Xe,ri,Li),Wi.equals(Ye)===!1&&(t.clearColor(Ae,Xe,ri,Li),Wi.copy(Ye))},reset:function(){Ut=!1,ei=null,Wi.set(-1,0,0,0)}}},q=new function(){var Ut=!1,Ye=null,ei=null,Wi=null;return{setTest:function(Ae){Ae?f(2929):p(2929)},setMask:function(Ae){Ye===Ae||Ut||(t.depthMask(Ae),Ye=Ae)},setFunc:function(Ae){if(ei!==Ae){if(Ae)switch(Ae){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);ei=Ae}},setLocked:function(Ae){Ut=Ae},setClear:function(Ae){Wi!==Ae&&(t.clearDepth(Ae),Wi=Ae)},reset:function(){Ut=!1,Wi=ei=Ye=null}}},$=new function(){var Ut=!1,Ye=null,ei=null,Wi=null,Ae=null,Xe=null,ri=null,Li=null,Ai=null;return{setTest:function(ne){ne?f(2960):p(2960)},setMask:function(ne){Ye===ne||Ut||(t.stencilMask(ne),Ye=ne)},setFunc:function(ne,ii,Ze){(ei!==ne||Wi!==ii||Ae!==Ze)&&(t.stencilFunc(ne,ii,Ze),ei=ne,Wi=ii,Ae=Ze)},setOp:function(ne,ii,Ze){(Xe!==ne||ri!==ii||Li!==Ze)&&(t.stencilOp(ne,ii,Ze),Xe=ne,ri=ii,Li=Ze)},setLocked:function(ne){Ut=ne},setClear:function(ne){Ai!==ne&&(t.clearStencil(ne),Ai=ne)},reset:function(){Ut=!1,Ai=Li=ri=Xe=Ae=Wi=ei=Ye=null}}},rt=t.getParameter(34921),xt=new Uint8Array(rt),gt=new Uint8Array(rt),Ct=new Uint8Array(rt),wt={},Vt=null,J=null,ot=null,zt=null,ee=null,$t=null,Yt=null,Te=null,me=null,De=null,be=!1,ae=null,We=null,Qe=null,fi=null,Cn=null,_n=t.getParameter(35661),qi=!1;rt=0,rt=t.getParameter(7938),rt.indexOf("WebGL")!==-1?(rt=parseFloat(/^WebGL ([0-9])/.exec(rt)[1]),qi=1<=rt):rt.indexOf("OpenGL ES")!==-1&&(rt=parseFloat(/^OpenGL ES ([0-9])/.exec(rt)[1]),qi=2<=rt);var Vi=null,on={},An=new _,Ce=new _,ti={};return ti[3553]=o(3553,3553,1),ti[34067]=o(34067,34069,6),H.setClear(0,0,0,1),q.setClear(1),$.setClear(0),f(2929),q.setFunc(3),w(!1),A(1),f(2884),y(0),{buffers:{color:H,depth:q,stencil:$},initAttributes:function(){for(var Ut=0,Ye=xt.length;Ut<Ye;Ut++)xt[Ut]=0},enableAttribute:function(Ut){l(Ut,0)},enableAttributeAndDivisor:l,disableUnusedAttributes:function(){for(var Ut=0,Ye=gt.length;Ut!==Ye;++Ut)gt[Ut]!==xt[Ut]&&(t.disableVertexAttribArray(Ut),gt[Ut]=0)},enable:f,disable:p,getCompressedTextureFormats:function(){if(Vt===null&&(Vt=[],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 Ut=t.getParameter(34467),Ye=0;Ye<Ut.length;Ye++)Vt.push(Ut[Ye]);return Vt},useProgram:function(Ut){return J!==Ut?(t.useProgram(Ut),J=Ut,!0):!1},setBlending:y,setMaterial:function(Ut,Ye){Ut.side===2?p(2884):f(2884);var ei=Ut.side===1;Ye&&(ei=!ei),w(ei),Ut.blending===1&&Ut.transparent===!1?y(0):y(Ut.blending,Ut.blendEquation,Ut.blendSrc,Ut.blendDst,Ut.blendEquationAlpha,Ut.blendSrcAlpha,Ut.blendDstAlpha,Ut.premultipliedAlpha),q.setFunc(Ut.depthFunc),q.setTest(Ut.depthTest),q.setMask(Ut.depthWrite),H.setMask(Ut.colorWrite),P(Ut.polygonOffset,Ut.polygonOffsetFactor,Ut.polygonOffsetUnits)},setFlipSided:w,setCullFace:A,setLineWidth:function(Ut){Ut!==Qe&&(qi&&t.lineWidth(Ut),Qe=Ut)},setPolygonOffset:P,setScissorTest:function(Ut){Ut?f(3089):p(3089)},activeTexture:B,bindTexture:function(Ut,Ye){Vi===null&&B();var ei=on[Vi];ei===void 0&&(ei={type:void 0,texture:void 0},on[Vi]=ei),(ei.type!==Ut||ei.texture!==Ye)&&(t.bindTexture(Ut,Ye||ti[Ut]),ei.type=Ut,ei.texture=Ye)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(Ut){console.error("THREE.WebGLState:",Ut)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(Ut){console.error("THREE.WebGLState:",Ut)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(Ut){console.error("THREE.WebGLState:",Ut)}},scissor:function(Ut){An.equals(Ut)===!1&&(t.scissor(Ut.x,Ut.y,Ut.z,Ut.w),An.copy(Ut))},viewport:function(Ut){Ce.equals(Ut)===!1&&(t.viewport(Ut.x,Ut.y,Ut.z,Ut.w),Ce.copy(Ut))},reset:function(){for(var Ut=0;Ut<gt.length;Ut++)gt[Ut]===1&&(t.disableVertexAttribArray(Ut),gt[Ut]=0);wt={},Vi=Vt=null,on={},We=ae=zt=J=null,H.reset(),q.reset(),$.reset()}}}function je(t,e,i,n,o,l,f){function p(J,ot){if(J.width>ot||J.height>ot){if("data"in J){console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+J.width+"x"+J.height+").");return}ot/=Math.max(J.width,J.height);var zt=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return zt.width=Math.floor(J.width*ot),zt.height=Math.floor(J.height*ot),zt.getContext("2d").drawImage(J,0,0,J.width,J.height,0,0,zt.width,zt.height),console.warn("THREE.WebGLRenderer: image is too big ("+J.width+"x"+J.height+"). Resized to "+zt.width+"x"+zt.height),zt}return J}function y(J){return di.isPowerOfTwo(J.width)&&di.isPowerOfTwo(J.height)}function w(J,ot){return J.generateMipmaps&&ot&&J.minFilter!==1003&&J.minFilter!==1006}function A(J,ot,zt,ee){t.generateMipmap(J),n.get(ot).__maxMipLevel=Math.log(Math.max(zt,ee))*Math.LOG2E}function P(J,ot){if(!o.isWebGL2)return J;if(J===6403){if(ot===5126)return 33326;if(ot===5131)return 33325;if(ot===5121)return 33321}if(J===6407){if(ot===5126)return 34837;if(ot===5131)return 34843;if(ot===5121)return 32849}if(J===6408){if(ot===5126)return 34836;if(ot===5131)return 34842;if(ot===5121)return 32856}return J}function B(J){return J===1003||J===1004||J===1005?9728:9729}function H(J){J=J.target,J.removeEventListener("dispose",H);t:{var ot=n.get(J);if(J.image&&ot.__image__webglTextureCube)t.deleteTexture(ot.__image__webglTextureCube);else{if(ot.__webglInit===void 0)break t;t.deleteTexture(ot.__webglTexture)}n.remove(J)}J.isVideoTexture&&delete wt[J.id],f.memory.textures--}function q(J){J=J.target,J.removeEventListener("dispose",q);var ot=n.get(J),zt=n.get(J.texture);if(J){if(zt.__webglTexture!==void 0&&t.deleteTexture(zt.__webglTexture),J.depthTexture&&J.depthTexture.dispose(),J.isWebGLRenderTargetCube)for(zt=0;6>zt;zt++)t.deleteFramebuffer(ot.__webglFramebuffer[zt]),ot.__webglDepthbuffer&&t.deleteRenderbuffer(ot.__webglDepthbuffer[zt]);else t.deleteFramebuffer(ot.__webglFramebuffer),ot.__webglDepthbuffer&&t.deleteRenderbuffer(ot.__webglDepthbuffer);n.remove(J.texture),n.remove(J)}f.memory.textures--}function $(J,ot){var zt=n.get(J);if(J.isVideoTexture){var ee=J.id,$t=f.render.frame;wt[ee]!==$t&&(wt[ee]=$t,J.update())}if(0<J.version&&zt.__version!==J.version)if(ee=J.image,ee===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(ee.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{xt(zt,J,ot);return}i.activeTexture(33984+ot),i.bindTexture(3553,zt.__webglTexture)}function rt(J,ot,zt){zt?(t.texParameteri(J,10242,l.convert(ot.wrapS)),t.texParameteri(J,10243,l.convert(ot.wrapT)),t.texParameteri(J,10240,l.convert(ot.magFilter)),t.texParameteri(J,10241,l.convert(ot.minFilter))):(t.texParameteri(J,10242,33071),t.texParameteri(J,10243,33071),ot.wrapS===1001&&ot.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(J,10240,B(ot.magFilter)),t.texParameteri(J,10241,B(ot.minFilter)),ot.minFilter!==1003&&ot.minFilter!==1006&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!(zt=e.get("EXT_texture_filter_anisotropic"))||ot.type===1015&&e.get("OES_texture_float_linear")===null||ot.type===1016&&(o.isWebGL2||e.get("OES_texture_half_float_linear"))===null||!(1<ot.anisotropy||n.get(ot).__currentAnisotropy)||(t.texParameterf(J,zt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(ot.anisotropy,o.getMaxAnisotropy())),n.get(ot).__currentAnisotropy=ot.anisotropy)}function xt(J,ot,zt){var ee=ot.isDataTexture3D?32879:3553;J.__webglInit===void 0&&(J.__webglInit=!0,ot.addEventListener("dispose",H),J.__webglTexture=t.createTexture(),f.memory.textures++),i.activeTexture(33984+zt),i.bindTexture(ee,J.__webglTexture),t.pixelStorei(37440,ot.flipY),t.pixelStorei(37441,ot.premultiplyAlpha),t.pixelStorei(3317,ot.unpackAlignment),zt=p(ot.image,o.maxTextureSize);var $t=o.isWebGL2?!1:ot.wrapS!==1001||ot.wrapT!==1001||ot.minFilter!==1003&&ot.minFilter!==1006;$t&&y(zt)===!1&&(zt instanceof HTMLImageElement||zt instanceof HTMLCanvasElement||zt instanceof ImageBitmap)&&(Vt===void 0&&(Vt=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),Vt.width=di.floorPowerOfTwo(zt.width),Vt.height=di.floorPowerOfTwo(zt.height),Vt.getContext("2d").drawImage(zt,0,0,Vt.width,Vt.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+zt.width+"x"+zt.height+"). Resized to "+Vt.width+"x"+Vt.height),zt=Vt),$t=y(zt);var Yt=l.convert(ot.format),Te=l.convert(ot.type),me=P(Yt,Te);rt(ee,ot,$t);var De=ot.mipmaps;if(ot.isDepthTexture){if(me=6402,ot.type===1015){if(!o.isWebGL2)throw Error("Float Depth Texture only supported in WebGL2.0");me=36012}else o.isWebGL2&&(me=33189);ot.format===1026&&me===6402&&ot.type!==1012&&ot.type!==1014&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),ot.type=1012,Te=l.convert(ot.type)),ot.format===1027&&(me=34041,ot.type!==1020&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),ot.type=1020,Te=l.convert(ot.type))),i.texImage2D(3553,0,me,zt.width,zt.height,0,Yt,Te,null)}else if(ot.isDataTexture)if(0<De.length&&$t){for(var be=0,ae=De.length;be<ae;be++)ee=De[be],i.texImage2D(3553,be,me,ee.width,ee.height,0,Yt,Te,ee.data);ot.generateMipmaps=!1,J.__maxMipLevel=De.length-1}else i.texImage2D(3553,0,me,zt.width,zt.height,0,Yt,Te,zt.data),J.__maxMipLevel=0;else if(ot.isCompressedTexture){for(be=0,ae=De.length;be<ae;be++)ee=De[be],ot.format!==1023&&ot.format!==1022?-1<i.getCompressedTextureFormats().indexOf(Yt)?i.compressedTexImage2D(3553,be,me,ee.width,ee.height,0,ee.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):i.texImage2D(3553,be,me,ee.width,ee.height,0,Yt,Te,ee.data);J.__maxMipLevel=De.length-1}else if(ot.isDataTexture3D)i.texImage3D(32879,0,me,zt.width,zt.height,zt.depth,0,Yt,Te,zt.data),J.__maxMipLevel=0;else if(0<De.length&&$t){for(be=0,ae=De.length;be<ae;be++)ee=De[be],i.texImage2D(3553,be,me,Yt,Te,ee);ot.generateMipmaps=!1,J.__maxMipLevel=De.length-1}else i.texImage2D(3553,0,me,Yt,Te,zt),J.__maxMipLevel=0;w(ot,$t)&&A(3553,ot,zt.width,zt.height),J.__version=ot.version,ot.onUpdate&&ot.onUpdate(ot)}function gt(J,ot,zt,ee){var $t=l.convert(ot.texture.format),Yt=l.convert(ot.texture.type),Te=P($t,Yt);i.texImage2D(ee,0,Te,ot.width,ot.height,0,$t,Yt,null),t.bindFramebuffer(36160,J),t.framebufferTexture2D(36160,zt,ee,n.get(ot.texture).__webglTexture,0),t.bindFramebuffer(36160,null)}function Ct(J,ot){t.bindRenderbuffer(36161,J),ot.depthBuffer&&!ot.stencilBuffer?(t.renderbufferStorage(36161,33189,ot.width,ot.height),t.framebufferRenderbuffer(36160,36096,36161,J)):ot.depthBuffer&&ot.stencilBuffer?(t.renderbufferStorage(36161,34041,ot.width,ot.height),t.framebufferRenderbuffer(36160,33306,36161,J)):t.renderbufferStorage(36161,32854,ot.width,ot.height),t.bindRenderbuffer(36161,null)}var wt={},Vt;this.setTexture2D=$,this.setTexture3D=function(J,ot){var zt=n.get(J);0<J.version&&zt.__version!==J.version?xt(zt,J,ot):(i.activeTexture(33984+ot),i.bindTexture(32879,zt.__webglTexture))},this.setTextureCube=function(J,ot){var zt=n.get(J);if(J.image.length===6)if(0<J.version&&zt.__version!==J.version){zt.__image__webglTextureCube||(J.addEventListener("dispose",H),zt.__image__webglTextureCube=t.createTexture(),f.memory.textures++),i.activeTexture(33984+ot),i.bindTexture(34067,zt.__image__webglTextureCube),t.pixelStorei(37440,J.flipY),ot=J&&J.isCompressedTexture;for(var ee=J.image[0]&&J.image[0].isDataTexture,$t=[],Yt=0;6>Yt;Yt++)$t[Yt]=ot||ee?ee?J.image[Yt].image:J.image[Yt]:p(J.image[Yt],o.maxCubemapSize);var Te=$t[0],me=y(Te),De=l.convert(J.format),be=l.convert(J.type),ae=P(De,be);for(rt(34067,J,me),Yt=0;6>Yt;Yt++)if(ot)for(var We,Qe=$t[Yt].mipmaps,fi=0,Cn=Qe.length;fi<Cn;fi++)We=Qe[fi],J.format!==1023&&J.format!==1022?-1<i.getCompressedTextureFormats().indexOf(De)?i.compressedTexImage2D(34069+Yt,fi,ae,We.width,We.height,0,We.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):i.texImage2D(34069+Yt,fi,ae,We.width,We.height,0,De,be,We.data);else ee?i.texImage2D(34069+Yt,0,ae,$t[Yt].width,$t[Yt].height,0,De,be,$t[Yt].data):i.texImage2D(34069+Yt,0,ae,De,be,$t[Yt]);zt.__maxMipLevel=ot?Qe.length-1:0,w(J,me)&&A(34067,J,Te.width,Te.height),zt.__version=J.version,J.onUpdate&&J.onUpdate(J)}else i.activeTexture(33984+ot),i.bindTexture(34067,zt.__image__webglTextureCube)},this.setTextureCubeDynamic=function(J,ot){i.activeTexture(33984+ot),i.bindTexture(34067,n.get(J).__webglTexture)},this.setupRenderTarget=function(J){var ot=n.get(J),zt=n.get(J.texture);J.addEventListener("dispose",q),zt.__webglTexture=t.createTexture(),f.memory.textures++;var ee=J.isWebGLRenderTargetCube===!0,$t=y(J);if(ee){ot.__webglFramebuffer=[];for(var Yt=0;6>Yt;Yt++)ot.__webglFramebuffer[Yt]=t.createFramebuffer()}else ot.__webglFramebuffer=t.createFramebuffer();if(ee){for(i.bindTexture(34067,zt.__webglTexture),rt(34067,J.texture,$t),Yt=0;6>Yt;Yt++)gt(ot.__webglFramebuffer[Yt],J,36064,34069+Yt);w(J.texture,$t)&&A(34067,J.texture,J.width,J.height),i.bindTexture(34067,null)}else i.bindTexture(3553,zt.__webglTexture),rt(3553,J.texture,$t),gt(ot.__webglFramebuffer,J,36064,3553),w(J.texture,$t)&&A(3553,J.texture,J.width,J.height),i.bindTexture(3553,null);if(J.depthBuffer){if(ot=n.get(J),zt=J.isWebGLRenderTargetCube===!0,J.depthTexture){if(zt)throw Error("target.depthTexture not supported in Cube render targets");if(J&&J.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,ot.__webglFramebuffer),!J.depthTexture||!J.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");if(n.get(J.depthTexture).__webglTexture&&J.depthTexture.image.width===J.width&&J.depthTexture.image.height===J.height||(J.depthTexture.image.width=J.width,J.depthTexture.image.height=J.height,J.depthTexture.needsUpdate=!0),$(J.depthTexture,0),ot=n.get(J.depthTexture).__webglTexture,J.depthTexture.format===1026)t.framebufferTexture2D(36160,36096,3553,ot,0);else if(J.depthTexture.format===1027)t.framebufferTexture2D(36160,33306,3553,ot,0);else throw Error("Unknown depthTexture format")}else if(zt)for(ot.__webglDepthbuffer=[],zt=0;6>zt;zt++)t.bindFramebuffer(36160,ot.__webglFramebuffer[zt]),ot.__webglDepthbuffer[zt]=t.createRenderbuffer(),Ct(ot.__webglDepthbuffer[zt],J);else t.bindFramebuffer(36160,ot.__webglFramebuffer),ot.__webglDepthbuffer=t.createRenderbuffer(),Ct(ot.__webglDepthbuffer,J);t.bindFramebuffer(36160,null)}},this.updateRenderTargetMipmap=function(J){var ot=J.texture,zt=y(J);if(w(ot,zt)){zt=J.isWebGLRenderTargetCube?34067:3553;var ee=n.get(ot).__webglTexture;i.bindTexture(zt,ee),A(zt,ot,J.width,J.height),i.bindTexture(zt,null)}}}function He(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 ci(){N.call(this),this.type="Group"}function Be(){N.call(this),this.type="Camera",this.matrixWorldInverse=new c,this.projectionMatrix=new c,this.projectionMatrixInverse=new c}function _e(t,e,i,n){Be.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 Fe(t){_e.call(this),this.cameras=t||[]}function fe(t,e,i){as.setFromMatrixPosition(e.matrixWorld),wr.setFromMatrixPosition(i.matrixWorld);var n=as.distanceTo(wr),o=e.projectionMatrix.elements,l=i.projectionMatrix.elements,f=o[14]/(o[10]-1);i=o[14]/(o[10]+1);var p=(o[9]+1)/o[5],y=(o[9]-1)/o[5],w=(o[8]-1)/o[0],A=(l[8]+1)/l[0];o=f*w,l=f*A,A=n/(-w+A),w=A*-w,e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(w),t.translateZ(A),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.getInverse(t.matrixWorld),e=f+A,f=i+A,t.projectionMatrix.makePerspective(o-w,l+(n-w),p*i/f*e,y*i/f*e,e,f)}function mi(t){function e(){return o!==null&&o.isPresenting===!0}function i(){if(e()){var J=o.getEyeParameters("left"),ot=J.renderWidth*A;J=J.renderHeight*A,Ct=t.getPixelRatio(),gt=t.getSize(),t.setDrawingBufferSize(2*ot,J,1),Vt.start()}else n.enabled&&t.setDrawingBufferSize(gt.width,gt.height,Ct),Vt.stop()}var n=this,o=null,l=null,f=null,p=[],y=new c,w=new c,A=1,P="stage";typeof window<"u"&&"VRFrameData"in window&&(l=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",i,!1));var B=new c,H=new d,q=new u,$=new _e;$.bounds=new _(0,0,.5,1),$.layers.enable(1);var rt=new _e;rt.bounds=new _(.5,0,.5,1),rt.layers.enable(2);var xt=new Fe([$,rt]);xt.layers.enable(1),xt.layers.enable(2);var gt,Ct,wt=[];this.enabled=!1,this.getController=function(J){var ot=p[J];return ot===void 0&&(ot=new ci,ot.matrixAutoUpdate=!1,ot.visible=!1,p[J]=ot),ot},this.getDevice=function(){return o},this.setDevice=function(J){J!==void 0&&(o=J),Vt.setContext(J)},this.setFramebufferScaleFactor=function(J){A=J},this.setFrameOfReferenceType=function(J){P=J},this.setPoseTarget=function(J){J!==void 0&&(f=J)},this.getCamera=function(J){var ot=P==="stage"?1.6:0;if(o===null)return J.position.set(0,ot,0),J;if(o.depthNear=J.near,o.depthFar=J.far,o.getFrameData(l),P==="stage"){var zt=o.stageParameters;zt?y.fromArray(zt.sittingToStandingTransform):y.makeTranslation(0,ot,0)}if(ot=l.pose,zt=f!==null?f:J,zt.matrix.copy(y),zt.matrix.decompose(zt.position,zt.quaternion,zt.scale),ot.orientation!==null&&(H.fromArray(ot.orientation),zt.quaternion.multiply(H)),ot.position!==null&&(H.setFromRotationMatrix(y),q.fromArray(ot.position),q.applyQuaternion(H),zt.position.add(q)),zt.updateMatrixWorld(),o.isPresenting===!1)return J;$.near=J.near,rt.near=J.near,$.far=J.far,rt.far=J.far,$.matrixWorldInverse.fromArray(l.leftViewMatrix),rt.matrixWorldInverse.fromArray(l.rightViewMatrix),w.getInverse(y),P==="stage"&&($.matrixWorldInverse.multiply(w),rt.matrixWorldInverse.multiply(w)),J=zt.parent,J!==null&&(B.getInverse(J.matrixWorld),$.matrixWorldInverse.multiply(B),rt.matrixWorldInverse.multiply(B)),$.matrixWorld.getInverse($.matrixWorldInverse),rt.matrixWorld.getInverse(rt.matrixWorldInverse),$.projectionMatrix.fromArray(l.leftProjectionMatrix),rt.projectionMatrix.fromArray(l.rightProjectionMatrix),fe(xt,$,rt),J=o.getLayers(),J.length&&(J=J[0],J.leftBounds!==null&&J.leftBounds.length===4&&$.bounds.fromArray(J.leftBounds),J.rightBounds!==null&&J.rightBounds.length===4&&rt.bounds.fromArray(J.rightBounds));t:for(J=0;J<p.length;J++){ot=p[J];e:{zt=J;for(var ee=navigator.getGamepads&&navigator.getGamepads(),$t=0,Yt=0,Te=ee.length;$t<Te;$t++){var me=ee[$t];if(me&&(me.id==="Daydream Controller"||me.id==="Gear VR Controller"||me.id==="Oculus Go Controller"||me.id==="OpenVR Gamepad"||me.id.startsWith("Oculus Touch")||me.id.startsWith("Spatial Controller"))){if(Yt===zt){zt=me;break e}Yt++}}zt=void 0}if(zt!==void 0&&zt.pose!==void 0){if(zt.pose===null)break t;ee=zt.pose,ee.hasPosition===!1&&ot.position.set(.2,-.6,-.05),ee.position!==null&&ot.position.fromArray(ee.position),ee.orientation!==null&&ot.quaternion.fromArray(ee.orientation),ot.matrix.compose(ot.position,ot.quaternion,ot.scale),ot.matrix.premultiply(y),ot.matrix.decompose(ot.position,ot.quaternion,ot.scale),ot.matrixWorldNeedsUpdate=!0,ot.visible=!0,ee=zt.id==="Daydream Controller"?0:1,wt[J]!==zt.buttons[ee].pressed&&(wt[J]=zt.buttons[ee].pressed,wt[J]===!0?ot.dispatchEvent({type:"selectstart"}):(ot.dispatchEvent({type:"selectend"}),ot.dispatchEvent({type:"select"})))}else ot.visible=!1}return xt},this.getStandingMatrix=function(){return y},this.isPresenting=e;var Vt=new T;this.setAnimationLoop=function(J){Vt.setAnimationLoop(J)},this.submitFrame=function(){e()&&o.submitFrame()},this.dispose=function(){typeof window<"u"&&window.removeEventListener("vrdisplaypresentchange",i)}}function Le(t){function e(){return p!==null&&w!==null}function i(Ct){var wt=B[H.indexOf(Ct.inputSource)];wt&&wt.dispatchEvent({type:Ct.type})}function n(){t.setFramebuffer(null),gt.stop()}function o(Ct,wt){wt===null?Ct.matrixWorld.copy(Ct.matrix):Ct.matrixWorld.multiplyMatrices(wt.matrixWorld,Ct.matrix),Ct.matrixWorldInverse.getInverse(Ct.matrixWorld)}var l=t.context,f=null,p=null,y=1,w=null,A="stage",P=null,B=[],H=[],q=new _e;q.layers.enable(1),q.viewport=new _;var $=new _e;$.layers.enable(2),$.viewport=new _;var rt=new Fe([q,$]);rt.layers.enable(1),rt.layers.enable(2),this.enabled=!1,this.getController=function(Ct){var wt=B[Ct];return wt===void 0&&(wt=new ci,wt.matrixAutoUpdate=!1,wt.visible=!1,B[Ct]=wt),wt},this.getDevice=function(){return f},this.setDevice=function(Ct){Ct!==void 0&&(f=Ct),Ct instanceof XRDevice&&l.setCompatibleXRDevice(Ct)},this.setFramebufferScaleFactor=function(Ct){y=Ct},this.setFrameOfReferenceType=function(Ct){A=Ct},this.setSession=function(Ct){p=Ct,p!==null&&(p.addEventListener("select",i),p.addEventListener("selectstart",i),p.addEventListener("selectend",i),p.addEventListener("end",n),p.baseLayer=new XRWebGLLayer(p,l,{framebufferScaleFactor:y}),p.requestFrameOfReference(A).then(function(wt){w=wt,t.setFramebuffer(p.baseLayer.framebuffer),gt.setContext(p),gt.start()}),H=p.getInputSources(),p.addEventListener("inputsourceschange",function(){H=p.getInputSources(),console.log(H);for(var wt=0;wt<B.length;wt++)B[wt].userData.inputSource=H[wt]}))},this.getCamera=function(Ct){if(e()){var wt=Ct.parent,Vt=rt.cameras;o(rt,wt);for(var J=0;J<Vt.length;J++)o(Vt[J],wt);for(Ct.matrixWorld.copy(rt.matrixWorld),Ct=Ct.children,J=0,wt=Ct.length;J<wt;J++)Ct[J].updateMatrixWorld(!0);return fe(rt,q,$),rt}return Ct},this.isPresenting=e;var xt=null,gt=new T;gt.setAnimationLoop(function(Ct,wt){if(P=wt.getDevicePose(w),P!==null)for(var Vt=p.baseLayer,J=wt.views,ot=0;ot<J.length;ot++){var zt=J[ot],ee=Vt.getViewport(zt),$t=P.getViewMatrix(zt),Yt=rt.cameras[ot];Yt.matrix.fromArray($t).getInverse(Yt.matrix),Yt.projectionMatrix.fromArray(zt.projectionMatrix),Yt.viewport.set(ee.x,ee.y,ee.width,ee.height),ot===0&&rt.matrix.copy(Yt.matrix)}for(ot=0;ot<B.length;ot++){if(Vt=B[ot],(J=H[ot])&&(J=wt.getInputPose(J,w),J!==null)){"targetRay"in J?Vt.matrix.elements=J.targetRay.transformMatrix:"pointerMatrix"in J&&(Vt.matrix.elements=J.pointerMatrix),Vt.matrix.decompose(Vt.position,Vt.rotation,Vt.scale),Vt.visible=!0;continue}Vt.visible=!1}xt&&xt(Ct)}),this.setAnimationLoop=function(Ct){xt=Ct},this.dispose=function(){},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}function xe(t){var e;function i(){ii=new Jt(ne),Ze=new Qi(ne,ii,t),Ze.isWebGL2||(ii.get("WEBGL_depth_texture"),ii.get("OES_texture_float"),ii.get("OES_texture_half_float"),ii.get("OES_texture_half_float_linear"),ii.get("OES_standard_derivatives"),ii.get("OES_element_index_uint"),ii.get("ANGLE_instanced_arrays")),ii.get("OES_texture_float_linear"),In=new He(ne,ii,Ze),li=new ue(ne,ii,In,Ze),li.scissor(qi.copy(Ye).multiplyScalar(ti)),li.viewport(_n.copy(Ut).multiplyScalar(ti)),xn=new pt,Pn=new at,No=new je(ne,ii,li,Pn,Ze,In,xn),Oa=new M(ne),Kh=new jt(ne,Oa,xn),Ia=new Kt(Kh,xn),Qh=new ie(ne),Gs=new lt(Yt,ii,Ze),bl=new Ot,Hs=new he,hs=new Di(Yt,li,Ia,J),tu=new mn(ne,ii,xn,Ze),er=new dt(ne,ii,xn,Ze),xn.programs=Gs.programs,Yt.context=ne,Yt.capabilities=Ze,Yt.extensions=ii,Yt.properties=Pn,Yt.renderLists=bl,Yt.state=li,Yt.info=xn}function n(ft){ft.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),Te=!0}function o(){console.log("THREE.WebGLRenderer: Context Restored."),Te=!1,i()}function l(ft){ft=ft.target,ft.removeEventListener("dispose",l),f(ft),Pn.remove(ft)}function f(ft){var Tt=Pn.get(ft).program;ft.program=void 0,Tt!==void 0&&Gs.releaseProgram(Tt)}function p(ft,Tt){ft.render(function(mt){Yt.renderBufferImmediate(mt,Tt)})}function y(ft,Tt,mt){if(ft.visible!==!1){if(ft.layers.test(Tt.layers)){if(ft.isLight)$t.pushLight(ft),ft.castShadow&&$t.pushShadow(ft);else if(ft.isSprite){if(!ft.frustumCulled||Wi.intersectsSprite(ft)){mt&&Ai.setFromMatrixPosition(ft.matrixWorld).applyMatrix4(Li);var Me=Ia.update(ft),ze=ft.material;ee.push(ft,Me,ze,Ai.z,null)}}else if(ft.isImmediateRenderObject)mt&&Ai.setFromMatrixPosition(ft.matrixWorld).applyMatrix4(Li),ee.push(ft,null,ft.material,Ai.z,null);else if((ft.isMesh||ft.isLine||ft.isPoints)&&(ft.isSkinnedMesh&&ft.skeleton.update(),!ft.frustumCulled||Wi.intersectsObject(ft)))if(mt&&Ai.setFromMatrixPosition(ft.matrixWorld).applyMatrix4(Li),Me=Ia.update(ft),ze=ft.material,Array.isArray(ze))for(var Ve=Me.groups,Se=0,Ke=Ve.length;Se<Ke;Se++){var Oi=Ve[Se],$i=ze[Oi.materialIndex];$i&&$i.visible&&ee.push(ft,Me,$i,Ai.z,Oi)}else ze.visible&&ee.push(ft,Me,ze,Ai.z,null)}for(ft=ft.children,Se=0,Ke=ft.length;Se<Ke;Se++)y(ft[Se],Tt,mt)}}function w(ft,Tt,mt,Me){for(var ze=0,Ve=ft.length;ze<Ve;ze++){var Se=ft[ze],Ke=Se.object,Oi=Se.geometry,$i=Me===void 0?Se.material:Me;if(Se=Se.group,mt.isArrayCamera){Cn=mt;for(var ve=mt.cameras,Tr=0,Nn=ve.length;Tr<Nn;Tr++){var an=ve[Tr];if(Ke.layers.test(an.layers)){if("viewport"in an)li.viewport(_n.copy(an.viewport));else{var pr=an.bounds;li.viewport(_n.set(pr.x*An,pr.y*Ce,pr.z*An,pr.w*Ce).multiplyScalar(ti))}$t.setupLights(an),A(Ke,Tt,an,Oi,$i,Se)}}}else Cn=null,A(Ke,Tt,mt,Oi,$i,Se)}}function A(ft,Tt,mt,Me,ze,Ve){if(ft.onBeforeRender(Yt,Tt,mt,Me,ze,Ve),$t=Hs.get(Tt,Cn||mt),ft.modelViewMatrix.multiplyMatrices(mt.matrixWorldInverse,ft.matrixWorld),ft.normalMatrix.getNormalMatrix(ft.modelViewMatrix),ft.isImmediateRenderObject){li.setMaterial(ze);var Se=B(mt,Tt.fog,ze,ft);We=e=null,Qe=!1,p(ft,Se)}else Yt.renderBufferDirect(mt,Tt.fog,Me,ze,ft,Ve);ft.onAfterRender(Yt,Tt,mt,Me,ze,Ve),$t=Hs.get(Tt,Cn||mt)}function P(ft,Tt,mt){var Me=Pn.get(ft),ze=$t.state.lights,Ve=Me.lightsHash,Se=ze.state.hash;mt=Gs.getParameters(ft,ze.state,$t.state.shadowsArray,Tt,Ae.numPlanes,Ae.numIntersection,mt);var Ke=Gs.getProgramCode(ft,mt),Oi=Me.program,$i=!0;if(Oi===void 0)ft.addEventListener("dispose",l);else if(Oi.code!==Ke)f(ft);else{if(Ve.stateID!==Se.stateID||Ve.directionalLength!==Se.directionalLength||Ve.pointLength!==Se.pointLength||Ve.spotLength!==Se.spotLength||Ve.rectAreaLength!==Se.rectAreaLength||Ve.hemiLength!==Se.hemiLength||Ve.shadowsLength!==Se.shadowsLength)Ve.stateID=Se.stateID,Ve.directionalLength=Se.directionalLength,Ve.pointLength=Se.pointLength,Ve.spotLength=Se.spotLength,Ve.rectAreaLength=Se.rectAreaLength,Ve.hemiLength=Se.hemiLength,Ve.shadowsLength=Se.shadowsLength;else if(mt.shaderID!==void 0)return;$i=!1}if($i&&(mt.shaderID?(Ke=wo[mt.shaderID],Me.shader={name:ft.type,uniforms:Bn.clone(Ke.uniforms),vertexShader:Ke.vertexShader,fragmentShader:Ke.fragmentShader}):Me.shader={name:ft.type,uniforms:ft.uniforms,vertexShader:ft.vertexShader,fragmentShader:ft.fragmentShader},ft.onBeforeCompile(Me.shader,Yt),Ke=Gs.getProgramCode(ft,mt),Oi=Gs.acquireProgram(ft,Me.shader,mt,Ke),Me.program=Oi,ft.program=Oi),mt=Oi.getAttributes(),ft.morphTargets)for(Ke=ft.numSupportedMorphTargets=0;Ke<Yt.maxMorphTargets;Ke++)0<=mt["morphTarget"+Ke]&&ft.numSupportedMorphTargets++;if(ft.morphNormals)for(Ke=ft.numSupportedMorphNormals=0;Ke<Yt.maxMorphNormals;Ke++)0<=mt["morphNormal"+Ke]&&ft.numSupportedMorphNormals++;mt=Me.shader.uniforms,(!ft.isShaderMaterial&&!ft.isRawShaderMaterial||ft.clipping===!0)&&(Me.numClippingPlanes=Ae.numPlanes,Me.numIntersection=Ae.numIntersection,mt.clippingPlanes=Ae.uniform),Me.fog=Tt,Ve===void 0&&(Me.lightsHash=Ve={}),Ve.stateID=Se.stateID,Ve.directionalLength=Se.directionalLength,Ve.pointLength=Se.pointLength,Ve.spotLength=Se.spotLength,Ve.rectAreaLength=Se.rectAreaLength,Ve.hemiLength=Se.hemiLength,Ve.shadowsLength=Se.shadowsLength,ft.lights&&(mt.ambientLightColor.value=ze.state.ambient,mt.directionalLights.value=ze.state.directional,mt.spotLights.value=ze.state.spot,mt.rectAreaLights.value=ze.state.rectArea,mt.pointLights.value=ze.state.point,mt.hemisphereLights.value=ze.state.hemi,mt.directionalShadowMap.value=ze.state.directionalShadowMap,mt.directionalShadowMatrix.value=ze.state.directionalShadowMatrix,mt.spotShadowMap.value=ze.state.spotShadowMap,mt.spotShadowMatrix.value=ze.state.spotShadowMatrix,mt.pointShadowMap.value=ze.state.pointShadowMap,mt.pointShadowMatrix.value=ze.state.pointShadowMatrix),ft=Me.program.getUniforms(),ft=ho.seqWithValue(ft.seq,mt),Me.uniformsList=ft}function B(ft,Tt,mt,Me){on=0;var ze=Pn.get(mt),Ve=ze.lightsHash,Se=$t.state.lights.state.hash;Xe&&(ri||ft!==fi)&&Ae.setState(mt.clippingPlanes,mt.clipIntersection,mt.clipShadows,ft,ze,ft===fi&&mt.id===ae),mt.needsUpdate===!1&&(ze.program===void 0||mt.fog&&ze.fog!==Tt?mt.needsUpdate=!0:(!mt.lights||Ve.stateID===Se.stateID&&Ve.directionalLength===Se.directionalLength&&Ve.pointLength===Se.pointLength&&Ve.spotLength===Se.spotLength&&Ve.rectAreaLength===Se.rectAreaLength&&Ve.hemiLength===Se.hemiLength&&Ve.shadowsLength===Se.shadowsLength)&&(ze.numClippingPlanes===void 0||ze.numClippingPlanes===Ae.numPlanes&&ze.numIntersection===Ae.numIntersection)||(mt.needsUpdate=!0)),mt.needsUpdate&&(P(mt,Tt,Me),mt.needsUpdate=!1);var Ke=!1,Oi=!1,$i=!1;Ve=ze.program,Se=Ve.getUniforms();var ve=ze.shader.uniforms;if(li.useProgram(Ve.program)&&($i=Oi=Ke=!0),mt.id!==ae&&(ae=mt.id,Oi=!0),(Ke||fi!==ft)&&(Se.setValue(ne,"projectionMatrix",ft.projectionMatrix),Ze.logarithmicDepthBuffer&&Se.setValue(ne,"logDepthBufFC",2/(Math.log(ft.far+1)/Math.LN2)),fi!==ft&&(fi=ft,$i=Oi=!0),(mt.isShaderMaterial||mt.isMeshPhongMaterial||mt.isMeshStandardMaterial||mt.envMap)&&(Ke=Se.map.cameraPosition,Ke!==void 0&&Ke.setValue(ne,Ai.setFromMatrixPosition(ft.matrixWorld))),(mt.isMeshPhongMaterial||mt.isMeshLambertMaterial||mt.isMeshBasicMaterial||mt.isMeshStandardMaterial||mt.isShaderMaterial||mt.skinning)&&Se.setValue(ne,"viewMatrix",ft.matrixWorldInverse)),mt.skinning&&(Se.setOptional(ne,Me,"bindMatrix"),Se.setOptional(ne,Me,"bindMatrixInverse"),ft=Me.skeleton))if(Ke=ft.bones,Ze.floatVertexTextures){if(ft.boneTexture===void 0){Ke=Math.sqrt(4*Ke.length),Ke=di.ceilPowerOfTwo(Ke),Ke=Math.max(Ke,4);var Tr=new Float32Array(Ke*Ke*4);Tr.set(ft.boneMatrices);var Nn=new I(Tr,Ke,Ke,1023,1015);Nn.needsUpdate=!0,ft.boneMatrices=Tr,ft.boneTexture=Nn,ft.boneTextureSize=Ke}Se.setValue(ne,"boneTexture",ft.boneTexture),Se.setValue(ne,"boneTextureSize",ft.boneTextureSize)}else Se.setOptional(ne,ft,"boneMatrices");return Oi&&(Se.setValue(ne,"toneMappingExposure",Yt.toneMappingExposure),Se.setValue(ne,"toneMappingWhitePoint",Yt.toneMappingWhitePoint),mt.lights&&(Oi=$i,ve.ambientLightColor.needsUpdate=Oi,ve.directionalLights.needsUpdate=Oi,ve.pointLights.needsUpdate=Oi,ve.spotLights.needsUpdate=Oi,ve.rectAreaLights.needsUpdate=Oi,ve.hemisphereLights.needsUpdate=Oi),Tt&&mt.fog&&(ve.fogColor.value=Tt.color,Tt.isFog?(ve.fogNear.value=Tt.near,ve.fogFar.value=Tt.far):Tt.isFogExp2&&(ve.fogDensity.value=Tt.density)),mt.isMeshBasicMaterial?H(ve,mt):mt.isMeshLambertMaterial?(H(ve,mt),mt.emissiveMap&&(ve.emissiveMap.value=mt.emissiveMap)):mt.isMeshPhongMaterial?(H(ve,mt),mt.isMeshToonMaterial?(q(ve,mt),mt.gradientMap&&(ve.gradientMap.value=mt.gradientMap)):q(ve,mt)):mt.isMeshStandardMaterial?(H(ve,mt),mt.isMeshPhysicalMaterial?($(ve,mt),ve.reflectivity.value=mt.reflectivity,ve.clearCoat.value=mt.clearCoat,ve.clearCoatRoughness.value=mt.clearCoatRoughness):$(ve,mt)):mt.isMeshMatcapMaterial?(H(ve,mt),mt.matcap&&(ve.matcap.value=mt.matcap),mt.bumpMap&&(ve.bumpMap.value=mt.bumpMap,ve.bumpScale.value=mt.bumpScale,mt.side===1&&(ve.bumpScale.value*=-1)),mt.normalMap&&(ve.normalMap.value=mt.normalMap,ve.normalScale.value.copy(mt.normalScale),mt.side===1&&ve.normalScale.value.negate()),mt.displacementMap&&(ve.displacementMap.value=mt.displacementMap,ve.displacementScale.value=mt.displacementScale,ve.displacementBias.value=mt.displacementBias)):mt.isMeshDepthMaterial?(H(ve,mt),mt.displacementMap&&(ve.displacementMap.value=mt.displacementMap,ve.displacementScale.value=mt.displacementScale,ve.displacementBias.value=mt.displacementBias)):mt.isMeshDistanceMaterial?(H(ve,mt),mt.displacementMap&&(ve.displacementMap.value=mt.displacementMap,ve.displacementScale.value=mt.displacementScale,ve.displacementBias.value=mt.displacementBias),ve.referencePosition.value.copy(mt.referencePosition),ve.nearDistance.value=mt.nearDistance,ve.farDistance.value=mt.farDistance):mt.isMeshNormalMaterial?(H(ve,mt),mt.bumpMap&&(ve.bumpMap.value=mt.bumpMap,ve.bumpScale.value=mt.bumpScale,mt.side===1&&(ve.bumpScale.value*=-1)),mt.normalMap&&(ve.normalMap.value=mt.normalMap,ve.normalScale.value.copy(mt.normalScale),mt.side===1&&ve.normalScale.value.negate()),mt.displacementMap&&(ve.displacementMap.value=mt.displacementMap,ve.displacementScale.value=mt.displacementScale,ve.displacementBias.value=mt.displacementBias)):mt.isLineBasicMaterial?(ve.diffuse.value=mt.color,ve.opacity.value=mt.opacity,mt.isLineDashedMaterial&&(ve.dashSize.value=mt.dashSize,ve.totalSize.value=mt.dashSize+mt.gapSize,ve.scale.value=mt.scale)):mt.isPointsMaterial?(ve.diffuse.value=mt.color,ve.opacity.value=mt.opacity,ve.size.value=mt.size*ti,ve.scale.value=.5*Ce,ve.map.value=mt.map,mt.map!==null&&(mt.map.matrixAutoUpdate===!0&&mt.map.updateMatrix(),ve.uvTransform.value.copy(mt.map.matrix))):mt.isSpriteMaterial?(ve.diffuse.value=mt.color,ve.opacity.value=mt.opacity,ve.rotation.value=mt.rotation,ve.map.value=mt.map,mt.map!==null&&(mt.map.matrixAutoUpdate===!0&&mt.map.updateMatrix(),ve.uvTransform.value.copy(mt.map.matrix))):mt.isShadowMaterial&&(ve.color.value=mt.color,ve.opacity.value=mt.opacity),ve.ltc_1!==void 0&&(ve.ltc_1.value=qe.LTC_1),ve.ltc_2!==void 0&&(ve.ltc_2.value=qe.LTC_2),ho.upload(ne,ze.uniformsList,ve,Yt)),mt.isShaderMaterial&&mt.uniformsNeedUpdate===!0&&(ho.upload(ne,ze.uniformsList,ve,Yt),mt.uniformsNeedUpdate=!1),mt.isSpriteMaterial&&Se.setValue(ne,"center",Me.center),Se.setValue(ne,"modelViewMatrix",Me.modelViewMatrix),Se.setValue(ne,"normalMatrix",Me.normalMatrix),Se.setValue(ne,"modelMatrix",Me.matrixWorld),Ve}function H(ft,Tt){if(ft.opacity.value=Tt.opacity,Tt.color&&(ft.diffuse.value=Tt.color),Tt.emissive&&ft.emissive.value.copy(Tt.emissive).multiplyScalar(Tt.emissiveIntensity),Tt.map&&(ft.map.value=Tt.map),Tt.alphaMap&&(ft.alphaMap.value=Tt.alphaMap),Tt.specularMap&&(ft.specularMap.value=Tt.specularMap),Tt.envMap&&(ft.envMap.value=Tt.envMap,ft.flipEnvMap.value=Tt.envMap&&Tt.envMap.isCubeTexture?-1:1,ft.reflectivity.value=Tt.reflectivity,ft.refractionRatio.value=Tt.refractionRatio,ft.maxMipLevel.value=Pn.get(Tt.envMap).__maxMipLevel),Tt.lightMap&&(ft.lightMap.value=Tt.lightMap,ft.lightMapIntensity.value=Tt.lightMapIntensity),Tt.aoMap&&(ft.aoMap.value=Tt.aoMap,ft.aoMapIntensity.value=Tt.aoMapIntensity),Tt.map)var mt=Tt.map;else Tt.specularMap?mt=Tt.specularMap:Tt.displacementMap?mt=Tt.displacementMap:Tt.normalMap?mt=Tt.normalMap:Tt.bumpMap?mt=Tt.bumpMap:Tt.roughnessMap?mt=Tt.roughnessMap:Tt.metalnessMap?mt=Tt.metalnessMap:Tt.alphaMap?mt=Tt.alphaMap:Tt.emissiveMap&&(mt=Tt.emissiveMap);mt!==void 0&&(mt.isWebGLRenderTarget&&(mt=mt.texture),mt.matrixAutoUpdate===!0&&mt.updateMatrix(),ft.uvTransform.value.copy(mt.matrix))}function q(ft,Tt){ft.specular.value=Tt.specular,ft.shininess.value=Math.max(Tt.shininess,1e-4),Tt.emissiveMap&&(ft.emissiveMap.value=Tt.emissiveMap),Tt.bumpMap&&(ft.bumpMap.value=Tt.bumpMap,ft.bumpScale.value=Tt.bumpScale,Tt.side===1&&(ft.bumpScale.value*=-1)),Tt.normalMap&&(ft.normalMap.value=Tt.normalMap,ft.normalScale.value.copy(Tt.normalScale),Tt.side===1&&ft.normalScale.value.negate()),Tt.displacementMap&&(ft.displacementMap.value=Tt.displacementMap,ft.displacementScale.value=Tt.displacementScale,ft.displacementBias.value=Tt.displacementBias)}function $(ft,Tt){ft.roughness.value=Tt.roughness,ft.metalness.value=Tt.metalness,Tt.roughnessMap&&(ft.roughnessMap.value=Tt.roughnessMap),Tt.metalnessMap&&(ft.metalnessMap.value=Tt.metalnessMap),Tt.emissiveMap&&(ft.emissiveMap.value=Tt.emissiveMap),Tt.bumpMap&&(ft.bumpMap.value=Tt.bumpMap,ft.bumpScale.value=Tt.bumpScale,Tt.side===1&&(ft.bumpScale.value*=-1)),Tt.normalMap&&(ft.normalMap.value=Tt.normalMap,ft.normalScale.value.copy(Tt.normalScale),Tt.side===1&&ft.normalScale.value.negate()),Tt.displacementMap&&(ft.displacementMap.value=Tt.displacementMap,ft.displacementScale.value=Tt.displacementScale,ft.displacementBias.value=Tt.displacementBias),Tt.envMap&&(ft.envMapIntensity.value=Tt.envMapIntensity)}console.log("THREE.WebGLRenderer","98"),t=t||{};var rt=t.canvas!==void 0?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),xt=t.context!==void 0?t.context:null,gt=t.alpha!==void 0?t.alpha:!1,Ct=t.depth!==void 0?t.depth:!0,wt=t.stencil!==void 0?t.stencil:!0,Vt=t.antialias!==void 0?t.antialias:!1,J=t.premultipliedAlpha!==void 0?t.premultipliedAlpha:!0,ot=t.preserveDrawingBuffer!==void 0?t.preserveDrawingBuffer:!1,zt=t.powerPreference!==void 0?t.powerPreference:"default",ee=null,$t=null;this.domElement=rt,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 Yt=this,Te=!1,me=null,De=null,be=null,ae=-1,We=e=null,Qe=!1,fi=null,Cn=null,_n=new _,qi=new _,Vi=null,on=0,An=rt.width,Ce=rt.height,ti=1,Ut=new _(0,0,An,Ce),Ye=new _(0,0,An,Ce),ei=!1,Wi=new E,Ae=new W,Xe=!1,ri=!1,Li=new c,Ai=new u;try{gt={alpha:gt,depth:Ct,stencil:wt,antialias:Vt,premultipliedAlpha:J,preserveDrawingBuffer:ot,powerPreference:zt},rt.addEventListener("webglcontextlost",n,!1),rt.addEventListener("webglcontextrestored",o,!1);var ne=xt||rt.getContext("webgl",gt)||rt.getContext("experimental-webgl",gt);if(ne===null)throw rt.getContext("webgl")!==null?Error("Error creating WebGL context with your selected attributes."):Error("Error creating WebGL context.");ne.getShaderPrecisionFormat===void 0&&(ne.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(ft){console.error("THREE.WebGLRenderer: "+ft.message)}var ii,Ze,li,xn,Pn,No,Oa,Kh,Ia,Gs,bl,Hs,hs,Qh,tu,er,In;i();var So=null;typeof navigator<"u"&&(So="xr"in navigator?new Le(Yt):new mi(Yt)),this.vr=So;var Gu=new ye(Yt,Ia,Ze.maxTextureSize);this.shadowMap=Gu,this.getContext=function(){return ne},this.getContextAttributes=function(){return ne.getContextAttributes()},this.forceContextLoss=function(){var ft=ii.get("WEBGL_lose_context");ft&&ft.loseContext()},this.forceContextRestore=function(){var ft=ii.get("WEBGL_lose_context");ft&&ft.restoreContext()},this.getPixelRatio=function(){return ti},this.setPixelRatio=function(ft){ft!==void 0&&(ti=ft,this.setSize(An,Ce,!1))},this.getSize=function(){return{width:An,height:Ce}},this.setSize=function(ft,Tt,mt){So.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(An=ft,Ce=Tt,rt.width=ft*ti,rt.height=Tt*ti,mt!==!1&&(rt.style.width=ft+"px",rt.style.height=Tt+"px"),this.setViewport(0,0,ft,Tt))},this.getDrawingBufferSize=function(){return{width:An*ti,height:Ce*ti}},this.setDrawingBufferSize=function(ft,Tt,mt){An=ft,Ce=Tt,ti=mt,rt.width=ft*mt,rt.height=Tt*mt,this.setViewport(0,0,ft,Tt)},this.getCurrentViewport=function(){return _n},this.setViewport=function(ft,Tt,mt,Me){Ut.set(ft,Ce-Tt-Me,mt,Me),li.viewport(_n.copy(Ut).multiplyScalar(ti))},this.setScissor=function(ft,Tt,mt,Me){Ye.set(ft,Ce-Tt-Me,mt,Me),li.scissor(qi.copy(Ye).multiplyScalar(ti))},this.setScissorTest=function(ft){li.setScissorTest(ei=ft)},this.getClearColor=function(){return hs.getClearColor()},this.setClearColor=function(){hs.setClearColor.apply(hs,arguments)},this.getClearAlpha=function(){return hs.getClearAlpha()},this.setClearAlpha=function(){hs.setClearAlpha.apply(hs,arguments)},this.clear=function(ft,Tt,mt){var Me=0;(ft===void 0||ft)&&(Me|=16384),(Tt===void 0||Tt)&&(Me|=256),(mt===void 0||mt)&&(Me|=1024),ne.clear(Me)},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(){rt.removeEventListener("webglcontextlost",n,!1),rt.removeEventListener("webglcontextrestored",o,!1),bl.dispose(),Hs.dispose(),Pn.dispose(),Ia.dispose(),So.dispose(),Fo.stop()},this.renderBufferImmediate=function(ft,Tt){li.initAttributes();var mt=Pn.get(ft);ft.hasPositions&&!mt.position&&(mt.position=ne.createBuffer()),ft.hasNormals&&!mt.normal&&(mt.normal=ne.createBuffer()),ft.hasUvs&&!mt.uv&&(mt.uv=ne.createBuffer()),ft.hasColors&&!mt.color&&(mt.color=ne.createBuffer()),Tt=Tt.getAttributes(),ft.hasPositions&&(ne.bindBuffer(34962,mt.position),ne.bufferData(34962,ft.positionArray,35048),li.enableAttribute(Tt.position),ne.vertexAttribPointer(Tt.position,3,5126,!1,0,0)),ft.hasNormals&&(ne.bindBuffer(34962,mt.normal),ne.bufferData(34962,ft.normalArray,35048),li.enableAttribute(Tt.normal),ne.vertexAttribPointer(Tt.normal,3,5126,!1,0,0)),ft.hasUvs&&(ne.bindBuffer(34962,mt.uv),ne.bufferData(34962,ft.uvArray,35048),li.enableAttribute(Tt.uv),ne.vertexAttribPointer(Tt.uv,2,5126,!1,0,0)),ft.hasColors&&(ne.bindBuffer(34962,mt.color),ne.bufferData(34962,ft.colorArray,35048),li.enableAttribute(Tt.color),ne.vertexAttribPointer(Tt.color,3,5126,!1,0,0)),li.disableUnusedAttributes(),ne.drawArrays(4,0,ft.count),ft.count=0},this.renderBufferDirect=function(ft,Tt,mt,Me,ze,Ve){var Se=ze.isMesh&&0>ze.normalMatrix.determinant();li.setMaterial(Me,Se);var Ke=B(ft,Tt,Me,ze),Oi=!1;(e!==mt.id||We!==Ke.id||Qe!==(Me.wireframe===!0))&&(e=mt.id,We=Ke.id,Qe=Me.wireframe===!0,Oi=!0),ze.morphTargetInfluences&&(Qh.update(ze,mt,Me,Ke),Oi=!0),Se=mt.index;var $i=mt.attributes.position;if(Tt=1,Me.wireframe===!0&&(Se=Kh.getWireframeAttribute(mt),Tt=2),ft=tu,Se!==null){var ve=Oa.get(Se);ft=er,ft.setIndex(ve)}if(Oi){if(mt&&mt.isInstancedBufferGeometry&!Ze.isWebGL2&&ii.get("ANGLE_instanced_arrays")===null)console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{li.initAttributes(),Oi=mt.attributes,Ke=Ke.getAttributes();var Tr=Me.defaultAttributeValues;for(ir in Ke){var Nn=Ke[ir];if(0<=Nn){var an=Oi[ir];if(an!==void 0){var pr=an.normalized,eu=an.itemSize,Eo=Oa.get(an);if(Eo!==void 0){var iu=Eo.buffer,dh=Eo.type;if(Eo=Eo.bytesPerElement,an.isInterleavedBufferAttribute){var za=an.data,Hu=za.stride;an=an.offset,za&&za.isInstancedInterleavedBuffer?(li.enableAttributeAndDivisor(Nn,za.meshPerAttribute),mt.maxInstancedCount===void 0&&(mt.maxInstancedCount=za.meshPerAttribute*za.count)):li.enableAttribute(Nn),ne.bindBuffer(34962,iu),ne.vertexAttribPointer(Nn,eu,dh,pr,Hu*Eo,an*Eo)}else an.isInstancedBufferAttribute?(li.enableAttributeAndDivisor(Nn,an.meshPerAttribute),mt.maxInstancedCount===void 0&&(mt.maxInstancedCount=an.meshPerAttribute*an.count)):li.enableAttribute(Nn),ne.bindBuffer(34962,iu),ne.vertexAttribPointer(Nn,eu,dh,pr,0,0)}}else if(Tr!==void 0&&(pr=Tr[ir],pr!==void 0))switch(pr.length){case 2:ne.vertexAttrib2fv(Nn,pr);break;case 3:ne.vertexAttrib3fv(Nn,pr);break;case 4:ne.vertexAttrib4fv(Nn,pr);break;default:ne.vertexAttrib1fv(Nn,pr)}}}li.disableUnusedAttributes()}Se!==null&&ne.bindBuffer(34963,ve.buffer)}ve=1/0,Se!==null?ve=Se.count:$i!==void 0&&(ve=$i.count),Se=mt.drawRange.start*Tt,$i=Ve!==null?Ve.start*Tt:0;var ir=Math.max(Se,$i);if(Ve=Math.max(0,Math.min(ve,Se+mt.drawRange.count*Tt,$i+(Ve!==null?Ve.count*Tt:1/0))-1-ir+1),Ve!==0){if(ze.isMesh)if(Me.wireframe===!0)li.setLineWidth(Me.wireframeLinewidth*(De===null?ti:1)),ft.setMode(1);else switch(ze.drawMode){case 0:ft.setMode(4);break;case 1:ft.setMode(5);break;case 2:ft.setMode(6)}else ze.isLine?(Me=Me.linewidth,Me===void 0&&(Me=1),li.setLineWidth(Me*(De===null?ti:1)),ze.isLineSegments?ft.setMode(1):ze.isLineLoop?ft.setMode(2):ft.setMode(3)):ze.isPoints?ft.setMode(0):ze.isSprite&&ft.setMode(4);mt&&mt.isInstancedBufferGeometry?0<mt.maxInstancedCount&&ft.renderInstances(mt,ir,Ve):ft.render(ir,Ve)}},this.compile=function(ft,Tt){$t=Hs.get(ft,Tt),$t.init(),ft.traverse(function(mt){mt.isLight&&($t.pushLight(mt),mt.castShadow&&$t.pushShadow(mt))}),$t.setupLights(Tt),ft.traverse(function(mt){if(mt.material)if(Array.isArray(mt.material))for(var Me=0;Me<mt.material.length;Me++)P(mt.material[Me],ft.fog,mt);else P(mt.material,ft.fog,mt)})};var Da=null,Fo=new T;Fo.setAnimationLoop(function(ft){So.isPresenting()||Da&&Da(ft)}),typeof window<"u"&&Fo.setContext(window),this.setAnimationLoop=function(ft){Da=ft,So.setAnimationLoop(ft),Fo.start()},this.render=function(ft,Tt,mt,Me){if(!Tt||!Tt.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!Te){We=e=null,Qe=!1,ae=-1,fi=null,ft.autoUpdate===!0&&ft.updateMatrixWorld(),Tt.parent===null&&Tt.updateMatrixWorld(),So.enabled&&(Tt=So.getCamera(Tt)),$t=Hs.get(ft,Tt),$t.init(),ft.onBeforeRender(Yt,ft,Tt,mt),Li.multiplyMatrices(Tt.projectionMatrix,Tt.matrixWorldInverse),Wi.setFromMatrix(Li),ri=this.localClippingEnabled,Xe=Ae.init(this.clippingPlanes,ri,Tt),ee=bl.get(ft,Tt),ee.init(),y(ft,Tt,Yt.sortObjects),Yt.sortObjects===!0&&ee.sort(),Xe&&Ae.beginShadows(),Gu.render($t.state.shadowsArray,ft,Tt),$t.setupLights(Tt),Xe&&Ae.endShadows(),this.info.autoReset&&this.info.reset(),mt===void 0&&(mt=null),this.setRenderTarget(mt),hs.render(ee,ft,Tt,Me),Me=ee.opaque;var ze=ee.transparent;if(ft.overrideMaterial){var Ve=ft.overrideMaterial;Me.length&&w(Me,ft,Tt,Ve),ze.length&&w(ze,ft,Tt,Ve)}else Me.length&&w(Me,ft,Tt),ze.length&&w(ze,ft,Tt);mt&&No.updateRenderTargetMipmap(mt),li.buffers.depth.setTest(!0),li.buffers.depth.setMask(!0),li.buffers.color.setMask(!0),li.setPolygonOffset(!1),ft.onAfterRender(Yt,ft,Tt),So.enabled&&So.submitFrame(),$t=ee=null}},this.allocTextureUnit=function(){var ft=on;return ft>=Ze.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+ft+" texture units while this GPU supports only "+Ze.maxTextures),on+=1,ft},this.setTexture2D=function(){var ft=!1;return function(Tt,mt){Tt&&Tt.isWebGLRenderTarget&&(ft||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),ft=!0),Tt=Tt.texture),No.setTexture2D(Tt,mt)}}(),this.setTexture3D=function(){return function(ft,Tt){No.setTexture3D(ft,Tt)}}(),this.setTexture=function(){var ft=!1;return function(Tt,mt){ft||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),ft=!0),No.setTexture2D(Tt,mt)}}(),this.setTextureCube=function(){var ft=!1;return function(Tt,mt){Tt&&Tt.isWebGLRenderTargetCube&&(ft||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),ft=!0),Tt=Tt.texture),Tt&&Tt.isCubeTexture||Array.isArray(Tt.image)&&Tt.image.length===6?No.setTextureCube(Tt,mt):No.setTextureCubeDynamic(Tt,mt)}}(),this.setFramebuffer=function(ft){me=ft},this.getRenderTarget=function(){return De},this.setRenderTarget=function(ft){(De=ft)&&Pn.get(ft).__webglFramebuffer===void 0&&No.setupRenderTarget(ft);var Tt=me,mt=!1;ft?(Tt=Pn.get(ft).__webglFramebuffer,ft.isWebGLRenderTargetCube&&(Tt=Tt[ft.activeCubeFace],mt=!0),_n.copy(ft.viewport),qi.copy(ft.scissor),Vi=ft.scissorTest):(_n.copy(Ut).multiplyScalar(ti),qi.copy(Ye).multiplyScalar(ti),Vi=ei),be!==Tt&&(ne.bindFramebuffer(36160,Tt),be=Tt),li.viewport(_n),li.scissor(qi),li.setScissorTest(Vi),mt&&(mt=Pn.get(ft.texture),ne.framebufferTexture2D(36160,36064,34069+ft.activeCubeFace,mt.__webglTexture,ft.activeMipMapLevel))},this.readRenderTargetPixels=function(ft,Tt,mt,Me,ze,Ve){if(ft&&ft.isWebGLRenderTarget){var Se=Pn.get(ft).__webglFramebuffer;if(Se){var Ke=!1;Se!==be&&(ne.bindFramebuffer(36160,Se),Ke=!0);try{var Oi=ft.texture,$i=Oi.format,ve=Oi.type;$i!==1023&&In.convert($i)!==ne.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):ve===1009||In.convert(ve)===ne.getParameter(35738)||ve===1015&&(Ze.isWebGL2||ii.get("OES_texture_float")||ii.get("WEBGL_color_buffer_float"))||ve===1016&&(Ze.isWebGL2?ii.get("EXT_color_buffer_float"):ii.get("EXT_color_buffer_half_float"))?ne.checkFramebufferStatus(36160)===36053?0<=Tt&&Tt<=ft.width-Me&&0<=mt&&mt<=ft.height-ze&&ne.readPixels(Tt,mt,Me,ze,In.convert($i),In.convert(ve),Ve):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{Ke&&ne.bindFramebuffer(36160,be)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(ft,Tt,mt){var Me=Tt.image.width,ze=Tt.image.height,Ve=In.convert(Tt.format);this.setTexture2D(Tt,0),ne.copyTexImage2D(3553,mt||0,Ve,ft.x,ft.y,Me,ze,0)},this.copyTextureToTexture=function(ft,Tt,mt,Me){var ze=Tt.image.width,Ve=Tt.image.height,Se=In.convert(mt.format),Ke=In.convert(mt.type);this.setTexture2D(mt,0),Tt.isDataTexture?ne.texSubImage2D(3553,Me||0,ft.x,ft.y,ze,Ve,Se,Ke,Tt.image.data):ne.texSubImage2D(3553,Me||0,ft.x,ft.y,Se,Ke,Tt.image)}}function Re(t,e){this.name="",this.color=new L(t),this.density=e!==void 0?e:25e-5}function Sn(t,e,i){this.name="",this.color=new L(t),this.near=e!==void 0?e:1,this.far=i!==void 0?i:1e3}function Xn(){N.call(this),this.type="Scene",this.overrideMaterial=this.fog=this.background=null,this.autoUpdate=!0}function ki(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 Bi(t,e,i,n){this.data=t,this.itemSize=e,this.offset=i,this.normalized=n===!0}function Hi(t){Wt.call(this),this.type="SpriteMaterial",this.color=new L(16777215),this.map=null,this.rotation=0,this.sizeAttenuation=!0,this.lights=!1,this.transparent=!0,this.setValues(t)}function nn(t){if(N.call(this),this.type="Sprite",Ra===void 0){Ra=new Ft;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 ki(e,5),Ra.setIndex([0,1,2,0,2,3]),Ra.addAttribute("position",new Bi(e,3,0,!1)),Ra.addAttribute("uv",new Bi(e,2,3,!1))}this.geometry=Ra,this.material=t!==void 0?t:new Hi,this.center=new s(.5,.5)}function rn(){N.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function un(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 c)}function cn(){N.call(this),this.type="Bone"}function Gi(t,e){pi.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new c,this.bindMatrixInverse=new c,t=this.initBones(),t=new un(t),this.bind(t,this.matrixWorld),this.normalizeSkinWeights()}function Ni(t){Wt.call(this),this.type="LineBasicMaterial",this.color=new L(16777215),this.linewidth=1,this.linejoin=this.linecap="round",this.lights=!1,this.setValues(t)}function ji(t,e,i){i===1&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),N.call(this),this.type="Line",this.geometry=t!==void 0?t:new Ft,this.material=e!==void 0?e:new Ni({color:16777215*Math.random()})}function gi(t,e){ji.call(this,t,e),this.type="LineSegments"}function co(t,e){ji.call(this,t,e),this.type="LineLoop"}function Fn(t){Wt.call(this),this.type="PointsMaterial",this.color=new L(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=this.morphTargets=!1,this.setValues(t)}function la(t,e){N.call(this),this.type="Points",this.geometry=t!==void 0?t:new Ft,this.material=e!==void 0?e:new Fn({color:16777215*Math.random()})}function zh(t,e,i,n,o,l,f,p,y){g.call(this,t,e,i,n,o,l,f,p,y),this.generateMipmaps=!1}function Yo(t,e,i,n,o,l,f,p,y,w,A,P){g.call(this,null,l,f,p,y,w,n,o,A,P),this.image={width:e,height:i},this.mipmaps=t,this.generateMipmaps=this.flipY=!1}function Ka(t,e,i,n,o,l,f,p,y){g.call(this,t,e,i,n,o,l,f,p,y),this.needsUpdate=!0}function Qa(t,e,i,n,o,l,f,p,y,w){if(w=w!==void 0?w:1026,w!==1026&&w!==1027)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&w===1026&&(i=1012),i===void 0&&w===1027&&(i=1020),g.call(this,null,n,o,l,f,p,w,i,y),this.image={width:t,height:e},this.magFilter=f!==void 0?f:1003,this.minFilter=p!==void 0?p:1003,this.generateMipmaps=this.flipY=!1}function ha(t){Ft.call(this),this.type="WireframeGeometry";var e=[],i,n,o,l=[0,0],f={},p=["a","b","c"];if(t&&t.isGeometry){var y=t.faces,w=0;for(n=y.length;w<n;w++){var A=y[w];for(i=0;3>i;i++){var P=A[p[i]],B=A[p[(i+1)%3]];l[0]=Math.min(P,B),l[1]=Math.max(P,B),P=l[0]+","+l[1],f[P]===void 0&&(f[P]={index1:l[0],index2:l[1]})}}for(P in f)w=f[P],p=t.vertices[w.index1],e.push(p.x,p.y,p.z),p=t.vertices[w.index2],e.push(p.x,p.y,p.z)}else if(t&&t.isBufferGeometry)if(p=new u,t.index!==null){y=t.attributes.position,A=t.index;var H=t.groups;for(H.length===0&&(H=[{start:0,count:A.count,materialIndex:0}]),t=0,o=H.length;t<o;++t)for(w=H[t],i=w.start,n=w.count,w=i,n=i+n;w<n;w+=3)for(i=0;3>i;i++)P=A.getX(w+i),B=A.getX(w+(i+1)%3),l[0]=Math.min(P,B),l[1]=Math.max(P,B),P=l[0]+","+l[1],f[P]===void 0&&(f[P]={index1:l[0],index2:l[1]});for(P in f)w=f[P],p.fromBufferAttribute(y,w.index1),e.push(p.x,p.y,p.z),p.fromBufferAttribute(y,w.index2),e.push(p.x,p.y,p.z)}else for(y=t.attributes.position,w=0,n=y.count/3;w<n;w++)for(i=0;3>i;i++)f=3*w+i,p.fromBufferAttribute(y,f),e.push(p.x,p.y,p.z),f=3*w+(i+1)%3,p.fromBufferAttribute(y,f),e.push(p.x,p.y,p.z);this.addAttribute("position",new Et(e,3))}function tl(t,e,i){X.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:i},this.fromBufferGeometry(new ua(t,e,i)),this.mergeVertices()}function ua(t,e,i){Ft.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:i};var n=[],o=[],l=[],f=[],p=new u,y=new u,w=new u,A=new u,P=new u,B,H;3>t.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var q=e+1;for(B=0;B<=i;B++){var $=B/i;for(H=0;H<=e;H++){var rt=H/e;t(rt,$,y),o.push(y.x,y.y,y.z),0<=rt-1e-5?(t(rt-1e-5,$,w),A.subVectors(y,w)):(t(rt+1e-5,$,w),A.subVectors(w,y)),0<=$-1e-5?(t(rt,$-1e-5,w),P.subVectors(y,w)):(t(rt,$+1e-5,w),P.subVectors(w,y)),p.crossVectors(A,P).normalize(),l.push(p.x,p.y,p.z),f.push(rt,$)}}for(B=0;B<i;B++)for(H=0;H<e;H++)t=B*q+H+1,p=(B+1)*q+H+1,y=(B+1)*q+H,n.push(B*q+H,t,y),n.push(t,p,y);this.setIndex(n),this.addAttribute("position",new Et(o,3)),this.addAttribute("normal",new Et(l,3)),this.addAttribute("uv",new Et(f,2))}function Xi(t,e,i,n){X.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},this.fromBufferGeometry(new xi(t,e,i,n)),this.mergeVertices()}function xi(t,e,i,n){function o(w){p.push(w.x,w.y,w.z)}function l(w,A){w*=3,A.x=t[w+0],A.y=t[w+1],A.z=t[w+2]}function f(w,A,P,B){0>B&&w.x===1&&(y[A]=w.x-1),P.x===0&&P.z===0&&(y[A]=B/2/Math.PI+.5)}Ft.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},i=i||1,n=n||0;var p=[],y=[];(function(w){for(var A=new u,P=new u,B=new u,H=0;H<e.length;H+=3){l(e[H+0],A),l(e[H+1],P),l(e[H+2],B);var q,$,rt=A,xt=P,gt=B,Ct=Math.pow(2,w),wt=[];for($=0;$<=Ct;$++){wt[$]=[];var Vt=rt.clone().lerp(gt,$/Ct),J=xt.clone().lerp(gt,$/Ct),ot=Ct-$;for(q=0;q<=ot;q++)wt[$][q]=q===0&&$===Ct?Vt:Vt.clone().lerp(J,q/ot)}for($=0;$<Ct;$++)for(q=0;q<2*(Ct-$)-1;q++)rt=Math.floor(q/2),q%2===0?(o(wt[$][rt+1]),o(wt[$+1][rt]),o(wt[$][rt])):(o(wt[$][rt+1]),o(wt[$+1][rt+1]),o(wt[$+1][rt]))}})(n),function(w){for(var A=new u,P=0;P<p.length;P+=3)A.x=p[P+0],A.y=p[P+1],A.z=p[P+2],A.normalize().multiplyScalar(w),p[P+0]=A.x,p[P+1]=A.y,p[P+2]=A.z}(i),function(){for(var w=new u,A=0;A<p.length;A+=3)w.x=p[A+0],w.y=p[A+1],w.z=p[A+2],y.push(Math.atan2(w.z,-w.x)/2/Math.PI+.5,1-(Math.atan2(-w.y,Math.sqrt(w.x*w.x+w.z*w.z))/Math.PI+.5));w=new u,A=new u;for(var P=new u,B=new u,H=new s,q=new s,$=new s,rt=0,xt=0;rt<p.length;rt+=9,xt+=6){w.set(p[rt+0],p[rt+1],p[rt+2]),A.set(p[rt+3],p[rt+4],p[rt+5]),P.set(p[rt+6],p[rt+7],p[rt+8]),H.set(y[xt+0],y[xt+1]),q.set(y[xt+2],y[xt+3]),$.set(y[xt+4],y[xt+5]),B.copy(w).add(A).add(P).divideScalar(3);var gt=Math.atan2(B.z,-B.x);f(H,xt+0,w,gt),f(q,xt+2,A,gt),f($,xt+4,P,gt)}for(w=0;w<y.length;w+=6)A=y[w+0],P=y[w+2],B=y[w+4],H=Math.min(A,P,B),.9<Math.max(A,P,B)&&.1>H&&(.2>A&&(y[w+0]+=1),.2>P&&(y[w+2]+=1),.2>B&&(y[w+4]+=1))}(),this.addAttribute("position",new Et(p,3)),this.addAttribute("normal",new Et(p.slice(),3)),this.addAttribute("uv",new Et(y,2)),n===0?this.computeVertexNormals():this.normalizeNormals()}function el(t,e){X.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new ca(t,e)),this.mergeVertices()}function ca(t,e){xi.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 il(t,e){X.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new _s(t,e)),this.mergeVertices()}function _s(t,e){xi.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 nl(t,e){X.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new fa(t,e)),this.mergeVertices()}function fa(t,e){var i=(1+Math.sqrt(5))/2;xi.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 da(t,e){X.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new pa(t,e)),this.mergeVertices()}function pa(t,e){var i=(1+Math.sqrt(5))/2,n=1/i;xi.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 gn(t,e,i,n,o,l){X.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:o},l!==void 0&&console.warn("THREE.TubeGeometry: taper has been removed."),t=new Zo(t,e,i,n,o),this.tangents=t.tangents,this.normals=t.normals,this.binormals=t.binormals,this.fromBufferGeometry(t),this.mergeVertices()}function Zo(t,e,i,n,o){function l(xt){A=t.getPointAt(xt/e,A);var gt=f.normals[xt];for(xt=f.binormals[xt],B=0;B<=n;B++){var Ct=B/n*Math.PI*2,wt=Math.sin(Ct);Ct=-Math.cos(Ct),y.x=Ct*gt.x+wt*xt.x,y.y=Ct*gt.y+wt*xt.y,y.z=Ct*gt.z+wt*xt.z,y.normalize(),q.push(y.x,y.y,y.z),p.x=A.x+i*y.x,p.y=A.y+i*y.y,p.z=A.z+i*y.z,H.push(p.x,p.y,p.z)}}Ft.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 f=t.computeFrenetFrames(e,o);this.tangents=f.tangents,this.normals=f.normals,this.binormals=f.binormals;var p=new u,y=new u,w=new s,A=new u,P,B,H=[],q=[],$=[],rt=[];for(P=0;P<e;P++)l(P);for(l(o===!1?e:0),P=0;P<=e;P++)for(B=0;B<=n;B++)w.x=P/e,w.y=B/n,$.push(w.x,w.y);(function(){for(B=1;B<=e;B++)for(P=1;P<=n;P++){var xt=(n+1)*B+(P-1),gt=(n+1)*B+P,Ct=(n+1)*(B-1)+P;rt.push((n+1)*(B-1)+(P-1),xt,Ct),rt.push(xt,gt,Ct)}})(),this.setIndex(rt),this.addAttribute("position",new Et(H,3)),this.addAttribute("normal",new Et(q,3)),this.addAttribute("uv",new Et($,2))}function Zr(t,e,i,n,o,l,f){X.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:o,q:l},f!==void 0&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xs(t,e,i,n,o,l)),this.mergeVertices()}function xs(t,e,i,n,o,l){function f(J,ot,zt,ee,$t){var Yt=Math.sin(J);ot=zt/ot*J,zt=Math.cos(ot),$t.x=ee*(2+zt)*.5*Math.cos(J),$t.y=ee*(2+zt)*Yt*.5,$t.z=ee*Math.sin(ot)*.5}Ft.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:o,q:l},t=t||1,e=e||.4,i=Math.floor(i)||64,n=Math.floor(n)||8,o=o||2,l=l||3;var p=[],y=[],w=[],A=[],P,B=new u,H=new u,q=new u,$=new u,rt=new u,xt=new u,gt=new u;for(P=0;P<=i;++P){var Ct=P/i*o*Math.PI*2;for(f(Ct,o,l,t,q),f(Ct+.01,o,l,t,$),xt.subVectors($,q),gt.addVectors($,q),rt.crossVectors(xt,gt),gt.crossVectors(rt,xt),rt.normalize(),gt.normalize(),Ct=0;Ct<=n;++Ct){var wt=Ct/n*Math.PI*2,Vt=-e*Math.cos(wt);wt=e*Math.sin(wt),B.x=q.x+(Vt*gt.x+wt*rt.x),B.y=q.y+(Vt*gt.y+wt*rt.y),B.z=q.z+(Vt*gt.z+wt*rt.z),y.push(B.x,B.y,B.z),H.subVectors(B,q).normalize(),w.push(H.x,H.y,H.z),A.push(P/i),A.push(Ct/n)}}for(Ct=1;Ct<=i;Ct++)for(P=1;P<=n;P++)t=(n+1)*Ct+(P-1),e=(n+1)*Ct+P,o=(n+1)*(Ct-1)+P,p.push((n+1)*(Ct-1)+(P-1),t,o),p.push(t,e,o);this.setIndex(p),this.addAttribute("position",new Et(y,3)),this.addAttribute("normal",new Et(w,3)),this.addAttribute("uv",new Et(A,2))}function ws(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 Un(t,e,i,n,o)),this.mergeVertices()}function Un(t,e,i,n,o){Ft.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 l=[],f=[],p=[],y=[],w=new u,A=new u,P=new u,B,H;for(B=0;B<=i;B++)for(H=0;H<=n;H++){var q=H/n*o,$=B/i*Math.PI*2;A.x=(t+e*Math.cos($))*Math.cos(q),A.y=(t+e*Math.cos($))*Math.sin(q),A.z=e*Math.sin($),f.push(A.x,A.y,A.z),w.x=t*Math.cos(q),w.y=t*Math.sin(q),P.subVectors(A,w).normalize(),p.push(P.x,P.y,P.z),y.push(H/n),y.push(B/i)}for(B=1;B<=i;B++)for(H=1;H<=n;H++)t=(n+1)*(B-1)+H-1,e=(n+1)*(B-1)+H,o=(n+1)*B+H,l.push((n+1)*B+H-1,t,o),l.push(t,e,o);this.setIndex(l),this.addAttribute("position",new Et(f,3)),this.addAttribute("normal",new Et(p,3)),this.addAttribute("uv",new Et(y,2))}function kh(t,e,i,n,o){for(var l,f=0,p=e,y=i-n;p<i;p+=n)f+=(t[y]-t[p])*(t[p+1]+t[y+1]),y=p;if(o===0<f)for(o=e;o<i;o+=n)l=Jl(o,t[o],t[o+1],l);else for(o=i-n;o>=e;o-=n)l=Jl(o,t[o],t[o+1],l);return l&&Ts(l,l.next)&&(Yi(l),l=l.next),l}function ma(t,e){if(!t)return t;e||(e=t);do{var i=!1;if(t.steiner||!Ts(t,t.next)&&Ji(t.prev,t,t.next)!==0)t=t.next;else{if(Yi(t),t=e=t.prev,t===t.next)break;i=!0}}while(i||t!==e);return e}function ga(t,e,i,n,o,l,f){if(t){if(!f&&l){var p=t,y=p;do y.z===null&&(y.z=Yl(y.x,y.y,n,o,l)),y.prevZ=y.prev,y=y.nextZ=y.next;while(y!==p);y.prevZ.nextZ=null,y.prevZ=null,p=y;var w,A,P,B,H=1;do{y=p;var q=p=null;for(A=0;y;){A++;var $=y;for(w=P=0;w<H&&(P++,$=$.nextZ,$);w++);for(B=H;0<P||0<B&&$;)P!==0&&(B===0||!$||y.z<=$.z)?(w=y,y=y.nextZ,P--):(w=$,$=$.nextZ,B--),q?q.nextZ=w:p=w,w.prevZ=q,q=w;y=$}q.nextZ=null,H*=2}while(1<A)}for(p=t;t.prev!==t.next;){if(y=t.prev,$=t.next,l)t:{q=t,B=n;var rt=o,xt=l;if(A=q.prev,P=q,H=q.next,0<=Ji(A,P,H))q=!1;else{var gt=A.x>P.x?A.x>H.x?A.x:H.x:P.x>H.x?P.x:H.x,Ct=A.y>P.y?A.y>H.y?A.y:H.y:P.y>H.y?P.y:H.y;for(w=Yl(A.x<P.x?A.x<H.x?A.x:H.x:P.x<H.x?P.x:H.x,A.y<P.y?A.y<H.y?A.y:H.y:P.y<H.y?P.y:H.y,B,rt,xt),B=Yl(gt,Ct,B,rt,xt),rt=q.nextZ;rt&&rt.z<=B;){if(rt!==q.prev&&rt!==q.next&&Zl(A.x,A.y,P.x,P.y,H.x,H.y,rt.x,rt.y)&&0<=Ji(rt.prev,rt,rt.next)){q=!1;break t}rt=rt.nextZ}for(rt=q.prevZ;rt&&rt.z>=w;){if(rt!==q.prev&&rt!==q.next&&Zl(A.x,A.y,P.x,P.y,H.x,H.y,rt.x,rt.y)&&0<=Ji(rt.prev,rt,rt.next)){q=!1;break t}rt=rt.prevZ}q=!0}}else t:if(q=t,A=q.prev,P=q,H=q.next,0<=Ji(A,P,H))q=!1;else{for(w=q.next.next;w!==q.prev;){if(Zl(A.x,A.y,P.x,P.y,H.x,H.y,w.x,w.y)&&0<=Ji(w.prev,w,w.next)){q=!1;break t}w=w.next}q=!0}if(q)e.push(y.i/i),e.push(t.i/i),e.push($.i/i),Yi(t),p=t=$.next;else if(t=$,t===p){if(!f)ga(ma(t),e,i,n,o,l,1);else if(f===1){f=e,p=i,y=t;do $=y.prev,q=y.next.next,!Ts($,q)&&Bh($,y,y.next,q)&&Rr($,q)&&Rr(q,$)&&(f.push($.i/p),f.push(y.i/p),f.push(q.i/p),Yi(y),Yi(y.next),y=t=q),y=y.next;while(y!==t);t=y,ga(t,e,i,n,o,l,2)}else if(f===2)t:{f=t;do{for(p=f.next.next;p!==f.prev;){if(y=f.i!==p.i){if(y=f,$=p,q=y.next.i!==$.i&&y.prev.i!==$.i){e:{q=y;do{if(q.i!==y.i&&q.next.i!==y.i&&q.i!==$.i&&q.next.i!==$.i&&Bh(q,q.next,y,$)){q=!0;break e}q=q.next}while(q!==y);q=!1}q=!q}if(q=q&&Rr(y,$)&&Rr($,y)){q=y,A=!1,P=(y.x+$.x)/2,$=(y.y+$.y)/2;do q.y>$!=q.next.y>$&&q.next.y!==q.y&&P<(q.next.x-q.x)*($-q.y)/(q.next.y-q.y)+q.x&&(A=!A),q=q.next;while(q!==y);q=A}y=q}if(y){t=rl(f,p),f=ma(f,f.next),t=ma(t,t.next),ga(f,e,i,n,o,l),ga(t,e,i,n,o,l);break t}p=p.next}f=f.next}while(f!==t)}break}}}}function Su(t,e){return t.x-e.x}function Eu(t,e){var i=e,n=t.x,o=t.y,l=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var f=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(f<=n&&f>l){if(l=f,f===n){if(o===i.y)return i;if(o===i.next.y)return i.next}var p=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!p)return null;if(n===l)return p.prev;e=p,f=p.x;var y=p.y,w=1/0;for(i=p.next;i!==e;){if(n>=i.x&&i.x>=f&&n!==i.x&&Zl(o<y?n:l,o,f,y,o<y?l:n,o,i.x,i.y)){var A=Math.abs(o-i.y)/(n-i.x);(A<w||A===w&&i.x>p.x)&&Rr(i,t)&&(p=i,w=A)}i=i.next}return p}function Yl(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 yr(t){var e=t,i=t;do e.x<i.x&&(i=e),e=e.next;while(e!==t);return i}function Zl(t,e,i,n,o,l,f,p){return 0<=(o-f)*(e-p)-(t-f)*(l-p)&&0<=(t-f)*(n-p)-(i-f)*(e-p)&&0<=(i-f)*(l-p)-(o-f)*(n-p)}function Ji(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function Ts(t,e){return t.x===e.x&&t.y===e.y}function Bh(t,e,i,n){return Ts(t,e)&&Ts(i,n)||Ts(t,n)&&Ts(i,e)?!0:0<Ji(t,e,i)!=0<Ji(t,e,n)&&0<Ji(i,n,t)!=0<Ji(i,n,e)}function Rr(t,e){return 0>Ji(t.prev,t,t.next)?0<=Ji(t,e,t.next)&&0<=Ji(t,t.prev,e):0>Ji(t,e,t.prev)||0>Ji(t,t.next,e)}function rl(t,e){var i=new fo(t.i,t.x,t.y),n=new fo(e.i,e.x,e.y),o=t.next,l=e.prev;return t.next=e,e.prev=t,i.next=o,o.prev=i,n.next=i,i.prev=n,l.next=n,n.prev=l,n}function Jl(t,e,i,n){return t=new fo(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 Yi(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 fo(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 $l(t){var e=t.length;2<e&&t[e-1].equals(t[0])&&t.pop()}function bu(t,e){for(var i=0;i<e.length;i++)t.push(e[i].x),t.push(e[i].y)}function Po(t,e){X.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){function i(y){function w(Xe,ri,Li){return ri||console.error("THREE.ExtrudeGeometry: vec does not exist"),ri.clone().multiplyScalar(Li).add(Xe)}function A(Xe,ri,Li){var Ai=Xe.x-ri.x,ne=Xe.y-ri.y,ii=Li.x-Xe.x,Ze=Li.y-Xe.y,li=Ai*Ai+ne*ne;if(Math.abs(Ai*Ze-ne*ii)>Number.EPSILON){var xn=Math.sqrt(li),Pn=Math.sqrt(ii*ii+Ze*Ze);if(li=ri.x-ne/xn,ri=ri.y+Ai/xn,Ze=((Li.x-Ze/Pn-li)*Ze-(Li.y+ii/Pn-ri)*ii)/(Ai*Ze-ne*ii),ii=li+Ai*Ze-Xe.x,Ai=ri+ne*Ze-Xe.y,ne=ii*ii+Ai*Ai,2>=ne)return new s(ii,Ai);ne=Math.sqrt(ne/2)}else Xe=!1,Ai>Number.EPSILON?ii>Number.EPSILON&&(Xe=!0):Ai<-Number.EPSILON?ii<-Number.EPSILON&&(Xe=!0):Math.sign(ne)===Math.sign(Ze)&&(Xe=!0),Xe?(ii=-ne,ne=Math.sqrt(li)):(ii=Ai,Ai=ne,ne=Math.sqrt(li/2));return new s(ii/ne,Ai/ne)}function P(Xe,ri){for(Ce=Xe.length;0<=--Ce;){var Li=Ce,Ai=Ce-1;0>Ai&&(Ai=Xe.length-1);var ne,ii=gt+2*ot;for(ne=0;ne<ii;ne++){var Ze=Vi*ne,li=Vi*(ne+1),xn=ri+Ai+Ze,Pn=ri+Ai+li;li=ri+Li+li,q(ri+Li+Ze),q(xn),q(li),q(xn),q(Pn),q(li),Ze=o.length/3,Ze=ee.generateSideWallUV(n,o,Ze-6,Ze-3,Ze-2,Ze-1),$(Ze[0]),$(Ze[1]),$(Ze[3]),$(Ze[1]),$(Ze[2]),$(Ze[3])}}}function B(Xe,ri,Li){rt.push(Xe),rt.push(ri),rt.push(Li)}function H(Xe,ri,Li){q(Xe),q(ri),q(Li),Xe=o.length/3,Xe=ee.generateTopUV(n,o,Xe-3,Xe-2,Xe-1),$(Xe[0]),$(Xe[1]),$(Xe[2])}function q(Xe){o.push(rt[3*Xe]),o.push(rt[3*Xe+1]),o.push(rt[3*Xe+2])}function $(Xe){l.push(Xe.x),l.push(Xe.y)}var rt=[],xt=e.curveSegments!==void 0?e.curveSegments:12,gt=e.steps!==void 0?e.steps:1,Ct=e.depth!==void 0?e.depth:100,wt=e.bevelEnabled!==void 0?e.bevelEnabled:!0,Vt=e.bevelThickness!==void 0?e.bevelThickness:6,J=e.bevelSize!==void 0?e.bevelSize:Vt-2,ot=e.bevelSegments!==void 0?e.bevelSegments:3,zt=e.extrudePath,ee=e.UVGenerator!==void 0?e.UVGenerator:Ml;e.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),Ct=e.amount);var $t=!1;if(zt){var Yt=zt.getSpacedPoints(gt);$t=!0,wt=!1;var Te=zt.computeFrenetFrames(gt,!1),me=new u,De=new u,be=new u}wt||(J=Vt=ot=0);var ae;xt=y.extractPoints(xt),y=xt.shape;var We=xt.holes;if(!To.isClockWise(y)){y=y.reverse();var Qe=0;for(ae=We.length;Qe<ae;Qe++){var fi=We[Qe];To.isClockWise(fi)&&(We[Qe]=fi.reverse())}}var Cn=To.triangulateShape(y,We),_n=y;for(Qe=0,ae=We.length;Qe<ae;Qe++)fi=We[Qe],y=y.concat(fi);var qi,Vi=y.length,on,An=Cn.length;xt=[];var Ce=0,ti=_n.length,Ut=ti-1;for(qi=Ce+1;Ce<ti;Ce++,Ut++,qi++)Ut===ti&&(Ut=0),qi===ti&&(qi=0),xt[Ce]=A(_n[Ce],_n[Ut],_n[qi]);zt=[];var Ye=xt.concat();for(Qe=0,ae=We.length;Qe<ae;Qe++){fi=We[Qe];var ei=[];for(Ce=0,ti=fi.length,Ut=ti-1,qi=Ce+1;Ce<ti;Ce++,Ut++,qi++)Ut===ti&&(Ut=0),qi===ti&&(qi=0),ei[Ce]=A(fi[Ce],fi[Ut],fi[qi]);zt.push(ei),Ye=Ye.concat(ei)}for(Ut=0;Ut<ot;Ut++){ti=Ut/ot;var Wi=Vt*Math.cos(ti*Math.PI/2);for(qi=J*Math.sin(ti*Math.PI/2),Ce=0,ti=_n.length;Ce<ti;Ce++){var Ae=w(_n[Ce],xt[Ce],qi);B(Ae.x,Ae.y,-Wi)}for(Qe=0,ae=We.length;Qe<ae;Qe++)for(fi=We[Qe],ei=zt[Qe],Ce=0,ti=fi.length;Ce<ti;Ce++)Ae=w(fi[Ce],ei[Ce],qi),B(Ae.x,Ae.y,-Wi)}for(qi=J,Ce=0;Ce<Vi;Ce++)Ae=wt?w(y[Ce],Ye[Ce],qi):y[Ce],$t?(De.copy(Te.normals[0]).multiplyScalar(Ae.x),me.copy(Te.binormals[0]).multiplyScalar(Ae.y),be.copy(Yt[0]).add(De).add(me),B(be.x,be.y,be.z)):B(Ae.x,Ae.y,0);for(ti=1;ti<=gt;ti++)for(Ce=0;Ce<Vi;Ce++)Ae=wt?w(y[Ce],Ye[Ce],qi):y[Ce],$t?(De.copy(Te.normals[ti]).multiplyScalar(Ae.x),me.copy(Te.binormals[ti]).multiplyScalar(Ae.y),be.copy(Yt[ti]).add(De).add(me),B(be.x,be.y,be.z)):B(Ae.x,Ae.y,Ct/gt*ti);for(Ut=ot-1;0<=Ut;Ut--){for(ti=Ut/ot,Wi=Vt*Math.cos(ti*Math.PI/2),qi=J*Math.sin(ti*Math.PI/2),Ce=0,ti=_n.length;Ce<ti;Ce++)Ae=w(_n[Ce],xt[Ce],qi),B(Ae.x,Ae.y,Ct+Wi);for(Qe=0,ae=We.length;Qe<ae;Qe++)for(fi=We[Qe],ei=zt[Qe],Ce=0,ti=fi.length;Ce<ti;Ce++)Ae=w(fi[Ce],ei[Ce],qi),$t?B(Ae.x,Ae.y+Yt[gt-1].y,Yt[gt-1].x+Wi):B(Ae.x,Ae.y,Ct+Wi)}(function(){var Xe=o.length/3;if(wt){var ri=0*Vi;for(Ce=0;Ce<An;Ce++)on=Cn[Ce],H(on[2]+ri,on[1]+ri,on[0]+ri);for(ri=Vi*(gt+2*ot),Ce=0;Ce<An;Ce++)on=Cn[Ce],H(on[0]+ri,on[1]+ri,on[2]+ri)}else{for(Ce=0;Ce<An;Ce++)on=Cn[Ce],H(on[2],on[1],on[0]);for(Ce=0;Ce<An;Ce++)on=Cn[Ce],H(on[0]+Vi*gt,on[1]+Vi*gt,on[2]+Vi*gt)}n.addGroup(Xe,o.length/3-Xe,0)})(),function(){var Xe=o.length/3,ri=0;for(P(_n,ri),ri+=_n.length,Qe=0,ae=We.length;Qe<ae;Qe++)fi=We[Qe],P(fi,ri),ri+=fi.length;n.addGroup(Xe,o.length/3-Xe,1)}()}Ft.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];for(var n=this,o=[],l=[],f=0,p=t.length;f<p;f++)i(t[f]);this.addAttribute("position",new Et(o,3)),this.addAttribute("uv",new Et(l,2)),this.computeVertexNormals()}function Cu(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 ol(t,e){X.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new Ms(t,e)),this.mergeVertices()}function Ms(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),po.call(this,t,e),this.type="TextBufferGeometry"}function Jo(t,e,i,n,o,l,f){X.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:o,thetaStart:l,thetaLength:f},this.fromBufferGeometry(new Or(t,e,i,n,o,l,f)),this.mergeVertices()}function Or(t,e,i,n,o,l,f){Ft.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:o,thetaStart:l,thetaLength:f},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,l=l!==void 0?l:0,f=f!==void 0?f:Math.PI;var p=l+f,y,w,A=0,P=[],B=new u,H=new u,q=[],$=[],rt=[],xt=[];for(w=0;w<=i;w++){var gt=[],Ct=w/i;for(y=0;y<=e;y++){var wt=y/e;B.x=-t*Math.cos(n+wt*o)*Math.sin(l+Ct*f),B.y=t*Math.cos(l+Ct*f),B.z=t*Math.sin(n+wt*o)*Math.sin(l+Ct*f),$.push(B.x,B.y,B.z),H.set(B.x,B.y,B.z).normalize(),rt.push(H.x,H.y,H.z),xt.push(wt,1-Ct),gt.push(A++)}P.push(gt)}for(w=0;w<i;w++)for(y=0;y<e;y++)t=P[w][y+1],n=P[w][y],o=P[w+1][y],f=P[w+1][y+1],(w!==0||0<l)&&q.push(t,n,f),(w!==i-1||p<Math.PI)&&q.push(n,o,f);this.setIndex(q),this.addAttribute("position",new Et($,3)),this.addAttribute("normal",new Et(rt,3)),this.addAttribute("uv",new Et(xt,2))}function sl(t,e,i,n,o,l){X.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:o,thetaLength:l},this.fromBufferGeometry(new Ss(t,e,i,n,o,l)),this.mergeVertices()}function Ss(t,e,i,n,o,l){Ft.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:o,thetaLength:l},t=t||.5,e=e||1,o=o!==void 0?o:0,l=l!==void 0?l:2*Math.PI,i=i!==void 0?Math.max(3,i):8,n=n!==void 0?Math.max(1,n):1;var f=[],p=[],y=[],w=[],A=t,P=(e-t)/n,B=new u,H=new s,q,$;for(q=0;q<=n;q++){for($=0;$<=i;$++)t=o+$/i*l,B.x=A*Math.cos(t),B.y=A*Math.sin(t),p.push(B.x,B.y,B.z),y.push(0,0,1),H.x=(B.x/e+1)/2,H.y=(B.y/e+1)/2,w.push(H.x,H.y);A+=P}for(q=0;q<n;q++)for(e=q*(i+1),$=0;$<i;$++)t=$+e,o=t+i+1,l=t+i+2,A=t+1,f.push(t,o,A),f.push(o,l,A);this.setIndex(f),this.addAttribute("position",new Et(p,3)),this.addAttribute("normal",new Et(y,3)),this.addAttribute("uv",new Et(w,2))}function va(t,e,i,n){X.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},this.fromBufferGeometry(new $o(t,e,i,n)),this.mergeVertices()}function $o(t,e,i,n){Ft.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=di.clamp(n,0,2*Math.PI);var o=[],l=[],f=[],p=1/e,y=new u,w=new s,A;for(A=0;A<=e;A++){var P=i+A*p*n,B=Math.sin(P),H=Math.cos(P);for(P=0;P<=t.length-1;P++)y.x=t[P].x*B,y.y=t[P].y,y.z=t[P].x*H,l.push(y.x,y.y,y.z),w.x=A/e,w.y=P/(t.length-1),f.push(w.x,w.y)}for(A=0;A<e;A++)for(P=0;P<t.length-1;P++)i=P+A*t.length,p=i+t.length,y=i+t.length+1,w=i+1,o.push(i,p,w),o.push(p,y,w);if(this.setIndex(o),this.addAttribute("position",new Et(l,3)),this.addAttribute("uv",new Et(f,2)),this.computeVertexNormals(),n===2*Math.PI)for(n=this.attributes.normal.array,o=new u,l=new u,f=new u,i=e*t.length*3,P=A=0;A<t.length;A++,P+=3)o.x=n[P+0],o.y=n[P+1],o.z=n[P+2],l.x=n[i+P+0],l.y=n[i+P+1],l.z=n[i+P+2],f.addVectors(o,l).normalize(),n[P+0]=n[i+P+0]=f.x,n[P+1]=n[i+P+1]=f.y,n[P+2]=n[i+P+2]=f.z}function Lo(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 Ko(t,e)),this.mergeVertices()}function Ko(t,e){function i(A){var P,B=o.length/3;A=A.extractPoints(e);var H=A.shape,q=A.holes;if(To.isClockWise(H)===!1)for(H=H.reverse(),A=0,P=q.length;A<P;A++){var $=q[A];To.isClockWise($)===!0&&(q[A]=$.reverse())}var rt=To.triangulateShape(H,q);for(A=0,P=q.length;A<P;A++)$=q[A],H=H.concat($);for(A=0,P=H.length;A<P;A++)$=H[A],o.push($.x,$.y,0),l.push(0,0,1),f.push($.x,$.y);for(A=0,P=rt.length;A<P;A++)H=rt[A],n.push(H[0]+B,H[1]+B,H[2]+B),y+=3}Ft.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],o=[],l=[],f=[],p=0,y=0;if(Array.isArray(t)===!1)i(t);else for(var w=0;w<t.length;w++)i(t[w]),this.addGroup(p,y,w),p+=y,y=0;this.setIndex(n),this.addAttribute("position",new Et(o,3)),this.addAttribute("normal",new Et(l,3)),this.addAttribute("uv",new Et(f,2))}function Au(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 Qo(t,e){Ft.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e};var i=[];e=Math.cos(di.DEG2RAD*(e!==void 0?e:1));var n=[0,0],o={},l=["a","b","c"];if(t.isBufferGeometry){var f=new X;f.fromBufferGeometry(t)}else f=t.clone();f.mergeVertices(),f.computeFaceNormals(),t=f.vertices,f=f.faces;for(var p=0,y=f.length;p<y;p++)for(var w=f[p],A=0;3>A;A++){var P=w[l[A]],B=w[l[(A+1)%3]];n[0]=Math.min(P,B),n[1]=Math.max(P,B),P=n[0]+","+n[1],o[P]===void 0?o[P]={index1:n[0],index2:n[1],face1:p,face2:void 0}:o[P].face2=p}for(P in o)n=o[P],(n.face2===void 0||f[n.face1].normal.dot(f[n.face2].normal)<=e)&&(l=t[n.index1],i.push(l.x,l.y,l.z),l=t[n.index2],i.push(l.x,l.y,l.z));this.addAttribute("position",new Et(i,3))}function Ro(t,e,i,n,o,l,f,p){X.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:o,openEnded:l,thetaStart:f,thetaLength:p},this.fromBufferGeometry(new Oo(t,e,i,n,o,l,f,p)),this.mergeVertices()}function Oo(t,e,i,n,o,l,f,p){function y(gt){var Ct,wt=new s,Vt=new u,J=0,ot=gt===!0?t:e,zt=gt===!0?1:-1,ee=q;for(Ct=1;Ct<=n;Ct++)P.push(0,rt*zt,0),B.push(0,zt,0),H.push(.5,.5),q++;var $t=q;for(Ct=0;Ct<=n;Ct++){var Yt=Ct/n*p+f,Te=Math.cos(Yt);Yt=Math.sin(Yt),Vt.x=ot*Yt,Vt.y=rt*zt,Vt.z=ot*Te,P.push(Vt.x,Vt.y,Vt.z),B.push(0,zt,0),wt.x=.5*Te+.5,wt.y=.5*Yt*zt+.5,H.push(wt.x,wt.y),q++}for(Ct=0;Ct<n;Ct++)wt=ee+Ct,Vt=$t+Ct,gt===!0?A.push(Vt,Vt+1,wt):A.push(Vt+1,Vt,wt),J+=3;w.addGroup(xt,J,gt===!0?1:2),xt+=J}Ft.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:o,openEnded:l,thetaStart:f,thetaLength:p};var w=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,l=l!==void 0?l:!1,f=f!==void 0?f:0,p=p!==void 0?p:2*Math.PI;var A=[],P=[],B=[],H=[],q=0,$=[],rt=i/2,xt=0;(function(){var gt,Ct,wt=new u,Vt=new u,J=0,ot=(e-t)/i;for(Ct=0;Ct<=o;Ct++){var zt=[],ee=Ct/o,$t=ee*(e-t)+t;for(gt=0;gt<=n;gt++){var Yt=gt/n,Te=Yt*p+f,me=Math.sin(Te);Te=Math.cos(Te),Vt.x=$t*me,Vt.y=-ee*i+rt,Vt.z=$t*Te,P.push(Vt.x,Vt.y,Vt.z),wt.set(me,ot,Te).normalize(),B.push(wt.x,wt.y,wt.z),H.push(Yt,1-ee),zt.push(q++)}$.push(zt)}for(gt=0;gt<n;gt++)for(Ct=0;Ct<o;Ct++)wt=$[Ct+1][gt],Vt=$[Ct+1][gt+1],ot=$[Ct][gt+1],A.push($[Ct][gt],wt,ot),A.push(wt,Vt,ot),J+=6;w.addGroup(xt,J,0),xt+=J})(),l===!1&&(0<t&&y(!0),0<e&&y(!1)),this.setIndex(A),this.addAttribute("position",new Et(P,3)),this.addAttribute("normal",new Et(B,3)),this.addAttribute("uv",new Et(H,2))}function ya(t,e,i,n,o,l,f){Ro.call(this,0,t,e,i,n,o,l,f),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:o,thetaStart:l,thetaLength:f}}function Gn(t,e,i,n,o,l,f){Oo.call(this,0,t,e,i,n,o,l,f),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:o,thetaStart:l,thetaLength:f}}function Es(t,e,i,n){X.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new mo(t,e,i,n)),this.mergeVertices()}function mo(t,e,i,n){Ft.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=[],l=[],f=[],p=[],y,w=new u,A=new s;l.push(0,0,0),f.push(0,0,1),p.push(.5,.5);var P=0;for(y=3;P<=e;P++,y+=3){var B=i+P/e*n;w.x=t*Math.cos(B),w.y=t*Math.sin(B),l.push(w.x,w.y,w.z),f.push(0,0,1),A.x=(l[y]/t+1)/2,A.y=(l[y+1]/t+1)/2,p.push(A.x,A.y)}for(y=1;y<=e;y++)o.push(y,y+1,0);this.setIndex(o),this.addAttribute("position",new Et(l,3)),this.addAttribute("normal",new Et(f,3)),this.addAttribute("uv",new Et(p,2))}function ts(t){Wt.call(this),this.type="ShadowMaterial",this.color=new L(0),this.transparent=!0,this.setValues(t)}function bs(t){$e.call(this,t),this.type="RawShaderMaterial"}function go(t){Wt.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new L(16777215),this.metalness=this.roughness=.5,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new L(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new s(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 Cs(t){go.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoatRoughness=this.clearCoat=0,this.setValues(t)}function Jr(t){Wt.call(this),this.type="MeshPhongMaterial",this.color=new L(16777215),this.specular=new L(1118481),this.shininess=30,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new L(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new s(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 As(t){Jr.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ps(t){Wt.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new s(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 Ir(t){Wt.call(this),this.type="MeshLambertMaterial",this.color=new L(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new L(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 Ls(t){if(Wt.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new L(16777215),this.bumpMap=this.map=this.matcap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new s(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 Rs(t){Ni.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}function $n(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 al(t,e,i,n){$n.call(this,t,e,i,n),this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function Dr(t,e,i,n){$n.call(this,t,e,i,n)}function Os(t,e,i,n){$n.call(this,t,e,i,n)}function Hn(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=Yn.convertArray(e,this.TimeBufferType),this.values=Yn.convertArray(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}function Kl(t,e,i){Hn.call(this,t,e,i)}function Ql(t,e,i,n){Hn.call(this,t,e,i,n)}function $r(t,e,i,n){Hn.call(this,t,e,i,n)}function ar(t,e,i,n){$n.call(this,t,e,i,n)}function _a(t,e,i,n){Hn.call(this,t,e,i,n)}function th(t,e,i,n){Hn.call(this,t,e,i,n)}function xa(t,e,i,n){Hn.call(this,t,e,i,n)}function _r(t,e,i){this.name=t,this.tracks=i,this.duration=e!==void 0?e:-1,this.uuid=di.generateUUID(),0>this.duration&&this.resetDuration()}function jc(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 xa;case"color":return Ql;case"quaternion":return _a;case"bool":case"boolean":return Kl;case"string":return th}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function Xc(t){if(t.type===void 0)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=jc(t.type);if(t.times===void 0){var i=[],n=[];Yn.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 es(t,e,i){var n=this,o=!1,l=0,f=0,p=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(y){f++,o===!1&&n.onStart!==void 0&&n.onStart(y,l,f),o=!0},this.itemEnd=function(y){l++,n.onProgress!==void 0&&n.onProgress(y,l,f),l===f&&(o=!1,n.onLoad!==void 0)&&n.onLoad()},this.itemError=function(y){n.onError!==void 0&&n.onError(y)},this.resolveURL=function(y){return p?p(y):y},this.setURLModifier=function(y){return p=y,this}}function Lt(t){this.manager=t!==void 0?t:tr}function Qt(t){this.manager=t!==void 0?t:tr}function Zt(t){this.manager=t!==void 0?t:tr,this._parser=null}function Ue(t){this.manager=t!==void 0?t:tr,this._parser=null}function ai(t){this.manager=t!==void 0?t:tr}function Fi(t){this.manager=t!==void 0?t:tr}function fn(t){this.manager=t!==void 0?t:tr}function Ee(){this.type="Curve",this.arcLengthDivisions=200}function Kn(t,e,i,n,o,l,f,p){Ee.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=l||2*Math.PI,this.aClockwise=f||!1,this.aRotation=p||0}function wa(t,e,i,n,o,l){Kn.call(this,t,e,i,i,n,o,l),this.type="ArcCurve"}function lr(){var t=0,e=0,i=0,n=0;return{initCatmullRom:function(o,l,f,p,y){o=y*(f-o),p=y*(p-l),t=l,e=o,i=-3*l+3*f-2*o-p,n=2*l-2*f+o+p},initNonuniformCatmullRom:function(o,l,f,p,y,w,A){o=((l-o)/y-(f-o)/(y+w)+(f-l)/w)*w,p=((f-l)/w-(p-l)/(w+A)+(p-f)/A)*w,t=l,e=o,i=-3*l+3*f-2*o-p,n=2*l-2*f+o+p},calc:function(o){var l=o*o;return t+e*o+i*l+n*l*o}}}function On(t,e,i,n){Ee.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=i||"centripetal",this.tension=n||.5}function Pu(t,e,i,n,o){e=.5*(n-e),o=.5*(o-i);var l=t*t;return(2*i-2*n+e+o)*t*l+(-3*i+3*n-2*e-o)*l+e*t+i}function vo(t,e,i,n){var o=1-t;return o*o*e+2*(1-t)*t*i+t*t*n}function is(t,e,i,n,o){var l=1-t,f=1-t;return l*l*l*e+3*f*f*t*i+3*(1-t)*t*t*n+t*t*t*o}function hr(t,e,i,n){Ee.call(this),this.type="CubicBezierCurve",this.v0=t||new s,this.v1=e||new s,this.v2=i||new s,this.v3=n||new s}function Ti(t,e,i,n){Ee.call(this),this.type="CubicBezierCurve3",this.v0=t||new u,this.v1=e||new u,this.v2=i||new u,this.v3=n||new u}function ur(t,e){Ee.call(this),this.type="LineCurve",this.v1=t||new s,this.v2=e||new s}function zr(t,e){Ee.call(this),this.type="LineCurve3",this.v1=t||new u,this.v2=e||new u}function cr(t,e,i){Ee.call(this),this.type="QuadraticBezierCurve",this.v0=t||new s,this.v1=e||new s,this.v2=i||new s}function yo(t,e,i){Ee.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new u,this.v1=e||new u,this.v2=i||new u}function Kr(t){Ee.call(this),this.type="SplineCurve",this.points=t||[]}function Io(){Ee.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function fr(t){Io.call(this),this.type="Path",this.currentPoint=new s,t&&this.setFromPoints(t)}function Qn(t){fr.call(this,t),this.uuid=di.generateUUID(),this.type="Shape",this.holes=[]}function tn(t,e){N.call(this),this.type="Light",this.color=new L(t),this.intensity=e!==void 0?e:1,this.receiveShadow=void 0}function ll(t,e,i){tn.call(this,t,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(N.DefaultUp),this.updateMatrix(),this.groundColor=new L(e)}function _o(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new s(512,512),this.map=null,this.matrix=new c}function hl(){_o.call(this,new _e(50,1,.5,500))}function ul(t,e,i,n,o,l){tn.call(this,t,e),this.type="SpotLight",this.position.copy(N.DefaultUp),this.updateMatrix(),this.target=new N,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(f){this.intensity=f/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=l!==void 0?l:1,this.shadow=new hl}function Is(t,e,i,n){tn.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 _o(new _e(90,1,.5,500))}function Ta(t,e,i,n,o,l){Be.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=l!==void 0?l:2e3,this.updateProjectionMatrix()}function ns(){_o.call(this,new Ta(-5,5,5,-5,.5,500))}function xo(t,e){tn.call(this,t,e),this.type="DirectionalLight",this.position.copy(N.DefaultUp),this.updateMatrix(),this.target=new N,this.shadow=new ns}function Ds(t,e){tn.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function eh(t,e,i,n){tn.call(this,t,e),this.type="RectAreaLight",this.width=i!==void 0?i:10,this.height=n!==void 0?n:10}function ih(t){this.manager=t!==void 0?t:tr,this.textures={}}function Nh(t){this.manager=t!==void 0?t:tr}function Do(){}function zs(t){typeof t=="boolean"&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=t!==void 0?t:tr,this.withCredentials=!1}function cl(t){this.manager=t!==void 0?t:tr,this.resourcePath=""}function Fh(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:tr,this.options=void 0}function nh(){this.type="ShapePath",this.color=new L,this.subPaths=[],this.currentPath=null}function Uh(t){this.type="Font",this.data=t}function Lu(t){this.manager=t!==void 0?t:tr}function vn(t){this.manager=t!==void 0?t:tr}function Vn(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new _e,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new _e,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function fl(t,e,i,n){N.call(this),this.type="CubeCamera";var o=new _e(90,1,t,e);o.up.set(0,-1,0),o.lookAt(new u(1,0,0)),this.add(o);var l=new _e(90,1,t,e);l.up.set(0,-1,0),l.lookAt(new u(-1,0,0)),this.add(l);var f=new _e(90,1,t,e);f.up.set(0,0,1),f.lookAt(new u(0,1,0)),this.add(f);var p=new _e(90,1,t,e);p.up.set(0,0,-1),p.lookAt(new u(0,-1,0)),this.add(p);var y=new _e(90,1,t,e);y.up.set(0,-1,0),y.lookAt(new u(0,0,1)),this.add(y);var w=new _e(90,1,t,e);w.up.set(0,-1,0),w.lookAt(new u(0,0,-1)),this.add(w),n=n||{format:1022,magFilter:1006,minFilter:1006},this.renderTarget=new b(i,i,n),this.renderTarget.texture.name="CubeCamera",this.update=function(A,P){this.parent===null&&this.updateMatrixWorld();var B=this.renderTarget,H=B.texture.generateMipmaps;B.texture.generateMipmaps=!1,B.activeCubeFace=0,A.render(P,o,B),B.activeCubeFace=1,A.render(P,l,B),B.activeCubeFace=2,A.render(P,f,B),B.activeCubeFace=3,A.render(P,p,B),B.activeCubeFace=4,A.render(P,y,B),B.texture.generateMipmaps=H,B.activeCubeFace=5,A.render(P,w,B),A.setRenderTarget(null)},this.clear=function(A,P,B,H){for(var q=this.renderTarget,$=0;6>$;$++)q.activeCubeFace=$,A.setRenderTarget(q),A.clear(P,B,H);A.setRenderTarget(null)}}function Gh(t){this.autoStart=t!==void 0?t:!0,this.elapsedTime=this.oldTime=this.startTime=0,this.running=!1}function rh(){N.call(this),this.type="AudioListener",this.context=$h.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0}function Ma(t){N.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 dl(t){Ma.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function ks(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 pl(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 Bs(t,e,i){i=i||En.parseTrackName(e),this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function En(t,e,i){this.path=e,this.parsedPath=i||En.parseTrackName(e),this.node=En.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Sa(){this.uuid=di.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 ml(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 l=t[o].createInterpolant(null);i[o]=l,l.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 rs(t){this._root=t,this._initMemoryManager(),this.time=this._accuIndex=0,this.timeScale=1}function oh(t,e){typeof t=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=e),this.value=t}function Hh(){Ft.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Vh(t,e,i){ki.call(this,t,e),this.meshPerAttribute=i||1}function Wh(t,e,i,n){typeof i=="number"&&(n=i,i=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),K.call(this,t,e,i),this.meshPerAttribute=n||1}function Ru(t,e,i,n){this.ray=new Si(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 gl(t,e){return t.distance-e.distance}function Ns(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++)Ns(t[n],e,i,!0)}}function jh(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 it(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 os(t,e){this.min=t!==void 0?t:new s(1/0,1/0),this.max=e!==void 0?e:new s(-1/0,-1/0)}function Ea(t,e){this.start=t!==void 0?t:new u,this.end=e!==void 0?e:new u}function qn(t){N.call(this),this.material=t,this.render=function(){}}function _i(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 Ft,e=new Et(6*e,3),i.addAttribute("position",e),gi.call(this,i,new Ni({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function ba(t,e){N.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new Ft,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,l=n/32*Math.PI*2;e.push(Math.cos(o),Math.sin(o),1,Math.cos(l),Math.sin(l),1)}t.addAttribute("position",new Et(e,3)),e=new Ni({fog:!1}),this.cone=new gi(t,e),this.add(this.cone),this.update()}function Ou(t){var e=[];t&&t.isBone&&e.push(t);for(var i=0;i<t.children.length;i++)e.push.apply(e,Ou(t.children[i]));return e}function Ca(t){for(var e=Ou(t),i=new Ft,n=[],o=[],l=new L(0,0,1),f=new L(0,1,0),p=0;p<e.length;p++){var y=e[p];y.parent&&y.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),o.push(l.r,l.g,l.b),o.push(f.r,f.g,f.b))}i.addAttribute("position",new Et(n,3)),i.addAttribute("color",new Et(o,3)),n=new Ni({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0}),gi.call(this,i,n),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function kr(t,e,i){this.light=t,this.light.updateMatrixWorld(),this.color=i,t=new Or(e,4,2),e=new Ge({wireframe:!0,fog:!1}),pi.call(this,t,e),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Aa(t,e){N.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new Ni({fog:!1}),e=new Ft,e.addAttribute("position",new K(new Float32Array(15),3)),this.line=new ji(e,t),this.add(this.line),this.update()}function Pa(t,e,i){N.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,t=new _s(e),t.rotateY(.5*Math.PI),this.material=new Ge({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 K(e,3)),this.add(new pi(t,this.material)),this.update()}function vl(t,e,i,n){t=t||10,e=e||10,i=new L(i!==void 0?i:4473924),n=new L(n!==void 0?n:8947848);var o=e/2,l=t/e,f=t/2;t=[];for(var p=[],y=0,w=0,A=-f;y<=e;y++,A+=l){t.push(-f,0,A,f,0,A),t.push(A,0,-f,A,0,f);var P=y===o?i:n;P.toArray(p,w),w+=3,P.toArray(p,w),w+=3,P.toArray(p,w),w+=3,P.toArray(p,w),w+=3}e=new Ft,e.addAttribute("position",new Et(t,3)),e.addAttribute("color",new Et(p,3)),i=new Ni({vertexColors:2}),gi.call(this,e,i)}function sh(t,e,i,n,o,l){t=t||10,e=e||16,i=i||8,n=n||64,o=new L(o!==void 0?o:4473924),l=new L(l!==void 0?l:8947848);var f=[],p=[],y;for(y=0;y<=e;y++){var w=y/e*2*Math.PI,A=Math.sin(w)*t;w=Math.cos(w)*t,f.push(0,0,0),f.push(A,0,w);var P=y&1?o:l;p.push(P.r,P.g,P.b),p.push(P.r,P.g,P.b)}for(y=0;y<=i;y++){P=y&1?o:l;var B=t-t/i*y;for(e=0;e<n;e++)w=e/n*2*Math.PI,A=Math.sin(w)*B,w=Math.cos(w)*B,f.push(A,0,w),p.push(P.r,P.g,P.b),w=(e+1)/n*2*Math.PI,A=Math.sin(w)*B,w=Math.cos(w)*B,f.push(A,0,w),p.push(P.r,P.g,P.b)}t=new Ft,t.addAttribute("position",new Et(f,3)),t.addAttribute("color",new Et(p,3)),f=new Ni({vertexColors:2}),gi.call(this,t,f)}function yl(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 Ft,e=new Et(6*e,3),i.addAttribute("position",e),gi.call(this,i,new Ni({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function dr(t,e,i){N.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 Ft,t.addAttribute("position",new Et([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3)),e=new Ni({fog:!1}),this.lightPlane=new ji(t,e),this.add(this.lightPlane),t=new Ft,t.addAttribute("position",new Et([0,0,0,0,0,1],3)),this.targetLine=new ji(t,e),this.add(this.targetLine),this.update()}function _l(t){function e(H,q,$){i(H,$),i(q,$)}function i(H,q){l.push(0,0,0),f.push(q.r,q.g,q.b),p[H]===void 0&&(p[H]=[]),p[H].push(l.length/3-1)}var n=new Ft,o=new Ni({color:16777215,vertexColors:1}),l=[],f=[],p={},y=new L(16755200),w=new L(16711680),A=new L(43775),P=new L(16777215),B=new L(3355443);e("n1","n2",y),e("n2","n4",y),e("n4","n3",y),e("n3","n1",y),e("f1","f2",y),e("f2","f4",y),e("f4","f3",y),e("f3","f1",y),e("n1","f1",y),e("n2","f2",y),e("n3","f3",y),e("n4","f4",y),e("p","n1",w),e("p","n2",w),e("p","n3",w),e("p","n4",w),e("u1","u2",A),e("u2","u3",A),e("u3","u1",A),e("c","t",P),e("p","c",B),e("cn1","cn2",B),e("cn3","cn4",B),e("cf1","cf2",B),e("cf3","cf4",B),n.addAttribute("position",new Et(l,3)),n.addAttribute("color",new Et(f,3)),gi.call(this,n,o),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=p,this.update()}function zo(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 Ft;n.setIndex(new K(t,1)),n.addAttribute("position",new K(i,3)),gi.call(this,n,new Ni({color:e})),this.matrixAutoUpdate=!1,this.update()}function xl(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 Ft;i.setIndex(new K(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)),gi.call(this,i,new Ni({color:t})),this.geometry.computeBoundingSphere()}function wl(t,e,i){this.type="PlaneHelper",this.plane=t,this.size=e===void 0?1:e,t=i!==void 0?i:16776960,e=new Ft,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(),ji.call(this,e,new Ni({color:t})),e=new Ft,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 pi(e,new Ge({color:t,opacity:.2,transparent:!0,depthWrite:!1})))}function ko(t,e,i,n,o,l){N.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),l===void 0&&(l=.2*o),fh===void 0&&(fh=new Ft,fh.addAttribute("position",new Et([0,0,0,0,1,0],3)),El=new Oo(0,.5,1,5,1),El.translate(0,-.5,0)),this.position.copy(e),this.line=new ji(fh,new Ni({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new pi(El,new Ge({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,o,l)}function xr(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 Ft,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 Ni({vertexColors:2}),gi.call(this,t,e)}function Iu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),On.call(this,t),this.type="catmullrom",this.closed=!0}function Du(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),On.call(this,t),this.type="catmullrom"}function Xh(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),On.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(a.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 di={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,l=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[l&255]+t[l>>8&255]+t[l>>16&255]+t[l>>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*di.DEG2RAD},radToDeg:function(t){return t*di.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(s.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(s.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 s,e=new s;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(c.prototype,{isMatrix4:!0,set:function(t,e,i,n,o,l,f,p,y,w,A,P,B,H,q,$){var rt=this.elements;return rt[0]=t,rt[4]=e,rt[8]=i,rt[12]=n,rt[1]=o,rt[5]=l,rt[9]=f,rt[13]=p,rt[2]=y,rt[6]=w,rt[10]=A,rt[14]=P,rt[3]=B,rt[7]=H,rt[11]=q,rt[15]=$,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 c().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 u;return function(e){var i=this.elements,n=e.elements,o=1/t.setFromMatrixColumn(e,0).length(),l=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]*l,i[5]=n[5]*l,i[6]=n[6]*l,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,l=Math.cos(i);i=Math.sin(i);var f=Math.cos(n);n=Math.sin(n);var p=Math.cos(o);if(o=Math.sin(o),t.order==="XYZ"){t=l*p;var y=l*o,w=i*p,A=i*o;e[0]=f*p,e[4]=-f*o,e[8]=n,e[1]=y+w*n,e[5]=t-A*n,e[9]=-i*f,e[2]=A-t*n,e[6]=w+y*n,e[10]=l*f}else t.order==="YXZ"?(t=f*p,y=f*o,w=n*p,A=n*o,e[0]=t+A*i,e[4]=w*i-y,e[8]=l*n,e[1]=l*o,e[5]=l*p,e[9]=-i,e[2]=y*i-w,e[6]=A+t*i,e[10]=l*f):t.order==="ZXY"?(t=f*p,y=f*o,w=n*p,A=n*o,e[0]=t-A*i,e[4]=-l*o,e[8]=w+y*i,e[1]=y+w*i,e[5]=l*p,e[9]=A-t*i,e[2]=-l*n,e[6]=i,e[10]=l*f):t.order==="ZYX"?(t=l*p,y=l*o,w=i*p,A=i*o,e[0]=f*p,e[4]=w*n-y,e[8]=t*n+A,e[1]=f*o,e[5]=A*n+t,e[9]=y*n-w,e[2]=-n,e[6]=i*f,e[10]=l*f):t.order==="YZX"?(t=l*f,y=l*n,w=i*f,A=i*n,e[0]=f*p,e[4]=A-t*o,e[8]=w*o+y,e[1]=o,e[5]=l*p,e[9]=-i*p,e[2]=-n*p,e[6]=y*o+w,e[10]=t-A*o):t.order==="XZY"&&(t=l*f,y=l*n,w=i*f,A=i*n,e[0]=f*p,e[4]=-o,e[8]=n*p,e[1]=t*o+A,e[5]=l*p,e[9]=y*o-w,e[2]=w*o-y,e[6]=i*p,e[10]=A*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 u(0,0,0),e=new u(1,1,1);return function(i){return this.compose(t,i,e)}}(),lookAt:function(){var t=new u,e=new u,i=new u;return function(n,o,l){var f=this.elements;return i.subVectors(n,o),i.lengthSq()===0&&(i.z=1),i.normalize(),t.crossVectors(l,i),t.lengthSq()===0&&(Math.abs(l.z)===1?i.x+=1e-4:i.z+=1e-4,i.normalize(),t.crossVectors(l,i)),t.normalize(),e.crossVectors(i,t),f[0]=t.x,f[4]=e.x,f[8]=i.x,f[1]=t.y,f[5]=e.y,f[9]=i.y,f[2]=t.z,f[6]=e.z,f[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],l=i[8],f=i[12],p=i[1],y=i[5],w=i[9],A=i[13],P=i[2],B=i[6],H=i[10],q=i[14],$=i[3],rt=i[7],xt=i[11];i=i[15];var gt=n[0],Ct=n[4],wt=n[8],Vt=n[12],J=n[1],ot=n[5],zt=n[9],ee=n[13],$t=n[2],Yt=n[6],Te=n[10],me=n[14],De=n[3],be=n[7],ae=n[11];return n=n[15],e[0]=t*gt+o*J+l*$t+f*De,e[4]=t*Ct+o*ot+l*Yt+f*be,e[8]=t*wt+o*zt+l*Te+f*ae,e[12]=t*Vt+o*ee+l*me+f*n,e[1]=p*gt+y*J+w*$t+A*De,e[5]=p*Ct+y*ot+w*Yt+A*be,e[9]=p*wt+y*zt+w*Te+A*ae,e[13]=p*Vt+y*ee+w*me+A*n,e[2]=P*gt+B*J+H*$t+q*De,e[6]=P*Ct+B*ot+H*Yt+q*be,e[10]=P*wt+B*zt+H*Te+q*ae,e[14]=P*Vt+B*ee+H*me+q*n,e[3]=$*gt+rt*J+xt*$t+i*De,e[7]=$*Ct+rt*ot+xt*Yt+i*be,e[11]=$*wt+rt*zt+xt*Te+i*ae,e[15]=$*Vt+rt*ee+xt*me+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 u;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],l=t[1],f=t[5],p=t[9],y=t[13],w=t[2],A=t[6],P=t[10],B=t[14];return t[3]*(+o*p*A-n*y*A-o*f*P+i*y*P+n*f*B-i*p*B)+t[7]*(+e*p*B-e*y*P+o*l*P-n*l*B+n*y*w-o*p*w)+t[11]*(+e*y*A-e*f*B-o*l*A+i*l*B+o*f*w-i*y*w)+t[15]*(-n*f*w-e*p*A+e*f*P+n*l*A-i*l*P+i*p*w)},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],l=n[2],f=n[3],p=n[4],y=n[5],w=n[6],A=n[7],P=n[8],B=n[9],H=n[10],q=n[11],$=n[12],rt=n[13],xt=n[14];n=n[15];var gt=B*xt*A-rt*H*A+rt*w*q-y*xt*q-B*w*n+y*H*n,Ct=$*H*A-P*xt*A-$*w*q+p*xt*q+P*w*n-p*H*n,wt=P*rt*A-$*B*A+$*y*q-p*rt*q-P*y*n+p*B*n,Vt=$*B*w-P*rt*w-$*y*H+p*rt*H+P*y*xt-p*B*xt,J=t*gt+o*Ct+l*wt+f*Vt;if(J===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/J,i[0]=gt*e,i[1]=(rt*H*f-B*xt*f-rt*l*q+o*xt*q+B*l*n-o*H*n)*e,i[2]=(y*xt*f-rt*w*f+rt*l*A-o*xt*A-y*l*n+o*w*n)*e,i[3]=(B*w*f-y*H*f-B*l*A+o*H*A+y*l*q-o*w*q)*e,i[4]=Ct*e,i[5]=(P*xt*f-$*H*f+$*l*q-t*xt*q-P*l*n+t*H*n)*e,i[6]=($*w*f-p*xt*f-$*l*A+t*xt*A+p*l*n-t*w*n)*e,i[7]=(p*H*f-P*w*f+P*l*A-t*H*A-p*l*q+t*w*q)*e,i[8]=wt*e,i[9]=($*B*f-P*rt*f-$*o*q+t*rt*q+P*o*n-t*B*n)*e,i[10]=(p*rt*f-$*y*f+$*o*A-t*rt*A-p*o*n+t*y*n)*e,i[11]=(P*y*f-p*B*f-P*o*A+t*B*A+p*o*q-t*y*q)*e,i[12]=Vt*e,i[13]=(P*rt*l-$*B*l+$*o*H-t*rt*H-P*o*xt+t*B*xt)*e,i[14]=($*y*l-p*rt*l-$*o*w+t*rt*w+p*o*xt-t*y*xt)*e,i[15]=(p*B*l-P*y*l+P*o*w-t*B*w-p*o*H+t*y*H)*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,l=t.y;t=t.z;var f=n*o,p=n*l;return this.set(f*o+i,f*l-e*t,f*t+e*l,0,f*l+e*t,p*l+i,p*t-e*o,0,f*t-e*l,p*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,l=e._y,f=e._z,p=e._w,y=o+o,w=l+l,A=f+f;e=o*y;var P=o*w;o*=A;var B=l*w;l*=A,f*=A,y*=p,w*=p,p*=A,A=i.x;var H=i.y;return i=i.z,n[0]=(1-(B+f))*A,n[1]=(P+p)*A,n[2]=(o-w)*A,n[3]=0,n[4]=(P-p)*H,n[5]=(1-(e+f))*H,n[6]=(l+y)*H,n[7]=0,n[8]=(o+w)*i,n[9]=(l-y)*i,n[10]=(1-(e+B))*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 u,e=new c;return function(i,n,o){var l=this.elements,f=t.set(l[0],l[1],l[2]).length(),p=t.set(l[4],l[5],l[6]).length(),y=t.set(l[8],l[9],l[10]).length();0>this.determinant()&&(f=-f),i.x=l[12],i.y=l[13],i.z=l[14],e.copy(this),i=1/f,l=1/p;var w=1/y;return e.elements[0]*=i,e.elements[1]*=i,e.elements[2]*=i,e.elements[4]*=l,e.elements[5]*=l,e.elements[6]*=l,e.elements[8]*=w,e.elements[9]*=w,e.elements[10]*=w,n.setFromRotationMatrix(e),o.x=f,o.y=p,o.z=y,this}}(),makePerspective:function(t,e,i,n,o,l){l===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var f=this.elements;return f[0]=2*o/(e-t),f[4]=0,f[8]=(e+t)/(e-t),f[12]=0,f[1]=0,f[5]=2*o/(i-n),f[9]=(i+n)/(i-n),f[13]=0,f[2]=0,f[6]=0,f[10]=-(l+o)/(l-o),f[14]=-2*l*o/(l-o),f[3]=0,f[7]=0,f[11]=-1,f[15]=0,this},makeOrthographic:function(t,e,i,n,o,l){var f=this.elements,p=1/(e-t),y=1/(i-n),w=1/(l-o);return f[0]=2*p,f[4]=0,f[8]=0,f[12]=-((e+t)*p),f[1]=0,f[5]=2*y,f[9]=0,f[13]=-((i+n)*y),f[2]=0,f[6]=0,f[10]=-2*w,f[14]=-((l+o)*w),f[3]=0,f[7]=0,f[11]=0,f[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(d,{slerp:function(t,e,i,n){return i.copy(t).slerp(e,n)},slerpFlat:function(t,e,i,n,o,l,f){var p=i[n+0],y=i[n+1],w=i[n+2];i=i[n+3],n=o[l+0];var A=o[l+1],P=o[l+2];if(o=o[l+3],i!==o||p!==n||y!==A||w!==P){l=1-f;var B=p*n+y*A+w*P+i*o,H=0<=B?1:-1,q=1-B*B;q>Number.EPSILON&&(q=Math.sqrt(q),B=Math.atan2(q,B*H),l=Math.sin(l*B)/q,f=Math.sin(f*B)/q),H*=f,p=p*l+n*H,y=y*l+A*H,w=w*l+P*H,i=i*l+o*H,l===1-f&&(f=1/Math.sqrt(p*p+y*y+w*w+i*i),p*=f,y*=f,w*=f,i*=f)}t[e]=p,t[e+1]=y,t[e+2]=w,t[e+3]=i}}),Object.defineProperties(d.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(d.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 l=Math.cos,f=Math.sin,p=l(i/2),y=l(n/2);return l=l(o/2),i=f(i/2),n=f(n/2),o=f(o/2),t==="XYZ"?(this._x=i*y*l+p*n*o,this._y=p*n*l-i*y*o,this._z=p*y*o+i*n*l,this._w=p*y*l-i*n*o):t==="YXZ"?(this._x=i*y*l+p*n*o,this._y=p*n*l-i*y*o,this._z=p*y*o-i*n*l,this._w=p*y*l+i*n*o):t==="ZXY"?(this._x=i*y*l-p*n*o,this._y=p*n*l+i*y*o,this._z=p*y*o+i*n*l,this._w=p*y*l-i*n*o):t==="ZYX"?(this._x=i*y*l-p*n*o,this._y=p*n*l+i*y*o,this._z=p*y*o-i*n*l,this._w=p*y*l+i*n*o):t==="YZX"?(this._x=i*y*l+p*n*o,this._y=p*n*l+i*y*o,this._z=p*y*o-i*n*l,this._w=p*y*l-i*n*o):t==="XZY"&&(this._x=i*y*l-p*n*o,this._y=p*n*l-i*y*o,this._z=p*y*o+i*n*l,this._w=p*y*l+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],l=e[5],f=e[9],p=e[2],y=e[6];e=e[10];var w=i+l+e;return 0<w?(i=.5/Math.sqrt(w+1),this._w=.25/i,this._x=(y-f)*i,this._y=(n-p)*i,this._z=(o-t)*i):i>l&&i>e?(i=2*Math.sqrt(1+i-l-e),this._w=(y-f)/i,this._x=.25*i,this._y=(t+o)/i,this._z=(n+p)/i):l>e?(i=2*Math.sqrt(1+l-i-e),this._w=(n-p)/i,this._x=(t+o)/i,this._y=.25*i,this._z=(f+y)/i):(i=2*Math.sqrt(1+e-i-l),this._w=(o-t)/i,this._x=(n+p)/i,this._y=(f+y)/i,this._z=.25*i),this.onChangeCallback(),this},setFromUnitVectors:function(){var t=new u,e;return function(i,n){return t===void 0&&(t=new u),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(di.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 l=e._x,f=e._y,p=e._z;return e=e._w,this._x=i*e+t*l+n*p-o*f,this._y=n*e+t*f+o*l-i*p,this._z=o*e+t*p+i*f-n*l,this._w=t*e-i*l-n*f-o*p,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,l=this._w,f=l*t._w+i*t._x+n*t._y+o*t._z;if(0>f?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,f=-f):this.copy(t),1<=f)return this._w=l,this._x=i,this._y=n,this._z=o,this;if(t=1-f*f,t<=Number.EPSILON)return f=1-e,this._w=f*l+e*this._w,this._x=f*i+e*this._x,this._y=f*n+e*this._y,this._z=f*o+e*this._z,this.normalize();t=Math.sqrt(t);var p=Math.atan2(t,f);return f=Math.sin((1-e)*p)/t,e=Math.sin(e*p)/t,this._w=l*f+this._w*e,this._x=i*f+this._x*e,this._y=n*f+this._y*e,this._z=o*f+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(u.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 d;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 d;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,l=t.y,f=t.z;t=t.w;var p=t*e+l*n-f*i,y=t*i+f*e-o*n,w=t*n+o*i-l*e;return e=-o*e-l*i-f*n,this.x=p*t+e*-o+y*-f-w*-l,this.y=y*t+e*-l+w*-o-p*-f,this.z=w*t+e*-f+p*-l-y*-o,this},project:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)},unproject:function(){var t=new c;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 u,e=new u;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,l=e.y;return e=e.z,this.x=n*e-t*l,this.y=t*o-i*e,this.z=i*l-n*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new u;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new u;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(di.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(m.prototype,{isMatrix3:!0,set:function(t,e,i,n,o,l,f,p,y){var w=this.elements;return w[0]=t,w[1]=n,w[2]=f,w[3]=e,w[4]=o,w[5]=p,w[6]=i,w[7]=l,w[8]=y,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 u;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],l=i[6],f=i[1],p=i[4],y=i[7],w=i[2],A=i[5];i=i[8];var P=n[0],B=n[3],H=n[6],q=n[1],$=n[4],rt=n[7],xt=n[2],gt=n[5];return n=n[8],e[0]=t*P+o*q+l*xt,e[3]=t*B+o*$+l*gt,e[6]=t*H+o*rt+l*n,e[1]=f*P+p*q+y*xt,e[4]=f*B+p*$+y*gt,e[7]=f*H+p*rt+y*n,e[2]=w*P+A*q+i*xt,e[5]=w*B+A*$+i*gt,e[8]=w*H+A*rt+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],l=t[4],f=t[5],p=t[6],y=t[7];return t=t[8],e*l*t-e*f*y-i*o*t+i*f*p+n*o*y-n*l*p},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],l=i[2],f=i[3],p=i[4],y=i[5],w=i[6],A=i[7];i=i[8];var P=i*p-y*A,B=y*w-i*f,H=A*f-p*w,q=n*P+o*B+l*H;if(q===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/q,t[0]=P*e,t[1]=(l*A-i*o)*e,t[2]=(y*o-l*p)*e,t[3]=B*e,t[4]=(i*n-l*w)*e,t[5]=(l*f-y*n)*e,t[6]=H*e,t[7]=(o*w-A*n)*e,t[8]=(p*n-o*f)*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,l,f){var p=Math.cos(o);o=Math.sin(o),this.set(i*p,i*o,-i*(p*l+o*f)+l+t,-n*o,n*p,-n*(-o*l+p*f)+f+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],l=i[6],f=i[1],p=i[4],y=i[7];return i[0]=e*n+t*f,i[3]=e*o+t*p,i[6]=e*l+t*y,i[1]=-t*n+e*f,i[4]=-t*o+e*p,i[7]=-t*l+e*y,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 ss={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")}},Fs=0;g.DEFAULT_IMAGE=void 0,g.DEFAULT_MAPPING=300,g.prototype=Object.assign(Object.create(a.prototype),{constructor:g,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=di.generateUUID()),!e&&t.images[n.uuid]===void 0){if(Array.isArray(n))for(var o=[],l=0,f=n.length;l<f;l++)o.push(ss.getDataURL(n[l]));else o=ss.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(g.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(_.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],l=t[5],f=t[9],p=t[2],y=t[6],w=t[10];return .01>Math.abs(i-o)&&.01>Math.abs(n-p)&&.01>Math.abs(f-y)?.1>Math.abs(i+o)&&.1>Math.abs(n+p)&&.1>Math.abs(f+y)&&.1>Math.abs(e+l+w-3)?(this.set(1,0,0,0),this):(t=Math.PI,e=(e+1)/2,l=(l+1)/2,w=(w+1)/2,i=(i+o)/4,n=(n+p)/4,f=(f+y)/4,e>l&&e>w?.01>e?(y=0,i=p=.707106781):(y=Math.sqrt(e),p=i/y,i=n/y):l>w?.01>l?(y=.707106781,p=0,i=.707106781):(p=Math.sqrt(l),y=i/p,i=f/p):.01>w?(p=y=.707106781,i=0):(i=Math.sqrt(w),y=n/i,p=f/i),this.set(y,p,i,t),this):(t=Math.sqrt((y-f)*(y-f)+(n-p)*(n-p)+(o-i)*(o-i)),.001>Math.abs(t)&&(t=1),this.x=(y-f)/t,this.y=(n-p)/t,this.z=(o-i)/t,this.w=Math.acos((e+l+w-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 _,e=new _),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}}),S.prototype=Object.assign(Object.create(a.prototype),{constructor:S,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"})}}),b.prototype=Object.create(S.prototype),b.prototype.constructor=b,b.prototype.isWebGLRenderTargetCube=!0,I.prototype=Object.create(g.prototype),I.prototype.constructor=I,I.prototype.isDataTexture=!0,Object.assign(k.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,l=-1/0,f=-1/0,p=0,y=t.length;p<y;p+=3){var w=t[p],A=t[p+1],P=t[p+2];w<e&&(e=w),A<i&&(i=A),P<n&&(n=P),w>o&&(o=w),A>l&&(l=A),P>f&&(f=P)}return this.min.set(e,i,n),this.max.set(o,l,f),this},setFromBufferAttribute:function(t){for(var e=1/0,i=1/0,n=1/0,o=-1/0,l=-1/0,f=-1/0,p=0,y=t.count;p<y;p++){var w=t.getX(p),A=t.getY(p),P=t.getZ(p);w<e&&(e=w),A<i&&(i=A),P<n&&(n=P),w>o&&(o=w),A>l&&(l=A),P>f&&(f=P)}return this.min.set(e,i,n),this.max.set(o,l,f),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 u;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 u),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 u),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(l){var f=l.geometry;if(f!==void 0){if(f.isGeometry)for(f=f.vertices,i=0,n=f.length;i<n;i++)o.copy(f[i]),o.applyMatrix4(l.matrixWorld),e.expandByPoint(o);else if(f.isBufferGeometry&&(f=f.attributes.position,f!==void 0))for(i=0,n=f.count;i<n;i++)o.fromBufferAttribute(f,i).applyMatrix4(l.matrixWorld),e.expandByPoint(o)}}var e,i,n,o=new u;return function(l){return e=this,l.updateMatrixWorld(!0),l.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 u),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 u;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(P){var B,H=0;for(B=P.length-3;H<=B;H+=3){p.fromArray(P,H);var q=w.x*Math.abs(p.x)+w.y*Math.abs(p.y)+w.z*Math.abs(p.z),$=e.dot(p),rt=i.dot(p),xt=n.dot(p);if(Math.max(-Math.max($,rt,xt),Math.min($,rt,xt))>q)return!1}return!0}var e=new u,i=new u,n=new u,o=new u,l=new u,f=new u,p=new u,y=new u,w=new u,A=new u;return function(P){return this.isEmpty()||(this.getCenter(y),w.subVectors(this.max,y),e.subVectors(P.a,y),i.subVectors(P.b,y),n.subVectors(P.c,y),o.subVectors(i,e),l.subVectors(n,i),f.subVectors(e,n),P=[0,-o.z,o.y,0,-l.z,l.y,0,-f.z,f.y,o.z,0,-o.x,l.z,0,-l.x,f.z,0,-f.x,-o.y,o.x,0,-l.y,l.x,0,-f.y,f.x,0],!t(P))||(P=[1,0,0,0,1,0,0,0,1],!t(P))?!1:(A.crossVectors(o,l),P=[A.x,A.y,A.z],t(P))}}(),clampPoint:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new u),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new u;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new u;return function(e){return e===void 0&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new D),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 u,new u,new u,new u,new u,new u,new u,new u];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(D.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new k;return function(e,i){var n=this.center;i!==void 0?n.copy(i):t.setFromPoints(e).getCenter(n);for(var o=i=0,l=e.length;o<l;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 u),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 k),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(F.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 u,e=new u;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 u),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new u;return function(e,i){i===void 0&&(console.warn("THREE.Plane: .intersectLine() target is now required"),i=new u);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 u),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new u,e=new m;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(E.prototype,{set:function(t,e,i,n,o,l){var f=this.planes;return f[0].copy(t),f[1].copy(e),f[2].copy(i),f[3].copy(n),f[4].copy(o),f[5].copy(l),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],l=i[3],f=i[4],p=i[5],y=i[6],w=i[7],A=i[8],P=i[9],B=i[10],H=i[11],q=i[12],$=i[13],rt=i[14];return i=i[15],e[0].setComponents(l-t,w-f,H-A,i-q).normalize(),e[1].setComponents(l+t,w+f,H+A,i+q).normalize(),e[2].setComponents(l+n,w+p,H+P,i+$).normalize(),e[3].setComponents(l-n,w-p,H-P,i-$).normalize(),e[4].setComponents(l-o,w-y,H-B,i-rt).normalize(),e[5].setComponents(l+o,w+y,H+B,i+rt).normalize(),this},intersectsObject:function(){var t=new D;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 D;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 u;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 Ci={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,10 +2567,10 @@ void main() {
2567
2567
  #include <clipping_planes_vertex>
2568
2568
  #include <fog_vertex>
2569
2569
  }
2570
- `},Bn={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}},Qr={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(L.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=di.euclideanModulo(e,1),i=di.clamp(i,0,1),n=di.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(f){f!==void 0&&1>parseFloat(f)&&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,l=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(n,o,l)}}}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=Qr[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),l=Math.min(e,i,n),f,p=(l+o)/2;if(l===o)l=f=0;else{var y=o-l;switch(l=.5>=p?y/(o+l):y/(2-o-l),o){case e:f=(i-n)/y+(i<n?6:0);break;case i:f=(n-e)/y+2;break;case n:f=(e-i)/y+4}f/=6}return t.h=f,t.s=l,t.l=p,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=di.lerp(t.h,e.h,n);var o=di.lerp(t.s,e.s,n);return n=di.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 qe={common:{diffuse:{value:new L(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new m},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 s(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 L(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 L(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new m}},sprite:{diffuse:{value:new L(15658734)},opacity:{value:1},center:{value:new s(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new m}}},wo={basic:{uniforms:Bn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.fog]),vertexShader:Ci.meshbasic_vert,fragmentShader:Ci.meshbasic_frag},lambert:{uniforms:Bn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.fog,qe.lights,{emissive:{value:new L(0)}}]),vertexShader:Ci.meshlambert_vert,fragmentShader:Ci.meshlambert_frag},phong:{uniforms:Bn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.gradientmap,qe.fog,qe.lights,{emissive:{value:new L(0)},specular:{value:new L(1118481)},shininess:{value:30}}]),vertexShader:Ci.meshphong_vert,fragmentShader:Ci.meshphong_frag},standard:{uniforms:Bn.merge([qe.common,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.roughnessmap,qe.metalnessmap,qe.fog,qe.lights,{emissive:{value:new L(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Ci.meshphysical_vert,fragmentShader:Ci.meshphysical_frag},matcap:{uniforms:Bn.merge([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.fog,{matcap:{value:null}}]),vertexShader:Ci.meshmatcap_vert,fragmentShader:Ci.meshmatcap_frag},points:{uniforms:Bn.merge([qe.points,qe.fog]),vertexShader:Ci.points_vert,fragmentShader:Ci.points_frag},dashed:{uniforms:Bn.merge([qe.common,qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ci.linedashed_vert,fragmentShader:Ci.linedashed_frag},depth:{uniforms:Bn.merge([qe.common,qe.displacementmap]),vertexShader:Ci.depth_vert,fragmentShader:Ci.depth_frag},normal:{uniforms:Bn.merge([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,{opacity:{value:1}}]),vertexShader:Ci.normal_vert,fragmentShader:Ci.normal_frag},sprite:{uniforms:Bn.merge([qe.sprite,qe.fog]),vertexShader:Ci.sprite_vert,fragmentShader:Ci.sprite_frag},background:{uniforms:{uvTransform:{value:new m},t2D:{value:null}},vertexShader:Ci.background_vert,fragmentShader:Ci.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ci.cube_vert,fragmentShader:Ci.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ci.equirect_vert,fragmentShader:Ci.equirect_frag},distanceRGBA:{uniforms:Bn.merge([qe.common,qe.displacementmap,{referencePosition:{value:new u},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ci.distanceRGBA_vert,fragmentShader:Ci.distanceRGBA_frag},shadow:{uniforms:Bn.merge([qe.lights,qe.fog,{color:{value:new L(0)},opacity:{value:1}}]),vertexShader:Ci.shadow_vert,fragmentShader:Ci.shadow_frag}};wo.physical={uniforms:Bn.merge([wo.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:Ci.meshphysical_vert,fragmentShader:Ci.meshphysical_frag},Object.assign(R.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}}),C.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),C.DefaultOrder="XYZ",Object.defineProperties(C.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(C.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=di.clamp,o=t.elements;t=o[0];var l=o[4],f=o[8],p=o[1],y=o[5],w=o[9],A=o[2],P=o[6];return o=o[10],e=e||this._order,e==="XYZ"?(this._y=Math.asin(n(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(-w,o),this._z=Math.atan2(-l,t)):(this._x=Math.atan2(P,y),this._z=0)):e==="YXZ"?(this._x=Math.asin(-n(w,-1,1)),.99999>Math.abs(w)?(this._y=Math.atan2(f,o),this._z=Math.atan2(p,y)):(this._y=Math.atan2(-A,t),this._z=0)):e==="ZXY"?(this._x=Math.asin(n(P,-1,1)),.99999>Math.abs(P)?(this._y=Math.atan2(-A,o),this._z=Math.atan2(-l,y)):(this._y=0,this._z=Math.atan2(p,t))):e==="ZYX"?(this._y=Math.asin(-n(A,-1,1)),.99999>Math.abs(A)?(this._x=Math.atan2(P,o),this._z=Math.atan2(p,t)):(this._x=0,this._z=Math.atan2(-l,y))):e==="YZX"?(this._z=Math.asin(n(p,-1,1)),.99999>Math.abs(p)?(this._x=Math.atan2(-w,y),this._y=Math.atan2(-A,t)):(this._x=0,this._y=Math.atan2(f,o))):e==="XZY"?(this._z=Math.asin(-n(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(P,y),this._y=Math.atan2(f,t)):(this._x=Math.atan2(-w,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 c;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 d;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 u(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(U.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 qc=0;N.DefaultUp=new u(0,1,0),N.DefaultMatrixAutoUpdate=!0,N.prototype=Object.assign(Object.create(a.prototype),{constructor:N,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 d;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new d;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new u(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new u(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new u(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new u;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new u(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new u(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new u(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new c;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new d,e=new c,i=new u,n=new u;return function(o,l,f){o.isVector3?i.copy(o):i.set(o,l,f),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 u),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new u,e=new u;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),i=new d),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,e),i}}(),getWorldScale:function(){var t=new u,e=new d;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),i=new u),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 u),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(A,P){return A[P.uuid]===void 0&&(A[P.uuid]=P.toJSON(t)),P.uuid}function i(A){var P=[],B;for(B in A){var H=A[B];delete H.metadata,P.push(H)}return P}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 l={};if(l.uuid=this.uuid,l.type=this.type,this.name!==""&&(l.name=this.name),this.castShadow===!0&&(l.castShadow=!0),this.receiveShadow===!0&&(l.receiveShadow=!0),this.visible===!1&&(l.visible=!1),this.frustumCulled===!1&&(l.frustumCulled=!1),this.renderOrder!==0&&(l.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(l.userData=this.userData),l.layers=this.layers.mask,l.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(l.matrixAutoUpdate=!1),this.isMesh||this.isLine||this.isPoints){l.geometry=e(t.geometries,this.geometry);var f=this.geometry.parameters;if(f!==void 0&&f.shapes!==void 0)if(f=f.shapes,Array.isArray(f))for(var p=0,y=f.length;p<y;p++)e(t.shapes,f[p]);else e(t.shapes,f)}if(this.material!==void 0)if(Array.isArray(this.material)){for(f=[],p=0,y=this.material.length;p<y;p++)f.push(e(t.materials,this.material[p]));l.material=f}else l.material=e(t.materials,this.material);if(0<this.children.length)for(l.children=[],p=0;p<this.children.length;p++)l.children.push(this.children[p].toJSON(t).object);if(n){n=i(t.geometries),p=i(t.materials),y=i(t.textures);var w=i(t.images);f=i(t.shapes),0<n.length&&(o.geometries=n),0<p.length&&(o.materials=p),0<y.length&&(o.textures=y),0<w.length&&(o.images=w),0<f.length&&(o.shapes=f)}return o.object=l,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 Yc=0;X.prototype=Object.assign(Object.create(a.prototype),{constructor:X,isGeometry:!0,applyMatrix:function(t){for(var e=new m().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,l=t.vertexNormals.length;o<l;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 c;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new c;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new c;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new c;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new c;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new N;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(q,$,rt,xt){var gt=p===void 0?[]:[i.colors[q].clone(),i.colors[$].clone(),i.colors[rt].clone()],Ct=f===void 0?[]:[new u().fromArray(f,3*q),new u().fromArray(f,3*$),new u().fromArray(f,3*rt)];xt=new R(q,$,rt,Ct,gt,xt),i.faces.push(xt),y!==void 0&&i.faceVertexUvs[0].push([new s().fromArray(y,2*q),new s().fromArray(y,2*$),new s().fromArray(y,2*rt)]),w!==void 0&&i.faceVertexUvs[1].push([new s().fromArray(w,2*q),new s().fromArray(w,2*$),new s().fromArray(w,2*rt)])}var i=this,n=t.index!==null?t.index.array:void 0,o=t.attributes,l=o.position.array,f=o.normal!==void 0?o.normal.array:void 0,p=o.color!==void 0?o.color.array:void 0,y=o.uv!==void 0?o.uv.array:void 0,w=o.uv2!==void 0?o.uv2.array:void 0;w!==void 0&&(this.faceVertexUvs[1]=[]);for(var A=o=0;o<l.length;o+=3,A+=2)i.vertices.push(new u().fromArray(l,o)),p!==void 0&&i.colors.push(new L().fromArray(p,o));var P=t.groups;if(0<P.length)for(o=0;o<P.length;o++){l=P[o];var B=l.start,H=l.count;for(A=B,B+=H;A<B;A+=3)n!==void 0?e(n[A],n[A+1],n[A+2],l.materialIndex):e(A,A+1,A+2,l.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<l.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 u;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 c;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 u,e=new u,i=0,n=this.faces.length;i<n;i++){var o=this.faces[i],l=this.vertices[o.a],f=this.vertices[o.b];t.subVectors(this.vertices[o.c],f),e.subVectors(l,f),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 u;if(t){var o=new u,l=new u;for(t=0,n=this.faces.length;t<n;t++){e=this.faces[t];var f=this.vertices[e.a],p=this.vertices[e.b],y=this.vertices[e.c];o.subVectors(y,p),l.subVectors(f,p),o.cross(l),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],f=e.vertexNormals,f.length===3?(f[0].copy(i[e.a]),f[1].copy(i[e.b]),f[2].copy(i[e.c])):(f[0]=i[e.a].clone(),f[1]=i[e.b].clone(),f[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 l=new X;for(l.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 f=this.morphNormals[o].vertexNormals;for(i=0,e=this.faces.length;i<e;i++){var p=new u,y={a:new u,b:new u,c:new u};n.push(p),f.push(y)}}for(f=this.morphNormals[o],l.vertices=this.morphTargets[o].vertices,l.computeFaceNormals(),l.computeVertexNormals(),i=0,e=this.faces.length;i<e;i++)n=this.faces[i],p=f.faceNormals[i],y=f.vertexNormals[i],p.copy(n.normal),y.a.copy(n.vertexNormals[0]),y.b.copy(n.vertexNormals[1]),y.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 k),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new D),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,o=this.vertices.length,l=this.vertices,f=t.vertices,p=this.faces,y=t.faces,w=this.faceVertexUvs[0],A=t.faceVertexUvs[0],P=this.colors,B=t.colors;i===void 0&&(i=0),e!==void 0&&(n=new m().getNormalMatrix(e)),t=0;for(var H=f.length;t<H;t++){var q=f[t].clone();e!==void 0&&q.applyMatrix4(e),l.push(q)}for(t=0,H=B.length;t<H;t++)P.push(B[t].clone());for(t=0,H=y.length;t<H;t++){f=y[t];var $=f.vertexNormals;for(B=f.vertexColors,P=new R(f.a+o,f.b+o,f.c+o),P.normal.copy(f.normal),n!==void 0&&P.normal.applyMatrix3(n).normalize(),e=0,l=$.length;e<l;e++)q=$[e].clone(),n!==void 0&&q.applyMatrix3(n).normalize(),P.vertexNormals.push(q);for(P.color.copy(f.color),e=0,l=B.length;e<l;e++)q=B[e],P.vertexColors.push(q.clone());P.materialIndex=f.materialIndex+i,p.push(P)}for(t=0,H=A.length;t<H;t++)if(i=A[t],n=[],i!==void 0){for(e=0,l=i.length;e<l;e++)n.push(i[e].clone());w.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,l=0;for(o=this.vertices.length;l<o;l++){var f=this.vertices[l];f=Math.round(f.x*n)+"_"+Math.round(f.y*n)+"_"+Math.round(f.z*n),t[f]===void 0?(t[f]=l,e.push(this.vertices[l]),i[l]=e.length-1):i[l]=i[t[f]]}for(t=[],l=0,o=this.faces.length;l<o;l++)for(n=this.faces[l],n.a=i[n.a],n.b=i[n.b],n.c=i[n.c],n=[n.a,n.b,n.c],f=0;3>f;f++)if(n[f]===n[(f+1)%3]){t.push(l);break}for(l=t.length-1;0<=l;l--)for(n=t[l],this.faces.splice(n,1),i=0,o=this.faceVertexUvs.length;i<o;i++)this.faceVertexUvs[i].splice(n,1);return l=this.vertices.length-e.length,this.vertices=e,l},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new u(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(y,w){return y.materialIndex-w.materialIndex});var n=this.faceVertexUvs[0],o=this.faceVertexUvs[1],l,f;for(n&&n.length===e&&(l=[]),o&&o.length===e&&(f=[]),i=0;i<e;i++){var p=t[i]._id;l&&l.push(n[p]),f&&f.push(o[p])}l&&(this.faceVertexUvs[0]=l),f&&(this.faceVertexUvs[1]=f)},toJSON:function(){function t(Vt,J,ot){return ot?Vt|1<<J:Vt&~(1<<J)}function e(Vt){var J=Vt.x.toString()+Vt.y.toString()+Vt.z.toString();return w[J]!==void 0||(w[J]=y.length/3,y.push(Vt.x,Vt.y,Vt.z)),w[J]}function i(Vt){var J=Vt.r.toString()+Vt.g.toString()+Vt.b.toString();return P[J]!==void 0||(P[J]=A.length,A.push(Vt.getHex())),P[J]}function n(Vt){var J=Vt.x.toString()+Vt.y.toString();return H[J]!==void 0||(H[J]=B.length/2,B.push(Vt.x,Vt.y)),H[J]}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 l=this.parameters,f;for(f in l)l[f]!==void 0&&(o[f]=l[f]);return o}for(l=[],f=0;f<this.vertices.length;f++){var p=this.vertices[f];l.push(p.x,p.y,p.z)}p=[];var y=[],w={},A=[],P={},B=[],H={};for(f=0;f<this.faces.length;f++){var q=this.faces[f],$=this.faceVertexUvs[0][f]!==void 0,rt=0<q.normal.length(),xt=0<q.vertexNormals.length,gt=q.color.r!==1||q.color.g!==1||q.color.b!==1,Ct=0<q.vertexColors.length,wt=0;wt=t(wt,0,0),wt=t(wt,1,!0),wt=t(wt,2,!1),wt=t(wt,3,$),wt=t(wt,4,rt),wt=t(wt,5,xt),wt=t(wt,6,gt),wt=t(wt,7,Ct),p.push(wt),p.push(q.a,q.b,q.c),p.push(q.materialIndex),$&&($=this.faceVertexUvs[0][f],p.push(n($[0]),n($[1]),n($[2]))),rt&&p.push(e(q.normal)),xt&&(rt=q.vertexNormals,p.push(e(rt[0]),e(rt[1]),e(rt[2]))),gt&&p.push(i(q.color)),Ct&&(q=q.vertexColors,p.push(i(q[0]),i(q[1]),i(q[2])))}return o.data={},o.data.vertices=l,o.data.normals=y,0<A.length&&(o.data.colors=A),0<B.length&&(o.data.uvs=[B]),o.data.faces=p,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,l=0;for(e=o.length;l<e;l++)this.vertices.push(o[l].clone());for(o=t.colors,l=0,e=o.length;l<e;l++)this.colors.push(o[l].clone());for(o=t.faces,l=0,e=o.length;l<e;l++)this.faces.push(o[l].clone());for(l=0,e=t.faceVertexUvs.length;l<e;l++){var f=t.faceVertexUvs[l];for(this.faceVertexUvs[l]===void 0&&(this.faceVertexUvs[l]=[]),o=0,i=f.length;o<i;o++){var p=f[o],y=[],w=0;for(n=p.length;w<n;w++)y.push(p[w].clone());this.faceVertexUvs[l].push(y)}}for(w=t.morphTargets,l=0,e=w.length;l<e;l++){if(n={},n.name=w[l].name,w[l].vertices!==void 0)for(n.vertices=[],o=0,i=w[l].vertices.length;o<i;o++)n.vertices.push(w[l].vertices[o].clone());if(w[l].normals!==void 0)for(n.normals=[],o=0,i=w[l].normals.length;o<i;o++)n.normals.push(w[l].normals[o].clone());this.morphTargets.push(n)}for(w=t.morphNormals,l=0,e=w.length;l<e;l++){if(n={},w[l].vertexNormals!==void 0)for(n.vertexNormals=[],o=0,i=w[l].vertexNormals.length;o<i;o++)f=w[l].vertexNormals[o],p={},p.a=f.a.clone(),p.b=f.b.clone(),p.c=f.c.clone(),n.vertexNormals.push(p);if(w[l].faceNormals!==void 0)for(n.faceNormals=[],o=0,i=w[l].faceNormals.length;o<i;o++)n.faceNormals.push(w[l].faceNormals[o].clone());this.morphNormals.push(n)}for(o=t.skinWeights,l=0,e=o.length;l<e;l++)this.skinWeights.push(o[l].clone());for(o=t.skinIndices,l=0,e=o.length;l<e;l++)this.skinIndices.push(o[l].clone());for(o=t.lineDistances,l=0,e=o.length;l<e;l++)this.lineDistances.push(o[l]);return l=t.boundingBox,l!==null&&(this.boundingBox=l.clone()),l=t.boundingSphere,l!==null&&(this.boundingSphere=l.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(K.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(K.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 l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),l=new L),e[i++]=l.r,e[i++]=l.g,e[i++]=l.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),l=new s),e[i++]=l.x,e[i++]=l.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),l=new u),e[i++]=l.x,e[i++]=l.y,e[i++]=l.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),l=new _),e[i++]=l.x,e[i++]=l.y,e[i++]=l.z,e[i++]=l.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)}}),Z.prototype=Object.create(K.prototype),Z.prototype.constructor=Z,ct.prototype=Object.create(K.prototype),ct.prototype.constructor=ct,Rt.prototype=Object.create(K.prototype),Rt.prototype.constructor=Rt,et.prototype=Object.create(K.prototype),et.prototype.constructor=et,_t.prototype=Object.create(K.prototype),_t.prototype.constructor=_t,G.prototype=Object.create(K.prototype),G.prototype.constructor=G,Pt.prototype=Object.create(K.prototype),Pt.prototype.constructor=Pt,Et.prototype=Object.create(K.prototype),Et.prototype.constructor=Et,At.prototype=Object.create(K.prototype),At.prototype.constructor=At,Object.assign(ce.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,l!==void 0&&(l.count=3*n-l.start,e.push(l));var l={start:3*n,materialIndex:i}}}l!==void 0&&(l.count=3*n-l.start,e.push(l)),this.groups=e},fromGeometry:function(t){var e=t.faces,i=t.vertices,n=t.faceVertexUvs,o=n[0]&&0<n[0].length,l=n[1]&&0<n[1].length,f=t.morphTargets,p=f.length;if(0<p){for(var y=[],w=0;w<p;w++)y[w]={name:f[w].name,data:[]};this.morphTargets.position=y}var A=t.morphNormals,P=A.length;if(0<P){var B=[];for(w=0;w<P;w++)B[w]={name:A[w].name,data:[]};this.morphTargets.normal=B}var H=t.skinIndices,q=t.skinWeights,$=H.length===i.length,rt=q.length===i.length;for(0<i.length&&e.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),w=0;w<e.length;w++){var xt=e[w];this.vertices.push(i[xt.a],i[xt.b],i[xt.c]);var gt=xt.vertexNormals;for(gt.length===3?this.normals.push(gt[0],gt[1],gt[2]):(gt=xt.normal,this.normals.push(gt,gt,gt)),gt=xt.vertexColors,gt.length===3?this.colors.push(gt[0],gt[1],gt[2]):(gt=xt.color,this.colors.push(gt,gt,gt)),o===!0&&(gt=n[0][w],gt!==void 0?this.uvs.push(gt[0],gt[1],gt[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",w),this.uvs.push(new s,new s,new s))),l===!0&&(gt=n[1][w],gt!==void 0?this.uvs2.push(gt[0],gt[1],gt[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",w),this.uvs2.push(new s,new s,new s))),gt=0;gt<p;gt++){var Ct=f[gt].vertices;y[gt].data.push(Ct[xt.a],Ct[xt.b],Ct[xt.c])}for(gt=0;gt<P;gt++)Ct=A[gt].vertexNormals[w],B[gt].data.push(Ct.a,Ct.b,Ct.c);$&&this.skinIndices.push(H[xt.a],H[xt.b],H[xt.c]),rt&&this.skinWeights.push(q[xt.a],q[xt.b],q[xt.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 Zc=1;Ft.prototype=Object.assign(Object.create(a.prototype),{constructor:Ft,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(65535<re(t)?Pt:_t)(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 K(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 m().getNormalMatrix(t).applyToBufferAttribute(e),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},rotateX:function(){var t=new c;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new c;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new c;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new c;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new c;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new N;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new u;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 ce().fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);this.addAttribute("position",new K(e,3).copyVector3sArray(t.vertices)),0<t.normals.length&&(e=new Float32Array(3*t.normals.length),this.addAttribute("normal",new K(e,3).copyVector3sArray(t.normals))),0<t.colors.length&&(e=new Float32Array(3*t.colors.length),this.addAttribute("color",new K(e,3).copyColorsArray(t.colors))),0<t.uvs.length&&(e=new Float32Array(2*t.uvs.length),this.addAttribute("uv",new K(e,2).copyVector2sArray(t.uvs))),0<t.uvs2.length&&(e=new Float32Array(2*t.uvs2.length),this.addAttribute("uv2",new K(e,2).copyVector2sArray(t.uvs2))),this.groups=t.groups;for(var i in t.morphTargets){e=[];for(var n=t.morphTargets[i],o=0,l=n.length;o<l;o++){var f=n[o],p=new Et(3*f.data.length,3);p.name=f.name,e.push(p.copyVector3sArray(f.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 k);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 k,e=new u;return function(){this.boundingSphere===null&&(this.boundingSphere=new D);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var o=0,l=0,f=i.count;l<f;l++)e.x=i.getX(l),e.y=i.getY(l),e.z=i.getZ(l),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 K(new Float32Array(i.length),3));else for(var n=e.normal.array,o=0,l=n.length;o<l;o++)n[o]=0;n=e.normal.array;var f=new u,p=new u,y=new u,w=new u,A=new u;if(t){var P=t.array;for(o=0,l=t.count;o<l;o+=3){t=3*P[o+0];var B=3*P[o+1],H=3*P[o+2];f.fromArray(i,t),p.fromArray(i,B),y.fromArray(i,H),w.subVectors(y,p),A.subVectors(f,p),w.cross(A),n[t]+=w.x,n[t+1]+=w.y,n[t+2]+=w.z,n[B]+=w.x,n[B+1]+=w.y,n[B+2]+=w.z,n[H]+=w.x,n[H+1]+=w.y,n[H+2]+=w.z}}else for(o=0,l=i.length;o<l;o+=9)f.fromArray(i,o),p.fromArray(i,o+3),y.fromArray(i,o+6),w.subVectors(y,p),A.subVectors(f,p),w.cross(A),n[o]=w.x,n[o+1]=w.y,n[o+2]=w.z,n[o+3]=w.x,n[o+4]=w.y,n[o+5]=w.z,n[o+6]=w.x,n[o+7]=w.y,n[o+8]=w.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,l=t.attributes[n],f=l.array,p=0;for(l=l.itemSize*e;p<f.length;p++,l++)o[l]=f[p]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new u;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 Ft,e=this.index.array,i=this.attributes,n;for(n in i){var o=i[n],l=o.array,f=o.itemSize,p=new l.constructor(e.length*f),y=0;o=0;for(var w=e.length;o<w;o++)for(var A=e[o]*f,P=0;P<f;P++)p[y++]=l[A++];t.addAttribute(n,new K(p,f))}for(e=this.groups,o=0,w=e.length;o<w;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 Ft().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(f in i)this.addAttribute(f,i[f].clone());var n=t.morphAttributes;for(f in n){var o=[],l=n[f];for(i=0,e=l.length;i<e;i++)o.push(l[i].clone());this.morphAttributes[f]=o}var f=t.groups;for(i=0,e=f.length;i<e;i++)n=f[i],this.addGroup(n.start,n.count,n.materialIndex);return f=t.boundingBox,f!==null&&(this.boundingBox=f.clone()),f=t.boundingSphere,f!==null&&(this.boundingSphere=f.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),It.prototype=Object.create(X.prototype),It.prototype.constructor=It,Nt.prototype=Object.create(Ft.prototype),Nt.prototype.constructor=Nt,Pe.prototype=Object.create(X.prototype),Pe.prototype.constructor=Pe,pe.prototype=Object.create(Ft.prototype),pe.prototype.constructor=pe;var zu=0;Wt.prototype=Object.assign(Object.create(a.prototype),{constructor:Wt,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 l=[],f;for(f in o){var p=o[f];delete p.metadata,l.push(p)}return l}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"})}}),$e.prototype=Object.create(Wt.prototype),$e.prototype.constructor=$e,$e.prototype.isShaderMaterial=!0,$e.prototype.copy=function(t){return Wt.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Bn.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},$e.prototype.toJSON=function(t){var e=Wt.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(Si.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 u),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 u;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 u),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 u;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 u,e=new u,i=new u;return function(n,o,l,f){t.copy(n).add(o).multiplyScalar(.5),e.copy(o).sub(n).normalize(),i.copy(this.origin).sub(t);var p=.5*n.distanceTo(o),y=-this.direction.dot(e),w=i.dot(this.direction),A=-i.dot(e),P=i.lengthSq(),B=Math.abs(1-y*y);if(0<B){n=y*A-w,o=y*w-A;var H=p*B;0<=n?o>=-H?o<=H?(p=1/B,n*=p,o*=p,y=n*(n+y*o+2*w)+o*(y*n+o+2*A)+P):(o=p,n=Math.max(0,-(y*o+w)),y=-n*n+o*(o+2*A)+P):(o=-p,n=Math.max(0,-(y*o+w)),y=-n*n+o*(o+2*A)+P):o<=-H?(n=Math.max(0,-(-y*p+w)),o=0<n?-p:Math.min(Math.max(-p,-A),p),y=-n*n+o*(o+2*A)+P):o<=H?(n=0,o=Math.min(Math.max(-p,-A),p),y=o*(o+2*A)+P):(n=Math.max(0,-(y*p+w)),o=0<n?p:Math.min(Math.max(-p,-A),p),y=-n*n+o*(o+2*A)+P)}else o=0<y?-p:p,n=Math.max(0,-(y*o+w)),y=-n*n+o*(o+2*A)+P;return l&&l.copy(this.direction).multiplyScalar(n).add(this.origin),f&&f.copy(e).multiplyScalar(o).add(t),y}}(),intersectSphere:function(){var t=new u;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,l=this.origin;if(0<=i){var f=(t.min.x-l.x)*i;i*=t.max.x-l.x}else f=(t.max.x-l.x)*i,i*=t.min.x-l.x;if(0<=n){var p=(t.min.y-l.y)*n;n*=t.max.y-l.y}else p=(t.max.y-l.y)*n,n*=t.min.y-l.y;return f>n||p>i||((p>f||f!==f)&&(f=p),(n<i||i!==i)&&(i=n),0<=o?(p=(t.min.z-l.z)*o,t=(t.max.z-l.z)*o):(p=(t.max.z-l.z)*o,t=(t.min.z-l.z)*o),f>t||p>i)?null:((p>f||f!==f)&&(f=p),(t<i||i!==i)&&(i=t),0>i?null:this.at(0<=f?f:i,e))},intersectsBox:function(){var t=new u;return function(e){return this.intersectBox(e,t)!==null}}(),intersectTriangle:function(){var t=new u,e=new u,i=new u,n=new u;return function(o,l,f,p,y){if(e.subVectors(l,o),i.subVectors(f,o),n.crossVectors(e,i),l=this.direction.dot(n),0<l){if(p)return null;p=1}else if(0>l)p=-1,l=-l;else return null;return t.subVectors(this.origin,o),o=p*this.direction.dot(i.crossVectors(t,i)),0>o||(f=p*this.direction.dot(e.cross(t)),0>f||o+f>l)?null:(o=-p*t.dot(n),0>o?null:this.at(o/l,y))}}(),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(Oe,{getNormal:function(){var t=new u;return function(e,i,n,o){return o===void 0&&(console.warn("THREE.Triangle: .getNormal() target is now required"),o=new u),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 u,e=new u,i=new u;return function(n,o,l,f,p){t.subVectors(f,o),e.subVectors(l,o),i.subVectors(n,o),n=t.dot(t),o=t.dot(e),l=t.dot(i);var y=e.dot(e);f=e.dot(i);var w=n*y-o*o;return p===void 0&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),p=new u),w===0?p.set(-2,-1,-1):(w=1/w,y=(y*l-o*f)*w,n=(n*f-o*l)*w,p.set(1-y-n,n,y))}}(),containsPoint:function(){var t=new u;return function(e,i,n,o){return Oe.getBarycoord(e,i,n,o,t),0<=t.x&&0<=t.y&&1>=t.x+t.y}}(),getUV:function(){var t=new u;return function(e,i,n,o,l,f,p,y){return this.getBarycoord(e,i,n,o,t),y.set(0,0),y.addScaledVector(l,t.x),y.addScaledVector(f,t.y),y.addScaledVector(p,t.z),y}}()}),Object.assign(Oe.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 u,e=new u;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 u),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return Oe.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 u),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return Oe.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return Oe.containsPoint(t,this.a,this.b,this.c)},getUV:function(t,e,i,n,o){return Oe.getUV(t,this.a,this.b,this.c,e,i,n,o)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new u,e=new u,i=new u,n=new u,o=new u,l=new u;return function(f,p){p===void 0&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),p=new u);var y=this.a,w=this.b,A=this.c;t.subVectors(w,y),e.subVectors(A,y),n.subVectors(f,y);var P=t.dot(n),B=e.dot(n);if(0>=P&&0>=B)return p.copy(y);o.subVectors(f,w);var H=t.dot(o),q=e.dot(o);if(0<=H&&q<=H)return p.copy(w);var $=P*q-H*B;if(0>=$&&0<=P&&0>=H)return w=P/(P-H),p.copy(y).addScaledVector(t,w);l.subVectors(f,A),f=t.dot(l);var rt=e.dot(l);return 0<=rt&&f<=rt?p.copy(A):(P=f*B-P*rt,0>=P&&0<=B&&0>=rt?($=B/(B-rt),p.copy(y).addScaledVector(e,$)):(B=H*rt-f*q,0>=B&&0<=q-H&&0<=f-rt?(i.subVectors(A,w),$=(q-H)/(q-H+(f-rt)),p.copy(w).addScaledVector(i,$)):(A=1/(B+P+$),w=P*A,$*=A,p.copy(y).addScaledVector(t,w).addScaledVector(e,$))))}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Ge.prototype=Object.create(Wt.prototype),Ge.prototype.constructor=Ge,Ge.prototype.isMeshBasicMaterial=!0,Ge.prototype.copy=function(t){return Wt.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},pi.prototype=Object.assign(Object.create(N.prototype),{constructor:pi,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return N.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(rt,xt,gt,Ct,wt,Vt,J,ot){return(xt.side===1?Ct.intersectTriangle(J,Vt,wt,!0,ot):Ct.intersectTriangle(wt,Vt,J,xt.side!==2,ot))===null?null:($.copy(ot),$.applyMatrix4(rt.matrixWorld),xt=gt.ray.origin.distanceTo($),xt<gt.near||xt>gt.far?null:{distance:xt,point:$.clone(),object:rt})}function e(rt,xt,gt,Ct,wt,Vt,J,ot,zt){return l.fromBufferAttribute(wt,J),f.fromBufferAttribute(wt,ot),p.fromBufferAttribute(wt,zt),(rt=t(rt,xt,gt,Ct,l,f,p,q))&&(Vt&&(P.fromBufferAttribute(Vt,J),B.fromBufferAttribute(Vt,ot),H.fromBufferAttribute(Vt,zt),rt.uv=Oe.getUV(q,l,f,p,P,B,H,new s)),Vt=new R(J,ot,zt),Oe.getNormal(l,f,p,Vt.normal),rt.face=Vt),rt}var i=new c,n=new Si,o=new D,l=new u,f=new u,p=new u,y=new u,w=new u,A=new u,P=new s,B=new s,H=new s,q=new u,$=new u;return function(rt,xt){var gt=this.geometry,Ct=this.material,wt=this.matrixWorld;if(Ct!==void 0&&(gt.boundingSphere===null&&gt.computeBoundingSphere(),o.copy(gt.boundingSphere),o.applyMatrix4(wt),rt.ray.intersectsSphere(o)!==!1&&(i.getInverse(wt),n.copy(rt.ray).applyMatrix4(i),gt.boundingBox===null||n.intersectsBox(gt.boundingBox)!==!1))){if(gt.isBufferGeometry){var Vt=gt.index,J=gt.attributes.position,ot=gt.attributes.uv,zt=gt.groups;gt=gt.drawRange;var ee;if(Vt!==null)if(Array.isArray(Ct)){var $t=0;for(ee=zt.length;$t<ee;$t++){var Yt=zt[$t],Te=Ct[Yt.materialIndex];wt=Math.max(Yt.start,gt.start);var me=Math.min(Yt.start+Yt.count,gt.start+gt.count);for(Yt=wt;Yt<me;Yt+=3){wt=Vt.getX(Yt);var De=Vt.getX(Yt+1),be=Vt.getX(Yt+2);(wt=e(this,Te,rt,n,J,ot,wt,De,be))&&(wt.faceIndex=Math.floor(Yt/3),xt.push(wt))}}}else for(wt=Math.max(0,gt.start),me=Math.min(Vt.count,gt.start+gt.count),$t=wt,ee=me;$t<ee;$t+=3)wt=Vt.getX($t),De=Vt.getX($t+1),be=Vt.getX($t+2),(wt=e(this,Ct,rt,n,J,ot,wt,De,be))&&(wt.faceIndex=Math.floor($t/3),xt.push(wt));else if(J!==void 0)if(Array.isArray(Ct))for($t=0,ee=zt.length;$t<ee;$t++)for(Yt=zt[$t],Te=Ct[Yt.materialIndex],wt=Math.max(Yt.start,gt.start),me=Math.min(Yt.start+Yt.count,gt.start+gt.count),Yt=wt;Yt<me;Yt+=3)wt=Yt,De=Yt+1,be=Yt+2,(wt=e(this,Te,rt,n,J,ot,wt,De,be))&&(wt.faceIndex=Math.floor(Yt/3),xt.push(wt));else for(wt=Math.max(0,gt.start),me=Math.min(J.count,gt.start+gt.count),$t=wt,ee=me;$t<ee;$t+=3)wt=$t,De=$t+1,be=$t+2,(wt=e(this,Ct,rt,n,J,ot,wt,De,be))&&(wt.faceIndex=Math.floor($t/3),xt.push(wt))}else if(gt.isGeometry){for(J=Array.isArray(Ct),ot=gt.vertices,zt=gt.faces,wt=gt.faceVertexUvs[0],0<wt.length&&(Vt=wt),Yt=0,me=zt.length;Yt<me;Yt++)if(De=zt[Yt],wt=J?Ct[De.materialIndex]:Ct,wt!==void 0){if($t=ot[De.a],ee=ot[De.b],Te=ot[De.c],wt.morphTargets===!0){be=gt.morphTargets;var ae=this.morphTargetInfluences;l.set(0,0,0),f.set(0,0,0),p.set(0,0,0);for(var We=0,Qe=be.length;We<Qe;We++){var fi=ae[We];if(fi!==0){var Cn=be[We].vertices;l.addScaledVector(y.subVectors(Cn[De.a],$t),fi),f.addScaledVector(w.subVectors(Cn[De.b],ee),fi),p.addScaledVector(A.subVectors(Cn[De.c],Te),fi)}}l.add($t),f.add(ee),p.add(Te),$t=l,ee=f,Te=p}(wt=t(this,wt,rt,n,$t,ee,Te,q))&&(Vt&&Vt[Yt]&&(be=Vt[Yt],P.copy(be[0]),B.copy(be[1]),H.copy(be[2]),wt.uv=Oe.getUV(q,$t,ee,Te,P,B,H,new s)),wt.face=De,wt.faceIndex=Yt,xt.push(wt))}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),z.prototype=Object.create(g.prototype),z.prototype.constructor=z,z.prototype.isCubeTexture=!0,Object.defineProperty(z.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),Q.prototype=Object.create(g.prototype),Q.prototype.constructor=Q,Q.prototype.isDataTexture3D=!0;var qh=new g,Jc=new Q,ku=new z,ah=[],La=[],wl=new Float32Array(16),Bu=new Float32Array(9),Yh=new Float32Array(4);oa.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),vt(e,t)},Za.prototype.setValue=function(t,e,i){for(var n=this.seq,o=0,l=n.length;o!==l;++o){var f=n[o];f.setValue(t,e[f.id],i)}};var Zh=/([\w\d_]+)(\])?(\[|\.)?/g;ho.prototype.setValue=function(t,e,i){e=this.map[e],e!==void 0&&e.setValue(t,i,this.renderer)},ho.prototype.setOptional=function(t,e,i){e=e[i],e!==void 0&&this.setValue(t,i,e)},ho.upload=function(t,e,i,n){for(var o=0,l=e.length;o!==l;++o){var f=e[o],p=i[f.id];p.needsUpdate!==!1&&f.setValue(t,p.value,n)}},ho.seqWithValue=function(t,e){for(var i=[],n=0,o=t.length;n!==o;++n){var l=t[n];l.id in e&&i.push(l)}return i};var Bo=0,Jh=0;se.prototype=Object.create(Wt.prototype),se.prototype.constructor=se,se.prototype.isMeshDepthMaterial=!0,se.prototype.copy=function(t){return Wt.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},te.prototype=Object.create(Wt.prototype),te.prototype.constructor=te,te.prototype.isMeshDistanceMaterial=!0,te.prototype.copy=function(t){return Wt.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},ci.prototype=Object.assign(Object.create(N.prototype),{constructor:ci,isGroup:!0}),Be.prototype=Object.assign(Object.create(N.prototype),{constructor:Be,isCamera:!0,copy:function(t,e){return N.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 u),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){N.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return new this.constructor().copy(this)}}),_e.prototype=Object.assign(Object.create(Be.prototype),{constructor:_e,isPerspectiveCamera:!0,copy:function(t,e){return Be.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*di.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*di.DEG2RAD*this.fov);return .5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*di.RAD2DEG*Math.atan(Math.tan(.5*di.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,l){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=l,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*di.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,o=-.5*n,l=this.view;if(this.view!==null&&this.view.enabled){var f=l.fullWidth,p=l.fullHeight;o+=l.offsetX*n/f,e-=l.offsetY*i/p,n*=l.width/f,i*=l.height/p}l=this.filmOffset,l!==0&&(o+=t*l/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+n,e,e-i,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=N.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}}),Fe.prototype=Object.assign(Object.create(_e.prototype),{constructor:Fe,isArrayCamera:!0});var as=new u,wr=new u;Re.prototype.isFogExp2=!0,Re.prototype.clone=function(){return new Re(this.color,this.density)},Re.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},Sn.prototype.isFog=!0,Sn.prototype.clone=function(){return new Sn(this.color,this.near,this.far)},Sn.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},Xn.prototype=Object.assign(Object.create(N.prototype),{constructor:Xn,copy:function(t,e){return N.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=N.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(ki.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(ki.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(Bi.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Bi.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}}),Hi.prototype=Object.create(Wt.prototype),Hi.prototype.constructor=Hi,Hi.prototype.isSpriteMaterial=!0,Hi.prototype.copy=function(t){return Wt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this};var Ra;nn.prototype=Object.assign(Object.create(N.prototype),{constructor:nn,isSprite:!0,raycast:function(){function t(H,q,$,rt,xt,gt){o.subVectors(H,$).addScalar(.5).multiply(rt),xt!==void 0?(l.x=gt*o.x-xt*o.y,l.y=xt*o.x+gt*o.y):l.copy(o),H.copy(q),H.x+=l.x,H.y+=l.y,H.applyMatrix4(f)}var e=new u,i=new u,n=new u,o=new s,l=new s,f=new c,p=new u,y=new u,w=new u,A=new s,P=new s,B=new s;return function(H,q){i.setFromMatrixScale(this.matrixWorld),f.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var $=this.material.rotation;if($!==0)var rt=Math.cos($),xt=Math.sin($);$=this.center,t(p.set(-.5,-.5,0),n,$,i,xt,rt),t(y.set(.5,-.5,0),n,$,i,xt,rt),t(w.set(.5,.5,0),n,$,i,xt,rt),A.set(0,0),P.set(1,0),B.set(1,1);var gt=H.ray.intersectTriangle(p,y,w,!1,e);gt===null&&(t(y.set(-.5,.5,0),n,$,i,xt,rt),P.set(0,1),gt=H.ray.intersectTriangle(p,w,y,!1,e),gt===null)||(xt=H.ray.origin.distanceTo(e),xt<H.near||xt>H.far||q.push({distance:xt,point:e.clone(),uv:Oe.getUV(e,p,y,w,A,P,B,new s),face:null,object:this}))}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return N.prototype.copy.call(this,t),t.center!==void 0&&this.center.copy(t.center),this}}),rn.prototype=Object.assign(Object.create(N.prototype),{constructor:rn,copy:function(t){N.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 u;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 u,e=new u;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,l=n.length;o<l&&i>=n[o].distance;o++)n[o-1].object.visible=!1,n[o].object.visible=!0;for(;o<l;o++)n[o].object.visible=!1}}}(),toJSON:function(t){t=N.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(un.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new c;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 c,e=new c;return function(){for(var i=this.bones,n=this.boneInverses,o=this.boneMatrices,l=this.boneTexture,f=0,p=i.length;f<p;f++)t.multiplyMatrices(i[f]?i[f].matrixWorld:e,n[f]),t.toArray(o,16*f);l!==void 0&&(l.needsUpdate=!0)}}(),clone:function(){return new un(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}}}),cn.prototype=Object.assign(Object.create(N.prototype),{constructor:cn,isBone:!0}),Gi.prototype=Object.assign(Object.create(pi.prototype),{constructor:Gi,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 cn;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 _;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){pi.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)}}),Ni.prototype=Object.create(Wt.prototype),Ni.prototype.constructor=Ni,Ni.prototype.isLineBasicMaterial=!0,Ni.prototype.copy=function(t){return Wt.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},ji.prototype=Object.assign(Object.create(N.prototype),{constructor:ji,isLine:!0,computeLineDistances:function(){var t=new u,e=new u;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[0],l=1,f=n.count;l<f;l++)t.fromBufferAttribute(n,l-1),e.fromBufferAttribute(n,l),o[l]=o[l-1],o[l]+=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,l=1,f=n.length;l<f;l++)o[l]=o[l-1],o[l]+=n[l-1].distanceTo(n[l]);return this}}(),raycast:function(){var t=new c,e=new Si,i=new D;return function(n,o){var l=n.linePrecision,f=this.geometry,p=this.matrixWorld;if(f.boundingSphere===null&&f.computeBoundingSphere(),i.copy(f.boundingSphere),i.applyMatrix4(p),i.radius+=l,n.ray.intersectsSphere(i)!==!1){t.getInverse(p),e.copy(n.ray).applyMatrix4(t),l/=(this.scale.x+this.scale.y+this.scale.z)/3,l*=l;var y=new u,w=new u;p=new u;var A=new u,P=this&&this.isLineSegments?2:1;if(f.isBufferGeometry){var B=f.index,H=f.attributes.position.array;if(B!==null){B=B.array,f=0;for(var q=B.length-1;f<q;f+=P){var $=B[f+1];y.fromArray(H,3*B[f]),w.fromArray(H,3*$),$=e.distanceSqToSegment(y,w,A,p),$>l||(A.applyMatrix4(this.matrixWorld),$=n.ray.origin.distanceTo(A),$<n.near||$>n.far||o.push({distance:$,point:p.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}}else for(f=0,q=H.length/3-1;f<q;f+=P)y.fromArray(H,3*f),w.fromArray(H,3*f+3),$=e.distanceSqToSegment(y,w,A,p),$>l||(A.applyMatrix4(this.matrixWorld),$=n.ray.origin.distanceTo(A),$<n.near||$>n.far||o.push({distance:$,point:p.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}else if(f.isGeometry)for(y=f.vertices,w=y.length,f=0;f<w-1;f+=P)$=e.distanceSqToSegment(y[f],y[f+1],A,p),$>l||(A.applyMatrix4(this.matrixWorld),$=n.ray.origin.distanceTo(A),$<n.near||$>n.far||o.push({distance:$,point:p.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}}}(),copy:function(t){return N.prototype.copy.call(this,t),this.geometry.copy(t.geometry),this.material.copy(t.material),this},clone:function(){return new this.constructor().copy(this)}}),gi.prototype=Object.assign(Object.create(ji.prototype),{constructor:gi,isLineSegments:!0,computeLineDistances:function(){var t=new u,e=new u;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[],l=0,f=n.count;l<f;l+=2)t.fromBufferAttribute(n,l),e.fromBufferAttribute(n,l+1),o[l]=l===0?0:o[l-1],o[l+1]=o[l]+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,l=0,f=n.length;l<f;l+=2)t.copy(n[l]),e.copy(n[l+1]),o[l]=l===0?0:o[l-1],o[l+1]=o[l]+t.distanceTo(e);return this}}()}),co.prototype=Object.assign(Object.create(ji.prototype),{constructor:co,isLineLoop:!0}),Fn.prototype=Object.create(Wt.prototype),Fn.prototype.constructor=Fn,Fn.prototype.isPointsMaterial=!0,Fn.prototype.copy=function(t){return Wt.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},la.prototype=Object.assign(Object.create(N.prototype),{constructor:la,isPoints:!0,raycast:function(){var t=new c,e=new Si,i=new D;return function(n,o){function l(rt,xt){var gt=e.distanceSqToPoint(rt);gt<A&&(e.closestPointToPoint(rt,P),P.applyMatrix4(y),rt=n.ray.origin.distanceTo(P),rt<n.near||rt>n.far||o.push({distance:rt,distanceToRay:Math.sqrt(gt),point:P.clone(),index:xt,face:null,object:f}))}var f=this,p=this.geometry,y=this.matrixWorld,w=n.params.Points.threshold;if(p.boundingSphere===null&&p.computeBoundingSphere(),i.copy(p.boundingSphere),i.applyMatrix4(y),i.radius+=w,n.ray.intersectsSphere(i)!==!1){t.getInverse(y),e.copy(n.ray).applyMatrix4(t),w/=(this.scale.x+this.scale.y+this.scale.z)/3;var A=w*w;w=new u;var P=new u;if(p.isBufferGeometry){var B=p.index;if(p=p.attributes.position.array,B!==null){var H=B.array;B=0;for(var q=H.length;B<q;B++){var $=H[B];w.fromArray(p,3*$),l(w,$)}}else for(B=0,H=p.length/3;B<H;B++)w.fromArray(p,3*B),l(w,B)}else for(w=p.vertices,B=0,H=w.length;B<H;B++)l(w[B],B)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),zh.prototype=Object.assign(Object.create(g.prototype),{constructor:zh,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),Yo.prototype=Object.create(g.prototype),Yo.prototype.constructor=Yo,Yo.prototype.isCompressedTexture=!0,$a.prototype=Object.create(g.prototype),$a.prototype.constructor=$a,$a.prototype.isCanvasTexture=!0,Ka.prototype=Object.create(g.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isDepthTexture=!0,ha.prototype=Object.create(Ft.prototype),ha.prototype.constructor=ha,Qa.prototype=Object.create(X.prototype),Qa.prototype.constructor=Qa,ua.prototype=Object.create(Ft.prototype),ua.prototype.constructor=ua,Xi.prototype=Object.create(X.prototype),Xi.prototype.constructor=Xi,xi.prototype=Object.create(Ft.prototype),xi.prototype.constructor=xi,tl.prototype=Object.create(X.prototype),tl.prototype.constructor=tl,ca.prototype=Object.create(xi.prototype),ca.prototype.constructor=ca,el.prototype=Object.create(X.prototype),el.prototype.constructor=el,_s.prototype=Object.create(xi.prototype),_s.prototype.constructor=_s,il.prototype=Object.create(X.prototype),il.prototype.constructor=il,fa.prototype=Object.create(xi.prototype),fa.prototype.constructor=fa,da.prototype=Object.create(X.prototype),da.prototype.constructor=da,pa.prototype=Object.create(xi.prototype),pa.prototype.constructor=pa,gn.prototype=Object.create(X.prototype),gn.prototype.constructor=gn,Zo.prototype=Object.create(Ft.prototype),Zo.prototype.constructor=Zo,Zr.prototype=Object.create(X.prototype),Zr.prototype.constructor=Zr,xs.prototype=Object.create(Ft.prototype),xs.prototype.constructor=xs,ws.prototype=Object.create(X.prototype),ws.prototype.constructor=ws,Un.prototype=Object.create(Ft.prototype),Un.prototype.constructor=Un;var Nu={triangulate:function(t,e,i){i=i||2;var n=e&&e.length,o=n?e[0]*i:t.length,l=kh(t,0,o,i,!0),f=[];if(!l)return f;var p;if(n){var y=i;n=[];var w,A=0;for(w=e.length;A<w;A++){var P=e[A]*y,B=A<w-1?e[A+1]*y:t.length;P=kh(t,P,B,y,!1),P===P.next&&(P.steiner=!0),n.push(yr(P))}for(n.sort(Su),A=0;A<n.length;A++)e=n[A],y=l,(y=Eu(e,y))&&(e=nl(y,e),ma(e,e.next)),l=ma(l,l.next)}if(t.length>80*i){var H=p=t[0],q=n=t[1];for(y=i;y<o;y+=i)A=t[y],e=t[y+1],A<H&&(H=A),e<q&&(q=e),A>p&&(p=A),e>n&&(n=e);p=Math.max(p-H,n-q),p=p!==0?1/p:0}return ga(l,f,i,H,q,p),f}},To={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>To.area(t)},triangulateShape:function(t,e){var i=[],n=[],o=[];$l(t),bu(i,t);var l=t.length;for(e.forEach($l),t=0;t<e.length;t++)n.push(l),l+=e[t].length,bu(i,e[t]);for(e=Nu.triangulate(i,n),t=0;t<e.length;t+=3)o.push(e.slice(t,t+3));return o}};Po.prototype=Object.create(X.prototype),Po.prototype.constructor=Po,Po.prototype.toJSON=function(){var t=X.prototype.toJSON.call(this);return Cu(this.parameters.shapes,this.parameters.options,t)},po.prototype=Object.create(Ft.prototype),po.prototype.constructor=po,po.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return Cu(this.parameters.shapes,this.parameters.options,t)};var Tl={generateTopUV:function(t,e,i,n,o){t=e[3*n],n=e[3*n+1];var l=e[3*o];return o=e[3*o+1],[new s(e[3*i],e[3*i+1]),new s(t,n),new s(l,o)]},generateSideWallUV:function(t,e,i,n,o,l){t=e[3*i];var f=e[3*i+1];i=e[3*i+2];var p=e[3*n],y=e[3*n+1];n=e[3*n+2];var w=e[3*o],A=e[3*o+1];o=e[3*o+2];var P=e[3*l],B=e[3*l+1];return e=e[3*l+2],.01>Math.abs(f-y)?[new s(t,1-i),new s(p,1-n),new s(w,1-o),new s(P,1-e)]:[new s(f,1-i),new s(y,1-n),new s(A,1-o),new s(B,1-e)]}};rl.prototype=Object.create(X.prototype),rl.prototype.constructor=rl,Ms.prototype=Object.create(po.prototype),Ms.prototype.constructor=Ms,Jo.prototype=Object.create(X.prototype),Jo.prototype.constructor=Jo,Or.prototype=Object.create(Ft.prototype),Or.prototype.constructor=Or,ol.prototype=Object.create(X.prototype),ol.prototype.constructor=ol,Ss.prototype=Object.create(Ft.prototype),Ss.prototype.constructor=Ss,va.prototype=Object.create(X.prototype),va.prototype.constructor=va,$o.prototype=Object.create(Ft.prototype),$o.prototype.constructor=$o,Lo.prototype=Object.create(X.prototype),Lo.prototype.constructor=Lo,Lo.prototype.toJSON=function(){var t=X.prototype.toJSON.call(this);return Au(this.parameters.shapes,t)},Ko.prototype=Object.create(Ft.prototype),Ko.prototype.constructor=Ko,Ko.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return Au(this.parameters.shapes,t)},Qo.prototype=Object.create(Ft.prototype),Qo.prototype.constructor=Qo,Ro.prototype=Object.create(X.prototype),Ro.prototype.constructor=Ro,Oo.prototype=Object.create(Ft.prototype),Oo.prototype.constructor=Oo,ya.prototype=Object.create(Ro.prototype),ya.prototype.constructor=ya,Gn.prototype=Object.create(Oo.prototype),Gn.prototype.constructor=Gn,Es.prototype=Object.create(X.prototype),Es.prototype.constructor=Es,mo.prototype=Object.create(Ft.prototype),mo.prototype.constructor=mo;var yn=Object.freeze({WireframeGeometry:ha,ParametricGeometry:Qa,ParametricBufferGeometry:ua,TetrahedronGeometry:tl,TetrahedronBufferGeometry:ca,OctahedronGeometry:el,OctahedronBufferGeometry:_s,IcosahedronGeometry:il,IcosahedronBufferGeometry:fa,DodecahedronGeometry:da,DodecahedronBufferGeometry:pa,PolyhedronGeometry:Xi,PolyhedronBufferGeometry:xi,TubeGeometry:gn,TubeBufferGeometry:Zo,TorusKnotGeometry:Zr,TorusKnotBufferGeometry:xs,TorusGeometry:ws,TorusBufferGeometry:Un,TextGeometry:rl,TextBufferGeometry:Ms,SphereGeometry:Jo,SphereBufferGeometry:Or,RingGeometry:ol,RingBufferGeometry:Ss,PlaneGeometry:Pe,PlaneBufferGeometry:pe,LatheGeometry:va,LatheBufferGeometry:$o,ShapeGeometry:Lo,ShapeBufferGeometry:Ko,ExtrudeGeometry:Po,ExtrudeBufferGeometry:po,EdgesGeometry:Qo,ConeGeometry:ya,ConeBufferGeometry:Gn,CylinderGeometry:Ro,CylinderBufferGeometry:Oo,CircleGeometry:Es,CircleBufferGeometry:mo,BoxGeometry:It,BoxBufferGeometry:Nt});ts.prototype=Object.create(Wt.prototype),ts.prototype.constructor=ts,ts.prototype.isShadowMaterial=!0,ts.prototype.copy=function(t){return Wt.prototype.copy.call(this,t),this.color.copy(t.color),this},bs.prototype=Object.create($e.prototype),bs.prototype.constructor=bs,bs.prototype.isRawShaderMaterial=!0,go.prototype=Object.create(Wt.prototype),go.prototype.constructor=go,go.prototype.isMeshStandardMaterial=!0,go.prototype.copy=function(t){return Wt.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},Cs.prototype=Object.create(go.prototype),Cs.prototype.constructor=Cs,Cs.prototype.isMeshPhysicalMaterial=!0,Cs.prototype.copy=function(t){return go.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},Jr.prototype=Object.create(Wt.prototype),Jr.prototype.constructor=Jr,Jr.prototype.isMeshPhongMaterial=!0,Jr.prototype.copy=function(t){return Wt.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},As.prototype=Object.create(Jr.prototype),As.prototype.constructor=As,As.prototype.isMeshToonMaterial=!0,As.prototype.copy=function(t){return Jr.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ps.prototype=Object.create(Wt.prototype),Ps.prototype.constructor=Ps,Ps.prototype.isMeshNormalMaterial=!0,Ps.prototype.copy=function(t){return Wt.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},Ir.prototype=Object.create(Wt.prototype),Ir.prototype.constructor=Ir,Ir.prototype.isMeshLambertMaterial=!0,Ir.prototype.copy=function(t){return Wt.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},Ls.prototype=Object.create(Wt.prototype),Ls.prototype.constructor=Ls,Ls.prototype.isMeshMatcapMaterial=!0,Ls.prototype.copy=function(t){return Wt.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},Rs.prototype=Object.create(Ni.prototype),Rs.prototype.constructor=Rs,Rs.prototype.isLineDashedMaterial=!0,Rs.prototype.copy=function(t){return Ni.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Fu=Object.freeze({ShadowMaterial:ts,SpriteMaterial:Hi,RawShaderMaterial:bs,ShaderMaterial:$e,PointsMaterial:Fn,MeshPhysicalMaterial:Cs,MeshStandardMaterial:go,MeshPhongMaterial:Jr,MeshToonMaterial:As,MeshNormalMaterial:Ps,MeshLambertMaterial:Ir,MeshDepthMaterial:se,MeshDistanceMaterial:te,MeshBasicMaterial:Ge,MeshMatcapMaterial:Ls,LineDashedMaterial:Rs,LineBasicMaterial:Ni,Material:Wt}),Yn={arraySlice:function(t,e,i){return Yn.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,l){return t[o]-t[l]}),i},sortedArray:function(t,e,i){for(var n=t.length,o=new t.constructor(n),l=0,f=0;f!==n;++l)for(var p=i[l]*e,y=0;y!==e;++y)o[f++]=t[p+y];return o},flattenJSON:function(t,e,i,n){for(var o=1,l=t[0];l!==void 0&&l[n]===void 0;)l=t[o++];if(l!==void 0){var f=l[n];if(f!==void 0)if(Array.isArray(f))do f=l[n],f!==void 0&&(e.push(l.time),i.push.apply(i,f)),l=t[o++];while(l!==void 0);else if(f.toArray!==void 0)do f=l[n],f!==void 0&&(e.push(l.time),f.toArray(i,i.length)),l=t[o++];while(l!==void 0);else do f=l[n],f!==void 0&&(e.push(l.time),i.push(f)),l=t[o++];while(l!==void 0)}}};Object.assign($n.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 l=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===l)break;if(o=n,n=e[++i],t<n)break e}n=e.length;break i}if(t>=o)break t;for(l=e[1],t<l&&(i=2,o=l),l=i-2;;){if(o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===l)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($n.prototype,{beforeStart_:$n.prototype.copySampleValue_,afterEnd_:$n.prototype.copySampleValue_}),sl.prototype=Object.assign(Object.create($n.prototype),{constructor:sl,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,o=t-2,l=t+1,f=n[o],p=n[l];if(f===void 0)switch(this.getSettings_().endingStart){case 2401:o=t,f=2*e-i;break;case 2402:o=n.length-2,f=e+n[o]-n[o+1];break;default:o=t,f=i}if(p===void 0)switch(this.getSettings_().endingEnd){case 2401:l=t,p=2*i-e;break;case 2402:l=1,p=i+n[1]-n[0];break;default:l=t-1,p=e}t=.5*(i-e),n=this.valueSize,this._weightPrev=t/(e-f),this._weightNext=t/(p-i),this._offsetPrev=o*n,this._offsetNext=l*n},interpolate_:function(t,e,i,n){var o=this.resultBuffer,l=this.sampleValues,f=this.valueSize;t*=f;var p=t-f,y=this._offsetPrev,w=this._offsetNext,A=this._weightPrev,P=this._weightNext,B=(i-e)/(n-e);for(i=B*B,n=i*B,e=-A*n+2*A*i-A*B,A=(1+A)*n+(-1.5-2*A)*i+(-.5+A)*B+1,B=(-1-P)*n+(1.5+P)*i+.5*B,P=P*n-P*i,i=0;i!==f;++i)o[i]=e*l[y+i]+A*l[p+i]+B*l[t+i]+P*l[w+i];return o}}),Dr.prototype=Object.assign(Object.create($n.prototype),{constructor:Dr,interpolate_:function(t,e,i,n){var o=this.resultBuffer,l=this.sampleValues,f=this.valueSize;t*=f;var p=t-f;for(e=(i-e)/(n-e),i=1-e,n=0;n!==f;++n)o[n]=l[p+n]*i+l[t+n]*e;return o}}),Os.prototype=Object.assign(Object.create($n.prototype),{constructor:Os,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(Hn,{toJSON:function(t){var e=t.constructor;if(e.toJSON!==void 0)e=e.toJSON(t);else{e={name:t.name,times:Yn.convertArray(t.times,Array),values:Yn.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e}}),Object.assign(Hn.prototype,{constructor:Hn,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new Os(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Dr(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new sl(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,l=n-1;o!==n&&i[o]<t;)++o;for(;l!==-1&&i[l]>e;)--l;return++l,(o!==0||l!==n)&&(o>=l&&(l=Math.max(l,1),o=l-1),t=this.getValueSize(),this.times=Yn.arraySlice(i,o,l),this.values=Yn.arraySlice(this.values,o*t,l*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,l=0;l!==n;l++){var f=i[l];if(typeof f=="number"&&isNaN(f)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,l,f),t=!1;break}if(o!==null&&o>f){console.error("THREE.KeyframeTrack: Out of order keys.",this,l,f,o),t=!1;break}o=f}if(e!==void 0&&Yn.isTypedArray(e)){for(l=0,i=e.length;l!==i;++l)if(n=e[l],isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,l,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,l=t.length-1,f=1;f<l;++f){var p=!1,y=t[f];if(y!==t[f+1]&&(f!==1||y!==y[0]))if(n)p=!0;else{var w=f*i,A=w-i,P=w+i;for(y=0;y!==i;++y){var B=e[w+y];if(B!==e[A+y]||B!==e[P+y]){p=!0;break}}}if(p){if(f!==o)for(t[o]=t[f],p=f*i,w=o*i,y=0;y!==i;++y)e[w+y]=e[p+y];++o}}if(0<l){for(t[o]=t[l],p=l*i,w=o*i,y=0;y!==i;++y)e[w+y]=e[p+y];++o}return o!==t.length&&(this.times=Yn.arraySlice(t,0,o),this.values=Yn.arraySlice(e,0,o*i)),this}}),Kl.prototype=Object.assign(Object.create(Hn.prototype),{constructor:Kl,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ql.prototype=Object.assign(Object.create(Hn.prototype),{constructor:Ql,ValueTypeName:"color"}),$r.prototype=Object.assign(Object.create(Hn.prototype),{constructor:$r,ValueTypeName:"number"}),ar.prototype=Object.assign(Object.create($n.prototype),{constructor:ar,interpolate_:function(t,e,i,n){var o=this.resultBuffer,l=this.sampleValues,f=this.valueSize;for(t*=f,e=(i-e)/(n-e),i=t+f;t!==i;t+=4)d.slerpFlat(o,0,l,t-f,l,t,e);return o}}),_a.prototype=Object.assign(Object.create(Hn.prototype),{constructor:_a,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new ar(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),th.prototype=Object.assign(Object.create(Hn.prototype),{constructor:th,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),xa.prototype=Object.assign(Object.create(Hn.prototype),{constructor:xa,ValueTypeName:"vector"}),Object.assign(_r,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),o=0,l=i.length;o!==l;++o)e.push(Xc(i[o]).scale(n));return new _r(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(Hn.toJSON(i[n]));return t},CreateFromMorphTargetSequence:function(t,e,i,n){for(var o=e.length,l=[],f=0;f<o;f++){var p=[],y=[];p.push((f+o-1)%o,f,(f+1)%o),y.push(0,1,0);var w=Yn.getKeyframeOrder(p);p=Yn.sortedArray(p,1,w),y=Yn.sortedArray(y,1,w),n||p[0]!==0||(p.push(o),y.push(y[0])),l.push(new $r(".morphTargetInfluences["+e[f].name+"]",p,y).scale(1/i))}return new _r(t,-1,l)},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]+)$/,l=0,f=t.length;l<f;l++){var p=t[l],y=p.name.match(o);if(y&&1<y.length){var w=y[1];(y=n[w])||(n[w]=y=[]),y.push(p)}}t=[];for(w in n)t.push(_r.CreateFromMorphTargetSequence(w,n[w],e,i));return t},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var i=function($,rt,xt,gt,Ct){if(xt.length!==0){var wt=[],Vt=[];Yn.flattenJSON(xt,wt,Vt,gt),wt.length!==0&&Ct.push(new $(rt,wt,Vt))}},n=[],o=t.name||"default",l=t.length||-1,f=t.fps||30;t=t.hierarchy||[];for(var p=0;p<t.length;p++){var y=t[p].keys;if(y&&y.length!==0)if(y[0].morphTargets){l={};for(var w=0;w<y.length;w++)if(y[w].morphTargets)for(var A=0;A<y[w].morphTargets.length;A++)l[y[w].morphTargets[A]]=-1;for(var P in l){var B=[],H=[];for(A=0;A!==y[w].morphTargets.length;++A){var q=y[w];B.push(q.time),H.push(q.morphTarget===P?1:0)}n.push(new $r(".morphTargetInfluence["+P+"]",B,H))}l=l.length*(f||1)}else w=".bones["+e[p].name+"]",i(xa,w+".position",y,"pos",n),i(_a,w+".quaternion",y,"rot",n),i(xa,w+".scale",y,"scl",n)}return n.length===0?null:new _r(o,l,n)}}),Object.assign(_r.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 Mo={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={}}},tr=new es,Br={};Object.assign(Lt.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,l=Mo.get(t);if(l!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(l),o.manager.itemEnd(t)},0),l;if(Br[t]!==void 0)Br[t].push({onLoad:e,onProgress:i,onError:n});else{var f=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(f){i=f[1];var p=!!f[2];f=f[3],f=decodeURIComponent(f),p&&(f=atob(f));try{var y=(this.responseType||"").toLowerCase();switch(y){case"arraybuffer":case"blob":var w=new Uint8Array(f.length);for(p=0;p<f.length;p++)w[p]=f.charCodeAt(p);var A=y==="blob"?new Blob([w.buffer],{type:i}):w.buffer;break;case"document":A=new DOMParser().parseFromString(f,i);break;case"json":A=JSON.parse(f);break;default:A=f}setTimeout(function(){e&&e(A),o.manager.itemEnd(t)},0)}catch(B){setTimeout(function(){n&&n(B),o.manager.itemError(t),o.manager.itemEnd(t)},0)}}else{Br[t]=[],Br[t].push({onLoad:e,onProgress:i,onError:n});var P=new XMLHttpRequest;P.open("GET",t,!0),P.addEventListener("load",function(B){var H=this.response;Mo.add(t,H);var q=Br[t];if(delete Br[t],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var $=0,rt=q.length;$<rt;$++){var xt=q[$];xt.onLoad&&xt.onLoad(H)}}else{for($=0,rt=q.length;$<rt;$++)xt=q[$],xt.onError&&xt.onError(B);o.manager.itemError(t)}o.manager.itemEnd(t)},!1),P.addEventListener("progress",function(B){for(var H=Br[t],q=0,$=H.length;q<$;q++){var rt=H[q];rt.onProgress&&rt.onProgress(B)}},!1),P.addEventListener("error",function(B){var H=Br[t];delete Br[t];for(var q=0,$=H.length;q<$;q++){var rt=H[q];rt.onError&&rt.onError(B)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),P.addEventListener("abort",function(B){var H=Br[t];delete Br[t];for(var q=0,$=H.length;q<$;q++){var rt=H[q];rt.onError&&rt.onError(B)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),this.responseType!==void 0&&(P.responseType=this.responseType),this.withCredentials!==void 0&&(P.withCredentials=this.withCredentials),P.overrideMimeType&&P.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(p in this.requestHeader)P.setRequestHeader(p,this.requestHeader[p]);P.send(null)}return o.manager.itemStart(t),P}},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(Qt.prototype,{load:function(t,e,i,n){var o=this,l=new Lt(o.manager);l.setPath(o.path),l.load(t,function(f){e(o.parse(JSON.parse(f)))},i,n)},parse:function(t,e){for(var i=[],n=0;n<t.length;n++){var o=_r.parse(t[n]);i.push(o)}e(i)},setPath:function(t){return this.path=t,this}}),Object.assign(Zt.prototype,{load:function(t,e,i,n){function o(B){y.load(t[B],function(H){H=l._parser(H,!0),f[B]={width:H.width,height:H.height,format:H.format,mipmaps:H.mipmaps},w+=1,w===6&&(H.mipmapCount===1&&(p.minFilter=1006),p.format=H.format,p.needsUpdate=!0,e&&e(p))},i,n)}var l=this,f=[],p=new Yo;p.image=f;var y=new Lt(this.manager);if(y.setPath(this.path),y.setResponseType("arraybuffer"),Array.isArray(t))for(var w=0,A=0,P=t.length;A<P;++A)o(A);else y.load(t,function(B){if(B=l._parser(B,!0),B.isCubemap)for(var H=B.mipmaps.length/B.mipmapCount,q=0;q<H;q++){f[q]={mipmaps:[]};for(var $=0;$<B.mipmapCount;$++)f[q].mipmaps.push(B.mipmaps[q*B.mipmapCount+$]),f[q].format=B.format,f[q].width=B.width,f[q].height=B.height}else p.image.width=B.width,p.image.height=B.height,p.mipmaps=B.mipmaps;B.mipmapCount===1&&(p.minFilter=1006),p.format=B.format,p.needsUpdate=!0,e&&e(p)},i,n);return p},setPath:function(t){return this.path=t,this}}),Object.assign(Ue.prototype,{load:function(t,e,i,n){var o=this,l=new O,f=new Lt(this.manager);return f.setResponseType("arraybuffer"),f.setPath(this.path),f.load(t,function(p){(p=o._parser(p))&&(p.image!==void 0?l.image=p.image:p.data!==void 0&&(l.image.width=p.width,l.image.height=p.height,l.image.data=p.data),l.wrapS=p.wrapS!==void 0?p.wrapS:1001,l.wrapT=p.wrapT!==void 0?p.wrapT:1001,l.magFilter=p.magFilter!==void 0?p.magFilter:1006,l.minFilter=p.minFilter!==void 0?p.minFilter:1008,l.anisotropy=p.anisotropy!==void 0?p.anisotropy:1,p.format!==void 0&&(l.format=p.format),p.type!==void 0&&(l.type=p.type),p.mipmaps!==void 0&&(l.mipmaps=p.mipmaps),p.mipmapCount===1&&(l.minFilter=1006),l.needsUpdate=!0,e&&e(l,p))},i,n),l},setPath:function(t){return this.path=t,this}}),Object.assign(ai.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(){y.removeEventListener("load",o,!1),y.removeEventListener("error",l,!1),Mo.add(t,this),e&&e(this),f.manager.itemEnd(t)}function l(w){y.removeEventListener("load",o,!1),y.removeEventListener("error",l,!1),n&&n(w),f.manager.itemError(t),f.manager.itemEnd(t)}t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var f=this,p=Mo.get(t);if(p!==void 0)return f.manager.itemStart(t),setTimeout(function(){e&&e(p),f.manager.itemEnd(t)},0),p;var y=document.createElementNS("http://www.w3.org/1999/xhtml","img");return y.addEventListener("load",o,!1),y.addEventListener("error",l,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(y.crossOrigin=this.crossOrigin),f.manager.itemStart(t),y.src=t,y},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fi.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(y){f.load(t[y],function(w){l.images[y]=w,p++,p===6&&(l.needsUpdate=!0,e&&e(l))},void 0,n)}var l=new z,f=new ai(this.manager);f.setCrossOrigin(this.crossOrigin),f.setPath(this.path);var p=0;for(i=0;i<t.length;++i)o(i);return l},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(fn.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=new g,l=new ai(this.manager);return l.setCrossOrigin(this.crossOrigin),l.setPath(this.path),l.load(t,function(f){o.image=f,f=0<t.search(/\.jpe?g$/i)||t.search(/^data:image\/jpeg/)===0,o.format=f?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(Ee.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 l=this.getPoint(n/t);o+=l.distanceTo(i),e.push(o),i=l}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,l=n-1,f;o<=l;)if(t=Math.floor(o+(l-o)/2),f=i[t]-e,0>f)o=t+1;else if(0<f)l=t-1;else{l=t;break}return t=l,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 u,n=[],o=[],l=[],f=new u,p=new c,y;for(y=0;y<=t;y++){var w=y/t;n[y]=this.getTangentAt(w),n[y].normalize()}o[0]=new u,l[0]=new u,y=Number.MAX_VALUE,w=Math.abs(n[0].x);var A=Math.abs(n[0].y),P=Math.abs(n[0].z);for(w<=y&&(y=w,i.set(1,0,0)),A<=y&&(y=A,i.set(0,1,0)),P<=y&&i.set(0,0,1),f.crossVectors(n[0],i).normalize(),o[0].crossVectors(n[0],f),l[0].crossVectors(n[0],o[0]),y=1;y<=t;y++)o[y]=o[y-1].clone(),l[y]=l[y-1].clone(),f.crossVectors(n[y-1],n[y]),f.length()>Number.EPSILON&&(f.normalize(),i=Math.acos(di.clamp(n[y-1].dot(n[y]),-1,1)),o[y].applyMatrix4(p.makeRotationAxis(f,i))),l[y].crossVectors(n[y],o[y]);if(e===!0)for(i=Math.acos(di.clamp(o[0].dot(o[t]),-1,1)),i/=t,0<n[0].dot(f.crossVectors(o[0],o[t]))&&(i=-i),y=1;y<=t;y++)o[y].applyMatrix4(p.makeRotationAxis(n[y],i*y)),l[y].crossVectors(n[y],o[y]);return{tangents:n,normals:o,binormals:l}},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}}),Kn.prototype=Object.create(Ee.prototype),Kn.prototype.constructor=Kn,Kn.prototype.isEllipseCurve=!0,Kn.prototype.getPoint=function(t,e){e=e||new s;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 l=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,l-=this.aY,t=o*i-l*n+this.aX,l=o*n+l*i+this.aY),e.set(t,l)},Kn.prototype.copy=function(t){return Ee.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},Kn.prototype.toJSON=function(){var t=Ee.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},Kn.prototype.fromJSON=function(t){return Ee.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},wa.prototype=Object.create(Kn.prototype),wa.prototype.constructor=wa,wa.prototype.isArcCurve=!0;var bn=new u,Ml=new lr,lh=new lr,Nr=new lr;On.prototype=Object.create(Ee.prototype),On.prototype.constructor=On,On.prototype.isCatmullRomCurve3=!0,On.prototype.getPoint=function(t,e){e=e||new u;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 l=i[(o-1)%n];else bn.subVectors(i[0],i[1]).add(i[0]),l=bn;var f=i[o%n],p=i[(o+1)%n];if(this.closed||o+2<n?i=i[(o+2)%n]:(bn.subVectors(i[n-1],i[n-2]).add(i[n-1]),i=bn),this.curveType==="centripetal"||this.curveType==="chordal"){var y=this.curveType==="chordal"?.5:.25;n=Math.pow(l.distanceToSquared(f),y),o=Math.pow(f.distanceToSquared(p),y),y=Math.pow(p.distanceToSquared(i),y),1e-4>o&&(o=1),1e-4>n&&(n=o),1e-4>y&&(y=o),Ml.initNonuniformCatmullRom(l.x,f.x,p.x,i.x,n,o,y),lh.initNonuniformCatmullRom(l.y,f.y,p.y,i.y,n,o,y),Nr.initNonuniformCatmullRom(l.z,f.z,p.z,i.z,n,o,y)}else this.curveType==="catmullrom"&&(Ml.initCatmullRom(l.x,f.x,p.x,i.x,this.tension),lh.initCatmullRom(l.y,f.y,p.y,i.y,this.tension),Nr.initCatmullRom(l.z,f.z,p.z,i.z,this.tension));return e.set(Ml.calc(t),lh.calc(t),Nr.calc(t)),e},On.prototype.copy=function(t){Ee.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},On.prototype.toJSON=function(){var t=Ee.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},On.prototype.fromJSON=function(t){Ee.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 u().fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},hr.prototype=Object.create(Ee.prototype),hr.prototype.constructor=hr,hr.prototype.isCubicBezierCurve=!0,hr.prototype.getPoint=function(t,e){e=e||new s;var i=this.v0,n=this.v1,o=this.v2,l=this.v3;return e.set(is(t,i.x,n.x,o.x,l.x),is(t,i.y,n.y,o.y,l.y)),e},hr.prototype.copy=function(t){return Ee.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},hr.prototype.toJSON=function(){var t=Ee.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},hr.prototype.fromJSON=function(t){return Ee.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},Ti.prototype=Object.create(Ee.prototype),Ti.prototype.constructor=Ti,Ti.prototype.isCubicBezierCurve3=!0,Ti.prototype.getPoint=function(t,e){e=e||new u;var i=this.v0,n=this.v1,o=this.v2,l=this.v3;return e.set(is(t,i.x,n.x,o.x,l.x),is(t,i.y,n.y,o.y,l.y),is(t,i.z,n.z,o.z,l.z)),e},Ti.prototype.copy=function(t){return Ee.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},Ti.prototype.toJSON=function(){var t=Ee.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},Ti.prototype.fromJSON=function(t){return Ee.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},ur.prototype=Object.create(Ee.prototype),ur.prototype.constructor=ur,ur.prototype.isLineCurve=!0,ur.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},ur.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},ur.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},ur.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ur.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ur.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},zr.prototype=Object.create(Ee.prototype),zr.prototype.constructor=zr,zr.prototype.isLineCurve3=!0,zr.prototype.getPoint=function(t,e){return e=e||new u,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},zr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},zr.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},zr.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},zr.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},cr.prototype=Object.create(Ee.prototype),cr.prototype.constructor=cr,cr.prototype.isQuadraticBezierCurve=!0,cr.prototype.getPoint=function(t,e){e=e||new s;var i=this.v0,n=this.v1,o=this.v2;return e.set(vo(t,i.x,n.x,o.x),vo(t,i.y,n.y,o.y)),e},cr.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},cr.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},cr.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},yo.prototype=Object.create(Ee.prototype),yo.prototype.constructor=yo,yo.prototype.isQuadraticBezierCurve3=!0,yo.prototype.getPoint=function(t,e){e=e||new u;var i=this.v0,n=this.v1,o=this.v2;return e.set(vo(t,i.x,n.x,o.x),vo(t,i.y,n.y,o.y),vo(t,i.z,n.z,o.z)),e},yo.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},yo.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},yo.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Kr.prototype=Object.create(Ee.prototype),Kr.prototype.constructor=Kr,Kr.prototype.isSplineCurve=!0,Kr.prototype.getPoint=function(t,e){e=e||new s;var i=this.points,n=(i.length-1)*t;t=Math.floor(n),n-=t;var o=i[t===0?t:t-1],l=i[t],f=i[t>i.length-2?i.length-1:t+1];return i=i[t>i.length-3?i.length-1:t+2],e.set(Pu(n,o.x,l.x,f.x,i.x),Pu(n,o.y,l.y,f.y,i.y)),e},Kr.prototype.copy=function(t){Ee.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},Kr.prototype.toJSON=function(){var t=Ee.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},Kr.prototype.fromJSON=function(t){Ee.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};var hh=Object.freeze({ArcCurve:wa,CatmullRomCurve3:On,CubicBezierCurve:hr,CubicBezierCurve3:Ti,EllipseCurve:Kn,LineCurve:ur,LineCurve3:zr,QuadraticBezierCurve:cr,QuadraticBezierCurve3:yo,SplineCurve:Kr});Io.prototype=Object.assign(Object.create(Ee.prototype),{constructor:Io,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 ur(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 l=o[n];l=l.getPoints(l&&l.isEllipseCurve?2*t:l&&(l.isLineCurve||l.isLineCurve3)?1:l&&l.isSplineCurve?t*l.points.length:t);for(var f=0;f<l.length;f++){var p=l[f];i&&i.equals(p)||(e.push(p),i=p)}}return this.autoClose&&1<e.length&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},copy:function(t){Ee.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=Ee.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){Ee.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 hh[n.type]().fromJSON(n))}return this}}),fr.prototype=Object.assign(Object.create(Io.prototype),{constructor:fr,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 ur(this.currentPoint.clone(),new s(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){t=new cr(this.currentPoint.clone(),new s(t,e),new s(i,n)),this.curves.push(t),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,o,l){t=new hr(this.currentPoint.clone(),new s(t,e),new s(i,n),new s(o,l)),this.curves.push(t),this.currentPoint.set(o,l)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t);e=new Kr(e),this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,o,l){this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,l)},absarc:function(t,e,i,n,o,l){this.absellipse(t,e,i,i,n,o,l)},ellipse:function(t,e,i,n,o,l,f,p){this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,l,f,p)},absellipse:function(t,e,i,n,o,l,f,p){t=new Kn(t,e,i,n,o,l,f,p),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 Io.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=Io.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return Io.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Qn.prototype=Object.assign(Object.create(fr.prototype),{constructor:Qn,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){fr.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=fr.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){fr.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 fr().fromJSON(n))}return this}}),tn.prototype=Object.assign(Object.create(N.prototype),{constructor:tn,isLight:!0,copy:function(t){return N.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){return t=N.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}}),al.prototype=Object.assign(Object.create(tn.prototype),{constructor:al,isHemisphereLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(_o.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}}),ll.prototype=Object.assign(Object.create(_o.prototype),{constructor:ll,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*di.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())}}),hl.prototype=Object.assign(Object.create(tn.prototype),{constructor:hl,isSpotLight:!0,copy:function(t){return tn.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}}),Is.prototype=Object.assign(Object.create(tn.prototype),{constructor:Is,isPointLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),Ta.prototype=Object.assign(Object.create(Be.prototype),{constructor:Ta,isOrthographicCamera:!0,copy:function(t,e){return Be.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,l){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=l,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 l=(this.right-this.left)/this.view.width;n=(this.top-this.bottom)/this.view.height,o+=this.view.offsetX/i*l,i=o+this.view.width/i*l,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=N.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}}),ns.prototype=Object.assign(Object.create(_o.prototype),{constructor:ns}),xo.prototype=Object.assign(Object.create(tn.prototype),{constructor:xo,isDirectionalLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Ds.prototype=Object.assign(Object.create(tn.prototype),{constructor:Ds,isAmbientLight:!0}),eh.prototype=Object.assign(Object.create(tn.prototype),{constructor:eh,isRectAreaLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){return t=tn.prototype.toJSON.call(this,t),t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(ih.prototype,{load:function(t,e,i,n){var o=this,l=new Lt(o.manager);l.setPath(o.path),l.load(t,function(f){e(o.parse(JSON.parse(f)))},i,n)},parse:function(t){function e(f){return i[f]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",f),i[f]}var i=this.textures,n=new Fu[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 l=t.uniforms[o];switch(n.uniforms[o]={},l.type){case"t":n.uniforms[o].value=e(l.value);break;case"c":n.uniforms[o].value=new L().setHex(l.value);break;case"v2":n.uniforms[o].value=new s().fromArray(l.value);break;case"v3":n.uniforms[o].value=new u().fromArray(l.value);break;case"v4":n.uniforms[o].value=new _().fromArray(l.value);break;case"m4":n.uniforms[o].value=new c().fromArray(l.value);break;default:n.uniforms[o].value=l.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 s().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 Us={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(Nh.prototype,{load:function(t,e,i,n){var o=this,l=new Lt(o.manager);l.setPath(o.path),l.load(t,function(f){e(o.parse(JSON.parse(f)))},i,n)},parse:function(t){var e=new Ft,i=t.data.index;i!==void 0&&(i=new ls[i.type](i.array),e.setIndex(new K(i,1)));var n=t.data.attributes;for(l in n){var o=n[l];i=new ls[o.type](o.array),e.addAttribute(l,new K(i,o.itemSize,o.normalized))}var l=t.data.groups||t.data.drawcalls||t.data.offsets;if(l!==void 0)for(i=0,n=l.length;i!==n;++i)o=l[i],e.addGroup(o.start,o.count,o.materialIndex);return t=t.data.boundingSphere,t!==void 0&&(l=new u,t.center!==void 0&&l.fromArray(t.center),e.boundingSphere=new D(l,t.radius)),e},setPath:function(t){return this.path=t,this}});var ls={Int8Array,Uint8Array,Uint8ClampedArray:typeof Uint8ClampedArray<"u"?Uint8ClampedArray:Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};Do.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(Do.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 L,i=new fn,n=new ih;return function(o,l,f){function p(B,H,q,$,rt){B=l+B;var xt=Do.Handlers.get(B);return xt!==null?B=xt.load(B):(i.setCrossOrigin(f),B=i.load(B)),H!==void 0&&(B.repeat.fromArray(H),H[0]!==1&&(B.wrapS=1e3),H[1]!==1&&(B.wrapT=1e3)),q!==void 0&&B.offset.fromArray(q),$!==void 0&&($[0]==="repeat"&&(B.wrapS=1e3),$[0]==="mirror"&&(B.wrapS=1002),$[1]==="repeat"&&(B.wrapT=1e3),$[1]==="mirror"&&(B.wrapT=1002)),rt!==void 0&&(B.anisotropy=rt),H=di.generateUUID(),y[H]=B,H}var y={},w={uuid:di.generateUUID(),type:"MeshLambertMaterial"},A;for(A in o){var P=o[A];switch(A){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":w.name=P;break;case"blending":w.blending=t[P];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",A,"is no longer supported.");break;case"colorDiffuse":w.color=e.fromArray(P).getHex();break;case"colorSpecular":w.specular=e.fromArray(P).getHex();break;case"colorEmissive":w.emissive=e.fromArray(P).getHex();break;case"specularCoef":w.shininess=P;break;case"shading":P.toLowerCase()==="basic"&&(w.type="MeshBasicMaterial"),P.toLowerCase()==="phong"&&(w.type="MeshPhongMaterial"),P.toLowerCase()==="standard"&&(w.type="MeshStandardMaterial");break;case"mapDiffuse":w.map=p(P,o.mapDiffuseRepeat,o.mapDiffuseOffset,o.mapDiffuseWrap,o.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":w.emissiveMap=p(P,o.mapEmissiveRepeat,o.mapEmissiveOffset,o.mapEmissiveWrap,o.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":w.lightMap=p(P,o.mapLightRepeat,o.mapLightOffset,o.mapLightWrap,o.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":w.aoMap=p(P,o.mapAORepeat,o.mapAOOffset,o.mapAOWrap,o.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":w.bumpMap=p(P,o.mapBumpRepeat,o.mapBumpOffset,o.mapBumpWrap,o.mapBumpAnisotropy);break;case"mapBumpScale":w.bumpScale=P;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":w.normalMap=p(P,o.mapNormalRepeat,o.mapNormalOffset,o.mapNormalWrap,o.mapNormalAnisotropy);break;case"mapNormalFactor":w.normalScale=P;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":w.specularMap=p(P,o.mapSpecularRepeat,o.mapSpecularOffset,o.mapSpecularWrap,o.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":w.metalnessMap=p(P,o.mapMetalnessRepeat,o.mapMetalnessOffset,o.mapMetalnessWrap,o.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":w.roughnessMap=p(P,o.mapRoughnessRepeat,o.mapRoughnessOffset,o.mapRoughnessWrap,o.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":w.alphaMap=p(P,o.mapAlphaRepeat,o.mapAlphaOffset,o.mapAlphaWrap,o.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":w.side=1;break;case"doubleSided":w.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),w.opacity=P;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":w[A]=P;break;case"vertexColors":P===!0&&(w.vertexColors=2),P==="face"&&(w.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",A,P)}}return w.type==="MeshBasicMaterial"&&delete w.emissive,w.type!=="MeshPhongMaterial"&&delete w.specular,1>w.opacity&&(w.transparent=!0),n.setTextures(y),n.parse(w)}}()}),Object.assign(zs.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,l=this.path===void 0?Us.extractUrlBase(t):this.path,f=new Lt(this.manager);f.setPath(this.path),f.setWithCredentials(this.withCredentials),f.load(t,function(p){p=JSON.parse(p);var y=p.metadata;if(y!==void 0&&(y=y.type,y!==void 0&&y.toLowerCase()==="object")){console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");return}p=o.parse(p,l),e(p.geometry,p.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,l,f,p=n.faces,y=n.vertices,w=n.normals,A=n.colors,P=n.scale,B=0;if(n.uvs!==void 0){for(o=0;o<n.uvs.length;o++)n.uvs[o].length&&B++;for(o=0;o<B;o++)i.faceVertexUvs[o]=[]}var H=0;for(f=y.length;H<f;)o=new u,o.x=y[H++]*P,o.y=y[H++]*P,o.z=y[H++]*P,i.vertices.push(o);for(H=0,f=p.length;H<f;){y=p[H++];var q=y&1,$=y&2;o=y&8;var rt=y&16,xt=y&32;if(P=y&64,y&=128,q){q=new R,q.a=p[H],q.b=p[H+1],q.c=p[H+3];var gt=new R;if(gt.a=p[H+1],gt.b=p[H+2],gt.c=p[H+3],H+=4,$&&($=p[H++],q.materialIndex=$,gt.materialIndex=$),$=i.faces.length,o)for(o=0;o<B;o++){var Ct=n.uvs[o];for(i.faceVertexUvs[o][$]=[],i.faceVertexUvs[o][$+1]=[],l=0;4>l;l++){var wt=p[H++],Vt=Ct[2*wt];wt=Ct[2*wt+1],Vt=new s(Vt,wt),l!==2&&i.faceVertexUvs[o][$].push(Vt),l!==0&&i.faceVertexUvs[o][$+1].push(Vt)}}if(rt&&(rt=3*p[H++],q.normal.set(w[rt++],w[rt++],w[rt]),gt.normal.copy(q.normal)),xt)for(o=0;4>o;o++)rt=3*p[H++],xt=new u(w[rt++],w[rt++],w[rt]),o!==2&&q.vertexNormals.push(xt),o!==0&&gt.vertexNormals.push(xt);if(P&&(P=p[H++],P=A[P],q.color.setHex(P),gt.color.setHex(P)),y)for(o=0;4>o;o++)P=p[H++],P=A[P],o!==2&&q.vertexColors.push(new L(P)),o!==0&&gt.vertexColors.push(new L(P));i.faces.push(q),i.faces.push(gt)}else{if(q=new R,q.a=p[H++],q.b=p[H++],q.c=p[H++],$&&($=p[H++],q.materialIndex=$),$=i.faces.length,o)for(o=0;o<B;o++)for(Ct=n.uvs[o],i.faceVertexUvs[o][$]=[],l=0;3>l;l++)wt=p[H++],Vt=Ct[2*wt],wt=Ct[2*wt+1],Vt=new s(Vt,wt),i.faceVertexUvs[o][$].push(Vt);if(rt&&(rt=3*p[H++],q.normal.set(w[rt++],w[rt++],w[rt])),xt)for(o=0;3>o;o++)rt=3*p[H++],xt=new u(w[rt++],w[rt++],w[rt]),q.vertexNormals.push(xt);if(P&&(P=p[H++],q.color.setHex(A[P])),y)for(o=0;3>o;o++)P=p[H++],q.vertexColors.push(new L(A[P]));i.faces.push(q)}}if(n=t,H=n.influencesPerVertex!==void 0?n.influencesPerVertex:2,n.skinWeights)for(f=0,p=n.skinWeights.length;f<p;f+=H)i.skinWeights.push(new _(n.skinWeights[f],1<H?n.skinWeights[f+1]:0,2<H?n.skinWeights[f+2]:0,3<H?n.skinWeights[f+3]:0));if(n.skinIndices)for(f=0,p=n.skinIndices.length;f<p;f+=H)i.skinIndices.push(new _(n.skinIndices[f],1<H?n.skinIndices[f+1]:0,2<H?n.skinIndices[f+2]:0,3<H?n.skinIndices[f+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."),f=t,p=f.scale,f.morphTargets!==void 0)for(n=0,H=f.morphTargets.length;n<H;n++)for(i.morphTargets[n]={},i.morphTargets[n].name=f.morphTargets[n].name,i.morphTargets[n].vertices=[],w=i.morphTargets[n].vertices,A=f.morphTargets[n].vertices,B=0,y=A.length;B<y;B+=3)P=new u,P.x=A[B]*p,P.y=A[B+1]*p,P.z=A[B+2]*p,w.push(P);if(f.morphColors!==void 0&&0<f.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),p=i.faces,f=f.morphColors[0].colors,n=0,H=p.length;n<H;n++)p[n].color.fromArray(f,3*n);for(f=t,n=[],H=[],f.animation!==void 0&&H.push(f.animation),f.animations!==void 0&&(f.animations.length?H=H.concat(f.animations):H.push(f.animations)),f=0;f<H.length;f++)(p=_r.parseAnimation(H[f],i.bones))&&n.push(p);return i.morphTargets&&(H=_r.CreateClipsFromMorphTargetSequences(i.morphTargets,10),n=n.concat(H)),0<n.length&&(i.animations=n),i.computeFaceNormals(),i.computeBoundingSphere(),t.materials===void 0||t.materials.length===0?{geometry:i}:(t=Do.prototype.initMaterials(t.materials,this.resourcePath||e,this.crossOrigin),{geometry:i,materials:t})}}()}),Object.assign(ul.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,l=this.path===void 0?Us.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||l,l=new Lt(o.manager),l.setPath(this.path),l.load(t,function(f){var p=null;try{p=JSON.parse(f)}catch(y){n!==void 0&&n(y),console.error("THREE:ObjectLoader: Can't parse "+t+".",y.message);return}f=p.metadata,f===void 0||f.type===void 0||f.type.toLowerCase()==="geometry"?console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead."):o.parse(p,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 Qn().fromJSON(t[i]);e[o.uuid]=o}return e},parseGeometries:function(t,e){var i={};if(t!==void 0)for(var n=new zs,o=new Nh,l=0,f=t.length;l<f;l++){var p=t[l];switch(p.type){case"PlaneGeometry":case"PlaneBufferGeometry":var y=new yn[p.type](p.width,p.height,p.widthSegments,p.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":y=new yn[p.type](p.width,p.height,p.depth,p.widthSegments,p.heightSegments,p.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":y=new yn[p.type](p.radius,p.segments,p.thetaStart,p.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":y=new yn[p.type](p.radiusTop,p.radiusBottom,p.height,p.radialSegments,p.heightSegments,p.openEnded,p.thetaStart,p.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":y=new yn[p.type](p.radius,p.height,p.radialSegments,p.heightSegments,p.openEnded,p.thetaStart,p.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":y=new yn[p.type](p.radius,p.widthSegments,p.heightSegments,p.phiStart,p.phiLength,p.thetaStart,p.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":y=new yn[p.type](p.radius,p.detail);break;case"RingGeometry":case"RingBufferGeometry":y=new yn[p.type](p.innerRadius,p.outerRadius,p.thetaSegments,p.phiSegments,p.thetaStart,p.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":y=new yn[p.type](p.radius,p.tube,p.radialSegments,p.tubularSegments,p.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":y=new yn[p.type](p.radius,p.tube,p.tubularSegments,p.radialSegments,p.p,p.q);break;case"LatheGeometry":case"LatheBufferGeometry":y=new yn[p.type](p.points,p.segments,p.phiStart,p.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":y=new yn[p.type](p.vertices,p.indices,p.radius,p.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":y=[];for(var w=0,A=p.shapes.length;w<A;w++){var P=e[p.shapes[w]];y.push(P)}y=new yn[p.type](y,p.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(y=[],w=0,A=p.shapes.length;w<A;w++)P=e[p.shapes[w]],y.push(P);w=p.options.extrudePath,w!==void 0&&(p.options.extrudePath=new hh[w.type]().fromJSON(w)),y=new yn[p.type](y,p.options);break;case"BufferGeometry":y=o.parse(p);break;case"Geometry":y=n.parse(p,this.resourcePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+p.type+'"');continue}y.uuid=p.uuid,p.name!==void 0&&(y.name=p.name),y.isBufferGeometry===!0&&p.userData!==void 0&&(y.userData=p.userData),i[p.uuid]=y}return i},parseMaterials:function(t,e){var i={},n={};if(t!==void 0){var o=new ih;o.setTextures(e),e=0;for(var l=t.length;e<l;e++){var f=t[e];if(f.type==="MultiMaterial"){for(var p=[],y=0;y<f.materials.length;y++){var w=f.materials[y];i[w.uuid]===void 0&&(i[w.uuid]=o.parse(w)),p.push(i[w.uuid])}n[f.uuid]=p}else n[f.uuid]=o.parse(f),i[f.uuid]=n[f.uuid]}}return n},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],o=_r.parse(n);n.uuid!==void 0&&(o.uuid=n.uuid),e.push(o)}return e},parseImages:function(t,e){function i(B){return n.manager.itemStart(B),l.load(B,function(){n.manager.itemEnd(B)},void 0,function(){n.manager.itemError(B),n.manager.itemEnd(B)})}var n=this,o={};if(t!==void 0&&0<t.length){e=new es(e);var l=new ai(e);l.setCrossOrigin(this.crossOrigin),e=0;for(var f=t.length;e<f;e++){var p=t[e],y=p.url;if(Array.isArray(y)){o[p.uuid]=[];for(var w=0,A=y.length;w<A;w++){var P=y[w];P=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(P)?P:n.resourcePath+P,o[p.uuid].push(i(P))}}else P=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(p.url)?p.url:n.resourcePath+p.url,o[p.uuid]=i(P)}}return o},parseTextures:function(t,e){function i(y,w){return typeof y=="number"?y:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",y),w[y])}var n={};if(t!==void 0)for(var o=0,l=t.length;o<l;o++){var f=t[o];f.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',f.uuid),e[f.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",f.image);var p=Array.isArray(e[f.image])?new z(e[f.image]):new g(e[f.image]);p.needsUpdate=!0,p.uuid=f.uuid,f.name!==void 0&&(p.name=f.name),f.mapping!==void 0&&(p.mapping=i(f.mapping,Uu)),f.offset!==void 0&&p.offset.fromArray(f.offset),f.repeat!==void 0&&p.repeat.fromArray(f.repeat),f.center!==void 0&&p.center.fromArray(f.center),f.rotation!==void 0&&(p.rotation=f.rotation),f.wrap!==void 0&&(p.wrapS=i(f.wrap[0],Zn),p.wrapT=i(f.wrap[1],Zn)),f.format!==void 0&&(p.format=f.format),f.minFilter!==void 0&&(p.minFilter=i(f.minFilter,uh)),f.magFilter!==void 0&&(p.magFilter=i(f.magFilter,uh)),f.anisotropy!==void 0&&(p.anisotropy=f.anisotropy),f.flipY!==void 0&&(p.flipY=f.flipY),n[f.uuid]=p}return n},parseObject:function(t,e,i){function n(w){return e[w]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",w),e[w]}function o(w){if(w!==void 0){if(Array.isArray(w)){for(var A=[],P=0,B=w.length;P<B;P++){var H=w[P];i[H]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",H),A.push(i[H])}return A}return i[w]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",w),i[w]}}switch(t.type){case"Scene":var l=new Xn;t.background!==void 0&&Number.isInteger(t.background)&&(l.background=new L(t.background)),t.fog!==void 0&&(t.fog.type==="Fog"?l.fog=new Sn(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(l.fog=new Re(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":l=new _e(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(l.focus=t.focus),t.zoom!==void 0&&(l.zoom=t.zoom),t.filmGauge!==void 0&&(l.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(l.filmOffset=t.filmOffset),t.view!==void 0&&(l.view=Object.assign({},t.view));break;case"OrthographicCamera":l=new Ta(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(l.zoom=t.zoom),t.view!==void 0&&(l.view=Object.assign({},t.view));break;case"AmbientLight":l=new Ds(t.color,t.intensity);break;case"DirectionalLight":l=new xo(t.color,t.intensity);break;case"PointLight":l=new Is(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":l=new eh(t.color,t.intensity,t.width,t.height);break;case"SpotLight":l=new hl(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":l=new al(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":l=n(t.geometry);var f=o(t.material);l=l.bones&&0<l.bones.length?new Gi(l,f):new pi(l,f);break;case"LOD":l=new rn;break;case"Line":l=new ji(n(t.geometry),o(t.material),t.mode);break;case"LineLoop":l=new co(n(t.geometry),o(t.material));break;case"LineSegments":l=new gi(n(t.geometry),o(t.material));break;case"PointCloud":case"Points":l=new la(n(t.geometry),o(t.material));break;case"Sprite":l=new nn(o(t.material));break;case"Group":l=new ci;break;default:l=new N}if(l.uuid=t.uuid,t.name!==void 0&&(l.name=t.name),t.matrix!==void 0?(l.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(l.matrixAutoUpdate=t.matrixAutoUpdate),l.matrixAutoUpdate&&l.matrix.decompose(l.position,l.quaternion,l.scale)):(t.position!==void 0&&l.position.fromArray(t.position),t.rotation!==void 0&&l.rotation.fromArray(t.rotation),t.quaternion!==void 0&&l.quaternion.fromArray(t.quaternion),t.scale!==void 0&&l.scale.fromArray(t.scale)),t.castShadow!==void 0&&(l.castShadow=t.castShadow),t.receiveShadow!==void 0&&(l.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(l.shadow.bias=t.shadow.bias),t.shadow.radius!==void 0&&(l.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&l.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(l.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(l.visible=t.visible),t.frustumCulled!==void 0&&(l.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(l.renderOrder=t.renderOrder),t.userData!==void 0&&(l.userData=t.userData),t.layers!==void 0&&(l.layers.mask=t.layers),t.children!==void 0){f=t.children;for(var p=0;p<f.length;p++)l.add(this.parseObject(f[p],e,i))}if(t.type==="LOD")for(t=t.levels,f=0;f<t.length;f++){p=t[f];var y=l.getObjectByProperty("uuid",p.object);y!==void 0&&l.addLevel(y,p.distance)}return l}});var Uu={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Zn={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},uh={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};Fh.prototype={constructor:Fh,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,l=Mo.get(t);if(l!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(l),o.manager.itemEnd(t)},0),l;fetch(t).then(function(f){return f.blob()}).then(function(f){return createImageBitmap(f,o.options)}).then(function(f){Mo.add(t,f),e&&e(f),o.manager.itemEnd(t)}).catch(function(f){n&&n(f),o.manager.itemError(t),o.manager.itemEnd(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(nh.prototype,{moveTo:function(t,e){this.currentPath=new fr,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,l){this.currentPath.bezierCurveTo(t,e,i,n,o,l)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(rt){for(var xt=[],gt=0,Ct=rt.length;gt<Ct;gt++){var wt=rt[gt],Vt=new Qn;Vt.curves=wt.curves,xt.push(Vt)}return xt}function n(rt,xt){for(var gt=xt.length,Ct=!1,wt=gt-1,Vt=0;Vt<gt;wt=Vt++){var J=xt[wt],ot=xt[Vt],zt=ot.x-J.x,ee=ot.y-J.y;if(Math.abs(ee)>Number.EPSILON){if(0>ee&&(J=xt[Vt],zt=-zt,ot=xt[wt],ee=-ee),!(rt.y<J.y||rt.y>ot.y))if(rt.y===J.y){if(rt.x===J.x)return!0}else{if(wt=ee*(rt.x-J.x)-zt*(rt.y-J.y),wt===0)return!0;0>wt||(Ct=!Ct)}}else if(rt.y===J.y&&(ot.x<=rt.x&&rt.x<=J.x||J.x<=rt.x&&rt.x<=ot.x))return!0}return Ct}var o=To.isClockWise,l=this.subPaths;if(l.length===0)return[];if(e===!0)return i(l);if(e=[],l.length===1){var f=l[0],p=new Qn;return p.curves=f.curves,e.push(p),e}var y=!o(l[0].getPoints());y=t?!y:y,p=[];var w=[],A=[],P=0;w[P]=void 0,A[P]=[];for(var B=0,H=l.length;B<H;B++){f=l[B];var q=f.getPoints(),$=o(q);($=t?!$:$)?(!y&&w[P]&&P++,w[P]={s:new Qn,p:q},w[P].s.curves=f.curves,y&&P++,A[P]=[]):A[P].push({h:f,p:q[0]})}if(!w[0])return i(l);if(1<w.length){for(B=!1,t=[],o=0,l=w.length;o<l;o++)p[o]=[];for(o=0,l=w.length;o<l;o++)for(f=A[o],$=0;$<f.length;$++){for(y=f[$],P=!0,q=0;q<w.length;q++)n(y.p,w[q].p)&&(o!==q&&t.push({froms:o,tos:q,hole:$}),P?(P=!1,p[q].push(y)):B=!0);P&&p[o].push(y)}0<t.length&&(B||(A=p))}for(B=0,o=w.length;B<o;B++)for(p=w[B].s,e.push(p),t=A[B],l=0,f=t.length;l<f;l++)p.holes.push(t[l].h);return e}}),Object.assign(Uh.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 l=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*n;t=[];for(var f=0,p=0,y=0;y<o.length;y++){var w=o[y];if(w===`
2571
- `)f=0,p-=l;else{var A=n,P=f,B=p;if(w=e.glyphs[w]||e.glyphs["?"]){var H=new nh;if(w.o)for(var q=w._cachedOutline||(w._cachedOutline=w.o.split(" ")),$=0,rt=q.length;$<rt;)switch(q[$++]){case"m":var xt=q[$++]*A+P,gt=q[$++]*A+B;H.moveTo(xt,gt);break;case"l":xt=q[$++]*A+P,gt=q[$++]*A+B,H.lineTo(xt,gt);break;case"q":var Ct=q[$++]*A+P,wt=q[$++]*A+B,Vt=q[$++]*A+P,J=q[$++]*A+B;H.quadraticCurveTo(Vt,J,Ct,wt);break;case"b":Ct=q[$++]*A+P,wt=q[$++]*A+B,Vt=q[$++]*A+P,J=q[$++]*A+B,xt=q[$++]*A+P,gt=q[$++]*A+B,H.bezierCurveTo(Vt,J,xt,gt,Ct,wt)}A={offsetX:w.ha*A,path:H}}else A=void 0;f+=A.offsetX,t.push(A.path)}}for(e=0,o=t.length;e<o;e++)Array.prototype.push.apply(i,t[e].toShapes());return i}}),Object.assign(Lu.prototype,{load:function(t,e,i,n){var o=this,l=new Lt(this.manager);l.setPath(this.path),l.load(t,function(f){try{var p=JSON.parse(f)}catch{console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),p=JSON.parse(f.substring(65,f.length-2))}f=o.parse(p),e&&e(f)},i,n)},parse:function(t){return new Uh(t)},setPath:function(t){return this.path=t,this}});var ch,$h={getContext:function(){return ch===void 0&&(ch=new(window.AudioContext||window.webkitAudioContext)),ch},setContext:function(t){ch=t}};Object.assign(vn.prototype,{load:function(t,e,i,n){var o=new Lt(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.load(t,function(l){l=l.slice(0),$h.getContext().decodeAudioData(l,function(f){e(f)})},i,n)},setPath:function(t){return this.path=t,this}}),Object.assign(Vn.prototype,{update:function(){var t,e,i,n,o,l,f,p,y=new c,w=new c;return function(A){if(t!==this||e!==A.focus||i!==A.fov||n!==A.aspect*this.aspect||o!==A.near||l!==A.far||f!==A.zoom||p!==this.eyeSep){t=this,e=A.focus,i=A.fov,n=A.aspect*this.aspect,o=A.near,l=A.far,f=A.zoom;var P=A.projectionMatrix.clone();p=this.eyeSep/2;var B=p*o/e,H=o*Math.tan(di.DEG2RAD*i*.5)/f;w.elements[12]=-p,y.elements[12]=p;var q=-H*n+B,$=H*n+B;P.elements[0]=2*o/($-q),P.elements[8]=($+q)/($-q),this.cameraL.projectionMatrix.copy(P),q=-H*n-B,$=H*n-B,P.elements[0]=2*o/($-q),P.elements[8]=($+q)/($-q),this.cameraR.projectionMatrix.copy(P)}this.cameraL.matrixWorld.copy(A.matrixWorld).multiply(w),this.cameraR.matrixWorld.copy(A.matrixWorld).multiply(y)}}()}),cl.prototype=Object.create(N.prototype),cl.prototype.constructor=cl,Object.assign(Gh.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}}),rh.prototype=Object.assign(Object.create(N.prototype),{constructor:rh,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 u,e=new d,i=new u,n=new u,o=new Gh;return function(l){N.prototype.updateMatrixWorld.call(this,l),l=this.context.listener;var f=this.up;if(this.timeDelta=o.getDelta(),this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),l.positionX){var p=this.context.currentTime+this.timeDelta;l.positionX.linearRampToValueAtTime(t.x,p),l.positionY.linearRampToValueAtTime(t.y,p),l.positionZ.linearRampToValueAtTime(t.z,p),l.forwardX.linearRampToValueAtTime(n.x,p),l.forwardY.linearRampToValueAtTime(n.y,p),l.forwardZ.linearRampToValueAtTime(n.z,p),l.upX.linearRampToValueAtTime(f.x,p),l.upY.linearRampToValueAtTime(f.y,p),l.upZ.linearRampToValueAtTime(f.z,p)}else l.setPosition(t.x,t.y,t.z),l.setOrientation(n.x,n.y,n.z,f.x,f.y,f.z)}}()}),Ma.prototype=Object.assign(Object.create(N.prototype),{constructor:Ma,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}}),fl.prototype=Object.assign(Object.create(Ma.prototype),{constructor:fl,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 u,e=new d,i=new u,n=new u;return function(o){if(N.prototype.updateMatrixWorld.call(this,o),o=this.panner,this.matrixWorld.decompose(t,e,i),n.set(0,0,1).applyQuaternion(e),o.positionX){var l=this.context.currentTime+this.listener.timeDelta;o.positionX.linearRampToValueAtTime(t.x,l),o.positionY.linearRampToValueAtTime(t.y,l),o.positionZ.linearRampToValueAtTime(t.z,l),o.orientationX.linearRampToValueAtTime(n.x,l),o.orientationY.linearRampToValueAtTime(n.y,l),o.orientationZ.linearRampToValueAtTime(n.z,l)}else o.setPosition(t.x,t.y,t.z),o.setOrientation(n.x,n.y,n.z)}}()}),Object.assign(ks.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(dl.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 l=e+e;n!==l;++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){d.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,o){for(var l=1-n,f=0;f!==o;++f){var p=e+f;t[p]=t[p]*l+t[i+f]*n}}}),Object.assign(Bs.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(En,{Composite:Bs,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new En.Composite(t,e,i):new En(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+"$"),l=["material","materials","bones"];return function(f){var p=o.exec(f);if(!p)throw Error("PropertyBinding: Cannot parse trackName: "+f);p={nodeName:p[2],objectName:p[3],objectIndex:p[4],propertyName:p[5],propertyIndex:p[6]};var y=p.nodeName&&p.nodeName.lastIndexOf(".");if(y!==void 0&&y!==-1){var w=p.nodeName.substring(y+1);l.indexOf(w)!==-1&&(p.nodeName=p.nodeName.substring(0,y),p.objectName=w)}if(p.propertyName===null||p.propertyName.length===0)throw Error("PropertyBinding: can not parse propertyName from trackName: "+f);return p}}(),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 l=0;l<o.length;l++){var f=o[l];if(f.name===e||f.uuid===e||(f=n(f.children)))return f}return null};if(t=n(t.children))return t}return null}}),Object.assign(En.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=En.findNode(this.rootNode,e.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var l=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===l){l=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(l!==void 0){if(t[l]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[l]}}if(l=t[n],l===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=l,this.propertyIndex=o}else l.fromArray!==void 0&&l.toArray!==void 0?(i=this.BindingType.HasFromToArray,this.resolvedProperty=l):Array.isArray(l)?(i=this.BindingType.EntireArray,this.resolvedProperty=l):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(En.prototype,{_getValue_unbound:En.prototype.getValue,_setValue_unbound:En.prototype.setValue}),Object.assign(Sa.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._paths,l=this._parsedPaths,f=this._bindings,p=f.length,y=void 0,w=0,A=arguments.length;w!==A;++w){var P=arguments[w],B=P.uuid,H=n[B];if(H===void 0){H=e++,n[B]=H,t.push(P),B=0;for(var q=p;B!==q;++B)f[B].push(new En(P,o[B],l[B]))}else if(H<i){y=t[H];var $=--i;for(q=t[$],n[q.uuid]=H,t[H]=q,n[B]=$,t[$]=P,B=0,q=p;B!==q;++B){var rt=f[B],xt=rt[H];rt[H]=rt[$],xt===void 0&&(xt=new En(P,o[B],l[B])),rt[$]=xt}}else t[H]!==y&&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,l=0,f=arguments.length;l!==f;++l){var p=arguments[l],y=p.uuid,w=i[y];if(w!==void 0&&w>=e){var A=e++,P=t[A];for(i[P.uuid]=w,t[w]=P,i[y]=A,t[A]=p,p=0,y=o;p!==y;++p){P=n[p];var B=P[w];P[w]=P[A],P[A]=B}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._bindings,l=o.length,f=0,p=arguments.length;f!==p;++f){var y=arguments[f].uuid,w=n[y];if(w!==void 0)if(delete n[y],w<i){y=--i;var A=t[y],P=--e,B=t[P];for(n[A.uuid]=w,t[w]=A,n[B.uuid]=y,t[y]=B,t.pop(),A=0,B=l;A!==B;++A){var H=o[A],q=H[P];H[w]=H[y],H[y]=q,H.pop()}}else for(P=--e,B=t[P],n[B.uuid]=w,t[w]=B,t.pop(),A=0,B=l;A!==B;++A)H=o[A],H[w]=H[P],H.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 l=this._paths,f=this._parsedPaths,p=this._objects,y=this.nCachedObjects_,w=Array(p.length);for(n=o.length,i[t]=n,l.push(t),f.push(e),o.push(w),i=y,n=p.length;i!==n;++i)w[i]=new En(p[i],t,e);return w},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){var n=this._paths,o=this._parsedPaths,l=this._bindings,f=l.length-1,p=l[f];e[t[f]]=i,l[i]=p,l.pop(),o[i]=o[f],o.pop(),n[i]=n[f],n.pop()}}}),Object.assign(pl.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,l=this._timeScaleInterpolant,f=this.timeScale;return l===null&&(this._timeScaleInterpolant=l=n._lendControlInterpolant()),n=l.parameterPositions,l=l.sampleValues,n[0]=o,n[1]=o+i,l[0]=t/f,l[1]=e/f,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 l=0,f=e.length;l!==f;++l)e[l].evaluate(i),o[l].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,l=n===2202;if(t===0)return o===-1?e:l&&(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,l)):this._setEndings(this.repetitions===0,!0,l)),e>=i||0>e){n=Math.floor(e/i),e-=i*n,o+=Math.abs(n);var f=this.repetitions-o;0>=f?(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})):(f===1?(t=0>t,this._setEndings(t,!t,l)):this._setEndings(!1,!1,l),this._loopCount=o,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n}))}if(l&&(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,l=this._weightInterpolant;return l===null&&(this._weightInterpolant=l=n._lendControlInterpolant()),n=l.parameterPositions,l=l.sampleValues,n[0]=o,l[0]=e,n[1]=o+t,l[1]=i,this}}),rs.prototype=Object.assign(Object.create(a.prototype),{constructor:rs,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,o=n.length,l=t._propertyBindings;t=t._interpolants;var f=i.uuid,p=this._bindingsByRootAndName,y=p[f];for(y===void 0&&(y={},p[f]=y),p=0;p!==o;++p){var w=n[p],A=w.name,P=y[A];if(P===void 0){if(P=l[p],P!==void 0){P._cacheIndex===null&&(++P.referenceCount,this._addInactiveBinding(P,f,A));continue}P=new dl(En.create(i,A,e&&e._propertyBindings[p].binding.parsedPath),w.ValueTypeName,w.getValueSize()),++P.referenceCount,this._addInactiveBinding(P,f,A)}l[p]=P,t[p].resultBuffer=P.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,l=o[e];l===void 0?(l={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,o[e]=l):(e=l.knownActions,t._byClipCacheIndex=e.length,e.push(t)),t._cacheIndex=n.length,n.push(t),l.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,l=o[o.length-1],f=t._byClipCacheIndex;l._byClipCacheIndex=f,o[f]=l,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],l=this._bindings;o===void 0&&(o={},n[e]=o),o[i]=t,t._cacheIndex=l.length,l.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid;i=i.path;var o=this._bindingsByRootAndName,l=o[n],f=e[e.length-1];t=t._cacheIndex,f._cacheIndex=t,e[t]=f,e.pop(),delete l[i];t:{for(var p in l)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 Dr(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"?_r.findByName(i,t):t,t=i!==null?i.uuid:t;var o=this._actionsByClip[t],l=null;if(o!==void 0){if(l=o.actionByRoot[n],l!==void 0)return l;l=o.knownActions[0],i===null&&(i=l._clip)}return i===null?null:(e=new pl(this,i,e),this._bindAction(e,l),this._addInactiveAction(e,t,n),e)},existingAction:function(t,e){var i=e||this._root;return e=i.uuid,i=typeof t=="string"?_r.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),l=this._accuIndex^=1,f=0;f!==i;++f)e[f]._update(n,t,o,l);for(t=this._bindings,e=this._nActiveBindings,f=0;f!==e;++f)t[f].apply(l);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,l=n.length;o!==l;++o){var f=n[o];this._deactivateAction(f);var p=f._cacheIndex,y=e[e.length-1];f._cacheIndex=null,f._byClipCacheIndex=null,y._cacheIndex=p,e[p]=y,e.pop(),this._removeInactiveBindingsForAction(f)}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))}}),oh.prototype.clone=function(){return new oh(this.value.clone===void 0?this.value:this.value.clone())},Hh.prototype=Object.assign(Object.create(Ft.prototype),{constructor:Hh,isInstancedBufferGeometry:!0,copy:function(t){return Ft.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return new this.constructor().copy(this)}}),Vh.prototype=Object.assign(Object.create(ki.prototype),{constructor:Vh,isInstancedInterleavedBuffer:!0,copy:function(t){return ki.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Wh.prototype=Object.assign(Object.create(K.prototype),{constructor:Wh,isInstancedBufferAttribute:!0,copy:function(t){return K.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Ru.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||[],Ns(t,this,i,e),i.sort(ml),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++)Ns(t[n],this,i,e);return i.sort(ml),i}}),Object.assign(jh.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(di.clamp(e/this.radius,-1,1))),this}}),Object.assign(it.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(os.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 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}}(),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 s),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 s),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 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))},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 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()}}(),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(Ea.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 u),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 u),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 u),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new u,e=new u;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=di.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 u),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)}}),qn.prototype=Object.create(N.prototype),qn.prototype.constructor=qn,qn.prototype.isImmediateRenderObject=!0,_i.prototype=Object.create(gi.prototype),_i.prototype.constructor=_i,_i.prototype.update=function(){var t=new u,e=new u,i=new m;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var o=this.object.matrixWorld,l=this.geometry.attributes.position,f=this.object.geometry;if(f&&f.isGeometry)for(var p=f.vertices,y=f.faces,w=f=0,A=y.length;w<A;w++)for(var P=y[w],B=0,H=P.vertexNormals.length;B<H;B++){var q=P.vertexNormals[B];t.copy(p[P[n[B]]]).applyMatrix4(o),e.copy(q).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),l.setXYZ(f,t.x,t.y,t.z),f+=1,l.setXYZ(f,e.x,e.y,e.z),f+=1}else if(f&&f.isBufferGeometry)for(n=f.attributes.position,p=f.attributes.normal,B=f=0,H=n.count;B<H;B++)t.set(n.getX(B),n.getY(B),n.getZ(B)).applyMatrix4(o),e.set(p.getX(B),p.getY(B),p.getZ(B)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),l.setXYZ(f,t.x,t.y,t.z),f+=1,l.setXYZ(f,e.x,e.y,e.z),f+=1;l.needsUpdate=!0}}(),ba.prototype=Object.create(N.prototype),ba.prototype.constructor=ba,ba.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},ba.prototype.update=function(){var t=new u,e=new u;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)}}(),Ca.prototype=Object.create(gi.prototype),Ca.prototype.constructor=Ca,Ca.prototype.updateMatrixWorld=function(){var t=new u,e=new c,i=new c;return function(n){var o=this.bones,l=this.geometry,f=l.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var p=0,y=0;p<o.length;p++){var w=o[p];w.parent&&w.parent.isBone&&(e.multiplyMatrices(i,w.matrixWorld),t.setFromMatrixPosition(e),f.setXYZ(y,t.x,t.y,t.z),e.multiplyMatrices(i,w.parent.matrixWorld),t.setFromMatrixPosition(e),f.setXYZ(y+1,t.x,t.y,t.z),y+=2)}l.getAttribute("position").needsUpdate=!0,N.prototype.updateMatrixWorld.call(this,n)}}(),kr.prototype=Object.create(pi.prototype),kr.prototype.constructor=kr,kr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},kr.prototype.update=function(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Aa.prototype=Object.create(N.prototype),Aa.prototype.constructor=Aa,Aa.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Aa.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)},Pa.prototype=Object.create(N.prototype),Pa.prototype.constructor=Pa,Pa.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Pa.prototype.update=function(){var t=new u,e=new L,i=new L;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 l=0,f=o.count;l<f;l++){var p=l<f/2?e:i;o.setXYZ(l,p.r,p.g,p.b)}o.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),gl.prototype=Object.create(gi.prototype),gl.prototype.constructor=gl,sh.prototype=Object.create(gi.prototype),sh.prototype.constructor=sh,vl.prototype=Object.create(gi.prototype),vl.prototype.constructor=vl,vl.prototype.update=function(){var t=new u,e=new u,i=new m;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var n=this.object.matrixWorld,o=this.geometry.attributes.position,l=this.object.geometry,f=l.vertices;l=l.faces;for(var p=0,y=0,w=l.length;y<w;y++){var A=l[y],P=A.normal;t.copy(f[A.a]).add(f[A.b]).add(f[A.c]).divideScalar(3).applyMatrix4(n),e.copy(P).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(p,t.x,t.y,t.z),p+=1,o.setXYZ(p,e.x,e.y,e.z),p+=1}o.needsUpdate=!0}}(),dr.prototype=Object.create(N.prototype),dr.prototype.constructor=dr,dr.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},dr.prototype.update=function(){var t=new u,e=new u,i=new u;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()}}(),yl.prototype=Object.create(gi.prototype),yl.prototype.constructor=yl,yl.prototype.update=function(){function t(l,f,p,y){if(n.set(f,p,y).unproject(o),l=i[l],l!==void 0)for(f=e.getAttribute("position"),p=0,y=l.length;p<y;p++)f.setXYZ(l[p],n.x,n.y,n.z)}var e,i,n=new u,o=new Be;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}}(),zo.prototype=Object.create(gi.prototype),zo.prototype.constructor=zo,zo.prototype.update=function(){var t=new k;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()}}}(),zo.prototype.setFromObject=function(t){return this.object=t,this.update(),this},zo.prototype.copy=function(t){return gi.prototype.copy.call(this,t),this.object=t.object,this},zo.prototype.clone=function(){return new this.constructor().copy(this)},_l.prototype=Object.create(gi.prototype),_l.prototype.constructor=_l,_l.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),N.prototype.updateMatrixWorld.call(this,t))},xl.prototype=Object.create(ji.prototype),xl.prototype.constructor=xl,xl.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),N.prototype.updateMatrixWorld.call(this,t)};var fh,Sl;ko.prototype=Object.create(N.prototype),ko.prototype.constructor=ko,ko.prototype.setDirection=function(){var t=new u,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))}}(),ko.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()},ko.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},ko.prototype.copy=function(t){return N.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},ko.prototype.clone=function(){return new this.constructor().copy(this)},xr.prototype=Object.create(gi.prototype),xr.prototype.constructor=xr,Ee.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ee.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(Io.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 u(o.x,o.y,o.z||0))}return e}}),Object.assign(fr.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Iu.prototype=Object.create(On.prototype),Du.prototype=Object.create(On.prototype),Xh.prototype=Object.create(On.prototype),Object.assign(Xh.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.")}}),gl.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Ca.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Do.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Us.extractUrlBase(t)}}),Object.assign(zs.prototype,{setTexturePath:function(t){return console.warn("THREE.JSONLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(ul.prototype,{setTexturePath:function(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(os.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(k.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)}}),Ea.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(di,{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()."),di.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),di.ceilPowerOfTwo(t)}}),Object.assign(m.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(c.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 u),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,l){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,l)}}),F.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},d.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(Si.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(Oe.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(Oe,{barycoordFromPoint:function(t,e,i,n,o){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Oe.getBarycoord(t,e,i,n,o)},normal:function(t,e,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Oe.getNormal(t,e,i,n)}}),Object.assign(Qn.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 Po(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Lo(this,t)}}),Object.assign(s.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(u.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(_.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(N.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(N.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(rn.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(un.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ee.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}}),_e.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(tn.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(K.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(Ft.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(Ft.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(po.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(oh.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(Wt.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 L}},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(Jr.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($e.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(xe.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(xe.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(ye.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(S.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(mi.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}}),Ma.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return new vn().load(t,function(i){e.setBuffer(i)}),this},ks.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},cl.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},ss.crossOrigin=void 0,ss.loadTexture=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var o=new fn;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},ss.loadTextureCube=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var o=new Fi;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},ss.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},ss.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},x.WebGLRenderTargetCube=b,x.WebGLRenderTarget=S,x.WebGLRenderer=xe,x.ShaderLib=wo,x.UniformsLib=qe,x.UniformsUtils=Bn,x.ShaderChunk=Ci,x.FogExp2=Re,x.Fog=Sn,x.Scene=Xn,x.Sprite=nn,x.LOD=rn,x.SkinnedMesh=Gi,x.Skeleton=un,x.Bone=cn,x.Mesh=pi,x.LineSegments=gi,x.LineLoop=co,x.Line=ji,x.Points=la,x.Group=ci,x.VideoTexture=zh,x.DataTexture=O,x.DataTexture3D=Q,x.CompressedTexture=Yo,x.CubeTexture=z,x.CanvasTexture=$a,x.DepthTexture=Ka,x.Texture=g,x.AnimationLoader=Qt,x.CompressedTextureLoader=Zt,x.DataTextureLoader=Ue,x.CubeTextureLoader=Fi,x.TextureLoader=fn,x.ObjectLoader=ul,x.MaterialLoader=ih,x.BufferGeometryLoader=Nh,x.DefaultLoadingManager=tr,x.LoadingManager=es,x.JSONLoader=zs,x.ImageLoader=ai,x.ImageBitmapLoader=Fh,x.FontLoader=Lu,x.FileLoader=Lt,x.Loader=Do,x.LoaderUtils=Us,x.Cache=Mo,x.AudioLoader=vn,x.SpotLightShadow=ll,x.SpotLight=hl,x.PointLight=Is,x.RectAreaLight=eh,x.HemisphereLight=al,x.DirectionalLightShadow=ns,x.DirectionalLight=xo,x.AmbientLight=Ds,x.LightShadow=_o,x.Light=tn,x.StereoCamera=Vn,x.PerspectiveCamera=_e,x.OrthographicCamera=Ta,x.CubeCamera=cl,x.ArrayCamera=Fe,x.Camera=Be,x.AudioListener=rh,x.PositionalAudio=fl,x.AudioContext=$h,x.AudioAnalyser=ks,x.Audio=Ma,x.VectorKeyframeTrack=xa,x.StringKeyframeTrack=th,x.QuaternionKeyframeTrack=_a,x.NumberKeyframeTrack=$r,x.ColorKeyframeTrack=Ql,x.BooleanKeyframeTrack=Kl,x.PropertyMixer=dl,x.PropertyBinding=En,x.KeyframeTrack=Hn,x.AnimationUtils=Yn,x.AnimationObjectGroup=Sa,x.AnimationMixer=rs,x.AnimationClip=_r,x.Uniform=oh,x.InstancedBufferGeometry=Hh,x.BufferGeometry=Ft,x.Geometry=X,x.InterleavedBufferAttribute=Bi,x.InstancedInterleavedBuffer=Vh,x.InterleavedBuffer=ki,x.InstancedBufferAttribute=Wh,x.Face3=R,x.Object3D=N,x.Raycaster=Ru,x.Layers=U,x.EventDispatcher=a,x.Clock=Gh,x.QuaternionLinearInterpolant=ar,x.LinearInterpolant=Dr,x.DiscreteInterpolant=Os,x.CubicInterpolant=sl,x.Interpolant=$n,x.Triangle=Oe,x.Math=di,x.Spherical=jh,x.Cylindrical=it,x.Plane=F,x.Frustum=E,x.Sphere=D,x.Ray=Si,x.Matrix4=c,x.Matrix3=m,x.Box3=k,x.Box2=os,x.Line3=Ea,x.Euler=C,x.Vector4=_,x.Vector3=u,x.Vector2=s,x.Quaternion=d,x.Color=L,x.ImmediateRenderObject=qn,x.VertexNormalsHelper=_i,x.SpotLightHelper=ba,x.SkeletonHelper=Ca,x.PointLightHelper=kr,x.RectAreaLightHelper=Aa,x.HemisphereLightHelper=Pa,x.GridHelper=gl,x.PolarGridHelper=sh,x.FaceNormalsHelper=vl,x.DirectionalLightHelper=dr,x.CameraHelper=yl,x.BoxHelper=zo,x.Box3Helper=_l,x.PlaneHelper=xl,x.ArrowHelper=ko,x.AxesHelper=xr,x.Shape=Qn,x.Path=fr,x.ShapePath=nh,x.Font=Uh,x.CurvePath=Io,x.Curve=Ee,x.ImageUtils=ss,x.ShapeUtils=To,x.WebGLUtils=He,x.WireframeGeometry=ha,x.ParametricGeometry=Qa,x.ParametricBufferGeometry=ua,x.TetrahedronGeometry=tl,x.TetrahedronBufferGeometry=ca,x.OctahedronGeometry=el,x.OctahedronBufferGeometry=_s,x.IcosahedronGeometry=il,x.IcosahedronBufferGeometry=fa,x.DodecahedronGeometry=da,x.DodecahedronBufferGeometry=pa,x.PolyhedronGeometry=Xi,x.PolyhedronBufferGeometry=xi,x.TubeGeometry=gn,x.TubeBufferGeometry=Zo,x.TorusKnotGeometry=Zr,x.TorusKnotBufferGeometry=xs,x.TorusGeometry=ws,x.TorusBufferGeometry=Un,x.TextGeometry=rl,x.TextBufferGeometry=Ms,x.SphereGeometry=Jo,x.SphereBufferGeometry=Or,x.RingGeometry=ol,x.RingBufferGeometry=Ss,x.PlaneGeometry=Pe,x.PlaneBufferGeometry=pe,x.LatheGeometry=va,x.LatheBufferGeometry=$o,x.ShapeGeometry=Lo,x.ShapeBufferGeometry=Ko,x.ExtrudeGeometry=Po,x.ExtrudeBufferGeometry=po,x.EdgesGeometry=Qo,x.ConeGeometry=ya,x.ConeBufferGeometry=Gn,x.CylinderGeometry=Ro,x.CylinderBufferGeometry=Oo,x.CircleGeometry=Es,x.CircleBufferGeometry=mo,x.BoxGeometry=It,x.BoxBufferGeometry=Nt,x.ShadowMaterial=ts,x.SpriteMaterial=Hi,x.RawShaderMaterial=bs,x.ShaderMaterial=$e,x.PointsMaterial=Fn,x.MeshPhysicalMaterial=Cs,x.MeshStandardMaterial=go,x.MeshPhongMaterial=Jr,x.MeshToonMaterial=As,x.MeshNormalMaterial=Ps,x.MeshLambertMaterial=Ir,x.MeshDepthMaterial=se,x.MeshDistanceMaterial=te,x.MeshBasicMaterial=Ge,x.MeshMatcapMaterial=Ls,x.LineDashedMaterial=Rs,x.LineBasicMaterial=Ni,x.Material=Wt,x.Float64BufferAttribute=At,x.Float32BufferAttribute=Et,x.Uint32BufferAttribute=Pt,x.Int32BufferAttribute=G,x.Uint16BufferAttribute=_t,x.Int16BufferAttribute=et,x.Uint8ClampedBufferAttribute=Rt,x.Uint8BufferAttribute=ct,x.Int8BufferAttribute=Z,x.BufferAttribute=K,x.ArcCurve=wa,x.CatmullRomCurve3=On,x.CubicBezierCurve=hr,x.CubicBezierCurve3=Ti,x.EllipseCurve=Kn,x.LineCurve=ur,x.LineCurve3=zr,x.QuadraticBezierCurve=cr,x.QuadraticBezierCurve3=yo,x.SplineCurve=Kr,x.REVISION="98",x.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},x.CullFaceNone=0,x.CullFaceBack=1,x.CullFaceFront=2,x.CullFaceFrontBack=3,x.FrontFaceDirectionCW=0,x.FrontFaceDirectionCCW=1,x.BasicShadowMap=0,x.PCFShadowMap=1,x.PCFSoftShadowMap=2,x.FrontSide=0,x.BackSide=1,x.DoubleSide=2,x.FlatShading=1,x.SmoothShading=2,x.NoColors=0,x.FaceColors=1,x.VertexColors=2,x.NoBlending=0,x.NormalBlending=1,x.AdditiveBlending=2,x.SubtractiveBlending=3,x.MultiplyBlending=4,x.CustomBlending=5,x.AddEquation=100,x.SubtractEquation=101,x.ReverseSubtractEquation=102,x.MinEquation=103,x.MaxEquation=104,x.ZeroFactor=200,x.OneFactor=201,x.SrcColorFactor=202,x.OneMinusSrcColorFactor=203,x.SrcAlphaFactor=204,x.OneMinusSrcAlphaFactor=205,x.DstAlphaFactor=206,x.OneMinusDstAlphaFactor=207,x.DstColorFactor=208,x.OneMinusDstColorFactor=209,x.SrcAlphaSaturateFactor=210,x.NeverDepth=0,x.AlwaysDepth=1,x.LessDepth=2,x.LessEqualDepth=3,x.EqualDepth=4,x.GreaterEqualDepth=5,x.GreaterDepth=6,x.NotEqualDepth=7,x.MultiplyOperation=0,x.MixOperation=1,x.AddOperation=2,x.NoToneMapping=0,x.LinearToneMapping=1,x.ReinhardToneMapping=2,x.Uncharted2ToneMapping=3,x.CineonToneMapping=4,x.UVMapping=300,x.CubeReflectionMapping=301,x.CubeRefractionMapping=302,x.EquirectangularReflectionMapping=303,x.EquirectangularRefractionMapping=304,x.SphericalReflectionMapping=305,x.CubeUVReflectionMapping=306,x.CubeUVRefractionMapping=307,x.RepeatWrapping=1e3,x.ClampToEdgeWrapping=1001,x.MirroredRepeatWrapping=1002,x.NearestFilter=1003,x.NearestMipMapNearestFilter=1004,x.NearestMipMapLinearFilter=1005,x.LinearFilter=1006,x.LinearMipMapNearestFilter=1007,x.LinearMipMapLinearFilter=1008,x.UnsignedByteType=1009,x.ByteType=1010,x.ShortType=1011,x.UnsignedShortType=1012,x.IntType=1013,x.UnsignedIntType=1014,x.FloatType=1015,x.HalfFloatType=1016,x.UnsignedShort4444Type=1017,x.UnsignedShort5551Type=1018,x.UnsignedShort565Type=1019,x.UnsignedInt248Type=1020,x.AlphaFormat=1021,x.RGBFormat=1022,x.RGBAFormat=1023,x.LuminanceFormat=1024,x.LuminanceAlphaFormat=1025,x.RGBEFormat=1023,x.DepthFormat=1026,x.DepthStencilFormat=1027,x.RedFormat=1028,x.RGB_S3TC_DXT1_Format=33776,x.RGBA_S3TC_DXT1_Format=33777,x.RGBA_S3TC_DXT3_Format=33778,x.RGBA_S3TC_DXT5_Format=33779,x.RGB_PVRTC_4BPPV1_Format=35840,x.RGB_PVRTC_2BPPV1_Format=35841,x.RGBA_PVRTC_4BPPV1_Format=35842,x.RGBA_PVRTC_2BPPV1_Format=35843,x.RGB_ETC1_Format=36196,x.RGBA_ASTC_4x4_Format=37808,x.RGBA_ASTC_5x4_Format=37809,x.RGBA_ASTC_5x5_Format=37810,x.RGBA_ASTC_6x5_Format=37811,x.RGBA_ASTC_6x6_Format=37812,x.RGBA_ASTC_8x5_Format=37813,x.RGBA_ASTC_8x6_Format=37814,x.RGBA_ASTC_8x8_Format=37815,x.RGBA_ASTC_10x5_Format=37816,x.RGBA_ASTC_10x6_Format=37817,x.RGBA_ASTC_10x8_Format=37818,x.RGBA_ASTC_10x10_Format=37819,x.RGBA_ASTC_12x10_Format=37820,x.RGBA_ASTC_12x12_Format=37821,x.LoopOnce=2200,x.LoopRepeat=2201,x.LoopPingPong=2202,x.InterpolateDiscrete=2300,x.InterpolateLinear=2301,x.InterpolateSmooth=2302,x.ZeroCurvatureEnding=2400,x.ZeroSlopeEnding=2401,x.WrapAroundEnding=2402,x.TrianglesDrawMode=0,x.TriangleStripDrawMode=1,x.TriangleFanDrawMode=2,x.LinearEncoding=3e3,x.sRGBEncoding=3001,x.GammaEncoding=3007,x.RGBEEncoding=3002,x.LogLuvEncoding=3003,x.RGBM7Encoding=3004,x.RGBM16Encoding=3005,x.RGBDEncoding=3006,x.BasicDepthPacking=3200,x.RGBADepthPacking=3201,x.TangentSpaceNormalMap=0,x.ObjectSpaceNormalMap=1,x.CubeGeometry=It,x.Face4=function(t,e,i,n,o,l,f){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new R(t,e,i,o,l,f)},x.LineStrip=0,x.LinePieces=1,x.MeshFaceMaterial=function(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t},x.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},x.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new la(t,e)},x.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new nn(t)},x.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new la(t,e)},x.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Fn(t)},x.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Fn(t)},x.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Fn(t)},x.Vertex=function(t,e,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new u(t,e,i)},x.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new K(t,e).setDynamic(!0)},x.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Z(t,e)},x.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new ct(t,e)},x.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Rt(t,e)},x.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new et(t,e)},x.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new _t(t,e)},x.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new G(t,e)},x.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Pt(t,e)},x.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Et(t,e)},x.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new At(t,e)},x.ClosedSplineCurve3=Iu,x.SplineCurve3=Du,x.Spline=Xh,x.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new xr(t)},x.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new zo(t,e)},x.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new gi(new Qo(t.geometry),new Ni({color:e!==void 0?e:16777215}))},x.WireframeHelper=function(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new gi(new ha(t.geometry),new Ni({color:e!==void 0?e:16777215}))},x.XHRLoader=function(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Lt(t)},x.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Ue(t)},x.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()}},x.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().")}},x.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},x.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")}},x.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(x,"__esModule",{value:!0})}),THREE.Sky=function(){var x=THREE.Sky.SkyShader,a=new THREE.ShaderMaterial({fragmentShader:x.fragmentShader,vertexShader:x.vertexShader,uniforms:THREE.UniformsUtils.clone(x.uniforms),side:THREE.BackSide});THREE.Mesh.call(this,new THREE.BoxBufferGeometry(1,1,1),a)},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
+ `},Bn={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}},Qr={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(L.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=di.euclideanModulo(e,1),i=di.clamp(i,0,1),n=di.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(f){f!==void 0&&1>parseFloat(f)&&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,l=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(n,o,l)}}}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=Qr[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),l=Math.min(e,i,n),f,p=(l+o)/2;if(l===o)l=f=0;else{var y=o-l;switch(l=.5>=p?y/(o+l):y/(2-o-l),o){case e:f=(i-n)/y+(i<n?6:0);break;case i:f=(n-e)/y+2;break;case n:f=(e-i)/y+4}f/=6}return t.h=f,t.s=l,t.l=p,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=di.lerp(t.h,e.h,n);var o=di.lerp(t.s,e.s,n);return n=di.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 qe={common:{diffuse:{value:new L(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new m},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 s(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 L(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 L(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new m}},sprite:{diffuse:{value:new L(15658734)},opacity:{value:1},center:{value:new s(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new m}}},wo={basic:{uniforms:Bn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.fog]),vertexShader:Ci.meshbasic_vert,fragmentShader:Ci.meshbasic_frag},lambert:{uniforms:Bn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.fog,qe.lights,{emissive:{value:new L(0)}}]),vertexShader:Ci.meshlambert_vert,fragmentShader:Ci.meshlambert_frag},phong:{uniforms:Bn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.gradientmap,qe.fog,qe.lights,{emissive:{value:new L(0)},specular:{value:new L(1118481)},shininess:{value:30}}]),vertexShader:Ci.meshphong_vert,fragmentShader:Ci.meshphong_frag},standard:{uniforms:Bn.merge([qe.common,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.roughnessmap,qe.metalnessmap,qe.fog,qe.lights,{emissive:{value:new L(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Ci.meshphysical_vert,fragmentShader:Ci.meshphysical_frag},matcap:{uniforms:Bn.merge([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.fog,{matcap:{value:null}}]),vertexShader:Ci.meshmatcap_vert,fragmentShader:Ci.meshmatcap_frag},points:{uniforms:Bn.merge([qe.points,qe.fog]),vertexShader:Ci.points_vert,fragmentShader:Ci.points_frag},dashed:{uniforms:Bn.merge([qe.common,qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ci.linedashed_vert,fragmentShader:Ci.linedashed_frag},depth:{uniforms:Bn.merge([qe.common,qe.displacementmap]),vertexShader:Ci.depth_vert,fragmentShader:Ci.depth_frag},normal:{uniforms:Bn.merge([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,{opacity:{value:1}}]),vertexShader:Ci.normal_vert,fragmentShader:Ci.normal_frag},sprite:{uniforms:Bn.merge([qe.sprite,qe.fog]),vertexShader:Ci.sprite_vert,fragmentShader:Ci.sprite_frag},background:{uniforms:{uvTransform:{value:new m},t2D:{value:null}},vertexShader:Ci.background_vert,fragmentShader:Ci.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ci.cube_vert,fragmentShader:Ci.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ci.equirect_vert,fragmentShader:Ci.equirect_frag},distanceRGBA:{uniforms:Bn.merge([qe.common,qe.displacementmap,{referencePosition:{value:new u},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ci.distanceRGBA_vert,fragmentShader:Ci.distanceRGBA_frag},shadow:{uniforms:Bn.merge([qe.lights,qe.fog,{color:{value:new L(0)},opacity:{value:1}}]),vertexShader:Ci.shadow_vert,fragmentShader:Ci.shadow_frag}};wo.physical={uniforms:Bn.merge([wo.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:Ci.meshphysical_vert,fragmentShader:Ci.meshphysical_frag},Object.assign(R.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}}),C.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),C.DefaultOrder="XYZ",Object.defineProperties(C.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(C.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=di.clamp,o=t.elements;t=o[0];var l=o[4],f=o[8],p=o[1],y=o[5],w=o[9],A=o[2],P=o[6];return o=o[10],e=e||this._order,e==="XYZ"?(this._y=Math.asin(n(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(-w,o),this._z=Math.atan2(-l,t)):(this._x=Math.atan2(P,y),this._z=0)):e==="YXZ"?(this._x=Math.asin(-n(w,-1,1)),.99999>Math.abs(w)?(this._y=Math.atan2(f,o),this._z=Math.atan2(p,y)):(this._y=Math.atan2(-A,t),this._z=0)):e==="ZXY"?(this._x=Math.asin(n(P,-1,1)),.99999>Math.abs(P)?(this._y=Math.atan2(-A,o),this._z=Math.atan2(-l,y)):(this._y=0,this._z=Math.atan2(p,t))):e==="ZYX"?(this._y=Math.asin(-n(A,-1,1)),.99999>Math.abs(A)?(this._x=Math.atan2(P,o),this._z=Math.atan2(p,t)):(this._x=0,this._z=Math.atan2(-l,y))):e==="YZX"?(this._z=Math.asin(n(p,-1,1)),.99999>Math.abs(p)?(this._x=Math.atan2(-w,y),this._y=Math.atan2(-A,t)):(this._x=0,this._y=Math.atan2(f,o))):e==="XZY"?(this._z=Math.asin(-n(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(P,y),this._y=Math.atan2(f,t)):(this._x=Math.atan2(-w,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 c;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 d;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 u(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(U.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 qc=0;N.DefaultUp=new u(0,1,0),N.DefaultMatrixAutoUpdate=!0,N.prototype=Object.assign(Object.create(a.prototype),{constructor:N,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 d;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new d;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new u(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new u(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new u(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new u;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new u(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new u(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new u(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new c;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new d,e=new c,i=new u,n=new u;return function(o,l,f){o.isVector3?i.copy(o):i.set(o,l,f),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 u),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new u,e=new u;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),i=new d),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,e),i}}(),getWorldScale:function(){var t=new u,e=new d;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),i=new u),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 u),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(A,P){return A[P.uuid]===void 0&&(A[P.uuid]=P.toJSON(t)),P.uuid}function i(A){var P=[],B;for(B in A){var H=A[B];delete H.metadata,P.push(H)}return P}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 l={};if(l.uuid=this.uuid,l.type=this.type,this.name!==""&&(l.name=this.name),this.castShadow===!0&&(l.castShadow=!0),this.receiveShadow===!0&&(l.receiveShadow=!0),this.visible===!1&&(l.visible=!1),this.frustumCulled===!1&&(l.frustumCulled=!1),this.renderOrder!==0&&(l.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(l.userData=this.userData),l.layers=this.layers.mask,l.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(l.matrixAutoUpdate=!1),this.isMesh||this.isLine||this.isPoints){l.geometry=e(t.geometries,this.geometry);var f=this.geometry.parameters;if(f!==void 0&&f.shapes!==void 0)if(f=f.shapes,Array.isArray(f))for(var p=0,y=f.length;p<y;p++)e(t.shapes,f[p]);else e(t.shapes,f)}if(this.material!==void 0)if(Array.isArray(this.material)){for(f=[],p=0,y=this.material.length;p<y;p++)f.push(e(t.materials,this.material[p]));l.material=f}else l.material=e(t.materials,this.material);if(0<this.children.length)for(l.children=[],p=0;p<this.children.length;p++)l.children.push(this.children[p].toJSON(t).object);if(n){n=i(t.geometries),p=i(t.materials),y=i(t.textures);var w=i(t.images);f=i(t.shapes),0<n.length&&(o.geometries=n),0<p.length&&(o.materials=p),0<y.length&&(o.textures=y),0<w.length&&(o.images=w),0<f.length&&(o.shapes=f)}return o.object=l,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 Yc=0;X.prototype=Object.assign(Object.create(a.prototype),{constructor:X,isGeometry:!0,applyMatrix:function(t){for(var e=new m().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,l=t.vertexNormals.length;o<l;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 c;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new c;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new c;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new c;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new c;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new N;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(q,$,rt,xt){var gt=p===void 0?[]:[i.colors[q].clone(),i.colors[$].clone(),i.colors[rt].clone()],Ct=f===void 0?[]:[new u().fromArray(f,3*q),new u().fromArray(f,3*$),new u().fromArray(f,3*rt)];xt=new R(q,$,rt,Ct,gt,xt),i.faces.push(xt),y!==void 0&&i.faceVertexUvs[0].push([new s().fromArray(y,2*q),new s().fromArray(y,2*$),new s().fromArray(y,2*rt)]),w!==void 0&&i.faceVertexUvs[1].push([new s().fromArray(w,2*q),new s().fromArray(w,2*$),new s().fromArray(w,2*rt)])}var i=this,n=t.index!==null?t.index.array:void 0,o=t.attributes,l=o.position.array,f=o.normal!==void 0?o.normal.array:void 0,p=o.color!==void 0?o.color.array:void 0,y=o.uv!==void 0?o.uv.array:void 0,w=o.uv2!==void 0?o.uv2.array:void 0;w!==void 0&&(this.faceVertexUvs[1]=[]);for(var A=o=0;o<l.length;o+=3,A+=2)i.vertices.push(new u().fromArray(l,o)),p!==void 0&&i.colors.push(new L().fromArray(p,o));var P=t.groups;if(0<P.length)for(o=0;o<P.length;o++){l=P[o];var B=l.start,H=l.count;for(A=B,B+=H;A<B;A+=3)n!==void 0?e(n[A],n[A+1],n[A+2],l.materialIndex):e(A,A+1,A+2,l.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<l.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 u;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 c;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 u,e=new u,i=0,n=this.faces.length;i<n;i++){var o=this.faces[i],l=this.vertices[o.a],f=this.vertices[o.b];t.subVectors(this.vertices[o.c],f),e.subVectors(l,f),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 u;if(t){var o=new u,l=new u;for(t=0,n=this.faces.length;t<n;t++){e=this.faces[t];var f=this.vertices[e.a],p=this.vertices[e.b],y=this.vertices[e.c];o.subVectors(y,p),l.subVectors(f,p),o.cross(l),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],f=e.vertexNormals,f.length===3?(f[0].copy(i[e.a]),f[1].copy(i[e.b]),f[2].copy(i[e.c])):(f[0]=i[e.a].clone(),f[1]=i[e.b].clone(),f[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 l=new X;for(l.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 f=this.morphNormals[o].vertexNormals;for(i=0,e=this.faces.length;i<e;i++){var p=new u,y={a:new u,b:new u,c:new u};n.push(p),f.push(y)}}for(f=this.morphNormals[o],l.vertices=this.morphTargets[o].vertices,l.computeFaceNormals(),l.computeVertexNormals(),i=0,e=this.faces.length;i<e;i++)n=this.faces[i],p=f.faceNormals[i],y=f.vertexNormals[i],p.copy(n.normal),y.a.copy(n.vertexNormals[0]),y.b.copy(n.vertexNormals[1]),y.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 k),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new D),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,o=this.vertices.length,l=this.vertices,f=t.vertices,p=this.faces,y=t.faces,w=this.faceVertexUvs[0],A=t.faceVertexUvs[0],P=this.colors,B=t.colors;i===void 0&&(i=0),e!==void 0&&(n=new m().getNormalMatrix(e)),t=0;for(var H=f.length;t<H;t++){var q=f[t].clone();e!==void 0&&q.applyMatrix4(e),l.push(q)}for(t=0,H=B.length;t<H;t++)P.push(B[t].clone());for(t=0,H=y.length;t<H;t++){f=y[t];var $=f.vertexNormals;for(B=f.vertexColors,P=new R(f.a+o,f.b+o,f.c+o),P.normal.copy(f.normal),n!==void 0&&P.normal.applyMatrix3(n).normalize(),e=0,l=$.length;e<l;e++)q=$[e].clone(),n!==void 0&&q.applyMatrix3(n).normalize(),P.vertexNormals.push(q);for(P.color.copy(f.color),e=0,l=B.length;e<l;e++)q=B[e],P.vertexColors.push(q.clone());P.materialIndex=f.materialIndex+i,p.push(P)}for(t=0,H=A.length;t<H;t++)if(i=A[t],n=[],i!==void 0){for(e=0,l=i.length;e<l;e++)n.push(i[e].clone());w.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,l=0;for(o=this.vertices.length;l<o;l++){var f=this.vertices[l];f=Math.round(f.x*n)+"_"+Math.round(f.y*n)+"_"+Math.round(f.z*n),t[f]===void 0?(t[f]=l,e.push(this.vertices[l]),i[l]=e.length-1):i[l]=i[t[f]]}for(t=[],l=0,o=this.faces.length;l<o;l++)for(n=this.faces[l],n.a=i[n.a],n.b=i[n.b],n.c=i[n.c],n=[n.a,n.b,n.c],f=0;3>f;f++)if(n[f]===n[(f+1)%3]){t.push(l);break}for(l=t.length-1;0<=l;l--)for(n=t[l],this.faces.splice(n,1),i=0,o=this.faceVertexUvs.length;i<o;i++)this.faceVertexUvs[i].splice(n,1);return l=this.vertices.length-e.length,this.vertices=e,l},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new u(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(y,w){return y.materialIndex-w.materialIndex});var n=this.faceVertexUvs[0],o=this.faceVertexUvs[1],l,f;for(n&&n.length===e&&(l=[]),o&&o.length===e&&(f=[]),i=0;i<e;i++){var p=t[i]._id;l&&l.push(n[p]),f&&f.push(o[p])}l&&(this.faceVertexUvs[0]=l),f&&(this.faceVertexUvs[1]=f)},toJSON:function(){function t(Vt,J,ot){return ot?Vt|1<<J:Vt&~(1<<J)}function e(Vt){var J=Vt.x.toString()+Vt.y.toString()+Vt.z.toString();return w[J]!==void 0||(w[J]=y.length/3,y.push(Vt.x,Vt.y,Vt.z)),w[J]}function i(Vt){var J=Vt.r.toString()+Vt.g.toString()+Vt.b.toString();return P[J]!==void 0||(P[J]=A.length,A.push(Vt.getHex())),P[J]}function n(Vt){var J=Vt.x.toString()+Vt.y.toString();return H[J]!==void 0||(H[J]=B.length/2,B.push(Vt.x,Vt.y)),H[J]}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 l=this.parameters,f;for(f in l)l[f]!==void 0&&(o[f]=l[f]);return o}for(l=[],f=0;f<this.vertices.length;f++){var p=this.vertices[f];l.push(p.x,p.y,p.z)}p=[];var y=[],w={},A=[],P={},B=[],H={};for(f=0;f<this.faces.length;f++){var q=this.faces[f],$=this.faceVertexUvs[0][f]!==void 0,rt=0<q.normal.length(),xt=0<q.vertexNormals.length,gt=q.color.r!==1||q.color.g!==1||q.color.b!==1,Ct=0<q.vertexColors.length,wt=0;wt=t(wt,0,0),wt=t(wt,1,!0),wt=t(wt,2,!1),wt=t(wt,3,$),wt=t(wt,4,rt),wt=t(wt,5,xt),wt=t(wt,6,gt),wt=t(wt,7,Ct),p.push(wt),p.push(q.a,q.b,q.c),p.push(q.materialIndex),$&&($=this.faceVertexUvs[0][f],p.push(n($[0]),n($[1]),n($[2]))),rt&&p.push(e(q.normal)),xt&&(rt=q.vertexNormals,p.push(e(rt[0]),e(rt[1]),e(rt[2]))),gt&&p.push(i(q.color)),Ct&&(q=q.vertexColors,p.push(i(q[0]),i(q[1]),i(q[2])))}return o.data={},o.data.vertices=l,o.data.normals=y,0<A.length&&(o.data.colors=A),0<B.length&&(o.data.uvs=[B]),o.data.faces=p,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,l=0;for(e=o.length;l<e;l++)this.vertices.push(o[l].clone());for(o=t.colors,l=0,e=o.length;l<e;l++)this.colors.push(o[l].clone());for(o=t.faces,l=0,e=o.length;l<e;l++)this.faces.push(o[l].clone());for(l=0,e=t.faceVertexUvs.length;l<e;l++){var f=t.faceVertexUvs[l];for(this.faceVertexUvs[l]===void 0&&(this.faceVertexUvs[l]=[]),o=0,i=f.length;o<i;o++){var p=f[o],y=[],w=0;for(n=p.length;w<n;w++)y.push(p[w].clone());this.faceVertexUvs[l].push(y)}}for(w=t.morphTargets,l=0,e=w.length;l<e;l++){if(n={},n.name=w[l].name,w[l].vertices!==void 0)for(n.vertices=[],o=0,i=w[l].vertices.length;o<i;o++)n.vertices.push(w[l].vertices[o].clone());if(w[l].normals!==void 0)for(n.normals=[],o=0,i=w[l].normals.length;o<i;o++)n.normals.push(w[l].normals[o].clone());this.morphTargets.push(n)}for(w=t.morphNormals,l=0,e=w.length;l<e;l++){if(n={},w[l].vertexNormals!==void 0)for(n.vertexNormals=[],o=0,i=w[l].vertexNormals.length;o<i;o++)f=w[l].vertexNormals[o],p={},p.a=f.a.clone(),p.b=f.b.clone(),p.c=f.c.clone(),n.vertexNormals.push(p);if(w[l].faceNormals!==void 0)for(n.faceNormals=[],o=0,i=w[l].faceNormals.length;o<i;o++)n.faceNormals.push(w[l].faceNormals[o].clone());this.morphNormals.push(n)}for(o=t.skinWeights,l=0,e=o.length;l<e;l++)this.skinWeights.push(o[l].clone());for(o=t.skinIndices,l=0,e=o.length;l<e;l++)this.skinIndices.push(o[l].clone());for(o=t.lineDistances,l=0,e=o.length;l<e;l++)this.lineDistances.push(o[l]);return l=t.boundingBox,l!==null&&(this.boundingBox=l.clone()),l=t.boundingSphere,l!==null&&(this.boundingSphere=l.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(K.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(K.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 l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),l=new L),e[i++]=l.r,e[i++]=l.g,e[i++]=l.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),l=new s),e[i++]=l.x,e[i++]=l.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),l=new u),e[i++]=l.x,e[i++]=l.y,e[i++]=l.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),l=new _),e[i++]=l.x,e[i++]=l.y,e[i++]=l.z,e[i++]=l.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)}}),Z.prototype=Object.create(K.prototype),Z.prototype.constructor=Z,ct.prototype=Object.create(K.prototype),ct.prototype.constructor=ct,Rt.prototype=Object.create(K.prototype),Rt.prototype.constructor=Rt,et.prototype=Object.create(K.prototype),et.prototype.constructor=et,_t.prototype=Object.create(K.prototype),_t.prototype.constructor=_t,G.prototype=Object.create(K.prototype),G.prototype.constructor=G,Pt.prototype=Object.create(K.prototype),Pt.prototype.constructor=Pt,Et.prototype=Object.create(K.prototype),Et.prototype.constructor=Et,At.prototype=Object.create(K.prototype),At.prototype.constructor=At,Object.assign(ce.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,l!==void 0&&(l.count=3*n-l.start,e.push(l));var l={start:3*n,materialIndex:i}}}l!==void 0&&(l.count=3*n-l.start,e.push(l)),this.groups=e},fromGeometry:function(t){var e=t.faces,i=t.vertices,n=t.faceVertexUvs,o=n[0]&&0<n[0].length,l=n[1]&&0<n[1].length,f=t.morphTargets,p=f.length;if(0<p){for(var y=[],w=0;w<p;w++)y[w]={name:f[w].name,data:[]};this.morphTargets.position=y}var A=t.morphNormals,P=A.length;if(0<P){var B=[];for(w=0;w<P;w++)B[w]={name:A[w].name,data:[]};this.morphTargets.normal=B}var H=t.skinIndices,q=t.skinWeights,$=H.length===i.length,rt=q.length===i.length;for(0<i.length&&e.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),w=0;w<e.length;w++){var xt=e[w];this.vertices.push(i[xt.a],i[xt.b],i[xt.c]);var gt=xt.vertexNormals;for(gt.length===3?this.normals.push(gt[0],gt[1],gt[2]):(gt=xt.normal,this.normals.push(gt,gt,gt)),gt=xt.vertexColors,gt.length===3?this.colors.push(gt[0],gt[1],gt[2]):(gt=xt.color,this.colors.push(gt,gt,gt)),o===!0&&(gt=n[0][w],gt!==void 0?this.uvs.push(gt[0],gt[1],gt[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",w),this.uvs.push(new s,new s,new s))),l===!0&&(gt=n[1][w],gt!==void 0?this.uvs2.push(gt[0],gt[1],gt[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",w),this.uvs2.push(new s,new s,new s))),gt=0;gt<p;gt++){var Ct=f[gt].vertices;y[gt].data.push(Ct[xt.a],Ct[xt.b],Ct[xt.c])}for(gt=0;gt<P;gt++)Ct=A[gt].vertexNormals[w],B[gt].data.push(Ct.a,Ct.b,Ct.c);$&&this.skinIndices.push(H[xt.a],H[xt.b],H[xt.c]),rt&&this.skinWeights.push(q[xt.a],q[xt.b],q[xt.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 Zc=1;Ft.prototype=Object.assign(Object.create(a.prototype),{constructor:Ft,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(65535<re(t)?Pt:_t)(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 K(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 m().getNormalMatrix(t).applyToBufferAttribute(e),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},rotateX:function(){var t=new c;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new c;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new c;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new c;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new c;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new N;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new u;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 ce().fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);this.addAttribute("position",new K(e,3).copyVector3sArray(t.vertices)),0<t.normals.length&&(e=new Float32Array(3*t.normals.length),this.addAttribute("normal",new K(e,3).copyVector3sArray(t.normals))),0<t.colors.length&&(e=new Float32Array(3*t.colors.length),this.addAttribute("color",new K(e,3).copyColorsArray(t.colors))),0<t.uvs.length&&(e=new Float32Array(2*t.uvs.length),this.addAttribute("uv",new K(e,2).copyVector2sArray(t.uvs))),0<t.uvs2.length&&(e=new Float32Array(2*t.uvs2.length),this.addAttribute("uv2",new K(e,2).copyVector2sArray(t.uvs2))),this.groups=t.groups;for(var i in t.morphTargets){e=[];for(var n=t.morphTargets[i],o=0,l=n.length;o<l;o++){var f=n[o],p=new Et(3*f.data.length,3);p.name=f.name,e.push(p.copyVector3sArray(f.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 k);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 k,e=new u;return function(){this.boundingSphere===null&&(this.boundingSphere=new D);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var o=0,l=0,f=i.count;l<f;l++)e.x=i.getX(l),e.y=i.getY(l),e.z=i.getZ(l),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 K(new Float32Array(i.length),3));else for(var n=e.normal.array,o=0,l=n.length;o<l;o++)n[o]=0;n=e.normal.array;var f=new u,p=new u,y=new u,w=new u,A=new u;if(t){var P=t.array;for(o=0,l=t.count;o<l;o+=3){t=3*P[o+0];var B=3*P[o+1],H=3*P[o+2];f.fromArray(i,t),p.fromArray(i,B),y.fromArray(i,H),w.subVectors(y,p),A.subVectors(f,p),w.cross(A),n[t]+=w.x,n[t+1]+=w.y,n[t+2]+=w.z,n[B]+=w.x,n[B+1]+=w.y,n[B+2]+=w.z,n[H]+=w.x,n[H+1]+=w.y,n[H+2]+=w.z}}else for(o=0,l=i.length;o<l;o+=9)f.fromArray(i,o),p.fromArray(i,o+3),y.fromArray(i,o+6),w.subVectors(y,p),A.subVectors(f,p),w.cross(A),n[o]=w.x,n[o+1]=w.y,n[o+2]=w.z,n[o+3]=w.x,n[o+4]=w.y,n[o+5]=w.z,n[o+6]=w.x,n[o+7]=w.y,n[o+8]=w.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,l=t.attributes[n],f=l.array,p=0;for(l=l.itemSize*e;p<f.length;p++,l++)o[l]=f[p]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new u;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 Ft,e=this.index.array,i=this.attributes,n;for(n in i){var o=i[n],l=o.array,f=o.itemSize,p=new l.constructor(e.length*f),y=0;o=0;for(var w=e.length;o<w;o++)for(var A=e[o]*f,P=0;P<f;P++)p[y++]=l[A++];t.addAttribute(n,new K(p,f))}for(e=this.groups,o=0,w=e.length;o<w;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 Ft().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(f in i)this.addAttribute(f,i[f].clone());var n=t.morphAttributes;for(f in n){var o=[],l=n[f];for(i=0,e=l.length;i<e;i++)o.push(l[i].clone());this.morphAttributes[f]=o}var f=t.groups;for(i=0,e=f.length;i<e;i++)n=f[i],this.addGroup(n.start,n.count,n.materialIndex);return f=t.boundingBox,f!==null&&(this.boundingBox=f.clone()),f=t.boundingSphere,f!==null&&(this.boundingSphere=f.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),It.prototype=Object.create(X.prototype),It.prototype.constructor=It,Nt.prototype=Object.create(Ft.prototype),Nt.prototype.constructor=Nt,Pe.prototype=Object.create(X.prototype),Pe.prototype.constructor=Pe,pe.prototype=Object.create(Ft.prototype),pe.prototype.constructor=pe;var zu=0;Wt.prototype=Object.assign(Object.create(a.prototype),{constructor:Wt,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 l=[],f;for(f in o){var p=o[f];delete p.metadata,l.push(p)}return l}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"})}}),$e.prototype=Object.create(Wt.prototype),$e.prototype.constructor=$e,$e.prototype.isShaderMaterial=!0,$e.prototype.copy=function(t){return Wt.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Bn.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},$e.prototype.toJSON=function(t){var e=Wt.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(Si.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 u),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 u;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 u),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 u;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 u,e=new u,i=new u;return function(n,o,l,f){t.copy(n).add(o).multiplyScalar(.5),e.copy(o).sub(n).normalize(),i.copy(this.origin).sub(t);var p=.5*n.distanceTo(o),y=-this.direction.dot(e),w=i.dot(this.direction),A=-i.dot(e),P=i.lengthSq(),B=Math.abs(1-y*y);if(0<B){n=y*A-w,o=y*w-A;var H=p*B;0<=n?o>=-H?o<=H?(p=1/B,n*=p,o*=p,y=n*(n+y*o+2*w)+o*(y*n+o+2*A)+P):(o=p,n=Math.max(0,-(y*o+w)),y=-n*n+o*(o+2*A)+P):(o=-p,n=Math.max(0,-(y*o+w)),y=-n*n+o*(o+2*A)+P):o<=-H?(n=Math.max(0,-(-y*p+w)),o=0<n?-p:Math.min(Math.max(-p,-A),p),y=-n*n+o*(o+2*A)+P):o<=H?(n=0,o=Math.min(Math.max(-p,-A),p),y=o*(o+2*A)+P):(n=Math.max(0,-(y*p+w)),o=0<n?p:Math.min(Math.max(-p,-A),p),y=-n*n+o*(o+2*A)+P)}else o=0<y?-p:p,n=Math.max(0,-(y*o+w)),y=-n*n+o*(o+2*A)+P;return l&&l.copy(this.direction).multiplyScalar(n).add(this.origin),f&&f.copy(e).multiplyScalar(o).add(t),y}}(),intersectSphere:function(){var t=new u;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,l=this.origin;if(0<=i){var f=(t.min.x-l.x)*i;i*=t.max.x-l.x}else f=(t.max.x-l.x)*i,i*=t.min.x-l.x;if(0<=n){var p=(t.min.y-l.y)*n;n*=t.max.y-l.y}else p=(t.max.y-l.y)*n,n*=t.min.y-l.y;return f>n||p>i||((p>f||f!==f)&&(f=p),(n<i||i!==i)&&(i=n),0<=o?(p=(t.min.z-l.z)*o,t=(t.max.z-l.z)*o):(p=(t.max.z-l.z)*o,t=(t.min.z-l.z)*o),f>t||p>i)?null:((p>f||f!==f)&&(f=p),(t<i||i!==i)&&(i=t),0>i?null:this.at(0<=f?f:i,e))},intersectsBox:function(){var t=new u;return function(e){return this.intersectBox(e,t)!==null}}(),intersectTriangle:function(){var t=new u,e=new u,i=new u,n=new u;return function(o,l,f,p,y){if(e.subVectors(l,o),i.subVectors(f,o),n.crossVectors(e,i),l=this.direction.dot(n),0<l){if(p)return null;p=1}else if(0>l)p=-1,l=-l;else return null;return t.subVectors(this.origin,o),o=p*this.direction.dot(i.crossVectors(t,i)),0>o||(f=p*this.direction.dot(e.cross(t)),0>f||o+f>l)?null:(o=-p*t.dot(n),0>o?null:this.at(o/l,y))}}(),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(Oe,{getNormal:function(){var t=new u;return function(e,i,n,o){return o===void 0&&(console.warn("THREE.Triangle: .getNormal() target is now required"),o=new u),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 u,e=new u,i=new u;return function(n,o,l,f,p){t.subVectors(f,o),e.subVectors(l,o),i.subVectors(n,o),n=t.dot(t),o=t.dot(e),l=t.dot(i);var y=e.dot(e);f=e.dot(i);var w=n*y-o*o;return p===void 0&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),p=new u),w===0?p.set(-2,-1,-1):(w=1/w,y=(y*l-o*f)*w,n=(n*f-o*l)*w,p.set(1-y-n,n,y))}}(),containsPoint:function(){var t=new u;return function(e,i,n,o){return Oe.getBarycoord(e,i,n,o,t),0<=t.x&&0<=t.y&&1>=t.x+t.y}}(),getUV:function(){var t=new u;return function(e,i,n,o,l,f,p,y){return this.getBarycoord(e,i,n,o,t),y.set(0,0),y.addScaledVector(l,t.x),y.addScaledVector(f,t.y),y.addScaledVector(p,t.z),y}}()}),Object.assign(Oe.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 u,e=new u;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 u),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return Oe.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 u),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return Oe.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return Oe.containsPoint(t,this.a,this.b,this.c)},getUV:function(t,e,i,n,o){return Oe.getUV(t,this.a,this.b,this.c,e,i,n,o)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new u,e=new u,i=new u,n=new u,o=new u,l=new u;return function(f,p){p===void 0&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),p=new u);var y=this.a,w=this.b,A=this.c;t.subVectors(w,y),e.subVectors(A,y),n.subVectors(f,y);var P=t.dot(n),B=e.dot(n);if(0>=P&&0>=B)return p.copy(y);o.subVectors(f,w);var H=t.dot(o),q=e.dot(o);if(0<=H&&q<=H)return p.copy(w);var $=P*q-H*B;if(0>=$&&0<=P&&0>=H)return w=P/(P-H),p.copy(y).addScaledVector(t,w);l.subVectors(f,A),f=t.dot(l);var rt=e.dot(l);return 0<=rt&&f<=rt?p.copy(A):(P=f*B-P*rt,0>=P&&0<=B&&0>=rt?($=B/(B-rt),p.copy(y).addScaledVector(e,$)):(B=H*rt-f*q,0>=B&&0<=q-H&&0<=f-rt?(i.subVectors(A,w),$=(q-H)/(q-H+(f-rt)),p.copy(w).addScaledVector(i,$)):(A=1/(B+P+$),w=P*A,$*=A,p.copy(y).addScaledVector(t,w).addScaledVector(e,$))))}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Ge.prototype=Object.create(Wt.prototype),Ge.prototype.constructor=Ge,Ge.prototype.isMeshBasicMaterial=!0,Ge.prototype.copy=function(t){return Wt.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},pi.prototype=Object.assign(Object.create(N.prototype),{constructor:pi,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return N.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(rt,xt,gt,Ct,wt,Vt,J,ot){return(xt.side===1?Ct.intersectTriangle(J,Vt,wt,!0,ot):Ct.intersectTriangle(wt,Vt,J,xt.side!==2,ot))===null?null:($.copy(ot),$.applyMatrix4(rt.matrixWorld),xt=gt.ray.origin.distanceTo($),xt<gt.near||xt>gt.far?null:{distance:xt,point:$.clone(),object:rt})}function e(rt,xt,gt,Ct,wt,Vt,J,ot,zt){return l.fromBufferAttribute(wt,J),f.fromBufferAttribute(wt,ot),p.fromBufferAttribute(wt,zt),(rt=t(rt,xt,gt,Ct,l,f,p,q))&&(Vt&&(P.fromBufferAttribute(Vt,J),B.fromBufferAttribute(Vt,ot),H.fromBufferAttribute(Vt,zt),rt.uv=Oe.getUV(q,l,f,p,P,B,H,new s)),Vt=new R(J,ot,zt),Oe.getNormal(l,f,p,Vt.normal),rt.face=Vt),rt}var i=new c,n=new Si,o=new D,l=new u,f=new u,p=new u,y=new u,w=new u,A=new u,P=new s,B=new s,H=new s,q=new u,$=new u;return function(rt,xt){var gt=this.geometry,Ct=this.material,wt=this.matrixWorld;if(Ct!==void 0&&(gt.boundingSphere===null&&gt.computeBoundingSphere(),o.copy(gt.boundingSphere),o.applyMatrix4(wt),rt.ray.intersectsSphere(o)!==!1&&(i.getInverse(wt),n.copy(rt.ray).applyMatrix4(i),gt.boundingBox===null||n.intersectsBox(gt.boundingBox)!==!1))){if(gt.isBufferGeometry){var Vt=gt.index,J=gt.attributes.position,ot=gt.attributes.uv,zt=gt.groups;gt=gt.drawRange;var ee;if(Vt!==null)if(Array.isArray(Ct)){var $t=0;for(ee=zt.length;$t<ee;$t++){var Yt=zt[$t],Te=Ct[Yt.materialIndex];wt=Math.max(Yt.start,gt.start);var me=Math.min(Yt.start+Yt.count,gt.start+gt.count);for(Yt=wt;Yt<me;Yt+=3){wt=Vt.getX(Yt);var De=Vt.getX(Yt+1),be=Vt.getX(Yt+2);(wt=e(this,Te,rt,n,J,ot,wt,De,be))&&(wt.faceIndex=Math.floor(Yt/3),xt.push(wt))}}}else for(wt=Math.max(0,gt.start),me=Math.min(Vt.count,gt.start+gt.count),$t=wt,ee=me;$t<ee;$t+=3)wt=Vt.getX($t),De=Vt.getX($t+1),be=Vt.getX($t+2),(wt=e(this,Ct,rt,n,J,ot,wt,De,be))&&(wt.faceIndex=Math.floor($t/3),xt.push(wt));else if(J!==void 0)if(Array.isArray(Ct))for($t=0,ee=zt.length;$t<ee;$t++)for(Yt=zt[$t],Te=Ct[Yt.materialIndex],wt=Math.max(Yt.start,gt.start),me=Math.min(Yt.start+Yt.count,gt.start+gt.count),Yt=wt;Yt<me;Yt+=3)wt=Yt,De=Yt+1,be=Yt+2,(wt=e(this,Te,rt,n,J,ot,wt,De,be))&&(wt.faceIndex=Math.floor(Yt/3),xt.push(wt));else for(wt=Math.max(0,gt.start),me=Math.min(J.count,gt.start+gt.count),$t=wt,ee=me;$t<ee;$t+=3)wt=$t,De=$t+1,be=$t+2,(wt=e(this,Ct,rt,n,J,ot,wt,De,be))&&(wt.faceIndex=Math.floor($t/3),xt.push(wt))}else if(gt.isGeometry){for(J=Array.isArray(Ct),ot=gt.vertices,zt=gt.faces,wt=gt.faceVertexUvs[0],0<wt.length&&(Vt=wt),Yt=0,me=zt.length;Yt<me;Yt++)if(De=zt[Yt],wt=J?Ct[De.materialIndex]:Ct,wt!==void 0){if($t=ot[De.a],ee=ot[De.b],Te=ot[De.c],wt.morphTargets===!0){be=gt.morphTargets;var ae=this.morphTargetInfluences;l.set(0,0,0),f.set(0,0,0),p.set(0,0,0);for(var We=0,Qe=be.length;We<Qe;We++){var fi=ae[We];if(fi!==0){var Cn=be[We].vertices;l.addScaledVector(y.subVectors(Cn[De.a],$t),fi),f.addScaledVector(w.subVectors(Cn[De.b],ee),fi),p.addScaledVector(A.subVectors(Cn[De.c],Te),fi)}}l.add($t),f.add(ee),p.add(Te),$t=l,ee=f,Te=p}(wt=t(this,wt,rt,n,$t,ee,Te,q))&&(Vt&&Vt[Yt]&&(be=Vt[Yt],P.copy(be[0]),B.copy(be[1]),H.copy(be[2]),wt.uv=Oe.getUV(q,$t,ee,Te,P,B,H,new s)),wt.face=De,wt.faceIndex=Yt,xt.push(wt))}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),z.prototype=Object.create(g.prototype),z.prototype.constructor=z,z.prototype.isCubeTexture=!0,Object.defineProperty(z.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),Q.prototype=Object.create(g.prototype),Q.prototype.constructor=Q,Q.prototype.isDataTexture3D=!0;var qh=new g,Jc=new Q,ku=new z,ah=[],La=[],Tl=new Float32Array(16),Bu=new Float32Array(9),Yh=new Float32Array(4);oa.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),vt(e,t)},Ja.prototype.setValue=function(t,e,i){for(var n=this.seq,o=0,l=n.length;o!==l;++o){var f=n[o];f.setValue(t,e[f.id],i)}};var Zh=/([\w\d_]+)(\])?(\[|\.)?/g;ho.prototype.setValue=function(t,e,i){e=this.map[e],e!==void 0&&e.setValue(t,i,this.renderer)},ho.prototype.setOptional=function(t,e,i){e=e[i],e!==void 0&&this.setValue(t,i,e)},ho.upload=function(t,e,i,n){for(var o=0,l=e.length;o!==l;++o){var f=e[o],p=i[f.id];p.needsUpdate!==!1&&f.setValue(t,p.value,n)}},ho.seqWithValue=function(t,e){for(var i=[],n=0,o=t.length;n!==o;++n){var l=t[n];l.id in e&&i.push(l)}return i};var Bo=0,Jh=0;se.prototype=Object.create(Wt.prototype),se.prototype.constructor=se,se.prototype.isMeshDepthMaterial=!0,se.prototype.copy=function(t){return Wt.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},te.prototype=Object.create(Wt.prototype),te.prototype.constructor=te,te.prototype.isMeshDistanceMaterial=!0,te.prototype.copy=function(t){return Wt.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},ci.prototype=Object.assign(Object.create(N.prototype),{constructor:ci,isGroup:!0}),Be.prototype=Object.assign(Object.create(N.prototype),{constructor:Be,isCamera:!0,copy:function(t,e){return N.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 u),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){N.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return new this.constructor().copy(this)}}),_e.prototype=Object.assign(Object.create(Be.prototype),{constructor:_e,isPerspectiveCamera:!0,copy:function(t,e){return Be.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*di.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*di.DEG2RAD*this.fov);return .5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*di.RAD2DEG*Math.atan(Math.tan(.5*di.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,l){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=l,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*di.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,o=-.5*n,l=this.view;if(this.view!==null&&this.view.enabled){var f=l.fullWidth,p=l.fullHeight;o+=l.offsetX*n/f,e-=l.offsetY*i/p,n*=l.width/f,i*=l.height/p}l=this.filmOffset,l!==0&&(o+=t*l/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+n,e,e-i,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=N.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}}),Fe.prototype=Object.assign(Object.create(_e.prototype),{constructor:Fe,isArrayCamera:!0});var as=new u,wr=new u;Re.prototype.isFogExp2=!0,Re.prototype.clone=function(){return new Re(this.color,this.density)},Re.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},Sn.prototype.isFog=!0,Sn.prototype.clone=function(){return new Sn(this.color,this.near,this.far)},Sn.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},Xn.prototype=Object.assign(Object.create(N.prototype),{constructor:Xn,copy:function(t,e){return N.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=N.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(ki.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(ki.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(Bi.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Bi.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}}),Hi.prototype=Object.create(Wt.prototype),Hi.prototype.constructor=Hi,Hi.prototype.isSpriteMaterial=!0,Hi.prototype.copy=function(t){return Wt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this};var Ra;nn.prototype=Object.assign(Object.create(N.prototype),{constructor:nn,isSprite:!0,raycast:function(){function t(H,q,$,rt,xt,gt){o.subVectors(H,$).addScalar(.5).multiply(rt),xt!==void 0?(l.x=gt*o.x-xt*o.y,l.y=xt*o.x+gt*o.y):l.copy(o),H.copy(q),H.x+=l.x,H.y+=l.y,H.applyMatrix4(f)}var e=new u,i=new u,n=new u,o=new s,l=new s,f=new c,p=new u,y=new u,w=new u,A=new s,P=new s,B=new s;return function(H,q){i.setFromMatrixScale(this.matrixWorld),f.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var $=this.material.rotation;if($!==0)var rt=Math.cos($),xt=Math.sin($);$=this.center,t(p.set(-.5,-.5,0),n,$,i,xt,rt),t(y.set(.5,-.5,0),n,$,i,xt,rt),t(w.set(.5,.5,0),n,$,i,xt,rt),A.set(0,0),P.set(1,0),B.set(1,1);var gt=H.ray.intersectTriangle(p,y,w,!1,e);gt===null&&(t(y.set(-.5,.5,0),n,$,i,xt,rt),P.set(0,1),gt=H.ray.intersectTriangle(p,w,y,!1,e),gt===null)||(xt=H.ray.origin.distanceTo(e),xt<H.near||xt>H.far||q.push({distance:xt,point:e.clone(),uv:Oe.getUV(e,p,y,w,A,P,B,new s),face:null,object:this}))}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return N.prototype.copy.call(this,t),t.center!==void 0&&this.center.copy(t.center),this}}),rn.prototype=Object.assign(Object.create(N.prototype),{constructor:rn,copy:function(t){N.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 u;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 u,e=new u;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,l=n.length;o<l&&i>=n[o].distance;o++)n[o-1].object.visible=!1,n[o].object.visible=!0;for(;o<l;o++)n[o].object.visible=!1}}}(),toJSON:function(t){t=N.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(un.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new c;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 c,e=new c;return function(){for(var i=this.bones,n=this.boneInverses,o=this.boneMatrices,l=this.boneTexture,f=0,p=i.length;f<p;f++)t.multiplyMatrices(i[f]?i[f].matrixWorld:e,n[f]),t.toArray(o,16*f);l!==void 0&&(l.needsUpdate=!0)}}(),clone:function(){return new un(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}}}),cn.prototype=Object.assign(Object.create(N.prototype),{constructor:cn,isBone:!0}),Gi.prototype=Object.assign(Object.create(pi.prototype),{constructor:Gi,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 cn;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 _;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){pi.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)}}),Ni.prototype=Object.create(Wt.prototype),Ni.prototype.constructor=Ni,Ni.prototype.isLineBasicMaterial=!0,Ni.prototype.copy=function(t){return Wt.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},ji.prototype=Object.assign(Object.create(N.prototype),{constructor:ji,isLine:!0,computeLineDistances:function(){var t=new u,e=new u;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[0],l=1,f=n.count;l<f;l++)t.fromBufferAttribute(n,l-1),e.fromBufferAttribute(n,l),o[l]=o[l-1],o[l]+=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,l=1,f=n.length;l<f;l++)o[l]=o[l-1],o[l]+=n[l-1].distanceTo(n[l]);return this}}(),raycast:function(){var t=new c,e=new Si,i=new D;return function(n,o){var l=n.linePrecision,f=this.geometry,p=this.matrixWorld;if(f.boundingSphere===null&&f.computeBoundingSphere(),i.copy(f.boundingSphere),i.applyMatrix4(p),i.radius+=l,n.ray.intersectsSphere(i)!==!1){t.getInverse(p),e.copy(n.ray).applyMatrix4(t),l/=(this.scale.x+this.scale.y+this.scale.z)/3,l*=l;var y=new u,w=new u;p=new u;var A=new u,P=this&&this.isLineSegments?2:1;if(f.isBufferGeometry){var B=f.index,H=f.attributes.position.array;if(B!==null){B=B.array,f=0;for(var q=B.length-1;f<q;f+=P){var $=B[f+1];y.fromArray(H,3*B[f]),w.fromArray(H,3*$),$=e.distanceSqToSegment(y,w,A,p),$>l||(A.applyMatrix4(this.matrixWorld),$=n.ray.origin.distanceTo(A),$<n.near||$>n.far||o.push({distance:$,point:p.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}}else for(f=0,q=H.length/3-1;f<q;f+=P)y.fromArray(H,3*f),w.fromArray(H,3*f+3),$=e.distanceSqToSegment(y,w,A,p),$>l||(A.applyMatrix4(this.matrixWorld),$=n.ray.origin.distanceTo(A),$<n.near||$>n.far||o.push({distance:$,point:p.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}else if(f.isGeometry)for(y=f.vertices,w=y.length,f=0;f<w-1;f+=P)$=e.distanceSqToSegment(y[f],y[f+1],A,p),$>l||(A.applyMatrix4(this.matrixWorld),$=n.ray.origin.distanceTo(A),$<n.near||$>n.far||o.push({distance:$,point:p.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}}}(),copy:function(t){return N.prototype.copy.call(this,t),this.geometry.copy(t.geometry),this.material.copy(t.material),this},clone:function(){return new this.constructor().copy(this)}}),gi.prototype=Object.assign(Object.create(ji.prototype),{constructor:gi,isLineSegments:!0,computeLineDistances:function(){var t=new u,e=new u;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[],l=0,f=n.count;l<f;l+=2)t.fromBufferAttribute(n,l),e.fromBufferAttribute(n,l+1),o[l]=l===0?0:o[l-1],o[l+1]=o[l]+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,l=0,f=n.length;l<f;l+=2)t.copy(n[l]),e.copy(n[l+1]),o[l]=l===0?0:o[l-1],o[l+1]=o[l]+t.distanceTo(e);return this}}()}),co.prototype=Object.assign(Object.create(ji.prototype),{constructor:co,isLineLoop:!0}),Fn.prototype=Object.create(Wt.prototype),Fn.prototype.constructor=Fn,Fn.prototype.isPointsMaterial=!0,Fn.prototype.copy=function(t){return Wt.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},la.prototype=Object.assign(Object.create(N.prototype),{constructor:la,isPoints:!0,raycast:function(){var t=new c,e=new Si,i=new D;return function(n,o){function l(rt,xt){var gt=e.distanceSqToPoint(rt);gt<A&&(e.closestPointToPoint(rt,P),P.applyMatrix4(y),rt=n.ray.origin.distanceTo(P),rt<n.near||rt>n.far||o.push({distance:rt,distanceToRay:Math.sqrt(gt),point:P.clone(),index:xt,face:null,object:f}))}var f=this,p=this.geometry,y=this.matrixWorld,w=n.params.Points.threshold;if(p.boundingSphere===null&&p.computeBoundingSphere(),i.copy(p.boundingSphere),i.applyMatrix4(y),i.radius+=w,n.ray.intersectsSphere(i)!==!1){t.getInverse(y),e.copy(n.ray).applyMatrix4(t),w/=(this.scale.x+this.scale.y+this.scale.z)/3;var A=w*w;w=new u;var P=new u;if(p.isBufferGeometry){var B=p.index;if(p=p.attributes.position.array,B!==null){var H=B.array;B=0;for(var q=H.length;B<q;B++){var $=H[B];w.fromArray(p,3*$),l(w,$)}}else for(B=0,H=p.length/3;B<H;B++)w.fromArray(p,3*B),l(w,B)}else for(w=p.vertices,B=0,H=w.length;B<H;B++)l(w[B],B)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),zh.prototype=Object.assign(Object.create(g.prototype),{constructor:zh,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),Yo.prototype=Object.create(g.prototype),Yo.prototype.constructor=Yo,Yo.prototype.isCompressedTexture=!0,Ka.prototype=Object.create(g.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isCanvasTexture=!0,Qa.prototype=Object.create(g.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isDepthTexture=!0,ha.prototype=Object.create(Ft.prototype),ha.prototype.constructor=ha,tl.prototype=Object.create(X.prototype),tl.prototype.constructor=tl,ua.prototype=Object.create(Ft.prototype),ua.prototype.constructor=ua,Xi.prototype=Object.create(X.prototype),Xi.prototype.constructor=Xi,xi.prototype=Object.create(Ft.prototype),xi.prototype.constructor=xi,el.prototype=Object.create(X.prototype),el.prototype.constructor=el,ca.prototype=Object.create(xi.prototype),ca.prototype.constructor=ca,il.prototype=Object.create(X.prototype),il.prototype.constructor=il,_s.prototype=Object.create(xi.prototype),_s.prototype.constructor=_s,nl.prototype=Object.create(X.prototype),nl.prototype.constructor=nl,fa.prototype=Object.create(xi.prototype),fa.prototype.constructor=fa,da.prototype=Object.create(X.prototype),da.prototype.constructor=da,pa.prototype=Object.create(xi.prototype),pa.prototype.constructor=pa,gn.prototype=Object.create(X.prototype),gn.prototype.constructor=gn,Zo.prototype=Object.create(Ft.prototype),Zo.prototype.constructor=Zo,Zr.prototype=Object.create(X.prototype),Zr.prototype.constructor=Zr,xs.prototype=Object.create(Ft.prototype),xs.prototype.constructor=xs,ws.prototype=Object.create(X.prototype),ws.prototype.constructor=ws,Un.prototype=Object.create(Ft.prototype),Un.prototype.constructor=Un;var Nu={triangulate:function(t,e,i){i=i||2;var n=e&&e.length,o=n?e[0]*i:t.length,l=kh(t,0,o,i,!0),f=[];if(!l)return f;var p;if(n){var y=i;n=[];var w,A=0;for(w=e.length;A<w;A++){var P=e[A]*y,B=A<w-1?e[A+1]*y:t.length;P=kh(t,P,B,y,!1),P===P.next&&(P.steiner=!0),n.push(yr(P))}for(n.sort(Su),A=0;A<n.length;A++)e=n[A],y=l,(y=Eu(e,y))&&(e=rl(y,e),ma(e,e.next)),l=ma(l,l.next)}if(t.length>80*i){var H=p=t[0],q=n=t[1];for(y=i;y<o;y+=i)A=t[y],e=t[y+1],A<H&&(H=A),e<q&&(q=e),A>p&&(p=A),e>n&&(n=e);p=Math.max(p-H,n-q),p=p!==0?1/p:0}return ga(l,f,i,H,q,p),f}},To={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>To.area(t)},triangulateShape:function(t,e){var i=[],n=[],o=[];$l(t),bu(i,t);var l=t.length;for(e.forEach($l),t=0;t<e.length;t++)n.push(l),l+=e[t].length,bu(i,e[t]);for(e=Nu.triangulate(i,n),t=0;t<e.length;t+=3)o.push(e.slice(t,t+3));return o}};Po.prototype=Object.create(X.prototype),Po.prototype.constructor=Po,Po.prototype.toJSON=function(){var t=X.prototype.toJSON.call(this);return Cu(this.parameters.shapes,this.parameters.options,t)},po.prototype=Object.create(Ft.prototype),po.prototype.constructor=po,po.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return Cu(this.parameters.shapes,this.parameters.options,t)};var Ml={generateTopUV:function(t,e,i,n,o){t=e[3*n],n=e[3*n+1];var l=e[3*o];return o=e[3*o+1],[new s(e[3*i],e[3*i+1]),new s(t,n),new s(l,o)]},generateSideWallUV:function(t,e,i,n,o,l){t=e[3*i];var f=e[3*i+1];i=e[3*i+2];var p=e[3*n],y=e[3*n+1];n=e[3*n+2];var w=e[3*o],A=e[3*o+1];o=e[3*o+2];var P=e[3*l],B=e[3*l+1];return e=e[3*l+2],.01>Math.abs(f-y)?[new s(t,1-i),new s(p,1-n),new s(w,1-o),new s(P,1-e)]:[new s(f,1-i),new s(y,1-n),new s(A,1-o),new s(B,1-e)]}};ol.prototype=Object.create(X.prototype),ol.prototype.constructor=ol,Ms.prototype=Object.create(po.prototype),Ms.prototype.constructor=Ms,Jo.prototype=Object.create(X.prototype),Jo.prototype.constructor=Jo,Or.prototype=Object.create(Ft.prototype),Or.prototype.constructor=Or,sl.prototype=Object.create(X.prototype),sl.prototype.constructor=sl,Ss.prototype=Object.create(Ft.prototype),Ss.prototype.constructor=Ss,va.prototype=Object.create(X.prototype),va.prototype.constructor=va,$o.prototype=Object.create(Ft.prototype),$o.prototype.constructor=$o,Lo.prototype=Object.create(X.prototype),Lo.prototype.constructor=Lo,Lo.prototype.toJSON=function(){var t=X.prototype.toJSON.call(this);return Au(this.parameters.shapes,t)},Ko.prototype=Object.create(Ft.prototype),Ko.prototype.constructor=Ko,Ko.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return Au(this.parameters.shapes,t)},Qo.prototype=Object.create(Ft.prototype),Qo.prototype.constructor=Qo,Ro.prototype=Object.create(X.prototype),Ro.prototype.constructor=Ro,Oo.prototype=Object.create(Ft.prototype),Oo.prototype.constructor=Oo,ya.prototype=Object.create(Ro.prototype),ya.prototype.constructor=ya,Gn.prototype=Object.create(Oo.prototype),Gn.prototype.constructor=Gn,Es.prototype=Object.create(X.prototype),Es.prototype.constructor=Es,mo.prototype=Object.create(Ft.prototype),mo.prototype.constructor=mo;var yn=Object.freeze({WireframeGeometry:ha,ParametricGeometry:tl,ParametricBufferGeometry:ua,TetrahedronGeometry:el,TetrahedronBufferGeometry:ca,OctahedronGeometry:il,OctahedronBufferGeometry:_s,IcosahedronGeometry:nl,IcosahedronBufferGeometry:fa,DodecahedronGeometry:da,DodecahedronBufferGeometry:pa,PolyhedronGeometry:Xi,PolyhedronBufferGeometry:xi,TubeGeometry:gn,TubeBufferGeometry:Zo,TorusKnotGeometry:Zr,TorusKnotBufferGeometry:xs,TorusGeometry:ws,TorusBufferGeometry:Un,TextGeometry:ol,TextBufferGeometry:Ms,SphereGeometry:Jo,SphereBufferGeometry:Or,RingGeometry:sl,RingBufferGeometry:Ss,PlaneGeometry:Pe,PlaneBufferGeometry:pe,LatheGeometry:va,LatheBufferGeometry:$o,ShapeGeometry:Lo,ShapeBufferGeometry:Ko,ExtrudeGeometry:Po,ExtrudeBufferGeometry:po,EdgesGeometry:Qo,ConeGeometry:ya,ConeBufferGeometry:Gn,CylinderGeometry:Ro,CylinderBufferGeometry:Oo,CircleGeometry:Es,CircleBufferGeometry:mo,BoxGeometry:It,BoxBufferGeometry:Nt});ts.prototype=Object.create(Wt.prototype),ts.prototype.constructor=ts,ts.prototype.isShadowMaterial=!0,ts.prototype.copy=function(t){return Wt.prototype.copy.call(this,t),this.color.copy(t.color),this},bs.prototype=Object.create($e.prototype),bs.prototype.constructor=bs,bs.prototype.isRawShaderMaterial=!0,go.prototype=Object.create(Wt.prototype),go.prototype.constructor=go,go.prototype.isMeshStandardMaterial=!0,go.prototype.copy=function(t){return Wt.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},Cs.prototype=Object.create(go.prototype),Cs.prototype.constructor=Cs,Cs.prototype.isMeshPhysicalMaterial=!0,Cs.prototype.copy=function(t){return go.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},Jr.prototype=Object.create(Wt.prototype),Jr.prototype.constructor=Jr,Jr.prototype.isMeshPhongMaterial=!0,Jr.prototype.copy=function(t){return Wt.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},As.prototype=Object.create(Jr.prototype),As.prototype.constructor=As,As.prototype.isMeshToonMaterial=!0,As.prototype.copy=function(t){return Jr.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ps.prototype=Object.create(Wt.prototype),Ps.prototype.constructor=Ps,Ps.prototype.isMeshNormalMaterial=!0,Ps.prototype.copy=function(t){return Wt.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},Ir.prototype=Object.create(Wt.prototype),Ir.prototype.constructor=Ir,Ir.prototype.isMeshLambertMaterial=!0,Ir.prototype.copy=function(t){return Wt.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},Ls.prototype=Object.create(Wt.prototype),Ls.prototype.constructor=Ls,Ls.prototype.isMeshMatcapMaterial=!0,Ls.prototype.copy=function(t){return Wt.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},Rs.prototype=Object.create(Ni.prototype),Rs.prototype.constructor=Rs,Rs.prototype.isLineDashedMaterial=!0,Rs.prototype.copy=function(t){return Ni.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Fu=Object.freeze({ShadowMaterial:ts,SpriteMaterial:Hi,RawShaderMaterial:bs,ShaderMaterial:$e,PointsMaterial:Fn,MeshPhysicalMaterial:Cs,MeshStandardMaterial:go,MeshPhongMaterial:Jr,MeshToonMaterial:As,MeshNormalMaterial:Ps,MeshLambertMaterial:Ir,MeshDepthMaterial:se,MeshDistanceMaterial:te,MeshBasicMaterial:Ge,MeshMatcapMaterial:Ls,LineDashedMaterial:Rs,LineBasicMaterial:Ni,Material:Wt}),Yn={arraySlice:function(t,e,i){return Yn.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,l){return t[o]-t[l]}),i},sortedArray:function(t,e,i){for(var n=t.length,o=new t.constructor(n),l=0,f=0;f!==n;++l)for(var p=i[l]*e,y=0;y!==e;++y)o[f++]=t[p+y];return o},flattenJSON:function(t,e,i,n){for(var o=1,l=t[0];l!==void 0&&l[n]===void 0;)l=t[o++];if(l!==void 0){var f=l[n];if(f!==void 0)if(Array.isArray(f))do f=l[n],f!==void 0&&(e.push(l.time),i.push.apply(i,f)),l=t[o++];while(l!==void 0);else if(f.toArray!==void 0)do f=l[n],f!==void 0&&(e.push(l.time),f.toArray(i,i.length)),l=t[o++];while(l!==void 0);else do f=l[n],f!==void 0&&(e.push(l.time),i.push(f)),l=t[o++];while(l!==void 0)}}};Object.assign($n.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 l=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===l)break;if(o=n,n=e[++i],t<n)break e}n=e.length;break i}if(t>=o)break t;for(l=e[1],t<l&&(i=2,o=l),l=i-2;;){if(o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===l)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($n.prototype,{beforeStart_:$n.prototype.copySampleValue_,afterEnd_:$n.prototype.copySampleValue_}),al.prototype=Object.assign(Object.create($n.prototype),{constructor:al,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,o=t-2,l=t+1,f=n[o],p=n[l];if(f===void 0)switch(this.getSettings_().endingStart){case 2401:o=t,f=2*e-i;break;case 2402:o=n.length-2,f=e+n[o]-n[o+1];break;default:o=t,f=i}if(p===void 0)switch(this.getSettings_().endingEnd){case 2401:l=t,p=2*i-e;break;case 2402:l=1,p=i+n[1]-n[0];break;default:l=t-1,p=e}t=.5*(i-e),n=this.valueSize,this._weightPrev=t/(e-f),this._weightNext=t/(p-i),this._offsetPrev=o*n,this._offsetNext=l*n},interpolate_:function(t,e,i,n){var o=this.resultBuffer,l=this.sampleValues,f=this.valueSize;t*=f;var p=t-f,y=this._offsetPrev,w=this._offsetNext,A=this._weightPrev,P=this._weightNext,B=(i-e)/(n-e);for(i=B*B,n=i*B,e=-A*n+2*A*i-A*B,A=(1+A)*n+(-1.5-2*A)*i+(-.5+A)*B+1,B=(-1-P)*n+(1.5+P)*i+.5*B,P=P*n-P*i,i=0;i!==f;++i)o[i]=e*l[y+i]+A*l[p+i]+B*l[t+i]+P*l[w+i];return o}}),Dr.prototype=Object.assign(Object.create($n.prototype),{constructor:Dr,interpolate_:function(t,e,i,n){var o=this.resultBuffer,l=this.sampleValues,f=this.valueSize;t*=f;var p=t-f;for(e=(i-e)/(n-e),i=1-e,n=0;n!==f;++n)o[n]=l[p+n]*i+l[t+n]*e;return o}}),Os.prototype=Object.assign(Object.create($n.prototype),{constructor:Os,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(Hn,{toJSON:function(t){var e=t.constructor;if(e.toJSON!==void 0)e=e.toJSON(t);else{e={name:t.name,times:Yn.convertArray(t.times,Array),values:Yn.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e}}),Object.assign(Hn.prototype,{constructor:Hn,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new Os(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Dr(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new al(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,l=n-1;o!==n&&i[o]<t;)++o;for(;l!==-1&&i[l]>e;)--l;return++l,(o!==0||l!==n)&&(o>=l&&(l=Math.max(l,1),o=l-1),t=this.getValueSize(),this.times=Yn.arraySlice(i,o,l),this.values=Yn.arraySlice(this.values,o*t,l*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,l=0;l!==n;l++){var f=i[l];if(typeof f=="number"&&isNaN(f)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,l,f),t=!1;break}if(o!==null&&o>f){console.error("THREE.KeyframeTrack: Out of order keys.",this,l,f,o),t=!1;break}o=f}if(e!==void 0&&Yn.isTypedArray(e)){for(l=0,i=e.length;l!==i;++l)if(n=e[l],isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,l,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,l=t.length-1,f=1;f<l;++f){var p=!1,y=t[f];if(y!==t[f+1]&&(f!==1||y!==y[0]))if(n)p=!0;else{var w=f*i,A=w-i,P=w+i;for(y=0;y!==i;++y){var B=e[w+y];if(B!==e[A+y]||B!==e[P+y]){p=!0;break}}}if(p){if(f!==o)for(t[o]=t[f],p=f*i,w=o*i,y=0;y!==i;++y)e[w+y]=e[p+y];++o}}if(0<l){for(t[o]=t[l],p=l*i,w=o*i,y=0;y!==i;++y)e[w+y]=e[p+y];++o}return o!==t.length&&(this.times=Yn.arraySlice(t,0,o),this.values=Yn.arraySlice(e,0,o*i)),this}}),Kl.prototype=Object.assign(Object.create(Hn.prototype),{constructor:Kl,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ql.prototype=Object.assign(Object.create(Hn.prototype),{constructor:Ql,ValueTypeName:"color"}),$r.prototype=Object.assign(Object.create(Hn.prototype),{constructor:$r,ValueTypeName:"number"}),ar.prototype=Object.assign(Object.create($n.prototype),{constructor:ar,interpolate_:function(t,e,i,n){var o=this.resultBuffer,l=this.sampleValues,f=this.valueSize;for(t*=f,e=(i-e)/(n-e),i=t+f;t!==i;t+=4)d.slerpFlat(o,0,l,t-f,l,t,e);return o}}),_a.prototype=Object.assign(Object.create(Hn.prototype),{constructor:_a,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new ar(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),th.prototype=Object.assign(Object.create(Hn.prototype),{constructor:th,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),xa.prototype=Object.assign(Object.create(Hn.prototype),{constructor:xa,ValueTypeName:"vector"}),Object.assign(_r,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),o=0,l=i.length;o!==l;++o)e.push(Xc(i[o]).scale(n));return new _r(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(Hn.toJSON(i[n]));return t},CreateFromMorphTargetSequence:function(t,e,i,n){for(var o=e.length,l=[],f=0;f<o;f++){var p=[],y=[];p.push((f+o-1)%o,f,(f+1)%o),y.push(0,1,0);var w=Yn.getKeyframeOrder(p);p=Yn.sortedArray(p,1,w),y=Yn.sortedArray(y,1,w),n||p[0]!==0||(p.push(o),y.push(y[0])),l.push(new $r(".morphTargetInfluences["+e[f].name+"]",p,y).scale(1/i))}return new _r(t,-1,l)},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]+)$/,l=0,f=t.length;l<f;l++){var p=t[l],y=p.name.match(o);if(y&&1<y.length){var w=y[1];(y=n[w])||(n[w]=y=[]),y.push(p)}}t=[];for(w in n)t.push(_r.CreateFromMorphTargetSequence(w,n[w],e,i));return t},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var i=function($,rt,xt,gt,Ct){if(xt.length!==0){var wt=[],Vt=[];Yn.flattenJSON(xt,wt,Vt,gt),wt.length!==0&&Ct.push(new $(rt,wt,Vt))}},n=[],o=t.name||"default",l=t.length||-1,f=t.fps||30;t=t.hierarchy||[];for(var p=0;p<t.length;p++){var y=t[p].keys;if(y&&y.length!==0)if(y[0].morphTargets){l={};for(var w=0;w<y.length;w++)if(y[w].morphTargets)for(var A=0;A<y[w].morphTargets.length;A++)l[y[w].morphTargets[A]]=-1;for(var P in l){var B=[],H=[];for(A=0;A!==y[w].morphTargets.length;++A){var q=y[w];B.push(q.time),H.push(q.morphTarget===P?1:0)}n.push(new $r(".morphTargetInfluence["+P+"]",B,H))}l=l.length*(f||1)}else w=".bones["+e[p].name+"]",i(xa,w+".position",y,"pos",n),i(_a,w+".quaternion",y,"rot",n),i(xa,w+".scale",y,"scl",n)}return n.length===0?null:new _r(o,l,n)}}),Object.assign(_r.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 Mo={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={}}},tr=new es,Br={};Object.assign(Lt.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,l=Mo.get(t);if(l!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(l),o.manager.itemEnd(t)},0),l;if(Br[t]!==void 0)Br[t].push({onLoad:e,onProgress:i,onError:n});else{var f=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(f){i=f[1];var p=!!f[2];f=f[3],f=decodeURIComponent(f),p&&(f=atob(f));try{var y=(this.responseType||"").toLowerCase();switch(y){case"arraybuffer":case"blob":var w=new Uint8Array(f.length);for(p=0;p<f.length;p++)w[p]=f.charCodeAt(p);var A=y==="blob"?new Blob([w.buffer],{type:i}):w.buffer;break;case"document":A=new DOMParser().parseFromString(f,i);break;case"json":A=JSON.parse(f);break;default:A=f}setTimeout(function(){e&&e(A),o.manager.itemEnd(t)},0)}catch(B){setTimeout(function(){n&&n(B),o.manager.itemError(t),o.manager.itemEnd(t)},0)}}else{Br[t]=[],Br[t].push({onLoad:e,onProgress:i,onError:n});var P=new XMLHttpRequest;P.open("GET",t,!0),P.addEventListener("load",function(B){var H=this.response;Mo.add(t,H);var q=Br[t];if(delete Br[t],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var $=0,rt=q.length;$<rt;$++){var xt=q[$];xt.onLoad&&xt.onLoad(H)}}else{for($=0,rt=q.length;$<rt;$++)xt=q[$],xt.onError&&xt.onError(B);o.manager.itemError(t)}o.manager.itemEnd(t)},!1),P.addEventListener("progress",function(B){for(var H=Br[t],q=0,$=H.length;q<$;q++){var rt=H[q];rt.onProgress&&rt.onProgress(B)}},!1),P.addEventListener("error",function(B){var H=Br[t];delete Br[t];for(var q=0,$=H.length;q<$;q++){var rt=H[q];rt.onError&&rt.onError(B)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),P.addEventListener("abort",function(B){var H=Br[t];delete Br[t];for(var q=0,$=H.length;q<$;q++){var rt=H[q];rt.onError&&rt.onError(B)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),this.responseType!==void 0&&(P.responseType=this.responseType),this.withCredentials!==void 0&&(P.withCredentials=this.withCredentials),P.overrideMimeType&&P.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(p in this.requestHeader)P.setRequestHeader(p,this.requestHeader[p]);P.send(null)}return o.manager.itemStart(t),P}},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(Qt.prototype,{load:function(t,e,i,n){var o=this,l=new Lt(o.manager);l.setPath(o.path),l.load(t,function(f){e(o.parse(JSON.parse(f)))},i,n)},parse:function(t,e){for(var i=[],n=0;n<t.length;n++){var o=_r.parse(t[n]);i.push(o)}e(i)},setPath:function(t){return this.path=t,this}}),Object.assign(Zt.prototype,{load:function(t,e,i,n){function o(B){y.load(t[B],function(H){H=l._parser(H,!0),f[B]={width:H.width,height:H.height,format:H.format,mipmaps:H.mipmaps},w+=1,w===6&&(H.mipmapCount===1&&(p.minFilter=1006),p.format=H.format,p.needsUpdate=!0,e&&e(p))},i,n)}var l=this,f=[],p=new Yo;p.image=f;var y=new Lt(this.manager);if(y.setPath(this.path),y.setResponseType("arraybuffer"),Array.isArray(t))for(var w=0,A=0,P=t.length;A<P;++A)o(A);else y.load(t,function(B){if(B=l._parser(B,!0),B.isCubemap)for(var H=B.mipmaps.length/B.mipmapCount,q=0;q<H;q++){f[q]={mipmaps:[]};for(var $=0;$<B.mipmapCount;$++)f[q].mipmaps.push(B.mipmaps[q*B.mipmapCount+$]),f[q].format=B.format,f[q].width=B.width,f[q].height=B.height}else p.image.width=B.width,p.image.height=B.height,p.mipmaps=B.mipmaps;B.mipmapCount===1&&(p.minFilter=1006),p.format=B.format,p.needsUpdate=!0,e&&e(p)},i,n);return p},setPath:function(t){return this.path=t,this}}),Object.assign(Ue.prototype,{load:function(t,e,i,n){var o=this,l=new I,f=new Lt(this.manager);return f.setResponseType("arraybuffer"),f.setPath(this.path),f.load(t,function(p){(p=o._parser(p))&&(p.image!==void 0?l.image=p.image:p.data!==void 0&&(l.image.width=p.width,l.image.height=p.height,l.image.data=p.data),l.wrapS=p.wrapS!==void 0?p.wrapS:1001,l.wrapT=p.wrapT!==void 0?p.wrapT:1001,l.magFilter=p.magFilter!==void 0?p.magFilter:1006,l.minFilter=p.minFilter!==void 0?p.minFilter:1008,l.anisotropy=p.anisotropy!==void 0?p.anisotropy:1,p.format!==void 0&&(l.format=p.format),p.type!==void 0&&(l.type=p.type),p.mipmaps!==void 0&&(l.mipmaps=p.mipmaps),p.mipmapCount===1&&(l.minFilter=1006),l.needsUpdate=!0,e&&e(l,p))},i,n),l},setPath:function(t){return this.path=t,this}}),Object.assign(ai.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(){y.removeEventListener("load",o,!1),y.removeEventListener("error",l,!1),Mo.add(t,this),e&&e(this),f.manager.itemEnd(t)}function l(w){y.removeEventListener("load",o,!1),y.removeEventListener("error",l,!1),n&&n(w),f.manager.itemError(t),f.manager.itemEnd(t)}t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var f=this,p=Mo.get(t);if(p!==void 0)return f.manager.itemStart(t),setTimeout(function(){e&&e(p),f.manager.itemEnd(t)},0),p;var y=document.createElementNS("http://www.w3.org/1999/xhtml","img");return y.addEventListener("load",o,!1),y.addEventListener("error",l,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(y.crossOrigin=this.crossOrigin),f.manager.itemStart(t),y.src=t,y},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fi.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(y){f.load(t[y],function(w){l.images[y]=w,p++,p===6&&(l.needsUpdate=!0,e&&e(l))},void 0,n)}var l=new z,f=new ai(this.manager);f.setCrossOrigin(this.crossOrigin),f.setPath(this.path);var p=0;for(i=0;i<t.length;++i)o(i);return l},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(fn.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=new g,l=new ai(this.manager);return l.setCrossOrigin(this.crossOrigin),l.setPath(this.path),l.load(t,function(f){o.image=f,f=0<t.search(/\.jpe?g$/i)||t.search(/^data:image\/jpeg/)===0,o.format=f?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(Ee.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 l=this.getPoint(n/t);o+=l.distanceTo(i),e.push(o),i=l}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,l=n-1,f;o<=l;)if(t=Math.floor(o+(l-o)/2),f=i[t]-e,0>f)o=t+1;else if(0<f)l=t-1;else{l=t;break}return t=l,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 u,n=[],o=[],l=[],f=new u,p=new c,y;for(y=0;y<=t;y++){var w=y/t;n[y]=this.getTangentAt(w),n[y].normalize()}o[0]=new u,l[0]=new u,y=Number.MAX_VALUE,w=Math.abs(n[0].x);var A=Math.abs(n[0].y),P=Math.abs(n[0].z);for(w<=y&&(y=w,i.set(1,0,0)),A<=y&&(y=A,i.set(0,1,0)),P<=y&&i.set(0,0,1),f.crossVectors(n[0],i).normalize(),o[0].crossVectors(n[0],f),l[0].crossVectors(n[0],o[0]),y=1;y<=t;y++)o[y]=o[y-1].clone(),l[y]=l[y-1].clone(),f.crossVectors(n[y-1],n[y]),f.length()>Number.EPSILON&&(f.normalize(),i=Math.acos(di.clamp(n[y-1].dot(n[y]),-1,1)),o[y].applyMatrix4(p.makeRotationAxis(f,i))),l[y].crossVectors(n[y],o[y]);if(e===!0)for(i=Math.acos(di.clamp(o[0].dot(o[t]),-1,1)),i/=t,0<n[0].dot(f.crossVectors(o[0],o[t]))&&(i=-i),y=1;y<=t;y++)o[y].applyMatrix4(p.makeRotationAxis(n[y],i*y)),l[y].crossVectors(n[y],o[y]);return{tangents:n,normals:o,binormals:l}},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}}),Kn.prototype=Object.create(Ee.prototype),Kn.prototype.constructor=Kn,Kn.prototype.isEllipseCurve=!0,Kn.prototype.getPoint=function(t,e){e=e||new s;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 l=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,l-=this.aY,t=o*i-l*n+this.aX,l=o*n+l*i+this.aY),e.set(t,l)},Kn.prototype.copy=function(t){return Ee.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},Kn.prototype.toJSON=function(){var t=Ee.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},Kn.prototype.fromJSON=function(t){return Ee.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},wa.prototype=Object.create(Kn.prototype),wa.prototype.constructor=wa,wa.prototype.isArcCurve=!0;var bn=new u,Sl=new lr,lh=new lr,Nr=new lr;On.prototype=Object.create(Ee.prototype),On.prototype.constructor=On,On.prototype.isCatmullRomCurve3=!0,On.prototype.getPoint=function(t,e){e=e||new u;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 l=i[(o-1)%n];else bn.subVectors(i[0],i[1]).add(i[0]),l=bn;var f=i[o%n],p=i[(o+1)%n];if(this.closed||o+2<n?i=i[(o+2)%n]:(bn.subVectors(i[n-1],i[n-2]).add(i[n-1]),i=bn),this.curveType==="centripetal"||this.curveType==="chordal"){var y=this.curveType==="chordal"?.5:.25;n=Math.pow(l.distanceToSquared(f),y),o=Math.pow(f.distanceToSquared(p),y),y=Math.pow(p.distanceToSquared(i),y),1e-4>o&&(o=1),1e-4>n&&(n=o),1e-4>y&&(y=o),Sl.initNonuniformCatmullRom(l.x,f.x,p.x,i.x,n,o,y),lh.initNonuniformCatmullRom(l.y,f.y,p.y,i.y,n,o,y),Nr.initNonuniformCatmullRom(l.z,f.z,p.z,i.z,n,o,y)}else this.curveType==="catmullrom"&&(Sl.initCatmullRom(l.x,f.x,p.x,i.x,this.tension),lh.initCatmullRom(l.y,f.y,p.y,i.y,this.tension),Nr.initCatmullRom(l.z,f.z,p.z,i.z,this.tension));return e.set(Sl.calc(t),lh.calc(t),Nr.calc(t)),e},On.prototype.copy=function(t){Ee.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},On.prototype.toJSON=function(){var t=Ee.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},On.prototype.fromJSON=function(t){Ee.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 u().fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},hr.prototype=Object.create(Ee.prototype),hr.prototype.constructor=hr,hr.prototype.isCubicBezierCurve=!0,hr.prototype.getPoint=function(t,e){e=e||new s;var i=this.v0,n=this.v1,o=this.v2,l=this.v3;return e.set(is(t,i.x,n.x,o.x,l.x),is(t,i.y,n.y,o.y,l.y)),e},hr.prototype.copy=function(t){return Ee.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},hr.prototype.toJSON=function(){var t=Ee.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},hr.prototype.fromJSON=function(t){return Ee.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},Ti.prototype=Object.create(Ee.prototype),Ti.prototype.constructor=Ti,Ti.prototype.isCubicBezierCurve3=!0,Ti.prototype.getPoint=function(t,e){e=e||new u;var i=this.v0,n=this.v1,o=this.v2,l=this.v3;return e.set(is(t,i.x,n.x,o.x,l.x),is(t,i.y,n.y,o.y,l.y),is(t,i.z,n.z,o.z,l.z)),e},Ti.prototype.copy=function(t){return Ee.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},Ti.prototype.toJSON=function(){var t=Ee.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},Ti.prototype.fromJSON=function(t){return Ee.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},ur.prototype=Object.create(Ee.prototype),ur.prototype.constructor=ur,ur.prototype.isLineCurve=!0,ur.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},ur.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},ur.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},ur.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ur.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ur.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},zr.prototype=Object.create(Ee.prototype),zr.prototype.constructor=zr,zr.prototype.isLineCurve3=!0,zr.prototype.getPoint=function(t,e){return e=e||new u,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},zr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},zr.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},zr.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},zr.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},cr.prototype=Object.create(Ee.prototype),cr.prototype.constructor=cr,cr.prototype.isQuadraticBezierCurve=!0,cr.prototype.getPoint=function(t,e){e=e||new s;var i=this.v0,n=this.v1,o=this.v2;return e.set(vo(t,i.x,n.x,o.x),vo(t,i.y,n.y,o.y)),e},cr.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},cr.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},cr.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},yo.prototype=Object.create(Ee.prototype),yo.prototype.constructor=yo,yo.prototype.isQuadraticBezierCurve3=!0,yo.prototype.getPoint=function(t,e){e=e||new u;var i=this.v0,n=this.v1,o=this.v2;return e.set(vo(t,i.x,n.x,o.x),vo(t,i.y,n.y,o.y),vo(t,i.z,n.z,o.z)),e},yo.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},yo.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},yo.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Kr.prototype=Object.create(Ee.prototype),Kr.prototype.constructor=Kr,Kr.prototype.isSplineCurve=!0,Kr.prototype.getPoint=function(t,e){e=e||new s;var i=this.points,n=(i.length-1)*t;t=Math.floor(n),n-=t;var o=i[t===0?t:t-1],l=i[t],f=i[t>i.length-2?i.length-1:t+1];return i=i[t>i.length-3?i.length-1:t+2],e.set(Pu(n,o.x,l.x,f.x,i.x),Pu(n,o.y,l.y,f.y,i.y)),e},Kr.prototype.copy=function(t){Ee.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},Kr.prototype.toJSON=function(){var t=Ee.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},Kr.prototype.fromJSON=function(t){Ee.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};var hh=Object.freeze({ArcCurve:wa,CatmullRomCurve3:On,CubicBezierCurve:hr,CubicBezierCurve3:Ti,EllipseCurve:Kn,LineCurve:ur,LineCurve3:zr,QuadraticBezierCurve:cr,QuadraticBezierCurve3:yo,SplineCurve:Kr});Io.prototype=Object.assign(Object.create(Ee.prototype),{constructor:Io,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 ur(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 l=o[n];l=l.getPoints(l&&l.isEllipseCurve?2*t:l&&(l.isLineCurve||l.isLineCurve3)?1:l&&l.isSplineCurve?t*l.points.length:t);for(var f=0;f<l.length;f++){var p=l[f];i&&i.equals(p)||(e.push(p),i=p)}}return this.autoClose&&1<e.length&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},copy:function(t){Ee.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=Ee.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){Ee.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 hh[n.type]().fromJSON(n))}return this}}),fr.prototype=Object.assign(Object.create(Io.prototype),{constructor:fr,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 ur(this.currentPoint.clone(),new s(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){t=new cr(this.currentPoint.clone(),new s(t,e),new s(i,n)),this.curves.push(t),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,o,l){t=new hr(this.currentPoint.clone(),new s(t,e),new s(i,n),new s(o,l)),this.curves.push(t),this.currentPoint.set(o,l)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t);e=new Kr(e),this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,o,l){this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,l)},absarc:function(t,e,i,n,o,l){this.absellipse(t,e,i,i,n,o,l)},ellipse:function(t,e,i,n,o,l,f,p){this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,l,f,p)},absellipse:function(t,e,i,n,o,l,f,p){t=new Kn(t,e,i,n,o,l,f,p),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 Io.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=Io.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return Io.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Qn.prototype=Object.assign(Object.create(fr.prototype),{constructor:Qn,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){fr.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=fr.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){fr.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 fr().fromJSON(n))}return this}}),tn.prototype=Object.assign(Object.create(N.prototype),{constructor:tn,isLight:!0,copy:function(t){return N.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){return t=N.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}}),ll.prototype=Object.assign(Object.create(tn.prototype),{constructor:ll,isHemisphereLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(_o.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}}),hl.prototype=Object.assign(Object.create(_o.prototype),{constructor:hl,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*di.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())}}),ul.prototype=Object.assign(Object.create(tn.prototype),{constructor:ul,isSpotLight:!0,copy:function(t){return tn.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}}),Is.prototype=Object.assign(Object.create(tn.prototype),{constructor:Is,isPointLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),Ta.prototype=Object.assign(Object.create(Be.prototype),{constructor:Ta,isOrthographicCamera:!0,copy:function(t,e){return Be.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,l){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=l,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 l=(this.right-this.left)/this.view.width;n=(this.top-this.bottom)/this.view.height,o+=this.view.offsetX/i*l,i=o+this.view.width/i*l,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=N.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}}),ns.prototype=Object.assign(Object.create(_o.prototype),{constructor:ns}),xo.prototype=Object.assign(Object.create(tn.prototype),{constructor:xo,isDirectionalLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Ds.prototype=Object.assign(Object.create(tn.prototype),{constructor:Ds,isAmbientLight:!0}),eh.prototype=Object.assign(Object.create(tn.prototype),{constructor:eh,isRectAreaLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){return t=tn.prototype.toJSON.call(this,t),t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(ih.prototype,{load:function(t,e,i,n){var o=this,l=new Lt(o.manager);l.setPath(o.path),l.load(t,function(f){e(o.parse(JSON.parse(f)))},i,n)},parse:function(t){function e(f){return i[f]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",f),i[f]}var i=this.textures,n=new Fu[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 l=t.uniforms[o];switch(n.uniforms[o]={},l.type){case"t":n.uniforms[o].value=e(l.value);break;case"c":n.uniforms[o].value=new L().setHex(l.value);break;case"v2":n.uniforms[o].value=new s().fromArray(l.value);break;case"v3":n.uniforms[o].value=new u().fromArray(l.value);break;case"v4":n.uniforms[o].value=new _().fromArray(l.value);break;case"m4":n.uniforms[o].value=new c().fromArray(l.value);break;default:n.uniforms[o].value=l.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 s().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 Us={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(Nh.prototype,{load:function(t,e,i,n){var o=this,l=new Lt(o.manager);l.setPath(o.path),l.load(t,function(f){e(o.parse(JSON.parse(f)))},i,n)},parse:function(t){var e=new Ft,i=t.data.index;i!==void 0&&(i=new ls[i.type](i.array),e.setIndex(new K(i,1)));var n=t.data.attributes;for(l in n){var o=n[l];i=new ls[o.type](o.array),e.addAttribute(l,new K(i,o.itemSize,o.normalized))}var l=t.data.groups||t.data.drawcalls||t.data.offsets;if(l!==void 0)for(i=0,n=l.length;i!==n;++i)o=l[i],e.addGroup(o.start,o.count,o.materialIndex);return t=t.data.boundingSphere,t!==void 0&&(l=new u,t.center!==void 0&&l.fromArray(t.center),e.boundingSphere=new D(l,t.radius)),e},setPath:function(t){return this.path=t,this}});var ls={Int8Array,Uint8Array,Uint8ClampedArray:typeof Uint8ClampedArray<"u"?Uint8ClampedArray:Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};Do.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(Do.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 L,i=new fn,n=new ih;return function(o,l,f){function p(B,H,q,$,rt){B=l+B;var xt=Do.Handlers.get(B);return xt!==null?B=xt.load(B):(i.setCrossOrigin(f),B=i.load(B)),H!==void 0&&(B.repeat.fromArray(H),H[0]!==1&&(B.wrapS=1e3),H[1]!==1&&(B.wrapT=1e3)),q!==void 0&&B.offset.fromArray(q),$!==void 0&&($[0]==="repeat"&&(B.wrapS=1e3),$[0]==="mirror"&&(B.wrapS=1002),$[1]==="repeat"&&(B.wrapT=1e3),$[1]==="mirror"&&(B.wrapT=1002)),rt!==void 0&&(B.anisotropy=rt),H=di.generateUUID(),y[H]=B,H}var y={},w={uuid:di.generateUUID(),type:"MeshLambertMaterial"},A;for(A in o){var P=o[A];switch(A){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":w.name=P;break;case"blending":w.blending=t[P];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",A,"is no longer supported.");break;case"colorDiffuse":w.color=e.fromArray(P).getHex();break;case"colorSpecular":w.specular=e.fromArray(P).getHex();break;case"colorEmissive":w.emissive=e.fromArray(P).getHex();break;case"specularCoef":w.shininess=P;break;case"shading":P.toLowerCase()==="basic"&&(w.type="MeshBasicMaterial"),P.toLowerCase()==="phong"&&(w.type="MeshPhongMaterial"),P.toLowerCase()==="standard"&&(w.type="MeshStandardMaterial");break;case"mapDiffuse":w.map=p(P,o.mapDiffuseRepeat,o.mapDiffuseOffset,o.mapDiffuseWrap,o.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":w.emissiveMap=p(P,o.mapEmissiveRepeat,o.mapEmissiveOffset,o.mapEmissiveWrap,o.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":w.lightMap=p(P,o.mapLightRepeat,o.mapLightOffset,o.mapLightWrap,o.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":w.aoMap=p(P,o.mapAORepeat,o.mapAOOffset,o.mapAOWrap,o.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":w.bumpMap=p(P,o.mapBumpRepeat,o.mapBumpOffset,o.mapBumpWrap,o.mapBumpAnisotropy);break;case"mapBumpScale":w.bumpScale=P;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":w.normalMap=p(P,o.mapNormalRepeat,o.mapNormalOffset,o.mapNormalWrap,o.mapNormalAnisotropy);break;case"mapNormalFactor":w.normalScale=P;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":w.specularMap=p(P,o.mapSpecularRepeat,o.mapSpecularOffset,o.mapSpecularWrap,o.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":w.metalnessMap=p(P,o.mapMetalnessRepeat,o.mapMetalnessOffset,o.mapMetalnessWrap,o.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":w.roughnessMap=p(P,o.mapRoughnessRepeat,o.mapRoughnessOffset,o.mapRoughnessWrap,o.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":w.alphaMap=p(P,o.mapAlphaRepeat,o.mapAlphaOffset,o.mapAlphaWrap,o.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":w.side=1;break;case"doubleSided":w.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),w.opacity=P;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":w[A]=P;break;case"vertexColors":P===!0&&(w.vertexColors=2),P==="face"&&(w.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",A,P)}}return w.type==="MeshBasicMaterial"&&delete w.emissive,w.type!=="MeshPhongMaterial"&&delete w.specular,1>w.opacity&&(w.transparent=!0),n.setTextures(y),n.parse(w)}}()}),Object.assign(zs.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,l=this.path===void 0?Us.extractUrlBase(t):this.path,f=new Lt(this.manager);f.setPath(this.path),f.setWithCredentials(this.withCredentials),f.load(t,function(p){p=JSON.parse(p);var y=p.metadata;if(y!==void 0&&(y=y.type,y!==void 0&&y.toLowerCase()==="object")){console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");return}p=o.parse(p,l),e(p.geometry,p.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,l,f,p=n.faces,y=n.vertices,w=n.normals,A=n.colors,P=n.scale,B=0;if(n.uvs!==void 0){for(o=0;o<n.uvs.length;o++)n.uvs[o].length&&B++;for(o=0;o<B;o++)i.faceVertexUvs[o]=[]}var H=0;for(f=y.length;H<f;)o=new u,o.x=y[H++]*P,o.y=y[H++]*P,o.z=y[H++]*P,i.vertices.push(o);for(H=0,f=p.length;H<f;){y=p[H++];var q=y&1,$=y&2;o=y&8;var rt=y&16,xt=y&32;if(P=y&64,y&=128,q){q=new R,q.a=p[H],q.b=p[H+1],q.c=p[H+3];var gt=new R;if(gt.a=p[H+1],gt.b=p[H+2],gt.c=p[H+3],H+=4,$&&($=p[H++],q.materialIndex=$,gt.materialIndex=$),$=i.faces.length,o)for(o=0;o<B;o++){var Ct=n.uvs[o];for(i.faceVertexUvs[o][$]=[],i.faceVertexUvs[o][$+1]=[],l=0;4>l;l++){var wt=p[H++],Vt=Ct[2*wt];wt=Ct[2*wt+1],Vt=new s(Vt,wt),l!==2&&i.faceVertexUvs[o][$].push(Vt),l!==0&&i.faceVertexUvs[o][$+1].push(Vt)}}if(rt&&(rt=3*p[H++],q.normal.set(w[rt++],w[rt++],w[rt]),gt.normal.copy(q.normal)),xt)for(o=0;4>o;o++)rt=3*p[H++],xt=new u(w[rt++],w[rt++],w[rt]),o!==2&&q.vertexNormals.push(xt),o!==0&&gt.vertexNormals.push(xt);if(P&&(P=p[H++],P=A[P],q.color.setHex(P),gt.color.setHex(P)),y)for(o=0;4>o;o++)P=p[H++],P=A[P],o!==2&&q.vertexColors.push(new L(P)),o!==0&&gt.vertexColors.push(new L(P));i.faces.push(q),i.faces.push(gt)}else{if(q=new R,q.a=p[H++],q.b=p[H++],q.c=p[H++],$&&($=p[H++],q.materialIndex=$),$=i.faces.length,o)for(o=0;o<B;o++)for(Ct=n.uvs[o],i.faceVertexUvs[o][$]=[],l=0;3>l;l++)wt=p[H++],Vt=Ct[2*wt],wt=Ct[2*wt+1],Vt=new s(Vt,wt),i.faceVertexUvs[o][$].push(Vt);if(rt&&(rt=3*p[H++],q.normal.set(w[rt++],w[rt++],w[rt])),xt)for(o=0;3>o;o++)rt=3*p[H++],xt=new u(w[rt++],w[rt++],w[rt]),q.vertexNormals.push(xt);if(P&&(P=p[H++],q.color.setHex(A[P])),y)for(o=0;3>o;o++)P=p[H++],q.vertexColors.push(new L(A[P]));i.faces.push(q)}}if(n=t,H=n.influencesPerVertex!==void 0?n.influencesPerVertex:2,n.skinWeights)for(f=0,p=n.skinWeights.length;f<p;f+=H)i.skinWeights.push(new _(n.skinWeights[f],1<H?n.skinWeights[f+1]:0,2<H?n.skinWeights[f+2]:0,3<H?n.skinWeights[f+3]:0));if(n.skinIndices)for(f=0,p=n.skinIndices.length;f<p;f+=H)i.skinIndices.push(new _(n.skinIndices[f],1<H?n.skinIndices[f+1]:0,2<H?n.skinIndices[f+2]:0,3<H?n.skinIndices[f+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."),f=t,p=f.scale,f.morphTargets!==void 0)for(n=0,H=f.morphTargets.length;n<H;n++)for(i.morphTargets[n]={},i.morphTargets[n].name=f.morphTargets[n].name,i.morphTargets[n].vertices=[],w=i.morphTargets[n].vertices,A=f.morphTargets[n].vertices,B=0,y=A.length;B<y;B+=3)P=new u,P.x=A[B]*p,P.y=A[B+1]*p,P.z=A[B+2]*p,w.push(P);if(f.morphColors!==void 0&&0<f.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),p=i.faces,f=f.morphColors[0].colors,n=0,H=p.length;n<H;n++)p[n].color.fromArray(f,3*n);for(f=t,n=[],H=[],f.animation!==void 0&&H.push(f.animation),f.animations!==void 0&&(f.animations.length?H=H.concat(f.animations):H.push(f.animations)),f=0;f<H.length;f++)(p=_r.parseAnimation(H[f],i.bones))&&n.push(p);return i.morphTargets&&(H=_r.CreateClipsFromMorphTargetSequences(i.morphTargets,10),n=n.concat(H)),0<n.length&&(i.animations=n),i.computeFaceNormals(),i.computeBoundingSphere(),t.materials===void 0||t.materials.length===0?{geometry:i}:(t=Do.prototype.initMaterials(t.materials,this.resourcePath||e,this.crossOrigin),{geometry:i,materials:t})}}()}),Object.assign(cl.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,l=this.path===void 0?Us.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||l,l=new Lt(o.manager),l.setPath(this.path),l.load(t,function(f){var p=null;try{p=JSON.parse(f)}catch(y){n!==void 0&&n(y),console.error("THREE:ObjectLoader: Can't parse "+t+".",y.message);return}f=p.metadata,f===void 0||f.type===void 0||f.type.toLowerCase()==="geometry"?console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead."):o.parse(p,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 Qn().fromJSON(t[i]);e[o.uuid]=o}return e},parseGeometries:function(t,e){var i={};if(t!==void 0)for(var n=new zs,o=new Nh,l=0,f=t.length;l<f;l++){var p=t[l];switch(p.type){case"PlaneGeometry":case"PlaneBufferGeometry":var y=new yn[p.type](p.width,p.height,p.widthSegments,p.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":y=new yn[p.type](p.width,p.height,p.depth,p.widthSegments,p.heightSegments,p.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":y=new yn[p.type](p.radius,p.segments,p.thetaStart,p.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":y=new yn[p.type](p.radiusTop,p.radiusBottom,p.height,p.radialSegments,p.heightSegments,p.openEnded,p.thetaStart,p.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":y=new yn[p.type](p.radius,p.height,p.radialSegments,p.heightSegments,p.openEnded,p.thetaStart,p.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":y=new yn[p.type](p.radius,p.widthSegments,p.heightSegments,p.phiStart,p.phiLength,p.thetaStart,p.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":y=new yn[p.type](p.radius,p.detail);break;case"RingGeometry":case"RingBufferGeometry":y=new yn[p.type](p.innerRadius,p.outerRadius,p.thetaSegments,p.phiSegments,p.thetaStart,p.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":y=new yn[p.type](p.radius,p.tube,p.radialSegments,p.tubularSegments,p.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":y=new yn[p.type](p.radius,p.tube,p.tubularSegments,p.radialSegments,p.p,p.q);break;case"LatheGeometry":case"LatheBufferGeometry":y=new yn[p.type](p.points,p.segments,p.phiStart,p.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":y=new yn[p.type](p.vertices,p.indices,p.radius,p.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":y=[];for(var w=0,A=p.shapes.length;w<A;w++){var P=e[p.shapes[w]];y.push(P)}y=new yn[p.type](y,p.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(y=[],w=0,A=p.shapes.length;w<A;w++)P=e[p.shapes[w]],y.push(P);w=p.options.extrudePath,w!==void 0&&(p.options.extrudePath=new hh[w.type]().fromJSON(w)),y=new yn[p.type](y,p.options);break;case"BufferGeometry":y=o.parse(p);break;case"Geometry":y=n.parse(p,this.resourcePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+p.type+'"');continue}y.uuid=p.uuid,p.name!==void 0&&(y.name=p.name),y.isBufferGeometry===!0&&p.userData!==void 0&&(y.userData=p.userData),i[p.uuid]=y}return i},parseMaterials:function(t,e){var i={},n={};if(t!==void 0){var o=new ih;o.setTextures(e),e=0;for(var l=t.length;e<l;e++){var f=t[e];if(f.type==="MultiMaterial"){for(var p=[],y=0;y<f.materials.length;y++){var w=f.materials[y];i[w.uuid]===void 0&&(i[w.uuid]=o.parse(w)),p.push(i[w.uuid])}n[f.uuid]=p}else n[f.uuid]=o.parse(f),i[f.uuid]=n[f.uuid]}}return n},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],o=_r.parse(n);n.uuid!==void 0&&(o.uuid=n.uuid),e.push(o)}return e},parseImages:function(t,e){function i(B){return n.manager.itemStart(B),l.load(B,function(){n.manager.itemEnd(B)},void 0,function(){n.manager.itemError(B),n.manager.itemEnd(B)})}var n=this,o={};if(t!==void 0&&0<t.length){e=new es(e);var l=new ai(e);l.setCrossOrigin(this.crossOrigin),e=0;for(var f=t.length;e<f;e++){var p=t[e],y=p.url;if(Array.isArray(y)){o[p.uuid]=[];for(var w=0,A=y.length;w<A;w++){var P=y[w];P=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(P)?P:n.resourcePath+P,o[p.uuid].push(i(P))}}else P=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(p.url)?p.url:n.resourcePath+p.url,o[p.uuid]=i(P)}}return o},parseTextures:function(t,e){function i(y,w){return typeof y=="number"?y:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",y),w[y])}var n={};if(t!==void 0)for(var o=0,l=t.length;o<l;o++){var f=t[o];f.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',f.uuid),e[f.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",f.image);var p=Array.isArray(e[f.image])?new z(e[f.image]):new g(e[f.image]);p.needsUpdate=!0,p.uuid=f.uuid,f.name!==void 0&&(p.name=f.name),f.mapping!==void 0&&(p.mapping=i(f.mapping,Uu)),f.offset!==void 0&&p.offset.fromArray(f.offset),f.repeat!==void 0&&p.repeat.fromArray(f.repeat),f.center!==void 0&&p.center.fromArray(f.center),f.rotation!==void 0&&(p.rotation=f.rotation),f.wrap!==void 0&&(p.wrapS=i(f.wrap[0],Zn),p.wrapT=i(f.wrap[1],Zn)),f.format!==void 0&&(p.format=f.format),f.minFilter!==void 0&&(p.minFilter=i(f.minFilter,uh)),f.magFilter!==void 0&&(p.magFilter=i(f.magFilter,uh)),f.anisotropy!==void 0&&(p.anisotropy=f.anisotropy),f.flipY!==void 0&&(p.flipY=f.flipY),n[f.uuid]=p}return n},parseObject:function(t,e,i){function n(w){return e[w]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",w),e[w]}function o(w){if(w!==void 0){if(Array.isArray(w)){for(var A=[],P=0,B=w.length;P<B;P++){var H=w[P];i[H]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",H),A.push(i[H])}return A}return i[w]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",w),i[w]}}switch(t.type){case"Scene":var l=new Xn;t.background!==void 0&&Number.isInteger(t.background)&&(l.background=new L(t.background)),t.fog!==void 0&&(t.fog.type==="Fog"?l.fog=new Sn(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(l.fog=new Re(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":l=new _e(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(l.focus=t.focus),t.zoom!==void 0&&(l.zoom=t.zoom),t.filmGauge!==void 0&&(l.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(l.filmOffset=t.filmOffset),t.view!==void 0&&(l.view=Object.assign({},t.view));break;case"OrthographicCamera":l=new Ta(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(l.zoom=t.zoom),t.view!==void 0&&(l.view=Object.assign({},t.view));break;case"AmbientLight":l=new Ds(t.color,t.intensity);break;case"DirectionalLight":l=new xo(t.color,t.intensity);break;case"PointLight":l=new Is(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":l=new eh(t.color,t.intensity,t.width,t.height);break;case"SpotLight":l=new ul(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":l=new ll(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":l=n(t.geometry);var f=o(t.material);l=l.bones&&0<l.bones.length?new Gi(l,f):new pi(l,f);break;case"LOD":l=new rn;break;case"Line":l=new ji(n(t.geometry),o(t.material),t.mode);break;case"LineLoop":l=new co(n(t.geometry),o(t.material));break;case"LineSegments":l=new gi(n(t.geometry),o(t.material));break;case"PointCloud":case"Points":l=new la(n(t.geometry),o(t.material));break;case"Sprite":l=new nn(o(t.material));break;case"Group":l=new ci;break;default:l=new N}if(l.uuid=t.uuid,t.name!==void 0&&(l.name=t.name),t.matrix!==void 0?(l.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(l.matrixAutoUpdate=t.matrixAutoUpdate),l.matrixAutoUpdate&&l.matrix.decompose(l.position,l.quaternion,l.scale)):(t.position!==void 0&&l.position.fromArray(t.position),t.rotation!==void 0&&l.rotation.fromArray(t.rotation),t.quaternion!==void 0&&l.quaternion.fromArray(t.quaternion),t.scale!==void 0&&l.scale.fromArray(t.scale)),t.castShadow!==void 0&&(l.castShadow=t.castShadow),t.receiveShadow!==void 0&&(l.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(l.shadow.bias=t.shadow.bias),t.shadow.radius!==void 0&&(l.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&l.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(l.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(l.visible=t.visible),t.frustumCulled!==void 0&&(l.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(l.renderOrder=t.renderOrder),t.userData!==void 0&&(l.userData=t.userData),t.layers!==void 0&&(l.layers.mask=t.layers),t.children!==void 0){f=t.children;for(var p=0;p<f.length;p++)l.add(this.parseObject(f[p],e,i))}if(t.type==="LOD")for(t=t.levels,f=0;f<t.length;f++){p=t[f];var y=l.getObjectByProperty("uuid",p.object);y!==void 0&&l.addLevel(y,p.distance)}return l}});var Uu={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Zn={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},uh={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};Fh.prototype={constructor:Fh,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,l=Mo.get(t);if(l!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(l),o.manager.itemEnd(t)},0),l;fetch(t).then(function(f){return f.blob()}).then(function(f){return createImageBitmap(f,o.options)}).then(function(f){Mo.add(t,f),e&&e(f),o.manager.itemEnd(t)}).catch(function(f){n&&n(f),o.manager.itemError(t),o.manager.itemEnd(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(nh.prototype,{moveTo:function(t,e){this.currentPath=new fr,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,l){this.currentPath.bezierCurveTo(t,e,i,n,o,l)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(rt){for(var xt=[],gt=0,Ct=rt.length;gt<Ct;gt++){var wt=rt[gt],Vt=new Qn;Vt.curves=wt.curves,xt.push(Vt)}return xt}function n(rt,xt){for(var gt=xt.length,Ct=!1,wt=gt-1,Vt=0;Vt<gt;wt=Vt++){var J=xt[wt],ot=xt[Vt],zt=ot.x-J.x,ee=ot.y-J.y;if(Math.abs(ee)>Number.EPSILON){if(0>ee&&(J=xt[Vt],zt=-zt,ot=xt[wt],ee=-ee),!(rt.y<J.y||rt.y>ot.y))if(rt.y===J.y){if(rt.x===J.x)return!0}else{if(wt=ee*(rt.x-J.x)-zt*(rt.y-J.y),wt===0)return!0;0>wt||(Ct=!Ct)}}else if(rt.y===J.y&&(ot.x<=rt.x&&rt.x<=J.x||J.x<=rt.x&&rt.x<=ot.x))return!0}return Ct}var o=To.isClockWise,l=this.subPaths;if(l.length===0)return[];if(e===!0)return i(l);if(e=[],l.length===1){var f=l[0],p=new Qn;return p.curves=f.curves,e.push(p),e}var y=!o(l[0].getPoints());y=t?!y:y,p=[];var w=[],A=[],P=0;w[P]=void 0,A[P]=[];for(var B=0,H=l.length;B<H;B++){f=l[B];var q=f.getPoints(),$=o(q);($=t?!$:$)?(!y&&w[P]&&P++,w[P]={s:new Qn,p:q},w[P].s.curves=f.curves,y&&P++,A[P]=[]):A[P].push({h:f,p:q[0]})}if(!w[0])return i(l);if(1<w.length){for(B=!1,t=[],o=0,l=w.length;o<l;o++)p[o]=[];for(o=0,l=w.length;o<l;o++)for(f=A[o],$=0;$<f.length;$++){for(y=f[$],P=!0,q=0;q<w.length;q++)n(y.p,w[q].p)&&(o!==q&&t.push({froms:o,tos:q,hole:$}),P?(P=!1,p[q].push(y)):B=!0);P&&p[o].push(y)}0<t.length&&(B||(A=p))}for(B=0,o=w.length;B<o;B++)for(p=w[B].s,e.push(p),t=A[B],l=0,f=t.length;l<f;l++)p.holes.push(t[l].h);return e}}),Object.assign(Uh.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 l=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*n;t=[];for(var f=0,p=0,y=0;y<o.length;y++){var w=o[y];if(w===`
2571
+ `)f=0,p-=l;else{var A=n,P=f,B=p;if(w=e.glyphs[w]||e.glyphs["?"]){var H=new nh;if(w.o)for(var q=w._cachedOutline||(w._cachedOutline=w.o.split(" ")),$=0,rt=q.length;$<rt;)switch(q[$++]){case"m":var xt=q[$++]*A+P,gt=q[$++]*A+B;H.moveTo(xt,gt);break;case"l":xt=q[$++]*A+P,gt=q[$++]*A+B,H.lineTo(xt,gt);break;case"q":var Ct=q[$++]*A+P,wt=q[$++]*A+B,Vt=q[$++]*A+P,J=q[$++]*A+B;H.quadraticCurveTo(Vt,J,Ct,wt);break;case"b":Ct=q[$++]*A+P,wt=q[$++]*A+B,Vt=q[$++]*A+P,J=q[$++]*A+B,xt=q[$++]*A+P,gt=q[$++]*A+B,H.bezierCurveTo(Vt,J,xt,gt,Ct,wt)}A={offsetX:w.ha*A,path:H}}else A=void 0;f+=A.offsetX,t.push(A.path)}}for(e=0,o=t.length;e<o;e++)Array.prototype.push.apply(i,t[e].toShapes());return i}}),Object.assign(Lu.prototype,{load:function(t,e,i,n){var o=this,l=new Lt(this.manager);l.setPath(this.path),l.load(t,function(f){try{var p=JSON.parse(f)}catch{console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),p=JSON.parse(f.substring(65,f.length-2))}f=o.parse(p),e&&e(f)},i,n)},parse:function(t){return new Uh(t)},setPath:function(t){return this.path=t,this}});var ch,$h={getContext:function(){return ch===void 0&&(ch=new(window.AudioContext||window.webkitAudioContext)),ch},setContext:function(t){ch=t}};Object.assign(vn.prototype,{load:function(t,e,i,n){var o=new Lt(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.load(t,function(l){l=l.slice(0),$h.getContext().decodeAudioData(l,function(f){e(f)})},i,n)},setPath:function(t){return this.path=t,this}}),Object.assign(Vn.prototype,{update:function(){var t,e,i,n,o,l,f,p,y=new c,w=new c;return function(A){if(t!==this||e!==A.focus||i!==A.fov||n!==A.aspect*this.aspect||o!==A.near||l!==A.far||f!==A.zoom||p!==this.eyeSep){t=this,e=A.focus,i=A.fov,n=A.aspect*this.aspect,o=A.near,l=A.far,f=A.zoom;var P=A.projectionMatrix.clone();p=this.eyeSep/2;var B=p*o/e,H=o*Math.tan(di.DEG2RAD*i*.5)/f;w.elements[12]=-p,y.elements[12]=p;var q=-H*n+B,$=H*n+B;P.elements[0]=2*o/($-q),P.elements[8]=($+q)/($-q),this.cameraL.projectionMatrix.copy(P),q=-H*n-B,$=H*n-B,P.elements[0]=2*o/($-q),P.elements[8]=($+q)/($-q),this.cameraR.projectionMatrix.copy(P)}this.cameraL.matrixWorld.copy(A.matrixWorld).multiply(w),this.cameraR.matrixWorld.copy(A.matrixWorld).multiply(y)}}()}),fl.prototype=Object.create(N.prototype),fl.prototype.constructor=fl,Object.assign(Gh.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}}),rh.prototype=Object.assign(Object.create(N.prototype),{constructor:rh,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 u,e=new d,i=new u,n=new u,o=new Gh;return function(l){N.prototype.updateMatrixWorld.call(this,l),l=this.context.listener;var f=this.up;if(this.timeDelta=o.getDelta(),this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),l.positionX){var p=this.context.currentTime+this.timeDelta;l.positionX.linearRampToValueAtTime(t.x,p),l.positionY.linearRampToValueAtTime(t.y,p),l.positionZ.linearRampToValueAtTime(t.z,p),l.forwardX.linearRampToValueAtTime(n.x,p),l.forwardY.linearRampToValueAtTime(n.y,p),l.forwardZ.linearRampToValueAtTime(n.z,p),l.upX.linearRampToValueAtTime(f.x,p),l.upY.linearRampToValueAtTime(f.y,p),l.upZ.linearRampToValueAtTime(f.z,p)}else l.setPosition(t.x,t.y,t.z),l.setOrientation(n.x,n.y,n.z,f.x,f.y,f.z)}}()}),Ma.prototype=Object.assign(Object.create(N.prototype),{constructor:Ma,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}}),dl.prototype=Object.assign(Object.create(Ma.prototype),{constructor:dl,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 u,e=new d,i=new u,n=new u;return function(o){if(N.prototype.updateMatrixWorld.call(this,o),o=this.panner,this.matrixWorld.decompose(t,e,i),n.set(0,0,1).applyQuaternion(e),o.positionX){var l=this.context.currentTime+this.listener.timeDelta;o.positionX.linearRampToValueAtTime(t.x,l),o.positionY.linearRampToValueAtTime(t.y,l),o.positionZ.linearRampToValueAtTime(t.z,l),o.orientationX.linearRampToValueAtTime(n.x,l),o.orientationY.linearRampToValueAtTime(n.y,l),o.orientationZ.linearRampToValueAtTime(n.z,l)}else o.setPosition(t.x,t.y,t.z),o.setOrientation(n.x,n.y,n.z)}}()}),Object.assign(ks.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(pl.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 l=e+e;n!==l;++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){d.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,o){for(var l=1-n,f=0;f!==o;++f){var p=e+f;t[p]=t[p]*l+t[i+f]*n}}}),Object.assign(Bs.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(En,{Composite:Bs,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new En.Composite(t,e,i):new En(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+"$"),l=["material","materials","bones"];return function(f){var p=o.exec(f);if(!p)throw Error("PropertyBinding: Cannot parse trackName: "+f);p={nodeName:p[2],objectName:p[3],objectIndex:p[4],propertyName:p[5],propertyIndex:p[6]};var y=p.nodeName&&p.nodeName.lastIndexOf(".");if(y!==void 0&&y!==-1){var w=p.nodeName.substring(y+1);l.indexOf(w)!==-1&&(p.nodeName=p.nodeName.substring(0,y),p.objectName=w)}if(p.propertyName===null||p.propertyName.length===0)throw Error("PropertyBinding: can not parse propertyName from trackName: "+f);return p}}(),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 l=0;l<o.length;l++){var f=o[l];if(f.name===e||f.uuid===e||(f=n(f.children)))return f}return null};if(t=n(t.children))return t}return null}}),Object.assign(En.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=En.findNode(this.rootNode,e.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var l=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===l){l=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(l!==void 0){if(t[l]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[l]}}if(l=t[n],l===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=l,this.propertyIndex=o}else l.fromArray!==void 0&&l.toArray!==void 0?(i=this.BindingType.HasFromToArray,this.resolvedProperty=l):Array.isArray(l)?(i=this.BindingType.EntireArray,this.resolvedProperty=l):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(En.prototype,{_getValue_unbound:En.prototype.getValue,_setValue_unbound:En.prototype.setValue}),Object.assign(Sa.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._paths,l=this._parsedPaths,f=this._bindings,p=f.length,y=void 0,w=0,A=arguments.length;w!==A;++w){var P=arguments[w],B=P.uuid,H=n[B];if(H===void 0){H=e++,n[B]=H,t.push(P),B=0;for(var q=p;B!==q;++B)f[B].push(new En(P,o[B],l[B]))}else if(H<i){y=t[H];var $=--i;for(q=t[$],n[q.uuid]=H,t[H]=q,n[B]=$,t[$]=P,B=0,q=p;B!==q;++B){var rt=f[B],xt=rt[H];rt[H]=rt[$],xt===void 0&&(xt=new En(P,o[B],l[B])),rt[$]=xt}}else t[H]!==y&&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,l=0,f=arguments.length;l!==f;++l){var p=arguments[l],y=p.uuid,w=i[y];if(w!==void 0&&w>=e){var A=e++,P=t[A];for(i[P.uuid]=w,t[w]=P,i[y]=A,t[A]=p,p=0,y=o;p!==y;++p){P=n[p];var B=P[w];P[w]=P[A],P[A]=B}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._bindings,l=o.length,f=0,p=arguments.length;f!==p;++f){var y=arguments[f].uuid,w=n[y];if(w!==void 0)if(delete n[y],w<i){y=--i;var A=t[y],P=--e,B=t[P];for(n[A.uuid]=w,t[w]=A,n[B.uuid]=y,t[y]=B,t.pop(),A=0,B=l;A!==B;++A){var H=o[A],q=H[P];H[w]=H[y],H[y]=q,H.pop()}}else for(P=--e,B=t[P],n[B.uuid]=w,t[w]=B,t.pop(),A=0,B=l;A!==B;++A)H=o[A],H[w]=H[P],H.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 l=this._paths,f=this._parsedPaths,p=this._objects,y=this.nCachedObjects_,w=Array(p.length);for(n=o.length,i[t]=n,l.push(t),f.push(e),o.push(w),i=y,n=p.length;i!==n;++i)w[i]=new En(p[i],t,e);return w},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){var n=this._paths,o=this._parsedPaths,l=this._bindings,f=l.length-1,p=l[f];e[t[f]]=i,l[i]=p,l.pop(),o[i]=o[f],o.pop(),n[i]=n[f],n.pop()}}}),Object.assign(ml.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,l=this._timeScaleInterpolant,f=this.timeScale;return l===null&&(this._timeScaleInterpolant=l=n._lendControlInterpolant()),n=l.parameterPositions,l=l.sampleValues,n[0]=o,n[1]=o+i,l[0]=t/f,l[1]=e/f,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 l=0,f=e.length;l!==f;++l)e[l].evaluate(i),o[l].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,l=n===2202;if(t===0)return o===-1?e:l&&(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,l)):this._setEndings(this.repetitions===0,!0,l)),e>=i||0>e){n=Math.floor(e/i),e-=i*n,o+=Math.abs(n);var f=this.repetitions-o;0>=f?(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})):(f===1?(t=0>t,this._setEndings(t,!t,l)):this._setEndings(!1,!1,l),this._loopCount=o,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n}))}if(l&&(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,l=this._weightInterpolant;return l===null&&(this._weightInterpolant=l=n._lendControlInterpolant()),n=l.parameterPositions,l=l.sampleValues,n[0]=o,l[0]=e,n[1]=o+t,l[1]=i,this}}),rs.prototype=Object.assign(Object.create(a.prototype),{constructor:rs,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,o=n.length,l=t._propertyBindings;t=t._interpolants;var f=i.uuid,p=this._bindingsByRootAndName,y=p[f];for(y===void 0&&(y={},p[f]=y),p=0;p!==o;++p){var w=n[p],A=w.name,P=y[A];if(P===void 0){if(P=l[p],P!==void 0){P._cacheIndex===null&&(++P.referenceCount,this._addInactiveBinding(P,f,A));continue}P=new pl(En.create(i,A,e&&e._propertyBindings[p].binding.parsedPath),w.ValueTypeName,w.getValueSize()),++P.referenceCount,this._addInactiveBinding(P,f,A)}l[p]=P,t[p].resultBuffer=P.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,l=o[e];l===void 0?(l={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,o[e]=l):(e=l.knownActions,t._byClipCacheIndex=e.length,e.push(t)),t._cacheIndex=n.length,n.push(t),l.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,l=o[o.length-1],f=t._byClipCacheIndex;l._byClipCacheIndex=f,o[f]=l,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],l=this._bindings;o===void 0&&(o={},n[e]=o),o[i]=t,t._cacheIndex=l.length,l.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid;i=i.path;var o=this._bindingsByRootAndName,l=o[n],f=e[e.length-1];t=t._cacheIndex,f._cacheIndex=t,e[t]=f,e.pop(),delete l[i];t:{for(var p in l)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 Dr(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"?_r.findByName(i,t):t,t=i!==null?i.uuid:t;var o=this._actionsByClip[t],l=null;if(o!==void 0){if(l=o.actionByRoot[n],l!==void 0)return l;l=o.knownActions[0],i===null&&(i=l._clip)}return i===null?null:(e=new ml(this,i,e),this._bindAction(e,l),this._addInactiveAction(e,t,n),e)},existingAction:function(t,e){var i=e||this._root;return e=i.uuid,i=typeof t=="string"?_r.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),l=this._accuIndex^=1,f=0;f!==i;++f)e[f]._update(n,t,o,l);for(t=this._bindings,e=this._nActiveBindings,f=0;f!==e;++f)t[f].apply(l);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,l=n.length;o!==l;++o){var f=n[o];this._deactivateAction(f);var p=f._cacheIndex,y=e[e.length-1];f._cacheIndex=null,f._byClipCacheIndex=null,y._cacheIndex=p,e[p]=y,e.pop(),this._removeInactiveBindingsForAction(f)}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))}}),oh.prototype.clone=function(){return new oh(this.value.clone===void 0?this.value:this.value.clone())},Hh.prototype=Object.assign(Object.create(Ft.prototype),{constructor:Hh,isInstancedBufferGeometry:!0,copy:function(t){return Ft.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return new this.constructor().copy(this)}}),Vh.prototype=Object.assign(Object.create(ki.prototype),{constructor:Vh,isInstancedInterleavedBuffer:!0,copy:function(t){return ki.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Wh.prototype=Object.assign(Object.create(K.prototype),{constructor:Wh,isInstancedBufferAttribute:!0,copy:function(t){return K.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Ru.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||[],Ns(t,this,i,e),i.sort(gl),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++)Ns(t[n],this,i,e);return i.sort(gl),i}}),Object.assign(jh.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(di.clamp(e/this.radius,-1,1))),this}}),Object.assign(it.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(os.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 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}}(),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 s),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 s),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 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))},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 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()}}(),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(Ea.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 u),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 u),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 u),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new u,e=new u;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=di.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 u),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)}}),qn.prototype=Object.create(N.prototype),qn.prototype.constructor=qn,qn.prototype.isImmediateRenderObject=!0,_i.prototype=Object.create(gi.prototype),_i.prototype.constructor=_i,_i.prototype.update=function(){var t=new u,e=new u,i=new m;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var o=this.object.matrixWorld,l=this.geometry.attributes.position,f=this.object.geometry;if(f&&f.isGeometry)for(var p=f.vertices,y=f.faces,w=f=0,A=y.length;w<A;w++)for(var P=y[w],B=0,H=P.vertexNormals.length;B<H;B++){var q=P.vertexNormals[B];t.copy(p[P[n[B]]]).applyMatrix4(o),e.copy(q).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),l.setXYZ(f,t.x,t.y,t.z),f+=1,l.setXYZ(f,e.x,e.y,e.z),f+=1}else if(f&&f.isBufferGeometry)for(n=f.attributes.position,p=f.attributes.normal,B=f=0,H=n.count;B<H;B++)t.set(n.getX(B),n.getY(B),n.getZ(B)).applyMatrix4(o),e.set(p.getX(B),p.getY(B),p.getZ(B)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),l.setXYZ(f,t.x,t.y,t.z),f+=1,l.setXYZ(f,e.x,e.y,e.z),f+=1;l.needsUpdate=!0}}(),ba.prototype=Object.create(N.prototype),ba.prototype.constructor=ba,ba.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},ba.prototype.update=function(){var t=new u,e=new u;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)}}(),Ca.prototype=Object.create(gi.prototype),Ca.prototype.constructor=Ca,Ca.prototype.updateMatrixWorld=function(){var t=new u,e=new c,i=new c;return function(n){var o=this.bones,l=this.geometry,f=l.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var p=0,y=0;p<o.length;p++){var w=o[p];w.parent&&w.parent.isBone&&(e.multiplyMatrices(i,w.matrixWorld),t.setFromMatrixPosition(e),f.setXYZ(y,t.x,t.y,t.z),e.multiplyMatrices(i,w.parent.matrixWorld),t.setFromMatrixPosition(e),f.setXYZ(y+1,t.x,t.y,t.z),y+=2)}l.getAttribute("position").needsUpdate=!0,N.prototype.updateMatrixWorld.call(this,n)}}(),kr.prototype=Object.create(pi.prototype),kr.prototype.constructor=kr,kr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},kr.prototype.update=function(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Aa.prototype=Object.create(N.prototype),Aa.prototype.constructor=Aa,Aa.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Aa.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)},Pa.prototype=Object.create(N.prototype),Pa.prototype.constructor=Pa,Pa.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Pa.prototype.update=function(){var t=new u,e=new L,i=new L;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 l=0,f=o.count;l<f;l++){var p=l<f/2?e:i;o.setXYZ(l,p.r,p.g,p.b)}o.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),vl.prototype=Object.create(gi.prototype),vl.prototype.constructor=vl,sh.prototype=Object.create(gi.prototype),sh.prototype.constructor=sh,yl.prototype=Object.create(gi.prototype),yl.prototype.constructor=yl,yl.prototype.update=function(){var t=new u,e=new u,i=new m;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var n=this.object.matrixWorld,o=this.geometry.attributes.position,l=this.object.geometry,f=l.vertices;l=l.faces;for(var p=0,y=0,w=l.length;y<w;y++){var A=l[y],P=A.normal;t.copy(f[A.a]).add(f[A.b]).add(f[A.c]).divideScalar(3).applyMatrix4(n),e.copy(P).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(p,t.x,t.y,t.z),p+=1,o.setXYZ(p,e.x,e.y,e.z),p+=1}o.needsUpdate=!0}}(),dr.prototype=Object.create(N.prototype),dr.prototype.constructor=dr,dr.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},dr.prototype.update=function(){var t=new u,e=new u,i=new u;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()}}(),_l.prototype=Object.create(gi.prototype),_l.prototype.constructor=_l,_l.prototype.update=function(){function t(l,f,p,y){if(n.set(f,p,y).unproject(o),l=i[l],l!==void 0)for(f=e.getAttribute("position"),p=0,y=l.length;p<y;p++)f.setXYZ(l[p],n.x,n.y,n.z)}var e,i,n=new u,o=new Be;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}}(),zo.prototype=Object.create(gi.prototype),zo.prototype.constructor=zo,zo.prototype.update=function(){var t=new k;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()}}}(),zo.prototype.setFromObject=function(t){return this.object=t,this.update(),this},zo.prototype.copy=function(t){return gi.prototype.copy.call(this,t),this.object=t.object,this},zo.prototype.clone=function(){return new this.constructor().copy(this)},xl.prototype=Object.create(gi.prototype),xl.prototype.constructor=xl,xl.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),N.prototype.updateMatrixWorld.call(this,t))},wl.prototype=Object.create(ji.prototype),wl.prototype.constructor=wl,wl.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),N.prototype.updateMatrixWorld.call(this,t)};var fh,El;ko.prototype=Object.create(N.prototype),ko.prototype.constructor=ko,ko.prototype.setDirection=function(){var t=new u,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))}}(),ko.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()},ko.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},ko.prototype.copy=function(t){return N.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},ko.prototype.clone=function(){return new this.constructor().copy(this)},xr.prototype=Object.create(gi.prototype),xr.prototype.constructor=xr,Ee.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ee.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(Io.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 u(o.x,o.y,o.z||0))}return e}}),Object.assign(fr.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Iu.prototype=Object.create(On.prototype),Du.prototype=Object.create(On.prototype),Xh.prototype=Object.create(On.prototype),Object.assign(Xh.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.")}}),vl.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Ca.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Do.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Us.extractUrlBase(t)}}),Object.assign(zs.prototype,{setTexturePath:function(t){return console.warn("THREE.JSONLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(cl.prototype,{setTexturePath:function(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(os.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(k.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)}}),Ea.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(di,{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()."),di.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),di.ceilPowerOfTwo(t)}}),Object.assign(m.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(c.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 u),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,l){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,l)}}),F.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},d.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(Si.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(Oe.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(Oe,{barycoordFromPoint:function(t,e,i,n,o){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Oe.getBarycoord(t,e,i,n,o)},normal:function(t,e,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Oe.getNormal(t,e,i,n)}}),Object.assign(Qn.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 Po(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Lo(this,t)}}),Object.assign(s.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(u.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(_.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(N.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(N.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(rn.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(un.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ee.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}}),_e.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(tn.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(K.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(Ft.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(Ft.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(po.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(oh.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(Wt.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 L}},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(Jr.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($e.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(xe.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(xe.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(ye.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(S.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(mi.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}}),Ma.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return new vn().load(t,function(i){e.setBuffer(i)}),this},ks.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},fl.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},ss.crossOrigin=void 0,ss.loadTexture=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var o=new fn;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},ss.loadTextureCube=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var o=new Fi;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},ss.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},ss.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},x.WebGLRenderTargetCube=b,x.WebGLRenderTarget=S,x.WebGLRenderer=xe,x.ShaderLib=wo,x.UniformsLib=qe,x.UniformsUtils=Bn,x.ShaderChunk=Ci,x.FogExp2=Re,x.Fog=Sn,x.Scene=Xn,x.Sprite=nn,x.LOD=rn,x.SkinnedMesh=Gi,x.Skeleton=un,x.Bone=cn,x.Mesh=pi,x.LineSegments=gi,x.LineLoop=co,x.Line=ji,x.Points=la,x.Group=ci,x.VideoTexture=zh,x.DataTexture=I,x.DataTexture3D=Q,x.CompressedTexture=Yo,x.CubeTexture=z,x.CanvasTexture=Ka,x.DepthTexture=Qa,x.Texture=g,x.AnimationLoader=Qt,x.CompressedTextureLoader=Zt,x.DataTextureLoader=Ue,x.CubeTextureLoader=Fi,x.TextureLoader=fn,x.ObjectLoader=cl,x.MaterialLoader=ih,x.BufferGeometryLoader=Nh,x.DefaultLoadingManager=tr,x.LoadingManager=es,x.JSONLoader=zs,x.ImageLoader=ai,x.ImageBitmapLoader=Fh,x.FontLoader=Lu,x.FileLoader=Lt,x.Loader=Do,x.LoaderUtils=Us,x.Cache=Mo,x.AudioLoader=vn,x.SpotLightShadow=hl,x.SpotLight=ul,x.PointLight=Is,x.RectAreaLight=eh,x.HemisphereLight=ll,x.DirectionalLightShadow=ns,x.DirectionalLight=xo,x.AmbientLight=Ds,x.LightShadow=_o,x.Light=tn,x.StereoCamera=Vn,x.PerspectiveCamera=_e,x.OrthographicCamera=Ta,x.CubeCamera=fl,x.ArrayCamera=Fe,x.Camera=Be,x.AudioListener=rh,x.PositionalAudio=dl,x.AudioContext=$h,x.AudioAnalyser=ks,x.Audio=Ma,x.VectorKeyframeTrack=xa,x.StringKeyframeTrack=th,x.QuaternionKeyframeTrack=_a,x.NumberKeyframeTrack=$r,x.ColorKeyframeTrack=Ql,x.BooleanKeyframeTrack=Kl,x.PropertyMixer=pl,x.PropertyBinding=En,x.KeyframeTrack=Hn,x.AnimationUtils=Yn,x.AnimationObjectGroup=Sa,x.AnimationMixer=rs,x.AnimationClip=_r,x.Uniform=oh,x.InstancedBufferGeometry=Hh,x.BufferGeometry=Ft,x.Geometry=X,x.InterleavedBufferAttribute=Bi,x.InstancedInterleavedBuffer=Vh,x.InterleavedBuffer=ki,x.InstancedBufferAttribute=Wh,x.Face3=R,x.Object3D=N,x.Raycaster=Ru,x.Layers=U,x.EventDispatcher=a,x.Clock=Gh,x.QuaternionLinearInterpolant=ar,x.LinearInterpolant=Dr,x.DiscreteInterpolant=Os,x.CubicInterpolant=al,x.Interpolant=$n,x.Triangle=Oe,x.Math=di,x.Spherical=jh,x.Cylindrical=it,x.Plane=F,x.Frustum=E,x.Sphere=D,x.Ray=Si,x.Matrix4=c,x.Matrix3=m,x.Box3=k,x.Box2=os,x.Line3=Ea,x.Euler=C,x.Vector4=_,x.Vector3=u,x.Vector2=s,x.Quaternion=d,x.Color=L,x.ImmediateRenderObject=qn,x.VertexNormalsHelper=_i,x.SpotLightHelper=ba,x.SkeletonHelper=Ca,x.PointLightHelper=kr,x.RectAreaLightHelper=Aa,x.HemisphereLightHelper=Pa,x.GridHelper=vl,x.PolarGridHelper=sh,x.FaceNormalsHelper=yl,x.DirectionalLightHelper=dr,x.CameraHelper=_l,x.BoxHelper=zo,x.Box3Helper=xl,x.PlaneHelper=wl,x.ArrowHelper=ko,x.AxesHelper=xr,x.Shape=Qn,x.Path=fr,x.ShapePath=nh,x.Font=Uh,x.CurvePath=Io,x.Curve=Ee,x.ImageUtils=ss,x.ShapeUtils=To,x.WebGLUtils=He,x.WireframeGeometry=ha,x.ParametricGeometry=tl,x.ParametricBufferGeometry=ua,x.TetrahedronGeometry=el,x.TetrahedronBufferGeometry=ca,x.OctahedronGeometry=il,x.OctahedronBufferGeometry=_s,x.IcosahedronGeometry=nl,x.IcosahedronBufferGeometry=fa,x.DodecahedronGeometry=da,x.DodecahedronBufferGeometry=pa,x.PolyhedronGeometry=Xi,x.PolyhedronBufferGeometry=xi,x.TubeGeometry=gn,x.TubeBufferGeometry=Zo,x.TorusKnotGeometry=Zr,x.TorusKnotBufferGeometry=xs,x.TorusGeometry=ws,x.TorusBufferGeometry=Un,x.TextGeometry=ol,x.TextBufferGeometry=Ms,x.SphereGeometry=Jo,x.SphereBufferGeometry=Or,x.RingGeometry=sl,x.RingBufferGeometry=Ss,x.PlaneGeometry=Pe,x.PlaneBufferGeometry=pe,x.LatheGeometry=va,x.LatheBufferGeometry=$o,x.ShapeGeometry=Lo,x.ShapeBufferGeometry=Ko,x.ExtrudeGeometry=Po,x.ExtrudeBufferGeometry=po,x.EdgesGeometry=Qo,x.ConeGeometry=ya,x.ConeBufferGeometry=Gn,x.CylinderGeometry=Ro,x.CylinderBufferGeometry=Oo,x.CircleGeometry=Es,x.CircleBufferGeometry=mo,x.BoxGeometry=It,x.BoxBufferGeometry=Nt,x.ShadowMaterial=ts,x.SpriteMaterial=Hi,x.RawShaderMaterial=bs,x.ShaderMaterial=$e,x.PointsMaterial=Fn,x.MeshPhysicalMaterial=Cs,x.MeshStandardMaterial=go,x.MeshPhongMaterial=Jr,x.MeshToonMaterial=As,x.MeshNormalMaterial=Ps,x.MeshLambertMaterial=Ir,x.MeshDepthMaterial=se,x.MeshDistanceMaterial=te,x.MeshBasicMaterial=Ge,x.MeshMatcapMaterial=Ls,x.LineDashedMaterial=Rs,x.LineBasicMaterial=Ni,x.Material=Wt,x.Float64BufferAttribute=At,x.Float32BufferAttribute=Et,x.Uint32BufferAttribute=Pt,x.Int32BufferAttribute=G,x.Uint16BufferAttribute=_t,x.Int16BufferAttribute=et,x.Uint8ClampedBufferAttribute=Rt,x.Uint8BufferAttribute=ct,x.Int8BufferAttribute=Z,x.BufferAttribute=K,x.ArcCurve=wa,x.CatmullRomCurve3=On,x.CubicBezierCurve=hr,x.CubicBezierCurve3=Ti,x.EllipseCurve=Kn,x.LineCurve=ur,x.LineCurve3=zr,x.QuadraticBezierCurve=cr,x.QuadraticBezierCurve3=yo,x.SplineCurve=Kr,x.REVISION="98",x.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},x.CullFaceNone=0,x.CullFaceBack=1,x.CullFaceFront=2,x.CullFaceFrontBack=3,x.FrontFaceDirectionCW=0,x.FrontFaceDirectionCCW=1,x.BasicShadowMap=0,x.PCFShadowMap=1,x.PCFSoftShadowMap=2,x.FrontSide=0,x.BackSide=1,x.DoubleSide=2,x.FlatShading=1,x.SmoothShading=2,x.NoColors=0,x.FaceColors=1,x.VertexColors=2,x.NoBlending=0,x.NormalBlending=1,x.AdditiveBlending=2,x.SubtractiveBlending=3,x.MultiplyBlending=4,x.CustomBlending=5,x.AddEquation=100,x.SubtractEquation=101,x.ReverseSubtractEquation=102,x.MinEquation=103,x.MaxEquation=104,x.ZeroFactor=200,x.OneFactor=201,x.SrcColorFactor=202,x.OneMinusSrcColorFactor=203,x.SrcAlphaFactor=204,x.OneMinusSrcAlphaFactor=205,x.DstAlphaFactor=206,x.OneMinusDstAlphaFactor=207,x.DstColorFactor=208,x.OneMinusDstColorFactor=209,x.SrcAlphaSaturateFactor=210,x.NeverDepth=0,x.AlwaysDepth=1,x.LessDepth=2,x.LessEqualDepth=3,x.EqualDepth=4,x.GreaterEqualDepth=5,x.GreaterDepth=6,x.NotEqualDepth=7,x.MultiplyOperation=0,x.MixOperation=1,x.AddOperation=2,x.NoToneMapping=0,x.LinearToneMapping=1,x.ReinhardToneMapping=2,x.Uncharted2ToneMapping=3,x.CineonToneMapping=4,x.UVMapping=300,x.CubeReflectionMapping=301,x.CubeRefractionMapping=302,x.EquirectangularReflectionMapping=303,x.EquirectangularRefractionMapping=304,x.SphericalReflectionMapping=305,x.CubeUVReflectionMapping=306,x.CubeUVRefractionMapping=307,x.RepeatWrapping=1e3,x.ClampToEdgeWrapping=1001,x.MirroredRepeatWrapping=1002,x.NearestFilter=1003,x.NearestMipMapNearestFilter=1004,x.NearestMipMapLinearFilter=1005,x.LinearFilter=1006,x.LinearMipMapNearestFilter=1007,x.LinearMipMapLinearFilter=1008,x.UnsignedByteType=1009,x.ByteType=1010,x.ShortType=1011,x.UnsignedShortType=1012,x.IntType=1013,x.UnsignedIntType=1014,x.FloatType=1015,x.HalfFloatType=1016,x.UnsignedShort4444Type=1017,x.UnsignedShort5551Type=1018,x.UnsignedShort565Type=1019,x.UnsignedInt248Type=1020,x.AlphaFormat=1021,x.RGBFormat=1022,x.RGBAFormat=1023,x.LuminanceFormat=1024,x.LuminanceAlphaFormat=1025,x.RGBEFormat=1023,x.DepthFormat=1026,x.DepthStencilFormat=1027,x.RedFormat=1028,x.RGB_S3TC_DXT1_Format=33776,x.RGBA_S3TC_DXT1_Format=33777,x.RGBA_S3TC_DXT3_Format=33778,x.RGBA_S3TC_DXT5_Format=33779,x.RGB_PVRTC_4BPPV1_Format=35840,x.RGB_PVRTC_2BPPV1_Format=35841,x.RGBA_PVRTC_4BPPV1_Format=35842,x.RGBA_PVRTC_2BPPV1_Format=35843,x.RGB_ETC1_Format=36196,x.RGBA_ASTC_4x4_Format=37808,x.RGBA_ASTC_5x4_Format=37809,x.RGBA_ASTC_5x5_Format=37810,x.RGBA_ASTC_6x5_Format=37811,x.RGBA_ASTC_6x6_Format=37812,x.RGBA_ASTC_8x5_Format=37813,x.RGBA_ASTC_8x6_Format=37814,x.RGBA_ASTC_8x8_Format=37815,x.RGBA_ASTC_10x5_Format=37816,x.RGBA_ASTC_10x6_Format=37817,x.RGBA_ASTC_10x8_Format=37818,x.RGBA_ASTC_10x10_Format=37819,x.RGBA_ASTC_12x10_Format=37820,x.RGBA_ASTC_12x12_Format=37821,x.LoopOnce=2200,x.LoopRepeat=2201,x.LoopPingPong=2202,x.InterpolateDiscrete=2300,x.InterpolateLinear=2301,x.InterpolateSmooth=2302,x.ZeroCurvatureEnding=2400,x.ZeroSlopeEnding=2401,x.WrapAroundEnding=2402,x.TrianglesDrawMode=0,x.TriangleStripDrawMode=1,x.TriangleFanDrawMode=2,x.LinearEncoding=3e3,x.sRGBEncoding=3001,x.GammaEncoding=3007,x.RGBEEncoding=3002,x.LogLuvEncoding=3003,x.RGBM7Encoding=3004,x.RGBM16Encoding=3005,x.RGBDEncoding=3006,x.BasicDepthPacking=3200,x.RGBADepthPacking=3201,x.TangentSpaceNormalMap=0,x.ObjectSpaceNormalMap=1,x.CubeGeometry=It,x.Face4=function(t,e,i,n,o,l,f){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new R(t,e,i,o,l,f)},x.LineStrip=0,x.LinePieces=1,x.MeshFaceMaterial=function(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t},x.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},x.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new la(t,e)},x.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new nn(t)},x.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new la(t,e)},x.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Fn(t)},x.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Fn(t)},x.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Fn(t)},x.Vertex=function(t,e,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new u(t,e,i)},x.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new K(t,e).setDynamic(!0)},x.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Z(t,e)},x.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new ct(t,e)},x.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Rt(t,e)},x.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new et(t,e)},x.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new _t(t,e)},x.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new G(t,e)},x.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Pt(t,e)},x.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Et(t,e)},x.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new At(t,e)},x.ClosedSplineCurve3=Iu,x.SplineCurve3=Du,x.Spline=Xh,x.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new xr(t)},x.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new zo(t,e)},x.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new gi(new Qo(t.geometry),new Ni({color:e!==void 0?e:16777215}))},x.WireframeHelper=function(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new gi(new ha(t.geometry),new Ni({color:e!==void 0?e:16777215}))},x.XHRLoader=function(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Lt(t)},x.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Ue(t)},x.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()}},x.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().")}},x.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},x.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")}},x.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(x,"__esModule",{value:!0})}),THREE.Sky=function(){var x=THREE.Sky.SkyShader,a=new THREE.ShaderMaterial({fragmentShader:x.fragmentShader,vertexShader:x.vertexShader,uniforms:THREE.UniformsUtils.clone(x.uniforms),side:THREE.BackSide});THREE.Mesh.call(this,new THREE.BoxBufferGeometry(1,1,1),a)},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(x){typeof module>"u"?window.charming=x:module.exports=x}(function(x,a){a=a||{};var s=a.tagName||"span",c=a.classPrefix!=null?a.classPrefix:"char",d=1,u=function(m){for(var g=m.parentNode,_=m.nodeValue,S=_.length,b=-1;++b<S;){var O=document.createElement(s);c&&(O.className=c+d,d++),O.appendChild(document.createTextNode(_[b])),g.insertBefore(O,m)}g.removeChild(m)};return function m(g){for(var _=[].slice.call(g.childNodes),S=_.length,b=-1;++b<S;)m(_[b]);g.nodeType===Node.TEXT_NODE&&u(g)}(x),x});class sm{constructor(a=[]){mars3d?(this.tilesetLayer,this.modelArr=a,this.bimObliquePhotographyId=[],this.editDate={id:null}):console.error("未引入指定插件")}pushModel(a){this.modelArr.push(a)}add(a,s,c){let d=c==null?void 0:c.isClone;const u=new Map([["click",mars3d.EventType.click],["initialTilesLoaded",mars3d.EventType.initialTilesLoaded]]);return new Promise((m,g)=>{let _,S,b,O,k,D,F,E,L,T={enabled:!0,precise:!1,czm:!1},M={enabled:!0,precise:!1,czm:!1};if(typeof a!="object"){let N=this.query(a);N||g("缺少树结构");let{id:X,bimModelExcavationDetails:K,bimModel:Z}=N;_=X,S=Z.modelType,b=Z.tender,O=Z.releasedDistance,k=Z.modelName,D=Z.isDynamicReleased,F={bimModelExcavationDetails:K},E=N.url,L=Z.modelColor,T.maxCanvasSize=Z.gridResolution||4080}else _=a.modelId,S=a.modelType,b=a.tender,O=a.releasedDistance,k=a.modelTitle,D=a.permission,F=a.customize,E=a.url,L=a.color,T.maxCanvasSize=a.maxCanvasSize||4080;let R=2147483648,C=16;if(c){if(c.color&&(L=c.color),c.clip&&(T.area=c.clip.handleDataList),c.flat&&(M.area=c.flat.handleDataList),c.maxCanvasSize&&(T.maxCanvasSize=c.maxCanvasSize||4080),c.cacheSpaceMultiplier){let N=N*c.cacheSpaceMultiplier}c.maximumScreenSpaceError&&S==0&&(C=c.maximumScreenSpaceError)}let U;if(d?window.mapClone&&(U=window.mapClone.mapEx.getLayer(a,"modelId")):U=window.map.getLayer(a,"modelId"),U)return m(U),c.color&&this.editColor(a,c.color,c),!1;if(E.indexOf("tileset.json")<0)return console.error("链接不完整",k),m({tite:"【模型】「"+k+"」链接地址有误",type:"error",id:_,url:E}),!1;new Cesium.Resource({url:E}).fetchJson().then(X=>{let K=null;L&&(K={color:{conditions:[["true",L]]}}),this.tilesetLayer=new mars3d.layer.TilesetLayer({modelId:_,modelType:S,tender:b,releasedDistance:O,modelTitle:k,permission:D,customize:F,url:encodeURI(E),skipLevelOfDetail:!1,loadSiblings:!0,cullRequestsWhileMoving:!0,cullRequestsWhileMovingMultiplier:10,preferLeaves:!0,progressiveResolutionHeightFraction:.5,dynamicScreenSpaceError:!0,preloadWhenHidden:!1,style:K,clip:T,flat:M,maximumScreenSpaceError:C,cacheBytes:1073741824,maximumCacheOverflowBytes:R}),this.tilesetLayer.bindPopup(Z=>{if(Z.graphic){const ct=Z.graphic.attr;let Rt=null,et=null;return JSON.stringify(ct)!=="{}"?(ct.name&&(Rt=ct.name.lastIndexOf("@")),Rt&&Rt>-1&&(et=ct.name.slice(0,Rt)),ct.name?`&nbsp;&nbsp;<span>${et||ct.name}</span>&nbsp;&nbsp;`:`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`):`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`}else return`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`}),this.tilesetLayer.readyPromise.then(Z=>{m(Z)}).catch(Z=>{console.log("加载失败",Z),m()}),this.tilesetLayer.on("click",Z=>{Z.layer.style==null&&map.bimMapEdit=="0"&&Z.layer.openHighlight({color:"rgba(255,0,0,1)"},!0)}),s&&Object.keys(s).forEach(Z=>{this.tilesetLayer.on(u.get(Z),ct=>{s[Z](ct)})}),S==0&&this.bimObliquePhotographyId.push(_),d?window.mapClone&&window.mapClone.mapEx.addLayer(this.tilesetLayer):window.map.addLayer(this.tilesetLayer)}).catch(X=>{console.error("数据加载失败",k),m({tite:"【模型】「"+k+"」无法加载",type:"error",id:_,url:E})})})}remove(a,s){let c=s==null?void 0:s.isClone;window.map.getLayer(a,"modelId")&&(c?(window.mapClone.mapEx.getLayer(a,"modelId").closeHighlight(),window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"modelId"))):(window.map.getLayer(a,"modelId").closeHighlight(),window.map.removeLayer(window.map.getLayer(a,"modelId"))))}selected(a,s,c,d=!0){return new Promise((u,m)=>{let g=window.map.getLayer(a,"modelId");g?(g.style==null&&map.bimMapEdit=="0"&&g.openHighlight({color:"rgba(255,0,0,1)"},!0),d?g.flyTo({complete:()=>{u(g)}}):u(g)):this.add(a,s,c).then(_=>{_&&(_.style==null&&map.bimMapEdit=="0"&&_.openHighlight({color:"rgba(255,0,0,1)"},!0),d?_.flyTo({complete:()=>{u(_)}}):u(_))})})}initial(){this.modelArr=[],this.bimObliquePhotographyId=[],this.tilesetLayer=null}query(a){return this.modelArr.length==0?!1:this.modelArr.find(s=>s.id==a)}queryModel(a){return window.map.getLayer(a,"modelId")}postEditDate(a){this.editDate={id:a}}editColor(a,s,c,d="true"){let u,m=c==null?void 0:c.isClone;if(typeof a!="object"&&(m?u=window.mapClone.mapEx.getLayer(a,"modelId"):u=window.map.getLayer(a,"modelId")),u)if(s)u.style={color:{conditions:[[d,s]]}};else{let g=this.query(a).bimModel.modelColor;g?u.style={color:{conditions:[[d,g]]}}:u.style=null}}editOpacity(a,s){window.map.getLayer(a,"modelId").opacity=s}addClip(a){return new Promise((s,c)=>{window.bimClip?s(bimClip.clipModelAdd(a)):c("挖洞工具未初始化")})}removeClip(a){window.bimClip?window.bimClip.clipModelremoveClip(a):console.log("挖洞工具未初始化")}}const su=x=>Object.prototype.toString.call(x)==="[object Object]";function au(){const x=Array.from(arguments);if(x.length<2)return x[0];let a=x[0];return x.shift(),x.forEach(s=>{if(su(s)){su(a)||(a={});for(let c in s)a[c]&&su(s[c])?a[c]=au(a[c],s[c]):a[c]=s[c]}else s instanceof Array&&(a instanceof Array||(a=[]),s.forEach((c,d)=>{su(c)?a[d]=au(a[d]):a[d]=c}))}),a}let vh={};const bf=(x,a,s)=>{vh={};let{vectorStyle:c,difference:d}=x;if(c){let{divType:u}=c,m="";if(u){let{theme_color:g,title:_,font_color:S,content:b,scaleByDistance:O,scaleByDistance_far:k,scaleByDistance_farValue:D,scaleByDistance_near:F,scaleByDistance_nearValue:E,distanceDisplayCondition:L,distanceDisplayCondition_far:T,distanceDisplayCondition_near:M,clampToGround:R,divStyle:C,isMirror:U}=c,{theme_color2:N,theme_color3:X}=C;switch(u){case"1":m=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${g};--theme-font-color1:${S};">
2573
+ `)},function(x){typeof module>"u"?window.charming=x:module.exports=x}(function(x,a){a=a||{};var s=a.tagName||"span",c=a.classPrefix!=null?a.classPrefix:"char",d=1,u=function(m){for(var g=m.parentNode,_=m.nodeValue,S=_.length,b=-1;++b<S;){var I=document.createElement(s);c&&(I.className=c+d,d++),I.appendChild(document.createTextNode(_[b])),g.insertBefore(I,m)}g.removeChild(m)};return function m(g){for(var _=[].slice.call(g.childNodes),S=_.length,b=-1;++b<S;)m(_[b]);g.nodeType===Node.TEXT_NODE&&u(g)}(x),x});class sm{constructor(a=[]){mars3d?(this.tilesetLayer,this.modelArr=a,this.bimObliquePhotographyId=[],this.editDate={id:null}):console.error("未引入指定插件")}pushModel(a){this.modelArr.push(a)}add(a,s,c){let d=c==null?void 0:c.isClone;const u=new Map([["click",mars3d.EventType.click],["initialTilesLoaded",mars3d.EventType.initialTilesLoaded]]);return new Promise((m,g)=>{let _,S,b,I,k,D,F,E,L,T={enabled:!0,precise:!1,czm:!1},M={enabled:!0,precise:!1,czm:!1};if(typeof a!="object"){let N=this.query(a);N||g("缺少树结构");let{id:X,bimModelExcavationDetails:K,bimModel:Z}=N;_=X,S=Z.modelType,b=Z.tender,I=Z.releasedDistance,k=Z.modelName,D=Z.isDynamicReleased,F={bimModelExcavationDetails:K},E=N.url,L=Z.modelColor,T.maxCanvasSize=Z.gridResolution||4080}else _=a.modelId,S=a.modelType,b=a.tender,I=a.releasedDistance,k=a.modelTitle,D=a.permission,F=a.customize,E=a.url,L=a.color,T.maxCanvasSize=a.maxCanvasSize||4080;let R=2147483648,C=16;if(c){if(c.color&&(L=c.color),c.clip&&(T.area=c.clip.handleDataList),c.flat&&(M.area=c.flat.handleDataList),c.maxCanvasSize&&(T.maxCanvasSize=c.maxCanvasSize||4080),c.cacheSpaceMultiplier){let N=N*c.cacheSpaceMultiplier}c.maximumScreenSpaceError&&S==0&&(C=c.maximumScreenSpaceError)}let U;if(d?window.mapClone&&(U=window.mapClone.mapEx.getLayer(a,"modelId")):U=window.map.getLayer(a,"modelId"),U)return c.color&&this.editColor(a,c.color,c),console.log("customAttributes.clip",c.clip),m(U),!1;if(E.indexOf("tileset.json")<0)return console.error("链接不完整",k),m({tite:"【模型】「"+k+"」链接地址有误",type:"error",id:_,url:E}),!1;new Cesium.Resource({url:E}).fetchJson().then(X=>{let K=null;L&&(K={color:{conditions:[["true",L]]}}),this.tilesetLayer=new mars3d.layer.TilesetLayer({modelId:_,modelType:S,tender:b,releasedDistance:I,modelTitle:k,permission:D,customize:F,url:encodeURI(E),skipLevelOfDetail:!1,loadSiblings:!0,cullRequestsWhileMoving:!0,cullRequestsWhileMovingMultiplier:10,preferLeaves:!0,progressiveResolutionHeightFraction:.5,dynamicScreenSpaceError:!0,preloadWhenHidden:!1,style:K,clip:T,flat:M,maximumScreenSpaceError:C,cacheBytes:1073741824,maximumCacheOverflowBytes:R}),this.tilesetLayer.bindPopup(Z=>{if(Z.graphic){const ct=Z.graphic.attr;let Rt=null,et=null;return JSON.stringify(ct)!=="{}"?(ct.name&&(Rt=ct.name.lastIndexOf("@")),Rt&&Rt>-1&&(et=ct.name.slice(0,Rt)),ct.name?`&nbsp;&nbsp;<span>${et||ct.name}</span>&nbsp;&nbsp;`:`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`):`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`}else return`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`}),this.tilesetLayer.readyPromise.then(Z=>{m(Z)}).catch(Z=>{console.log("加载失败",Z),m()}),this.tilesetLayer.on("click",Z=>{Z.layer.style==null&&map.bimMapEdit=="0"&&Z.layer.openHighlight({color:"rgba(255,0,0,1)"},!0)}),s&&Object.keys(s).forEach(Z=>{this.tilesetLayer.on(u.get(Z),ct=>{s[Z](ct)})}),S==0&&this.bimObliquePhotographyId.push(_),d?window.mapClone&&window.mapClone.mapEx.addLayer(this.tilesetLayer):window.map.addLayer(this.tilesetLayer)}).catch(X=>{console.error("数据加载失败",k),m({tite:"【模型】「"+k+"」无法加载",type:"error",id:_,url:E})})})}remove(a,s){let c=s==null?void 0:s.isClone;window.map.getLayer(a,"modelId")&&(c?(window.mapClone.mapEx.getLayer(a,"modelId").closeHighlight(),window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"modelId"))):(window.map.getLayer(a,"modelId").closeHighlight(),window.map.removeLayer(window.map.getLayer(a,"modelId"))))}selected(a,s,c,d=!0){return new Promise((u,m)=>{let g=window.map.getLayer(a,"modelId");g?(g.style==null&&map.bimMapEdit=="0"&&g.openHighlight({color:"rgba(255,0,0,1)"},!0),d?g.flyTo({complete:()=>{u(g)}}):u(g)):this.add(a,s,c).then(_=>{_&&(_.style==null&&map.bimMapEdit=="0"&&_.openHighlight({color:"rgba(255,0,0,1)"},!0),d?_.flyTo({complete:()=>{u(_)}}):u(_))})})}initial(){this.modelArr=[],this.bimObliquePhotographyId=[],this.tilesetLayer=null}query(a){return this.modelArr.length==0?!1:this.modelArr.find(s=>s.id==a)}queryModel(a,s){return(s==null?void 0:s.isClone)?window.mapClone.mapEx.getLayer(a,"modelId"):window.map.getLayer(a,"modelId")}postEditDate(a){this.editDate={id:a}}editColor(a,s,c,d="true"){let u,m=c==null?void 0:c.isClone;if(typeof a!="object"&&(m?u=window.mapClone.mapEx.getLayer(a,"modelId"):u=window.map.getLayer(a,"modelId")),u)if(s)u.style={color:{conditions:[[d,s]]}};else{let g=this.query(a).bimModel.modelColor;g?u.style={color:{conditions:[[d,g]]}}:u.style=null}}editOpacity(a,s){window.map.getLayer(a,"modelId").opacity=s}addClip(a){return new Promise((s,c)=>{window.bimClip?s(bimClip.clipModelAdd(a)):c("挖洞工具未初始化")})}removeClip(a){window.bimClip?window.bimClip.clipModelremoveClip(a):console.log("挖洞工具未初始化")}}const su=x=>Object.prototype.toString.call(x)==="[object Object]";function au(){const x=Array.from(arguments);if(x.length<2)return x[0];let a=x[0];return x.shift(),x.forEach(s=>{if(su(s)){su(a)||(a={});for(let c in s)a[c]&&su(s[c])?a[c]=au(a[c],s[c]):a[c]=s[c]}else s instanceof Array&&(a instanceof Array||(a=[]),s.forEach((c,d)=>{su(c)?a[d]=au(a[d]):a[d]=c}))}),a}let vh={};const bf=(x,a,s)=>{vh={};let{vectorStyle:c,difference:d}=x;if(c){let{divType:u}=c,m="";if(u){let{theme_color:g,title:_,font_color:S,content:b,scaleByDistance:I,scaleByDistance_far:k,scaleByDistance_farValue:D,scaleByDistance_near:F,scaleByDistance_nearValue:E,distanceDisplayCondition:L,distanceDisplayCondition_far:T,distanceDisplayCondition_near:M,clampToGround:R,divStyle:C,isMirror:U}=c,{theme_color2:N,theme_color3:X}=C;switch(u){case"1":m=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${g};--theme-font-color1:${S};">
2574
2574
  <div class="title">${_}</div>
2575
2575
  </div >`;break;case"2":m=`<div class="entity-div-style entity-div-style2" style="--theme-color1:${g};--theme-font-color1:${S};">
2576
2576
  <div class="title">${_}</div>
@@ -2607,16 +2607,16 @@ void main() {
2607
2607
  <div class="circular"></div>
2608
2608
  <div class="pole"></div>
2609
2609
  </div>
2610
- </div >`;break}vh={html:m,scaleByDistance:O,scaleByDistance_far:k,scaleByDistance_farValue:D,scaleByDistance_near:F,scaleByDistance_nearValue:E,distanceDisplayCondition:L,distanceDisplayCondition_far:T,distanceDisplayCondition_near:M,clampToGround:R}}else x.difference&&x.difference.length>0&&x.difference.forEach(g=>{au(vh,{[g]:c[g]})}),a&&a.difference&&a.difference.length>0&&a.difference.forEach(g=>{au(vh,{label:{[g]:a.labelStyle[g]}})})}return vh};var Er=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tc(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}var lu={exports:{}};/**
2610
+ </div >`;break}vh={html:m,scaleByDistance:I,scaleByDistance_far:k,scaleByDistance_farValue:D,scaleByDistance_near:F,scaleByDistance_nearValue:E,distanceDisplayCondition:L,distanceDisplayCondition_far:T,distanceDisplayCondition_near:M,clampToGround:R}}else x.difference&&x.difference.length>0&&x.difference.forEach(g=>{au(vh,{[g]:c[g]})}),a&&a.difference&&a.difference.length>0&&a.difference.forEach(g=>{au(vh,{label:{[g]:a.labelStyle[g]}})})}return vh};var Er=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tc(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}var lu={exports:{}};/**
2611
2611
  * @license
2612
2612
  * Lodash <https://lodash.com/>
2613
2613
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
2614
2614
  * Released under MIT license <https://lodash.com/license>
2615
2615
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
2616
2616
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2617
- */lu.exports,function(x,a){(function(){var s,c="4.17.21",d=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",g="Invalid `variable` option passed into `_.template`",_="__lodash_hash_undefined__",S=500,b="__lodash_placeholder__",O=1,k=2,D=4,F=1,E=2,L=1,T=2,M=4,R=8,C=16,U=32,N=64,X=128,K=256,Z=512,ct=30,Rt="...",et=800,_t=16,G=1,Pt=2,Et=3,At=1/0,ce=9007199254740991,re=17976931348623157e292,Ft=0/0,It=4294967295,Nt=It-1,Pe=It>>>1,pe=[["ary",X],["bind",L],["bindKey",T],["curry",R],["curryRight",C],["flip",Z],["partial",U],["partialRight",N],["rearg",K]],Wt="[object Arguments]",$e="[object Array]",Si="[object AsyncFunction]",Oe="[object Boolean]",Ge="[object Date]",pi="[object DOMException]",Di="[object Error]",mn="[object Function]",Qi="[object GeneratorFunction]",W="[object Map]",Jt="[object Number]",jt="[object Null]",dt="[object Object]",pt="[object Promise]",Dt="[object Proxy]",ie="[object RegExp]",Kt="[object Set]",z="[object String]",Q="[object Symbol]",st="[object Undefined]",nt="[object WeakMap]",vt="[object WeakSet]",Gt="[object ArrayBuffer]",qt="[object DataView]",Xt="[object Float32Array]",Ne="[object Float64Array]",Ie="[object Int8Array]",ge="[object Int16Array]",we="[object Int32Array]",yi="[object Uint8Array]",Ei="[object Uint8ClampedArray]",ni="[object Uint16Array]",bi="[object Uint32Array]",qr=/\b__p \+= '';/g,sr=/\b(__p \+=) '' \+/g,sn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ao=/&(?:amp|lt|gt|quot|#39);/g,zi=/[&<>"']/g,qo=RegExp(Ao.source),ao=RegExp(zi.source),Vl=/<%-([\s\S]+?)%>/g,Mn=/<%([\s\S]+?)%>/g,na=/<%=([\s\S]+?)%>/g,gs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vr=/^\w*$/,ra=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ya=/[\\^$.*+?()[\]{}|]/g,Wl=RegExp(Ya.source),lo=/^\s+/,Oh=/\s/,oa=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Za=/\{\n\/\* \[wrapped with (.+)\] \*/,ho=/,? & /,Ja=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,sa=/[()=,{}\[\]\/\s]/,aa=/\\(\\)?/g,uo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,jl=/\w*$/,Ih=/^[-+]0x[0-9a-f]+$/i,Dh=/^0b[01]+$/i,vs=/^\[object .+?Constructor\]$/,ys=/^0o[0-7]+$/i,Xl=/^(?:0|[1-9]\d*)$/,ql=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yr=/($^)/,V=/['\n\r\u2028\u2029\\]/g,tt="\\ud800-\\udfff",lt="\\u0300-\\u036f",at="\\ufe20-\\ufe2f",j="\\u20d0-\\u20ff",St=lt+at+j,ht="\\u2700-\\u27bf",Ot="a-z\\xdf-\\xf6\\xf8-\\xff",Ht="\\xac\\xb1\\xd7\\xf7",kt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mt="\\u2000-\\u206f",he=" \\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",se="A-Z\\xc0-\\xd6\\xd8-\\xde",te="\\ufe0e\\ufe0f",ye=Ht+kt+Mt+he,ue="['’]",je="["+tt+"]",He="["+ye+"]",ci="["+St+"]",Be="\\d+",_e="["+ht+"]",Fe="["+Ot+"]",fe="[^"+tt+ye+Be+ht+Ot+se+"]",mi="\\ud83c[\\udffb-\\udfff]",Le="(?:"+ci+"|"+mi+")",xe="[^"+tt+"]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",Sn="[\\ud800-\\udbff][\\udc00-\\udfff]",Xn="["+se+"]",ki="\\u200d",Bi="(?:"+Fe+"|"+fe+")",Hi="(?:"+Xn+"|"+fe+")",nn="(?:"+ue+"(?:d|ll|m|re|s|t|ve))?",rn="(?:"+ue+"(?:D|LL|M|RE|S|T|VE))?",un=Le+"?",cn="["+te+"]?",Gi="(?:"+ki+"(?:"+[xe,Re,Sn].join("|")+")"+cn+un+")*",Ni="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ji="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",gi=cn+un+Gi,co="(?:"+[_e,Re,Sn].join("|")+")"+gi,Fn="(?:"+[xe+ci+"?",ci,Re,Sn,je].join("|")+")",la=RegExp(ue,"g"),zh=RegExp(ci,"g"),Yo=RegExp(mi+"(?="+mi+")|"+Fn+gi,"g"),$a=RegExp([Xn+"?"+Fe+"+"+nn+"(?="+[He,Xn,"$"].join("|")+")",Hi+"+"+rn+"(?="+[He,Xn+Bi,"$"].join("|")+")",Xn+"?"+Bi+"+"+nn,Xn+"+"+rn,ji,Ni,Be,co].join("|"),"g"),Ka=RegExp("["+ki+tt+St+te+"]"),ha=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qa=["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"],ua=-1,Xi={};Xi[Xt]=Xi[Ne]=Xi[Ie]=Xi[ge]=Xi[we]=Xi[yi]=Xi[Ei]=Xi[ni]=Xi[bi]=!0,Xi[Wt]=Xi[$e]=Xi[Gt]=Xi[Oe]=Xi[qt]=Xi[Ge]=Xi[Di]=Xi[mn]=Xi[W]=Xi[Jt]=Xi[dt]=Xi[ie]=Xi[Kt]=Xi[z]=Xi[nt]=!1;var xi={};xi[Wt]=xi[$e]=xi[Gt]=xi[qt]=xi[Oe]=xi[Ge]=xi[Xt]=xi[Ne]=xi[Ie]=xi[ge]=xi[we]=xi[W]=xi[Jt]=xi[dt]=xi[ie]=xi[Kt]=xi[z]=xi[Q]=xi[yi]=xi[Ei]=xi[ni]=xi[bi]=!0,xi[Di]=xi[mn]=xi[nt]=!1;var tl={À:"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"},ca={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},el={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},_s={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},il=parseFloat,fa=parseInt,da=typeof Er=="object"&&Er&&Er.Object===Object&&Er,pa=typeof self=="object"&&self&&self.Object===Object&&self,gn=da||pa||Function("return this")(),Zo=a&&!a.nodeType&&a,Zr=Zo&&!0&&x&&!x.nodeType&&x,xs=Zr&&Zr.exports===Zo,ws=xs&&da.process,Un=function(){try{var Lt=Zr&&Zr.require&&Zr.require("util").types;return Lt||ws&&ws.binding&&ws.binding("util")}catch{}}(),kh=Un&&Un.isArrayBuffer,ma=Un&&Un.isDate,ga=Un&&Un.isMap,Su=Un&&Un.isRegExp,Eu=Un&&Un.isSet,Yl=Un&&Un.isTypedArray;function yr(Lt,Qt,Zt){switch(Zt.length){case 0:return Lt.call(Qt);case 1:return Lt.call(Qt,Zt[0]);case 2:return Lt.call(Qt,Zt[0],Zt[1]);case 3:return Lt.call(Qt,Zt[0],Zt[1],Zt[2])}return Lt.apply(Qt,Zt)}function Zl(Lt,Qt,Zt,Ue){for(var ai=-1,Fi=Lt==null?0:Lt.length;++ai<Fi;){var fn=Lt[ai];Qt(Ue,fn,Zt(fn),Lt)}return Ue}function Ji(Lt,Qt){for(var Zt=-1,Ue=Lt==null?0:Lt.length;++Zt<Ue&&Qt(Lt[Zt],Zt,Lt)!==!1;);return Lt}function Ts(Lt,Qt){for(var Zt=Lt==null?0:Lt.length;Zt--&&Qt(Lt[Zt],Zt,Lt)!==!1;);return Lt}function Bh(Lt,Qt){for(var Zt=-1,Ue=Lt==null?0:Lt.length;++Zt<Ue;)if(!Qt(Lt[Zt],Zt,Lt))return!1;return!0}function Rr(Lt,Qt){for(var Zt=-1,Ue=Lt==null?0:Lt.length,ai=0,Fi=[];++Zt<Ue;){var fn=Lt[Zt];Qt(fn,Zt,Lt)&&(Fi[ai++]=fn)}return Fi}function nl(Lt,Qt){var Zt=Lt==null?0:Lt.length;return!!Zt&&Or(Lt,Qt,0)>-1}function Jl(Lt,Qt,Zt){for(var Ue=-1,ai=Lt==null?0:Lt.length;++Ue<ai;)if(Zt(Qt,Lt[Ue]))return!0;return!1}function Yi(Lt,Qt){for(var Zt=-1,Ue=Lt==null?0:Lt.length,ai=Array(Ue);++Zt<Ue;)ai[Zt]=Qt(Lt[Zt],Zt,Lt);return ai}function fo(Lt,Qt){for(var Zt=-1,Ue=Qt.length,ai=Lt.length;++Zt<Ue;)Lt[ai+Zt]=Qt[Zt];return Lt}function $l(Lt,Qt,Zt,Ue){var ai=-1,Fi=Lt==null?0:Lt.length;for(Ue&&Fi&&(Zt=Lt[++ai]);++ai<Fi;)Zt=Qt(Zt,Lt[ai],ai,Lt);return Zt}function bu(Lt,Qt,Zt,Ue){var ai=Lt==null?0:Lt.length;for(Ue&&ai&&(Zt=Lt[--ai]);ai--;)Zt=Qt(Zt,Lt[ai],ai,Lt);return Zt}function Po(Lt,Qt){for(var Zt=-1,Ue=Lt==null?0:Lt.length;++Zt<Ue;)if(Qt(Lt[Zt],Zt,Lt))return!0;return!1}var po=$o("length");function Cu(Lt){return Lt.split("")}function rl(Lt){return Lt.match(Ja)||[]}function Ms(Lt,Qt,Zt){var Ue;return Zt(Lt,function(ai,Fi,fn){if(Qt(ai,Fi,fn))return Ue=Fi,!1}),Ue}function Jo(Lt,Qt,Zt,Ue){for(var ai=Lt.length,Fi=Zt+(Ue?1:-1);Ue?Fi--:++Fi<ai;)if(Qt(Lt[Fi],Fi,Lt))return Fi;return-1}function Or(Lt,Qt,Zt){return Qt===Qt?Kl(Lt,Qt,Zt):Jo(Lt,Ss,Zt)}function ol(Lt,Qt,Zt,Ue){for(var ai=Zt-1,Fi=Lt.length;++ai<Fi;)if(Ue(Lt[ai],Qt))return ai;return-1}function Ss(Lt){return Lt!==Lt}function va(Lt,Qt){var Zt=Lt==null?0:Lt.length;return Zt?Qo(Lt,Qt)/Zt:Ft}function $o(Lt){return function(Qt){return Qt==null?s:Qt[Lt]}}function Lo(Lt){return function(Qt){return Lt==null?s:Lt[Qt]}}function Ko(Lt,Qt,Zt,Ue,ai){return ai(Lt,function(Fi,fn,Ee){Zt=Ue?(Ue=!1,Fi):Qt(Zt,Fi,fn,Ee)}),Zt}function Au(Lt,Qt){var Zt=Lt.length;for(Lt.sort(Qt);Zt--;)Lt[Zt]=Lt[Zt].value;return Lt}function Qo(Lt,Qt){for(var Zt,Ue=-1,ai=Lt.length;++Ue<ai;){var Fi=Qt(Lt[Ue]);Fi!==s&&(Zt=Zt===s?Fi:Zt+Fi)}return Zt}function Ro(Lt,Qt){for(var Zt=-1,Ue=Array(Lt);++Zt<Lt;)Ue[Zt]=Qt(Zt);return Ue}function Oo(Lt,Qt){return Yi(Qt,function(Zt){return[Zt,Lt[Zt]]})}function ya(Lt){return Lt&&Lt.slice(0,_a(Lt)+1).replace(lo,"")}function Gn(Lt){return function(Qt){return Lt(Qt)}}function Es(Lt,Qt){return Yi(Qt,function(Zt){return Lt[Zt]})}function mo(Lt,Qt){return Lt.has(Qt)}function ts(Lt,Qt){for(var Zt=-1,Ue=Lt.length;++Zt<Ue&&Or(Qt,Lt[Zt],0)>-1;);return Zt}function bs(Lt,Qt){for(var Zt=Lt.length;Zt--&&Or(Qt,Lt[Zt],0)>-1;);return Zt}function go(Lt,Qt){for(var Zt=Lt.length,Ue=0;Zt--;)Lt[Zt]===Qt&&++Ue;return Ue}var Cs=Lo(tl),Jr=Lo(ca);function As(Lt){return"\\"+_s[Lt]}function Ps(Lt,Qt){return Lt==null?s:Lt[Qt]}function Ir(Lt){return Ka.test(Lt)}function Ls(Lt){return ha.test(Lt)}function Rs(Lt){for(var Qt,Zt=[];!(Qt=Lt.next()).done;)Zt.push(Qt.value);return Zt}function $n(Lt){var Qt=-1,Zt=Array(Lt.size);return Lt.forEach(function(Ue,ai){Zt[++Qt]=[ai,Ue]}),Zt}function sl(Lt,Qt){return function(Zt){return Lt(Qt(Zt))}}function Dr(Lt,Qt){for(var Zt=-1,Ue=Lt.length,ai=0,Fi=[];++Zt<Ue;){var fn=Lt[Zt];(fn===Qt||fn===b)&&(Lt[Zt]=b,Fi[ai++]=Zt)}return Fi}function Os(Lt){var Qt=-1,Zt=Array(Lt.size);return Lt.forEach(function(Ue){Zt[++Qt]=Ue}),Zt}function Hn(Lt){var Qt=-1,Zt=Array(Lt.size);return Lt.forEach(function(Ue){Zt[++Qt]=[Ue,Ue]}),Zt}function Kl(Lt,Qt,Zt){for(var Ue=Zt-1,ai=Lt.length;++Ue<ai;)if(Lt[Ue]===Qt)return Ue;return-1}function Ql(Lt,Qt,Zt){for(var Ue=Zt+1;Ue--;)if(Lt[Ue]===Qt)return Ue;return Ue}function $r(Lt){return Ir(Lt)?xa(Lt):po(Lt)}function ar(Lt){return Ir(Lt)?_r(Lt):Cu(Lt)}function _a(Lt){for(var Qt=Lt.length;Qt--&&Oh.test(Lt.charAt(Qt)););return Qt}var th=Lo(el);function xa(Lt){for(var Qt=Yo.lastIndex=0;Yo.test(Lt);)++Qt;return Qt}function _r(Lt){return Lt.match(Yo)||[]}function jc(Lt){return Lt.match($a)||[]}var Xc=function Lt(Qt){Qt=Qt==null?gn:es.defaults(gn.Object(),Qt,es.pick(gn,Qa));var Zt=Qt.Array,Ue=Qt.Date,ai=Qt.Error,Fi=Qt.Function,fn=Qt.Math,Ee=Qt.Object,Kn=Qt.RegExp,wa=Qt.String,lr=Qt.TypeError,On=Zt.prototype,Pu=Fi.prototype,vo=Ee.prototype,is=Qt["__core-js_shared__"],hr=Pu.toString,Ti=vo.hasOwnProperty,ur=0,zr=function(){var r=/[^.]+$/.exec(is&&is.keys&&is.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),cr=vo.toString,yo=hr.call(Ee),Kr=gn._,Io=Kn("^"+hr.call(Ti).replace(Ya,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fr=xs?Qt.Buffer:s,Qn=Qt.Symbol,tn=Qt.Uint8Array,al=fr?fr.allocUnsafe:s,_o=sl(Ee.getPrototypeOf,Ee),ll=Ee.create,hl=vo.propertyIsEnumerable,Is=On.splice,Ta=Qn?Qn.isConcatSpreadable:s,ns=Qn?Qn.iterator:s,xo=Qn?Qn.toStringTag:s,Ds=function(){try{var r=bl(Ee,"defineProperty");return r({},"",{}),r}catch{}}(),eh=Qt.clearTimeout!==gn.clearTimeout&&Qt.clearTimeout,ih=Ue&&Ue.now!==gn.Date.now&&Ue.now,Nh=Qt.setTimeout!==gn.setTimeout&&Qt.setTimeout,Do=fn.ceil,zs=fn.floor,ul=Ee.getOwnPropertySymbols,Fh=fr?fr.isBuffer:s,nh=Qt.isFinite,Uh=On.join,Lu=sl(Ee.keys,Ee),vn=fn.max,Vn=fn.min,cl=Ue.now,Gh=Qt.parseInt,rh=fn.random,Ma=On.reverse,fl=bl(Qt,"DataView"),ks=bl(Qt,"Map"),dl=bl(Qt,"Promise"),Bs=bl(Qt,"Set"),En=bl(Qt,"WeakMap"),Sa=bl(Ee,"create"),pl=En&&new En,rs={},oh=Cl(fl),Hh=Cl(ks),Vh=Cl(dl),Wh=Cl(Bs),Ru=Cl(En),ml=Qn?Qn.prototype:s,Ns=ml?ml.valueOf:s,jh=ml?ml.toString:s;function it(r){if(Ln(r)&&!vi(r)&&!(r instanceof _i)){if(r instanceof qn)return r;if(Ti.call(r,"__wrapped__"))return sp(r)}return new qn(r)}var os=function(){function r(){}return function(h){if(!wn(h))return{};if(ll)return ll(h);r.prototype=h;var v=new r;return r.prototype=s,v}}();function Ea(){}function qn(r,h){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=s}it.templateSettings={escape:Vl,evaluate:Mn,interpolate:na,variable:"",imports:{_:it}},it.prototype=Ea.prototype,it.prototype.constructor=it,qn.prototype=os(Ea.prototype),qn.prototype.constructor=qn;function _i(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=It,this.__views__=[]}function ba(){var r=new _i(this.__wrapped__);return r.__actions__=er(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=er(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=er(this.__views__),r}function Ou(){if(this.__filtered__){var r=new _i(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function Ca(){var r=this.__wrapped__.value(),h=this.__dir__,v=vi(r),I=h<0,Y=v?r.length:0,ut=Zg(0,Y,this.__views__),yt=ut.start,bt=ut.end,Bt=bt-yt,oe=I?bt:yt-1,le=this.__iteratees__,de=le.length,ke=0,Je=Vn(Bt,this.__takeCount__);if(!v||!I&&Y==Bt&&Je==Bt)return ri(r,this.__actions__);var hi=[];t:for(;Bt--&&ke<Je;){oe+=h;for(var Mi=-1,ui=r[oe];++Mi<de;){var Ri=le[Mi],Ui=Ri.iteratee,eo=Ri.type,Sr=Ui(ui);if(eo==Pt)ui=Sr;else if(!Sr){if(eo==G)continue t;break t}}hi[ke++]=ui}return hi}_i.prototype=os(Ea.prototype),_i.prototype.constructor=_i;function kr(r){var h=-1,v=r==null?0:r.length;for(this.clear();++h<v;){var I=r[h];this.set(I[0],I[1])}}function Aa(){this.__data__=Sa?Sa(null):{},this.size=0}function Pa(r){var h=this.has(r)&&delete this.__data__[r];return this.size-=h?1:0,h}function gl(r){var h=this.__data__;if(Sa){var v=h[r];return v===_?s:v}return Ti.call(h,r)?h[r]:s}function sh(r){var h=this.__data__;return Sa?h[r]!==s:Ti.call(h,r)}function vl(r,h){var v=this.__data__;return this.size+=this.has(r)?0:1,v[r]=Sa&&h===s?_:h,this}kr.prototype.clear=Aa,kr.prototype.delete=Pa,kr.prototype.get=gl,kr.prototype.has=sh,kr.prototype.set=vl;function dr(r){var h=-1,v=r==null?0:r.length;for(this.clear();++h<v;){var I=r[h];this.set(I[0],I[1])}}function yl(){this.__data__=[],this.size=0}function zo(r){var h=this.__data__,v=wl(h,r);if(v<0)return!1;var I=h.length-1;return v==I?h.pop():Is.call(h,v,1),--this.size,!0}function _l(r){var h=this.__data__,v=wl(h,r);return v<0?s:h[v][1]}function xl(r){return wl(this.__data__,r)>-1}function ko(r,h){var v=this.__data__,I=wl(v,r);return I<0?(++this.size,v.push([r,h])):v[I][1]=h,this}dr.prototype.clear=yl,dr.prototype.delete=zo,dr.prototype.get=_l,dr.prototype.has=xl,dr.prototype.set=ko;function xr(r){var h=-1,v=r==null?0:r.length;for(this.clear();++h<v;){var I=r[h];this.set(I[0],I[1])}}function Iu(){this.size=0,this.__data__={hash:new kr,map:new(ks||dr),string:new kr}}function Du(r){var h=Wu(this,r).delete(r);return this.size-=h?1:0,h}function Xh(r){return Wu(this,r).get(r)}function di(r){return Wu(this,r).has(r)}function ss(r,h){var v=Wu(this,r),I=v.size;return v.set(r,h),this.size+=v.size==I?0:1,this}xr.prototype.clear=Iu,xr.prototype.delete=Du,xr.prototype.get=Xh,xr.prototype.has=di,xr.prototype.set=ss;function Fs(r){var h=-1,v=r==null?0:r.length;for(this.__data__=new xr;++h<v;)this.add(r[h])}function Ci(r){return this.__data__.set(r,_),this}function Bn(r){return this.__data__.has(r)}Fs.prototype.add=Fs.prototype.push=Ci,Fs.prototype.has=Bn;function Qr(r){var h=this.__data__=new dr(r);this.size=h.size}function qe(){this.__data__=new dr,this.size=0}function wo(r){var h=this.__data__,v=h.delete(r);return this.size=h.size,v}function qc(r){return this.__data__.get(r)}function Yc(r){return this.__data__.has(r)}function Zc(r,h){var v=this.__data__;if(v instanceof dr){var I=v.__data__;if(!ks||I.length<d-1)return I.push([r,h]),this.size=++v.size,this;v=this.__data__=new xr(I)}return v.set(r,h),this.size=v.size,this}Qr.prototype.clear=qe,Qr.prototype.delete=wo,Qr.prototype.get=qc,Qr.prototype.has=Yc,Qr.prototype.set=Zc;function zu(r,h){var v=vi(r),I=!v&&Al(r),Y=!v&&!I&&ka(r),ut=!v&&!I&&!Y&&mh(r),yt=v||I||Y||ut,bt=yt?Ro(r.length,wa):[],Bt=bt.length;for(var oe in r)(h||Ti.call(r,oe))&&!(yt&&(oe=="length"||Y&&(oe=="offset"||oe=="parent")||ut&&(oe=="buffer"||oe=="byteLength"||oe=="byteOffset")||Ws(oe,Bt)))&&bt.push(oe);return bt}function qh(r){var h=r.length;return h?r[me(0,h-1)]:s}function Jc(r,h){return ju(er(r),as(h,0,r.length))}function ku(r){return ju(er(r))}function ah(r,h,v){(v!==s&&!Uo(r[h],v)||v===s&&!(h in r))&&Bo(r,h,v)}function La(r,h,v){var I=r[h];(!(Ti.call(r,h)&&Uo(I,v))||v===s&&!(h in r))&&Bo(r,h,v)}function wl(r,h){for(var v=r.length;v--;)if(Uo(r[v][0],h))return v;return-1}function Bu(r,h,v,I){return yn(r,function(Y,ut,yt){h(I,Y,v(Y),yt)}),I}function Yh(r,h){return r&&In(h,Jn(h),r)}function Zh(r,h){return r&&In(h,Ur(h),r)}function Bo(r,h,v){h=="__proto__"&&Ds?Ds(r,h,{configurable:!0,enumerable:!0,value:v,writable:!0}):r[h]=v}function Jh(r,h){for(var v=-1,I=h.length,Y=Zt(I),ut=r==null;++v<I;)Y[v]=ut?s:df(r,h[v]);return Y}function as(r,h,v){return r===r&&(v!==s&&(r=r<=v?r:v),h!==s&&(r=r>=h?r:h)),r}function wr(r,h,v,I,Y,ut){var yt,bt=h&O,Bt=h&k,oe=h&D;if(v&&(yt=Y?v(r,I,Y,ut):v(r)),yt!==s)return yt;if(!wn(r))return r;var le=vi(r);if(le){if(yt=$g(r),!bt)return er(r,yt)}else{var de=mr(r),ke=de==mn||de==Qi;if(ka(r))return No(r,bt);if(de==dt||de==Wt||ke&&!Y){if(yt=Bt||ke?{}:$d(r),!bt)return Bt?Gu(r,Zh(yt,r)):So(r,Yh(yt,r))}else{if(!xi[de])return Y?r:{};yt=Kg(r,de,bt)}}ut||(ut=new Qr);var Je=ut.get(r);if(Je)return Je;ut.set(r,yt),bp(r)?r.forEach(function(ui){yt.add(wr(ui,h,v,ui,r,ut))}):Sp(r)&&r.forEach(function(ui,Ri){yt.set(Ri,wr(ui,h,v,Ri,r,ut))});var hi=oe?Bt?Kc:$c:Bt?Ur:Jn,Mi=le?s:hi(r);return Ji(Mi||r,function(ui,Ri){Mi&&(Ri=ui,ui=r[Ri]),La(yt,Ri,wr(ui,h,v,Ri,r,ut))}),yt}function Ra(r){var h=Jn(r);return function(v){return Nu(v,r,h)}}function Nu(r,h,v){var I=v.length;if(r==null)return!I;for(r=Ee(r);I--;){var Y=v[I],ut=h[Y],yt=r[Y];if(yt===s&&!(Y in r)||!ut(yt))return!1}return!0}function To(r,h,v){if(typeof r!="function")throw new lr(m);return ru(function(){r.apply(s,v)},h)}function Tl(r,h,v,I){var Y=-1,ut=nl,yt=!0,bt=r.length,Bt=[],oe=h.length;if(!bt)return Bt;v&&(h=Yi(h,Gn(v))),I?(ut=Jl,yt=!1):h.length>=d&&(ut=mo,yt=!1,h=new Fs(h));t:for(;++Y<bt;){var le=r[Y],de=v==null?le:v(le);if(le=I||le!==0?le:0,yt&&de===de){for(var ke=oe;ke--;)if(h[ke]===de)continue t;Bt.push(le)}else ut(h,de,I)||Bt.push(le)}return Bt}var yn=ft(Nr),Fu=ft(hh,!0);function Yn(r,h){var v=!0;return yn(r,function(I,Y,ut){return v=!!h(I,Y,ut),v}),v}function Mo(r,h,v){for(var I=-1,Y=r.length;++I<Y;){var ut=r[I],yt=h(ut);if(yt!=null&&(bt===s?yt===yt&&!to(yt):v(yt,bt)))var bt=yt,Bt=ut}return Bt}function tr(r,h,v,I){var Y=r.length;for(v=wi(v),v<0&&(v=-v>Y?0:Y+v),I=I===s||I>Y?Y:wi(I),I<0&&(I+=Y),I=v>I?0:Ap(I);v<I;)r[v++]=h;return r}function Br(r,h){var v=[];return yn(r,function(I,Y,ut){h(I,Y,ut)&&v.push(I)}),v}function bn(r,h,v,I,Y){var ut=-1,yt=r.length;for(v||(v=t0),Y||(Y=[]);++ut<yt;){var bt=r[ut];h>0&&v(bt)?h>1?bn(bt,h-1,v,I,Y):fo(Y,bt):I||(Y[Y.length]=bt)}return Y}var Ml=Tt(),lh=Tt(!0);function Nr(r,h){return r&&Ml(r,h,Jn)}function hh(r,h){return r&&lh(r,h,Jn)}function Us(r,h){return Rr(h,function(v){return js(r[v])})}function ls(r,h){h=Ze(h,r);for(var v=0,I=h.length;r!=null&&v<I;)r=r[us(h[v++])];return v&&v==I?r:s}function Uu(r,h,v){var I=h(r);return vi(r)?I:fo(I,v(r))}function Zn(r){return r==null?r===s?st:jt:xo&&xo in Ee(r)?Yg(r):a0(r)}function uh(r,h){return r>h}function ch(r,h){return r!=null&&Ti.call(r,h)}function $h(r,h){return r!=null&&h in Ee(r)}function fh(r,h,v){return r>=Vn(h,v)&&r<vn(h,v)}function Sl(r,h,v){for(var I=v?Jl:nl,Y=r[0].length,ut=r.length,yt=ut,bt=Zt(ut),Bt=1/0,oe=[];yt--;){var le=r[yt];yt&&h&&(le=Yi(le,Gn(h))),Bt=Vn(le.length,Bt),bt[yt]=!v&&(h||Y>=120&&le.length>=120)?new Fs(yt&&le):s}le=r[0];var de=-1,ke=bt[0];t:for(;++de<Y&&oe.length<Bt;){var Je=le[de],hi=h?h(Je):Je;if(Je=v||Je!==0?Je:0,!(ke?mo(ke,hi):I(oe,hi,v))){for(yt=ut;--yt;){var Mi=bt[yt];if(!(Mi?mo(Mi,hi):I(r[yt],hi,v)))continue t}ke&&ke.push(hi),oe.push(Je)}}return oe}function t(r,h,v,I){return Nr(r,function(Y,ut,yt){h(I,v(Y),ut,yt)}),I}function e(r,h,v){h=Ze(h,r),r=ep(r,h);var I=r==null?r:r[us(bo(h))];return I==null?s:yr(I,r,v)}function i(r){return Ln(r)&&Zn(r)==Wt}function n(r){return Ln(r)&&Zn(r)==Gt}function o(r){return Ln(r)&&Zn(r)==Ge}function l(r,h,v,I,Y){return r===h?!0:r==null||h==null||!Ln(r)&&!Ln(h)?r!==r&&h!==h:f(r,h,v,I,l,Y)}function f(r,h,v,I,Y,ut){var yt=vi(r),bt=vi(h),Bt=yt?$e:mr(r),oe=bt?$e:mr(h);Bt=Bt==Wt?dt:Bt,oe=oe==Wt?dt:oe;var le=Bt==dt,de=oe==dt,ke=Bt==oe;if(ke&&ka(r)){if(!ka(h))return!1;yt=!0,le=!1}if(ke&&!le)return ut||(ut=new Qr),yt||mh(r)?Yd(r,h,v,I,Y,ut):Xg(r,h,Bt,v,I,Y,ut);if(!(v&F)){var Je=le&&Ti.call(r,"__wrapped__"),hi=de&&Ti.call(h,"__wrapped__");if(Je||hi){var Mi=Je?r.value():r,ui=hi?h.value():h;return ut||(ut=new Qr),Y(Mi,ui,v,I,ut)}}return ke?(ut||(ut=new Qr),qg(r,h,v,I,Y,ut)):!1}function p(r){return Ln(r)&&mr(r)==W}function y(r,h,v,I){var Y=v.length,ut=Y,yt=!I;if(r==null)return!ut;for(r=Ee(r);Y--;){var bt=v[Y];if(yt&&bt[2]?bt[1]!==r[bt[0]]:!(bt[0]in r))return!1}for(;++Y<ut;){bt=v[Y];var Bt=bt[0],oe=r[Bt],le=bt[1];if(yt&&bt[2]){if(oe===s&&!(Bt in r))return!1}else{var de=new Qr;if(I)var ke=I(oe,le,Bt,r,h,de);if(!(ke===s?l(le,oe,F|E,I,de):ke))return!1}}return!0}function w(r){if(!wn(r)||i0(r))return!1;var h=js(r)?Io:vs;return h.test(Cl(r))}function A(r){return Ln(r)&&Zn(r)==ie}function P(r){return Ln(r)&&mr(r)==Kt}function B(r){return Ln(r)&&$u(r.length)&&!!Xi[Zn(r)]}function H(r){return typeof r=="function"?r:r==null?Gr:typeof r=="object"?vi(r)?Ct(r[0],r[1]):gt(r):Fp(r)}function q(r){if(!nu(r))return Lu(r);var h=[];for(var v in Ee(r))Ti.call(r,v)&&v!="constructor"&&h.push(v);return h}function $(r){if(!wn(r))return s0(r);var h=nu(r),v=[];for(var I in r)I=="constructor"&&(h||!Ti.call(r,I))||v.push(I);return v}function rt(r,h){return r<h}function xt(r,h){var v=-1,I=Fr(r)?Zt(r.length):[];return yn(r,function(Y,ut,yt){I[++v]=h(Y,ut,yt)}),I}function gt(r){var h=tf(r);return h.length==1&&h[0][2]?Qd(h[0][0],h[0][1]):function(v){return v===r||y(v,r,h)}}function Ct(r,h){return nf(r)&&Kd(h)?Qd(us(r),h):function(v){var I=df(v,r);return I===s&&I===h?pf(v,r):l(h,I,F|E)}}function wt(r,h,v,I,Y){r!==h&&Ml(h,function(ut,yt){if(Y||(Y=new Qr),wn(ut))Vt(r,h,yt,v,wt,I,Y);else{var bt=I?I(of(r,yt),ut,yt+"",r,h,Y):s;bt===s&&(bt=ut),ah(r,yt,bt)}},Ur)}function Vt(r,h,v,I,Y,ut,yt){var bt=of(r,v),Bt=of(h,v),oe=yt.get(Bt);if(oe){ah(r,v,oe);return}var le=ut?ut(bt,Bt,v+"",r,h,yt):s,de=le===s;if(de){var ke=vi(Bt),Je=!ke&&ka(Bt),hi=!ke&&!Je&&mh(Bt);le=Bt,ke||Je||hi?vi(bt)?le=bt:Dn(bt)?le=er(bt):Je?(de=!1,le=No(Bt,!0)):hi?(de=!1,le=El(Bt,!0)):le=[]:ou(Bt)||Al(Bt)?(le=bt,Al(bt)?le=Pp(bt):(!wn(bt)||js(bt))&&(le=$d(Bt))):de=!1}de&&(yt.set(Bt,le),Y(le,Bt,I,ut,yt),yt.delete(Bt)),ah(r,v,le)}function J(r,h){var v=r.length;if(v)return h+=h<0?v:0,Ws(h,v)?r[h]:s}function ot(r,h,v){h.length?h=Yi(h,function(ut){return vi(ut)?function(yt){return ls(yt,ut.length===1?ut[0]:ut)}:ut}):h=[Gr];var I=-1;h=Yi(h,Gn(si()));var Y=xt(r,function(ut,yt,bt){var Bt=Yi(h,function(oe){return oe(ut)});return{criteria:Bt,index:++I,value:ut}});return Au(Y,function(ut,yt){return hs(ut,yt,v)})}function zt(r,h){return ee(r,h,function(v,I){return pf(r,I)})}function ee(r,h,v){for(var I=-1,Y=h.length,ut={};++I<Y;){var yt=h[I],bt=ls(r,yt);v(bt,yt)&&fi(ut,Ze(yt,r),bt)}return ut}function $t(r){return function(h){return ls(h,r)}}function Yt(r,h,v,I){var Y=I?ol:Or,ut=-1,yt=h.length,bt=r;for(r===h&&(h=er(h)),v&&(bt=Yi(r,Gn(v)));++ut<yt;)for(var Bt=0,oe=h[ut],le=v?v(oe):oe;(Bt=Y(bt,le,Bt,I))>-1;)bt!==r&&Is.call(bt,Bt,1),Is.call(r,Bt,1);return r}function Te(r,h){for(var v=r?h.length:0,I=v-1;v--;){var Y=h[v];if(v==I||Y!==ut){var ut=Y;Ws(Y)?Is.call(r,Y,1):Wi(r,Y)}}return r}function me(r,h){return r+zs(rh()*(h-r+1))}function De(r,h,v,I){for(var Y=-1,ut=vn(Do((h-r)/(v||1)),0),yt=Zt(ut);ut--;)yt[I?ut:++Y]=r,r+=v;return yt}function be(r,h){var v="";if(!r||h<1||h>ce)return v;do h%2&&(v+=r),h=zs(h/2),h&&(r+=r);while(h);return v}function ae(r,h){return sf(tp(r,h,Gr),r+"")}function We(r){return qh(gh(r))}function Qe(r,h){var v=gh(r);return ju(v,as(h,0,v.length))}function fi(r,h,v,I){if(!wn(r))return r;h=Ze(h,r);for(var Y=-1,ut=h.length,yt=ut-1,bt=r;bt!=null&&++Y<ut;){var Bt=us(h[Y]),oe=v;if(Bt==="__proto__"||Bt==="constructor"||Bt==="prototype")return r;if(Y!=yt){var le=bt[Bt];oe=I?I(le,Bt,bt):s,oe===s&&(oe=wn(le)?le:Ws(h[Y+1])?[]:{})}La(bt,Bt,oe),bt=bt[Bt]}return r}var Cn=pl?function(r,h){return pl.set(r,h),r}:Gr,_n=Ds?function(r,h){return Ds(r,"toString",{configurable:!0,enumerable:!1,value:gf(h),writable:!0})}:Gr;function qi(r){return ju(gh(r))}function Vi(r,h,v){var I=-1,Y=r.length;h<0&&(h=-h>Y?0:Y+h),v=v>Y?Y:v,v<0&&(v+=Y),Y=h>v?0:v-h>>>0,h>>>=0;for(var ut=Zt(Y);++I<Y;)ut[I]=r[I+h];return ut}function on(r,h){var v;return yn(r,function(I,Y,ut){return v=h(I,Y,ut),!v}),!!v}function An(r,h,v){var I=0,Y=r==null?I:r.length;if(typeof h=="number"&&h===h&&Y<=Pe){for(;I<Y;){var ut=I+Y>>>1,yt=r[ut];yt!==null&&!to(yt)&&(v?yt<=h:yt<h)?I=ut+1:Y=ut}return Y}return Ce(r,h,Gr,v)}function Ce(r,h,v,I){var Y=0,ut=r==null?0:r.length;if(ut===0)return 0;h=v(h);for(var yt=h!==h,bt=h===null,Bt=to(h),oe=h===s;Y<ut;){var le=zs((Y+ut)/2),de=v(r[le]),ke=de!==s,Je=de===null,hi=de===de,Mi=to(de);if(yt)var ui=I||hi;else oe?ui=hi&&(I||ke):bt?ui=hi&&ke&&(I||!Je):Bt?ui=hi&&ke&&!Je&&(I||!Mi):Je||Mi?ui=!1:ui=I?de<=h:de<h;ui?Y=le+1:ut=le}return Vn(ut,Nt)}function ti(r,h){for(var v=-1,I=r.length,Y=0,ut=[];++v<I;){var yt=r[v],bt=h?h(yt):yt;if(!v||!Uo(bt,Bt)){var Bt=bt;ut[Y++]=yt===0?0:yt}}return ut}function Ut(r){return typeof r=="number"?r:to(r)?Ft:+r}function Ye(r){if(typeof r=="string")return r;if(vi(r))return Yi(r,Ye)+"";if(to(r))return jh?jh.call(r):"";var h=r+"";return h=="0"&&1/r==-At?"-0":h}function ei(r,h,v){var I=-1,Y=nl,ut=r.length,yt=!0,bt=[],Bt=bt;if(v)yt=!1,Y=Jl;else if(ut>=d){var oe=h?null:za(r);if(oe)return Os(oe);yt=!1,Y=mo,Bt=new Fs}else Bt=h?[]:bt;t:for(;++I<ut;){var le=r[I],de=h?h(le):le;if(le=v||le!==0?le:0,yt&&de===de){for(var ke=Bt.length;ke--;)if(Bt[ke]===de)continue t;h&&Bt.push(de),bt.push(le)}else Y(Bt,de,v)||(Bt!==bt&&Bt.push(de),bt.push(le))}return bt}function Wi(r,h){return h=Ze(h,r),r=ep(r,h),r==null||delete r[us(bo(h))]}function Ae(r,h,v,I){return fi(r,h,v(ls(r,h)),I)}function Xe(r,h,v,I){for(var Y=r.length,ut=I?Y:-1;(I?ut--:++ut<Y)&&h(r[ut],ut,r););return v?Vi(r,I?0:ut,I?ut+1:Y):Vi(r,I?ut+1:0,I?Y:ut)}function ri(r,h){var v=r;return v instanceof _i&&(v=v.value()),$l(h,function(I,Y){return Y.func.apply(Y.thisArg,fo([I],Y.args))},v)}function Li(r,h,v){var I=r.length;if(I<2)return I?ei(r[0]):[];for(var Y=-1,ut=Zt(I);++Y<I;)for(var yt=r[Y],bt=-1;++bt<I;)bt!=Y&&(ut[Y]=Tl(ut[Y]||yt,r[bt],h,v));return ei(bn(ut,1),h,v)}function Ai(r,h,v){for(var I=-1,Y=r.length,ut=h.length,yt={};++I<Y;){var bt=I<ut?h[I]:s;v(yt,r[I],bt)}return yt}function ne(r){return Dn(r)?r:[]}function ii(r){return typeof r=="function"?r:Gr}function Ze(r,h){return vi(r)?r:nf(r,h)?[r]:op(Zi(r))}var li=ae;function xn(r,h,v){var I=r.length;return v=v===s?I:v,!h&&v>=I?r:Vi(r,h,v)}var Pn=eh||function(r){return gn.clearTimeout(r)};function No(r,h){if(h)return r.slice();var v=r.length,I=al?al(v):new r.constructor(v);return r.copy(I),I}function Oa(r){var h=new r.constructor(r.byteLength);return new tn(h).set(new tn(r)),h}function Kh(r,h){var v=h?Oa(r.buffer):r.buffer;return new r.constructor(v,r.byteOffset,r.byteLength)}function Ia(r){var h=new r.constructor(r.source,jl.exec(r));return h.lastIndex=r.lastIndex,h}function Gs(r){return Ns?Ee(Ns.call(r)):{}}function El(r,h){var v=h?Oa(r.buffer):r.buffer;return new r.constructor(v,r.byteOffset,r.length)}function Hs(r,h){if(r!==h){var v=r!==s,I=r===null,Y=r===r,ut=to(r),yt=h!==s,bt=h===null,Bt=h===h,oe=to(h);if(!bt&&!oe&&!ut&&r>h||ut&&yt&&Bt&&!bt&&!oe||I&&yt&&Bt||!v&&Bt||!Y)return 1;if(!I&&!ut&&!oe&&r<h||oe&&v&&Y&&!I&&!ut||bt&&v&&Y||!yt&&Y||!Bt)return-1}return 0}function hs(r,h,v){for(var I=-1,Y=r.criteria,ut=h.criteria,yt=Y.length,bt=v.length;++I<yt;){var Bt=Hs(Y[I],ut[I]);if(Bt){if(I>=bt)return Bt;var oe=v[I];return Bt*(oe=="desc"?-1:1)}}return r.index-h.index}function Qh(r,h,v,I){for(var Y=-1,ut=r.length,yt=v.length,bt=-1,Bt=h.length,oe=vn(ut-yt,0),le=Zt(Bt+oe),de=!I;++bt<Bt;)le[bt]=h[bt];for(;++Y<yt;)(de||Y<ut)&&(le[v[Y]]=r[Y]);for(;oe--;)le[bt++]=r[Y++];return le}function tu(r,h,v,I){for(var Y=-1,ut=r.length,yt=-1,bt=v.length,Bt=-1,oe=h.length,le=vn(ut-bt,0),de=Zt(le+oe),ke=!I;++Y<le;)de[Y]=r[Y];for(var Je=Y;++Bt<oe;)de[Je+Bt]=h[Bt];for(;++yt<bt;)(ke||Y<ut)&&(de[Je+v[yt]]=r[Y++]);return de}function er(r,h){var v=-1,I=r.length;for(h||(h=Zt(I));++v<I;)h[v]=r[v];return h}function In(r,h,v,I){var Y=!v;v||(v={});for(var ut=-1,yt=h.length;++ut<yt;){var bt=h[ut],Bt=I?I(v[bt],r[bt],bt,v,r):s;Bt===s&&(Bt=r[bt]),Y?Bo(v,bt,Bt):La(v,bt,Bt)}return v}function So(r,h){return In(r,ef(r),h)}function Gu(r,h){return In(r,Zd(r),h)}function Da(r,h){return function(v,I){var Y=vi(v)?Zl:Bu,ut=h?h():{};return Y(v,r,si(I,2),ut)}}function Fo(r){return ae(function(h,v){var I=-1,Y=v.length,ut=Y>1?v[Y-1]:s,yt=Y>2?v[2]:s;for(ut=r.length>3&&typeof ut=="function"?(Y--,ut):s,yt&&Mr(v[0],v[1],yt)&&(ut=Y<3?s:ut,Y=1),h=Ee(h);++I<Y;){var bt=v[I];bt&&r(h,bt,I,ut)}return h})}function ft(r,h){return function(v,I){if(v==null)return v;if(!Fr(v))return r(v,I);for(var Y=v.length,ut=h?Y:-1,yt=Ee(v);(h?ut--:++ut<Y)&&I(yt[ut],ut,yt)!==!1;);return v}}function Tt(r){return function(h,v,I){for(var Y=-1,ut=Ee(h),yt=I(h),bt=yt.length;bt--;){var Bt=yt[r?bt:++Y];if(v(ut[Bt],Bt,ut)===!1)break}return h}}function mt(r,h,v){var I=h&L,Y=Ve(r);function ut(){var yt=this&&this!==gn&&this instanceof ut?Y:r;return yt.apply(I?v:this,arguments)}return ut}function Me(r){return function(h){h=Zi(h);var v=Ir(h)?ar(h):s,I=v?v[0]:h.charAt(0),Y=v?xn(v,1).join(""):h.slice(1);return I[r]()+Y}}function ze(r){return function(h){return $l(Bp(kp(h).replace(la,"")),r,"")}}function Ve(r){return function(){var h=arguments;switch(h.length){case 0:return new r;case 1:return new r(h[0]);case 2:return new r(h[0],h[1]);case 3:return new r(h[0],h[1],h[2]);case 4:return new r(h[0],h[1],h[2],h[3]);case 5:return new r(h[0],h[1],h[2],h[3],h[4]);case 6:return new r(h[0],h[1],h[2],h[3],h[4],h[5]);case 7:return new r(h[0],h[1],h[2],h[3],h[4],h[5],h[6])}var v=os(r.prototype),I=r.apply(v,h);return wn(I)?I:v}}function Se(r,h,v){var I=Ve(r);function Y(){for(var ut=arguments.length,yt=Zt(ut),bt=ut,Bt=ph(Y);bt--;)yt[bt]=arguments[bt];var oe=ut<3&&yt[0]!==Bt&&yt[ut-1]!==Bt?[]:Dr(yt,Bt);if(ut-=oe.length,ut<v)return iu(r,h,$i,Y.placeholder,s,yt,oe,s,s,v-ut);var le=this&&this!==gn&&this instanceof Y?I:r;return yr(le,this,yt)}return Y}function Ke(r){return function(h,v,I){var Y=Ee(h);if(!Fr(h)){var ut=si(v,3);h=Jn(h),v=function(bt){return ut(Y[bt],bt,Y)}}var yt=r(h,v,I);return yt>-1?Y[ut?h[yt]:yt]:s}}function Oi(r){return Vs(function(h){var v=h.length,I=v,Y=qn.prototype.thru;for(r&&h.reverse();I--;){var ut=h[I];if(typeof ut!="function")throw new lr(m);if(Y&&!yt&&Vu(ut)=="wrapper")var yt=new qn([],!0)}for(I=yt?I:v;++I<v;){ut=h[I];var bt=Vu(ut),Bt=bt=="wrapper"?Qc(ut):s;Bt&&rf(Bt[0])&&Bt[1]==(X|R|U|K)&&!Bt[4].length&&Bt[9]==1?yt=yt[Vu(Bt[0])].apply(yt,Bt[3]):yt=ut.length==1&&rf(ut)?yt[bt]():yt.thru(ut)}return function(){var oe=arguments,le=oe[0];if(yt&&oe.length==1&&vi(le))return yt.plant(le).value();for(var de=0,ke=v?h[de].apply(this,oe):le;++de<v;)ke=h[de].call(this,ke);return ke}})}function $i(r,h,v,I,Y,ut,yt,bt,Bt,oe){var le=h&X,de=h&L,ke=h&T,Je=h&(R|C),hi=h&Z,Mi=ke?s:Ve(r);function ui(){for(var Ri=arguments.length,Ui=Zt(Ri),eo=Ri;eo--;)Ui[eo]=arguments[eo];if(Je)var Sr=ph(ui),io=go(Ui,Sr);if(I&&(Ui=Qh(Ui,I,Y,Je)),ut&&(Ui=tu(Ui,ut,yt,Je)),Ri-=io,Je&&Ri<oe){var zn=Dr(Ui,Sr);return iu(r,h,$i,ui.placeholder,v,Ui,zn,bt,Bt,oe-Ri)}var Go=de?v:this,qs=ke?Go[r]:r;return Ri=Ui.length,bt?Ui=l0(Ui,bt):hi&&Ri>1&&Ui.reverse(),le&&Bt<Ri&&(Ui.length=Bt),this&&this!==gn&&this instanceof ui&&(qs=Mi||Ve(qs)),qs.apply(Go,Ui)}return ui}function ve(r,h){return function(v,I){return t(v,r,h(I),{})}}function Tr(r,h){return function(v,I){var Y;if(v===s&&I===s)return h;if(v!==s&&(Y=v),I!==s){if(Y===s)return I;typeof v=="string"||typeof I=="string"?(v=Ye(v),I=Ye(I)):(v=Ut(v),I=Ut(I)),Y=r(v,I)}return Y}}function Nn(r){return Vs(function(h){return h=Yi(h,Gn(si())),ae(function(v){var I=this;return r(h,function(Y){return yr(Y,I,v)})})})}function an(r,h){h=h===s?" ":Ye(h);var v=h.length;if(v<2)return v?be(h,r):h;var I=be(h,Do(r/$r(h)));return Ir(h)?xn(ar(I),0,r).join(""):I.slice(0,r)}function pr(r,h,v,I){var Y=h&L,ut=Ve(r);function yt(){for(var bt=-1,Bt=arguments.length,oe=-1,le=I.length,de=Zt(le+Bt),ke=this&&this!==gn&&this instanceof yt?ut:r;++oe<le;)de[oe]=I[oe];for(;Bt--;)de[oe++]=arguments[++bt];return yr(ke,Y?v:this,de)}return yt}function eu(r){return function(h,v,I){return I&&typeof I!="number"&&Mr(h,v,I)&&(v=I=s),h=Xs(h),v===s?(v=h,h=0):v=Xs(v),I=I===s?h<v?1:-1:Xs(I),De(h,v,I,r)}}function Eo(r){return function(h,v){return typeof h=="string"&&typeof v=="string"||(h=Co(h),v=Co(v)),r(h,v)}}function iu(r,h,v,I,Y,ut,yt,bt,Bt,oe){var le=h&R,de=le?yt:s,ke=le?s:yt,Je=le?ut:s,hi=le?s:ut;h|=le?U:N,h&=~(le?N:U),h&M||(h&=~(L|T));var Mi=[r,h,Y,Je,de,hi,ke,bt,Bt,oe],ui=v.apply(s,Mi);return rf(r)&&ip(ui,Mi),ui.placeholder=I,np(ui,r,h)}function dh(r){var h=fn[r];return function(v,I){if(v=Co(v),I=I==null?0:Vn(wi(I),292),I&&nh(v)){var Y=(Zi(v)+"e").split("e"),ut=h(Y[0]+"e"+(+Y[1]+I));return Y=(Zi(ut)+"e").split("e"),+(Y[0]+"e"+(+Y[1]-I))}return h(v)}}var za=Bs&&1/Os(new Bs([,-0]))[1]==At?function(r){return new Bs(r)}:_f;function Hu(r){return function(h){var v=mr(h);return v==W?$n(h):v==Kt?Hn(h):Oo(h,r(h))}}function ir(r,h,v,I,Y,ut,yt,bt){var Bt=h&T;if(!Bt&&typeof r!="function")throw new lr(m);var oe=I?I.length:0;if(oe||(h&=~(U|N),I=Y=s),yt=yt===s?yt:vn(wi(yt),0),bt=bt===s?bt:wi(bt),oe-=Y?Y.length:0,h&N){var le=I,de=Y;I=Y=s}var ke=Bt?s:Qc(r),Je=[r,h,v,I,Y,le,de,ut,yt,bt];if(ke&&o0(Je,ke),r=Je[0],h=Je[1],v=Je[2],I=Je[3],Y=Je[4],bt=Je[9]=Je[9]===s?Bt?0:r.length:vn(Je[9]-oe,0),!bt&&h&(R|C)&&(h&=~(R|C)),!h||h==L)var hi=mt(r,h,v);else h==R||h==C?hi=Se(r,h,bt):(h==U||h==(L|U))&&!Y.length?hi=pr(r,h,v,I):hi=$i.apply(s,Je);var Mi=ke?Cn:ip;return np(Mi(hi,Je),r,h)}function Xd(r,h,v,I){return r===s||Uo(r,vo[v])&&!Ti.call(I,v)?h:r}function qd(r,h,v,I,Y,ut){return wn(r)&&wn(h)&&(ut.set(h,r),wt(r,h,s,qd,ut),ut.delete(h)),r}function jg(r){return ou(r)?s:r}function Yd(r,h,v,I,Y,ut){var yt=v&F,bt=r.length,Bt=h.length;if(bt!=Bt&&!(yt&&Bt>bt))return!1;var oe=ut.get(r),le=ut.get(h);if(oe&&le)return oe==h&&le==r;var de=-1,ke=!0,Je=v&E?new Fs:s;for(ut.set(r,h),ut.set(h,r);++de<bt;){var hi=r[de],Mi=h[de];if(I)var ui=yt?I(Mi,hi,de,h,r,ut):I(hi,Mi,de,r,h,ut);if(ui!==s){if(ui)continue;ke=!1;break}if(Je){if(!Po(h,function(Ri,Ui){if(!mo(Je,Ui)&&(hi===Ri||Y(hi,Ri,v,I,ut)))return Je.push(Ui)})){ke=!1;break}}else if(!(hi===Mi||Y(hi,Mi,v,I,ut))){ke=!1;break}}return ut.delete(r),ut.delete(h),ke}function Xg(r,h,v,I,Y,ut,yt){switch(v){case qt:if(r.byteLength!=h.byteLength||r.byteOffset!=h.byteOffset)return!1;r=r.buffer,h=h.buffer;case Gt:return!(r.byteLength!=h.byteLength||!ut(new tn(r),new tn(h)));case Oe:case Ge:case Jt:return Uo(+r,+h);case Di:return r.name==h.name&&r.message==h.message;case ie:case z:return r==h+"";case W:var bt=$n;case Kt:var Bt=I&F;if(bt||(bt=Os),r.size!=h.size&&!Bt)return!1;var oe=yt.get(r);if(oe)return oe==h;I|=E,yt.set(r,h);var le=Yd(bt(r),bt(h),I,Y,ut,yt);return yt.delete(r),le;case Q:if(Ns)return Ns.call(r)==Ns.call(h)}return!1}function qg(r,h,v,I,Y,ut){var yt=v&F,bt=$c(r),Bt=bt.length,oe=$c(h),le=oe.length;if(Bt!=le&&!yt)return!1;for(var de=Bt;de--;){var ke=bt[de];if(!(yt?ke in h:Ti.call(h,ke)))return!1}var Je=ut.get(r),hi=ut.get(h);if(Je&&hi)return Je==h&&hi==r;var Mi=!0;ut.set(r,h),ut.set(h,r);for(var ui=yt;++de<Bt;){ke=bt[de];var Ri=r[ke],Ui=h[ke];if(I)var eo=yt?I(Ui,Ri,ke,h,r,ut):I(Ri,Ui,ke,r,h,ut);if(!(eo===s?Ri===Ui||Y(Ri,Ui,v,I,ut):eo)){Mi=!1;break}ui||(ui=ke=="constructor")}if(Mi&&!ui){var Sr=r.constructor,io=h.constructor;Sr!=io&&"constructor"in r&&"constructor"in h&&!(typeof Sr=="function"&&Sr instanceof Sr&&typeof io=="function"&&io instanceof io)&&(Mi=!1)}return ut.delete(r),ut.delete(h),Mi}function Vs(r){return sf(tp(r,s,hp),r+"")}function $c(r){return Uu(r,Jn,ef)}function Kc(r){return Uu(r,Ur,Zd)}var Qc=pl?function(r){return pl.get(r)}:_f;function Vu(r){for(var h=r.name+"",v=rs[h],I=Ti.call(rs,h)?v.length:0;I--;){var Y=v[I],ut=Y.func;if(ut==null||ut==r)return Y.name}return h}function ph(r){var h=Ti.call(it,"placeholder")?it:r;return h.placeholder}function si(){var r=it.iteratee||vf;return r=r===vf?H:r,arguments.length?r(arguments[0],arguments[1]):r}function Wu(r,h){var v=r.__data__;return e0(h)?v[typeof h=="string"?"string":"hash"]:v.map}function tf(r){for(var h=Jn(r),v=h.length;v--;){var I=h[v],Y=r[I];h[v]=[I,Y,Kd(Y)]}return h}function bl(r,h){var v=Ps(r,h);return w(v)?v:s}function Yg(r){var h=Ti.call(r,xo),v=r[xo];try{r[xo]=s;var I=!0}catch{}var Y=cr.call(r);return I&&(h?r[xo]=v:delete r[xo]),Y}var ef=ul?function(r){return r==null?[]:(r=Ee(r),Rr(ul(r),function(h){return hl.call(r,h)}))}:xf,Zd=ul?function(r){for(var h=[];r;)fo(h,ef(r)),r=_o(r);return h}:xf,mr=Zn;(fl&&mr(new fl(new ArrayBuffer(1)))!=qt||ks&&mr(new ks)!=W||dl&&mr(dl.resolve())!=pt||Bs&&mr(new Bs)!=Kt||En&&mr(new En)!=nt)&&(mr=function(r){var h=Zn(r),v=h==dt?r.constructor:s,I=v?Cl(v):"";if(I)switch(I){case oh:return qt;case Hh:return W;case Vh:return pt;case Wh:return Kt;case Ru:return nt}return h});function Zg(r,h,v){for(var I=-1,Y=v.length;++I<Y;){var ut=v[I],yt=ut.size;switch(ut.type){case"drop":r+=yt;break;case"dropRight":h-=yt;break;case"take":h=Vn(h,r+yt);break;case"takeRight":r=vn(r,h-yt);break}}return{start:r,end:h}}function Jg(r){var h=r.match(Za);return h?h[1].split(ho):[]}function Jd(r,h,v){h=Ze(h,r);for(var I=-1,Y=h.length,ut=!1;++I<Y;){var yt=us(h[I]);if(!(ut=r!=null&&v(r,yt)))break;r=r[yt]}return ut||++I!=Y?ut:(Y=r==null?0:r.length,!!Y&&$u(Y)&&Ws(yt,Y)&&(vi(r)||Al(r)))}function $g(r){var h=r.length,v=new r.constructor(h);return h&&typeof r[0]=="string"&&Ti.call(r,"index")&&(v.index=r.index,v.input=r.input),v}function $d(r){return typeof r.constructor=="function"&&!nu(r)?os(_o(r)):{}}function Kg(r,h,v){var I=r.constructor;switch(h){case Gt:return Oa(r);case Oe:case Ge:return new I(+r);case qt:return Kh(r,v);case Xt:case Ne:case Ie:case ge:case we:case yi:case Ei:case ni:case bi:return El(r,v);case W:return new I;case Jt:case z:return new I(r);case ie:return Ia(r);case Kt:return new I;case Q:return Gs(r)}}function Qg(r,h){var v=h.length;if(!v)return r;var I=v-1;return h[I]=(v>1?"& ":"")+h[I],h=h.join(v>2?", ":" "),r.replace(oa,`{
2617
+ */lu.exports,function(x,a){(function(){var s,c="4.17.21",d=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",g="Invalid `variable` option passed into `_.template`",_="__lodash_hash_undefined__",S=500,b="__lodash_placeholder__",I=1,k=2,D=4,F=1,E=2,L=1,T=2,M=4,R=8,C=16,U=32,N=64,X=128,K=256,Z=512,ct=30,Rt="...",et=800,_t=16,G=1,Pt=2,Et=3,At=1/0,ce=9007199254740991,re=17976931348623157e292,Ft=0/0,It=4294967295,Nt=It-1,Pe=It>>>1,pe=[["ary",X],["bind",L],["bindKey",T],["curry",R],["curryRight",C],["flip",Z],["partial",U],["partialRight",N],["rearg",K]],Wt="[object Arguments]",$e="[object Array]",Si="[object AsyncFunction]",Oe="[object Boolean]",Ge="[object Date]",pi="[object DOMException]",Di="[object Error]",mn="[object Function]",Qi="[object GeneratorFunction]",W="[object Map]",Jt="[object Number]",jt="[object Null]",dt="[object Object]",pt="[object Promise]",Dt="[object Proxy]",ie="[object RegExp]",Kt="[object Set]",z="[object String]",Q="[object Symbol]",st="[object Undefined]",nt="[object WeakMap]",vt="[object WeakSet]",Gt="[object ArrayBuffer]",qt="[object DataView]",Xt="[object Float32Array]",Ne="[object Float64Array]",Ie="[object Int8Array]",ge="[object Int16Array]",we="[object Int32Array]",yi="[object Uint8Array]",Ei="[object Uint8ClampedArray]",ni="[object Uint16Array]",bi="[object Uint32Array]",qr=/\b__p \+= '';/g,sr=/\b(__p \+=) '' \+/g,sn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ao=/&(?:amp|lt|gt|quot|#39);/g,zi=/[&<>"']/g,qo=RegExp(Ao.source),ao=RegExp(zi.source),Vl=/<%-([\s\S]+?)%>/g,Mn=/<%([\s\S]+?)%>/g,na=/<%=([\s\S]+?)%>/g,gs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vr=/^\w*$/,ra=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Za=/[\\^$.*+?()[\]{}|]/g,Wl=RegExp(Za.source),lo=/^\s+/,Oh=/\s/,oa=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ja=/\{\n\/\* \[wrapped with (.+)\] \*/,ho=/,? & /,$a=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,sa=/[()=,{}\[\]\/\s]/,aa=/\\(\\)?/g,uo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,jl=/\w*$/,Ih=/^[-+]0x[0-9a-f]+$/i,Dh=/^0b[01]+$/i,vs=/^\[object .+?Constructor\]$/,ys=/^0o[0-7]+$/i,Xl=/^(?:0|[1-9]\d*)$/,ql=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yr=/($^)/,V=/['\n\r\u2028\u2029\\]/g,tt="\\ud800-\\udfff",lt="\\u0300-\\u036f",at="\\ufe20-\\ufe2f",j="\\u20d0-\\u20ff",St=lt+at+j,ht="\\u2700-\\u27bf",Ot="a-z\\xdf-\\xf6\\xf8-\\xff",Ht="\\xac\\xb1\\xd7\\xf7",kt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mt="\\u2000-\\u206f",he=" \\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",se="A-Z\\xc0-\\xd6\\xd8-\\xde",te="\\ufe0e\\ufe0f",ye=Ht+kt+Mt+he,ue="['’]",je="["+tt+"]",He="["+ye+"]",ci="["+St+"]",Be="\\d+",_e="["+ht+"]",Fe="["+Ot+"]",fe="[^"+tt+ye+Be+ht+Ot+se+"]",mi="\\ud83c[\\udffb-\\udfff]",Le="(?:"+ci+"|"+mi+")",xe="[^"+tt+"]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",Sn="[\\ud800-\\udbff][\\udc00-\\udfff]",Xn="["+se+"]",ki="\\u200d",Bi="(?:"+Fe+"|"+fe+")",Hi="(?:"+Xn+"|"+fe+")",nn="(?:"+ue+"(?:d|ll|m|re|s|t|ve))?",rn="(?:"+ue+"(?:D|LL|M|RE|S|T|VE))?",un=Le+"?",cn="["+te+"]?",Gi="(?:"+ki+"(?:"+[xe,Re,Sn].join("|")+")"+cn+un+")*",Ni="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ji="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",gi=cn+un+Gi,co="(?:"+[_e,Re,Sn].join("|")+")"+gi,Fn="(?:"+[xe+ci+"?",ci,Re,Sn,je].join("|")+")",la=RegExp(ue,"g"),zh=RegExp(ci,"g"),Yo=RegExp(mi+"(?="+mi+")|"+Fn+gi,"g"),Ka=RegExp([Xn+"?"+Fe+"+"+nn+"(?="+[He,Xn,"$"].join("|")+")",Hi+"+"+rn+"(?="+[He,Xn+Bi,"$"].join("|")+")",Xn+"?"+Bi+"+"+nn,Xn+"+"+rn,ji,Ni,Be,co].join("|"),"g"),Qa=RegExp("["+ki+tt+St+te+"]"),ha=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tl=["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"],ua=-1,Xi={};Xi[Xt]=Xi[Ne]=Xi[Ie]=Xi[ge]=Xi[we]=Xi[yi]=Xi[Ei]=Xi[ni]=Xi[bi]=!0,Xi[Wt]=Xi[$e]=Xi[Gt]=Xi[Oe]=Xi[qt]=Xi[Ge]=Xi[Di]=Xi[mn]=Xi[W]=Xi[Jt]=Xi[dt]=Xi[ie]=Xi[Kt]=Xi[z]=Xi[nt]=!1;var xi={};xi[Wt]=xi[$e]=xi[Gt]=xi[qt]=xi[Oe]=xi[Ge]=xi[Xt]=xi[Ne]=xi[Ie]=xi[ge]=xi[we]=xi[W]=xi[Jt]=xi[dt]=xi[ie]=xi[Kt]=xi[z]=xi[Q]=xi[yi]=xi[Ei]=xi[ni]=xi[bi]=!0,xi[Di]=xi[mn]=xi[nt]=!1;var el={À:"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"},ca={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},il={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},_s={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nl=parseFloat,fa=parseInt,da=typeof Er=="object"&&Er&&Er.Object===Object&&Er,pa=typeof self=="object"&&self&&self.Object===Object&&self,gn=da||pa||Function("return this")(),Zo=a&&!a.nodeType&&a,Zr=Zo&&!0&&x&&!x.nodeType&&x,xs=Zr&&Zr.exports===Zo,ws=xs&&da.process,Un=function(){try{var Lt=Zr&&Zr.require&&Zr.require("util").types;return Lt||ws&&ws.binding&&ws.binding("util")}catch{}}(),kh=Un&&Un.isArrayBuffer,ma=Un&&Un.isDate,ga=Un&&Un.isMap,Su=Un&&Un.isRegExp,Eu=Un&&Un.isSet,Yl=Un&&Un.isTypedArray;function yr(Lt,Qt,Zt){switch(Zt.length){case 0:return Lt.call(Qt);case 1:return Lt.call(Qt,Zt[0]);case 2:return Lt.call(Qt,Zt[0],Zt[1]);case 3:return Lt.call(Qt,Zt[0],Zt[1],Zt[2])}return Lt.apply(Qt,Zt)}function Zl(Lt,Qt,Zt,Ue){for(var ai=-1,Fi=Lt==null?0:Lt.length;++ai<Fi;){var fn=Lt[ai];Qt(Ue,fn,Zt(fn),Lt)}return Ue}function Ji(Lt,Qt){for(var Zt=-1,Ue=Lt==null?0:Lt.length;++Zt<Ue&&Qt(Lt[Zt],Zt,Lt)!==!1;);return Lt}function Ts(Lt,Qt){for(var Zt=Lt==null?0:Lt.length;Zt--&&Qt(Lt[Zt],Zt,Lt)!==!1;);return Lt}function Bh(Lt,Qt){for(var Zt=-1,Ue=Lt==null?0:Lt.length;++Zt<Ue;)if(!Qt(Lt[Zt],Zt,Lt))return!1;return!0}function Rr(Lt,Qt){for(var Zt=-1,Ue=Lt==null?0:Lt.length,ai=0,Fi=[];++Zt<Ue;){var fn=Lt[Zt];Qt(fn,Zt,Lt)&&(Fi[ai++]=fn)}return Fi}function rl(Lt,Qt){var Zt=Lt==null?0:Lt.length;return!!Zt&&Or(Lt,Qt,0)>-1}function Jl(Lt,Qt,Zt){for(var Ue=-1,ai=Lt==null?0:Lt.length;++Ue<ai;)if(Zt(Qt,Lt[Ue]))return!0;return!1}function Yi(Lt,Qt){for(var Zt=-1,Ue=Lt==null?0:Lt.length,ai=Array(Ue);++Zt<Ue;)ai[Zt]=Qt(Lt[Zt],Zt,Lt);return ai}function fo(Lt,Qt){for(var Zt=-1,Ue=Qt.length,ai=Lt.length;++Zt<Ue;)Lt[ai+Zt]=Qt[Zt];return Lt}function $l(Lt,Qt,Zt,Ue){var ai=-1,Fi=Lt==null?0:Lt.length;for(Ue&&Fi&&(Zt=Lt[++ai]);++ai<Fi;)Zt=Qt(Zt,Lt[ai],ai,Lt);return Zt}function bu(Lt,Qt,Zt,Ue){var ai=Lt==null?0:Lt.length;for(Ue&&ai&&(Zt=Lt[--ai]);ai--;)Zt=Qt(Zt,Lt[ai],ai,Lt);return Zt}function Po(Lt,Qt){for(var Zt=-1,Ue=Lt==null?0:Lt.length;++Zt<Ue;)if(Qt(Lt[Zt],Zt,Lt))return!0;return!1}var po=$o("length");function Cu(Lt){return Lt.split("")}function ol(Lt){return Lt.match($a)||[]}function Ms(Lt,Qt,Zt){var Ue;return Zt(Lt,function(ai,Fi,fn){if(Qt(ai,Fi,fn))return Ue=Fi,!1}),Ue}function Jo(Lt,Qt,Zt,Ue){for(var ai=Lt.length,Fi=Zt+(Ue?1:-1);Ue?Fi--:++Fi<ai;)if(Qt(Lt[Fi],Fi,Lt))return Fi;return-1}function Or(Lt,Qt,Zt){return Qt===Qt?Kl(Lt,Qt,Zt):Jo(Lt,Ss,Zt)}function sl(Lt,Qt,Zt,Ue){for(var ai=Zt-1,Fi=Lt.length;++ai<Fi;)if(Ue(Lt[ai],Qt))return ai;return-1}function Ss(Lt){return Lt!==Lt}function va(Lt,Qt){var Zt=Lt==null?0:Lt.length;return Zt?Qo(Lt,Qt)/Zt:Ft}function $o(Lt){return function(Qt){return Qt==null?s:Qt[Lt]}}function Lo(Lt){return function(Qt){return Lt==null?s:Lt[Qt]}}function Ko(Lt,Qt,Zt,Ue,ai){return ai(Lt,function(Fi,fn,Ee){Zt=Ue?(Ue=!1,Fi):Qt(Zt,Fi,fn,Ee)}),Zt}function Au(Lt,Qt){var Zt=Lt.length;for(Lt.sort(Qt);Zt--;)Lt[Zt]=Lt[Zt].value;return Lt}function Qo(Lt,Qt){for(var Zt,Ue=-1,ai=Lt.length;++Ue<ai;){var Fi=Qt(Lt[Ue]);Fi!==s&&(Zt=Zt===s?Fi:Zt+Fi)}return Zt}function Ro(Lt,Qt){for(var Zt=-1,Ue=Array(Lt);++Zt<Lt;)Ue[Zt]=Qt(Zt);return Ue}function Oo(Lt,Qt){return Yi(Qt,function(Zt){return[Zt,Lt[Zt]]})}function ya(Lt){return Lt&&Lt.slice(0,_a(Lt)+1).replace(lo,"")}function Gn(Lt){return function(Qt){return Lt(Qt)}}function Es(Lt,Qt){return Yi(Qt,function(Zt){return Lt[Zt]})}function mo(Lt,Qt){return Lt.has(Qt)}function ts(Lt,Qt){for(var Zt=-1,Ue=Lt.length;++Zt<Ue&&Or(Qt,Lt[Zt],0)>-1;);return Zt}function bs(Lt,Qt){for(var Zt=Lt.length;Zt--&&Or(Qt,Lt[Zt],0)>-1;);return Zt}function go(Lt,Qt){for(var Zt=Lt.length,Ue=0;Zt--;)Lt[Zt]===Qt&&++Ue;return Ue}var Cs=Lo(el),Jr=Lo(ca);function As(Lt){return"\\"+_s[Lt]}function Ps(Lt,Qt){return Lt==null?s:Lt[Qt]}function Ir(Lt){return Qa.test(Lt)}function Ls(Lt){return ha.test(Lt)}function Rs(Lt){for(var Qt,Zt=[];!(Qt=Lt.next()).done;)Zt.push(Qt.value);return Zt}function $n(Lt){var Qt=-1,Zt=Array(Lt.size);return Lt.forEach(function(Ue,ai){Zt[++Qt]=[ai,Ue]}),Zt}function al(Lt,Qt){return function(Zt){return Lt(Qt(Zt))}}function Dr(Lt,Qt){for(var Zt=-1,Ue=Lt.length,ai=0,Fi=[];++Zt<Ue;){var fn=Lt[Zt];(fn===Qt||fn===b)&&(Lt[Zt]=b,Fi[ai++]=Zt)}return Fi}function Os(Lt){var Qt=-1,Zt=Array(Lt.size);return Lt.forEach(function(Ue){Zt[++Qt]=Ue}),Zt}function Hn(Lt){var Qt=-1,Zt=Array(Lt.size);return Lt.forEach(function(Ue){Zt[++Qt]=[Ue,Ue]}),Zt}function Kl(Lt,Qt,Zt){for(var Ue=Zt-1,ai=Lt.length;++Ue<ai;)if(Lt[Ue]===Qt)return Ue;return-1}function Ql(Lt,Qt,Zt){for(var Ue=Zt+1;Ue--;)if(Lt[Ue]===Qt)return Ue;return Ue}function $r(Lt){return Ir(Lt)?xa(Lt):po(Lt)}function ar(Lt){return Ir(Lt)?_r(Lt):Cu(Lt)}function _a(Lt){for(var Qt=Lt.length;Qt--&&Oh.test(Lt.charAt(Qt)););return Qt}var th=Lo(il);function xa(Lt){for(var Qt=Yo.lastIndex=0;Yo.test(Lt);)++Qt;return Qt}function _r(Lt){return Lt.match(Yo)||[]}function jc(Lt){return Lt.match(Ka)||[]}var Xc=function Lt(Qt){Qt=Qt==null?gn:es.defaults(gn.Object(),Qt,es.pick(gn,tl));var Zt=Qt.Array,Ue=Qt.Date,ai=Qt.Error,Fi=Qt.Function,fn=Qt.Math,Ee=Qt.Object,Kn=Qt.RegExp,wa=Qt.String,lr=Qt.TypeError,On=Zt.prototype,Pu=Fi.prototype,vo=Ee.prototype,is=Qt["__core-js_shared__"],hr=Pu.toString,Ti=vo.hasOwnProperty,ur=0,zr=function(){var r=/[^.]+$/.exec(is&&is.keys&&is.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),cr=vo.toString,yo=hr.call(Ee),Kr=gn._,Io=Kn("^"+hr.call(Ti).replace(Za,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fr=xs?Qt.Buffer:s,Qn=Qt.Symbol,tn=Qt.Uint8Array,ll=fr?fr.allocUnsafe:s,_o=al(Ee.getPrototypeOf,Ee),hl=Ee.create,ul=vo.propertyIsEnumerable,Is=On.splice,Ta=Qn?Qn.isConcatSpreadable:s,ns=Qn?Qn.iterator:s,xo=Qn?Qn.toStringTag:s,Ds=function(){try{var r=Cl(Ee,"defineProperty");return r({},"",{}),r}catch{}}(),eh=Qt.clearTimeout!==gn.clearTimeout&&Qt.clearTimeout,ih=Ue&&Ue.now!==gn.Date.now&&Ue.now,Nh=Qt.setTimeout!==gn.setTimeout&&Qt.setTimeout,Do=fn.ceil,zs=fn.floor,cl=Ee.getOwnPropertySymbols,Fh=fr?fr.isBuffer:s,nh=Qt.isFinite,Uh=On.join,Lu=al(Ee.keys,Ee),vn=fn.max,Vn=fn.min,fl=Ue.now,Gh=Qt.parseInt,rh=fn.random,Ma=On.reverse,dl=Cl(Qt,"DataView"),ks=Cl(Qt,"Map"),pl=Cl(Qt,"Promise"),Bs=Cl(Qt,"Set"),En=Cl(Qt,"WeakMap"),Sa=Cl(Ee,"create"),ml=En&&new En,rs={},oh=Al(dl),Hh=Al(ks),Vh=Al(pl),Wh=Al(Bs),Ru=Al(En),gl=Qn?Qn.prototype:s,Ns=gl?gl.valueOf:s,jh=gl?gl.toString:s;function it(r){if(Ln(r)&&!vi(r)&&!(r instanceof _i)){if(r instanceof qn)return r;if(Ti.call(r,"__wrapped__"))return sp(r)}return new qn(r)}var os=function(){function r(){}return function(h){if(!wn(h))return{};if(hl)return hl(h);r.prototype=h;var v=new r;return r.prototype=s,v}}();function Ea(){}function qn(r,h){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=s}it.templateSettings={escape:Vl,evaluate:Mn,interpolate:na,variable:"",imports:{_:it}},it.prototype=Ea.prototype,it.prototype.constructor=it,qn.prototype=os(Ea.prototype),qn.prototype.constructor=qn;function _i(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=It,this.__views__=[]}function ba(){var r=new _i(this.__wrapped__);return r.__actions__=er(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=er(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=er(this.__views__),r}function Ou(){if(this.__filtered__){var r=new _i(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function Ca(){var r=this.__wrapped__.value(),h=this.__dir__,v=vi(r),O=h<0,Y=v?r.length:0,ut=Zg(0,Y,this.__views__),yt=ut.start,bt=ut.end,Bt=bt-yt,oe=O?bt:yt-1,le=this.__iteratees__,de=le.length,ke=0,Je=Vn(Bt,this.__takeCount__);if(!v||!O&&Y==Bt&&Je==Bt)return ri(r,this.__actions__);var hi=[];t:for(;Bt--&&ke<Je;){oe+=h;for(var Mi=-1,ui=r[oe];++Mi<de;){var Ri=le[Mi],Ui=Ri.iteratee,eo=Ri.type,Sr=Ui(ui);if(eo==Pt)ui=Sr;else if(!Sr){if(eo==G)continue t;break t}}hi[ke++]=ui}return hi}_i.prototype=os(Ea.prototype),_i.prototype.constructor=_i;function kr(r){var h=-1,v=r==null?0:r.length;for(this.clear();++h<v;){var O=r[h];this.set(O[0],O[1])}}function Aa(){this.__data__=Sa?Sa(null):{},this.size=0}function Pa(r){var h=this.has(r)&&delete this.__data__[r];return this.size-=h?1:0,h}function vl(r){var h=this.__data__;if(Sa){var v=h[r];return v===_?s:v}return Ti.call(h,r)?h[r]:s}function sh(r){var h=this.__data__;return Sa?h[r]!==s:Ti.call(h,r)}function yl(r,h){var v=this.__data__;return this.size+=this.has(r)?0:1,v[r]=Sa&&h===s?_:h,this}kr.prototype.clear=Aa,kr.prototype.delete=Pa,kr.prototype.get=vl,kr.prototype.has=sh,kr.prototype.set=yl;function dr(r){var h=-1,v=r==null?0:r.length;for(this.clear();++h<v;){var O=r[h];this.set(O[0],O[1])}}function _l(){this.__data__=[],this.size=0}function zo(r){var h=this.__data__,v=Tl(h,r);if(v<0)return!1;var O=h.length-1;return v==O?h.pop():Is.call(h,v,1),--this.size,!0}function xl(r){var h=this.__data__,v=Tl(h,r);return v<0?s:h[v][1]}function wl(r){return Tl(this.__data__,r)>-1}function ko(r,h){var v=this.__data__,O=Tl(v,r);return O<0?(++this.size,v.push([r,h])):v[O][1]=h,this}dr.prototype.clear=_l,dr.prototype.delete=zo,dr.prototype.get=xl,dr.prototype.has=wl,dr.prototype.set=ko;function xr(r){var h=-1,v=r==null?0:r.length;for(this.clear();++h<v;){var O=r[h];this.set(O[0],O[1])}}function Iu(){this.size=0,this.__data__={hash:new kr,map:new(ks||dr),string:new kr}}function Du(r){var h=Wu(this,r).delete(r);return this.size-=h?1:0,h}function Xh(r){return Wu(this,r).get(r)}function di(r){return Wu(this,r).has(r)}function ss(r,h){var v=Wu(this,r),O=v.size;return v.set(r,h),this.size+=v.size==O?0:1,this}xr.prototype.clear=Iu,xr.prototype.delete=Du,xr.prototype.get=Xh,xr.prototype.has=di,xr.prototype.set=ss;function Fs(r){var h=-1,v=r==null?0:r.length;for(this.__data__=new xr;++h<v;)this.add(r[h])}function Ci(r){return this.__data__.set(r,_),this}function Bn(r){return this.__data__.has(r)}Fs.prototype.add=Fs.prototype.push=Ci,Fs.prototype.has=Bn;function Qr(r){var h=this.__data__=new dr(r);this.size=h.size}function qe(){this.__data__=new dr,this.size=0}function wo(r){var h=this.__data__,v=h.delete(r);return this.size=h.size,v}function qc(r){return this.__data__.get(r)}function Yc(r){return this.__data__.has(r)}function Zc(r,h){var v=this.__data__;if(v instanceof dr){var O=v.__data__;if(!ks||O.length<d-1)return O.push([r,h]),this.size=++v.size,this;v=this.__data__=new xr(O)}return v.set(r,h),this.size=v.size,this}Qr.prototype.clear=qe,Qr.prototype.delete=wo,Qr.prototype.get=qc,Qr.prototype.has=Yc,Qr.prototype.set=Zc;function zu(r,h){var v=vi(r),O=!v&&Pl(r),Y=!v&&!O&&ka(r),ut=!v&&!O&&!Y&&mh(r),yt=v||O||Y||ut,bt=yt?Ro(r.length,wa):[],Bt=bt.length;for(var oe in r)(h||Ti.call(r,oe))&&!(yt&&(oe=="length"||Y&&(oe=="offset"||oe=="parent")||ut&&(oe=="buffer"||oe=="byteLength"||oe=="byteOffset")||Ws(oe,Bt)))&&bt.push(oe);return bt}function qh(r){var h=r.length;return h?r[me(0,h-1)]:s}function Jc(r,h){return ju(er(r),as(h,0,r.length))}function ku(r){return ju(er(r))}function ah(r,h,v){(v!==s&&!Uo(r[h],v)||v===s&&!(h in r))&&Bo(r,h,v)}function La(r,h,v){var O=r[h];(!(Ti.call(r,h)&&Uo(O,v))||v===s&&!(h in r))&&Bo(r,h,v)}function Tl(r,h){for(var v=r.length;v--;)if(Uo(r[v][0],h))return v;return-1}function Bu(r,h,v,O){return yn(r,function(Y,ut,yt){h(O,Y,v(Y),yt)}),O}function Yh(r,h){return r&&In(h,Jn(h),r)}function Zh(r,h){return r&&In(h,Ur(h),r)}function Bo(r,h,v){h=="__proto__"&&Ds?Ds(r,h,{configurable:!0,enumerable:!0,value:v,writable:!0}):r[h]=v}function Jh(r,h){for(var v=-1,O=h.length,Y=Zt(O),ut=r==null;++v<O;)Y[v]=ut?s:df(r,h[v]);return Y}function as(r,h,v){return r===r&&(v!==s&&(r=r<=v?r:v),h!==s&&(r=r>=h?r:h)),r}function wr(r,h,v,O,Y,ut){var yt,bt=h&I,Bt=h&k,oe=h&D;if(v&&(yt=Y?v(r,O,Y,ut):v(r)),yt!==s)return yt;if(!wn(r))return r;var le=vi(r);if(le){if(yt=$g(r),!bt)return er(r,yt)}else{var de=mr(r),ke=de==mn||de==Qi;if(ka(r))return No(r,bt);if(de==dt||de==Wt||ke&&!Y){if(yt=Bt||ke?{}:$d(r),!bt)return Bt?Gu(r,Zh(yt,r)):So(r,Yh(yt,r))}else{if(!xi[de])return Y?r:{};yt=Kg(r,de,bt)}}ut||(ut=new Qr);var Je=ut.get(r);if(Je)return Je;ut.set(r,yt),bp(r)?r.forEach(function(ui){yt.add(wr(ui,h,v,ui,r,ut))}):Sp(r)&&r.forEach(function(ui,Ri){yt.set(Ri,wr(ui,h,v,Ri,r,ut))});var hi=oe?Bt?Kc:$c:Bt?Ur:Jn,Mi=le?s:hi(r);return Ji(Mi||r,function(ui,Ri){Mi&&(Ri=ui,ui=r[Ri]),La(yt,Ri,wr(ui,h,v,Ri,r,ut))}),yt}function Ra(r){var h=Jn(r);return function(v){return Nu(v,r,h)}}function Nu(r,h,v){var O=v.length;if(r==null)return!O;for(r=Ee(r);O--;){var Y=v[O],ut=h[Y],yt=r[Y];if(yt===s&&!(Y in r)||!ut(yt))return!1}return!0}function To(r,h,v){if(typeof r!="function")throw new lr(m);return ru(function(){r.apply(s,v)},h)}function Ml(r,h,v,O){var Y=-1,ut=rl,yt=!0,bt=r.length,Bt=[],oe=h.length;if(!bt)return Bt;v&&(h=Yi(h,Gn(v))),O?(ut=Jl,yt=!1):h.length>=d&&(ut=mo,yt=!1,h=new Fs(h));t:for(;++Y<bt;){var le=r[Y],de=v==null?le:v(le);if(le=O||le!==0?le:0,yt&&de===de){for(var ke=oe;ke--;)if(h[ke]===de)continue t;Bt.push(le)}else ut(h,de,O)||Bt.push(le)}return Bt}var yn=ft(Nr),Fu=ft(hh,!0);function Yn(r,h){var v=!0;return yn(r,function(O,Y,ut){return v=!!h(O,Y,ut),v}),v}function Mo(r,h,v){for(var O=-1,Y=r.length;++O<Y;){var ut=r[O],yt=h(ut);if(yt!=null&&(bt===s?yt===yt&&!to(yt):v(yt,bt)))var bt=yt,Bt=ut}return Bt}function tr(r,h,v,O){var Y=r.length;for(v=wi(v),v<0&&(v=-v>Y?0:Y+v),O=O===s||O>Y?Y:wi(O),O<0&&(O+=Y),O=v>O?0:Ap(O);v<O;)r[v++]=h;return r}function Br(r,h){var v=[];return yn(r,function(O,Y,ut){h(O,Y,ut)&&v.push(O)}),v}function bn(r,h,v,O,Y){var ut=-1,yt=r.length;for(v||(v=t0),Y||(Y=[]);++ut<yt;){var bt=r[ut];h>0&&v(bt)?h>1?bn(bt,h-1,v,O,Y):fo(Y,bt):O||(Y[Y.length]=bt)}return Y}var Sl=Tt(),lh=Tt(!0);function Nr(r,h){return r&&Sl(r,h,Jn)}function hh(r,h){return r&&lh(r,h,Jn)}function Us(r,h){return Rr(h,function(v){return js(r[v])})}function ls(r,h){h=Ze(h,r);for(var v=0,O=h.length;r!=null&&v<O;)r=r[us(h[v++])];return v&&v==O?r:s}function Uu(r,h,v){var O=h(r);return vi(r)?O:fo(O,v(r))}function Zn(r){return r==null?r===s?st:jt:xo&&xo in Ee(r)?Yg(r):a0(r)}function uh(r,h){return r>h}function ch(r,h){return r!=null&&Ti.call(r,h)}function $h(r,h){return r!=null&&h in Ee(r)}function fh(r,h,v){return r>=Vn(h,v)&&r<vn(h,v)}function El(r,h,v){for(var O=v?Jl:rl,Y=r[0].length,ut=r.length,yt=ut,bt=Zt(ut),Bt=1/0,oe=[];yt--;){var le=r[yt];yt&&h&&(le=Yi(le,Gn(h))),Bt=Vn(le.length,Bt),bt[yt]=!v&&(h||Y>=120&&le.length>=120)?new Fs(yt&&le):s}le=r[0];var de=-1,ke=bt[0];t:for(;++de<Y&&oe.length<Bt;){var Je=le[de],hi=h?h(Je):Je;if(Je=v||Je!==0?Je:0,!(ke?mo(ke,hi):O(oe,hi,v))){for(yt=ut;--yt;){var Mi=bt[yt];if(!(Mi?mo(Mi,hi):O(r[yt],hi,v)))continue t}ke&&ke.push(hi),oe.push(Je)}}return oe}function t(r,h,v,O){return Nr(r,function(Y,ut,yt){h(O,v(Y),ut,yt)}),O}function e(r,h,v){h=Ze(h,r),r=ep(r,h);var O=r==null?r:r[us(bo(h))];return O==null?s:yr(O,r,v)}function i(r){return Ln(r)&&Zn(r)==Wt}function n(r){return Ln(r)&&Zn(r)==Gt}function o(r){return Ln(r)&&Zn(r)==Ge}function l(r,h,v,O,Y){return r===h?!0:r==null||h==null||!Ln(r)&&!Ln(h)?r!==r&&h!==h:f(r,h,v,O,l,Y)}function f(r,h,v,O,Y,ut){var yt=vi(r),bt=vi(h),Bt=yt?$e:mr(r),oe=bt?$e:mr(h);Bt=Bt==Wt?dt:Bt,oe=oe==Wt?dt:oe;var le=Bt==dt,de=oe==dt,ke=Bt==oe;if(ke&&ka(r)){if(!ka(h))return!1;yt=!0,le=!1}if(ke&&!le)return ut||(ut=new Qr),yt||mh(r)?Yd(r,h,v,O,Y,ut):Xg(r,h,Bt,v,O,Y,ut);if(!(v&F)){var Je=le&&Ti.call(r,"__wrapped__"),hi=de&&Ti.call(h,"__wrapped__");if(Je||hi){var Mi=Je?r.value():r,ui=hi?h.value():h;return ut||(ut=new Qr),Y(Mi,ui,v,O,ut)}}return ke?(ut||(ut=new Qr),qg(r,h,v,O,Y,ut)):!1}function p(r){return Ln(r)&&mr(r)==W}function y(r,h,v,O){var Y=v.length,ut=Y,yt=!O;if(r==null)return!ut;for(r=Ee(r);Y--;){var bt=v[Y];if(yt&&bt[2]?bt[1]!==r[bt[0]]:!(bt[0]in r))return!1}for(;++Y<ut;){bt=v[Y];var Bt=bt[0],oe=r[Bt],le=bt[1];if(yt&&bt[2]){if(oe===s&&!(Bt in r))return!1}else{var de=new Qr;if(O)var ke=O(oe,le,Bt,r,h,de);if(!(ke===s?l(le,oe,F|E,O,de):ke))return!1}}return!0}function w(r){if(!wn(r)||i0(r))return!1;var h=js(r)?Io:vs;return h.test(Al(r))}function A(r){return Ln(r)&&Zn(r)==ie}function P(r){return Ln(r)&&mr(r)==Kt}function B(r){return Ln(r)&&$u(r.length)&&!!Xi[Zn(r)]}function H(r){return typeof r=="function"?r:r==null?Gr:typeof r=="object"?vi(r)?Ct(r[0],r[1]):gt(r):Fp(r)}function q(r){if(!nu(r))return Lu(r);var h=[];for(var v in Ee(r))Ti.call(r,v)&&v!="constructor"&&h.push(v);return h}function $(r){if(!wn(r))return s0(r);var h=nu(r),v=[];for(var O in r)O=="constructor"&&(h||!Ti.call(r,O))||v.push(O);return v}function rt(r,h){return r<h}function xt(r,h){var v=-1,O=Fr(r)?Zt(r.length):[];return yn(r,function(Y,ut,yt){O[++v]=h(Y,ut,yt)}),O}function gt(r){var h=tf(r);return h.length==1&&h[0][2]?Qd(h[0][0],h[0][1]):function(v){return v===r||y(v,r,h)}}function Ct(r,h){return nf(r)&&Kd(h)?Qd(us(r),h):function(v){var O=df(v,r);return O===s&&O===h?pf(v,r):l(h,O,F|E)}}function wt(r,h,v,O,Y){r!==h&&Sl(h,function(ut,yt){if(Y||(Y=new Qr),wn(ut))Vt(r,h,yt,v,wt,O,Y);else{var bt=O?O(of(r,yt),ut,yt+"",r,h,Y):s;bt===s&&(bt=ut),ah(r,yt,bt)}},Ur)}function Vt(r,h,v,O,Y,ut,yt){var bt=of(r,v),Bt=of(h,v),oe=yt.get(Bt);if(oe){ah(r,v,oe);return}var le=ut?ut(bt,Bt,v+"",r,h,yt):s,de=le===s;if(de){var ke=vi(Bt),Je=!ke&&ka(Bt),hi=!ke&&!Je&&mh(Bt);le=Bt,ke||Je||hi?vi(bt)?le=bt:Dn(bt)?le=er(bt):Je?(de=!1,le=No(Bt,!0)):hi?(de=!1,le=bl(Bt,!0)):le=[]:ou(Bt)||Pl(Bt)?(le=bt,Pl(bt)?le=Pp(bt):(!wn(bt)||js(bt))&&(le=$d(Bt))):de=!1}de&&(yt.set(Bt,le),Y(le,Bt,O,ut,yt),yt.delete(Bt)),ah(r,v,le)}function J(r,h){var v=r.length;if(v)return h+=h<0?v:0,Ws(h,v)?r[h]:s}function ot(r,h,v){h.length?h=Yi(h,function(ut){return vi(ut)?function(yt){return ls(yt,ut.length===1?ut[0]:ut)}:ut}):h=[Gr];var O=-1;h=Yi(h,Gn(si()));var Y=xt(r,function(ut,yt,bt){var Bt=Yi(h,function(oe){return oe(ut)});return{criteria:Bt,index:++O,value:ut}});return Au(Y,function(ut,yt){return hs(ut,yt,v)})}function zt(r,h){return ee(r,h,function(v,O){return pf(r,O)})}function ee(r,h,v){for(var O=-1,Y=h.length,ut={};++O<Y;){var yt=h[O],bt=ls(r,yt);v(bt,yt)&&fi(ut,Ze(yt,r),bt)}return ut}function $t(r){return function(h){return ls(h,r)}}function Yt(r,h,v,O){var Y=O?sl:Or,ut=-1,yt=h.length,bt=r;for(r===h&&(h=er(h)),v&&(bt=Yi(r,Gn(v)));++ut<yt;)for(var Bt=0,oe=h[ut],le=v?v(oe):oe;(Bt=Y(bt,le,Bt,O))>-1;)bt!==r&&Is.call(bt,Bt,1),Is.call(r,Bt,1);return r}function Te(r,h){for(var v=r?h.length:0,O=v-1;v--;){var Y=h[v];if(v==O||Y!==ut){var ut=Y;Ws(Y)?Is.call(r,Y,1):Wi(r,Y)}}return r}function me(r,h){return r+zs(rh()*(h-r+1))}function De(r,h,v,O){for(var Y=-1,ut=vn(Do((h-r)/(v||1)),0),yt=Zt(ut);ut--;)yt[O?ut:++Y]=r,r+=v;return yt}function be(r,h){var v="";if(!r||h<1||h>ce)return v;do h%2&&(v+=r),h=zs(h/2),h&&(r+=r);while(h);return v}function ae(r,h){return sf(tp(r,h,Gr),r+"")}function We(r){return qh(gh(r))}function Qe(r,h){var v=gh(r);return ju(v,as(h,0,v.length))}function fi(r,h,v,O){if(!wn(r))return r;h=Ze(h,r);for(var Y=-1,ut=h.length,yt=ut-1,bt=r;bt!=null&&++Y<ut;){var Bt=us(h[Y]),oe=v;if(Bt==="__proto__"||Bt==="constructor"||Bt==="prototype")return r;if(Y!=yt){var le=bt[Bt];oe=O?O(le,Bt,bt):s,oe===s&&(oe=wn(le)?le:Ws(h[Y+1])?[]:{})}La(bt,Bt,oe),bt=bt[Bt]}return r}var Cn=ml?function(r,h){return ml.set(r,h),r}:Gr,_n=Ds?function(r,h){return Ds(r,"toString",{configurable:!0,enumerable:!1,value:gf(h),writable:!0})}:Gr;function qi(r){return ju(gh(r))}function Vi(r,h,v){var O=-1,Y=r.length;h<0&&(h=-h>Y?0:Y+h),v=v>Y?Y:v,v<0&&(v+=Y),Y=h>v?0:v-h>>>0,h>>>=0;for(var ut=Zt(Y);++O<Y;)ut[O]=r[O+h];return ut}function on(r,h){var v;return yn(r,function(O,Y,ut){return v=h(O,Y,ut),!v}),!!v}function An(r,h,v){var O=0,Y=r==null?O:r.length;if(typeof h=="number"&&h===h&&Y<=Pe){for(;O<Y;){var ut=O+Y>>>1,yt=r[ut];yt!==null&&!to(yt)&&(v?yt<=h:yt<h)?O=ut+1:Y=ut}return Y}return Ce(r,h,Gr,v)}function Ce(r,h,v,O){var Y=0,ut=r==null?0:r.length;if(ut===0)return 0;h=v(h);for(var yt=h!==h,bt=h===null,Bt=to(h),oe=h===s;Y<ut;){var le=zs((Y+ut)/2),de=v(r[le]),ke=de!==s,Je=de===null,hi=de===de,Mi=to(de);if(yt)var ui=O||hi;else oe?ui=hi&&(O||ke):bt?ui=hi&&ke&&(O||!Je):Bt?ui=hi&&ke&&!Je&&(O||!Mi):Je||Mi?ui=!1:ui=O?de<=h:de<h;ui?Y=le+1:ut=le}return Vn(ut,Nt)}function ti(r,h){for(var v=-1,O=r.length,Y=0,ut=[];++v<O;){var yt=r[v],bt=h?h(yt):yt;if(!v||!Uo(bt,Bt)){var Bt=bt;ut[Y++]=yt===0?0:yt}}return ut}function Ut(r){return typeof r=="number"?r:to(r)?Ft:+r}function Ye(r){if(typeof r=="string")return r;if(vi(r))return Yi(r,Ye)+"";if(to(r))return jh?jh.call(r):"";var h=r+"";return h=="0"&&1/r==-At?"-0":h}function ei(r,h,v){var O=-1,Y=rl,ut=r.length,yt=!0,bt=[],Bt=bt;if(v)yt=!1,Y=Jl;else if(ut>=d){var oe=h?null:za(r);if(oe)return Os(oe);yt=!1,Y=mo,Bt=new Fs}else Bt=h?[]:bt;t:for(;++O<ut;){var le=r[O],de=h?h(le):le;if(le=v||le!==0?le:0,yt&&de===de){for(var ke=Bt.length;ke--;)if(Bt[ke]===de)continue t;h&&Bt.push(de),bt.push(le)}else Y(Bt,de,v)||(Bt!==bt&&Bt.push(de),bt.push(le))}return bt}function Wi(r,h){return h=Ze(h,r),r=ep(r,h),r==null||delete r[us(bo(h))]}function Ae(r,h,v,O){return fi(r,h,v(ls(r,h)),O)}function Xe(r,h,v,O){for(var Y=r.length,ut=O?Y:-1;(O?ut--:++ut<Y)&&h(r[ut],ut,r););return v?Vi(r,O?0:ut,O?ut+1:Y):Vi(r,O?ut+1:0,O?Y:ut)}function ri(r,h){var v=r;return v instanceof _i&&(v=v.value()),$l(h,function(O,Y){return Y.func.apply(Y.thisArg,fo([O],Y.args))},v)}function Li(r,h,v){var O=r.length;if(O<2)return O?ei(r[0]):[];for(var Y=-1,ut=Zt(O);++Y<O;)for(var yt=r[Y],bt=-1;++bt<O;)bt!=Y&&(ut[Y]=Ml(ut[Y]||yt,r[bt],h,v));return ei(bn(ut,1),h,v)}function Ai(r,h,v){for(var O=-1,Y=r.length,ut=h.length,yt={};++O<Y;){var bt=O<ut?h[O]:s;v(yt,r[O],bt)}return yt}function ne(r){return Dn(r)?r:[]}function ii(r){return typeof r=="function"?r:Gr}function Ze(r,h){return vi(r)?r:nf(r,h)?[r]:op(Zi(r))}var li=ae;function xn(r,h,v){var O=r.length;return v=v===s?O:v,!h&&v>=O?r:Vi(r,h,v)}var Pn=eh||function(r){return gn.clearTimeout(r)};function No(r,h){if(h)return r.slice();var v=r.length,O=ll?ll(v):new r.constructor(v);return r.copy(O),O}function Oa(r){var h=new r.constructor(r.byteLength);return new tn(h).set(new tn(r)),h}function Kh(r,h){var v=h?Oa(r.buffer):r.buffer;return new r.constructor(v,r.byteOffset,r.byteLength)}function Ia(r){var h=new r.constructor(r.source,jl.exec(r));return h.lastIndex=r.lastIndex,h}function Gs(r){return Ns?Ee(Ns.call(r)):{}}function bl(r,h){var v=h?Oa(r.buffer):r.buffer;return new r.constructor(v,r.byteOffset,r.length)}function Hs(r,h){if(r!==h){var v=r!==s,O=r===null,Y=r===r,ut=to(r),yt=h!==s,bt=h===null,Bt=h===h,oe=to(h);if(!bt&&!oe&&!ut&&r>h||ut&&yt&&Bt&&!bt&&!oe||O&&yt&&Bt||!v&&Bt||!Y)return 1;if(!O&&!ut&&!oe&&r<h||oe&&v&&Y&&!O&&!ut||bt&&v&&Y||!yt&&Y||!Bt)return-1}return 0}function hs(r,h,v){for(var O=-1,Y=r.criteria,ut=h.criteria,yt=Y.length,bt=v.length;++O<yt;){var Bt=Hs(Y[O],ut[O]);if(Bt){if(O>=bt)return Bt;var oe=v[O];return Bt*(oe=="desc"?-1:1)}}return r.index-h.index}function Qh(r,h,v,O){for(var Y=-1,ut=r.length,yt=v.length,bt=-1,Bt=h.length,oe=vn(ut-yt,0),le=Zt(Bt+oe),de=!O;++bt<Bt;)le[bt]=h[bt];for(;++Y<yt;)(de||Y<ut)&&(le[v[Y]]=r[Y]);for(;oe--;)le[bt++]=r[Y++];return le}function tu(r,h,v,O){for(var Y=-1,ut=r.length,yt=-1,bt=v.length,Bt=-1,oe=h.length,le=vn(ut-bt,0),de=Zt(le+oe),ke=!O;++Y<le;)de[Y]=r[Y];for(var Je=Y;++Bt<oe;)de[Je+Bt]=h[Bt];for(;++yt<bt;)(ke||Y<ut)&&(de[Je+v[yt]]=r[Y++]);return de}function er(r,h){var v=-1,O=r.length;for(h||(h=Zt(O));++v<O;)h[v]=r[v];return h}function In(r,h,v,O){var Y=!v;v||(v={});for(var ut=-1,yt=h.length;++ut<yt;){var bt=h[ut],Bt=O?O(v[bt],r[bt],bt,v,r):s;Bt===s&&(Bt=r[bt]),Y?Bo(v,bt,Bt):La(v,bt,Bt)}return v}function So(r,h){return In(r,ef(r),h)}function Gu(r,h){return In(r,Zd(r),h)}function Da(r,h){return function(v,O){var Y=vi(v)?Zl:Bu,ut=h?h():{};return Y(v,r,si(O,2),ut)}}function Fo(r){return ae(function(h,v){var O=-1,Y=v.length,ut=Y>1?v[Y-1]:s,yt=Y>2?v[2]:s;for(ut=r.length>3&&typeof ut=="function"?(Y--,ut):s,yt&&Mr(v[0],v[1],yt)&&(ut=Y<3?s:ut,Y=1),h=Ee(h);++O<Y;){var bt=v[O];bt&&r(h,bt,O,ut)}return h})}function ft(r,h){return function(v,O){if(v==null)return v;if(!Fr(v))return r(v,O);for(var Y=v.length,ut=h?Y:-1,yt=Ee(v);(h?ut--:++ut<Y)&&O(yt[ut],ut,yt)!==!1;);return v}}function Tt(r){return function(h,v,O){for(var Y=-1,ut=Ee(h),yt=O(h),bt=yt.length;bt--;){var Bt=yt[r?bt:++Y];if(v(ut[Bt],Bt,ut)===!1)break}return h}}function mt(r,h,v){var O=h&L,Y=Ve(r);function ut(){var yt=this&&this!==gn&&this instanceof ut?Y:r;return yt.apply(O?v:this,arguments)}return ut}function Me(r){return function(h){h=Zi(h);var v=Ir(h)?ar(h):s,O=v?v[0]:h.charAt(0),Y=v?xn(v,1).join(""):h.slice(1);return O[r]()+Y}}function ze(r){return function(h){return $l(Bp(kp(h).replace(la,"")),r,"")}}function Ve(r){return function(){var h=arguments;switch(h.length){case 0:return new r;case 1:return new r(h[0]);case 2:return new r(h[0],h[1]);case 3:return new r(h[0],h[1],h[2]);case 4:return new r(h[0],h[1],h[2],h[3]);case 5:return new r(h[0],h[1],h[2],h[3],h[4]);case 6:return new r(h[0],h[1],h[2],h[3],h[4],h[5]);case 7:return new r(h[0],h[1],h[2],h[3],h[4],h[5],h[6])}var v=os(r.prototype),O=r.apply(v,h);return wn(O)?O:v}}function Se(r,h,v){var O=Ve(r);function Y(){for(var ut=arguments.length,yt=Zt(ut),bt=ut,Bt=ph(Y);bt--;)yt[bt]=arguments[bt];var oe=ut<3&&yt[0]!==Bt&&yt[ut-1]!==Bt?[]:Dr(yt,Bt);if(ut-=oe.length,ut<v)return iu(r,h,$i,Y.placeholder,s,yt,oe,s,s,v-ut);var le=this&&this!==gn&&this instanceof Y?O:r;return yr(le,this,yt)}return Y}function Ke(r){return function(h,v,O){var Y=Ee(h);if(!Fr(h)){var ut=si(v,3);h=Jn(h),v=function(bt){return ut(Y[bt],bt,Y)}}var yt=r(h,v,O);return yt>-1?Y[ut?h[yt]:yt]:s}}function Oi(r){return Vs(function(h){var v=h.length,O=v,Y=qn.prototype.thru;for(r&&h.reverse();O--;){var ut=h[O];if(typeof ut!="function")throw new lr(m);if(Y&&!yt&&Vu(ut)=="wrapper")var yt=new qn([],!0)}for(O=yt?O:v;++O<v;){ut=h[O];var bt=Vu(ut),Bt=bt=="wrapper"?Qc(ut):s;Bt&&rf(Bt[0])&&Bt[1]==(X|R|U|K)&&!Bt[4].length&&Bt[9]==1?yt=yt[Vu(Bt[0])].apply(yt,Bt[3]):yt=ut.length==1&&rf(ut)?yt[bt]():yt.thru(ut)}return function(){var oe=arguments,le=oe[0];if(yt&&oe.length==1&&vi(le))return yt.plant(le).value();for(var de=0,ke=v?h[de].apply(this,oe):le;++de<v;)ke=h[de].call(this,ke);return ke}})}function $i(r,h,v,O,Y,ut,yt,bt,Bt,oe){var le=h&X,de=h&L,ke=h&T,Je=h&(R|C),hi=h&Z,Mi=ke?s:Ve(r);function ui(){for(var Ri=arguments.length,Ui=Zt(Ri),eo=Ri;eo--;)Ui[eo]=arguments[eo];if(Je)var Sr=ph(ui),io=go(Ui,Sr);if(O&&(Ui=Qh(Ui,O,Y,Je)),ut&&(Ui=tu(Ui,ut,yt,Je)),Ri-=io,Je&&Ri<oe){var zn=Dr(Ui,Sr);return iu(r,h,$i,ui.placeholder,v,Ui,zn,bt,Bt,oe-Ri)}var Go=de?v:this,qs=ke?Go[r]:r;return Ri=Ui.length,bt?Ui=l0(Ui,bt):hi&&Ri>1&&Ui.reverse(),le&&Bt<Ri&&(Ui.length=Bt),this&&this!==gn&&this instanceof ui&&(qs=Mi||Ve(qs)),qs.apply(Go,Ui)}return ui}function ve(r,h){return function(v,O){return t(v,r,h(O),{})}}function Tr(r,h){return function(v,O){var Y;if(v===s&&O===s)return h;if(v!==s&&(Y=v),O!==s){if(Y===s)return O;typeof v=="string"||typeof O=="string"?(v=Ye(v),O=Ye(O)):(v=Ut(v),O=Ut(O)),Y=r(v,O)}return Y}}function Nn(r){return Vs(function(h){return h=Yi(h,Gn(si())),ae(function(v){var O=this;return r(h,function(Y){return yr(Y,O,v)})})})}function an(r,h){h=h===s?" ":Ye(h);var v=h.length;if(v<2)return v?be(h,r):h;var O=be(h,Do(r/$r(h)));return Ir(h)?xn(ar(O),0,r).join(""):O.slice(0,r)}function pr(r,h,v,O){var Y=h&L,ut=Ve(r);function yt(){for(var bt=-1,Bt=arguments.length,oe=-1,le=O.length,de=Zt(le+Bt),ke=this&&this!==gn&&this instanceof yt?ut:r;++oe<le;)de[oe]=O[oe];for(;Bt--;)de[oe++]=arguments[++bt];return yr(ke,Y?v:this,de)}return yt}function eu(r){return function(h,v,O){return O&&typeof O!="number"&&Mr(h,v,O)&&(v=O=s),h=Xs(h),v===s?(v=h,h=0):v=Xs(v),O=O===s?h<v?1:-1:Xs(O),De(h,v,O,r)}}function Eo(r){return function(h,v){return typeof h=="string"&&typeof v=="string"||(h=Co(h),v=Co(v)),r(h,v)}}function iu(r,h,v,O,Y,ut,yt,bt,Bt,oe){var le=h&R,de=le?yt:s,ke=le?s:yt,Je=le?ut:s,hi=le?s:ut;h|=le?U:N,h&=~(le?N:U),h&M||(h&=~(L|T));var Mi=[r,h,Y,Je,de,hi,ke,bt,Bt,oe],ui=v.apply(s,Mi);return rf(r)&&ip(ui,Mi),ui.placeholder=O,np(ui,r,h)}function dh(r){var h=fn[r];return function(v,O){if(v=Co(v),O=O==null?0:Vn(wi(O),292),O&&nh(v)){var Y=(Zi(v)+"e").split("e"),ut=h(Y[0]+"e"+(+Y[1]+O));return Y=(Zi(ut)+"e").split("e"),+(Y[0]+"e"+(+Y[1]-O))}return h(v)}}var za=Bs&&1/Os(new Bs([,-0]))[1]==At?function(r){return new Bs(r)}:_f;function Hu(r){return function(h){var v=mr(h);return v==W?$n(h):v==Kt?Hn(h):Oo(h,r(h))}}function ir(r,h,v,O,Y,ut,yt,bt){var Bt=h&T;if(!Bt&&typeof r!="function")throw new lr(m);var oe=O?O.length:0;if(oe||(h&=~(U|N),O=Y=s),yt=yt===s?yt:vn(wi(yt),0),bt=bt===s?bt:wi(bt),oe-=Y?Y.length:0,h&N){var le=O,de=Y;O=Y=s}var ke=Bt?s:Qc(r),Je=[r,h,v,O,Y,le,de,ut,yt,bt];if(ke&&o0(Je,ke),r=Je[0],h=Je[1],v=Je[2],O=Je[3],Y=Je[4],bt=Je[9]=Je[9]===s?Bt?0:r.length:vn(Je[9]-oe,0),!bt&&h&(R|C)&&(h&=~(R|C)),!h||h==L)var hi=mt(r,h,v);else h==R||h==C?hi=Se(r,h,bt):(h==U||h==(L|U))&&!Y.length?hi=pr(r,h,v,O):hi=$i.apply(s,Je);var Mi=ke?Cn:ip;return np(Mi(hi,Je),r,h)}function Xd(r,h,v,O){return r===s||Uo(r,vo[v])&&!Ti.call(O,v)?h:r}function qd(r,h,v,O,Y,ut){return wn(r)&&wn(h)&&(ut.set(h,r),wt(r,h,s,qd,ut),ut.delete(h)),r}function jg(r){return ou(r)?s:r}function Yd(r,h,v,O,Y,ut){var yt=v&F,bt=r.length,Bt=h.length;if(bt!=Bt&&!(yt&&Bt>bt))return!1;var oe=ut.get(r),le=ut.get(h);if(oe&&le)return oe==h&&le==r;var de=-1,ke=!0,Je=v&E?new Fs:s;for(ut.set(r,h),ut.set(h,r);++de<bt;){var hi=r[de],Mi=h[de];if(O)var ui=yt?O(Mi,hi,de,h,r,ut):O(hi,Mi,de,r,h,ut);if(ui!==s){if(ui)continue;ke=!1;break}if(Je){if(!Po(h,function(Ri,Ui){if(!mo(Je,Ui)&&(hi===Ri||Y(hi,Ri,v,O,ut)))return Je.push(Ui)})){ke=!1;break}}else if(!(hi===Mi||Y(hi,Mi,v,O,ut))){ke=!1;break}}return ut.delete(r),ut.delete(h),ke}function Xg(r,h,v,O,Y,ut,yt){switch(v){case qt:if(r.byteLength!=h.byteLength||r.byteOffset!=h.byteOffset)return!1;r=r.buffer,h=h.buffer;case Gt:return!(r.byteLength!=h.byteLength||!ut(new tn(r),new tn(h)));case Oe:case Ge:case Jt:return Uo(+r,+h);case Di:return r.name==h.name&&r.message==h.message;case ie:case z:return r==h+"";case W:var bt=$n;case Kt:var Bt=O&F;if(bt||(bt=Os),r.size!=h.size&&!Bt)return!1;var oe=yt.get(r);if(oe)return oe==h;O|=E,yt.set(r,h);var le=Yd(bt(r),bt(h),O,Y,ut,yt);return yt.delete(r),le;case Q:if(Ns)return Ns.call(r)==Ns.call(h)}return!1}function qg(r,h,v,O,Y,ut){var yt=v&F,bt=$c(r),Bt=bt.length,oe=$c(h),le=oe.length;if(Bt!=le&&!yt)return!1;for(var de=Bt;de--;){var ke=bt[de];if(!(yt?ke in h:Ti.call(h,ke)))return!1}var Je=ut.get(r),hi=ut.get(h);if(Je&&hi)return Je==h&&hi==r;var Mi=!0;ut.set(r,h),ut.set(h,r);for(var ui=yt;++de<Bt;){ke=bt[de];var Ri=r[ke],Ui=h[ke];if(O)var eo=yt?O(Ui,Ri,ke,h,r,ut):O(Ri,Ui,ke,r,h,ut);if(!(eo===s?Ri===Ui||Y(Ri,Ui,v,O,ut):eo)){Mi=!1;break}ui||(ui=ke=="constructor")}if(Mi&&!ui){var Sr=r.constructor,io=h.constructor;Sr!=io&&"constructor"in r&&"constructor"in h&&!(typeof Sr=="function"&&Sr instanceof Sr&&typeof io=="function"&&io instanceof io)&&(Mi=!1)}return ut.delete(r),ut.delete(h),Mi}function Vs(r){return sf(tp(r,s,hp),r+"")}function $c(r){return Uu(r,Jn,ef)}function Kc(r){return Uu(r,Ur,Zd)}var Qc=ml?function(r){return ml.get(r)}:_f;function Vu(r){for(var h=r.name+"",v=rs[h],O=Ti.call(rs,h)?v.length:0;O--;){var Y=v[O],ut=Y.func;if(ut==null||ut==r)return Y.name}return h}function ph(r){var h=Ti.call(it,"placeholder")?it:r;return h.placeholder}function si(){var r=it.iteratee||vf;return r=r===vf?H:r,arguments.length?r(arguments[0],arguments[1]):r}function Wu(r,h){var v=r.__data__;return e0(h)?v[typeof h=="string"?"string":"hash"]:v.map}function tf(r){for(var h=Jn(r),v=h.length;v--;){var O=h[v],Y=r[O];h[v]=[O,Y,Kd(Y)]}return h}function Cl(r,h){var v=Ps(r,h);return w(v)?v:s}function Yg(r){var h=Ti.call(r,xo),v=r[xo];try{r[xo]=s;var O=!0}catch{}var Y=cr.call(r);return O&&(h?r[xo]=v:delete r[xo]),Y}var ef=cl?function(r){return r==null?[]:(r=Ee(r),Rr(cl(r),function(h){return ul.call(r,h)}))}:xf,Zd=cl?function(r){for(var h=[];r;)fo(h,ef(r)),r=_o(r);return h}:xf,mr=Zn;(dl&&mr(new dl(new ArrayBuffer(1)))!=qt||ks&&mr(new ks)!=W||pl&&mr(pl.resolve())!=pt||Bs&&mr(new Bs)!=Kt||En&&mr(new En)!=nt)&&(mr=function(r){var h=Zn(r),v=h==dt?r.constructor:s,O=v?Al(v):"";if(O)switch(O){case oh:return qt;case Hh:return W;case Vh:return pt;case Wh:return Kt;case Ru:return nt}return h});function Zg(r,h,v){for(var O=-1,Y=v.length;++O<Y;){var ut=v[O],yt=ut.size;switch(ut.type){case"drop":r+=yt;break;case"dropRight":h-=yt;break;case"take":h=Vn(h,r+yt);break;case"takeRight":r=vn(r,h-yt);break}}return{start:r,end:h}}function Jg(r){var h=r.match(Ja);return h?h[1].split(ho):[]}function Jd(r,h,v){h=Ze(h,r);for(var O=-1,Y=h.length,ut=!1;++O<Y;){var yt=us(h[O]);if(!(ut=r!=null&&v(r,yt)))break;r=r[yt]}return ut||++O!=Y?ut:(Y=r==null?0:r.length,!!Y&&$u(Y)&&Ws(yt,Y)&&(vi(r)||Pl(r)))}function $g(r){var h=r.length,v=new r.constructor(h);return h&&typeof r[0]=="string"&&Ti.call(r,"index")&&(v.index=r.index,v.input=r.input),v}function $d(r){return typeof r.constructor=="function"&&!nu(r)?os(_o(r)):{}}function Kg(r,h,v){var O=r.constructor;switch(h){case Gt:return Oa(r);case Oe:case Ge:return new O(+r);case qt:return Kh(r,v);case Xt:case Ne:case Ie:case ge:case we:case yi:case Ei:case ni:case bi:return bl(r,v);case W:return new O;case Jt:case z:return new O(r);case ie:return Ia(r);case Kt:return new O;case Q:return Gs(r)}}function Qg(r,h){var v=h.length;if(!v)return r;var O=v-1;return h[O]=(v>1?"& ":"")+h[O],h=h.join(v>2?", ":" "),r.replace(oa,`{
2618
2618
  /* [wrapped with `+h+`] */
2619
- `)}function t0(r){return vi(r)||Al(r)||!!(Ta&&r&&r[Ta])}function Ws(r,h){var v=typeof r;return h=h??ce,!!h&&(v=="number"||v!="symbol"&&Xl.test(r))&&r>-1&&r%1==0&&r<h}function Mr(r,h,v){if(!wn(v))return!1;var I=typeof h;return(I=="number"?Fr(v)&&Ws(h,v.length):I=="string"&&h in v)?Uo(v[h],r):!1}function nf(r,h){if(vi(r))return!1;var v=typeof r;return v=="number"||v=="symbol"||v=="boolean"||r==null||to(r)?!0:vr.test(r)||!gs.test(r)||h!=null&&r in Ee(h)}function e0(r){var h=typeof r;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?r!=="__proto__":r===null}function rf(r){var h=Vu(r),v=it[h];if(typeof v!="function"||!(h in _i.prototype))return!1;if(r===v)return!0;var I=Qc(v);return!!I&&r===I[0]}function i0(r){return!!zr&&zr in r}var n0=is?js:wf;function nu(r){var h=r&&r.constructor,v=typeof h=="function"&&h.prototype||vo;return r===v}function Kd(r){return r===r&&!wn(r)}function Qd(r,h){return function(v){return v==null?!1:v[r]===h&&(h!==s||r in Ee(v))}}function r0(r){var h=Zu(r,function(I){return v.size===S&&v.clear(),I}),v=h.cache;return h}function o0(r,h){var v=r[1],I=h[1],Y=v|I,ut=Y<(L|T|X),yt=I==X&&v==R||I==X&&v==K&&r[7].length<=h[8]||I==(X|K)&&h[7].length<=h[8]&&v==R;if(!(ut||yt))return r;I&L&&(r[2]=h[2],Y|=v&L?0:M);var bt=h[3];if(bt){var Bt=r[3];r[3]=Bt?Qh(Bt,bt,h[4]):bt,r[4]=Bt?Dr(r[3],b):h[4]}return bt=h[5],bt&&(Bt=r[5],r[5]=Bt?tu(Bt,bt,h[6]):bt,r[6]=Bt?Dr(r[5],b):h[6]),bt=h[7],bt&&(r[7]=bt),I&X&&(r[8]=r[8]==null?h[8]:Vn(r[8],h[8])),r[9]==null&&(r[9]=h[9]),r[0]=h[0],r[1]=Y,r}function s0(r){var h=[];if(r!=null)for(var v in Ee(r))h.push(v);return h}function a0(r){return cr.call(r)}function tp(r,h,v){return h=vn(h===s?r.length-1:h,0),function(){for(var I=arguments,Y=-1,ut=vn(I.length-h,0),yt=Zt(ut);++Y<ut;)yt[Y]=I[h+Y];Y=-1;for(var bt=Zt(h+1);++Y<h;)bt[Y]=I[Y];return bt[h]=v(yt),yr(r,this,bt)}}function ep(r,h){return h.length<2?r:ls(r,Vi(h,0,-1))}function l0(r,h){for(var v=r.length,I=Vn(h.length,v),Y=er(r);I--;){var ut=h[I];r[I]=Ws(ut,v)?Y[ut]:s}return r}function of(r,h){if(!(h==="constructor"&&typeof r[h]=="function")&&h!="__proto__")return r[h]}var ip=rp(Cn),ru=Nh||function(r,h){return gn.setTimeout(r,h)},sf=rp(_n);function np(r,h,v){var I=h+"";return sf(r,Qg(I,h0(Jg(I),v)))}function rp(r){var h=0,v=0;return function(){var I=cl(),Y=_t-(I-v);if(v=I,Y>0){if(++h>=et)return arguments[0]}else h=0;return r.apply(s,arguments)}}function ju(r,h){var v=-1,I=r.length,Y=I-1;for(h=h===s?I:h;++v<h;){var ut=me(v,Y),yt=r[ut];r[ut]=r[v],r[v]=yt}return r.length=h,r}var op=r0(function(r){var h=[];return r.charCodeAt(0)===46&&h.push(""),r.replace(ra,function(v,I,Y,ut){h.push(Y?ut.replace(aa,"$1"):I||v)}),h});function us(r){if(typeof r=="string"||to(r))return r;var h=r+"";return h=="0"&&1/r==-At?"-0":h}function Cl(r){if(r!=null){try{return hr.call(r)}catch{}try{return r+""}catch{}}return""}function h0(r,h){return Ji(pe,function(v){var I="_."+v[0];h&v[1]&&!nl(r,I)&&r.push(I)}),r.sort()}function sp(r){if(r instanceof _i)return r.clone();var h=new qn(r.__wrapped__,r.__chain__);return h.__actions__=er(r.__actions__),h.__index__=r.__index__,h.__values__=r.__values__,h}function u0(r,h,v){(v?Mr(r,h,v):h===s)?h=1:h=vn(wi(h),0);var I=r==null?0:r.length;if(!I||h<1)return[];for(var Y=0,ut=0,yt=Zt(Do(I/h));Y<I;)yt[ut++]=Vi(r,Y,Y+=h);return yt}function c0(r){for(var h=-1,v=r==null?0:r.length,I=0,Y=[];++h<v;){var ut=r[h];ut&&(Y[I++]=ut)}return Y}function f0(){var r=arguments.length;if(!r)return[];for(var h=Zt(r-1),v=arguments[0],I=r;I--;)h[I-1]=arguments[I];return fo(vi(v)?er(v):[v],bn(h,1))}var d0=ae(function(r,h){return Dn(r)?Tl(r,bn(h,1,Dn,!0)):[]}),p0=ae(function(r,h){var v=bo(h);return Dn(v)&&(v=s),Dn(r)?Tl(r,bn(h,1,Dn,!0),si(v,2)):[]}),m0=ae(function(r,h){var v=bo(h);return Dn(v)&&(v=s),Dn(r)?Tl(r,bn(h,1,Dn,!0),s,v):[]});function g0(r,h,v){var I=r==null?0:r.length;return I?(h=v||h===s?1:wi(h),Vi(r,h<0?0:h,I)):[]}function v0(r,h,v){var I=r==null?0:r.length;return I?(h=v||h===s?1:wi(h),h=I-h,Vi(r,0,h<0?0:h)):[]}function y0(r,h){return r&&r.length?Xe(r,si(h,3),!0,!0):[]}function _0(r,h){return r&&r.length?Xe(r,si(h,3),!0):[]}function x0(r,h,v,I){var Y=r==null?0:r.length;return Y?(v&&typeof v!="number"&&Mr(r,h,v)&&(v=0,I=Y),tr(r,h,v,I)):[]}function ap(r,h,v){var I=r==null?0:r.length;if(!I)return-1;var Y=v==null?0:wi(v);return Y<0&&(Y=vn(I+Y,0)),Jo(r,si(h,3),Y)}function lp(r,h,v){var I=r==null?0:r.length;if(!I)return-1;var Y=I-1;return v!==s&&(Y=wi(v),Y=v<0?vn(I+Y,0):Vn(Y,I-1)),Jo(r,si(h,3),Y,!0)}function hp(r){var h=r==null?0:r.length;return h?bn(r,1):[]}function w0(r){var h=r==null?0:r.length;return h?bn(r,At):[]}function T0(r,h){var v=r==null?0:r.length;return v?(h=h===s?1:wi(h),bn(r,h)):[]}function M0(r){for(var h=-1,v=r==null?0:r.length,I={};++h<v;){var Y=r[h];I[Y[0]]=Y[1]}return I}function up(r){return r&&r.length?r[0]:s}function S0(r,h,v){var I=r==null?0:r.length;if(!I)return-1;var Y=v==null?0:wi(v);return Y<0&&(Y=vn(I+Y,0)),Or(r,h,Y)}function E0(r){var h=r==null?0:r.length;return h?Vi(r,0,-1):[]}var b0=ae(function(r){var h=Yi(r,ne);return h.length&&h[0]===r[0]?Sl(h):[]}),C0=ae(function(r){var h=bo(r),v=Yi(r,ne);return h===bo(v)?h=s:v.pop(),v.length&&v[0]===r[0]?Sl(v,si(h,2)):[]}),A0=ae(function(r){var h=bo(r),v=Yi(r,ne);return h=typeof h=="function"?h:s,h&&v.pop(),v.length&&v[0]===r[0]?Sl(v,s,h):[]});function P0(r,h){return r==null?"":Uh.call(r,h)}function bo(r){var h=r==null?0:r.length;return h?r[h-1]:s}function L0(r,h,v){var I=r==null?0:r.length;if(!I)return-1;var Y=I;return v!==s&&(Y=wi(v),Y=Y<0?vn(I+Y,0):Vn(Y,I-1)),h===h?Ql(r,h,Y):Jo(r,Ss,Y,!0)}function R0(r,h){return r&&r.length?J(r,wi(h)):s}var O0=ae(cp);function cp(r,h){return r&&r.length&&h&&h.length?Yt(r,h):r}function I0(r,h,v){return r&&r.length&&h&&h.length?Yt(r,h,si(v,2)):r}function D0(r,h,v){return r&&r.length&&h&&h.length?Yt(r,h,s,v):r}var z0=Vs(function(r,h){var v=r==null?0:r.length,I=Jh(r,h);return Te(r,Yi(h,function(Y){return Ws(Y,v)?+Y:Y}).sort(Hs)),I});function k0(r,h){var v=[];if(!(r&&r.length))return v;var I=-1,Y=[],ut=r.length;for(h=si(h,3);++I<ut;){var yt=r[I];h(yt,I,r)&&(v.push(yt),Y.push(I))}return Te(r,Y),v}function af(r){return r==null?r:Ma.call(r)}function B0(r,h,v){var I=r==null?0:r.length;return I?(v&&typeof v!="number"&&Mr(r,h,v)?(h=0,v=I):(h=h==null?0:wi(h),v=v===s?I:wi(v)),Vi(r,h,v)):[]}function N0(r,h){return An(r,h)}function F0(r,h,v){return Ce(r,h,si(v,2))}function U0(r,h){var v=r==null?0:r.length;if(v){var I=An(r,h);if(I<v&&Uo(r[I],h))return I}return-1}function G0(r,h){return An(r,h,!0)}function H0(r,h,v){return Ce(r,h,si(v,2),!0)}function V0(r,h){var v=r==null?0:r.length;if(v){var I=An(r,h,!0)-1;if(Uo(r[I],h))return I}return-1}function W0(r){return r&&r.length?ti(r):[]}function j0(r,h){return r&&r.length?ti(r,si(h,2)):[]}function X0(r){var h=r==null?0:r.length;return h?Vi(r,1,h):[]}function q0(r,h,v){return r&&r.length?(h=v||h===s?1:wi(h),Vi(r,0,h<0?0:h)):[]}function Y0(r,h,v){var I=r==null?0:r.length;return I?(h=v||h===s?1:wi(h),h=I-h,Vi(r,h<0?0:h,I)):[]}function Z0(r,h){return r&&r.length?Xe(r,si(h,3),!1,!0):[]}function J0(r,h){return r&&r.length?Xe(r,si(h,3)):[]}var $0=ae(function(r){return ei(bn(r,1,Dn,!0))}),K0=ae(function(r){var h=bo(r);return Dn(h)&&(h=s),ei(bn(r,1,Dn,!0),si(h,2))}),Q0=ae(function(r){var h=bo(r);return h=typeof h=="function"?h:s,ei(bn(r,1,Dn,!0),s,h)});function tv(r){return r&&r.length?ei(r):[]}function ev(r,h){return r&&r.length?ei(r,si(h,2)):[]}function iv(r,h){return h=typeof h=="function"?h:s,r&&r.length?ei(r,s,h):[]}function lf(r){if(!(r&&r.length))return[];var h=0;return r=Rr(r,function(v){if(Dn(v))return h=vn(v.length,h),!0}),Ro(h,function(v){return Yi(r,$o(v))})}function fp(r,h){if(!(r&&r.length))return[];var v=lf(r);return h==null?v:Yi(v,function(I){return yr(h,s,I)})}var nv=ae(function(r,h){return Dn(r)?Tl(r,h):[]}),rv=ae(function(r){return Li(Rr(r,Dn))}),ov=ae(function(r){var h=bo(r);return Dn(h)&&(h=s),Li(Rr(r,Dn),si(h,2))}),sv=ae(function(r){var h=bo(r);return h=typeof h=="function"?h:s,Li(Rr(r,Dn),s,h)}),av=ae(lf);function lv(r,h){return Ai(r||[],h||[],La)}function hv(r,h){return Ai(r||[],h||[],fi)}var uv=ae(function(r){var h=r.length,v=h>1?r[h-1]:s;return v=typeof v=="function"?(r.pop(),v):s,fp(r,v)});function dp(r){var h=it(r);return h.__chain__=!0,h}function cv(r,h){return h(r),r}function Xu(r,h){return h(r)}var fv=Vs(function(r){var h=r.length,v=h?r[0]:0,I=this.__wrapped__,Y=function(ut){return Jh(ut,r)};return h>1||this.__actions__.length||!(I instanceof _i)||!Ws(v)?this.thru(Y):(I=I.slice(v,+v+(h?1:0)),I.__actions__.push({func:Xu,args:[Y],thisArg:s}),new qn(I,this.__chain__).thru(function(ut){return h&&!ut.length&&ut.push(s),ut}))});function dv(){return dp(this)}function pv(){return new qn(this.value(),this.__chain__)}function mv(){this.__values__===s&&(this.__values__=Cp(this.value()));var r=this.__index__>=this.__values__.length,h=r?s:this.__values__[this.__index__++];return{done:r,value:h}}function gv(){return this}function vv(r){for(var h,v=this;v instanceof Ea;){var I=sp(v);I.__index__=0,I.__values__=s,h?Y.__wrapped__=I:h=I;var Y=I;v=v.__wrapped__}return Y.__wrapped__=r,h}function yv(){var r=this.__wrapped__;if(r instanceof _i){var h=r;return this.__actions__.length&&(h=new _i(this)),h=h.reverse(),h.__actions__.push({func:Xu,args:[af],thisArg:s}),new qn(h,this.__chain__)}return this.thru(af)}function _v(){return ri(this.__wrapped__,this.__actions__)}var xv=Da(function(r,h,v){Ti.call(r,v)?++r[v]:Bo(r,v,1)});function wv(r,h,v){var I=vi(r)?Bh:Yn;return v&&Mr(r,h,v)&&(h=s),I(r,si(h,3))}function Tv(r,h){var v=vi(r)?Rr:Br;return v(r,si(h,3))}var Mv=Ke(ap),Sv=Ke(lp);function Ev(r,h){return bn(qu(r,h),1)}function bv(r,h){return bn(qu(r,h),At)}function Cv(r,h,v){return v=v===s?1:wi(v),bn(qu(r,h),v)}function pp(r,h){var v=vi(r)?Ji:yn;return v(r,si(h,3))}function mp(r,h){var v=vi(r)?Ts:Fu;return v(r,si(h,3))}var Av=Da(function(r,h,v){Ti.call(r,v)?r[v].push(h):Bo(r,v,[h])});function Pv(r,h,v,I){r=Fr(r)?r:gh(r),v=v&&!I?wi(v):0;var Y=r.length;return v<0&&(v=vn(Y+v,0)),Ku(r)?v<=Y&&r.indexOf(h,v)>-1:!!Y&&Or(r,h,v)>-1}var Lv=ae(function(r,h,v){var I=-1,Y=typeof h=="function",ut=Fr(r)?Zt(r.length):[];return yn(r,function(yt){ut[++I]=Y?yr(h,yt,v):e(yt,h,v)}),ut}),Rv=Da(function(r,h,v){Bo(r,v,h)});function qu(r,h){var v=vi(r)?Yi:xt;return v(r,si(h,3))}function Ov(r,h,v,I){return r==null?[]:(vi(h)||(h=h==null?[]:[h]),v=I?s:v,vi(v)||(v=v==null?[]:[v]),ot(r,h,v))}var Iv=Da(function(r,h,v){r[v?0:1].push(h)},function(){return[[],[]]});function Dv(r,h,v){var I=vi(r)?$l:Ko,Y=arguments.length<3;return I(r,si(h,4),v,Y,yn)}function zv(r,h,v){var I=vi(r)?bu:Ko,Y=arguments.length<3;return I(r,si(h,4),v,Y,Fu)}function kv(r,h){var v=vi(r)?Rr:Br;return v(r,Ju(si(h,3)))}function Bv(r){var h=vi(r)?qh:We;return h(r)}function Nv(r,h,v){(v?Mr(r,h,v):h===s)?h=1:h=wi(h);var I=vi(r)?Jc:Qe;return I(r,h)}function Fv(r){var h=vi(r)?ku:qi;return h(r)}function Uv(r){if(r==null)return 0;if(Fr(r))return Ku(r)?$r(r):r.length;var h=mr(r);return h==W||h==Kt?r.size:q(r).length}function Gv(r,h,v){var I=vi(r)?Po:on;return v&&Mr(r,h,v)&&(h=s),I(r,si(h,3))}var Hv=ae(function(r,h){if(r==null)return[];var v=h.length;return v>1&&Mr(r,h[0],h[1])?h=[]:v>2&&Mr(h[0],h[1],h[2])&&(h=[h[0]]),ot(r,bn(h,1),[])}),Yu=ih||function(){return gn.Date.now()};function Vv(r,h){if(typeof h!="function")throw new lr(m);return r=wi(r),function(){if(--r<1)return h.apply(this,arguments)}}function gp(r,h,v){return h=v?s:h,h=r&&h==null?r.length:h,ir(r,X,s,s,s,s,h)}function vp(r,h){var v;if(typeof h!="function")throw new lr(m);return r=wi(r),function(){return--r>0&&(v=h.apply(this,arguments)),r<=1&&(h=s),v}}var hf=ae(function(r,h,v){var I=L;if(v.length){var Y=Dr(v,ph(hf));I|=U}return ir(r,I,h,v,Y)}),yp=ae(function(r,h,v){var I=L|T;if(v.length){var Y=Dr(v,ph(yp));I|=U}return ir(h,I,r,v,Y)});function _p(r,h,v){h=v?s:h;var I=ir(r,R,s,s,s,s,s,h);return I.placeholder=_p.placeholder,I}function xp(r,h,v){h=v?s:h;var I=ir(r,C,s,s,s,s,s,h);return I.placeholder=xp.placeholder,I}function wp(r,h,v){var I,Y,ut,yt,bt,Bt,oe=0,le=!1,de=!1,ke=!0;if(typeof r!="function")throw new lr(m);h=Co(h)||0,wn(v)&&(le=!!v.leading,de="maxWait"in v,ut=de?vn(Co(v.maxWait)||0,h):ut,ke="trailing"in v?!!v.trailing:ke);function Je(zn){var Go=I,qs=Y;return I=Y=s,oe=zn,yt=r.apply(qs,Go),yt}function hi(zn){return oe=zn,bt=ru(Ri,h),le?Je(zn):yt}function Mi(zn){var Go=zn-Bt,qs=zn-oe,Up=h-Go;return de?Vn(Up,ut-qs):Up}function ui(zn){var Go=zn-Bt,qs=zn-oe;return Bt===s||Go>=h||Go<0||de&&qs>=ut}function Ri(){var zn=Yu();if(ui(zn))return Ui(zn);bt=ru(Ri,Mi(zn))}function Ui(zn){return bt=s,ke&&I?Je(zn):(I=Y=s,yt)}function eo(){bt!==s&&Pn(bt),oe=0,I=Bt=Y=bt=s}function Sr(){return bt===s?yt:Ui(Yu())}function io(){var zn=Yu(),Go=ui(zn);if(I=arguments,Y=this,Bt=zn,Go){if(bt===s)return hi(Bt);if(de)return Pn(bt),bt=ru(Ri,h),Je(Bt)}return bt===s&&(bt=ru(Ri,h)),yt}return io.cancel=eo,io.flush=Sr,io}var Wv=ae(function(r,h){return To(r,1,h)}),jv=ae(function(r,h,v){return To(r,Co(h)||0,v)});function Xv(r){return ir(r,Z)}function Zu(r,h){if(typeof r!="function"||h!=null&&typeof h!="function")throw new lr(m);var v=function(){var I=arguments,Y=h?h.apply(this,I):I[0],ut=v.cache;if(ut.has(Y))return ut.get(Y);var yt=r.apply(this,I);return v.cache=ut.set(Y,yt)||ut,yt};return v.cache=new(Zu.Cache||xr),v}Zu.Cache=xr;function Ju(r){if(typeof r!="function")throw new lr(m);return function(){var h=arguments;switch(h.length){case 0:return!r.call(this);case 1:return!r.call(this,h[0]);case 2:return!r.call(this,h[0],h[1]);case 3:return!r.call(this,h[0],h[1],h[2])}return!r.apply(this,h)}}function qv(r){return vp(2,r)}var Yv=li(function(r,h){h=h.length==1&&vi(h[0])?Yi(h[0],Gn(si())):Yi(bn(h,1),Gn(si()));var v=h.length;return ae(function(I){for(var Y=-1,ut=Vn(I.length,v);++Y<ut;)I[Y]=h[Y].call(this,I[Y]);return yr(r,this,I)})}),uf=ae(function(r,h){var v=Dr(h,ph(uf));return ir(r,U,s,h,v)}),Tp=ae(function(r,h){var v=Dr(h,ph(Tp));return ir(r,N,s,h,v)}),Zv=Vs(function(r,h){return ir(r,K,s,s,s,h)});function Jv(r,h){if(typeof r!="function")throw new lr(m);return h=h===s?h:wi(h),ae(r,h)}function $v(r,h){if(typeof r!="function")throw new lr(m);return h=h==null?0:vn(wi(h),0),ae(function(v){var I=v[h],Y=xn(v,0,h);return I&&fo(Y,I),yr(r,this,Y)})}function Kv(r,h,v){var I=!0,Y=!0;if(typeof r!="function")throw new lr(m);return wn(v)&&(I="leading"in v?!!v.leading:I,Y="trailing"in v?!!v.trailing:Y),wp(r,h,{leading:I,maxWait:h,trailing:Y})}function Qv(r){return gp(r,1)}function ty(r,h){return uf(ii(h),r)}function ey(){if(!arguments.length)return[];var r=arguments[0];return vi(r)?r:[r]}function iy(r){return wr(r,D)}function ny(r,h){return h=typeof h=="function"?h:s,wr(r,D,h)}function ry(r){return wr(r,O|D)}function oy(r,h){return h=typeof h=="function"?h:s,wr(r,O|D,h)}function sy(r,h){return h==null||Nu(r,h,Jn(h))}function Uo(r,h){return r===h||r!==r&&h!==h}var ay=Eo(uh),ly=Eo(function(r,h){return r>=h}),Al=i(function(){return arguments}())?i:function(r){return Ln(r)&&Ti.call(r,"callee")&&!hl.call(r,"callee")},vi=Zt.isArray,hy=kh?Gn(kh):n;function Fr(r){return r!=null&&$u(r.length)&&!js(r)}function Dn(r){return Ln(r)&&Fr(r)}function uy(r){return r===!0||r===!1||Ln(r)&&Zn(r)==Oe}var ka=Fh||wf,cy=ma?Gn(ma):o;function fy(r){return Ln(r)&&r.nodeType===1&&!ou(r)}function dy(r){if(r==null)return!0;if(Fr(r)&&(vi(r)||typeof r=="string"||typeof r.splice=="function"||ka(r)||mh(r)||Al(r)))return!r.length;var h=mr(r);if(h==W||h==Kt)return!r.size;if(nu(r))return!q(r).length;for(var v in r)if(Ti.call(r,v))return!1;return!0}function py(r,h){return l(r,h)}function my(r,h,v){v=typeof v=="function"?v:s;var I=v?v(r,h):s;return I===s?l(r,h,s,v):!!I}function cf(r){if(!Ln(r))return!1;var h=Zn(r);return h==Di||h==pi||typeof r.message=="string"&&typeof r.name=="string"&&!ou(r)}function gy(r){return typeof r=="number"&&nh(r)}function js(r){if(!wn(r))return!1;var h=Zn(r);return h==mn||h==Qi||h==Si||h==Dt}function Mp(r){return typeof r=="number"&&r==wi(r)}function $u(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ce}function wn(r){var h=typeof r;return r!=null&&(h=="object"||h=="function")}function Ln(r){return r!=null&&typeof r=="object"}var Sp=ga?Gn(ga):p;function vy(r,h){return r===h||y(r,h,tf(h))}function yy(r,h,v){return v=typeof v=="function"?v:s,y(r,h,tf(h),v)}function _y(r){return Ep(r)&&r!=+r}function xy(r){if(n0(r))throw new ai(u);return w(r)}function wy(r){return r===null}function Ty(r){return r==null}function Ep(r){return typeof r=="number"||Ln(r)&&Zn(r)==Jt}function ou(r){if(!Ln(r)||Zn(r)!=dt)return!1;var h=_o(r);if(h===null)return!0;var v=Ti.call(h,"constructor")&&h.constructor;return typeof v=="function"&&v instanceof v&&hr.call(v)==yo}var ff=Su?Gn(Su):A;function My(r){return Mp(r)&&r>=-ce&&r<=ce}var bp=Eu?Gn(Eu):P;function Ku(r){return typeof r=="string"||!vi(r)&&Ln(r)&&Zn(r)==z}function to(r){return typeof r=="symbol"||Ln(r)&&Zn(r)==Q}var mh=Yl?Gn(Yl):B;function Sy(r){return r===s}function Ey(r){return Ln(r)&&mr(r)==nt}function by(r){return Ln(r)&&Zn(r)==vt}var Cy=Eo(rt),Ay=Eo(function(r,h){return r<=h});function Cp(r){if(!r)return[];if(Fr(r))return Ku(r)?ar(r):er(r);if(ns&&r[ns])return Rs(r[ns]());var h=mr(r),v=h==W?$n:h==Kt?Os:gh;return v(r)}function Xs(r){if(!r)return r===0?r:0;if(r=Co(r),r===At||r===-At){var h=r<0?-1:1;return h*re}return r===r?r:0}function wi(r){var h=Xs(r),v=h%1;return h===h?v?h-v:h:0}function Ap(r){return r?as(wi(r),0,It):0}function Co(r){if(typeof r=="number")return r;if(to(r))return Ft;if(wn(r)){var h=typeof r.valueOf=="function"?r.valueOf():r;r=wn(h)?h+"":h}if(typeof r!="string")return r===0?r:+r;r=ya(r);var v=Dh.test(r);return v||ys.test(r)?fa(r.slice(2),v?2:8):Ih.test(r)?Ft:+r}function Pp(r){return In(r,Ur(r))}function Py(r){return r?as(wi(r),-ce,ce):r===0?r:0}function Zi(r){return r==null?"":Ye(r)}var Ly=Fo(function(r,h){if(nu(h)||Fr(h)){In(h,Jn(h),r);return}for(var v in h)Ti.call(h,v)&&La(r,v,h[v])}),Lp=Fo(function(r,h){In(h,Ur(h),r)}),Qu=Fo(function(r,h,v,I){In(h,Ur(h),r,I)}),Ry=Fo(function(r,h,v,I){In(h,Jn(h),r,I)}),Oy=Vs(Jh);function Iy(r,h){var v=os(r);return h==null?v:Yh(v,h)}var Dy=ae(function(r,h){r=Ee(r);var v=-1,I=h.length,Y=I>2?h[2]:s;for(Y&&Mr(h[0],h[1],Y)&&(I=1);++v<I;)for(var ut=h[v],yt=Ur(ut),bt=-1,Bt=yt.length;++bt<Bt;){var oe=yt[bt],le=r[oe];(le===s||Uo(le,vo[oe])&&!Ti.call(r,oe))&&(r[oe]=ut[oe])}return r}),zy=ae(function(r){return r.push(s,qd),yr(Rp,s,r)});function ky(r,h){return Ms(r,si(h,3),Nr)}function By(r,h){return Ms(r,si(h,3),hh)}function Ny(r,h){return r==null?r:Ml(r,si(h,3),Ur)}function Fy(r,h){return r==null?r:lh(r,si(h,3),Ur)}function Uy(r,h){return r&&Nr(r,si(h,3))}function Gy(r,h){return r&&hh(r,si(h,3))}function Hy(r){return r==null?[]:Us(r,Jn(r))}function Vy(r){return r==null?[]:Us(r,Ur(r))}function df(r,h,v){var I=r==null?s:ls(r,h);return I===s?v:I}function Wy(r,h){return r!=null&&Jd(r,h,ch)}function pf(r,h){return r!=null&&Jd(r,h,$h)}var jy=ve(function(r,h,v){h!=null&&typeof h.toString!="function"&&(h=cr.call(h)),r[h]=v},gf(Gr)),Xy=ve(function(r,h,v){h!=null&&typeof h.toString!="function"&&(h=cr.call(h)),Ti.call(r,h)?r[h].push(v):r[h]=[v]},si),qy=ae(e);function Jn(r){return Fr(r)?zu(r):q(r)}function Ur(r){return Fr(r)?zu(r,!0):$(r)}function Yy(r,h){var v={};return h=si(h,3),Nr(r,function(I,Y,ut){Bo(v,h(I,Y,ut),I)}),v}function Zy(r,h){var v={};return h=si(h,3),Nr(r,function(I,Y,ut){Bo(v,Y,h(I,Y,ut))}),v}var Jy=Fo(function(r,h,v){wt(r,h,v)}),Rp=Fo(function(r,h,v,I){wt(r,h,v,I)}),$y=Vs(function(r,h){var v={};if(r==null)return v;var I=!1;h=Yi(h,function(ut){return ut=Ze(ut,r),I||(I=ut.length>1),ut}),In(r,Kc(r),v),I&&(v=wr(v,O|k|D,jg));for(var Y=h.length;Y--;)Wi(v,h[Y]);return v});function Ky(r,h){return Op(r,Ju(si(h)))}var Qy=Vs(function(r,h){return r==null?{}:zt(r,h)});function Op(r,h){if(r==null)return{};var v=Yi(Kc(r),function(I){return[I]});return h=si(h),ee(r,v,function(I,Y){return h(I,Y[0])})}function t_(r,h,v){h=Ze(h,r);var I=-1,Y=h.length;for(Y||(Y=1,r=s);++I<Y;){var ut=r==null?s:r[us(h[I])];ut===s&&(I=Y,ut=v),r=js(ut)?ut.call(r):ut}return r}function e_(r,h,v){return r==null?r:fi(r,h,v)}function i_(r,h,v,I){return I=typeof I=="function"?I:s,r==null?r:fi(r,h,v,I)}var Ip=Hu(Jn),Dp=Hu(Ur);function n_(r,h,v){var I=vi(r),Y=I||ka(r)||mh(r);if(h=si(h,4),v==null){var ut=r&&r.constructor;Y?v=I?new ut:[]:wn(r)?v=js(ut)?os(_o(r)):{}:v={}}return(Y?Ji:Nr)(r,function(yt,bt,Bt){return h(v,yt,bt,Bt)}),v}function r_(r,h){return r==null?!0:Wi(r,h)}function o_(r,h,v){return r==null?r:Ae(r,h,ii(v))}function s_(r,h,v,I){return I=typeof I=="function"?I:s,r==null?r:Ae(r,h,ii(v),I)}function gh(r){return r==null?[]:Es(r,Jn(r))}function a_(r){return r==null?[]:Es(r,Ur(r))}function l_(r,h,v){return v===s&&(v=h,h=s),v!==s&&(v=Co(v),v=v===v?v:0),h!==s&&(h=Co(h),h=h===h?h:0),as(Co(r),h,v)}function h_(r,h,v){return h=Xs(h),v===s?(v=h,h=0):v=Xs(v),r=Co(r),fh(r,h,v)}function u_(r,h,v){if(v&&typeof v!="boolean"&&Mr(r,h,v)&&(h=v=s),v===s&&(typeof h=="boolean"?(v=h,h=s):typeof r=="boolean"&&(v=r,r=s)),r===s&&h===s?(r=0,h=1):(r=Xs(r),h===s?(h=r,r=0):h=Xs(h)),r>h){var I=r;r=h,h=I}if(v||r%1||h%1){var Y=rh();return Vn(r+Y*(h-r+il("1e-"+((Y+"").length-1))),h)}return me(r,h)}var c_=ze(function(r,h,v){return h=h.toLowerCase(),r+(v?zp(h):h)});function zp(r){return mf(Zi(r).toLowerCase())}function kp(r){return r=Zi(r),r&&r.replace(ql,Cs).replace(zh,"")}function f_(r,h,v){r=Zi(r),h=Ye(h);var I=r.length;v=v===s?I:as(wi(v),0,I);var Y=v;return v-=h.length,v>=0&&r.slice(v,Y)==h}function d_(r){return r=Zi(r),r&&ao.test(r)?r.replace(zi,Jr):r}function p_(r){return r=Zi(r),r&&Wl.test(r)?r.replace(Ya,"\\$&"):r}var m_=ze(function(r,h,v){return r+(v?"-":"")+h.toLowerCase()}),g_=ze(function(r,h,v){return r+(v?" ":"")+h.toLowerCase()}),v_=Me("toLowerCase");function y_(r,h,v){r=Zi(r),h=wi(h);var I=h?$r(r):0;if(!h||I>=h)return r;var Y=(h-I)/2;return an(zs(Y),v)+r+an(Do(Y),v)}function __(r,h,v){r=Zi(r),h=wi(h);var I=h?$r(r):0;return h&&I<h?r+an(h-I,v):r}function x_(r,h,v){r=Zi(r),h=wi(h);var I=h?$r(r):0;return h&&I<h?an(h-I,v)+r:r}function w_(r,h,v){return v||h==null?h=0:h&&(h=+h),Gh(Zi(r).replace(lo,""),h||0)}function T_(r,h,v){return(v?Mr(r,h,v):h===s)?h=1:h=wi(h),be(Zi(r),h)}function M_(){var r=arguments,h=Zi(r[0]);return r.length<3?h:h.replace(r[1],r[2])}var S_=ze(function(r,h,v){return r+(v?"_":"")+h.toLowerCase()});function E_(r,h,v){return v&&typeof v!="number"&&Mr(r,h,v)&&(h=v=s),v=v===s?It:v>>>0,v?(r=Zi(r),r&&(typeof h=="string"||h!=null&&!ff(h))&&(h=Ye(h),!h&&Ir(r))?xn(ar(r),0,v):r.split(h,v)):[]}var b_=ze(function(r,h,v){return r+(v?" ":"")+mf(h)});function C_(r,h,v){return r=Zi(r),v=v==null?0:as(wi(v),0,r.length),h=Ye(h),r.slice(v,v+h.length)==h}function A_(r,h,v){var I=it.templateSettings;v&&Mr(r,h,v)&&(h=s),r=Zi(r),h=Qu({},h,I,Xd);var Y=Qu({},h.imports,I.imports,Xd),ut=Jn(Y),yt=Es(Y,ut),bt,Bt,oe=0,le=h.interpolate||Yr,de="__p += '",ke=Kn((h.escape||Yr).source+"|"+le.source+"|"+(le===na?uo:Yr).source+"|"+(h.evaluate||Yr).source+"|$","g"),Je="//# sourceURL="+(Ti.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ua+"]")+`
2619
+ `)}function t0(r){return vi(r)||Pl(r)||!!(Ta&&r&&r[Ta])}function Ws(r,h){var v=typeof r;return h=h??ce,!!h&&(v=="number"||v!="symbol"&&Xl.test(r))&&r>-1&&r%1==0&&r<h}function Mr(r,h,v){if(!wn(v))return!1;var O=typeof h;return(O=="number"?Fr(v)&&Ws(h,v.length):O=="string"&&h in v)?Uo(v[h],r):!1}function nf(r,h){if(vi(r))return!1;var v=typeof r;return v=="number"||v=="symbol"||v=="boolean"||r==null||to(r)?!0:vr.test(r)||!gs.test(r)||h!=null&&r in Ee(h)}function e0(r){var h=typeof r;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?r!=="__proto__":r===null}function rf(r){var h=Vu(r),v=it[h];if(typeof v!="function"||!(h in _i.prototype))return!1;if(r===v)return!0;var O=Qc(v);return!!O&&r===O[0]}function i0(r){return!!zr&&zr in r}var n0=is?js:wf;function nu(r){var h=r&&r.constructor,v=typeof h=="function"&&h.prototype||vo;return r===v}function Kd(r){return r===r&&!wn(r)}function Qd(r,h){return function(v){return v==null?!1:v[r]===h&&(h!==s||r in Ee(v))}}function r0(r){var h=Zu(r,function(O){return v.size===S&&v.clear(),O}),v=h.cache;return h}function o0(r,h){var v=r[1],O=h[1],Y=v|O,ut=Y<(L|T|X),yt=O==X&&v==R||O==X&&v==K&&r[7].length<=h[8]||O==(X|K)&&h[7].length<=h[8]&&v==R;if(!(ut||yt))return r;O&L&&(r[2]=h[2],Y|=v&L?0:M);var bt=h[3];if(bt){var Bt=r[3];r[3]=Bt?Qh(Bt,bt,h[4]):bt,r[4]=Bt?Dr(r[3],b):h[4]}return bt=h[5],bt&&(Bt=r[5],r[5]=Bt?tu(Bt,bt,h[6]):bt,r[6]=Bt?Dr(r[5],b):h[6]),bt=h[7],bt&&(r[7]=bt),O&X&&(r[8]=r[8]==null?h[8]:Vn(r[8],h[8])),r[9]==null&&(r[9]=h[9]),r[0]=h[0],r[1]=Y,r}function s0(r){var h=[];if(r!=null)for(var v in Ee(r))h.push(v);return h}function a0(r){return cr.call(r)}function tp(r,h,v){return h=vn(h===s?r.length-1:h,0),function(){for(var O=arguments,Y=-1,ut=vn(O.length-h,0),yt=Zt(ut);++Y<ut;)yt[Y]=O[h+Y];Y=-1;for(var bt=Zt(h+1);++Y<h;)bt[Y]=O[Y];return bt[h]=v(yt),yr(r,this,bt)}}function ep(r,h){return h.length<2?r:ls(r,Vi(h,0,-1))}function l0(r,h){for(var v=r.length,O=Vn(h.length,v),Y=er(r);O--;){var ut=h[O];r[O]=Ws(ut,v)?Y[ut]:s}return r}function of(r,h){if(!(h==="constructor"&&typeof r[h]=="function")&&h!="__proto__")return r[h]}var ip=rp(Cn),ru=Nh||function(r,h){return gn.setTimeout(r,h)},sf=rp(_n);function np(r,h,v){var O=h+"";return sf(r,Qg(O,h0(Jg(O),v)))}function rp(r){var h=0,v=0;return function(){var O=fl(),Y=_t-(O-v);if(v=O,Y>0){if(++h>=et)return arguments[0]}else h=0;return r.apply(s,arguments)}}function ju(r,h){var v=-1,O=r.length,Y=O-1;for(h=h===s?O:h;++v<h;){var ut=me(v,Y),yt=r[ut];r[ut]=r[v],r[v]=yt}return r.length=h,r}var op=r0(function(r){var h=[];return r.charCodeAt(0)===46&&h.push(""),r.replace(ra,function(v,O,Y,ut){h.push(Y?ut.replace(aa,"$1"):O||v)}),h});function us(r){if(typeof r=="string"||to(r))return r;var h=r+"";return h=="0"&&1/r==-At?"-0":h}function Al(r){if(r!=null){try{return hr.call(r)}catch{}try{return r+""}catch{}}return""}function h0(r,h){return Ji(pe,function(v){var O="_."+v[0];h&v[1]&&!rl(r,O)&&r.push(O)}),r.sort()}function sp(r){if(r instanceof _i)return r.clone();var h=new qn(r.__wrapped__,r.__chain__);return h.__actions__=er(r.__actions__),h.__index__=r.__index__,h.__values__=r.__values__,h}function u0(r,h,v){(v?Mr(r,h,v):h===s)?h=1:h=vn(wi(h),0);var O=r==null?0:r.length;if(!O||h<1)return[];for(var Y=0,ut=0,yt=Zt(Do(O/h));Y<O;)yt[ut++]=Vi(r,Y,Y+=h);return yt}function c0(r){for(var h=-1,v=r==null?0:r.length,O=0,Y=[];++h<v;){var ut=r[h];ut&&(Y[O++]=ut)}return Y}function f0(){var r=arguments.length;if(!r)return[];for(var h=Zt(r-1),v=arguments[0],O=r;O--;)h[O-1]=arguments[O];return fo(vi(v)?er(v):[v],bn(h,1))}var d0=ae(function(r,h){return Dn(r)?Ml(r,bn(h,1,Dn,!0)):[]}),p0=ae(function(r,h){var v=bo(h);return Dn(v)&&(v=s),Dn(r)?Ml(r,bn(h,1,Dn,!0),si(v,2)):[]}),m0=ae(function(r,h){var v=bo(h);return Dn(v)&&(v=s),Dn(r)?Ml(r,bn(h,1,Dn,!0),s,v):[]});function g0(r,h,v){var O=r==null?0:r.length;return O?(h=v||h===s?1:wi(h),Vi(r,h<0?0:h,O)):[]}function v0(r,h,v){var O=r==null?0:r.length;return O?(h=v||h===s?1:wi(h),h=O-h,Vi(r,0,h<0?0:h)):[]}function y0(r,h){return r&&r.length?Xe(r,si(h,3),!0,!0):[]}function _0(r,h){return r&&r.length?Xe(r,si(h,3),!0):[]}function x0(r,h,v,O){var Y=r==null?0:r.length;return Y?(v&&typeof v!="number"&&Mr(r,h,v)&&(v=0,O=Y),tr(r,h,v,O)):[]}function ap(r,h,v){var O=r==null?0:r.length;if(!O)return-1;var Y=v==null?0:wi(v);return Y<0&&(Y=vn(O+Y,0)),Jo(r,si(h,3),Y)}function lp(r,h,v){var O=r==null?0:r.length;if(!O)return-1;var Y=O-1;return v!==s&&(Y=wi(v),Y=v<0?vn(O+Y,0):Vn(Y,O-1)),Jo(r,si(h,3),Y,!0)}function hp(r){var h=r==null?0:r.length;return h?bn(r,1):[]}function w0(r){var h=r==null?0:r.length;return h?bn(r,At):[]}function T0(r,h){var v=r==null?0:r.length;return v?(h=h===s?1:wi(h),bn(r,h)):[]}function M0(r){for(var h=-1,v=r==null?0:r.length,O={};++h<v;){var Y=r[h];O[Y[0]]=Y[1]}return O}function up(r){return r&&r.length?r[0]:s}function S0(r,h,v){var O=r==null?0:r.length;if(!O)return-1;var Y=v==null?0:wi(v);return Y<0&&(Y=vn(O+Y,0)),Or(r,h,Y)}function E0(r){var h=r==null?0:r.length;return h?Vi(r,0,-1):[]}var b0=ae(function(r){var h=Yi(r,ne);return h.length&&h[0]===r[0]?El(h):[]}),C0=ae(function(r){var h=bo(r),v=Yi(r,ne);return h===bo(v)?h=s:v.pop(),v.length&&v[0]===r[0]?El(v,si(h,2)):[]}),A0=ae(function(r){var h=bo(r),v=Yi(r,ne);return h=typeof h=="function"?h:s,h&&v.pop(),v.length&&v[0]===r[0]?El(v,s,h):[]});function P0(r,h){return r==null?"":Uh.call(r,h)}function bo(r){var h=r==null?0:r.length;return h?r[h-1]:s}function L0(r,h,v){var O=r==null?0:r.length;if(!O)return-1;var Y=O;return v!==s&&(Y=wi(v),Y=Y<0?vn(O+Y,0):Vn(Y,O-1)),h===h?Ql(r,h,Y):Jo(r,Ss,Y,!0)}function R0(r,h){return r&&r.length?J(r,wi(h)):s}var O0=ae(cp);function cp(r,h){return r&&r.length&&h&&h.length?Yt(r,h):r}function I0(r,h,v){return r&&r.length&&h&&h.length?Yt(r,h,si(v,2)):r}function D0(r,h,v){return r&&r.length&&h&&h.length?Yt(r,h,s,v):r}var z0=Vs(function(r,h){var v=r==null?0:r.length,O=Jh(r,h);return Te(r,Yi(h,function(Y){return Ws(Y,v)?+Y:Y}).sort(Hs)),O});function k0(r,h){var v=[];if(!(r&&r.length))return v;var O=-1,Y=[],ut=r.length;for(h=si(h,3);++O<ut;){var yt=r[O];h(yt,O,r)&&(v.push(yt),Y.push(O))}return Te(r,Y),v}function af(r){return r==null?r:Ma.call(r)}function B0(r,h,v){var O=r==null?0:r.length;return O?(v&&typeof v!="number"&&Mr(r,h,v)?(h=0,v=O):(h=h==null?0:wi(h),v=v===s?O:wi(v)),Vi(r,h,v)):[]}function N0(r,h){return An(r,h)}function F0(r,h,v){return Ce(r,h,si(v,2))}function U0(r,h){var v=r==null?0:r.length;if(v){var O=An(r,h);if(O<v&&Uo(r[O],h))return O}return-1}function G0(r,h){return An(r,h,!0)}function H0(r,h,v){return Ce(r,h,si(v,2),!0)}function V0(r,h){var v=r==null?0:r.length;if(v){var O=An(r,h,!0)-1;if(Uo(r[O],h))return O}return-1}function W0(r){return r&&r.length?ti(r):[]}function j0(r,h){return r&&r.length?ti(r,si(h,2)):[]}function X0(r){var h=r==null?0:r.length;return h?Vi(r,1,h):[]}function q0(r,h,v){return r&&r.length?(h=v||h===s?1:wi(h),Vi(r,0,h<0?0:h)):[]}function Y0(r,h,v){var O=r==null?0:r.length;return O?(h=v||h===s?1:wi(h),h=O-h,Vi(r,h<0?0:h,O)):[]}function Z0(r,h){return r&&r.length?Xe(r,si(h,3),!1,!0):[]}function J0(r,h){return r&&r.length?Xe(r,si(h,3)):[]}var $0=ae(function(r){return ei(bn(r,1,Dn,!0))}),K0=ae(function(r){var h=bo(r);return Dn(h)&&(h=s),ei(bn(r,1,Dn,!0),si(h,2))}),Q0=ae(function(r){var h=bo(r);return h=typeof h=="function"?h:s,ei(bn(r,1,Dn,!0),s,h)});function tv(r){return r&&r.length?ei(r):[]}function ev(r,h){return r&&r.length?ei(r,si(h,2)):[]}function iv(r,h){return h=typeof h=="function"?h:s,r&&r.length?ei(r,s,h):[]}function lf(r){if(!(r&&r.length))return[];var h=0;return r=Rr(r,function(v){if(Dn(v))return h=vn(v.length,h),!0}),Ro(h,function(v){return Yi(r,$o(v))})}function fp(r,h){if(!(r&&r.length))return[];var v=lf(r);return h==null?v:Yi(v,function(O){return yr(h,s,O)})}var nv=ae(function(r,h){return Dn(r)?Ml(r,h):[]}),rv=ae(function(r){return Li(Rr(r,Dn))}),ov=ae(function(r){var h=bo(r);return Dn(h)&&(h=s),Li(Rr(r,Dn),si(h,2))}),sv=ae(function(r){var h=bo(r);return h=typeof h=="function"?h:s,Li(Rr(r,Dn),s,h)}),av=ae(lf);function lv(r,h){return Ai(r||[],h||[],La)}function hv(r,h){return Ai(r||[],h||[],fi)}var uv=ae(function(r){var h=r.length,v=h>1?r[h-1]:s;return v=typeof v=="function"?(r.pop(),v):s,fp(r,v)});function dp(r){var h=it(r);return h.__chain__=!0,h}function cv(r,h){return h(r),r}function Xu(r,h){return h(r)}var fv=Vs(function(r){var h=r.length,v=h?r[0]:0,O=this.__wrapped__,Y=function(ut){return Jh(ut,r)};return h>1||this.__actions__.length||!(O instanceof _i)||!Ws(v)?this.thru(Y):(O=O.slice(v,+v+(h?1:0)),O.__actions__.push({func:Xu,args:[Y],thisArg:s}),new qn(O,this.__chain__).thru(function(ut){return h&&!ut.length&&ut.push(s),ut}))});function dv(){return dp(this)}function pv(){return new qn(this.value(),this.__chain__)}function mv(){this.__values__===s&&(this.__values__=Cp(this.value()));var r=this.__index__>=this.__values__.length,h=r?s:this.__values__[this.__index__++];return{done:r,value:h}}function gv(){return this}function vv(r){for(var h,v=this;v instanceof Ea;){var O=sp(v);O.__index__=0,O.__values__=s,h?Y.__wrapped__=O:h=O;var Y=O;v=v.__wrapped__}return Y.__wrapped__=r,h}function yv(){var r=this.__wrapped__;if(r instanceof _i){var h=r;return this.__actions__.length&&(h=new _i(this)),h=h.reverse(),h.__actions__.push({func:Xu,args:[af],thisArg:s}),new qn(h,this.__chain__)}return this.thru(af)}function _v(){return ri(this.__wrapped__,this.__actions__)}var xv=Da(function(r,h,v){Ti.call(r,v)?++r[v]:Bo(r,v,1)});function wv(r,h,v){var O=vi(r)?Bh:Yn;return v&&Mr(r,h,v)&&(h=s),O(r,si(h,3))}function Tv(r,h){var v=vi(r)?Rr:Br;return v(r,si(h,3))}var Mv=Ke(ap),Sv=Ke(lp);function Ev(r,h){return bn(qu(r,h),1)}function bv(r,h){return bn(qu(r,h),At)}function Cv(r,h,v){return v=v===s?1:wi(v),bn(qu(r,h),v)}function pp(r,h){var v=vi(r)?Ji:yn;return v(r,si(h,3))}function mp(r,h){var v=vi(r)?Ts:Fu;return v(r,si(h,3))}var Av=Da(function(r,h,v){Ti.call(r,v)?r[v].push(h):Bo(r,v,[h])});function Pv(r,h,v,O){r=Fr(r)?r:gh(r),v=v&&!O?wi(v):0;var Y=r.length;return v<0&&(v=vn(Y+v,0)),Ku(r)?v<=Y&&r.indexOf(h,v)>-1:!!Y&&Or(r,h,v)>-1}var Lv=ae(function(r,h,v){var O=-1,Y=typeof h=="function",ut=Fr(r)?Zt(r.length):[];return yn(r,function(yt){ut[++O]=Y?yr(h,yt,v):e(yt,h,v)}),ut}),Rv=Da(function(r,h,v){Bo(r,v,h)});function qu(r,h){var v=vi(r)?Yi:xt;return v(r,si(h,3))}function Ov(r,h,v,O){return r==null?[]:(vi(h)||(h=h==null?[]:[h]),v=O?s:v,vi(v)||(v=v==null?[]:[v]),ot(r,h,v))}var Iv=Da(function(r,h,v){r[v?0:1].push(h)},function(){return[[],[]]});function Dv(r,h,v){var O=vi(r)?$l:Ko,Y=arguments.length<3;return O(r,si(h,4),v,Y,yn)}function zv(r,h,v){var O=vi(r)?bu:Ko,Y=arguments.length<3;return O(r,si(h,4),v,Y,Fu)}function kv(r,h){var v=vi(r)?Rr:Br;return v(r,Ju(si(h,3)))}function Bv(r){var h=vi(r)?qh:We;return h(r)}function Nv(r,h,v){(v?Mr(r,h,v):h===s)?h=1:h=wi(h);var O=vi(r)?Jc:Qe;return O(r,h)}function Fv(r){var h=vi(r)?ku:qi;return h(r)}function Uv(r){if(r==null)return 0;if(Fr(r))return Ku(r)?$r(r):r.length;var h=mr(r);return h==W||h==Kt?r.size:q(r).length}function Gv(r,h,v){var O=vi(r)?Po:on;return v&&Mr(r,h,v)&&(h=s),O(r,si(h,3))}var Hv=ae(function(r,h){if(r==null)return[];var v=h.length;return v>1&&Mr(r,h[0],h[1])?h=[]:v>2&&Mr(h[0],h[1],h[2])&&(h=[h[0]]),ot(r,bn(h,1),[])}),Yu=ih||function(){return gn.Date.now()};function Vv(r,h){if(typeof h!="function")throw new lr(m);return r=wi(r),function(){if(--r<1)return h.apply(this,arguments)}}function gp(r,h,v){return h=v?s:h,h=r&&h==null?r.length:h,ir(r,X,s,s,s,s,h)}function vp(r,h){var v;if(typeof h!="function")throw new lr(m);return r=wi(r),function(){return--r>0&&(v=h.apply(this,arguments)),r<=1&&(h=s),v}}var hf=ae(function(r,h,v){var O=L;if(v.length){var Y=Dr(v,ph(hf));O|=U}return ir(r,O,h,v,Y)}),yp=ae(function(r,h,v){var O=L|T;if(v.length){var Y=Dr(v,ph(yp));O|=U}return ir(h,O,r,v,Y)});function _p(r,h,v){h=v?s:h;var O=ir(r,R,s,s,s,s,s,h);return O.placeholder=_p.placeholder,O}function xp(r,h,v){h=v?s:h;var O=ir(r,C,s,s,s,s,s,h);return O.placeholder=xp.placeholder,O}function wp(r,h,v){var O,Y,ut,yt,bt,Bt,oe=0,le=!1,de=!1,ke=!0;if(typeof r!="function")throw new lr(m);h=Co(h)||0,wn(v)&&(le=!!v.leading,de="maxWait"in v,ut=de?vn(Co(v.maxWait)||0,h):ut,ke="trailing"in v?!!v.trailing:ke);function Je(zn){var Go=O,qs=Y;return O=Y=s,oe=zn,yt=r.apply(qs,Go),yt}function hi(zn){return oe=zn,bt=ru(Ri,h),le?Je(zn):yt}function Mi(zn){var Go=zn-Bt,qs=zn-oe,Up=h-Go;return de?Vn(Up,ut-qs):Up}function ui(zn){var Go=zn-Bt,qs=zn-oe;return Bt===s||Go>=h||Go<0||de&&qs>=ut}function Ri(){var zn=Yu();if(ui(zn))return Ui(zn);bt=ru(Ri,Mi(zn))}function Ui(zn){return bt=s,ke&&O?Je(zn):(O=Y=s,yt)}function eo(){bt!==s&&Pn(bt),oe=0,O=Bt=Y=bt=s}function Sr(){return bt===s?yt:Ui(Yu())}function io(){var zn=Yu(),Go=ui(zn);if(O=arguments,Y=this,Bt=zn,Go){if(bt===s)return hi(Bt);if(de)return Pn(bt),bt=ru(Ri,h),Je(Bt)}return bt===s&&(bt=ru(Ri,h)),yt}return io.cancel=eo,io.flush=Sr,io}var Wv=ae(function(r,h){return To(r,1,h)}),jv=ae(function(r,h,v){return To(r,Co(h)||0,v)});function Xv(r){return ir(r,Z)}function Zu(r,h){if(typeof r!="function"||h!=null&&typeof h!="function")throw new lr(m);var v=function(){var O=arguments,Y=h?h.apply(this,O):O[0],ut=v.cache;if(ut.has(Y))return ut.get(Y);var yt=r.apply(this,O);return v.cache=ut.set(Y,yt)||ut,yt};return v.cache=new(Zu.Cache||xr),v}Zu.Cache=xr;function Ju(r){if(typeof r!="function")throw new lr(m);return function(){var h=arguments;switch(h.length){case 0:return!r.call(this);case 1:return!r.call(this,h[0]);case 2:return!r.call(this,h[0],h[1]);case 3:return!r.call(this,h[0],h[1],h[2])}return!r.apply(this,h)}}function qv(r){return vp(2,r)}var Yv=li(function(r,h){h=h.length==1&&vi(h[0])?Yi(h[0],Gn(si())):Yi(bn(h,1),Gn(si()));var v=h.length;return ae(function(O){for(var Y=-1,ut=Vn(O.length,v);++Y<ut;)O[Y]=h[Y].call(this,O[Y]);return yr(r,this,O)})}),uf=ae(function(r,h){var v=Dr(h,ph(uf));return ir(r,U,s,h,v)}),Tp=ae(function(r,h){var v=Dr(h,ph(Tp));return ir(r,N,s,h,v)}),Zv=Vs(function(r,h){return ir(r,K,s,s,s,h)});function Jv(r,h){if(typeof r!="function")throw new lr(m);return h=h===s?h:wi(h),ae(r,h)}function $v(r,h){if(typeof r!="function")throw new lr(m);return h=h==null?0:vn(wi(h),0),ae(function(v){var O=v[h],Y=xn(v,0,h);return O&&fo(Y,O),yr(r,this,Y)})}function Kv(r,h,v){var O=!0,Y=!0;if(typeof r!="function")throw new lr(m);return wn(v)&&(O="leading"in v?!!v.leading:O,Y="trailing"in v?!!v.trailing:Y),wp(r,h,{leading:O,maxWait:h,trailing:Y})}function Qv(r){return gp(r,1)}function ty(r,h){return uf(ii(h),r)}function ey(){if(!arguments.length)return[];var r=arguments[0];return vi(r)?r:[r]}function iy(r){return wr(r,D)}function ny(r,h){return h=typeof h=="function"?h:s,wr(r,D,h)}function ry(r){return wr(r,I|D)}function oy(r,h){return h=typeof h=="function"?h:s,wr(r,I|D,h)}function sy(r,h){return h==null||Nu(r,h,Jn(h))}function Uo(r,h){return r===h||r!==r&&h!==h}var ay=Eo(uh),ly=Eo(function(r,h){return r>=h}),Pl=i(function(){return arguments}())?i:function(r){return Ln(r)&&Ti.call(r,"callee")&&!ul.call(r,"callee")},vi=Zt.isArray,hy=kh?Gn(kh):n;function Fr(r){return r!=null&&$u(r.length)&&!js(r)}function Dn(r){return Ln(r)&&Fr(r)}function uy(r){return r===!0||r===!1||Ln(r)&&Zn(r)==Oe}var ka=Fh||wf,cy=ma?Gn(ma):o;function fy(r){return Ln(r)&&r.nodeType===1&&!ou(r)}function dy(r){if(r==null)return!0;if(Fr(r)&&(vi(r)||typeof r=="string"||typeof r.splice=="function"||ka(r)||mh(r)||Pl(r)))return!r.length;var h=mr(r);if(h==W||h==Kt)return!r.size;if(nu(r))return!q(r).length;for(var v in r)if(Ti.call(r,v))return!1;return!0}function py(r,h){return l(r,h)}function my(r,h,v){v=typeof v=="function"?v:s;var O=v?v(r,h):s;return O===s?l(r,h,s,v):!!O}function cf(r){if(!Ln(r))return!1;var h=Zn(r);return h==Di||h==pi||typeof r.message=="string"&&typeof r.name=="string"&&!ou(r)}function gy(r){return typeof r=="number"&&nh(r)}function js(r){if(!wn(r))return!1;var h=Zn(r);return h==mn||h==Qi||h==Si||h==Dt}function Mp(r){return typeof r=="number"&&r==wi(r)}function $u(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ce}function wn(r){var h=typeof r;return r!=null&&(h=="object"||h=="function")}function Ln(r){return r!=null&&typeof r=="object"}var Sp=ga?Gn(ga):p;function vy(r,h){return r===h||y(r,h,tf(h))}function yy(r,h,v){return v=typeof v=="function"?v:s,y(r,h,tf(h),v)}function _y(r){return Ep(r)&&r!=+r}function xy(r){if(n0(r))throw new ai(u);return w(r)}function wy(r){return r===null}function Ty(r){return r==null}function Ep(r){return typeof r=="number"||Ln(r)&&Zn(r)==Jt}function ou(r){if(!Ln(r)||Zn(r)!=dt)return!1;var h=_o(r);if(h===null)return!0;var v=Ti.call(h,"constructor")&&h.constructor;return typeof v=="function"&&v instanceof v&&hr.call(v)==yo}var ff=Su?Gn(Su):A;function My(r){return Mp(r)&&r>=-ce&&r<=ce}var bp=Eu?Gn(Eu):P;function Ku(r){return typeof r=="string"||!vi(r)&&Ln(r)&&Zn(r)==z}function to(r){return typeof r=="symbol"||Ln(r)&&Zn(r)==Q}var mh=Yl?Gn(Yl):B;function Sy(r){return r===s}function Ey(r){return Ln(r)&&mr(r)==nt}function by(r){return Ln(r)&&Zn(r)==vt}var Cy=Eo(rt),Ay=Eo(function(r,h){return r<=h});function Cp(r){if(!r)return[];if(Fr(r))return Ku(r)?ar(r):er(r);if(ns&&r[ns])return Rs(r[ns]());var h=mr(r),v=h==W?$n:h==Kt?Os:gh;return v(r)}function Xs(r){if(!r)return r===0?r:0;if(r=Co(r),r===At||r===-At){var h=r<0?-1:1;return h*re}return r===r?r:0}function wi(r){var h=Xs(r),v=h%1;return h===h?v?h-v:h:0}function Ap(r){return r?as(wi(r),0,It):0}function Co(r){if(typeof r=="number")return r;if(to(r))return Ft;if(wn(r)){var h=typeof r.valueOf=="function"?r.valueOf():r;r=wn(h)?h+"":h}if(typeof r!="string")return r===0?r:+r;r=ya(r);var v=Dh.test(r);return v||ys.test(r)?fa(r.slice(2),v?2:8):Ih.test(r)?Ft:+r}function Pp(r){return In(r,Ur(r))}function Py(r){return r?as(wi(r),-ce,ce):r===0?r:0}function Zi(r){return r==null?"":Ye(r)}var Ly=Fo(function(r,h){if(nu(h)||Fr(h)){In(h,Jn(h),r);return}for(var v in h)Ti.call(h,v)&&La(r,v,h[v])}),Lp=Fo(function(r,h){In(h,Ur(h),r)}),Qu=Fo(function(r,h,v,O){In(h,Ur(h),r,O)}),Ry=Fo(function(r,h,v,O){In(h,Jn(h),r,O)}),Oy=Vs(Jh);function Iy(r,h){var v=os(r);return h==null?v:Yh(v,h)}var Dy=ae(function(r,h){r=Ee(r);var v=-1,O=h.length,Y=O>2?h[2]:s;for(Y&&Mr(h[0],h[1],Y)&&(O=1);++v<O;)for(var ut=h[v],yt=Ur(ut),bt=-1,Bt=yt.length;++bt<Bt;){var oe=yt[bt],le=r[oe];(le===s||Uo(le,vo[oe])&&!Ti.call(r,oe))&&(r[oe]=ut[oe])}return r}),zy=ae(function(r){return r.push(s,qd),yr(Rp,s,r)});function ky(r,h){return Ms(r,si(h,3),Nr)}function By(r,h){return Ms(r,si(h,3),hh)}function Ny(r,h){return r==null?r:Sl(r,si(h,3),Ur)}function Fy(r,h){return r==null?r:lh(r,si(h,3),Ur)}function Uy(r,h){return r&&Nr(r,si(h,3))}function Gy(r,h){return r&&hh(r,si(h,3))}function Hy(r){return r==null?[]:Us(r,Jn(r))}function Vy(r){return r==null?[]:Us(r,Ur(r))}function df(r,h,v){var O=r==null?s:ls(r,h);return O===s?v:O}function Wy(r,h){return r!=null&&Jd(r,h,ch)}function pf(r,h){return r!=null&&Jd(r,h,$h)}var jy=ve(function(r,h,v){h!=null&&typeof h.toString!="function"&&(h=cr.call(h)),r[h]=v},gf(Gr)),Xy=ve(function(r,h,v){h!=null&&typeof h.toString!="function"&&(h=cr.call(h)),Ti.call(r,h)?r[h].push(v):r[h]=[v]},si),qy=ae(e);function Jn(r){return Fr(r)?zu(r):q(r)}function Ur(r){return Fr(r)?zu(r,!0):$(r)}function Yy(r,h){var v={};return h=si(h,3),Nr(r,function(O,Y,ut){Bo(v,h(O,Y,ut),O)}),v}function Zy(r,h){var v={};return h=si(h,3),Nr(r,function(O,Y,ut){Bo(v,Y,h(O,Y,ut))}),v}var Jy=Fo(function(r,h,v){wt(r,h,v)}),Rp=Fo(function(r,h,v,O){wt(r,h,v,O)}),$y=Vs(function(r,h){var v={};if(r==null)return v;var O=!1;h=Yi(h,function(ut){return ut=Ze(ut,r),O||(O=ut.length>1),ut}),In(r,Kc(r),v),O&&(v=wr(v,I|k|D,jg));for(var Y=h.length;Y--;)Wi(v,h[Y]);return v});function Ky(r,h){return Op(r,Ju(si(h)))}var Qy=Vs(function(r,h){return r==null?{}:zt(r,h)});function Op(r,h){if(r==null)return{};var v=Yi(Kc(r),function(O){return[O]});return h=si(h),ee(r,v,function(O,Y){return h(O,Y[0])})}function t_(r,h,v){h=Ze(h,r);var O=-1,Y=h.length;for(Y||(Y=1,r=s);++O<Y;){var ut=r==null?s:r[us(h[O])];ut===s&&(O=Y,ut=v),r=js(ut)?ut.call(r):ut}return r}function e_(r,h,v){return r==null?r:fi(r,h,v)}function i_(r,h,v,O){return O=typeof O=="function"?O:s,r==null?r:fi(r,h,v,O)}var Ip=Hu(Jn),Dp=Hu(Ur);function n_(r,h,v){var O=vi(r),Y=O||ka(r)||mh(r);if(h=si(h,4),v==null){var ut=r&&r.constructor;Y?v=O?new ut:[]:wn(r)?v=js(ut)?os(_o(r)):{}:v={}}return(Y?Ji:Nr)(r,function(yt,bt,Bt){return h(v,yt,bt,Bt)}),v}function r_(r,h){return r==null?!0:Wi(r,h)}function o_(r,h,v){return r==null?r:Ae(r,h,ii(v))}function s_(r,h,v,O){return O=typeof O=="function"?O:s,r==null?r:Ae(r,h,ii(v),O)}function gh(r){return r==null?[]:Es(r,Jn(r))}function a_(r){return r==null?[]:Es(r,Ur(r))}function l_(r,h,v){return v===s&&(v=h,h=s),v!==s&&(v=Co(v),v=v===v?v:0),h!==s&&(h=Co(h),h=h===h?h:0),as(Co(r),h,v)}function h_(r,h,v){return h=Xs(h),v===s?(v=h,h=0):v=Xs(v),r=Co(r),fh(r,h,v)}function u_(r,h,v){if(v&&typeof v!="boolean"&&Mr(r,h,v)&&(h=v=s),v===s&&(typeof h=="boolean"?(v=h,h=s):typeof r=="boolean"&&(v=r,r=s)),r===s&&h===s?(r=0,h=1):(r=Xs(r),h===s?(h=r,r=0):h=Xs(h)),r>h){var O=r;r=h,h=O}if(v||r%1||h%1){var Y=rh();return Vn(r+Y*(h-r+nl("1e-"+((Y+"").length-1))),h)}return me(r,h)}var c_=ze(function(r,h,v){return h=h.toLowerCase(),r+(v?zp(h):h)});function zp(r){return mf(Zi(r).toLowerCase())}function kp(r){return r=Zi(r),r&&r.replace(ql,Cs).replace(zh,"")}function f_(r,h,v){r=Zi(r),h=Ye(h);var O=r.length;v=v===s?O:as(wi(v),0,O);var Y=v;return v-=h.length,v>=0&&r.slice(v,Y)==h}function d_(r){return r=Zi(r),r&&ao.test(r)?r.replace(zi,Jr):r}function p_(r){return r=Zi(r),r&&Wl.test(r)?r.replace(Za,"\\$&"):r}var m_=ze(function(r,h,v){return r+(v?"-":"")+h.toLowerCase()}),g_=ze(function(r,h,v){return r+(v?" ":"")+h.toLowerCase()}),v_=Me("toLowerCase");function y_(r,h,v){r=Zi(r),h=wi(h);var O=h?$r(r):0;if(!h||O>=h)return r;var Y=(h-O)/2;return an(zs(Y),v)+r+an(Do(Y),v)}function __(r,h,v){r=Zi(r),h=wi(h);var O=h?$r(r):0;return h&&O<h?r+an(h-O,v):r}function x_(r,h,v){r=Zi(r),h=wi(h);var O=h?$r(r):0;return h&&O<h?an(h-O,v)+r:r}function w_(r,h,v){return v||h==null?h=0:h&&(h=+h),Gh(Zi(r).replace(lo,""),h||0)}function T_(r,h,v){return(v?Mr(r,h,v):h===s)?h=1:h=wi(h),be(Zi(r),h)}function M_(){var r=arguments,h=Zi(r[0]);return r.length<3?h:h.replace(r[1],r[2])}var S_=ze(function(r,h,v){return r+(v?"_":"")+h.toLowerCase()});function E_(r,h,v){return v&&typeof v!="number"&&Mr(r,h,v)&&(h=v=s),v=v===s?It:v>>>0,v?(r=Zi(r),r&&(typeof h=="string"||h!=null&&!ff(h))&&(h=Ye(h),!h&&Ir(r))?xn(ar(r),0,v):r.split(h,v)):[]}var b_=ze(function(r,h,v){return r+(v?" ":"")+mf(h)});function C_(r,h,v){return r=Zi(r),v=v==null?0:as(wi(v),0,r.length),h=Ye(h),r.slice(v,v+h.length)==h}function A_(r,h,v){var O=it.templateSettings;v&&Mr(r,h,v)&&(h=s),r=Zi(r),h=Qu({},h,O,Xd);var Y=Qu({},h.imports,O.imports,Xd),ut=Jn(Y),yt=Es(Y,ut),bt,Bt,oe=0,le=h.interpolate||Yr,de="__p += '",ke=Kn((h.escape||Yr).source+"|"+le.source+"|"+(le===na?uo:Yr).source+"|"+(h.evaluate||Yr).source+"|$","g"),Je="//# sourceURL="+(Ti.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ua+"]")+`
2620
2620
  `;r.replace(ke,function(ui,Ri,Ui,eo,Sr,io){return Ui||(Ui=eo),de+=r.slice(oe,io).replace(V,As),Ri&&(bt=!0,de+=`' +
2621
2621
  __e(`+Ri+`) +
2622
2622
  '`),Sr&&(Bt=!0,de+=`';
@@ -2633,7 +2633,7 @@ __p += '`),Ui&&(de+=`' +
2633
2633
  function print() { __p += __j.call(arguments, '') }
2634
2634
  `:`;
2635
2635
  `)+de+`return __p
2636
- }`;var Mi=Np(function(){return Fi(ut,Je+"return "+de).apply(s,yt)});if(Mi.source=de,cf(Mi))throw Mi;return Mi}function P_(r){return Zi(r).toLowerCase()}function L_(r){return Zi(r).toUpperCase()}function R_(r,h,v){if(r=Zi(r),r&&(v||h===s))return ya(r);if(!r||!(h=Ye(h)))return r;var I=ar(r),Y=ar(h),ut=ts(I,Y),yt=bs(I,Y)+1;return xn(I,ut,yt).join("")}function O_(r,h,v){if(r=Zi(r),r&&(v||h===s))return r.slice(0,_a(r)+1);if(!r||!(h=Ye(h)))return r;var I=ar(r),Y=bs(I,ar(h))+1;return xn(I,0,Y).join("")}function I_(r,h,v){if(r=Zi(r),r&&(v||h===s))return r.replace(lo,"");if(!r||!(h=Ye(h)))return r;var I=ar(r),Y=ts(I,ar(h));return xn(I,Y).join("")}function D_(r,h){var v=ct,I=Rt;if(wn(h)){var Y="separator"in h?h.separator:Y;v="length"in h?wi(h.length):v,I="omission"in h?Ye(h.omission):I}r=Zi(r);var ut=r.length;if(Ir(r)){var yt=ar(r);ut=yt.length}if(v>=ut)return r;var bt=v-$r(I);if(bt<1)return I;var Bt=yt?xn(yt,0,bt).join(""):r.slice(0,bt);if(Y===s)return Bt+I;if(yt&&(bt+=Bt.length-bt),ff(Y)){if(r.slice(bt).search(Y)){var oe,le=Bt;for(Y.global||(Y=Kn(Y.source,Zi(jl.exec(Y))+"g")),Y.lastIndex=0;oe=Y.exec(le);)var de=oe.index;Bt=Bt.slice(0,de===s?bt:de)}}else if(r.indexOf(Ye(Y),bt)!=bt){var ke=Bt.lastIndexOf(Y);ke>-1&&(Bt=Bt.slice(0,ke))}return Bt+I}function z_(r){return r=Zi(r),r&&qo.test(r)?r.replace(Ao,th):r}var k_=ze(function(r,h,v){return r+(v?" ":"")+h.toUpperCase()}),mf=Me("toUpperCase");function Bp(r,h,v){return r=Zi(r),h=v?s:h,h===s?Ls(r)?jc(r):rl(r):r.match(h)||[]}var Np=ae(function(r,h){try{return yr(r,s,h)}catch(v){return cf(v)?v:new ai(v)}}),B_=Vs(function(r,h){return Ji(h,function(v){v=us(v),Bo(r,v,hf(r[v],r))}),r});function N_(r){var h=r==null?0:r.length,v=si();return r=h?Yi(r,function(I){if(typeof I[1]!="function")throw new lr(m);return[v(I[0]),I[1]]}):[],ae(function(I){for(var Y=-1;++Y<h;){var ut=r[Y];if(yr(ut[0],this,I))return yr(ut[1],this,I)}})}function F_(r){return Ra(wr(r,O))}function gf(r){return function(){return r}}function U_(r,h){return r==null||r!==r?h:r}var G_=Oi(),H_=Oi(!0);function Gr(r){return r}function vf(r){return H(typeof r=="function"?r:wr(r,O))}function V_(r){return gt(wr(r,O))}function W_(r,h){return Ct(r,wr(h,O))}var j_=ae(function(r,h){return function(v){return e(v,r,h)}}),X_=ae(function(r,h){return function(v){return e(r,v,h)}});function yf(r,h,v){var I=Jn(h),Y=Us(h,I);v==null&&!(wn(h)&&(Y.length||!I.length))&&(v=h,h=r,r=this,Y=Us(h,Jn(h)));var ut=!(wn(v)&&"chain"in v)||!!v.chain,yt=js(r);return Ji(Y,function(bt){var Bt=h[bt];r[bt]=Bt,yt&&(r.prototype[bt]=function(){var oe=this.__chain__;if(ut||oe){var le=r(this.__wrapped__),de=le.__actions__=er(this.__actions__);return de.push({func:Bt,args:arguments,thisArg:r}),le.__chain__=oe,le}return Bt.apply(r,fo([this.value()],arguments))})}),r}function q_(){return gn._===this&&(gn._=Kr),this}function _f(){}function Y_(r){return r=wi(r),ae(function(h){return J(h,r)})}var Z_=Nn(Yi),J_=Nn(Bh),$_=Nn(Po);function Fp(r){return nf(r)?$o(us(r)):$t(r)}function K_(r){return function(h){return r==null?s:ls(r,h)}}var Q_=eu(),t1=eu(!0);function xf(){return[]}function wf(){return!1}function e1(){return{}}function i1(){return""}function n1(){return!0}function r1(r,h){if(r=wi(r),r<1||r>ce)return[];var v=It,I=Vn(r,It);h=si(h),r-=It;for(var Y=Ro(I,h);++v<r;)h(v);return Y}function o1(r){return vi(r)?Yi(r,us):to(r)?[r]:er(op(Zi(r)))}function s1(r){var h=++ur;return Zi(r)+h}var a1=Tr(function(r,h){return r+h},0),l1=dh("ceil"),h1=Tr(function(r,h){return r/h},1),u1=dh("floor");function c1(r){return r&&r.length?Mo(r,Gr,uh):s}function f1(r,h){return r&&r.length?Mo(r,si(h,2),uh):s}function d1(r){return va(r,Gr)}function p1(r,h){return va(r,si(h,2))}function m1(r){return r&&r.length?Mo(r,Gr,rt):s}function g1(r,h){return r&&r.length?Mo(r,si(h,2),rt):s}var v1=Tr(function(r,h){return r*h},1),y1=dh("round"),_1=Tr(function(r,h){return r-h},0);function x1(r){return r&&r.length?Qo(r,Gr):0}function w1(r,h){return r&&r.length?Qo(r,si(h,2)):0}return it.after=Vv,it.ary=gp,it.assign=Ly,it.assignIn=Lp,it.assignInWith=Qu,it.assignWith=Ry,it.at=Oy,it.before=vp,it.bind=hf,it.bindAll=B_,it.bindKey=yp,it.castArray=ey,it.chain=dp,it.chunk=u0,it.compact=c0,it.concat=f0,it.cond=N_,it.conforms=F_,it.constant=gf,it.countBy=xv,it.create=Iy,it.curry=_p,it.curryRight=xp,it.debounce=wp,it.defaults=Dy,it.defaultsDeep=zy,it.defer=Wv,it.delay=jv,it.difference=d0,it.differenceBy=p0,it.differenceWith=m0,it.drop=g0,it.dropRight=v0,it.dropRightWhile=y0,it.dropWhile=_0,it.fill=x0,it.filter=Tv,it.flatMap=Ev,it.flatMapDeep=bv,it.flatMapDepth=Cv,it.flatten=hp,it.flattenDeep=w0,it.flattenDepth=T0,it.flip=Xv,it.flow=G_,it.flowRight=H_,it.fromPairs=M0,it.functions=Hy,it.functionsIn=Vy,it.groupBy=Av,it.initial=E0,it.intersection=b0,it.intersectionBy=C0,it.intersectionWith=A0,it.invert=jy,it.invertBy=Xy,it.invokeMap=Lv,it.iteratee=vf,it.keyBy=Rv,it.keys=Jn,it.keysIn=Ur,it.map=qu,it.mapKeys=Yy,it.mapValues=Zy,it.matches=V_,it.matchesProperty=W_,it.memoize=Zu,it.merge=Jy,it.mergeWith=Rp,it.method=j_,it.methodOf=X_,it.mixin=yf,it.negate=Ju,it.nthArg=Y_,it.omit=$y,it.omitBy=Ky,it.once=qv,it.orderBy=Ov,it.over=Z_,it.overArgs=Yv,it.overEvery=J_,it.overSome=$_,it.partial=uf,it.partialRight=Tp,it.partition=Iv,it.pick=Qy,it.pickBy=Op,it.property=Fp,it.propertyOf=K_,it.pull=O0,it.pullAll=cp,it.pullAllBy=I0,it.pullAllWith=D0,it.pullAt=z0,it.range=Q_,it.rangeRight=t1,it.rearg=Zv,it.reject=kv,it.remove=k0,it.rest=Jv,it.reverse=af,it.sampleSize=Nv,it.set=e_,it.setWith=i_,it.shuffle=Fv,it.slice=B0,it.sortBy=Hv,it.sortedUniq=W0,it.sortedUniqBy=j0,it.split=E_,it.spread=$v,it.tail=X0,it.take=q0,it.takeRight=Y0,it.takeRightWhile=Z0,it.takeWhile=J0,it.tap=cv,it.throttle=Kv,it.thru=Xu,it.toArray=Cp,it.toPairs=Ip,it.toPairsIn=Dp,it.toPath=o1,it.toPlainObject=Pp,it.transform=n_,it.unary=Qv,it.union=$0,it.unionBy=K0,it.unionWith=Q0,it.uniq=tv,it.uniqBy=ev,it.uniqWith=iv,it.unset=r_,it.unzip=lf,it.unzipWith=fp,it.update=o_,it.updateWith=s_,it.values=gh,it.valuesIn=a_,it.without=nv,it.words=Bp,it.wrap=ty,it.xor=rv,it.xorBy=ov,it.xorWith=sv,it.zip=av,it.zipObject=lv,it.zipObjectDeep=hv,it.zipWith=uv,it.entries=Ip,it.entriesIn=Dp,it.extend=Lp,it.extendWith=Qu,yf(it,it),it.add=a1,it.attempt=Np,it.camelCase=c_,it.capitalize=zp,it.ceil=l1,it.clamp=l_,it.clone=iy,it.cloneDeep=ry,it.cloneDeepWith=oy,it.cloneWith=ny,it.conformsTo=sy,it.deburr=kp,it.defaultTo=U_,it.divide=h1,it.endsWith=f_,it.eq=Uo,it.escape=d_,it.escapeRegExp=p_,it.every=wv,it.find=Mv,it.findIndex=ap,it.findKey=ky,it.findLast=Sv,it.findLastIndex=lp,it.findLastKey=By,it.floor=u1,it.forEach=pp,it.forEachRight=mp,it.forIn=Ny,it.forInRight=Fy,it.forOwn=Uy,it.forOwnRight=Gy,it.get=df,it.gt=ay,it.gte=ly,it.has=Wy,it.hasIn=pf,it.head=up,it.identity=Gr,it.includes=Pv,it.indexOf=S0,it.inRange=h_,it.invoke=qy,it.isArguments=Al,it.isArray=vi,it.isArrayBuffer=hy,it.isArrayLike=Fr,it.isArrayLikeObject=Dn,it.isBoolean=uy,it.isBuffer=ka,it.isDate=cy,it.isElement=fy,it.isEmpty=dy,it.isEqual=py,it.isEqualWith=my,it.isError=cf,it.isFinite=gy,it.isFunction=js,it.isInteger=Mp,it.isLength=$u,it.isMap=Sp,it.isMatch=vy,it.isMatchWith=yy,it.isNaN=_y,it.isNative=xy,it.isNil=Ty,it.isNull=wy,it.isNumber=Ep,it.isObject=wn,it.isObjectLike=Ln,it.isPlainObject=ou,it.isRegExp=ff,it.isSafeInteger=My,it.isSet=bp,it.isString=Ku,it.isSymbol=to,it.isTypedArray=mh,it.isUndefined=Sy,it.isWeakMap=Ey,it.isWeakSet=by,it.join=P0,it.kebabCase=m_,it.last=bo,it.lastIndexOf=L0,it.lowerCase=g_,it.lowerFirst=v_,it.lt=Cy,it.lte=Ay,it.max=c1,it.maxBy=f1,it.mean=d1,it.meanBy=p1,it.min=m1,it.minBy=g1,it.stubArray=xf,it.stubFalse=wf,it.stubObject=e1,it.stubString=i1,it.stubTrue=n1,it.multiply=v1,it.nth=R0,it.noConflict=q_,it.noop=_f,it.now=Yu,it.pad=y_,it.padEnd=__,it.padStart=x_,it.parseInt=w_,it.random=u_,it.reduce=Dv,it.reduceRight=zv,it.repeat=T_,it.replace=M_,it.result=t_,it.round=y1,it.runInContext=Lt,it.sample=Bv,it.size=Uv,it.snakeCase=S_,it.some=Gv,it.sortedIndex=N0,it.sortedIndexBy=F0,it.sortedIndexOf=U0,it.sortedLastIndex=G0,it.sortedLastIndexBy=H0,it.sortedLastIndexOf=V0,it.startCase=b_,it.startsWith=C_,it.subtract=_1,it.sum=x1,it.sumBy=w1,it.template=A_,it.times=r1,it.toFinite=Xs,it.toInteger=wi,it.toLength=Ap,it.toLower=P_,it.toNumber=Co,it.toSafeInteger=Py,it.toString=Zi,it.toUpper=L_,it.trim=R_,it.trimEnd=O_,it.trimStart=I_,it.truncate=D_,it.unescape=z_,it.uniqueId=s1,it.upperCase=k_,it.upperFirst=mf,it.each=pp,it.eachRight=mp,it.first=up,yf(it,function(){var r={};return Nr(it,function(h,v){Ti.call(it.prototype,v)||(r[v]=h)}),r}(),{chain:!1}),it.VERSION=c,Ji(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){it[r].placeholder=it}),Ji(["drop","take"],function(r,h){_i.prototype[r]=function(v){v=v===s?1:vn(wi(v),0);var I=this.__filtered__&&!h?new _i(this):this.clone();return I.__filtered__?I.__takeCount__=Vn(v,I.__takeCount__):I.__views__.push({size:Vn(v,It),type:r+(I.__dir__<0?"Right":"")}),I},_i.prototype[r+"Right"]=function(v){return this.reverse()[r](v).reverse()}}),Ji(["filter","map","takeWhile"],function(r,h){var v=h+1,I=v==G||v==Et;_i.prototype[r]=function(Y){var ut=this.clone();return ut.__iteratees__.push({iteratee:si(Y,3),type:v}),ut.__filtered__=ut.__filtered__||I,ut}}),Ji(["head","last"],function(r,h){var v="take"+(h?"Right":"");_i.prototype[r]=function(){return this[v](1).value()[0]}}),Ji(["initial","tail"],function(r,h){var v="drop"+(h?"":"Right");_i.prototype[r]=function(){return this.__filtered__?new _i(this):this[v](1)}}),_i.prototype.compact=function(){return this.filter(Gr)},_i.prototype.find=function(r){return this.filter(r).head()},_i.prototype.findLast=function(r){return this.reverse().find(r)},_i.prototype.invokeMap=ae(function(r,h){return typeof r=="function"?new _i(this):this.map(function(v){return e(v,r,h)})}),_i.prototype.reject=function(r){return this.filter(Ju(si(r)))},_i.prototype.slice=function(r,h){r=wi(r);var v=this;return v.__filtered__&&(r>0||h<0)?new _i(v):(r<0?v=v.takeRight(-r):r&&(v=v.drop(r)),h!==s&&(h=wi(h),v=h<0?v.dropRight(-h):v.take(h-r)),v)},_i.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},_i.prototype.toArray=function(){return this.take(It)},Nr(_i.prototype,function(r,h){var v=/^(?:filter|find|map|reject)|While$/.test(h),I=/^(?:head|last)$/.test(h),Y=it[I?"take"+(h=="last"?"Right":""):h],ut=I||/^find/.test(h);Y&&(it.prototype[h]=function(){var yt=this.__wrapped__,bt=I?[1]:arguments,Bt=yt instanceof _i,oe=bt[0],le=Bt||vi(yt),de=function(Ri){var Ui=Y.apply(it,fo([Ri],bt));return I&&ke?Ui[0]:Ui};le&&v&&typeof oe=="function"&&oe.length!=1&&(Bt=le=!1);var ke=this.__chain__,Je=!!this.__actions__.length,hi=ut&&!ke,Mi=Bt&&!Je;if(!ut&&le){yt=Mi?yt:new _i(this);var ui=r.apply(yt,bt);return ui.__actions__.push({func:Xu,args:[de],thisArg:s}),new qn(ui,ke)}return hi&&Mi?r.apply(this,bt):(ui=this.thru(de),hi?I?ui.value()[0]:ui.value():ui)})}),Ji(["pop","push","shift","sort","splice","unshift"],function(r){var h=On[r],v=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",I=/^(?:pop|shift)$/.test(r);it.prototype[r]=function(){var Y=arguments;if(I&&!this.__chain__){var ut=this.value();return h.apply(vi(ut)?ut:[],Y)}return this[v](function(yt){return h.apply(vi(yt)?yt:[],Y)})}}),Nr(_i.prototype,function(r,h){var v=it[h];if(v){var I=v.name+"";Ti.call(rs,I)||(rs[I]=[]),rs[I].push({name:h,func:v})}}),rs[$i(s,T).name]=[{name:"wrapper",func:s}],_i.prototype.clone=ba,_i.prototype.reverse=Ou,_i.prototype.value=Ca,it.prototype.at=fv,it.prototype.chain=dv,it.prototype.commit=pv,it.prototype.next=mv,it.prototype.plant=vv,it.prototype.reverse=yv,it.prototype.toJSON=it.prototype.valueOf=it.prototype.value=_v,it.prototype.first=it.prototype.head,ns&&(it.prototype[ns]=gv),it},es=Xc();Zr?((Zr.exports=es)._=es,Zo._=es):gn._=es}).call(Er)}(lu,lu.exports);var am=lu.exports;const ec=tc(am);class lm{constructor(a=[],s=!1){Pl(this,"simplifyFunc",a=>{try{a=turf.simplify(a,{tolerance:5e-4,highQuality:!1,mutate:!0})}catch{}return a});mars3d?(this.vectorArr=a,this.geoJsonType=new Map([["Point"],["LineString"],["Polygon"],["MultiPoint"],["MultiLineString"],["MultiPolygon"]]),this.avoidanceArr=[],this.editDate={id:""},this.isDynamicMasking=s):console.error("未引入指定插件")}remove(a,s=null){s&&s.isClone=="true"?window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"vectorId")):(window.map.removeLayer(window.map.getLayer(a,"vectorId")),window.dynamicMasking&&window.dynamicMasking.remove(a))}add(a,s){return new Promise((c,d)=>{let u,m=s==null?void 0:s.isClone;if(typeof a!="object"){let g=window.map.getLayer(a,"vectorId");if(g)return c(g);u=this.query(a)}else{let g=window.map.getLayer(a.id,"vectorId");if(g)return c(g);u=a}if(u){let{value:g,url:_,id:S,title:b}=u;new Cesium.Resource({url:_}).fetchJson().then(k=>{let{id:D,title:F,shpInfo:E}=u,{attributes:L,geometryType:T,geometryCount:M,pointCount:R}=E;if(L){let{width:C,materialType:U,materialOptions:N,clampToGround:X,distanceDisplayCondition:K,distanceDisplayCondition_near:Z,distanceDisplayCondition_far:ct,zIndex:Rt,label:et,fill:_t,diffHeight:G,outline:Pt,outlineStyle:Et,color:At,pixelSize:ce,outlineColor:re,outlineWidth:Ft,classificationType:It,setHeight:Nt}=JSON.parse(L),Pe;switch(this.isDynamicMasking?(et.color=Cesium.Color.fromCssColorString(et.color).withAlpha(0),et.outlineColor=Cesium.Color.fromCssColorString(et.outlineColor).withAlpha(.001),et.backgroundColor=Cesium.Color.fromCssColorString(et.backgroundColor).withAlpha(.001),et.background=!1,et.outline=!1,et.show=!1):(et.color=Cesium.Color.fromCssColorString(et.color),et.outlineColor=Cesium.Color.fromCssColorString(et.outlineColor),et.backgroundColor=Cesium.Color.fromCssColorString(et.backgroundColor)),T){case"LineString":case"MultiLineString":et.backgroundPadding=5,Pe=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polylineC",styleOptions:{width:C,clampToGround:X,distanceDisplayCondition:K,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:Z,materialType:U,materialOptions:N,classificationType:It,setHeight:Nt,label:et}},hasZIndex:!0,zIndex:Rt});break;case"Polygon":case"MultiPolygon":U=="PolyGrass"&&(N={evenColor:new Cesium.Color(.25,.4,.1,1),oddColor:new Cesium.Color(.1,.1,.1,1),frequency:1.5}),Pe=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polygon",styleOptions:{fill:_t,diffHeight:G,clampToGround:X,materialType:U,materialOptions:N,distanceDisplayCondition:K,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:Z,outlineStyle:Et,outline:Pt,classificationType:It,label:et}}});break;case"Point":case"MultiPoint":Pe=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"pointP",styleOptions:{color:At,pixelSize:ce,outline:Pt,outlineColor:re,outlineWidth:Ft,visibleDepth:!1,label:et}}});break}m?window.mapClone.mapEx.addLayer(Pe):window.map.addLayer(Pe),Pe.bindPopup(Wt=>{let $e='<div class="bim-map-popup">';return Object.keys(Wt.graphic.attr).forEach((Si,Oe)=>{Wt.graphic.attr[Si]&&($e+=`<p><b>${Si}</b> : ${Wt.graphic.attr[Si]}</p>`)}),$e+="</div>",$e});let pe=ec.debounce(Wt=>{window.dynamicMasking.add(Wt,JSON.parse(L))},500);Pe.readyPromise.then(Wt=>{window.dynamicMasking&&pe(Wt),c(Wt)}).catch(Wt=>{console.error("测试shp矢量加载失败",Wt),c({tite:"【矢量】「"+F+"」无法加载",type:"error",id:D,url:_})})}else c({tite:"【矢量】「"+F+"」无法加载",type:"error",id:D,url:_})}).catch(k=>{console.error("数据有误",k),c({tite:"【矢量】「"+b+"」链接地址有误",type:"error",id:S,url:_})})}else c({tite:"【矢量】ID:「"+a+"」已删除",type:"error",id:a})})}updateData(a){this.vectorArr=a}processingKML(a){let s,c=2e3,d=!0,{kmlInfo:u}=a,{fill:m,areaColor:g,areaSideColor:_,transparency:S,isAreaSideColor:b,minDistinct:O,textDistinct:k,textSize:D,textColor:F,fontStyle:E,outLine:L,sideColor:T,backGround:M,backGroundColor:R,clampToGround:C}=u,U={fill:m,color:g,opacity:S||.5,outline:b,outlineColor:_,outlineWidth:2,clampToGround:C,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:O||0,classificationType:s,opacity:String(S)},N={text:"{name}",horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffsetY:-10,font_size:26,color:F||"#ffffff",font_family:E||"黑体",outline:L||!0,outlineColor:T||"#000000",outlineWidth:4,scaleByDistance:!0,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:O||0,background:M||!1,backgroundColor:R||"",visibleDepth:d,clampToGround:C||!1,disableDepthTestDistance:c};return{...U,label:N}}selected(a){window.map.getLayer(a,"vectorId")&&window.map.getLayer(a,"vectorId").flyTo()}query(a){return this.vectorArr.length==0?!1:this.vectorArr.find(s=>s.id==a)}queryVector(a){return window.map.getLayer(a,"vectorId")}editVector(a,s,c){let d=window.map.getLayer(a,"vectorId"),u=bf(s,c);d&&(d.eachGraphic(m=>{m.label.show===!1&&(delete m.label.outline,delete m.label.background,delete m.label.outlineColor,delete m.label.backgroundColor),m.setStyle({...u})}),window.dynamicMasking&&dynamicMasking.modify(a,u))}nationalBoundaries(a="/gis/nationalBoundaries.json"){let s=new mars3d.layer.GeoJsonLayer({name:"国界",url:a,vectorId:"border",format:c=>{try{c=turf.simplify(c,{tolerance:1e-5,highQuality:!1,mutate:!0})}catch(d){console.error(d)}return c},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(s)}switchDynamicMasking(a){this.isDynamicMasking=a}}class hm{constructor(a=[]){mars3d?(this.terrainProviderArr=a,this.terrainProviderId="",this.events={},window.map.on(mars3d.EventType.terrainLoadError,s=>{console.error("地形服务加载失败",s),this.hide()}),window.map.viewer.scene.globe.tileLoadProgressEvent.addEventListener(s=>{window.map.viewer.scene.globe.tilesLoaded&&this.emit("load",s)})):console.error("未引入指定插件")}add(a,s){if(s==null?void 0:s.isClone)mapClone?window.mapClone.mapEx.terrainProvider=window.map.terrainProvider:console.error("副屏幕未初始化");else{let{url:d,id:u}=a;if(this.terrainProviderId==u&&window.map.terrainProvider._layers)return!1;window.map.terrainProvider=mars3d.LayerUtil.createTerrainProvider({imageXyzId:u,type:"xyz",url:d,requestVertexNormals:!0,requestMetadata:!0}),this.terrainProviderId=u}}show(a){console.log("zhangshow"),(a==null?void 0:a.isClone)?window.mapClone.mapEx.hasTerrain=!0:window.map.hasTerrain=!0}hide(a){console.log("zhanghide"),(a==null?void 0:a.isClone)?window.mapClone.mapEx.hasTerrain=!1:window.map.hasTerrain=!1}on(a,s){a=="load"?this.events[a]?this.events[a].push(s):this.events[a]=[s]:console.log("未开放自定义")}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}once(a,s){const c=()=>{s(),this.off(a,c)};this.on(a,c)}addClip(a){return new Promise((s,c)=>{window.bimClip?s(bimClip.clipGisAdd(a)):c("挖洞工具未初始化")})}}class um{constructor(a=[],s){mars3d?(this.elevationImageArr=a,this.elevationImageLayer,s?this.gisTkone={Authorization:`Bearer ${s}`}:this.gisTkone={},this.form={brightnessVal:1.3,msaaSamples:4,surfaceOpacity:1,layerOpacity:1,layerBrightness:2,layerContrast:1,layerHue:0,layerSaturation:1,layerGamma:1},this.tdtLayer=null):console.error("未引入指定插件")}pushVector(a){this.elevationImageArr.push(a)}add(a,s=!0,c){let d;if(typeof a!="object"?d=a:d=a.imageXyzId,window.map.getLayer(d,"imageXyzId"))return!1;const{layerOpacity:u,layerBrightness:m,layerContrast:g,layerHue:_,layerSaturation:S,layerGamma:b,surfaceOpacity:O}=this.exposureEnvironmentSettings();return new Promise((k,D)=>{let F,E,L,T,M,R;if(typeof a!="object"){let C=this.query(a);C||D("缺少树结构");let{gisInfo:U}=C;F=U.id,L=U.order,E=C.url,T=U.minLevel,M=U.maxLevel}else F=a.imageXyzId,E=a.url,L=a.zIndex,T=a.minimumLevel,M=a.maximumLevel,R=a.chinaCRS;this.elevationImageLayer=new mars3d.layer.XyzLayer({imageXyzId:F,type:"xyz",url:E,hasZIndex:!0,zIndex:L.toString(),brightness:m,opacity:u,saturation:S,contrast:g,hue:_,gamma:b,alpha:O,show:!0,minimumLevel:T||0,maximumLevel:M||15,chinaCRS:R,headers:s?this.gisTkone:null}),this.elevationImageLayer.on(mars3d.EventType.load,C=>{k(C)}),window.map.addLayer(this.elevationImageLayer),c&&Object.keys(c).forEach(C=>{this.elevationImageLayer.on(fnType.get(C),U=>{c[C](U)})})})}remove(a){console.log(a),window.map.removeLayer(window.map.getLayer(a,"imageXyzId"))}query(a){return this.elevationImageArr.length==0?!1:this.elevationImageArr.find(s=>s.id==a)}initial(){this.elevationImageArr=[],this.elevationImageLayer=null}exposureEnvironmentSettings(){return localStorage.getItem("environmentSettings")?JSON.parse(localStorage.getItem("environmentSettings")):(localStorage.setItem("environmentSettings",JSON.stringify(this.form)),JSON.parse(JSON.stringify(this.form)))}}class cm{constructor(a,...s){Pl(this,"manualFreed",ec.debounce(()=>{let{lng:a,lat:s,alt:c,pitch:d}=window.map.getCameraView(),u;this.modelArray.forEach(m=>{u=m.releasedDistance?m.releasedDistance:1e4,this.disTance([a,s,c],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(d,u))?window.map.getLayer(m.id,"modelId")&&this.emit("leave",m):window.map.getLayer(m.id,"modelId")||this.emit("enter",m)})},200));mars3d?(a&&a!=null&&(this.modelArray=a),this.showModelArray=[],this.Cesium=mars3d.Cesium,this.events={}):console.error("未引入指定插件")}on(a,s){a=="enter"||a=="leave"?this.events[a]?this.events[a].push(s):this.events[a]=[s]:console.log("未开放自定义")}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}once(a,s){const c=()=>{s(),this.off(a,c)};this.on(a,c)}say(a){return this[a]}add(a,s){this[a].push(s)}remove(a,s){this[a]=this[a].filter(function(c){return c!==s})}initial(){this.modelArray=[],this.events={}}updateCustomExcavationDetails(a,s,c,d=[],u={}){let m,g,_;switch(m=this.modelArray.find(S=>S.modelId==a).customize.bimModelExcavationDetails,_=m.find((S,b)=>{if(S.id==s)return g=b,S}),c){case"delete":m.splice(g,1);break;case"update":_.excavationDetails=d;break;case"add":m.push(u);break;case"edit":_.excavationDetails=u.excavationDetails,_.kId=u.kId;break}return m}resourceRelease(){window.map.viewer.camera.moveEnd.addEventListener(()=>{this.freed()})}freed(){let{alt:a}=window.map.getCameraView();a<2e4&&(this.freed=ec.throttle(()=>{let{lng:s,lat:c,alt:d,pitch:u}=window.map.getCameraView();this.modelArray&&this.modelArray.forEach(m=>{let g=m.bimModel.releasedDistance?m.bimModel.releasedDistance:1e4;m.center&&this.disTance([s,c,d],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(u,g))?window.map.getLayer(m.id,"modelId")&&this.emit("leave",m):this.showModelArray.indexOf(m.id)>=0&&!window.map.getLayer(m.id,"modelId")&&this.emit("enter",m)})},2e3),this.freed())}findPnodeId(a,s,c="id"){let d;if(a){for(var u=0;u<a.length;u++){let m=a[u];if(m[c]==s)return d=m,d;if(m.children&&m.children.length>0&&(d=this.findPnodeId(m.children,s,c),d))return d}return d}}disTance(a,s,c){let d,u,m;return d=Cesium.Cartesian3.fromDegrees(...a),u=Cesium.Cartesian3.fromDegrees(...s),m=Cesium.Cartesian3.distance(d,u),m>c}calculateDistance(a,s){let c=(a+180)%360-180;c=Math.max(-90,Math.min(c,90));let d=(s-s/5)*(Math.abs(c)/90)+s/5;return Math.round(d)}}class fm{constructor(a=[],s){mars3d?(this.entityArr=a,this.entityLayer=new mars3d.layer.GraphicLayer({entityId:"bimEntity"}),window.map.addLayer(this.entityLayer),this.entityItem=null,this.events={},this.entityCloneLayer):console.error("未引入指定插件")}on(a,s){a=="change"||a=="collection"?this.events[a]?this.events[a].push(s):this.events[a]=[s]:console.log("未开放自定义")}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}offAll(){this.events={}}once(a,s){const c=()=>{s(),this.off(a,c)};this.on(a,c)}add(a,s=null,c){return new Promise((d,u)=>{var m;if(this.entityLayer){let g,_,S;if(c==null?void 0:c.isClone)this.entityCloneLayer&&(_=this.query(a),_?(S=JSON.parse(_.bimPlanPainting.graphic),S.attr=S.attr||{},S.attr.entityId=a,this.entityCloneLayer.addGraphic(S)):d({tite:"【标绘】 ID:「"+a+"」已删除",type:"error",id:a}));else{if(typeof a!="object"?(g=this.entityLayer.getGraphicByAttr(a,"entityId"),_=this.query(a),_?(S=JSON.parse(_.bimPlanPainting.graphic),S.attr=S.attr||{},S.attr.entityId=a):d({tite:"【标绘】ID:「"+a+"」已删除",type:"error",id:a})):(g=this.entityLayer.getGraphicByAttr(a.id,"entityId"),S=JSON.parse(JSON.stringify(a)),S.attr=S.attr||{},S.attr.entityId=S.attr.entityId||s,S.attr==null?S.attr={entityId:a.id}:((m=S.attr)==null?void 0:m.entityId)==null&&s&&(S.attr.entityId=s)),g)return d();this.entityLayer.addGraphic(S),d(S)}}else d(),console.error("未初始化标绘实例图层")})}query(a){return this.entityArr.length==0?!1:this.entityArr.find(s=>s.id==a)}queryEntity(a){if(bimEntity.entityLayer)return bimEntity.entityLayer.getGraphicByAttr(a,"entityId")}selected(a,s=null){let c=this.entityLayer.getGraphicByAttr(a,"entityId");s==null||s.isClone,(c.options.type=="div"||c.options.type=="point")&&c._point?c.flyTo({radius:c._point._alt+500<500?5e3:c._point._alt+500}):c.flyTo()}remove(a,s=null){(s==null?void 0:s.isClone)?this.entityCloneLayer&&this.entityCloneLayer.getGraphicByAttr(a,"entityId").remove():this.entityLayer.getGraphicByAttr(a,"entityId")&&(this.entityLayer.getGraphicByAttr(a,"entityId").remove(),this.entityItem&&(this.entityItem._state=="destroy"||this.entityItem.options.attr.entityId==a)&&(this.entityItem=null))}entityCloneLayerInit(){(this.entityCloneLayer==null||this.entityCloneLayer.state=="destroy")&&(this.entityCloneLayer=window.mapClone._mapEx.getLayer("bimEntity","entityId"))}entityCloneLayerRemove(){this.entityCloneLayer.remove(),this.entityCloneLayer=null}removeEntityItem(){this.entityItem=null}updateData(a){this.entityArr=a}startDrawGraphic(a){return new Promise((s,c)=>{let{type:d,style:u}=a;if(a.style.drawShow=!0,d=="div")if(u.html)this.entityLayer.startDraw(a).then(m=>{setTimeout(()=>{this.entityItem=m,this.entityLayer.startEditing(m)},500)});else{let{title:m,divType:g,theme_color:_,font_color:S,scaleByDistance:b,scaleByDistance_far:O,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M}=u,R={type:"div",style:{pointerEvents:!0,scaleByDistance:b,scaleByDistance_far:O,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M,horizontalOrigin:Cesium.HorizontalOrigin.LEFT,verticalOrigin:Cesium.VerticalOrigin.BOTTOM}};switch(g){case"1":R.style.html=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${_};--theme-font-color1:${S};">
2636
+ }`;var Mi=Np(function(){return Fi(ut,Je+"return "+de).apply(s,yt)});if(Mi.source=de,cf(Mi))throw Mi;return Mi}function P_(r){return Zi(r).toLowerCase()}function L_(r){return Zi(r).toUpperCase()}function R_(r,h,v){if(r=Zi(r),r&&(v||h===s))return ya(r);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=ar(h),ut=ts(O,Y),yt=bs(O,Y)+1;return xn(O,ut,yt).join("")}function O_(r,h,v){if(r=Zi(r),r&&(v||h===s))return r.slice(0,_a(r)+1);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=bs(O,ar(h))+1;return xn(O,0,Y).join("")}function I_(r,h,v){if(r=Zi(r),r&&(v||h===s))return r.replace(lo,"");if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=ts(O,ar(h));return xn(O,Y).join("")}function D_(r,h){var v=ct,O=Rt;if(wn(h)){var Y="separator"in h?h.separator:Y;v="length"in h?wi(h.length):v,O="omission"in h?Ye(h.omission):O}r=Zi(r);var ut=r.length;if(Ir(r)){var yt=ar(r);ut=yt.length}if(v>=ut)return r;var bt=v-$r(O);if(bt<1)return O;var Bt=yt?xn(yt,0,bt).join(""):r.slice(0,bt);if(Y===s)return Bt+O;if(yt&&(bt+=Bt.length-bt),ff(Y)){if(r.slice(bt).search(Y)){var oe,le=Bt;for(Y.global||(Y=Kn(Y.source,Zi(jl.exec(Y))+"g")),Y.lastIndex=0;oe=Y.exec(le);)var de=oe.index;Bt=Bt.slice(0,de===s?bt:de)}}else if(r.indexOf(Ye(Y),bt)!=bt){var ke=Bt.lastIndexOf(Y);ke>-1&&(Bt=Bt.slice(0,ke))}return Bt+O}function z_(r){return r=Zi(r),r&&qo.test(r)?r.replace(Ao,th):r}var k_=ze(function(r,h,v){return r+(v?" ":"")+h.toUpperCase()}),mf=Me("toUpperCase");function Bp(r,h,v){return r=Zi(r),h=v?s:h,h===s?Ls(r)?jc(r):ol(r):r.match(h)||[]}var Np=ae(function(r,h){try{return yr(r,s,h)}catch(v){return cf(v)?v:new ai(v)}}),B_=Vs(function(r,h){return Ji(h,function(v){v=us(v),Bo(r,v,hf(r[v],r))}),r});function N_(r){var h=r==null?0:r.length,v=si();return r=h?Yi(r,function(O){if(typeof O[1]!="function")throw new lr(m);return[v(O[0]),O[1]]}):[],ae(function(O){for(var Y=-1;++Y<h;){var ut=r[Y];if(yr(ut[0],this,O))return yr(ut[1],this,O)}})}function F_(r){return Ra(wr(r,I))}function gf(r){return function(){return r}}function U_(r,h){return r==null||r!==r?h:r}var G_=Oi(),H_=Oi(!0);function Gr(r){return r}function vf(r){return H(typeof r=="function"?r:wr(r,I))}function V_(r){return gt(wr(r,I))}function W_(r,h){return Ct(r,wr(h,I))}var j_=ae(function(r,h){return function(v){return e(v,r,h)}}),X_=ae(function(r,h){return function(v){return e(r,v,h)}});function yf(r,h,v){var O=Jn(h),Y=Us(h,O);v==null&&!(wn(h)&&(Y.length||!O.length))&&(v=h,h=r,r=this,Y=Us(h,Jn(h)));var ut=!(wn(v)&&"chain"in v)||!!v.chain,yt=js(r);return Ji(Y,function(bt){var Bt=h[bt];r[bt]=Bt,yt&&(r.prototype[bt]=function(){var oe=this.__chain__;if(ut||oe){var le=r(this.__wrapped__),de=le.__actions__=er(this.__actions__);return de.push({func:Bt,args:arguments,thisArg:r}),le.__chain__=oe,le}return Bt.apply(r,fo([this.value()],arguments))})}),r}function q_(){return gn._===this&&(gn._=Kr),this}function _f(){}function Y_(r){return r=wi(r),ae(function(h){return J(h,r)})}var Z_=Nn(Yi),J_=Nn(Bh),$_=Nn(Po);function Fp(r){return nf(r)?$o(us(r)):$t(r)}function K_(r){return function(h){return r==null?s:ls(r,h)}}var Q_=eu(),t1=eu(!0);function xf(){return[]}function wf(){return!1}function e1(){return{}}function i1(){return""}function n1(){return!0}function r1(r,h){if(r=wi(r),r<1||r>ce)return[];var v=It,O=Vn(r,It);h=si(h),r-=It;for(var Y=Ro(O,h);++v<r;)h(v);return Y}function o1(r){return vi(r)?Yi(r,us):to(r)?[r]:er(op(Zi(r)))}function s1(r){var h=++ur;return Zi(r)+h}var a1=Tr(function(r,h){return r+h},0),l1=dh("ceil"),h1=Tr(function(r,h){return r/h},1),u1=dh("floor");function c1(r){return r&&r.length?Mo(r,Gr,uh):s}function f1(r,h){return r&&r.length?Mo(r,si(h,2),uh):s}function d1(r){return va(r,Gr)}function p1(r,h){return va(r,si(h,2))}function m1(r){return r&&r.length?Mo(r,Gr,rt):s}function g1(r,h){return r&&r.length?Mo(r,si(h,2),rt):s}var v1=Tr(function(r,h){return r*h},1),y1=dh("round"),_1=Tr(function(r,h){return r-h},0);function x1(r){return r&&r.length?Qo(r,Gr):0}function w1(r,h){return r&&r.length?Qo(r,si(h,2)):0}return it.after=Vv,it.ary=gp,it.assign=Ly,it.assignIn=Lp,it.assignInWith=Qu,it.assignWith=Ry,it.at=Oy,it.before=vp,it.bind=hf,it.bindAll=B_,it.bindKey=yp,it.castArray=ey,it.chain=dp,it.chunk=u0,it.compact=c0,it.concat=f0,it.cond=N_,it.conforms=F_,it.constant=gf,it.countBy=xv,it.create=Iy,it.curry=_p,it.curryRight=xp,it.debounce=wp,it.defaults=Dy,it.defaultsDeep=zy,it.defer=Wv,it.delay=jv,it.difference=d0,it.differenceBy=p0,it.differenceWith=m0,it.drop=g0,it.dropRight=v0,it.dropRightWhile=y0,it.dropWhile=_0,it.fill=x0,it.filter=Tv,it.flatMap=Ev,it.flatMapDeep=bv,it.flatMapDepth=Cv,it.flatten=hp,it.flattenDeep=w0,it.flattenDepth=T0,it.flip=Xv,it.flow=G_,it.flowRight=H_,it.fromPairs=M0,it.functions=Hy,it.functionsIn=Vy,it.groupBy=Av,it.initial=E0,it.intersection=b0,it.intersectionBy=C0,it.intersectionWith=A0,it.invert=jy,it.invertBy=Xy,it.invokeMap=Lv,it.iteratee=vf,it.keyBy=Rv,it.keys=Jn,it.keysIn=Ur,it.map=qu,it.mapKeys=Yy,it.mapValues=Zy,it.matches=V_,it.matchesProperty=W_,it.memoize=Zu,it.merge=Jy,it.mergeWith=Rp,it.method=j_,it.methodOf=X_,it.mixin=yf,it.negate=Ju,it.nthArg=Y_,it.omit=$y,it.omitBy=Ky,it.once=qv,it.orderBy=Ov,it.over=Z_,it.overArgs=Yv,it.overEvery=J_,it.overSome=$_,it.partial=uf,it.partialRight=Tp,it.partition=Iv,it.pick=Qy,it.pickBy=Op,it.property=Fp,it.propertyOf=K_,it.pull=O0,it.pullAll=cp,it.pullAllBy=I0,it.pullAllWith=D0,it.pullAt=z0,it.range=Q_,it.rangeRight=t1,it.rearg=Zv,it.reject=kv,it.remove=k0,it.rest=Jv,it.reverse=af,it.sampleSize=Nv,it.set=e_,it.setWith=i_,it.shuffle=Fv,it.slice=B0,it.sortBy=Hv,it.sortedUniq=W0,it.sortedUniqBy=j0,it.split=E_,it.spread=$v,it.tail=X0,it.take=q0,it.takeRight=Y0,it.takeRightWhile=Z0,it.takeWhile=J0,it.tap=cv,it.throttle=Kv,it.thru=Xu,it.toArray=Cp,it.toPairs=Ip,it.toPairsIn=Dp,it.toPath=o1,it.toPlainObject=Pp,it.transform=n_,it.unary=Qv,it.union=$0,it.unionBy=K0,it.unionWith=Q0,it.uniq=tv,it.uniqBy=ev,it.uniqWith=iv,it.unset=r_,it.unzip=lf,it.unzipWith=fp,it.update=o_,it.updateWith=s_,it.values=gh,it.valuesIn=a_,it.without=nv,it.words=Bp,it.wrap=ty,it.xor=rv,it.xorBy=ov,it.xorWith=sv,it.zip=av,it.zipObject=lv,it.zipObjectDeep=hv,it.zipWith=uv,it.entries=Ip,it.entriesIn=Dp,it.extend=Lp,it.extendWith=Qu,yf(it,it),it.add=a1,it.attempt=Np,it.camelCase=c_,it.capitalize=zp,it.ceil=l1,it.clamp=l_,it.clone=iy,it.cloneDeep=ry,it.cloneDeepWith=oy,it.cloneWith=ny,it.conformsTo=sy,it.deburr=kp,it.defaultTo=U_,it.divide=h1,it.endsWith=f_,it.eq=Uo,it.escape=d_,it.escapeRegExp=p_,it.every=wv,it.find=Mv,it.findIndex=ap,it.findKey=ky,it.findLast=Sv,it.findLastIndex=lp,it.findLastKey=By,it.floor=u1,it.forEach=pp,it.forEachRight=mp,it.forIn=Ny,it.forInRight=Fy,it.forOwn=Uy,it.forOwnRight=Gy,it.get=df,it.gt=ay,it.gte=ly,it.has=Wy,it.hasIn=pf,it.head=up,it.identity=Gr,it.includes=Pv,it.indexOf=S0,it.inRange=h_,it.invoke=qy,it.isArguments=Pl,it.isArray=vi,it.isArrayBuffer=hy,it.isArrayLike=Fr,it.isArrayLikeObject=Dn,it.isBoolean=uy,it.isBuffer=ka,it.isDate=cy,it.isElement=fy,it.isEmpty=dy,it.isEqual=py,it.isEqualWith=my,it.isError=cf,it.isFinite=gy,it.isFunction=js,it.isInteger=Mp,it.isLength=$u,it.isMap=Sp,it.isMatch=vy,it.isMatchWith=yy,it.isNaN=_y,it.isNative=xy,it.isNil=Ty,it.isNull=wy,it.isNumber=Ep,it.isObject=wn,it.isObjectLike=Ln,it.isPlainObject=ou,it.isRegExp=ff,it.isSafeInteger=My,it.isSet=bp,it.isString=Ku,it.isSymbol=to,it.isTypedArray=mh,it.isUndefined=Sy,it.isWeakMap=Ey,it.isWeakSet=by,it.join=P0,it.kebabCase=m_,it.last=bo,it.lastIndexOf=L0,it.lowerCase=g_,it.lowerFirst=v_,it.lt=Cy,it.lte=Ay,it.max=c1,it.maxBy=f1,it.mean=d1,it.meanBy=p1,it.min=m1,it.minBy=g1,it.stubArray=xf,it.stubFalse=wf,it.stubObject=e1,it.stubString=i1,it.stubTrue=n1,it.multiply=v1,it.nth=R0,it.noConflict=q_,it.noop=_f,it.now=Yu,it.pad=y_,it.padEnd=__,it.padStart=x_,it.parseInt=w_,it.random=u_,it.reduce=Dv,it.reduceRight=zv,it.repeat=T_,it.replace=M_,it.result=t_,it.round=y1,it.runInContext=Lt,it.sample=Bv,it.size=Uv,it.snakeCase=S_,it.some=Gv,it.sortedIndex=N0,it.sortedIndexBy=F0,it.sortedIndexOf=U0,it.sortedLastIndex=G0,it.sortedLastIndexBy=H0,it.sortedLastIndexOf=V0,it.startCase=b_,it.startsWith=C_,it.subtract=_1,it.sum=x1,it.sumBy=w1,it.template=A_,it.times=r1,it.toFinite=Xs,it.toInteger=wi,it.toLength=Ap,it.toLower=P_,it.toNumber=Co,it.toSafeInteger=Py,it.toString=Zi,it.toUpper=L_,it.trim=R_,it.trimEnd=O_,it.trimStart=I_,it.truncate=D_,it.unescape=z_,it.uniqueId=s1,it.upperCase=k_,it.upperFirst=mf,it.each=pp,it.eachRight=mp,it.first=up,yf(it,function(){var r={};return Nr(it,function(h,v){Ti.call(it.prototype,v)||(r[v]=h)}),r}(),{chain:!1}),it.VERSION=c,Ji(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){it[r].placeholder=it}),Ji(["drop","take"],function(r,h){_i.prototype[r]=function(v){v=v===s?1:vn(wi(v),0);var O=this.__filtered__&&!h?new _i(this):this.clone();return O.__filtered__?O.__takeCount__=Vn(v,O.__takeCount__):O.__views__.push({size:Vn(v,It),type:r+(O.__dir__<0?"Right":"")}),O},_i.prototype[r+"Right"]=function(v){return this.reverse()[r](v).reverse()}}),Ji(["filter","map","takeWhile"],function(r,h){var v=h+1,O=v==G||v==Et;_i.prototype[r]=function(Y){var ut=this.clone();return ut.__iteratees__.push({iteratee:si(Y,3),type:v}),ut.__filtered__=ut.__filtered__||O,ut}}),Ji(["head","last"],function(r,h){var v="take"+(h?"Right":"");_i.prototype[r]=function(){return this[v](1).value()[0]}}),Ji(["initial","tail"],function(r,h){var v="drop"+(h?"":"Right");_i.prototype[r]=function(){return this.__filtered__?new _i(this):this[v](1)}}),_i.prototype.compact=function(){return this.filter(Gr)},_i.prototype.find=function(r){return this.filter(r).head()},_i.prototype.findLast=function(r){return this.reverse().find(r)},_i.prototype.invokeMap=ae(function(r,h){return typeof r=="function"?new _i(this):this.map(function(v){return e(v,r,h)})}),_i.prototype.reject=function(r){return this.filter(Ju(si(r)))},_i.prototype.slice=function(r,h){r=wi(r);var v=this;return v.__filtered__&&(r>0||h<0)?new _i(v):(r<0?v=v.takeRight(-r):r&&(v=v.drop(r)),h!==s&&(h=wi(h),v=h<0?v.dropRight(-h):v.take(h-r)),v)},_i.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},_i.prototype.toArray=function(){return this.take(It)},Nr(_i.prototype,function(r,h){var v=/^(?:filter|find|map|reject)|While$/.test(h),O=/^(?:head|last)$/.test(h),Y=it[O?"take"+(h=="last"?"Right":""):h],ut=O||/^find/.test(h);Y&&(it.prototype[h]=function(){var yt=this.__wrapped__,bt=O?[1]:arguments,Bt=yt instanceof _i,oe=bt[0],le=Bt||vi(yt),de=function(Ri){var Ui=Y.apply(it,fo([Ri],bt));return O&&ke?Ui[0]:Ui};le&&v&&typeof oe=="function"&&oe.length!=1&&(Bt=le=!1);var ke=this.__chain__,Je=!!this.__actions__.length,hi=ut&&!ke,Mi=Bt&&!Je;if(!ut&&le){yt=Mi?yt:new _i(this);var ui=r.apply(yt,bt);return ui.__actions__.push({func:Xu,args:[de],thisArg:s}),new qn(ui,ke)}return hi&&Mi?r.apply(this,bt):(ui=this.thru(de),hi?O?ui.value()[0]:ui.value():ui)})}),Ji(["pop","push","shift","sort","splice","unshift"],function(r){var h=On[r],v=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",O=/^(?:pop|shift)$/.test(r);it.prototype[r]=function(){var Y=arguments;if(O&&!this.__chain__){var ut=this.value();return h.apply(vi(ut)?ut:[],Y)}return this[v](function(yt){return h.apply(vi(yt)?yt:[],Y)})}}),Nr(_i.prototype,function(r,h){var v=it[h];if(v){var O=v.name+"";Ti.call(rs,O)||(rs[O]=[]),rs[O].push({name:h,func:v})}}),rs[$i(s,T).name]=[{name:"wrapper",func:s}],_i.prototype.clone=ba,_i.prototype.reverse=Ou,_i.prototype.value=Ca,it.prototype.at=fv,it.prototype.chain=dv,it.prototype.commit=pv,it.prototype.next=mv,it.prototype.plant=vv,it.prototype.reverse=yv,it.prototype.toJSON=it.prototype.valueOf=it.prototype.value=_v,it.prototype.first=it.prototype.head,ns&&(it.prototype[ns]=gv),it},es=Xc();Zr?((Zr.exports=es)._=es,Zo._=es):gn._=es}).call(Er)}(lu,lu.exports);var am=lu.exports;const ec=tc(am);class lm{constructor(a=[],s=!1){Ba(this,"simplifyFunc",a=>{try{a=turf.simplify(a,{tolerance:5e-4,highQuality:!1,mutate:!0})}catch{}return a});mars3d?(this.vectorArr=a,this.geoJsonType=new Map([["Point"],["LineString"],["Polygon"],["MultiPoint"],["MultiLineString"],["MultiPolygon"]]),this.avoidanceArr=[],this.editDate={id:""},this.isDynamicMasking=s):console.error("未引入指定插件")}remove(a,s=null){s&&s.isClone=="true"?window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"vectorId")):(window.map.removeLayer(window.map.getLayer(a,"vectorId")),window.dynamicMasking&&window.dynamicMasking.remove(a))}add(a,s){return new Promise((c,d)=>{let u,m=s==null?void 0:s.isClone;if(typeof a!="object"){let g=window.map.getLayer(a,"vectorId");if(g)return c(g);u=this.query(a)}else{let g=window.map.getLayer(a.id,"vectorId");if(g)return c(g);u=a}if(u){let{value:g,url:_,id:S,title:b}=u;new Cesium.Resource({url:_}).fetchJson().then(k=>{let{id:D,title:F,shpInfo:E}=u,{attributes:L,geometryType:T,geometryCount:M,pointCount:R}=E;if(L){let{width:C,materialType:U,materialOptions:N,clampToGround:X,distanceDisplayCondition:K,distanceDisplayCondition_near:Z,distanceDisplayCondition_far:ct,zIndex:Rt,label:et,fill:_t,diffHeight:G,outline:Pt,outlineStyle:Et,color:At,pixelSize:ce,outlineColor:re,outlineWidth:Ft,classificationType:It,setHeight:Nt}=JSON.parse(L),Pe;switch(this.isDynamicMasking?(et.color=Cesium.Color.fromCssColorString(et.color).withAlpha(0),et.outlineColor=Cesium.Color.fromCssColorString(et.outlineColor).withAlpha(.001),et.backgroundColor=Cesium.Color.fromCssColorString(et.backgroundColor).withAlpha(.001),et.background=!1,et.outline=!1,et.show=!1):(et.color=Cesium.Color.fromCssColorString(et.color),et.outlineColor=Cesium.Color.fromCssColorString(et.outlineColor),et.backgroundColor=Cesium.Color.fromCssColorString(et.backgroundColor)),T){case"LineString":case"MultiLineString":et.backgroundPadding=5,Pe=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polylineC",styleOptions:{width:C,clampToGround:X,distanceDisplayCondition:K,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:Z,materialType:U,materialOptions:N,classificationType:It,setHeight:Nt,label:et}},hasZIndex:!0,zIndex:Rt});break;case"Polygon":case"MultiPolygon":U=="PolyGrass"&&(N={evenColor:new Cesium.Color(.25,.4,.1,1),oddColor:new Cesium.Color(.1,.1,.1,1),frequency:1.5}),Pe=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polygon",styleOptions:{fill:_t,diffHeight:G,clampToGround:X,materialType:U,materialOptions:N,distanceDisplayCondition:K,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:Z,outlineStyle:Et,outline:Pt,classificationType:It,label:et}}});break;case"Point":case"MultiPoint":Pe=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"pointP",styleOptions:{color:At,pixelSize:ce,outline:Pt,outlineColor:re,outlineWidth:Ft,visibleDepth:!1,label:et}}});break}m?window.mapClone.mapEx.addLayer(Pe):window.map.addLayer(Pe),Pe.bindPopup(Wt=>{let $e='<div class="bim-map-popup">';return Object.keys(Wt.graphic.attr).forEach((Si,Oe)=>{Wt.graphic.attr[Si]&&($e+=`<p><b>${Si}</b> : ${Wt.graphic.attr[Si]}</p>`)}),$e+="</div>",$e});let pe=ec.debounce(Wt=>{window.dynamicMasking.add(Wt,JSON.parse(L))},500);Pe.readyPromise.then(Wt=>{window.dynamicMasking&&pe(Wt),c(Wt)}).catch(Wt=>{console.error("测试shp矢量加载失败",Wt),c({tite:"【矢量】「"+F+"」无法加载",type:"error",id:D,url:_})})}else c({tite:"【矢量】「"+F+"」无法加载",type:"error",id:D,url:_})}).catch(k=>{console.error("数据有误",k),c({tite:"【矢量】「"+b+"」链接地址有误",type:"error",id:S,url:_})})}else c({tite:"【矢量】ID:「"+a+"」已删除",type:"error",id:a})})}updateData(a){this.vectorArr=a}processingKML(a){let s,c=2e3,d=!0,{kmlInfo:u}=a,{fill:m,areaColor:g,areaSideColor:_,transparency:S,isAreaSideColor:b,minDistinct:I,textDistinct:k,textSize:D,textColor:F,fontStyle:E,outLine:L,sideColor:T,backGround:M,backGroundColor:R,clampToGround:C}=u,U={fill:m,color:g,opacity:S||.5,outline:b,outlineColor:_,outlineWidth:2,clampToGround:C,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,classificationType:s,opacity:String(S)},N={text:"{name}",horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffsetY:-10,font_size:26,color:F||"#ffffff",font_family:E||"黑体",outline:L||!0,outlineColor:T||"#000000",outlineWidth:4,scaleByDistance:!0,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,background:M||!1,backgroundColor:R||"",visibleDepth:d,clampToGround:C||!1,disableDepthTestDistance:c};return{...U,label:N}}selected(a){window.map.getLayer(a,"vectorId")&&window.map.getLayer(a,"vectorId").flyTo()}query(a){return this.vectorArr.length==0?!1:this.vectorArr.find(s=>s.id==a)}queryVector(a){return window.map.getLayer(a,"vectorId")}editVector(a,s,c){let d=window.map.getLayer(a,"vectorId"),u=bf(s,c);d&&(d.eachGraphic(m=>{m.label.show===!1&&(delete m.label.outline,delete m.label.background,delete m.label.outlineColor,delete m.label.backgroundColor),m.setStyle({...u})}),window.dynamicMasking&&dynamicMasking.modify(a,u))}nationalBoundaries(a="/gis/nationalBoundaries.json"){let s=new mars3d.layer.GeoJsonLayer({name:"国界",url:a,vectorId:"border",format:c=>{try{c=turf.simplify(c,{tolerance:1e-5,highQuality:!1,mutate:!0})}catch(d){console.error(d)}return c},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(s)}switchDynamicMasking(a){this.isDynamicMasking=a}}class hm{constructor(a=[]){mars3d?(this.terrainProviderArr=a,this.terrainProviderId="",this.events={},window.map.on(mars3d.EventType.terrainLoadError,s=>{console.error("地形服务加载失败",s),this.hide()}),window.map.viewer.scene.globe.tileLoadProgressEvent.addEventListener(s=>{window.map.viewer.scene.globe.tilesLoaded&&this.emit("load",s)})):console.error("未引入指定插件")}add(a,s){if(s==null?void 0:s.isClone)mapClone?window.mapClone.mapEx.terrainProvider=window.map.terrainProvider:console.error("副屏幕未初始化");else{let{url:d,id:u}=a;if(this.terrainProviderId==u&&window.map.terrainProvider._layers)return!1;window.map.terrainProvider=mars3d.LayerUtil.createTerrainProvider({imageXyzId:u,type:"xyz",url:d,requestVertexNormals:!0,requestMetadata:!0}),this.terrainProviderId=u}}show(a){(a==null?void 0:a.isClone)?window.mapClone.mapEx.hasTerrain=!0:window.map.hasTerrain=!0}hide(a){(a==null?void 0:a.isClone)?window.mapClone.mapEx.hasTerrain=!1:window.map.hasTerrain=!1}on(a,s){a=="load"?this.events[a]?this.events[a].push(s):this.events[a]=[s]:console.log("未开放自定义")}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}once(a,s){const c=()=>{s(),this.off(a,c)};this.on(a,c)}addClip(a){return new Promise((s,c)=>{window.bimClip?s(bimClip.clipGisAdd(a)):c("挖洞工具未初始化")})}}class um{constructor(a=[],s){mars3d?(this.elevationImageArr=a,this.elevationImageLayer,s?this.gisTkone={Authorization:`Bearer ${s}`}:this.gisTkone={},this.form={brightnessVal:1.3,msaaSamples:4,surfaceOpacity:1,layerOpacity:1,layerBrightness:2,layerContrast:1,layerHue:0,layerSaturation:1,layerGamma:1},this.tdtLayer=null):console.error("未引入指定插件")}pushVector(a){this.elevationImageArr.push(a)}add(a,s=!0,c){let d;if(typeof a!="object"?d=a:d=a.imageXyzId,window.map.getLayer(d,"imageXyzId"))return!1;const{layerOpacity:u,layerBrightness:m,layerContrast:g,layerHue:_,layerSaturation:S,layerGamma:b,surfaceOpacity:I}=this.exposureEnvironmentSettings();return new Promise((k,D)=>{let F,E,L,T,M,R;if(typeof a!="object"){let C=this.query(a);C||D("缺少树结构");let{gisInfo:U}=C;F=U.id,L=U.order,E=C.url,T=U.minLevel,M=U.maxLevel}else F=a.imageXyzId,E=a.url,L=a.zIndex,T=a.minimumLevel,M=a.maximumLevel,R=a.chinaCRS;this.elevationImageLayer=new mars3d.layer.XyzLayer({imageXyzId:F,type:"xyz",url:E,hasZIndex:!0,zIndex:L.toString(),brightness:m,opacity:u,saturation:S,contrast:g,hue:_,gamma:b,alpha:I,show:!0,minimumLevel:T||0,maximumLevel:M||15,chinaCRS:R,headers:s?this.gisTkone:null}),this.elevationImageLayer.on(mars3d.EventType.load,C=>{k(C)}),window.map.addLayer(this.elevationImageLayer),c&&Object.keys(c).forEach(C=>{this.elevationImageLayer.on(fnType.get(C),U=>{c[C](U)})})})}remove(a){console.log(a),window.map.removeLayer(window.map.getLayer(a,"imageXyzId"))}query(a){return this.elevationImageArr.length==0?!1:this.elevationImageArr.find(s=>s.id==a)}initial(){this.elevationImageArr=[],this.elevationImageLayer=null}exposureEnvironmentSettings(){return localStorage.getItem("environmentSettings")?JSON.parse(localStorage.getItem("environmentSettings")):(localStorage.setItem("environmentSettings",JSON.stringify(this.form)),JSON.parse(JSON.stringify(this.form)))}}class cm{constructor(a,...s){Ba(this,"manualFreed",ec.debounce(()=>{let{lng:a,lat:s,alt:c,pitch:d}=window.map.getCameraView(),u;this.modelArray.forEach(m=>{u=m.releasedDistance?m.releasedDistance:1e4,this.disTance([a,s,c],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(d,u))?window.map.getLayer(m.id,"modelId")&&this.emit("leave",m):window.map.getLayer(m.id,"modelId")||this.emit("enter",m)})},200));mars3d?(a&&a!=null&&(this.modelArray=a),this.showModelArray=[],this.Cesium=mars3d.Cesium,this.events={}):console.error("未引入指定插件")}on(a,s){a=="enter"||a=="leave"?this.events[a]?this.events[a].push(s):this.events[a]=[s]:console.log("未开放自定义")}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}once(a,s){const c=()=>{s(),this.off(a,c)};this.on(a,c)}say(a){return this[a]}add(a,s){this[a].push(s)}remove(a,s){this[a]=this[a].filter(function(c){return c!==s})}initial(){this.modelArray=[],this.events={}}updateCustomExcavationDetails(a,s,c,d=[],u={}){let m,g,_;switch(m=this.modelArray.find(S=>S.modelId==a).customize.bimModelExcavationDetails,_=m.find((S,b)=>{if(S.id==s)return g=b,S}),c){case"delete":m.splice(g,1);break;case"update":_.excavationDetails=d;break;case"add":m.push(u);break;case"edit":_.excavationDetails=u.excavationDetails,_.kId=u.kId;break}return m}resourceRelease(){window.map.viewer.camera.moveEnd.addEventListener(()=>{this.freed()})}freed(){let{alt:a}=window.map.getCameraView();a<2e4&&(this.freed=ec.throttle(()=>{let{lng:s,lat:c,alt:d,pitch:u}=window.map.getCameraView();this.modelArray&&this.modelArray.forEach(m=>{let g=m.bimModel.releasedDistance?m.bimModel.releasedDistance:1e4;m.center&&this.disTance([s,c,d],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(u,g))?window.map.getLayer(m.id,"modelId")&&this.emit("leave",m):this.showModelArray.indexOf(m.id)>=0&&!window.map.getLayer(m.id,"modelId")&&this.emit("enter",m)})},2e3),this.freed())}findPnodeId(a,s,c="id"){let d;if(a){for(var u=0;u<a.length;u++){let m=a[u];if(m[c]==s)return d=m,d;if(m.children&&m.children.length>0&&(d=this.findPnodeId(m.children,s,c),d))return d}return d}}disTance(a,s,c){let d,u,m;return d=Cesium.Cartesian3.fromDegrees(...a),u=Cesium.Cartesian3.fromDegrees(...s),m=Cesium.Cartesian3.distance(d,u),m>c}calculateDistance(a,s){let c=(a+180)%360-180;c=Math.max(-90,Math.min(c,90));let d=(s-s/5)*(Math.abs(c)/90)+s/5;return Math.round(d)}}class fm{constructor(a=[],s){mars3d?(this.entityArr=a,this.entityLayer=new mars3d.layer.GraphicLayer({entityId:"bimEntity"}),window.map.addLayer(this.entityLayer),this.entityItem=null,this.events={},this.entityCloneLayer):console.error("未引入指定插件")}on(a,s){a=="change"||a=="collection"?this.events[a]?this.events[a].push(s):this.events[a]=[s]:console.log("未开放自定义")}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}offAll(){this.events={}}once(a,s){const c=()=>{s(),this.off(a,c)};this.on(a,c)}add(a,s=null,c){return new Promise((d,u)=>{var m;if(this.entityLayer){let g,_,S;if(c==null?void 0:c.isClone)this.entityCloneLayer&&(_=this.query(a),_?(S=JSON.parse(_.bimPlanPainting.graphic),S.attr=S.attr||{},S.attr.entityId=a,this.entityCloneLayer.addGraphic(S)):d({tite:"【标绘】 ID:「"+a+"」已删除",type:"error",id:a}));else{if(typeof a!="object"?(g=this.entityLayer.getGraphicByAttr(a,"entityId"),_=this.query(a),_?(S=JSON.parse(_.bimPlanPainting.graphic),S.attr=S.attr||{},S.attr.entityId=a):d({tite:"【标绘】ID:「"+a+"」已删除",type:"error",id:a})):(g=this.entityLayer.getGraphicByAttr(a.id,"entityId"),S=JSON.parse(JSON.stringify(a)),S.attr=S.attr||{},S.attr.entityId=S.attr.entityId||s,S.attr==null?S.attr={entityId:a.id}:((m=S.attr)==null?void 0:m.entityId)==null&&s&&(S.attr.entityId=s)),g)return d();this.entityLayer.addGraphic(S),d(S)}}else d(),console.error("未初始化标绘实例图层")})}query(a){return this.entityArr.length==0?!1:this.entityArr.find(s=>s.id==a)}queryEntity(a){if(bimEntity.entityLayer)return bimEntity.entityLayer.getGraphicByAttr(a,"entityId")}selected(a,s=null){let c=this.entityLayer.getGraphicByAttr(a,"entityId");s==null||s.isClone,(c.options.type=="div"||c.options.type=="point")&&c._point?c.flyTo({radius:c._point._alt+500<500?5e3:c._point._alt+500}):c.flyTo()}remove(a,s=null){(s==null?void 0:s.isClone)?this.entityCloneLayer&&this.entityCloneLayer.getGraphicByAttr(a,"entityId").remove():this.entityLayer.getGraphicByAttr(a,"entityId")&&(this.entityLayer.getGraphicByAttr(a,"entityId").remove(),this.entityItem&&(this.entityItem._state=="destroy"||this.entityItem.options.attr.entityId==a)&&(this.entityItem=null))}entityCloneLayerInit(){(this.entityCloneLayer==null||this.entityCloneLayer.state=="destroy")&&(this.entityCloneLayer=window.mapClone._mapEx.getLayer("bimEntity","entityId"))}entityCloneLayerRemove(){this.entityCloneLayer.remove(),this.entityCloneLayer=null}removeEntityItem(){this.entityItem=null}updateData(a){this.entityArr=a}startDrawGraphic(a){return new Promise((s,c)=>{let{type:d,style:u}=a;if(a.style.drawShow=!0,d=="div")if(u.html)this.entityLayer.startDraw(a).then(m=>{setTimeout(()=>{this.entityItem=m,this.entityLayer.startEditing(m)},500)});else{let{title:m,divType:g,theme_color:_,font_color:S,scaleByDistance:b,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M}=u,R={type:"div",style:{pointerEvents:!0,scaleByDistance:b,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M,horizontalOrigin:Cesium.HorizontalOrigin.LEFT,verticalOrigin:Cesium.VerticalOrigin.BOTTOM}};switch(g){case"1":R.style.html=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${_};--theme-font-color1:${S};">
2637
2637
  <div class="title">${m}</div>
2638
2638
  </div>`,R.style.horizontalOrigin=Cesium.HorizontalOrigin.CENTER;break}this.entityLayer.startDraw(R).then(C=>{setTimeout(()=>{this.entityItem=C,this.entityLayer.startEditing(C),s(C)},500)})}else this.entityLayer.startDraw(a).then(m=>{setTimeout(()=>{this.entityItem=m,this.entityLayer.startEditing(m),s(m)},500)})})}stopDraw(a=!0){this.entityLayer&&this.entityLayer.stopDraw(),a&&this.entityItem&&(this.entityItem.stopEditing(),this.entityItem.remove(),this.entityItem=null)}updateEntityItem(a){let s=this.entityLayer.getGraphicByAttr(a,"entityId");s?this.entityItem=s:this.removeEntityItem()}edit(a,s,c,d){let u=bf(s,c);if(s.vectorStyle&&this.entityItem)if(s.vectorStyle.divType==5)this.entityItem.setStyle({...u,horizontalOrigin:Cesium.HorizontalOrigin.LEFT});else{if(this.entityItem.type=="circleP"&&Object.keys(u).length==1&&Object.keys(u)[0]=="radius"&&u.radius==this.entityItem.options.style.radius)return!1;this.entityItem.setStyle({...u,horizontalOrigin:Cesium.HorizontalOrigin.CENTER})}}enableDragging(a=!0){a?this.entityLayer.startEditing(this.entityItem):(this.entityLayer.stopDraw(),this.entityItem&&this.entityItem.stopEditing())}addRightMenu(){this.entityLayer.bindContextMenu([{text:"编辑对象",callback:a=>{this.emit("change",a)}},{text:"收藏对象",callback:a=>{this.emit("collection",a)}}])}removeRightMenu(){this.entityLayer.hasContextMenu()&&this.entityLayer.unbindContextMenu()}processDivData(a){let s={"--theme-color1":"theme_color","--theme-font-color1":"font_color","--theme-color2":"theme_color2","--theme-color3":"theme_color3"},c={title:"",theme_color:"",font_color:"",content:"",divType:"",divStyle:{},isMirror:!1};const d=document.createElement("div");d.innerHTML=a;const u=d.querySelector(".entity-div-style");return console.log("解耦",u),Object.keys(s).forEach(m=>{m=="--theme-color2"||m=="--theme-color3"?c.divStyle[s[m]]=u.style.getPropertyValue(m)||"#fff":c[s[m]]=u.style.getPropertyValue(m)}),c.title=u.querySelector(".title")?u.querySelector(".title").innerText:"标题",c.content=u.querySelector(".content")?u.querySelector(".content").innerText:"内容",c.divType=u.classList[1]?u.classList[1].replace("entity-div-style",""):"",c.isMirror=u.classList.contains("isMirror"),console.log("解耦",c),c}updateHtml(a,s){let{theme_color:c,font_color:d,title:u,content:m,divStyle:g}=s,{theme_color2:_,theme_color3:S}=g,b="";switch(a){case"1":b=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${c};--theme-font-color1:${d};">
2639
2639
  <div class="title">${u}</div>
@@ -2682,8 +2682,8 @@ function print() { __p += __j.call(arguments, '') }
2682
2682
 
2683
2683
  JSZip uses the library pako released under the MIT license :
2684
2684
  https://github.com/nodeca/pako/blob/main/LICENSE
2685
- */(function(x,a){(function(s){x.exports=s()})(function(){return function s(c,d,u){function m(S,b){if(!d[S]){if(!c[S]){var O=typeof hu=="function"&&hu;if(!b&&O)return O(S,!0);if(g)return g(S,!0);var k=new Error("Cannot find module '"+S+"'");throw k.code="MODULE_NOT_FOUND",k}var D=d[S]={exports:{}};c[S][0].call(D.exports,function(F){var E=c[S][1][F];return m(E||F)},D,D.exports,s,c,d,u)}return d[S].exports}for(var g=typeof hu=="function"&&hu,_=0;_<u.length;_++)m(u[_]);return m}({1:[function(s,c,d){var u=s("./utils"),m=s("./support"),g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";d.encode=function(_){for(var S,b,O,k,D,F,E,L=[],T=0,M=_.length,R=M,C=u.getTypeOf(_)!=="string";T<_.length;)R=M-T,O=C?(S=_[T++],b=T<M?_[T++]:0,T<M?_[T++]:0):(S=_.charCodeAt(T++),b=T<M?_.charCodeAt(T++):0,T<M?_.charCodeAt(T++):0),k=S>>2,D=(3&S)<<4|b>>4,F=1<R?(15&b)<<2|O>>6:64,E=2<R?63&O:64,L.push(g.charAt(k)+g.charAt(D)+g.charAt(F)+g.charAt(E));return L.join("")},d.decode=function(_){var S,b,O,k,D,F,E=0,L=0,T="data:";if(_.substr(0,T.length)===T)throw new Error("Invalid base64 input, it looks like a data url.");var M,R=3*(_=_.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(_.charAt(_.length-1)===g.charAt(64)&&R--,_.charAt(_.length-2)===g.charAt(64)&&R--,R%1!=0)throw new Error("Invalid base64 input, bad content length.");for(M=m.uint8array?new Uint8Array(0|R):new Array(0|R);E<_.length;)S=g.indexOf(_.charAt(E++))<<2|(k=g.indexOf(_.charAt(E++)))>>4,b=(15&k)<<4|(D=g.indexOf(_.charAt(E++)))>>2,O=(3&D)<<6|(F=g.indexOf(_.charAt(E++))),M[L++]=S,D!==64&&(M[L++]=b),F!==64&&(M[L++]=O);return M}},{"./support":30,"./utils":32}],2:[function(s,c,d){var u=s("./external"),m=s("./stream/DataWorker"),g=s("./stream/Crc32Probe"),_=s("./stream/DataLengthProbe");function S(b,O,k,D,F){this.compressedSize=b,this.uncompressedSize=O,this.crc32=k,this.compression=D,this.compressedContent=F}S.prototype={getContentWorker:function(){var b=new m(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new _("data_length")),O=this;return b.on("end",function(){if(this.streamInfo.data_length!==O.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),b},getCompressedWorker:function(){return new m(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},S.createWorkerFrom=function(b,O,k){return b.pipe(new g).pipe(new _("uncompressedSize")).pipe(O.compressWorker(k)).pipe(new _("compressedSize")).withStreamInfo("compression",O)},c.exports=S},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(s,c,d){var u=s("./stream/GenericWorker");d.STORE={magic:"\0\0",compressWorker:function(){return new u("STORE compression")},uncompressWorker:function(){return new u("STORE decompression")}},d.DEFLATE=s("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(s,c,d){var u=s("./utils"),m=function(){for(var g,_=[],S=0;S<256;S++){g=S;for(var b=0;b<8;b++)g=1&g?3988292384^g>>>1:g>>>1;_[S]=g}return _}();c.exports=function(g,_){return g!==void 0&&g.length?u.getTypeOf(g)!=="string"?function(S,b,O,k){var D=m,F=k+O;S^=-1;for(var E=k;E<F;E++)S=S>>>8^D[255&(S^b[E])];return-1^S}(0|_,g,g.length,0):function(S,b,O,k){var D=m,F=k+O;S^=-1;for(var E=k;E<F;E++)S=S>>>8^D[255&(S^b.charCodeAt(E))];return-1^S}(0|_,g,g.length,0):0}},{"./utils":32}],5:[function(s,c,d){d.base64=!1,d.binary=!1,d.dir=!1,d.createFolders=!0,d.date=null,d.compression=null,d.compressionOptions=null,d.comment=null,d.unixPermissions=null,d.dosPermissions=null},{}],6:[function(s,c,d){var u=null;u=typeof Promise<"u"?Promise:s("lie"),c.exports={Promise:u}},{lie:37}],7:[function(s,c,d){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",m=s("pako"),g=s("./utils"),_=s("./stream/GenericWorker"),S=u?"uint8array":"array";function b(O,k){_.call(this,"FlateWorker/"+O),this._pako=null,this._pakoAction=O,this._pakoOptions=k,this.meta={}}d.magic="\b\0",g.inherits(b,_),b.prototype.processChunk=function(O){this.meta=O.meta,this._pako===null&&this._createPako(),this._pako.push(g.transformTo(S,O.data),!1)},b.prototype.flush=function(){_.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},b.prototype.cleanUp=function(){_.prototype.cleanUp.call(this),this._pako=null},b.prototype._createPako=function(){this._pako=new m[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var O=this;this._pako.onData=function(k){O.push({data:k,meta:O.meta})}},d.compressWorker=function(O){return new b("Deflate",O)},d.uncompressWorker=function(){return new b("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(s,c,d){function u(D,F){var E,L="";for(E=0;E<F;E++)L+=String.fromCharCode(255&D),D>>>=8;return L}function m(D,F,E,L,T,M){var R,C,U=D.file,N=D.compression,X=M!==S.utf8encode,K=g.transformTo("string",M(U.name)),Z=g.transformTo("string",S.utf8encode(U.name)),ct=U.comment,Rt=g.transformTo("string",M(ct)),et=g.transformTo("string",S.utf8encode(ct)),_t=Z.length!==U.name.length,G=et.length!==ct.length,Pt="",Et="",At="",ce=U.dir,re=U.date,Ft={crc32:0,compressedSize:0,uncompressedSize:0};F&&!E||(Ft.crc32=D.crc32,Ft.compressedSize=D.compressedSize,Ft.uncompressedSize=D.uncompressedSize);var It=0;F&&(It|=8),X||!_t&&!G||(It|=2048);var Nt=0,Pe=0;ce&&(Nt|=16),T==="UNIX"?(Pe=798,Nt|=function(Wt,$e){var Si=Wt;return Wt||(Si=$e?16893:33204),(65535&Si)<<16}(U.unixPermissions,ce)):(Pe=20,Nt|=function(Wt){return 63&(Wt||0)}(U.dosPermissions)),R=re.getUTCHours(),R<<=6,R|=re.getUTCMinutes(),R<<=5,R|=re.getUTCSeconds()/2,C=re.getUTCFullYear()-1980,C<<=4,C|=re.getUTCMonth()+1,C<<=5,C|=re.getUTCDate(),_t&&(Et=u(1,1)+u(b(K),4)+Z,Pt+="up"+u(Et.length,2)+Et),G&&(At=u(1,1)+u(b(Rt),4)+et,Pt+="uc"+u(At.length,2)+At);var pe="";return pe+=`
2686
- \0`,pe+=u(It,2),pe+=N.magic,pe+=u(R,2),pe+=u(C,2),pe+=u(Ft.crc32,4),pe+=u(Ft.compressedSize,4),pe+=u(Ft.uncompressedSize,4),pe+=u(K.length,2),pe+=u(Pt.length,2),{fileRecord:O.LOCAL_FILE_HEADER+pe+K+Pt,dirRecord:O.CENTRAL_FILE_HEADER+u(Pe,2)+pe+u(Rt.length,2)+"\0\0\0\0"+u(Nt,4)+u(L,4)+K+Pt+Rt}}var g=s("../utils"),_=s("../stream/GenericWorker"),S=s("../utf8"),b=s("../crc32"),O=s("../signature");function k(D,F,E,L){_.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=F,this.zipPlatform=E,this.encodeFileName=L,this.streamFiles=D,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}g.inherits(k,_),k.prototype.push=function(D){var F=D.meta.percent||0,E=this.entriesCount,L=this._sources.length;this.accumulate?this.contentBuffer.push(D):(this.bytesWritten+=D.data.length,_.prototype.push.call(this,{data:D.data,meta:{currentFile:this.currentFile,percent:E?(F+100*(E-L-1))/E:100}}))},k.prototype.openedSource=function(D){this.currentSourceOffset=this.bytesWritten,this.currentFile=D.file.name;var F=this.streamFiles&&!D.file.dir;if(F){var E=m(D,F,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},k.prototype.closedSource=function(D){this.accumulate=!1;var F=this.streamFiles&&!D.file.dir,E=m(D,F,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),F)this.push({data:function(L){return O.DATA_DESCRIPTOR+u(L.crc32,4)+u(L.compressedSize,4)+u(L.uncompressedSize,4)}(D),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},k.prototype.flush=function(){for(var D=this.bytesWritten,F=0;F<this.dirRecords.length;F++)this.push({data:this.dirRecords[F],meta:{percent:100}});var E=this.bytesWritten-D,L=function(T,M,R,C,U){var N=g.transformTo("string",U(C));return O.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(T,2)+u(T,2)+u(M,4)+u(R,4)+u(N.length,2)+N}(this.dirRecords.length,E,D,this.zipComment,this.encodeFileName);this.push({data:L,meta:{percent:100}})},k.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},k.prototype.registerPrevious=function(D){this._sources.push(D);var F=this;return D.on("data",function(E){F.processChunk(E)}),D.on("end",function(){F.closedSource(F.previous.streamInfo),F._sources.length?F.prepareNextSource():F.end()}),D.on("error",function(E){F.error(E)}),this},k.prototype.resume=function(){return!!_.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},k.prototype.error=function(D){var F=this._sources;if(!_.prototype.error.call(this,D))return!1;for(var E=0;E<F.length;E++)try{F[E].error(D)}catch{}return!0},k.prototype.lock=function(){_.prototype.lock.call(this);for(var D=this._sources,F=0;F<D.length;F++)D[F].lock()},c.exports=k},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(s,c,d){var u=s("../compressions"),m=s("./ZipFileWorker");d.generateWorker=function(g,_,S){var b=new m(_.streamFiles,S,_.platform,_.encodeFileName),O=0;try{g.forEach(function(k,D){O++;var F=function(M,R){var C=M||R,U=u[C];if(!U)throw new Error(C+" is not a valid compression method !");return U}(D.options.compression,_.compression),E=D.options.compressionOptions||_.compressionOptions||{},L=D.dir,T=D.date;D._compressWorker(F,E).withStreamInfo("file",{name:k,dir:L,date:T,comment:D.comment||"",unixPermissions:D.unixPermissions,dosPermissions:D.dosPermissions}).pipe(b)}),b.entriesCount=O}catch(k){b.error(k)}return b}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(s,c,d){function u(){if(!(this instanceof u))return new u;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var m=new u;for(var g in this)typeof this[g]!="function"&&(m[g]=this[g]);return m}}(u.prototype=s("./object")).loadAsync=s("./load"),u.support=s("./support"),u.defaults=s("./defaults"),u.version="3.10.1",u.loadAsync=function(m,g){return new u().loadAsync(m,g)},u.external=s("./external"),c.exports=u},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(s,c,d){var u=s("./utils"),m=s("./external"),g=s("./utf8"),_=s("./zipEntries"),S=s("./stream/Crc32Probe"),b=s("./nodejsUtils");function O(k){return new m.Promise(function(D,F){var E=k.decompressed.getContentWorker().pipe(new S);E.on("error",function(L){F(L)}).on("end",function(){E.streamInfo.crc32!==k.decompressed.crc32?F(new Error("Corrupted zip : CRC32 mismatch")):D()}).resume()})}c.exports=function(k,D){var F=this;return D=u.extend(D||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:g.utf8decode}),b.isNode&&b.isStream(k)?m.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",k,!0,D.optimizedBinaryString,D.base64).then(function(E){var L=new _(D);return L.load(E),L}).then(function(E){var L=[m.Promise.resolve(E)],T=E.files;if(D.checkCRC32)for(var M=0;M<T.length;M++)L.push(O(T[M]));return m.Promise.all(L)}).then(function(E){for(var L=E.shift(),T=L.files,M=0;M<T.length;M++){var R=T[M],C=R.fileNameStr,U=u.resolve(R.fileNameStr);F.file(U,R.decompressed,{binary:!0,optimizedBinaryString:!0,date:R.date,dir:R.dir,comment:R.fileCommentStr.length?R.fileCommentStr:null,unixPermissions:R.unixPermissions,dosPermissions:R.dosPermissions,createFolders:D.createFolders}),R.dir||(F.file(U).unsafeOriginalName=C)}return L.zipComment.length&&(F.comment=L.zipComment),F})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(s,c,d){var u=s("../utils"),m=s("../stream/GenericWorker");function g(_,S){m.call(this,"Nodejs stream input adapter for "+_),this._upstreamEnded=!1,this._bindStream(S)}u.inherits(g,m),g.prototype._bindStream=function(_){var S=this;(this._stream=_).pause(),_.on("data",function(b){S.push({data:b,meta:{percent:0}})}).on("error",function(b){S.isPaused?this.generatedError=b:S.error(b)}).on("end",function(){S.isPaused?S._upstreamEnded=!0:S.end()})},g.prototype.pause=function(){return!!m.prototype.pause.call(this)&&(this._stream.pause(),!0)},g.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},c.exports=g},{"../stream/GenericWorker":28,"../utils":32}],13:[function(s,c,d){var u=s("readable-stream").Readable;function m(g,_,S){u.call(this,_),this._helper=g;var b=this;g.on("data",function(O,k){b.push(O)||b._helper.pause(),S&&S(k)}).on("error",function(O){b.emit("error",O)}).on("end",function(){b.push(null)})}s("../utils").inherits(m,u),m.prototype._read=function(){this._helper.resume()},c.exports=m},{"../utils":32,"readable-stream":16}],14:[function(s,c,d){c.exports={isNode:typeof Buffer<"u",newBufferFrom:function(u,m){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(u,m);if(typeof u=="number")throw new Error('The "data" argument must not be a number');return new Buffer(u,m)},allocBuffer:function(u){if(Buffer.alloc)return Buffer.alloc(u);var m=new Buffer(u);return m.fill(0),m},isBuffer:function(u){return Buffer.isBuffer(u)},isStream:function(u){return u&&typeof u.on=="function"&&typeof u.pause=="function"&&typeof u.resume=="function"}}},{}],15:[function(s,c,d){function u(U,N,X){var K,Z=g.getTypeOf(N),ct=g.extend(X||{},b);ct.date=ct.date||new Date,ct.compression!==null&&(ct.compression=ct.compression.toUpperCase()),typeof ct.unixPermissions=="string"&&(ct.unixPermissions=parseInt(ct.unixPermissions,8)),ct.unixPermissions&&16384&ct.unixPermissions&&(ct.dir=!0),ct.dosPermissions&&16&ct.dosPermissions&&(ct.dir=!0),ct.dir&&(U=T(U)),ct.createFolders&&(K=L(U))&&M.call(this,K,!0);var Rt=Z==="string"&&ct.binary===!1&&ct.base64===!1;X&&X.binary!==void 0||(ct.binary=!Rt),(N instanceof O&&N.uncompressedSize===0||ct.dir||!N||N.length===0)&&(ct.base64=!1,ct.binary=!0,N="",ct.compression="STORE",Z="string");var et=null;et=N instanceof O||N instanceof _?N:F.isNode&&F.isStream(N)?new E(U,N):g.prepareContent(U,N,ct.binary,ct.optimizedBinaryString,ct.base64);var _t=new k(U,et,ct);this.files[U]=_t}var m=s("./utf8"),g=s("./utils"),_=s("./stream/GenericWorker"),S=s("./stream/StreamHelper"),b=s("./defaults"),O=s("./compressedObject"),k=s("./zipObject"),D=s("./generate"),F=s("./nodejsUtils"),E=s("./nodejs/NodejsStreamInputAdapter"),L=function(U){U.slice(-1)==="/"&&(U=U.substring(0,U.length-1));var N=U.lastIndexOf("/");return 0<N?U.substring(0,N):""},T=function(U){return U.slice(-1)!=="/"&&(U+="/"),U},M=function(U,N){return N=N!==void 0?N:b.createFolders,U=T(U),this.files[U]||u.call(this,U,null,{dir:!0,createFolders:N}),this.files[U]};function R(U){return Object.prototype.toString.call(U)==="[object RegExp]"}var C={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(U){var N,X,K;for(N in this.files)K=this.files[N],(X=N.slice(this.root.length,N.length))&&N.slice(0,this.root.length)===this.root&&U(X,K)},filter:function(U){var N=[];return this.forEach(function(X,K){U(X,K)&&N.push(K)}),N},file:function(U,N,X){if(arguments.length!==1)return U=this.root+U,u.call(this,U,N,X),this;if(R(U)){var K=U;return this.filter(function(ct,Rt){return!Rt.dir&&K.test(ct)})}var Z=this.files[this.root+U];return Z&&!Z.dir?Z:null},folder:function(U){if(!U)return this;if(R(U))return this.filter(function(Z,ct){return ct.dir&&U.test(Z)});var N=this.root+U,X=M.call(this,N),K=this.clone();return K.root=X.name,K},remove:function(U){U=this.root+U;var N=this.files[U];if(N||(U.slice(-1)!=="/"&&(U+="/"),N=this.files[U]),N&&!N.dir)delete this.files[U];else for(var X=this.filter(function(Z,ct){return ct.name.slice(0,U.length)===U}),K=0;K<X.length;K++)delete this.files[X[K].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(U){var N,X={};try{if((X=g.extend(U||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:m.utf8encode})).type=X.type.toLowerCase(),X.compression=X.compression.toUpperCase(),X.type==="binarystring"&&(X.type="string"),!X.type)throw new Error("No output type specified.");g.checkSupport(X.type),X.platform!=="darwin"&&X.platform!=="freebsd"&&X.platform!=="linux"&&X.platform!=="sunos"||(X.platform="UNIX"),X.platform==="win32"&&(X.platform="DOS");var K=X.comment||this.comment||"";N=D.generateWorker(this,X,K)}catch(Z){(N=new _("error")).error(Z)}return new S(N,X.type||"string",X.mimeType)},generateAsync:function(U,N){return this.generateInternalStream(U).accumulate(N)},generateNodeStream:function(U,N){return(U=U||{}).type||(U.type="nodebuffer"),this.generateInternalStream(U).toNodejsStream(N)}};c.exports=C},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(s,c,d){c.exports=s("stream")},{stream:void 0}],17:[function(s,c,d){var u=s("./DataReader");function m(g){u.call(this,g);for(var _=0;_<this.data.length;_++)g[_]=255&g[_]}s("../utils").inherits(m,u),m.prototype.byteAt=function(g){return this.data[this.zero+g]},m.prototype.lastIndexOfSignature=function(g){for(var _=g.charCodeAt(0),S=g.charCodeAt(1),b=g.charCodeAt(2),O=g.charCodeAt(3),k=this.length-4;0<=k;--k)if(this.data[k]===_&&this.data[k+1]===S&&this.data[k+2]===b&&this.data[k+3]===O)return k-this.zero;return-1},m.prototype.readAndCheckSignature=function(g){var _=g.charCodeAt(0),S=g.charCodeAt(1),b=g.charCodeAt(2),O=g.charCodeAt(3),k=this.readData(4);return _===k[0]&&S===k[1]&&b===k[2]&&O===k[3]},m.prototype.readData=function(g){if(this.checkOffset(g),g===0)return[];var _=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,_},c.exports=m},{"../utils":32,"./DataReader":18}],18:[function(s,c,d){var u=s("../utils");function m(g){this.data=g,this.length=g.length,this.index=0,this.zero=0}m.prototype={checkOffset:function(g){this.checkIndex(this.index+g)},checkIndex:function(g){if(this.length<this.zero+g||g<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+g+"). Corrupted zip ?")},setIndex:function(g){this.checkIndex(g),this.index=g},skip:function(g){this.setIndex(this.index+g)},byteAt:function(){},readInt:function(g){var _,S=0;for(this.checkOffset(g),_=this.index+g-1;_>=this.index;_--)S=(S<<8)+this.byteAt(_);return this.index+=g,S},readString:function(g){return u.transformTo("string",this.readData(g))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var g=this.readInt(4);return new Date(Date.UTC(1980+(g>>25&127),(g>>21&15)-1,g>>16&31,g>>11&31,g>>5&63,(31&g)<<1))}},c.exports=m},{"../utils":32}],19:[function(s,c,d){var u=s("./Uint8ArrayReader");function m(g){u.call(this,g)}s("../utils").inherits(m,u),m.prototype.readData=function(g){this.checkOffset(g);var _=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,_},c.exports=m},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(s,c,d){var u=s("./DataReader");function m(g){u.call(this,g)}s("../utils").inherits(m,u),m.prototype.byteAt=function(g){return this.data.charCodeAt(this.zero+g)},m.prototype.lastIndexOfSignature=function(g){return this.data.lastIndexOf(g)-this.zero},m.prototype.readAndCheckSignature=function(g){return g===this.readData(4)},m.prototype.readData=function(g){this.checkOffset(g);var _=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,_},c.exports=m},{"../utils":32,"./DataReader":18}],21:[function(s,c,d){var u=s("./ArrayReader");function m(g){u.call(this,g)}s("../utils").inherits(m,u),m.prototype.readData=function(g){if(this.checkOffset(g),g===0)return new Uint8Array(0);var _=this.data.subarray(this.zero+this.index,this.zero+this.index+g);return this.index+=g,_},c.exports=m},{"../utils":32,"./ArrayReader":17}],22:[function(s,c,d){var u=s("../utils"),m=s("../support"),g=s("./ArrayReader"),_=s("./StringReader"),S=s("./NodeBufferReader"),b=s("./Uint8ArrayReader");c.exports=function(O){var k=u.getTypeOf(O);return u.checkSupport(k),k!=="string"||m.uint8array?k==="nodebuffer"?new S(O):m.uint8array?new b(u.transformTo("uint8array",O)):new g(u.transformTo("array",O)):new _(O)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(s,c,d){d.LOCAL_FILE_HEADER="PK",d.CENTRAL_FILE_HEADER="PK",d.CENTRAL_DIRECTORY_END="PK",d.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",d.ZIP64_CENTRAL_DIRECTORY_END="PK",d.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(s,c,d){var u=s("./GenericWorker"),m=s("../utils");function g(_){u.call(this,"ConvertWorker to "+_),this.destType=_}m.inherits(g,u),g.prototype.processChunk=function(_){this.push({data:m.transformTo(this.destType,_.data),meta:_.meta})},c.exports=g},{"../utils":32,"./GenericWorker":28}],25:[function(s,c,d){var u=s("./GenericWorker"),m=s("../crc32");function g(){u.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}s("../utils").inherits(g,u),g.prototype.processChunk=function(_){this.streamInfo.crc32=m(_.data,this.streamInfo.crc32||0),this.push(_)},c.exports=g},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(s,c,d){var u=s("../utils"),m=s("./GenericWorker");function g(_){m.call(this,"DataLengthProbe for "+_),this.propName=_,this.withStreamInfo(_,0)}u.inherits(g,m),g.prototype.processChunk=function(_){if(_){var S=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=S+_.data.length}m.prototype.processChunk.call(this,_)},c.exports=g},{"../utils":32,"./GenericWorker":28}],27:[function(s,c,d){var u=s("../utils"),m=s("./GenericWorker");function g(_){m.call(this,"DataWorker");var S=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,_.then(function(b){S.dataIsReady=!0,S.data=b,S.max=b&&b.length||0,S.type=u.getTypeOf(b),S.isPaused||S._tickAndRepeat()},function(b){S.error(b)})}u.inherits(g,m),g.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this.data=null},g.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,u.delay(this._tickAndRepeat,[],this)),!0)},g.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(u.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},g.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var _=null,S=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":_=this.data.substring(this.index,S);break;case"uint8array":_=this.data.subarray(this.index,S);break;case"array":case"nodebuffer":_=this.data.slice(this.index,S)}return this.index=S,this.push({data:_,meta:{percent:this.max?this.index/this.max*100:0}})},c.exports=g},{"../utils":32,"./GenericWorker":28}],28:[function(s,c,d){function u(m){this.name=m||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}u.prototype={push:function(m){this.emit("data",m)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(m){this.emit("error",m)}return!0},error:function(m){return!this.isFinished&&(this.isPaused?this.generatedError=m:(this.isFinished=!0,this.emit("error",m),this.previous&&this.previous.error(m),this.cleanUp()),!0)},on:function(m,g){return this._listeners[m].push(g),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(m,g){if(this._listeners[m])for(var _=0;_<this._listeners[m].length;_++)this._listeners[m][_].call(this,g)},pipe:function(m){return m.registerPrevious(this)},registerPrevious:function(m){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=m.streamInfo,this.mergeStreamInfo(),this.previous=m;var g=this;return m.on("data",function(_){g.processChunk(_)}),m.on("end",function(){g.end()}),m.on("error",function(_){g.error(_)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var m=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),m=!0),this.previous&&this.previous.resume(),!m},flush:function(){},processChunk:function(m){this.push(m)},withStreamInfo:function(m,g){return this.extraStreamInfo[m]=g,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var m in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,m)&&(this.streamInfo[m]=this.extraStreamInfo[m])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var m="Worker "+this.name;return this.previous?this.previous+" -> "+m:m}},c.exports=u},{}],29:[function(s,c,d){var u=s("../utils"),m=s("./ConvertWorker"),g=s("./GenericWorker"),_=s("../base64"),S=s("../support"),b=s("../external"),O=null;if(S.nodestream)try{O=s("../nodejs/NodejsStreamOutputAdapter")}catch{}function k(F,E){return new b.Promise(function(L,T){var M=[],R=F._internalType,C=F._outputType,U=F._mimeType;F.on("data",function(N,X){M.push(N),E&&E(X)}).on("error",function(N){M=[],T(N)}).on("end",function(){try{var N=function(X,K,Z){switch(X){case"blob":return u.newBlob(u.transformTo("arraybuffer",K),Z);case"base64":return _.encode(K);default:return u.transformTo(X,K)}}(C,function(X,K){var Z,ct=0,Rt=null,et=0;for(Z=0;Z<K.length;Z++)et+=K[Z].length;switch(X){case"string":return K.join("");case"array":return Array.prototype.concat.apply([],K);case"uint8array":for(Rt=new Uint8Array(et),Z=0;Z<K.length;Z++)Rt.set(K[Z],ct),ct+=K[Z].length;return Rt;case"nodebuffer":return Buffer.concat(K);default:throw new Error("concat : unsupported type '"+X+"'")}}(R,M),U);L(N)}catch(X){T(X)}M=[]}).resume()})}function D(F,E,L){var T=E;switch(E){case"blob":case"arraybuffer":T="uint8array";break;case"base64":T="string"}try{this._internalType=T,this._outputType=E,this._mimeType=L,u.checkSupport(T),this._worker=F.pipe(new m(T)),F.lock()}catch(M){this._worker=new g("error"),this._worker.error(M)}}D.prototype={accumulate:function(F){return k(this,F)},on:function(F,E){var L=this;return F==="data"?this._worker.on(F,function(T){E.call(L,T.data,T.meta)}):this._worker.on(F,function(){u.delay(E,arguments,L)}),this},resume:function(){return u.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(F){if(u.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new O(this,{objectMode:this._outputType!=="nodebuffer"},F)}},c.exports=D},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(s,c,d){if(d.base64=!0,d.array=!0,d.string=!0,d.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",d.nodebuffer=typeof Buffer<"u",d.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")d.blob=!1;else{var u=new ArrayBuffer(0);try{d.blob=new Blob([u],{type:"application/zip"}).size===0}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);m.append(u),d.blob=m.getBlob("application/zip").size===0}catch{d.blob=!1}}}try{d.nodestream=!!s("readable-stream").Readable}catch{d.nodestream=!1}},{"readable-stream":16}],31:[function(s,c,d){for(var u=s("./utils"),m=s("./support"),g=s("./nodejsUtils"),_=s("./stream/GenericWorker"),S=new Array(256),b=0;b<256;b++)S[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;S[254]=S[254]=1;function O(){_.call(this,"utf-8 decode"),this.leftOver=null}function k(){_.call(this,"utf-8 encode")}d.utf8encode=function(D){return m.nodebuffer?g.newBufferFrom(D,"utf-8"):function(F){var E,L,T,M,R,C=F.length,U=0;for(M=0;M<C;M++)(64512&(L=F.charCodeAt(M)))==55296&&M+1<C&&(64512&(T=F.charCodeAt(M+1)))==56320&&(L=65536+(L-55296<<10)+(T-56320),M++),U+=L<128?1:L<2048?2:L<65536?3:4;for(E=m.uint8array?new Uint8Array(U):new Array(U),M=R=0;R<U;M++)(64512&(L=F.charCodeAt(M)))==55296&&M+1<C&&(64512&(T=F.charCodeAt(M+1)))==56320&&(L=65536+(L-55296<<10)+(T-56320),M++),L<128?E[R++]=L:(L<2048?E[R++]=192|L>>>6:(L<65536?E[R++]=224|L>>>12:(E[R++]=240|L>>>18,E[R++]=128|L>>>12&63),E[R++]=128|L>>>6&63),E[R++]=128|63&L);return E}(D)},d.utf8decode=function(D){return m.nodebuffer?u.transformTo("nodebuffer",D).toString("utf-8"):function(F){var E,L,T,M,R=F.length,C=new Array(2*R);for(E=L=0;E<R;)if((T=F[E++])<128)C[L++]=T;else if(4<(M=S[T]))C[L++]=65533,E+=M-1;else{for(T&=M===2?31:M===3?15:7;1<M&&E<R;)T=T<<6|63&F[E++],M--;1<M?C[L++]=65533:T<65536?C[L++]=T:(T-=65536,C[L++]=55296|T>>10&1023,C[L++]=56320|1023&T)}return C.length!==L&&(C.subarray?C=C.subarray(0,L):C.length=L),u.applyFromCharCode(C)}(D=u.transformTo(m.uint8array?"uint8array":"array",D))},u.inherits(O,_),O.prototype.processChunk=function(D){var F=u.transformTo(m.uint8array?"uint8array":"array",D.data);if(this.leftOver&&this.leftOver.length){if(m.uint8array){var E=F;(F=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),F.set(E,this.leftOver.length)}else F=this.leftOver.concat(F);this.leftOver=null}var L=function(M,R){var C;for((R=R||M.length)>M.length&&(R=M.length),C=R-1;0<=C&&(192&M[C])==128;)C--;return C<0||C===0?R:C+S[M[C]]>R?C:R}(F),T=F;L!==F.length&&(m.uint8array?(T=F.subarray(0,L),this.leftOver=F.subarray(L,F.length)):(T=F.slice(0,L),this.leftOver=F.slice(L,F.length))),this.push({data:d.utf8decode(T),meta:D.meta})},O.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:d.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},d.Utf8DecodeWorker=O,u.inherits(k,_),k.prototype.processChunk=function(D){this.push({data:d.utf8encode(D.data),meta:D.meta})},d.Utf8EncodeWorker=k},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(s,c,d){var u=s("./support"),m=s("./base64"),g=s("./nodejsUtils"),_=s("./external");function S(E){return E}function b(E,L){for(var T=0;T<E.length;++T)L[T]=255&E.charCodeAt(T);return L}s("setimmediate"),d.newBlob=function(E,L){d.checkSupport("blob");try{return new Blob([E],{type:L})}catch{try{var T=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return T.append(E),T.getBlob(L)}catch{throw new Error("Bug : can't construct the Blob.")}}};var O={stringifyByChunk:function(E,L,T){var M=[],R=0,C=E.length;if(C<=T)return String.fromCharCode.apply(null,E);for(;R<C;)L==="array"||L==="nodebuffer"?M.push(String.fromCharCode.apply(null,E.slice(R,Math.min(R+T,C)))):M.push(String.fromCharCode.apply(null,E.subarray(R,Math.min(R+T,C)))),R+=T;return M.join("")},stringifyByChar:function(E){for(var L="",T=0;T<E.length;T++)L+=String.fromCharCode(E[T]);return L},applyCanBeUsed:{uint8array:function(){try{return u.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return u.nodebuffer&&String.fromCharCode.apply(null,g.allocBuffer(1)).length===1}catch{return!1}}()}};function k(E){var L=65536,T=d.getTypeOf(E),M=!0;if(T==="uint8array"?M=O.applyCanBeUsed.uint8array:T==="nodebuffer"&&(M=O.applyCanBeUsed.nodebuffer),M)for(;1<L;)try{return O.stringifyByChunk(E,T,L)}catch{L=Math.floor(L/2)}return O.stringifyByChar(E)}function D(E,L){for(var T=0;T<E.length;T++)L[T]=E[T];return L}d.applyFromCharCode=k;var F={};F.string={string:S,array:function(E){return b(E,new Array(E.length))},arraybuffer:function(E){return F.string.uint8array(E).buffer},uint8array:function(E){return b(E,new Uint8Array(E.length))},nodebuffer:function(E){return b(E,g.allocBuffer(E.length))}},F.array={string:k,array:S,arraybuffer:function(E){return new Uint8Array(E).buffer},uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return g.newBufferFrom(E)}},F.arraybuffer={string:function(E){return k(new Uint8Array(E))},array:function(E){return D(new Uint8Array(E),new Array(E.byteLength))},arraybuffer:S,uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return g.newBufferFrom(new Uint8Array(E))}},F.uint8array={string:k,array:function(E){return D(E,new Array(E.length))},arraybuffer:function(E){return E.buffer},uint8array:S,nodebuffer:function(E){return g.newBufferFrom(E)}},F.nodebuffer={string:k,array:function(E){return D(E,new Array(E.length))},arraybuffer:function(E){return F.nodebuffer.uint8array(E).buffer},uint8array:function(E){return D(E,new Uint8Array(E.length))},nodebuffer:S},d.transformTo=function(E,L){if(L=L||"",!E)return L;d.checkSupport(E);var T=d.getTypeOf(L);return F[T][E](L)},d.resolve=function(E){for(var L=E.split("/"),T=[],M=0;M<L.length;M++){var R=L[M];R==="."||R===""&&M!==0&&M!==L.length-1||(R===".."?T.pop():T.push(R))}return T.join("/")},d.getTypeOf=function(E){return typeof E=="string"?"string":Object.prototype.toString.call(E)==="[object Array]"?"array":u.nodebuffer&&g.isBuffer(E)?"nodebuffer":u.uint8array&&E instanceof Uint8Array?"uint8array":u.arraybuffer&&E instanceof ArrayBuffer?"arraybuffer":void 0},d.checkSupport=function(E){if(!u[E.toLowerCase()])throw new Error(E+" is not supported by this platform")},d.MAX_VALUE_16BITS=65535,d.MAX_VALUE_32BITS=-1,d.pretty=function(E){var L,T,M="";for(T=0;T<(E||"").length;T++)M+="\\x"+((L=E.charCodeAt(T))<16?"0":"")+L.toString(16).toUpperCase();return M},d.delay=function(E,L,T){setImmediate(function(){E.apply(T||null,L||[])})},d.inherits=function(E,L){function T(){}T.prototype=L.prototype,E.prototype=new T},d.extend=function(){var E,L,T={};for(E=0;E<arguments.length;E++)for(L in arguments[E])Object.prototype.hasOwnProperty.call(arguments[E],L)&&T[L]===void 0&&(T[L]=arguments[E][L]);return T},d.prepareContent=function(E,L,T,M,R){return _.Promise.resolve(L).then(function(C){return u.blob&&(C instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(C))!==-1)&&typeof FileReader<"u"?new _.Promise(function(U,N){var X=new FileReader;X.onload=function(K){U(K.target.result)},X.onerror=function(K){N(K.target.error)},X.readAsArrayBuffer(C)}):C}).then(function(C){var U=d.getTypeOf(C);return U?(U==="arraybuffer"?C=d.transformTo("uint8array",C):U==="string"&&(R?C=m.decode(C):T&&M!==!0&&(C=function(N){return b(N,u.uint8array?new Uint8Array(N.length):new Array(N.length))}(C))),C):_.Promise.reject(new Error("Can't read the data of '"+E+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(s,c,d){var u=s("./reader/readerFor"),m=s("./utils"),g=s("./signature"),_=s("./zipEntry"),S=s("./support");function b(O){this.files=[],this.loadOptions=O}b.prototype={checkSignature:function(O){if(!this.reader.readAndCheckSignature(O)){this.reader.index-=4;var k=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+m.pretty(k)+", expected "+m.pretty(O)+")")}},isSignature:function(O,k){var D=this.reader.index;this.reader.setIndex(O);var F=this.reader.readString(4)===k;return this.reader.setIndex(D),F},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var O=this.reader.readData(this.zipCommentLength),k=S.uint8array?"uint8array":"array",D=m.transformTo(k,O);this.zipComment=this.loadOptions.decodeFileName(D)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var O,k,D,F=this.zip64EndOfCentralSize-44;0<F;)O=this.reader.readInt(2),k=this.reader.readInt(4),D=this.reader.readData(k),this.zip64ExtensibleData[O]={id:O,length:k,value:D}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var O,k;for(O=0;O<this.files.length;O++)k=this.files[O],this.reader.setIndex(k.localHeaderOffset),this.checkSignature(g.LOCAL_FILE_HEADER),k.readLocalPart(this.reader),k.handleUTF8(),k.processAttributes()},readCentralDir:function(){var O;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(g.CENTRAL_FILE_HEADER);)(O=new _({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(O);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var O=this.reader.lastIndexOfSignature(g.CENTRAL_DIRECTORY_END);if(O<0)throw this.isSignature(0,g.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(O);var k=O;if(this.checkSignature(g.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===m.MAX_VALUE_16BITS||this.diskWithCentralDirStart===m.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===m.MAX_VALUE_16BITS||this.centralDirRecords===m.MAX_VALUE_16BITS||this.centralDirSize===m.MAX_VALUE_32BITS||this.centralDirOffset===m.MAX_VALUE_32BITS){if(this.zip64=!0,(O=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(O),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,g.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var D=this.centralDirOffset+this.centralDirSize;this.zip64&&(D+=20,D+=12+this.zip64EndOfCentralSize);var F=k-D;if(0<F)this.isSignature(k,g.CENTRAL_FILE_HEADER)||(this.reader.zero=F);else if(F<0)throw new Error("Corrupted zip: missing "+Math.abs(F)+" bytes.")},prepareReader:function(O){this.reader=u(O)},load:function(O){this.prepareReader(O),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},c.exports=b},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(s,c,d){var u=s("./reader/readerFor"),m=s("./utils"),g=s("./compressedObject"),_=s("./crc32"),S=s("./utf8"),b=s("./compressions"),O=s("./support");function k(D,F){this.options=D,this.loadOptions=F}k.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(D){var F,E;if(D.skip(22),this.fileNameLength=D.readInt(2),E=D.readInt(2),this.fileName=D.readData(this.fileNameLength),D.skip(E),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((F=function(L){for(var T in b)if(Object.prototype.hasOwnProperty.call(b,T)&&b[T].magic===L)return b[T];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+m.pretty(this.compressionMethod)+" unknown (inner file : "+m.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,F,D.readData(this.compressedSize))},readCentralPart:function(D){this.versionMadeBy=D.readInt(2),D.skip(2),this.bitFlag=D.readInt(2),this.compressionMethod=D.readString(2),this.date=D.readDate(),this.crc32=D.readInt(4),this.compressedSize=D.readInt(4),this.uncompressedSize=D.readInt(4);var F=D.readInt(2);if(this.extraFieldsLength=D.readInt(2),this.fileCommentLength=D.readInt(2),this.diskNumberStart=D.readInt(2),this.internalFileAttributes=D.readInt(2),this.externalFileAttributes=D.readInt(4),this.localHeaderOffset=D.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");D.skip(F),this.readExtraFields(D),this.parseZIP64ExtraField(D),this.fileComment=D.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var D=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),D==0&&(this.dosPermissions=63&this.externalFileAttributes),D==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var D=u(this.extraFields[1].value);this.uncompressedSize===m.MAX_VALUE_32BITS&&(this.uncompressedSize=D.readInt(8)),this.compressedSize===m.MAX_VALUE_32BITS&&(this.compressedSize=D.readInt(8)),this.localHeaderOffset===m.MAX_VALUE_32BITS&&(this.localHeaderOffset=D.readInt(8)),this.diskNumberStart===m.MAX_VALUE_32BITS&&(this.diskNumberStart=D.readInt(4))}},readExtraFields:function(D){var F,E,L,T=D.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});D.index+4<T;)F=D.readInt(2),E=D.readInt(2),L=D.readData(E),this.extraFields[F]={id:F,length:E,value:L};D.setIndex(T)},handleUTF8:function(){var D=O.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=S.utf8decode(this.fileName),this.fileCommentStr=S.utf8decode(this.fileComment);else{var F=this.findExtraFieldUnicodePath();if(F!==null)this.fileNameStr=F;else{var E=m.transformTo(D,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(E)}var L=this.findExtraFieldUnicodeComment();if(L!==null)this.fileCommentStr=L;else{var T=m.transformTo(D,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(T)}}},findExtraFieldUnicodePath:function(){var D=this.extraFields[28789];if(D){var F=u(D.value);return F.readInt(1)!==1||_(this.fileName)!==F.readInt(4)?null:S.utf8decode(F.readData(D.length-5))}return null},findExtraFieldUnicodeComment:function(){var D=this.extraFields[25461];if(D){var F=u(D.value);return F.readInt(1)!==1||_(this.fileComment)!==F.readInt(4)?null:S.utf8decode(F.readData(D.length-5))}return null}},c.exports=k},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(s,c,d){function u(F,E,L){this.name=F,this.dir=L.dir,this.date=L.date,this.comment=L.comment,this.unixPermissions=L.unixPermissions,this.dosPermissions=L.dosPermissions,this._data=E,this._dataBinary=L.binary,this.options={compression:L.compression,compressionOptions:L.compressionOptions}}var m=s("./stream/StreamHelper"),g=s("./stream/DataWorker"),_=s("./utf8"),S=s("./compressedObject"),b=s("./stream/GenericWorker");u.prototype={internalStream:function(F){var E=null,L="string";try{if(!F)throw new Error("No output type specified.");var T=(L=F.toLowerCase())==="string"||L==="text";L!=="binarystring"&&L!=="text"||(L="string"),E=this._decompressWorker();var M=!this._dataBinary;M&&!T&&(E=E.pipe(new _.Utf8EncodeWorker)),!M&&T&&(E=E.pipe(new _.Utf8DecodeWorker))}catch(R){(E=new b("error")).error(R)}return new m(E,L,"")},async:function(F,E){return this.internalStream(F).accumulate(E)},nodeStream:function(F,E){return this.internalStream(F||"nodebuffer").toNodejsStream(E)},_compressWorker:function(F,E){if(this._data instanceof S&&this._data.compression.magic===F.magic)return this._data.getCompressedWorker();var L=this._decompressWorker();return this._dataBinary||(L=L.pipe(new _.Utf8EncodeWorker)),S.createWorkerFrom(L,F,E)},_decompressWorker:function(){return this._data instanceof S?this._data.getContentWorker():this._data instanceof b?this._data:new g(this._data)}};for(var O=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],k=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},D=0;D<O.length;D++)u.prototype[O[D]]=k;c.exports=u},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(s,c,d){(function(u){var m,g,_=u.MutationObserver||u.WebKitMutationObserver;if(_){var S=0,b=new _(F),O=u.document.createTextNode("");b.observe(O,{characterData:!0}),m=function(){O.data=S=++S%2}}else if(u.setImmediate||u.MessageChannel===void 0)m="document"in u&&"onreadystatechange"in u.document.createElement("script")?function(){var E=u.document.createElement("script");E.onreadystatechange=function(){F(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},u.document.documentElement.appendChild(E)}:function(){setTimeout(F,0)};else{var k=new u.MessageChannel;k.port1.onmessage=F,m=function(){k.port2.postMessage(0)}}var D=[];function F(){var E,L;g=!0;for(var T=D.length;T;){for(L=D,D=[],E=-1;++E<T;)L[E]();T=D.length}g=!1}c.exports=function(E){D.push(E)!==1||g||m()}}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(s,c,d){var u=s("immediate");function m(){}var g={},_=["REJECTED"],S=["FULFILLED"],b=["PENDING"];function O(T){if(typeof T!="function")throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,T!==m&&E(this,T)}function k(T,M,R){this.promise=T,typeof M=="function"&&(this.onFulfilled=M,this.callFulfilled=this.otherCallFulfilled),typeof R=="function"&&(this.onRejected=R,this.callRejected=this.otherCallRejected)}function D(T,M,R){u(function(){var C;try{C=M(R)}catch(U){return g.reject(T,U)}C===T?g.reject(T,new TypeError("Cannot resolve promise with itself")):g.resolve(T,C)})}function F(T){var M=T&&T.then;if(T&&(typeof T=="object"||typeof T=="function")&&typeof M=="function")return function(){M.apply(T,arguments)}}function E(T,M){var R=!1;function C(X){R||(R=!0,g.reject(T,X))}function U(X){R||(R=!0,g.resolve(T,X))}var N=L(function(){M(U,C)});N.status==="error"&&C(N.value)}function L(T,M){var R={};try{R.value=T(M),R.status="success"}catch(C){R.status="error",R.value=C}return R}(c.exports=O).prototype.finally=function(T){if(typeof T!="function")return this;var M=this.constructor;return this.then(function(R){return M.resolve(T()).then(function(){return R})},function(R){return M.resolve(T()).then(function(){throw R})})},O.prototype.catch=function(T){return this.then(null,T)},O.prototype.then=function(T,M){if(typeof T!="function"&&this.state===S||typeof M!="function"&&this.state===_)return this;var R=new this.constructor(m);return this.state!==b?D(R,this.state===S?T:M,this.outcome):this.queue.push(new k(R,T,M)),R},k.prototype.callFulfilled=function(T){g.resolve(this.promise,T)},k.prototype.otherCallFulfilled=function(T){D(this.promise,this.onFulfilled,T)},k.prototype.callRejected=function(T){g.reject(this.promise,T)},k.prototype.otherCallRejected=function(T){D(this.promise,this.onRejected,T)},g.resolve=function(T,M){var R=L(F,M);if(R.status==="error")return g.reject(T,R.value);var C=R.value;if(C)E(T,C);else{T.state=S,T.outcome=M;for(var U=-1,N=T.queue.length;++U<N;)T.queue[U].callFulfilled(M)}return T},g.reject=function(T,M){T.state=_,T.outcome=M;for(var R=-1,C=T.queue.length;++R<C;)T.queue[R].callRejected(M);return T},O.resolve=function(T){return T instanceof this?T:g.resolve(new this(m),T)},O.reject=function(T){var M=new this(m);return g.reject(M,T)},O.all=function(T){var M=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=T.length,C=!1;if(!R)return this.resolve([]);for(var U=new Array(R),N=0,X=-1,K=new this(m);++X<R;)Z(T[X],X);return K;function Z(ct,Rt){M.resolve(ct).then(function(et){U[Rt]=et,++N!==R||C||(C=!0,g.resolve(K,U))},function(et){C||(C=!0,g.reject(K,et))})}},O.race=function(T){var M=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=T.length,C=!1;if(!R)return this.resolve([]);for(var U=-1,N=new this(m);++U<R;)X=T[U],M.resolve(X).then(function(K){C||(C=!0,g.resolve(N,K))},function(K){C||(C=!0,g.reject(N,K))});var X;return N}},{immediate:36}],38:[function(s,c,d){var u={};(0,s("./lib/utils/common").assign)(u,s("./lib/deflate"),s("./lib/inflate"),s("./lib/zlib/constants")),c.exports=u},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(s,c,d){var u=s("./zlib/deflate"),m=s("./utils/common"),g=s("./utils/strings"),_=s("./zlib/messages"),S=s("./zlib/zstream"),b=Object.prototype.toString,O=0,k=-1,D=0,F=8;function E(T){if(!(this instanceof E))return new E(T);this.options=m.assign({level:k,method:F,chunkSize:16384,windowBits:15,memLevel:8,strategy:D,to:""},T||{});var M=this.options;M.raw&&0<M.windowBits?M.windowBits=-M.windowBits:M.gzip&&0<M.windowBits&&M.windowBits<16&&(M.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;var R=u.deflateInit2(this.strm,M.level,M.method,M.windowBits,M.memLevel,M.strategy);if(R!==O)throw new Error(_[R]);if(M.header&&u.deflateSetHeader(this.strm,M.header),M.dictionary){var C;if(C=typeof M.dictionary=="string"?g.string2buf(M.dictionary):b.call(M.dictionary)==="[object ArrayBuffer]"?new Uint8Array(M.dictionary):M.dictionary,(R=u.deflateSetDictionary(this.strm,C))!==O)throw new Error(_[R]);this._dict_set=!0}}function L(T,M){var R=new E(M);if(R.push(T,!0),R.err)throw R.msg||_[R.err];return R.result}E.prototype.push=function(T,M){var R,C,U=this.strm,N=this.options.chunkSize;if(this.ended)return!1;C=M===~~M?M:M===!0?4:0,typeof T=="string"?U.input=g.string2buf(T):b.call(T)==="[object ArrayBuffer]"?U.input=new Uint8Array(T):U.input=T,U.next_in=0,U.avail_in=U.input.length;do{if(U.avail_out===0&&(U.output=new m.Buf8(N),U.next_out=0,U.avail_out=N),(R=u.deflate(U,C))!==1&&R!==O)return this.onEnd(R),!(this.ended=!0);U.avail_out!==0&&(U.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(g.buf2binstring(m.shrinkBuf(U.output,U.next_out))):this.onData(m.shrinkBuf(U.output,U.next_out)))}while((0<U.avail_in||U.avail_out===0)&&R!==1);return C===4?(R=u.deflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===O):C!==2||(this.onEnd(O),!(U.avail_out=0))},E.prototype.onData=function(T){this.chunks.push(T)},E.prototype.onEnd=function(T){T===O&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=T,this.msg=this.strm.msg},d.Deflate=E,d.deflate=L,d.deflateRaw=function(T,M){return(M=M||{}).raw=!0,L(T,M)},d.gzip=function(T,M){return(M=M||{}).gzip=!0,L(T,M)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(s,c,d){var u=s("./zlib/inflate"),m=s("./utils/common"),g=s("./utils/strings"),_=s("./zlib/constants"),S=s("./zlib/messages"),b=s("./zlib/zstream"),O=s("./zlib/gzheader"),k=Object.prototype.toString;function D(E){if(!(this instanceof D))return new D(E);this.options=m.assign({chunkSize:16384,windowBits:0,to:""},E||{});var L=this.options;L.raw&&0<=L.windowBits&&L.windowBits<16&&(L.windowBits=-L.windowBits,L.windowBits===0&&(L.windowBits=-15)),!(0<=L.windowBits&&L.windowBits<16)||E&&E.windowBits||(L.windowBits+=32),15<L.windowBits&&L.windowBits<48&&!(15&L.windowBits)&&(L.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new b,this.strm.avail_out=0;var T=u.inflateInit2(this.strm,L.windowBits);if(T!==_.Z_OK)throw new Error(S[T]);this.header=new O,u.inflateGetHeader(this.strm,this.header)}function F(E,L){var T=new D(L);if(T.push(E,!0),T.err)throw T.msg||S[T.err];return T.result}D.prototype.push=function(E,L){var T,M,R,C,U,N,X=this.strm,K=this.options.chunkSize,Z=this.options.dictionary,ct=!1;if(this.ended)return!1;M=L===~~L?L:L===!0?_.Z_FINISH:_.Z_NO_FLUSH,typeof E=="string"?X.input=g.binstring2buf(E):k.call(E)==="[object ArrayBuffer]"?X.input=new Uint8Array(E):X.input=E,X.next_in=0,X.avail_in=X.input.length;do{if(X.avail_out===0&&(X.output=new m.Buf8(K),X.next_out=0,X.avail_out=K),(T=u.inflate(X,_.Z_NO_FLUSH))===_.Z_NEED_DICT&&Z&&(N=typeof Z=="string"?g.string2buf(Z):k.call(Z)==="[object ArrayBuffer]"?new Uint8Array(Z):Z,T=u.inflateSetDictionary(this.strm,N)),T===_.Z_BUF_ERROR&&ct===!0&&(T=_.Z_OK,ct=!1),T!==_.Z_STREAM_END&&T!==_.Z_OK)return this.onEnd(T),!(this.ended=!0);X.next_out&&(X.avail_out!==0&&T!==_.Z_STREAM_END&&(X.avail_in!==0||M!==_.Z_FINISH&&M!==_.Z_SYNC_FLUSH)||(this.options.to==="string"?(R=g.utf8border(X.output,X.next_out),C=X.next_out-R,U=g.buf2string(X.output,R),X.next_out=C,X.avail_out=K-C,C&&m.arraySet(X.output,X.output,R,C,0),this.onData(U)):this.onData(m.shrinkBuf(X.output,X.next_out)))),X.avail_in===0&&X.avail_out===0&&(ct=!0)}while((0<X.avail_in||X.avail_out===0)&&T!==_.Z_STREAM_END);return T===_.Z_STREAM_END&&(M=_.Z_FINISH),M===_.Z_FINISH?(T=u.inflateEnd(this.strm),this.onEnd(T),this.ended=!0,T===_.Z_OK):M!==_.Z_SYNC_FLUSH||(this.onEnd(_.Z_OK),!(X.avail_out=0))},D.prototype.onData=function(E){this.chunks.push(E)},D.prototype.onEnd=function(E){E===_.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=E,this.msg=this.strm.msg},d.Inflate=D,d.inflate=F,d.inflateRaw=function(E,L){return(L=L||{}).raw=!0,F(E,L)},d.ungzip=F},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(s,c,d){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";d.assign=function(_){for(var S=Array.prototype.slice.call(arguments,1);S.length;){var b=S.shift();if(b){if(typeof b!="object")throw new TypeError(b+"must be non-object");for(var O in b)b.hasOwnProperty(O)&&(_[O]=b[O])}}return _},d.shrinkBuf=function(_,S){return _.length===S?_:_.subarray?_.subarray(0,S):(_.length=S,_)};var m={arraySet:function(_,S,b,O,k){if(S.subarray&&_.subarray)_.set(S.subarray(b,b+O),k);else for(var D=0;D<O;D++)_[k+D]=S[b+D]},flattenChunks:function(_){var S,b,O,k,D,F;for(S=O=0,b=_.length;S<b;S++)O+=_[S].length;for(F=new Uint8Array(O),S=k=0,b=_.length;S<b;S++)D=_[S],F.set(D,k),k+=D.length;return F}},g={arraySet:function(_,S,b,O,k){for(var D=0;D<O;D++)_[k+D]=S[b+D]},flattenChunks:function(_){return[].concat.apply([],_)}};d.setTyped=function(_){_?(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,m)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,g))},d.setTyped(u)},{}],42:[function(s,c,d){var u=s("./common"),m=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch{m=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{g=!1}for(var _=new u.Buf8(256),S=0;S<256;S++)_[S]=252<=S?6:248<=S?5:240<=S?4:224<=S?3:192<=S?2:1;function b(O,k){if(k<65537&&(O.subarray&&g||!O.subarray&&m))return String.fromCharCode.apply(null,u.shrinkBuf(O,k));for(var D="",F=0;F<k;F++)D+=String.fromCharCode(O[F]);return D}_[254]=_[254]=1,d.string2buf=function(O){var k,D,F,E,L,T=O.length,M=0;for(E=0;E<T;E++)(64512&(D=O.charCodeAt(E)))==55296&&E+1<T&&(64512&(F=O.charCodeAt(E+1)))==56320&&(D=65536+(D-55296<<10)+(F-56320),E++),M+=D<128?1:D<2048?2:D<65536?3:4;for(k=new u.Buf8(M),E=L=0;L<M;E++)(64512&(D=O.charCodeAt(E)))==55296&&E+1<T&&(64512&(F=O.charCodeAt(E+1)))==56320&&(D=65536+(D-55296<<10)+(F-56320),E++),D<128?k[L++]=D:(D<2048?k[L++]=192|D>>>6:(D<65536?k[L++]=224|D>>>12:(k[L++]=240|D>>>18,k[L++]=128|D>>>12&63),k[L++]=128|D>>>6&63),k[L++]=128|63&D);return k},d.buf2binstring=function(O){return b(O,O.length)},d.binstring2buf=function(O){for(var k=new u.Buf8(O.length),D=0,F=k.length;D<F;D++)k[D]=O.charCodeAt(D);return k},d.buf2string=function(O,k){var D,F,E,L,T=k||O.length,M=new Array(2*T);for(D=F=0;D<T;)if((E=O[D++])<128)M[F++]=E;else if(4<(L=_[E]))M[F++]=65533,D+=L-1;else{for(E&=L===2?31:L===3?15:7;1<L&&D<T;)E=E<<6|63&O[D++],L--;1<L?M[F++]=65533:E<65536?M[F++]=E:(E-=65536,M[F++]=55296|E>>10&1023,M[F++]=56320|1023&E)}return b(M,F)},d.utf8border=function(O,k){var D;for((k=k||O.length)>O.length&&(k=O.length),D=k-1;0<=D&&(192&O[D])==128;)D--;return D<0||D===0?k:D+_[O[D]]>k?D:k}},{"./common":41}],43:[function(s,c,d){c.exports=function(u,m,g,_){for(var S=65535&u|0,b=u>>>16&65535|0,O=0;g!==0;){for(g-=O=2e3<g?2e3:g;b=b+(S=S+m[_++]|0)|0,--O;);S%=65521,b%=65521}return S|b<<16|0}},{}],44:[function(s,c,d){c.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(s,c,d){var u=function(){for(var m,g=[],_=0;_<256;_++){m=_;for(var S=0;S<8;S++)m=1&m?3988292384^m>>>1:m>>>1;g[_]=m}return g}();c.exports=function(m,g,_,S){var b=u,O=S+_;m^=-1;for(var k=S;k<O;k++)m=m>>>8^b[255&(m^g[k])];return-1^m}},{}],46:[function(s,c,d){var u,m=s("../utils/common"),g=s("./trees"),_=s("./adler32"),S=s("./crc32"),b=s("./messages"),O=0,k=4,D=0,F=-2,E=-1,L=4,T=2,M=8,R=9,C=286,U=30,N=19,X=2*C+1,K=15,Z=3,ct=258,Rt=ct+Z+1,et=42,_t=113,G=1,Pt=2,Et=3,At=4;function ce(W,Jt){return W.msg=b[Jt],Jt}function re(W){return(W<<1)-(4<W?9:0)}function Ft(W){for(var Jt=W.length;0<=--Jt;)W[Jt]=0}function It(W){var Jt=W.state,jt=Jt.pending;jt>W.avail_out&&(jt=W.avail_out),jt!==0&&(m.arraySet(W.output,Jt.pending_buf,Jt.pending_out,jt,W.next_out),W.next_out+=jt,Jt.pending_out+=jt,W.total_out+=jt,W.avail_out-=jt,Jt.pending-=jt,Jt.pending===0&&(Jt.pending_out=0))}function Nt(W,Jt){g._tr_flush_block(W,0<=W.block_start?W.block_start:-1,W.strstart-W.block_start,Jt),W.block_start=W.strstart,It(W.strm)}function Pe(W,Jt){W.pending_buf[W.pending++]=Jt}function pe(W,Jt){W.pending_buf[W.pending++]=Jt>>>8&255,W.pending_buf[W.pending++]=255&Jt}function Wt(W,Jt){var jt,dt,pt=W.max_chain_length,Dt=W.strstart,ie=W.prev_length,Kt=W.nice_match,z=W.strstart>W.w_size-Rt?W.strstart-(W.w_size-Rt):0,Q=W.window,st=W.w_mask,nt=W.prev,vt=W.strstart+ct,Gt=Q[Dt+ie-1],qt=Q[Dt+ie];W.prev_length>=W.good_match&&(pt>>=2),Kt>W.lookahead&&(Kt=W.lookahead);do if(Q[(jt=Jt)+ie]===qt&&Q[jt+ie-1]===Gt&&Q[jt]===Q[Dt]&&Q[++jt]===Q[Dt+1]){Dt+=2,jt++;do;while(Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Dt<vt);if(dt=ct-(vt-Dt),Dt=vt-ct,ie<dt){if(W.match_start=Jt,Kt<=(ie=dt))break;Gt=Q[Dt+ie-1],qt=Q[Dt+ie]}}while((Jt=nt[Jt&st])>z&&--pt!=0);return ie<=W.lookahead?ie:W.lookahead}function $e(W){var Jt,jt,dt,pt,Dt,ie,Kt,z,Q,st,nt=W.w_size;do{if(pt=W.window_size-W.lookahead-W.strstart,W.strstart>=nt+(nt-Rt)){for(m.arraySet(W.window,W.window,nt,nt,0),W.match_start-=nt,W.strstart-=nt,W.block_start-=nt,Jt=jt=W.hash_size;dt=W.head[--Jt],W.head[Jt]=nt<=dt?dt-nt:0,--jt;);for(Jt=jt=nt;dt=W.prev[--Jt],W.prev[Jt]=nt<=dt?dt-nt:0,--jt;);pt+=nt}if(W.strm.avail_in===0)break;if(ie=W.strm,Kt=W.window,z=W.strstart+W.lookahead,Q=pt,st=void 0,st=ie.avail_in,Q<st&&(st=Q),jt=st===0?0:(ie.avail_in-=st,m.arraySet(Kt,ie.input,ie.next_in,st,z),ie.state.wrap===1?ie.adler=_(ie.adler,Kt,st,z):ie.state.wrap===2&&(ie.adler=S(ie.adler,Kt,st,z)),ie.next_in+=st,ie.total_in+=st,st),W.lookahead+=jt,W.lookahead+W.insert>=Z)for(Dt=W.strstart-W.insert,W.ins_h=W.window[Dt],W.ins_h=(W.ins_h<<W.hash_shift^W.window[Dt+1])&W.hash_mask;W.insert&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[Dt+Z-1])&W.hash_mask,W.prev[Dt&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=Dt,Dt++,W.insert--,!(W.lookahead+W.insert<Z)););}while(W.lookahead<Rt&&W.strm.avail_in!==0)}function Si(W,Jt){for(var jt,dt;;){if(W.lookahead<Rt){if($e(W),W.lookahead<Rt&&Jt===O)return G;if(W.lookahead===0)break}if(jt=0,W.lookahead>=Z&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+Z-1])&W.hash_mask,jt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),jt!==0&&W.strstart-jt<=W.w_size-Rt&&(W.match_length=Wt(W,jt)),W.match_length>=Z)if(dt=g._tr_tally(W,W.strstart-W.match_start,W.match_length-Z),W.lookahead-=W.match_length,W.match_length<=W.max_lazy_match&&W.lookahead>=Z){for(W.match_length--;W.strstart++,W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+Z-1])&W.hash_mask,jt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart,--W.match_length!=0;);W.strstart++}else W.strstart+=W.match_length,W.match_length=0,W.ins_h=W.window[W.strstart],W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+1])&W.hash_mask;else dt=g._tr_tally(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++;if(dt&&(Nt(W,!1),W.strm.avail_out===0))return G}return W.insert=W.strstart<Z-1?W.strstart:Z-1,Jt===k?(Nt(W,!0),W.strm.avail_out===0?Et:At):W.last_lit&&(Nt(W,!1),W.strm.avail_out===0)?G:Pt}function Oe(W,Jt){for(var jt,dt,pt;;){if(W.lookahead<Rt){if($e(W),W.lookahead<Rt&&Jt===O)return G;if(W.lookahead===0)break}if(jt=0,W.lookahead>=Z&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+Z-1])&W.hash_mask,jt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),W.prev_length=W.match_length,W.prev_match=W.match_start,W.match_length=Z-1,jt!==0&&W.prev_length<W.max_lazy_match&&W.strstart-jt<=W.w_size-Rt&&(W.match_length=Wt(W,jt),W.match_length<=5&&(W.strategy===1||W.match_length===Z&&4096<W.strstart-W.match_start)&&(W.match_length=Z-1)),W.prev_length>=Z&&W.match_length<=W.prev_length){for(pt=W.strstart+W.lookahead-Z,dt=g._tr_tally(W,W.strstart-1-W.prev_match,W.prev_length-Z),W.lookahead-=W.prev_length-1,W.prev_length-=2;++W.strstart<=pt&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+Z-1])&W.hash_mask,jt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),--W.prev_length!=0;);if(W.match_available=0,W.match_length=Z-1,W.strstart++,dt&&(Nt(W,!1),W.strm.avail_out===0))return G}else if(W.match_available){if((dt=g._tr_tally(W,0,W.window[W.strstart-1]))&&Nt(W,!1),W.strstart++,W.lookahead--,W.strm.avail_out===0)return G}else W.match_available=1,W.strstart++,W.lookahead--}return W.match_available&&(dt=g._tr_tally(W,0,W.window[W.strstart-1]),W.match_available=0),W.insert=W.strstart<Z-1?W.strstart:Z-1,Jt===k?(Nt(W,!0),W.strm.avail_out===0?Et:At):W.last_lit&&(Nt(W,!1),W.strm.avail_out===0)?G:Pt}function Ge(W,Jt,jt,dt,pt){this.good_length=W,this.max_lazy=Jt,this.nice_length=jt,this.max_chain=dt,this.func=pt}function pi(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=M,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new m.Buf16(2*X),this.dyn_dtree=new m.Buf16(2*(2*U+1)),this.bl_tree=new m.Buf16(2*(2*N+1)),Ft(this.dyn_ltree),Ft(this.dyn_dtree),Ft(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new m.Buf16(K+1),this.heap=new m.Buf16(2*C+1),Ft(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new m.Buf16(2*C+1),Ft(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Di(W){var Jt;return W&&W.state?(W.total_in=W.total_out=0,W.data_type=T,(Jt=W.state).pending=0,Jt.pending_out=0,Jt.wrap<0&&(Jt.wrap=-Jt.wrap),Jt.status=Jt.wrap?et:_t,W.adler=Jt.wrap===2?0:1,Jt.last_flush=O,g._tr_init(Jt),D):ce(W,F)}function mn(W){var Jt=Di(W);return Jt===D&&function(jt){jt.window_size=2*jt.w_size,Ft(jt.head),jt.max_lazy_match=u[jt.level].max_lazy,jt.good_match=u[jt.level].good_length,jt.nice_match=u[jt.level].nice_length,jt.max_chain_length=u[jt.level].max_chain,jt.strstart=0,jt.block_start=0,jt.lookahead=0,jt.insert=0,jt.match_length=jt.prev_length=Z-1,jt.match_available=0,jt.ins_h=0}(W.state),Jt}function Qi(W,Jt,jt,dt,pt,Dt){if(!W)return F;var ie=1;if(Jt===E&&(Jt=6),dt<0?(ie=0,dt=-dt):15<dt&&(ie=2,dt-=16),pt<1||R<pt||jt!==M||dt<8||15<dt||Jt<0||9<Jt||Dt<0||L<Dt)return ce(W,F);dt===8&&(dt=9);var Kt=new pi;return(W.state=Kt).strm=W,Kt.wrap=ie,Kt.gzhead=null,Kt.w_bits=dt,Kt.w_size=1<<Kt.w_bits,Kt.w_mask=Kt.w_size-1,Kt.hash_bits=pt+7,Kt.hash_size=1<<Kt.hash_bits,Kt.hash_mask=Kt.hash_size-1,Kt.hash_shift=~~((Kt.hash_bits+Z-1)/Z),Kt.window=new m.Buf8(2*Kt.w_size),Kt.head=new m.Buf16(Kt.hash_size),Kt.prev=new m.Buf16(Kt.w_size),Kt.lit_bufsize=1<<pt+6,Kt.pending_buf_size=4*Kt.lit_bufsize,Kt.pending_buf=new m.Buf8(Kt.pending_buf_size),Kt.d_buf=1*Kt.lit_bufsize,Kt.l_buf=3*Kt.lit_bufsize,Kt.level=Jt,Kt.strategy=Dt,Kt.method=jt,mn(W)}u=[new Ge(0,0,0,0,function(W,Jt){var jt=65535;for(jt>W.pending_buf_size-5&&(jt=W.pending_buf_size-5);;){if(W.lookahead<=1){if($e(W),W.lookahead===0&&Jt===O)return G;if(W.lookahead===0)break}W.strstart+=W.lookahead,W.lookahead=0;var dt=W.block_start+jt;if((W.strstart===0||W.strstart>=dt)&&(W.lookahead=W.strstart-dt,W.strstart=dt,Nt(W,!1),W.strm.avail_out===0)||W.strstart-W.block_start>=W.w_size-Rt&&(Nt(W,!1),W.strm.avail_out===0))return G}return W.insert=0,Jt===k?(Nt(W,!0),W.strm.avail_out===0?Et:At):(W.strstart>W.block_start&&(Nt(W,!1),W.strm.avail_out),G)}),new Ge(4,4,8,4,Si),new Ge(4,5,16,8,Si),new Ge(4,6,32,32,Si),new Ge(4,4,16,16,Oe),new Ge(8,16,32,32,Oe),new Ge(8,16,128,128,Oe),new Ge(8,32,128,256,Oe),new Ge(32,128,258,1024,Oe),new Ge(32,258,258,4096,Oe)],d.deflateInit=function(W,Jt){return Qi(W,Jt,M,15,8,0)},d.deflateInit2=Qi,d.deflateReset=mn,d.deflateResetKeep=Di,d.deflateSetHeader=function(W,Jt){return W&&W.state?W.state.wrap!==2?F:(W.state.gzhead=Jt,D):F},d.deflate=function(W,Jt){var jt,dt,pt,Dt;if(!W||!W.state||5<Jt||Jt<0)return W?ce(W,F):F;if(dt=W.state,!W.output||!W.input&&W.avail_in!==0||dt.status===666&&Jt!==k)return ce(W,W.avail_out===0?-5:F);if(dt.strm=W,jt=dt.last_flush,dt.last_flush=Jt,dt.status===et)if(dt.wrap===2)W.adler=0,Pe(dt,31),Pe(dt,139),Pe(dt,8),dt.gzhead?(Pe(dt,(dt.gzhead.text?1:0)+(dt.gzhead.hcrc?2:0)+(dt.gzhead.extra?4:0)+(dt.gzhead.name?8:0)+(dt.gzhead.comment?16:0)),Pe(dt,255&dt.gzhead.time),Pe(dt,dt.gzhead.time>>8&255),Pe(dt,dt.gzhead.time>>16&255),Pe(dt,dt.gzhead.time>>24&255),Pe(dt,dt.level===9?2:2<=dt.strategy||dt.level<2?4:0),Pe(dt,255&dt.gzhead.os),dt.gzhead.extra&&dt.gzhead.extra.length&&(Pe(dt,255&dt.gzhead.extra.length),Pe(dt,dt.gzhead.extra.length>>8&255)),dt.gzhead.hcrc&&(W.adler=S(W.adler,dt.pending_buf,dt.pending,0)),dt.gzindex=0,dt.status=69):(Pe(dt,0),Pe(dt,0),Pe(dt,0),Pe(dt,0),Pe(dt,0),Pe(dt,dt.level===9?2:2<=dt.strategy||dt.level<2?4:0),Pe(dt,3),dt.status=_t);else{var ie=M+(dt.w_bits-8<<4)<<8;ie|=(2<=dt.strategy||dt.level<2?0:dt.level<6?1:dt.level===6?2:3)<<6,dt.strstart!==0&&(ie|=32),ie+=31-ie%31,dt.status=_t,pe(dt,ie),dt.strstart!==0&&(pe(dt,W.adler>>>16),pe(dt,65535&W.adler)),W.adler=1}if(dt.status===69)if(dt.gzhead.extra){for(pt=dt.pending;dt.gzindex<(65535&dt.gzhead.extra.length)&&(dt.pending!==dt.pending_buf_size||(dt.gzhead.hcrc&&dt.pending>pt&&(W.adler=S(W.adler,dt.pending_buf,dt.pending-pt,pt)),It(W),pt=dt.pending,dt.pending!==dt.pending_buf_size));)Pe(dt,255&dt.gzhead.extra[dt.gzindex]),dt.gzindex++;dt.gzhead.hcrc&&dt.pending>pt&&(W.adler=S(W.adler,dt.pending_buf,dt.pending-pt,pt)),dt.gzindex===dt.gzhead.extra.length&&(dt.gzindex=0,dt.status=73)}else dt.status=73;if(dt.status===73)if(dt.gzhead.name){pt=dt.pending;do{if(dt.pending===dt.pending_buf_size&&(dt.gzhead.hcrc&&dt.pending>pt&&(W.adler=S(W.adler,dt.pending_buf,dt.pending-pt,pt)),It(W),pt=dt.pending,dt.pending===dt.pending_buf_size)){Dt=1;break}Dt=dt.gzindex<dt.gzhead.name.length?255&dt.gzhead.name.charCodeAt(dt.gzindex++):0,Pe(dt,Dt)}while(Dt!==0);dt.gzhead.hcrc&&dt.pending>pt&&(W.adler=S(W.adler,dt.pending_buf,dt.pending-pt,pt)),Dt===0&&(dt.gzindex=0,dt.status=91)}else dt.status=91;if(dt.status===91)if(dt.gzhead.comment){pt=dt.pending;do{if(dt.pending===dt.pending_buf_size&&(dt.gzhead.hcrc&&dt.pending>pt&&(W.adler=S(W.adler,dt.pending_buf,dt.pending-pt,pt)),It(W),pt=dt.pending,dt.pending===dt.pending_buf_size)){Dt=1;break}Dt=dt.gzindex<dt.gzhead.comment.length?255&dt.gzhead.comment.charCodeAt(dt.gzindex++):0,Pe(dt,Dt)}while(Dt!==0);dt.gzhead.hcrc&&dt.pending>pt&&(W.adler=S(W.adler,dt.pending_buf,dt.pending-pt,pt)),Dt===0&&(dt.status=103)}else dt.status=103;if(dt.status===103&&(dt.gzhead.hcrc?(dt.pending+2>dt.pending_buf_size&&It(W),dt.pending+2<=dt.pending_buf_size&&(Pe(dt,255&W.adler),Pe(dt,W.adler>>8&255),W.adler=0,dt.status=_t)):dt.status=_t),dt.pending!==0){if(It(W),W.avail_out===0)return dt.last_flush=-1,D}else if(W.avail_in===0&&re(Jt)<=re(jt)&&Jt!==k)return ce(W,-5);if(dt.status===666&&W.avail_in!==0)return ce(W,-5);if(W.avail_in!==0||dt.lookahead!==0||Jt!==O&&dt.status!==666){var Kt=dt.strategy===2?function(z,Q){for(var st;;){if(z.lookahead===0&&($e(z),z.lookahead===0)){if(Q===O)return G;break}if(z.match_length=0,st=g._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,st&&(Nt(z,!1),z.strm.avail_out===0))return G}return z.insert=0,Q===k?(Nt(z,!0),z.strm.avail_out===0?Et:At):z.last_lit&&(Nt(z,!1),z.strm.avail_out===0)?G:Pt}(dt,Jt):dt.strategy===3?function(z,Q){for(var st,nt,vt,Gt,qt=z.window;;){if(z.lookahead<=ct){if($e(z),z.lookahead<=ct&&Q===O)return G;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=Z&&0<z.strstart&&(nt=qt[vt=z.strstart-1])===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]){Gt=z.strstart+ct;do;while(nt===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]&&vt<Gt);z.match_length=ct-(Gt-vt),z.match_length>z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=Z?(st=g._tr_tally(z,1,z.match_length-Z),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(st=g._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),st&&(Nt(z,!1),z.strm.avail_out===0))return G}return z.insert=0,Q===k?(Nt(z,!0),z.strm.avail_out===0?Et:At):z.last_lit&&(Nt(z,!1),z.strm.avail_out===0)?G:Pt}(dt,Jt):u[dt.level].func(dt,Jt);if(Kt!==Et&&Kt!==At||(dt.status=666),Kt===G||Kt===Et)return W.avail_out===0&&(dt.last_flush=-1),D;if(Kt===Pt&&(Jt===1?g._tr_align(dt):Jt!==5&&(g._tr_stored_block(dt,0,0,!1),Jt===3&&(Ft(dt.head),dt.lookahead===0&&(dt.strstart=0,dt.block_start=0,dt.insert=0))),It(W),W.avail_out===0))return dt.last_flush=-1,D}return Jt!==k?D:dt.wrap<=0?1:(dt.wrap===2?(Pe(dt,255&W.adler),Pe(dt,W.adler>>8&255),Pe(dt,W.adler>>16&255),Pe(dt,W.adler>>24&255),Pe(dt,255&W.total_in),Pe(dt,W.total_in>>8&255),Pe(dt,W.total_in>>16&255),Pe(dt,W.total_in>>24&255)):(pe(dt,W.adler>>>16),pe(dt,65535&W.adler)),It(W),0<dt.wrap&&(dt.wrap=-dt.wrap),dt.pending!==0?D:1)},d.deflateEnd=function(W){var Jt;return W&&W.state?(Jt=W.state.status)!==et&&Jt!==69&&Jt!==73&&Jt!==91&&Jt!==103&&Jt!==_t&&Jt!==666?ce(W,F):(W.state=null,Jt===_t?ce(W,-3):D):F},d.deflateSetDictionary=function(W,Jt){var jt,dt,pt,Dt,ie,Kt,z,Q,st=Jt.length;if(!W||!W.state||(Dt=(jt=W.state).wrap)===2||Dt===1&&jt.status!==et||jt.lookahead)return F;for(Dt===1&&(W.adler=_(W.adler,Jt,st,0)),jt.wrap=0,st>=jt.w_size&&(Dt===0&&(Ft(jt.head),jt.strstart=0,jt.block_start=0,jt.insert=0),Q=new m.Buf8(jt.w_size),m.arraySet(Q,Jt,st-jt.w_size,jt.w_size,0),Jt=Q,st=jt.w_size),ie=W.avail_in,Kt=W.next_in,z=W.input,W.avail_in=st,W.next_in=0,W.input=Jt,$e(jt);jt.lookahead>=Z;){for(dt=jt.strstart,pt=jt.lookahead-(Z-1);jt.ins_h=(jt.ins_h<<jt.hash_shift^jt.window[dt+Z-1])&jt.hash_mask,jt.prev[dt&jt.w_mask]=jt.head[jt.ins_h],jt.head[jt.ins_h]=dt,dt++,--pt;);jt.strstart=dt,jt.lookahead=Z-1,$e(jt)}return jt.strstart+=jt.lookahead,jt.block_start=jt.strstart,jt.insert=jt.lookahead,jt.lookahead=0,jt.match_length=jt.prev_length=Z-1,jt.match_available=0,W.next_in=Kt,W.input=z,W.avail_in=ie,jt.wrap=Dt,D},d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(s,c,d){c.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(s,c,d){c.exports=function(u,m){var g,_,S,b,O,k,D,F,E,L,T,M,R,C,U,N,X,K,Z,ct,Rt,et,_t,G,Pt;g=u.state,_=u.next_in,G=u.input,S=_+(u.avail_in-5),b=u.next_out,Pt=u.output,O=b-(m-u.avail_out),k=b+(u.avail_out-257),D=g.dmax,F=g.wsize,E=g.whave,L=g.wnext,T=g.window,M=g.hold,R=g.bits,C=g.lencode,U=g.distcode,N=(1<<g.lenbits)-1,X=(1<<g.distbits)-1;t:do{R<15&&(M+=G[_++]<<R,R+=8,M+=G[_++]<<R,R+=8),K=C[M&N];e:for(;;){if(M>>>=Z=K>>>24,R-=Z,(Z=K>>>16&255)===0)Pt[b++]=65535&K;else{if(!(16&Z)){if(!(64&Z)){K=C[(65535&K)+(M&(1<<Z)-1)];continue e}if(32&Z){g.mode=12;break t}u.msg="invalid literal/length code",g.mode=30;break t}ct=65535&K,(Z&=15)&&(R<Z&&(M+=G[_++]<<R,R+=8),ct+=M&(1<<Z)-1,M>>>=Z,R-=Z),R<15&&(M+=G[_++]<<R,R+=8,M+=G[_++]<<R,R+=8),K=U[M&X];i:for(;;){if(M>>>=Z=K>>>24,R-=Z,!(16&(Z=K>>>16&255))){if(!(64&Z)){K=U[(65535&K)+(M&(1<<Z)-1)];continue i}u.msg="invalid distance code",g.mode=30;break t}if(Rt=65535&K,R<(Z&=15)&&(M+=G[_++]<<R,(R+=8)<Z&&(M+=G[_++]<<R,R+=8)),D<(Rt+=M&(1<<Z)-1)){u.msg="invalid distance too far back",g.mode=30;break t}if(M>>>=Z,R-=Z,(Z=b-O)<Rt){if(E<(Z=Rt-Z)&&g.sane){u.msg="invalid distance too far back",g.mode=30;break t}if(_t=T,(et=0)===L){if(et+=F-Z,Z<ct){for(ct-=Z;Pt[b++]=T[et++],--Z;);et=b-Rt,_t=Pt}}else if(L<Z){if(et+=F+L-Z,(Z-=L)<ct){for(ct-=Z;Pt[b++]=T[et++],--Z;);if(et=0,L<ct){for(ct-=Z=L;Pt[b++]=T[et++],--Z;);et=b-Rt,_t=Pt}}}else if(et+=L-Z,Z<ct){for(ct-=Z;Pt[b++]=T[et++],--Z;);et=b-Rt,_t=Pt}for(;2<ct;)Pt[b++]=_t[et++],Pt[b++]=_t[et++],Pt[b++]=_t[et++],ct-=3;ct&&(Pt[b++]=_t[et++],1<ct&&(Pt[b++]=_t[et++]))}else{for(et=b-Rt;Pt[b++]=Pt[et++],Pt[b++]=Pt[et++],Pt[b++]=Pt[et++],2<(ct-=3););ct&&(Pt[b++]=Pt[et++],1<ct&&(Pt[b++]=Pt[et++]))}break}}break}}while(_<S&&b<k);_-=ct=R>>3,M&=(1<<(R-=ct<<3))-1,u.next_in=_,u.next_out=b,u.avail_in=_<S?S-_+5:5-(_-S),u.avail_out=b<k?k-b+257:257-(b-k),g.hold=M,g.bits=R}},{}],49:[function(s,c,d){var u=s("../utils/common"),m=s("./adler32"),g=s("./crc32"),_=s("./inffast"),S=s("./inftrees"),b=1,O=2,k=0,D=-2,F=1,E=852,L=592;function T(et){return(et>>>24&255)+(et>>>8&65280)+((65280&et)<<8)+((255&et)<<24)}function M(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new u.Buf16(320),this.work=new u.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function R(et){var _t;return et&&et.state?(_t=et.state,et.total_in=et.total_out=_t.total=0,et.msg="",_t.wrap&&(et.adler=1&_t.wrap),_t.mode=F,_t.last=0,_t.havedict=0,_t.dmax=32768,_t.head=null,_t.hold=0,_t.bits=0,_t.lencode=_t.lendyn=new u.Buf32(E),_t.distcode=_t.distdyn=new u.Buf32(L),_t.sane=1,_t.back=-1,k):D}function C(et){var _t;return et&&et.state?((_t=et.state).wsize=0,_t.whave=0,_t.wnext=0,R(et)):D}function U(et,_t){var G,Pt;return et&&et.state?(Pt=et.state,_t<0?(G=0,_t=-_t):(G=1+(_t>>4),_t<48&&(_t&=15)),_t&&(_t<8||15<_t)?D:(Pt.window!==null&&Pt.wbits!==_t&&(Pt.window=null),Pt.wrap=G,Pt.wbits=_t,C(et))):D}function N(et,_t){var G,Pt;return et?(Pt=new M,(et.state=Pt).window=null,(G=U(et,_t))!==k&&(et.state=null),G):D}var X,K,Z=!0;function ct(et){if(Z){var _t;for(X=new u.Buf32(512),K=new u.Buf32(32),_t=0;_t<144;)et.lens[_t++]=8;for(;_t<256;)et.lens[_t++]=9;for(;_t<280;)et.lens[_t++]=7;for(;_t<288;)et.lens[_t++]=8;for(S(b,et.lens,0,288,X,0,et.work,{bits:9}),_t=0;_t<32;)et.lens[_t++]=5;S(O,et.lens,0,32,K,0,et.work,{bits:5}),Z=!1}et.lencode=X,et.lenbits=9,et.distcode=K,et.distbits=5}function Rt(et,_t,G,Pt){var Et,At=et.state;return At.window===null&&(At.wsize=1<<At.wbits,At.wnext=0,At.whave=0,At.window=new u.Buf8(At.wsize)),Pt>=At.wsize?(u.arraySet(At.window,_t,G-At.wsize,At.wsize,0),At.wnext=0,At.whave=At.wsize):(Pt<(Et=At.wsize-At.wnext)&&(Et=Pt),u.arraySet(At.window,_t,G-Pt,Et,At.wnext),(Pt-=Et)?(u.arraySet(At.window,_t,G-Pt,Pt,0),At.wnext=Pt,At.whave=At.wsize):(At.wnext+=Et,At.wnext===At.wsize&&(At.wnext=0),At.whave<At.wsize&&(At.whave+=Et))),0}d.inflateReset=C,d.inflateReset2=U,d.inflateResetKeep=R,d.inflateInit=function(et){return N(et,15)},d.inflateInit2=N,d.inflate=function(et,_t){var G,Pt,Et,At,ce,re,Ft,It,Nt,Pe,pe,Wt,$e,Si,Oe,Ge,pi,Di,mn,Qi,W,Jt,jt,dt,pt=0,Dt=new u.Buf8(4),ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!et||!et.state||!et.output||!et.input&&et.avail_in!==0)return D;(G=et.state).mode===12&&(G.mode=13),ce=et.next_out,Et=et.output,Ft=et.avail_out,At=et.next_in,Pt=et.input,re=et.avail_in,It=G.hold,Nt=G.bits,Pe=re,pe=Ft,Jt=k;t:for(;;)switch(G.mode){case F:if(G.wrap===0){G.mode=13;break}for(;Nt<16;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(2&G.wrap&&It===35615){Dt[G.check=0]=255&It,Dt[1]=It>>>8&255,G.check=g(G.check,Dt,2,0),Nt=It=0,G.mode=2;break}if(G.flags=0,G.head&&(G.head.done=!1),!(1&G.wrap)||(((255&It)<<8)+(It>>8))%31){et.msg="incorrect header check",G.mode=30;break}if((15&It)!=8){et.msg="unknown compression method",G.mode=30;break}if(Nt-=4,W=8+(15&(It>>>=4)),G.wbits===0)G.wbits=W;else if(W>G.wbits){et.msg="invalid window size",G.mode=30;break}G.dmax=1<<W,et.adler=G.check=1,G.mode=512&It?10:12,Nt=It=0;break;case 2:for(;Nt<16;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(G.flags=It,(255&G.flags)!=8){et.msg="unknown compression method",G.mode=30;break}if(57344&G.flags){et.msg="unknown header flags set",G.mode=30;break}G.head&&(G.head.text=It>>8&1),512&G.flags&&(Dt[0]=255&It,Dt[1]=It>>>8&255,G.check=g(G.check,Dt,2,0)),Nt=It=0,G.mode=3;case 3:for(;Nt<32;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}G.head&&(G.head.time=It),512&G.flags&&(Dt[0]=255&It,Dt[1]=It>>>8&255,Dt[2]=It>>>16&255,Dt[3]=It>>>24&255,G.check=g(G.check,Dt,4,0)),Nt=It=0,G.mode=4;case 4:for(;Nt<16;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}G.head&&(G.head.xflags=255&It,G.head.os=It>>8),512&G.flags&&(Dt[0]=255&It,Dt[1]=It>>>8&255,G.check=g(G.check,Dt,2,0)),Nt=It=0,G.mode=5;case 5:if(1024&G.flags){for(;Nt<16;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}G.length=It,G.head&&(G.head.extra_len=It),512&G.flags&&(Dt[0]=255&It,Dt[1]=It>>>8&255,G.check=g(G.check,Dt,2,0)),Nt=It=0}else G.head&&(G.head.extra=null);G.mode=6;case 6:if(1024&G.flags&&(re<(Wt=G.length)&&(Wt=re),Wt&&(G.head&&(W=G.head.extra_len-G.length,G.head.extra||(G.head.extra=new Array(G.head.extra_len)),u.arraySet(G.head.extra,Pt,At,Wt,W)),512&G.flags&&(G.check=g(G.check,Pt,Wt,At)),re-=Wt,At+=Wt,G.length-=Wt),G.length))break t;G.length=0,G.mode=7;case 7:if(2048&G.flags){if(re===0)break t;for(Wt=0;W=Pt[At+Wt++],G.head&&W&&G.length<65536&&(G.head.name+=String.fromCharCode(W)),W&&Wt<re;);if(512&G.flags&&(G.check=g(G.check,Pt,Wt,At)),re-=Wt,At+=Wt,W)break t}else G.head&&(G.head.name=null);G.length=0,G.mode=8;case 8:if(4096&G.flags){if(re===0)break t;for(Wt=0;W=Pt[At+Wt++],G.head&&W&&G.length<65536&&(G.head.comment+=String.fromCharCode(W)),W&&Wt<re;);if(512&G.flags&&(G.check=g(G.check,Pt,Wt,At)),re-=Wt,At+=Wt,W)break t}else G.head&&(G.head.comment=null);G.mode=9;case 9:if(512&G.flags){for(;Nt<16;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(It!==(65535&G.check)){et.msg="header crc mismatch",G.mode=30;break}Nt=It=0}G.head&&(G.head.hcrc=G.flags>>9&1,G.head.done=!0),et.adler=G.check=0,G.mode=12;break;case 10:for(;Nt<32;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}et.adler=G.check=T(It),Nt=It=0,G.mode=11;case 11:if(G.havedict===0)return et.next_out=ce,et.avail_out=Ft,et.next_in=At,et.avail_in=re,G.hold=It,G.bits=Nt,2;et.adler=G.check=1,G.mode=12;case 12:if(_t===5||_t===6)break t;case 13:if(G.last){It>>>=7&Nt,Nt-=7&Nt,G.mode=27;break}for(;Nt<3;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}switch(G.last=1&It,Nt-=1,3&(It>>>=1)){case 0:G.mode=14;break;case 1:if(ct(G),G.mode=20,_t!==6)break;It>>>=2,Nt-=2;break t;case 2:G.mode=17;break;case 3:et.msg="invalid block type",G.mode=30}It>>>=2,Nt-=2;break;case 14:for(It>>>=7&Nt,Nt-=7&Nt;Nt<32;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if((65535&It)!=(It>>>16^65535)){et.msg="invalid stored block lengths",G.mode=30;break}if(G.length=65535&It,Nt=It=0,G.mode=15,_t===6)break t;case 15:G.mode=16;case 16:if(Wt=G.length){if(re<Wt&&(Wt=re),Ft<Wt&&(Wt=Ft),Wt===0)break t;u.arraySet(Et,Pt,At,Wt,ce),re-=Wt,At+=Wt,Ft-=Wt,ce+=Wt,G.length-=Wt;break}G.mode=12;break;case 17:for(;Nt<14;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(G.nlen=257+(31&It),It>>>=5,Nt-=5,G.ndist=1+(31&It),It>>>=5,Nt-=5,G.ncode=4+(15&It),It>>>=4,Nt-=4,286<G.nlen||30<G.ndist){et.msg="too many length or distance symbols",G.mode=30;break}G.have=0,G.mode=18;case 18:for(;G.have<G.ncode;){for(;Nt<3;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}G.lens[ie[G.have++]]=7&It,It>>>=3,Nt-=3}for(;G.have<19;)G.lens[ie[G.have++]]=0;if(G.lencode=G.lendyn,G.lenbits=7,jt={bits:G.lenbits},Jt=S(0,G.lens,0,19,G.lencode,0,G.work,jt),G.lenbits=jt.bits,Jt){et.msg="invalid code lengths set",G.mode=30;break}G.have=0,G.mode=19;case 19:for(;G.have<G.nlen+G.ndist;){for(;Ge=(pt=G.lencode[It&(1<<G.lenbits)-1])>>>16&255,pi=65535&pt,!((Oe=pt>>>24)<=Nt);){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(pi<16)It>>>=Oe,Nt-=Oe,G.lens[G.have++]=pi;else{if(pi===16){for(dt=Oe+2;Nt<dt;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(It>>>=Oe,Nt-=Oe,G.have===0){et.msg="invalid bit length repeat",G.mode=30;break}W=G.lens[G.have-1],Wt=3+(3&It),It>>>=2,Nt-=2}else if(pi===17){for(dt=Oe+3;Nt<dt;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}Nt-=Oe,W=0,Wt=3+(7&(It>>>=Oe)),It>>>=3,Nt-=3}else{for(dt=Oe+7;Nt<dt;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}Nt-=Oe,W=0,Wt=11+(127&(It>>>=Oe)),It>>>=7,Nt-=7}if(G.have+Wt>G.nlen+G.ndist){et.msg="invalid bit length repeat",G.mode=30;break}for(;Wt--;)G.lens[G.have++]=W}}if(G.mode===30)break;if(G.lens[256]===0){et.msg="invalid code -- missing end-of-block",G.mode=30;break}if(G.lenbits=9,jt={bits:G.lenbits},Jt=S(b,G.lens,0,G.nlen,G.lencode,0,G.work,jt),G.lenbits=jt.bits,Jt){et.msg="invalid literal/lengths set",G.mode=30;break}if(G.distbits=6,G.distcode=G.distdyn,jt={bits:G.distbits},Jt=S(O,G.lens,G.nlen,G.ndist,G.distcode,0,G.work,jt),G.distbits=jt.bits,Jt){et.msg="invalid distances set",G.mode=30;break}if(G.mode=20,_t===6)break t;case 20:G.mode=21;case 21:if(6<=re&&258<=Ft){et.next_out=ce,et.avail_out=Ft,et.next_in=At,et.avail_in=re,G.hold=It,G.bits=Nt,_(et,pe),ce=et.next_out,Et=et.output,Ft=et.avail_out,At=et.next_in,Pt=et.input,re=et.avail_in,It=G.hold,Nt=G.bits,G.mode===12&&(G.back=-1);break}for(G.back=0;Ge=(pt=G.lencode[It&(1<<G.lenbits)-1])>>>16&255,pi=65535&pt,!((Oe=pt>>>24)<=Nt);){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(Ge&&!(240&Ge)){for(Di=Oe,mn=Ge,Qi=pi;Ge=(pt=G.lencode[Qi+((It&(1<<Di+mn)-1)>>Di)])>>>16&255,pi=65535&pt,!(Di+(Oe=pt>>>24)<=Nt);){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}It>>>=Di,Nt-=Di,G.back+=Di}if(It>>>=Oe,Nt-=Oe,G.back+=Oe,G.length=pi,Ge===0){G.mode=26;break}if(32&Ge){G.back=-1,G.mode=12;break}if(64&Ge){et.msg="invalid literal/length code",G.mode=30;break}G.extra=15&Ge,G.mode=22;case 22:if(G.extra){for(dt=G.extra;Nt<dt;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}G.length+=It&(1<<G.extra)-1,It>>>=G.extra,Nt-=G.extra,G.back+=G.extra}G.was=G.length,G.mode=23;case 23:for(;Ge=(pt=G.distcode[It&(1<<G.distbits)-1])>>>16&255,pi=65535&pt,!((Oe=pt>>>24)<=Nt);){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(!(240&Ge)){for(Di=Oe,mn=Ge,Qi=pi;Ge=(pt=G.distcode[Qi+((It&(1<<Di+mn)-1)>>Di)])>>>16&255,pi=65535&pt,!(Di+(Oe=pt>>>24)<=Nt);){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}It>>>=Di,Nt-=Di,G.back+=Di}if(It>>>=Oe,Nt-=Oe,G.back+=Oe,64&Ge){et.msg="invalid distance code",G.mode=30;break}G.offset=pi,G.extra=15&Ge,G.mode=24;case 24:if(G.extra){for(dt=G.extra;Nt<dt;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}G.offset+=It&(1<<G.extra)-1,It>>>=G.extra,Nt-=G.extra,G.back+=G.extra}if(G.offset>G.dmax){et.msg="invalid distance too far back",G.mode=30;break}G.mode=25;case 25:if(Ft===0)break t;if(Wt=pe-Ft,G.offset>Wt){if((Wt=G.offset-Wt)>G.whave&&G.sane){et.msg="invalid distance too far back",G.mode=30;break}$e=Wt>G.wnext?(Wt-=G.wnext,G.wsize-Wt):G.wnext-Wt,Wt>G.length&&(Wt=G.length),Si=G.window}else Si=Et,$e=ce-G.offset,Wt=G.length;for(Ft<Wt&&(Wt=Ft),Ft-=Wt,G.length-=Wt;Et[ce++]=Si[$e++],--Wt;);G.length===0&&(G.mode=21);break;case 26:if(Ft===0)break t;Et[ce++]=G.length,Ft--,G.mode=21;break;case 27:if(G.wrap){for(;Nt<32;){if(re===0)break t;re--,It|=Pt[At++]<<Nt,Nt+=8}if(pe-=Ft,et.total_out+=pe,G.total+=pe,pe&&(et.adler=G.check=G.flags?g(G.check,Et,pe,ce-pe):m(G.check,Et,pe,ce-pe)),pe=Ft,(G.flags?It:T(It))!==G.check){et.msg="incorrect data check",G.mode=30;break}Nt=It=0}G.mode=28;case 28:if(G.wrap&&G.flags){for(;Nt<32;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(It!==(4294967295&G.total)){et.msg="incorrect length check",G.mode=30;break}Nt=It=0}G.mode=29;case 29:Jt=1;break t;case 30:Jt=-3;break t;case 31:return-4;case 32:default:return D}return et.next_out=ce,et.avail_out=Ft,et.next_in=At,et.avail_in=re,G.hold=It,G.bits=Nt,(G.wsize||pe!==et.avail_out&&G.mode<30&&(G.mode<27||_t!==4))&&Rt(et,et.output,et.next_out,pe-et.avail_out)?(G.mode=31,-4):(Pe-=et.avail_in,pe-=et.avail_out,et.total_in+=Pe,et.total_out+=pe,G.total+=pe,G.wrap&&pe&&(et.adler=G.check=G.flags?g(G.check,Et,pe,et.next_out-pe):m(G.check,Et,pe,et.next_out-pe)),et.data_type=G.bits+(G.last?64:0)+(G.mode===12?128:0)+(G.mode===20||G.mode===15?256:0),(Pe==0&&pe===0||_t===4)&&Jt===k&&(Jt=-5),Jt)},d.inflateEnd=function(et){if(!et||!et.state)return D;var _t=et.state;return _t.window&&(_t.window=null),et.state=null,k},d.inflateGetHeader=function(et,_t){var G;return et&&et.state&&2&(G=et.state).wrap?((G.head=_t).done=!1,k):D},d.inflateSetDictionary=function(et,_t){var G,Pt=_t.length;return et&&et.state?(G=et.state).wrap!==0&&G.mode!==11?D:G.mode===11&&m(1,_t,Pt,0)!==G.check?-3:Rt(et,_t,Pt,Pt)?(G.mode=31,-4):(G.havedict=1,k):D},d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(s,c,d){var u=s("../utils/common"),m=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],_=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],S=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,O,k,D,F,E,L,T){var M,R,C,U,N,X,K,Z,ct,Rt=T.bits,et=0,_t=0,G=0,Pt=0,Et=0,At=0,ce=0,re=0,Ft=0,It=0,Nt=null,Pe=0,pe=new u.Buf16(16),Wt=new u.Buf16(16),$e=null,Si=0;for(et=0;et<=15;et++)pe[et]=0;for(_t=0;_t<D;_t++)pe[O[k+_t]]++;for(Et=Rt,Pt=15;1<=Pt&&pe[Pt]===0;Pt--);if(Pt<Et&&(Et=Pt),Pt===0)return F[E++]=20971520,F[E++]=20971520,T.bits=1,0;for(G=1;G<Pt&&pe[G]===0;G++);for(Et<G&&(Et=G),et=re=1;et<=15;et++)if(re<<=1,(re-=pe[et])<0)return-1;if(0<re&&(b===0||Pt!==1))return-1;for(Wt[1]=0,et=1;et<15;et++)Wt[et+1]=Wt[et]+pe[et];for(_t=0;_t<D;_t++)O[k+_t]!==0&&(L[Wt[O[k+_t]]++]=_t);if(X=b===0?(Nt=$e=L,19):b===1?(Nt=m,Pe-=257,$e=g,Si-=257,256):(Nt=_,$e=S,-1),et=G,N=E,ce=_t=It=0,C=-1,U=(Ft=1<<(At=Et))-1,b===1&&852<Ft||b===2&&592<Ft)return 1;for(;;){for(K=et-ce,ct=L[_t]<X?(Z=0,L[_t]):L[_t]>X?(Z=$e[Si+L[_t]],Nt[Pe+L[_t]]):(Z=96,0),M=1<<et-ce,G=R=1<<At;F[N+(It>>ce)+(R-=M)]=K<<24|Z<<16|ct|0,R!==0;);for(M=1<<et-1;It&M;)M>>=1;if(M!==0?(It&=M-1,It+=M):It=0,_t++,--pe[et]==0){if(et===Pt)break;et=O[k+L[_t]]}if(Et<et&&(It&U)!==C){for(ce===0&&(ce=Et),N+=G,re=1<<(At=et-ce);At+ce<Pt&&!((re-=pe[At+ce])<=0);)At++,re<<=1;if(Ft+=1<<At,b===1&&852<Ft||b===2&&592<Ft)return 1;F[C=It&U]=Et<<24|At<<16|N-E|0}}return It!==0&&(F[N+It]=et-ce<<24|64<<16|0),T.bits=Et,0}},{"../utils/common":41}],51:[function(s,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(s,c,d){var u=s("../utils/common"),m=0,g=1;function _(pt){for(var Dt=pt.length;0<=--Dt;)pt[Dt]=0}var S=0,b=29,O=256,k=O+1+b,D=30,F=19,E=2*k+1,L=15,T=16,M=7,R=256,C=16,U=17,N=18,X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],K=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ct=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Rt=new Array(2*(k+2));_(Rt);var et=new Array(2*D);_(et);var _t=new Array(512);_(_t);var G=new Array(256);_(G);var Pt=new Array(b);_(Pt);var Et,At,ce,re=new Array(D);function Ft(pt,Dt,ie,Kt,z){this.static_tree=pt,this.extra_bits=Dt,this.extra_base=ie,this.elems=Kt,this.max_length=z,this.has_stree=pt&&pt.length}function It(pt,Dt){this.dyn_tree=pt,this.max_code=0,this.stat_desc=Dt}function Nt(pt){return pt<256?_t[pt]:_t[256+(pt>>>7)]}function Pe(pt,Dt){pt.pending_buf[pt.pending++]=255&Dt,pt.pending_buf[pt.pending++]=Dt>>>8&255}function pe(pt,Dt,ie){pt.bi_valid>T-ie?(pt.bi_buf|=Dt<<pt.bi_valid&65535,Pe(pt,pt.bi_buf),pt.bi_buf=Dt>>T-pt.bi_valid,pt.bi_valid+=ie-T):(pt.bi_buf|=Dt<<pt.bi_valid&65535,pt.bi_valid+=ie)}function Wt(pt,Dt,ie){pe(pt,ie[2*Dt],ie[2*Dt+1])}function $e(pt,Dt){for(var ie=0;ie|=1&pt,pt>>>=1,ie<<=1,0<--Dt;);return ie>>>1}function Si(pt,Dt,ie){var Kt,z,Q=new Array(L+1),st=0;for(Kt=1;Kt<=L;Kt++)Q[Kt]=st=st+ie[Kt-1]<<1;for(z=0;z<=Dt;z++){var nt=pt[2*z+1];nt!==0&&(pt[2*z]=$e(Q[nt]++,nt))}}function Oe(pt){var Dt;for(Dt=0;Dt<k;Dt++)pt.dyn_ltree[2*Dt]=0;for(Dt=0;Dt<D;Dt++)pt.dyn_dtree[2*Dt]=0;for(Dt=0;Dt<F;Dt++)pt.bl_tree[2*Dt]=0;pt.dyn_ltree[2*R]=1,pt.opt_len=pt.static_len=0,pt.last_lit=pt.matches=0}function Ge(pt){8<pt.bi_valid?Pe(pt,pt.bi_buf):0<pt.bi_valid&&(pt.pending_buf[pt.pending++]=pt.bi_buf),pt.bi_buf=0,pt.bi_valid=0}function pi(pt,Dt,ie,Kt){var z=2*Dt,Q=2*ie;return pt[z]<pt[Q]||pt[z]===pt[Q]&&Kt[Dt]<=Kt[ie]}function Di(pt,Dt,ie){for(var Kt=pt.heap[ie],z=ie<<1;z<=pt.heap_len&&(z<pt.heap_len&&pi(Dt,pt.heap[z+1],pt.heap[z],pt.depth)&&z++,!pi(Dt,Kt,pt.heap[z],pt.depth));)pt.heap[ie]=pt.heap[z],ie=z,z<<=1;pt.heap[ie]=Kt}function mn(pt,Dt,ie){var Kt,z,Q,st,nt=0;if(pt.last_lit!==0)for(;Kt=pt.pending_buf[pt.d_buf+2*nt]<<8|pt.pending_buf[pt.d_buf+2*nt+1],z=pt.pending_buf[pt.l_buf+nt],nt++,Kt===0?Wt(pt,z,Dt):(Wt(pt,(Q=G[z])+O+1,Dt),(st=X[Q])!==0&&pe(pt,z-=Pt[Q],st),Wt(pt,Q=Nt(--Kt),ie),(st=K[Q])!==0&&pe(pt,Kt-=re[Q],st)),nt<pt.last_lit;);Wt(pt,R,Dt)}function Qi(pt,Dt){var ie,Kt,z,Q=Dt.dyn_tree,st=Dt.stat_desc.static_tree,nt=Dt.stat_desc.has_stree,vt=Dt.stat_desc.elems,Gt=-1;for(pt.heap_len=0,pt.heap_max=E,ie=0;ie<vt;ie++)Q[2*ie]!==0?(pt.heap[++pt.heap_len]=Gt=ie,pt.depth[ie]=0):Q[2*ie+1]=0;for(;pt.heap_len<2;)Q[2*(z=pt.heap[++pt.heap_len]=Gt<2?++Gt:0)]=1,pt.depth[z]=0,pt.opt_len--,nt&&(pt.static_len-=st[2*z+1]);for(Dt.max_code=Gt,ie=pt.heap_len>>1;1<=ie;ie--)Di(pt,Q,ie);for(z=vt;ie=pt.heap[1],pt.heap[1]=pt.heap[pt.heap_len--],Di(pt,Q,1),Kt=pt.heap[1],pt.heap[--pt.heap_max]=ie,pt.heap[--pt.heap_max]=Kt,Q[2*z]=Q[2*ie]+Q[2*Kt],pt.depth[z]=(pt.depth[ie]>=pt.depth[Kt]?pt.depth[ie]:pt.depth[Kt])+1,Q[2*ie+1]=Q[2*Kt+1]=z,pt.heap[1]=z++,Di(pt,Q,1),2<=pt.heap_len;);pt.heap[--pt.heap_max]=pt.heap[1],function(qt,Xt){var Ne,Ie,ge,we,yi,Ei,ni=Xt.dyn_tree,bi=Xt.max_code,qr=Xt.stat_desc.static_tree,sr=Xt.stat_desc.has_stree,sn=Xt.stat_desc.extra_bits,Ao=Xt.stat_desc.extra_base,zi=Xt.stat_desc.max_length,qo=0;for(we=0;we<=L;we++)qt.bl_count[we]=0;for(ni[2*qt.heap[qt.heap_max]+1]=0,Ne=qt.heap_max+1;Ne<E;Ne++)zi<(we=ni[2*ni[2*(Ie=qt.heap[Ne])+1]+1]+1)&&(we=zi,qo++),ni[2*Ie+1]=we,bi<Ie||(qt.bl_count[we]++,yi=0,Ao<=Ie&&(yi=sn[Ie-Ao]),Ei=ni[2*Ie],qt.opt_len+=Ei*(we+yi),sr&&(qt.static_len+=Ei*(qr[2*Ie+1]+yi)));if(qo!==0){do{for(we=zi-1;qt.bl_count[we]===0;)we--;qt.bl_count[we]--,qt.bl_count[we+1]+=2,qt.bl_count[zi]--,qo-=2}while(0<qo);for(we=zi;we!==0;we--)for(Ie=qt.bl_count[we];Ie!==0;)bi<(ge=qt.heap[--Ne])||(ni[2*ge+1]!==we&&(qt.opt_len+=(we-ni[2*ge+1])*ni[2*ge],ni[2*ge+1]=we),Ie--)}}(pt,Dt),Si(Q,Gt,pt.bl_count)}function W(pt,Dt,ie){var Kt,z,Q=-1,st=Dt[1],nt=0,vt=7,Gt=4;for(st===0&&(vt=138,Gt=3),Dt[2*(ie+1)+1]=65535,Kt=0;Kt<=ie;Kt++)z=st,st=Dt[2*(Kt+1)+1],++nt<vt&&z===st||(nt<Gt?pt.bl_tree[2*z]+=nt:z!==0?(z!==Q&&pt.bl_tree[2*z]++,pt.bl_tree[2*C]++):nt<=10?pt.bl_tree[2*U]++:pt.bl_tree[2*N]++,Q=z,Gt=(nt=0)===st?(vt=138,3):z===st?(vt=6,3):(vt=7,4))}function Jt(pt,Dt,ie){var Kt,z,Q=-1,st=Dt[1],nt=0,vt=7,Gt=4;for(st===0&&(vt=138,Gt=3),Kt=0;Kt<=ie;Kt++)if(z=st,st=Dt[2*(Kt+1)+1],!(++nt<vt&&z===st)){if(nt<Gt)for(;Wt(pt,z,pt.bl_tree),--nt!=0;);else z!==0?(z!==Q&&(Wt(pt,z,pt.bl_tree),nt--),Wt(pt,C,pt.bl_tree),pe(pt,nt-3,2)):nt<=10?(Wt(pt,U,pt.bl_tree),pe(pt,nt-3,3)):(Wt(pt,N,pt.bl_tree),pe(pt,nt-11,7));Q=z,Gt=(nt=0)===st?(vt=138,3):z===st?(vt=6,3):(vt=7,4)}}_(re);var jt=!1;function dt(pt,Dt,ie,Kt){pe(pt,(S<<1)+(Kt?1:0),3),function(z,Q,st,nt){Ge(z),nt&&(Pe(z,st),Pe(z,~st)),u.arraySet(z.pending_buf,z.window,Q,st,z.pending),z.pending+=st}(pt,Dt,ie,!0)}d._tr_init=function(pt){jt||(function(){var Dt,ie,Kt,z,Q,st=new Array(L+1);for(z=Kt=0;z<b-1;z++)for(Pt[z]=Kt,Dt=0;Dt<1<<X[z];Dt++)G[Kt++]=z;for(G[Kt-1]=z,z=Q=0;z<16;z++)for(re[z]=Q,Dt=0;Dt<1<<K[z];Dt++)_t[Q++]=z;for(Q>>=7;z<D;z++)for(re[z]=Q<<7,Dt=0;Dt<1<<K[z]-7;Dt++)_t[256+Q++]=z;for(ie=0;ie<=L;ie++)st[ie]=0;for(Dt=0;Dt<=143;)Rt[2*Dt+1]=8,Dt++,st[8]++;for(;Dt<=255;)Rt[2*Dt+1]=9,Dt++,st[9]++;for(;Dt<=279;)Rt[2*Dt+1]=7,Dt++,st[7]++;for(;Dt<=287;)Rt[2*Dt+1]=8,Dt++,st[8]++;for(Si(Rt,k+1,st),Dt=0;Dt<D;Dt++)et[2*Dt+1]=5,et[2*Dt]=$e(Dt,5);Et=new Ft(Rt,X,O+1,k,L),At=new Ft(et,K,0,D,L),ce=new Ft(new Array(0),Z,0,F,M)}(),jt=!0),pt.l_desc=new It(pt.dyn_ltree,Et),pt.d_desc=new It(pt.dyn_dtree,At),pt.bl_desc=new It(pt.bl_tree,ce),pt.bi_buf=0,pt.bi_valid=0,Oe(pt)},d._tr_stored_block=dt,d._tr_flush_block=function(pt,Dt,ie,Kt){var z,Q,st=0;0<pt.level?(pt.strm.data_type===2&&(pt.strm.data_type=function(nt){var vt,Gt=4093624447;for(vt=0;vt<=31;vt++,Gt>>>=1)if(1&Gt&&nt.dyn_ltree[2*vt]!==0)return m;if(nt.dyn_ltree[18]!==0||nt.dyn_ltree[20]!==0||nt.dyn_ltree[26]!==0)return g;for(vt=32;vt<O;vt++)if(nt.dyn_ltree[2*vt]!==0)return g;return m}(pt)),Qi(pt,pt.l_desc),Qi(pt,pt.d_desc),st=function(nt){var vt;for(W(nt,nt.dyn_ltree,nt.l_desc.max_code),W(nt,nt.dyn_dtree,nt.d_desc.max_code),Qi(nt,nt.bl_desc),vt=F-1;3<=vt&&nt.bl_tree[2*ct[vt]+1]===0;vt--);return nt.opt_len+=3*(vt+1)+5+5+4,vt}(pt),z=pt.opt_len+3+7>>>3,(Q=pt.static_len+3+7>>>3)<=z&&(z=Q)):z=Q=ie+5,ie+4<=z&&Dt!==-1?dt(pt,Dt,ie,Kt):pt.strategy===4||Q===z?(pe(pt,2+(Kt?1:0),3),mn(pt,Rt,et)):(pe(pt,4+(Kt?1:0),3),function(nt,vt,Gt,qt){var Xt;for(pe(nt,vt-257,5),pe(nt,Gt-1,5),pe(nt,qt-4,4),Xt=0;Xt<qt;Xt++)pe(nt,nt.bl_tree[2*ct[Xt]+1],3);Jt(nt,nt.dyn_ltree,vt-1),Jt(nt,nt.dyn_dtree,Gt-1)}(pt,pt.l_desc.max_code+1,pt.d_desc.max_code+1,st+1),mn(pt,pt.dyn_ltree,pt.dyn_dtree)),Oe(pt),Kt&&Ge(pt)},d._tr_tally=function(pt,Dt,ie){return pt.pending_buf[pt.d_buf+2*pt.last_lit]=Dt>>>8&255,pt.pending_buf[pt.d_buf+2*pt.last_lit+1]=255&Dt,pt.pending_buf[pt.l_buf+pt.last_lit]=255&ie,pt.last_lit++,Dt===0?pt.dyn_ltree[2*ie]++:(pt.matches++,Dt--,pt.dyn_ltree[2*(G[ie]+O+1)]++,pt.dyn_dtree[2*Nt(Dt)]++),pt.last_lit===pt.lit_bufsize-1},d._tr_align=function(pt){pe(pt,2,3),Wt(pt,R,Rt),function(Dt){Dt.bi_valid===16?(Pe(Dt,Dt.bi_buf),Dt.bi_buf=0,Dt.bi_valid=0):8<=Dt.bi_valid&&(Dt.pending_buf[Dt.pending++]=255&Dt.bi_buf,Dt.bi_buf>>=8,Dt.bi_valid-=8)}(pt)}},{"../utils/common":41}],53:[function(s,c,d){c.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(s,c,d){(function(u){(function(m,g){if(!m.setImmediate){var _,S,b,O,k=1,D={},F=!1,E=m.document,L=Object.getPrototypeOf&&Object.getPrototypeOf(m);L=L&&L.setTimeout?L:m,_={}.toString.call(m.process)==="[object process]"?function(C){process.nextTick(function(){M(C)})}:function(){if(m.postMessage&&!m.importScripts){var C=!0,U=m.onmessage;return m.onmessage=function(){C=!1},m.postMessage("","*"),m.onmessage=U,C}}()?(O="setImmediate$"+Math.random()+"$",m.addEventListener?m.addEventListener("message",R,!1):m.attachEvent("onmessage",R),function(C){m.postMessage(O+C,"*")}):m.MessageChannel?((b=new MessageChannel).port1.onmessage=function(C){M(C.data)},function(C){b.port2.postMessage(C)}):E&&"onreadystatechange"in E.createElement("script")?(S=E.documentElement,function(C){var U=E.createElement("script");U.onreadystatechange=function(){M(C),U.onreadystatechange=null,S.removeChild(U),U=null},S.appendChild(U)}):function(C){setTimeout(M,0,C)},L.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var U=new Array(arguments.length-1),N=0;N<U.length;N++)U[N]=arguments[N+1];var X={callback:C,args:U};return D[k]=X,_(k),k++},L.clearImmediate=T}function T(C){delete D[C]}function M(C){if(F)setTimeout(M,0,C);else{var U=D[C];if(U){F=!0;try{(function(N){var X=N.callback,K=N.args;switch(K.length){case 0:X();break;case 1:X(K[0]);break;case 2:X(K[0],K[1]);break;case 3:X(K[0],K[1],K[2]);break;default:X.apply(g,K)}})(U)}finally{T(C),F=!1}}}}function R(C){C.source===m&&typeof C.data=="string"&&C.data.indexOf(O)===0&&M(+C.data.slice(O.length))}})(typeof self>"u"?u===void 0?this:u:self)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Cf);var dm=Cf.exports;const pm=tc(dm);var Af={exports:{}};(function(x,a){(function(s,c){c()})(Er,function(){function s(S,b){return typeof b>"u"?b={autoBom:!1}:typeof b!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(S.type)?new Blob(["\uFEFF",S],{type:S.type}):S}function c(S,b,O){var k=new XMLHttpRequest;k.open("GET",S),k.responseType="blob",k.onload=function(){_(k.response,b,O)},k.onerror=function(){console.error("could not download file")},k.send()}function d(S){var b=new XMLHttpRequest;b.open("HEAD",S,!1);try{b.send()}catch{}return 200<=b.status&&299>=b.status}function u(S){try{S.dispatchEvent(new MouseEvent("click"))}catch{var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),S.dispatchEvent(b)}}var m=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Er=="object"&&Er.global===Er?Er:void 0,g=m.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),_=m.saveAs||(typeof window!="object"||window!==m?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(S,b,O){var k=m.URL||m.webkitURL,D=document.createElement("a");b=b||S.name||"download",D.download=b,D.rel="noopener",typeof S=="string"?(D.href=S,D.origin===location.origin?u(D):d(D.href)?c(S,b,O):u(D,D.target="_blank")):(D.href=k.createObjectURL(S),setTimeout(function(){k.revokeObjectURL(D.href)},4e4),setTimeout(function(){u(D)},0))}:"msSaveOrOpenBlob"in navigator?function(S,b,O){if(b=b||S.name||"download",typeof S!="string")navigator.msSaveOrOpenBlob(s(S,O),b);else if(d(S))c(S,b,O);else{var k=document.createElement("a");k.href=S,k.target="_blank",setTimeout(function(){u(k)})}}:function(S,b,O,k){if(k=k||open("","_blank"),k&&(k.document.title=k.document.body.innerText="downloading..."),typeof S=="string")return c(S,b,O);var D=S.type==="application/octet-stream",F=/constructor/i.test(m.HTMLElement)||m.safari,E=/CriOS\/[\d]+/.test(navigator.userAgent);if((E||D&&F||g)&&typeof FileReader<"u"){var L=new FileReader;L.onloadend=function(){var R=L.result;R=E?R:R.replace(/^data:[^;]*;/,"data:attachment/file;"),k?k.location.href=R:location=R,k=null},L.readAsDataURL(S)}else{var T=m.URL||m.webkitURL,M=T.createObjectURL(S);k?k.location=M:location.href=M,k=null,setTimeout(function(){T.revokeObjectURL(M)},4e4)}});m.saveAs=_.saveAs=_,x.exports=_})})(Af);var mm=Af.exports;const gm=tc(mm);class vm{constructor(a,s){window.mars3d?(this.panoramicViewClass=s,this.coordinate=[{heading:0,pitch:0,stop:5},{heading:90,pitch:0,stop:5},{heading:180,pitch:0,stop:5},{heading:270,pitch:0,stop:5},{heading:0,pitch:90,stop:5},{heading:0,pitch:-90,stop:5}],this.screenshotArray=[],this.events={},this.timestamp=0,this.lat,this.lng,this.alt):console.error("未引入指定插件")}start(a=!0){var s,c;if(a){this.timestamp=new Date().getTime();const d=document.getElementById("app"),u=window.innerHeight,m=document.getElementById("mars3dContainer");m&&(m.style.width=u.toString()+"px",m.style.height=u.toString()+"px"),d!==null&&d.classList.add(this.panoramicViewClass);let{lat:g,lng:_,alt:S}=window.map.getCameraView();this.lat=g,this.lng=_,this.alt=S,window.map.viewer.scene.camera.frustum.fov=window.Cesium.Math.PI_OVER_THREE*1.5}this.screenshotArray&&this.coordinate?this.coordinate[(s=this.screenshotArray)==null?void 0:s.length]?window.map.setCameraView({lat:this.lat,lng:this.lng,alt:this.alt,...this.coordinate[(c=this.screenshotArray)==null?void 0:c.length]},{complete:()=>{setTimeout(()=>{var d;this.screenshot((d=this.screenshotArray)==null?void 0:d.length)},100)}}):(this.downloadImagesAsZip(),this.screenshotArray=[]):(console.error("初始化失效"),this.emit("state",{type:"error"}))}async screenshot(a){const s=await window.map.expImage({download:!1}),c=window.map.container.getElementsByClassName("cesium-viewer-cesiumWidgetContainer"),d=await window.domtoimage.toPng(window.map.container,{filter:u=>u!==c[0]});this.mergeImage(s.image,d,s.width,s.height).then(u=>{var _;let m=Number(a)+1,g={src:u,name:"全景图_"+this.timestamp+"_"+m+".jpg"};this.emit("intercept",g),(_=this.screenshotArray)==null||_.push(g),this.start(!1)})}mergeImage(a,s,c,d){return new Promise((u,m)=>{const g=document.createElement("canvas");g.width=c,g.height=d;const _=g.getContext("2d");if(g&&_){const S=new Image;S.crossOrigin="Anonymous",S.onload=()=>{_.drawImage(S,0,0,c,d);const b=new Image;b.crossOrigin="Anonymous",b.onload=()=>{_.drawImage(b,0,0,c,d);const O=g.toDataURL("image/png");u(O)},b.src=s},S.src=a}else m()})}download(){this.screenshotArray&&this.screenshotArray.forEach(a=>{window.mars3d.Util.downloadBase64Image(a.name,a.src)})}async downloadImagesAsZip(){if(this.screenshotArray){const a=new pm;this.screenshotArray.forEach(c=>{const d=c.src.split(",")[1],u=atob(d),m=[];for(let S=0;S<u.length;S+=1024){const b=u.slice(S,S+1024),O=new Array(b.length);for(let D=0;D<b.length;D++)O[D]=b.charCodeAt(D);const k=new Uint8Array(O);m.push(k)}const g=new Blob(m,{type:"image/jpeg"}),_=`${c.name}`;a.file(_,g,{binary:!0})});const s=await a.generateAsync({type:"blob"});gm(s,"CHBIM-Panorama.zip"),this.emit("state",{type:"success",schedule:100}),this.init()}}init(){const a=document.getElementById("app");a&&a.classList.remove(this.panoramicViewClass);const s=document.getElementById("mars3dContainer");s&&(s.style.width="",s.style.height="")}on(a,s){this.events[a]?this.events[a].push(s):this.events[a]=[s]}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}}function cs(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function Pf(x,a){x.prototype=Object.create(a.prototype),x.prototype.constructor=x,x.__proto__=a}/*!
2685
+ */(function(x,a){(function(s){x.exports=s()})(function(){return function s(c,d,u){function m(S,b){if(!d[S]){if(!c[S]){var I=typeof hu=="function"&&hu;if(!b&&I)return I(S,!0);if(g)return g(S,!0);var k=new Error("Cannot find module '"+S+"'");throw k.code="MODULE_NOT_FOUND",k}var D=d[S]={exports:{}};c[S][0].call(D.exports,function(F){var E=c[S][1][F];return m(E||F)},D,D.exports,s,c,d,u)}return d[S].exports}for(var g=typeof hu=="function"&&hu,_=0;_<u.length;_++)m(u[_]);return m}({1:[function(s,c,d){var u=s("./utils"),m=s("./support"),g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";d.encode=function(_){for(var S,b,I,k,D,F,E,L=[],T=0,M=_.length,R=M,C=u.getTypeOf(_)!=="string";T<_.length;)R=M-T,I=C?(S=_[T++],b=T<M?_[T++]:0,T<M?_[T++]:0):(S=_.charCodeAt(T++),b=T<M?_.charCodeAt(T++):0,T<M?_.charCodeAt(T++):0),k=S>>2,D=(3&S)<<4|b>>4,F=1<R?(15&b)<<2|I>>6:64,E=2<R?63&I:64,L.push(g.charAt(k)+g.charAt(D)+g.charAt(F)+g.charAt(E));return L.join("")},d.decode=function(_){var S,b,I,k,D,F,E=0,L=0,T="data:";if(_.substr(0,T.length)===T)throw new Error("Invalid base64 input, it looks like a data url.");var M,R=3*(_=_.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(_.charAt(_.length-1)===g.charAt(64)&&R--,_.charAt(_.length-2)===g.charAt(64)&&R--,R%1!=0)throw new Error("Invalid base64 input, bad content length.");for(M=m.uint8array?new Uint8Array(0|R):new Array(0|R);E<_.length;)S=g.indexOf(_.charAt(E++))<<2|(k=g.indexOf(_.charAt(E++)))>>4,b=(15&k)<<4|(D=g.indexOf(_.charAt(E++)))>>2,I=(3&D)<<6|(F=g.indexOf(_.charAt(E++))),M[L++]=S,D!==64&&(M[L++]=b),F!==64&&(M[L++]=I);return M}},{"./support":30,"./utils":32}],2:[function(s,c,d){var u=s("./external"),m=s("./stream/DataWorker"),g=s("./stream/Crc32Probe"),_=s("./stream/DataLengthProbe");function S(b,I,k,D,F){this.compressedSize=b,this.uncompressedSize=I,this.crc32=k,this.compression=D,this.compressedContent=F}S.prototype={getContentWorker:function(){var b=new m(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new _("data_length")),I=this;return b.on("end",function(){if(this.streamInfo.data_length!==I.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),b},getCompressedWorker:function(){return new m(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},S.createWorkerFrom=function(b,I,k){return b.pipe(new g).pipe(new _("uncompressedSize")).pipe(I.compressWorker(k)).pipe(new _("compressedSize")).withStreamInfo("compression",I)},c.exports=S},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(s,c,d){var u=s("./stream/GenericWorker");d.STORE={magic:"\0\0",compressWorker:function(){return new u("STORE compression")},uncompressWorker:function(){return new u("STORE decompression")}},d.DEFLATE=s("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(s,c,d){var u=s("./utils"),m=function(){for(var g,_=[],S=0;S<256;S++){g=S;for(var b=0;b<8;b++)g=1&g?3988292384^g>>>1:g>>>1;_[S]=g}return _}();c.exports=function(g,_){return g!==void 0&&g.length?u.getTypeOf(g)!=="string"?function(S,b,I,k){var D=m,F=k+I;S^=-1;for(var E=k;E<F;E++)S=S>>>8^D[255&(S^b[E])];return-1^S}(0|_,g,g.length,0):function(S,b,I,k){var D=m,F=k+I;S^=-1;for(var E=k;E<F;E++)S=S>>>8^D[255&(S^b.charCodeAt(E))];return-1^S}(0|_,g,g.length,0):0}},{"./utils":32}],5:[function(s,c,d){d.base64=!1,d.binary=!1,d.dir=!1,d.createFolders=!0,d.date=null,d.compression=null,d.compressionOptions=null,d.comment=null,d.unixPermissions=null,d.dosPermissions=null},{}],6:[function(s,c,d){var u=null;u=typeof Promise<"u"?Promise:s("lie"),c.exports={Promise:u}},{lie:37}],7:[function(s,c,d){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",m=s("pako"),g=s("./utils"),_=s("./stream/GenericWorker"),S=u?"uint8array":"array";function b(I,k){_.call(this,"FlateWorker/"+I),this._pako=null,this._pakoAction=I,this._pakoOptions=k,this.meta={}}d.magic="\b\0",g.inherits(b,_),b.prototype.processChunk=function(I){this.meta=I.meta,this._pako===null&&this._createPako(),this._pako.push(g.transformTo(S,I.data),!1)},b.prototype.flush=function(){_.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},b.prototype.cleanUp=function(){_.prototype.cleanUp.call(this),this._pako=null},b.prototype._createPako=function(){this._pako=new m[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var I=this;this._pako.onData=function(k){I.push({data:k,meta:I.meta})}},d.compressWorker=function(I){return new b("Deflate",I)},d.uncompressWorker=function(){return new b("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(s,c,d){function u(D,F){var E,L="";for(E=0;E<F;E++)L+=String.fromCharCode(255&D),D>>>=8;return L}function m(D,F,E,L,T,M){var R,C,U=D.file,N=D.compression,X=M!==S.utf8encode,K=g.transformTo("string",M(U.name)),Z=g.transformTo("string",S.utf8encode(U.name)),ct=U.comment,Rt=g.transformTo("string",M(ct)),et=g.transformTo("string",S.utf8encode(ct)),_t=Z.length!==U.name.length,G=et.length!==ct.length,Pt="",Et="",At="",ce=U.dir,re=U.date,Ft={crc32:0,compressedSize:0,uncompressedSize:0};F&&!E||(Ft.crc32=D.crc32,Ft.compressedSize=D.compressedSize,Ft.uncompressedSize=D.uncompressedSize);var It=0;F&&(It|=8),X||!_t&&!G||(It|=2048);var Nt=0,Pe=0;ce&&(Nt|=16),T==="UNIX"?(Pe=798,Nt|=function(Wt,$e){var Si=Wt;return Wt||(Si=$e?16893:33204),(65535&Si)<<16}(U.unixPermissions,ce)):(Pe=20,Nt|=function(Wt){return 63&(Wt||0)}(U.dosPermissions)),R=re.getUTCHours(),R<<=6,R|=re.getUTCMinutes(),R<<=5,R|=re.getUTCSeconds()/2,C=re.getUTCFullYear()-1980,C<<=4,C|=re.getUTCMonth()+1,C<<=5,C|=re.getUTCDate(),_t&&(Et=u(1,1)+u(b(K),4)+Z,Pt+="up"+u(Et.length,2)+Et),G&&(At=u(1,1)+u(b(Rt),4)+et,Pt+="uc"+u(At.length,2)+At);var pe="";return pe+=`
2686
+ \0`,pe+=u(It,2),pe+=N.magic,pe+=u(R,2),pe+=u(C,2),pe+=u(Ft.crc32,4),pe+=u(Ft.compressedSize,4),pe+=u(Ft.uncompressedSize,4),pe+=u(K.length,2),pe+=u(Pt.length,2),{fileRecord:I.LOCAL_FILE_HEADER+pe+K+Pt,dirRecord:I.CENTRAL_FILE_HEADER+u(Pe,2)+pe+u(Rt.length,2)+"\0\0\0\0"+u(Nt,4)+u(L,4)+K+Pt+Rt}}var g=s("../utils"),_=s("../stream/GenericWorker"),S=s("../utf8"),b=s("../crc32"),I=s("../signature");function k(D,F,E,L){_.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=F,this.zipPlatform=E,this.encodeFileName=L,this.streamFiles=D,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}g.inherits(k,_),k.prototype.push=function(D){var F=D.meta.percent||0,E=this.entriesCount,L=this._sources.length;this.accumulate?this.contentBuffer.push(D):(this.bytesWritten+=D.data.length,_.prototype.push.call(this,{data:D.data,meta:{currentFile:this.currentFile,percent:E?(F+100*(E-L-1))/E:100}}))},k.prototype.openedSource=function(D){this.currentSourceOffset=this.bytesWritten,this.currentFile=D.file.name;var F=this.streamFiles&&!D.file.dir;if(F){var E=m(D,F,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},k.prototype.closedSource=function(D){this.accumulate=!1;var F=this.streamFiles&&!D.file.dir,E=m(D,F,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),F)this.push({data:function(L){return I.DATA_DESCRIPTOR+u(L.crc32,4)+u(L.compressedSize,4)+u(L.uncompressedSize,4)}(D),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},k.prototype.flush=function(){for(var D=this.bytesWritten,F=0;F<this.dirRecords.length;F++)this.push({data:this.dirRecords[F],meta:{percent:100}});var E=this.bytesWritten-D,L=function(T,M,R,C,U){var N=g.transformTo("string",U(C));return I.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(T,2)+u(T,2)+u(M,4)+u(R,4)+u(N.length,2)+N}(this.dirRecords.length,E,D,this.zipComment,this.encodeFileName);this.push({data:L,meta:{percent:100}})},k.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},k.prototype.registerPrevious=function(D){this._sources.push(D);var F=this;return D.on("data",function(E){F.processChunk(E)}),D.on("end",function(){F.closedSource(F.previous.streamInfo),F._sources.length?F.prepareNextSource():F.end()}),D.on("error",function(E){F.error(E)}),this},k.prototype.resume=function(){return!!_.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},k.prototype.error=function(D){var F=this._sources;if(!_.prototype.error.call(this,D))return!1;for(var E=0;E<F.length;E++)try{F[E].error(D)}catch{}return!0},k.prototype.lock=function(){_.prototype.lock.call(this);for(var D=this._sources,F=0;F<D.length;F++)D[F].lock()},c.exports=k},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(s,c,d){var u=s("../compressions"),m=s("./ZipFileWorker");d.generateWorker=function(g,_,S){var b=new m(_.streamFiles,S,_.platform,_.encodeFileName),I=0;try{g.forEach(function(k,D){I++;var F=function(M,R){var C=M||R,U=u[C];if(!U)throw new Error(C+" is not a valid compression method !");return U}(D.options.compression,_.compression),E=D.options.compressionOptions||_.compressionOptions||{},L=D.dir,T=D.date;D._compressWorker(F,E).withStreamInfo("file",{name:k,dir:L,date:T,comment:D.comment||"",unixPermissions:D.unixPermissions,dosPermissions:D.dosPermissions}).pipe(b)}),b.entriesCount=I}catch(k){b.error(k)}return b}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(s,c,d){function u(){if(!(this instanceof u))return new u;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var m=new u;for(var g in this)typeof this[g]!="function"&&(m[g]=this[g]);return m}}(u.prototype=s("./object")).loadAsync=s("./load"),u.support=s("./support"),u.defaults=s("./defaults"),u.version="3.10.1",u.loadAsync=function(m,g){return new u().loadAsync(m,g)},u.external=s("./external"),c.exports=u},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(s,c,d){var u=s("./utils"),m=s("./external"),g=s("./utf8"),_=s("./zipEntries"),S=s("./stream/Crc32Probe"),b=s("./nodejsUtils");function I(k){return new m.Promise(function(D,F){var E=k.decompressed.getContentWorker().pipe(new S);E.on("error",function(L){F(L)}).on("end",function(){E.streamInfo.crc32!==k.decompressed.crc32?F(new Error("Corrupted zip : CRC32 mismatch")):D()}).resume()})}c.exports=function(k,D){var F=this;return D=u.extend(D||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:g.utf8decode}),b.isNode&&b.isStream(k)?m.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",k,!0,D.optimizedBinaryString,D.base64).then(function(E){var L=new _(D);return L.load(E),L}).then(function(E){var L=[m.Promise.resolve(E)],T=E.files;if(D.checkCRC32)for(var M=0;M<T.length;M++)L.push(I(T[M]));return m.Promise.all(L)}).then(function(E){for(var L=E.shift(),T=L.files,M=0;M<T.length;M++){var R=T[M],C=R.fileNameStr,U=u.resolve(R.fileNameStr);F.file(U,R.decompressed,{binary:!0,optimizedBinaryString:!0,date:R.date,dir:R.dir,comment:R.fileCommentStr.length?R.fileCommentStr:null,unixPermissions:R.unixPermissions,dosPermissions:R.dosPermissions,createFolders:D.createFolders}),R.dir||(F.file(U).unsafeOriginalName=C)}return L.zipComment.length&&(F.comment=L.zipComment),F})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(s,c,d){var u=s("../utils"),m=s("../stream/GenericWorker");function g(_,S){m.call(this,"Nodejs stream input adapter for "+_),this._upstreamEnded=!1,this._bindStream(S)}u.inherits(g,m),g.prototype._bindStream=function(_){var S=this;(this._stream=_).pause(),_.on("data",function(b){S.push({data:b,meta:{percent:0}})}).on("error",function(b){S.isPaused?this.generatedError=b:S.error(b)}).on("end",function(){S.isPaused?S._upstreamEnded=!0:S.end()})},g.prototype.pause=function(){return!!m.prototype.pause.call(this)&&(this._stream.pause(),!0)},g.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},c.exports=g},{"../stream/GenericWorker":28,"../utils":32}],13:[function(s,c,d){var u=s("readable-stream").Readable;function m(g,_,S){u.call(this,_),this._helper=g;var b=this;g.on("data",function(I,k){b.push(I)||b._helper.pause(),S&&S(k)}).on("error",function(I){b.emit("error",I)}).on("end",function(){b.push(null)})}s("../utils").inherits(m,u),m.prototype._read=function(){this._helper.resume()},c.exports=m},{"../utils":32,"readable-stream":16}],14:[function(s,c,d){c.exports={isNode:typeof Buffer<"u",newBufferFrom:function(u,m){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(u,m);if(typeof u=="number")throw new Error('The "data" argument must not be a number');return new Buffer(u,m)},allocBuffer:function(u){if(Buffer.alloc)return Buffer.alloc(u);var m=new Buffer(u);return m.fill(0),m},isBuffer:function(u){return Buffer.isBuffer(u)},isStream:function(u){return u&&typeof u.on=="function"&&typeof u.pause=="function"&&typeof u.resume=="function"}}},{}],15:[function(s,c,d){function u(U,N,X){var K,Z=g.getTypeOf(N),ct=g.extend(X||{},b);ct.date=ct.date||new Date,ct.compression!==null&&(ct.compression=ct.compression.toUpperCase()),typeof ct.unixPermissions=="string"&&(ct.unixPermissions=parseInt(ct.unixPermissions,8)),ct.unixPermissions&&16384&ct.unixPermissions&&(ct.dir=!0),ct.dosPermissions&&16&ct.dosPermissions&&(ct.dir=!0),ct.dir&&(U=T(U)),ct.createFolders&&(K=L(U))&&M.call(this,K,!0);var Rt=Z==="string"&&ct.binary===!1&&ct.base64===!1;X&&X.binary!==void 0||(ct.binary=!Rt),(N instanceof I&&N.uncompressedSize===0||ct.dir||!N||N.length===0)&&(ct.base64=!1,ct.binary=!0,N="",ct.compression="STORE",Z="string");var et=null;et=N instanceof I||N instanceof _?N:F.isNode&&F.isStream(N)?new E(U,N):g.prepareContent(U,N,ct.binary,ct.optimizedBinaryString,ct.base64);var _t=new k(U,et,ct);this.files[U]=_t}var m=s("./utf8"),g=s("./utils"),_=s("./stream/GenericWorker"),S=s("./stream/StreamHelper"),b=s("./defaults"),I=s("./compressedObject"),k=s("./zipObject"),D=s("./generate"),F=s("./nodejsUtils"),E=s("./nodejs/NodejsStreamInputAdapter"),L=function(U){U.slice(-1)==="/"&&(U=U.substring(0,U.length-1));var N=U.lastIndexOf("/");return 0<N?U.substring(0,N):""},T=function(U){return U.slice(-1)!=="/"&&(U+="/"),U},M=function(U,N){return N=N!==void 0?N:b.createFolders,U=T(U),this.files[U]||u.call(this,U,null,{dir:!0,createFolders:N}),this.files[U]};function R(U){return Object.prototype.toString.call(U)==="[object RegExp]"}var C={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(U){var N,X,K;for(N in this.files)K=this.files[N],(X=N.slice(this.root.length,N.length))&&N.slice(0,this.root.length)===this.root&&U(X,K)},filter:function(U){var N=[];return this.forEach(function(X,K){U(X,K)&&N.push(K)}),N},file:function(U,N,X){if(arguments.length!==1)return U=this.root+U,u.call(this,U,N,X),this;if(R(U)){var K=U;return this.filter(function(ct,Rt){return!Rt.dir&&K.test(ct)})}var Z=this.files[this.root+U];return Z&&!Z.dir?Z:null},folder:function(U){if(!U)return this;if(R(U))return this.filter(function(Z,ct){return ct.dir&&U.test(Z)});var N=this.root+U,X=M.call(this,N),K=this.clone();return K.root=X.name,K},remove:function(U){U=this.root+U;var N=this.files[U];if(N||(U.slice(-1)!=="/"&&(U+="/"),N=this.files[U]),N&&!N.dir)delete this.files[U];else for(var X=this.filter(function(Z,ct){return ct.name.slice(0,U.length)===U}),K=0;K<X.length;K++)delete this.files[X[K].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(U){var N,X={};try{if((X=g.extend(U||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:m.utf8encode})).type=X.type.toLowerCase(),X.compression=X.compression.toUpperCase(),X.type==="binarystring"&&(X.type="string"),!X.type)throw new Error("No output type specified.");g.checkSupport(X.type),X.platform!=="darwin"&&X.platform!=="freebsd"&&X.platform!=="linux"&&X.platform!=="sunos"||(X.platform="UNIX"),X.platform==="win32"&&(X.platform="DOS");var K=X.comment||this.comment||"";N=D.generateWorker(this,X,K)}catch(Z){(N=new _("error")).error(Z)}return new S(N,X.type||"string",X.mimeType)},generateAsync:function(U,N){return this.generateInternalStream(U).accumulate(N)},generateNodeStream:function(U,N){return(U=U||{}).type||(U.type="nodebuffer"),this.generateInternalStream(U).toNodejsStream(N)}};c.exports=C},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(s,c,d){c.exports=s("stream")},{stream:void 0}],17:[function(s,c,d){var u=s("./DataReader");function m(g){u.call(this,g);for(var _=0;_<this.data.length;_++)g[_]=255&g[_]}s("../utils").inherits(m,u),m.prototype.byteAt=function(g){return this.data[this.zero+g]},m.prototype.lastIndexOfSignature=function(g){for(var _=g.charCodeAt(0),S=g.charCodeAt(1),b=g.charCodeAt(2),I=g.charCodeAt(3),k=this.length-4;0<=k;--k)if(this.data[k]===_&&this.data[k+1]===S&&this.data[k+2]===b&&this.data[k+3]===I)return k-this.zero;return-1},m.prototype.readAndCheckSignature=function(g){var _=g.charCodeAt(0),S=g.charCodeAt(1),b=g.charCodeAt(2),I=g.charCodeAt(3),k=this.readData(4);return _===k[0]&&S===k[1]&&b===k[2]&&I===k[3]},m.prototype.readData=function(g){if(this.checkOffset(g),g===0)return[];var _=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,_},c.exports=m},{"../utils":32,"./DataReader":18}],18:[function(s,c,d){var u=s("../utils");function m(g){this.data=g,this.length=g.length,this.index=0,this.zero=0}m.prototype={checkOffset:function(g){this.checkIndex(this.index+g)},checkIndex:function(g){if(this.length<this.zero+g||g<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+g+"). Corrupted zip ?")},setIndex:function(g){this.checkIndex(g),this.index=g},skip:function(g){this.setIndex(this.index+g)},byteAt:function(){},readInt:function(g){var _,S=0;for(this.checkOffset(g),_=this.index+g-1;_>=this.index;_--)S=(S<<8)+this.byteAt(_);return this.index+=g,S},readString:function(g){return u.transformTo("string",this.readData(g))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var g=this.readInt(4);return new Date(Date.UTC(1980+(g>>25&127),(g>>21&15)-1,g>>16&31,g>>11&31,g>>5&63,(31&g)<<1))}},c.exports=m},{"../utils":32}],19:[function(s,c,d){var u=s("./Uint8ArrayReader");function m(g){u.call(this,g)}s("../utils").inherits(m,u),m.prototype.readData=function(g){this.checkOffset(g);var _=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,_},c.exports=m},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(s,c,d){var u=s("./DataReader");function m(g){u.call(this,g)}s("../utils").inherits(m,u),m.prototype.byteAt=function(g){return this.data.charCodeAt(this.zero+g)},m.prototype.lastIndexOfSignature=function(g){return this.data.lastIndexOf(g)-this.zero},m.prototype.readAndCheckSignature=function(g){return g===this.readData(4)},m.prototype.readData=function(g){this.checkOffset(g);var _=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,_},c.exports=m},{"../utils":32,"./DataReader":18}],21:[function(s,c,d){var u=s("./ArrayReader");function m(g){u.call(this,g)}s("../utils").inherits(m,u),m.prototype.readData=function(g){if(this.checkOffset(g),g===0)return new Uint8Array(0);var _=this.data.subarray(this.zero+this.index,this.zero+this.index+g);return this.index+=g,_},c.exports=m},{"../utils":32,"./ArrayReader":17}],22:[function(s,c,d){var u=s("../utils"),m=s("../support"),g=s("./ArrayReader"),_=s("./StringReader"),S=s("./NodeBufferReader"),b=s("./Uint8ArrayReader");c.exports=function(I){var k=u.getTypeOf(I);return u.checkSupport(k),k!=="string"||m.uint8array?k==="nodebuffer"?new S(I):m.uint8array?new b(u.transformTo("uint8array",I)):new g(u.transformTo("array",I)):new _(I)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(s,c,d){d.LOCAL_FILE_HEADER="PK",d.CENTRAL_FILE_HEADER="PK",d.CENTRAL_DIRECTORY_END="PK",d.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",d.ZIP64_CENTRAL_DIRECTORY_END="PK",d.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(s,c,d){var u=s("./GenericWorker"),m=s("../utils");function g(_){u.call(this,"ConvertWorker to "+_),this.destType=_}m.inherits(g,u),g.prototype.processChunk=function(_){this.push({data:m.transformTo(this.destType,_.data),meta:_.meta})},c.exports=g},{"../utils":32,"./GenericWorker":28}],25:[function(s,c,d){var u=s("./GenericWorker"),m=s("../crc32");function g(){u.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}s("../utils").inherits(g,u),g.prototype.processChunk=function(_){this.streamInfo.crc32=m(_.data,this.streamInfo.crc32||0),this.push(_)},c.exports=g},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(s,c,d){var u=s("../utils"),m=s("./GenericWorker");function g(_){m.call(this,"DataLengthProbe for "+_),this.propName=_,this.withStreamInfo(_,0)}u.inherits(g,m),g.prototype.processChunk=function(_){if(_){var S=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=S+_.data.length}m.prototype.processChunk.call(this,_)},c.exports=g},{"../utils":32,"./GenericWorker":28}],27:[function(s,c,d){var u=s("../utils"),m=s("./GenericWorker");function g(_){m.call(this,"DataWorker");var S=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,_.then(function(b){S.dataIsReady=!0,S.data=b,S.max=b&&b.length||0,S.type=u.getTypeOf(b),S.isPaused||S._tickAndRepeat()},function(b){S.error(b)})}u.inherits(g,m),g.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this.data=null},g.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,u.delay(this._tickAndRepeat,[],this)),!0)},g.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(u.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},g.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var _=null,S=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":_=this.data.substring(this.index,S);break;case"uint8array":_=this.data.subarray(this.index,S);break;case"array":case"nodebuffer":_=this.data.slice(this.index,S)}return this.index=S,this.push({data:_,meta:{percent:this.max?this.index/this.max*100:0}})},c.exports=g},{"../utils":32,"./GenericWorker":28}],28:[function(s,c,d){function u(m){this.name=m||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}u.prototype={push:function(m){this.emit("data",m)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(m){this.emit("error",m)}return!0},error:function(m){return!this.isFinished&&(this.isPaused?this.generatedError=m:(this.isFinished=!0,this.emit("error",m),this.previous&&this.previous.error(m),this.cleanUp()),!0)},on:function(m,g){return this._listeners[m].push(g),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(m,g){if(this._listeners[m])for(var _=0;_<this._listeners[m].length;_++)this._listeners[m][_].call(this,g)},pipe:function(m){return m.registerPrevious(this)},registerPrevious:function(m){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=m.streamInfo,this.mergeStreamInfo(),this.previous=m;var g=this;return m.on("data",function(_){g.processChunk(_)}),m.on("end",function(){g.end()}),m.on("error",function(_){g.error(_)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var m=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),m=!0),this.previous&&this.previous.resume(),!m},flush:function(){},processChunk:function(m){this.push(m)},withStreamInfo:function(m,g){return this.extraStreamInfo[m]=g,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var m in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,m)&&(this.streamInfo[m]=this.extraStreamInfo[m])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var m="Worker "+this.name;return this.previous?this.previous+" -> "+m:m}},c.exports=u},{}],29:[function(s,c,d){var u=s("../utils"),m=s("./ConvertWorker"),g=s("./GenericWorker"),_=s("../base64"),S=s("../support"),b=s("../external"),I=null;if(S.nodestream)try{I=s("../nodejs/NodejsStreamOutputAdapter")}catch{}function k(F,E){return new b.Promise(function(L,T){var M=[],R=F._internalType,C=F._outputType,U=F._mimeType;F.on("data",function(N,X){M.push(N),E&&E(X)}).on("error",function(N){M=[],T(N)}).on("end",function(){try{var N=function(X,K,Z){switch(X){case"blob":return u.newBlob(u.transformTo("arraybuffer",K),Z);case"base64":return _.encode(K);default:return u.transformTo(X,K)}}(C,function(X,K){var Z,ct=0,Rt=null,et=0;for(Z=0;Z<K.length;Z++)et+=K[Z].length;switch(X){case"string":return K.join("");case"array":return Array.prototype.concat.apply([],K);case"uint8array":for(Rt=new Uint8Array(et),Z=0;Z<K.length;Z++)Rt.set(K[Z],ct),ct+=K[Z].length;return Rt;case"nodebuffer":return Buffer.concat(K);default:throw new Error("concat : unsupported type '"+X+"'")}}(R,M),U);L(N)}catch(X){T(X)}M=[]}).resume()})}function D(F,E,L){var T=E;switch(E){case"blob":case"arraybuffer":T="uint8array";break;case"base64":T="string"}try{this._internalType=T,this._outputType=E,this._mimeType=L,u.checkSupport(T),this._worker=F.pipe(new m(T)),F.lock()}catch(M){this._worker=new g("error"),this._worker.error(M)}}D.prototype={accumulate:function(F){return k(this,F)},on:function(F,E){var L=this;return F==="data"?this._worker.on(F,function(T){E.call(L,T.data,T.meta)}):this._worker.on(F,function(){u.delay(E,arguments,L)}),this},resume:function(){return u.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(F){if(u.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new I(this,{objectMode:this._outputType!=="nodebuffer"},F)}},c.exports=D},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(s,c,d){if(d.base64=!0,d.array=!0,d.string=!0,d.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",d.nodebuffer=typeof Buffer<"u",d.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")d.blob=!1;else{var u=new ArrayBuffer(0);try{d.blob=new Blob([u],{type:"application/zip"}).size===0}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);m.append(u),d.blob=m.getBlob("application/zip").size===0}catch{d.blob=!1}}}try{d.nodestream=!!s("readable-stream").Readable}catch{d.nodestream=!1}},{"readable-stream":16}],31:[function(s,c,d){for(var u=s("./utils"),m=s("./support"),g=s("./nodejsUtils"),_=s("./stream/GenericWorker"),S=new Array(256),b=0;b<256;b++)S[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;S[254]=S[254]=1;function I(){_.call(this,"utf-8 decode"),this.leftOver=null}function k(){_.call(this,"utf-8 encode")}d.utf8encode=function(D){return m.nodebuffer?g.newBufferFrom(D,"utf-8"):function(F){var E,L,T,M,R,C=F.length,U=0;for(M=0;M<C;M++)(64512&(L=F.charCodeAt(M)))==55296&&M+1<C&&(64512&(T=F.charCodeAt(M+1)))==56320&&(L=65536+(L-55296<<10)+(T-56320),M++),U+=L<128?1:L<2048?2:L<65536?3:4;for(E=m.uint8array?new Uint8Array(U):new Array(U),M=R=0;R<U;M++)(64512&(L=F.charCodeAt(M)))==55296&&M+1<C&&(64512&(T=F.charCodeAt(M+1)))==56320&&(L=65536+(L-55296<<10)+(T-56320),M++),L<128?E[R++]=L:(L<2048?E[R++]=192|L>>>6:(L<65536?E[R++]=224|L>>>12:(E[R++]=240|L>>>18,E[R++]=128|L>>>12&63),E[R++]=128|L>>>6&63),E[R++]=128|63&L);return E}(D)},d.utf8decode=function(D){return m.nodebuffer?u.transformTo("nodebuffer",D).toString("utf-8"):function(F){var E,L,T,M,R=F.length,C=new Array(2*R);for(E=L=0;E<R;)if((T=F[E++])<128)C[L++]=T;else if(4<(M=S[T]))C[L++]=65533,E+=M-1;else{for(T&=M===2?31:M===3?15:7;1<M&&E<R;)T=T<<6|63&F[E++],M--;1<M?C[L++]=65533:T<65536?C[L++]=T:(T-=65536,C[L++]=55296|T>>10&1023,C[L++]=56320|1023&T)}return C.length!==L&&(C.subarray?C=C.subarray(0,L):C.length=L),u.applyFromCharCode(C)}(D=u.transformTo(m.uint8array?"uint8array":"array",D))},u.inherits(I,_),I.prototype.processChunk=function(D){var F=u.transformTo(m.uint8array?"uint8array":"array",D.data);if(this.leftOver&&this.leftOver.length){if(m.uint8array){var E=F;(F=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),F.set(E,this.leftOver.length)}else F=this.leftOver.concat(F);this.leftOver=null}var L=function(M,R){var C;for((R=R||M.length)>M.length&&(R=M.length),C=R-1;0<=C&&(192&M[C])==128;)C--;return C<0||C===0?R:C+S[M[C]]>R?C:R}(F),T=F;L!==F.length&&(m.uint8array?(T=F.subarray(0,L),this.leftOver=F.subarray(L,F.length)):(T=F.slice(0,L),this.leftOver=F.slice(L,F.length))),this.push({data:d.utf8decode(T),meta:D.meta})},I.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:d.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},d.Utf8DecodeWorker=I,u.inherits(k,_),k.prototype.processChunk=function(D){this.push({data:d.utf8encode(D.data),meta:D.meta})},d.Utf8EncodeWorker=k},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(s,c,d){var u=s("./support"),m=s("./base64"),g=s("./nodejsUtils"),_=s("./external");function S(E){return E}function b(E,L){for(var T=0;T<E.length;++T)L[T]=255&E.charCodeAt(T);return L}s("setimmediate"),d.newBlob=function(E,L){d.checkSupport("blob");try{return new Blob([E],{type:L})}catch{try{var T=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return T.append(E),T.getBlob(L)}catch{throw new Error("Bug : can't construct the Blob.")}}};var I={stringifyByChunk:function(E,L,T){var M=[],R=0,C=E.length;if(C<=T)return String.fromCharCode.apply(null,E);for(;R<C;)L==="array"||L==="nodebuffer"?M.push(String.fromCharCode.apply(null,E.slice(R,Math.min(R+T,C)))):M.push(String.fromCharCode.apply(null,E.subarray(R,Math.min(R+T,C)))),R+=T;return M.join("")},stringifyByChar:function(E){for(var L="",T=0;T<E.length;T++)L+=String.fromCharCode(E[T]);return L},applyCanBeUsed:{uint8array:function(){try{return u.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return u.nodebuffer&&String.fromCharCode.apply(null,g.allocBuffer(1)).length===1}catch{return!1}}()}};function k(E){var L=65536,T=d.getTypeOf(E),M=!0;if(T==="uint8array"?M=I.applyCanBeUsed.uint8array:T==="nodebuffer"&&(M=I.applyCanBeUsed.nodebuffer),M)for(;1<L;)try{return I.stringifyByChunk(E,T,L)}catch{L=Math.floor(L/2)}return I.stringifyByChar(E)}function D(E,L){for(var T=0;T<E.length;T++)L[T]=E[T];return L}d.applyFromCharCode=k;var F={};F.string={string:S,array:function(E){return b(E,new Array(E.length))},arraybuffer:function(E){return F.string.uint8array(E).buffer},uint8array:function(E){return b(E,new Uint8Array(E.length))},nodebuffer:function(E){return b(E,g.allocBuffer(E.length))}},F.array={string:k,array:S,arraybuffer:function(E){return new Uint8Array(E).buffer},uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return g.newBufferFrom(E)}},F.arraybuffer={string:function(E){return k(new Uint8Array(E))},array:function(E){return D(new Uint8Array(E),new Array(E.byteLength))},arraybuffer:S,uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return g.newBufferFrom(new Uint8Array(E))}},F.uint8array={string:k,array:function(E){return D(E,new Array(E.length))},arraybuffer:function(E){return E.buffer},uint8array:S,nodebuffer:function(E){return g.newBufferFrom(E)}},F.nodebuffer={string:k,array:function(E){return D(E,new Array(E.length))},arraybuffer:function(E){return F.nodebuffer.uint8array(E).buffer},uint8array:function(E){return D(E,new Uint8Array(E.length))},nodebuffer:S},d.transformTo=function(E,L){if(L=L||"",!E)return L;d.checkSupport(E);var T=d.getTypeOf(L);return F[T][E](L)},d.resolve=function(E){for(var L=E.split("/"),T=[],M=0;M<L.length;M++){var R=L[M];R==="."||R===""&&M!==0&&M!==L.length-1||(R===".."?T.pop():T.push(R))}return T.join("/")},d.getTypeOf=function(E){return typeof E=="string"?"string":Object.prototype.toString.call(E)==="[object Array]"?"array":u.nodebuffer&&g.isBuffer(E)?"nodebuffer":u.uint8array&&E instanceof Uint8Array?"uint8array":u.arraybuffer&&E instanceof ArrayBuffer?"arraybuffer":void 0},d.checkSupport=function(E){if(!u[E.toLowerCase()])throw new Error(E+" is not supported by this platform")},d.MAX_VALUE_16BITS=65535,d.MAX_VALUE_32BITS=-1,d.pretty=function(E){var L,T,M="";for(T=0;T<(E||"").length;T++)M+="\\x"+((L=E.charCodeAt(T))<16?"0":"")+L.toString(16).toUpperCase();return M},d.delay=function(E,L,T){setImmediate(function(){E.apply(T||null,L||[])})},d.inherits=function(E,L){function T(){}T.prototype=L.prototype,E.prototype=new T},d.extend=function(){var E,L,T={};for(E=0;E<arguments.length;E++)for(L in arguments[E])Object.prototype.hasOwnProperty.call(arguments[E],L)&&T[L]===void 0&&(T[L]=arguments[E][L]);return T},d.prepareContent=function(E,L,T,M,R){return _.Promise.resolve(L).then(function(C){return u.blob&&(C instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(C))!==-1)&&typeof FileReader<"u"?new _.Promise(function(U,N){var X=new FileReader;X.onload=function(K){U(K.target.result)},X.onerror=function(K){N(K.target.error)},X.readAsArrayBuffer(C)}):C}).then(function(C){var U=d.getTypeOf(C);return U?(U==="arraybuffer"?C=d.transformTo("uint8array",C):U==="string"&&(R?C=m.decode(C):T&&M!==!0&&(C=function(N){return b(N,u.uint8array?new Uint8Array(N.length):new Array(N.length))}(C))),C):_.Promise.reject(new Error("Can't read the data of '"+E+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(s,c,d){var u=s("./reader/readerFor"),m=s("./utils"),g=s("./signature"),_=s("./zipEntry"),S=s("./support");function b(I){this.files=[],this.loadOptions=I}b.prototype={checkSignature:function(I){if(!this.reader.readAndCheckSignature(I)){this.reader.index-=4;var k=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+m.pretty(k)+", expected "+m.pretty(I)+")")}},isSignature:function(I,k){var D=this.reader.index;this.reader.setIndex(I);var F=this.reader.readString(4)===k;return this.reader.setIndex(D),F},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var I=this.reader.readData(this.zipCommentLength),k=S.uint8array?"uint8array":"array",D=m.transformTo(k,I);this.zipComment=this.loadOptions.decodeFileName(D)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var I,k,D,F=this.zip64EndOfCentralSize-44;0<F;)I=this.reader.readInt(2),k=this.reader.readInt(4),D=this.reader.readData(k),this.zip64ExtensibleData[I]={id:I,length:k,value:D}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var I,k;for(I=0;I<this.files.length;I++)k=this.files[I],this.reader.setIndex(k.localHeaderOffset),this.checkSignature(g.LOCAL_FILE_HEADER),k.readLocalPart(this.reader),k.handleUTF8(),k.processAttributes()},readCentralDir:function(){var I;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(g.CENTRAL_FILE_HEADER);)(I=new _({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(I);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var I=this.reader.lastIndexOfSignature(g.CENTRAL_DIRECTORY_END);if(I<0)throw this.isSignature(0,g.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(I);var k=I;if(this.checkSignature(g.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===m.MAX_VALUE_16BITS||this.diskWithCentralDirStart===m.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===m.MAX_VALUE_16BITS||this.centralDirRecords===m.MAX_VALUE_16BITS||this.centralDirSize===m.MAX_VALUE_32BITS||this.centralDirOffset===m.MAX_VALUE_32BITS){if(this.zip64=!0,(I=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(I),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,g.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var D=this.centralDirOffset+this.centralDirSize;this.zip64&&(D+=20,D+=12+this.zip64EndOfCentralSize);var F=k-D;if(0<F)this.isSignature(k,g.CENTRAL_FILE_HEADER)||(this.reader.zero=F);else if(F<0)throw new Error("Corrupted zip: missing "+Math.abs(F)+" bytes.")},prepareReader:function(I){this.reader=u(I)},load:function(I){this.prepareReader(I),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},c.exports=b},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(s,c,d){var u=s("./reader/readerFor"),m=s("./utils"),g=s("./compressedObject"),_=s("./crc32"),S=s("./utf8"),b=s("./compressions"),I=s("./support");function k(D,F){this.options=D,this.loadOptions=F}k.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(D){var F,E;if(D.skip(22),this.fileNameLength=D.readInt(2),E=D.readInt(2),this.fileName=D.readData(this.fileNameLength),D.skip(E),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((F=function(L){for(var T in b)if(Object.prototype.hasOwnProperty.call(b,T)&&b[T].magic===L)return b[T];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+m.pretty(this.compressionMethod)+" unknown (inner file : "+m.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,F,D.readData(this.compressedSize))},readCentralPart:function(D){this.versionMadeBy=D.readInt(2),D.skip(2),this.bitFlag=D.readInt(2),this.compressionMethod=D.readString(2),this.date=D.readDate(),this.crc32=D.readInt(4),this.compressedSize=D.readInt(4),this.uncompressedSize=D.readInt(4);var F=D.readInt(2);if(this.extraFieldsLength=D.readInt(2),this.fileCommentLength=D.readInt(2),this.diskNumberStart=D.readInt(2),this.internalFileAttributes=D.readInt(2),this.externalFileAttributes=D.readInt(4),this.localHeaderOffset=D.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");D.skip(F),this.readExtraFields(D),this.parseZIP64ExtraField(D),this.fileComment=D.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var D=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),D==0&&(this.dosPermissions=63&this.externalFileAttributes),D==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var D=u(this.extraFields[1].value);this.uncompressedSize===m.MAX_VALUE_32BITS&&(this.uncompressedSize=D.readInt(8)),this.compressedSize===m.MAX_VALUE_32BITS&&(this.compressedSize=D.readInt(8)),this.localHeaderOffset===m.MAX_VALUE_32BITS&&(this.localHeaderOffset=D.readInt(8)),this.diskNumberStart===m.MAX_VALUE_32BITS&&(this.diskNumberStart=D.readInt(4))}},readExtraFields:function(D){var F,E,L,T=D.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});D.index+4<T;)F=D.readInt(2),E=D.readInt(2),L=D.readData(E),this.extraFields[F]={id:F,length:E,value:L};D.setIndex(T)},handleUTF8:function(){var D=I.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=S.utf8decode(this.fileName),this.fileCommentStr=S.utf8decode(this.fileComment);else{var F=this.findExtraFieldUnicodePath();if(F!==null)this.fileNameStr=F;else{var E=m.transformTo(D,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(E)}var L=this.findExtraFieldUnicodeComment();if(L!==null)this.fileCommentStr=L;else{var T=m.transformTo(D,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(T)}}},findExtraFieldUnicodePath:function(){var D=this.extraFields[28789];if(D){var F=u(D.value);return F.readInt(1)!==1||_(this.fileName)!==F.readInt(4)?null:S.utf8decode(F.readData(D.length-5))}return null},findExtraFieldUnicodeComment:function(){var D=this.extraFields[25461];if(D){var F=u(D.value);return F.readInt(1)!==1||_(this.fileComment)!==F.readInt(4)?null:S.utf8decode(F.readData(D.length-5))}return null}},c.exports=k},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(s,c,d){function u(F,E,L){this.name=F,this.dir=L.dir,this.date=L.date,this.comment=L.comment,this.unixPermissions=L.unixPermissions,this.dosPermissions=L.dosPermissions,this._data=E,this._dataBinary=L.binary,this.options={compression:L.compression,compressionOptions:L.compressionOptions}}var m=s("./stream/StreamHelper"),g=s("./stream/DataWorker"),_=s("./utf8"),S=s("./compressedObject"),b=s("./stream/GenericWorker");u.prototype={internalStream:function(F){var E=null,L="string";try{if(!F)throw new Error("No output type specified.");var T=(L=F.toLowerCase())==="string"||L==="text";L!=="binarystring"&&L!=="text"||(L="string"),E=this._decompressWorker();var M=!this._dataBinary;M&&!T&&(E=E.pipe(new _.Utf8EncodeWorker)),!M&&T&&(E=E.pipe(new _.Utf8DecodeWorker))}catch(R){(E=new b("error")).error(R)}return new m(E,L,"")},async:function(F,E){return this.internalStream(F).accumulate(E)},nodeStream:function(F,E){return this.internalStream(F||"nodebuffer").toNodejsStream(E)},_compressWorker:function(F,E){if(this._data instanceof S&&this._data.compression.magic===F.magic)return this._data.getCompressedWorker();var L=this._decompressWorker();return this._dataBinary||(L=L.pipe(new _.Utf8EncodeWorker)),S.createWorkerFrom(L,F,E)},_decompressWorker:function(){return this._data instanceof S?this._data.getContentWorker():this._data instanceof b?this._data:new g(this._data)}};for(var I=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],k=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},D=0;D<I.length;D++)u.prototype[I[D]]=k;c.exports=u},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(s,c,d){(function(u){var m,g,_=u.MutationObserver||u.WebKitMutationObserver;if(_){var S=0,b=new _(F),I=u.document.createTextNode("");b.observe(I,{characterData:!0}),m=function(){I.data=S=++S%2}}else if(u.setImmediate||u.MessageChannel===void 0)m="document"in u&&"onreadystatechange"in u.document.createElement("script")?function(){var E=u.document.createElement("script");E.onreadystatechange=function(){F(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},u.document.documentElement.appendChild(E)}:function(){setTimeout(F,0)};else{var k=new u.MessageChannel;k.port1.onmessage=F,m=function(){k.port2.postMessage(0)}}var D=[];function F(){var E,L;g=!0;for(var T=D.length;T;){for(L=D,D=[],E=-1;++E<T;)L[E]();T=D.length}g=!1}c.exports=function(E){D.push(E)!==1||g||m()}}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(s,c,d){var u=s("immediate");function m(){}var g={},_=["REJECTED"],S=["FULFILLED"],b=["PENDING"];function I(T){if(typeof T!="function")throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,T!==m&&E(this,T)}function k(T,M,R){this.promise=T,typeof M=="function"&&(this.onFulfilled=M,this.callFulfilled=this.otherCallFulfilled),typeof R=="function"&&(this.onRejected=R,this.callRejected=this.otherCallRejected)}function D(T,M,R){u(function(){var C;try{C=M(R)}catch(U){return g.reject(T,U)}C===T?g.reject(T,new TypeError("Cannot resolve promise with itself")):g.resolve(T,C)})}function F(T){var M=T&&T.then;if(T&&(typeof T=="object"||typeof T=="function")&&typeof M=="function")return function(){M.apply(T,arguments)}}function E(T,M){var R=!1;function C(X){R||(R=!0,g.reject(T,X))}function U(X){R||(R=!0,g.resolve(T,X))}var N=L(function(){M(U,C)});N.status==="error"&&C(N.value)}function L(T,M){var R={};try{R.value=T(M),R.status="success"}catch(C){R.status="error",R.value=C}return R}(c.exports=I).prototype.finally=function(T){if(typeof T!="function")return this;var M=this.constructor;return this.then(function(R){return M.resolve(T()).then(function(){return R})},function(R){return M.resolve(T()).then(function(){throw R})})},I.prototype.catch=function(T){return this.then(null,T)},I.prototype.then=function(T,M){if(typeof T!="function"&&this.state===S||typeof M!="function"&&this.state===_)return this;var R=new this.constructor(m);return this.state!==b?D(R,this.state===S?T:M,this.outcome):this.queue.push(new k(R,T,M)),R},k.prototype.callFulfilled=function(T){g.resolve(this.promise,T)},k.prototype.otherCallFulfilled=function(T){D(this.promise,this.onFulfilled,T)},k.prototype.callRejected=function(T){g.reject(this.promise,T)},k.prototype.otherCallRejected=function(T){D(this.promise,this.onRejected,T)},g.resolve=function(T,M){var R=L(F,M);if(R.status==="error")return g.reject(T,R.value);var C=R.value;if(C)E(T,C);else{T.state=S,T.outcome=M;for(var U=-1,N=T.queue.length;++U<N;)T.queue[U].callFulfilled(M)}return T},g.reject=function(T,M){T.state=_,T.outcome=M;for(var R=-1,C=T.queue.length;++R<C;)T.queue[R].callRejected(M);return T},I.resolve=function(T){return T instanceof this?T:g.resolve(new this(m),T)},I.reject=function(T){var M=new this(m);return g.reject(M,T)},I.all=function(T){var M=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=T.length,C=!1;if(!R)return this.resolve([]);for(var U=new Array(R),N=0,X=-1,K=new this(m);++X<R;)Z(T[X],X);return K;function Z(ct,Rt){M.resolve(ct).then(function(et){U[Rt]=et,++N!==R||C||(C=!0,g.resolve(K,U))},function(et){C||(C=!0,g.reject(K,et))})}},I.race=function(T){var M=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=T.length,C=!1;if(!R)return this.resolve([]);for(var U=-1,N=new this(m);++U<R;)X=T[U],M.resolve(X).then(function(K){C||(C=!0,g.resolve(N,K))},function(K){C||(C=!0,g.reject(N,K))});var X;return N}},{immediate:36}],38:[function(s,c,d){var u={};(0,s("./lib/utils/common").assign)(u,s("./lib/deflate"),s("./lib/inflate"),s("./lib/zlib/constants")),c.exports=u},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(s,c,d){var u=s("./zlib/deflate"),m=s("./utils/common"),g=s("./utils/strings"),_=s("./zlib/messages"),S=s("./zlib/zstream"),b=Object.prototype.toString,I=0,k=-1,D=0,F=8;function E(T){if(!(this instanceof E))return new E(T);this.options=m.assign({level:k,method:F,chunkSize:16384,windowBits:15,memLevel:8,strategy:D,to:""},T||{});var M=this.options;M.raw&&0<M.windowBits?M.windowBits=-M.windowBits:M.gzip&&0<M.windowBits&&M.windowBits<16&&(M.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;var R=u.deflateInit2(this.strm,M.level,M.method,M.windowBits,M.memLevel,M.strategy);if(R!==I)throw new Error(_[R]);if(M.header&&u.deflateSetHeader(this.strm,M.header),M.dictionary){var C;if(C=typeof M.dictionary=="string"?g.string2buf(M.dictionary):b.call(M.dictionary)==="[object ArrayBuffer]"?new Uint8Array(M.dictionary):M.dictionary,(R=u.deflateSetDictionary(this.strm,C))!==I)throw new Error(_[R]);this._dict_set=!0}}function L(T,M){var R=new E(M);if(R.push(T,!0),R.err)throw R.msg||_[R.err];return R.result}E.prototype.push=function(T,M){var R,C,U=this.strm,N=this.options.chunkSize;if(this.ended)return!1;C=M===~~M?M:M===!0?4:0,typeof T=="string"?U.input=g.string2buf(T):b.call(T)==="[object ArrayBuffer]"?U.input=new Uint8Array(T):U.input=T,U.next_in=0,U.avail_in=U.input.length;do{if(U.avail_out===0&&(U.output=new m.Buf8(N),U.next_out=0,U.avail_out=N),(R=u.deflate(U,C))!==1&&R!==I)return this.onEnd(R),!(this.ended=!0);U.avail_out!==0&&(U.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(g.buf2binstring(m.shrinkBuf(U.output,U.next_out))):this.onData(m.shrinkBuf(U.output,U.next_out)))}while((0<U.avail_in||U.avail_out===0)&&R!==1);return C===4?(R=u.deflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===I):C!==2||(this.onEnd(I),!(U.avail_out=0))},E.prototype.onData=function(T){this.chunks.push(T)},E.prototype.onEnd=function(T){T===I&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=T,this.msg=this.strm.msg},d.Deflate=E,d.deflate=L,d.deflateRaw=function(T,M){return(M=M||{}).raw=!0,L(T,M)},d.gzip=function(T,M){return(M=M||{}).gzip=!0,L(T,M)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(s,c,d){var u=s("./zlib/inflate"),m=s("./utils/common"),g=s("./utils/strings"),_=s("./zlib/constants"),S=s("./zlib/messages"),b=s("./zlib/zstream"),I=s("./zlib/gzheader"),k=Object.prototype.toString;function D(E){if(!(this instanceof D))return new D(E);this.options=m.assign({chunkSize:16384,windowBits:0,to:""},E||{});var L=this.options;L.raw&&0<=L.windowBits&&L.windowBits<16&&(L.windowBits=-L.windowBits,L.windowBits===0&&(L.windowBits=-15)),!(0<=L.windowBits&&L.windowBits<16)||E&&E.windowBits||(L.windowBits+=32),15<L.windowBits&&L.windowBits<48&&!(15&L.windowBits)&&(L.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new b,this.strm.avail_out=0;var T=u.inflateInit2(this.strm,L.windowBits);if(T!==_.Z_OK)throw new Error(S[T]);this.header=new I,u.inflateGetHeader(this.strm,this.header)}function F(E,L){var T=new D(L);if(T.push(E,!0),T.err)throw T.msg||S[T.err];return T.result}D.prototype.push=function(E,L){var T,M,R,C,U,N,X=this.strm,K=this.options.chunkSize,Z=this.options.dictionary,ct=!1;if(this.ended)return!1;M=L===~~L?L:L===!0?_.Z_FINISH:_.Z_NO_FLUSH,typeof E=="string"?X.input=g.binstring2buf(E):k.call(E)==="[object ArrayBuffer]"?X.input=new Uint8Array(E):X.input=E,X.next_in=0,X.avail_in=X.input.length;do{if(X.avail_out===0&&(X.output=new m.Buf8(K),X.next_out=0,X.avail_out=K),(T=u.inflate(X,_.Z_NO_FLUSH))===_.Z_NEED_DICT&&Z&&(N=typeof Z=="string"?g.string2buf(Z):k.call(Z)==="[object ArrayBuffer]"?new Uint8Array(Z):Z,T=u.inflateSetDictionary(this.strm,N)),T===_.Z_BUF_ERROR&&ct===!0&&(T=_.Z_OK,ct=!1),T!==_.Z_STREAM_END&&T!==_.Z_OK)return this.onEnd(T),!(this.ended=!0);X.next_out&&(X.avail_out!==0&&T!==_.Z_STREAM_END&&(X.avail_in!==0||M!==_.Z_FINISH&&M!==_.Z_SYNC_FLUSH)||(this.options.to==="string"?(R=g.utf8border(X.output,X.next_out),C=X.next_out-R,U=g.buf2string(X.output,R),X.next_out=C,X.avail_out=K-C,C&&m.arraySet(X.output,X.output,R,C,0),this.onData(U)):this.onData(m.shrinkBuf(X.output,X.next_out)))),X.avail_in===0&&X.avail_out===0&&(ct=!0)}while((0<X.avail_in||X.avail_out===0)&&T!==_.Z_STREAM_END);return T===_.Z_STREAM_END&&(M=_.Z_FINISH),M===_.Z_FINISH?(T=u.inflateEnd(this.strm),this.onEnd(T),this.ended=!0,T===_.Z_OK):M!==_.Z_SYNC_FLUSH||(this.onEnd(_.Z_OK),!(X.avail_out=0))},D.prototype.onData=function(E){this.chunks.push(E)},D.prototype.onEnd=function(E){E===_.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=E,this.msg=this.strm.msg},d.Inflate=D,d.inflate=F,d.inflateRaw=function(E,L){return(L=L||{}).raw=!0,F(E,L)},d.ungzip=F},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(s,c,d){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";d.assign=function(_){for(var S=Array.prototype.slice.call(arguments,1);S.length;){var b=S.shift();if(b){if(typeof b!="object")throw new TypeError(b+"must be non-object");for(var I in b)b.hasOwnProperty(I)&&(_[I]=b[I])}}return _},d.shrinkBuf=function(_,S){return _.length===S?_:_.subarray?_.subarray(0,S):(_.length=S,_)};var m={arraySet:function(_,S,b,I,k){if(S.subarray&&_.subarray)_.set(S.subarray(b,b+I),k);else for(var D=0;D<I;D++)_[k+D]=S[b+D]},flattenChunks:function(_){var S,b,I,k,D,F;for(S=I=0,b=_.length;S<b;S++)I+=_[S].length;for(F=new Uint8Array(I),S=k=0,b=_.length;S<b;S++)D=_[S],F.set(D,k),k+=D.length;return F}},g={arraySet:function(_,S,b,I,k){for(var D=0;D<I;D++)_[k+D]=S[b+D]},flattenChunks:function(_){return[].concat.apply([],_)}};d.setTyped=function(_){_?(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,m)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,g))},d.setTyped(u)},{}],42:[function(s,c,d){var u=s("./common"),m=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch{m=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{g=!1}for(var _=new u.Buf8(256),S=0;S<256;S++)_[S]=252<=S?6:248<=S?5:240<=S?4:224<=S?3:192<=S?2:1;function b(I,k){if(k<65537&&(I.subarray&&g||!I.subarray&&m))return String.fromCharCode.apply(null,u.shrinkBuf(I,k));for(var D="",F=0;F<k;F++)D+=String.fromCharCode(I[F]);return D}_[254]=_[254]=1,d.string2buf=function(I){var k,D,F,E,L,T=I.length,M=0;for(E=0;E<T;E++)(64512&(D=I.charCodeAt(E)))==55296&&E+1<T&&(64512&(F=I.charCodeAt(E+1)))==56320&&(D=65536+(D-55296<<10)+(F-56320),E++),M+=D<128?1:D<2048?2:D<65536?3:4;for(k=new u.Buf8(M),E=L=0;L<M;E++)(64512&(D=I.charCodeAt(E)))==55296&&E+1<T&&(64512&(F=I.charCodeAt(E+1)))==56320&&(D=65536+(D-55296<<10)+(F-56320),E++),D<128?k[L++]=D:(D<2048?k[L++]=192|D>>>6:(D<65536?k[L++]=224|D>>>12:(k[L++]=240|D>>>18,k[L++]=128|D>>>12&63),k[L++]=128|D>>>6&63),k[L++]=128|63&D);return k},d.buf2binstring=function(I){return b(I,I.length)},d.binstring2buf=function(I){for(var k=new u.Buf8(I.length),D=0,F=k.length;D<F;D++)k[D]=I.charCodeAt(D);return k},d.buf2string=function(I,k){var D,F,E,L,T=k||I.length,M=new Array(2*T);for(D=F=0;D<T;)if((E=I[D++])<128)M[F++]=E;else if(4<(L=_[E]))M[F++]=65533,D+=L-1;else{for(E&=L===2?31:L===3?15:7;1<L&&D<T;)E=E<<6|63&I[D++],L--;1<L?M[F++]=65533:E<65536?M[F++]=E:(E-=65536,M[F++]=55296|E>>10&1023,M[F++]=56320|1023&E)}return b(M,F)},d.utf8border=function(I,k){var D;for((k=k||I.length)>I.length&&(k=I.length),D=k-1;0<=D&&(192&I[D])==128;)D--;return D<0||D===0?k:D+_[I[D]]>k?D:k}},{"./common":41}],43:[function(s,c,d){c.exports=function(u,m,g,_){for(var S=65535&u|0,b=u>>>16&65535|0,I=0;g!==0;){for(g-=I=2e3<g?2e3:g;b=b+(S=S+m[_++]|0)|0,--I;);S%=65521,b%=65521}return S|b<<16|0}},{}],44:[function(s,c,d){c.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(s,c,d){var u=function(){for(var m,g=[],_=0;_<256;_++){m=_;for(var S=0;S<8;S++)m=1&m?3988292384^m>>>1:m>>>1;g[_]=m}return g}();c.exports=function(m,g,_,S){var b=u,I=S+_;m^=-1;for(var k=S;k<I;k++)m=m>>>8^b[255&(m^g[k])];return-1^m}},{}],46:[function(s,c,d){var u,m=s("../utils/common"),g=s("./trees"),_=s("./adler32"),S=s("./crc32"),b=s("./messages"),I=0,k=4,D=0,F=-2,E=-1,L=4,T=2,M=8,R=9,C=286,U=30,N=19,X=2*C+1,K=15,Z=3,ct=258,Rt=ct+Z+1,et=42,_t=113,G=1,Pt=2,Et=3,At=4;function ce(W,Jt){return W.msg=b[Jt],Jt}function re(W){return(W<<1)-(4<W?9:0)}function Ft(W){for(var Jt=W.length;0<=--Jt;)W[Jt]=0}function It(W){var Jt=W.state,jt=Jt.pending;jt>W.avail_out&&(jt=W.avail_out),jt!==0&&(m.arraySet(W.output,Jt.pending_buf,Jt.pending_out,jt,W.next_out),W.next_out+=jt,Jt.pending_out+=jt,W.total_out+=jt,W.avail_out-=jt,Jt.pending-=jt,Jt.pending===0&&(Jt.pending_out=0))}function Nt(W,Jt){g._tr_flush_block(W,0<=W.block_start?W.block_start:-1,W.strstart-W.block_start,Jt),W.block_start=W.strstart,It(W.strm)}function Pe(W,Jt){W.pending_buf[W.pending++]=Jt}function pe(W,Jt){W.pending_buf[W.pending++]=Jt>>>8&255,W.pending_buf[W.pending++]=255&Jt}function Wt(W,Jt){var jt,dt,pt=W.max_chain_length,Dt=W.strstart,ie=W.prev_length,Kt=W.nice_match,z=W.strstart>W.w_size-Rt?W.strstart-(W.w_size-Rt):0,Q=W.window,st=W.w_mask,nt=W.prev,vt=W.strstart+ct,Gt=Q[Dt+ie-1],qt=Q[Dt+ie];W.prev_length>=W.good_match&&(pt>>=2),Kt>W.lookahead&&(Kt=W.lookahead);do if(Q[(jt=Jt)+ie]===qt&&Q[jt+ie-1]===Gt&&Q[jt]===Q[Dt]&&Q[++jt]===Q[Dt+1]){Dt+=2,jt++;do;while(Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Q[++Dt]===Q[++jt]&&Dt<vt);if(dt=ct-(vt-Dt),Dt=vt-ct,ie<dt){if(W.match_start=Jt,Kt<=(ie=dt))break;Gt=Q[Dt+ie-1],qt=Q[Dt+ie]}}while((Jt=nt[Jt&st])>z&&--pt!=0);return ie<=W.lookahead?ie:W.lookahead}function $e(W){var Jt,jt,dt,pt,Dt,ie,Kt,z,Q,st,nt=W.w_size;do{if(pt=W.window_size-W.lookahead-W.strstart,W.strstart>=nt+(nt-Rt)){for(m.arraySet(W.window,W.window,nt,nt,0),W.match_start-=nt,W.strstart-=nt,W.block_start-=nt,Jt=jt=W.hash_size;dt=W.head[--Jt],W.head[Jt]=nt<=dt?dt-nt:0,--jt;);for(Jt=jt=nt;dt=W.prev[--Jt],W.prev[Jt]=nt<=dt?dt-nt:0,--jt;);pt+=nt}if(W.strm.avail_in===0)break;if(ie=W.strm,Kt=W.window,z=W.strstart+W.lookahead,Q=pt,st=void 0,st=ie.avail_in,Q<st&&(st=Q),jt=st===0?0:(ie.avail_in-=st,m.arraySet(Kt,ie.input,ie.next_in,st,z),ie.state.wrap===1?ie.adler=_(ie.adler,Kt,st,z):ie.state.wrap===2&&(ie.adler=S(ie.adler,Kt,st,z)),ie.next_in+=st,ie.total_in+=st,st),W.lookahead+=jt,W.lookahead+W.insert>=Z)for(Dt=W.strstart-W.insert,W.ins_h=W.window[Dt],W.ins_h=(W.ins_h<<W.hash_shift^W.window[Dt+1])&W.hash_mask;W.insert&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[Dt+Z-1])&W.hash_mask,W.prev[Dt&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=Dt,Dt++,W.insert--,!(W.lookahead+W.insert<Z)););}while(W.lookahead<Rt&&W.strm.avail_in!==0)}function Si(W,Jt){for(var jt,dt;;){if(W.lookahead<Rt){if($e(W),W.lookahead<Rt&&Jt===I)return G;if(W.lookahead===0)break}if(jt=0,W.lookahead>=Z&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+Z-1])&W.hash_mask,jt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),jt!==0&&W.strstart-jt<=W.w_size-Rt&&(W.match_length=Wt(W,jt)),W.match_length>=Z)if(dt=g._tr_tally(W,W.strstart-W.match_start,W.match_length-Z),W.lookahead-=W.match_length,W.match_length<=W.max_lazy_match&&W.lookahead>=Z){for(W.match_length--;W.strstart++,W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+Z-1])&W.hash_mask,jt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart,--W.match_length!=0;);W.strstart++}else W.strstart+=W.match_length,W.match_length=0,W.ins_h=W.window[W.strstart],W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+1])&W.hash_mask;else dt=g._tr_tally(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++;if(dt&&(Nt(W,!1),W.strm.avail_out===0))return G}return W.insert=W.strstart<Z-1?W.strstart:Z-1,Jt===k?(Nt(W,!0),W.strm.avail_out===0?Et:At):W.last_lit&&(Nt(W,!1),W.strm.avail_out===0)?G:Pt}function Oe(W,Jt){for(var jt,dt,pt;;){if(W.lookahead<Rt){if($e(W),W.lookahead<Rt&&Jt===I)return G;if(W.lookahead===0)break}if(jt=0,W.lookahead>=Z&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+Z-1])&W.hash_mask,jt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),W.prev_length=W.match_length,W.prev_match=W.match_start,W.match_length=Z-1,jt!==0&&W.prev_length<W.max_lazy_match&&W.strstart-jt<=W.w_size-Rt&&(W.match_length=Wt(W,jt),W.match_length<=5&&(W.strategy===1||W.match_length===Z&&4096<W.strstart-W.match_start)&&(W.match_length=Z-1)),W.prev_length>=Z&&W.match_length<=W.prev_length){for(pt=W.strstart+W.lookahead-Z,dt=g._tr_tally(W,W.strstart-1-W.prev_match,W.prev_length-Z),W.lookahead-=W.prev_length-1,W.prev_length-=2;++W.strstart<=pt&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+Z-1])&W.hash_mask,jt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),--W.prev_length!=0;);if(W.match_available=0,W.match_length=Z-1,W.strstart++,dt&&(Nt(W,!1),W.strm.avail_out===0))return G}else if(W.match_available){if((dt=g._tr_tally(W,0,W.window[W.strstart-1]))&&Nt(W,!1),W.strstart++,W.lookahead--,W.strm.avail_out===0)return G}else W.match_available=1,W.strstart++,W.lookahead--}return W.match_available&&(dt=g._tr_tally(W,0,W.window[W.strstart-1]),W.match_available=0),W.insert=W.strstart<Z-1?W.strstart:Z-1,Jt===k?(Nt(W,!0),W.strm.avail_out===0?Et:At):W.last_lit&&(Nt(W,!1),W.strm.avail_out===0)?G:Pt}function Ge(W,Jt,jt,dt,pt){this.good_length=W,this.max_lazy=Jt,this.nice_length=jt,this.max_chain=dt,this.func=pt}function pi(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=M,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new m.Buf16(2*X),this.dyn_dtree=new m.Buf16(2*(2*U+1)),this.bl_tree=new m.Buf16(2*(2*N+1)),Ft(this.dyn_ltree),Ft(this.dyn_dtree),Ft(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new m.Buf16(K+1),this.heap=new m.Buf16(2*C+1),Ft(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new m.Buf16(2*C+1),Ft(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Di(W){var Jt;return W&&W.state?(W.total_in=W.total_out=0,W.data_type=T,(Jt=W.state).pending=0,Jt.pending_out=0,Jt.wrap<0&&(Jt.wrap=-Jt.wrap),Jt.status=Jt.wrap?et:_t,W.adler=Jt.wrap===2?0:1,Jt.last_flush=I,g._tr_init(Jt),D):ce(W,F)}function mn(W){var Jt=Di(W);return Jt===D&&function(jt){jt.window_size=2*jt.w_size,Ft(jt.head),jt.max_lazy_match=u[jt.level].max_lazy,jt.good_match=u[jt.level].good_length,jt.nice_match=u[jt.level].nice_length,jt.max_chain_length=u[jt.level].max_chain,jt.strstart=0,jt.block_start=0,jt.lookahead=0,jt.insert=0,jt.match_length=jt.prev_length=Z-1,jt.match_available=0,jt.ins_h=0}(W.state),Jt}function Qi(W,Jt,jt,dt,pt,Dt){if(!W)return F;var ie=1;if(Jt===E&&(Jt=6),dt<0?(ie=0,dt=-dt):15<dt&&(ie=2,dt-=16),pt<1||R<pt||jt!==M||dt<8||15<dt||Jt<0||9<Jt||Dt<0||L<Dt)return ce(W,F);dt===8&&(dt=9);var Kt=new pi;return(W.state=Kt).strm=W,Kt.wrap=ie,Kt.gzhead=null,Kt.w_bits=dt,Kt.w_size=1<<Kt.w_bits,Kt.w_mask=Kt.w_size-1,Kt.hash_bits=pt+7,Kt.hash_size=1<<Kt.hash_bits,Kt.hash_mask=Kt.hash_size-1,Kt.hash_shift=~~((Kt.hash_bits+Z-1)/Z),Kt.window=new m.Buf8(2*Kt.w_size),Kt.head=new m.Buf16(Kt.hash_size),Kt.prev=new m.Buf16(Kt.w_size),Kt.lit_bufsize=1<<pt+6,Kt.pending_buf_size=4*Kt.lit_bufsize,Kt.pending_buf=new m.Buf8(Kt.pending_buf_size),Kt.d_buf=1*Kt.lit_bufsize,Kt.l_buf=3*Kt.lit_bufsize,Kt.level=Jt,Kt.strategy=Dt,Kt.method=jt,mn(W)}u=[new Ge(0,0,0,0,function(W,Jt){var jt=65535;for(jt>W.pending_buf_size-5&&(jt=W.pending_buf_size-5);;){if(W.lookahead<=1){if($e(W),W.lookahead===0&&Jt===I)return G;if(W.lookahead===0)break}W.strstart+=W.lookahead,W.lookahead=0;var dt=W.block_start+jt;if((W.strstart===0||W.strstart>=dt)&&(W.lookahead=W.strstart-dt,W.strstart=dt,Nt(W,!1),W.strm.avail_out===0)||W.strstart-W.block_start>=W.w_size-Rt&&(Nt(W,!1),W.strm.avail_out===0))return G}return W.insert=0,Jt===k?(Nt(W,!0),W.strm.avail_out===0?Et:At):(W.strstart>W.block_start&&(Nt(W,!1),W.strm.avail_out),G)}),new Ge(4,4,8,4,Si),new Ge(4,5,16,8,Si),new Ge(4,6,32,32,Si),new Ge(4,4,16,16,Oe),new Ge(8,16,32,32,Oe),new Ge(8,16,128,128,Oe),new Ge(8,32,128,256,Oe),new Ge(32,128,258,1024,Oe),new Ge(32,258,258,4096,Oe)],d.deflateInit=function(W,Jt){return Qi(W,Jt,M,15,8,0)},d.deflateInit2=Qi,d.deflateReset=mn,d.deflateResetKeep=Di,d.deflateSetHeader=function(W,Jt){return W&&W.state?W.state.wrap!==2?F:(W.state.gzhead=Jt,D):F},d.deflate=function(W,Jt){var jt,dt,pt,Dt;if(!W||!W.state||5<Jt||Jt<0)return W?ce(W,F):F;if(dt=W.state,!W.output||!W.input&&W.avail_in!==0||dt.status===666&&Jt!==k)return ce(W,W.avail_out===0?-5:F);if(dt.strm=W,jt=dt.last_flush,dt.last_flush=Jt,dt.status===et)if(dt.wrap===2)W.adler=0,Pe(dt,31),Pe(dt,139),Pe(dt,8),dt.gzhead?(Pe(dt,(dt.gzhead.text?1:0)+(dt.gzhead.hcrc?2:0)+(dt.gzhead.extra?4:0)+(dt.gzhead.name?8:0)+(dt.gzhead.comment?16:0)),Pe(dt,255&dt.gzhead.time),Pe(dt,dt.gzhead.time>>8&255),Pe(dt,dt.gzhead.time>>16&255),Pe(dt,dt.gzhead.time>>24&255),Pe(dt,dt.level===9?2:2<=dt.strategy||dt.level<2?4:0),Pe(dt,255&dt.gzhead.os),dt.gzhead.extra&&dt.gzhead.extra.length&&(Pe(dt,255&dt.gzhead.extra.length),Pe(dt,dt.gzhead.extra.length>>8&255)),dt.gzhead.hcrc&&(W.adler=S(W.adler,dt.pending_buf,dt.pending,0)),dt.gzindex=0,dt.status=69):(Pe(dt,0),Pe(dt,0),Pe(dt,0),Pe(dt,0),Pe(dt,0),Pe(dt,dt.level===9?2:2<=dt.strategy||dt.level<2?4:0),Pe(dt,3),dt.status=_t);else{var ie=M+(dt.w_bits-8<<4)<<8;ie|=(2<=dt.strategy||dt.level<2?0:dt.level<6?1:dt.level===6?2:3)<<6,dt.strstart!==0&&(ie|=32),ie+=31-ie%31,dt.status=_t,pe(dt,ie),dt.strstart!==0&&(pe(dt,W.adler>>>16),pe(dt,65535&W.adler)),W.adler=1}if(dt.status===69)if(dt.gzhead.extra){for(pt=dt.pending;dt.gzindex<(65535&dt.gzhead.extra.length)&&(dt.pending!==dt.pending_buf_size||(dt.gzhead.hcrc&&dt.pending>pt&&(W.adler=S(W.adler,dt.pending_buf,dt.pending-pt,pt)),It(W),pt=dt.pending,dt.pending!==dt.pending_buf_size));)Pe(dt,255&dt.gzhead.extra[dt.gzindex]),dt.gzindex++;dt.gzhead.hcrc&&dt.pending>pt&&(W.adler=S(W.adler,dt.pending_buf,dt.pending-pt,pt)),dt.gzindex===dt.gzhead.extra.length&&(dt.gzindex=0,dt.status=73)}else dt.status=73;if(dt.status===73)if(dt.gzhead.name){pt=dt.pending;do{if(dt.pending===dt.pending_buf_size&&(dt.gzhead.hcrc&&dt.pending>pt&&(W.adler=S(W.adler,dt.pending_buf,dt.pending-pt,pt)),It(W),pt=dt.pending,dt.pending===dt.pending_buf_size)){Dt=1;break}Dt=dt.gzindex<dt.gzhead.name.length?255&dt.gzhead.name.charCodeAt(dt.gzindex++):0,Pe(dt,Dt)}while(Dt!==0);dt.gzhead.hcrc&&dt.pending>pt&&(W.adler=S(W.adler,dt.pending_buf,dt.pending-pt,pt)),Dt===0&&(dt.gzindex=0,dt.status=91)}else dt.status=91;if(dt.status===91)if(dt.gzhead.comment){pt=dt.pending;do{if(dt.pending===dt.pending_buf_size&&(dt.gzhead.hcrc&&dt.pending>pt&&(W.adler=S(W.adler,dt.pending_buf,dt.pending-pt,pt)),It(W),pt=dt.pending,dt.pending===dt.pending_buf_size)){Dt=1;break}Dt=dt.gzindex<dt.gzhead.comment.length?255&dt.gzhead.comment.charCodeAt(dt.gzindex++):0,Pe(dt,Dt)}while(Dt!==0);dt.gzhead.hcrc&&dt.pending>pt&&(W.adler=S(W.adler,dt.pending_buf,dt.pending-pt,pt)),Dt===0&&(dt.status=103)}else dt.status=103;if(dt.status===103&&(dt.gzhead.hcrc?(dt.pending+2>dt.pending_buf_size&&It(W),dt.pending+2<=dt.pending_buf_size&&(Pe(dt,255&W.adler),Pe(dt,W.adler>>8&255),W.adler=0,dt.status=_t)):dt.status=_t),dt.pending!==0){if(It(W),W.avail_out===0)return dt.last_flush=-1,D}else if(W.avail_in===0&&re(Jt)<=re(jt)&&Jt!==k)return ce(W,-5);if(dt.status===666&&W.avail_in!==0)return ce(W,-5);if(W.avail_in!==0||dt.lookahead!==0||Jt!==I&&dt.status!==666){var Kt=dt.strategy===2?function(z,Q){for(var st;;){if(z.lookahead===0&&($e(z),z.lookahead===0)){if(Q===I)return G;break}if(z.match_length=0,st=g._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,st&&(Nt(z,!1),z.strm.avail_out===0))return G}return z.insert=0,Q===k?(Nt(z,!0),z.strm.avail_out===0?Et:At):z.last_lit&&(Nt(z,!1),z.strm.avail_out===0)?G:Pt}(dt,Jt):dt.strategy===3?function(z,Q){for(var st,nt,vt,Gt,qt=z.window;;){if(z.lookahead<=ct){if($e(z),z.lookahead<=ct&&Q===I)return G;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=Z&&0<z.strstart&&(nt=qt[vt=z.strstart-1])===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]){Gt=z.strstart+ct;do;while(nt===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]&&nt===qt[++vt]&&vt<Gt);z.match_length=ct-(Gt-vt),z.match_length>z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=Z?(st=g._tr_tally(z,1,z.match_length-Z),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(st=g._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),st&&(Nt(z,!1),z.strm.avail_out===0))return G}return z.insert=0,Q===k?(Nt(z,!0),z.strm.avail_out===0?Et:At):z.last_lit&&(Nt(z,!1),z.strm.avail_out===0)?G:Pt}(dt,Jt):u[dt.level].func(dt,Jt);if(Kt!==Et&&Kt!==At||(dt.status=666),Kt===G||Kt===Et)return W.avail_out===0&&(dt.last_flush=-1),D;if(Kt===Pt&&(Jt===1?g._tr_align(dt):Jt!==5&&(g._tr_stored_block(dt,0,0,!1),Jt===3&&(Ft(dt.head),dt.lookahead===0&&(dt.strstart=0,dt.block_start=0,dt.insert=0))),It(W),W.avail_out===0))return dt.last_flush=-1,D}return Jt!==k?D:dt.wrap<=0?1:(dt.wrap===2?(Pe(dt,255&W.adler),Pe(dt,W.adler>>8&255),Pe(dt,W.adler>>16&255),Pe(dt,W.adler>>24&255),Pe(dt,255&W.total_in),Pe(dt,W.total_in>>8&255),Pe(dt,W.total_in>>16&255),Pe(dt,W.total_in>>24&255)):(pe(dt,W.adler>>>16),pe(dt,65535&W.adler)),It(W),0<dt.wrap&&(dt.wrap=-dt.wrap),dt.pending!==0?D:1)},d.deflateEnd=function(W){var Jt;return W&&W.state?(Jt=W.state.status)!==et&&Jt!==69&&Jt!==73&&Jt!==91&&Jt!==103&&Jt!==_t&&Jt!==666?ce(W,F):(W.state=null,Jt===_t?ce(W,-3):D):F},d.deflateSetDictionary=function(W,Jt){var jt,dt,pt,Dt,ie,Kt,z,Q,st=Jt.length;if(!W||!W.state||(Dt=(jt=W.state).wrap)===2||Dt===1&&jt.status!==et||jt.lookahead)return F;for(Dt===1&&(W.adler=_(W.adler,Jt,st,0)),jt.wrap=0,st>=jt.w_size&&(Dt===0&&(Ft(jt.head),jt.strstart=0,jt.block_start=0,jt.insert=0),Q=new m.Buf8(jt.w_size),m.arraySet(Q,Jt,st-jt.w_size,jt.w_size,0),Jt=Q,st=jt.w_size),ie=W.avail_in,Kt=W.next_in,z=W.input,W.avail_in=st,W.next_in=0,W.input=Jt,$e(jt);jt.lookahead>=Z;){for(dt=jt.strstart,pt=jt.lookahead-(Z-1);jt.ins_h=(jt.ins_h<<jt.hash_shift^jt.window[dt+Z-1])&jt.hash_mask,jt.prev[dt&jt.w_mask]=jt.head[jt.ins_h],jt.head[jt.ins_h]=dt,dt++,--pt;);jt.strstart=dt,jt.lookahead=Z-1,$e(jt)}return jt.strstart+=jt.lookahead,jt.block_start=jt.strstart,jt.insert=jt.lookahead,jt.lookahead=0,jt.match_length=jt.prev_length=Z-1,jt.match_available=0,W.next_in=Kt,W.input=z,W.avail_in=ie,jt.wrap=Dt,D},d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(s,c,d){c.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(s,c,d){c.exports=function(u,m){var g,_,S,b,I,k,D,F,E,L,T,M,R,C,U,N,X,K,Z,ct,Rt,et,_t,G,Pt;g=u.state,_=u.next_in,G=u.input,S=_+(u.avail_in-5),b=u.next_out,Pt=u.output,I=b-(m-u.avail_out),k=b+(u.avail_out-257),D=g.dmax,F=g.wsize,E=g.whave,L=g.wnext,T=g.window,M=g.hold,R=g.bits,C=g.lencode,U=g.distcode,N=(1<<g.lenbits)-1,X=(1<<g.distbits)-1;t:do{R<15&&(M+=G[_++]<<R,R+=8,M+=G[_++]<<R,R+=8),K=C[M&N];e:for(;;){if(M>>>=Z=K>>>24,R-=Z,(Z=K>>>16&255)===0)Pt[b++]=65535&K;else{if(!(16&Z)){if(!(64&Z)){K=C[(65535&K)+(M&(1<<Z)-1)];continue e}if(32&Z){g.mode=12;break t}u.msg="invalid literal/length code",g.mode=30;break t}ct=65535&K,(Z&=15)&&(R<Z&&(M+=G[_++]<<R,R+=8),ct+=M&(1<<Z)-1,M>>>=Z,R-=Z),R<15&&(M+=G[_++]<<R,R+=8,M+=G[_++]<<R,R+=8),K=U[M&X];i:for(;;){if(M>>>=Z=K>>>24,R-=Z,!(16&(Z=K>>>16&255))){if(!(64&Z)){K=U[(65535&K)+(M&(1<<Z)-1)];continue i}u.msg="invalid distance code",g.mode=30;break t}if(Rt=65535&K,R<(Z&=15)&&(M+=G[_++]<<R,(R+=8)<Z&&(M+=G[_++]<<R,R+=8)),D<(Rt+=M&(1<<Z)-1)){u.msg="invalid distance too far back",g.mode=30;break t}if(M>>>=Z,R-=Z,(Z=b-I)<Rt){if(E<(Z=Rt-Z)&&g.sane){u.msg="invalid distance too far back",g.mode=30;break t}if(_t=T,(et=0)===L){if(et+=F-Z,Z<ct){for(ct-=Z;Pt[b++]=T[et++],--Z;);et=b-Rt,_t=Pt}}else if(L<Z){if(et+=F+L-Z,(Z-=L)<ct){for(ct-=Z;Pt[b++]=T[et++],--Z;);if(et=0,L<ct){for(ct-=Z=L;Pt[b++]=T[et++],--Z;);et=b-Rt,_t=Pt}}}else if(et+=L-Z,Z<ct){for(ct-=Z;Pt[b++]=T[et++],--Z;);et=b-Rt,_t=Pt}for(;2<ct;)Pt[b++]=_t[et++],Pt[b++]=_t[et++],Pt[b++]=_t[et++],ct-=3;ct&&(Pt[b++]=_t[et++],1<ct&&(Pt[b++]=_t[et++]))}else{for(et=b-Rt;Pt[b++]=Pt[et++],Pt[b++]=Pt[et++],Pt[b++]=Pt[et++],2<(ct-=3););ct&&(Pt[b++]=Pt[et++],1<ct&&(Pt[b++]=Pt[et++]))}break}}break}}while(_<S&&b<k);_-=ct=R>>3,M&=(1<<(R-=ct<<3))-1,u.next_in=_,u.next_out=b,u.avail_in=_<S?S-_+5:5-(_-S),u.avail_out=b<k?k-b+257:257-(b-k),g.hold=M,g.bits=R}},{}],49:[function(s,c,d){var u=s("../utils/common"),m=s("./adler32"),g=s("./crc32"),_=s("./inffast"),S=s("./inftrees"),b=1,I=2,k=0,D=-2,F=1,E=852,L=592;function T(et){return(et>>>24&255)+(et>>>8&65280)+((65280&et)<<8)+((255&et)<<24)}function M(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new u.Buf16(320),this.work=new u.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function R(et){var _t;return et&&et.state?(_t=et.state,et.total_in=et.total_out=_t.total=0,et.msg="",_t.wrap&&(et.adler=1&_t.wrap),_t.mode=F,_t.last=0,_t.havedict=0,_t.dmax=32768,_t.head=null,_t.hold=0,_t.bits=0,_t.lencode=_t.lendyn=new u.Buf32(E),_t.distcode=_t.distdyn=new u.Buf32(L),_t.sane=1,_t.back=-1,k):D}function C(et){var _t;return et&&et.state?((_t=et.state).wsize=0,_t.whave=0,_t.wnext=0,R(et)):D}function U(et,_t){var G,Pt;return et&&et.state?(Pt=et.state,_t<0?(G=0,_t=-_t):(G=1+(_t>>4),_t<48&&(_t&=15)),_t&&(_t<8||15<_t)?D:(Pt.window!==null&&Pt.wbits!==_t&&(Pt.window=null),Pt.wrap=G,Pt.wbits=_t,C(et))):D}function N(et,_t){var G,Pt;return et?(Pt=new M,(et.state=Pt).window=null,(G=U(et,_t))!==k&&(et.state=null),G):D}var X,K,Z=!0;function ct(et){if(Z){var _t;for(X=new u.Buf32(512),K=new u.Buf32(32),_t=0;_t<144;)et.lens[_t++]=8;for(;_t<256;)et.lens[_t++]=9;for(;_t<280;)et.lens[_t++]=7;for(;_t<288;)et.lens[_t++]=8;for(S(b,et.lens,0,288,X,0,et.work,{bits:9}),_t=0;_t<32;)et.lens[_t++]=5;S(I,et.lens,0,32,K,0,et.work,{bits:5}),Z=!1}et.lencode=X,et.lenbits=9,et.distcode=K,et.distbits=5}function Rt(et,_t,G,Pt){var Et,At=et.state;return At.window===null&&(At.wsize=1<<At.wbits,At.wnext=0,At.whave=0,At.window=new u.Buf8(At.wsize)),Pt>=At.wsize?(u.arraySet(At.window,_t,G-At.wsize,At.wsize,0),At.wnext=0,At.whave=At.wsize):(Pt<(Et=At.wsize-At.wnext)&&(Et=Pt),u.arraySet(At.window,_t,G-Pt,Et,At.wnext),(Pt-=Et)?(u.arraySet(At.window,_t,G-Pt,Pt,0),At.wnext=Pt,At.whave=At.wsize):(At.wnext+=Et,At.wnext===At.wsize&&(At.wnext=0),At.whave<At.wsize&&(At.whave+=Et))),0}d.inflateReset=C,d.inflateReset2=U,d.inflateResetKeep=R,d.inflateInit=function(et){return N(et,15)},d.inflateInit2=N,d.inflate=function(et,_t){var G,Pt,Et,At,ce,re,Ft,It,Nt,Pe,pe,Wt,$e,Si,Oe,Ge,pi,Di,mn,Qi,W,Jt,jt,dt,pt=0,Dt=new u.Buf8(4),ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!et||!et.state||!et.output||!et.input&&et.avail_in!==0)return D;(G=et.state).mode===12&&(G.mode=13),ce=et.next_out,Et=et.output,Ft=et.avail_out,At=et.next_in,Pt=et.input,re=et.avail_in,It=G.hold,Nt=G.bits,Pe=re,pe=Ft,Jt=k;t:for(;;)switch(G.mode){case F:if(G.wrap===0){G.mode=13;break}for(;Nt<16;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(2&G.wrap&&It===35615){Dt[G.check=0]=255&It,Dt[1]=It>>>8&255,G.check=g(G.check,Dt,2,0),Nt=It=0,G.mode=2;break}if(G.flags=0,G.head&&(G.head.done=!1),!(1&G.wrap)||(((255&It)<<8)+(It>>8))%31){et.msg="incorrect header check",G.mode=30;break}if((15&It)!=8){et.msg="unknown compression method",G.mode=30;break}if(Nt-=4,W=8+(15&(It>>>=4)),G.wbits===0)G.wbits=W;else if(W>G.wbits){et.msg="invalid window size",G.mode=30;break}G.dmax=1<<W,et.adler=G.check=1,G.mode=512&It?10:12,Nt=It=0;break;case 2:for(;Nt<16;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(G.flags=It,(255&G.flags)!=8){et.msg="unknown compression method",G.mode=30;break}if(57344&G.flags){et.msg="unknown header flags set",G.mode=30;break}G.head&&(G.head.text=It>>8&1),512&G.flags&&(Dt[0]=255&It,Dt[1]=It>>>8&255,G.check=g(G.check,Dt,2,0)),Nt=It=0,G.mode=3;case 3:for(;Nt<32;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}G.head&&(G.head.time=It),512&G.flags&&(Dt[0]=255&It,Dt[1]=It>>>8&255,Dt[2]=It>>>16&255,Dt[3]=It>>>24&255,G.check=g(G.check,Dt,4,0)),Nt=It=0,G.mode=4;case 4:for(;Nt<16;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}G.head&&(G.head.xflags=255&It,G.head.os=It>>8),512&G.flags&&(Dt[0]=255&It,Dt[1]=It>>>8&255,G.check=g(G.check,Dt,2,0)),Nt=It=0,G.mode=5;case 5:if(1024&G.flags){for(;Nt<16;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}G.length=It,G.head&&(G.head.extra_len=It),512&G.flags&&(Dt[0]=255&It,Dt[1]=It>>>8&255,G.check=g(G.check,Dt,2,0)),Nt=It=0}else G.head&&(G.head.extra=null);G.mode=6;case 6:if(1024&G.flags&&(re<(Wt=G.length)&&(Wt=re),Wt&&(G.head&&(W=G.head.extra_len-G.length,G.head.extra||(G.head.extra=new Array(G.head.extra_len)),u.arraySet(G.head.extra,Pt,At,Wt,W)),512&G.flags&&(G.check=g(G.check,Pt,Wt,At)),re-=Wt,At+=Wt,G.length-=Wt),G.length))break t;G.length=0,G.mode=7;case 7:if(2048&G.flags){if(re===0)break t;for(Wt=0;W=Pt[At+Wt++],G.head&&W&&G.length<65536&&(G.head.name+=String.fromCharCode(W)),W&&Wt<re;);if(512&G.flags&&(G.check=g(G.check,Pt,Wt,At)),re-=Wt,At+=Wt,W)break t}else G.head&&(G.head.name=null);G.length=0,G.mode=8;case 8:if(4096&G.flags){if(re===0)break t;for(Wt=0;W=Pt[At+Wt++],G.head&&W&&G.length<65536&&(G.head.comment+=String.fromCharCode(W)),W&&Wt<re;);if(512&G.flags&&(G.check=g(G.check,Pt,Wt,At)),re-=Wt,At+=Wt,W)break t}else G.head&&(G.head.comment=null);G.mode=9;case 9:if(512&G.flags){for(;Nt<16;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(It!==(65535&G.check)){et.msg="header crc mismatch",G.mode=30;break}Nt=It=0}G.head&&(G.head.hcrc=G.flags>>9&1,G.head.done=!0),et.adler=G.check=0,G.mode=12;break;case 10:for(;Nt<32;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}et.adler=G.check=T(It),Nt=It=0,G.mode=11;case 11:if(G.havedict===0)return et.next_out=ce,et.avail_out=Ft,et.next_in=At,et.avail_in=re,G.hold=It,G.bits=Nt,2;et.adler=G.check=1,G.mode=12;case 12:if(_t===5||_t===6)break t;case 13:if(G.last){It>>>=7&Nt,Nt-=7&Nt,G.mode=27;break}for(;Nt<3;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}switch(G.last=1&It,Nt-=1,3&(It>>>=1)){case 0:G.mode=14;break;case 1:if(ct(G),G.mode=20,_t!==6)break;It>>>=2,Nt-=2;break t;case 2:G.mode=17;break;case 3:et.msg="invalid block type",G.mode=30}It>>>=2,Nt-=2;break;case 14:for(It>>>=7&Nt,Nt-=7&Nt;Nt<32;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if((65535&It)!=(It>>>16^65535)){et.msg="invalid stored block lengths",G.mode=30;break}if(G.length=65535&It,Nt=It=0,G.mode=15,_t===6)break t;case 15:G.mode=16;case 16:if(Wt=G.length){if(re<Wt&&(Wt=re),Ft<Wt&&(Wt=Ft),Wt===0)break t;u.arraySet(Et,Pt,At,Wt,ce),re-=Wt,At+=Wt,Ft-=Wt,ce+=Wt,G.length-=Wt;break}G.mode=12;break;case 17:for(;Nt<14;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(G.nlen=257+(31&It),It>>>=5,Nt-=5,G.ndist=1+(31&It),It>>>=5,Nt-=5,G.ncode=4+(15&It),It>>>=4,Nt-=4,286<G.nlen||30<G.ndist){et.msg="too many length or distance symbols",G.mode=30;break}G.have=0,G.mode=18;case 18:for(;G.have<G.ncode;){for(;Nt<3;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}G.lens[ie[G.have++]]=7&It,It>>>=3,Nt-=3}for(;G.have<19;)G.lens[ie[G.have++]]=0;if(G.lencode=G.lendyn,G.lenbits=7,jt={bits:G.lenbits},Jt=S(0,G.lens,0,19,G.lencode,0,G.work,jt),G.lenbits=jt.bits,Jt){et.msg="invalid code lengths set",G.mode=30;break}G.have=0,G.mode=19;case 19:for(;G.have<G.nlen+G.ndist;){for(;Ge=(pt=G.lencode[It&(1<<G.lenbits)-1])>>>16&255,pi=65535&pt,!((Oe=pt>>>24)<=Nt);){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(pi<16)It>>>=Oe,Nt-=Oe,G.lens[G.have++]=pi;else{if(pi===16){for(dt=Oe+2;Nt<dt;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(It>>>=Oe,Nt-=Oe,G.have===0){et.msg="invalid bit length repeat",G.mode=30;break}W=G.lens[G.have-1],Wt=3+(3&It),It>>>=2,Nt-=2}else if(pi===17){for(dt=Oe+3;Nt<dt;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}Nt-=Oe,W=0,Wt=3+(7&(It>>>=Oe)),It>>>=3,Nt-=3}else{for(dt=Oe+7;Nt<dt;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}Nt-=Oe,W=0,Wt=11+(127&(It>>>=Oe)),It>>>=7,Nt-=7}if(G.have+Wt>G.nlen+G.ndist){et.msg="invalid bit length repeat",G.mode=30;break}for(;Wt--;)G.lens[G.have++]=W}}if(G.mode===30)break;if(G.lens[256]===0){et.msg="invalid code -- missing end-of-block",G.mode=30;break}if(G.lenbits=9,jt={bits:G.lenbits},Jt=S(b,G.lens,0,G.nlen,G.lencode,0,G.work,jt),G.lenbits=jt.bits,Jt){et.msg="invalid literal/lengths set",G.mode=30;break}if(G.distbits=6,G.distcode=G.distdyn,jt={bits:G.distbits},Jt=S(I,G.lens,G.nlen,G.ndist,G.distcode,0,G.work,jt),G.distbits=jt.bits,Jt){et.msg="invalid distances set",G.mode=30;break}if(G.mode=20,_t===6)break t;case 20:G.mode=21;case 21:if(6<=re&&258<=Ft){et.next_out=ce,et.avail_out=Ft,et.next_in=At,et.avail_in=re,G.hold=It,G.bits=Nt,_(et,pe),ce=et.next_out,Et=et.output,Ft=et.avail_out,At=et.next_in,Pt=et.input,re=et.avail_in,It=G.hold,Nt=G.bits,G.mode===12&&(G.back=-1);break}for(G.back=0;Ge=(pt=G.lencode[It&(1<<G.lenbits)-1])>>>16&255,pi=65535&pt,!((Oe=pt>>>24)<=Nt);){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(Ge&&!(240&Ge)){for(Di=Oe,mn=Ge,Qi=pi;Ge=(pt=G.lencode[Qi+((It&(1<<Di+mn)-1)>>Di)])>>>16&255,pi=65535&pt,!(Di+(Oe=pt>>>24)<=Nt);){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}It>>>=Di,Nt-=Di,G.back+=Di}if(It>>>=Oe,Nt-=Oe,G.back+=Oe,G.length=pi,Ge===0){G.mode=26;break}if(32&Ge){G.back=-1,G.mode=12;break}if(64&Ge){et.msg="invalid literal/length code",G.mode=30;break}G.extra=15&Ge,G.mode=22;case 22:if(G.extra){for(dt=G.extra;Nt<dt;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}G.length+=It&(1<<G.extra)-1,It>>>=G.extra,Nt-=G.extra,G.back+=G.extra}G.was=G.length,G.mode=23;case 23:for(;Ge=(pt=G.distcode[It&(1<<G.distbits)-1])>>>16&255,pi=65535&pt,!((Oe=pt>>>24)<=Nt);){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(!(240&Ge)){for(Di=Oe,mn=Ge,Qi=pi;Ge=(pt=G.distcode[Qi+((It&(1<<Di+mn)-1)>>Di)])>>>16&255,pi=65535&pt,!(Di+(Oe=pt>>>24)<=Nt);){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}It>>>=Di,Nt-=Di,G.back+=Di}if(It>>>=Oe,Nt-=Oe,G.back+=Oe,64&Ge){et.msg="invalid distance code",G.mode=30;break}G.offset=pi,G.extra=15&Ge,G.mode=24;case 24:if(G.extra){for(dt=G.extra;Nt<dt;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}G.offset+=It&(1<<G.extra)-1,It>>>=G.extra,Nt-=G.extra,G.back+=G.extra}if(G.offset>G.dmax){et.msg="invalid distance too far back",G.mode=30;break}G.mode=25;case 25:if(Ft===0)break t;if(Wt=pe-Ft,G.offset>Wt){if((Wt=G.offset-Wt)>G.whave&&G.sane){et.msg="invalid distance too far back",G.mode=30;break}$e=Wt>G.wnext?(Wt-=G.wnext,G.wsize-Wt):G.wnext-Wt,Wt>G.length&&(Wt=G.length),Si=G.window}else Si=Et,$e=ce-G.offset,Wt=G.length;for(Ft<Wt&&(Wt=Ft),Ft-=Wt,G.length-=Wt;Et[ce++]=Si[$e++],--Wt;);G.length===0&&(G.mode=21);break;case 26:if(Ft===0)break t;Et[ce++]=G.length,Ft--,G.mode=21;break;case 27:if(G.wrap){for(;Nt<32;){if(re===0)break t;re--,It|=Pt[At++]<<Nt,Nt+=8}if(pe-=Ft,et.total_out+=pe,G.total+=pe,pe&&(et.adler=G.check=G.flags?g(G.check,Et,pe,ce-pe):m(G.check,Et,pe,ce-pe)),pe=Ft,(G.flags?It:T(It))!==G.check){et.msg="incorrect data check",G.mode=30;break}Nt=It=0}G.mode=28;case 28:if(G.wrap&&G.flags){for(;Nt<32;){if(re===0)break t;re--,It+=Pt[At++]<<Nt,Nt+=8}if(It!==(4294967295&G.total)){et.msg="incorrect length check",G.mode=30;break}Nt=It=0}G.mode=29;case 29:Jt=1;break t;case 30:Jt=-3;break t;case 31:return-4;case 32:default:return D}return et.next_out=ce,et.avail_out=Ft,et.next_in=At,et.avail_in=re,G.hold=It,G.bits=Nt,(G.wsize||pe!==et.avail_out&&G.mode<30&&(G.mode<27||_t!==4))&&Rt(et,et.output,et.next_out,pe-et.avail_out)?(G.mode=31,-4):(Pe-=et.avail_in,pe-=et.avail_out,et.total_in+=Pe,et.total_out+=pe,G.total+=pe,G.wrap&&pe&&(et.adler=G.check=G.flags?g(G.check,Et,pe,et.next_out-pe):m(G.check,Et,pe,et.next_out-pe)),et.data_type=G.bits+(G.last?64:0)+(G.mode===12?128:0)+(G.mode===20||G.mode===15?256:0),(Pe==0&&pe===0||_t===4)&&Jt===k&&(Jt=-5),Jt)},d.inflateEnd=function(et){if(!et||!et.state)return D;var _t=et.state;return _t.window&&(_t.window=null),et.state=null,k},d.inflateGetHeader=function(et,_t){var G;return et&&et.state&&2&(G=et.state).wrap?((G.head=_t).done=!1,k):D},d.inflateSetDictionary=function(et,_t){var G,Pt=_t.length;return et&&et.state?(G=et.state).wrap!==0&&G.mode!==11?D:G.mode===11&&m(1,_t,Pt,0)!==G.check?-3:Rt(et,_t,Pt,Pt)?(G.mode=31,-4):(G.havedict=1,k):D},d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(s,c,d){var u=s("../utils/common"),m=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],_=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],S=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,I,k,D,F,E,L,T){var M,R,C,U,N,X,K,Z,ct,Rt=T.bits,et=0,_t=0,G=0,Pt=0,Et=0,At=0,ce=0,re=0,Ft=0,It=0,Nt=null,Pe=0,pe=new u.Buf16(16),Wt=new u.Buf16(16),$e=null,Si=0;for(et=0;et<=15;et++)pe[et]=0;for(_t=0;_t<D;_t++)pe[I[k+_t]]++;for(Et=Rt,Pt=15;1<=Pt&&pe[Pt]===0;Pt--);if(Pt<Et&&(Et=Pt),Pt===0)return F[E++]=20971520,F[E++]=20971520,T.bits=1,0;for(G=1;G<Pt&&pe[G]===0;G++);for(Et<G&&(Et=G),et=re=1;et<=15;et++)if(re<<=1,(re-=pe[et])<0)return-1;if(0<re&&(b===0||Pt!==1))return-1;for(Wt[1]=0,et=1;et<15;et++)Wt[et+1]=Wt[et]+pe[et];for(_t=0;_t<D;_t++)I[k+_t]!==0&&(L[Wt[I[k+_t]]++]=_t);if(X=b===0?(Nt=$e=L,19):b===1?(Nt=m,Pe-=257,$e=g,Si-=257,256):(Nt=_,$e=S,-1),et=G,N=E,ce=_t=It=0,C=-1,U=(Ft=1<<(At=Et))-1,b===1&&852<Ft||b===2&&592<Ft)return 1;for(;;){for(K=et-ce,ct=L[_t]<X?(Z=0,L[_t]):L[_t]>X?(Z=$e[Si+L[_t]],Nt[Pe+L[_t]]):(Z=96,0),M=1<<et-ce,G=R=1<<At;F[N+(It>>ce)+(R-=M)]=K<<24|Z<<16|ct|0,R!==0;);for(M=1<<et-1;It&M;)M>>=1;if(M!==0?(It&=M-1,It+=M):It=0,_t++,--pe[et]==0){if(et===Pt)break;et=I[k+L[_t]]}if(Et<et&&(It&U)!==C){for(ce===0&&(ce=Et),N+=G,re=1<<(At=et-ce);At+ce<Pt&&!((re-=pe[At+ce])<=0);)At++,re<<=1;if(Ft+=1<<At,b===1&&852<Ft||b===2&&592<Ft)return 1;F[C=It&U]=Et<<24|At<<16|N-E|0}}return It!==0&&(F[N+It]=et-ce<<24|64<<16|0),T.bits=Et,0}},{"../utils/common":41}],51:[function(s,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(s,c,d){var u=s("../utils/common"),m=0,g=1;function _(pt){for(var Dt=pt.length;0<=--Dt;)pt[Dt]=0}var S=0,b=29,I=256,k=I+1+b,D=30,F=19,E=2*k+1,L=15,T=16,M=7,R=256,C=16,U=17,N=18,X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],K=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ct=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Rt=new Array(2*(k+2));_(Rt);var et=new Array(2*D);_(et);var _t=new Array(512);_(_t);var G=new Array(256);_(G);var Pt=new Array(b);_(Pt);var Et,At,ce,re=new Array(D);function Ft(pt,Dt,ie,Kt,z){this.static_tree=pt,this.extra_bits=Dt,this.extra_base=ie,this.elems=Kt,this.max_length=z,this.has_stree=pt&&pt.length}function It(pt,Dt){this.dyn_tree=pt,this.max_code=0,this.stat_desc=Dt}function Nt(pt){return pt<256?_t[pt]:_t[256+(pt>>>7)]}function Pe(pt,Dt){pt.pending_buf[pt.pending++]=255&Dt,pt.pending_buf[pt.pending++]=Dt>>>8&255}function pe(pt,Dt,ie){pt.bi_valid>T-ie?(pt.bi_buf|=Dt<<pt.bi_valid&65535,Pe(pt,pt.bi_buf),pt.bi_buf=Dt>>T-pt.bi_valid,pt.bi_valid+=ie-T):(pt.bi_buf|=Dt<<pt.bi_valid&65535,pt.bi_valid+=ie)}function Wt(pt,Dt,ie){pe(pt,ie[2*Dt],ie[2*Dt+1])}function $e(pt,Dt){for(var ie=0;ie|=1&pt,pt>>>=1,ie<<=1,0<--Dt;);return ie>>>1}function Si(pt,Dt,ie){var Kt,z,Q=new Array(L+1),st=0;for(Kt=1;Kt<=L;Kt++)Q[Kt]=st=st+ie[Kt-1]<<1;for(z=0;z<=Dt;z++){var nt=pt[2*z+1];nt!==0&&(pt[2*z]=$e(Q[nt]++,nt))}}function Oe(pt){var Dt;for(Dt=0;Dt<k;Dt++)pt.dyn_ltree[2*Dt]=0;for(Dt=0;Dt<D;Dt++)pt.dyn_dtree[2*Dt]=0;for(Dt=0;Dt<F;Dt++)pt.bl_tree[2*Dt]=0;pt.dyn_ltree[2*R]=1,pt.opt_len=pt.static_len=0,pt.last_lit=pt.matches=0}function Ge(pt){8<pt.bi_valid?Pe(pt,pt.bi_buf):0<pt.bi_valid&&(pt.pending_buf[pt.pending++]=pt.bi_buf),pt.bi_buf=0,pt.bi_valid=0}function pi(pt,Dt,ie,Kt){var z=2*Dt,Q=2*ie;return pt[z]<pt[Q]||pt[z]===pt[Q]&&Kt[Dt]<=Kt[ie]}function Di(pt,Dt,ie){for(var Kt=pt.heap[ie],z=ie<<1;z<=pt.heap_len&&(z<pt.heap_len&&pi(Dt,pt.heap[z+1],pt.heap[z],pt.depth)&&z++,!pi(Dt,Kt,pt.heap[z],pt.depth));)pt.heap[ie]=pt.heap[z],ie=z,z<<=1;pt.heap[ie]=Kt}function mn(pt,Dt,ie){var Kt,z,Q,st,nt=0;if(pt.last_lit!==0)for(;Kt=pt.pending_buf[pt.d_buf+2*nt]<<8|pt.pending_buf[pt.d_buf+2*nt+1],z=pt.pending_buf[pt.l_buf+nt],nt++,Kt===0?Wt(pt,z,Dt):(Wt(pt,(Q=G[z])+I+1,Dt),(st=X[Q])!==0&&pe(pt,z-=Pt[Q],st),Wt(pt,Q=Nt(--Kt),ie),(st=K[Q])!==0&&pe(pt,Kt-=re[Q],st)),nt<pt.last_lit;);Wt(pt,R,Dt)}function Qi(pt,Dt){var ie,Kt,z,Q=Dt.dyn_tree,st=Dt.stat_desc.static_tree,nt=Dt.stat_desc.has_stree,vt=Dt.stat_desc.elems,Gt=-1;for(pt.heap_len=0,pt.heap_max=E,ie=0;ie<vt;ie++)Q[2*ie]!==0?(pt.heap[++pt.heap_len]=Gt=ie,pt.depth[ie]=0):Q[2*ie+1]=0;for(;pt.heap_len<2;)Q[2*(z=pt.heap[++pt.heap_len]=Gt<2?++Gt:0)]=1,pt.depth[z]=0,pt.opt_len--,nt&&(pt.static_len-=st[2*z+1]);for(Dt.max_code=Gt,ie=pt.heap_len>>1;1<=ie;ie--)Di(pt,Q,ie);for(z=vt;ie=pt.heap[1],pt.heap[1]=pt.heap[pt.heap_len--],Di(pt,Q,1),Kt=pt.heap[1],pt.heap[--pt.heap_max]=ie,pt.heap[--pt.heap_max]=Kt,Q[2*z]=Q[2*ie]+Q[2*Kt],pt.depth[z]=(pt.depth[ie]>=pt.depth[Kt]?pt.depth[ie]:pt.depth[Kt])+1,Q[2*ie+1]=Q[2*Kt+1]=z,pt.heap[1]=z++,Di(pt,Q,1),2<=pt.heap_len;);pt.heap[--pt.heap_max]=pt.heap[1],function(qt,Xt){var Ne,Ie,ge,we,yi,Ei,ni=Xt.dyn_tree,bi=Xt.max_code,qr=Xt.stat_desc.static_tree,sr=Xt.stat_desc.has_stree,sn=Xt.stat_desc.extra_bits,Ao=Xt.stat_desc.extra_base,zi=Xt.stat_desc.max_length,qo=0;for(we=0;we<=L;we++)qt.bl_count[we]=0;for(ni[2*qt.heap[qt.heap_max]+1]=0,Ne=qt.heap_max+1;Ne<E;Ne++)zi<(we=ni[2*ni[2*(Ie=qt.heap[Ne])+1]+1]+1)&&(we=zi,qo++),ni[2*Ie+1]=we,bi<Ie||(qt.bl_count[we]++,yi=0,Ao<=Ie&&(yi=sn[Ie-Ao]),Ei=ni[2*Ie],qt.opt_len+=Ei*(we+yi),sr&&(qt.static_len+=Ei*(qr[2*Ie+1]+yi)));if(qo!==0){do{for(we=zi-1;qt.bl_count[we]===0;)we--;qt.bl_count[we]--,qt.bl_count[we+1]+=2,qt.bl_count[zi]--,qo-=2}while(0<qo);for(we=zi;we!==0;we--)for(Ie=qt.bl_count[we];Ie!==0;)bi<(ge=qt.heap[--Ne])||(ni[2*ge+1]!==we&&(qt.opt_len+=(we-ni[2*ge+1])*ni[2*ge],ni[2*ge+1]=we),Ie--)}}(pt,Dt),Si(Q,Gt,pt.bl_count)}function W(pt,Dt,ie){var Kt,z,Q=-1,st=Dt[1],nt=0,vt=7,Gt=4;for(st===0&&(vt=138,Gt=3),Dt[2*(ie+1)+1]=65535,Kt=0;Kt<=ie;Kt++)z=st,st=Dt[2*(Kt+1)+1],++nt<vt&&z===st||(nt<Gt?pt.bl_tree[2*z]+=nt:z!==0?(z!==Q&&pt.bl_tree[2*z]++,pt.bl_tree[2*C]++):nt<=10?pt.bl_tree[2*U]++:pt.bl_tree[2*N]++,Q=z,Gt=(nt=0)===st?(vt=138,3):z===st?(vt=6,3):(vt=7,4))}function Jt(pt,Dt,ie){var Kt,z,Q=-1,st=Dt[1],nt=0,vt=7,Gt=4;for(st===0&&(vt=138,Gt=3),Kt=0;Kt<=ie;Kt++)if(z=st,st=Dt[2*(Kt+1)+1],!(++nt<vt&&z===st)){if(nt<Gt)for(;Wt(pt,z,pt.bl_tree),--nt!=0;);else z!==0?(z!==Q&&(Wt(pt,z,pt.bl_tree),nt--),Wt(pt,C,pt.bl_tree),pe(pt,nt-3,2)):nt<=10?(Wt(pt,U,pt.bl_tree),pe(pt,nt-3,3)):(Wt(pt,N,pt.bl_tree),pe(pt,nt-11,7));Q=z,Gt=(nt=0)===st?(vt=138,3):z===st?(vt=6,3):(vt=7,4)}}_(re);var jt=!1;function dt(pt,Dt,ie,Kt){pe(pt,(S<<1)+(Kt?1:0),3),function(z,Q,st,nt){Ge(z),nt&&(Pe(z,st),Pe(z,~st)),u.arraySet(z.pending_buf,z.window,Q,st,z.pending),z.pending+=st}(pt,Dt,ie,!0)}d._tr_init=function(pt){jt||(function(){var Dt,ie,Kt,z,Q,st=new Array(L+1);for(z=Kt=0;z<b-1;z++)for(Pt[z]=Kt,Dt=0;Dt<1<<X[z];Dt++)G[Kt++]=z;for(G[Kt-1]=z,z=Q=0;z<16;z++)for(re[z]=Q,Dt=0;Dt<1<<K[z];Dt++)_t[Q++]=z;for(Q>>=7;z<D;z++)for(re[z]=Q<<7,Dt=0;Dt<1<<K[z]-7;Dt++)_t[256+Q++]=z;for(ie=0;ie<=L;ie++)st[ie]=0;for(Dt=0;Dt<=143;)Rt[2*Dt+1]=8,Dt++,st[8]++;for(;Dt<=255;)Rt[2*Dt+1]=9,Dt++,st[9]++;for(;Dt<=279;)Rt[2*Dt+1]=7,Dt++,st[7]++;for(;Dt<=287;)Rt[2*Dt+1]=8,Dt++,st[8]++;for(Si(Rt,k+1,st),Dt=0;Dt<D;Dt++)et[2*Dt+1]=5,et[2*Dt]=$e(Dt,5);Et=new Ft(Rt,X,I+1,k,L),At=new Ft(et,K,0,D,L),ce=new Ft(new Array(0),Z,0,F,M)}(),jt=!0),pt.l_desc=new It(pt.dyn_ltree,Et),pt.d_desc=new It(pt.dyn_dtree,At),pt.bl_desc=new It(pt.bl_tree,ce),pt.bi_buf=0,pt.bi_valid=0,Oe(pt)},d._tr_stored_block=dt,d._tr_flush_block=function(pt,Dt,ie,Kt){var z,Q,st=0;0<pt.level?(pt.strm.data_type===2&&(pt.strm.data_type=function(nt){var vt,Gt=4093624447;for(vt=0;vt<=31;vt++,Gt>>>=1)if(1&Gt&&nt.dyn_ltree[2*vt]!==0)return m;if(nt.dyn_ltree[18]!==0||nt.dyn_ltree[20]!==0||nt.dyn_ltree[26]!==0)return g;for(vt=32;vt<I;vt++)if(nt.dyn_ltree[2*vt]!==0)return g;return m}(pt)),Qi(pt,pt.l_desc),Qi(pt,pt.d_desc),st=function(nt){var vt;for(W(nt,nt.dyn_ltree,nt.l_desc.max_code),W(nt,nt.dyn_dtree,nt.d_desc.max_code),Qi(nt,nt.bl_desc),vt=F-1;3<=vt&&nt.bl_tree[2*ct[vt]+1]===0;vt--);return nt.opt_len+=3*(vt+1)+5+5+4,vt}(pt),z=pt.opt_len+3+7>>>3,(Q=pt.static_len+3+7>>>3)<=z&&(z=Q)):z=Q=ie+5,ie+4<=z&&Dt!==-1?dt(pt,Dt,ie,Kt):pt.strategy===4||Q===z?(pe(pt,2+(Kt?1:0),3),mn(pt,Rt,et)):(pe(pt,4+(Kt?1:0),3),function(nt,vt,Gt,qt){var Xt;for(pe(nt,vt-257,5),pe(nt,Gt-1,5),pe(nt,qt-4,4),Xt=0;Xt<qt;Xt++)pe(nt,nt.bl_tree[2*ct[Xt]+1],3);Jt(nt,nt.dyn_ltree,vt-1),Jt(nt,nt.dyn_dtree,Gt-1)}(pt,pt.l_desc.max_code+1,pt.d_desc.max_code+1,st+1),mn(pt,pt.dyn_ltree,pt.dyn_dtree)),Oe(pt),Kt&&Ge(pt)},d._tr_tally=function(pt,Dt,ie){return pt.pending_buf[pt.d_buf+2*pt.last_lit]=Dt>>>8&255,pt.pending_buf[pt.d_buf+2*pt.last_lit+1]=255&Dt,pt.pending_buf[pt.l_buf+pt.last_lit]=255&ie,pt.last_lit++,Dt===0?pt.dyn_ltree[2*ie]++:(pt.matches++,Dt--,pt.dyn_ltree[2*(G[ie]+I+1)]++,pt.dyn_dtree[2*Nt(Dt)]++),pt.last_lit===pt.lit_bufsize-1},d._tr_align=function(pt){pe(pt,2,3),Wt(pt,R,Rt),function(Dt){Dt.bi_valid===16?(Pe(Dt,Dt.bi_buf),Dt.bi_buf=0,Dt.bi_valid=0):8<=Dt.bi_valid&&(Dt.pending_buf[Dt.pending++]=255&Dt.bi_buf,Dt.bi_buf>>=8,Dt.bi_valid-=8)}(pt)}},{"../utils/common":41}],53:[function(s,c,d){c.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(s,c,d){(function(u){(function(m,g){if(!m.setImmediate){var _,S,b,I,k=1,D={},F=!1,E=m.document,L=Object.getPrototypeOf&&Object.getPrototypeOf(m);L=L&&L.setTimeout?L:m,_={}.toString.call(m.process)==="[object process]"?function(C){process.nextTick(function(){M(C)})}:function(){if(m.postMessage&&!m.importScripts){var C=!0,U=m.onmessage;return m.onmessage=function(){C=!1},m.postMessage("","*"),m.onmessage=U,C}}()?(I="setImmediate$"+Math.random()+"$",m.addEventListener?m.addEventListener("message",R,!1):m.attachEvent("onmessage",R),function(C){m.postMessage(I+C,"*")}):m.MessageChannel?((b=new MessageChannel).port1.onmessage=function(C){M(C.data)},function(C){b.port2.postMessage(C)}):E&&"onreadystatechange"in E.createElement("script")?(S=E.documentElement,function(C){var U=E.createElement("script");U.onreadystatechange=function(){M(C),U.onreadystatechange=null,S.removeChild(U),U=null},S.appendChild(U)}):function(C){setTimeout(M,0,C)},L.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var U=new Array(arguments.length-1),N=0;N<U.length;N++)U[N]=arguments[N+1];var X={callback:C,args:U};return D[k]=X,_(k),k++},L.clearImmediate=T}function T(C){delete D[C]}function M(C){if(F)setTimeout(M,0,C);else{var U=D[C];if(U){F=!0;try{(function(N){var X=N.callback,K=N.args;switch(K.length){case 0:X();break;case 1:X(K[0]);break;case 2:X(K[0],K[1]);break;case 3:X(K[0],K[1],K[2]);break;default:X.apply(g,K)}})(U)}finally{T(C),F=!1}}}}function R(C){C.source===m&&typeof C.data=="string"&&C.data.indexOf(I)===0&&M(+C.data.slice(I.length))}})(typeof self>"u"?u===void 0?this:u:self)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Cf);var dm=Cf.exports;const pm=tc(dm);var Af={exports:{}};(function(x,a){(function(s,c){c()})(Er,function(){function s(S,b){return typeof b>"u"?b={autoBom:!1}:typeof b!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(S.type)?new Blob(["\uFEFF",S],{type:S.type}):S}function c(S,b,I){var k=new XMLHttpRequest;k.open("GET",S),k.responseType="blob",k.onload=function(){_(k.response,b,I)},k.onerror=function(){console.error("could not download file")},k.send()}function d(S){var b=new XMLHttpRequest;b.open("HEAD",S,!1);try{b.send()}catch{}return 200<=b.status&&299>=b.status}function u(S){try{S.dispatchEvent(new MouseEvent("click"))}catch{var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),S.dispatchEvent(b)}}var m=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Er=="object"&&Er.global===Er?Er:void 0,g=m.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),_=m.saveAs||(typeof window!="object"||window!==m?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(S,b,I){var k=m.URL||m.webkitURL,D=document.createElement("a");b=b||S.name||"download",D.download=b,D.rel="noopener",typeof S=="string"?(D.href=S,D.origin===location.origin?u(D):d(D.href)?c(S,b,I):u(D,D.target="_blank")):(D.href=k.createObjectURL(S),setTimeout(function(){k.revokeObjectURL(D.href)},4e4),setTimeout(function(){u(D)},0))}:"msSaveOrOpenBlob"in navigator?function(S,b,I){if(b=b||S.name||"download",typeof S!="string")navigator.msSaveOrOpenBlob(s(S,I),b);else if(d(S))c(S,b,I);else{var k=document.createElement("a");k.href=S,k.target="_blank",setTimeout(function(){u(k)})}}:function(S,b,I,k){if(k=k||open("","_blank"),k&&(k.document.title=k.document.body.innerText="downloading..."),typeof S=="string")return c(S,b,I);var D=S.type==="application/octet-stream",F=/constructor/i.test(m.HTMLElement)||m.safari,E=/CriOS\/[\d]+/.test(navigator.userAgent);if((E||D&&F||g)&&typeof FileReader<"u"){var L=new FileReader;L.onloadend=function(){var R=L.result;R=E?R:R.replace(/^data:[^;]*;/,"data:attachment/file;"),k?k.location.href=R:location=R,k=null},L.readAsDataURL(S)}else{var T=m.URL||m.webkitURL,M=T.createObjectURL(S);k?k.location=M:location.href=M,k=null,setTimeout(function(){T.revokeObjectURL(M)},4e4)}});m.saveAs=_.saveAs=_,x.exports=_})})(Af);var mm=Af.exports;const gm=tc(mm);class vm{constructor(a,s){window.mars3d?(this.panoramicViewClass=s,this.coordinate=[{heading:0,pitch:0,stop:5},{heading:90,pitch:0,stop:5},{heading:180,pitch:0,stop:5},{heading:270,pitch:0,stop:5},{heading:0,pitch:90,stop:5},{heading:0,pitch:-90,stop:5}],this.screenshotArray=[],this.events={},this.timestamp=0,this.lat,this.lng,this.alt):console.error("未引入指定插件")}start(a=!0){var s,c;if(a){this.timestamp=new Date().getTime();const d=document.getElementById("app"),u=window.innerHeight,m=document.getElementById("mars3dContainer");m&&(m.style.width=u.toString()+"px",m.style.height=u.toString()+"px"),d!==null&&d.classList.add(this.panoramicViewClass);let{lat:g,lng:_,alt:S}=window.map.getCameraView();this.lat=g,this.lng=_,this.alt=S,window.map.viewer.scene.camera.frustum.fov=window.Cesium.Math.PI_OVER_THREE*1.5}this.screenshotArray&&this.coordinate?this.coordinate[(s=this.screenshotArray)==null?void 0:s.length]?window.map.setCameraView({lat:this.lat,lng:this.lng,alt:this.alt,...this.coordinate[(c=this.screenshotArray)==null?void 0:c.length]},{complete:()=>{setTimeout(()=>{var d;this.screenshot((d=this.screenshotArray)==null?void 0:d.length)},100)}}):(this.downloadImagesAsZip(),this.screenshotArray=[]):(console.error("初始化失效"),this.emit("state",{type:"error"}))}async screenshot(a){const s=await window.map.expImage({download:!1}),c=window.map.container.getElementsByClassName("cesium-viewer-cesiumWidgetContainer"),d=await window.domtoimage.toPng(window.map.container,{filter:u=>u!==c[0]});this.mergeImage(s.image,d,s.width,s.height).then(u=>{var _;let m=Number(a)+1,g={src:u,name:"全景图_"+this.timestamp+"_"+m+".jpg"};this.emit("intercept",g),(_=this.screenshotArray)==null||_.push(g),this.start(!1)})}mergeImage(a,s,c,d){return new Promise((u,m)=>{const g=document.createElement("canvas");g.width=c,g.height=d;const _=g.getContext("2d");if(g&&_){const S=new Image;S.crossOrigin="Anonymous",S.onload=()=>{_.drawImage(S,0,0,c,d);const b=new Image;b.crossOrigin="Anonymous",b.onload=()=>{_.drawImage(b,0,0,c,d);const I=g.toDataURL("image/png");u(I)},b.src=s},S.src=a}else m()})}download(){this.screenshotArray&&this.screenshotArray.forEach(a=>{window.mars3d.Util.downloadBase64Image(a.name,a.src)})}async downloadImagesAsZip(){if(this.screenshotArray){const a=new pm;this.screenshotArray.forEach(c=>{const d=c.src.split(",")[1],u=atob(d),m=[];for(let S=0;S<u.length;S+=1024){const b=u.slice(S,S+1024),I=new Array(b.length);for(let D=0;D<b.length;D++)I[D]=b.charCodeAt(D);const k=new Uint8Array(I);m.push(k)}const g=new Blob(m,{type:"image/jpeg"}),_=`${c.name}`;a.file(_,g,{binary:!0})});const s=await a.generateAsync({type:"blob"});gm(s,"CHBIM-Panorama.zip"),this.emit("state",{type:"success",schedule:100}),this.init()}}init(){const a=document.getElementById("app");a&&a.classList.remove(this.panoramicViewClass);const s=document.getElementById("mars3dContainer");s&&(s.style.width="",s.style.height="")}on(a,s){this.events[a]?this.events[a].push(s):this.events[a]=[s]}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}}function cs(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function Pf(x,a){x.prototype=Object.create(a.prototype),x.prototype.constructor=x,x.__proto__=a}/*!
2687
2687
  * GSAP 3.12.5
2688
2688
  * https://gsap.com
2689
2689
  *
@@ -2691,7 +2691,7 @@ function print() { __p += __j.call(arguments, '') }
2691
2691
  * Subject to the terms at https://gsap.com/standard-license or for
2692
2692
  * Club GSAP members, the agreement issued with that membership.
2693
2693
  * @author: Jack Doyle, jack@greensock.com
2694
- */var Hr={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Rl={duration:.5,overwrite:!1,delay:0},ic,nr,hn,no=1e8,en=1/no,nc=Math.PI*2,ym=nc/4,_m=0,Lf=Math.sqrt,xm=Math.cos,wm=Math.sin,Wn=function(a){return typeof a=="string"},Tn=function(a){return typeof a=="function"},fs=function(a){return typeof a=="number"},rc=function(a){return typeof a>"u"},Ho=function(a){return typeof a=="object"},br=function(a){return a!==!1},oc=function(){return typeof window<"u"},uu=function(a){return Tn(a)||Wn(a)},Rf=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},rr=Array.isArray,sc=/(?:-?\.?\d|\.)+/gi,Of=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Ol=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,ac=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,If=/[+-]=-?[.\d]+/,Df=/[^,'"\[\]\s]+/gi,Tm=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,dn,Vo,lc,hc,Vr={},cu={},zf,kf=function(a){return(cu=Na(a,Vr))&&Pr},uc=function(a,s){return console.warn("Invalid property",a,"set to",s,"Missing plugin? gsap.registerPlugin()")},yh=function(a,s){return!s&&console.warn(a)},Bf=function(a,s){return a&&(Vr[a]=s)&&cu&&(cu[a]=s)||Vr},_h=function(){return 0},Mm={suppressEvents:!0,isStart:!0,kill:!1},fu={suppressEvents:!0,kill:!1},Sm={suppressEvents:!0},cc={},Ys=[],fc={},Nf,Wr={},dc={},Ff=30,du=[],pc="",mc=function(a){var s=a[0],c,d;if(Ho(s)||Tn(s)||(a=[a]),!(c=(s._gsap||{}).harness)){for(d=du.length;d--&&!du[d].targetTest(s););c=du[d]}for(d=a.length;d--;)a[d]&&(a[d]._gsap||(a[d]._gsap=new pd(a[d],c)))||a.splice(d,1);return a},Ba=function(a){return a._gsap||mc(so(a))[0]._gsap},Uf=function(a,s,c){return(c=a[s])&&Tn(c)?a[s]():rc(c)&&a.getAttribute&&a.getAttribute(s)||c},Cr=function(a,s){return(a=a.split(",")).forEach(s)||a},Rn=function(a){return Math.round(a*1e5)/1e5||0},jn=function(a){return Math.round(a*1e7)/1e7||0},Il=function(a,s){var c=s.charAt(0),d=parseFloat(s.substr(2));return a=parseFloat(a),c==="+"?a+d:c==="-"?a-d:c==="*"?a*d:a/d},Em=function(a,s){for(var c=s.length,d=0;a.indexOf(s[d])<0&&++d<c;);return d<c},pu=function(){var a=Ys.length,s=Ys.slice(0),c,d;for(fc={},Ys.length=0,c=0;c<a;c++)d=s[c],d&&d._lazy&&(d.render(d._lazy[0],d._lazy[1],!0)._lazy=0)},Gf=function(a,s,c,d){Ys.length&&!nr&&pu(),a.render(s,c,d||nr&&s<0&&(a._initted||a._startAt)),Ys.length&&!nr&&pu()},Hf=function(a){var s=parseFloat(a);return(s||s===0)&&(a+"").match(Df).length<2?s:Wn(a)?a.trim():a},Vf=function(a){return a},ro=function(a,s){for(var c in s)c in a||(a[c]=s[c]);return a},bm=function(a){return function(s,c){for(var d in c)d in s||d==="duration"&&a||d==="ease"||(s[d]=c[d])}},Na=function(a,s){for(var c in s)a[c]=s[c];return a},Wf=function x(a,s){for(var c in s)c!=="__proto__"&&c!=="constructor"&&c!=="prototype"&&(a[c]=Ho(s[c])?x(a[c]||(a[c]={}),s[c]):s[c]);return a},mu=function(a,s){var c={},d;for(d in a)d in s||(c[d]=a[d]);return c},xh=function(a){var s=a.parent||dn,c=a.keyframes?bm(rr(a.keyframes)):ro;if(br(a.inherit))for(;s;)c(a,s.vars.defaults),s=s.parent||s._dp;return a},Cm=function(a,s){for(var c=a.length,d=c===s.length;d&&c--&&a[c]===s[c];);return c<0},jf=function(a,s,c,d,u){c===void 0&&(c="_first"),d===void 0&&(d="_last");var m=a[d],g;if(u)for(g=s[u];m&&m[u]>g;)m=m._prev;return m?(s._next=m._next,m._next=s):(s._next=a[c],a[c]=s),s._next?s._next._prev=s:a[d]=s,s._prev=m,s.parent=s._dp=a,s},gu=function(a,s,c,d){c===void 0&&(c="_first"),d===void 0&&(d="_last");var u=s._prev,m=s._next;u?u._next=m:a[c]===s&&(a[c]=m),m?m._prev=u:a[d]===s&&(a[d]=u),s._next=s._prev=s.parent=null},Zs=function(a,s){a.parent&&(!s||a.parent.autoRemoveChildren)&&a.parent.remove&&a.parent.remove(a),a._act=0},Fa=function(a,s){if(a&&(!s||s._end>a._dur||s._start<0))for(var c=a;c;)c._dirty=1,c=c.parent;return a},Am=function(a){for(var s=a.parent;s&&s.parent;)s._dirty=1,s.totalDuration(),s=s.parent;return a},gc=function(a,s,c,d){return a._startAt&&(nr?a._startAt.revert(fu):a.vars.immediateRender&&!a.vars.autoRevert||a._startAt.render(s,!0,d))},Pm=function x(a){return!a||a._ts&&x(a.parent)},Xf=function(a){return a._repeat?Dl(a._tTime,a=a.duration()+a._rDelay)*a:0},Dl=function(a,s){var c=Math.floor(a/=s);return a&&c===a?c-1:c},vu=function(a,s){return(a-s._start)*s._ts+(s._ts>=0?0:s._dirty?s.totalDuration():s._tDur)},yu=function(a){return a._end=jn(a._start+(a._tDur/Math.abs(a._ts||a._rts||en)||0))},_u=function(a,s){var c=a._dp;return c&&c.smoothChildTiming&&a._ts&&(a._start=jn(c._time-(a._ts>0?s/a._ts:((a._dirty?a.totalDuration():a._tDur)-s)/-a._ts)),yu(a),c._dirty||Fa(c,a)),a},qf=function(a,s){var c;if((s._time||!s._dur&&s._initted||s._start<a._time&&(s._dur||!s.add))&&(c=vu(a.rawTime(),s),(!s._dur||Th(0,s.totalDuration(),c)-s._tTime>en)&&s.render(c,!0)),Fa(a,s)._dp&&a._initted&&a._time>=a._dur&&a._ts){if(a._dur<a.duration())for(c=a;c._dp;)c.rawTime()>=0&&c.totalTime(c._tTime),c=c._dp;a._zTime=-en}},Wo=function(a,s,c,d){return s.parent&&Zs(s),s._start=jn((fs(c)?c:c||a!==dn?oo(a,c,s):a._time)+s._delay),s._end=jn(s._start+(s.totalDuration()/Math.abs(s.timeScale())||0)),jf(a,s,"_first","_last",a._sort?"_start":0),vc(s)||(a._recent=s),d||qf(a,s),a._ts<0&&_u(a,a._tTime),a},Yf=function(a,s){return(Vr.ScrollTrigger||uc("scrollTrigger",s))&&Vr.ScrollTrigger.create(s,a)},Zf=function(a,s,c,d,u){if(bc(a,s,u),!a._initted)return 1;if(!c&&a._pt&&!nr&&(a._dur&&a.vars.lazy!==!1||!a._dur&&a.vars.lazy)&&Nf!==Xr.frame)return Ys.push(a),a._lazy=[u,d],1},Lm=function x(a){var s=a.parent;return s&&s._ts&&s._initted&&!s._lock&&(s.rawTime()<0||x(s))},vc=function(a){var s=a.data;return s==="isFromStart"||s==="isStart"},Rm=function(a,s,c,d){var u=a.ratio,m=s<0||!s&&(!a._start&&Lm(a)&&!(!a._initted&&vc(a))||(a._ts<0||a._dp._ts<0)&&!vc(a))?0:1,g=a._rDelay,_=0,S,b,O;if(g&&a._repeat&&(_=Th(0,a._tDur,s),b=Dl(_,g),a._yoyo&&b&1&&(m=1-m),b!==Dl(a._tTime,g)&&(u=1-m,a.vars.repeatRefresh&&a._initted&&a.invalidate())),m!==u||nr||d||a._zTime===en||!s&&a._zTime){if(!a._initted&&Zf(a,s,d,c,_))return;for(O=a._zTime,a._zTime=s||(c?en:0),c||(c=s&&!O),a.ratio=m,a._from&&(m=1-m),a._time=0,a._tTime=_,S=a._pt;S;)S.r(m,S.d),S=S._next;s<0&&gc(a,s,c,!0),a._onUpdate&&!c&&jr(a,"onUpdate"),_&&a._repeat&&!c&&a.parent&&jr(a,"onRepeat"),(s>=a._tDur||s<0)&&a.ratio===m&&(m&&Zs(a,1),!c&&!nr&&(jr(a,m?"onComplete":"onReverseComplete",!0),a._prom&&a._prom()))}else a._zTime||(a._zTime=s)},Om=function(a,s,c){var d;if(c>s)for(d=a._first;d&&d._start<=c;){if(d.data==="isPause"&&d._start>s)return d;d=d._next}else for(d=a._last;d&&d._start>=c;){if(d.data==="isPause"&&d._start<s)return d;d=d._prev}},zl=function(a,s,c,d){var u=a._repeat,m=jn(s)||0,g=a._tTime/a._tDur;return g&&!d&&(a._time*=m/a._dur),a._dur=m,a._tDur=u?u<0?1e10:jn(m*(u+1)+a._rDelay*u):m,g>0&&!d&&_u(a,a._tTime=a._tDur*g),a.parent&&yu(a),c||Fa(a.parent,a),a},Jf=function(a){return a instanceof gr?Fa(a):zl(a,a._dur)},Im={_start:0,endTime:_h,totalDuration:_h},oo=function x(a,s,c){var d=a.labels,u=a._recent||Im,m=a.duration()>=no?u.endTime(!1):a._dur,g,_,S;return Wn(s)&&(isNaN(s)||s in d)?(_=s.charAt(0),S=s.substr(-1)==="%",g=s.indexOf("="),_==="<"||_===">"?(g>=0&&(s=s.replace(/=/,"")),(_==="<"?u._start:u.endTime(u._repeat>=0))+(parseFloat(s.substr(1))||0)*(S?(g<0?u:c).totalDuration()/100:1)):g<0?(s in d||(d[s]=m),d[s]):(_=parseFloat(s.charAt(g-1)+s.substr(g+1)),S&&c&&(_=_/100*(rr(c)?c[0]:c).totalDuration()),g>1?x(a,s.substr(0,g-1),c)+_:m+_)):s==null?m:+s},wh=function(a,s,c){var d=fs(s[1]),u=(d?2:1)+(a<2?0:1),m=s[u],g,_;if(d&&(m.duration=s[1]),m.parent=c,a){for(g=m,_=c;_&&!("immediateRender"in g);)g=_.vars.defaults||{},_=br(_.vars.inherit)&&_.parent;m.immediateRender=br(g.immediateRender),a<2?m.runBackwards=1:m.startAt=s[u-1]}return new kn(s[0],m,s[u+1])},Js=function(a,s){return a||a===0?s(a):s},Th=function(a,s,c){return c<a?a:c>s?s:c},or=function(a,s){return!Wn(a)||!(s=Tm.exec(a))?"":s[1]},Dm=function(a,s,c){return Js(c,function(d){return Th(a,s,d)})},yc=[].slice,$f=function(a,s){return a&&Ho(a)&&"length"in a&&(!s&&!a.length||a.length-1 in a&&Ho(a[0]))&&!a.nodeType&&a!==Vo},zm=function(a,s,c){return c===void 0&&(c=[]),a.forEach(function(d){var u;return Wn(d)&&!s||$f(d,1)?(u=c).push.apply(u,so(d)):c.push(d)})||c},so=function(a,s,c){return hn&&!s&&hn.selector?hn.selector(a):Wn(a)&&!c&&(lc||!Bl())?yc.call((s||hc).querySelectorAll(a),0):rr(a)?zm(a,c):$f(a)?yc.call(a,0):a?[a]:[]},_c=function(a){return a=so(a)[0]||yh("Invalid scope")||{},function(s){var c=a.current||a.nativeElement||a;return so(s,c.querySelectorAll?c:c===a?yh("Invalid scope")||hc.createElement("div"):a)}},Kf=function(a){return a.sort(function(){return .5-Math.random()})},Qf=function(a){if(Tn(a))return a;var s=Ho(a)?a:{each:a},c=Ua(s.ease),d=s.from||0,u=parseFloat(s.base)||0,m={},g=d>0&&d<1,_=isNaN(d)||g,S=s.axis,b=d,O=d;return Wn(d)?b=O={center:.5,edges:.5,end:1}[d]||0:!g&&_&&(b=d[0],O=d[1]),function(k,D,F){var E=(F||s).length,L=m[E],T,M,R,C,U,N,X,K,Z;if(!L){if(Z=s.grid==="auto"?0:(s.grid||[1,no])[1],!Z){for(X=-no;X<(X=F[Z++].getBoundingClientRect().left)&&Z<E;);Z<E&&Z--}for(L=m[E]=[],T=_?Math.min(Z,E)*b-.5:d%Z,M=Z===no?0:_?E*O/Z-.5:d/Z|0,X=0,K=no,N=0;N<E;N++)R=N%Z-T,C=M-(N/Z|0),L[N]=U=S?Math.abs(S==="y"?C:R):Lf(R*R+C*C),U>X&&(X=U),U<K&&(K=U);d==="random"&&Kf(L),L.max=X-K,L.min=K,L.v=E=(parseFloat(s.amount)||parseFloat(s.each)*(Z>E?E-1:S?S==="y"?E/Z:Z:Math.max(Z,E/Z))||0)*(d==="edges"?-1:1),L.b=E<0?u-E:u,L.u=or(s.amount||s.each)||0,c=c&&E<0?cd(c):c}return E=(L[k]-L.min)/L.max||0,jn(L.b+(c?c(E):E)*L.v)+L.u}},xc=function(a){var s=Math.pow(10,((a+"").split(".")[1]||"").length);return function(c){var d=jn(Math.round(parseFloat(c)/a)*a*s);return(d-d%1)/s+(fs(c)?0:or(c))}},td=function(a,s){var c=rr(a),d,u;return!c&&Ho(a)&&(d=c=a.radius||no,a.values?(a=so(a.values),(u=!fs(a[0]))&&(d*=d)):a=xc(a.increment)),Js(s,c?Tn(a)?function(m){return u=a(m),Math.abs(u-m)<=d?u:m}:function(m){for(var g=parseFloat(u?m.x:m),_=parseFloat(u?m.y:0),S=no,b=0,O=a.length,k,D;O--;)u?(k=a[O].x-g,D=a[O].y-_,k=k*k+D*D):k=Math.abs(a[O]-g),k<S&&(S=k,b=O);return b=!d||S<=d?a[b]:m,u||b===m||fs(m)?b:b+or(m)}:xc(a))},ed=function(a,s,c,d){return Js(rr(a)?!s:c===!0?!!(c=0):!d,function(){return rr(a)?a[~~(Math.random()*a.length)]:(c=c||1e-5)&&(d=c<1?Math.pow(10,(c+"").length-2):1)&&Math.floor(Math.round((a-c/2+Math.random()*(s-a+c*.99))/c)*c*d)/d})},km=function(){for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return function(d){return s.reduce(function(u,m){return m(u)},d)}},Bm=function(a,s){return function(c){return a(parseFloat(c))+(s||or(c))}},Nm=function(a,s,c){return nd(a,s,0,1,c)},id=function(a,s,c){return Js(c,function(d){return a[~~s(d)]})},Fm=function x(a,s,c){var d=s-a;return rr(a)?id(a,x(0,a.length),s):Js(c,function(u){return(d+(u-a)%d)%d+a})},Um=function x(a,s,c){var d=s-a,u=d*2;return rr(a)?id(a,x(0,a.length-1),s):Js(c,function(m){return m=(u+(m-a)%u)%u||0,a+(m>d?u-m:m)})},Mh=function(a){for(var s=0,c="",d,u,m,g;~(d=a.indexOf("random(",s));)m=a.indexOf(")",d),g=a.charAt(d+7)==="[",u=a.substr(d+7,m-d-7).match(g?Df:sc),c+=a.substr(s,d-s)+ed(g?u:+u[0],g?0:+u[1],+u[2]||1e-5),s=m+1;return c+a.substr(s,a.length-s)},nd=function(a,s,c,d,u){var m=s-a,g=d-c;return Js(u,function(_){return c+((_-a)/m*g||0)})},Gm=function x(a,s,c,d){var u=isNaN(a+s)?0:function(D){return(1-D)*a+D*s};if(!u){var m=Wn(a),g={},_,S,b,O,k;if(c===!0&&(d=1)&&(c=null),m)a={p:a},s={p:s};else if(rr(a)&&!rr(s)){for(b=[],O=a.length,k=O-2,S=1;S<O;S++)b.push(x(a[S-1],a[S]));O--,u=function(F){F*=O;var E=Math.min(k,~~F);return b[E](F-E)},c=s}else d||(a=Na(rr(a)?[]:{},a));if(!b){for(_ in s)Sc.call(g,a,_,"get",s[_]);u=function(F){return Pc(F,g)||(m?a.p:a)}}}return Js(c,u)},rd=function(a,s,c){var d=a.labels,u=no,m,g,_;for(m in d)g=d[m]-s,g<0==!!c&&g&&u>(g=Math.abs(g))&&(_=m,u=g);return _},jr=function(a,s,c){var d=a.vars,u=d[s],m=hn,g=a._ctx,_,S,b;if(u)return _=d[s+"Params"],S=d.callbackScope||a,c&&Ys.length&&pu(),g&&(hn=g),b=_?u.apply(S,_):u.call(S),hn=m,b},Sh=function(a){return Zs(a),a.scrollTrigger&&a.scrollTrigger.kill(!!nr),a.progress()<1&&jr(a,"onInterrupt"),a},kl,od=[],sd=function(a){if(a)if(a=!a.name&&a.default||a,oc()||a.headless){var s=a.name,c=Tn(a),d=s&&!c&&a.init?function(){this._props=[]}:a,u={init:_h,render:Pc,add:Sc,kill:ng,modifier:ig,rawVars:0},m={targetTest:0,get:0,getSetter:Ac,aliases:{},register:0};if(Bl(),a!==d){if(Wr[s])return;ro(d,ro(mu(a,u),m)),Na(d.prototype,Na(u,mu(a,m))),Wr[d.prop=s]=d,a.targetTest&&(du.push(d),cc[s]=1),s=(s==="css"?"CSS":s.charAt(0).toUpperCase()+s.substr(1))+"Plugin"}Bf(s,d),a.register&&a.register(Pr,d,Ar)}else od.push(a)},Ki=255,Eh={aqua:[0,Ki,Ki],lime:[0,Ki,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Ki],navy:[0,0,128],white:[Ki,Ki,Ki],olive:[128,128,0],yellow:[Ki,Ki,0],orange:[Ki,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Ki,0,0],pink:[Ki,192,203],cyan:[0,Ki,Ki],transparent:[Ki,Ki,Ki,0]},wc=function(a,s,c){return a+=a<0?1:a>1?-1:0,(a*6<1?s+(c-s)*a*6:a<.5?c:a*3<2?s+(c-s)*(2/3-a)*6:s)*Ki+.5|0},ad=function(a,s,c){var d=a?fs(a)?[a>>16,a>>8&Ki,a&Ki]:0:Eh.black,u,m,g,_,S,b,O,k,D,F;if(!d){if(a.substr(-1)===","&&(a=a.substr(0,a.length-1)),Eh[a])d=Eh[a];else if(a.charAt(0)==="#"){if(a.length<6&&(u=a.charAt(1),m=a.charAt(2),g=a.charAt(3),a="#"+u+u+m+m+g+g+(a.length===5?a.charAt(4)+a.charAt(4):"")),a.length===9)return d=parseInt(a.substr(1,6),16),[d>>16,d>>8&Ki,d&Ki,parseInt(a.substr(7),16)/255];a=parseInt(a.substr(1),16),d=[a>>16,a>>8&Ki,a&Ki]}else if(a.substr(0,3)==="hsl"){if(d=F=a.match(sc),!s)_=+d[0]%360/360,S=+d[1]/100,b=+d[2]/100,m=b<=.5?b*(S+1):b+S-b*S,u=b*2-m,d.length>3&&(d[3]*=1),d[0]=wc(_+1/3,u,m),d[1]=wc(_,u,m),d[2]=wc(_-1/3,u,m);else if(~a.indexOf("="))return d=a.match(Of),c&&d.length<4&&(d[3]=1),d}else d=a.match(sc)||Eh.transparent;d=d.map(Number)}return s&&!F&&(u=d[0]/Ki,m=d[1]/Ki,g=d[2]/Ki,O=Math.max(u,m,g),k=Math.min(u,m,g),b=(O+k)/2,O===k?_=S=0:(D=O-k,S=b>.5?D/(2-O-k):D/(O+k),_=O===u?(m-g)/D+(m<g?6:0):O===m?(g-u)/D+2:(u-m)/D+4,_*=60),d[0]=~~(_+.5),d[1]=~~(S*100+.5),d[2]=~~(b*100+.5)),c&&d.length<4&&(d[3]=1),d},ld=function(a){var s=[],c=[],d=-1;return a.split($s).forEach(function(u){var m=u.match(Ol)||[];s.push.apply(s,m),c.push(d+=m.length+1)}),s.c=c,s},hd=function(a,s,c){var d="",u=(a+d).match($s),m=s?"hsla(":"rgba(",g=0,_,S,b,O;if(!u)return a;if(u=u.map(function(k){return(k=ad(k,s,1))&&m+(s?k[0]+","+k[1]+"%,"+k[2]+"%,"+k[3]:k.join(","))+")"}),c&&(b=ld(a),_=c.c,_.join(d)!==b.c.join(d)))for(S=a.replace($s,"1").split(Ol),O=S.length-1;g<O;g++)d+=S[g]+(~_.indexOf(g)?u.shift()||m+"0,0,0,0)":(b.length?b:u.length?u:c).shift());if(!S)for(S=a.split($s),O=S.length-1;g<O;g++)d+=S[g]+u[g];return d+S[O]},$s=function(){var x="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",a;for(a in Eh)x+="|"+a+"\\b";return new RegExp(x+")","gi")}(),Hm=/hsl[a]?\(/,ud=function(a){var s=a.join(" "),c;if($s.lastIndex=0,$s.test(s))return c=Hm.test(s),a[1]=hd(a[1],c),a[0]=hd(a[0],c,ld(a[1])),!0},bh,Xr=function(){var x=Date.now,a=500,s=33,c=x(),d=c,u=1e3/240,m=u,g=[],_,S,b,O,k,D,F=function E(L){var T=x()-d,M=L===!0,R,C,U,N;if((T>a||T<0)&&(c+=T-s),d+=T,U=d-c,R=U-m,(R>0||M)&&(N=++O.frame,k=U-O.time*1e3,O.time=U=U/1e3,m+=R+(R>=u?4:u-R),C=1),M||(_=S(E)),C)for(D=0;D<g.length;D++)g[D](U,k,N,L)};return O={time:0,frame:0,tick:function(){F(!0)},deltaRatio:function(L){return k/(1e3/(L||60))},wake:function(){zf&&(!lc&&oc()&&(Vo=lc=window,hc=Vo.document||{},Vr.gsap=Pr,(Vo.gsapVersions||(Vo.gsapVersions=[])).push(Pr.version),kf(cu||Vo.GreenSockGlobals||!Vo.gsap&&Vo||{}),od.forEach(sd)),b=typeof requestAnimationFrame<"u"&&requestAnimationFrame,_&&O.sleep(),S=b||function(L){return setTimeout(L,m-O.time*1e3+1|0)},bh=1,F(2))},sleep:function(){(b?cancelAnimationFrame:clearTimeout)(_),bh=0,S=_h},lagSmoothing:function(L,T){a=L||1/0,s=Math.min(T||33,a)},fps:function(L){u=1e3/(L||240),m=O.time*1e3+u},add:function(L,T,M){var R=T?function(C,U,N,X){L(C,U,N,X),O.remove(R)}:L;return O.remove(L),g[M?"unshift":"push"](R),Bl(),R},remove:function(L,T){~(T=g.indexOf(L))&&g.splice(T,1)&&D>=T&&D--},_listeners:g},O}(),Bl=function(){return!bh&&Xr.wake()},Ii={},Vm=/^[\d.\-M][\d.\-,\s]/,Wm=/["']/g,jm=function(a){for(var s={},c=a.substr(1,a.length-3).split(":"),d=c[0],u=1,m=c.length,g,_,S;u<m;u++)_=c[u],g=u!==m-1?_.lastIndexOf(","):_.length,S=_.substr(0,g),s[d]=isNaN(S)?S.replace(Wm,"").trim():+S,d=_.substr(g+1).trim();return s},Xm=function(a){var s=a.indexOf("(")+1,c=a.indexOf(")"),d=a.indexOf("(",s);return a.substring(s,~d&&d<c?a.indexOf(")",c+1):c)},qm=function(a){var s=(a+"").split("("),c=Ii[s[0]];return c&&s.length>1&&c.config?c.config.apply(null,~a.indexOf("{")?[jm(s[1])]:Xm(a).split(",").map(Hf)):Ii._CE&&Vm.test(a)?Ii._CE("",a):c},cd=function(a){return function(s){return 1-a(1-s)}},fd=function x(a,s){for(var c=a._first,d;c;)c instanceof gr?x(c,s):c.vars.yoyoEase&&(!c._yoyo||!c._repeat)&&c._yoyo!==s&&(c.timeline?x(c.timeline,s):(d=c._ease,c._ease=c._yEase,c._yEase=d,c._yoyo=s)),c=c._next},Ua=function(a,s){return a&&(Tn(a)?a:Ii[a]||qm(a))||s},Ga=function(a,s,c,d){c===void 0&&(c=function(_){return 1-s(1-_)}),d===void 0&&(d=function(_){return _<.5?s(_*2)/2:1-s((1-_)*2)/2});var u={easeIn:s,easeOut:c,easeInOut:d},m;return Cr(a,function(g){Ii[g]=Vr[g]=u,Ii[m=g.toLowerCase()]=c;for(var _ in u)Ii[m+(_==="easeIn"?".in":_==="easeOut"?".out":".inOut")]=Ii[g+"."+_]=u[_]}),u},dd=function(a){return function(s){return s<.5?(1-a(1-s*2))/2:.5+a((s-.5)*2)/2}},Tc=function x(a,s,c){var d=s>=1?s:1,u=(c||(a?.3:.45))/(s<1?s:1),m=u/nc*(Math.asin(1/d)||0),g=function(b){return b===1?1:d*Math.pow(2,-10*b)*wm((b-m)*u)+1},_=a==="out"?g:a==="in"?function(S){return 1-g(1-S)}:dd(g);return u=nc/u,_.config=function(S,b){return x(a,S,b)},_},Mc=function x(a,s){s===void 0&&(s=1.70158);var c=function(m){return m?--m*m*((s+1)*m+s)+1:0},d=a==="out"?c:a==="in"?function(u){return 1-c(1-u)}:dd(c);return d.config=function(u){return x(a,u)},d};Cr("Linear,Quad,Cubic,Quart,Quint,Strong",function(x,a){var s=a<5?a+1:a;Ga(x+",Power"+(s-1),a?function(c){return Math.pow(c,s)}:function(c){return c},function(c){return 1-Math.pow(1-c,s)},function(c){return c<.5?Math.pow(c*2,s)/2:1-Math.pow((1-c)*2,s)/2})}),Ii.Linear.easeNone=Ii.none=Ii.Linear.easeIn,Ga("Elastic",Tc("in"),Tc("out"),Tc()),function(x,a){var s=1/a,c=2*s,d=2.5*s,u=function(g){return g<s?x*g*g:g<c?x*Math.pow(g-1.5/a,2)+.75:g<d?x*(g-=2.25/a)*g+.9375:x*Math.pow(g-2.625/a,2)+.984375};Ga("Bounce",function(m){return 1-u(1-m)},u)}(7.5625,2.75),Ga("Expo",function(x){return x?Math.pow(2,10*(x-1)):0}),Ga("Circ",function(x){return-(Lf(1-x*x)-1)}),Ga("Sine",function(x){return x===1?1:-xm(x*ym)+1}),Ga("Back",Mc("in"),Mc("out"),Mc()),Ii.SteppedEase=Ii.steps=Vr.SteppedEase={config:function(a,s){a===void 0&&(a=1);var c=1/a,d=a+(s?0:1),u=s?1:0,m=1-en;return function(g){return((d*Th(0,m,g)|0)+u)*c}}},Rl.ease=Ii["quad.out"],Cr("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(x){return pc+=x+","+x+"Params,"});var pd=function(a,s){this.id=_m++,a._gsap=this,this.target=a,this.harness=s,this.get=s?s.get:Uf,this.set=s?s.getSetter:Ac},Ch=function(){function x(s){this.vars=s,this._delay=+s.delay||0,(this._repeat=s.repeat===1/0?-2:s.repeat||0)&&(this._rDelay=s.repeatDelay||0,this._yoyo=!!s.yoyo||!!s.yoyoEase),this._ts=1,zl(this,+s.duration,1,1),this.data=s.data,hn&&(this._ctx=hn,hn.data.push(this)),bh||Xr.wake()}var a=x.prototype;return a.delay=function(c){return c||c===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+c-this._delay),this._delay=c,this):this._delay},a.duration=function(c){return arguments.length?this.totalDuration(this._repeat>0?c+(c+this._rDelay)*this._repeat:c):this.totalDuration()&&this._dur},a.totalDuration=function(c){return arguments.length?(this._dirty=0,zl(this,this._repeat<0?c:(c-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},a.totalTime=function(c,d){if(Bl(),!arguments.length)return this._tTime;var u=this._dp;if(u&&u.smoothChildTiming&&this._ts){for(_u(this,c),!u._dp||u.parent||qf(u,this);u&&u.parent;)u.parent._time!==u._start+(u._ts>=0?u._tTime/u._ts:(u.totalDuration()-u._tTime)/-u._ts)&&u.totalTime(u._tTime,!0),u=u.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&c<this._tDur||this._ts<0&&c>0||!this._tDur&&!c)&&Wo(this._dp,this,this._start-this._delay)}return(this._tTime!==c||!this._dur&&!d||this._initted&&Math.abs(this._zTime)===en||!c&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=c),Gf(this,c,d)),this},a.time=function(c,d){return arguments.length?this.totalTime(Math.min(this.totalDuration(),c+Xf(this))%(this._dur+this._rDelay)||(c?this._dur:0),d):this._time},a.totalProgress=function(c,d){return arguments.length?this.totalTime(this.totalDuration()*c,d):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},a.progress=function(c,d){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-c:c)+Xf(this),d):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},a.iteration=function(c,d){var u=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(c-1)*u,d):this._repeat?Dl(this._tTime,u)+1:1},a.timeScale=function(c,d){if(!arguments.length)return this._rts===-en?0:this._rts;if(this._rts===c)return this;var u=this.parent&&this._ts?vu(this.parent._time,this):this._tTime;return this._rts=+c||0,this._ts=this._ps||c===-en?0:this._rts,this.totalTime(Th(-Math.abs(this._delay),this._tDur,u),d!==!1),yu(this),Am(this)},a.paused=function(c){return arguments.length?(this._ps!==c&&(this._ps=c,c?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Bl(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==en&&(this._tTime-=en)))),this):this._ps},a.startTime=function(c){if(arguments.length){this._start=c;var d=this.parent||this._dp;return d&&(d._sort||!this.parent)&&Wo(d,this,c-this._delay),this}return this._start},a.endTime=function(c){return this._start+(br(c)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},a.rawTime=function(c){var d=this.parent||this._dp;return d?c&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?vu(d.rawTime(c),this):this._tTime:this._tTime},a.revert=function(c){c===void 0&&(c=Sm);var d=nr;return nr=c,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(c),this.totalTime(-.01,c.suppressEvents)),this.data!=="nested"&&c.kill!==!1&&this.kill(),nr=d,this},a.globalTime=function(c){for(var d=this,u=arguments.length?c:d.rawTime();d;)u=d._start+u/(Math.abs(d._ts)||1),d=d._dp;return!this.parent&&this._sat?this._sat.globalTime(c):u},a.repeat=function(c){return arguments.length?(this._repeat=c===1/0?-2:c,Jf(this)):this._repeat===-2?1/0:this._repeat},a.repeatDelay=function(c){if(arguments.length){var d=this._time;return this._rDelay=c,Jf(this),d?this.time(d):this}return this._rDelay},a.yoyo=function(c){return arguments.length?(this._yoyo=c,this):this._yoyo},a.seek=function(c,d){return this.totalTime(oo(this,c),br(d))},a.restart=function(c,d){return this.play().totalTime(c?-this._delay:0,br(d))},a.play=function(c,d){return c!=null&&this.seek(c,d),this.reversed(!1).paused(!1)},a.reverse=function(c,d){return c!=null&&this.seek(c||this.totalDuration(),d),this.reversed(!0).paused(!1)},a.pause=function(c,d){return c!=null&&this.seek(c,d),this.paused(!0)},a.resume=function(){return this.paused(!1)},a.reversed=function(c){return arguments.length?(!!c!==this.reversed()&&this.timeScale(-this._rts||(c?-en:0)),this):this._rts<0},a.invalidate=function(){return this._initted=this._act=0,this._zTime=-en,this},a.isActive=function(){var c=this.parent||this._dp,d=this._start,u;return!!(!c||this._ts&&this._initted&&c.isActive()&&(u=c.rawTime(!0))>=d&&u<this.endTime(!0)-en)},a.eventCallback=function(c,d,u){var m=this.vars;return arguments.length>1?(d?(m[c]=d,u&&(m[c+"Params"]=u),c==="onUpdate"&&(this._onUpdate=d)):delete m[c],this):m[c]},a.then=function(c){var d=this;return new Promise(function(u){var m=Tn(c)?c:Vf,g=function(){var S=d.then;d.then=null,Tn(m)&&(m=m(d))&&(m.then||m===d)&&(d.then=S),u(m),d.then=S};d._initted&&d.totalProgress()===1&&d._ts>=0||!d._tTime&&d._ts<0?g():d._prom=g})},a.kill=function(){Sh(this)},x}();ro(Ch.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-en,_prom:0,_ps:!1,_rts:1});var gr=function(x){Pf(a,x);function a(c,d){var u;return c===void 0&&(c={}),u=x.call(this,c)||this,u.labels={},u.smoothChildTiming=!!c.smoothChildTiming,u.autoRemoveChildren=!!c.autoRemoveChildren,u._sort=br(c.sortChildren),dn&&Wo(c.parent||dn,cs(u),d),c.reversed&&u.reverse(),c.paused&&u.paused(!0),c.scrollTrigger&&Yf(cs(u),c.scrollTrigger),u}var s=a.prototype;return s.to=function(d,u,m){return wh(0,arguments,this),this},s.from=function(d,u,m){return wh(1,arguments,this),this},s.fromTo=function(d,u,m,g){return wh(2,arguments,this),this},s.set=function(d,u,m){return u.duration=0,u.parent=this,xh(u).repeatDelay||(u.repeat=0),u.immediateRender=!!u.immediateRender,new kn(d,u,oo(this,m),1),this},s.call=function(d,u,m){return Wo(this,kn.delayedCall(0,d,u),m)},s.staggerTo=function(d,u,m,g,_,S,b){return m.duration=u,m.stagger=m.stagger||g,m.onComplete=S,m.onCompleteParams=b,m.parent=this,new kn(d,m,oo(this,_)),this},s.staggerFrom=function(d,u,m,g,_,S,b){return m.runBackwards=1,xh(m).immediateRender=br(m.immediateRender),this.staggerTo(d,u,m,g,_,S,b)},s.staggerFromTo=function(d,u,m,g,_,S,b,O){return g.startAt=m,xh(g).immediateRender=br(g.immediateRender),this.staggerTo(d,u,g,_,S,b,O)},s.render=function(d,u,m){var g=this._time,_=this._dirty?this.totalDuration():this._tDur,S=this._dur,b=d<=0?0:jn(d),O=this._zTime<0!=d<0&&(this._initted||!S),k,D,F,E,L,T,M,R,C,U,N,X;if(this!==dn&&b>_&&d>=0&&(b=_),b!==this._tTime||m||O){if(g!==this._time&&S&&(b+=this._time-g,d+=this._time-g),k=b,C=this._start,R=this._ts,T=!R,O&&(S||(g=this._zTime),(d||!u)&&(this._zTime=d)),this._repeat){if(N=this._yoyo,L=S+this._rDelay,this._repeat<-1&&d<0)return this.totalTime(L*100+d,u,m);if(k=jn(b%L),b===_?(E=this._repeat,k=S):(E=~~(b/L),E&&E===b/L&&(k=S,E--),k>S&&(k=S)),U=Dl(this._tTime,L),!g&&this._tTime&&U!==E&&this._tTime-U*L-this._dur<=0&&(U=E),N&&E&1&&(k=S-k,X=1),E!==U&&!this._lock){var K=N&&U&1,Z=K===(N&&E&1);if(E<U&&(K=!K),g=K?0:b%S?S:b,this._lock=1,this.render(g||(X?0:jn(E*L)),u,!S)._lock=0,this._tTime=b,!u&&this.parent&&jr(this,"onRepeat"),this.vars.repeatRefresh&&!X&&(this.invalidate()._lock=1),g&&g!==this._time||T!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(S=this._dur,_=this._tDur,Z&&(this._lock=2,g=K?S:-1e-4,this.render(g,!0),this.vars.repeatRefresh&&!X&&this.invalidate()),this._lock=0,!this._ts&&!T)return this;fd(this,X)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(M=Om(this,jn(g),jn(k)),M&&(b-=k-(k=M._start))),this._tTime=b,this._time=k,this._act=!R,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=d,g=0),!g&&k&&!u&&!E&&(jr(this,"onStart"),this._tTime!==b))return this;if(k>=g&&d>=0)for(D=this._first;D;){if(F=D._next,(D._act||k>=D._start)&&D._ts&&M!==D){if(D.parent!==this)return this.render(d,u,m);if(D.render(D._ts>0?(k-D._start)*D._ts:(D._dirty?D.totalDuration():D._tDur)+(k-D._start)*D._ts,u,m),k!==this._time||!this._ts&&!T){M=0,F&&(b+=this._zTime=-en);break}}D=F}else{D=this._last;for(var ct=d<0?d:k;D;){if(F=D._prev,(D._act||ct<=D._end)&&D._ts&&M!==D){if(D.parent!==this)return this.render(d,u,m);if(D.render(D._ts>0?(ct-D._start)*D._ts:(D._dirty?D.totalDuration():D._tDur)+(ct-D._start)*D._ts,u,m||nr&&(D._initted||D._startAt)),k!==this._time||!this._ts&&!T){M=0,F&&(b+=this._zTime=ct?-en:en);break}}D=F}}if(M&&!u&&(this.pause(),M.render(k>=g?0:-en)._zTime=k>=g?1:-1,this._ts))return this._start=C,yu(this),this.render(d,u,m);this._onUpdate&&!u&&jr(this,"onUpdate",!0),(b===_&&this._tTime>=this.totalDuration()||!b&&g)&&(C===this._start||Math.abs(R)!==Math.abs(this._ts))&&(this._lock||((d||!S)&&(b===_&&this._ts>0||!b&&this._ts<0)&&Zs(this,1),!u&&!(d<0&&!g)&&(b||g||!_)&&(jr(this,b===_&&d>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(b<_&&this.timeScale()>0)&&this._prom())))}return this},s.add=function(d,u){var m=this;if(fs(u)||(u=oo(this,u,d)),!(d instanceof Ch)){if(rr(d))return d.forEach(function(g){return m.add(g,u)}),this;if(Wn(d))return this.addLabel(d,u);if(Tn(d))d=kn.delayedCall(0,d);else return this}return this!==d?Wo(this,d,u):this},s.getChildren=function(d,u,m,g){d===void 0&&(d=!0),u===void 0&&(u=!0),m===void 0&&(m=!0),g===void 0&&(g=-no);for(var _=[],S=this._first;S;)S._start>=g&&(S instanceof kn?u&&_.push(S):(m&&_.push(S),d&&_.push.apply(_,S.getChildren(!0,u,m)))),S=S._next;return _},s.getById=function(d){for(var u=this.getChildren(1,1,1),m=u.length;m--;)if(u[m].vars.id===d)return u[m]},s.remove=function(d){return Wn(d)?this.removeLabel(d):Tn(d)?this.killTweensOf(d):(gu(this,d),d===this._recent&&(this._recent=this._last),Fa(this))},s.totalTime=function(d,u){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=jn(Xr.time-(this._ts>0?d/this._ts:(this.totalDuration()-d)/-this._ts))),x.prototype.totalTime.call(this,d,u),this._forcing=0,this):this._tTime},s.addLabel=function(d,u){return this.labels[d]=oo(this,u),this},s.removeLabel=function(d){return delete this.labels[d],this},s.addPause=function(d,u,m){var g=kn.delayedCall(0,u||_h,m);return g.data="isPause",this._hasPause=1,Wo(this,g,oo(this,d))},s.removePause=function(d){var u=this._first;for(d=oo(this,d);u;)u._start===d&&u.data==="isPause"&&Zs(u),u=u._next},s.killTweensOf=function(d,u,m){for(var g=this.getTweensOf(d,m),_=g.length;_--;)Ks!==g[_]&&g[_].kill(d,u);return this},s.getTweensOf=function(d,u){for(var m=[],g=so(d),_=this._first,S=fs(u),b;_;)_ instanceof kn?Em(_._targets,g)&&(S?(!Ks||_._initted&&_._ts)&&_.globalTime(0)<=u&&_.globalTime(_.totalDuration())>u:!u||_.isActive())&&m.push(_):(b=_.getTweensOf(g,u)).length&&m.push.apply(m,b),_=_._next;return m},s.tweenTo=function(d,u){u=u||{};var m=this,g=oo(m,d),_=u,S=_.startAt,b=_.onStart,O=_.onStartParams,k=_.immediateRender,D,F=kn.to(m,ro({ease:u.ease||"none",lazy:!1,immediateRender:!1,time:g,overwrite:"auto",duration:u.duration||Math.abs((g-(S&&"time"in S?S.time:m._time))/m.timeScale())||en,onStart:function(){if(m.pause(),!D){var L=u.duration||Math.abs((g-(S&&"time"in S?S.time:m._time))/m.timeScale());F._dur!==L&&zl(F,L,0,1).render(F._time,!0,!0),D=1}b&&b.apply(F,O||[])}},u));return k?F.render(0):F},s.tweenFromTo=function(d,u,m){return this.tweenTo(u,ro({startAt:{time:oo(this,d)}},m))},s.recent=function(){return this._recent},s.nextLabel=function(d){return d===void 0&&(d=this._time),rd(this,oo(this,d))},s.previousLabel=function(d){return d===void 0&&(d=this._time),rd(this,oo(this,d),1)},s.currentLabel=function(d){return arguments.length?this.seek(d,!0):this.previousLabel(this._time+en)},s.shiftChildren=function(d,u,m){m===void 0&&(m=0);for(var g=this._first,_=this.labels,S;g;)g._start>=m&&(g._start+=d,g._end+=d),g=g._next;if(u)for(S in _)_[S]>=m&&(_[S]+=d);return Fa(this)},s.invalidate=function(d){var u=this._first;for(this._lock=0;u;)u.invalidate(d),u=u._next;return x.prototype.invalidate.call(this,d)},s.clear=function(d){d===void 0&&(d=!0);for(var u=this._first,m;u;)m=u._next,this.remove(u),u=m;return this._dp&&(this._time=this._tTime=this._pTime=0),d&&(this.labels={}),Fa(this)},s.totalDuration=function(d){var u=0,m=this,g=m._last,_=no,S,b,O;if(arguments.length)return m.timeScale((m._repeat<0?m.duration():m.totalDuration())/(m.reversed()?-d:d));if(m._dirty){for(O=m.parent;g;)S=g._prev,g._dirty&&g.totalDuration(),b=g._start,b>_&&m._sort&&g._ts&&!m._lock?(m._lock=1,Wo(m,g,b-g._delay,1)._lock=0):_=b,b<0&&g._ts&&(u-=b,(!O&&!m._dp||O&&O.smoothChildTiming)&&(m._start+=b/m._ts,m._time-=b,m._tTime-=b),m.shiftChildren(-b,!1,-1/0),_=0),g._end>u&&g._ts&&(u=g._end),g=S;zl(m,m===dn&&m._time>u?m._time:u,1,1),m._dirty=0}return m._tDur},a.updateRoot=function(d){if(dn._ts&&(Gf(dn,vu(d,dn)),Nf=Xr.frame),Xr.frame>=Ff){Ff+=Hr.autoSleep||120;var u=dn._first;if((!u||!u._ts)&&Hr.autoSleep&&Xr._listeners.length<2){for(;u&&!u._ts;)u=u._next;u||Xr.sleep()}}},a}(Ch);ro(gr.prototype,{_lock:0,_hasPause:0,_forcing:0});var Ym=function(a,s,c,d,u,m,g){var _=new Ar(this._pt,a,s,0,1,xd,null,u),S=0,b=0,O,k,D,F,E,L,T,M;for(_.b=c,_.e=d,c+="",d+="",(T=~d.indexOf("random("))&&(d=Mh(d)),m&&(M=[c,d],m(M,a,s),c=M[0],d=M[1]),k=c.match(ac)||[];O=ac.exec(d);)F=O[0],E=d.substring(S,O.index),D?D=(D+1)%5:E.substr(-5)==="rgba("&&(D=1),F!==k[b++]&&(L=parseFloat(k[b-1])||0,_._pt={_next:_._pt,p:E||b===1?E:",",s:L,c:F.charAt(1)==="="?Il(L,F)-L:parseFloat(F)-L,m:D&&D<4?Math.round:0},S=ac.lastIndex);return _.c=S<d.length?d.substring(S,d.length):"",_.fp=g,(If.test(d)||T)&&(_.e=0),this._pt=_,_},Sc=function(a,s,c,d,u,m,g,_,S,b){Tn(d)&&(d=d(u||0,a,m));var O=a[s],k=c!=="get"?c:Tn(O)?S?a[s.indexOf("set")||!Tn(a["get"+s.substr(3)])?s:"get"+s.substr(3)](S):a[s]():O,D=Tn(O)?S?Qm:yd:Cc,F;if(Wn(d)&&(~d.indexOf("random(")&&(d=Mh(d)),d.charAt(1)==="="&&(F=Il(k,d)+(or(k)||0),(F||F===0)&&(d=F))),!b||k!==d||Ec)return!isNaN(k*d)&&d!==""?(F=new Ar(this._pt,a,s,+k||0,d-(k||0),typeof O=="boolean"?eg:_d,0,D),S&&(F.fp=S),g&&F.modifier(g,this,a),this._pt=F):(!O&&!(s in a)&&uc(s,d),Ym.call(this,a,s,k,d,D,_||Hr.stringFilter,S))},Zm=function(a,s,c,d,u){if(Tn(a)&&(a=Ah(a,u,s,c,d)),!Ho(a)||a.style&&a.nodeType||rr(a)||Rf(a))return Wn(a)?Ah(a,u,s,c,d):a;var m={},g;for(g in a)m[g]=Ah(a[g],u,s,c,d);return m},md=function(a,s,c,d,u,m){var g,_,S,b;if(Wr[a]&&(g=new Wr[a]).init(u,g.rawVars?s[a]:Zm(s[a],d,u,m,c),c,d,m)!==!1&&(c._pt=_=new Ar(c._pt,u,a,0,1,g.render,g,0,g.priority),c!==kl))for(S=c._ptLookup[c._targets.indexOf(u)],b=g._props.length;b--;)S[g._props[b]]=_;return g},Ks,Ec,bc=function x(a,s,c){var d=a.vars,u=d.ease,m=d.startAt,g=d.immediateRender,_=d.lazy,S=d.onUpdate,b=d.runBackwards,O=d.yoyoEase,k=d.keyframes,D=d.autoRevert,F=a._dur,E=a._startAt,L=a._targets,T=a.parent,M=T&&T.data==="nested"?T.vars.targets:L,R=a._overwrite==="auto"&&!ic,C=a.timeline,U,N,X,K,Z,ct,Rt,et,_t,G,Pt,Et,At;if(C&&(!k||!u)&&(u="none"),a._ease=Ua(u,Rl.ease),a._yEase=O?cd(Ua(O===!0?u:O,Rl.ease)):0,O&&a._yoyo&&!a._repeat&&(O=a._yEase,a._yEase=a._ease,a._ease=O),a._from=!C&&!!d.runBackwards,!C||k&&!d.stagger){if(et=L[0]?Ba(L[0]).harness:0,Et=et&&d[et.prop],U=mu(d,cc),E&&(E._zTime<0&&E.progress(1),s<0&&b&&g&&!D?E.render(-1,!0):E.revert(b&&F?fu:Mm),E._lazy=0),m){if(Zs(a._startAt=kn.set(L,ro({data:"isStart",overwrite:!1,parent:T,immediateRender:!0,lazy:!E&&br(_),startAt:null,delay:0,onUpdate:S&&function(){return jr(a,"onUpdate")},stagger:0},m))),a._startAt._dp=0,a._startAt._sat=a,s<0&&(nr||!g&&!D)&&a._startAt.revert(fu),g&&F&&s<=0&&c<=0){s&&(a._zTime=s);return}}else if(b&&F&&!E){if(s&&(g=!1),X=ro({overwrite:!1,data:"isFromStart",lazy:g&&!E&&br(_),immediateRender:g,stagger:0,parent:T},U),Et&&(X[et.prop]=Et),Zs(a._startAt=kn.set(L,X)),a._startAt._dp=0,a._startAt._sat=a,s<0&&(nr?a._startAt.revert(fu):a._startAt.render(-1,!0)),a._zTime=s,!g)x(a._startAt,en,en);else if(!s)return}for(a._pt=a._ptCache=0,_=F&&br(_)||_&&!F,N=0;N<L.length;N++){if(Z=L[N],Rt=Z._gsap||mc(L)[N]._gsap,a._ptLookup[N]=G={},fc[Rt.id]&&Ys.length&&pu(),Pt=M===L?N:M.indexOf(Z),et&&(_t=new et).init(Z,Et||U,a,Pt,M)!==!1&&(a._pt=K=new Ar(a._pt,Z,_t.name,0,1,_t.render,_t,0,_t.priority),_t._props.forEach(function(ce){G[ce]=K}),_t.priority&&(ct=1)),!et||Et)for(X in U)Wr[X]&&(_t=md(X,U,a,Pt,Z,M))?_t.priority&&(ct=1):G[X]=K=Sc.call(a,Z,X,"get",U[X],Pt,M,0,d.stringFilter);a._op&&a._op[N]&&a.kill(Z,a._op[N]),R&&a._pt&&(Ks=a,dn.killTweensOf(Z,G,a.globalTime(s)),At=!a.parent,Ks=0),a._pt&&_&&(fc[Rt.id]=1)}ct&&wd(a),a._onInit&&a._onInit(a)}a._onUpdate=S,a._initted=(!a._op||a._pt)&&!At,k&&s<=0&&C.render(no,!0,!0)},Jm=function(a,s,c,d,u,m,g,_){var S=(a._pt&&a._ptCache||(a._ptCache={}))[s],b,O,k,D;if(!S)for(S=a._ptCache[s]=[],k=a._ptLookup,D=a._targets.length;D--;){if(b=k[D][s],b&&b.d&&b.d._pt)for(b=b.d._pt;b&&b.p!==s&&b.fp!==s;)b=b._next;if(!b)return Ec=1,a.vars[s]="+=0",bc(a,g),Ec=0,_?yh(s+" not eligible for reset"):1;S.push(b)}for(D=S.length;D--;)O=S[D],b=O._pt||O,b.s=(d||d===0)&&!u?d:b.s+(d||0)+m*b.c,b.c=c-b.s,O.e&&(O.e=Rn(c)+or(O.e)),O.b&&(O.b=b.s+or(O.b))},$m=function(a,s){var c=a[0]?Ba(a[0]).harness:0,d=c&&c.aliases,u,m,g,_;if(!d)return s;u=Na({},s);for(m in d)if(m in u)for(_=d[m].split(","),g=_.length;g--;)u[_[g]]=u[m];return u},Km=function(a,s,c,d){var u=s.ease||d||"power1.inOut",m,g;if(rr(s))g=c[a]||(c[a]=[]),s.forEach(function(_,S){return g.push({t:S/(s.length-1)*100,v:_,e:u})});else for(m in s)g=c[m]||(c[m]=[]),m==="ease"||g.push({t:parseFloat(a),v:s[m],e:u})},Ah=function(a,s,c,d,u){return Tn(a)?a.call(s,c,d,u):Wn(a)&&~a.indexOf("random(")?Mh(a):a},gd=pc+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",vd={};Cr(gd+",id,stagger,delay,duration,paused,scrollTrigger",function(x){return vd[x]=1});var kn=function(x){Pf(a,x);function a(c,d,u,m){var g;typeof d=="number"&&(u.duration=d,d=u,u=null),g=x.call(this,m?d:xh(d))||this;var _=g.vars,S=_.duration,b=_.delay,O=_.immediateRender,k=_.stagger,D=_.overwrite,F=_.keyframes,E=_.defaults,L=_.scrollTrigger,T=_.yoyoEase,M=d.parent||dn,R=(rr(c)||Rf(c)?fs(c[0]):"length"in d)?[c]:so(c),C,U,N,X,K,Z,ct,Rt;if(g._targets=R.length?mc(R):yh("GSAP target "+c+" not found. https://gsap.com",!Hr.nullTargetWarn)||[],g._ptLookup=[],g._overwrite=D,F||k||uu(S)||uu(b)){if(d=g.vars,C=g.timeline=new gr({data:"nested",defaults:E||{},targets:M&&M.data==="nested"?M.vars.targets:R}),C.kill(),C.parent=C._dp=cs(g),C._start=0,k||uu(S)||uu(b)){if(X=R.length,ct=k&&Qf(k),Ho(k))for(K in k)~gd.indexOf(K)&&(Rt||(Rt={}),Rt[K]=k[K]);for(U=0;U<X;U++)N=mu(d,vd),N.stagger=0,T&&(N.yoyoEase=T),Rt&&Na(N,Rt),Z=R[U],N.duration=+Ah(S,cs(g),U,Z,R),N.delay=(+Ah(b,cs(g),U,Z,R)||0)-g._delay,!k&&X===1&&N.delay&&(g._delay=b=N.delay,g._start+=b,N.delay=0),C.to(Z,N,ct?ct(U,Z,R):0),C._ease=Ii.none;C.duration()?S=b=0:g.timeline=0}else if(F){xh(ro(C.vars.defaults,{ease:"none"})),C._ease=Ua(F.ease||d.ease||"none");var et=0,_t,G,Pt;if(rr(F))F.forEach(function(Et){return C.to(R,Et,">")}),C.duration();else{N={};for(K in F)K==="ease"||K==="easeEach"||Km(K,F[K],N,F.easeEach);for(K in N)for(_t=N[K].sort(function(Et,At){return Et.t-At.t}),et=0,U=0;U<_t.length;U++)G=_t[U],Pt={ease:G.e,duration:(G.t-(U?_t[U-1].t:0))/100*S},Pt[K]=G.v,C.to(R,Pt,et),et+=Pt.duration;C.duration()<S&&C.to({},{duration:S-C.duration()})}}S||g.duration(S=C.duration())}else g.timeline=0;return D===!0&&!ic&&(Ks=cs(g),dn.killTweensOf(R),Ks=0),Wo(M,cs(g),u),d.reversed&&g.reverse(),d.paused&&g.paused(!0),(O||!S&&!F&&g._start===jn(M._time)&&br(O)&&Pm(cs(g))&&M.data!=="nested")&&(g._tTime=-en,g.render(Math.max(0,-b)||0)),L&&Yf(cs(g),L),g}var s=a.prototype;return s.render=function(d,u,m){var g=this._time,_=this._tDur,S=this._dur,b=d<0,O=d>_-en&&!b?_:d<en?0:d,k,D,F,E,L,T,M,R,C;if(!S)Rm(this,d,u,m);else if(O!==this._tTime||!d||m||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==b){if(k=O,R=this.timeline,this._repeat){if(E=S+this._rDelay,this._repeat<-1&&b)return this.totalTime(E*100+d,u,m);if(k=jn(O%E),O===_?(F=this._repeat,k=S):(F=~~(O/E),F&&F===jn(O/E)&&(k=S,F--),k>S&&(k=S)),T=this._yoyo&&F&1,T&&(C=this._yEase,k=S-k),L=Dl(this._tTime,E),k===g&&!m&&this._initted&&F===L)return this._tTime=O,this;F!==L&&(R&&this._yEase&&fd(R,T),this.vars.repeatRefresh&&!T&&!this._lock&&this._time!==E&&this._initted&&(this._lock=m=1,this.render(jn(E*F),!0).invalidate()._lock=0))}if(!this._initted){if(Zf(this,b?d:k,m,u,O))return this._tTime=0,this;if(g!==this._time&&!(m&&this.vars.repeatRefresh&&F!==L))return this;if(S!==this._dur)return this.render(d,u,m)}if(this._tTime=O,this._time=k,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=M=(C||this._ease)(k/S),this._from&&(this.ratio=M=1-M),k&&!g&&!u&&!F&&(jr(this,"onStart"),this._tTime!==O))return this;for(D=this._pt;D;)D.r(M,D.d),D=D._next;R&&R.render(d<0?d:R._dur*R._ease(k/this._dur),u,m)||this._startAt&&(this._zTime=d),this._onUpdate&&!u&&(b&&gc(this,d,u,m),jr(this,"onUpdate")),this._repeat&&F!==L&&this.vars.onRepeat&&!u&&this.parent&&jr(this,"onRepeat"),(O===this._tDur||!O)&&this._tTime===O&&(b&&!this._onUpdate&&gc(this,d,!0,!0),(d||!S)&&(O===this._tDur&&this._ts>0||!O&&this._ts<0)&&Zs(this,1),!u&&!(b&&!g)&&(O||g||T)&&(jr(this,O===_?"onComplete":"onReverseComplete",!0),this._prom&&!(O<_&&this.timeScale()>0)&&this._prom()))}return this},s.targets=function(){return this._targets},s.invalidate=function(d){return(!d||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(d),x.prototype.invalidate.call(this,d)},s.resetTo=function(d,u,m,g,_){bh||Xr.wake(),this._ts||this.play();var S=Math.min(this._dur,(this._dp._time-this._start)*this._ts),b;return this._initted||bc(this,S),b=this._ease(S/this._dur),Jm(this,d,u,m,g,b,S,_)?this.resetTo(d,u,m,g,1):(_u(this,0),this.parent||jf(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},s.kill=function(d,u){if(u===void 0&&(u="all"),!d&&(!u||u==="all"))return this._lazy=this._pt=0,this.parent?Sh(this):this;if(this.timeline){var m=this.timeline.totalDuration();return this.timeline.killTweensOf(d,u,Ks&&Ks.vars.overwrite!==!0)._first||Sh(this),this.parent&&m!==this.timeline.totalDuration()&&zl(this,this._dur*this.timeline._tDur/m,0,1),this}var g=this._targets,_=d?so(d):g,S=this._ptLookup,b=this._pt,O,k,D,F,E,L,T;if((!u||u==="all")&&Cm(g,_))return u==="all"&&(this._pt=0),Sh(this);for(O=this._op=this._op||[],u!=="all"&&(Wn(u)&&(E={},Cr(u,function(M){return E[M]=1}),u=E),u=$m(g,u)),T=g.length;T--;)if(~_.indexOf(g[T])){k=S[T],u==="all"?(O[T]=u,F=k,D={}):(D=O[T]=O[T]||{},F=u);for(E in F)L=k&&k[E],L&&((!("kill"in L.d)||L.d.kill(E)===!0)&&gu(this,L,"_pt"),delete k[E]),D!=="all"&&(D[E]=1)}return this._initted&&!this._pt&&b&&Sh(this),this},a.to=function(d,u){return new a(d,u,arguments[2])},a.from=function(d,u){return wh(1,arguments)},a.delayedCall=function(d,u,m,g){return new a(u,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:d,onComplete:u,onReverseComplete:u,onCompleteParams:m,onReverseCompleteParams:m,callbackScope:g})},a.fromTo=function(d,u,m){return wh(2,arguments)},a.set=function(d,u){return u.duration=0,u.repeatDelay||(u.repeat=0),new a(d,u)},a.killTweensOf=function(d,u,m){return dn.killTweensOf(d,u,m)},a}(Ch);ro(kn.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Cr("staggerTo,staggerFrom,staggerFromTo",function(x){kn[x]=function(){var a=new gr,s=yc.call(arguments,0);return s.splice(x==="staggerFromTo"?5:4,0,0),a[x].apply(a,s)}});var Cc=function(a,s,c){return a[s]=c},yd=function(a,s,c){return a[s](c)},Qm=function(a,s,c,d){return a[s](d.fp,c)},tg=function(a,s,c){return a.setAttribute(s,c)},Ac=function(a,s){return Tn(a[s])?yd:rc(a[s])&&a.setAttribute?tg:Cc},_d=function(a,s){return s.set(s.t,s.p,Math.round((s.s+s.c*a)*1e6)/1e6,s)},eg=function(a,s){return s.set(s.t,s.p,!!(s.s+s.c*a),s)},xd=function(a,s){var c=s._pt,d="";if(!a&&s.b)d=s.b;else if(a===1&&s.e)d=s.e;else{for(;c;)d=c.p+(c.m?c.m(c.s+c.c*a):Math.round((c.s+c.c*a)*1e4)/1e4)+d,c=c._next;d+=s.c}s.set(s.t,s.p,d,s)},Pc=function(a,s){for(var c=s._pt;c;)c.r(a,c.d),c=c._next},ig=function(a,s,c,d){for(var u=this._pt,m;u;)m=u._next,u.p===d&&u.modifier(a,s,c),u=m},ng=function(a){for(var s=this._pt,c,d;s;)d=s._next,s.p===a&&!s.op||s.op===a?gu(this,s,"_pt"):s.dep||(c=1),s=d;return!c},rg=function(a,s,c,d){d.mSet(a,s,d.m.call(d.tween,c,d.mt),d)},wd=function(a){for(var s=a._pt,c,d,u,m;s;){for(c=s._next,d=u;d&&d.pr>s.pr;)d=d._next;(s._prev=d?d._prev:m)?s._prev._next=s:u=s,(s._next=d)?d._prev=s:m=s,s=c}a._pt=u},Ar=function(){function x(s,c,d,u,m,g,_,S,b){this.t=c,this.s=u,this.c=m,this.p=d,this.r=g||_d,this.d=_||this,this.set=S||Cc,this.pr=b||0,this._next=s,s&&(s._prev=this)}var a=x.prototype;return a.modifier=function(c,d,u){this.mSet=this.mSet||this.set,this.set=rg,this.m=c,this.mt=u,this.tween=d},x}();Cr(pc+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(x){return cc[x]=1}),Vr.TweenMax=Vr.TweenLite=kn,Vr.TimelineLite=Vr.TimelineMax=gr,dn=new gr({sortChildren:!1,defaults:Rl,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Hr.stringFilter=ud;var Ha=[],xu={},og=[],Td=0,sg=0,Lc=function(a){return(xu[a]||og).map(function(s){return s()})},Rc=function(){var a=Date.now(),s=[];a-Td>2&&(Lc("matchMediaInit"),Ha.forEach(function(c){var d=c.queries,u=c.conditions,m,g,_,S;for(g in d)m=Vo.matchMedia(d[g]).matches,m&&(_=1),m!==u[g]&&(u[g]=m,S=1);S&&(c.revert(),_&&s.push(c))}),Lc("matchMediaRevert"),s.forEach(function(c){return c.onMatch(c,function(d){return c.add(null,d)})}),Td=a,Lc("matchMedia"))},Md=function(){function x(s,c){this.selector=c&&_c(c),this.data=[],this._r=[],this.isReverted=!1,this.id=sg++,s&&this.add(s)}var a=x.prototype;return a.add=function(c,d,u){Tn(c)&&(u=d,d=c,c=Tn);var m=this,g=function(){var S=hn,b=m.selector,O;return S&&S!==m&&S.data.push(m),u&&(m.selector=_c(u)),hn=m,O=d.apply(m,arguments),Tn(O)&&m._r.push(O),hn=S,m.selector=b,m.isReverted=!1,O};return m.last=g,c===Tn?g(m,function(_){return m.add(null,_)}):c?m[c]=g:g},a.ignore=function(c){var d=hn;hn=null,c(this),hn=d},a.getTweens=function(){var c=[];return this.data.forEach(function(d){return d instanceof x?c.push.apply(c,d.getTweens()):d instanceof kn&&!(d.parent&&d.parent.data==="nested")&&c.push(d)}),c},a.clear=function(){this._r.length=this.data.length=0},a.kill=function(c,d){var u=this;if(c?function(){for(var g=u.getTweens(),_=u.data.length,S;_--;)S=u.data[_],S.data==="isFlip"&&(S.revert(),S.getChildren(!0,!0,!1).forEach(function(b){return g.splice(g.indexOf(b),1)}));for(g.map(function(b){return{g:b._dur||b._delay||b._sat&&!b._sat.vars.immediateRender?b.globalTime(0):-1/0,t:b}}).sort(function(b,O){return O.g-b.g||-1/0}).forEach(function(b){return b.t.revert(c)}),_=u.data.length;_--;)S=u.data[_],S instanceof gr?S.data!=="nested"&&(S.scrollTrigger&&S.scrollTrigger.revert(),S.kill()):!(S instanceof kn)&&S.revert&&S.revert(c);u._r.forEach(function(b){return b(c,u)}),u.isReverted=!0}():this.data.forEach(function(g){return g.kill&&g.kill()}),this.clear(),d)for(var m=Ha.length;m--;)Ha[m].id===this.id&&Ha.splice(m,1)},a.revert=function(c){this.kill(c||{})},x}(),ag=function(){function x(s){this.contexts=[],this.scope=s,hn&&hn.data.push(this)}var a=x.prototype;return a.add=function(c,d,u){Ho(c)||(c={matches:c});var m=new Md(0,u||this.scope),g=m.conditions={},_,S,b;hn&&!m.selector&&(m.selector=hn.selector),this.contexts.push(m),d=m.add("onMatch",d),m.queries=c;for(S in c)S==="all"?b=1:(_=Vo.matchMedia(c[S]),_&&(Ha.indexOf(m)<0&&Ha.push(m),(g[S]=_.matches)&&(b=1),_.addListener?_.addListener(Rc):_.addEventListener("change",Rc)));return b&&d(m,function(O){return m.add(null,O)}),this},a.revert=function(c){this.kill(c||{})},a.kill=function(c){this.contexts.forEach(function(d){return d.kill(c,!0)})},x}(),wu={registerPlugin:function(){for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];s.forEach(function(d){return sd(d)})},timeline:function(a){return new gr(a)},getTweensOf:function(a,s){return dn.getTweensOf(a,s)},getProperty:function(a,s,c,d){Wn(a)&&(a=so(a)[0]);var u=Ba(a||{}).get,m=c?Vf:Hf;return c==="native"&&(c=""),a&&(s?m((Wr[s]&&Wr[s].get||u)(a,s,c,d)):function(g,_,S){return m((Wr[g]&&Wr[g].get||u)(a,g,_,S))})},quickSetter:function(a,s,c){if(a=so(a),a.length>1){var d=a.map(function(b){return Pr.quickSetter(b,s,c)}),u=d.length;return function(b){for(var O=u;O--;)d[O](b)}}a=a[0]||{};var m=Wr[s],g=Ba(a),_=g.harness&&(g.harness.aliases||{})[s]||s,S=m?function(b){var O=new m;kl._pt=0,O.init(a,c?b+c:b,kl,0,[a]),O.render(1,O),kl._pt&&Pc(1,kl)}:g.set(a,_);return m?S:function(b){return S(a,_,c?b+c:b,g,1)}},quickTo:function(a,s,c){var d,u=Pr.to(a,Na((d={},d[s]="+=0.1",d.paused=!0,d),c||{})),m=function(_,S,b){return u.resetTo(s,_,S,b)};return m.tween=u,m},isTweening:function(a){return dn.getTweensOf(a,!0).length>0},defaults:function(a){return a&&a.ease&&(a.ease=Ua(a.ease,Rl.ease)),Wf(Rl,a||{})},config:function(a){return Wf(Hr,a||{})},registerEffect:function(a){var s=a.name,c=a.effect,d=a.plugins,u=a.defaults,m=a.extendTimeline;(d||"").split(",").forEach(function(g){return g&&!Wr[g]&&!Vr[g]&&yh(s+" effect requires "+g+" plugin.")}),dc[s]=function(g,_,S){return c(so(g),ro(_||{},u),S)},m&&(gr.prototype[s]=function(g,_,S){return this.add(dc[s](g,Ho(_)?_:(S=_)&&{},this),S)})},registerEase:function(a,s){Ii[a]=Ua(s)},parseEase:function(a,s){return arguments.length?Ua(a,s):Ii},getById:function(a){return dn.getById(a)},exportRoot:function(a,s){a===void 0&&(a={});var c=new gr(a),d,u;for(c.smoothChildTiming=br(a.smoothChildTiming),dn.remove(c),c._dp=0,c._time=c._tTime=dn._time,d=dn._first;d;)u=d._next,(s||!(!d._dur&&d instanceof kn&&d.vars.onComplete===d._targets[0]))&&Wo(c,d,d._start-d._delay),d=u;return Wo(dn,c,0),c},context:function(a,s){return a?new Md(a,s):hn},matchMedia:function(a){return new ag(a)},matchMediaRefresh:function(){return Ha.forEach(function(a){var s=a.conditions,c,d;for(d in s)s[d]&&(s[d]=!1,c=1);c&&a.revert()})||Rc()},addEventListener:function(a,s){var c=xu[a]||(xu[a]=[]);~c.indexOf(s)||c.push(s)},removeEventListener:function(a,s){var c=xu[a],d=c&&c.indexOf(s);d>=0&&c.splice(d,1)},utils:{wrap:Fm,wrapYoyo:Um,distribute:Qf,random:ed,snap:td,normalize:Nm,getUnit:or,clamp:Dm,splitColor:ad,toArray:so,selector:_c,mapRange:nd,pipe:km,unitize:Bm,interpolate:Gm,shuffle:Kf},install:kf,effects:dc,ticker:Xr,updateRoot:gr.updateRoot,plugins:Wr,globalTimeline:dn,core:{PropTween:Ar,globals:Bf,Tween:kn,Timeline:gr,Animation:Ch,getCache:Ba,_removeLinkedListItem:gu,reverting:function(){return nr},context:function(a){return a&&hn&&(hn.data.push(a),a._ctx=hn),hn},suppressOverwrites:function(a){return ic=a}}};Cr("to,from,fromTo,delayedCall,set,killTweensOf",function(x){return wu[x]=kn[x]}),Xr.add(gr.updateRoot),kl=wu.to({},{duration:0});var lg=function(a,s){for(var c=a._pt;c&&c.p!==s&&c.op!==s&&c.fp!==s;)c=c._next;return c},hg=function(a,s){var c=a._targets,d,u,m;for(d in s)for(u=c.length;u--;)m=a._ptLookup[u][d],m&&(m=m.d)&&(m._pt&&(m=lg(m,d)),m&&m.modifier&&m.modifier(s[d],a,c[u],d))},Oc=function(a,s){return{name:a,rawVars:1,init:function(d,u,m){m._onInit=function(g){var _,S;if(Wn(u)&&(_={},Cr(u,function(b){return _[b]=1}),u=_),s){_={};for(S in u)_[S]=s(u[S]);u=_}hg(g,u)}}}},Pr=wu.registerPlugin({name:"attr",init:function(a,s,c,d,u){var m,g,_;this.tween=c;for(m in s)_=a.getAttribute(m)||"",g=this.add(a,"setAttribute",(_||0)+"",s[m],d,u,0,0,m),g.op=m,g.b=_,this._props.push(m)},render:function(a,s){for(var c=s._pt;c;)nr?c.set(c.t,c.p,c.b,c):c.r(a,c.d),c=c._next}},{name:"endArray",init:function(a,s){for(var c=s.length;c--;)this.add(a,c,a[c]||0,s[c],0,0,0,0,0,1)}},Oc("roundProps",xc),Oc("modifiers"),Oc("snap",td))||wu;kn.version=gr.version=Pr.version="3.12.5",zf=1,oc()&&Bl(),Ii.Power0,Ii.Power1,Ii.Power2,Ii.Power3,Ii.Power4,Ii.Linear,Ii.Quad,Ii.Cubic,Ii.Quart,Ii.Quint,Ii.Strong,Ii.Elastic,Ii.Back,Ii.SteppedEase,Ii.Bounce,Ii.Sine,Ii.Expo,Ii.Circ;/*!
2694
+ */var Hr={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Rl={duration:.5,overwrite:!1,delay:0},ic,nr,hn,no=1e8,en=1/no,nc=Math.PI*2,ym=nc/4,_m=0,Lf=Math.sqrt,xm=Math.cos,wm=Math.sin,Wn=function(a){return typeof a=="string"},Tn=function(a){return typeof a=="function"},fs=function(a){return typeof a=="number"},rc=function(a){return typeof a>"u"},Ho=function(a){return typeof a=="object"},br=function(a){return a!==!1},oc=function(){return typeof window<"u"},uu=function(a){return Tn(a)||Wn(a)},Rf=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},rr=Array.isArray,sc=/(?:-?\.?\d|\.)+/gi,Of=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Ol=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,ac=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,If=/[+-]=-?[.\d]+/,Df=/[^,'"\[\]\s]+/gi,Tm=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,dn,Vo,lc,hc,Vr={},cu={},zf,kf=function(a){return(cu=Fa(a,Vr))&&Pr},uc=function(a,s){return console.warn("Invalid property",a,"set to",s,"Missing plugin? gsap.registerPlugin()")},yh=function(a,s){return!s&&console.warn(a)},Bf=function(a,s){return a&&(Vr[a]=s)&&cu&&(cu[a]=s)||Vr},_h=function(){return 0},Mm={suppressEvents:!0,isStart:!0,kill:!1},fu={suppressEvents:!0,kill:!1},Sm={suppressEvents:!0},cc={},Ys=[],fc={},Nf,Wr={},dc={},Ff=30,du=[],pc="",mc=function(a){var s=a[0],c,d;if(Ho(s)||Tn(s)||(a=[a]),!(c=(s._gsap||{}).harness)){for(d=du.length;d--&&!du[d].targetTest(s););c=du[d]}for(d=a.length;d--;)a[d]&&(a[d]._gsap||(a[d]._gsap=new pd(a[d],c)))||a.splice(d,1);return a},Na=function(a){return a._gsap||mc(so(a))[0]._gsap},Uf=function(a,s,c){return(c=a[s])&&Tn(c)?a[s]():rc(c)&&a.getAttribute&&a.getAttribute(s)||c},Cr=function(a,s){return(a=a.split(",")).forEach(s)||a},Rn=function(a){return Math.round(a*1e5)/1e5||0},jn=function(a){return Math.round(a*1e7)/1e7||0},Il=function(a,s){var c=s.charAt(0),d=parseFloat(s.substr(2));return a=parseFloat(a),c==="+"?a+d:c==="-"?a-d:c==="*"?a*d:a/d},Em=function(a,s){for(var c=s.length,d=0;a.indexOf(s[d])<0&&++d<c;);return d<c},pu=function(){var a=Ys.length,s=Ys.slice(0),c,d;for(fc={},Ys.length=0,c=0;c<a;c++)d=s[c],d&&d._lazy&&(d.render(d._lazy[0],d._lazy[1],!0)._lazy=0)},Gf=function(a,s,c,d){Ys.length&&!nr&&pu(),a.render(s,c,d||nr&&s<0&&(a._initted||a._startAt)),Ys.length&&!nr&&pu()},Hf=function(a){var s=parseFloat(a);return(s||s===0)&&(a+"").match(Df).length<2?s:Wn(a)?a.trim():a},Vf=function(a){return a},ro=function(a,s){for(var c in s)c in a||(a[c]=s[c]);return a},bm=function(a){return function(s,c){for(var d in c)d in s||d==="duration"&&a||d==="ease"||(s[d]=c[d])}},Fa=function(a,s){for(var c in s)a[c]=s[c];return a},Wf=function x(a,s){for(var c in s)c!=="__proto__"&&c!=="constructor"&&c!=="prototype"&&(a[c]=Ho(s[c])?x(a[c]||(a[c]={}),s[c]):s[c]);return a},mu=function(a,s){var c={},d;for(d in a)d in s||(c[d]=a[d]);return c},xh=function(a){var s=a.parent||dn,c=a.keyframes?bm(rr(a.keyframes)):ro;if(br(a.inherit))for(;s;)c(a,s.vars.defaults),s=s.parent||s._dp;return a},Cm=function(a,s){for(var c=a.length,d=c===s.length;d&&c--&&a[c]===s[c];);return c<0},jf=function(a,s,c,d,u){c===void 0&&(c="_first"),d===void 0&&(d="_last");var m=a[d],g;if(u)for(g=s[u];m&&m[u]>g;)m=m._prev;return m?(s._next=m._next,m._next=s):(s._next=a[c],a[c]=s),s._next?s._next._prev=s:a[d]=s,s._prev=m,s.parent=s._dp=a,s},gu=function(a,s,c,d){c===void 0&&(c="_first"),d===void 0&&(d="_last");var u=s._prev,m=s._next;u?u._next=m:a[c]===s&&(a[c]=m),m?m._prev=u:a[d]===s&&(a[d]=u),s._next=s._prev=s.parent=null},Zs=function(a,s){a.parent&&(!s||a.parent.autoRemoveChildren)&&a.parent.remove&&a.parent.remove(a),a._act=0},Ua=function(a,s){if(a&&(!s||s._end>a._dur||s._start<0))for(var c=a;c;)c._dirty=1,c=c.parent;return a},Am=function(a){for(var s=a.parent;s&&s.parent;)s._dirty=1,s.totalDuration(),s=s.parent;return a},gc=function(a,s,c,d){return a._startAt&&(nr?a._startAt.revert(fu):a.vars.immediateRender&&!a.vars.autoRevert||a._startAt.render(s,!0,d))},Pm=function x(a){return!a||a._ts&&x(a.parent)},Xf=function(a){return a._repeat?Dl(a._tTime,a=a.duration()+a._rDelay)*a:0},Dl=function(a,s){var c=Math.floor(a/=s);return a&&c===a?c-1:c},vu=function(a,s){return(a-s._start)*s._ts+(s._ts>=0?0:s._dirty?s.totalDuration():s._tDur)},yu=function(a){return a._end=jn(a._start+(a._tDur/Math.abs(a._ts||a._rts||en)||0))},_u=function(a,s){var c=a._dp;return c&&c.smoothChildTiming&&a._ts&&(a._start=jn(c._time-(a._ts>0?s/a._ts:((a._dirty?a.totalDuration():a._tDur)-s)/-a._ts)),yu(a),c._dirty||Ua(c,a)),a},qf=function(a,s){var c;if((s._time||!s._dur&&s._initted||s._start<a._time&&(s._dur||!s.add))&&(c=vu(a.rawTime(),s),(!s._dur||Th(0,s.totalDuration(),c)-s._tTime>en)&&s.render(c,!0)),Ua(a,s)._dp&&a._initted&&a._time>=a._dur&&a._ts){if(a._dur<a.duration())for(c=a;c._dp;)c.rawTime()>=0&&c.totalTime(c._tTime),c=c._dp;a._zTime=-en}},Wo=function(a,s,c,d){return s.parent&&Zs(s),s._start=jn((fs(c)?c:c||a!==dn?oo(a,c,s):a._time)+s._delay),s._end=jn(s._start+(s.totalDuration()/Math.abs(s.timeScale())||0)),jf(a,s,"_first","_last",a._sort?"_start":0),vc(s)||(a._recent=s),d||qf(a,s),a._ts<0&&_u(a,a._tTime),a},Yf=function(a,s){return(Vr.ScrollTrigger||uc("scrollTrigger",s))&&Vr.ScrollTrigger.create(s,a)},Zf=function(a,s,c,d,u){if(bc(a,s,u),!a._initted)return 1;if(!c&&a._pt&&!nr&&(a._dur&&a.vars.lazy!==!1||!a._dur&&a.vars.lazy)&&Nf!==Xr.frame)return Ys.push(a),a._lazy=[u,d],1},Lm=function x(a){var s=a.parent;return s&&s._ts&&s._initted&&!s._lock&&(s.rawTime()<0||x(s))},vc=function(a){var s=a.data;return s==="isFromStart"||s==="isStart"},Rm=function(a,s,c,d){var u=a.ratio,m=s<0||!s&&(!a._start&&Lm(a)&&!(!a._initted&&vc(a))||(a._ts<0||a._dp._ts<0)&&!vc(a))?0:1,g=a._rDelay,_=0,S,b,I;if(g&&a._repeat&&(_=Th(0,a._tDur,s),b=Dl(_,g),a._yoyo&&b&1&&(m=1-m),b!==Dl(a._tTime,g)&&(u=1-m,a.vars.repeatRefresh&&a._initted&&a.invalidate())),m!==u||nr||d||a._zTime===en||!s&&a._zTime){if(!a._initted&&Zf(a,s,d,c,_))return;for(I=a._zTime,a._zTime=s||(c?en:0),c||(c=s&&!I),a.ratio=m,a._from&&(m=1-m),a._time=0,a._tTime=_,S=a._pt;S;)S.r(m,S.d),S=S._next;s<0&&gc(a,s,c,!0),a._onUpdate&&!c&&jr(a,"onUpdate"),_&&a._repeat&&!c&&a.parent&&jr(a,"onRepeat"),(s>=a._tDur||s<0)&&a.ratio===m&&(m&&Zs(a,1),!c&&!nr&&(jr(a,m?"onComplete":"onReverseComplete",!0),a._prom&&a._prom()))}else a._zTime||(a._zTime=s)},Om=function(a,s,c){var d;if(c>s)for(d=a._first;d&&d._start<=c;){if(d.data==="isPause"&&d._start>s)return d;d=d._next}else for(d=a._last;d&&d._start>=c;){if(d.data==="isPause"&&d._start<s)return d;d=d._prev}},zl=function(a,s,c,d){var u=a._repeat,m=jn(s)||0,g=a._tTime/a._tDur;return g&&!d&&(a._time*=m/a._dur),a._dur=m,a._tDur=u?u<0?1e10:jn(m*(u+1)+a._rDelay*u):m,g>0&&!d&&_u(a,a._tTime=a._tDur*g),a.parent&&yu(a),c||Ua(a.parent,a),a},Jf=function(a){return a instanceof gr?Ua(a):zl(a,a._dur)},Im={_start:0,endTime:_h,totalDuration:_h},oo=function x(a,s,c){var d=a.labels,u=a._recent||Im,m=a.duration()>=no?u.endTime(!1):a._dur,g,_,S;return Wn(s)&&(isNaN(s)||s in d)?(_=s.charAt(0),S=s.substr(-1)==="%",g=s.indexOf("="),_==="<"||_===">"?(g>=0&&(s=s.replace(/=/,"")),(_==="<"?u._start:u.endTime(u._repeat>=0))+(parseFloat(s.substr(1))||0)*(S?(g<0?u:c).totalDuration()/100:1)):g<0?(s in d||(d[s]=m),d[s]):(_=parseFloat(s.charAt(g-1)+s.substr(g+1)),S&&c&&(_=_/100*(rr(c)?c[0]:c).totalDuration()),g>1?x(a,s.substr(0,g-1),c)+_:m+_)):s==null?m:+s},wh=function(a,s,c){var d=fs(s[1]),u=(d?2:1)+(a<2?0:1),m=s[u],g,_;if(d&&(m.duration=s[1]),m.parent=c,a){for(g=m,_=c;_&&!("immediateRender"in g);)g=_.vars.defaults||{},_=br(_.vars.inherit)&&_.parent;m.immediateRender=br(g.immediateRender),a<2?m.runBackwards=1:m.startAt=s[u-1]}return new kn(s[0],m,s[u+1])},Js=function(a,s){return a||a===0?s(a):s},Th=function(a,s,c){return c<a?a:c>s?s:c},or=function(a,s){return!Wn(a)||!(s=Tm.exec(a))?"":s[1]},Dm=function(a,s,c){return Js(c,function(d){return Th(a,s,d)})},yc=[].slice,$f=function(a,s){return a&&Ho(a)&&"length"in a&&(!s&&!a.length||a.length-1 in a&&Ho(a[0]))&&!a.nodeType&&a!==Vo},zm=function(a,s,c){return c===void 0&&(c=[]),a.forEach(function(d){var u;return Wn(d)&&!s||$f(d,1)?(u=c).push.apply(u,so(d)):c.push(d)})||c},so=function(a,s,c){return hn&&!s&&hn.selector?hn.selector(a):Wn(a)&&!c&&(lc||!Bl())?yc.call((s||hc).querySelectorAll(a),0):rr(a)?zm(a,c):$f(a)?yc.call(a,0):a?[a]:[]},_c=function(a){return a=so(a)[0]||yh("Invalid scope")||{},function(s){var c=a.current||a.nativeElement||a;return so(s,c.querySelectorAll?c:c===a?yh("Invalid scope")||hc.createElement("div"):a)}},Kf=function(a){return a.sort(function(){return .5-Math.random()})},Qf=function(a){if(Tn(a))return a;var s=Ho(a)?a:{each:a},c=Ga(s.ease),d=s.from||0,u=parseFloat(s.base)||0,m={},g=d>0&&d<1,_=isNaN(d)||g,S=s.axis,b=d,I=d;return Wn(d)?b=I={center:.5,edges:.5,end:1}[d]||0:!g&&_&&(b=d[0],I=d[1]),function(k,D,F){var E=(F||s).length,L=m[E],T,M,R,C,U,N,X,K,Z;if(!L){if(Z=s.grid==="auto"?0:(s.grid||[1,no])[1],!Z){for(X=-no;X<(X=F[Z++].getBoundingClientRect().left)&&Z<E;);Z<E&&Z--}for(L=m[E]=[],T=_?Math.min(Z,E)*b-.5:d%Z,M=Z===no?0:_?E*I/Z-.5:d/Z|0,X=0,K=no,N=0;N<E;N++)R=N%Z-T,C=M-(N/Z|0),L[N]=U=S?Math.abs(S==="y"?C:R):Lf(R*R+C*C),U>X&&(X=U),U<K&&(K=U);d==="random"&&Kf(L),L.max=X-K,L.min=K,L.v=E=(parseFloat(s.amount)||parseFloat(s.each)*(Z>E?E-1:S?S==="y"?E/Z:Z:Math.max(Z,E/Z))||0)*(d==="edges"?-1:1),L.b=E<0?u-E:u,L.u=or(s.amount||s.each)||0,c=c&&E<0?cd(c):c}return E=(L[k]-L.min)/L.max||0,jn(L.b+(c?c(E):E)*L.v)+L.u}},xc=function(a){var s=Math.pow(10,((a+"").split(".")[1]||"").length);return function(c){var d=jn(Math.round(parseFloat(c)/a)*a*s);return(d-d%1)/s+(fs(c)?0:or(c))}},td=function(a,s){var c=rr(a),d,u;return!c&&Ho(a)&&(d=c=a.radius||no,a.values?(a=so(a.values),(u=!fs(a[0]))&&(d*=d)):a=xc(a.increment)),Js(s,c?Tn(a)?function(m){return u=a(m),Math.abs(u-m)<=d?u:m}:function(m){for(var g=parseFloat(u?m.x:m),_=parseFloat(u?m.y:0),S=no,b=0,I=a.length,k,D;I--;)u?(k=a[I].x-g,D=a[I].y-_,k=k*k+D*D):k=Math.abs(a[I]-g),k<S&&(S=k,b=I);return b=!d||S<=d?a[b]:m,u||b===m||fs(m)?b:b+or(m)}:xc(a))},ed=function(a,s,c,d){return Js(rr(a)?!s:c===!0?!!(c=0):!d,function(){return rr(a)?a[~~(Math.random()*a.length)]:(c=c||1e-5)&&(d=c<1?Math.pow(10,(c+"").length-2):1)&&Math.floor(Math.round((a-c/2+Math.random()*(s-a+c*.99))/c)*c*d)/d})},km=function(){for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return function(d){return s.reduce(function(u,m){return m(u)},d)}},Bm=function(a,s){return function(c){return a(parseFloat(c))+(s||or(c))}},Nm=function(a,s,c){return nd(a,s,0,1,c)},id=function(a,s,c){return Js(c,function(d){return a[~~s(d)]})},Fm=function x(a,s,c){var d=s-a;return rr(a)?id(a,x(0,a.length),s):Js(c,function(u){return(d+(u-a)%d)%d+a})},Um=function x(a,s,c){var d=s-a,u=d*2;return rr(a)?id(a,x(0,a.length-1),s):Js(c,function(m){return m=(u+(m-a)%u)%u||0,a+(m>d?u-m:m)})},Mh=function(a){for(var s=0,c="",d,u,m,g;~(d=a.indexOf("random(",s));)m=a.indexOf(")",d),g=a.charAt(d+7)==="[",u=a.substr(d+7,m-d-7).match(g?Df:sc),c+=a.substr(s,d-s)+ed(g?u:+u[0],g?0:+u[1],+u[2]||1e-5),s=m+1;return c+a.substr(s,a.length-s)},nd=function(a,s,c,d,u){var m=s-a,g=d-c;return Js(u,function(_){return c+((_-a)/m*g||0)})},Gm=function x(a,s,c,d){var u=isNaN(a+s)?0:function(D){return(1-D)*a+D*s};if(!u){var m=Wn(a),g={},_,S,b,I,k;if(c===!0&&(d=1)&&(c=null),m)a={p:a},s={p:s};else if(rr(a)&&!rr(s)){for(b=[],I=a.length,k=I-2,S=1;S<I;S++)b.push(x(a[S-1],a[S]));I--,u=function(F){F*=I;var E=Math.min(k,~~F);return b[E](F-E)},c=s}else d||(a=Fa(rr(a)?[]:{},a));if(!b){for(_ in s)Sc.call(g,a,_,"get",s[_]);u=function(F){return Pc(F,g)||(m?a.p:a)}}}return Js(c,u)},rd=function(a,s,c){var d=a.labels,u=no,m,g,_;for(m in d)g=d[m]-s,g<0==!!c&&g&&u>(g=Math.abs(g))&&(_=m,u=g);return _},jr=function(a,s,c){var d=a.vars,u=d[s],m=hn,g=a._ctx,_,S,b;if(u)return _=d[s+"Params"],S=d.callbackScope||a,c&&Ys.length&&pu(),g&&(hn=g),b=_?u.apply(S,_):u.call(S),hn=m,b},Sh=function(a){return Zs(a),a.scrollTrigger&&a.scrollTrigger.kill(!!nr),a.progress()<1&&jr(a,"onInterrupt"),a},kl,od=[],sd=function(a){if(a)if(a=!a.name&&a.default||a,oc()||a.headless){var s=a.name,c=Tn(a),d=s&&!c&&a.init?function(){this._props=[]}:a,u={init:_h,render:Pc,add:Sc,kill:ng,modifier:ig,rawVars:0},m={targetTest:0,get:0,getSetter:Ac,aliases:{},register:0};if(Bl(),a!==d){if(Wr[s])return;ro(d,ro(mu(a,u),m)),Fa(d.prototype,Fa(u,mu(a,m))),Wr[d.prop=s]=d,a.targetTest&&(du.push(d),cc[s]=1),s=(s==="css"?"CSS":s.charAt(0).toUpperCase()+s.substr(1))+"Plugin"}Bf(s,d),a.register&&a.register(Pr,d,Ar)}else od.push(a)},Ki=255,Eh={aqua:[0,Ki,Ki],lime:[0,Ki,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Ki],navy:[0,0,128],white:[Ki,Ki,Ki],olive:[128,128,0],yellow:[Ki,Ki,0],orange:[Ki,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Ki,0,0],pink:[Ki,192,203],cyan:[0,Ki,Ki],transparent:[Ki,Ki,Ki,0]},wc=function(a,s,c){return a+=a<0?1:a>1?-1:0,(a*6<1?s+(c-s)*a*6:a<.5?c:a*3<2?s+(c-s)*(2/3-a)*6:s)*Ki+.5|0},ad=function(a,s,c){var d=a?fs(a)?[a>>16,a>>8&Ki,a&Ki]:0:Eh.black,u,m,g,_,S,b,I,k,D,F;if(!d){if(a.substr(-1)===","&&(a=a.substr(0,a.length-1)),Eh[a])d=Eh[a];else if(a.charAt(0)==="#"){if(a.length<6&&(u=a.charAt(1),m=a.charAt(2),g=a.charAt(3),a="#"+u+u+m+m+g+g+(a.length===5?a.charAt(4)+a.charAt(4):"")),a.length===9)return d=parseInt(a.substr(1,6),16),[d>>16,d>>8&Ki,d&Ki,parseInt(a.substr(7),16)/255];a=parseInt(a.substr(1),16),d=[a>>16,a>>8&Ki,a&Ki]}else if(a.substr(0,3)==="hsl"){if(d=F=a.match(sc),!s)_=+d[0]%360/360,S=+d[1]/100,b=+d[2]/100,m=b<=.5?b*(S+1):b+S-b*S,u=b*2-m,d.length>3&&(d[3]*=1),d[0]=wc(_+1/3,u,m),d[1]=wc(_,u,m),d[2]=wc(_-1/3,u,m);else if(~a.indexOf("="))return d=a.match(Of),c&&d.length<4&&(d[3]=1),d}else d=a.match(sc)||Eh.transparent;d=d.map(Number)}return s&&!F&&(u=d[0]/Ki,m=d[1]/Ki,g=d[2]/Ki,I=Math.max(u,m,g),k=Math.min(u,m,g),b=(I+k)/2,I===k?_=S=0:(D=I-k,S=b>.5?D/(2-I-k):D/(I+k),_=I===u?(m-g)/D+(m<g?6:0):I===m?(g-u)/D+2:(u-m)/D+4,_*=60),d[0]=~~(_+.5),d[1]=~~(S*100+.5),d[2]=~~(b*100+.5)),c&&d.length<4&&(d[3]=1),d},ld=function(a){var s=[],c=[],d=-1;return a.split($s).forEach(function(u){var m=u.match(Ol)||[];s.push.apply(s,m),c.push(d+=m.length+1)}),s.c=c,s},hd=function(a,s,c){var d="",u=(a+d).match($s),m=s?"hsla(":"rgba(",g=0,_,S,b,I;if(!u)return a;if(u=u.map(function(k){return(k=ad(k,s,1))&&m+(s?k[0]+","+k[1]+"%,"+k[2]+"%,"+k[3]:k.join(","))+")"}),c&&(b=ld(a),_=c.c,_.join(d)!==b.c.join(d)))for(S=a.replace($s,"1").split(Ol),I=S.length-1;g<I;g++)d+=S[g]+(~_.indexOf(g)?u.shift()||m+"0,0,0,0)":(b.length?b:u.length?u:c).shift());if(!S)for(S=a.split($s),I=S.length-1;g<I;g++)d+=S[g]+u[g];return d+S[I]},$s=function(){var x="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",a;for(a in Eh)x+="|"+a+"\\b";return new RegExp(x+")","gi")}(),Hm=/hsl[a]?\(/,ud=function(a){var s=a.join(" "),c;if($s.lastIndex=0,$s.test(s))return c=Hm.test(s),a[1]=hd(a[1],c),a[0]=hd(a[0],c,ld(a[1])),!0},bh,Xr=function(){var x=Date.now,a=500,s=33,c=x(),d=c,u=1e3/240,m=u,g=[],_,S,b,I,k,D,F=function E(L){var T=x()-d,M=L===!0,R,C,U,N;if((T>a||T<0)&&(c+=T-s),d+=T,U=d-c,R=U-m,(R>0||M)&&(N=++I.frame,k=U-I.time*1e3,I.time=U=U/1e3,m+=R+(R>=u?4:u-R),C=1),M||(_=S(E)),C)for(D=0;D<g.length;D++)g[D](U,k,N,L)};return I={time:0,frame:0,tick:function(){F(!0)},deltaRatio:function(L){return k/(1e3/(L||60))},wake:function(){zf&&(!lc&&oc()&&(Vo=lc=window,hc=Vo.document||{},Vr.gsap=Pr,(Vo.gsapVersions||(Vo.gsapVersions=[])).push(Pr.version),kf(cu||Vo.GreenSockGlobals||!Vo.gsap&&Vo||{}),od.forEach(sd)),b=typeof requestAnimationFrame<"u"&&requestAnimationFrame,_&&I.sleep(),S=b||function(L){return setTimeout(L,m-I.time*1e3+1|0)},bh=1,F(2))},sleep:function(){(b?cancelAnimationFrame:clearTimeout)(_),bh=0,S=_h},lagSmoothing:function(L,T){a=L||1/0,s=Math.min(T||33,a)},fps:function(L){u=1e3/(L||240),m=I.time*1e3+u},add:function(L,T,M){var R=T?function(C,U,N,X){L(C,U,N,X),I.remove(R)}:L;return I.remove(L),g[M?"unshift":"push"](R),Bl(),R},remove:function(L,T){~(T=g.indexOf(L))&&g.splice(T,1)&&D>=T&&D--},_listeners:g},I}(),Bl=function(){return!bh&&Xr.wake()},Ii={},Vm=/^[\d.\-M][\d.\-,\s]/,Wm=/["']/g,jm=function(a){for(var s={},c=a.substr(1,a.length-3).split(":"),d=c[0],u=1,m=c.length,g,_,S;u<m;u++)_=c[u],g=u!==m-1?_.lastIndexOf(","):_.length,S=_.substr(0,g),s[d]=isNaN(S)?S.replace(Wm,"").trim():+S,d=_.substr(g+1).trim();return s},Xm=function(a){var s=a.indexOf("(")+1,c=a.indexOf(")"),d=a.indexOf("(",s);return a.substring(s,~d&&d<c?a.indexOf(")",c+1):c)},qm=function(a){var s=(a+"").split("("),c=Ii[s[0]];return c&&s.length>1&&c.config?c.config.apply(null,~a.indexOf("{")?[jm(s[1])]:Xm(a).split(",").map(Hf)):Ii._CE&&Vm.test(a)?Ii._CE("",a):c},cd=function(a){return function(s){return 1-a(1-s)}},fd=function x(a,s){for(var c=a._first,d;c;)c instanceof gr?x(c,s):c.vars.yoyoEase&&(!c._yoyo||!c._repeat)&&c._yoyo!==s&&(c.timeline?x(c.timeline,s):(d=c._ease,c._ease=c._yEase,c._yEase=d,c._yoyo=s)),c=c._next},Ga=function(a,s){return a&&(Tn(a)?a:Ii[a]||qm(a))||s},Ha=function(a,s,c,d){c===void 0&&(c=function(_){return 1-s(1-_)}),d===void 0&&(d=function(_){return _<.5?s(_*2)/2:1-s((1-_)*2)/2});var u={easeIn:s,easeOut:c,easeInOut:d},m;return Cr(a,function(g){Ii[g]=Vr[g]=u,Ii[m=g.toLowerCase()]=c;for(var _ in u)Ii[m+(_==="easeIn"?".in":_==="easeOut"?".out":".inOut")]=Ii[g+"."+_]=u[_]}),u},dd=function(a){return function(s){return s<.5?(1-a(1-s*2))/2:.5+a((s-.5)*2)/2}},Tc=function x(a,s,c){var d=s>=1?s:1,u=(c||(a?.3:.45))/(s<1?s:1),m=u/nc*(Math.asin(1/d)||0),g=function(b){return b===1?1:d*Math.pow(2,-10*b)*wm((b-m)*u)+1},_=a==="out"?g:a==="in"?function(S){return 1-g(1-S)}:dd(g);return u=nc/u,_.config=function(S,b){return x(a,S,b)},_},Mc=function x(a,s){s===void 0&&(s=1.70158);var c=function(m){return m?--m*m*((s+1)*m+s)+1:0},d=a==="out"?c:a==="in"?function(u){return 1-c(1-u)}:dd(c);return d.config=function(u){return x(a,u)},d};Cr("Linear,Quad,Cubic,Quart,Quint,Strong",function(x,a){var s=a<5?a+1:a;Ha(x+",Power"+(s-1),a?function(c){return Math.pow(c,s)}:function(c){return c},function(c){return 1-Math.pow(1-c,s)},function(c){return c<.5?Math.pow(c*2,s)/2:1-Math.pow((1-c)*2,s)/2})}),Ii.Linear.easeNone=Ii.none=Ii.Linear.easeIn,Ha("Elastic",Tc("in"),Tc("out"),Tc()),function(x,a){var s=1/a,c=2*s,d=2.5*s,u=function(g){return g<s?x*g*g:g<c?x*Math.pow(g-1.5/a,2)+.75:g<d?x*(g-=2.25/a)*g+.9375:x*Math.pow(g-2.625/a,2)+.984375};Ha("Bounce",function(m){return 1-u(1-m)},u)}(7.5625,2.75),Ha("Expo",function(x){return x?Math.pow(2,10*(x-1)):0}),Ha("Circ",function(x){return-(Lf(1-x*x)-1)}),Ha("Sine",function(x){return x===1?1:-xm(x*ym)+1}),Ha("Back",Mc("in"),Mc("out"),Mc()),Ii.SteppedEase=Ii.steps=Vr.SteppedEase={config:function(a,s){a===void 0&&(a=1);var c=1/a,d=a+(s?0:1),u=s?1:0,m=1-en;return function(g){return((d*Th(0,m,g)|0)+u)*c}}},Rl.ease=Ii["quad.out"],Cr("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(x){return pc+=x+","+x+"Params,"});var pd=function(a,s){this.id=_m++,a._gsap=this,this.target=a,this.harness=s,this.get=s?s.get:Uf,this.set=s?s.getSetter:Ac},Ch=function(){function x(s){this.vars=s,this._delay=+s.delay||0,(this._repeat=s.repeat===1/0?-2:s.repeat||0)&&(this._rDelay=s.repeatDelay||0,this._yoyo=!!s.yoyo||!!s.yoyoEase),this._ts=1,zl(this,+s.duration,1,1),this.data=s.data,hn&&(this._ctx=hn,hn.data.push(this)),bh||Xr.wake()}var a=x.prototype;return a.delay=function(c){return c||c===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+c-this._delay),this._delay=c,this):this._delay},a.duration=function(c){return arguments.length?this.totalDuration(this._repeat>0?c+(c+this._rDelay)*this._repeat:c):this.totalDuration()&&this._dur},a.totalDuration=function(c){return arguments.length?(this._dirty=0,zl(this,this._repeat<0?c:(c-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},a.totalTime=function(c,d){if(Bl(),!arguments.length)return this._tTime;var u=this._dp;if(u&&u.smoothChildTiming&&this._ts){for(_u(this,c),!u._dp||u.parent||qf(u,this);u&&u.parent;)u.parent._time!==u._start+(u._ts>=0?u._tTime/u._ts:(u.totalDuration()-u._tTime)/-u._ts)&&u.totalTime(u._tTime,!0),u=u.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&c<this._tDur||this._ts<0&&c>0||!this._tDur&&!c)&&Wo(this._dp,this,this._start-this._delay)}return(this._tTime!==c||!this._dur&&!d||this._initted&&Math.abs(this._zTime)===en||!c&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=c),Gf(this,c,d)),this},a.time=function(c,d){return arguments.length?this.totalTime(Math.min(this.totalDuration(),c+Xf(this))%(this._dur+this._rDelay)||(c?this._dur:0),d):this._time},a.totalProgress=function(c,d){return arguments.length?this.totalTime(this.totalDuration()*c,d):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},a.progress=function(c,d){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-c:c)+Xf(this),d):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},a.iteration=function(c,d){var u=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(c-1)*u,d):this._repeat?Dl(this._tTime,u)+1:1},a.timeScale=function(c,d){if(!arguments.length)return this._rts===-en?0:this._rts;if(this._rts===c)return this;var u=this.parent&&this._ts?vu(this.parent._time,this):this._tTime;return this._rts=+c||0,this._ts=this._ps||c===-en?0:this._rts,this.totalTime(Th(-Math.abs(this._delay),this._tDur,u),d!==!1),yu(this),Am(this)},a.paused=function(c){return arguments.length?(this._ps!==c&&(this._ps=c,c?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Bl(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==en&&(this._tTime-=en)))),this):this._ps},a.startTime=function(c){if(arguments.length){this._start=c;var d=this.parent||this._dp;return d&&(d._sort||!this.parent)&&Wo(d,this,c-this._delay),this}return this._start},a.endTime=function(c){return this._start+(br(c)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},a.rawTime=function(c){var d=this.parent||this._dp;return d?c&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?vu(d.rawTime(c),this):this._tTime:this._tTime},a.revert=function(c){c===void 0&&(c=Sm);var d=nr;return nr=c,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(c),this.totalTime(-.01,c.suppressEvents)),this.data!=="nested"&&c.kill!==!1&&this.kill(),nr=d,this},a.globalTime=function(c){for(var d=this,u=arguments.length?c:d.rawTime();d;)u=d._start+u/(Math.abs(d._ts)||1),d=d._dp;return!this.parent&&this._sat?this._sat.globalTime(c):u},a.repeat=function(c){return arguments.length?(this._repeat=c===1/0?-2:c,Jf(this)):this._repeat===-2?1/0:this._repeat},a.repeatDelay=function(c){if(arguments.length){var d=this._time;return this._rDelay=c,Jf(this),d?this.time(d):this}return this._rDelay},a.yoyo=function(c){return arguments.length?(this._yoyo=c,this):this._yoyo},a.seek=function(c,d){return this.totalTime(oo(this,c),br(d))},a.restart=function(c,d){return this.play().totalTime(c?-this._delay:0,br(d))},a.play=function(c,d){return c!=null&&this.seek(c,d),this.reversed(!1).paused(!1)},a.reverse=function(c,d){return c!=null&&this.seek(c||this.totalDuration(),d),this.reversed(!0).paused(!1)},a.pause=function(c,d){return c!=null&&this.seek(c,d),this.paused(!0)},a.resume=function(){return this.paused(!1)},a.reversed=function(c){return arguments.length?(!!c!==this.reversed()&&this.timeScale(-this._rts||(c?-en:0)),this):this._rts<0},a.invalidate=function(){return this._initted=this._act=0,this._zTime=-en,this},a.isActive=function(){var c=this.parent||this._dp,d=this._start,u;return!!(!c||this._ts&&this._initted&&c.isActive()&&(u=c.rawTime(!0))>=d&&u<this.endTime(!0)-en)},a.eventCallback=function(c,d,u){var m=this.vars;return arguments.length>1?(d?(m[c]=d,u&&(m[c+"Params"]=u),c==="onUpdate"&&(this._onUpdate=d)):delete m[c],this):m[c]},a.then=function(c){var d=this;return new Promise(function(u){var m=Tn(c)?c:Vf,g=function(){var S=d.then;d.then=null,Tn(m)&&(m=m(d))&&(m.then||m===d)&&(d.then=S),u(m),d.then=S};d._initted&&d.totalProgress()===1&&d._ts>=0||!d._tTime&&d._ts<0?g():d._prom=g})},a.kill=function(){Sh(this)},x}();ro(Ch.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-en,_prom:0,_ps:!1,_rts:1});var gr=function(x){Pf(a,x);function a(c,d){var u;return c===void 0&&(c={}),u=x.call(this,c)||this,u.labels={},u.smoothChildTiming=!!c.smoothChildTiming,u.autoRemoveChildren=!!c.autoRemoveChildren,u._sort=br(c.sortChildren),dn&&Wo(c.parent||dn,cs(u),d),c.reversed&&u.reverse(),c.paused&&u.paused(!0),c.scrollTrigger&&Yf(cs(u),c.scrollTrigger),u}var s=a.prototype;return s.to=function(d,u,m){return wh(0,arguments,this),this},s.from=function(d,u,m){return wh(1,arguments,this),this},s.fromTo=function(d,u,m,g){return wh(2,arguments,this),this},s.set=function(d,u,m){return u.duration=0,u.parent=this,xh(u).repeatDelay||(u.repeat=0),u.immediateRender=!!u.immediateRender,new kn(d,u,oo(this,m),1),this},s.call=function(d,u,m){return Wo(this,kn.delayedCall(0,d,u),m)},s.staggerTo=function(d,u,m,g,_,S,b){return m.duration=u,m.stagger=m.stagger||g,m.onComplete=S,m.onCompleteParams=b,m.parent=this,new kn(d,m,oo(this,_)),this},s.staggerFrom=function(d,u,m,g,_,S,b){return m.runBackwards=1,xh(m).immediateRender=br(m.immediateRender),this.staggerTo(d,u,m,g,_,S,b)},s.staggerFromTo=function(d,u,m,g,_,S,b,I){return g.startAt=m,xh(g).immediateRender=br(g.immediateRender),this.staggerTo(d,u,g,_,S,b,I)},s.render=function(d,u,m){var g=this._time,_=this._dirty?this.totalDuration():this._tDur,S=this._dur,b=d<=0?0:jn(d),I=this._zTime<0!=d<0&&(this._initted||!S),k,D,F,E,L,T,M,R,C,U,N,X;if(this!==dn&&b>_&&d>=0&&(b=_),b!==this._tTime||m||I){if(g!==this._time&&S&&(b+=this._time-g,d+=this._time-g),k=b,C=this._start,R=this._ts,T=!R,I&&(S||(g=this._zTime),(d||!u)&&(this._zTime=d)),this._repeat){if(N=this._yoyo,L=S+this._rDelay,this._repeat<-1&&d<0)return this.totalTime(L*100+d,u,m);if(k=jn(b%L),b===_?(E=this._repeat,k=S):(E=~~(b/L),E&&E===b/L&&(k=S,E--),k>S&&(k=S)),U=Dl(this._tTime,L),!g&&this._tTime&&U!==E&&this._tTime-U*L-this._dur<=0&&(U=E),N&&E&1&&(k=S-k,X=1),E!==U&&!this._lock){var K=N&&U&1,Z=K===(N&&E&1);if(E<U&&(K=!K),g=K?0:b%S?S:b,this._lock=1,this.render(g||(X?0:jn(E*L)),u,!S)._lock=0,this._tTime=b,!u&&this.parent&&jr(this,"onRepeat"),this.vars.repeatRefresh&&!X&&(this.invalidate()._lock=1),g&&g!==this._time||T!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(S=this._dur,_=this._tDur,Z&&(this._lock=2,g=K?S:-1e-4,this.render(g,!0),this.vars.repeatRefresh&&!X&&this.invalidate()),this._lock=0,!this._ts&&!T)return this;fd(this,X)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(M=Om(this,jn(g),jn(k)),M&&(b-=k-(k=M._start))),this._tTime=b,this._time=k,this._act=!R,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=d,g=0),!g&&k&&!u&&!E&&(jr(this,"onStart"),this._tTime!==b))return this;if(k>=g&&d>=0)for(D=this._first;D;){if(F=D._next,(D._act||k>=D._start)&&D._ts&&M!==D){if(D.parent!==this)return this.render(d,u,m);if(D.render(D._ts>0?(k-D._start)*D._ts:(D._dirty?D.totalDuration():D._tDur)+(k-D._start)*D._ts,u,m),k!==this._time||!this._ts&&!T){M=0,F&&(b+=this._zTime=-en);break}}D=F}else{D=this._last;for(var ct=d<0?d:k;D;){if(F=D._prev,(D._act||ct<=D._end)&&D._ts&&M!==D){if(D.parent!==this)return this.render(d,u,m);if(D.render(D._ts>0?(ct-D._start)*D._ts:(D._dirty?D.totalDuration():D._tDur)+(ct-D._start)*D._ts,u,m||nr&&(D._initted||D._startAt)),k!==this._time||!this._ts&&!T){M=0,F&&(b+=this._zTime=ct?-en:en);break}}D=F}}if(M&&!u&&(this.pause(),M.render(k>=g?0:-en)._zTime=k>=g?1:-1,this._ts))return this._start=C,yu(this),this.render(d,u,m);this._onUpdate&&!u&&jr(this,"onUpdate",!0),(b===_&&this._tTime>=this.totalDuration()||!b&&g)&&(C===this._start||Math.abs(R)!==Math.abs(this._ts))&&(this._lock||((d||!S)&&(b===_&&this._ts>0||!b&&this._ts<0)&&Zs(this,1),!u&&!(d<0&&!g)&&(b||g||!_)&&(jr(this,b===_&&d>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(b<_&&this.timeScale()>0)&&this._prom())))}return this},s.add=function(d,u){var m=this;if(fs(u)||(u=oo(this,u,d)),!(d instanceof Ch)){if(rr(d))return d.forEach(function(g){return m.add(g,u)}),this;if(Wn(d))return this.addLabel(d,u);if(Tn(d))d=kn.delayedCall(0,d);else return this}return this!==d?Wo(this,d,u):this},s.getChildren=function(d,u,m,g){d===void 0&&(d=!0),u===void 0&&(u=!0),m===void 0&&(m=!0),g===void 0&&(g=-no);for(var _=[],S=this._first;S;)S._start>=g&&(S instanceof kn?u&&_.push(S):(m&&_.push(S),d&&_.push.apply(_,S.getChildren(!0,u,m)))),S=S._next;return _},s.getById=function(d){for(var u=this.getChildren(1,1,1),m=u.length;m--;)if(u[m].vars.id===d)return u[m]},s.remove=function(d){return Wn(d)?this.removeLabel(d):Tn(d)?this.killTweensOf(d):(gu(this,d),d===this._recent&&(this._recent=this._last),Ua(this))},s.totalTime=function(d,u){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=jn(Xr.time-(this._ts>0?d/this._ts:(this.totalDuration()-d)/-this._ts))),x.prototype.totalTime.call(this,d,u),this._forcing=0,this):this._tTime},s.addLabel=function(d,u){return this.labels[d]=oo(this,u),this},s.removeLabel=function(d){return delete this.labels[d],this},s.addPause=function(d,u,m){var g=kn.delayedCall(0,u||_h,m);return g.data="isPause",this._hasPause=1,Wo(this,g,oo(this,d))},s.removePause=function(d){var u=this._first;for(d=oo(this,d);u;)u._start===d&&u.data==="isPause"&&Zs(u),u=u._next},s.killTweensOf=function(d,u,m){for(var g=this.getTweensOf(d,m),_=g.length;_--;)Ks!==g[_]&&g[_].kill(d,u);return this},s.getTweensOf=function(d,u){for(var m=[],g=so(d),_=this._first,S=fs(u),b;_;)_ instanceof kn?Em(_._targets,g)&&(S?(!Ks||_._initted&&_._ts)&&_.globalTime(0)<=u&&_.globalTime(_.totalDuration())>u:!u||_.isActive())&&m.push(_):(b=_.getTweensOf(g,u)).length&&m.push.apply(m,b),_=_._next;return m},s.tweenTo=function(d,u){u=u||{};var m=this,g=oo(m,d),_=u,S=_.startAt,b=_.onStart,I=_.onStartParams,k=_.immediateRender,D,F=kn.to(m,ro({ease:u.ease||"none",lazy:!1,immediateRender:!1,time:g,overwrite:"auto",duration:u.duration||Math.abs((g-(S&&"time"in S?S.time:m._time))/m.timeScale())||en,onStart:function(){if(m.pause(),!D){var L=u.duration||Math.abs((g-(S&&"time"in S?S.time:m._time))/m.timeScale());F._dur!==L&&zl(F,L,0,1).render(F._time,!0,!0),D=1}b&&b.apply(F,I||[])}},u));return k?F.render(0):F},s.tweenFromTo=function(d,u,m){return this.tweenTo(u,ro({startAt:{time:oo(this,d)}},m))},s.recent=function(){return this._recent},s.nextLabel=function(d){return d===void 0&&(d=this._time),rd(this,oo(this,d))},s.previousLabel=function(d){return d===void 0&&(d=this._time),rd(this,oo(this,d),1)},s.currentLabel=function(d){return arguments.length?this.seek(d,!0):this.previousLabel(this._time+en)},s.shiftChildren=function(d,u,m){m===void 0&&(m=0);for(var g=this._first,_=this.labels,S;g;)g._start>=m&&(g._start+=d,g._end+=d),g=g._next;if(u)for(S in _)_[S]>=m&&(_[S]+=d);return Ua(this)},s.invalidate=function(d){var u=this._first;for(this._lock=0;u;)u.invalidate(d),u=u._next;return x.prototype.invalidate.call(this,d)},s.clear=function(d){d===void 0&&(d=!0);for(var u=this._first,m;u;)m=u._next,this.remove(u),u=m;return this._dp&&(this._time=this._tTime=this._pTime=0),d&&(this.labels={}),Ua(this)},s.totalDuration=function(d){var u=0,m=this,g=m._last,_=no,S,b,I;if(arguments.length)return m.timeScale((m._repeat<0?m.duration():m.totalDuration())/(m.reversed()?-d:d));if(m._dirty){for(I=m.parent;g;)S=g._prev,g._dirty&&g.totalDuration(),b=g._start,b>_&&m._sort&&g._ts&&!m._lock?(m._lock=1,Wo(m,g,b-g._delay,1)._lock=0):_=b,b<0&&g._ts&&(u-=b,(!I&&!m._dp||I&&I.smoothChildTiming)&&(m._start+=b/m._ts,m._time-=b,m._tTime-=b),m.shiftChildren(-b,!1,-1/0),_=0),g._end>u&&g._ts&&(u=g._end),g=S;zl(m,m===dn&&m._time>u?m._time:u,1,1),m._dirty=0}return m._tDur},a.updateRoot=function(d){if(dn._ts&&(Gf(dn,vu(d,dn)),Nf=Xr.frame),Xr.frame>=Ff){Ff+=Hr.autoSleep||120;var u=dn._first;if((!u||!u._ts)&&Hr.autoSleep&&Xr._listeners.length<2){for(;u&&!u._ts;)u=u._next;u||Xr.sleep()}}},a}(Ch);ro(gr.prototype,{_lock:0,_hasPause:0,_forcing:0});var Ym=function(a,s,c,d,u,m,g){var _=new Ar(this._pt,a,s,0,1,xd,null,u),S=0,b=0,I,k,D,F,E,L,T,M;for(_.b=c,_.e=d,c+="",d+="",(T=~d.indexOf("random("))&&(d=Mh(d)),m&&(M=[c,d],m(M,a,s),c=M[0],d=M[1]),k=c.match(ac)||[];I=ac.exec(d);)F=I[0],E=d.substring(S,I.index),D?D=(D+1)%5:E.substr(-5)==="rgba("&&(D=1),F!==k[b++]&&(L=parseFloat(k[b-1])||0,_._pt={_next:_._pt,p:E||b===1?E:",",s:L,c:F.charAt(1)==="="?Il(L,F)-L:parseFloat(F)-L,m:D&&D<4?Math.round:0},S=ac.lastIndex);return _.c=S<d.length?d.substring(S,d.length):"",_.fp=g,(If.test(d)||T)&&(_.e=0),this._pt=_,_},Sc=function(a,s,c,d,u,m,g,_,S,b){Tn(d)&&(d=d(u||0,a,m));var I=a[s],k=c!=="get"?c:Tn(I)?S?a[s.indexOf("set")||!Tn(a["get"+s.substr(3)])?s:"get"+s.substr(3)](S):a[s]():I,D=Tn(I)?S?Qm:yd:Cc,F;if(Wn(d)&&(~d.indexOf("random(")&&(d=Mh(d)),d.charAt(1)==="="&&(F=Il(k,d)+(or(k)||0),(F||F===0)&&(d=F))),!b||k!==d||Ec)return!isNaN(k*d)&&d!==""?(F=new Ar(this._pt,a,s,+k||0,d-(k||0),typeof I=="boolean"?eg:_d,0,D),S&&(F.fp=S),g&&F.modifier(g,this,a),this._pt=F):(!I&&!(s in a)&&uc(s,d),Ym.call(this,a,s,k,d,D,_||Hr.stringFilter,S))},Zm=function(a,s,c,d,u){if(Tn(a)&&(a=Ah(a,u,s,c,d)),!Ho(a)||a.style&&a.nodeType||rr(a)||Rf(a))return Wn(a)?Ah(a,u,s,c,d):a;var m={},g;for(g in a)m[g]=Ah(a[g],u,s,c,d);return m},md=function(a,s,c,d,u,m){var g,_,S,b;if(Wr[a]&&(g=new Wr[a]).init(u,g.rawVars?s[a]:Zm(s[a],d,u,m,c),c,d,m)!==!1&&(c._pt=_=new Ar(c._pt,u,a,0,1,g.render,g,0,g.priority),c!==kl))for(S=c._ptLookup[c._targets.indexOf(u)],b=g._props.length;b--;)S[g._props[b]]=_;return g},Ks,Ec,bc=function x(a,s,c){var d=a.vars,u=d.ease,m=d.startAt,g=d.immediateRender,_=d.lazy,S=d.onUpdate,b=d.runBackwards,I=d.yoyoEase,k=d.keyframes,D=d.autoRevert,F=a._dur,E=a._startAt,L=a._targets,T=a.parent,M=T&&T.data==="nested"?T.vars.targets:L,R=a._overwrite==="auto"&&!ic,C=a.timeline,U,N,X,K,Z,ct,Rt,et,_t,G,Pt,Et,At;if(C&&(!k||!u)&&(u="none"),a._ease=Ga(u,Rl.ease),a._yEase=I?cd(Ga(I===!0?u:I,Rl.ease)):0,I&&a._yoyo&&!a._repeat&&(I=a._yEase,a._yEase=a._ease,a._ease=I),a._from=!C&&!!d.runBackwards,!C||k&&!d.stagger){if(et=L[0]?Na(L[0]).harness:0,Et=et&&d[et.prop],U=mu(d,cc),E&&(E._zTime<0&&E.progress(1),s<0&&b&&g&&!D?E.render(-1,!0):E.revert(b&&F?fu:Mm),E._lazy=0),m){if(Zs(a._startAt=kn.set(L,ro({data:"isStart",overwrite:!1,parent:T,immediateRender:!0,lazy:!E&&br(_),startAt:null,delay:0,onUpdate:S&&function(){return jr(a,"onUpdate")},stagger:0},m))),a._startAt._dp=0,a._startAt._sat=a,s<0&&(nr||!g&&!D)&&a._startAt.revert(fu),g&&F&&s<=0&&c<=0){s&&(a._zTime=s);return}}else if(b&&F&&!E){if(s&&(g=!1),X=ro({overwrite:!1,data:"isFromStart",lazy:g&&!E&&br(_),immediateRender:g,stagger:0,parent:T},U),Et&&(X[et.prop]=Et),Zs(a._startAt=kn.set(L,X)),a._startAt._dp=0,a._startAt._sat=a,s<0&&(nr?a._startAt.revert(fu):a._startAt.render(-1,!0)),a._zTime=s,!g)x(a._startAt,en,en);else if(!s)return}for(a._pt=a._ptCache=0,_=F&&br(_)||_&&!F,N=0;N<L.length;N++){if(Z=L[N],Rt=Z._gsap||mc(L)[N]._gsap,a._ptLookup[N]=G={},fc[Rt.id]&&Ys.length&&pu(),Pt=M===L?N:M.indexOf(Z),et&&(_t=new et).init(Z,Et||U,a,Pt,M)!==!1&&(a._pt=K=new Ar(a._pt,Z,_t.name,0,1,_t.render,_t,0,_t.priority),_t._props.forEach(function(ce){G[ce]=K}),_t.priority&&(ct=1)),!et||Et)for(X in U)Wr[X]&&(_t=md(X,U,a,Pt,Z,M))?_t.priority&&(ct=1):G[X]=K=Sc.call(a,Z,X,"get",U[X],Pt,M,0,d.stringFilter);a._op&&a._op[N]&&a.kill(Z,a._op[N]),R&&a._pt&&(Ks=a,dn.killTweensOf(Z,G,a.globalTime(s)),At=!a.parent,Ks=0),a._pt&&_&&(fc[Rt.id]=1)}ct&&wd(a),a._onInit&&a._onInit(a)}a._onUpdate=S,a._initted=(!a._op||a._pt)&&!At,k&&s<=0&&C.render(no,!0,!0)},Jm=function(a,s,c,d,u,m,g,_){var S=(a._pt&&a._ptCache||(a._ptCache={}))[s],b,I,k,D;if(!S)for(S=a._ptCache[s]=[],k=a._ptLookup,D=a._targets.length;D--;){if(b=k[D][s],b&&b.d&&b.d._pt)for(b=b.d._pt;b&&b.p!==s&&b.fp!==s;)b=b._next;if(!b)return Ec=1,a.vars[s]="+=0",bc(a,g),Ec=0,_?yh(s+" not eligible for reset"):1;S.push(b)}for(D=S.length;D--;)I=S[D],b=I._pt||I,b.s=(d||d===0)&&!u?d:b.s+(d||0)+m*b.c,b.c=c-b.s,I.e&&(I.e=Rn(c)+or(I.e)),I.b&&(I.b=b.s+or(I.b))},$m=function(a,s){var c=a[0]?Na(a[0]).harness:0,d=c&&c.aliases,u,m,g,_;if(!d)return s;u=Fa({},s);for(m in d)if(m in u)for(_=d[m].split(","),g=_.length;g--;)u[_[g]]=u[m];return u},Km=function(a,s,c,d){var u=s.ease||d||"power1.inOut",m,g;if(rr(s))g=c[a]||(c[a]=[]),s.forEach(function(_,S){return g.push({t:S/(s.length-1)*100,v:_,e:u})});else for(m in s)g=c[m]||(c[m]=[]),m==="ease"||g.push({t:parseFloat(a),v:s[m],e:u})},Ah=function(a,s,c,d,u){return Tn(a)?a.call(s,c,d,u):Wn(a)&&~a.indexOf("random(")?Mh(a):a},gd=pc+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",vd={};Cr(gd+",id,stagger,delay,duration,paused,scrollTrigger",function(x){return vd[x]=1});var kn=function(x){Pf(a,x);function a(c,d,u,m){var g;typeof d=="number"&&(u.duration=d,d=u,u=null),g=x.call(this,m?d:xh(d))||this;var _=g.vars,S=_.duration,b=_.delay,I=_.immediateRender,k=_.stagger,D=_.overwrite,F=_.keyframes,E=_.defaults,L=_.scrollTrigger,T=_.yoyoEase,M=d.parent||dn,R=(rr(c)||Rf(c)?fs(c[0]):"length"in d)?[c]:so(c),C,U,N,X,K,Z,ct,Rt;if(g._targets=R.length?mc(R):yh("GSAP target "+c+" not found. https://gsap.com",!Hr.nullTargetWarn)||[],g._ptLookup=[],g._overwrite=D,F||k||uu(S)||uu(b)){if(d=g.vars,C=g.timeline=new gr({data:"nested",defaults:E||{},targets:M&&M.data==="nested"?M.vars.targets:R}),C.kill(),C.parent=C._dp=cs(g),C._start=0,k||uu(S)||uu(b)){if(X=R.length,ct=k&&Qf(k),Ho(k))for(K in k)~gd.indexOf(K)&&(Rt||(Rt={}),Rt[K]=k[K]);for(U=0;U<X;U++)N=mu(d,vd),N.stagger=0,T&&(N.yoyoEase=T),Rt&&Fa(N,Rt),Z=R[U],N.duration=+Ah(S,cs(g),U,Z,R),N.delay=(+Ah(b,cs(g),U,Z,R)||0)-g._delay,!k&&X===1&&N.delay&&(g._delay=b=N.delay,g._start+=b,N.delay=0),C.to(Z,N,ct?ct(U,Z,R):0),C._ease=Ii.none;C.duration()?S=b=0:g.timeline=0}else if(F){xh(ro(C.vars.defaults,{ease:"none"})),C._ease=Ga(F.ease||d.ease||"none");var et=0,_t,G,Pt;if(rr(F))F.forEach(function(Et){return C.to(R,Et,">")}),C.duration();else{N={};for(K in F)K==="ease"||K==="easeEach"||Km(K,F[K],N,F.easeEach);for(K in N)for(_t=N[K].sort(function(Et,At){return Et.t-At.t}),et=0,U=0;U<_t.length;U++)G=_t[U],Pt={ease:G.e,duration:(G.t-(U?_t[U-1].t:0))/100*S},Pt[K]=G.v,C.to(R,Pt,et),et+=Pt.duration;C.duration()<S&&C.to({},{duration:S-C.duration()})}}S||g.duration(S=C.duration())}else g.timeline=0;return D===!0&&!ic&&(Ks=cs(g),dn.killTweensOf(R),Ks=0),Wo(M,cs(g),u),d.reversed&&g.reverse(),d.paused&&g.paused(!0),(I||!S&&!F&&g._start===jn(M._time)&&br(I)&&Pm(cs(g))&&M.data!=="nested")&&(g._tTime=-en,g.render(Math.max(0,-b)||0)),L&&Yf(cs(g),L),g}var s=a.prototype;return s.render=function(d,u,m){var g=this._time,_=this._tDur,S=this._dur,b=d<0,I=d>_-en&&!b?_:d<en?0:d,k,D,F,E,L,T,M,R,C;if(!S)Rm(this,d,u,m);else if(I!==this._tTime||!d||m||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==b){if(k=I,R=this.timeline,this._repeat){if(E=S+this._rDelay,this._repeat<-1&&b)return this.totalTime(E*100+d,u,m);if(k=jn(I%E),I===_?(F=this._repeat,k=S):(F=~~(I/E),F&&F===jn(I/E)&&(k=S,F--),k>S&&(k=S)),T=this._yoyo&&F&1,T&&(C=this._yEase,k=S-k),L=Dl(this._tTime,E),k===g&&!m&&this._initted&&F===L)return this._tTime=I,this;F!==L&&(R&&this._yEase&&fd(R,T),this.vars.repeatRefresh&&!T&&!this._lock&&this._time!==E&&this._initted&&(this._lock=m=1,this.render(jn(E*F),!0).invalidate()._lock=0))}if(!this._initted){if(Zf(this,b?d:k,m,u,I))return this._tTime=0,this;if(g!==this._time&&!(m&&this.vars.repeatRefresh&&F!==L))return this;if(S!==this._dur)return this.render(d,u,m)}if(this._tTime=I,this._time=k,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=M=(C||this._ease)(k/S),this._from&&(this.ratio=M=1-M),k&&!g&&!u&&!F&&(jr(this,"onStart"),this._tTime!==I))return this;for(D=this._pt;D;)D.r(M,D.d),D=D._next;R&&R.render(d<0?d:R._dur*R._ease(k/this._dur),u,m)||this._startAt&&(this._zTime=d),this._onUpdate&&!u&&(b&&gc(this,d,u,m),jr(this,"onUpdate")),this._repeat&&F!==L&&this.vars.onRepeat&&!u&&this.parent&&jr(this,"onRepeat"),(I===this._tDur||!I)&&this._tTime===I&&(b&&!this._onUpdate&&gc(this,d,!0,!0),(d||!S)&&(I===this._tDur&&this._ts>0||!I&&this._ts<0)&&Zs(this,1),!u&&!(b&&!g)&&(I||g||T)&&(jr(this,I===_?"onComplete":"onReverseComplete",!0),this._prom&&!(I<_&&this.timeScale()>0)&&this._prom()))}return this},s.targets=function(){return this._targets},s.invalidate=function(d){return(!d||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(d),x.prototype.invalidate.call(this,d)},s.resetTo=function(d,u,m,g,_){bh||Xr.wake(),this._ts||this.play();var S=Math.min(this._dur,(this._dp._time-this._start)*this._ts),b;return this._initted||bc(this,S),b=this._ease(S/this._dur),Jm(this,d,u,m,g,b,S,_)?this.resetTo(d,u,m,g,1):(_u(this,0),this.parent||jf(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},s.kill=function(d,u){if(u===void 0&&(u="all"),!d&&(!u||u==="all"))return this._lazy=this._pt=0,this.parent?Sh(this):this;if(this.timeline){var m=this.timeline.totalDuration();return this.timeline.killTweensOf(d,u,Ks&&Ks.vars.overwrite!==!0)._first||Sh(this),this.parent&&m!==this.timeline.totalDuration()&&zl(this,this._dur*this.timeline._tDur/m,0,1),this}var g=this._targets,_=d?so(d):g,S=this._ptLookup,b=this._pt,I,k,D,F,E,L,T;if((!u||u==="all")&&Cm(g,_))return u==="all"&&(this._pt=0),Sh(this);for(I=this._op=this._op||[],u!=="all"&&(Wn(u)&&(E={},Cr(u,function(M){return E[M]=1}),u=E),u=$m(g,u)),T=g.length;T--;)if(~_.indexOf(g[T])){k=S[T],u==="all"?(I[T]=u,F=k,D={}):(D=I[T]=I[T]||{},F=u);for(E in F)L=k&&k[E],L&&((!("kill"in L.d)||L.d.kill(E)===!0)&&gu(this,L,"_pt"),delete k[E]),D!=="all"&&(D[E]=1)}return this._initted&&!this._pt&&b&&Sh(this),this},a.to=function(d,u){return new a(d,u,arguments[2])},a.from=function(d,u){return wh(1,arguments)},a.delayedCall=function(d,u,m,g){return new a(u,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:d,onComplete:u,onReverseComplete:u,onCompleteParams:m,onReverseCompleteParams:m,callbackScope:g})},a.fromTo=function(d,u,m){return wh(2,arguments)},a.set=function(d,u){return u.duration=0,u.repeatDelay||(u.repeat=0),new a(d,u)},a.killTweensOf=function(d,u,m){return dn.killTweensOf(d,u,m)},a}(Ch);ro(kn.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Cr("staggerTo,staggerFrom,staggerFromTo",function(x){kn[x]=function(){var a=new gr,s=yc.call(arguments,0);return s.splice(x==="staggerFromTo"?5:4,0,0),a[x].apply(a,s)}});var Cc=function(a,s,c){return a[s]=c},yd=function(a,s,c){return a[s](c)},Qm=function(a,s,c,d){return a[s](d.fp,c)},tg=function(a,s,c){return a.setAttribute(s,c)},Ac=function(a,s){return Tn(a[s])?yd:rc(a[s])&&a.setAttribute?tg:Cc},_d=function(a,s){return s.set(s.t,s.p,Math.round((s.s+s.c*a)*1e6)/1e6,s)},eg=function(a,s){return s.set(s.t,s.p,!!(s.s+s.c*a),s)},xd=function(a,s){var c=s._pt,d="";if(!a&&s.b)d=s.b;else if(a===1&&s.e)d=s.e;else{for(;c;)d=c.p+(c.m?c.m(c.s+c.c*a):Math.round((c.s+c.c*a)*1e4)/1e4)+d,c=c._next;d+=s.c}s.set(s.t,s.p,d,s)},Pc=function(a,s){for(var c=s._pt;c;)c.r(a,c.d),c=c._next},ig=function(a,s,c,d){for(var u=this._pt,m;u;)m=u._next,u.p===d&&u.modifier(a,s,c),u=m},ng=function(a){for(var s=this._pt,c,d;s;)d=s._next,s.p===a&&!s.op||s.op===a?gu(this,s,"_pt"):s.dep||(c=1),s=d;return!c},rg=function(a,s,c,d){d.mSet(a,s,d.m.call(d.tween,c,d.mt),d)},wd=function(a){for(var s=a._pt,c,d,u,m;s;){for(c=s._next,d=u;d&&d.pr>s.pr;)d=d._next;(s._prev=d?d._prev:m)?s._prev._next=s:u=s,(s._next=d)?d._prev=s:m=s,s=c}a._pt=u},Ar=function(){function x(s,c,d,u,m,g,_,S,b){this.t=c,this.s=u,this.c=m,this.p=d,this.r=g||_d,this.d=_||this,this.set=S||Cc,this.pr=b||0,this._next=s,s&&(s._prev=this)}var a=x.prototype;return a.modifier=function(c,d,u){this.mSet=this.mSet||this.set,this.set=rg,this.m=c,this.mt=u,this.tween=d},x}();Cr(pc+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(x){return cc[x]=1}),Vr.TweenMax=Vr.TweenLite=kn,Vr.TimelineLite=Vr.TimelineMax=gr,dn=new gr({sortChildren:!1,defaults:Rl,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Hr.stringFilter=ud;var Va=[],xu={},og=[],Td=0,sg=0,Lc=function(a){return(xu[a]||og).map(function(s){return s()})},Rc=function(){var a=Date.now(),s=[];a-Td>2&&(Lc("matchMediaInit"),Va.forEach(function(c){var d=c.queries,u=c.conditions,m,g,_,S;for(g in d)m=Vo.matchMedia(d[g]).matches,m&&(_=1),m!==u[g]&&(u[g]=m,S=1);S&&(c.revert(),_&&s.push(c))}),Lc("matchMediaRevert"),s.forEach(function(c){return c.onMatch(c,function(d){return c.add(null,d)})}),Td=a,Lc("matchMedia"))},Md=function(){function x(s,c){this.selector=c&&_c(c),this.data=[],this._r=[],this.isReverted=!1,this.id=sg++,s&&this.add(s)}var a=x.prototype;return a.add=function(c,d,u){Tn(c)&&(u=d,d=c,c=Tn);var m=this,g=function(){var S=hn,b=m.selector,I;return S&&S!==m&&S.data.push(m),u&&(m.selector=_c(u)),hn=m,I=d.apply(m,arguments),Tn(I)&&m._r.push(I),hn=S,m.selector=b,m.isReverted=!1,I};return m.last=g,c===Tn?g(m,function(_){return m.add(null,_)}):c?m[c]=g:g},a.ignore=function(c){var d=hn;hn=null,c(this),hn=d},a.getTweens=function(){var c=[];return this.data.forEach(function(d){return d instanceof x?c.push.apply(c,d.getTweens()):d instanceof kn&&!(d.parent&&d.parent.data==="nested")&&c.push(d)}),c},a.clear=function(){this._r.length=this.data.length=0},a.kill=function(c,d){var u=this;if(c?function(){for(var g=u.getTweens(),_=u.data.length,S;_--;)S=u.data[_],S.data==="isFlip"&&(S.revert(),S.getChildren(!0,!0,!1).forEach(function(b){return g.splice(g.indexOf(b),1)}));for(g.map(function(b){return{g:b._dur||b._delay||b._sat&&!b._sat.vars.immediateRender?b.globalTime(0):-1/0,t:b}}).sort(function(b,I){return I.g-b.g||-1/0}).forEach(function(b){return b.t.revert(c)}),_=u.data.length;_--;)S=u.data[_],S instanceof gr?S.data!=="nested"&&(S.scrollTrigger&&S.scrollTrigger.revert(),S.kill()):!(S instanceof kn)&&S.revert&&S.revert(c);u._r.forEach(function(b){return b(c,u)}),u.isReverted=!0}():this.data.forEach(function(g){return g.kill&&g.kill()}),this.clear(),d)for(var m=Va.length;m--;)Va[m].id===this.id&&Va.splice(m,1)},a.revert=function(c){this.kill(c||{})},x}(),ag=function(){function x(s){this.contexts=[],this.scope=s,hn&&hn.data.push(this)}var a=x.prototype;return a.add=function(c,d,u){Ho(c)||(c={matches:c});var m=new Md(0,u||this.scope),g=m.conditions={},_,S,b;hn&&!m.selector&&(m.selector=hn.selector),this.contexts.push(m),d=m.add("onMatch",d),m.queries=c;for(S in c)S==="all"?b=1:(_=Vo.matchMedia(c[S]),_&&(Va.indexOf(m)<0&&Va.push(m),(g[S]=_.matches)&&(b=1),_.addListener?_.addListener(Rc):_.addEventListener("change",Rc)));return b&&d(m,function(I){return m.add(null,I)}),this},a.revert=function(c){this.kill(c||{})},a.kill=function(c){this.contexts.forEach(function(d){return d.kill(c,!0)})},x}(),wu={registerPlugin:function(){for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];s.forEach(function(d){return sd(d)})},timeline:function(a){return new gr(a)},getTweensOf:function(a,s){return dn.getTweensOf(a,s)},getProperty:function(a,s,c,d){Wn(a)&&(a=so(a)[0]);var u=Na(a||{}).get,m=c?Vf:Hf;return c==="native"&&(c=""),a&&(s?m((Wr[s]&&Wr[s].get||u)(a,s,c,d)):function(g,_,S){return m((Wr[g]&&Wr[g].get||u)(a,g,_,S))})},quickSetter:function(a,s,c){if(a=so(a),a.length>1){var d=a.map(function(b){return Pr.quickSetter(b,s,c)}),u=d.length;return function(b){for(var I=u;I--;)d[I](b)}}a=a[0]||{};var m=Wr[s],g=Na(a),_=g.harness&&(g.harness.aliases||{})[s]||s,S=m?function(b){var I=new m;kl._pt=0,I.init(a,c?b+c:b,kl,0,[a]),I.render(1,I),kl._pt&&Pc(1,kl)}:g.set(a,_);return m?S:function(b){return S(a,_,c?b+c:b,g,1)}},quickTo:function(a,s,c){var d,u=Pr.to(a,Fa((d={},d[s]="+=0.1",d.paused=!0,d),c||{})),m=function(_,S,b){return u.resetTo(s,_,S,b)};return m.tween=u,m},isTweening:function(a){return dn.getTweensOf(a,!0).length>0},defaults:function(a){return a&&a.ease&&(a.ease=Ga(a.ease,Rl.ease)),Wf(Rl,a||{})},config:function(a){return Wf(Hr,a||{})},registerEffect:function(a){var s=a.name,c=a.effect,d=a.plugins,u=a.defaults,m=a.extendTimeline;(d||"").split(",").forEach(function(g){return g&&!Wr[g]&&!Vr[g]&&yh(s+" effect requires "+g+" plugin.")}),dc[s]=function(g,_,S){return c(so(g),ro(_||{},u),S)},m&&(gr.prototype[s]=function(g,_,S){return this.add(dc[s](g,Ho(_)?_:(S=_)&&{},this),S)})},registerEase:function(a,s){Ii[a]=Ga(s)},parseEase:function(a,s){return arguments.length?Ga(a,s):Ii},getById:function(a){return dn.getById(a)},exportRoot:function(a,s){a===void 0&&(a={});var c=new gr(a),d,u;for(c.smoothChildTiming=br(a.smoothChildTiming),dn.remove(c),c._dp=0,c._time=c._tTime=dn._time,d=dn._first;d;)u=d._next,(s||!(!d._dur&&d instanceof kn&&d.vars.onComplete===d._targets[0]))&&Wo(c,d,d._start-d._delay),d=u;return Wo(dn,c,0),c},context:function(a,s){return a?new Md(a,s):hn},matchMedia:function(a){return new ag(a)},matchMediaRefresh:function(){return Va.forEach(function(a){var s=a.conditions,c,d;for(d in s)s[d]&&(s[d]=!1,c=1);c&&a.revert()})||Rc()},addEventListener:function(a,s){var c=xu[a]||(xu[a]=[]);~c.indexOf(s)||c.push(s)},removeEventListener:function(a,s){var c=xu[a],d=c&&c.indexOf(s);d>=0&&c.splice(d,1)},utils:{wrap:Fm,wrapYoyo:Um,distribute:Qf,random:ed,snap:td,normalize:Nm,getUnit:or,clamp:Dm,splitColor:ad,toArray:so,selector:_c,mapRange:nd,pipe:km,unitize:Bm,interpolate:Gm,shuffle:Kf},install:kf,effects:dc,ticker:Xr,updateRoot:gr.updateRoot,plugins:Wr,globalTimeline:dn,core:{PropTween:Ar,globals:Bf,Tween:kn,Timeline:gr,Animation:Ch,getCache:Na,_removeLinkedListItem:gu,reverting:function(){return nr},context:function(a){return a&&hn&&(hn.data.push(a),a._ctx=hn),hn},suppressOverwrites:function(a){return ic=a}}};Cr("to,from,fromTo,delayedCall,set,killTweensOf",function(x){return wu[x]=kn[x]}),Xr.add(gr.updateRoot),kl=wu.to({},{duration:0});var lg=function(a,s){for(var c=a._pt;c&&c.p!==s&&c.op!==s&&c.fp!==s;)c=c._next;return c},hg=function(a,s){var c=a._targets,d,u,m;for(d in s)for(u=c.length;u--;)m=a._ptLookup[u][d],m&&(m=m.d)&&(m._pt&&(m=lg(m,d)),m&&m.modifier&&m.modifier(s[d],a,c[u],d))},Oc=function(a,s){return{name:a,rawVars:1,init:function(d,u,m){m._onInit=function(g){var _,S;if(Wn(u)&&(_={},Cr(u,function(b){return _[b]=1}),u=_),s){_={};for(S in u)_[S]=s(u[S]);u=_}hg(g,u)}}}},Pr=wu.registerPlugin({name:"attr",init:function(a,s,c,d,u){var m,g,_;this.tween=c;for(m in s)_=a.getAttribute(m)||"",g=this.add(a,"setAttribute",(_||0)+"",s[m],d,u,0,0,m),g.op=m,g.b=_,this._props.push(m)},render:function(a,s){for(var c=s._pt;c;)nr?c.set(c.t,c.p,c.b,c):c.r(a,c.d),c=c._next}},{name:"endArray",init:function(a,s){for(var c=s.length;c--;)this.add(a,c,a[c]||0,s[c],0,0,0,0,0,1)}},Oc("roundProps",xc),Oc("modifiers"),Oc("snap",td))||wu;kn.version=gr.version=Pr.version="3.12.5",zf=1,oc()&&Bl(),Ii.Power0,Ii.Power1,Ii.Power2,Ii.Power3,Ii.Power4,Ii.Linear,Ii.Quad,Ii.Cubic,Ii.Quart,Ii.Quint,Ii.Strong,Ii.Elastic,Ii.Back,Ii.SteppedEase,Ii.Bounce,Ii.Sine,Ii.Expo,Ii.Circ;/*!
2695
2695
  * CSSPlugin 3.12.5
2696
2696
  * https://gsap.com
2697
2697
  *
@@ -2699,4 +2699,4 @@ function print() { __p += __j.call(arguments, '') }
2699
2699
  * Subject to the terms at https://gsap.com/standard-license or for
2700
2700
  * Club GSAP members, the agreement issued with that membership.
2701
2701
  * @author: Jack Doyle, jack@greensock.com
2702
- */var Sd,Qs,Nl,Ic,Va,Ed,Dc,ug=function(){return typeof window<"u"},ds={},Wa=180/Math.PI,Fl=Math.PI/180,Ul=Math.atan2,bd=1e8,zc=/([A-Z])/g,cg=/(left|right|width|margin|padding|x)/i,fg=/[\s,\(]\S/,jo={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},kc=function(a,s){return s.set(s.t,s.p,Math.round((s.s+s.c*a)*1e4)/1e4+s.u,s)},dg=function(a,s){return s.set(s.t,s.p,a===1?s.e:Math.round((s.s+s.c*a)*1e4)/1e4+s.u,s)},pg=function(a,s){return s.set(s.t,s.p,a?Math.round((s.s+s.c*a)*1e4)/1e4+s.u:s.b,s)},mg=function(a,s){var c=s.s+s.c*a;s.set(s.t,s.p,~~(c+(c<0?-.5:.5))+s.u,s)},Cd=function(a,s){return s.set(s.t,s.p,a?s.e:s.b,s)},Ad=function(a,s){return s.set(s.t,s.p,a!==1?s.b:s.e,s)},gg=function(a,s,c){return a.style[s]=c},vg=function(a,s,c){return a.style.setProperty(s,c)},yg=function(a,s,c){return a._gsap[s]=c},_g=function(a,s,c){return a._gsap.scaleX=a._gsap.scaleY=c},xg=function(a,s,c,d,u){var m=a._gsap;m.scaleX=m.scaleY=c,m.renderTransform(u,m)},wg=function(a,s,c,d,u){var m=a._gsap;m[s]=c,m.renderTransform(u,m)},pn="transform",Lr=pn+"Origin",Tg=function x(a,s){var c=this,d=this.target,u=d.style,m=d._gsap;if(a in ds&&u){if(this.tfm=this.tfm||{},a!=="transform")a=jo[a]||a,~a.indexOf(",")?a.split(",").forEach(function(g){return c.tfm[g]=ps(d,g)}):this.tfm[a]=m.x?m[a]:ps(d,a),a===Lr&&(this.tfm.zOrigin=m.zOrigin);else return jo.transform.split(",").forEach(function(g){return x.call(c,g,s)});if(this.props.indexOf(pn)>=0)return;m.svg&&(this.svgo=d.getAttribute("data-svg-origin"),this.props.push(Lr,s,"")),a=pn}(u||s)&&this.props.push(a,s,u[a])},Pd=function(a){a.translate&&(a.removeProperty("translate"),a.removeProperty("scale"),a.removeProperty("rotate"))},Mg=function(){var a=this.props,s=this.target,c=s.style,d=s._gsap,u,m;for(u=0;u<a.length;u+=3)a[u+1]?s[a[u]]=a[u+2]:a[u+2]?c[a[u]]=a[u+2]:c.removeProperty(a[u].substr(0,2)==="--"?a[u]:a[u].replace(zc,"-$1").toLowerCase());if(this.tfm){for(m in this.tfm)d[m]=this.tfm[m];d.svg&&(d.renderTransform(),s.setAttribute("data-svg-origin",this.svgo||"")),u=Dc(),(!u||!u.isStart)&&!c[pn]&&(Pd(c),d.zOrigin&&c[Lr]&&(c[Lr]+=" "+d.zOrigin+"px",d.zOrigin=0,d.renderTransform()),d.uncache=1)}},Ld=function(a,s){var c={target:a,props:[],revert:Mg,save:Tg};return a._gsap||Pr.core.getCache(a),s&&s.split(",").forEach(function(d){return c.save(d)}),c},Rd,Bc=function(a,s){var c=Qs.createElementNS?Qs.createElementNS((s||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),a):Qs.createElement(a);return c&&c.style?c:Qs.createElement(a)},Xo=function x(a,s,c){var d=getComputedStyle(a);return d[s]||d.getPropertyValue(s.replace(zc,"-$1").toLowerCase())||d.getPropertyValue(s)||!c&&x(a,Gl(s)||s,1)||""},Od="O,Moz,ms,Ms,Webkit".split(","),Gl=function(a,s,c){var d=s||Va,u=d.style,m=5;if(a in u&&!c)return a;for(a=a.charAt(0).toUpperCase()+a.substr(1);m--&&!(Od[m]+a in u););return m<0?null:(m===3?"ms":m>=0?Od[m]:"")+a},Nc=function(){ug()&&window.document&&(Sd=window,Qs=Sd.document,Nl=Qs.documentElement,Va=Bc("div")||{style:{}},Bc("div"),pn=Gl(pn),Lr=pn+"Origin",Va.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Rd=!!Gl("perspective"),Dc=Pr.core.reverting,Ic=1)},Fc=function x(a){var s=Bc("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),c=this.parentNode,d=this.nextSibling,u=this.style.cssText,m;if(Nl.appendChild(s),s.appendChild(this),this.style.display="block",a)try{m=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=x}catch{}else this._gsapBBox&&(m=this._gsapBBox());return c&&(d?c.insertBefore(this,d):c.appendChild(this)),Nl.removeChild(s),this.style.cssText=u,m},Id=function(a,s){for(var c=s.length;c--;)if(a.hasAttribute(s[c]))return a.getAttribute(s[c])},Dd=function(a){var s;try{s=a.getBBox()}catch{s=Fc.call(a,!0)}return s&&(s.width||s.height)||a.getBBox===Fc||(s=Fc.call(a,!0)),s&&!s.width&&!s.x&&!s.y?{x:+Id(a,["x","cx","x1"])||0,y:+Id(a,["y","cy","y1"])||0,width:0,height:0}:s},zd=function(a){return!!(a.getCTM&&(!a.parentNode||a.ownerSVGElement)&&Dd(a))},ja=function(a,s){if(s){var c=a.style,d;s in ds&&s!==Lr&&(s=pn),c.removeProperty?(d=s.substr(0,2),(d==="ms"||s.substr(0,6)==="webkit")&&(s="-"+s),c.removeProperty(d==="--"?s:s.replace(zc,"-$1").toLowerCase())):c.removeAttribute(s)}},ta=function(a,s,c,d,u,m){var g=new Ar(a._pt,s,c,0,1,m?Ad:Cd);return a._pt=g,g.b=d,g.e=u,a._props.push(c),g},kd={deg:1,rad:1,turn:1},Sg={grid:1,flex:1},ea=function x(a,s,c,d){var u=parseFloat(c)||0,m=(c+"").trim().substr((u+"").length)||"px",g=Va.style,_=cg.test(s),S=a.tagName.toLowerCase()==="svg",b=(S?"client":"offset")+(_?"Width":"Height"),O=100,k=d==="px",D=d==="%",F,E,L,T;if(d===m||!u||kd[d]||kd[m])return u;if(m!=="px"&&!k&&(u=x(a,s,c,"px")),T=a.getCTM&&zd(a),(D||m==="%")&&(ds[s]||~s.indexOf("adius")))return F=T?a.getBBox()[_?"width":"height"]:a[b],Rn(D?u/F*O:u/100*F);if(g[_?"width":"height"]=O+(k?m:d),E=~s.indexOf("adius")||d==="em"&&a.appendChild&&!S?a:a.parentNode,T&&(E=(a.ownerSVGElement||{}).parentNode),(!E||E===Qs||!E.appendChild)&&(E=Qs.body),L=E._gsap,L&&D&&L.width&&_&&L.time===Xr.time&&!L.uncache)return Rn(u/L.width*O);if(D&&(s==="height"||s==="width")){var M=a.style[s];a.style[s]=O+d,F=a[b],M?a.style[s]=M:ja(a,s)}else(D||m==="%")&&!Sg[Xo(E,"display")]&&(g.position=Xo(a,"position")),E===a&&(g.position="static"),E.appendChild(Va),F=Va[b],E.removeChild(Va),g.position="absolute";return _&&D&&(L=Ba(E),L.time=Xr.time,L.width=E[b]),Rn(k?F*u/O:F&&u?O/F*u:0)},ps=function(a,s,c,d){var u;return Ic||Nc(),s in jo&&s!=="transform"&&(s=jo[s],~s.indexOf(",")&&(s=s.split(",")[0])),ds[s]&&s!=="transform"?(u=Lh(a,d),u=s!=="transformOrigin"?u[s]:u.svg?u.origin:Mu(Xo(a,Lr))+" "+u.zOrigin+"px"):(u=a.style[s],(!u||u==="auto"||d||~(u+"").indexOf("calc("))&&(u=Tu[s]&&Tu[s](a,s,c)||Xo(a,s)||Uf(a,s)||(s==="opacity"?1:0))),c&&!~(u+"").trim().indexOf(" ")?ea(a,s,u,c)+c:u},Eg=function(a,s,c,d){if(!c||c==="none"){var u=Gl(s,a,1),m=u&&Xo(a,u,1);m&&m!==c?(s=u,c=m):s==="borderColor"&&(c=Xo(a,"borderTopColor"))}var g=new Ar(this._pt,a.style,s,0,1,xd),_=0,S=0,b,O,k,D,F,E,L,T,M,R,C,U;if(g.b=c,g.e=d,c+="",d+="",d==="auto"&&(E=a.style[s],a.style[s]=d,d=Xo(a,s)||d,E?a.style[s]=E:ja(a,s)),b=[c,d],ud(b),c=b[0],d=b[1],k=c.match(Ol)||[],U=d.match(Ol)||[],U.length){for(;O=Ol.exec(d);)L=O[0],M=d.substring(_,O.index),F?F=(F+1)%5:(M.substr(-5)==="rgba("||M.substr(-5)==="hsla(")&&(F=1),L!==(E=k[S++]||"")&&(D=parseFloat(E)||0,C=E.substr((D+"").length),L.charAt(1)==="="&&(L=Il(D,L)+C),T=parseFloat(L),R=L.substr((T+"").length),_=Ol.lastIndex-R.length,R||(R=R||Hr.units[s]||C,_===d.length&&(d+=R,g.e+=R)),C!==R&&(D=ea(a,s,E,R)||0),g._pt={_next:g._pt,p:M||S===1?M:",",s:D,c:T-D,m:F&&F<4||s==="zIndex"?Math.round:0});g.c=_<d.length?d.substring(_,d.length):""}else g.r=s==="display"&&d==="none"?Ad:Cd;return If.test(d)&&(g.e=0),this._pt=g,g},Bd={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},bg=function(a){var s=a.split(" "),c=s[0],d=s[1]||"50%";return(c==="top"||c==="bottom"||d==="left"||d==="right")&&(a=c,c=d,d=a),s[0]=Bd[c]||c,s[1]=Bd[d]||d,s.join(" ")},Cg=function(a,s){if(s.tween&&s.tween._time===s.tween._dur){var c=s.t,d=c.style,u=s.u,m=c._gsap,g,_,S;if(u==="all"||u===!0)d.cssText="",_=1;else for(u=u.split(","),S=u.length;--S>-1;)g=u[S],ds[g]&&(_=1,g=g==="transformOrigin"?Lr:pn),ja(c,g);_&&(ja(c,pn),m&&(m.svg&&c.removeAttribute("transform"),Lh(c,1),m.uncache=1,Pd(d)))}},Tu={clearProps:function(a,s,c,d,u){if(u.data!=="isFromStart"){var m=a._pt=new Ar(a._pt,s,c,0,0,Cg);return m.u=d,m.pr=-10,m.tween=u,a._props.push(c),1}}},Ph=[1,0,0,1,0,0],Nd={},Fd=function(a){return a==="matrix(1, 0, 0, 1, 0, 0)"||a==="none"||!a},Ud=function(a){var s=Xo(a,pn);return Fd(s)?Ph:s.substr(7).match(Of).map(Rn)},Uc=function(a,s){var c=a._gsap||Ba(a),d=a.style,u=Ud(a),m,g,_,S;return c.svg&&a.getAttribute("transform")?(_=a.transform.baseVal.consolidate().matrix,u=[_.a,_.b,_.c,_.d,_.e,_.f],u.join(",")==="1,0,0,1,0,0"?Ph:u):(u===Ph&&!a.offsetParent&&a!==Nl&&!c.svg&&(_=d.display,d.display="block",m=a.parentNode,(!m||!a.offsetParent)&&(S=1,g=a.nextElementSibling,Nl.appendChild(a)),u=Ud(a),_?d.display=_:ja(a,"display"),S&&(g?m.insertBefore(a,g):m?m.appendChild(a):Nl.removeChild(a))),s&&u.length>6?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)},Gc=function(a,s,c,d,u,m){var g=a._gsap,_=u||Uc(a,!0),S=g.xOrigin||0,b=g.yOrigin||0,O=g.xOffset||0,k=g.yOffset||0,D=_[0],F=_[1],E=_[2],L=_[3],T=_[4],M=_[5],R=s.split(" "),C=parseFloat(R[0])||0,U=parseFloat(R[1])||0,N,X,K,Z;c?_!==Ph&&(X=D*L-F*E)&&(K=C*(L/X)+U*(-E/X)+(E*M-L*T)/X,Z=C*(-F/X)+U*(D/X)-(D*M-F*T)/X,C=K,U=Z):(N=Dd(a),C=N.x+(~R[0].indexOf("%")?C/100*N.width:C),U=N.y+(~(R[1]||R[0]).indexOf("%")?U/100*N.height:U)),d||d!==!1&&g.smooth?(T=C-S,M=U-b,g.xOffset=O+(T*D+M*E)-T,g.yOffset=k+(T*F+M*L)-M):g.xOffset=g.yOffset=0,g.xOrigin=C,g.yOrigin=U,g.smooth=!!d,g.origin=s,g.originIsAbsolute=!!c,a.style[Lr]="0px 0px",m&&(ta(m,g,"xOrigin",S,C),ta(m,g,"yOrigin",b,U),ta(m,g,"xOffset",O,g.xOffset),ta(m,g,"yOffset",k,g.yOffset)),a.setAttribute("data-svg-origin",C+" "+U)},Lh=function(a,s){var c=a._gsap||new pd(a);if("x"in c&&!s&&!c.uncache)return c;var d=a.style,u=c.scaleX<0,m="px",g="deg",_=getComputedStyle(a),S=Xo(a,Lr)||"0",b,O,k,D,F,E,L,T,M,R,C,U,N,X,K,Z,ct,Rt,et,_t,G,Pt,Et,At,ce,re,Ft,It,Nt,Pe,pe,Wt;return b=O=k=E=L=T=M=R=C=0,D=F=1,c.svg=!!(a.getCTM&&zd(a)),_.translate&&((_.translate!=="none"||_.scale!=="none"||_.rotate!=="none")&&(d[pn]=(_.translate!=="none"?"translate3d("+(_.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(_.rotate!=="none"?"rotate("+_.rotate+") ":"")+(_.scale!=="none"?"scale("+_.scale.split(" ").join(",")+") ":"")+(_[pn]!=="none"?_[pn]:"")),d.scale=d.rotate=d.translate="none"),X=Uc(a,c.svg),c.svg&&(c.uncache?(ce=a.getBBox(),S=c.xOrigin-ce.x+"px "+(c.yOrigin-ce.y)+"px",At=""):At=!s&&a.getAttribute("data-svg-origin"),Gc(a,At||S,!!At||c.originIsAbsolute,c.smooth!==!1,X)),U=c.xOrigin||0,N=c.yOrigin||0,X!==Ph&&(Rt=X[0],et=X[1],_t=X[2],G=X[3],b=Pt=X[4],O=Et=X[5],X.length===6?(D=Math.sqrt(Rt*Rt+et*et),F=Math.sqrt(G*G+_t*_t),E=Rt||et?Ul(et,Rt)*Wa:0,M=_t||G?Ul(_t,G)*Wa+E:0,M&&(F*=Math.abs(Math.cos(M*Fl))),c.svg&&(b-=U-(U*Rt+N*_t),O-=N-(U*et+N*G))):(Wt=X[6],Pe=X[7],Ft=X[8],It=X[9],Nt=X[10],pe=X[11],b=X[12],O=X[13],k=X[14],K=Ul(Wt,Nt),L=K*Wa,K&&(Z=Math.cos(-K),ct=Math.sin(-K),At=Pt*Z+Ft*ct,ce=Et*Z+It*ct,re=Wt*Z+Nt*ct,Ft=Pt*-ct+Ft*Z,It=Et*-ct+It*Z,Nt=Wt*-ct+Nt*Z,pe=Pe*-ct+pe*Z,Pt=At,Et=ce,Wt=re),K=Ul(-_t,Nt),T=K*Wa,K&&(Z=Math.cos(-K),ct=Math.sin(-K),At=Rt*Z-Ft*ct,ce=et*Z-It*ct,re=_t*Z-Nt*ct,pe=G*ct+pe*Z,Rt=At,et=ce,_t=re),K=Ul(et,Rt),E=K*Wa,K&&(Z=Math.cos(K),ct=Math.sin(K),At=Rt*Z+et*ct,ce=Pt*Z+Et*ct,et=et*Z-Rt*ct,Et=Et*Z-Pt*ct,Rt=At,Pt=ce),L&&Math.abs(L)+Math.abs(E)>359.9&&(L=E=0,T=180-T),D=Rn(Math.sqrt(Rt*Rt+et*et+_t*_t)),F=Rn(Math.sqrt(Et*Et+Wt*Wt)),K=Ul(Pt,Et),M=Math.abs(K)>2e-4?K*Wa:0,C=pe?1/(pe<0?-pe:pe):0),c.svg&&(At=a.getAttribute("transform"),c.forceCSS=a.setAttribute("transform","")||!Fd(Xo(a,pn)),At&&a.setAttribute("transform",At))),Math.abs(M)>90&&Math.abs(M)<270&&(u?(D*=-1,M+=E<=0?180:-180,E+=E<=0?180:-180):(F*=-1,M+=M<=0?180:-180)),s=s||c.uncache,c.x=b-((c.xPercent=b&&(!s&&c.xPercent||(Math.round(a.offsetWidth/2)===Math.round(-b)?-50:0)))?a.offsetWidth*c.xPercent/100:0)+m,c.y=O-((c.yPercent=O&&(!s&&c.yPercent||(Math.round(a.offsetHeight/2)===Math.round(-O)?-50:0)))?a.offsetHeight*c.yPercent/100:0)+m,c.z=k+m,c.scaleX=Rn(D),c.scaleY=Rn(F),c.rotation=Rn(E)+g,c.rotationX=Rn(L)+g,c.rotationY=Rn(T)+g,c.skewX=M+g,c.skewY=R+g,c.transformPerspective=C+m,(c.zOrigin=parseFloat(S.split(" ")[2])||!s&&c.zOrigin||0)&&(d[Lr]=Mu(S)),c.xOffset=c.yOffset=0,c.force3D=Hr.force3D,c.renderTransform=c.svg?Pg:Rd?Gd:Ag,c.uncache=0,c},Mu=function(a){return(a=a.split(" "))[0]+" "+a[1]},Hc=function(a,s,c){var d=or(s);return Rn(parseFloat(s)+parseFloat(ea(a,"x",c+"px",d)))+d},Ag=function(a,s){s.z="0px",s.rotationY=s.rotationX="0deg",s.force3D=0,Gd(a,s)},Xa="0deg",Rh="0px",qa=") ",Gd=function(a,s){var c=s||this,d=c.xPercent,u=c.yPercent,m=c.x,g=c.y,_=c.z,S=c.rotation,b=c.rotationY,O=c.rotationX,k=c.skewX,D=c.skewY,F=c.scaleX,E=c.scaleY,L=c.transformPerspective,T=c.force3D,M=c.target,R=c.zOrigin,C="",U=T==="auto"&&a&&a!==1||T===!0;if(R&&(O!==Xa||b!==Xa)){var N=parseFloat(b)*Fl,X=Math.sin(N),K=Math.cos(N),Z;N=parseFloat(O)*Fl,Z=Math.cos(N),m=Hc(M,m,X*Z*-R),g=Hc(M,g,-Math.sin(N)*-R),_=Hc(M,_,K*Z*-R+R)}L!==Rh&&(C+="perspective("+L+qa),(d||u)&&(C+="translate("+d+"%, "+u+"%) "),(U||m!==Rh||g!==Rh||_!==Rh)&&(C+=_!==Rh||U?"translate3d("+m+", "+g+", "+_+") ":"translate("+m+", "+g+qa),S!==Xa&&(C+="rotate("+S+qa),b!==Xa&&(C+="rotateY("+b+qa),O!==Xa&&(C+="rotateX("+O+qa),(k!==Xa||D!==Xa)&&(C+="skew("+k+", "+D+qa),(F!==1||E!==1)&&(C+="scale("+F+", "+E+qa),M.style[pn]=C||"translate(0, 0)"},Pg=function(a,s){var c=s||this,d=c.xPercent,u=c.yPercent,m=c.x,g=c.y,_=c.rotation,S=c.skewX,b=c.skewY,O=c.scaleX,k=c.scaleY,D=c.target,F=c.xOrigin,E=c.yOrigin,L=c.xOffset,T=c.yOffset,M=c.forceCSS,R=parseFloat(m),C=parseFloat(g),U,N,X,K,Z;_=parseFloat(_),S=parseFloat(S),b=parseFloat(b),b&&(b=parseFloat(b),S+=b,_+=b),_||S?(_*=Fl,S*=Fl,U=Math.cos(_)*O,N=Math.sin(_)*O,X=Math.sin(_-S)*-k,K=Math.cos(_-S)*k,S&&(b*=Fl,Z=Math.tan(S-b),Z=Math.sqrt(1+Z*Z),X*=Z,K*=Z,b&&(Z=Math.tan(b),Z=Math.sqrt(1+Z*Z),U*=Z,N*=Z)),U=Rn(U),N=Rn(N),X=Rn(X),K=Rn(K)):(U=O,K=k,N=X=0),(R&&!~(m+"").indexOf("px")||C&&!~(g+"").indexOf("px"))&&(R=ea(D,"x",m,"px"),C=ea(D,"y",g,"px")),(F||E||L||T)&&(R=Rn(R+F-(F*U+E*X)+L),C=Rn(C+E-(F*N+E*K)+T)),(d||u)&&(Z=D.getBBox(),R=Rn(R+d/100*Z.width),C=Rn(C+u/100*Z.height)),Z="matrix("+U+","+N+","+X+","+K+","+R+","+C+")",D.setAttribute("transform",Z),M&&(D.style[pn]=Z)},Lg=function(a,s,c,d,u){var m=360,g=Wn(u),_=parseFloat(u)*(g&&~u.indexOf("rad")?Wa:1),S=_-d,b=d+S+"deg",O,k;return g&&(O=u.split("_")[1],O==="short"&&(S%=m,S!==S%(m/2)&&(S+=S<0?m:-m)),O==="cw"&&S<0?S=(S+m*bd)%m-~~(S/m)*m:O==="ccw"&&S>0&&(S=(S-m*bd)%m-~~(S/m)*m)),a._pt=k=new Ar(a._pt,s,c,d,S,dg),k.e=b,k.u="deg",a._props.push(c),k},Hd=function(a,s){for(var c in s)a[c]=s[c];return a},Rg=function(a,s,c){var d=Hd({},c._gsap),u="perspective,force3D,transformOrigin,svgOrigin",m=c.style,g,_,S,b,O,k,D,F;d.svg?(S=c.getAttribute("transform"),c.setAttribute("transform",""),m[pn]=s,g=Lh(c,1),ja(c,pn),c.setAttribute("transform",S)):(S=getComputedStyle(c)[pn],m[pn]=s,g=Lh(c,1),m[pn]=S);for(_ in ds)S=d[_],b=g[_],S!==b&&u.indexOf(_)<0&&(D=or(S),F=or(b),O=D!==F?ea(c,_,S,F):parseFloat(S),k=parseFloat(b),a._pt=new Ar(a._pt,g,_,O,k-O,kc),a._pt.u=F||0,a._props.push(_));Hd(g,d)};Cr("padding,margin,Width,Radius",function(x,a){var s="Top",c="Right",d="Bottom",u="Left",m=(a<3?[s,c,d,u]:[s+u,s+c,d+c,d+u]).map(function(g){return a<2?x+g:"border"+g+x});Tu[a>1?"border"+x:x]=function(g,_,S,b,O){var k,D;if(arguments.length<4)return k=m.map(function(F){return ps(g,F,S)}),D=k.join(" "),D.split(k[0]).length===5?k[0]:D;k=(b+"").split(" "),D={},m.forEach(function(F,E){return D[F]=k[E]=k[E]||k[(E-1)/2|0]}),g.init(_,D,O)}});var Vd={name:"css",register:Nc,targetTest:function(a){return a.style&&a.nodeType},init:function(a,s,c,d,u){var m=this._props,g=a.style,_=c.vars.startAt,S,b,O,k,D,F,E,L,T,M,R,C,U,N,X,K;Ic||Nc(),this.styles=this.styles||Ld(a),K=this.styles.props,this.tween=c;for(E in s)if(E!=="autoRound"&&(b=s[E],!(Wr[E]&&md(E,s,c,d,a,u)))){if(D=typeof b,F=Tu[E],D==="function"&&(b=b.call(c,d,a,u),D=typeof b),D==="string"&&~b.indexOf("random(")&&(b=Mh(b)),F)F(this,a,E,b,c)&&(X=1);else if(E.substr(0,2)==="--")S=(getComputedStyle(a).getPropertyValue(E)+"").trim(),b+="",$s.lastIndex=0,$s.test(S)||(L=or(S),T=or(b)),T?L!==T&&(S=ea(a,E,S,T)+T):L&&(b+=L),this.add(g,"setProperty",S,b,d,u,0,0,E),m.push(E),K.push(E,0,g[E]);else if(D!=="undefined"){if(_&&E in _?(S=typeof _[E]=="function"?_[E].call(c,d,a,u):_[E],Wn(S)&&~S.indexOf("random(")&&(S=Mh(S)),or(S+"")||S==="auto"||(S+=Hr.units[E]||or(ps(a,E))||""),(S+"").charAt(1)==="="&&(S=ps(a,E))):S=ps(a,E),k=parseFloat(S),M=D==="string"&&b.charAt(1)==="="&&b.substr(0,2),M&&(b=b.substr(2)),O=parseFloat(b),E in jo&&(E==="autoAlpha"&&(k===1&&ps(a,"visibility")==="hidden"&&O&&(k=0),K.push("visibility",0,g.visibility),ta(this,g,"visibility",k?"inherit":"hidden",O?"inherit":"hidden",!O)),E!=="scale"&&E!=="transform"&&(E=jo[E],~E.indexOf(",")&&(E=E.split(",")[0]))),R=E in ds,R){if(this.styles.save(E),C||(U=a._gsap,U.renderTransform&&!s.parseTransform||Lh(a,s.parseTransform),N=s.smoothOrigin!==!1&&U.smooth,C=this._pt=new Ar(this._pt,g,pn,0,1,U.renderTransform,U,0,-1),C.dep=1),E==="scale")this._pt=new Ar(this._pt,U,"scaleY",U.scaleY,(M?Il(U.scaleY,M+O):O)-U.scaleY||0,kc),this._pt.u=0,m.push("scaleY",E),E+="X";else if(E==="transformOrigin"){K.push(Lr,0,g[Lr]),b=bg(b),U.svg?Gc(a,b,0,N,0,this):(T=parseFloat(b.split(" ")[2])||0,T!==U.zOrigin&&ta(this,U,"zOrigin",U.zOrigin,T),ta(this,g,E,Mu(S),Mu(b)));continue}else if(E==="svgOrigin"){Gc(a,b,1,N,0,this);continue}else if(E in Nd){Lg(this,U,E,k,M?Il(k,M+b):b);continue}else if(E==="smoothOrigin"){ta(this,U,"smooth",U.smooth,b);continue}else if(E==="force3D"){U[E]=b;continue}else if(E==="transform"){Rg(this,b,a);continue}}else E in g||(E=Gl(E)||E);if(R||(O||O===0)&&(k||k===0)&&!fg.test(b)&&E in g)L=(S+"").substr((k+"").length),O||(O=0),T=or(b)||(E in Hr.units?Hr.units[E]:L),L!==T&&(k=ea(a,E,S,T)),this._pt=new Ar(this._pt,R?U:g,E,k,(M?Il(k,M+O):O)-k,!R&&(T==="px"||E==="zIndex")&&s.autoRound!==!1?mg:kc),this._pt.u=T||0,L!==T&&T!=="%"&&(this._pt.b=S,this._pt.r=pg);else if(E in g)Eg.call(this,a,E,S,M?M+b:b);else if(E in a)this.add(a,E,S||a[E],M?M+b:b,d,u);else if(E!=="parseTransform"){uc(E,b);continue}R||(E in g?K.push(E,0,g[E]):K.push(E,1,S||a[E])),m.push(E)}}X&&wd(this)},render:function(a,s){if(s.tween._time||!Dc())for(var c=s._pt;c;)c.r(a,c.d),c=c._next;else s.styles.revert()},get:ps,aliases:jo,getSetter:function(a,s,c){var d=jo[s];return d&&d.indexOf(",")<0&&(s=d),s in ds&&s!==Lr&&(a._gsap.x||ps(a,"x"))?c&&Ed===c?s==="scale"?_g:yg:(Ed=c||{})&&(s==="scale"?xg:wg):a.style&&!rc(a.style[s])?gg:~s.indexOf("-")?vg:Ac(a,s)},core:{_removeProperty:ja,_getMatrix:Uc}};Pr.utils.checkPrefix=Gl,Pr.core.getStyleSaver=Ld,function(x,a,s,c){var d=Cr(x+","+a+","+s,function(u){ds[u]=1});Cr(a,function(u){Hr.units[u]="deg",Nd[u]=1}),jo[d[13]]=x+","+a,Cr(c,function(u){var m=u.split(":");jo[m[1]]=d[m[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),Cr("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(x){Hr.units[x]="px"}),Pr.registerPlugin(Vd);var Vc=Pr.registerPlugin(Vd)||Pr;Vc.core.Tween;class Og{constructor(a,s=!1){window.mars3d?(this.Cesium=window.mars3d.Cesium,this.DynamicMaskingArr=[],this.DynamicMaskingStyle=[],this.canvasClientWidth=a.viewer.canvas.clientWidth,this.canvasClientHeight=a.viewer.canvas.clientHeight,this.oldSet=new Set,this.tweenMap=new Map,this.isDynamicMasking=s):console.error("未引入指定插件")}add(a,s){let c=a.options.symbol.styleOptions.label.font_size,d=a.options.vectorId,u=Number(c)*1.4,m=Number(c)*1.8,g=a.options.symbol.styleOptions.label,{color:_,outlineColor:S,backgroundColor:b}=g;a.eachGraphic(O=>{O.style.label&&this.DynamicMaskingArr.push({id:d,uid:O.id,position:O._getLablePosition(),label:O.name,width:u*O.name.length,height:m,color:_,outline:s.label.outline,outlineColor:S,background:s.label.background,backgroundColor:b,dynamicMaskingColor:{backgroundColor:this.Cesium.Color.fromCssColorString(s.label.backgroundColor),color:this.Cesium.Color.fromCssColorString(s.label.color),outlineColor:this.Cesium.Color.fromCssColorString(s.label.outlineColor)}})}),this.DynamicMaskingStyle.push({vectorId:a.options.vectorId,outline:s.label.outline,background:s.label.background,color:this.Cesium.Color.fromCssColorString(s.label.color),backgroundColor:this.Cesium.Color.fromCssColorString(s.label.backgroundColor),outlineColor:this.Cesium.Color.fromCssColorString(s.label.outlineColor)}),this.oldSet=new Set,this.tweenMap=new Map}remove(a){this.DynamicMaskingArr=this.DynamicMaskingArr.filter(s=>s.id!==a),this.DynamicMaskingStyle=this.DynamicMaskingStyle.filter(s=>s.vectorId!==a),this.oldSet=new Set,this.tweenMap=new Map}modify(a,s){let{label:c}=s;if(c){let{color:d,outline:u,outlineColor:m,background:g,backgroundColor:_}=c;this.DynamicMaskingArr.forEach(S=>{S.id===a&&(d!=null&&(S.color=this.Cesium.Color.fromCssColorString(d),S.dynamicMaskingColor.color=this.Cesium.Color.fromCssColorString(d)),u!=null&&(S.outline=u),m!=null&&(S.outlineColor=this.Cesium.Color.fromCssColorString(m),S.dynamicMaskingColor.outlineColor=this.Cesium.Color.fromCssColorString(m)),g!=null&&(S.background=g),_!=null&&(S.backgroundColor=this.Cesium.Color.fromCssColorString(_),S.dynamicMaskingColor.backgroundColor=this.Cesium.Color.fromCssColorString(_)))})}}getBoundingRectangle(a){var s=this.Cesium.SceneTransforms.wgs84ToWindowCoordinates(window.map.viewer.scene,a.position);return s!==void 0?new this.Cesium.BoundingRectangle(s.x,s.y,a.width,a.height):new this.Cesium.BoundingRectangle(0,0,1,1)}getNonIntersectingRectangles(){let a=[];for(var s=0;s<this.DynamicMaskingArr.length;s++){let d=!1,u=this.DynamicMaskingArr[s],m,g,_;if(g=this.getBoundingRectangle(u),!(g.x<0||g.x>this.canvasClientWidth||g.y<0||g.y>this.canvasClientHeight))if(a.length===0){a.push(s);continue}else{for(var c=0;c<a.length;c++)if(m=this.DynamicMaskingArr[a[c]],_=this.getBoundingRectangle(m),this.Cesium.Intersect.OUTSIDE!==this.Cesium.BoundingRectangle.intersect(g,_)){d=!0;break}d||a.push(s)}}return new Set(a)}ifShow(){if(this.isDynamicMasking){let s={color:.001,outlineColor:.001,backgroundColor:.001},c={color:1,outlineColor:1,backgroundColor:1},d=this.getNonIntersectingRectangles(),u=new Set([...this.oldSet].filter(g=>!d.has(g))),m=new Set([...d].filter(g=>!this.oldSet.has(g)));for(let g of u)if(this.DynamicMaskingArr[g]){if(this.tweenMap.has(g)){var a=this.tweenMap.get(g);a.kill(),this.tweenMap.delete(g)}var a=Vc.to(c,{duration:.2,color:0,outlineColor:0,backgroundColor:0,onUpdate:()=>{var S,b;var _=this.DynamicMaskingArr[g];_.backgroundColor.alpha=c.backgroundColor,_.color.alpha=c.color,_.outlineColor.alpha=c.outlineColor,(b=(S=window.map.getLayer(_.id,"vectorId"))==null?void 0:S.getGraphicByAttr(_.uid))==null||b.setStyle({label:{show:!1,outline:!1,background:!1}})}});this.tweenMap.set(g,a)}for(let g of m)if(this.DynamicMaskingArr[g]){if(this.tweenMap.has(g)){var a=this.tweenMap.get(g);a.kill(),this.tweenMap.delete(g)}let _=this.DynamicMaskingArr[g],{backgroundColor:S,color:b,outlineColor:O}=_.dynamicMaskingColor;var a=Vc.to(s,{duration:.8+Math.random(),color:b.alpha,outlineColor:O.alpha,backgroundColor:S.alpha,onUpdate:()=>{var D,F;_.backgroundColor.alpha=s.backgroundColor,_.color.alpha=s.color,_.outlineColor.alpha=s.outlineColor,(F=(D=window.map.getLayer(_.id,"vectorId"))==null?void 0:D.getGraphicByAttr(_.uid))==null||F.setStyle({label:{show:!0,outline:_.outline,background:_.background,color:_.color,outlineColor:_.outlineColor,backgroundColor:_.backgroundColor}})}});this.tweenMap.set(g,a)}this.oldSet=d}}switchDynamicMasking(a){if(a)window.map.getLayers().forEach(s=>{var c;if((c=s.options)!=null&&c.vectorId){let{color:d,outlineColor:u,backgroundColor:m}=s.options.symbol.styleOptions.label;s.eachGraphic(g=>{g.setStyle({label:{color:d.withAlpha(0),outlineColor:u.withAlpha(.001),backgroundColor:m.withAlpha(.001),show:!1,background:!1,outline:!1}})})}});else if(this.DynamicMaskingStyle.length>0){let s;this.DynamicMaskingStyle.forEach(c=>{let{color:d,outline:u,outlineColor:m,background:g,backgroundColor:_,vectorId:S}=c;s=window.map.getLayer(S,"vectorId"),s&&s.eachGraphic(b=>{b.setStyle({label:{color:d,outlineColor:m,backgroundColor:_,show:!0,background:g,outline:u}})})})}this.isDynamicMasking=a,window.bimVector.switchDynamicMasking(a)}}const Ig=()=>{window.planClip.clearPlanClip(),window.schemeEvnModify.clearAllEvnModify(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""})},Dg=()=>{window.planClip.clearPlanClip(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""})},zg=()=>{window.planClip.clearPlanClip(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""})},kg=x=>{let a=[];if(x.forEach(s=>{let{id:c}=s,d={id:c,mockData:{nextPage:[],item:[],previousPage:[]}};s.operate.forEach((u,m)=>{let g=Wc(u,d.mockData.nextPage);d.mockData.nextPage=g,d.mockData.item=g,d.mockData.previousPage=[]}),a.push(d)}),a.length>1)for(let s=1;s<a.length;s++){let c=a[s].mockData,d=a[s-1].mockData.item;const u=new Map;d.forEach(m=>{m.type!="rotatePoint"&&m.type!="viewpoint"&&m.type!="roaming"&&m.type!="splitScreen"&&m.type!="planClip"&&m.type!="editor"?u.set(`${m.screenplayId}-${m.type}`,m):a[s].mockData.previousPage.push(m)}),c.nextPage.forEach(m=>{const g=`${m.screenplayId}-${m.type}`;let _={...u.get(g)};if(u.has(g)){if(m.type=="flight")a[s].mockData.previousPage.unshift(u.get(g)),_=m;else{let S={};Object.keys(m).forEach(b=>{if(b!="screenplayId"&&b!="type")if(u.get(g)[b])if(Object.keys(S).length==0&&(S={screenplayId:m.screenplayId,type:m.type}),b=="clip"||b=="flat"){_[b]=Wd(u.get(g)[b],m[b]);let O={screenplayId:m.screenplayId,type:m.type};O[b]={},Object.keys(m[b]).forEach(k=>{u.get(g)[b][k]?O[b][k]=u.get(g)[b][k]:m[b][k]=="true"&&(O[b][k]="false")}),S={...O,...S}}else S[b]=u.get(g)[b],_[b]=m[b];else a[s].mockData.previousPage.some(O=>O.screenplayId===m.screenplayId)||(console.log("未找到操作"),S={...jd(m,b),...S}),_[b]=m[b]}),Object.keys(S).length>0&&a[s].mockData.previousPage.push(S)}u.set(g,_)}else{console.log("未找到操作");let S=jd(m);S&&a[s].mockData.previousPage.push(S),u.set(g,m)}}),a[s].mockData.item=Array.from(u.values())}return console.log("-----------最后输出-----------"),console.log(a),console.log("-----------最后输出-----------"),a},Wc=(x,a=null)=>{let{executionProperty:s,screenplayId:c,property:d,type:u,delay:m,delayTime:g}=x;if((d=="add"||d==!0)&&(d="true"),(d=="remove"||d==!1)&&(d="false"),u=="pit"){let S=window.schemeEvnModify.getModelModifyDataForInitModelById(c);if(S){let b={};b[c]=d,d=b,c=S.modelId,s=S.type}}let _;if(c==""||c=="map")if(c="map",u=="splitScreen"){let{splitScreenMode:S,splitScreenModePercentage:b}=JSON.parse(d);a.push({screenplayId:c,type:u,executionProperty:{splitScreenMode:S,splitScreenModePercentage:b,mapClone:[]}});let{mainScreen:O,secondaryScreen:k}=JSON.parse(x.property);O.forEach(F=>{Wc(F,a)});let D=a.find(F=>F.type=="splitScreen");k.forEach(F=>{Wc(F,D.executionProperty.mapClone)})}else _={screenplayId:c,type:u,executionProperty:d},(s=="clip"||s=="flat")&&(_[s]=d),m&&(_.delay=m),g&&(_.delayTime=g),a&&(u=="flight"?a.unshift(_):a.push(_));else _=a?a.find(S=>S.screenplayId==c):null,_?(s=="clip"||s=="flat"?_[s]?_[s]=Wd(_[s],d):(_[s]=d,_.type="model"):_[s]=d,m&&(_[s].delay=m),g&&(_[s].delayTime=g)):(_={screenplayId:c,type:u},m&&(_.delay=m),g&&(_.delayTime=g),s=="clip"||s=="flat"?(_[s]=d,_.type="model"):_[s]=d,a&&(u=="flight"?a.unshift(_):a.push(_)));return a||_},Wd=(x,a)=>{const s={...x};for(const c in a)a.hasOwnProperty(c)&&(s[c]=a[c]);return s},jd=(x,a="all")=>{let{type:s,show:c,screenplayId:d,overallStaining:u,clip:m,flat:g}=x,_={};if(a=="all")switch(s){case"model":case"shp":case"plot":c&&c=="true"&&(_={screenplayId:d,type:s,show:"false"}),c&&c=="false"&&console.error("map上没有添加此对象"),u&&(_={..._,screenplayId:d,type:s,overallStaining:"false"}),m&&(_={..._,screenplayId:d,type:s,clip:"false"}),g&&(_={..._,screenplayId:d,type:s,flat:"false"});break;case"terrain":_={screenplayId:d,type:s,executionProperty:"true"};break;case"pit":_={screenplayId:d,type:s,executionProperty:"false"};break;case"underground":_={screenplayId:d,type:s,executionProperty:"1"};break}else switch(a){case"clip":case"flat":case"overallStaining":_={screenplayId:d,type:s},_[a]="false";break}return Object.keys(_).length>0?_:null},Bg=(x,a)=>{const s={};return Object.keys(a).forEach(c=>{x.hasOwnProperty(c)&&(s[c]=x[c])}),s},Ng=x=>/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(0|1|0\.\d+)\s*\)$/i.test(x),Fg=x=>{let a={};(x==null?void 0:x.length)>0&&x[0].operate.forEach(s=>{let{executionProperty:c,screenplayId:d,property:u,type:m}=s;(c=="show"||c=="overallStaining")&&(a[d]||(a[d]={type:m}),a[d][u]=c)}),window.map.getLayers().forEach(s=>{if((s.type=="3dtiles"||s.type=="geojson")&&s.options.name!="国界"){let c=s.options.modelId||s.options.vectorId;a[c]?window.bimModel.editColor(c):s.remove()}}),window.bimEntity.entityLayer.getGraphicsByAttr().forEach(s=>{s.remove()}),window.bimMapSetUp.undergroundVal(1),window.bimTerrainProvider.show(),window.bimTrafficSimulation.destruction(),window.bimRotatePoint.stop(),window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.planClip.clearPlanClip()};class Ug{constructor(a){Pl(this,"terrainCutById",(a,s,c)=>{switch(c==null?void 0:c.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone||this.terrainClipClone.list.find(d=>d.id==s))return;this.terrainClipClone.addArea(a.length>1?a:a[0],{id:s});break;case!1:if(!this.terrainClip||this.terrainClip.list.find(d=>d.id==s))return;this.terrainClip.addArea(a.length>1?a:a[0],{id:s});break}});Pl(this,"clearTerrainCutById",(a,s)=>{switch(s==null?void 0:s.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone)return;this.terrainClipClone.removeArea(a);break;case!1:if(!this.terrainClip)return;this.terrainClip.removeArea(a);break}});Pl(this,"terrainFlattenById",(a,s,c,d)=>{switch(d==null?void 0:d.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainFlatClone||this.terrainFlatClone.list.find(u=>u.id==c))return;this.terrainFlatClone.addArea(a.length>1?a:a[0],{id:c,height:s});break;case!1:if(!this.terrainFlat||this.terrainFlat.list.find(u=>u.id==c))return;this.terrainFlat.addArea(a.length>1?a:a[0],{id:c,height:s});break}});Pl(this,"clearTerrainFlattenById",(a,s)=>{switch(s==null?void 0:s.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainFlatClone)return;this.terrainFlatClone.removeArea(a);break;case!1:if(!this.terrainFlat)return;this.terrainFlat.removeArea(a);break}});this.flattenedEvnModifyData=a,this.modelIdListByModify=[],this.modelIdListByModifyClone=[],this.terrainClip=null,this.terrainFlat=null,this.terrainClipClone=null,this.terrainFlatClone=null,this.createTerrainModifyInstance()}getDataFromFlattenedEvnModifyListById(a){const s=this.flattenedEvnModifyData.find(c=>c.id==a);return s?(s.id=s.id.toString(),s):null}getModelFromMapById(a,s){let c;switch(s==null?void 0:s.isClone){case!0:c=window.mapClone?window.mapClone.mapEx.getLayers():[];break;case!1:c=window.map.getLayers();break}return c.find(u=>u.options.modelId==a)}updateFlattenedEvnModifyData(a){this.flattenedEvnModifyData=a}modelCutById(a,s,c,d){const u=this.getModelFromMapById(a,d);if(u&&!u.clip.list.find(m=>m.id==c))switch(u.clip.addArea(s.length>1?s:s[0],{id:c}),d==null?void 0:d.isClone){case!0:this.modelIdListByModifyClone.push(a),this.modelIdListByModifyClone=[...new Set(this.modelIdListByModifyClone)];break;case!1:this.modelIdListByModify.push(a),this.modelIdListByModify=[...new Set(this.modelIdListByModify)];break}}modelFlattenById(a,s,c,d,u){const m=this.getModelFromMapById(a,u);if(m&&!m.flat.list.find(g=>g.id==d))switch(m.flat.addArea(s.length>1?s:s[0],{height:c,id:d}),u==null?void 0:u.isClone){case!0:this.modelIdListByModifyClone.push(a),this.modelIdListByModifyClone=[...new Set(this.modelIdListByModifyClone)];break;case!1:this.modelIdListByModify.push(a),this.modelIdListByModify=[...new Set(this.modelIdListByModify)];break}}clearModelCutById(a,s,c){const d=this.getModelFromMapById(a,c);if(d)switch(d.clip.removeArea(s),c.isClone){case!0:this.modelIdListByModifyClone=this.modelIdListByModifyClone.filter(u=>u!=a);break;case!1:this.modelIdListByModify=this.modelIdListByModify.filter(u=>u!=a);break}}clearModelFlattenById(a,s,c){const d=this.getModelFromMapById(a,c);if(d)switch(d.flat.removeArea(s),c==null?void 0:c.isClone){case!0:this.modelIdListByModifyClone=this.modelIdListByModifyClone.filter(u=>u!=a);break;case!1:this.modelIdListByModify=this.modelIdListByModify.filter(u=>u!=a);break}}createTerrainModifyInstance(){if(window.map.thing.terrainClip)this.terrainClip=window.map.thing.terrainClip;else{const a=new mars3d.thing.TerrainClip({czm:!1,splitNum:30});window.map.addThing(a),this.terrainClip=a}if(window.map.thing.terrainFlat)this.terrainFlat=window.map.thing.terrainFlat;else{const a=new mars3d.thing.TerrainFlat({splitNum:80});window.map.addThing(a),this.terrainFlat=a}}createTerrainModifyInstanceClone(){if(window.mapClone){if(window.mapClone.mapEx.thing.terrainClip)this.terrainClipClone=window.mapClone.mapEx.thing.terrainClip;else{const a=new mars3d.thing.TerrainClip({splitNum:80});window.mapClone.mapEx.addThing(a),this.terrainClipClone=a}if(window.mapClone.mapEx.thing.terrainFlat)this.terrainFlatClone=window.mapClone.mapEx.thing.terrainFlat;else{const a=new mars3d.thing.TerrainFlat({splitNum:80});window.mapClone.mapEx.addThing(a),this.terrainFlatClone=a}}}evnModifyById(a,s){s=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:d,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const _=JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates,S=_[0].length>1?_[0]:_[0][0],b=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,O=c.bimEnvModifyData[g].id.toString();u===0&&m===0?this.modelCutById(d,S,O,s):u===0&&m===1?this.modelFlattenById(d,S,b,O,s):u===1&&m===0?this.terrainCutById(S,O,s):u===1&&m===1&&this.terrainFlattenById(S,b,O,s)}}evnModifyByIdAndAddOptionsToStore(a,s){s=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:d,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const _=JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates,S=_[0].length>1?_[0]:_[0][0],b=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,O=c.bimEnvModifyData[g].id.toString();u===0&&m===0?this.modelCutById(d,S,O,s):u===0&&m===1?this.modelFlattenById(d,S,b,O,s):u===1&&m===0?this.terrainCutById(S,O,s):u===1&&m===1&&this.terrainFlattenById(S,b,O,s)}}clearEvnModifyById(a,s){s=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:d,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const _=c.bimEnvModifyData[g].id.toString();u===0&&m===0?this.clearModelCutById(d,_,s):u===0&&m===1?this.clearModelFlattenById(d,_,s):u===1&&m===0?this.clearTerrainCutById(_,s):u===1&&m===1&&this.clearTerrainFlattenById(_,s)}}clearAllModelModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:this.modelIdListByModifyClone.forEach(s=>{const c=this.getModelFromMapById(s,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModifyClone=[];break;case!1:this.modelIdListByModify.forEach(s=>{const c=this.getModelFromMapById(s,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModify=[];break}}clearAllTerrainModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:this.terrainClip&&this.terrainClip.clear(),this.terrainFlat&&this.terrainFlat.clear();break;case!1:window.mapClone||(this.terrainClipClone=null,this.terrainFlatClone=null),this.terrainClipClone&&this.terrainClipClone.clear(),this.terrainFlatClone&&this.terrainFlatClone.clear();break}}getModelModifyDataForInitModelById(a){const s=this.getDataFromFlattenedEvnModifyListById(a);if(!s)return;const{bimEnvModify:{embsId:c,dataType:d,modifyType:u}}=s;if(d===0&&u===0){const m={modelId:c,type:"clip",area:[]};for(let g=0;g<s.bimEnvModifyData.length;g++){let _=JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates[0];_=_.length>1?_:_[0];const S={positions:_,id:s.bimEnvModifyData[g].id.toString()};m.area.push(S)}return m}else if(d===0&&u===1){const m={modelId:c,type:"flat",area:[]};for(let g=0;g<s.bimEnvModifyData.length;g++){let _=JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates[0];_=_.length>1?_:_[0];const S={id:s.bimEnvModifyData[g].id.toString(),positions:JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates[0],height:JSON.parse(s.bimEnvModifyData[g].modifyData).depth};return m.area.push(S),m}}}clearAllEvnModify(){this.clearAllModelModify({isClone:!0}),this.clearAllModelModify({isClone:!1}),this.clearAllTerrainModify({isClone:!0}),this.clearAllTerrainModify({isClone:!1})}destroyTerrainModifyInstance(){this.clearAllTerrainModify({isClone:!0}),this.clearAllTerrainModify({isClone:!1}),this.terrainClip&&window.map.removeThing(this.terrainClip,!0),this.terrainFlat&&window.map.removeThing(this.terrainFlat,!0),this.terrainClipClone&&window.mapClone.mapEx.removeThing(this.terrainClipClone,!0),this.terrainFlatClone&&window.mapClone.mapEx.removeThing(this.terrainFlatClone,!0),this.terrainClip=null,this.terrainFlat=null,this.terrainClipClone=null,this.terrainFlatClone=null}}let Hl=null,ms=null,ia=null;class Gg{constructor(){mars3d&&(this.projectId=parseInt(window.sessionStorage.getItem("nowProjectId")),this.viewPoints=new Array,this.roaming=null)}init(a,s,c){ms=new mars3d.layer.GraphicLayer({isContinued:!0});var d=this;window.map.addLayer(ms),ms.on(mars3d.EventType.drawCreated,function(u){var m=u.graphic.point;console.log(m),s(m),setTimeout(()=>{d.startDrawGraphic()},500)}),ms.on(mars3d.EventType.editStop,function(u){console.log("停止编辑",u)}),ia=c,Hl=new mars3d.layer.GraphicLayer,window.map.addLayer(Hl),a&&(this.viewPoints=a.filter((u,m)=>{if(m%(ia.smooth*1)==0)return u})),this.addGraphicLayer(this.viewPoints)}addDemoGraphic1(a,s){const c=new mars3d.graphic.PolylinePrimitive({positions:a.map(d=>[d.lng,d.lat,d.alt+1e3]),style:{width:10,materialType:mars3d.MaterialType.LineFlow,materialOptions:{color:"red",image:s+"img/line/line-arrow-blue.png",speed:10,repeat:new Cesium.Cartesian2(5,1),mixt:!0}}});Hl.addGraphic(c)}addGraphicLayer(a){var s={};ia.Viewovalue==1?s={camera:{type:"dy",followedX:ia.followedX,followedZ:ia.followedZ},interpolation:!0,interpolationDegree:6,autoMiddleDynamicPosition:!0,interpolationAlgorithm:Cesium.HermitePolynomialApproximation}:ia.Viewovalue==2?s={camera:{type:"gs",pitch:-30,radius:500},interpolation:!0,interpolationDegree:2,clockLoop:!0,path:{width:3,color:Cesium.Color.fromCssColorString("#ff0000").withAlpha(.5)}}:s={camera:{type:"sd",followedZ:ia.followedZ},polyline:{width:3,color:Cesium.Color.fromCssColorString("#ff0000").withAlpha(.5)}},a=a.map(c=>[c.lng,c.lat,c.alt]),a.length,this.fixedRoute=new mars3d.graphic.FixedRoute({name:"贴地表表面漫游",speed:ia.speed,autoStop:!0,positions:a,offsetHeight:1.6,clockLoop:!0,...s}),Hl.addGraphic(this.fixedRoute)}addDemoGraphic(a,s){const c=new mars3d.graphic.BillboardEntity({position:new mars3d.LngLatPoint(a.lng,a.lat,a.alt),style:{width:30,height:32,image:"/img/marker/markffd700.png",scale:1,scaleByDistance:!1,scaleByDistance_far:1e6,scaleByDistance_farValue:.1,scaleByDistance_near:1e3,scaleByDistance_nearValue:1,distanceDisplayCondition:!1,distanceDisplayCondition_far:2e6,distanceDisplayCondition_near:0,clampToGround:!1,visibleDepth:!1,drawShow:!0}});ms.addGraphic(c)}startDrawGraphic(a){ms.startDraw({type:"billboard",style:{width:30,height:32,image:"/img/marker/markffd700.png",scale:1,scaleByDistance:!1,scaleByDistance_far:1e6,scaleByDistance_farValue:.1,scaleByDistance_near:1e3,scaleByDistance_nearValue:1,distanceDisplayCondition:!1,distanceDisplayCondition_far:2e6,distanceDisplayCondition_near:0,clampToGround:!1,visibleDepth:!1,drawShow:!0,classificationType:Cesium.ClassificationType.TERRAIN}}).then(s=>{console.log(123)})}start(){console.log(this.fixedRoute),this.fixedRoute&&(this.fixedRoute.start(),window.map.scene.screenSpaceCameraController.enableCollisionDetection=!1)}pause(){this.fixedRoute&&this.fixedRoute.pause()}resume(){this.fixedRoute&&this.fixedRoute.proceed()}stop(){this.fixedRoute&&this.fixedRoute.stop()}remove(){this.fixedRoute&&this.fixedRoute.stop(),window.map.removeThing(this.roaming,!0),window.map.removeLayer(Hl,!0),window.map.removeLayer(ms,!0),this.viewPoints=[],window.map.scene.screenSpaceCameraController.enableCollisionDetection=!0}removeCameraRoute(){Hl.clear(),ms.clear()}removegraphicLayerpoint(){ms.clear()}}class Hg{constructor(a){window.mars3d&&(this.beginDate="",this.endDate="",this.trafficSimulationLayer,this.trafficSimulationArr=[],this.style={width:4,materialType:window.mars3d.MaterialType.LineFlow,materialOptions:{color:"#4ac2ff",image:a+"img/textures/line-arrow-right.png",repeat_x:20,repeat_y:1,speed:20},clampToGround:!1,allowDrillPick:!1},this.vehicleSum=100,this.automobileList=[{url:a+"gltf/cart/suv.gltf"},{url:a+"gltf/cart/red_car.gltf"},{url:a+"gltf/cart/benchi3.gltf"},{url:a+"gltf/cart/suv.gltf"},{url:a+"gltf/cart/red_car.gltf"},{url:a+"gltf/cart/benchi3.gltf"},{url:a+"gltf/cart/aodi1.gltf"},{url:a+"gltf/cart/kache3.gltf"},{url:a+"gltf/cart/bus2.gltf"},{url:a+"gltf/cart/jiaobanche.glb"}],this._czmlLayer,this._czmlLayerArr=[])}init(a){this.trafficSimulationLayer=new window.mars3d.layer.GraphicLayer({temporaryLayer:"trafficSimulation"}),window.map.addLayer(this.trafficSimulationLayer),window.map.bimMapEdit="1",a&&(this._czmlLayerArr=a)}addLine(a){let s=a;return new Promise(c=>{this.trafficSimulationLayer.startDraw({type:"polylineP",attr:{trafficSimulationId:s},style:{...this.style}}).then(d=>{c({id:s,pointSet:d.coordinates,speed:45,interval:1})})})}initLine(a){let s;a.forEach(c=>{let{id:d}=c;s=new window.mars3d.graphic.PolylinePrimitive({positions:c.pointSet,attr:{trafficSimulationId:d},style:{...this.style}}),this.trafficSimulationLayer.addGraphic(s)})}positionLine(a){let s=this.queryTrafficSimulationLine(a);s&&s.flyTo({scale:2})}deleteLine(a){let s=this.queryTrafficSimulationLine(a);s&&s.remove()}queryTrafficSimulationArr(){return this.trafficSimulationArr}queryTrafficSimulationLine(a){if(this.trafficSimulationLayer)return this.trafficSimulationLayer.getGraphicByAttr(a,"trafficSimulationId")}editTrafficSimulationLine(a,s=!0){let c=this.queryTrafficSimulationLine(a);s?(c.setStyle({materialOptions:{color:"#ff0000"}}),c.startEditing()):(c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing())}queryCzml(a){return this._czmlLayerArr.length==0?!1:this._czmlLayerArr.find(s=>s.id==a)}start(a="add"){this.destruction(),this.beginDate=new Date().toISOString();let s=new Date,c=s.getDate();s.setDate(c+1),this.endDate=s.toISOString(),console.log(this.queryCzml(a)),this.queryCzml(a)?this.trafficSimulationArr=JSON.parse(this.queryCzml(a).route):this.trafficSimulationArr=[],this.processingData(a)}selected(){this._czmlLayer&&this._czmlLayer.flyTo()}destruction(){this.trafficSimulationLayer.clear(),this.trafficSimulationLayer.remove(),this._czmlLayer&&(this._czmlLayer.clear(),this._czmlLayer.remove()),window.map.bimMapEdit="0"}processingData(a){let s=[{version:"1.0",id:"document",clock:{interval:`${this.beginDate}/${this.endDate}`,currentTime:this.beginDate,multiplier:1},style:{distanceDisplayCondition:!0,distanceDisplayCondition_far:1e6,distanceDisplayCondition_near:0}}],c=[],d=JSON.parse(JSON.stringify(this.trafficSimulationArr)),u=0;d.forEach((g,_)=>{let S=0,b=0,{pointSet:O,interval:k,speed:D}=g;for(let F=1;F<=this.vehicleSum;F++){let E=JSON.parse(JSON.stringify(O));E.forEach((T,M)=>{M>0&&(u=parseFloat((this.disTance(T,E[M-1].slice(1))/D).toFixed(2)),S+=u),M==0&&(S=b),T.unshift(S)}),b+=k,c=E.reduce((T,M)=>T.concat(M));let L={name:`${_}-${F}`,availability:`${this.beginDate}/${this.endDate}`,orientation:{velocityReference:"#position"},position:{epoch:this.beginDate,cartographicDegrees:c},style:{minimumPixelSize:100,distanceDisplayCondition:!0,distanceDisplayCondition_near:0,distanceDisplayCondition_far:1300,distanceDisplayPoint:{color:"#00ff00",pixelSize:8}},model:{show:!0,gltf:this.randomVehicle(),heightReference:window.Cesium.HeightReference.CLAMP_TO_GROUND,clampToGround:!0,scale:.6,minimumPixelSize:100,maximumScale:1.5}};s.push(L)}});let m={name:"交通模拟",czmlId:a,data:s,autoUpdateClock:!1};this._czmlLayer=new window.mars3d.layer.CzmlLayer(m),window.map.addLayer(this._czmlLayer)}disTance(a,s){let c,d,u;return c=window.Cesium.Cartesian3.fromDegrees(...a),d=window.Cesium.Cartesian3.fromDegrees(...s),u=window.Cesium.Cartesian3.distance(c,d),u}randomVehicle(){let a=Math.round(Math.random()*(this.automobileList.length-1));return this.automobileList[a].url}}const Vg=[Tf,Ef],Wg={continuation:null,mapModali:null,install(x){if(Vg.forEach((m,g)=>{x.component(m.name,m)}),this.continuation){x.config.globalProperties.$continuation=this.continuation;return}let a=oi.createApp(Mf),s=document.createElement("div"),c=document.body;if(c.appendChild(s),this.loading=a.mount(s),x.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){x.config.globalProperties.$mapModali=this.mapModali;return}let d=oi.createApp(Sf),u=document.createElement("div");c.appendChild(u),this.mapModali=d.mount(u),x.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};Pi.BimBackgroundPlate=Ef,Pi.BimCutscenes=Mf,Pi.BimElevationImage=um,Pi.BimEntity=fm,Pi.BimModel=sm,Pi.BimModify=Ug,Pi.BimTerrainProvider=hm,Pi.BimTrafficSimulation=Hg,Pi.BimVector=lm,Pi.Bimroaming=Gg,Pi.Button=Tf,Pi.ChbimPlugins=Wg,Pi.DynamicMasking=Og,Pi.MapModali=Sf,Pi.PanoramicView=vm,Pi.ViewShed=cm,Pi.getSameKeyData=Bg,Pi.init=Ig,Pi.initMap=Fg,Pi.isValidRGBA=Ng,Pi.nextPage=zg,Pi.operateMapData=kg,Pi.previousPage=Dg,Object.defineProperty(Pi,Symbol.toStringTag,{value:"Module"})});
2702
+ */var Sd,Qs,Nl,Ic,Wa,Ed,Dc,ug=function(){return typeof window<"u"},ds={},ja=180/Math.PI,Fl=Math.PI/180,Ul=Math.atan2,bd=1e8,zc=/([A-Z])/g,cg=/(left|right|width|margin|padding|x)/i,fg=/[\s,\(]\S/,jo={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},kc=function(a,s){return s.set(s.t,s.p,Math.round((s.s+s.c*a)*1e4)/1e4+s.u,s)},dg=function(a,s){return s.set(s.t,s.p,a===1?s.e:Math.round((s.s+s.c*a)*1e4)/1e4+s.u,s)},pg=function(a,s){return s.set(s.t,s.p,a?Math.round((s.s+s.c*a)*1e4)/1e4+s.u:s.b,s)},mg=function(a,s){var c=s.s+s.c*a;s.set(s.t,s.p,~~(c+(c<0?-.5:.5))+s.u,s)},Cd=function(a,s){return s.set(s.t,s.p,a?s.e:s.b,s)},Ad=function(a,s){return s.set(s.t,s.p,a!==1?s.b:s.e,s)},gg=function(a,s,c){return a.style[s]=c},vg=function(a,s,c){return a.style.setProperty(s,c)},yg=function(a,s,c){return a._gsap[s]=c},_g=function(a,s,c){return a._gsap.scaleX=a._gsap.scaleY=c},xg=function(a,s,c,d,u){var m=a._gsap;m.scaleX=m.scaleY=c,m.renderTransform(u,m)},wg=function(a,s,c,d,u){var m=a._gsap;m[s]=c,m.renderTransform(u,m)},pn="transform",Lr=pn+"Origin",Tg=function x(a,s){var c=this,d=this.target,u=d.style,m=d._gsap;if(a in ds&&u){if(this.tfm=this.tfm||{},a!=="transform")a=jo[a]||a,~a.indexOf(",")?a.split(",").forEach(function(g){return c.tfm[g]=ps(d,g)}):this.tfm[a]=m.x?m[a]:ps(d,a),a===Lr&&(this.tfm.zOrigin=m.zOrigin);else return jo.transform.split(",").forEach(function(g){return x.call(c,g,s)});if(this.props.indexOf(pn)>=0)return;m.svg&&(this.svgo=d.getAttribute("data-svg-origin"),this.props.push(Lr,s,"")),a=pn}(u||s)&&this.props.push(a,s,u[a])},Pd=function(a){a.translate&&(a.removeProperty("translate"),a.removeProperty("scale"),a.removeProperty("rotate"))},Mg=function(){var a=this.props,s=this.target,c=s.style,d=s._gsap,u,m;for(u=0;u<a.length;u+=3)a[u+1]?s[a[u]]=a[u+2]:a[u+2]?c[a[u]]=a[u+2]:c.removeProperty(a[u].substr(0,2)==="--"?a[u]:a[u].replace(zc,"-$1").toLowerCase());if(this.tfm){for(m in this.tfm)d[m]=this.tfm[m];d.svg&&(d.renderTransform(),s.setAttribute("data-svg-origin",this.svgo||"")),u=Dc(),(!u||!u.isStart)&&!c[pn]&&(Pd(c),d.zOrigin&&c[Lr]&&(c[Lr]+=" "+d.zOrigin+"px",d.zOrigin=0,d.renderTransform()),d.uncache=1)}},Ld=function(a,s){var c={target:a,props:[],revert:Mg,save:Tg};return a._gsap||Pr.core.getCache(a),s&&s.split(",").forEach(function(d){return c.save(d)}),c},Rd,Bc=function(a,s){var c=Qs.createElementNS?Qs.createElementNS((s||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),a):Qs.createElement(a);return c&&c.style?c:Qs.createElement(a)},Xo=function x(a,s,c){var d=getComputedStyle(a);return d[s]||d.getPropertyValue(s.replace(zc,"-$1").toLowerCase())||d.getPropertyValue(s)||!c&&x(a,Gl(s)||s,1)||""},Od="O,Moz,ms,Ms,Webkit".split(","),Gl=function(a,s,c){var d=s||Wa,u=d.style,m=5;if(a in u&&!c)return a;for(a=a.charAt(0).toUpperCase()+a.substr(1);m--&&!(Od[m]+a in u););return m<0?null:(m===3?"ms":m>=0?Od[m]:"")+a},Nc=function(){ug()&&window.document&&(Sd=window,Qs=Sd.document,Nl=Qs.documentElement,Wa=Bc("div")||{style:{}},Bc("div"),pn=Gl(pn),Lr=pn+"Origin",Wa.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Rd=!!Gl("perspective"),Dc=Pr.core.reverting,Ic=1)},Fc=function x(a){var s=Bc("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),c=this.parentNode,d=this.nextSibling,u=this.style.cssText,m;if(Nl.appendChild(s),s.appendChild(this),this.style.display="block",a)try{m=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=x}catch{}else this._gsapBBox&&(m=this._gsapBBox());return c&&(d?c.insertBefore(this,d):c.appendChild(this)),Nl.removeChild(s),this.style.cssText=u,m},Id=function(a,s){for(var c=s.length;c--;)if(a.hasAttribute(s[c]))return a.getAttribute(s[c])},Dd=function(a){var s;try{s=a.getBBox()}catch{s=Fc.call(a,!0)}return s&&(s.width||s.height)||a.getBBox===Fc||(s=Fc.call(a,!0)),s&&!s.width&&!s.x&&!s.y?{x:+Id(a,["x","cx","x1"])||0,y:+Id(a,["y","cy","y1"])||0,width:0,height:0}:s},zd=function(a){return!!(a.getCTM&&(!a.parentNode||a.ownerSVGElement)&&Dd(a))},Xa=function(a,s){if(s){var c=a.style,d;s in ds&&s!==Lr&&(s=pn),c.removeProperty?(d=s.substr(0,2),(d==="ms"||s.substr(0,6)==="webkit")&&(s="-"+s),c.removeProperty(d==="--"?s:s.replace(zc,"-$1").toLowerCase())):c.removeAttribute(s)}},ta=function(a,s,c,d,u,m){var g=new Ar(a._pt,s,c,0,1,m?Ad:Cd);return a._pt=g,g.b=d,g.e=u,a._props.push(c),g},kd={deg:1,rad:1,turn:1},Sg={grid:1,flex:1},ea=function x(a,s,c,d){var u=parseFloat(c)||0,m=(c+"").trim().substr((u+"").length)||"px",g=Wa.style,_=cg.test(s),S=a.tagName.toLowerCase()==="svg",b=(S?"client":"offset")+(_?"Width":"Height"),I=100,k=d==="px",D=d==="%",F,E,L,T;if(d===m||!u||kd[d]||kd[m])return u;if(m!=="px"&&!k&&(u=x(a,s,c,"px")),T=a.getCTM&&zd(a),(D||m==="%")&&(ds[s]||~s.indexOf("adius")))return F=T?a.getBBox()[_?"width":"height"]:a[b],Rn(D?u/F*I:u/100*F);if(g[_?"width":"height"]=I+(k?m:d),E=~s.indexOf("adius")||d==="em"&&a.appendChild&&!S?a:a.parentNode,T&&(E=(a.ownerSVGElement||{}).parentNode),(!E||E===Qs||!E.appendChild)&&(E=Qs.body),L=E._gsap,L&&D&&L.width&&_&&L.time===Xr.time&&!L.uncache)return Rn(u/L.width*I);if(D&&(s==="height"||s==="width")){var M=a.style[s];a.style[s]=I+d,F=a[b],M?a.style[s]=M:Xa(a,s)}else(D||m==="%")&&!Sg[Xo(E,"display")]&&(g.position=Xo(a,"position")),E===a&&(g.position="static"),E.appendChild(Wa),F=Wa[b],E.removeChild(Wa),g.position="absolute";return _&&D&&(L=Na(E),L.time=Xr.time,L.width=E[b]),Rn(k?F*u/I:F&&u?I/F*u:0)},ps=function(a,s,c,d){var u;return Ic||Nc(),s in jo&&s!=="transform"&&(s=jo[s],~s.indexOf(",")&&(s=s.split(",")[0])),ds[s]&&s!=="transform"?(u=Lh(a,d),u=s!=="transformOrigin"?u[s]:u.svg?u.origin:Mu(Xo(a,Lr))+" "+u.zOrigin+"px"):(u=a.style[s],(!u||u==="auto"||d||~(u+"").indexOf("calc("))&&(u=Tu[s]&&Tu[s](a,s,c)||Xo(a,s)||Uf(a,s)||(s==="opacity"?1:0))),c&&!~(u+"").trim().indexOf(" ")?ea(a,s,u,c)+c:u},Eg=function(a,s,c,d){if(!c||c==="none"){var u=Gl(s,a,1),m=u&&Xo(a,u,1);m&&m!==c?(s=u,c=m):s==="borderColor"&&(c=Xo(a,"borderTopColor"))}var g=new Ar(this._pt,a.style,s,0,1,xd),_=0,S=0,b,I,k,D,F,E,L,T,M,R,C,U;if(g.b=c,g.e=d,c+="",d+="",d==="auto"&&(E=a.style[s],a.style[s]=d,d=Xo(a,s)||d,E?a.style[s]=E:Xa(a,s)),b=[c,d],ud(b),c=b[0],d=b[1],k=c.match(Ol)||[],U=d.match(Ol)||[],U.length){for(;I=Ol.exec(d);)L=I[0],M=d.substring(_,I.index),F?F=(F+1)%5:(M.substr(-5)==="rgba("||M.substr(-5)==="hsla(")&&(F=1),L!==(E=k[S++]||"")&&(D=parseFloat(E)||0,C=E.substr((D+"").length),L.charAt(1)==="="&&(L=Il(D,L)+C),T=parseFloat(L),R=L.substr((T+"").length),_=Ol.lastIndex-R.length,R||(R=R||Hr.units[s]||C,_===d.length&&(d+=R,g.e+=R)),C!==R&&(D=ea(a,s,E,R)||0),g._pt={_next:g._pt,p:M||S===1?M:",",s:D,c:T-D,m:F&&F<4||s==="zIndex"?Math.round:0});g.c=_<d.length?d.substring(_,d.length):""}else g.r=s==="display"&&d==="none"?Ad:Cd;return If.test(d)&&(g.e=0),this._pt=g,g},Bd={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},bg=function(a){var s=a.split(" "),c=s[0],d=s[1]||"50%";return(c==="top"||c==="bottom"||d==="left"||d==="right")&&(a=c,c=d,d=a),s[0]=Bd[c]||c,s[1]=Bd[d]||d,s.join(" ")},Cg=function(a,s){if(s.tween&&s.tween._time===s.tween._dur){var c=s.t,d=c.style,u=s.u,m=c._gsap,g,_,S;if(u==="all"||u===!0)d.cssText="",_=1;else for(u=u.split(","),S=u.length;--S>-1;)g=u[S],ds[g]&&(_=1,g=g==="transformOrigin"?Lr:pn),Xa(c,g);_&&(Xa(c,pn),m&&(m.svg&&c.removeAttribute("transform"),Lh(c,1),m.uncache=1,Pd(d)))}},Tu={clearProps:function(a,s,c,d,u){if(u.data!=="isFromStart"){var m=a._pt=new Ar(a._pt,s,c,0,0,Cg);return m.u=d,m.pr=-10,m.tween=u,a._props.push(c),1}}},Ph=[1,0,0,1,0,0],Nd={},Fd=function(a){return a==="matrix(1, 0, 0, 1, 0, 0)"||a==="none"||!a},Ud=function(a){var s=Xo(a,pn);return Fd(s)?Ph:s.substr(7).match(Of).map(Rn)},Uc=function(a,s){var c=a._gsap||Na(a),d=a.style,u=Ud(a),m,g,_,S;return c.svg&&a.getAttribute("transform")?(_=a.transform.baseVal.consolidate().matrix,u=[_.a,_.b,_.c,_.d,_.e,_.f],u.join(",")==="1,0,0,1,0,0"?Ph:u):(u===Ph&&!a.offsetParent&&a!==Nl&&!c.svg&&(_=d.display,d.display="block",m=a.parentNode,(!m||!a.offsetParent)&&(S=1,g=a.nextElementSibling,Nl.appendChild(a)),u=Ud(a),_?d.display=_:Xa(a,"display"),S&&(g?m.insertBefore(a,g):m?m.appendChild(a):Nl.removeChild(a))),s&&u.length>6?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)},Gc=function(a,s,c,d,u,m){var g=a._gsap,_=u||Uc(a,!0),S=g.xOrigin||0,b=g.yOrigin||0,I=g.xOffset||0,k=g.yOffset||0,D=_[0],F=_[1],E=_[2],L=_[3],T=_[4],M=_[5],R=s.split(" "),C=parseFloat(R[0])||0,U=parseFloat(R[1])||0,N,X,K,Z;c?_!==Ph&&(X=D*L-F*E)&&(K=C*(L/X)+U*(-E/X)+(E*M-L*T)/X,Z=C*(-F/X)+U*(D/X)-(D*M-F*T)/X,C=K,U=Z):(N=Dd(a),C=N.x+(~R[0].indexOf("%")?C/100*N.width:C),U=N.y+(~(R[1]||R[0]).indexOf("%")?U/100*N.height:U)),d||d!==!1&&g.smooth?(T=C-S,M=U-b,g.xOffset=I+(T*D+M*E)-T,g.yOffset=k+(T*F+M*L)-M):g.xOffset=g.yOffset=0,g.xOrigin=C,g.yOrigin=U,g.smooth=!!d,g.origin=s,g.originIsAbsolute=!!c,a.style[Lr]="0px 0px",m&&(ta(m,g,"xOrigin",S,C),ta(m,g,"yOrigin",b,U),ta(m,g,"xOffset",I,g.xOffset),ta(m,g,"yOffset",k,g.yOffset)),a.setAttribute("data-svg-origin",C+" "+U)},Lh=function(a,s){var c=a._gsap||new pd(a);if("x"in c&&!s&&!c.uncache)return c;var d=a.style,u=c.scaleX<0,m="px",g="deg",_=getComputedStyle(a),S=Xo(a,Lr)||"0",b,I,k,D,F,E,L,T,M,R,C,U,N,X,K,Z,ct,Rt,et,_t,G,Pt,Et,At,ce,re,Ft,It,Nt,Pe,pe,Wt;return b=I=k=E=L=T=M=R=C=0,D=F=1,c.svg=!!(a.getCTM&&zd(a)),_.translate&&((_.translate!=="none"||_.scale!=="none"||_.rotate!=="none")&&(d[pn]=(_.translate!=="none"?"translate3d("+(_.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(_.rotate!=="none"?"rotate("+_.rotate+") ":"")+(_.scale!=="none"?"scale("+_.scale.split(" ").join(",")+") ":"")+(_[pn]!=="none"?_[pn]:"")),d.scale=d.rotate=d.translate="none"),X=Uc(a,c.svg),c.svg&&(c.uncache?(ce=a.getBBox(),S=c.xOrigin-ce.x+"px "+(c.yOrigin-ce.y)+"px",At=""):At=!s&&a.getAttribute("data-svg-origin"),Gc(a,At||S,!!At||c.originIsAbsolute,c.smooth!==!1,X)),U=c.xOrigin||0,N=c.yOrigin||0,X!==Ph&&(Rt=X[0],et=X[1],_t=X[2],G=X[3],b=Pt=X[4],I=Et=X[5],X.length===6?(D=Math.sqrt(Rt*Rt+et*et),F=Math.sqrt(G*G+_t*_t),E=Rt||et?Ul(et,Rt)*ja:0,M=_t||G?Ul(_t,G)*ja+E:0,M&&(F*=Math.abs(Math.cos(M*Fl))),c.svg&&(b-=U-(U*Rt+N*_t),I-=N-(U*et+N*G))):(Wt=X[6],Pe=X[7],Ft=X[8],It=X[9],Nt=X[10],pe=X[11],b=X[12],I=X[13],k=X[14],K=Ul(Wt,Nt),L=K*ja,K&&(Z=Math.cos(-K),ct=Math.sin(-K),At=Pt*Z+Ft*ct,ce=Et*Z+It*ct,re=Wt*Z+Nt*ct,Ft=Pt*-ct+Ft*Z,It=Et*-ct+It*Z,Nt=Wt*-ct+Nt*Z,pe=Pe*-ct+pe*Z,Pt=At,Et=ce,Wt=re),K=Ul(-_t,Nt),T=K*ja,K&&(Z=Math.cos(-K),ct=Math.sin(-K),At=Rt*Z-Ft*ct,ce=et*Z-It*ct,re=_t*Z-Nt*ct,pe=G*ct+pe*Z,Rt=At,et=ce,_t=re),K=Ul(et,Rt),E=K*ja,K&&(Z=Math.cos(K),ct=Math.sin(K),At=Rt*Z+et*ct,ce=Pt*Z+Et*ct,et=et*Z-Rt*ct,Et=Et*Z-Pt*ct,Rt=At,Pt=ce),L&&Math.abs(L)+Math.abs(E)>359.9&&(L=E=0,T=180-T),D=Rn(Math.sqrt(Rt*Rt+et*et+_t*_t)),F=Rn(Math.sqrt(Et*Et+Wt*Wt)),K=Ul(Pt,Et),M=Math.abs(K)>2e-4?K*ja:0,C=pe?1/(pe<0?-pe:pe):0),c.svg&&(At=a.getAttribute("transform"),c.forceCSS=a.setAttribute("transform","")||!Fd(Xo(a,pn)),At&&a.setAttribute("transform",At))),Math.abs(M)>90&&Math.abs(M)<270&&(u?(D*=-1,M+=E<=0?180:-180,E+=E<=0?180:-180):(F*=-1,M+=M<=0?180:-180)),s=s||c.uncache,c.x=b-((c.xPercent=b&&(!s&&c.xPercent||(Math.round(a.offsetWidth/2)===Math.round(-b)?-50:0)))?a.offsetWidth*c.xPercent/100:0)+m,c.y=I-((c.yPercent=I&&(!s&&c.yPercent||(Math.round(a.offsetHeight/2)===Math.round(-I)?-50:0)))?a.offsetHeight*c.yPercent/100:0)+m,c.z=k+m,c.scaleX=Rn(D),c.scaleY=Rn(F),c.rotation=Rn(E)+g,c.rotationX=Rn(L)+g,c.rotationY=Rn(T)+g,c.skewX=M+g,c.skewY=R+g,c.transformPerspective=C+m,(c.zOrigin=parseFloat(S.split(" ")[2])||!s&&c.zOrigin||0)&&(d[Lr]=Mu(S)),c.xOffset=c.yOffset=0,c.force3D=Hr.force3D,c.renderTransform=c.svg?Pg:Rd?Gd:Ag,c.uncache=0,c},Mu=function(a){return(a=a.split(" "))[0]+" "+a[1]},Hc=function(a,s,c){var d=or(s);return Rn(parseFloat(s)+parseFloat(ea(a,"x",c+"px",d)))+d},Ag=function(a,s){s.z="0px",s.rotationY=s.rotationX="0deg",s.force3D=0,Gd(a,s)},qa="0deg",Rh="0px",Ya=") ",Gd=function(a,s){var c=s||this,d=c.xPercent,u=c.yPercent,m=c.x,g=c.y,_=c.z,S=c.rotation,b=c.rotationY,I=c.rotationX,k=c.skewX,D=c.skewY,F=c.scaleX,E=c.scaleY,L=c.transformPerspective,T=c.force3D,M=c.target,R=c.zOrigin,C="",U=T==="auto"&&a&&a!==1||T===!0;if(R&&(I!==qa||b!==qa)){var N=parseFloat(b)*Fl,X=Math.sin(N),K=Math.cos(N),Z;N=parseFloat(I)*Fl,Z=Math.cos(N),m=Hc(M,m,X*Z*-R),g=Hc(M,g,-Math.sin(N)*-R),_=Hc(M,_,K*Z*-R+R)}L!==Rh&&(C+="perspective("+L+Ya),(d||u)&&(C+="translate("+d+"%, "+u+"%) "),(U||m!==Rh||g!==Rh||_!==Rh)&&(C+=_!==Rh||U?"translate3d("+m+", "+g+", "+_+") ":"translate("+m+", "+g+Ya),S!==qa&&(C+="rotate("+S+Ya),b!==qa&&(C+="rotateY("+b+Ya),I!==qa&&(C+="rotateX("+I+Ya),(k!==qa||D!==qa)&&(C+="skew("+k+", "+D+Ya),(F!==1||E!==1)&&(C+="scale("+F+", "+E+Ya),M.style[pn]=C||"translate(0, 0)"},Pg=function(a,s){var c=s||this,d=c.xPercent,u=c.yPercent,m=c.x,g=c.y,_=c.rotation,S=c.skewX,b=c.skewY,I=c.scaleX,k=c.scaleY,D=c.target,F=c.xOrigin,E=c.yOrigin,L=c.xOffset,T=c.yOffset,M=c.forceCSS,R=parseFloat(m),C=parseFloat(g),U,N,X,K,Z;_=parseFloat(_),S=parseFloat(S),b=parseFloat(b),b&&(b=parseFloat(b),S+=b,_+=b),_||S?(_*=Fl,S*=Fl,U=Math.cos(_)*I,N=Math.sin(_)*I,X=Math.sin(_-S)*-k,K=Math.cos(_-S)*k,S&&(b*=Fl,Z=Math.tan(S-b),Z=Math.sqrt(1+Z*Z),X*=Z,K*=Z,b&&(Z=Math.tan(b),Z=Math.sqrt(1+Z*Z),U*=Z,N*=Z)),U=Rn(U),N=Rn(N),X=Rn(X),K=Rn(K)):(U=I,K=k,N=X=0),(R&&!~(m+"").indexOf("px")||C&&!~(g+"").indexOf("px"))&&(R=ea(D,"x",m,"px"),C=ea(D,"y",g,"px")),(F||E||L||T)&&(R=Rn(R+F-(F*U+E*X)+L),C=Rn(C+E-(F*N+E*K)+T)),(d||u)&&(Z=D.getBBox(),R=Rn(R+d/100*Z.width),C=Rn(C+u/100*Z.height)),Z="matrix("+U+","+N+","+X+","+K+","+R+","+C+")",D.setAttribute("transform",Z),M&&(D.style[pn]=Z)},Lg=function(a,s,c,d,u){var m=360,g=Wn(u),_=parseFloat(u)*(g&&~u.indexOf("rad")?ja:1),S=_-d,b=d+S+"deg",I,k;return g&&(I=u.split("_")[1],I==="short"&&(S%=m,S!==S%(m/2)&&(S+=S<0?m:-m)),I==="cw"&&S<0?S=(S+m*bd)%m-~~(S/m)*m:I==="ccw"&&S>0&&(S=(S-m*bd)%m-~~(S/m)*m)),a._pt=k=new Ar(a._pt,s,c,d,S,dg),k.e=b,k.u="deg",a._props.push(c),k},Hd=function(a,s){for(var c in s)a[c]=s[c];return a},Rg=function(a,s,c){var d=Hd({},c._gsap),u="perspective,force3D,transformOrigin,svgOrigin",m=c.style,g,_,S,b,I,k,D,F;d.svg?(S=c.getAttribute("transform"),c.setAttribute("transform",""),m[pn]=s,g=Lh(c,1),Xa(c,pn),c.setAttribute("transform",S)):(S=getComputedStyle(c)[pn],m[pn]=s,g=Lh(c,1),m[pn]=S);for(_ in ds)S=d[_],b=g[_],S!==b&&u.indexOf(_)<0&&(D=or(S),F=or(b),I=D!==F?ea(c,_,S,F):parseFloat(S),k=parseFloat(b),a._pt=new Ar(a._pt,g,_,I,k-I,kc),a._pt.u=F||0,a._props.push(_));Hd(g,d)};Cr("padding,margin,Width,Radius",function(x,a){var s="Top",c="Right",d="Bottom",u="Left",m=(a<3?[s,c,d,u]:[s+u,s+c,d+c,d+u]).map(function(g){return a<2?x+g:"border"+g+x});Tu[a>1?"border"+x:x]=function(g,_,S,b,I){var k,D;if(arguments.length<4)return k=m.map(function(F){return ps(g,F,S)}),D=k.join(" "),D.split(k[0]).length===5?k[0]:D;k=(b+"").split(" "),D={},m.forEach(function(F,E){return D[F]=k[E]=k[E]||k[(E-1)/2|0]}),g.init(_,D,I)}});var Vd={name:"css",register:Nc,targetTest:function(a){return a.style&&a.nodeType},init:function(a,s,c,d,u){var m=this._props,g=a.style,_=c.vars.startAt,S,b,I,k,D,F,E,L,T,M,R,C,U,N,X,K;Ic||Nc(),this.styles=this.styles||Ld(a),K=this.styles.props,this.tween=c;for(E in s)if(E!=="autoRound"&&(b=s[E],!(Wr[E]&&md(E,s,c,d,a,u)))){if(D=typeof b,F=Tu[E],D==="function"&&(b=b.call(c,d,a,u),D=typeof b),D==="string"&&~b.indexOf("random(")&&(b=Mh(b)),F)F(this,a,E,b,c)&&(X=1);else if(E.substr(0,2)==="--")S=(getComputedStyle(a).getPropertyValue(E)+"").trim(),b+="",$s.lastIndex=0,$s.test(S)||(L=or(S),T=or(b)),T?L!==T&&(S=ea(a,E,S,T)+T):L&&(b+=L),this.add(g,"setProperty",S,b,d,u,0,0,E),m.push(E),K.push(E,0,g[E]);else if(D!=="undefined"){if(_&&E in _?(S=typeof _[E]=="function"?_[E].call(c,d,a,u):_[E],Wn(S)&&~S.indexOf("random(")&&(S=Mh(S)),or(S+"")||S==="auto"||(S+=Hr.units[E]||or(ps(a,E))||""),(S+"").charAt(1)==="="&&(S=ps(a,E))):S=ps(a,E),k=parseFloat(S),M=D==="string"&&b.charAt(1)==="="&&b.substr(0,2),M&&(b=b.substr(2)),I=parseFloat(b),E in jo&&(E==="autoAlpha"&&(k===1&&ps(a,"visibility")==="hidden"&&I&&(k=0),K.push("visibility",0,g.visibility),ta(this,g,"visibility",k?"inherit":"hidden",I?"inherit":"hidden",!I)),E!=="scale"&&E!=="transform"&&(E=jo[E],~E.indexOf(",")&&(E=E.split(",")[0]))),R=E in ds,R){if(this.styles.save(E),C||(U=a._gsap,U.renderTransform&&!s.parseTransform||Lh(a,s.parseTransform),N=s.smoothOrigin!==!1&&U.smooth,C=this._pt=new Ar(this._pt,g,pn,0,1,U.renderTransform,U,0,-1),C.dep=1),E==="scale")this._pt=new Ar(this._pt,U,"scaleY",U.scaleY,(M?Il(U.scaleY,M+I):I)-U.scaleY||0,kc),this._pt.u=0,m.push("scaleY",E),E+="X";else if(E==="transformOrigin"){K.push(Lr,0,g[Lr]),b=bg(b),U.svg?Gc(a,b,0,N,0,this):(T=parseFloat(b.split(" ")[2])||0,T!==U.zOrigin&&ta(this,U,"zOrigin",U.zOrigin,T),ta(this,g,E,Mu(S),Mu(b)));continue}else if(E==="svgOrigin"){Gc(a,b,1,N,0,this);continue}else if(E in Nd){Lg(this,U,E,k,M?Il(k,M+b):b);continue}else if(E==="smoothOrigin"){ta(this,U,"smooth",U.smooth,b);continue}else if(E==="force3D"){U[E]=b;continue}else if(E==="transform"){Rg(this,b,a);continue}}else E in g||(E=Gl(E)||E);if(R||(I||I===0)&&(k||k===0)&&!fg.test(b)&&E in g)L=(S+"").substr((k+"").length),I||(I=0),T=or(b)||(E in Hr.units?Hr.units[E]:L),L!==T&&(k=ea(a,E,S,T)),this._pt=new Ar(this._pt,R?U:g,E,k,(M?Il(k,M+I):I)-k,!R&&(T==="px"||E==="zIndex")&&s.autoRound!==!1?mg:kc),this._pt.u=T||0,L!==T&&T!=="%"&&(this._pt.b=S,this._pt.r=pg);else if(E in g)Eg.call(this,a,E,S,M?M+b:b);else if(E in a)this.add(a,E,S||a[E],M?M+b:b,d,u);else if(E!=="parseTransform"){uc(E,b);continue}R||(E in g?K.push(E,0,g[E]):K.push(E,1,S||a[E])),m.push(E)}}X&&wd(this)},render:function(a,s){if(s.tween._time||!Dc())for(var c=s._pt;c;)c.r(a,c.d),c=c._next;else s.styles.revert()},get:ps,aliases:jo,getSetter:function(a,s,c){var d=jo[s];return d&&d.indexOf(",")<0&&(s=d),s in ds&&s!==Lr&&(a._gsap.x||ps(a,"x"))?c&&Ed===c?s==="scale"?_g:yg:(Ed=c||{})&&(s==="scale"?xg:wg):a.style&&!rc(a.style[s])?gg:~s.indexOf("-")?vg:Ac(a,s)},core:{_removeProperty:Xa,_getMatrix:Uc}};Pr.utils.checkPrefix=Gl,Pr.core.getStyleSaver=Ld,function(x,a,s,c){var d=Cr(x+","+a+","+s,function(u){ds[u]=1});Cr(a,function(u){Hr.units[u]="deg",Nd[u]=1}),jo[d[13]]=x+","+a,Cr(c,function(u){var m=u.split(":");jo[m[1]]=d[m[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),Cr("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(x){Hr.units[x]="px"}),Pr.registerPlugin(Vd);var Vc=Pr.registerPlugin(Vd)||Pr;Vc.core.Tween;class Og{constructor(a,s=!1){window.mars3d?(this.Cesium=window.mars3d.Cesium,this.DynamicMaskingArr=[],this.DynamicMaskingStyle=[],this.canvasClientWidth=a.viewer.canvas.clientWidth,this.canvasClientHeight=a.viewer.canvas.clientHeight,this.oldSet=new Set,this.tweenMap=new Map,this.isDynamicMasking=s):console.error("未引入指定插件")}add(a,s){let c=a.options.symbol.styleOptions.label.font_size,d=a.options.vectorId,u=Number(c)*1.4,m=Number(c)*1.8,g=a.options.symbol.styleOptions.label,{color:_,outlineColor:S,backgroundColor:b}=g;a.eachGraphic(I=>{I.style.label&&this.DynamicMaskingArr.push({id:d,uid:I.id,position:I._getLablePosition(),label:I.name,width:u*I.name.length,height:m,color:_,outline:s.label.outline,outlineColor:S,background:s.label.background,backgroundColor:b,dynamicMaskingColor:{backgroundColor:this.Cesium.Color.fromCssColorString(s.label.backgroundColor),color:this.Cesium.Color.fromCssColorString(s.label.color),outlineColor:this.Cesium.Color.fromCssColorString(s.label.outlineColor)}})}),this.DynamicMaskingStyle.push({vectorId:a.options.vectorId,outline:s.label.outline,background:s.label.background,color:this.Cesium.Color.fromCssColorString(s.label.color),backgroundColor:this.Cesium.Color.fromCssColorString(s.label.backgroundColor),outlineColor:this.Cesium.Color.fromCssColorString(s.label.outlineColor)}),this.oldSet=new Set,this.tweenMap=new Map}remove(a){this.DynamicMaskingArr=this.DynamicMaskingArr.filter(s=>s.id!==a),this.DynamicMaskingStyle=this.DynamicMaskingStyle.filter(s=>s.vectorId!==a),this.oldSet=new Set,this.tweenMap=new Map}modify(a,s){let{label:c}=s;if(c){let{color:d,outline:u,outlineColor:m,background:g,backgroundColor:_}=c;this.DynamicMaskingArr.forEach(S=>{S.id===a&&(d!=null&&(S.color=this.Cesium.Color.fromCssColorString(d),S.dynamicMaskingColor.color=this.Cesium.Color.fromCssColorString(d)),u!=null&&(S.outline=u),m!=null&&(S.outlineColor=this.Cesium.Color.fromCssColorString(m),S.dynamicMaskingColor.outlineColor=this.Cesium.Color.fromCssColorString(m)),g!=null&&(S.background=g),_!=null&&(S.backgroundColor=this.Cesium.Color.fromCssColorString(_),S.dynamicMaskingColor.backgroundColor=this.Cesium.Color.fromCssColorString(_)))})}}getBoundingRectangle(a){var s=this.Cesium.SceneTransforms.wgs84ToWindowCoordinates(window.map.viewer.scene,a.position);return s!==void 0?new this.Cesium.BoundingRectangle(s.x,s.y,a.width,a.height):new this.Cesium.BoundingRectangle(0,0,1,1)}getNonIntersectingRectangles(){let a=[];for(var s=0;s<this.DynamicMaskingArr.length;s++){let d=!1,u=this.DynamicMaskingArr[s],m,g,_;if(g=this.getBoundingRectangle(u),!(g.x<0||g.x>this.canvasClientWidth||g.y<0||g.y>this.canvasClientHeight))if(a.length===0){a.push(s);continue}else{for(var c=0;c<a.length;c++)if(m=this.DynamicMaskingArr[a[c]],_=this.getBoundingRectangle(m),this.Cesium.Intersect.OUTSIDE!==this.Cesium.BoundingRectangle.intersect(g,_)){d=!0;break}d||a.push(s)}}return new Set(a)}ifShow(){if(this.isDynamicMasking){let s={color:.001,outlineColor:.001,backgroundColor:.001},c={color:1,outlineColor:1,backgroundColor:1},d=this.getNonIntersectingRectangles(),u=new Set([...this.oldSet].filter(g=>!d.has(g))),m=new Set([...d].filter(g=>!this.oldSet.has(g)));for(let g of u)if(this.DynamicMaskingArr[g]){if(this.tweenMap.has(g)){var a=this.tweenMap.get(g);a.kill(),this.tweenMap.delete(g)}var a=Vc.to(c,{duration:.2,color:0,outlineColor:0,backgroundColor:0,onUpdate:()=>{var S,b;var _=this.DynamicMaskingArr[g];_.backgroundColor.alpha=c.backgroundColor,_.color.alpha=c.color,_.outlineColor.alpha=c.outlineColor,(b=(S=window.map.getLayer(_.id,"vectorId"))==null?void 0:S.getGraphicByAttr(_.uid))==null||b.setStyle({label:{show:!1,outline:!1,background:!1}})}});this.tweenMap.set(g,a)}for(let g of m)if(this.DynamicMaskingArr[g]){if(this.tweenMap.has(g)){var a=this.tweenMap.get(g);a.kill(),this.tweenMap.delete(g)}let _=this.DynamicMaskingArr[g],{backgroundColor:S,color:b,outlineColor:I}=_.dynamicMaskingColor;var a=Vc.to(s,{duration:.8+Math.random(),color:b.alpha,outlineColor:I.alpha,backgroundColor:S.alpha,onUpdate:()=>{var D,F;_.backgroundColor.alpha=s.backgroundColor,_.color.alpha=s.color,_.outlineColor.alpha=s.outlineColor,(F=(D=window.map.getLayer(_.id,"vectorId"))==null?void 0:D.getGraphicByAttr(_.uid))==null||F.setStyle({label:{show:!0,outline:_.outline,background:_.background,color:_.color,outlineColor:_.outlineColor,backgroundColor:_.backgroundColor}})}});this.tweenMap.set(g,a)}this.oldSet=d}}switchDynamicMasking(a){if(a)window.map.getLayers().forEach(s=>{var c;if((c=s.options)!=null&&c.vectorId){let{color:d,outlineColor:u,backgroundColor:m}=s.options.symbol.styleOptions.label;s.eachGraphic(g=>{g.setStyle({label:{color:d.withAlpha(0),outlineColor:u.withAlpha(.001),backgroundColor:m.withAlpha(.001),show:!1,background:!1,outline:!1}})})}});else if(this.DynamicMaskingStyle.length>0){let s;this.DynamicMaskingStyle.forEach(c=>{let{color:d,outline:u,outlineColor:m,background:g,backgroundColor:_,vectorId:S}=c;s=window.map.getLayer(S,"vectorId"),s&&s.eachGraphic(b=>{b.setStyle({label:{color:d,outlineColor:m,backgroundColor:_,show:!0,background:g,outline:u}})})})}this.isDynamicMasking=a,window.bimVector.switchDynamicMasking(a)}}const Ig=()=>{window.planClip.clearPlanClip(),window.schemeEvnModify.clearAllEvnModify(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""})},Dg=()=>{window.planClip.clearPlanClip(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""})},zg=()=>{window.planClip.clearPlanClip(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""})},kg=x=>{let a=[];if(x.forEach(s=>{let{id:c}=s,d={id:c,mockData:{nextPage:[],item:[],previousPage:[]}};s.operate.forEach((u,m)=>{let g=Wc(u,d.mockData.nextPage);d.mockData.nextPage=g,d.mockData.item=g,d.mockData.previousPage=[]}),a.push(d)}),a.length>1)for(let s=1;s<a.length;s++){let c=a[s].mockData,d=a[s-1].mockData.item;const u=new Map;d.forEach(m=>{m.type!="rotatePoint"&&m.type!="viewpoint"&&m.type!="roaming"&&m.type!="splitScreen"&&m.type!="planClip"&&m.type!="editor"?u.set(`${m.screenplayId}-${m.type}`,m):a[s].mockData.previousPage.push(m)}),c.nextPage.forEach(m=>{const g=`${m.screenplayId}-${m.type}`;let _={...u.get(g)};if(u.has(g)){if(m.type=="flight")a[s].mockData.previousPage.unshift(u.get(g)),_=m;else{let S={};Object.keys(m).forEach(b=>{if(b!="screenplayId"&&b!="type")if(u.get(g)[b])if(Object.keys(S).length==0&&(S={screenplayId:m.screenplayId,type:m.type}),b=="clip"||b=="flat"){_[b]=Wd(u.get(g)[b],m[b]);let I={screenplayId:m.screenplayId,type:m.type};I[b]={},Object.keys(m[b]).forEach(k=>{u.get(g)[b][k]?I[b][k]=u.get(g)[b][k]:m[b][k]=="true"&&(I[b][k]="false")}),S={...I,...S}}else S[b]=u.get(g)[b],_[b]=m[b];else a[s].mockData.previousPage.some(I=>I.screenplayId===m.screenplayId)||(console.log("未找到操作"),S={...jd(m,b),...S}),_[b]=m[b]}),Object.keys(S).length>0&&a[s].mockData.previousPage.push(S)}u.set(g,_)}else{console.log("未找到操作");let S=jd(m);S&&a[s].mockData.previousPage.push(S),u.set(g,m)}}),a[s].mockData.item=Array.from(u.values())}return console.log("-----------最后输出-----------"),console.log(a),console.log("-----------最后输出-----------"),a},Wc=(x,a=null)=>{let{executionProperty:s,screenplayId:c,property:d,type:u,delay:m,delayTime:g}=x;if((d=="add"||d==!0)&&(d="true"),(d=="remove"||d==!1)&&(d="false"),u=="pit"){let S=window.schemeEvnModify.getModelModifyDataForInitModelById(c);if(S){let b={};b[c]=d,d=b,c=S.modelId,s=S.type}}let _;if(c==""||c=="map")if(c="map",u=="splitScreen"){let{splitScreenMode:S,splitScreenModePercentage:b}=JSON.parse(d);a.push({screenplayId:c,type:u,executionProperty:{splitScreenMode:S,splitScreenModePercentage:b,mapClone:[]}});let{mainScreen:I,secondaryScreen:k}=JSON.parse(x.property);I.forEach(F=>{Wc(F,a)});let D=a.find(F=>F.type=="splitScreen");k.forEach(F=>{Wc(F,D.executionProperty.mapClone)})}else _={screenplayId:c,type:u,executionProperty:d},(s=="clip"||s=="flat")&&(_[s]=d),m&&(_.delay=m),g&&(_.delayTime=g),a&&(u=="flight"?a.unshift(_):a.push(_));else _=a?a.find(S=>S.screenplayId==c):null,_?(s=="clip"||s=="flat"?_[s]?_[s]=Wd(_[s],d):(_[s]=d,_.type="model"):_[s]=d,m&&(_[s].delay=m),g&&(_[s].delayTime=g)):(_={screenplayId:c,type:u},m&&(_.delay=m),g&&(_.delayTime=g),s=="clip"||s=="flat"?(_[s]=d,_.type="model"):_[s]=d,a&&(u=="flight"?a.unshift(_):a.push(_)));return a||_},Wd=(x,a)=>{const s={...x};for(const c in a)a.hasOwnProperty(c)&&(s[c]=a[c]);return s},jd=(x,a="all")=>{let{type:s,show:c,screenplayId:d,overallStaining:u,clip:m,flat:g}=x,_={};if(a=="all")switch(s){case"model":case"shp":case"plot":c&&c=="true"&&(_={screenplayId:d,type:s,show:"false"}),c&&c=="false"&&console.error("map上没有添加此对象"),u&&(_={..._,screenplayId:d,type:s,overallStaining:"false"}),m&&(_={..._,screenplayId:d,type:s,clip:"false"}),g&&(_={..._,screenplayId:d,type:s,flat:"false"});break;case"terrain":_={screenplayId:d,type:s,executionProperty:"true"};break;case"pit":_={screenplayId:d,type:s,executionProperty:"false"};break;case"underground":_={screenplayId:d,type:s,executionProperty:"1"};break}else switch(a){case"clip":case"flat":case"overallStaining":_={screenplayId:d,type:s},_[a]="false";break}return Object.keys(_).length>0?_:null},Bg=(x,a)=>{const s={};return Object.keys(a).forEach(c=>{x.hasOwnProperty(c)&&(s[c]=x[c])}),s},Ng=x=>/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(0|1|0\.\d+)\s*\)$/i.test(x),Fg=x=>{let a={};(x==null?void 0:x.length)>0&&x[0].operate.forEach(s=>{let{executionProperty:c,screenplayId:d,property:u,type:m}=s;(c=="show"||c=="overallStaining")&&(a[d]||(a[d]={type:m}),a[d][u]=c)}),window.map.getLayers().forEach(s=>{if((s.type=="3dtiles"||s.type=="geojson")&&s.options.name!="国界"){let c=s.options.modelId||s.options.vectorId;a[c]?(window.bimModel.editColor(c),window.schemeEvnModify.clearAllModelModify({isClone:!1})):s.remove()}}),window.bimEntity.entityLayer.getGraphicsByAttr().forEach(s=>{s.remove()}),window.bimMapSetUp.undergroundVal(1),window.bimTerrainProvider.show(),window.bimTrafficSimulation.destruction(),window.bimRotatePoint.stop(),window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.planClip.clearPlanClip()};class Ug{constructor(a){Ba(this,"getPositions",a=>a.length>1&&(Array.isArray(a[0])||typeof a[0]=="object")?a:this.getPositions(a[0]));Ba(this,"terrainCutById",(a,s,c)=>{switch(c==null?void 0:c.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone||this.terrainClipClone.list.find(d=>d.id==s))return;this.terrainClipClone.addArea(a.length>1?a:a[0],{id:s});break;case!1:if(!this.terrainClip||this.terrainClip.list.find(d=>d.id==s))return;this.terrainClip.addArea(a.length>1?a:a[0],{id:s});break}});Ba(this,"clearTerrainCutById",(a,s)=>{switch(s==null?void 0:s.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone)return;this.terrainClipClone.removeArea(a);break;case!1:if(!this.terrainClip)return;this.terrainClip.removeArea(a);break}});Ba(this,"terrainFlattenById",(a,s,c,d)=>{switch(d==null?void 0:d.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainFlatClone||this.terrainFlatClone.list.find(u=>u.id==c))return;this.terrainFlatClone.addArea(a.length>1?a:a[0],{id:c,height:s});break;case!1:if(!this.terrainFlat||this.terrainFlat.list.find(u=>u.id==c))return;this.terrainFlat.addArea(a.length>1?a:a[0],{id:c,height:s});break}});Ba(this,"clearTerrainFlattenById",(a,s)=>{switch(s==null?void 0:s.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainFlatClone)return;this.terrainFlatClone.removeArea(a);break;case!1:if(!this.terrainFlat)return;this.terrainFlat.removeArea(a);break}});this.flattenedEvnModifyData=a,this.modelIdListByModify=[],this.modelIdListByModifyClone=[],this.terrainClip=null,this.terrainFlat=null,this.terrainClipClone=null,this.terrainFlatClone=null,this.createTerrainModifyInstance()}getDataFromFlattenedEvnModifyListById(a){const s=this.flattenedEvnModifyData.find(c=>c.id==a);return s?(s.id=s.id.toString(),s):null}getModelFromMapById(a,s){let c;switch(s==null?void 0:s.isClone){case!0:c=window.mapClone?window.mapClone.mapEx.getLayers():[];break;case!1:c=window.map.getLayers();break}return c.find(u=>u.options.modelId==a)}updateFlattenedEvnModifyData(a){this.flattenedEvnModifyData=a}modelCutById(a,s,c,d){const u=bimModel.queryModel(a,d);if(u&&!u.clip.list.find(m=>m.id==c))switch(u.clip.addArea(s.length>1?s:s[0],{id:c}),d==null?void 0:d.isClone){case!0:this.modelIdListByModifyClone.push(a),this.modelIdListByModifyClone=[...new Set(this.modelIdListByModifyClone)];break;case!1:this.modelIdListByModify.push(a),this.modelIdListByModify=[...new Set(this.modelIdListByModify)];break}}modelFlattenById(a,s,c,d,u){const m=bimModel.queryModel(a,u);if(m&&!m.flat.list.find(g=>g.id==d))switch(m.flat.addArea(s.length>1?s:s[0],{height:c,id:d}),u==null?void 0:u.isClone){case!0:this.modelIdListByModifyClone.push(a),this.modelIdListByModifyClone=[...new Set(this.modelIdListByModifyClone)];break;case!1:this.modelIdListByModify.push(a),this.modelIdListByModify=[...new Set(this.modelIdListByModify)];break}}clearModelCutById(a,s,c){const d=bimModel.queryModel(a,c);if(d)switch(d.clip.removeArea(s),c.isClone){case!0:this.modelIdListByModifyClone=this.modelIdListByModifyClone.filter(u=>u!=a);break;case!1:this.modelIdListByModify=this.modelIdListByModify.filter(u=>u!=a);break}}clearModelFlattenById(a,s,c){const d=bimModel.queryModel(a,c);if(d)switch(d.flat.removeArea(s),c==null?void 0:c.isClone){case!0:this.modelIdListByModifyClone=this.modelIdListByModifyClone.filter(u=>u!=a);break;case!1:this.modelIdListByModify=this.modelIdListByModify.filter(u=>u!=a);break}}createTerrainModifyInstance(){if(window.map.thing.terrainClip)this.terrainClip=window.map.thing.terrainClip;else{const a=new mars3d.thing.TerrainClip({czm:!1,splitNum:30});window.map.addThing(a),this.terrainClip=a}if(window.map.thing.terrainFlat)this.terrainFlat=window.map.thing.terrainFlat;else{const a=new mars3d.thing.TerrainFlat({splitNum:80});window.map.addThing(a),this.terrainFlat=a}}createTerrainModifyInstanceClone(){if(window.mapClone){if(window.mapClone.mapEx.thing.terrainClip)this.terrainClipClone=window.mapClone.mapEx.thing.terrainClip;else{const a=new mars3d.thing.TerrainClip({splitNum:80});window.mapClone.mapEx.addThing(a),this.terrainClipClone=a}if(window.mapClone.mapEx.thing.terrainFlat)this.terrainFlatClone=window.mapClone.mapEx.thing.terrainFlat;else{const a=new mars3d.thing.TerrainFlat({splitNum:80});window.mapClone.mapEx.addThing(a),this.terrainFlatClone=a}}}evnModifyById(a,s){s=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:d,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const _=this.getPositions(JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates),S=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,b=c.bimEnvModifyData[g].id.toString();u===0&&m===0?this.modelCutById(d,_,b,s):u===0&&m===1?this.modelFlattenById(d,_,S,b,s):u===1&&m===0?this.terrainCutById(_,b,s):u===1&&m===1&&this.terrainFlattenById(_,S,b,s)}}evnModifyByIdAndAddOptionsToStore(a,s){s=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:d,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const _=this.getPositions(JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates),S=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,b=c.bimEnvModifyData[g].id.toString();u===0&&m===0?this.modelCutById(d,_,b,s):u===0&&m===1?this.modelFlattenById(d,_,S,b,s):u===1&&m===0?this.terrainCutById(_,b,s):u===1&&m===1&&this.terrainFlattenById(_,S,b,s)}}clearEvnModifyById(a,s){s=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:d,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const _=c.bimEnvModifyData[g].id.toString();u===0&&m===0?this.clearModelCutById(d,_,s):u===0&&m===1?this.clearModelFlattenById(d,_,s):u===1&&m===0?this.clearTerrainCutById(_,s):u===1&&m===1&&this.clearTerrainFlattenById(_,s)}}clearAllModelModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:this.modelIdListByModifyClone.forEach(s=>{const c=bimModel.queryModel(s,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModifyClone=[];break;case!1:this.modelIdListByModify.forEach(s=>{const c=bimModel.queryModel(s,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModify=[];break}}clearAllTerrainModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:window.mapClone||(this.terrainClipClone=null,this.terrainFlatClone=null),this.terrainClipClone&&this.terrainClipClone.clear(),this.terrainFlatClone&&this.terrainFlatClone.clear();break;case!1:this.terrainClip&&this.terrainClip.clear(),this.terrainFlat&&this.terrainFlat.clear();break}}getModelModifyDataForInitModelById(a){const s=this.getDataFromFlattenedEvnModifyListById(a);if(!s)return;const{bimEnvModify:{embsId:c,dataType:d,modifyType:u}}=s;if(this.modelIdListByModify.push(c),d===0&&u===0){const m={modelId:c,type:"clip",area:[]};for(let g=0;g<s.bimEnvModifyData.length;g++){const S={positions:this.getPositions(JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates),id:s.bimEnvModifyData[g].id.toString()};m.area.push(S)}return m}else if(d===0&&u===1){const m={modelId:c,type:"flat",area:[]};for(let g=0;g<s.bimEnvModifyData.length;g++){const _=this.getPositions(JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates),S={id:s.bimEnvModifyData[g].id.toString(),positions:_,height:JSON.parse(s.bimEnvModifyData[g].modifyData).depth};return m.area.push(S),m}}}clearAllEvnModify(){this.clearAllModelModify({isClone:!0}),this.clearAllModelModify({isClone:!1}),this.clearAllTerrainModify({isClone:!0}),this.clearAllTerrainModify({isClone:!1})}destroyTerrainModifyInstance(){this.clearAllTerrainModify({isClone:!0}),this.clearAllTerrainModify({isClone:!1}),this.terrainClip&&window.map.removeThing(this.terrainClip,!0),this.terrainFlat&&window.map.removeThing(this.terrainFlat,!0),this.terrainClipClone&&window.mapClone.mapEx.removeThing(this.terrainClipClone,!0),this.terrainFlatClone&&window.mapClone.mapEx.removeThing(this.terrainFlatClone,!0),this.terrainClip=null,this.terrainFlat=null,this.terrainClipClone=null,this.terrainFlatClone=null}}let Hl=null,ms=null,ia=null;class Gg{constructor(){mars3d&&(this.projectId=parseInt(window.sessionStorage.getItem("nowProjectId")),this.viewPoints=new Array,this.roaming=null)}init(a,s,c){ms=new mars3d.layer.GraphicLayer({isContinued:!0});var d=this;window.map.addLayer(ms),ms.on(mars3d.EventType.drawCreated,function(u){var m=u.graphic.point;console.log(m),s(m),setTimeout(()=>{d.startDrawGraphic()},500)}),ms.on(mars3d.EventType.editStop,function(u){console.log("停止编辑",u)}),ia=c,Hl=new mars3d.layer.GraphicLayer,window.map.addLayer(Hl),a&&(this.viewPoints=a.filter((u,m)=>{if(m%(ia.smooth*1)==0)return u})),this.addGraphicLayer(this.viewPoints)}addDemoGraphic1(a,s){const c=new mars3d.graphic.PolylinePrimitive({positions:a.map(d=>[d.lng,d.lat,d.alt+1e3]),style:{width:10,materialType:mars3d.MaterialType.LineFlow,materialOptions:{color:"red",image:s+"img/line/line-arrow-blue.png",speed:10,repeat:new Cesium.Cartesian2(5,1),mixt:!0}}});Hl.addGraphic(c)}addGraphicLayer(a){var s={};ia.Viewovalue==1?s={camera:{type:"dy",followedX:ia.followedX,followedZ:ia.followedZ},interpolation:!0,interpolationDegree:6,autoMiddleDynamicPosition:!0,interpolationAlgorithm:Cesium.HermitePolynomialApproximation}:ia.Viewovalue==2?s={camera:{type:"gs",pitch:-30,radius:500},interpolation:!0,interpolationDegree:2,clockLoop:!0,path:{width:3,color:Cesium.Color.fromCssColorString("#ff0000").withAlpha(.5)}}:s={camera:{type:"sd",followedZ:ia.followedZ},polyline:{width:3,color:Cesium.Color.fromCssColorString("#ff0000").withAlpha(.5)}},a=a.map(c=>[c.lng,c.lat,c.alt]),a.length,this.fixedRoute=new mars3d.graphic.FixedRoute({name:"贴地表表面漫游",speed:ia.speed,autoStop:!0,positions:a,offsetHeight:1.6,clockLoop:!0,...s}),Hl.addGraphic(this.fixedRoute)}addDemoGraphic(a,s){const c=new mars3d.graphic.BillboardEntity({position:new mars3d.LngLatPoint(a.lng,a.lat,a.alt),style:{width:30,height:32,image:"/img/marker/markffd700.png",scale:1,scaleByDistance:!1,scaleByDistance_far:1e6,scaleByDistance_farValue:.1,scaleByDistance_near:1e3,scaleByDistance_nearValue:1,distanceDisplayCondition:!1,distanceDisplayCondition_far:2e6,distanceDisplayCondition_near:0,clampToGround:!1,visibleDepth:!1,drawShow:!0}});ms.addGraphic(c)}startDrawGraphic(a){ms.startDraw({type:"billboard",style:{width:30,height:32,image:"/img/marker/markffd700.png",scale:1,scaleByDistance:!1,scaleByDistance_far:1e6,scaleByDistance_farValue:.1,scaleByDistance_near:1e3,scaleByDistance_nearValue:1,distanceDisplayCondition:!1,distanceDisplayCondition_far:2e6,distanceDisplayCondition_near:0,clampToGround:!1,visibleDepth:!1,drawShow:!0,classificationType:Cesium.ClassificationType.TERRAIN}}).then(s=>{console.log(123)})}start(){console.log(this.fixedRoute),this.fixedRoute&&(this.fixedRoute.start(),window.map.scene.screenSpaceCameraController.enableCollisionDetection=!1)}pause(){this.fixedRoute&&this.fixedRoute.pause()}resume(){this.fixedRoute&&this.fixedRoute.proceed()}stop(){this.fixedRoute&&this.fixedRoute.stop()}remove(){this.fixedRoute&&this.fixedRoute.stop(),window.map.removeThing(this.roaming,!0),window.map.removeLayer(Hl,!0),window.map.removeLayer(ms,!0),this.viewPoints=[],window.map.scene.screenSpaceCameraController.enableCollisionDetection=!0}removeCameraRoute(){Hl.clear(),ms.clear()}removegraphicLayerpoint(){ms.clear()}}class Hg{constructor(a){window.mars3d&&(this.beginDate="",this.endDate="",this.trafficSimulationLayer,this.trafficSimulationArr=[],this.style={width:4,materialType:window.mars3d.MaterialType.LineFlow,materialOptions:{color:"#4ac2ff",image:a+"img/textures/line-arrow-right.png",repeat_x:20,repeat_y:1,speed:20},clampToGround:!1,allowDrillPick:!1},this.vehicleSum=100,this.automobileList=[{url:a+"gltf/cart/suv.gltf"},{url:a+"gltf/cart/red_car.gltf"},{url:a+"gltf/cart/benchi3.gltf"},{url:a+"gltf/cart/suv.gltf"},{url:a+"gltf/cart/red_car.gltf"},{url:a+"gltf/cart/benchi3.gltf"},{url:a+"gltf/cart/aodi1.gltf"},{url:a+"gltf/cart/kache3.gltf"},{url:a+"gltf/cart/bus2.gltf"},{url:a+"gltf/cart/jiaobanche.glb"}],this._czmlLayer,this._czmlLayerArr=[])}init(a){this.trafficSimulationLayer=new window.mars3d.layer.GraphicLayer({temporaryLayer:"trafficSimulation"}),window.map.addLayer(this.trafficSimulationLayer),window.map.bimMapEdit="1",a&&(this._czmlLayerArr=a)}addLine(a){let s=a;return new Promise(c=>{this.trafficSimulationLayer.startDraw({type:"polylineP",attr:{trafficSimulationId:s},style:{...this.style}}).then(d=>{c({id:s,pointSet:d.coordinates,speed:45,interval:1})})})}initLine(a){let s;a.forEach(c=>{let{id:d}=c;s=new window.mars3d.graphic.PolylinePrimitive({positions:c.pointSet,attr:{trafficSimulationId:d},style:{...this.style}}),this.trafficSimulationLayer.addGraphic(s)})}positionLine(a){let s=this.queryTrafficSimulationLine(a);s&&s.flyTo({scale:2})}deleteLine(a){let s=this.queryTrafficSimulationLine(a);s&&s.remove()}queryTrafficSimulationArr(){return this.trafficSimulationArr}queryTrafficSimulationLine(a){if(this.trafficSimulationLayer)return this.trafficSimulationLayer.getGraphicByAttr(a,"trafficSimulationId")}editTrafficSimulationLine(a,s=!0){let c=this.queryTrafficSimulationLine(a);s?(c.setStyle({materialOptions:{color:"#ff0000"}}),c.startEditing()):(c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing())}queryCzml(a){return this._czmlLayerArr.length==0?!1:this._czmlLayerArr.find(s=>s.id==a)}start(a="add"){this.destruction(),this.beginDate=new Date().toISOString();let s=new Date,c=s.getDate();s.setDate(c+1),this.endDate=s.toISOString(),console.log(this.queryCzml(a)),this.queryCzml(a)?this.trafficSimulationArr=JSON.parse(this.queryCzml(a).route):this.trafficSimulationArr=[],this.processingData(a)}selected(){this._czmlLayer&&this._czmlLayer.flyTo()}destruction(){this.trafficSimulationLayer.clear(),this.trafficSimulationLayer.remove(),this._czmlLayer&&(this._czmlLayer.clear(),this._czmlLayer.remove()),window.map.bimMapEdit="0"}processingData(a){let s=[{version:"1.0",id:"document",clock:{interval:`${this.beginDate}/${this.endDate}`,currentTime:this.beginDate,multiplier:1},style:{distanceDisplayCondition:!0,distanceDisplayCondition_far:1e6,distanceDisplayCondition_near:0}}],c=[],d=JSON.parse(JSON.stringify(this.trafficSimulationArr)),u=0;d.forEach((g,_)=>{let S=0,b=0,{pointSet:I,interval:k,speed:D}=g;for(let F=1;F<=this.vehicleSum;F++){let E=JSON.parse(JSON.stringify(I));E.forEach((T,M)=>{M>0&&(u=parseFloat((this.disTance(T,E[M-1].slice(1))/D).toFixed(2)),S+=u),M==0&&(S=b),T.unshift(S)}),b+=k,c=E.reduce((T,M)=>T.concat(M));let L={name:`${_}-${F}`,availability:`${this.beginDate}/${this.endDate}`,orientation:{velocityReference:"#position"},position:{epoch:this.beginDate,cartographicDegrees:c},style:{minimumPixelSize:100,distanceDisplayCondition:!0,distanceDisplayCondition_near:0,distanceDisplayCondition_far:1300,distanceDisplayPoint:{color:"#00ff00",pixelSize:8}},model:{show:!0,gltf:this.randomVehicle(),heightReference:window.Cesium.HeightReference.CLAMP_TO_GROUND,clampToGround:!0,scale:.6,minimumPixelSize:100,maximumScale:1.5}};s.push(L)}});let m={name:"交通模拟",czmlId:a,data:s,autoUpdateClock:!1};this._czmlLayer=new window.mars3d.layer.CzmlLayer(m),window.map.addLayer(this._czmlLayer)}disTance(a,s){let c,d,u;return c=window.Cesium.Cartesian3.fromDegrees(...a),d=window.Cesium.Cartesian3.fromDegrees(...s),u=window.Cesium.Cartesian3.distance(c,d),u}randomVehicle(){let a=Math.round(Math.random()*(this.automobileList.length-1));return this.automobileList[a].url}}const Vg=[Tf,Ef],Wg={continuation:null,mapModali:null,install(x){if(Vg.forEach((m,g)=>{x.component(m.name,m)}),this.continuation){x.config.globalProperties.$continuation=this.continuation;return}let a=oi.createApp(Mf),s=document.createElement("div"),c=document.body;if(c.appendChild(s),this.loading=a.mount(s),x.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){x.config.globalProperties.$mapModali=this.mapModali;return}let d=oi.createApp(Sf),u=document.createElement("div");c.appendChild(u),this.mapModali=d.mount(u),x.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};Pi.BimBackgroundPlate=Ef,Pi.BimCutscenes=Mf,Pi.BimElevationImage=um,Pi.BimEntity=fm,Pi.BimModel=sm,Pi.BimModify=Ug,Pi.BimTerrainProvider=hm,Pi.BimTrafficSimulation=Hg,Pi.BimVector=lm,Pi.Bimroaming=Gg,Pi.Button=Tf,Pi.ChbimPlugins=Wg,Pi.DynamicMasking=Og,Pi.MapModali=Sf,Pi.PanoramicView=vm,Pi.ViewShed=cm,Pi.getSameKeyData=Bg,Pi.init=Ig,Pi.initMap=Fg,Pi.isValidRGBA=Ng,Pi.nextPage=zg,Pi.operateMapData=kg,Pi.previousPage=Dg,Object.defineProperty(Pi,Symbol.toStringTag,{value:"Module"})});