chbim-plugins 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chbim-plugins.js +11789 -8575
- package/chbim-plugins.umd.cjs +82 -35
- package/package.json +5 -2
package/chbim-plugins.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(en,oi){typeof exports=="object"&&typeof module<"u"?oi(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],oi):(en=typeof globalThis<"u"?globalThis:en||self,oi(en["chbim-plugins"]={},en.Vue))})(this,function(en,oi){"use strict";var Qm=Object.defineProperty;var tg=(en,oi,Sa)=>oi in en?Qm(en,oi,{enumerable:!0,configurable:!0,writable:!0,value:Sa}):en[oi]=Sa;var Fh=(en,oi,Sa)=>(tg(en,typeof oi!="symbol"?oi+"":oi,Sa),Sa);const Sa="",Gh=((T,ht)=>{const d=T.__vccOpts||T;for(const[nt,H]of ht)d[nt]=H;return d})(Object.assign({name:"MukButton"},{props:{size:{type:String,default:"middle"},type:{type:String,default:"default"}},setup(T){return(ht,d)=>(oi.openBlock(),oi.createElementBlock("button",{class:oi.normalizeClass(["muk-btn",[T.size,T.type]])},[oi.renderSlot(ht.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-0e6d93cd"]]);class Hu{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 Vu={class:"mask js-mask"},Wu=oi.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),ju=oi.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),Xu=oi.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),qu={class:"mask__inner"},Yu={class:"logo logo--mask"},Zu={class:"js-logo",style:{color:"#fff"}},Ju=oi.createElementVNode("div",{class:"mask-line js-mask-line"},[oi.createElementVNode("div",{class:"mask-line__inner js-mask-line"})],-1),$u={name:"BimCutscenes"},Hh=oi.defineComponent({...$u,props:{text:{type:String,default:"CHBIM云平台"}},setup(T,{expose:ht}){const d=oi.ref(null),nt=()=>{d.value===null&&(d.value=new Hu)},H=()=>{nt(),d.value.continuation()};return oi.onMounted(()=>{nt()}),ht({continuation:H}),(m,P)=>(oi.openBlock(),oi.createElementBlock("div",Vu,[Wu,ju,Xu,oi.createElementVNode("div",qu,[oi.createElementVNode("figure",Yu,[oi.createElementVNode("p",Zu,oi.toDisplayString(T.text),1)]),Ju])]))}}),rg="";/*!
|
|
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 ji=typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window;(ji._gsQueue||(ji._gsQueue=[])).push(function(){ji._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(g,$,_){var pt=function(at){var Y,y=[],x=at.length;for(Y=0;Y!==x;y.push(at[Y++]));return y},gt=function(at,Y,y){var x,B,E=at.cycle;for(x in E)B=E[x],at[x]=typeof B=="function"?B(y,Y[y]):B[y%B.length];delete at.cycle},S=function(at,Y,y){_.call(this,at,Y,y),this._cycle=0,this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._repeat&&this._uncache(!0),this.render=S.prototype.render},Mt=1e-10,kt=_._internals,nt=kt.isSelector,Tt=kt.isArray,Rt=S.prototype=_.to({},.1,{}),vt=[];S.version="2.0.2",Rt.constructor=S,Rt.kill()._gc=!1,S.killTweensOf=S.killDelayedCallsTo=_.killTweensOf,S.getTweensOf=_.getTweensOf,S.lagSmoothing=_.lagSmoothing,S.ticker=_.ticker,S.render=_.render,Rt.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),_.prototype.invalidate.call(this)},Rt.updateTo=function(at,Y){var y,x=this.ratio,B=this.vars.immediateRender||at.immediateRender;Y&&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(y in at)this.vars[y]=at[y];if(this._initted||B){if(Y)this._initted=!1,B&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&_._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var E=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(E,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||B)for(var Z,z=1/(1-x),X=this._firstPT;X;)Z=X.s+X.c,X.c*=z,X.s=Z-X.c,X=X._next}return this},Rt.render=function(at,Y,y){this._initted||this._duration===0&&this.vars.repeat&&this.invalidate();var x,B,E,Z,z,X,it,_t,dt,zt=this._dirty?this.totalDuration():this._totalDuration,Yt=this._time,re=this._totalTime,se=this._cycle,we=this._duration,Et=this._rawPrevTime;if(at>=zt-1e-7&&at>=0?(this._totalTime=zt,this._cycle=this._repeat,this._yoyo&&1&this._cycle?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=we,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(x=!0,B="onComplete",y=y||this._timeline.autoRemoveChildren),we===0&&(this._initted||!this.vars.lazy||y)&&(this._startTime===this._timeline._duration&&(at=0),(0>Et||0>=at&&at>=-1e-7||Et===Mt&&this.data!=="isPause")&&Et!==at&&(y=!0,Et>Mt&&(B="onReverseComplete")),this._rawPrevTime=_t=!Y||at||Et===at?at:Mt)):1e-7>at?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(re!==0||we===0&&Et>0)&&(B="onReverseComplete",x=this._reversed),0>at&&(this._active=!1,we===0&&(this._initted||!this.vars.lazy||y)&&(Et>=0&&(y=!0),this._rawPrevTime=_t=!Y||at||Et===at?at:Mt)),this._initted||(y=!0)):(this._totalTime=this._time=at,this._repeat!==0&&(Z=we+this._repeatDelay,this._cycle=this._totalTime/Z>>0,this._cycle!==0&&this._cycle===this._totalTime/Z&&at>=re&&this._cycle--,this._time=this._totalTime-this._cycle*Z,this._yoyo&&1&this._cycle&&(this._time=we-this._time,dt=this._yoyoEase||this.vars.yoyoEase,dt&&(this._yoyoEase||(dt!==!0||this._initted?this._yoyoEase=dt=dt===!0?this._ease:dt instanceof Ease?dt:Ease.map[dt]:(dt=this.vars.ease,this._yoyoEase=dt=dt?dt instanceof Ease?dt:typeof dt=="function"?new Ease(dt,this.vars.easeParams):Ease.map[dt]||_.defaultEase:_.defaultEase)),this.ratio=dt?1-dt.getRatio((we-this._time)/we):0)),this._time>we?this._time=we:this._time<0&&(this._time=0)),this._easeType&&!dt?(z=this._time/we,X=this._easeType,it=this._easePower,(X===1||X===3&&z>=.5)&&(z=1-z),X===3&&(z*=2),it===1?z*=z:it===2?z*=z*z:it===3?z*=z*z*z:it===4&&(z*=z*z*z*z),X===1?this.ratio=1-z:X===2?this.ratio=z:this._time/we<.5?this.ratio=z/2:this.ratio=1-z/2):dt||(this.ratio=this._ease.getRatio(this._time/we))),Yt===this._time&&!y&&se===this._cycle)return void(re!==this._totalTime&&this._onUpdate&&(Y||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!y&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=Yt,this._totalTime=re,this._rawPrevTime=Et,this._cycle=se,kt.lazyTweens.push(this),void(this._lazy=[at,Y]);!this._time||x||dt?x&&this._ease._calcEnd&&!dt&&(this.ratio=this._ease.getRatio(this._time===0?0:1)):this.ratio=this._ease.getRatio(this._time/we)}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==Yt&&at>=0&&(this._active=!0),re===0&&(this._initted===2&&at>0&&this._init(),this._startAt&&(at>=0?this._startAt.render(at,!0,y):B||(B="_dummyGS")),this.vars.onStart&&(this._totalTime!==0||we===0)&&(Y||this._callback("onStart"))),E=this._firstPT;E;)E.f?E.t[E.p](E.c*this.ratio+E.s):E.t[E.p]=E.c*this.ratio+E.s,E=E._next;this._onUpdate&&(0>at&&this._startAt&&this._startTime&&this._startAt.render(at,!0,y),Y||(this._totalTime!==re||B)&&this._callback("onUpdate")),this._cycle!==se&&(Y||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),B&&(!this._gc||y)&&(0>at&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(at,!0,y),x&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!Y&&this.vars[B]&&this._callback(B),we===0&&this._rawPrevTime===Mt&&_t!==Mt&&(this._rawPrevTime=0))},S.to=function(at,Y,y){return new S(at,Y,y)},S.from=function(at,Y,y){return y.runBackwards=!0,y.immediateRender=y.immediateRender!=0,new S(at,Y,y)},S.fromTo=function(at,Y,y,x){return x.startAt=y,x.immediateRender=x.immediateRender!=0&&y.immediateRender!=0,new S(at,Y,x)},S.staggerTo=S.allTo=function(at,Y,y,x,B,E,Z){x=x||0;var z,X,it,_t,dt=0,zt=[],Yt=function(){y.onComplete&&y.onComplete.apply(y.onCompleteScope||this,arguments),B.apply(Z||y.callbackScope||this,E||vt)},re=y.cycle,se=y.startAt&&y.startAt.cycle;for(Tt(at)||(typeof at=="string"&&(at=_.selector(at)||at),nt(at)&&(at=pt(at))),at=at||[],0>x&&(at=pt(at),at.reverse(),x*=-1),z=at.length-1,it=0;z>=it;it++){X={};for(_t in y)X[_t]=y[_t];if(re&&(gt(X,at,it),X.duration!=null&&(Y=X.duration,delete X.duration)),se){se=X.startAt={};for(_t in y.startAt)se[_t]=y.startAt[_t];gt(X.startAt,at,it)}X.delay=dt+(X.delay||0),it===z&&B&&(X.onComplete=Yt),zt[it]=new S(at[it],Y,X),dt+=x}return zt},S.staggerFrom=S.allFrom=function(at,Y,y,x,B,E,Z){return y.runBackwards=!0,y.immediateRender=y.immediateRender!=0,S.staggerTo(at,Y,y,x,B,E,Z)},S.staggerFromTo=S.allFromTo=function(at,Y,y,x,B,E,Z,z){return x.startAt=y,x.immediateRender=x.immediateRender!=0&&y.immediateRender!=0,S.staggerTo(at,Y,x,B,E,Z,z)},S.delayedCall=function(at,Y,y,x,B){return new S(Y,0,{delay:at,onComplete:Y,onCompleteParams:y,callbackScope:x,onReverseComplete:Y,onReverseCompleteParams:y,immediateRender:!1,useFrames:B,overwrite:0})},S.set=function(at,Y){return new S(at,0,Y)},S.isTweening=function(at){return _.getTweensOf(at,!0).length>0};var Nt=function(at,Y){for(var y=[],x=0,B=at._first;B;)B instanceof _?y[x++]=B:(Y&&(y[x++]=B),y=y.concat(Nt(B,Y)),x=y.length),B=B._next;return y},Ut=S.getAllTweens=function(at){return Nt(g._rootTimeline,at).concat(Nt(g._rootFramesTimeline,at))};S.killAll=function(at,Y,y,x){Y==null&&(Y=!0),y==null&&(y=!0);var B,E,Z,z=Ut(x!=0),X=z.length,it=Y&&y&&x;for(Z=0;X>Z;Z++)E=z[Z],(it||E instanceof $||(B=E.target===E.vars.onComplete)&&y||Y&&!B)&&(at?E.totalTime(E._reversed?0:E.totalDuration()):E._enabled(!1,!1))},S.killChildTweensOf=function(at,Y){if(at!=null){var y,x,B,E,Z,z=kt.tweenLookup;if(typeof at=="string"&&(at=_.selector(at)||at),nt(at)&&(at=pt(at)),Tt(at))for(E=at.length;--E>-1;)S.killChildTweensOf(at[E],Y);else{y=[];for(B in z)for(x=z[B].target.parentNode;x;)x===at&&(y=y.concat(z[B].tweens)),x=x.parentNode;for(Z=y.length,E=0;Z>E;E++)Y&&y[E].totalTime(y[E].totalDuration()),y[E]._enabled(!1,!1)}}};var Ct=function(at,Y,y,x){Y=Y!==!1,y=y!==!1,x=x!==!1;for(var B,E,Z=Ut(x),z=Y&&y&&x,X=Z.length;--X>-1;)E=Z[X],(z||E instanceof $||(B=E.target===E.vars.onComplete)&&y||Y&&!B)&&E.paused(at)};return S.pauseAll=function(at,Y,y){Ct(!0,at,Y,y)},S.resumeAll=function(at,Y,y){Ct(!1,at,Y,y)},S.globalTimeScale=function(at){var Y=g._rootTimeline,y=_.ticker.time;return arguments.length?(at=at||Mt,Y._startTime=y-(y-Y._startTime)*Y._timeScale/at,Y=g._rootFramesTimeline,y=_.ticker.frame,Y._startTime=y-(y-Y._startTime)*Y._timeScale/at,Y._timeScale=g._rootTimeline._timeScale=at,at):Y._timeScale},Rt.progress=function(at,Y){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-at:at)+this._cycle*(this._duration+this._repeatDelay),Y):this._time/this.duration()},Rt.totalProgress=function(at,Y){return arguments.length?this.totalTime(this.totalDuration()*at,Y):this._totalTime/this.totalDuration()},Rt.time=function(at,Y){return arguments.length?(this._dirty&&this.totalDuration(),at>this._duration&&(at=this._duration),this._yoyo&&1&this._cycle?at=this._duration-at+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(at+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(at,Y)):this._time},Rt.duration=function(at){return arguments.length?g.prototype.duration.call(this,at):this._duration},Rt.totalDuration=function(at){return arguments.length?this._repeat===-1?this:this.duration((at-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)},Rt.repeat=function(at){return arguments.length?(this._repeat=at,this._uncache(!0)):this._repeat},Rt.repeatDelay=function(at){return arguments.length?(this._repeatDelay=at,this._uncache(!0)):this._repeatDelay},Rt.yoyo=function(at){return arguments.length?(this._yoyo=at,this):this._yoyo},S},!0),ji._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(g,$,_){var pt=function(y){$.call(this,y),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var x,B,E=this.vars;for(B in E)x=E[B],nt(x)&&x.join("").indexOf("{self}")!==-1&&(E[B]=this._swapSelfInParams(x));nt(E.tweens)&&this.add(E.tweens,0,E.align,E.stagger)},gt=1e-10,S=_._internals,Mt=pt._internals={},kt=S.isSelector,nt=S.isArray,Tt=S.lazyTweens,Rt=S.lazyRender,vt=ji._gsDefine.globals,Nt=function(y){var x,B={};for(x in y)B[x]=y[x];return B},Ut=function(y,x,B){var E,Z,z=y.cycle;for(E in z)Z=z[E],y[E]=typeof Z=="function"?Z(B,x[B]):Z[B%Z.length];delete y.cycle},Ct=Mt.pauseCallback=function(){},at=function(y){var x,B=[],E=y.length;for(x=0;x!==E;B.push(y[x++]));return B},Y=pt.prototype=new $;return pt.version="2.0.2",Y.constructor=pt,Y.kill()._gc=Y._forcingPlayhead=Y._hasPause=!1,Y.to=function(y,x,B,E){var Z=B.repeat&&vt.TweenMax||_;return x?this.add(new Z(y,x,B),E):this.set(y,B,E)},Y.from=function(y,x,B,E){return this.add((B.repeat&&vt.TweenMax||_).from(y,x,B),E)},Y.fromTo=function(y,x,B,E,Z){var z=E.repeat&&vt.TweenMax||_;return x?this.add(z.fromTo(y,x,B,E),Z):this.set(y,E,Z)},Y.staggerTo=function(y,x,B,E,Z,z,X,it){var _t,dt,zt=new pt({onComplete:z,onCompleteParams:X,callbackScope:it,smoothChildTiming:this.smoothChildTiming}),Yt=B.cycle;for(typeof y=="string"&&(y=_.selector(y)||y),y=y||[],kt(y)&&(y=at(y)),E=E||0,0>E&&(y=at(y),y.reverse(),E*=-1),dt=0;dt<y.length;dt++)_t=Nt(B),_t.startAt&&(_t.startAt=Nt(_t.startAt),_t.startAt.cycle&&Ut(_t.startAt,y,dt)),Yt&&(Ut(_t,y,dt),_t.duration!=null&&(x=_t.duration,delete _t.duration)),zt.to(y[dt],x,_t,dt*E);return this.add(zt,Z)},Y.staggerFrom=function(y,x,B,E,Z,z,X,it){return B.immediateRender=B.immediateRender!=0,B.runBackwards=!0,this.staggerTo(y,x,B,E,Z,z,X,it)},Y.staggerFromTo=function(y,x,B,E,Z,z,X,it,_t){return E.startAt=B,E.immediateRender=E.immediateRender!=0&&B.immediateRender!=0,this.staggerTo(y,x,E,Z,z,X,it,_t)},Y.call=function(y,x,B,E){return this.add(_.delayedCall(0,y,x,B),E)},Y.set=function(y,x,B){return B=this._parseTimeOrLabel(B,0,!0),x.immediateRender==null&&(x.immediateRender=B===this._time&&!this._paused),this.add(new _(y,0,x),B)},pt.exportRoot=function(y,x){y=y||{},y.smoothChildTiming==null&&(y.smoothChildTiming=!0);var B,E,Z,z,X=new pt(y),it=X._timeline;for(x==null&&(x=!0),it._remove(X,!0),X._startTime=0,X._rawPrevTime=X._time=X._totalTime=it._time,Z=it._first;Z;)z=Z._next,x&&Z instanceof _&&Z.target===Z.vars.onComplete||(E=Z._startTime-Z._delay,0>E&&(B=1),X.add(Z,E)),Z=z;return it.add(X,0),B&&X.totalDuration(),X},Y.add=function(y,x,B,E){var Z,z,X,it,_t,dt;if(typeof x!="number"&&(x=this._parseTimeOrLabel(x,0,!0,y)),!(y instanceof g)){if(y instanceof Array||y&&y.push&&nt(y)){for(B=B||"normal",E=E||0,Z=x,z=y.length,X=0;z>X;X++)nt(it=y[X])&&(it=new pt({tweens:it})),this.add(it,Z),typeof it!="string"&&typeof it!="function"&&(B==="sequence"?Z=it._startTime+it.totalDuration()/it._timeScale:B==="start"&&(it._startTime-=it.delay())),Z+=E;return this._uncache(!0)}if(typeof y=="string")return this.addLabel(y,x);if(typeof y!="function")throw"Cannot add "+y+" into the timeline; it is not a tween, timeline, function, or string.";y=_.delayedCall(0,y)}if($.prototype.add.call(this,y,x),y._time&&(Z=Math.max(0,Math.min(y.totalDuration(),(this.rawTime()-y._startTime)*y._timeScale)),Math.abs(Z-y._totalTime)>1e-5&&y.render(Z,!1,!1)),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(_t=this,dt=_t.rawTime()>y._startTime;_t._timeline;)dt&&_t._timeline.smoothChildTiming?_t.totalTime(_t._totalTime,!0):_t._gc&&_t._enabled(!0,!1),_t=_t._timeline;return this},Y.remove=function(y){if(y instanceof g){this._remove(y,!1);var x=y._timeline=y.vars.useFrames?g._rootFramesTimeline:g._rootTimeline;return y._startTime=(y._paused?y._pauseTime:x._time)-(y._reversed?y.totalDuration()-y._totalTime:y._totalTime)/y._timeScale,this}if(y instanceof Array||y&&y.push&&nt(y)){for(var B=y.length;--B>-1;)this.remove(y[B]);return this}return typeof y=="string"?this.removeLabel(y):this.kill(null,y)},Y._remove=function(y,x){$.prototype._remove.call(this,y,x);var B=this._last;return B?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},Y.append=function(y,x){return this.add(y,this._parseTimeOrLabel(null,x,!0,y))},Y.insert=Y.insertMultiple=function(y,x,B,E){return this.add(y,x||0,B,E)},Y.appendMultiple=function(y,x,B,E){return this.add(y,this._parseTimeOrLabel(null,x,!0,y),B,E)},Y.addLabel=function(y,x){return this._labels[y]=this._parseTimeOrLabel(x),this},Y.addPause=function(y,x,B,E){var Z=_.delayedCall(0,Ct,B,E||this);return Z.vars.onComplete=Z.vars.onReverseComplete=x,Z.data="isPause",this._hasPause=!0,this.add(Z,y)},Y.removeLabel=function(y){return delete this._labels[y],this},Y.getLabelTime=function(y){return this._labels[y]!=null?this._labels[y]:-1},Y._parseTimeOrLabel=function(y,x,B,E){var Z,z;if(E instanceof g&&E.timeline===this)this.remove(E);else if(E&&(E instanceof Array||E.push&&nt(E)))for(z=E.length;--z>-1;)E[z]instanceof g&&E[z].timeline===this&&this.remove(E[z]);if(Z=typeof y!="number"||x?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,typeof x=="string")return this._parseTimeOrLabel(x,B&&typeof y=="number"&&this._labels[x]==null?y-Z:0,B);if(x=x||0,typeof y!="string"||!isNaN(y)&&this._labels[y]==null)y==null&&(y=Z);else{if(z=y.indexOf("="),z===-1)return this._labels[y]==null?B?this._labels[y]=Z+x:x:this._labels[y]+x;x=parseInt(y.charAt(z-1)+"1",10)*Number(y.substr(z+1)),y=z>1?this._parseTimeOrLabel(y.substr(0,z-1),0,B):Z}return Number(y)+x},Y.seek=function(y,x){return this.totalTime(typeof y=="number"?y:this._parseTimeOrLabel(y),x!==!1)},Y.stop=function(){return this.paused(!0)},Y.gotoAndPlay=function(y,x){return this.play(y,x)},Y.gotoAndStop=function(y,x){return this.pause(y,x)},Y.render=function(y,x,B){this._gc&&this._enabled(!0,!1);var E,Z,z,X,it,_t,dt,zt=this._time,Yt=this._dirty?this.totalDuration():this._totalDuration,re=this._startTime,se=this._timeScale,we=this._paused;if(zt!==this._time&&(y+=this._time-zt),y>=Yt-1e-7&&y>=0)this._totalTime=this._time=Yt,this._reversed||this._hasPausedChild()||(Z=!0,X="onComplete",it=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=y&&y>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===gt)&&this._rawPrevTime!==y&&this._first&&(it=!0,this._rawPrevTime>gt&&(X="onReverseComplete"))),this._rawPrevTime=this._duration||!x||y||this._rawPrevTime===y?y:gt,y=Yt+1e-4;else if(1e-7>y)if(this._totalTime=this._time=0,(zt!==0||this._duration===0&&this._rawPrevTime!==gt&&(this._rawPrevTime>0||0>y&&this._rawPrevTime>=0))&&(X="onReverseComplete",Z=this._reversed),0>y)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(it=Z=!0,X="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(it=!0),this._rawPrevTime=y;else{if(this._rawPrevTime=this._duration||!x||y||this._rawPrevTime===y?y:gt,y===0&&Z)for(E=this._first;E&&E._startTime===0;)E._duration||(Z=!1),E=E._next;y=0,this._initted||(it=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!x){if(y>=zt)for(E=this._first;E&&E._startTime<=y&&!_t;)E._duration||E.data!=="isPause"||E.ratio||E._startTime===0&&this._rawPrevTime===0||(_t=E),E=E._next;else for(E=this._last;E&&E._startTime>=y&&!_t;)E._duration||E.data==="isPause"&&E._rawPrevTime>0&&(_t=E),E=E._prev;_t&&(this._time=y=_t._startTime,this._totalTime=y+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=y}if(this._time!==zt&&this._first||B||it||_t){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==zt&&y>0&&(this._active=!0),zt===0&&this.vars.onStart&&(this._time===0&&this._duration||x||this._callback("onStart")),dt=this._time,dt>=zt)for(E=this._first;E&&(z=E._next,dt===this._time&&(!this._paused||we));)(E._active||E._startTime<=dt&&!E._paused&&!E._gc)&&(_t===E&&this.pause(),E._reversed?E.render((E._dirty?E.totalDuration():E._totalDuration)-(y-E._startTime)*E._timeScale,x,B):E.render((y-E._startTime)*E._timeScale,x,B)),E=z;else for(E=this._last;E&&(z=E._prev,dt===this._time&&(!this._paused||we));){if(E._active||E._startTime<=zt&&!E._paused&&!E._gc){if(_t===E){for(_t=E._prev;_t&&_t.endTime()>this._time;)_t.render(_t._reversed?_t.totalDuration()-(y-_t._startTime)*_t._timeScale:(y-_t._startTime)*_t._timeScale,x,B),_t=_t._prev;_t=null,this.pause()}E._reversed?E.render((E._dirty?E.totalDuration():E._totalDuration)-(y-E._startTime)*E._timeScale,x,B):E.render((y-E._startTime)*E._timeScale,x,B)}E=z}this._onUpdate&&(x||(Tt.length&&Rt(),this._callback("onUpdate"))),X&&(this._gc||(re===this._startTime||se!==this._timeScale)&&(this._time===0||Yt>=this.totalDuration())&&(Z&&(Tt.length&&Rt(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!x&&this.vars[X]&&this._callback(X)))}},Y._hasPausedChild=function(){for(var y=this._first;y;){if(y._paused||y instanceof pt&&y._hasPausedChild())return!0;y=y._next}return!1},Y.getChildren=function(y,x,B,E){E=E||-9999999999;for(var Z=[],z=this._first,X=0;z;)z._startTime<E||(z instanceof _?x!==!1&&(Z[X++]=z):(B!==!1&&(Z[X++]=z),y!==!1&&(Z=Z.concat(z.getChildren(!0,x,B)),X=Z.length))),z=z._next;return Z},Y.getTweensOf=function(y,x){var B,E,Z=this._gc,z=[],X=0;for(Z&&this._enabled(!0,!0),B=_.getTweensOf(y),E=B.length;--E>-1;)(B[E].timeline===this||x&&this._contains(B[E]))&&(z[X++]=B[E]);return Z&&this._enabled(!1,!0),z},Y.recent=function(){return this._recent},Y._contains=function(y){for(var x=y.timeline;x;){if(x===this)return!0;x=x.timeline}return!1},Y.shiftChildren=function(y,x,B){B=B||0;for(var E,Z=this._first,z=this._labels;Z;)Z._startTime>=B&&(Z._startTime+=y),Z=Z._next;if(x)for(E in z)z[E]>=B&&(z[E]+=y);return this._uncache(!0)},Y._kill=function(y,x){if(!y&&!x)return this._enabled(!1,!1);for(var B=x?this.getTweensOf(x):this.getChildren(!0,!0,!1),E=B.length,Z=!1;--E>-1;)B[E]._kill(y,x)&&(Z=!0);return Z},Y.clear=function(y){var x=this.getChildren(!1,!0,!0),B=x.length;for(this._time=this._totalTime=0;--B>-1;)x[B]._enabled(!1,!1);return y!==!1&&(this._labels={}),this._uncache(!0)},Y.invalidate=function(){for(var y=this._first;y;)y.invalidate(),y=y._next;return g.prototype.invalidate.call(this)},Y._enabled=function(y,x){if(y===this._gc)for(var B=this._first;B;)B._enabled(y,!0),B=B._next;return $.prototype._enabled.call(this,y,x)},Y.totalTime=function(y,x,B){this._forcingPlayhead=!0;var E=g.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,E},Y.duration=function(y){return arguments.length?(this.duration()!==0&&y!==0&&this.timeScale(this._duration/y),this):(this._dirty&&this.totalDuration(),this._duration)},Y.totalDuration=function(y){if(!arguments.length){if(this._dirty){for(var x,B,E=0,Z=this._last,z=999999999999;Z;)x=Z._prev,Z._dirty&&Z.totalDuration(),Z._startTime>z&&this._sortChildren&&!Z._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(Z,Z._startTime-Z._delay),this._calculatingDuration=0):z=Z._startTime,Z._startTime<0&&!Z._paused&&(E-=Z._startTime,this._timeline.smoothChildTiming&&(this._startTime+=Z._startTime/this._timeScale,this._time-=Z._startTime,this._totalTime-=Z._startTime,this._rawPrevTime-=Z._startTime),this.shiftChildren(-Z._startTime,!1,-9999999999),z=0),B=Z._startTime+Z._totalDuration/Z._timeScale,B>E&&(E=B),Z=x;this._duration=this._totalDuration=E,this._dirty=!1}return this._totalDuration}return y&&this.totalDuration()?this.timeScale(this._totalDuration/y):this},Y.paused=function(y){if(!y)for(var x=this._first,B=this._time;x;)x._startTime===B&&x.data==="isPause"&&(x._rawPrevTime=0),x=x._next;return g.prototype.paused.apply(this,arguments)},Y.usesFrames=function(){for(var y=this._timeline;y._timeline;)y=y._timeline;return y===g._rootFramesTimeline},Y.rawTime=function(y){return y&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(y)-this._startTime)*this._timeScale},pt},!0),ji._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(g,$,_){var pt=function(vt){g.call(this,vt),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},gt=1e-10,S=$._internals,Mt=S.lazyTweens,kt=S.lazyRender,nt=ji._gsDefine.globals,Tt=new _(null,null,1,0),Rt=pt.prototype=new g;return Rt.constructor=pt,Rt.kill()._gc=!1,pt.version="2.0.2",Rt.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),g.prototype.invalidate.call(this)},Rt.addCallback=function(vt,Nt,Ut,Ct){return this.add($.delayedCall(0,vt,Ut,Ct),Nt)},Rt.removeCallback=function(vt,Nt){if(vt)if(Nt==null)this._kill(null,vt);else for(var Ut=this.getTweensOf(vt,!1),Ct=Ut.length,at=this._parseTimeOrLabel(Nt);--Ct>-1;)Ut[Ct]._startTime===at&&Ut[Ct]._enabled(!1,!1);return this},Rt.removePause=function(vt){return this.removeCallback(g._internals.pauseCallback,vt)},Rt.tweenTo=function(vt,Nt){Nt=Nt||{};var Ut,Ct,at,Y={ease:Tt,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},y=Nt.repeat&&nt.TweenMax||$;for(Ct in Nt)Y[Ct]=Nt[Ct];return Y.time=this._parseTimeOrLabel(vt),Ut=Math.abs(Number(Y.time)-this._time)/this._timeScale||.001,at=new y(this,Ut,Y),Y.onStart=function(){at.target.paused(!0),at.vars.time===at.target.time()||Ut!==at.duration()||at.isFromTo||at.duration(Math.abs(at.vars.time-at.target.time())/at.target._timeScale).render(at.time(),!0,!0),Nt.onStart&&Nt.onStart.apply(Nt.onStartScope||Nt.callbackScope||at,Nt.onStartParams||[])},at},Rt.tweenFromTo=function(vt,Nt,Ut){Ut=Ut||{},vt=this._parseTimeOrLabel(vt),Ut.startAt={onComplete:this.seek,onCompleteParams:[vt],callbackScope:this},Ut.immediateRender=Ut.immediateRender!==!1;var Ct=this.tweenTo(Nt,Ut);return Ct.isFromTo=1,Ct.duration(Math.abs(Ct.vars.time-vt)/this._timeScale||.001)},Rt.render=function(vt,Nt,Ut){this._gc&&this._enabled(!0,!1);var Ct,at,Y,y,x,B,E,Z,z=this._time,X=this._dirty?this.totalDuration():this._totalDuration,it=this._duration,_t=this._totalTime,dt=this._startTime,zt=this._timeScale,Yt=this._rawPrevTime,re=this._paused,se=this._cycle;if(z!==this._time&&(vt+=this._time-z),vt>=X-1e-7&&vt>=0)this._locked||(this._totalTime=X,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(at=!0,y="onComplete",x=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=vt&&vt>=-1e-7||0>Yt||Yt===gt)&&Yt!==vt&&this._first&&(x=!0,Yt>gt&&(y="onReverseComplete"))),this._rawPrevTime=this._duration||!Nt||vt||this._rawPrevTime===vt?vt:gt,this._yoyo&&1&this._cycle?this._time=vt=0:(this._time=it,vt=it+1e-4);else if(1e-7>vt)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(z!==0||it===0&&Yt!==gt&&(Yt>0||0>vt&&Yt>=0)&&!this._locked)&&(y="onReverseComplete",at=this._reversed),0>vt)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(x=at=!0,y="onReverseComplete"):Yt>=0&&this._first&&(x=!0),this._rawPrevTime=vt;else{if(this._rawPrevTime=it||!Nt||vt||this._rawPrevTime===vt?vt:gt,vt===0&&at)for(Ct=this._first;Ct&&Ct._startTime===0;)Ct._duration||(at=!1),Ct=Ct._next;vt=0,this._initted||(x=!0)}else if(it===0&&0>Yt&&(x=!0),this._time=this._rawPrevTime=vt,this._locked||(this._totalTime=vt,this._repeat!==0&&(B=it+this._repeatDelay,this._cycle=this._totalTime/B>>0,this._cycle!==0&&this._cycle===this._totalTime/B&&vt>=_t&&this._cycle--,this._time=this._totalTime-this._cycle*B,this._yoyo&&1&this._cycle&&(this._time=it-this._time),this._time>it?(this._time=it,vt=it+1e-4):this._time<0?this._time=vt=0:vt=this._time)),this._hasPause&&!this._forcingPlayhead&&!Nt){if(vt=this._time,vt>=z||this._repeat&&se!==this._cycle)for(Ct=this._first;Ct&&Ct._startTime<=vt&&!E;)Ct._duration||Ct.data!=="isPause"||Ct.ratio||Ct._startTime===0&&this._rawPrevTime===0||(E=Ct),Ct=Ct._next;else for(Ct=this._last;Ct&&Ct._startTime>=vt&&!E;)Ct._duration||Ct.data==="isPause"&&Ct._rawPrevTime>0&&(E=Ct),Ct=Ct._prev;E&&E._startTime<it&&(this._time=vt=E._startTime,this._totalTime=vt+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==se&&!this._locked){var we=this._yoyo&&(1&se)!==0,Et=we===(this._yoyo&&(1&this._cycle)!==0),ie=this._totalTime,ze=this._cycle,on=this._rawPrevTime,Ft=this._time;if(this._totalTime=se*it,this._cycle<se?we=!we:this._totalTime+=it,this._time=z,this._rawPrevTime=it===0?Yt-1e-4:Yt,this._cycle=se,this._locked=!0,z=we?0:it,this.render(z,Nt,it===0),Nt||this._gc||this.vars.onRepeat&&(this._cycle=ze,this._locked=!1,this._callback("onRepeat")),z!==this._time||(Et&&(this._cycle=se,this._locked=!0,z=we?it+1e-4:-1e-4,this.render(z,!0,!1)),this._locked=!1,this._paused&&!re))return;this._time=Ft,this._totalTime=ie,this._cycle=ze,this._rawPrevTime=on}if(!(this._time!==z&&this._first||Ut||x||E))return void(_t!==this._totalTime&&this._onUpdate&&(Nt||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==_t&&vt>0&&(this._active=!0),_t===0&&this.vars.onStart&&(this._totalTime===0&&this._totalDuration||Nt||this._callback("onStart")),Z=this._time,Z>=z)for(Ct=this._first;Ct&&(Y=Ct._next,Z===this._time&&(!this._paused||re));)(Ct._active||Ct._startTime<=this._time&&!Ct._paused&&!Ct._gc)&&(E===Ct&&this.pause(),Ct._reversed?Ct.render((Ct._dirty?Ct.totalDuration():Ct._totalDuration)-(vt-Ct._startTime)*Ct._timeScale,Nt,Ut):Ct.render((vt-Ct._startTime)*Ct._timeScale,Nt,Ut)),Ct=Y;else for(Ct=this._last;Ct&&(Y=Ct._prev,Z===this._time&&(!this._paused||re));){if(Ct._active||Ct._startTime<=z&&!Ct._paused&&!Ct._gc){if(E===Ct){for(E=Ct._prev;E&&E.endTime()>this._time;)E.render(E._reversed?E.totalDuration()-(vt-E._startTime)*E._timeScale:(vt-E._startTime)*E._timeScale,Nt,Ut),E=E._prev;E=null,this.pause()}Ct._reversed?Ct.render((Ct._dirty?Ct.totalDuration():Ct._totalDuration)-(vt-Ct._startTime)*Ct._timeScale,Nt,Ut):Ct.render((vt-Ct._startTime)*Ct._timeScale,Nt,Ut)}Ct=Y}this._onUpdate&&(Nt||(Mt.length&&kt(),this._callback("onUpdate"))),y&&(this._locked||this._gc||(dt===this._startTime||zt!==this._timeScale)&&(this._time===0||X>=this.totalDuration())&&(at&&(Mt.length&&kt(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!Nt&&this.vars[y]&&this._callback(y)))},Rt.getActive=function(vt,Nt,Ut){vt==null&&(vt=!0),Nt==null&&(Nt=!0),Ut==null&&(Ut=!1);var Ct,at,Y=[],y=this.getChildren(vt,Nt,Ut),x=0,B=y.length;for(Ct=0;B>Ct;Ct++)at=y[Ct],at.isActive()&&(Y[x++]=at);return Y},Rt.getLabelAfter=function(vt){vt||vt!==0&&(vt=this._time);var Nt,Ut=this.getLabelsArray(),Ct=Ut.length;for(Nt=0;Ct>Nt;Nt++)if(Ut[Nt].time>vt)return Ut[Nt].name;return null},Rt.getLabelBefore=function(vt){vt==null&&(vt=this._time);for(var Nt=this.getLabelsArray(),Ut=Nt.length;--Ut>-1;)if(Nt[Ut].time<vt)return Nt[Ut].name;return null},Rt.getLabelsArray=function(){var vt,Nt=[],Ut=0;for(vt in this._labels)Nt[Ut++]={time:this._labels[vt],name:vt};return Nt.sort(function(Ct,at){return Ct.time-at.time}),Nt},Rt.invalidate=function(){return this._locked=!1,g.prototype.invalidate.call(this)},Rt.progress=function(vt,Nt){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-vt:vt)+this._cycle*(this._duration+this._repeatDelay),Nt):this._time/this.duration()||0},Rt.totalProgress=function(vt,Nt){return arguments.length?this.totalTime(this.totalDuration()*vt,Nt):this._totalTime/this.totalDuration()||0},Rt.totalDuration=function(vt){return arguments.length?this._repeat!==-1&&vt?this.timeScale(this.totalDuration()/vt):this:(this._dirty&&(g.prototype.totalDuration.call(this),this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},Rt.time=function(vt,Nt){return arguments.length?(this._dirty&&this.totalDuration(),vt>this._duration&&(vt=this._duration),this._yoyo&&1&this._cycle?vt=this._duration-vt+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(vt+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(vt,Nt)):this._time},Rt.repeat=function(vt){return arguments.length?(this._repeat=vt,this._uncache(!0)):this._repeat},Rt.repeatDelay=function(vt){return arguments.length?(this._repeatDelay=vt,this._uncache(!0)):this._repeatDelay},Rt.yoyo=function(vt){return arguments.length?(this._yoyo=vt,this):this._yoyo},Rt.currentLabel=function(vt){return arguments.length?this.seek(vt,!0):this.getLabelBefore(this._time+1e-8)},pt},!0),function(){var g=180/Math.PI,$=[],_=[],pt=[],gt={},S=ji._gsDefine.globals,Mt=function(y,x,B,E){B===E&&(B=E-(E-x)/1e6),y===x&&(x=y+(B-y)/1e6),this.a=y,this.b=x,this.c=B,this.d=E,this.da=E-y,this.ca=B-y,this.ba=x-y},kt=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",nt=function(y,x,B,E){var Z={a:y},z={},X={},it={c:E},_t=(y+x)/2,dt=(x+B)/2,zt=(B+E)/2,Yt=(_t+dt)/2,re=(dt+zt)/2,se=(re-Yt)/8;return Z.b=_t+(y-_t)/4,z.b=Yt+se,Z.c=z.a=(Z.b+z.b)/2,z.c=X.a=(Yt+re)/2,X.b=re-se,it.b=zt+(E-zt)/4,X.c=it.a=(X.b+it.b)/2,[Z,z,X,it]},Tt=function(y,x,B,E,Z){var z,X,it,_t,dt,zt,Yt,re,se,we,Et,ie,ze,on=y.length-1,Ft=0,Qe=y[0].a;for(z=0;on>z;z++)dt=y[Ft],X=dt.a,it=dt.d,_t=y[Ft+1].d,Z?(Et=$[z],ie=_[z],ze=(ie+Et)*x*.25/(E?.5:pt[z]||.5),zt=it-(it-X)*(E?.5*x:Et!==0?ze/Et:0),Yt=it+(_t-it)*(E?.5*x:ie!==0?ze/ie:0),re=it-(zt+((Yt-zt)*(3*Et/(Et+ie)+.5)/4||0))):(zt=it-(it-X)*x*.5,Yt=it+(_t-it)*x*.5,re=it-(zt+Yt)/2),zt+=re,Yt+=re,dt.c=se=zt,z!==0?dt.b=Qe:dt.b=Qe=dt.a+.6*(dt.c-dt.a),dt.da=it-X,dt.ca=se-X,dt.ba=Qe-X,B?(we=nt(X,Qe,se,it),y.splice(Ft,1,we[0],we[1],we[2],we[3]),Ft+=4):Ft++,Qe=Yt;dt=y[Ft],dt.b=Qe,dt.c=Qe+.4*(dt.d-Qe),dt.da=dt.d-dt.a,dt.ca=dt.c-dt.a,dt.ba=Qe-dt.a,B&&(we=nt(dt.a,Qe,dt.c,dt.d),y.splice(Ft,1,we[0],we[1],we[2],we[3]))},Rt=function(y,x,B,E){var Z,z,X,it,_t,dt,zt=[];if(E)for(y=[E].concat(y),z=y.length;--z>-1;)typeof(dt=y[z][x])=="string"&&dt.charAt(1)==="="&&(y[z][x]=E[x]+Number(dt.charAt(0)+dt.substr(2)));if(Z=y.length-2,0>Z)return zt[0]=new Mt(y[0][x],0,0,y[0][x]),zt;for(z=0;Z>z;z++)X=y[z][x],it=y[z+1][x],zt[z]=new Mt(X,0,0,it),B&&(_t=y[z+2][x],$[z]=($[z]||0)+(it-X)*(it-X),_[z]=(_[z]||0)+(_t-it)*(_t-it));return zt[z]=new Mt(y[z][x],0,0,y[z+1][x]),zt},vt=function(y,x,B,E,Z,z){var X,it,_t,dt,zt,Yt,re,se,we={},Et=[],ie=z||y[0];Z=typeof Z=="string"?","+Z+",":kt,x==null&&(x=1);for(it in y[0])Et.push(it);if(y.length>1){for(se=y[y.length-1],re=!0,X=Et.length;--X>-1;)if(it=Et[X],Math.abs(ie[it]-se[it])>.05){re=!1;break}re&&(y=y.concat(),z&&y.unshift(z),y.push(y[1]),z=y[y.length-3])}for($.length=_.length=pt.length=0,X=Et.length;--X>-1;)it=Et[X],gt[it]=Z.indexOf(","+it+",")!==-1,we[it]=Rt(y,it,gt[it],z);for(X=$.length;--X>-1;)$[X]=Math.sqrt($[X]),_[X]=Math.sqrt(_[X]);if(!E){for(X=Et.length;--X>-1;)if(gt[it])for(_t=we[Et[X]],Yt=_t.length-1,dt=0;Yt>dt;dt++)zt=_t[dt+1].da/_[dt]+_t[dt].da/$[dt]||0,pt[dt]=(pt[dt]||0)+zt*zt;for(X=pt.length;--X>-1;)pt[X]=Math.sqrt(pt[X])}for(X=Et.length,dt=B?4:1;--X>-1;)it=Et[X],_t=we[it],Tt(_t,x,B,E,gt[it]),re&&(_t.splice(0,dt),_t.splice(_t.length-dt,dt));return we},Nt=function(y,x,B){x=x||"soft";var E,Z,z,X,it,_t,dt,zt,Yt,re,se,we={},Et=x==="cubic"?3:2,ie=x==="soft",ze=[];if(ie&&B&&(y=[B].concat(y)),y==null||y.length<Et+1)throw"invalid Bezier data";for(Yt in y[0])ze.push(Yt);for(_t=ze.length;--_t>-1;){for(Yt=ze[_t],we[Yt]=it=[],re=0,zt=y.length,dt=0;zt>dt;dt++)E=B==null?y[dt][Yt]:typeof(se=y[dt][Yt])=="string"&&se.charAt(1)==="="?B[Yt]+Number(se.charAt(0)+se.substr(2)):Number(se),ie&&dt>1&&zt-1>dt&&(it[re++]=(E+it[re-2])/2),it[re++]=E;for(zt=re-Et+1,re=0,dt=0;zt>dt;dt+=Et)E=it[dt],Z=it[dt+1],z=it[dt+2],X=Et===2?0:it[dt+3],it[re++]=se=Et===3?new Mt(E,Z,z,X):new Mt(E,(2*Z+E)/3,(2*Z+z)/3,z);it.length=re}return we},Ut=function(y,x,B){for(var E,Z,z,X,it,_t,dt,zt,Yt,re,se,we=1/B,Et=y.length;--Et>-1;)for(re=y[Et],z=re.a,X=re.d-z,it=re.c-z,_t=re.b-z,E=Z=0,zt=1;B>=zt;zt++)dt=we*zt,Yt=1-dt,E=Z-(Z=(dt*dt*X+3*Yt*(dt*it+Yt*_t))*dt),se=Et*B+zt-1,x[se]=(x[se]||0)+E*E},Ct=function(y,x){x=x>>0||6;var B,E,Z,z,X=[],it=[],_t=0,dt=0,zt=x-1,Yt=[],re=[];for(B in y)Ut(y[B],X,x);for(Z=X.length,E=0;Z>E;E++)_t+=Math.sqrt(X[E]),z=E%x,re[z]=_t,z===zt&&(dt+=_t,z=E/x>>0,Yt[z]=re,it[z]=dt,_t=0,re=[]);return{length:dt,lengths:it,segments:Yt}},at=ji._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(y,x,B){this._target=y,x instanceof Array&&(x={values:x}),this._func={},this._mod={},this._props=[],this._timeRes=x.timeResolution==null?6:parseInt(x.timeResolution,10);var E,Z,z,X,it,_t=x.values||[],dt={},zt=_t[0],Yt=x.autoRotate||B.vars.orientToBezier;this._autoRotate=Yt?Yt instanceof Array?Yt:[["x","y","rotation",Yt===!0?0:Number(Yt)||0]]:null;for(E in zt)this._props.push(E);for(z=this._props.length;--z>-1;)E=this._props[z],this._overwriteProps.push(E),Z=this._func[E]=typeof y[E]=="function",dt[E]=Z?y[E.indexOf("set")||typeof y["get"+E.substr(3)]!="function"?E:"get"+E.substr(3)]():parseFloat(y[E]),it||dt[E]!==_t[0][E]&&(it=dt);if(this._beziers=x.type!=="cubic"&&x.type!=="quadratic"&&x.type!=="soft"?vt(_t,isNaN(x.curviness)?1:x.curviness,!1,x.type==="thruBasic",x.correlate,it):Nt(_t,x.type,dt),this._segCount=this._beziers[E].length,this._timeRes){var re=Ct(this._beziers,this._timeRes);this._length=re.length,this._lengths=re.lengths,this._segments=re.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(Yt=this._autoRotate)for(this._initialRotations=[],Yt[0]instanceof Array||(this._autoRotate=Yt=[Yt]),z=Yt.length;--z>-1;){for(X=0;3>X;X++)E=Yt[z][X],this._func[E]=typeof y[E]=="function"?y[E.indexOf("set")||typeof y["get"+E.substr(3)]!="function"?E:"get"+E.substr(3)]:!1;E=Yt[z][2],this._initialRotations[z]=(this._func[E]?this._func[E].call(this._target):this._target[E])||0,this._overwriteProps.push(E)}return this._startRatio=B.vars.runBackwards?1:0,!0},set:function(y){var x,B,E,Z,z,X,it,_t,dt,zt,Yt=this._segCount,re=this._func,se=this._target,we=y!==this._startRatio;if(this._timeRes){if(dt=this._lengths,zt=this._curSeg,y*=this._length,E=this._li,y>this._l2&&Yt-1>E){for(_t=Yt-1;_t>E&&(this._l2=dt[++E])<=y;);this._l1=dt[E-1],this._li=E,this._curSeg=zt=this._segments[E],this._s2=zt[this._s1=this._si=0]}else if(y<this._l1&&E>0){for(;E>0&&(this._l1=dt[--E])>=y;);E===0&&y<this._l1?this._l1=0:E++,this._l2=dt[E],this._li=E,this._curSeg=zt=this._segments[E],this._s1=zt[(this._si=zt.length-1)-1]||0,this._s2=zt[this._si]}if(x=E,y-=this._l1,E=this._si,y>this._s2&&E<zt.length-1){for(_t=zt.length-1;_t>E&&(this._s2=zt[++E])<=y;);this._s1=zt[E-1],this._si=E}else if(y<this._s1&&E>0){for(;E>0&&(this._s1=zt[--E])>=y;);E===0&&y<this._s1?this._s1=0:E++,this._s2=zt[E],this._si=E}X=(E+(y-this._s1)/(this._s2-this._s1))*this._prec||0}else x=0>y?0:y>=1?Yt-1:Yt*y>>0,X=(y-x*(1/Yt))*Yt;for(B=1-X,E=this._props.length;--E>-1;)Z=this._props[E],z=this._beziers[Z][x],it=(X*X*z.da+3*B*(X*z.ca+B*z.ba))*X+z.a,this._mod[Z]&&(it=this._mod[Z](it,se)),re[Z]?se[Z](it):se[Z]=it;if(this._autoRotate){var Et,ie,ze,on,Ft,Qe,Ii,Pn=this._autoRotate;for(E=Pn.length;--E>-1;)Z=Pn[E][2],Qe=Pn[E][3]||0,Ii=Pn[E][4]===!0?1:g,z=this._beziers[Pn[E][0]],Et=this._beziers[Pn[E][1]],z&&Et&&(z=z[x],Et=Et[x],ie=z.a+(z.b-z.a)*X,on=z.b+(z.c-z.b)*X,ie+=(on-ie)*X,on+=(z.c+(z.d-z.c)*X-on)*X,ze=Et.a+(Et.b-Et.a)*X,Ft=Et.b+(Et.c-Et.b)*X,ze+=(Ft-ze)*X,Ft+=(Et.c+(Et.d-Et.c)*X-Ft)*X,it=we?Math.atan2(Ft-ze,on-ie)*Ii+Qe:this._initialRotations[E],this._mod[Z]&&(it=this._mod[Z](it,se)),re[Z]?se[Z](it):se[Z]=it)}}}),Y=at.prototype;at.bezierThrough=vt,at.cubicToQuadratic=nt,at._autoCSS=!0,at.quadraticToCubic=function(y,x,B){return new Mt(y,(2*x+y)/3,(2*x+B)/3,B)},at._cssRegister=function(){var y=S.CSSPlugin;if(y){var x=y._internals,B=x._parseToProxy,E=x._setPluginRatio,Z=x.CSSPropTween;x._registerComplexSpecialProp("bezier",{parser:function(z,X,it,_t,dt,zt){X instanceof Array&&(X={values:X}),zt=new at;var Yt,re,se,we=X.values,Et=we.length-1,ie=[],ze={};if(0>Et)return dt;for(Yt=0;Et>=Yt;Yt++)se=B(z,we[Yt],_t,dt,zt,Et!==Yt),ie[Yt]=se.end;for(re in X)ze[re]=X[re];return ze.values=ie,dt=new Z(z,"bezier",0,0,se.pt,2),dt.data=se,dt.plugin=zt,dt.setRatio=E,ze.autoRotate===0&&(ze.autoRotate=!0),!ze.autoRotate||ze.autoRotate instanceof Array||(Yt=ze.autoRotate===!0?0:Number(ze.autoRotate),ze.autoRotate=se.end.left!=null?[["left","top","rotation",Yt,!1]]:se.end.x!=null?[["x","y","rotation",Yt,!1]]:!1),ze.autoRotate&&(_t._transform||_t._enableTransforms(!1),se.autoRotate=_t._target._gsTransform,se.proxy.rotation=se.autoRotate.rotation||0,_t._overwriteProps.push("rotation")),zt._onInitTween(se.proxy,ze,_t._tween),dt}})}},Y._mod=function(y){for(var x,B=this._overwriteProps,E=B.length;--E>-1;)x=y[B[E]],x&&typeof x=="function"&&(this._mod[B[E]]=x)},Y._kill=function(y){var x,B,E=this._props;for(x in this._beziers)if(x in y)for(delete this._beziers[x],delete this._func[x],B=E.length;--B>-1;)E[B]===x&&E.splice(B,1);if(E=this._autoRotate)for(B=E.length;--B>-1;)y[E[B][2]]&&E.splice(B,1);return this._super._kill.call(this,y)}}(),ji._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(g,$){var _,pt,gt,S,Mt=function(){g.call(this,"css"),this._overwriteProps.length=0,this.setRatio=Mt.prototype.setRatio},kt=ji._gsDefine.globals,nt={},Tt=Mt.prototype=new g("css");Tt.constructor=Mt,Mt.version="2.0.2",Mt.API=2,Mt.defaultTransformPerspective=0,Mt.defaultSkewType="compensated",Mt.defaultSmoothOrigin=!0,Tt="px",Mt.suffixMap={top:Tt,right:Tt,bottom:Tt,left:Tt,width:Tt,height:Tt,fontSize:Tt,padding:Tt,margin:Tt,perspective:Tt,lineHeight:""};var Rt,vt,Nt,Ut,Ct,at,Y,y,x=/(?:\-|\.|\b)(\d|\.|e\-)+/g,B=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,E=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,Z=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,z=/(?:\d|\-|\+|=|#|\.)*/g,X=/opacity *= *([^)]*)/i,it=/opacity:([^;]*)/i,_t=/alpha\(opacity *=.+?\)/i,dt=/^(rgb|hsl)/,zt=/([A-Z])/g,Yt=/-([a-z])/gi,re=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,se=function(M,b){return b.toUpperCase()},we=/(?:Left|Right|Width)/i,Et=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,ie=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,ze=/,(?=[^\)]*(?:\(|$))/gi,on=/[\s,\(]/i,Ft=Math.PI/180,Qe=180/Math.PI,Ii={},Pn={style:{}},Ji=ji.document||{createElement:function(){return Pn}},Oe=function(M,b){return Ji.createElementNS?Ji.createElementNS(b||"http://www.w3.org/1999/xhtml",M):Ji.createElement(M)},Pi=Oe("div"),In=Oe("img"),ni=Mt._internals={_specialProps:nt},ci=(ji.navigator||{}).userAgent||"",Fi=function(){var M=ci.indexOf("Android"),b=Oe("a");return Nt=ci.indexOf("Safari")!==-1&&ci.indexOf("Chrome")===-1&&(M===-1||parseFloat(ci.substr(M+8,2))>3),Ct=Nt&&parseFloat(ci.substr(ci.indexOf("Version/")+8,2))<6,Ut=ci.indexOf("Firefox")!==-1,(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(ci)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(ci))&&(at=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),yr=function(M){return X.test(typeof M=="string"?M:(M.currentStyle?M.currentStyle.filter:M.style.filter)||"")?parseFloat(RegExp.$1)/100:1},Lr=function(M){ji.console&&console.log(M)},$n="",Gi="",Gn=function(M,b){b=b||Pi;var U,N,T=b.style;if(T[M]!==void 0)return M;for(M=M.charAt(0).toUpperCase()+M.substr(1),U=["O","Moz","ms","Ms","Webkit"],N=5;--N>-1&&T[U[N]+M]===void 0;);return N>=0?(Gi=N===3?"ms":U[N],$n="-"+Gi.toLowerCase()+"-",Gi+M):null},sn=(typeof window<"u"?window:Ji.defaultView||{getComputedStyle:function(){}}).getComputedStyle,Je=Mt.getStyle=function(M,b,U,N,T){var rt;return Fi||b!=="opacity"?(!N&&M.style[b]?rt=M.style[b]:(U=U||sn(M))?rt=U[b]||U.getPropertyValue(b)||U.getPropertyValue(b.replace(zt,"-$1").toLowerCase()):M.currentStyle&&(rt=M.currentStyle[b]),T==null||rt&&rt!=="none"&&rt!=="auto"&&rt!=="auto auto"?rt:T):yr(M)},wn=ni.convertToPixels=function(M,b,U,N,T){if(N==="px"||!N&&b!=="lineHeight")return U;if(N==="auto"||!U)return 0;var rt,F,ut,xt=we.test(b),ft=M,et=Pi.style,Xt=0>U,Vt=U===1;if(Xt&&(U=-U),Vt&&(U*=100),b!=="lineHeight"||N)if(N==="%"&&b.indexOf("border")!==-1)rt=U/100*(xt?M.clientWidth:M.clientHeight);else{if(et.cssText="border:0 solid red;position:"+Je(M,"position")+";line-height:0;",N!=="%"&&ft.appendChild&&N.charAt(0)!=="v"&&N!=="rem")et[xt?"borderLeftWidth":"borderTopWidth"]=U+N;else{if(ft=M.parentNode||Ji.body,Je(ft,"display").indexOf("flex")!==-1&&(et.position="absolute"),F=ft._gsCache,ut=$.ticker.frame,F&&xt&&F.time===ut)return F.width*U/100;et[xt?"width":"height"]=U+N}ft.appendChild(Pi),rt=parseFloat(Pi[xt?"offsetWidth":"offsetHeight"]),ft.removeChild(Pi),xt&&N==="%"&&Mt.cacheWidths!==!1&&(F=ft._gsCache=ft._gsCache||{},F.time=ut,F.width=rt/U*100),rt!==0||T||(rt=wn(M,b,U,N,!0))}else F=sn(M).lineHeight,M.style.lineHeight=U,rt=parseFloat(sn(M).lineHeight),M.style.lineHeight=F;return Vt&&(rt/=100),Xt?-rt:rt},ho=ni.calculateOffset=function(M,b,U){if(Je(M,"position",U)!=="absolute")return 0;var N=b==="left"?"Left":"Top",T=Je(M,"margin"+N,U);return M["offset"+N]-(wn(M,b,parseFloat(T),T.replace(z,""))||0)},Hn=function(M,b){var U,N,T,rt={};if(b=b||sn(M,null))if(U=b.length)for(;--U>-1;)T=b[U],(T.indexOf("-transform")===-1||as===T)&&(rt[T.replace(Yt,se)]=b.getPropertyValue(T));else for(U in b)(U.indexOf("Transform")===-1||an===U)&&(rt[U]=b[U]);else if(b=M.currentStyle||M.style)for(U in b)typeof U=="string"&&rt[U]===void 0&&(rt[U.replace(Yt,se)]=b[U]);return Fi||(rt.opacity=yr(M)),N=Or(M,b,!1),rt.rotation=N.rotation,rt.skewX=N.skewX,rt.scaleX=N.scaleX,rt.scaleY=N.scaleY,rt.x=N.x,rt.y=N.y,Qn&&(rt.z=N.z,rt.rotationX=N.rotationX,rt.rotationY=N.rotationY,rt.scaleZ=N.scaleZ),rt.filters&&delete rt.filters,rt},Bi=function(M,b,U,N,T){var rt,F,ut,xt={},ft=M.style;for(F in U)F!=="cssText"&&F!=="length"&&isNaN(F)&&(b[F]!==(rt=U[F])||T&&T[F])&&F.indexOf("Origin")===-1&&(typeof rt=="number"||typeof rt=="string")&&(xt[F]=rt!=="auto"||F!=="left"&&F!=="top"?rt!==""&&rt!=="auto"&&rt!=="none"||typeof b[F]!="string"||b[F].replace(Z,"")===""?rt:0:ho(M,F),ft[F]!==void 0&&(ut=new ti(ft,F,ft[F],ut)));if(N)for(F in N)F!=="className"&&(xt[F]=N[F]);return{difs:xt,firstMPT:ut}},A={width:["Left","Right"],height:["Top","Bottom"]},k=["marginLeft","marginRight","marginTop","marginBottom"],j=function(M,b,U){if((M.nodeName+"").toLowerCase()==="svg")return(U||sn(M))[b]||0;if(M.getCTM&&Vs(M))return M.getBBox()[b]||0;var N=parseFloat(b==="width"?M.offsetWidth:M.offsetHeight),T=A[b],rt=T.length;for(U=U||sn(M,null);--rt>-1;)N-=parseFloat(Je(M,"padding"+T[rt],U,!0))||0,N-=parseFloat(Je(M,"border"+T[rt]+"Width",U,!0))||0;return N},q=function(M,b){if(M==="contain"||M==="auto"||M==="auto auto")return M+" ";(M==null||M==="")&&(M="0 0");var U,N=M.split(" "),T=M.indexOf("left")!==-1?"0%":M.indexOf("right")!==-1?"100%":N[0],rt=M.indexOf("top")!==-1?"0%":M.indexOf("bottom")!==-1?"100%":N[1];if(N.length>3&&!b){for(N=M.split(", ").join(",").split(","),M=[],U=0;U<N.length;U++)M.push(q(N[U]));return M.join(",")}return rt==null?rt=T==="center"?"50%":"0":rt==="center"&&(rt="50%"),(T==="center"||isNaN(parseFloat(T))&&(T+"").indexOf("=")===-1)&&(T="50%"),M=T+" "+rt+(N.length>2?" "+N[2]:""),b&&(b.oxp=T.indexOf("%")!==-1,b.oyp=rt.indexOf("%")!==-1,b.oxr=T.charAt(1)==="=",b.oyr=rt.charAt(1)==="=",b.ox=parseFloat(T.replace(Z,"")),b.oy=parseFloat(rt.replace(Z,"")),b.v=M),b||M},ht=function(M,b){return typeof M=="function"&&(M=M(y,Y)),typeof M=="string"&&M.charAt(1)==="="?parseInt(M.charAt(0)+"1",10)*parseFloat(M.substr(2)):parseFloat(M)-parseFloat(b)||0},Lt=function(M,b){typeof M=="function"&&(M=M(y,Y));var U=typeof M=="string"&&M.charAt(1)==="=";return typeof M=="string"&&M.charAt(M.length-2)==="v"&&(M=(U?M.substr(0,2):0)+window["inner"+(M.substr(-2)==="vh"?"Height":"Width")]*(parseFloat(U?M.substr(2):M)/100)),M==null?b:U?parseInt(M.charAt(0)+"1",10)*parseFloat(M.substr(2))+b:parseFloat(M)||0},Gt=function(M,b,U,N){var T,rt,F,ut,xt,ft=1e-6;return typeof M=="function"&&(M=M(y,Y)),M==null?ut=b:typeof M=="number"?ut=M:(T=360,rt=M.split("_"),xt=M.charAt(1)==="=",F=(xt?parseInt(M.charAt(0)+"1",10)*parseFloat(rt[0].substr(2)):parseFloat(rt[0]))*(M.indexOf("rad")===-1?1:Qe)-(xt?0:b),rt.length&&(N&&(N[U]=b+F),M.indexOf("short")!==-1&&(F%=T,F!==F%(T/2)&&(F=0>F?F+T:F-T)),M.indexOf("_cw")!==-1&&0>F?F=(F+9999999999*T)%T-(F/T|0)*T:M.indexOf("ccw")!==-1&&F>0&&(F=(F-9999999999*T)%T-(F/T|0)*T)),ut=b+F),ft>ut&&ut>-ft&&(ut=0),ut},Pt={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},Ae=function(M,b,U){return M=0>M?M+1:M>1?M-1:M,255*(1>6*M?b+(U-b)*M*6:.5>M?U:2>3*M?b+(U-b)*(2/3-M)*6:b)+.5|0},Se=Mt.parseColor=function(M,b){var U,N,T,rt,F,ut,xt,ft,et,Xt,Vt;if(M)if(typeof M=="number")U=[M>>16,M>>8&255,255&M];else{if(M.charAt(M.length-1)===","&&(M=M.substr(0,M.length-1)),Pt[M])U=Pt[M];else if(M.charAt(0)==="#")M.length===4&&(N=M.charAt(1),T=M.charAt(2),rt=M.charAt(3),M="#"+N+N+T+T+rt+rt),M=parseInt(M.substr(1),16),U=[M>>16,M>>8&255,255&M];else if(M.substr(0,3)==="hsl")if(U=Vt=M.match(x),b){if(M.indexOf("=")!==-1)return M.match(B)}else F=Number(U[0])%360/360,ut=Number(U[1])/100,xt=Number(U[2])/100,T=.5>=xt?xt*(ut+1):xt+ut-xt*ut,N=2*xt-T,U.length>3&&(U[3]=Number(U[3])),U[0]=Ae(F+1/3,N,T),U[1]=Ae(F,N,T),U[2]=Ae(F-1/3,N,T);else U=M.match(x)||Pt.transparent;U[0]=Number(U[0]),U[1]=Number(U[1]),U[2]=Number(U[2]),U.length>3&&(U[3]=Number(U[3]))}else U=Pt.black;return b&&!Vt&&(N=U[0]/255,T=U[1]/255,rt=U[2]/255,ft=Math.max(N,T,rt),et=Math.min(N,T,rt),xt=(ft+et)/2,ft===et?F=ut=0:(Xt=ft-et,ut=xt>.5?Xt/(2-ft-et):Xt/(ft+et),F=ft===N?(T-rt)/Xt+(rt>T?6:0):ft===T?(rt-N)/Xt+2:(N-T)/Xt+4,F*=60),U[0]=F+.5|0,U[1]=100*ut+.5|0,U[2]=100*xt+.5|0),U},te=function(M,b){var U,N,T,rt=M.match(Pe)||[],F=0,ut="";if(!rt.length)return M;for(U=0;U<rt.length;U++)N=rt[U],T=M.substr(F,M.indexOf(N,F)-F),F+=T.length+N.length,N=Se(N,b),N.length===3&&N.push(1),ut+=T+(b?"hsla("+N[0]+","+N[1]+"%,"+N[2]+"%,"+N[3]:"rgba("+N.join(","))+")";return ut+M.substr(F)},Pe="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(Tt in Pt)Pe+="|"+Tt+"\\b";Pe=new RegExp(Pe+")","gi"),Mt.colorStringFilter=function(M){var b,U=M[0]+" "+M[1];Pe.test(U)&&(b=U.indexOf("hsl(")!==-1||U.indexOf("hsla(")!==-1,M[0]=te(M[0],b),M[1]=te(M[1],b)),Pe.lastIndex=0},$.defaultStringFilter||($.defaultStringFilter=Mt.colorStringFilter);var pi=function(M,b,U,N){if(M==null)return function(Vt){return Vt};var T,rt=b?(M.match(Pe)||[""])[0]:"",F=M.split(rt).join("").match(E)||[],ut=M.substr(0,M.indexOf(F[0])),xt=M.charAt(M.length-1)===")"?")":"",ft=M.indexOf(" ")!==-1?" ":",",et=F.length,Xt=et>0?F[0].replace(x,""):"";return et?T=b?function(Vt){var It,Kt,qt,Le;if(typeof Vt=="number")Vt+=Xt;else if(N&&ze.test(Vt)){for(Le=Vt.replace(ze,"|").split("|"),qt=0;qt<Le.length;qt++)Le[qt]=T(Le[qt]);return Le.join(",")}if(It=(Vt.match(Pe)||[rt])[0],Kt=Vt.split(It).join("").match(E)||[],qt=Kt.length,et>qt--)for(;++qt<et;)Kt[qt]=U?Kt[(qt-1)/2|0]:F[qt];return ut+Kt.join(ft)+ft+It+xt+(Vt.indexOf("inset")!==-1?" inset":"")}:function(Vt){var It,Kt,qt;if(typeof Vt=="number")Vt+=Xt;else if(N&&ze.test(Vt)){for(Kt=Vt.replace(ze,"|").split("|"),qt=0;qt<Kt.length;qt++)Kt[qt]=T(Kt[qt]);return Kt.join(",")}if(It=Vt.match(E)||[],qt=It.length,et>qt--)for(;++qt<et;)It[qt]=U?It[(qt-1)/2|0]:F[qt];return ut+It.join(ft)+xt}:function(Vt){return Vt}},Mi=function(M){return M=M.split(","),function(b,U,N,T,rt,F,ut){var xt,ft=(U+"").split(" ");for(ut={},xt=0;4>xt;xt++)ut[M[xt]]=ft[xt]=ft[xt]||ft[(xt-1)/2>>0];return T.parse(b,ut,rt,F)}},ti=(ni._setPluginRatio=function(M){this.plugin.setRatio(M);for(var b,U,N,T,rt,F=this.data,ut=F.proxy,xt=F.firstMPT,ft=1e-6;xt;)b=ut[xt.v],xt.r?b=xt.r(b):ft>b&&b>-ft&&(b=0),xt.t[xt.p]=b,xt=xt._next;if(F.autoRotate&&(F.autoRotate.rotation=F.mod?F.mod.call(this._tween,ut.rotation,this.t,this._tween):ut.rotation),M===1||M===0)for(xt=F.firstMPT,rt=M===1?"e":"b";xt;){if(U=xt.t,U.type){if(U.type===1){for(T=U.xs0+U.s+U.xs1,N=1;N<U.l;N++)T+=U["xn"+N]+U["xs"+(N+1)];U[rt]=T}}else U[rt]=U.s+U.xs0;xt=xt._next}},function(M,b,U,N,T){this.t=M,this.p=b,this.v=U,this.r=T,N&&(N._prev=this,this._next=N)}),gi=(ni._parseToProxy=function(M,b,U,N,T,rt){var F,ut,xt,ft,et,Xt=N,Vt={},It={},Kt=U._transform,qt=Ii;for(U._transform=null,Ii=b,N=et=U.parse(M,b,N,T),Ii=qt,rt&&(U._transform=Kt,Xt&&(Xt._prev=null,Xt._prev&&(Xt._prev._next=null)));N&&N!==Xt;){if(N.type<=1&&(ut=N.p,It[ut]=N.s+N.c,Vt[ut]=N.s,rt||(ft=new ti(N,"s",ut,ft,N.r),N.c=0),N.type===1))for(F=N.l;--F>0;)xt="xn"+F,ut=N.p+"_"+xt,It[ut]=N.data[xt],Vt[ut]=N[xt],rt||(ft=new ti(N,xt,ut,ft,N.rxp[xt]));N=N._next}return{proxy:Vt,end:It,firstMPT:ft,pt:et}},ni.CSSPropTween=function(M,b,U,N,T,rt,F,ut,xt,ft,et){this.t=M,this.p=b,this.s=U,this.c=N,this.n=F||b,M instanceof gi||S.push(this.n),this.r=ut&&(typeof ut=="function"?ut:Math.round),this.type=rt||0,xt&&(this.pr=xt,_=!0),this.b=ft===void 0?U:ft,this.e=et===void 0?U+N:et,T&&(this._next=T,T._prev=this)}),Zr=function(M,b,U,N,T,rt){var F=new gi(M,b,U,N-U,T,-1,rt);return F.b=U,F.e=F.xs0=N,F},sr=Mt.parseComplex=function(M,b,U,N,T,rt,F,ut,xt,ft){U=U||rt||"",typeof N=="function"&&(N=N(y,Y)),F=new gi(M,b,0,0,F,ft?2:1,null,!1,ut,U,N),N+="",T&&Pe.test(N+U)&&(N=[U,N],Mt.colorStringFilter(N),U=N[0],N=N[1]);var et,Xt,Vt,It,Kt,qt,Le,Me,Ye,ye,ee,_e,Zt,Ke=U.split(", ").join(",").split(" "),fe=N.split(", ").join(",").split(" "),ne=Ke.length,de=Rt!==!1;for((N.indexOf(",")!==-1||U.indexOf(",")!==-1)&&((N+U).indexOf("rgb")!==-1||(N+U).indexOf("hsl")!==-1?(Ke=Ke.join(" ").replace(ze,", ").split(" "),fe=fe.join(" ").replace(ze,", ").split(" ")):(Ke=Ke.join(" ").split(",").join(", ").split(" "),fe=fe.join(" ").split(",").join(", ").split(" ")),ne=Ke.length),ne!==fe.length&&(Ke=(rt||"").split(" "),ne=Ke.length),F.plugin=xt,F.setRatio=ft,Pe.lastIndex=0,et=0;ne>et;et++)if(It=Ke[et],Kt=fe[et]+"",Me=parseFloat(It),Me||Me===0)F.appendXtra("",Me,ht(Kt,Me),Kt.replace(B,""),de&&Kt.indexOf("px")!==-1?Math.round:!1,!0);else if(T&&Pe.test(It))_e=Kt.indexOf(")")+1,_e=")"+(_e?Kt.substr(_e):""),Zt=Kt.indexOf("hsl")!==-1&&Fi,ye=Kt,It=Se(It,Zt),Kt=Se(Kt,Zt),Ye=It.length+Kt.length>6,Ye&&!Fi&&Kt[3]===0?(F["xs"+F.l]+=F.l?" transparent":"transparent",F.e=F.e.split(fe[et]).join("transparent")):(Fi||(Ye=!1),Zt?F.appendXtra(ye.substr(0,ye.indexOf("hsl"))+(Ye?"hsla(":"hsl("),It[0],ht(Kt[0],It[0]),",",!1,!0).appendXtra("",It[1],ht(Kt[1],It[1]),"%,",!1).appendXtra("",It[2],ht(Kt[2],It[2]),Ye?"%,":"%"+_e,!1):F.appendXtra(ye.substr(0,ye.indexOf("rgb"))+(Ye?"rgba(":"rgb("),It[0],Kt[0]-It[0],",",Math.round,!0).appendXtra("",It[1],Kt[1]-It[1],",",Math.round).appendXtra("",It[2],Kt[2]-It[2],Ye?",":_e,Math.round),Ye&&(It=It.length<4?1:It[3],F.appendXtra("",It,(Kt.length<4?1:Kt[3])-It,_e,!1))),Pe.lastIndex=0;else if(qt=It.match(x)){if(Le=Kt.match(B),!Le||Le.length!==qt.length)return F;for(Vt=0,Xt=0;Xt<qt.length;Xt++)ee=qt[Xt],ye=It.indexOf(ee,Vt),F.appendXtra(It.substr(Vt,ye-Vt),Number(ee),ht(Le[Xt],ee),"",de&&It.substr(ye+ee.length,2)==="px"?Math.round:!1,Xt===0),Vt=ye+ee.length;F["xs"+F.l]+=It.substr(Vt)}else F["xs"+F.l]+=F.l||F["xs"+F.l]?" "+Kt:Kt;if(N.indexOf("=")!==-1&&F.data){for(_e=F.xs0+F.data.s,et=1;et<F.l;et++)_e+=F["xs"+et]+F.data["xn"+et];F.e=_e+F["xs"+et]}return F.l||(F.type=-1,F.xs0=F.e),F.xfirst||F},$i=9;for(Tt=gi.prototype,Tt.l=Tt.pr=0;--$i>0;)Tt["xn"+$i]=0,Tt["xs"+$i]="";Tt.xs0="",Tt._next=Tt._prev=Tt.xfirst=Tt.data=Tt.plugin=Tt.setRatio=Tt.rxp=null,Tt.appendXtra=function(M,b,U,N,T,rt){var F=this,ut=F.l;return F["xs"+ut]+=rt&&(ut||F["xs"+ut])?" "+M:M||"",U||ut===0||F.plugin?(F.l++,F.type=F.setRatio?2:1,F["xs"+F.l]=N||"",ut>0?(F.data["xn"+ut]=b+U,F.rxp["xn"+ut]=T,F["xn"+ut]=b,F.plugin||(F.xfirst=new gi(F,"xn"+ut,b,U,F.xfirst||F,0,F.n,T,F.pr),F.xfirst.xs0=0),F):(F.data={s:b+U},F.rxp={},F.s=b,F.c=U,F.r=T,F)):(F["xs"+ut]+=b+(N||""),F)};var ss=function(M,b){b=b||{},this.p=b.prefix&&Gn(M)||M,nt[M]=nt[this.p]=this,this.format=b.formatter||pi(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},Di=ni._registerComplexSpecialProp=function(M,b,U){typeof b!="object"&&(b={parser:U});var N,T=M.split(","),rt=b.defaultValue;for(U=U||[rt],N=0;N<T.length;N++)b.prefix=N===0&&b.prefix,b.defaultValue=U[N]||rt,new ss(T[N],b)},Qa=ni._registerPluginProp=function(M){if(!nt[M]){var b=M.charAt(0).toUpperCase()+M.substr(1)+"Plugin";Di(M,{parser:function(U,N,T,rt,F,ut,xt){var ft=kt.com.greensock.plugins[b];return ft?(ft._cssRegister(),nt[T].parse(U,N,T,rt,F,ut,xt)):(Lr("Error: "+b+" js file not loaded."),F)}})}};Tt=ss.prototype,Tt.parseComplex=function(M,b,U,N,T,rt){var F,ut,xt,ft,et,Xt,Vt=this.keyword;if(this.multi&&(ze.test(U)||ze.test(b)?(ut=b.replace(ze,"|").split("|"),xt=U.replace(ze,"|").split("|")):Vt&&(ut=[b],xt=[U])),xt){for(ft=xt.length>ut.length?xt.length:ut.length,F=0;ft>F;F++)b=ut[F]=ut[F]||this.dflt,U=xt[F]=xt[F]||this.dflt,Vt&&(et=b.indexOf(Vt),Xt=U.indexOf(Vt),et!==Xt&&(Xt===-1?ut[F]=ut[F].split(Vt).join(""):et===-1&&(ut[F]+=" "+Vt)));b=ut.join(", "),U=xt.join(", ")}return sr(M,this.p,b,U,this.clrs,this.dflt,N,this.pr,T,rt)},Tt.parse=function(M,b,U,N,T,rt,F){return this.parseComplex(M.style,this.format(Je(M,this.p,gt,!1,this.dflt)),this.format(b),T,rt)},Mt.registerSpecialProp=function(M,b,U){Di(M,{parser:function(N,T,rt,F,ut,xt,ft){var et=new gi(N,rt,0,0,ut,2,rt,!1,U);return et.plugin=xt,et.setRatio=b(N,T,F._tween,rt),et},priority:U})},Mt.useSVGTransformAttr=!0;var Cr,Ta="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),an=Gn("transform"),as=$n+"transform",Lo=Gn("transformOrigin"),Qn=Gn("perspective")!==null,ls=ni.Transform=function(){this.perspective=parseFloat(Mt.defaultTransformPerspective)||0,this.force3D=Mt.defaultForce3D!==!1&&Qn?Mt.defaultForce3D||"auto":!1},Hs=ji.SVGElement,Sa=function(M,b,U){var N,T=Ji.createElementNS("http://www.w3.org/2000/svg",M),rt=/([a-z])([A-Z])/g;for(N in U)T.setAttributeNS(null,N.replace(rt,"$1-$2").toLowerCase(),U[N]);return b.appendChild(T),T},Rr=Ji.documentElement||{},Ka=function(){var M,b,U,N=at||/Android/i.test(ci)&&!ji.chrome;return Ji.createElementNS&&!N&&(M=Sa("svg",Rr),b=Sa("rect",M,{width:100,height:50,x:100}),U=b.getBoundingClientRect().width,b.style[Lo]="50% 50%",b.style[an]="scaleX(0.5)",N=U===b.getBoundingClientRect().width&&!(Ut&&Qn),Rr.removeChild(M)),N}(),hs=function(M,b,U,N,T,rt){var F,ut,xt,ft,et,Xt,Vt,It,Kt,qt,Le,Me,Ye,ye,ee=M._gsTransform,_e=cs(M,!0);ee&&(Ye=ee.xOrigin,ye=ee.yOrigin),(!N||(F=N.split(" ")).length<2)&&(Vt=M.getBBox(),Vt.x===0&&Vt.y===0&&Vt.width+Vt.height===0&&(Vt={x:parseFloat(M.hasAttribute("x")?M.getAttribute("x"):M.hasAttribute("cx")?M.getAttribute("cx"):0)||0,y:parseFloat(M.hasAttribute("y")?M.getAttribute("y"):M.hasAttribute("cy")?M.getAttribute("cy"):0)||0,width:0,height:0}),b=q(b).split(" "),F=[(b[0].indexOf("%")!==-1?parseFloat(b[0])/100*Vt.width:parseFloat(b[0]))+Vt.x,(b[1].indexOf("%")!==-1?parseFloat(b[1])/100*Vt.height:parseFloat(b[1]))+Vt.y]),U.xOrigin=ft=parseFloat(F[0]),U.yOrigin=et=parseFloat(F[1]),N&&_e!==us&&(Xt=_e[0],Vt=_e[1],It=_e[2],Kt=_e[3],qt=_e[4],Le=_e[5],Me=Xt*Kt-Vt*It,Me&&(ut=ft*(Kt/Me)+et*(-It/Me)+(It*Le-Kt*qt)/Me,xt=ft*(-Vt/Me)+et*(Xt/Me)-(Xt*Le-Vt*qt)/Me,ft=U.xOrigin=F[0]=ut,et=U.yOrigin=F[1]=xt)),ee&&(rt&&(U.xOffset=ee.xOffset,U.yOffset=ee.yOffset,ee=U),T||T!==!1&&Mt.defaultSmoothOrigin!==!1?(ut=ft-Ye,xt=et-ye,ee.xOffset+=ut*_e[0]+xt*_e[2]-ut,ee.yOffset+=ut*_e[1]+xt*_e[3]-xt):ee.xOffset=ee.yOffset=0),rt||M.setAttribute("data-svg-origin",F.join(" "))},ks=function(M){var b,U=Oe("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),N=this.parentNode,T=this.nextSibling,rt=this.style.cssText;if(Rr.appendChild(U),U.appendChild(this),this.style.display="block",M)try{b=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=ks}catch{}else this._originalGetBBox&&(b=this._originalGetBBox());return T?N.insertBefore(this,T):N.appendChild(this),Rr.removeChild(U),this.style.cssText=rt,b},br=function(M){try{return M.getBBox()}catch{return ks.call(M,!0)}},Vs=function(M){return!(!Hs||!M.getCTM||M.parentNode&&!M.ownerSVGElement||!br(M))},us=[1,0,0,1,0,0],cs=function(M,b){var U,N,T,rt,F,ut,xt=M._gsTransform||new ls,ft=1e5,et=M.style;if(an?N=Je(M,as,null,!0):M.currentStyle&&(N=M.currentStyle.filter.match(Et),N=N&&N.length===4?[N[0].substr(4),Number(N[2].substr(4)),Number(N[1].substr(4)),N[3].substr(4),xt.x||0,xt.y||0].join(","):""),U=!N||N==="none"||N==="matrix(1, 0, 0, 1, 0, 0)",!an||!(ut=!sn(M)||sn(M).display==="none")&&M.parentNode||(ut&&(rt=et.display,et.display="block"),M.parentNode||(F=1,Rr.appendChild(M)),N=Je(M,as,null,!0),U=!N||N==="none"||N==="matrix(1, 0, 0, 1, 0, 0)",rt?et.display=rt:ut&&Co(et,"display"),F&&Rr.removeChild(M)),(xt.svg||M.getCTM&&Vs(M))&&(U&&(et[an]+"").indexOf("matrix")!==-1&&(N=et[an],U=0),T=M.getAttribute("transform"),U&&T&&(T=M.transform.baseVal.consolidate().matrix,N="matrix("+T.a+","+T.b+","+T.c+","+T.d+","+T.e+","+T.f+")",U=0)),U)return us;for(T=(N||"").match(x)||[],$i=T.length;--$i>-1;)rt=Number(T[$i]),T[$i]=(F=rt-(rt|=0))?(F*ft+(0>F?-.5:.5)|0)/ft+rt:rt;return b&&T.length>6?[T[0],T[1],T[4],T[5],T[12],T[13]]:T},Or=ni.getTransform=function(M,b,U,N){if(M._gsTransform&&U&&!N)return M._gsTransform;var T,rt,F,ut,xt,ft,et=U?M._gsTransform||new ls:new ls,Xt=et.scaleX<0,Vt=2e-5,It=1e5,Kt=Qn&&(parseFloat(Je(M,Lo,b,!1,"0 0 0").split(" ")[2])||et.zOrigin)||0,qt=parseFloat(Mt.defaultTransformPerspective)||0;if(et.svg=!(!M.getCTM||!Vs(M)),et.svg&&(hs(M,Je(M,Lo,b,!1,"50% 50%")+"",et,M.getAttribute("data-svg-origin")),Cr=Mt.useSVGTransformAttr||Ka),T=cs(M),T!==us){if(T.length===16){var Le,Me,Ye,ye,ee,_e=T[0],Zt=T[1],Ke=T[2],fe=T[3],ne=T[4],de=T[5],ln=T[6],Ln=T[7],vi=T[8],yi=T[9],Si=T[10],Hi=T[12],ki=T[13],Xi=T[14],qi=T[11],Ti=Math.atan2(ln,Si);et.zOrigin&&(Xi=-et.zOrigin,Hi=vi*Xi-T[12],ki=yi*Xi-T[13],Xi=Si*Xi+et.zOrigin-T[14]),et.rotationX=Ti*Qe,Ti&&(ye=Math.cos(-Ti),ee=Math.sin(-Ti),Le=ne*ye+vi*ee,Me=de*ye+yi*ee,Ye=ln*ye+Si*ee,vi=ne*-ee+vi*ye,yi=de*-ee+yi*ye,Si=ln*-ee+Si*ye,qi=Ln*-ee+qi*ye,ne=Le,de=Me,ln=Ye),Ti=Math.atan2(-Ke,Si),et.rotationY=Ti*Qe,Ti&&(ye=Math.cos(-Ti),ee=Math.sin(-Ti),Le=_e*ye-vi*ee,Me=Zt*ye-yi*ee,Ye=Ke*ye-Si*ee,yi=Zt*ee+yi*ye,Si=Ke*ee+Si*ye,qi=fe*ee+qi*ye,_e=Le,Zt=Me,Ke=Ye),Ti=Math.atan2(Zt,_e),et.rotation=Ti*Qe,Ti&&(ye=Math.cos(Ti),ee=Math.sin(Ti),Le=_e*ye+Zt*ee,Me=ne*ye+de*ee,Ye=vi*ye+yi*ee,Zt=Zt*ye-_e*ee,de=de*ye-ne*ee,yi=yi*ye-vi*ee,_e=Le,ne=Me,vi=Ye),et.rotationX&&Math.abs(et.rotationX)+Math.abs(et.rotation)>359.9&&(et.rotationX=et.rotation=0,et.rotationY=180-et.rotationY),Ti=Math.atan2(ne,de),et.scaleX=(Math.sqrt(_e*_e+Zt*Zt+Ke*Ke)*It+.5|0)/It,et.scaleY=(Math.sqrt(de*de+ln*ln)*It+.5|0)/It,et.scaleZ=(Math.sqrt(vi*vi+yi*yi+Si*Si)*It+.5|0)/It,_e/=et.scaleX,ne/=et.scaleY,Zt/=et.scaleX,de/=et.scaleY,Math.abs(Ti)>Vt?(et.skewX=Ti*Qe,ne=0,et.skewType!=="simple"&&(et.scaleY*=1/Math.cos(Ti))):et.skewX=0,et.perspective=qi?1/(0>qi?-qi:qi):0,et.x=Hi,et.y=ki,et.z=Xi,et.svg&&(et.x-=et.xOrigin-(et.xOrigin*_e-et.yOrigin*ne),et.y-=et.yOrigin-(et.yOrigin*Zt-et.xOrigin*de))}else if(!Qn||N||!T.length||et.x!==T[4]||et.y!==T[5]||!et.rotationX&&!et.rotationY){var _i=T.length>=6,Li=_i?T[0]:1,ei=T[1]||0,Ir=T[2]||0,Mn=_i?T[3]:1;et.x=T[4]||0,et.y=T[5]||0,F=Math.sqrt(Li*Li+ei*ei),ut=Math.sqrt(Mn*Mn+Ir*Ir),xt=Li||ei?Math.atan2(ei,Li)*Qe:et.rotation||0,ft=Ir||Mn?Math.atan2(Ir,Mn)*Qe+xt:et.skewX||0,et.scaleX=F,et.scaleY=ut,et.rotation=xt,et.skewX=ft,Qn&&(et.rotationX=et.rotationY=et.z=0,et.perspective=qt,et.scaleZ=1),et.svg&&(et.x-=et.xOrigin-(et.xOrigin*Li+et.yOrigin*Ir),et.y-=et.yOrigin-(et.xOrigin*ei+et.yOrigin*Mn))}Math.abs(et.skewX)>90&&Math.abs(et.skewX)<270&&(Xt?(et.scaleX*=-1,et.skewX+=et.rotation<=0?180:-180,et.rotation+=et.rotation<=0?180:-180):(et.scaleY*=-1,et.skewX+=et.skewX<=0?180:-180)),et.zOrigin=Kt;for(rt in et)et[rt]<Vt&&et[rt]>-Vt&&(et[rt]=0)}return U&&(M._gsTransform=et,et.svg&&(Cr&&M.style[an]?$.delayedCall(.001,function(){Co(M.style,an)}):!Cr&&M.getAttribute("transform")&&$.delayedCall(.001,function(){M.removeAttribute("transform")}))),et},Ea=function(M){var b,U,N=this.data,T=-N.rotation*Ft,rt=T+N.skewX*Ft,F=1e5,ut=(Math.cos(T)*N.scaleX*F|0)/F,xt=(Math.sin(T)*N.scaleX*F|0)/F,ft=(Math.sin(rt)*-N.scaleY*F|0)/F,et=(Math.cos(rt)*N.scaleY*F|0)/F,Xt=this.t.style,Vt=this.t.currentStyle;if(Vt){U=xt,xt=-ft,ft=-U,b=Vt.filter,Xt.filter="";var It,Kt,qt=this.t.offsetWidth,Le=this.t.offsetHeight,Me=Vt.position!=="absolute",Ye="progid:DXImageTransform.Microsoft.Matrix(M11="+ut+", M12="+xt+", M21="+ft+", M22="+et,ye=N.x+qt*N.xPercent/100,ee=N.y+Le*N.yPercent/100;if(N.ox!=null&&(It=(N.oxp?qt*N.ox*.01:N.ox)-qt/2,Kt=(N.oyp?Le*N.oy*.01:N.oy)-Le/2,ye+=It-(It*ut+Kt*xt),ee+=Kt-(It*ft+Kt*et)),Me?(It=qt/2,Kt=Le/2,Ye+=", Dx="+(It-(It*ut+Kt*xt)+ye)+", Dy="+(Kt-(It*ft+Kt*et)+ee)+")"):Ye+=", sizingMethod='auto expand')",b.indexOf("DXImageTransform.Microsoft.Matrix(")!==-1?Xt.filter=b.replace(ie,Ye):Xt.filter=Ye+" "+b,(M===0||M===1)&&ut===1&&xt===0&&ft===0&&et===1&&(Me&&Ye.indexOf("Dx=0, Dy=0")===-1||X.test(b)&&parseFloat(RegExp.$1)!==100||b.indexOf(b.indexOf("Alpha"))===-1&&Xt.removeAttribute("filter")),!Me){var _e,Zt,Ke,fe=8>at?1:-1;for(It=N.ieOffsetX||0,Kt=N.ieOffsetY||0,N.ieOffsetX=Math.round((qt-((0>ut?-ut:ut)*qt+(0>xt?-xt:xt)*Le))/2+ye),N.ieOffsetY=Math.round((Le-((0>et?-et:et)*Le+(0>ft?-ft:ft)*qt))/2+ee),$i=0;4>$i;$i++)Zt=k[$i],_e=Vt[Zt],U=_e.indexOf("px")!==-1?parseFloat(_e):wn(this.t,Zt,parseFloat(_e),_e.replace(z,""))||0,Ke=U!==N[Zt]?2>$i?-N.ieOffsetX:-N.ieOffsetY:2>$i?It-N.ieOffsetX:Kt-N.ieOffsetY,Xt[Zt]=(N[Zt]=Math.round(U-Ke*($i===0||$i===2?1:fe)))+"px"}}},tl=ni.set3DTransformRatio=ni.setTransformRatio=function(M){var b,U,N,T,rt,F,ut,xt,ft,et,Xt,Vt,It,Kt,qt,Le,Me,Ye,ye,ee,_e,Zt,Ke,fe=this.data,ne=this.t.style,de=fe.rotation,ln=fe.rotationX,Ln=fe.rotationY,vi=fe.scaleX,yi=fe.scaleY,Si=fe.scaleZ,Hi=fe.x,ki=fe.y,Xi=fe.z,qi=fe.svg,Ti=fe.perspective,_i=fe.force3D,Li=fe.skewY,ei=fe.skewX;if(Li&&(ei+=Li,de+=Li),((M===1||M===0)&&_i==="auto"&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!_i)&&!Xi&&!Ti&&!Ln&&!ln&&Si===1||Cr&&qi||!Qn)return void(de||ei||qi?(de*=Ft,Zt=ei*Ft,Ke=1e5,U=Math.cos(de)*vi,rt=Math.sin(de)*vi,N=Math.sin(de-Zt)*-yi,F=Math.cos(de-Zt)*yi,Zt&&fe.skewType==="simple"&&(b=Math.tan(Zt-Li*Ft),b=Math.sqrt(1+b*b),N*=b,F*=b,Li&&(b=Math.tan(Li*Ft),b=Math.sqrt(1+b*b),U*=b,rt*=b)),qi&&(Hi+=fe.xOrigin-(fe.xOrigin*U+fe.yOrigin*N)+fe.xOffset,ki+=fe.yOrigin-(fe.xOrigin*rt+fe.yOrigin*F)+fe.yOffset,Cr&&(fe.xPercent||fe.yPercent)&&(qt=this.t.getBBox(),Hi+=.01*fe.xPercent*qt.width,ki+=.01*fe.yPercent*qt.height),qt=1e-6,qt>Hi&&Hi>-qt&&(Hi=0),qt>ki&&ki>-qt&&(ki=0)),ye=(U*Ke|0)/Ke+","+(rt*Ke|0)/Ke+","+(N*Ke|0)/Ke+","+(F*Ke|0)/Ke+","+Hi+","+ki+")",qi&&Cr?this.t.setAttribute("transform","matrix("+ye):ne[an]=(fe.xPercent||fe.yPercent?"translate("+fe.xPercent+"%,"+fe.yPercent+"%) matrix(":"matrix(")+ye):ne[an]=(fe.xPercent||fe.yPercent?"translate("+fe.xPercent+"%,"+fe.yPercent+"%) matrix(":"matrix(")+vi+",0,0,"+yi+","+Hi+","+ki+")");if(Ut&&(qt=1e-4,qt>vi&&vi>-qt&&(vi=Si=2e-5),qt>yi&&yi>-qt&&(yi=Si=2e-5),!Ti||fe.z||fe.rotationX||fe.rotationY||(Ti=0)),de||ei)de*=Ft,Le=U=Math.cos(de),Me=rt=Math.sin(de),ei&&(de-=ei*Ft,Le=Math.cos(de),Me=Math.sin(de),fe.skewType==="simple"&&(b=Math.tan((ei-Li)*Ft),b=Math.sqrt(1+b*b),Le*=b,Me*=b,fe.skewY&&(b=Math.tan(Li*Ft),b=Math.sqrt(1+b*b),U*=b,rt*=b))),N=-Me,F=Le;else{if(!(Ln||ln||Si!==1||Ti||qi))return void(ne[an]=(fe.xPercent||fe.yPercent?"translate("+fe.xPercent+"%,"+fe.yPercent+"%) translate3d(":"translate3d(")+Hi+"px,"+ki+"px,"+Xi+"px)"+(vi!==1||yi!==1?" scale("+vi+","+yi+")":""));U=F=1,N=rt=0}et=1,T=ut=xt=ft=Xt=Vt=0,It=Ti?-1/Ti:0,Kt=fe.zOrigin,qt=1e-6,ee=",",_e="0",de=Ln*Ft,de&&(Le=Math.cos(de),Me=Math.sin(de),xt=-Me,Xt=It*-Me,T=U*Me,ut=rt*Me,et=Le,It*=Le,U*=Le,rt*=Le),de=ln*Ft,de&&(Le=Math.cos(de),Me=Math.sin(de),b=N*Le+T*Me,Ye=F*Le+ut*Me,ft=et*Me,Vt=It*Me,T=N*-Me+T*Le,ut=F*-Me+ut*Le,et*=Le,It*=Le,N=b,F=Ye),Si!==1&&(T*=Si,ut*=Si,et*=Si,It*=Si),yi!==1&&(N*=yi,F*=yi,ft*=yi,Vt*=yi),vi!==1&&(U*=vi,rt*=vi,xt*=vi,Xt*=vi),(Kt||qi)&&(Kt&&(Hi+=T*-Kt,ki+=ut*-Kt,Xi+=et*-Kt+Kt),qi&&(Hi+=fe.xOrigin-(fe.xOrigin*U+fe.yOrigin*N)+fe.xOffset,ki+=fe.yOrigin-(fe.xOrigin*rt+fe.yOrigin*F)+fe.yOffset),qt>Hi&&Hi>-qt&&(Hi=_e),qt>ki&&ki>-qt&&(ki=_e),qt>Xi&&Xi>-qt&&(Xi=0)),ye=fe.xPercent||fe.yPercent?"translate("+fe.xPercent+"%,"+fe.yPercent+"%) matrix3d(":"matrix3d(",ye+=(qt>U&&U>-qt?_e:U)+ee+(qt>rt&&rt>-qt?_e:rt)+ee+(qt>xt&&xt>-qt?_e:xt),ye+=ee+(qt>Xt&&Xt>-qt?_e:Xt)+ee+(qt>N&&N>-qt?_e:N)+ee+(qt>F&&F>-qt?_e:F),ln||Ln||Si!==1?(ye+=ee+(qt>ft&&ft>-qt?_e:ft)+ee+(qt>Vt&&Vt>-qt?_e:Vt)+ee+(qt>T&&T>-qt?_e:T),ye+=ee+(qt>ut&&ut>-qt?_e:ut)+ee+(qt>et&&et>-qt?_e:et)+ee+(qt>It&&It>-qt?_e:It)+ee):ye+=",0,0,0,0,1,0,",ye+=Hi+ee+ki+ee+Xi+ee+(Ti?1+-Xi/Ti:1)+")",ne[an]=ye};Tt=ls.prototype,Tt.x=Tt.y=Tt.z=Tt.skewX=Tt.skewY=Tt.rotation=Tt.rotationX=Tt.rotationY=Tt.zOrigin=Tt.xPercent=Tt.yPercent=Tt.xOffset=Tt.yOffset=0,Tt.scaleX=Tt.scaleY=Tt.scaleZ=1,Di("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(M,b,U,N,T,rt,F){if(N._lastParsedTransform===F)return T;N._lastParsedTransform=F;var ut,xt=F.scale&&typeof F.scale=="function"?F.scale:0;typeof F[U]=="function"&&(ut=F[U],F[U]=b),xt&&(F.scale=xt(y,M));var ft,et,Xt,Vt,It,Kt,qt,Le,Me,Ye=M._gsTransform,ye=M.style,ee=1e-6,_e=Ta.length,Zt=F,Ke={},fe="transformOrigin",ne=Or(M,gt,!0,Zt.parseTransform),de=Zt.transform&&(typeof Zt.transform=="function"?Zt.transform(y,Y):Zt.transform);if(ne.skewType=Zt.skewType||ne.skewType||Mt.defaultSkewType,N._transform=ne,"rotationZ"in Zt&&(Zt.rotation=Zt.rotationZ),de&&typeof de=="string"&&an)et=Pi.style,et[an]=de,et.display="block",et.position="absolute",de.indexOf("%")!==-1&&(et.width=Je(M,"width"),et.height=Je(M,"height")),Ji.body.appendChild(Pi),ft=Or(Pi,null,!1),ne.skewType==="simple"&&(ft.scaleY*=Math.cos(ft.skewX*Ft)),ne.svg&&(Kt=ne.xOrigin,qt=ne.yOrigin,ft.x-=ne.xOffset,ft.y-=ne.yOffset,(Zt.transformOrigin||Zt.svgOrigin)&&(de={},hs(M,q(Zt.transformOrigin),de,Zt.svgOrigin,Zt.smoothOrigin,!0),Kt=de.xOrigin,qt=de.yOrigin,ft.x-=de.xOffset-ne.xOffset,ft.y-=de.yOffset-ne.yOffset),(Kt||qt)&&(Le=cs(Pi,!0),ft.x-=Kt-(Kt*Le[0]+qt*Le[2]),ft.y-=qt-(Kt*Le[1]+qt*Le[3]))),Ji.body.removeChild(Pi),ft.perspective||(ft.perspective=ne.perspective),Zt.xPercent!=null&&(ft.xPercent=Lt(Zt.xPercent,ne.xPercent)),Zt.yPercent!=null&&(ft.yPercent=Lt(Zt.yPercent,ne.yPercent));else if(typeof Zt=="object"){if(ft={scaleX:Lt(Zt.scaleX!=null?Zt.scaleX:Zt.scale,ne.scaleX),scaleY:Lt(Zt.scaleY!=null?Zt.scaleY:Zt.scale,ne.scaleY),scaleZ:Lt(Zt.scaleZ,ne.scaleZ),x:Lt(Zt.x,ne.x),y:Lt(Zt.y,ne.y),z:Lt(Zt.z,ne.z),xPercent:Lt(Zt.xPercent,ne.xPercent),yPercent:Lt(Zt.yPercent,ne.yPercent),perspective:Lt(Zt.transformPerspective,ne.perspective)},It=Zt.directionalRotation,It!=null)if(typeof It=="object")for(et in It)Zt[et]=It[et];else Zt.rotation=It;typeof Zt.x=="string"&&Zt.x.indexOf("%")!==-1&&(ft.x=0,ft.xPercent=Lt(Zt.x,ne.xPercent)),typeof Zt.y=="string"&&Zt.y.indexOf("%")!==-1&&(ft.y=0,ft.yPercent=Lt(Zt.y,ne.yPercent)),ft.rotation=Gt("rotation"in Zt?Zt.rotation:"shortRotation"in Zt?Zt.shortRotation+"_short":ne.rotation,ne.rotation,"rotation",Ke),Qn&&(ft.rotationX=Gt("rotationX"in Zt?Zt.rotationX:"shortRotationX"in Zt?Zt.shortRotationX+"_short":ne.rotationX||0,ne.rotationX,"rotationX",Ke),ft.rotationY=Gt("rotationY"in Zt?Zt.rotationY:"shortRotationY"in Zt?Zt.shortRotationY+"_short":ne.rotationY||0,ne.rotationY,"rotationY",Ke)),ft.skewX=Gt(Zt.skewX,ne.skewX),ft.skewY=Gt(Zt.skewY,ne.skewY)}for(Qn&&Zt.force3D!=null&&(ne.force3D=Zt.force3D,Vt=!0),Xt=ne.force3D||ne.z||ne.rotationX||ne.rotationY||ft.z||ft.rotationX||ft.rotationY||ft.perspective,Xt||Zt.scale==null||(ft.scaleZ=1);--_e>-1;)Me=Ta[_e],de=ft[Me]-ne[Me],(de>ee||-ee>de||Zt[Me]!=null||Ii[Me]!=null)&&(Vt=!0,T=new gi(ne,Me,ne[Me],de,T),Me in Ke&&(T.e=Ke[Me]),T.xs0=0,T.plugin=rt,N._overwriteProps.push(T.n));return de=Zt.transformOrigin,ne.svg&&(de||Zt.svgOrigin)&&(Kt=ne.xOffset,qt=ne.yOffset,hs(M,q(de),ft,Zt.svgOrigin,Zt.smoothOrigin),T=Zr(ne,"xOrigin",(Ye?ne:ft).xOrigin,ft.xOrigin,T,fe),T=Zr(ne,"yOrigin",(Ye?ne:ft).yOrigin,ft.yOrigin,T,fe),(Kt!==ne.xOffset||qt!==ne.yOffset)&&(T=Zr(ne,"xOffset",Ye?Kt:ne.xOffset,ne.xOffset,T,fe),T=Zr(ne,"yOffset",Ye?qt:ne.yOffset,ne.yOffset,T,fe)),de="0px 0px"),(de||Qn&&Xt&&ne.zOrigin)&&(an?(Vt=!0,Me=Lo,de=(de||Je(M,Me,gt,!1,"50% 50%"))+"",T=new gi(ye,Me,0,0,T,-1,fe),T.b=ye[Me],T.plugin=rt,Qn?(et=ne.zOrigin,de=de.split(" "),ne.zOrigin=(de.length>2&&(et===0||de[2]!=="0px")?parseFloat(de[2]):et)||0,T.xs0=T.e=de[0]+" "+(de[1]||"50%")+" 0px",T=new gi(ne,"zOrigin",0,0,T,-1,T.n),T.b=et,T.xs0=T.e=ne.zOrigin):T.xs0=T.e=de):q(de+"",ne)),Vt&&(N._transformType=ne.svg&&Cr||!Xt&&this._transformType!==3?2:3),ut&&(F[U]=ut),xt&&(F.scale=xt),T},prefix:!0}),Di("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),Di("borderRadius",{defaultValue:"0px",parser:function(M,b,U,N,T,rt){b=this.format(b);var F,ut,xt,ft,et,Xt,Vt,It,Kt,qt,Le,Me,Ye,ye,ee,_e,Zt=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],Ke=M.style;for(Kt=parseFloat(M.offsetWidth),qt=parseFloat(M.offsetHeight),F=b.split(" "),ut=0;ut<Zt.length;ut++)this.p.indexOf("border")&&(Zt[ut]=Gn(Zt[ut])),et=ft=Je(M,Zt[ut],gt,!1,"0px"),et.indexOf(" ")!==-1&&(ft=et.split(" "),et=ft[0],ft=ft[1]),Xt=xt=F[ut],Vt=parseFloat(et),Me=et.substr((Vt+"").length),Ye=Xt.charAt(1)==="=",Ye?(It=parseInt(Xt.charAt(0)+"1",10),Xt=Xt.substr(2),It*=parseFloat(Xt),Le=Xt.substr((It+"").length-(0>It?1:0))||""):(It=parseFloat(Xt),Le=Xt.substr((It+"").length)),Le===""&&(Le=pt[U]||Me),Le!==Me&&(ye=wn(M,"borderLeft",Vt,Me),ee=wn(M,"borderTop",Vt,Me),Le==="%"?(et=ye/Kt*100+"%",ft=ee/qt*100+"%"):Le==="em"?(_e=wn(M,"borderLeft",1,"em"),et=ye/_e+"em",ft=ee/_e+"em"):(et=ye+"px",ft=ee+"px"),Ye&&(Xt=parseFloat(et)+It+Le,xt=parseFloat(ft)+It+Le)),T=sr(Ke,Zt[ut],et+" "+ft,Xt+" "+xt,!1,"0px",T);return T},prefix:!0,formatter:pi("0px 0px 0px 0px",!1,!0)}),Di("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(M,b,U,N,T,rt){return sr(M.style,U,this.format(Je(M,U,gt,!1,"0px 0px")),this.format(b),!1,"0px",T)},prefix:!0,formatter:pi("0px 0px",!1,!0)}),Di("backgroundPosition",{defaultValue:"0 0",parser:function(M,b,U,N,T,rt){var F,ut,xt,ft,et,Xt,Vt="background-position",It=gt||sn(M,null),Kt=this.format((It?at?It.getPropertyValue(Vt+"-x")+" "+It.getPropertyValue(Vt+"-y"):It.getPropertyValue(Vt):M.currentStyle.backgroundPositionX+" "+M.currentStyle.backgroundPositionY)||"0 0"),qt=this.format(b);if(Kt.indexOf("%")!==-1!=(qt.indexOf("%")!==-1)&&qt.split(",").length<2&&(Xt=Je(M,"backgroundImage").replace(re,""),Xt&&Xt!=="none")){for(F=Kt.split(" "),ut=qt.split(" "),In.setAttribute("src",Xt),xt=2;--xt>-1;)Kt=F[xt],ft=Kt.indexOf("%")!==-1,ft!==(ut[xt].indexOf("%")!==-1)&&(et=xt===0?M.offsetWidth-In.width:M.offsetHeight-In.height,F[xt]=ft?parseFloat(Kt)/100*et+"px":parseFloat(Kt)/et*100+"%");Kt=F.join(" ")}return this.parseComplex(M.style,Kt,qt,T,rt)},formatter:q}),Di("backgroundSize",{defaultValue:"0 0",formatter:function(M){return M+="",M.substr(0,2)==="co"?M:q(M.indexOf(" ")===-1?M+" "+M:M)}}),Di("perspective",{defaultValue:"0px",prefix:!0}),Di("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),Di("transformStyle",{prefix:!0}),Di("backfaceVisibility",{prefix:!0}),Di("userSelect",{prefix:!0}),Di("margin",{parser:Mi("marginTop,marginRight,marginBottom,marginLeft")}),Di("padding",{parser:Mi("paddingTop,paddingRight,paddingBottom,paddingLeft")}),Di("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(M,b,U,N,T,rt){var F,ut,xt;return 9>at?(ut=M.currentStyle,xt=8>at?" ":",",F="rect("+ut.clipTop+xt+ut.clipRight+xt+ut.clipBottom+xt+ut.clipLeft+")",b=this.format(b).split(",").join(xt)):(F=this.format(Je(M,this.p,gt,!1,this.dflt)),b=this.format(b)),this.parseComplex(M.style,F,b,T,rt)}}),Di("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),Di("autoRound,strictUnits",{parser:function(M,b,U,N,T){return T}}),Di("border",{defaultValue:"0px solid #000",parser:function(M,b,U,N,T,rt){var F=Je(M,"borderTopWidth",gt,!1,"0px"),ut=this.format(b).split(" "),xt=ut[0].replace(z,"");return xt!=="px"&&(F=parseFloat(F)/wn(M,"borderTopWidth",1,xt)+xt),this.parseComplex(M.style,this.format(F+" "+Je(M,"borderTopStyle",gt,!1,"solid")+" "+Je(M,"borderTopColor",gt,!1,"#000")),ut.join(" "),T,rt)},color:!0,formatter:function(M){var b=M.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(M.match(Pe)||["#000"])[0]}}),Di("borderWidth",{parser:Mi("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),Di("float,cssFloat,styleFloat",{parser:function(M,b,U,N,T,rt){var F=M.style,ut="cssFloat"in F?"cssFloat":"styleFloat";return new gi(F,ut,0,0,T,-1,U,!1,0,F[ut],b)}});var el=function(M){var b,U=this.t,N=U.filter||Je(this.data,"filter")||"",T=this.s+this.c*M|0;T===100&&(N.indexOf("atrix(")===-1&&N.indexOf("radient(")===-1&&N.indexOf("oader(")===-1?(U.removeAttribute("filter"),b=!Je(this.data,"filter")):(U.filter=N.replace(_t,""),b=!0)),b||(this.xn1&&(U.filter=N=N||"alpha(opacity="+T+")"),N.indexOf("pacity")===-1?T===0&&this.xn1||(U.filter=N+" alpha(opacity="+T+")"):U.filter=N.replace(X,"opacity="+T))};Di("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(M,b,U,N,T,rt){var F=parseFloat(Je(M,"opacity",gt,!1,"1")),ut=M.style,xt=U==="autoAlpha";return typeof b=="string"&&b.charAt(1)==="="&&(b=(b.charAt(0)==="-"?-1:1)*parseFloat(b.substr(2))+F),xt&&F===1&&Je(M,"visibility",gt)==="hidden"&&b!==0&&(F=0),Fi?T=new gi(ut,"opacity",F,b-F,T):(T=new gi(ut,"opacity",100*F,100*(b-F),T),T.xn1=xt?1:0,ut.zoom=1,T.type=2,T.b="alpha(opacity="+T.s+")",T.e="alpha(opacity="+(T.s+T.c)+")",T.data=M,T.plugin=rt,T.setRatio=el),xt&&(T=new gi(ut,"visibility",0,0,T,-1,null,!1,0,F!==0?"inherit":"hidden",b===0?"hidden":"inherit"),T.xs0="inherit",N._overwriteProps.push(T.n),N._overwriteProps.push(U)),T}});var Co=function(M,b){b&&(M.removeProperty?((b.substr(0,2)==="ms"||b.substr(0,6)==="webkit")&&(b="-"+b),M.removeProperty(b.replace(zt,"-$1").toLowerCase())):M.removeAttribute(b))},Ro=function(M){if(this.t._gsClassPT=this,M===1||M===0){this.t.setAttribute("class",M===0?this.b:this.e);for(var b=this.data,U=this.t.style;b;)b.v?U[b.p]=b.v:Co(U,b.p),b=b._next;M===1&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};Di("className",{parser:function(M,b,U,N,T,rt,F){var ut,xt,ft,et,Xt,Vt=M.getAttribute("class")||"",It=M.style.cssText;if(T=N._classNamePT=new gi(M,U,0,0,T,2),T.setRatio=Ro,T.pr=-11,_=!0,T.b=Vt,xt=Hn(M,gt),ft=M._gsClassPT){for(et={},Xt=ft.data;Xt;)et[Xt.p]=1,Xt=Xt._next;ft.setRatio(1)}return M._gsClassPT=T,T.e=b.charAt(1)!=="="?b:Vt.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+(b.charAt(0)==="+"?" "+b.substr(2):""),M.setAttribute("class",T.e),ut=Bi(M,xt,Hn(M),F,et),M.setAttribute("class",Vt),T.data=ut.firstMPT,M.style.cssText=It,T=T.xfirst=N.parse(M,ut.difs,T,rt)}});var Aa=function(M){if((M===1||M===0)&&this.data._totalTime===this.data._totalDuration&&this.data.data!=="isFromStart"){var b,U,N,T,rt,F=this.t.style,ut=nt.transform.parse;if(this.e==="all")F.cssText="",T=!0;else for(b=this.e.split(" ").join("").split(","),N=b.length;--N>-1;)U=b[N],nt[U]&&(nt[U].parse===ut?T=!0:U=U==="transformOrigin"?Lo:nt[U].p),Co(F,U);T&&(Co(F,an),rt=this.t._gsTransform,rt&&(rt.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(Di("clearProps",{parser:function(M,b,U,N,T){return T=new gi(M,U,0,0,T,2),T.setRatio=Aa,T.e=b,T.pr=-10,T.data=N._tween,_=!0,T}}),Tt="bezier,throwProps,physicsProps,physics2D".split(","),$i=Tt.length;$i--;)Qa(Tt[$i]);Tt=Mt.prototype,Tt._firstPT=Tt._lastParsedTransform=Tt._transform=null,Tt._onInitTween=function(M,b,U,N){if(!M.nodeType)return!1;this._target=Y=M,this._tween=U,this._vars=b,y=N,Rt=b.autoRound,_=!1,pt=b.suffixMap||Mt.suffixMap,gt=sn(M,""),S=this._overwriteProps;var T,rt,F,ut,xt,ft,et,Xt,Vt,It=M.style;if(vt&&It.zIndex===""&&(T=Je(M,"zIndex",gt),(T==="auto"||T==="")&&this._addLazySet(It,"zIndex",0)),typeof b=="string"&&(ut=It.cssText,T=Hn(M,gt),It.cssText=ut+";"+b,T=Bi(M,T,Hn(M)).difs,!Fi&&it.test(b)&&(T.opacity=parseFloat(RegExp.$1)),b=T,It.cssText=ut),b.className?this._firstPT=rt=nt.className.parse(M,b.className,"className",this,null,null,b):this._firstPT=rt=this.parse(M,b,null),this._transformType){for(Vt=this._transformType===3,an?Nt&&(vt=!0,It.zIndex===""&&(et=Je(M,"zIndex",gt),(et==="auto"||et==="")&&this._addLazySet(It,"zIndex",0)),Ct&&this._addLazySet(It,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(Vt?"visible":"hidden"))):It.zoom=1,F=rt;F&&F._next;)F=F._next;Xt=new gi(M,"transform",0,0,null,2),this._linkCSSP(Xt,null,F),Xt.setRatio=an?tl:Ea,Xt.data=this._transform||Or(M,gt,!0),Xt.tween=U,Xt.pr=-1,S.pop()}if(_){for(;rt;){for(ft=rt._next,F=ut;F&&F.pr>rt.pr;)F=F._next;(rt._prev=F?F._prev:xt)?rt._prev._next=rt:ut=rt,(rt._next=F)?F._prev=rt:xt=rt,rt=ft}this._firstPT=ut}return!0},Tt.parse=function(M,b,U,N){var T,rt,F,ut,xt,ft,et,Xt,Vt,It,Kt=M.style;for(T in b){if(ft=b[T],typeof ft=="function"&&(ft=ft(y,Y)),rt=nt[T])U=rt.parse(M,ft,T,this,U,N,b);else{if(T.substr(0,2)==="--"){this._tween._propLookup[T]=this._addTween.call(this._tween,M.style,"setProperty",sn(M).getPropertyValue(T)+"",ft+"",T,!1,T);continue}xt=Je(M,T,gt)+"",Vt=typeof ft=="string",T==="color"||T==="fill"||T==="stroke"||T.indexOf("Color")!==-1||Vt&&dt.test(ft)?(Vt||(ft=Se(ft),ft=(ft.length>3?"rgba(":"rgb(")+ft.join(",")+")"),U=sr(Kt,T,xt,ft,!0,"transparent",U,0,N)):Vt&&on.test(ft)?U=sr(Kt,T,xt,ft,!0,null,U,0,N):(F=parseFloat(xt),et=F||F===0?xt.substr((F+"").length):"",(xt===""||xt==="auto")&&(T==="width"||T==="height"?(F=j(M,T,gt),et="px"):T==="left"||T==="top"?(F=ho(M,T,gt),et="px"):(F=T!=="opacity"?0:1,et="")),It=Vt&&ft.charAt(1)==="=",It?(ut=parseInt(ft.charAt(0)+"1",10),ft=ft.substr(2),ut*=parseFloat(ft),Xt=ft.replace(z,"")):(ut=parseFloat(ft),Xt=Vt?ft.replace(z,""):""),Xt===""&&(Xt=T in pt?pt[T]:et),ft=ut||ut===0?(It?ut+F:ut)+Xt:b[T],et!==Xt&&(Xt!==""||T==="lineHeight")&&(ut||ut===0)&&F&&(F=wn(M,T,F,et),Xt==="%"?(F/=wn(M,T,100,"%")/100,b.strictUnits!==!0&&(xt=F+"%")):Xt==="em"||Xt==="rem"||Xt==="vw"||Xt==="vh"?F/=wn(M,T,1,Xt):Xt!=="px"&&(ut=wn(M,T,ut,Xt),Xt="px"),It&&(ut||ut===0)&&(ft=ut+F+Xt)),It&&(ut+=F),!F&&F!==0||!ut&&ut!==0?Kt[T]!==void 0&&(ft||ft+""!="NaN"&&ft!=null)?(U=new gi(Kt,T,ut||F||0,0,U,-1,T,!1,0,xt,ft),U.xs0=ft!=="none"||T!=="display"&&T.indexOf("Style")===-1?ft:xt):Lr("invalid "+T+" tween value: "+b[T]):(U=new gi(Kt,T,F,ut-F,U,0,T,Rt!==!1&&(Xt==="px"||T==="zIndex"),0,xt,ft),U.xs0=Xt))}N&&U&&!U.plugin&&(U.plugin=N)}return U},Tt.setRatio=function(M){var b,U,N,T=this._firstPT,rt=1e-6;if(M!==1||this._tween._time!==this._tween._duration&&this._tween._time!==0)if(M||this._tween._time!==this._tween._duration&&this._tween._time!==0||this._tween._rawPrevTime===-1e-6)for(;T;){if(b=T.c*M+T.s,T.r?b=T.r(b):rt>b&&b>-rt&&(b=0),T.type)if(T.type===1)if(N=T.l,N===2)T.t[T.p]=T.xs0+b+T.xs1+T.xn1+T.xs2;else if(N===3)T.t[T.p]=T.xs0+b+T.xs1+T.xn1+T.xs2+T.xn2+T.xs3;else if(N===4)T.t[T.p]=T.xs0+b+T.xs1+T.xn1+T.xs2+T.xn2+T.xs3+T.xn3+T.xs4;else if(N===5)T.t[T.p]=T.xs0+b+T.xs1+T.xn1+T.xs2+T.xn2+T.xs3+T.xn3+T.xs4+T.xn4+T.xs5;else{for(U=T.xs0+b+T.xs1,N=1;N<T.l;N++)U+=T["xn"+N]+T["xs"+(N+1)];T.t[T.p]=U}else T.type===-1?T.t[T.p]=T.xs0:T.setRatio&&T.setRatio(M);else T.t[T.p]=b+T.xs0;T=T._next}else for(;T;)T.type!==2?T.t[T.p]=T.b:T.setRatio(M),T=T._next;else for(;T;){if(T.type!==2)if(T.r&&T.type!==-1)if(b=T.r(T.s+T.c),T.type){if(T.type===1){for(N=T.l,U=T.xs0+b+T.xs1,N=1;N<T.l;N++)U+=T["xn"+N]+T["xs"+(N+1)];T.t[T.p]=U}}else T.t[T.p]=b+T.xs0;else T.t[T.p]=T.e;else T.setRatio(M);T=T._next}},Tt._enableTransforms=function(M){this._transform=this._transform||Or(this._target,gt,!0),this._transformType=this._transform.svg&&Cr||!M&&this._transformType!==3?2:3};var Pa=function(M){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};Tt._addLazySet=function(M,b,U){var N=this._firstPT=new gi(M,b,0,0,this._firstPT,2);N.e=U,N.setRatio=Pa,N.data=this},Tt._linkCSSP=function(M,b,U,N){return M&&(b&&(b._prev=M),M._next&&(M._next._prev=M._prev),M._prev?M._prev._next=M._next:this._firstPT===M&&(this._firstPT=M._next,N=!0),U?U._next=M:N||this._firstPT!==null||(this._firstPT=M),M._next=b,M._prev=U),M},Tt._mod=function(M){for(var b=this._firstPT;b;)typeof M[b.p]=="function"&&(b.r=M[b.p]),b=b._next},Tt._kill=function(M){var b,U,N,T=M;if(M.autoAlpha||M.alpha){T={};for(U in M)T[U]=M[U];T.opacity=1,T.autoAlpha&&(T.visibility=1)}for(M.className&&(b=this._classNamePT)&&(N=b.xfirst,N&&N._prev?this._linkCSSP(N._prev,b._next,N._prev._prev):N===this._firstPT&&(this._firstPT=b._next),b._next&&this._linkCSSP(b._next,b._next._next,N._prev),this._classNamePT=null),b=this._firstPT;b;)b.plugin&&b.plugin!==U&&b.plugin._kill&&(b.plugin._kill(M),U=b.plugin),b=b._next;return g.prototype._kill.call(this,T)};var _r=function(M,b,U){var N,T,rt,F;if(M.slice)for(T=M.length;--T>-1;)_r(M[T],b,U);else for(N=M.childNodes,T=N.length;--T>-1;)rt=N[T],F=rt.type,rt.style&&(b.push(Hn(rt)),U&&U.push(rt)),F!==1&&F!==9&&F!==11||!rt.childNodes.length||_r(rt,b,U)};return Mt.cascadeTo=function(M,b,U){var N,T,rt,F,ut=$.to(M,b,U),xt=[ut],ft=[],et=[],Xt=[],Vt=$._internals.reservedProps;for(M=ut._targets||ut.target,_r(M,ft,Xt),ut.render(b,!0,!0),_r(M,et),ut.render(0,!0,!0),ut._enabled(!0),N=Xt.length;--N>-1;)if(T=Bi(Xt[N],ft[N],et[N]),T.firstMPT){T=T.difs;for(rt in U)Vt[rt]&&(T[rt]=U[rt]);F={};for(rt in T)F[rt]=ft[N][rt];xt.push($.fromTo(Xt[N],b,F,T))}return xt},g.activate([Mt]),Mt},!0),function(){var g=ji._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(gt,S,Mt){return this._tween=Mt,!0}}),$=function(gt){var S=1>gt?Math.pow(10,(gt+"").length-2):1;return function(Mt){return(Math.round(Mt/gt)*gt*S|0)/S}},_=function(gt,S){for(;gt;)gt.f||gt.blob||(gt.m=S||Math.round),gt=gt._next},pt=g.prototype;pt._onInitAllProps=function(){var gt,S,Mt,kt,nt=this._tween,Tt=nt.vars.roundProps,Rt={},vt=nt._propLookup.roundProps;if(typeof Tt!="object"||Tt.push)for(typeof Tt=="string"&&(Tt=Tt.split(",")),Mt=Tt.length;--Mt>-1;)Rt[Tt[Mt]]=Math.round;else for(kt in Tt)Rt[kt]=$(Tt[kt]);for(kt in Rt)for(gt=nt._firstPT;gt;)S=gt._next,gt.pg?gt.t._mod(Rt):gt.n===kt&&(gt.f===2&>.t?_(gt.t._firstPT,Rt[kt]):(this._add(gt.t,kt,gt.s,gt.c,Rt[kt]),S&&(S._prev=gt._prev),gt._prev?gt._prev._next=S:nt._firstPT===gt&&(nt._firstPT=S),gt._next=gt._prev=null,nt._propLookup[kt]=vt)),gt=S;return!1},pt._add=function(gt,S,Mt,kt,nt){this._addTween(gt,S,Mt,Mt+kt,S,nt||Math.round),this._overwriteProps.push(S)}}(),function(){ji._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(g,$,_,pt){var gt,S;if(typeof g.setAttribute!="function")return!1;for(gt in $)S=$[gt],typeof S=="function"&&(S=S(pt,g)),this._addTween(g,"setAttribute",g.getAttribute(gt)+"",S+"",gt,!1,gt),this._overwriteProps.push(gt);return!0}})}(),ji._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(g,$,_,pt){typeof $!="object"&&($={rotation:$}),this.finals={};var gt,S,Mt,kt,nt,Tt,Rt=$.useRadians===!0?2*Math.PI:360,vt=1e-6;for(gt in $)gt!=="useRadians"&&(kt=$[gt],typeof kt=="function"&&(kt=kt(pt,g)),Tt=(kt+"").split("_"),S=Tt[0],Mt=parseFloat(typeof g[gt]!="function"?g[gt]:g[gt.indexOf("set")||typeof g["get"+gt.substr(3)]!="function"?gt:"get"+gt.substr(3)]()),kt=this.finals[gt]=typeof S=="string"&&S.charAt(1)==="="?Mt+parseInt(S.charAt(0)+"1",10)*Number(S.substr(2)):Number(S)||0,nt=kt-Mt,Tt.length&&(S=Tt.join("_"),S.indexOf("short")!==-1&&(nt%=Rt,nt!==nt%(Rt/2)&&(nt=0>nt?nt+Rt:nt-Rt)),S.indexOf("_cw")!==-1&&0>nt?nt=(nt+9999999999*Rt)%Rt-(nt/Rt|0)*Rt:S.indexOf("ccw")!==-1&&nt>0&&(nt=(nt-9999999999*Rt)%Rt-(nt/Rt|0)*Rt)),(nt>vt||-vt>nt)&&(this._addTween(g,gt,Mt,Mt+nt,gt),this._overwriteProps.push(gt)));return!0},set:function(g){var $;if(g!==1)this._super.setRatio.call(this,g);else for($=this._firstPT;$;)$.f?$.t[$.p](this.finals[$.p]):$.t[$.p]=this.finals[$.p],$=$._next}})._autoCSS=!0,ji._gsDefine("easing.Back",["easing.Ease"],function(g){var $,_,pt,gt,S=ji.GreenSockGlobals||ji,Mt=S.com.greensock,kt=2*Math.PI,nt=Math.PI/2,Tt=Mt._class,Rt=function(x,B){var E=Tt("easing."+x,function(){},!0),Z=E.prototype=new g;return Z.constructor=E,Z.getRatio=B,E},vt=g.register||function(){},Nt=function(x,B,E,Z,z){var X=Tt("easing."+x,{easeOut:new B,easeIn:new E,easeInOut:new Z},!0);return vt(X,x),X},Ut=function(x,B,E){this.t=x,this.v=B,E&&(this.next=E,E.prev=this,this.c=E.v-B,this.gap=E.t-x)},Ct=function(x,B){var E=Tt("easing."+x,function(z){this._p1=z||z===0?z:1.70158,this._p2=1.525*this._p1},!0),Z=E.prototype=new g;return Z.constructor=E,Z.getRatio=B,Z.config=function(z){return new E(z)},E},at=Nt("Back",Ct("BackOut",function(x){return(x-=1)*x*((this._p1+1)*x+this._p1)+1}),Ct("BackIn",function(x){return x*x*((this._p1+1)*x-this._p1)}),Ct("BackInOut",function(x){return(x*=2)<1?.5*x*x*((this._p2+1)*x-this._p2):.5*((x-=2)*x*((this._p2+1)*x+this._p2)+2)})),Y=Tt("easing.SlowMo",function(x,B,E){B=B||B===0?B:.7,x==null?x=.7:x>1&&(x=1),this._p=x!==1?B:0,this._p1=(1-x)/2,this._p2=x,this._p3=this._p1+this._p2,this._calcEnd=E===!0},!0),y=Y.prototype=new g;return y.constructor=Y,y.getRatio=function(x){var B=x+(.5-x)*this._p;return x<this._p1?this._calcEnd?1-(x=1-x/this._p1)*x:B-(x=1-x/this._p1)*x*x*x*B:x>this._p3?this._calcEnd?x===1?0:1-(x=(x-this._p3)/this._p1)*x:B+(x-B)*(x=(x-this._p3)/this._p1)*x*x*x:this._calcEnd?1:B},Y.ease=new Y(.7,.7),y.config=Y.config=function(x,B,E){return new Y(x,B,E)},$=Tt("easing.SteppedEase",function(x,B){x=x||1,this._p1=1/x,this._p2=x+(B?0:1),this._p3=B?1:0},!0),y=$.prototype=new g,y.constructor=$,y.getRatio=function(x){return 0>x?x=0:x>=1&&(x=.999999999),((this._p2*x|0)+this._p3)*this._p1},y.config=$.config=function(x,B){return new $(x,B)},_=Tt("easing.ExpoScaleEase",function(x,B,E){this._p1=Math.log(B/x),this._p2=B-x,this._p3=x,this._ease=E},!0),y=_.prototype=new g,y.constructor=_,y.getRatio=function(x){return this._ease&&(x=this._ease.getRatio(x)),(this._p3*Math.exp(this._p1*x)-this._p3)/this._p2},y.config=_.config=function(x,B,E){return new _(x,B,E)},pt=Tt("easing.RoughEase",function(x){x=x||{};for(var B,E,Z,z,X,it,_t=x.taper||"none",dt=[],zt=0,Yt=0|(x.points||20),re=Yt,se=x.randomize!==!1,we=x.clamp===!0,Et=x.template instanceof g?x.template:null,ie=typeof x.strength=="number"?.4*x.strength:.4;--re>-1;)B=se?Math.random():1/Yt*re,E=Et?Et.getRatio(B):B,_t==="none"?Z=ie:_t==="out"?(z=1-B,Z=z*z*ie):_t==="in"?Z=B*B*ie:.5>B?(z=2*B,Z=z*z*.5*ie):(z=2*(1-B),Z=z*z*.5*ie),se?E+=Math.random()*Z-.5*Z:re%2?E+=.5*Z:E-=.5*Z,we&&(E>1?E=1:0>E&&(E=0)),dt[zt++]={x:B,y:E};for(dt.sort(function(ze,on){return ze.x-on.x}),it=new Ut(1,1,null),re=Yt;--re>-1;)X=dt[re],it=new Ut(X.x,X.y,it);this._prev=new Ut(0,0,it.t!==0?it:it.next)},!0),y=pt.prototype=new g,y.constructor=pt,y.getRatio=function(x){var B=this._prev;if(x>B.t){for(;B.next&&x>=B.t;)B=B.next;B=B.prev}else for(;B.prev&&x<=B.t;)B=B.prev;return this._prev=B,B.v+(x-B.t)/B.gap*B.c},y.config=function(x){return new pt(x)},pt.ease=new pt,Nt("Bounce",Rt("BounceOut",function(x){return 1/2.75>x?7.5625*x*x:2/2.75>x?7.5625*(x-=1.5/2.75)*x+.75:2.5/2.75>x?7.5625*(x-=2.25/2.75)*x+.9375:7.5625*(x-=2.625/2.75)*x+.984375}),Rt("BounceIn",function(x){return(x=1-x)<1/2.75?1-7.5625*x*x:2/2.75>x?1-(7.5625*(x-=1.5/2.75)*x+.75):2.5/2.75>x?1-(7.5625*(x-=2.25/2.75)*x+.9375):1-(7.5625*(x-=2.625/2.75)*x+.984375)}),Rt("BounceInOut",function(x){var B=.5>x;return x=B?1-2*x:2*x-1,x=1/2.75>x?7.5625*x*x:2/2.75>x?7.5625*(x-=1.5/2.75)*x+.75:2.5/2.75>x?7.5625*(x-=2.25/2.75)*x+.9375:7.5625*(x-=2.625/2.75)*x+.984375,B?.5*(1-x):.5*x+.5})),Nt("Circ",Rt("CircOut",function(x){return Math.sqrt(1-(x-=1)*x)}),Rt("CircIn",function(x){return-(Math.sqrt(1-x*x)-1)}),Rt("CircInOut",function(x){return(x*=2)<1?-.5*(Math.sqrt(1-x*x)-1):.5*(Math.sqrt(1-(x-=2)*x)+1)})),gt=function(x,B,E){var Z=Tt("easing."+x,function(X,it){this._p1=X>=1?X:1,this._p2=(it||E)/(1>X?X:1),this._p3=this._p2/kt*(Math.asin(1/this._p1)||0),this._p2=kt/this._p2},!0),z=Z.prototype=new g;return z.constructor=Z,z.getRatio=B,z.config=function(X,it){return new Z(X,it)},Z},Nt("Elastic",gt("ElasticOut",function(x){return this._p1*Math.pow(2,-10*x)*Math.sin((x-this._p3)*this._p2)+1},.3),gt("ElasticIn",function(x){return-(this._p1*Math.pow(2,10*(x-=1))*Math.sin((x-this._p3)*this._p2))},.3),gt("ElasticInOut",function(x){return(x*=2)<1?-.5*(this._p1*Math.pow(2,10*(x-=1))*Math.sin((x-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(x-=1))*Math.sin((x-this._p3)*this._p2)*.5+1},.45)),Nt("Expo",Rt("ExpoOut",function(x){return 1-Math.pow(2,-10*x)}),Rt("ExpoIn",function(x){return Math.pow(2,10*(x-1))-.001}),Rt("ExpoInOut",function(x){return(x*=2)<1?.5*Math.pow(2,10*(x-1)):.5*(2-Math.pow(2,-10*(x-1)))})),Nt("Sine",Rt("SineOut",function(x){return Math.sin(x*nt)}),Rt("SineIn",function(x){return-Math.cos(x*nt)+1}),Rt("SineInOut",function(x){return-.5*(Math.cos(Math.PI*x)-1)})),Tt("easing.EaseLookup",{find:function(x){return g.map[x]}},!0),vt(S.SlowMo,"SlowMo","ease,"),vt(pt,"RoughEase","ease,"),vt($,"SteppedEase","ease,"),at},!0)}),ji._gsDefine&&ji._gsQueue.pop()(),function(g,$){var _={},pt=g.document,gt=g.GreenSockGlobals=g.GreenSockGlobals||g,S=gt[$];if(S)return typeof module<"u"&&module.exports&&(module.exports=S),S;var Mt,kt,nt,Tt,Rt,vt=function(A){var k,j=A.split("."),q=gt;for(k=0;k<j.length;k++)q[j[k]]=q=q[j[k]]||{};return q},Nt=vt("com.greensock"),Ut=1e-10,Ct=function(A){var k,j=[],q=A.length;for(k=0;k!==q;j.push(A[k++]));return j},at=function(){},Y=function(){var A=Object.prototype.toString,k=A.call([]);return function(j){return j!=null&&(j instanceof Array||typeof j=="object"&&!!j.push&&A.call(j)===k)}}(),y={},x=function(A,k,j,q){this.sc=y[A]?y[A].sc:[],y[A]=this,this.gsClass=null,this.func=j;var ht=[];this.check=function(Lt){for(var Gt,Pt,Ae,Se,te=k.length,Pe=te;--te>-1;)(Gt=y[k[te]]||new x(k[te],[])).gsClass?(ht[te]=Gt.gsClass,Pe--):Lt&&Gt.sc.push(this);if(Pe===0&&j){if(Pt=("com.greensock."+A).split("."),Ae=Pt.pop(),Se=vt(Pt.join("."))[Ae]=this.gsClass=j.apply(j,ht),q)if(gt[Ae]=_[Ae]=Se,typeof module<"u"&&module.exports)if(A===$){module.exports=_[$]=Se;for(te in _)Se[te]=_[te]}else _[$]&&(_[$][Ae]=Se);else typeof define=="function"&&define.amd&&define((g.GreenSockAMDPath?g.GreenSockAMDPath+"/":"")+A.split(".").pop(),[],function(){return Se});for(te=0;te<this.sc.length;te++)this.sc[te].check()}},this.check(!0)},B=g._gsDefine=function(A,k,j,q){return new x(A,k,j,q)},E=Nt._class=function(A,k,j){return k=k||function(){},B(A,[],function(){return k},j),k};B.globals=gt;var Z=[0,0,1,1],z=E("easing.Ease",function(A,k,j,q){this._func=A,this._type=j||0,this._power=q||0,this._params=k?Z.concat(k):Z},!0),X=z.map={},it=z.register=function(A,k,j,q){for(var ht,Lt,Gt,Pt,Ae=k.split(","),Se=Ae.length,te=(j||"easeIn,easeOut,easeInOut").split(",");--Se>-1;)for(Lt=Ae[Se],ht=q?E("easing."+Lt,null,!0):Nt.easing[Lt]||{},Gt=te.length;--Gt>-1;)Pt=te[Gt],X[Lt+"."+Pt]=X[Pt+Lt]=ht[Pt]=A.getRatio?A:A[Pt]||new A};for(nt=z.prototype,nt._calcEnd=!1,nt.getRatio=function(A){if(this._func)return this._params[0]=A,this._func.apply(null,this._params);var k=this._type,j=this._power,q=k===1?1-A:k===2?A:.5>A?2*A:2*(1-A);return j===1?q*=q:j===2?q*=q*q:j===3?q*=q*q*q:j===4&&(q*=q*q*q*q),k===1?1-q:k===2?q:.5>A?q/2:1-q/2},Mt=["Linear","Quad","Cubic","Quart","Quint,Strong"],kt=Mt.length;--kt>-1;)nt=Mt[kt]+",Power"+kt,it(new z(null,null,1,kt),nt,"easeOut",!0),it(new z(null,null,2,kt),nt,"easeIn"+(kt===0?",easeNone":"")),it(new z(null,null,3,kt),nt,"easeInOut");X.linear=Nt.easing.Linear.easeIn,X.swing=Nt.easing.Quad.easeInOut;var _t=E("events.EventDispatcher",function(A){this._listeners={},this._eventTarget=A||this});nt=_t.prototype,nt.addEventListener=function(A,k,j,q,ht){ht=ht||0;var Lt,Gt,Pt=this._listeners[A],Ae=0;for(this!==Tt||Rt||Tt.wake(),Pt==null&&(this._listeners[A]=Pt=[]),Gt=Pt.length;--Gt>-1;)Lt=Pt[Gt],Lt.c===k&&Lt.s===j?Pt.splice(Gt,1):Ae===0&&Lt.pr<ht&&(Ae=Gt+1);Pt.splice(Ae,0,{c:k,s:j,up:q,pr:ht})},nt.removeEventListener=function(A,k){var j,q=this._listeners[A];if(q){for(j=q.length;--j>-1;)if(q[j].c===k)return void q.splice(j,1)}},nt.dispatchEvent=function(A){var k,j,q,ht=this._listeners[A];if(ht)for(k=ht.length,k>1&&(ht=ht.slice(0)),j=this._eventTarget;--k>-1;)q=ht[k],q&&(q.up?q.c.call(q.s||j,{type:A,target:j}):q.c.call(q.s||j))};var dt=g.requestAnimationFrame,zt=g.cancelAnimationFrame,Yt=Date.now||function(){return new Date().getTime()},re=Yt();for(Mt=["ms","moz","webkit","o"],kt=Mt.length;--kt>-1&&!dt;)dt=g[Mt[kt]+"RequestAnimationFrame"],zt=g[Mt[kt]+"CancelAnimationFrame"]||g[Mt[kt]+"CancelRequestAnimationFrame"];E("Ticker",function(A,k){var j,q,ht,Lt,Gt,Pt=this,Ae=Yt(),Se=k!==!1&&dt?"auto":!1,te=500,Pe=33,pi="tick",Mi=function(ti){var gi,Zr,sr=Yt()-re;sr>te&&(Ae+=sr-Pe),re+=sr,Pt.time=(re-Ae)/1e3,gi=Pt.time-Gt,(!j||gi>0||ti===!0)&&(Pt.frame++,Gt+=gi+(gi>=Lt?.004:Lt-gi),Zr=!0),ti!==!0&&(ht=q(Mi)),Zr&&Pt.dispatchEvent(pi)};_t.call(Pt),Pt.time=Pt.frame=0,Pt.tick=function(){Mi(!0)},Pt.lagSmoothing=function(ti,gi){return arguments.length?(te=ti||1/Ut,void(Pe=Math.min(gi,te,0))):1/Ut>te},Pt.sleep=function(){ht!=null&&(Se&&zt?zt(ht):clearTimeout(ht),q=at,ht=null,Pt===Tt&&(Rt=!1))},Pt.wake=function(ti){ht!==null?Pt.sleep():ti?Ae+=-re+(re=Yt()):Pt.frame>10&&(re=Yt()-te+5),q=j===0?at:Se&&dt?dt:function(gi){return setTimeout(gi,1e3*(Gt-Pt.time)+1|0)},Pt===Tt&&(Rt=!0),Mi(2)},Pt.fps=function(ti){return arguments.length?(j=ti,Lt=1/(j||60),Gt=this.time+Lt,void Pt.wake()):j},Pt.useRAF=function(ti){return arguments.length?(Pt.sleep(),Se=ti,void Pt.fps(j)):Se},Pt.fps(A),setTimeout(function(){Se==="auto"&&Pt.frame<5&&(pt||{}).visibilityState!=="hidden"&&Pt.useRAF(!1)},1500)}),nt=Nt.Ticker.prototype=new Nt.events.EventDispatcher,nt.constructor=Nt.Ticker;var se=E("core.Animation",function(A,k){if(this.vars=k=k||{},this._duration=this._totalDuration=A||0,this._delay=Number(k.delay)||0,this._timeScale=1,this._active=k.immediateRender===!0,this.data=k.data,this._reversed=k.reversed===!0,Gi){Rt||Tt.wake();var j=this.vars.useFrames?$n:Gi;j.add(this,j._time),this.vars.paused&&this.paused(!0)}});Tt=se.ticker=new Nt.Ticker,nt=se.prototype,nt._dirty=nt._gc=nt._initted=nt._paused=!1,nt._totalTime=nt._time=0,nt._rawPrevTime=-1,nt._next=nt._last=nt._onUpdate=nt._timeline=nt.timeline=null,nt._paused=!1;var we=function(){Rt&&Yt()-re>2e3&&((pt||{}).visibilityState!=="hidden"||!Tt.lagSmoothing())&&Tt.wake();var A=setTimeout(we,2e3);A.unref&&A.unref()};we(),nt.play=function(A,k){return A!=null&&this.seek(A,k),this.reversed(!1).paused(!1)},nt.pause=function(A,k){return A!=null&&this.seek(A,k),this.paused(!0)},nt.resume=function(A,k){return A!=null&&this.seek(A,k),this.paused(!1)},nt.seek=function(A,k){return this.totalTime(Number(A),k!==!1)},nt.restart=function(A,k){return this.reversed(!1).paused(!1).totalTime(A?-this._delay:0,k!==!1,!0)},nt.reverse=function(A,k){return A!=null&&this.seek(A||this.totalDuration(),k),this.reversed(!0).paused(!1)},nt.render=function(A,k,j){},nt.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},nt.isActive=function(){var A,k=this._timeline,j=this._startTime;return!k||!this._gc&&!this._paused&&k.isActive()&&(A=k.rawTime(!0))>=j&&A<j+this.totalDuration()/this._timeScale-1e-7},nt._enabled=function(A,k){return Rt||Tt.wake(),this._gc=!A,this._active=this.isActive(),k!==!0&&(A&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!A&&this.timeline&&this._timeline._remove(this,!0)),!1},nt._kill=function(A,k){return this._enabled(!1,!1)},nt.kill=function(A,k){return this._kill(A,k),this},nt._uncache=function(A){for(var k=A?this:this.timeline;k;)k._dirty=!0,k=k.timeline;return this},nt._swapSelfInParams=function(A){for(var k=A.length,j=A.concat();--k>-1;)A[k]==="{self}"&&(j[k]=this);return j},nt._callback=function(A){var k=this.vars,j=k[A],q=k[A+"Params"],ht=k[A+"Scope"]||k.callbackScope||this,Lt=q?q.length:0;switch(Lt){case 0:j.call(ht);break;case 1:j.call(ht,q[0]);break;case 2:j.call(ht,q[0],q[1]);break;default:j.apply(ht,q)}},nt.eventCallback=function(A,k,j,q){if((A||"").substr(0,2)==="on"){var ht=this.vars;if(arguments.length===1)return ht[A];k==null?delete ht[A]:(ht[A]=k,ht[A+"Params"]=Y(j)&&j.join("").indexOf("{self}")!==-1?this._swapSelfInParams(j):j,ht[A+"Scope"]=q),A==="onUpdate"&&(this._onUpdate=k)}return this},nt.delay=function(A){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+A-this._delay),this._delay=A,this):this._delay},nt.duration=function(A){return arguments.length?(this._duration=this._totalDuration=A,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&A!==0&&this.totalTime(this._totalTime*(A/this._duration),!0),this):(this._dirty=!1,this._duration)},nt.totalDuration=function(A){return this._dirty=!1,arguments.length?this.duration(A):this._totalDuration},nt.time=function(A,k){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(A>this._duration?this._duration:A,k)):this._time},nt.totalTime=function(A,k,j){if(Rt||Tt.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>A&&!j&&(A+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var q=this._totalDuration,ht=this._timeline;if(A>q&&!j&&(A=q),this._startTime=(this._paused?this._pauseTime:ht._time)-(this._reversed?q-A:A)/this._timeScale,ht._dirty||this._uncache(!1),ht._timeline)for(;ht._timeline;)ht._timeline._time!==(ht._startTime+ht._totalTime)/ht._timeScale&&ht.totalTime(ht._totalTime,!0),ht=ht._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==A||this._duration===0)&&(Ft.length&&sn(),this.render(A,k,!1),Ft.length&&sn())}return this},nt.progress=nt.totalProgress=function(A,k){var j=this.duration();return arguments.length?this.totalTime(j*A,k):j?this._time/j:this.ratio},nt.startTime=function(A){return arguments.length?(A!==this._startTime&&(this._startTime=A,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,A-this._delay)),this):this._startTime},nt.endTime=function(A){return this._startTime+(A!=0?this.totalDuration():this.duration())/this._timeScale},nt.timeScale=function(A){if(!arguments.length)return this._timeScale;var k,j;for(A=A||Ut,this._timeline&&this._timeline.smoothChildTiming&&(k=this._pauseTime,j=k||k===0?k:this._timeline.totalTime(),this._startTime=j-(j-this._startTime)*this._timeScale/A),this._timeScale=A,j=this.timeline;j&&j.timeline;)j._dirty=!0,j.totalDuration(),j=j.timeline;return this},nt.reversed=function(A){return arguments.length?(A!=this._reversed&&(this._reversed=A,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},nt.paused=function(A){if(!arguments.length)return this._paused;var k,j,q=this._timeline;return A!=this._paused&&q&&(Rt||A||Tt.wake(),k=q.rawTime(),j=k-this._pauseTime,!A&&q.smoothChildTiming&&(this._startTime+=j,this._uncache(!1)),this._pauseTime=A?k:null,this._paused=A,this._active=this.isActive(),!A&&j!==0&&this._initted&&this.duration()&&(k=q.smoothChildTiming?this._totalTime:(k-this._startTime)/this._timeScale,this.render(k,k===this._totalTime,!0))),this._gc&&!A&&this._enabled(!0,!1),this};var Et=E("core.SimpleTimeline",function(A){se.call(this,0,A),this.autoRemoveChildren=this.smoothChildTiming=!0});nt=Et.prototype=new se,nt.constructor=Et,nt.kill()._gc=!1,nt._first=nt._last=nt._recent=null,nt._sortChildren=!1,nt.add=nt.insert=function(A,k,j,q){var ht,Lt;if(A._startTime=Number(k||0)+A._delay,A._paused&&this!==A._timeline&&(A._pauseTime=this.rawTime()-(A._timeline.rawTime()-A._pauseTime)),A.timeline&&A.timeline._remove(A,!0),A.timeline=A._timeline=this,A._gc&&A._enabled(!0,!0),ht=this._last,this._sortChildren)for(Lt=A._startTime;ht&&ht._startTime>Lt;)ht=ht._prev;return ht?(A._next=ht._next,ht._next=A):(A._next=this._first,this._first=A),A._next?A._next._prev=A:this._last=A,A._prev=ht,this._recent=A,this._timeline&&this._uncache(!0),this},nt._remove=function(A,k){return A.timeline===this&&(k||A._enabled(!1,!0),A._prev?A._prev._next=A._next:this._first===A&&(this._first=A._next),A._next?A._next._prev=A._prev:this._last===A&&(this._last=A._prev),A._next=A._prev=A.timeline=null,A===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},nt.render=function(A,k,j){var q,ht=this._first;for(this._totalTime=this._time=this._rawPrevTime=A;ht;)q=ht._next,(ht._active||A>=ht._startTime&&!ht._paused&&!ht._gc)&&(ht._reversed?ht.render((ht._dirty?ht.totalDuration():ht._totalDuration)-(A-ht._startTime)*ht._timeScale,k,j):ht.render((A-ht._startTime)*ht._timeScale,k,j)),ht=q},nt.rawTime=function(){return Rt||Tt.wake(),this._totalTime};var ie=E("TweenLite",function(A,k,j){if(se.call(this,k,j),this.render=ie.prototype.render,A==null)throw"Cannot tween a null target.";this.target=A=typeof A!="string"?A:ie.selector(A)||A;var q,ht,Lt,Gt=A.jquery||A.length&&A!==g&&A[0]&&(A[0]===g||A[0].nodeType&&A[0].style&&!A.nodeType),Pt=this.vars.overwrite;if(this._overwrite=Pt=Pt==null?Lr[ie.defaultOverwrite]:typeof Pt=="number"?Pt>>0:Lr[Pt],(Gt||A instanceof Array||A.push&&Y(A))&&typeof A[0]!="number")for(this._targets=Lt=Ct(A),this._propLookup=[],this._siblings=[],q=0;q<Lt.length;q++)ht=Lt[q],ht?typeof ht!="string"?ht.length&&ht!==g&&ht[0]&&(ht[0]===g||ht[0].nodeType&&ht[0].style&&!ht.nodeType)?(Lt.splice(q--,1),this._targets=Lt=Lt.concat(Ct(ht))):(this._siblings[q]=Je(ht,this,!1),Pt===1&&this._siblings[q].length>1&&ho(ht,this,null,1,this._siblings[q])):(ht=Lt[q--]=ie.selector(ht),typeof ht=="string"&&Lt.splice(q+1,1)):Lt.splice(q--,1);else this._propLookup={},this._siblings=Je(A,this,!1),Pt===1&&this._siblings.length>1&&ho(A,this,null,1,this._siblings);(this.vars.immediateRender||k===0&&this._delay===0&&this.vars.immediateRender!==!1)&&(this._time=-Ut,this.render(Math.min(0,-this._delay)))},!0),ze=function(A){return A&&A.length&&A!==g&&A[0]&&(A[0]===g||A[0].nodeType&&A[0].style&&!A.nodeType)},on=function(A,k){var j,q={};for(j in A)yr[j]||j in k&&j!=="transform"&&j!=="x"&&j!=="y"&&j!=="width"&&j!=="height"&&j!=="className"&&j!=="border"||!(!ni[j]||ni[j]&&ni[j]._autoCSS)||(q[j]=A[j],delete A[j]);A.css=q};nt=ie.prototype=new se,nt.constructor=ie,nt.kill()._gc=!1,nt.ratio=0,nt._firstPT=nt._targets=nt._overwrittenProps=nt._startAt=null,nt._notifyPluginsOfEnabled=nt._lazy=!1,ie.version="2.0.2",ie.defaultEase=nt._ease=new z(null,null,1,1),ie.defaultOverwrite="auto",ie.ticker=Tt,ie.autoSleep=120,ie.lagSmoothing=function(A,k){Tt.lagSmoothing(A,k)},ie.selector=g.$||g.jQuery||function(A){var k=g.$||g.jQuery;return k?(ie.selector=k,k(A)):(pt||(pt=g.document),pt?pt.querySelectorAll?pt.querySelectorAll(A):pt.getElementById(A.charAt(0)==="#"?A.substr(1):A):A)};var Ft=[],Qe={},Ii=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Pn=/[\+-]=-?[\.\d]/,Ji=function(A){for(var k,j=this._firstPT,q=1e-6;j;)k=j.blob?A===1&&this.end!=null?this.end:A?this.join(""):this.start:j.c*A+j.s,j.m?k=j.m.call(this._tween,k,this._target||j.t,this._tween):q>k&&k>-q&&!j.blob&&(k=0),j.f?j.fp?j.t[j.p](j.fp,k):j.t[j.p](k):j.t[j.p]=k,j=j._next},Oe=function(A,k,j,q){var ht,Lt,Gt,Pt,Ae,Se,te,Pe=[],pi=0,Mi="",ti=0;for(Pe.start=A,Pe.end=k,A=Pe[0]=A+"",k=Pe[1]=k+"",j&&(j(Pe),A=Pe[0],k=Pe[1]),Pe.length=0,ht=A.match(Ii)||[],Lt=k.match(Ii)||[],q&&(q._next=null,q.blob=1,Pe._firstPT=Pe._applyPT=q),Ae=Lt.length,Pt=0;Ae>Pt;Pt++)te=Lt[Pt],Se=k.substr(pi,k.indexOf(te,pi)-pi),Mi+=Se||!Pt?Se:",",pi+=Se.length,ti?ti=(ti+1)%5:Se.substr(-5)==="rgba("&&(ti=1),te===ht[Pt]||ht.length<=Pt?Mi+=te:(Mi&&(Pe.push(Mi),Mi=""),Gt=parseFloat(ht[Pt]),Pe.push(Gt),Pe._firstPT={_next:Pe._firstPT,t:Pe,p:Pe.length-1,s:Gt,c:(te.charAt(1)==="="?parseInt(te.charAt(0)+"1",10)*parseFloat(te.substr(2)):parseFloat(te)-Gt)||0,f:0,m:ti&&4>ti?Math.round:0}),pi+=te.length;return Mi+=k.substr(pi),Mi&&Pe.push(Mi),Pe.setRatio=Ji,Pn.test(k)&&(Pe.end=null),Pe},Pi=function(A,k,j,q,ht,Lt,Gt,Pt,Ae){typeof q=="function"&&(q=q(Ae||0,A));var Se,te=typeof A[k],Pe=te!=="function"?"":k.indexOf("set")||typeof A["get"+k.substr(3)]!="function"?k:"get"+k.substr(3),pi=j!=="get"?j:Pe?Gt?A[Pe](Gt):A[Pe]():A[k],Mi=typeof q=="string"&&q.charAt(1)==="=",ti={t:A,p:k,s:pi,f:te==="function",pg:0,n:ht||k,m:Lt?typeof Lt=="function"?Lt:Math.round:0,pr:0,c:Mi?parseInt(q.charAt(0)+"1",10)*parseFloat(q.substr(2)):parseFloat(q)-pi||0};return(typeof pi!="number"||typeof q!="number"&&!Mi)&&(Gt||isNaN(pi)||!Mi&&isNaN(q)||typeof pi=="boolean"||typeof q=="boolean"?(ti.fp=Gt,Se=Oe(pi,Mi?parseFloat(ti.s)+ti.c+(ti.s+"").replace(/[0-9\-\.]/g,""):q,Pt||ie.defaultStringFilter,ti),ti={t:Se,p:"setRatio",s:0,c:1,f:2,pg:0,n:ht||k,pr:0,m:0}):(ti.s=parseFloat(pi),Mi||(ti.c=parseFloat(q)-ti.s||0))),ti.c?((ti._next=this._firstPT)&&(ti._next._prev=ti),this._firstPT=ti,ti):void 0},In=ie._internals={isArray:Y,isSelector:ze,lazyTweens:Ft,blobDif:Oe},ni=ie._plugins={},ci=In.tweenLookup={},Fi=0,yr=In.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1},Lr={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},$n=se._rootFramesTimeline=new Et,Gi=se._rootTimeline=new Et,Gn=30,sn=In.lazyRender=function(){var A,k=Ft.length;for(Qe={};--k>-1;)A=Ft[k],A&&A._lazy!==!1&&(A.render(A._lazy[0],A._lazy[1],!0),A._lazy=!1);Ft.length=0};Gi._startTime=Tt.time,$n._startTime=Tt.frame,Gi._active=$n._active=!0,setTimeout(sn,1),se._updateRoot=ie.render=function(){var A,k,j;if(Ft.length&&sn(),Gi.render((Tt.time-Gi._startTime)*Gi._timeScale,!1,!1),$n.render((Tt.frame-$n._startTime)*$n._timeScale,!1,!1),Ft.length&&sn(),Tt.frame>=Gn){Gn=Tt.frame+(parseInt(ie.autoSleep,10)||120);for(j in ci){for(k=ci[j].tweens,A=k.length;--A>-1;)k[A]._gc&&k.splice(A,1);k.length===0&&delete ci[j]}if(j=Gi._first,(!j||j._paused)&&ie.autoSleep&&!$n._first&&Tt._listeners.tick.length===1){for(;j&&j._paused;)j=j._next;j||Tt.sleep()}}},Tt.addEventListener("tick",se._updateRoot);var Je=function(A,k,j){var q,ht,Lt=A._gsTweenID;if(ci[Lt||(A._gsTweenID=Lt="t"+Fi++)]||(ci[Lt]={target:A,tweens:[]}),k&&(q=ci[Lt].tweens,q[ht=q.length]=k,j))for(;--ht>-1;)q[ht]===k&&q.splice(ht,1);return ci[Lt].tweens},wn=function(A,k,j,q){var ht,Lt,Gt=A.vars.onOverwrite;return Gt&&(ht=Gt(A,k,j,q)),Gt=ie.onOverwrite,Gt&&(Lt=Gt(A,k,j,q)),ht!==!1&&Lt!==!1},ho=function(A,k,j,q,ht){var Lt,Gt,Pt,Ae;if(q===1||q>=4){for(Ae=ht.length,Lt=0;Ae>Lt;Lt++)if((Pt=ht[Lt])!==k)Pt._gc||Pt._kill(null,A,k)&&(Gt=!0);else if(q===5)break;return Gt}var Se,te=k._startTime+Ut,Pe=[],pi=0,Mi=k._duration===0;for(Lt=ht.length;--Lt>-1;)(Pt=ht[Lt])===k||Pt._gc||Pt._paused||(Pt._timeline!==k._timeline?(Se=Se||Hn(k,0,Mi),Hn(Pt,Se,Mi)===0&&(Pe[pi++]=Pt)):Pt._startTime<=te&&Pt._startTime+Pt.totalDuration()/Pt._timeScale>te&&((Mi||!Pt._initted)&&te-Pt._startTime<=2e-10||(Pe[pi++]=Pt)));for(Lt=pi;--Lt>-1;)if(Pt=Pe[Lt],Ae=Pt._firstPT,q===2&&Pt._kill(j,A,k)&&(Gt=!0),q!==2||!Pt._firstPT&&Pt._initted&&Ae){if(q!==2&&!wn(Pt,k))continue;Pt._enabled(!1,!1)&&(Gt=!0)}return Gt},Hn=function(A,k,j){for(var q=A._timeline,ht=q._timeScale,Lt=A._startTime;q._timeline;){if(Lt+=q._startTime,ht*=q._timeScale,q._paused)return-100;q=q._timeline}return Lt/=ht,Lt>k?Lt-k:j&&Lt===k||!A._initted&&2*Ut>Lt-k?Ut:(Lt+=A.totalDuration()/A._timeScale/ht)>k+Ut?0:Lt-k-Ut};nt._init=function(){var A,k,j,q,ht,Lt,Gt=this.vars,Pt=this._overwrittenProps,Ae=this._duration,Se=!!Gt.immediateRender,te=Gt.ease;if(Gt.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),ht={};for(q in Gt.startAt)ht[q]=Gt.startAt[q];if(ht.data="isStart",ht.overwrite=!1,ht.immediateRender=!0,ht.lazy=Se&&Gt.lazy!==!1,ht.startAt=ht.delay=null,ht.onUpdate=Gt.onUpdate,ht.onUpdateParams=Gt.onUpdateParams,ht.onUpdateScope=Gt.onUpdateScope||Gt.callbackScope||this,this._startAt=ie.to(this.target||{},0,ht),Se){if(this._time>0)this._startAt=null;else if(Ae!==0)return}}else if(Gt.runBackwards&&Ae!==0)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{this._time!==0&&(Se=!1),j={};for(q in Gt)yr[q]&&q!=="autoCSS"||(j[q]=Gt[q]);if(j.overwrite=0,j.data="isFromStart",j.lazy=Se&&Gt.lazy!==!1,j.immediateRender=Se,this._startAt=ie.to(this.target,0,j),Se){if(this._time===0)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=te=te?te instanceof z?te:typeof te=="function"?new z(te,Gt.easeParams):X[te]||ie.defaultEase:ie.defaultEase,Gt.easeParams instanceof Array&&te.config&&(this._ease=te.config.apply(te,Gt.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(Lt=this._targets.length,A=0;Lt>A;A++)this._initProps(this._targets[A],this._propLookup[A]={},this._siblings[A],Pt?Pt[A]:null,A)&&(k=!0);else k=this._initProps(this.target,this._propLookup,this._siblings,Pt,0);if(k&&ie._onPluginEvent("_onInitAllProps",this),Pt&&(this._firstPT||typeof this.target!="function"&&this._enabled(!1,!1)),Gt.runBackwards)for(j=this._firstPT;j;)j.s+=j.c,j.c=-j.c,j=j._next;this._onUpdate=Gt.onUpdate,this._initted=!0},nt._initProps=function(A,k,j,q,ht){var Lt,Gt,Pt,Ae,Se,te;if(A==null)return!1;Qe[A._gsTweenID]&&sn(),this.vars.css||A.style&&A!==g&&A.nodeType&&ni.css&&this.vars.autoCSS!==!1&&on(this.vars,A);for(Lt in this.vars)if(te=this.vars[Lt],yr[Lt])te&&(te instanceof Array||te.push&&Y(te))&&te.join("").indexOf("{self}")!==-1&&(this.vars[Lt]=te=this._swapSelfInParams(te,this));else if(ni[Lt]&&(Ae=new ni[Lt])._onInitTween(A,this.vars[Lt],this,ht)){for(this._firstPT=Se={_next:this._firstPT,t:Ae,p:"setRatio",s:0,c:1,f:1,n:Lt,pg:1,pr:Ae._priority,m:0},Gt=Ae._overwriteProps.length;--Gt>-1;)k[Ae._overwriteProps[Gt]]=this._firstPT;(Ae._priority||Ae._onInitAllProps)&&(Pt=!0),(Ae._onDisable||Ae._onEnable)&&(this._notifyPluginsOfEnabled=!0),Se._next&&(Se._next._prev=Se)}else k[Lt]=Pi.call(this,A,Lt,"get",te,Lt,0,null,this.vars.stringFilter,ht);return q&&this._kill(q,A)?this._initProps(A,k,j,q,ht):this._overwrite>1&&this._firstPT&&j.length>1&&ho(A,this,k,this._overwrite,j)?(this._kill(k,A),this._initProps(A,k,j,q,ht)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(Qe[A._gsTweenID]=!0),Pt)},nt.render=function(A,k,j){var q,ht,Lt,Gt,Pt=this._time,Ae=this._duration,Se=this._rawPrevTime;if(A>=Ae-1e-7&&A>=0)this._totalTime=this._time=Ae,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(q=!0,ht="onComplete",j=j||this._timeline.autoRemoveChildren),Ae===0&&(this._initted||!this.vars.lazy||j)&&(this._startTime===this._timeline._duration&&(A=0),(0>Se||0>=A&&A>=-1e-7||Se===Ut&&this.data!=="isPause")&&Se!==A&&(j=!0,Se>Ut&&(ht="onReverseComplete")),this._rawPrevTime=Gt=!k||A||Se===A?A:Ut);else if(1e-7>A)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(Pt!==0||Ae===0&&Se>0)&&(ht="onReverseComplete",q=this._reversed),0>A&&(this._active=!1,Ae===0&&(this._initted||!this.vars.lazy||j)&&(Se>=0&&(Se!==Ut||this.data!=="isPause")&&(j=!0),this._rawPrevTime=Gt=!k||A||Se===A?A:Ut)),(!this._initted||this._startAt&&this._startAt.progress())&&(j=!0);else if(this._totalTime=this._time=A,this._easeType){var te=A/Ae,Pe=this._easeType,pi=this._easePower;(Pe===1||Pe===3&&te>=.5)&&(te=1-te),Pe===3&&(te*=2),pi===1?te*=te:pi===2?te*=te*te:pi===3?te*=te*te*te:pi===4&&(te*=te*te*te*te),Pe===1?this.ratio=1-te:Pe===2?this.ratio=te:.5>A/Ae?this.ratio=te/2:this.ratio=1-te/2}else this.ratio=this._ease.getRatio(A/Ae);if(this._time!==Pt||j){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!j&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=Pt,this._rawPrevTime=Se,Ft.push(this),void(this._lazy=[A,k]);this._time&&!q?this.ratio=this._ease.getRatio(this._time/Ae):q&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(this._time===0?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==Pt&&A>=0&&(this._active=!0),Pt===0&&(this._startAt&&(A>=0?this._startAt.render(A,!0,j):ht||(ht="_dummyGS")),this.vars.onStart&&(this._time!==0||Ae===0)&&(k||this._callback("onStart"))),Lt=this._firstPT;Lt;)Lt.f?Lt.t[Lt.p](Lt.c*this.ratio+Lt.s):Lt.t[Lt.p]=Lt.c*this.ratio+Lt.s,Lt=Lt._next;this._onUpdate&&(0>A&&this._startAt&&A!==-1e-4&&this._startAt.render(A,!0,j),k||(this._time!==Pt||q||j)&&this._callback("onUpdate")),ht&&(!this._gc||j)&&(0>A&&this._startAt&&!this._onUpdate&&A!==-1e-4&&this._startAt.render(A,!0,j),q&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!k&&this.vars[ht]&&this._callback(ht),Ae===0&&this._rawPrevTime===Ut&&Gt!==Ut&&(this._rawPrevTime=0))}},nt._kill=function(A,k,j){if(A==="all"&&(A=null),A==null&&(k==null||k===this.target))return this._lazy=!1,this._enabled(!1,!1);k=typeof k!="string"?k||this._targets||this.target:ie.selector(k)||k;var q,ht,Lt,Gt,Pt,Ae,Se,te,Pe,pi=j&&this._time&&j._startTime===this._startTime&&this._timeline===j._timeline,Mi=this._firstPT;if((Y(k)||ze(k))&&typeof k[0]!="number")for(q=k.length;--q>-1;)this._kill(A,k[q],j)&&(Ae=!0);else{if(this._targets){for(q=this._targets.length;--q>-1;)if(k===this._targets[q]){Pt=this._propLookup[q]||{},this._overwrittenProps=this._overwrittenProps||[],ht=this._overwrittenProps[q]=A?this._overwrittenProps[q]||{}:"all";break}}else{if(k!==this.target)return!1;Pt=this._propLookup,ht=this._overwrittenProps=A?this._overwrittenProps||{}:"all"}if(Pt){if(Se=A||Pt,te=A!==ht&&ht!=="all"&&A!==Pt&&(typeof A!="object"||!A._tempKill),j&&(ie.onOverwrite||this.vars.onOverwrite)){for(Lt in Se)Pt[Lt]&&(Pe||(Pe=[]),Pe.push(Lt));if((Pe||!A)&&!wn(this,j,k,Pe))return!1}for(Lt in Se)(Gt=Pt[Lt])&&(pi&&(Gt.f?Gt.t[Gt.p](Gt.s):Gt.t[Gt.p]=Gt.s,Ae=!0),Gt.pg&&Gt.t._kill(Se)&&(Ae=!0),Gt.pg&&Gt.t._overwriteProps.length!==0||(Gt._prev?Gt._prev._next=Gt._next:Gt===this._firstPT&&(this._firstPT=Gt._next),Gt._next&&(Gt._next._prev=Gt._prev),Gt._next=Gt._prev=null),delete Pt[Lt]),te&&(ht[Lt]=1);!this._firstPT&&this._initted&&Mi&&this._enabled(!1,!1)}}return Ae},nt.invalidate=function(){return this._notifyPluginsOfEnabled&&ie._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],se.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-Ut,this.render(Math.min(0,-this._delay))),this},nt._enabled=function(A,k){if(Rt||Tt.wake(),A&&this._gc){var j,q=this._targets;if(q)for(j=q.length;--j>-1;)this._siblings[j]=Je(q[j],this,!0);else this._siblings=Je(this.target,this,!0)}return se.prototype._enabled.call(this,A,k),this._notifyPluginsOfEnabled&&this._firstPT?ie._onPluginEvent(A?"_onEnable":"_onDisable",this):!1},ie.to=function(A,k,j){return new ie(A,k,j)},ie.from=function(A,k,j){return j.runBackwards=!0,j.immediateRender=j.immediateRender!=0,new ie(A,k,j)},ie.fromTo=function(A,k,j,q){return q.startAt=j,q.immediateRender=q.immediateRender!=0&&j.immediateRender!=0,new ie(A,k,q)},ie.delayedCall=function(A,k,j,q,ht){return new ie(k,0,{delay:A,onComplete:k,onCompleteParams:j,callbackScope:q,onReverseComplete:k,onReverseCompleteParams:j,immediateRender:!1,lazy:!1,useFrames:ht,overwrite:0})},ie.set=function(A,k){return new ie(A,0,k)},ie.getTweensOf=function(A,k){if(A==null)return[];A=typeof A!="string"?A:ie.selector(A)||A;var j,q,ht,Lt;if((Y(A)||ze(A))&&typeof A[0]!="number"){for(j=A.length,q=[];--j>-1;)q=q.concat(ie.getTweensOf(A[j],k));for(j=q.length;--j>-1;)for(Lt=q[j],ht=j;--ht>-1;)Lt===q[ht]&&q.splice(j,1)}else if(A._gsTweenID)for(q=Je(A).concat(),j=q.length;--j>-1;)(q[j]._gc||k&&!q[j].isActive())&&q.splice(j,1);return q||[]},ie.killTweensOf=ie.killDelayedCallsTo=function(A,k,j){typeof k=="object"&&(j=k,k=!1);for(var q=ie.getTweensOf(A,k),ht=q.length;--ht>-1;)q[ht]._kill(j,A)};var Bi=E("plugins.TweenPlugin",function(A,k){this._overwriteProps=(A||"").split(","),this._propName=this._overwriteProps[0],this._priority=k||0,this._super=Bi.prototype},!0);if(nt=Bi.prototype,Bi.version="1.19.0",Bi.API=2,nt._firstPT=null,nt._addTween=Pi,nt.setRatio=Ji,nt._kill=function(A){var k,j=this._overwriteProps,q=this._firstPT;if(A[this._propName]!=null)this._overwriteProps=[];else for(k=j.length;--k>-1;)A[j[k]]!=null&&j.splice(k,1);for(;q;)A[q.n]!=null&&(q._next&&(q._next._prev=q._prev),q._prev?(q._prev._next=q._next,q._prev=null):this._firstPT===q&&(this._firstPT=q._next)),q=q._next;return!1},nt._mod=nt._roundProps=function(A){for(var k,j=this._firstPT;j;)k=A[this._propName]||j.n!=null&&A[j.n.split(this._propName+"_").join("")],k&&typeof k=="function"&&(j.f===2?j.t._applyPT.m=k:j.m=k),j=j._next},ie._onPluginEvent=function(A,k){var j,q,ht,Lt,Gt,Pt=k._firstPT;if(A==="_onInitAllProps"){for(;Pt;){for(Gt=Pt._next,q=ht;q&&q.pr>Pt.pr;)q=q._next;(Pt._prev=q?q._prev:Lt)?Pt._prev._next=Pt:ht=Pt,(Pt._next=q)?q._prev=Pt:Lt=Pt,Pt=Gt}Pt=k._firstPT=ht}for(;Pt;)Pt.pg&&typeof Pt.t[A]=="function"&&Pt.t[A]()&&(j=!0),Pt=Pt._next;return j},Bi.activate=function(A){for(var k=A.length;--k>-1;)A[k].API===Bi.API&&(ni[new A[k]()._propName]=A[k]);return!0},B.plugin=function(A){if(!(A&&A.propName&&A.init&&A.API))throw"illegal plugin definition.";var k,j=A.propName,q=A.priority||0,ht=A.overwriteProps,Lt={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},Gt=E("plugins."+j.charAt(0).toUpperCase()+j.substr(1)+"Plugin",function(){Bi.call(this,j,q),this._overwriteProps=ht||[]},A.global===!0),Pt=Gt.prototype=new Bi(j);Pt.constructor=Gt,Gt.API=A.API;for(k in Lt)typeof A[k]=="function"&&(Pt[Lt[k]]=A[k]);return Gt.version=A.version,Bi.activate([Gt]),Gt},Mt=g._gsQueue){for(kt=0;kt<Mt.length;kt++)Mt[kt]();for(nt in y)y[nt].func||g.console.log("GSAP encountered missing dependency: "+nt)}Rt=!1}(typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window,"TweenMax");const qu={class:"modal-background"},Yu=["innerHTML"],Zu={name:"MapModali"},Fh=ke.defineComponent({...Zu,props:{},setup(g,{expose:$}){const _=ke.ref(""),pt=ke.ref(""),gt=Mt=>{pt.value=Mt,_.value="five"},S=()=>{_.value=_.value+" out"};return ke.onMounted(()=>{}),$({text:pt,show:gt,hide:S}),(Mt,kt)=>(ke.openBlock(),ke.createElementBlock("div",{id:"modal-container",class:ke.normalizeClass(_.value),onClick:S},[ke.createElementVNode("div",qu,[ke.createElementVNode("div",{class:"modal",onClick:kt[0]||(kt[0]=nt=>{nt.stopPropagation()})},[ke.createElementVNode("p",{style:{"white-space":"pre-line","line-height":"1",margin:"0",color:"#fff"},innerHTML:pt.value},null,8,Yu)])])],2))}}),Jm="",Ju={class:"bim_background_plate"},$u={class:"content"},Qu=ke.createElementVNode("canvas",{class:"landscape"},null,-1),Ku={class:"content__title"},tc=ke.createElementVNode("div",{class:"overlay"},null,-1),ec={name:"BimBackgroundPlate"},Gh=ke.defineComponent({...ec,setup(g){const $=()=>{let gt=`
|
|
13
|
+
**/var on=typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window;(on._gsQueue||(on._gsQueue=[])).push(function(){on._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(T,ht,d){var nt=function(E){var b,p=[],g=E.length;for(b=0;b!==g;p.push(E[b++]));return p},H=function(E,b,p){var g,S,x=E.cycle;for(g in x)S=x[g],E[g]=typeof S=="function"?S(p,b[p]):S[p%S.length];delete E.cycle},m=function(E,b,p){d.call(this,E,b,p),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=m.prototype.render},P=1e-10,D=d._internals,A=D.isSelector,F=D.isArray,Z=m.prototype=d.to({},.1,{}),G=[];m.version="2.0.2",Z.constructor=m,Z.kill()._gc=!1,m.killTweensOf=m.killDelayedCallsTo=d.killTweensOf,m.getTweensOf=d.getTweensOf,m.lagSmoothing=d.lagSmoothing,m.ticker=d.ticker,m.render=d.render,Z.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),d.prototype.invalidate.call(this)},Z.updateTo=function(E,b){var p,g=this.ratio,S=this.vars.immediateRender||E.immediateRender;b&&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(p in E)this.vars[p]=E[p];if(this._initted||S){if(b)this._initted=!1,S&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&d._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var x=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(x,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||S)for(var U,z=1/(1-g),j=this._firstPT;j;)U=j.s+j.c,j.c*=z,j.s=U-j.c,j=j._next}return this},Z.render=function(E,b,p){this._initted||this._duration===0&&this.vars.repeat&&this.invalidate();var g,S,x,U,z,j,lt,ft,gt,Nt=this._dirty?this.totalDuration():this._totalDuration,at=this._time,Et=this._totalTime,I=this._cycle,zt=this._duration,Pt=this._rawPrevTime;if(E>=Nt-1e-7&&E>=0?(this._totalTime=Nt,this._cycle=this._repeat,this._yoyo&&1&this._cycle?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=zt,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(g=!0,S="onComplete",p=p||this._timeline.autoRemoveChildren),zt===0&&(this._initted||!this.vars.lazy||p)&&(this._startTime===this._timeline._duration&&(E=0),(0>Pt||0>=E&&E>=-1e-7||Pt===P&&this.data!=="isPause")&&Pt!==E&&(p=!0,Pt>P&&(S="onReverseComplete")),this._rawPrevTime=ft=!b||E||Pt===E?E:P)):1e-7>E?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(Et!==0||zt===0&&Pt>0)&&(S="onReverseComplete",g=this._reversed),0>E&&(this._active=!1,zt===0&&(this._initted||!this.vars.lazy||p)&&(Pt>=0&&(p=!0),this._rawPrevTime=ft=!b||E||Pt===E?E:P)),this._initted||(p=!0)):(this._totalTime=this._time=E,this._repeat!==0&&(U=zt+this._repeatDelay,this._cycle=this._totalTime/U>>0,this._cycle!==0&&this._cycle===this._totalTime/U&&E>=Et&&this._cycle--,this._time=this._totalTime-this._cycle*U,this._yoyo&&1&this._cycle&&(this._time=zt-this._time,gt=this._yoyoEase||this.vars.yoyoEase,gt&&(this._yoyoEase||(gt!==!0||this._initted?this._yoyoEase=gt=gt===!0?this._ease:gt instanceof Ease?gt:Ease.map[gt]:(gt=this.vars.ease,this._yoyoEase=gt=gt?gt instanceof Ease?gt:typeof gt=="function"?new Ease(gt,this.vars.easeParams):Ease.map[gt]||d.defaultEase:d.defaultEase)),this.ratio=gt?1-gt.getRatio((zt-this._time)/zt):0)),this._time>zt?this._time=zt:this._time<0&&(this._time=0)),this._easeType&&!gt?(z=this._time/zt,j=this._easeType,lt=this._easePower,(j===1||j===3&&z>=.5)&&(z=1-z),j===3&&(z*=2),lt===1?z*=z:lt===2?z*=z*z:lt===3?z*=z*z*z:lt===4&&(z*=z*z*z*z),j===1?this.ratio=1-z:j===2?this.ratio=z:this._time/zt<.5?this.ratio=z/2:this.ratio=1-z/2):gt||(this.ratio=this._ease.getRatio(this._time/zt))),at===this._time&&!p&&I===this._cycle)return void(Et!==this._totalTime&&this._onUpdate&&(b||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!p&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=at,this._totalTime=Et,this._rawPrevTime=Pt,this._cycle=I,D.lazyTweens.push(this),void(this._lazy=[E,b]);!this._time||g||gt?g&&this._ease._calcEnd&&!gt&&(this.ratio=this._ease.getRatio(this._time===0?0:1)):this.ratio=this._ease.getRatio(this._time/zt)}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==at&&E>=0&&(this._active=!0),Et===0&&(this._initted===2&&E>0&&this._init(),this._startAt&&(E>=0?this._startAt.render(E,!0,p):S||(S="_dummyGS")),this.vars.onStart&&(this._totalTime!==0||zt===0)&&(b||this._callback("onStart"))),x=this._firstPT;x;)x.f?x.t[x.p](x.c*this.ratio+x.s):x.t[x.p]=x.c*this.ratio+x.s,x=x._next;this._onUpdate&&(0>E&&this._startAt&&this._startTime&&this._startAt.render(E,!0,p),b||(this._totalTime!==Et||S)&&this._callback("onUpdate")),this._cycle!==I&&(b||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),S&&(!this._gc||p)&&(0>E&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(E,!0,p),g&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[S]&&this._callback(S),zt===0&&this._rawPrevTime===P&&ft!==P&&(this._rawPrevTime=0))},m.to=function(E,b,p){return new m(E,b,p)},m.from=function(E,b,p){return p.runBackwards=!0,p.immediateRender=p.immediateRender!=0,new m(E,b,p)},m.fromTo=function(E,b,p,g){return g.startAt=p,g.immediateRender=g.immediateRender!=0&&p.immediateRender!=0,new m(E,b,g)},m.staggerTo=m.allTo=function(E,b,p,g,S,x,U){g=g||0;var z,j,lt,ft,gt=0,Nt=[],at=function(){p.onComplete&&p.onComplete.apply(p.onCompleteScope||this,arguments),S.apply(U||p.callbackScope||this,x||G)},Et=p.cycle,I=p.startAt&&p.startAt.cycle;for(F(E)||(typeof E=="string"&&(E=d.selector(E)||E),A(E)&&(E=nt(E))),E=E||[],0>g&&(E=nt(E),E.reverse(),g*=-1),z=E.length-1,lt=0;z>=lt;lt++){j={};for(ft in p)j[ft]=p[ft];if(Et&&(H(j,E,lt),j.duration!=null&&(b=j.duration,delete j.duration)),I){I=j.startAt={};for(ft in p.startAt)I[ft]=p.startAt[ft];H(j.startAt,E,lt)}j.delay=gt+(j.delay||0),lt===z&&S&&(j.onComplete=at),Nt[lt]=new m(E[lt],b,j),gt+=g}return Nt},m.staggerFrom=m.allFrom=function(E,b,p,g,S,x,U){return p.runBackwards=!0,p.immediateRender=p.immediateRender!=0,m.staggerTo(E,b,p,g,S,x,U)},m.staggerFromTo=m.allFromTo=function(E,b,p,g,S,x,U,z){return g.startAt=p,g.immediateRender=g.immediateRender!=0&&p.immediateRender!=0,m.staggerTo(E,b,g,S,x,U,z)},m.delayedCall=function(E,b,p,g,S){return new m(b,0,{delay:E,onComplete:b,onCompleteParams:p,callbackScope:g,onReverseComplete:b,onReverseCompleteParams:p,immediateRender:!1,useFrames:S,overwrite:0})},m.set=function(E,b){return new m(E,0,b)},m.isTweening=function(E){return d.getTweensOf(E,!0).length>0};var J=function(E,b){for(var p=[],g=0,S=E._first;S;)S instanceof d?p[g++]=S:(b&&(p[g++]=S),p=p.concat(J(S,b)),g=p.length),S=S._next;return p},B=m.getAllTweens=function(E){return J(T._rootTimeline,E).concat(J(T._rootFramesTimeline,E))};m.killAll=function(E,b,p,g){b==null&&(b=!0),p==null&&(p=!0);var S,x,U,z=B(g!=0),j=z.length,lt=b&&p&&g;for(U=0;j>U;U++)x=z[U],(lt||x instanceof ht||(S=x.target===x.vars.onComplete)&&p||b&&!S)&&(E?x.totalTime(x._reversed?0:x.totalDuration()):x._enabled(!1,!1))},m.killChildTweensOf=function(E,b){if(E!=null){var p,g,S,x,U,z=D.tweenLookup;if(typeof E=="string"&&(E=d.selector(E)||E),A(E)&&(E=nt(E)),F(E))for(x=E.length;--x>-1;)m.killChildTweensOf(E[x],b);else{p=[];for(S in z)for(g=z[S].target.parentNode;g;)g===E&&(p=p.concat(z[S].tweens)),g=g.parentNode;for(U=p.length,x=0;U>x;x++)b&&p[x].totalTime(p[x].totalDuration()),p[x]._enabled(!1,!1)}}};var q=function(E,b,p,g){b=b!==!1,p=p!==!1,g=g!==!1;for(var S,x,U=B(g),z=b&&p&&g,j=U.length;--j>-1;)x=U[j],(z||x instanceof ht||(S=x.target===x.vars.onComplete)&&p||b&&!S)&&x.paused(E)};return m.pauseAll=function(E,b,p){q(!0,E,b,p)},m.resumeAll=function(E,b,p){q(!1,E,b,p)},m.globalTimeScale=function(E){var b=T._rootTimeline,p=d.ticker.time;return arguments.length?(E=E||P,b._startTime=p-(p-b._startTime)*b._timeScale/E,b=T._rootFramesTimeline,p=d.ticker.frame,b._startTime=p-(p-b._startTime)*b._timeScale/E,b._timeScale=T._rootTimeline._timeScale=E,E):b._timeScale},Z.progress=function(E,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-E:E)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()},Z.totalProgress=function(E,b){return arguments.length?this.totalTime(this.totalDuration()*E,b):this._totalTime/this.totalDuration()},Z.time=function(E,b){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,b)):this._time},Z.duration=function(E){return arguments.length?T.prototype.duration.call(this,E):this._duration},Z.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)},Z.repeat=function(E){return arguments.length?(this._repeat=E,this._uncache(!0)):this._repeat},Z.repeatDelay=function(E){return arguments.length?(this._repeatDelay=E,this._uncache(!0)):this._repeatDelay},Z.yoyo=function(E){return arguments.length?(this._yoyo=E,this):this._yoyo},m},!0),on._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(T,ht,d){var nt=function(p){ht.call(this,p),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var g,S,x=this.vars;for(S in x)g=x[S],A(g)&&g.join("").indexOf("{self}")!==-1&&(x[S]=this._swapSelfInParams(g));A(x.tweens)&&this.add(x.tweens,0,x.align,x.stagger)},H=1e-10,m=d._internals,P=nt._internals={},D=m.isSelector,A=m.isArray,F=m.lazyTweens,Z=m.lazyRender,G=on._gsDefine.globals,J=function(p){var g,S={};for(g in p)S[g]=p[g];return S},B=function(p,g,S){var x,U,z=p.cycle;for(x in z)U=z[x],p[x]=typeof U=="function"?U(S,g[S]):U[S%U.length];delete p.cycle},q=P.pauseCallback=function(){},E=function(p){var g,S=[],x=p.length;for(g=0;g!==x;S.push(p[g++]));return S},b=nt.prototype=new ht;return nt.version="2.0.2",b.constructor=nt,b.kill()._gc=b._forcingPlayhead=b._hasPause=!1,b.to=function(p,g,S,x){var U=S.repeat&&G.TweenMax||d;return g?this.add(new U(p,g,S),x):this.set(p,S,x)},b.from=function(p,g,S,x){return this.add((S.repeat&&G.TweenMax||d).from(p,g,S),x)},b.fromTo=function(p,g,S,x,U){var z=x.repeat&&G.TweenMax||d;return g?this.add(z.fromTo(p,g,S,x),U):this.set(p,x,U)},b.staggerTo=function(p,g,S,x,U,z,j,lt){var ft,gt,Nt=new nt({onComplete:z,onCompleteParams:j,callbackScope:lt,smoothChildTiming:this.smoothChildTiming}),at=S.cycle;for(typeof p=="string"&&(p=d.selector(p)||p),p=p||[],D(p)&&(p=E(p)),x=x||0,0>x&&(p=E(p),p.reverse(),x*=-1),gt=0;gt<p.length;gt++)ft=J(S),ft.startAt&&(ft.startAt=J(ft.startAt),ft.startAt.cycle&&B(ft.startAt,p,gt)),at&&(B(ft,p,gt),ft.duration!=null&&(g=ft.duration,delete ft.duration)),Nt.to(p[gt],g,ft,gt*x);return this.add(Nt,U)},b.staggerFrom=function(p,g,S,x,U,z,j,lt){return S.immediateRender=S.immediateRender!=0,S.runBackwards=!0,this.staggerTo(p,g,S,x,U,z,j,lt)},b.staggerFromTo=function(p,g,S,x,U,z,j,lt,ft){return x.startAt=S,x.immediateRender=x.immediateRender!=0&&S.immediateRender!=0,this.staggerTo(p,g,x,U,z,j,lt,ft)},b.call=function(p,g,S,x){return this.add(d.delayedCall(0,p,g,S),x)},b.set=function(p,g,S){return S=this._parseTimeOrLabel(S,0,!0),g.immediateRender==null&&(g.immediateRender=S===this._time&&!this._paused),this.add(new d(p,0,g),S)},nt.exportRoot=function(p,g){p=p||{},p.smoothChildTiming==null&&(p.smoothChildTiming=!0);var S,x,U,z,j=new nt(p),lt=j._timeline;for(g==null&&(g=!0),lt._remove(j,!0),j._startTime=0,j._rawPrevTime=j._time=j._totalTime=lt._time,U=lt._first;U;)z=U._next,g&&U instanceof d&&U.target===U.vars.onComplete||(x=U._startTime-U._delay,0>x&&(S=1),j.add(U,x)),U=z;return lt.add(j,0),S&&j.totalDuration(),j},b.add=function(p,g,S,x){var U,z,j,lt,ft,gt;if(typeof g!="number"&&(g=this._parseTimeOrLabel(g,0,!0,p)),!(p instanceof T)){if(p instanceof Array||p&&p.push&&A(p)){for(S=S||"normal",x=x||0,U=g,z=p.length,j=0;z>j;j++)A(lt=p[j])&&(lt=new nt({tweens:lt})),this.add(lt,U),typeof lt!="string"&&typeof lt!="function"&&(S==="sequence"?U=lt._startTime+lt.totalDuration()/lt._timeScale:S==="start"&&(lt._startTime-=lt.delay())),U+=x;return this._uncache(!0)}if(typeof p=="string")return this.addLabel(p,g);if(typeof p!="function")throw"Cannot add "+p+" into the timeline; it is not a tween, timeline, function, or string.";p=d.delayedCall(0,p)}if(ht.prototype.add.call(this,p,g),p._time&&(U=Math.max(0,Math.min(p.totalDuration(),(this.rawTime()-p._startTime)*p._timeScale)),Math.abs(U-p._totalTime)>1e-5&&p.render(U,!1,!1)),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(ft=this,gt=ft.rawTime()>p._startTime;ft._timeline;)gt&&ft._timeline.smoothChildTiming?ft.totalTime(ft._totalTime,!0):ft._gc&&ft._enabled(!0,!1),ft=ft._timeline;return this},b.remove=function(p){if(p instanceof T){this._remove(p,!1);var g=p._timeline=p.vars.useFrames?T._rootFramesTimeline:T._rootTimeline;return p._startTime=(p._paused?p._pauseTime:g._time)-(p._reversed?p.totalDuration()-p._totalTime:p._totalTime)/p._timeScale,this}if(p instanceof Array||p&&p.push&&A(p)){for(var S=p.length;--S>-1;)this.remove(p[S]);return this}return typeof p=="string"?this.removeLabel(p):this.kill(null,p)},b._remove=function(p,g){ht.prototype._remove.call(this,p,g);var S=this._last;return S?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},b.append=function(p,g){return this.add(p,this._parseTimeOrLabel(null,g,!0,p))},b.insert=b.insertMultiple=function(p,g,S,x){return this.add(p,g||0,S,x)},b.appendMultiple=function(p,g,S,x){return this.add(p,this._parseTimeOrLabel(null,g,!0,p),S,x)},b.addLabel=function(p,g){return this._labels[p]=this._parseTimeOrLabel(g),this},b.addPause=function(p,g,S,x){var U=d.delayedCall(0,q,S,x||this);return U.vars.onComplete=U.vars.onReverseComplete=g,U.data="isPause",this._hasPause=!0,this.add(U,p)},b.removeLabel=function(p){return delete this._labels[p],this},b.getLabelTime=function(p){return this._labels[p]!=null?this._labels[p]:-1},b._parseTimeOrLabel=function(p,g,S,x){var U,z;if(x instanceof T&&x.timeline===this)this.remove(x);else if(x&&(x instanceof Array||x.push&&A(x)))for(z=x.length;--z>-1;)x[z]instanceof T&&x[z].timeline===this&&this.remove(x[z]);if(U=typeof p!="number"||g?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,typeof g=="string")return this._parseTimeOrLabel(g,S&&typeof p=="number"&&this._labels[g]==null?p-U:0,S);if(g=g||0,typeof p!="string"||!isNaN(p)&&this._labels[p]==null)p==null&&(p=U);else{if(z=p.indexOf("="),z===-1)return this._labels[p]==null?S?this._labels[p]=U+g:g:this._labels[p]+g;g=parseInt(p.charAt(z-1)+"1",10)*Number(p.substr(z+1)),p=z>1?this._parseTimeOrLabel(p.substr(0,z-1),0,S):U}return Number(p)+g},b.seek=function(p,g){return this.totalTime(typeof p=="number"?p:this._parseTimeOrLabel(p),g!==!1)},b.stop=function(){return this.paused(!0)},b.gotoAndPlay=function(p,g){return this.play(p,g)},b.gotoAndStop=function(p,g){return this.pause(p,g)},b.render=function(p,g,S){this._gc&&this._enabled(!0,!1);var x,U,z,j,lt,ft,gt,Nt=this._time,at=this._dirty?this.totalDuration():this._totalDuration,Et=this._startTime,I=this._timeScale,zt=this._paused;if(Nt!==this._time&&(p+=this._time-Nt),p>=at-1e-7&&p>=0)this._totalTime=this._time=at,this._reversed||this._hasPausedChild()||(U=!0,j="onComplete",lt=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=p&&p>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===H)&&this._rawPrevTime!==p&&this._first&&(lt=!0,this._rawPrevTime>H&&(j="onReverseComplete"))),this._rawPrevTime=this._duration||!g||p||this._rawPrevTime===p?p:H,p=at+1e-4;else if(1e-7>p)if(this._totalTime=this._time=0,(Nt!==0||this._duration===0&&this._rawPrevTime!==H&&(this._rawPrevTime>0||0>p&&this._rawPrevTime>=0))&&(j="onReverseComplete",U=this._reversed),0>p)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(lt=U=!0,j="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(lt=!0),this._rawPrevTime=p;else{if(this._rawPrevTime=this._duration||!g||p||this._rawPrevTime===p?p:H,p===0&&U)for(x=this._first;x&&x._startTime===0;)x._duration||(U=!1),x=x._next;p=0,this._initted||(lt=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!g){if(p>=Nt)for(x=this._first;x&&x._startTime<=p&&!ft;)x._duration||x.data!=="isPause"||x.ratio||x._startTime===0&&this._rawPrevTime===0||(ft=x),x=x._next;else for(x=this._last;x&&x._startTime>=p&&!ft;)x._duration||x.data==="isPause"&&x._rawPrevTime>0&&(ft=x),x=x._prev;ft&&(this._time=p=ft._startTime,this._totalTime=p+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=p}if(this._time!==Nt&&this._first||S||lt||ft){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==Nt&&p>0&&(this._active=!0),Nt===0&&this.vars.onStart&&(this._time===0&&this._duration||g||this._callback("onStart")),gt=this._time,gt>=Nt)for(x=this._first;x&&(z=x._next,gt===this._time&&(!this._paused||zt));)(x._active||x._startTime<=gt&&!x._paused&&!x._gc)&&(ft===x&&this.pause(),x._reversed?x.render((x._dirty?x.totalDuration():x._totalDuration)-(p-x._startTime)*x._timeScale,g,S):x.render((p-x._startTime)*x._timeScale,g,S)),x=z;else for(x=this._last;x&&(z=x._prev,gt===this._time&&(!this._paused||zt));){if(x._active||x._startTime<=Nt&&!x._paused&&!x._gc){if(ft===x){for(ft=x._prev;ft&&ft.endTime()>this._time;)ft.render(ft._reversed?ft.totalDuration()-(p-ft._startTime)*ft._timeScale:(p-ft._startTime)*ft._timeScale,g,S),ft=ft._prev;ft=null,this.pause()}x._reversed?x.render((x._dirty?x.totalDuration():x._totalDuration)-(p-x._startTime)*x._timeScale,g,S):x.render((p-x._startTime)*x._timeScale,g,S)}x=z}this._onUpdate&&(g||(F.length&&Z(),this._callback("onUpdate"))),j&&(this._gc||(Et===this._startTime||I!==this._timeScale)&&(this._time===0||at>=this.totalDuration())&&(U&&(F.length&&Z(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!g&&this.vars[j]&&this._callback(j)))}},b._hasPausedChild=function(){for(var p=this._first;p;){if(p._paused||p instanceof nt&&p._hasPausedChild())return!0;p=p._next}return!1},b.getChildren=function(p,g,S,x){x=x||-9999999999;for(var U=[],z=this._first,j=0;z;)z._startTime<x||(z instanceof d?g!==!1&&(U[j++]=z):(S!==!1&&(U[j++]=z),p!==!1&&(U=U.concat(z.getChildren(!0,g,S)),j=U.length))),z=z._next;return U},b.getTweensOf=function(p,g){var S,x,U=this._gc,z=[],j=0;for(U&&this._enabled(!0,!0),S=d.getTweensOf(p),x=S.length;--x>-1;)(S[x].timeline===this||g&&this._contains(S[x]))&&(z[j++]=S[x]);return U&&this._enabled(!1,!0),z},b.recent=function(){return this._recent},b._contains=function(p){for(var g=p.timeline;g;){if(g===this)return!0;g=g.timeline}return!1},b.shiftChildren=function(p,g,S){S=S||0;for(var x,U=this._first,z=this._labels;U;)U._startTime>=S&&(U._startTime+=p),U=U._next;if(g)for(x in z)z[x]>=S&&(z[x]+=p);return this._uncache(!0)},b._kill=function(p,g){if(!p&&!g)return this._enabled(!1,!1);for(var S=g?this.getTweensOf(g):this.getChildren(!0,!0,!1),x=S.length,U=!1;--x>-1;)S[x]._kill(p,g)&&(U=!0);return U},b.clear=function(p){var g=this.getChildren(!1,!0,!0),S=g.length;for(this._time=this._totalTime=0;--S>-1;)g[S]._enabled(!1,!1);return p!==!1&&(this._labels={}),this._uncache(!0)},b.invalidate=function(){for(var p=this._first;p;)p.invalidate(),p=p._next;return T.prototype.invalidate.call(this)},b._enabled=function(p,g){if(p===this._gc)for(var S=this._first;S;)S._enabled(p,!0),S=S._next;return ht.prototype._enabled.call(this,p,g)},b.totalTime=function(p,g,S){this._forcingPlayhead=!0;var x=T.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,x},b.duration=function(p){return arguments.length?(this.duration()!==0&&p!==0&&this.timeScale(this._duration/p),this):(this._dirty&&this.totalDuration(),this._duration)},b.totalDuration=function(p){if(!arguments.length){if(this._dirty){for(var g,S,x=0,U=this._last,z=999999999999;U;)g=U._prev,U._dirty&&U.totalDuration(),U._startTime>z&&this._sortChildren&&!U._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(U,U._startTime-U._delay),this._calculatingDuration=0):z=U._startTime,U._startTime<0&&!U._paused&&(x-=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),z=0),S=U._startTime+U._totalDuration/U._timeScale,S>x&&(x=S),U=g;this._duration=this._totalDuration=x,this._dirty=!1}return this._totalDuration}return p&&this.totalDuration()?this.timeScale(this._totalDuration/p):this},b.paused=function(p){if(!p)for(var g=this._first,S=this._time;g;)g._startTime===S&&g.data==="isPause"&&(g._rawPrevTime=0),g=g._next;return T.prototype.paused.apply(this,arguments)},b.usesFrames=function(){for(var p=this._timeline;p._timeline;)p=p._timeline;return p===T._rootFramesTimeline},b.rawTime=function(p){return p&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(p)-this._startTime)*this._timeScale},nt},!0),on._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(T,ht,d){var nt=function(G){T.call(this,G),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},H=1e-10,m=ht._internals,P=m.lazyTweens,D=m.lazyRender,A=on._gsDefine.globals,F=new d(null,null,1,0),Z=nt.prototype=new T;return Z.constructor=nt,Z.kill()._gc=!1,nt.version="2.0.2",Z.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),T.prototype.invalidate.call(this)},Z.addCallback=function(G,J,B,q){return this.add(ht.delayedCall(0,G,B,q),J)},Z.removeCallback=function(G,J){if(G)if(J==null)this._kill(null,G);else for(var B=this.getTweensOf(G,!1),q=B.length,E=this._parseTimeOrLabel(J);--q>-1;)B[q]._startTime===E&&B[q]._enabled(!1,!1);return this},Z.removePause=function(G){return this.removeCallback(T._internals.pauseCallback,G)},Z.tweenTo=function(G,J){J=J||{};var B,q,E,b={ease:F,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},p=J.repeat&&A.TweenMax||ht;for(q in J)b[q]=J[q];return b.time=this._parseTimeOrLabel(G),B=Math.abs(Number(b.time)-this._time)/this._timeScale||.001,E=new p(this,B,b),b.onStart=function(){E.target.paused(!0),E.vars.time===E.target.time()||B!==E.duration()||E.isFromTo||E.duration(Math.abs(E.vars.time-E.target.time())/E.target._timeScale).render(E.time(),!0,!0),J.onStart&&J.onStart.apply(J.onStartScope||J.callbackScope||E,J.onStartParams||[])},E},Z.tweenFromTo=function(G,J,B){B=B||{},G=this._parseTimeOrLabel(G),B.startAt={onComplete:this.seek,onCompleteParams:[G],callbackScope:this},B.immediateRender=B.immediateRender!==!1;var q=this.tweenTo(J,B);return q.isFromTo=1,q.duration(Math.abs(q.vars.time-G)/this._timeScale||.001)},Z.render=function(G,J,B){this._gc&&this._enabled(!0,!1);var q,E,b,p,g,S,x,U,z=this._time,j=this._dirty?this.totalDuration():this._totalDuration,lt=this._duration,ft=this._totalTime,gt=this._startTime,Nt=this._timeScale,at=this._rawPrevTime,Et=this._paused,I=this._cycle;if(z!==this._time&&(G+=this._time-z),G>=j-1e-7&&G>=0)this._locked||(this._totalTime=j,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(E=!0,p="onComplete",g=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=G&&G>=-1e-7||0>at||at===H)&&at!==G&&this._first&&(g=!0,at>H&&(p="onReverseComplete"))),this._rawPrevTime=this._duration||!J||G||this._rawPrevTime===G?G:H,this._yoyo&&1&this._cycle?this._time=G=0:(this._time=lt,G=lt+1e-4);else if(1e-7>G)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(z!==0||lt===0&&at!==H&&(at>0||0>G&&at>=0)&&!this._locked)&&(p="onReverseComplete",E=this._reversed),0>G)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(g=E=!0,p="onReverseComplete"):at>=0&&this._first&&(g=!0),this._rawPrevTime=G;else{if(this._rawPrevTime=lt||!J||G||this._rawPrevTime===G?G:H,G===0&&E)for(q=this._first;q&&q._startTime===0;)q._duration||(E=!1),q=q._next;G=0,this._initted||(g=!0)}else if(lt===0&&0>at&&(g=!0),this._time=this._rawPrevTime=G,this._locked||(this._totalTime=G,this._repeat!==0&&(S=lt+this._repeatDelay,this._cycle=this._totalTime/S>>0,this._cycle!==0&&this._cycle===this._totalTime/S&&G>=ft&&this._cycle--,this._time=this._totalTime-this._cycle*S,this._yoyo&&1&this._cycle&&(this._time=lt-this._time),this._time>lt?(this._time=lt,G=lt+1e-4):this._time<0?this._time=G=0:G=this._time)),this._hasPause&&!this._forcingPlayhead&&!J){if(G=this._time,G>=z||this._repeat&&I!==this._cycle)for(q=this._first;q&&q._startTime<=G&&!x;)q._duration||q.data!=="isPause"||q.ratio||q._startTime===0&&this._rawPrevTime===0||(x=q),q=q._next;else for(q=this._last;q&&q._startTime>=G&&!x;)q._duration||q.data==="isPause"&&q._rawPrevTime>0&&(x=q),q=q._prev;x&&x._startTime<lt&&(this._time=G=x._startTime,this._totalTime=G+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==I&&!this._locked){var zt=this._yoyo&&(1&I)!==0,Pt=zt===(this._yoyo&&(1&this._cycle)!==0),Rt=this._totalTime,ge=this._cycle,ue=this._rawPrevTime,Ft=this._time;if(this._totalTime=I*lt,this._cycle<I?zt=!zt:this._totalTime+=lt,this._time=z,this._rawPrevTime=lt===0?at-1e-4:at,this._cycle=I,this._locked=!0,z=zt?0:lt,this.render(z,J,lt===0),J||this._gc||this.vars.onRepeat&&(this._cycle=ge,this._locked=!1,this._callback("onRepeat")),z!==this._time||(Pt&&(this._cycle=I,this._locked=!0,z=zt?lt+1e-4:-1e-4,this.render(z,!0,!1)),this._locked=!1,this._paused&&!Et))return;this._time=Ft,this._totalTime=Rt,this._cycle=ge,this._rawPrevTime=ue}if(!(this._time!==z&&this._first||B||g||x))return void(ft!==this._totalTime&&this._onUpdate&&(J||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==ft&&G>0&&(this._active=!0),ft===0&&this.vars.onStart&&(this._totalTime===0&&this._totalDuration||J||this._callback("onStart")),U=this._time,U>=z)for(q=this._first;q&&(b=q._next,U===this._time&&(!this._paused||Et));)(q._active||q._startTime<=this._time&&!q._paused&&!q._gc)&&(x===q&&this.pause(),q._reversed?q.render((q._dirty?q.totalDuration():q._totalDuration)-(G-q._startTime)*q._timeScale,J,B):q.render((G-q._startTime)*q._timeScale,J,B)),q=b;else for(q=this._last;q&&(b=q._prev,U===this._time&&(!this._paused||Et));){if(q._active||q._startTime<=z&&!q._paused&&!q._gc){if(x===q){for(x=q._prev;x&&x.endTime()>this._time;)x.render(x._reversed?x.totalDuration()-(G-x._startTime)*x._timeScale:(G-x._startTime)*x._timeScale,J,B),x=x._prev;x=null,this.pause()}q._reversed?q.render((q._dirty?q.totalDuration():q._totalDuration)-(G-q._startTime)*q._timeScale,J,B):q.render((G-q._startTime)*q._timeScale,J,B)}q=b}this._onUpdate&&(J||(P.length&&D(),this._callback("onUpdate"))),p&&(this._locked||this._gc||(gt===this._startTime||Nt!==this._timeScale)&&(this._time===0||j>=this.totalDuration())&&(E&&(P.length&&D(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!J&&this.vars[p]&&this._callback(p)))},Z.getActive=function(G,J,B){G==null&&(G=!0),J==null&&(J=!0),B==null&&(B=!1);var q,E,b=[],p=this.getChildren(G,J,B),g=0,S=p.length;for(q=0;S>q;q++)E=p[q],E.isActive()&&(b[g++]=E);return b},Z.getLabelAfter=function(G){G||G!==0&&(G=this._time);var J,B=this.getLabelsArray(),q=B.length;for(J=0;q>J;J++)if(B[J].time>G)return B[J].name;return null},Z.getLabelBefore=function(G){G==null&&(G=this._time);for(var J=this.getLabelsArray(),B=J.length;--B>-1;)if(J[B].time<G)return J[B].name;return null},Z.getLabelsArray=function(){var G,J=[],B=0;for(G in this._labels)J[B++]={time:this._labels[G],name:G};return J.sort(function(q,E){return q.time-E.time}),J},Z.invalidate=function(){return this._locked=!1,T.prototype.invalidate.call(this)},Z.progress=function(G,J){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-G:G)+this._cycle*(this._duration+this._repeatDelay),J):this._time/this.duration()||0},Z.totalProgress=function(G,J){return arguments.length?this.totalTime(this.totalDuration()*G,J):this._totalTime/this.totalDuration()||0},Z.totalDuration=function(G){return arguments.length?this._repeat!==-1&&G?this.timeScale(this.totalDuration()/G):this:(this._dirty&&(T.prototype.totalDuration.call(this),this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},Z.time=function(G,J){return arguments.length?(this._dirty&&this.totalDuration(),G>this._duration&&(G=this._duration),this._yoyo&&1&this._cycle?G=this._duration-G+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(G+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(G,J)):this._time},Z.repeat=function(G){return arguments.length?(this._repeat=G,this._uncache(!0)):this._repeat},Z.repeatDelay=function(G){return arguments.length?(this._repeatDelay=G,this._uncache(!0)):this._repeatDelay},Z.yoyo=function(G){return arguments.length?(this._yoyo=G,this):this._yoyo},Z.currentLabel=function(G){return arguments.length?this.seek(G,!0):this.getLabelBefore(this._time+1e-8)},nt},!0),function(){var T=180/Math.PI,ht=[],d=[],nt=[],H={},m=on._gsDefine.globals,P=function(p,g,S,x){S===x&&(S=x-(x-g)/1e6),p===g&&(g=p+(S-p)/1e6),this.a=p,this.b=g,this.c=S,this.d=x,this.da=x-p,this.ca=S-p,this.ba=g-p},D=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",A=function(p,g,S,x){var U={a:p},z={},j={},lt={c:x},ft=(p+g)/2,gt=(g+S)/2,Nt=(S+x)/2,at=(ft+gt)/2,Et=(gt+Nt)/2,I=(Et-at)/8;return U.b=ft+(p-ft)/4,z.b=at+I,U.c=z.a=(U.b+z.b)/2,z.c=j.a=(at+Et)/2,j.b=Et-I,lt.b=Nt+(x-Nt)/4,j.c=lt.a=(j.b+lt.b)/2,[U,z,j,lt]},F=function(p,g,S,x,U){var z,j,lt,ft,gt,Nt,at,Et,I,zt,Pt,Rt,ge,ue=p.length-1,Ft=0,Dt=p[0].a;for(z=0;ue>z;z++)gt=p[Ft],j=gt.a,lt=gt.d,ft=p[Ft+1].d,U?(Pt=ht[z],Rt=d[z],ge=(Rt+Pt)*g*.25/(x?.5:nt[z]||.5),Nt=lt-(lt-j)*(x?.5*g:Pt!==0?ge/Pt:0),at=lt+(ft-lt)*(x?.5*g:Rt!==0?ge/Rt:0),Et=lt-(Nt+((at-Nt)*(3*Pt/(Pt+Rt)+.5)/4||0))):(Nt=lt-(lt-j)*g*.5,at=lt+(ft-lt)*g*.5,Et=lt-(Nt+at)/2),Nt+=Et,at+=Et,gt.c=I=Nt,z!==0?gt.b=Dt:gt.b=Dt=gt.a+.6*(gt.c-gt.a),gt.da=lt-j,gt.ca=I-j,gt.ba=Dt-j,S?(zt=A(j,Dt,I,lt),p.splice(Ft,1,zt[0],zt[1],zt[2],zt[3]),Ft+=4):Ft++,Dt=at;gt=p[Ft],gt.b=Dt,gt.c=Dt+.4*(gt.d-Dt),gt.da=gt.d-gt.a,gt.ca=gt.c-gt.a,gt.ba=Dt-gt.a,S&&(zt=A(gt.a,Dt,gt.c,gt.d),p.splice(Ft,1,zt[0],zt[1],zt[2],zt[3]))},Z=function(p,g,S,x){var U,z,j,lt,ft,gt,Nt=[];if(x)for(p=[x].concat(p),z=p.length;--z>-1;)typeof(gt=p[z][g])=="string"&>.charAt(1)==="="&&(p[z][g]=x[g]+Number(gt.charAt(0)+gt.substr(2)));if(U=p.length-2,0>U)return Nt[0]=new P(p[0][g],0,0,p[0][g]),Nt;for(z=0;U>z;z++)j=p[z][g],lt=p[z+1][g],Nt[z]=new P(j,0,0,lt),S&&(ft=p[z+2][g],ht[z]=(ht[z]||0)+(lt-j)*(lt-j),d[z]=(d[z]||0)+(ft-lt)*(ft-lt));return Nt[z]=new P(p[z][g],0,0,p[z+1][g]),Nt},G=function(p,g,S,x,U,z){var j,lt,ft,gt,Nt,at,Et,I,zt={},Pt=[],Rt=z||p[0];U=typeof U=="string"?","+U+",":D,g==null&&(g=1);for(lt in p[0])Pt.push(lt);if(p.length>1){for(I=p[p.length-1],Et=!0,j=Pt.length;--j>-1;)if(lt=Pt[j],Math.abs(Rt[lt]-I[lt])>.05){Et=!1;break}Et&&(p=p.concat(),z&&p.unshift(z),p.push(p[1]),z=p[p.length-3])}for(ht.length=d.length=nt.length=0,j=Pt.length;--j>-1;)lt=Pt[j],H[lt]=U.indexOf(","+lt+",")!==-1,zt[lt]=Z(p,lt,H[lt],z);for(j=ht.length;--j>-1;)ht[j]=Math.sqrt(ht[j]),d[j]=Math.sqrt(d[j]);if(!x){for(j=Pt.length;--j>-1;)if(H[lt])for(ft=zt[Pt[j]],at=ft.length-1,gt=0;at>gt;gt++)Nt=ft[gt+1].da/d[gt]+ft[gt].da/ht[gt]||0,nt[gt]=(nt[gt]||0)+Nt*Nt;for(j=nt.length;--j>-1;)nt[j]=Math.sqrt(nt[j])}for(j=Pt.length,gt=S?4:1;--j>-1;)lt=Pt[j],ft=zt[lt],F(ft,g,S,x,H[lt]),Et&&(ft.splice(0,gt),ft.splice(ft.length-gt,gt));return zt},J=function(p,g,S){g=g||"soft";var x,U,z,j,lt,ft,gt,Nt,at,Et,I,zt={},Pt=g==="cubic"?3:2,Rt=g==="soft",ge=[];if(Rt&&S&&(p=[S].concat(p)),p==null||p.length<Pt+1)throw"invalid Bezier data";for(at in p[0])ge.push(at);for(ft=ge.length;--ft>-1;){for(at=ge[ft],zt[at]=lt=[],Et=0,Nt=p.length,gt=0;Nt>gt;gt++)x=S==null?p[gt][at]:typeof(I=p[gt][at])=="string"&&I.charAt(1)==="="?S[at]+Number(I.charAt(0)+I.substr(2)):Number(I),Rt&>>1&&Nt-1>gt&&(lt[Et++]=(x+lt[Et-2])/2),lt[Et++]=x;for(Nt=Et-Pt+1,Et=0,gt=0;Nt>gt;gt+=Pt)x=lt[gt],U=lt[gt+1],z=lt[gt+2],j=Pt===2?0:lt[gt+3],lt[Et++]=I=Pt===3?new P(x,U,z,j):new P(x,(2*U+x)/3,(2*U+z)/3,z);lt.length=Et}return zt},B=function(p,g,S){for(var x,U,z,j,lt,ft,gt,Nt,at,Et,I,zt=1/S,Pt=p.length;--Pt>-1;)for(Et=p[Pt],z=Et.a,j=Et.d-z,lt=Et.c-z,ft=Et.b-z,x=U=0,Nt=1;S>=Nt;Nt++)gt=zt*Nt,at=1-gt,x=U-(U=(gt*gt*j+3*at*(gt*lt+at*ft))*gt),I=Pt*S+Nt-1,g[I]=(g[I]||0)+x*x},q=function(p,g){g=g>>0||6;var S,x,U,z,j=[],lt=[],ft=0,gt=0,Nt=g-1,at=[],Et=[];for(S in p)B(p[S],j,g);for(U=j.length,x=0;U>x;x++)ft+=Math.sqrt(j[x]),z=x%g,Et[z]=ft,z===Nt&&(gt+=ft,z=x/g>>0,at[z]=Et,lt[z]=gt,ft=0,Et=[]);return{length:gt,lengths:lt,segments:at}},E=on._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(p,g,S){this._target=p,g instanceof Array&&(g={values:g}),this._func={},this._mod={},this._props=[],this._timeRes=g.timeResolution==null?6:parseInt(g.timeResolution,10);var x,U,z,j,lt,ft=g.values||[],gt={},Nt=ft[0],at=g.autoRotate||S.vars.orientToBezier;this._autoRotate=at?at instanceof Array?at:[["x","y","rotation",at===!0?0:Number(at)||0]]:null;for(x in Nt)this._props.push(x);for(z=this._props.length;--z>-1;)x=this._props[z],this._overwriteProps.push(x),U=this._func[x]=typeof p[x]=="function",gt[x]=U?p[x.indexOf("set")||typeof p["get"+x.substr(3)]!="function"?x:"get"+x.substr(3)]():parseFloat(p[x]),lt||gt[x]!==ft[0][x]&&(lt=gt);if(this._beziers=g.type!=="cubic"&&g.type!=="quadratic"&&g.type!=="soft"?G(ft,isNaN(g.curviness)?1:g.curviness,!1,g.type==="thruBasic",g.correlate,lt):J(ft,g.type,gt),this._segCount=this._beziers[x].length,this._timeRes){var Et=q(this._beziers,this._timeRes);this._length=Et.length,this._lengths=Et.lengths,this._segments=Et.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(at=this._autoRotate)for(this._initialRotations=[],at[0]instanceof Array||(this._autoRotate=at=[at]),z=at.length;--z>-1;){for(j=0;3>j;j++)x=at[z][j],this._func[x]=typeof p[x]=="function"?p[x.indexOf("set")||typeof p["get"+x.substr(3)]!="function"?x:"get"+x.substr(3)]:!1;x=at[z][2],this._initialRotations[z]=(this._func[x]?this._func[x].call(this._target):this._target[x])||0,this._overwriteProps.push(x)}return this._startRatio=S.vars.runBackwards?1:0,!0},set:function(p){var g,S,x,U,z,j,lt,ft,gt,Nt,at=this._segCount,Et=this._func,I=this._target,zt=p!==this._startRatio;if(this._timeRes){if(gt=this._lengths,Nt=this._curSeg,p*=this._length,x=this._li,p>this._l2&&at-1>x){for(ft=at-1;ft>x&&(this._l2=gt[++x])<=p;);this._l1=gt[x-1],this._li=x,this._curSeg=Nt=this._segments[x],this._s2=Nt[this._s1=this._si=0]}else if(p<this._l1&&x>0){for(;x>0&&(this._l1=gt[--x])>=p;);x===0&&p<this._l1?this._l1=0:x++,this._l2=gt[x],this._li=x,this._curSeg=Nt=this._segments[x],this._s1=Nt[(this._si=Nt.length-1)-1]||0,this._s2=Nt[this._si]}if(g=x,p-=this._l1,x=this._si,p>this._s2&&x<Nt.length-1){for(ft=Nt.length-1;ft>x&&(this._s2=Nt[++x])<=p;);this._s1=Nt[x-1],this._si=x}else if(p<this._s1&&x>0){for(;x>0&&(this._s1=Nt[--x])>=p;);x===0&&p<this._s1?this._s1=0:x++,this._s2=Nt[x],this._si=x}j=(x+(p-this._s1)/(this._s2-this._s1))*this._prec||0}else g=0>p?0:p>=1?at-1:at*p>>0,j=(p-g*(1/at))*at;for(S=1-j,x=this._props.length;--x>-1;)U=this._props[x],z=this._beziers[U][g],lt=(j*j*z.da+3*S*(j*z.ca+S*z.ba))*j+z.a,this._mod[U]&&(lt=this._mod[U](lt,I)),Et[U]?I[U](lt):I[U]=lt;if(this._autoRotate){var Pt,Rt,ge,ue,Ft,Dt,kt,Fe=this._autoRotate;for(x=Fe.length;--x>-1;)U=Fe[x][2],Dt=Fe[x][3]||0,kt=Fe[x][4]===!0?1:T,z=this._beziers[Fe[x][0]],Pt=this._beziers[Fe[x][1]],z&&Pt&&(z=z[g],Pt=Pt[g],Rt=z.a+(z.b-z.a)*j,ue=z.b+(z.c-z.b)*j,Rt+=(ue-Rt)*j,ue+=(z.c+(z.d-z.c)*j-ue)*j,ge=Pt.a+(Pt.b-Pt.a)*j,Ft=Pt.b+(Pt.c-Pt.b)*j,ge+=(Ft-ge)*j,Ft+=(Pt.c+(Pt.d-Pt.c)*j-Ft)*j,lt=zt?Math.atan2(Ft-ge,ue-Rt)*kt+Dt:this._initialRotations[x],this._mod[U]&&(lt=this._mod[U](lt,I)),Et[U]?I[U](lt):I[U]=lt)}}}),b=E.prototype;E.bezierThrough=G,E.cubicToQuadratic=A,E._autoCSS=!0,E.quadraticToCubic=function(p,g,S){return new P(p,(2*g+p)/3,(2*g+S)/3,S)},E._cssRegister=function(){var p=m.CSSPlugin;if(p){var g=p._internals,S=g._parseToProxy,x=g._setPluginRatio,U=g.CSSPropTween;g._registerComplexSpecialProp("bezier",{parser:function(z,j,lt,ft,gt,Nt){j instanceof Array&&(j={values:j}),Nt=new E;var at,Et,I,zt=j.values,Pt=zt.length-1,Rt=[],ge={};if(0>Pt)return gt;for(at=0;Pt>=at;at++)I=S(z,zt[at],ft,gt,Nt,Pt!==at),Rt[at]=I.end;for(Et in j)ge[Et]=j[Et];return ge.values=Rt,gt=new U(z,"bezier",0,0,I.pt,2),gt.data=I,gt.plugin=Nt,gt.setRatio=x,ge.autoRotate===0&&(ge.autoRotate=!0),!ge.autoRotate||ge.autoRotate instanceof Array||(at=ge.autoRotate===!0?0:Number(ge.autoRotate),ge.autoRotate=I.end.left!=null?[["left","top","rotation",at,!1]]:I.end.x!=null?[["x","y","rotation",at,!1]]:!1),ge.autoRotate&&(ft._transform||ft._enableTransforms(!1),I.autoRotate=ft._target._gsTransform,I.proxy.rotation=I.autoRotate.rotation||0,ft._overwriteProps.push("rotation")),Nt._onInitTween(I.proxy,ge,ft._tween),gt}})}},b._mod=function(p){for(var g,S=this._overwriteProps,x=S.length;--x>-1;)g=p[S[x]],g&&typeof g=="function"&&(this._mod[S[x]]=g)},b._kill=function(p){var g,S,x=this._props;for(g in this._beziers)if(g in p)for(delete this._beziers[g],delete this._func[g],S=x.length;--S>-1;)x[S]===g&&x.splice(S,1);if(x=this._autoRotate)for(S=x.length;--S>-1;)p[x[S][2]]&&x.splice(S,1);return this._super._kill.call(this,p)}}(),on._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(T,ht){var d,nt,H,m,P=function(){T.call(this,"css"),this._overwriteProps.length=0,this.setRatio=P.prototype.setRatio},D=on._gsDefine.globals,A={},F=P.prototype=new T("css");F.constructor=P,P.version="2.0.2",P.API=2,P.defaultTransformPerspective=0,P.defaultSkewType="compensated",P.defaultSmoothOrigin=!0,F="px",P.suffixMap={top:F,right:F,bottom:F,left:F,width:F,height:F,fontSize:F,padding:F,margin:F,perspective:F,lineHeight:""};var Z,G,J,B,q,E,b,p,g=/(?:\-|\.|\b)(\d|\.|e\-)+/g,S=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,x=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,U=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,z=/(?:\d|\-|\+|=|#|\.)*/g,j=/opacity *= *([^)]*)/i,lt=/opacity:([^;]*)/i,ft=/alpha\(opacity *=.+?\)/i,gt=/^(rgb|hsl)/,Nt=/([A-Z])/g,at=/-([a-z])/gi,Et=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,I=function(L,Y){return Y.toUpperCase()},zt=/(?:Left|Right|Width)/i,Pt=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,Rt=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,ge=/,(?=[^\)]*(?:\(|$))/gi,ue=/[\s,\(]/i,Ft=Math.PI/180,Dt=180/Math.PI,kt={},Fe={style:{}},xe=on.document||{createElement:function(){return Fe}},Zt=function(L,Y){return xe.createElementNS?xe.createElementNS(Y||"http://www.w3.org/1999/xhtml",L):xe.createElement(L)},ti=Zt("div"),ki=Zt("img"),Oe=P._internals={_specialProps:A},Ge=(on.navigator||{}).userAgent||"",di=function(){var L=Ge.indexOf("Android"),Y=Zt("a");return J=Ge.indexOf("Safari")!==-1&&Ge.indexOf("Chrome")===-1&&(L===-1||parseFloat(Ge.substr(L+8,2))>3),q=J&&parseFloat(Ge.substr(Ge.indexOf("Version/")+8,2))<6,B=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)),Y?(Y.style.cssText="top:1px;opacity:.55;",/^0.55/.test(Y.style.opacity)):!1}(),Ri=function(L){return j.test(typeof L=="string"?L:(L.currentStyle?L.currentStyle.filter:L.style.filter)||"")?parseFloat(RegExp.$1)/100:1},hn=function(L){on.console&&console.log(L)},Ji="",R="",Jt=function(L,Y){Y=Y||ti;var rt,it,O=Y.style;if(O[L]!==void 0)return L;for(L=L.charAt(0).toUpperCase()+L.substr(1),rt=["O","Moz","ms","Ms","Webkit"],it=5;--it>-1&&O[rt[it]+L]===void 0;);return it>=0?(R=it===3?"ms":rt[it],Ji="-"+R.toLowerCase()+"-",R+L):null},Wt=(typeof window<"u"?window:xe.defaultView||{getComputedStyle:function(){}}).getComputedStyle,ct=P.getStyle=function(L,Y,rt,it,O){var Mt;return di||Y!=="opacity"?(!it&&L.style[Y]?Mt=L.style[Y]:(rt=rt||Wt(L))?Mt=rt[Y]||rt.getPropertyValue(Y)||rt.getPropertyValue(Y.replace(Nt,"-$1").toLowerCase()):L.currentStyle&&(Mt=L.currentStyle[Y]),O==null||Mt&&Mt!=="none"&&Mt!=="auto"&&Mt!=="auto auto"?Mt:O):Ri(L)},pt=Oe.convertToPixels=function(L,Y,rt,it,O){if(it==="px"||!it&&Y!=="lineHeight")return rt;if(it==="auto"||!rt)return 0;var Mt,ot,Ct,Ht=zt.test(Y),It=L,Tt=ti.style,le=0>rt,oe=rt===1;if(le&&(rt=-rt),oe&&(rt*=100),Y!=="lineHeight"||it)if(it==="%"&&Y.indexOf("border")!==-1)Mt=rt/100*(Ht?L.clientWidth:L.clientHeight);else{if(Tt.cssText="border:0 solid red;position:"+ct(L,"position")+";line-height:0;",it!=="%"&&It.appendChild&&it.charAt(0)!=="v"&&it!=="rem")Tt[Ht?"borderLeftWidth":"borderTopWidth"]=rt+it;else{if(It=L.parentNode||xe.body,ct(It,"display").indexOf("flex")!==-1&&(Tt.position="absolute"),ot=It._gsCache,Ct=ht.ticker.frame,ot&&Ht&&ot.time===Ct)return ot.width*rt/100;Tt[Ht?"width":"height"]=rt+it}It.appendChild(ti),Mt=parseFloat(ti[Ht?"offsetWidth":"offsetHeight"]),It.removeChild(ti),Ht&&it==="%"&&P.cacheWidths!==!1&&(ot=It._gsCache=It._gsCache||{},ot.time=Ct,ot.width=Mt/rt*100),Mt!==0||O||(Mt=pt(L,Y,rt,it,!0))}else ot=Wt(L).lineHeight,L.style.lineHeight=rt,Mt=parseFloat(Wt(L).lineHeight),L.style.lineHeight=ot;return oe&&(Mt/=100),le?-Mt:Mt},Lt=Oe.calculateOffset=function(L,Y,rt){if(ct(L,"position",rt)!=="absolute")return 0;var it=Y==="left"?"Left":"Top",O=ct(L,"margin"+it,rt);return L["offset"+it]-(pt(L,Y,parseFloat(O),O.replace(z,""))||0)},ie=function(L,Y){var rt,it,O,Mt={};if(Y=Y||Wt(L,null))if(rt=Y.length)for(;--rt>-1;)O=Y[rt],(O.indexOf("-transform")===-1||hs===O)&&(Mt[O.replace(at,I)]=Y.getPropertyValue(O));else for(rt in Y)(rt.indexOf("Transform")===-1||gn===rt)&&(Mt[rt]=Y[rt]);else if(Y=L.currentStyle||L.style)for(rt in Y)typeof rt=="string"&&Mt[rt]===void 0&&(Mt[rt.replace(at,I)]=Y[rt]);return di||(Mt.opacity=Ri(L)),it=zr(L,Y,!1),Mt.rotation=it.rotation,Mt.skewX=it.skewX,Mt.scaleX=it.scaleX,Mt.scaleY=it.scaleY,Mt.x=it.x,Mt.y=it.y,ir&&(Mt.z=it.z,Mt.rotationX=it.rotationX,Mt.rotationY=it.rotationY,Mt.scaleZ=it.scaleZ),Mt.filters&&delete Mt.filters,Mt},Kt=function(L,Y,rt,it,O){var Mt,ot,Ct,Ht={},It=L.style;for(ot in rt)ot!=="cssText"&&ot!=="length"&&isNaN(ot)&&(Y[ot]!==(Mt=rt[ot])||O&&O[ot])&&ot.indexOf("Origin")===-1&&(typeof Mt=="number"||typeof Mt=="string")&&(Ht[ot]=Mt!=="auto"||ot!=="left"&&ot!=="top"?Mt!==""&&Mt!=="auto"&&Mt!=="none"||typeof Y[ot]!="string"||Y[ot].replace(U,"")===""?Mt:0:Lt(L,ot),It[ot]!==void 0&&(Ct=new ni(It,ot,It[ot],Ct)));if(it)for(ot in it)ot!=="className"&&(Ht[ot]=it[ot]);return{difs:Ht,firstMPT:Ct}},w={width:["Left","Right"],height:["Top","Bottom"]},X=["marginLeft","marginRight","marginTop","marginBottom"],et=function(L,Y,rt){if((L.nodeName+"").toLowerCase()==="svg")return(rt||Wt(L))[Y]||0;if(L.getCTM&&js(L))return L.getBBox()[Y]||0;var it=parseFloat(Y==="width"?L.offsetWidth:L.offsetHeight),O=w[Y],Mt=O.length;for(rt=rt||Wt(L,null);--Mt>-1;)it-=parseFloat(ct(L,"padding"+O[Mt],rt,!0))||0,it-=parseFloat(ct(L,"border"+O[Mt]+"Width",rt,!0))||0;return it},K=function(L,Y){if(L==="contain"||L==="auto"||L==="auto auto")return L+" ";(L==null||L==="")&&(L="0 0");var rt,it=L.split(" "),O=L.indexOf("left")!==-1?"0%":L.indexOf("right")!==-1?"100%":it[0],Mt=L.indexOf("top")!==-1?"0%":L.indexOf("bottom")!==-1?"100%":it[1];if(it.length>3&&!Y){for(it=L.split(", ").join(",").split(","),L=[],rt=0;rt<it.length;rt++)L.push(K(it[rt]));return L.join(",")}return Mt==null?Mt=O==="center"?"50%":"0":Mt==="center"&&(Mt="50%"),(O==="center"||isNaN(parseFloat(O))&&(O+"").indexOf("=")===-1)&&(O="50%"),L=O+" "+Mt+(it.length>2?" "+it[2]:""),Y&&(Y.oxp=O.indexOf("%")!==-1,Y.oyp=Mt.indexOf("%")!==-1,Y.oxr=O.charAt(1)==="=",Y.oyr=Mt.charAt(1)==="=",Y.ox=parseFloat(O.replace(U,"")),Y.oy=parseFloat(Mt.replace(U,"")),Y.v=L),Y||L},vt=function(L,Y){return typeof L=="function"&&(L=L(p,b)),typeof L=="string"&&L.charAt(1)==="="?parseInt(L.charAt(0)+"1",10)*parseFloat(L.substr(2)):parseFloat(L)-parseFloat(Y)||0},Gt=function(L,Y){typeof L=="function"&&(L=L(p,b));var rt=typeof L=="string"&&L.charAt(1)==="=";return typeof L=="string"&&L.charAt(L.length-2)==="v"&&(L=(rt?L.substr(0,2):0)+window["inner"+(L.substr(-2)==="vh"?"Height":"Width")]*(parseFloat(rt?L.substr(2):L)/100)),L==null?Y:rt?parseInt(L.charAt(0)+"1",10)*parseFloat(L.substr(2))+Y:parseFloat(L)||0},Xt=function(L,Y,rt,it){var O,Mt,ot,Ct,Ht,It=1e-6;return typeof L=="function"&&(L=L(p,b)),L==null?Ct=Y:typeof L=="number"?Ct=L:(O=360,Mt=L.split("_"),Ht=L.charAt(1)==="=",ot=(Ht?parseInt(L.charAt(0)+"1",10)*parseFloat(Mt[0].substr(2)):parseFloat(Mt[0]))*(L.indexOf("rad")===-1?1:Dt)-(Ht?0:Y),Mt.length&&(it&&(it[rt]=Y+ot),L.indexOf("short")!==-1&&(ot%=O,ot!==ot%(O/2)&&(ot=0>ot?ot+O:ot-O)),L.indexOf("_cw")!==-1&&0>ot?ot=(ot+9999999999*O)%O-(ot/O|0)*O:L.indexOf("ccw")!==-1&&ot>0&&(ot=(ot-9999999999*O)%O-(ot/O|0)*O)),Ct=Y+ot),It>Ct&&Ct>-It&&(Ct=0),Ct},jt={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(L,Y,rt){return L=0>L?L+1:L>1?L-1:L,255*(1>6*L?Y+(rt-Y)*L*6:.5>L?rt:2>3*L?Y+(rt-Y)*(2/3-L)*6:Y)+.5|0},Re=P.parseColor=function(L,Y){var rt,it,O,Mt,ot,Ct,Ht,It,Tt,le,oe;if(L)if(typeof L=="number")rt=[L>>16,L>>8&255,255&L];else{if(L.charAt(L.length-1)===","&&(L=L.substr(0,L.length-1)),jt[L])rt=jt[L];else if(L.charAt(0)==="#")L.length===4&&(it=L.charAt(1),O=L.charAt(2),Mt=L.charAt(3),L="#"+it+it+O+O+Mt+Mt),L=parseInt(L.substr(1),16),rt=[L>>16,L>>8&255,255&L];else if(L.substr(0,3)==="hsl")if(rt=oe=L.match(g),Y){if(L.indexOf("=")!==-1)return L.match(S)}else ot=Number(rt[0])%360/360,Ct=Number(rt[1])/100,Ht=Number(rt[2])/100,O=.5>=Ht?Ht*(Ct+1):Ht+Ct-Ht*Ct,it=2*Ht-O,rt.length>3&&(rt[3]=Number(rt[3])),rt[0]=Ne(ot+1/3,it,O),rt[1]=Ne(ot,it,O),rt[2]=Ne(ot-1/3,it,O);else rt=L.match(g)||jt.transparent;rt[0]=Number(rt[0]),rt[1]=Number(rt[1]),rt[2]=Number(rt[2]),rt.length>3&&(rt[3]=Number(rt[3]))}else rt=jt.black;return Y&&!oe&&(it=rt[0]/255,O=rt[1]/255,Mt=rt[2]/255,It=Math.max(it,O,Mt),Tt=Math.min(it,O,Mt),Ht=(It+Tt)/2,It===Tt?ot=Ct=0:(le=It-Tt,Ct=Ht>.5?le/(2-It-Tt):le/(It+Tt),ot=It===it?(O-Mt)/le+(Mt>O?6:0):It===O?(Mt-it)/le+2:(it-O)/le+4,ot*=60),rt[0]=ot+.5|0,rt[1]=100*Ct+.5|0,rt[2]=100*Ht+.5|0),rt},de=function(L,Y){var rt,it,O,Mt=L.match(we)||[],ot=0,Ct="";if(!Mt.length)return L;for(rt=0;rt<Mt.length;rt++)it=Mt[rt],O=L.substr(ot,L.indexOf(it,ot)-ot),ot+=O.length+it.length,it=Re(it,Y),it.length===3&&it.push(1),Ct+=O+(Y?"hsla("+it[0]+","+it[1]+"%,"+it[2]+"%,"+it[3]:"rgba("+it.join(","))+")";return Ct+L.substr(ot)},we="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(F in jt)we+="|"+F+"\\b";we=new RegExp(we+")","gi"),P.colorStringFilter=function(L){var Y,rt=L[0]+" "+L[1];we.test(rt)&&(Y=rt.indexOf("hsl(")!==-1||rt.indexOf("hsla(")!==-1,L[0]=de(L[0],Y),L[1]=de(L[1],Y)),we.lastIndex=0},ht.defaultStringFilter||(ht.defaultStringFilter=P.colorStringFilter);var yi=function(L,Y,rt,it){if(L==null)return function(oe){return oe};var O,Mt=Y?(L.match(we)||[""])[0]:"",ot=L.split(Mt).join("").match(x)||[],Ct=L.substr(0,L.indexOf(ot[0])),Ht=L.charAt(L.length-1)===")"?")":"",It=L.indexOf(" ")!==-1?" ":",",Tt=ot.length,le=Tt>0?ot[0].replace(g,""):"";return Tt?O=Y?function(oe){var te,ve,he,je;if(typeof oe=="number")oe+=le;else if(it&&ge.test(oe)){for(je=oe.replace(ge,"|").split("|"),he=0;he<je.length;he++)je[he]=O(je[he]);return je.join(",")}if(te=(oe.match(we)||[Mt])[0],ve=oe.split(te).join("").match(x)||[],he=ve.length,Tt>he--)for(;++he<Tt;)ve[he]=rt?ve[(he-1)/2|0]:ot[he];return Ct+ve.join(It)+It+te+Ht+(oe.indexOf("inset")!==-1?" inset":"")}:function(oe){var te,ve,he;if(typeof oe=="number")oe+=le;else if(it&&ge.test(oe)){for(ve=oe.replace(ge,"|").split("|"),he=0;he<ve.length;he++)ve[he]=O(ve[he]);return ve.join(",")}if(te=oe.match(x)||[],he=te.length,Tt>he--)for(;++he<Tt;)te[he]=rt?te[(he-1)/2|0]:ot[he];return Ct+te.join(It)+Ht}:function(oe){return oe}},Si=function(L){return L=L.split(","),function(Y,rt,it,O,Mt,ot,Ct){var Ht,It=(rt+"").split(" ");for(Ct={},Ht=0;4>Ht;Ht++)Ct[L[Ht]]=It[Ht]=It[Ht]||It[(Ht-1)/2>>0];return O.parse(Y,Ct,Mt,ot)}},ni=(Oe._setPluginRatio=function(L){this.plugin.setRatio(L);for(var Y,rt,it,O,Mt,ot=this.data,Ct=ot.proxy,Ht=ot.firstMPT,It=1e-6;Ht;)Y=Ct[Ht.v],Ht.r?Y=Ht.r(Y):It>Y&&Y>-It&&(Y=0),Ht.t[Ht.p]=Y,Ht=Ht._next;if(ot.autoRotate&&(ot.autoRotate.rotation=ot.mod?ot.mod.call(this._tween,Ct.rotation,this.t,this._tween):Ct.rotation),L===1||L===0)for(Ht=ot.firstMPT,Mt=L===1?"e":"b";Ht;){if(rt=Ht.t,rt.type){if(rt.type===1){for(O=rt.xs0+rt.s+rt.xs1,it=1;it<rt.l;it++)O+=rt["xn"+it]+rt["xs"+(it+1)];rt[Mt]=O}}else rt[Mt]=rt.s+rt.xs0;Ht=Ht._next}},function(L,Y,rt,it,O){this.t=L,this.p=Y,this.v=rt,this.r=O,it&&(it._prev=this,this._next=it)}),Ei=(Oe._parseToProxy=function(L,Y,rt,it,O,Mt){var ot,Ct,Ht,It,Tt,le=it,oe={},te={},ve=rt._transform,he=kt;for(rt._transform=null,kt=Y,it=Tt=rt.parse(L,Y,it,O),kt=he,Mt&&(rt._transform=ve,le&&(le._prev=null,le._prev&&(le._prev._next=null)));it&&it!==le;){if(it.type<=1&&(Ct=it.p,te[Ct]=it.s+it.c,oe[Ct]=it.s,Mt||(It=new ni(it,"s",Ct,It,it.r),it.c=0),it.type===1))for(ot=it.l;--ot>0;)Ht="xn"+ot,Ct=it.p+"_"+Ht,te[Ct]=it.data[Ht],oe[Ct]=it[Ht],Mt||(It=new ni(it,Ht,Ct,It,it.rxp[Ht]));it=it._next}return{proxy:oe,end:te,firstMPT:It,pt:Tt}},Oe.CSSPropTween=function(L,Y,rt,it,O,Mt,ot,Ct,Ht,It,Tt){this.t=L,this.p=Y,this.s=rt,this.c=it,this.n=ot||Y,L instanceof Ei||m.push(this.n),this.r=Ct&&(typeof Ct=="function"?Ct:Math.round),this.type=Mt||0,Ht&&(this.pr=Ht,d=!0),this.b=It===void 0?rt:It,this.e=Tt===void 0?rt+it:Tt,O&&(this._next=O,O._prev=this)}),Tr=function(L,Y,rt,it,O,Mt){var ot=new Ei(L,Y,rt,it-rt,O,-1,Mt);return ot.b=rt,ot.e=ot.xs0=it,ot},Xn=P.parseComplex=function(L,Y,rt,it,O,Mt,ot,Ct,Ht,It){rt=rt||Mt||"",typeof it=="function"&&(it=it(p,b)),ot=new Ei(L,Y,0,0,ot,It?2:1,null,!1,Ct,rt,it),it+="",O&&we.test(it+rt)&&(it=[rt,it],P.colorStringFilter(it),rt=it[0],it=it[1]);var Tt,le,oe,te,ve,he,je,He,ci,Be,ye,ke,ce,mi=rt.split(", ").join(",").split(" "),Ce=it.split(", ").join(",").split(" "),_e=mi.length,Le=Z!==!1;for((it.indexOf(",")!==-1||rt.indexOf(",")!==-1)&&((it+rt).indexOf("rgb")!==-1||(it+rt).indexOf("hsl")!==-1?(mi=mi.join(" ").replace(ge,", ").split(" "),Ce=Ce.join(" ").replace(ge,", ").split(" ")):(mi=mi.join(" ").split(",").join(", ").split(" "),Ce=Ce.join(" ").split(",").join(", ").split(" ")),_e=mi.length),_e!==Ce.length&&(mi=(Mt||"").split(" "),_e=mi.length),ot.plugin=Ht,ot.setRatio=It,we.lastIndex=0,Tt=0;_e>Tt;Tt++)if(te=mi[Tt],ve=Ce[Tt]+"",He=parseFloat(te),He||He===0)ot.appendXtra("",He,vt(ve,He),ve.replace(S,""),Le&&ve.indexOf("px")!==-1?Math.round:!1,!0);else if(O&&we.test(te))ke=ve.indexOf(")")+1,ke=")"+(ke?ve.substr(ke):""),ce=ve.indexOf("hsl")!==-1&&di,Be=ve,te=Re(te,ce),ve=Re(ve,ce),ci=te.length+ve.length>6,ci&&!di&&ve[3]===0?(ot["xs"+ot.l]+=ot.l?" transparent":"transparent",ot.e=ot.e.split(Ce[Tt]).join("transparent")):(di||(ci=!1),ce?ot.appendXtra(Be.substr(0,Be.indexOf("hsl"))+(ci?"hsla(":"hsl("),te[0],vt(ve[0],te[0]),",",!1,!0).appendXtra("",te[1],vt(ve[1],te[1]),"%,",!1).appendXtra("",te[2],vt(ve[2],te[2]),ci?"%,":"%"+ke,!1):ot.appendXtra(Be.substr(0,Be.indexOf("rgb"))+(ci?"rgba(":"rgb("),te[0],ve[0]-te[0],",",Math.round,!0).appendXtra("",te[1],ve[1]-te[1],",",Math.round).appendXtra("",te[2],ve[2]-te[2],ci?",":ke,Math.round),ci&&(te=te.length<4?1:te[3],ot.appendXtra("",te,(ve.length<4?1:ve[3])-te,ke,!1))),we.lastIndex=0;else if(he=te.match(g)){if(je=ve.match(S),!je||je.length!==he.length)return ot;for(oe=0,le=0;le<he.length;le++)ye=he[le],Be=te.indexOf(ye,oe),ot.appendXtra(te.substr(oe,Be-oe),Number(ye),vt(je[le],ye),"",Le&&te.substr(Be+ye.length,2)==="px"?Math.round:!1,le===0),oe=Be+ye.length;ot["xs"+ot.l]+=te.substr(oe)}else ot["xs"+ot.l]+=ot.l||ot["xs"+ot.l]?" "+ve:ve;if(it.indexOf("=")!==-1&&ot.data){for(ke=ot.xs0+ot.data.s,Tt=1;Tt<ot.l;Tt++)ke+=ot["xs"+Tt]+ot.data["xn"+Tt];ot.e=ke+ot["xs"+Tt]}return ot.l||(ot.type=-1,ot.xs0=ot.e),ot.xfirst||ot},nn=9;for(F=Ei.prototype,F.l=F.pr=0;--nn>0;)F["xn"+nn]=0,F["xs"+nn]="";F.xs0="",F._next=F._prev=F.xfirst=F.data=F.plugin=F.setRatio=F.rxp=null,F.appendXtra=function(L,Y,rt,it,O,Mt){var ot=this,Ct=ot.l;return ot["xs"+Ct]+=Mt&&(Ct||ot["xs"+Ct])?" "+L:L||"",rt||Ct===0||ot.plugin?(ot.l++,ot.type=ot.setRatio?2:1,ot["xs"+ot.l]=it||"",Ct>0?(ot.data["xn"+Ct]=Y+rt,ot.rxp["xn"+Ct]=O,ot["xn"+Ct]=Y,ot.plugin||(ot.xfirst=new Ei(ot,"xn"+Ct,Y,rt,ot.xfirst||ot,0,ot.n,O,ot.pr),ot.xfirst.xs0=0),ot):(ot.data={s:Y+rt},ot.rxp={},ot.s=Y,ot.c=rt,ot.r=O,ot)):(ot["xs"+Ct]+=Y+(it||""),ot)};var Kr=function(L,Y){Y=Y||{},this.p=Y.prefix&&Jt(L)||L,A[L]=A[this.p]=this,this.format=Y.formatter||yi(Y.defaultValue,Y.color,Y.collapsible,Y.multi),Y.parser&&(this.parse=Y.parser),this.clrs=Y.color,this.multi=Y.multi,this.keyword=Y.keyword,this.dflt=Y.defaultValue,this.pr=Y.priority||0},Oi=Oe._registerComplexSpecialProp=function(L,Y,rt){typeof Y!="object"&&(Y={parser:rt});var it,O=L.split(","),Mt=Y.defaultValue;for(rt=rt||[Mt],it=0;it<O.length;it++)Y.prefix=it===0&&Y.prefix,Y.defaultValue=rt[it]||Mt,new Kr(O[it],Y)},fo=Oe._registerPluginProp=function(L){if(!A[L]){var Y=L.charAt(0).toUpperCase()+L.substr(1)+"Plugin";Oi(L,{parser:function(rt,it,O,Mt,ot,Ct,Ht){var It=D.com.greensock.plugins[Y];return It?(It._cssRegister(),A[O].parse(rt,it,O,Mt,ot,Ct,Ht)):(hn("Error: "+Y+" js file not loaded."),ot)}})}};F=Kr.prototype,F.parseComplex=function(L,Y,rt,it,O,Mt){var ot,Ct,Ht,It,Tt,le,oe=this.keyword;if(this.multi&&(ge.test(rt)||ge.test(Y)?(Ct=Y.replace(ge,"|").split("|"),Ht=rt.replace(ge,"|").split("|")):oe&&(Ct=[Y],Ht=[rt])),Ht){for(It=Ht.length>Ct.length?Ht.length:Ct.length,ot=0;It>ot;ot++)Y=Ct[ot]=Ct[ot]||this.dflt,rt=Ht[ot]=Ht[ot]||this.dflt,oe&&(Tt=Y.indexOf(oe),le=rt.indexOf(oe),Tt!==le&&(le===-1?Ct[ot]=Ct[ot].split(oe).join(""):Tt===-1&&(Ct[ot]+=" "+oe)));Y=Ct.join(", "),rt=Ht.join(", ")}return Xn(L,this.p,Y,rt,this.clrs,this.dflt,it,this.pr,O,Mt)},F.parse=function(L,Y,rt,it,O,Mt,ot){return this.parseComplex(L.style,this.format(ct(L,this.p,H,!1,this.dflt)),this.format(Y),O,Mt)},P.registerSpecialProp=function(L,Y,rt){Oi(L,{parser:function(it,O,Mt,ot,Ct,Ht,It){var Tt=new Ei(it,Mt,0,0,Ct,2,Mt,!1,rt);return Tt.plugin=Ht,Tt.setRatio=Y(it,O,ot._tween,Mt),Tt},priority:rt})},P.useSVGTransformAttr=!0;var Or,Ea="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),gn=Jt("transform"),hs=Ji+"transform",Ro=Jt("transformOrigin"),ir=Jt("perspective")!==null,us=Oe.Transform=function(){this.perspective=parseFloat(P.defaultTransformPerspective)||0,this.force3D=P.defaultForce3D!==!1&&ir?P.defaultForce3D||"auto":!1},Vs=on.SVGElement,ba=function(L,Y,rt){var it,O=xe.createElementNS("http://www.w3.org/2000/svg",L),Mt=/([a-z])([A-Z])/g;for(it in rt)O.setAttributeNS(null,it.replace(Mt,"$1-$2").toLowerCase(),rt[it]);return Y.appendChild(O),O},Ir=xe.documentElement||{},tl=function(){var L,Y,rt,it=E||/Android/i.test(Ge)&&!on.chrome;return xe.createElementNS&&!it&&(L=ba("svg",Ir),Y=ba("rect",L,{width:100,height:50,x:100}),rt=Y.getBoundingClientRect().width,Y.style[Ro]="50% 50%",Y.style[gn]="scaleX(0.5)",it=rt===Y.getBoundingClientRect().width&&!(B&&ir),Ir.removeChild(L)),it}(),cs=function(L,Y,rt,it,O,Mt){var ot,Ct,Ht,It,Tt,le,oe,te,ve,he,je,He,ci,Be,ye=L._gsTransform,ke=ps(L,!0);ye&&(ci=ye.xOrigin,Be=ye.yOrigin),(!it||(ot=it.split(" ")).length<2)&&(oe=L.getBBox(),oe.x===0&&oe.y===0&&oe.width+oe.height===0&&(oe={x:parseFloat(L.hasAttribute("x")?L.getAttribute("x"):L.hasAttribute("cx")?L.getAttribute("cx"):0)||0,y:parseFloat(L.hasAttribute("y")?L.getAttribute("y"):L.hasAttribute("cy")?L.getAttribute("cy"):0)||0,width:0,height:0}),Y=K(Y).split(" "),ot=[(Y[0].indexOf("%")!==-1?parseFloat(Y[0])/100*oe.width:parseFloat(Y[0]))+oe.x,(Y[1].indexOf("%")!==-1?parseFloat(Y[1])/100*oe.height:parseFloat(Y[1]))+oe.y]),rt.xOrigin=It=parseFloat(ot[0]),rt.yOrigin=Tt=parseFloat(ot[1]),it&&ke!==fs&&(le=ke[0],oe=ke[1],te=ke[2],ve=ke[3],he=ke[4],je=ke[5],He=le*ve-oe*te,He&&(Ct=It*(ve/He)+Tt*(-te/He)+(te*je-ve*he)/He,Ht=It*(-oe/He)+Tt*(le/He)-(le*je-oe*he)/He,It=rt.xOrigin=ot[0]=Ct,Tt=rt.yOrigin=ot[1]=Ht)),ye&&(Mt&&(rt.xOffset=ye.xOffset,rt.yOffset=ye.yOffset,ye=rt),O||O!==!1&&P.defaultSmoothOrigin!==!1?(Ct=It-ci,Ht=Tt-Be,ye.xOffset+=Ct*ke[0]+Ht*ke[2]-Ct,ye.yOffset+=Ct*ke[1]+Ht*ke[3]-Ht):ye.xOffset=ye.yOffset=0),Mt||L.setAttribute("data-svg-origin",ot.join(" "))},Ws=function(L){var Y,rt=Zt("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),it=this.parentNode,O=this.nextSibling,Mt=this.style.cssText;if(Ir.appendChild(rt),rt.appendChild(this),this.style.display="block",L)try{Y=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Ws}catch{}else this._originalGetBBox&&(Y=this._originalGetBBox());return O?it.insertBefore(this,O):it.appendChild(this),Ir.removeChild(rt),this.style.cssText=Mt,Y},Dr=function(L){try{return L.getBBox()}catch{return Ws.call(L,!0)}},js=function(L){return!(!Vs||!L.getCTM||L.parentNode&&!L.ownerSVGElement||!Dr(L))},fs=[1,0,0,1,0,0],ps=function(L,Y){var rt,it,O,Mt,ot,Ct,Ht=L._gsTransform||new us,It=1e5,Tt=L.style;if(gn?it=ct(L,hs,null,!0):L.currentStyle&&(it=L.currentStyle.filter.match(Pt),it=it&&it.length===4?[it[0].substr(4),Number(it[2].substr(4)),Number(it[1].substr(4)),it[3].substr(4),Ht.x||0,Ht.y||0].join(","):""),rt=!it||it==="none"||it==="matrix(1, 0, 0, 1, 0, 0)",!gn||!(Ct=!Wt(L)||Wt(L).display==="none")&&L.parentNode||(Ct&&(Mt=Tt.display,Tt.display="block"),L.parentNode||(ot=1,Ir.appendChild(L)),it=ct(L,hs,null,!0),rt=!it||it==="none"||it==="matrix(1, 0, 0, 1, 0, 0)",Mt?Tt.display=Mt:Ct&&Oo(Tt,"display"),ot&&Ir.removeChild(L)),(Ht.svg||L.getCTM&&js(L))&&(rt&&(Tt[gn]+"").indexOf("matrix")!==-1&&(it=Tt[gn],rt=0),O=L.getAttribute("transform"),rt&&O&&(O=L.transform.baseVal.consolidate().matrix,it="matrix("+O.a+","+O.b+","+O.c+","+O.d+","+O.e+","+O.f+")",rt=0)),rt)return fs;for(O=(it||"").match(g)||[],nn=O.length;--nn>-1;)Mt=Number(O[nn]),O[nn]=(ot=Mt-(Mt|=0))?(ot*It+(0>ot?-.5:.5)|0)/It+Mt:Mt;return Y&&O.length>6?[O[0],O[1],O[4],O[5],O[12],O[13]]:O},zr=Oe.getTransform=function(L,Y,rt,it){if(L._gsTransform&&rt&&!it)return L._gsTransform;var O,Mt,ot,Ct,Ht,It,Tt=rt?L._gsTransform||new us:new us,le=Tt.scaleX<0,oe=2e-5,te=1e5,ve=ir&&(parseFloat(ct(L,Ro,Y,!1,"0 0 0").split(" ")[2])||Tt.zOrigin)||0,he=parseFloat(P.defaultTransformPerspective)||0;if(Tt.svg=!(!L.getCTM||!js(L)),Tt.svg&&(cs(L,ct(L,Ro,Y,!1,"50% 50%")+"",Tt,L.getAttribute("data-svg-origin")),Or=P.useSVGTransformAttr||tl),O=ps(L),O!==fs){if(O.length===16){var je,He,ci,Be,ye,ke=O[0],ce=O[1],mi=O[2],Ce=O[3],_e=O[4],Le=O[5],vn=O[6],zn=O[7],Ii=O[8],Di=O[9],Fi=O[10],Ki=O[12],Qi=O[13],sn=O[14],an=O[11],Ui=Math.atan2(vn,Fi);Tt.zOrigin&&(sn=-Tt.zOrigin,Ki=Ii*sn-O[12],Qi=Di*sn-O[13],sn=Fi*sn+Tt.zOrigin-O[14]),Tt.rotationX=Ui*Dt,Ui&&(Be=Math.cos(-Ui),ye=Math.sin(-Ui),je=_e*Be+Ii*ye,He=Le*Be+Di*ye,ci=vn*Be+Fi*ye,Ii=_e*-ye+Ii*Be,Di=Le*-ye+Di*Be,Fi=vn*-ye+Fi*Be,an=zn*-ye+an*Be,_e=je,Le=He,vn=ci),Ui=Math.atan2(-mi,Fi),Tt.rotationY=Ui*Dt,Ui&&(Be=Math.cos(-Ui),ye=Math.sin(-Ui),je=ke*Be-Ii*ye,He=ce*Be-Di*ye,ci=mi*Be-Fi*ye,Di=ce*ye+Di*Be,Fi=mi*ye+Fi*Be,an=Ce*ye+an*Be,ke=je,ce=He,mi=ci),Ui=Math.atan2(ce,ke),Tt.rotation=Ui*Dt,Ui&&(Be=Math.cos(Ui),ye=Math.sin(Ui),je=ke*Be+ce*ye,He=_e*Be+Le*ye,ci=Ii*Be+Di*ye,ce=ce*Be-ke*ye,Le=Le*Be-_e*ye,Di=Di*Be-Ii*ye,ke=je,_e=He,Ii=ci),Tt.rotationX&&Math.abs(Tt.rotationX)+Math.abs(Tt.rotation)>359.9&&(Tt.rotationX=Tt.rotation=0,Tt.rotationY=180-Tt.rotationY),Ui=Math.atan2(_e,Le),Tt.scaleX=(Math.sqrt(ke*ke+ce*ce+mi*mi)*te+.5|0)/te,Tt.scaleY=(Math.sqrt(Le*Le+vn*vn)*te+.5|0)/te,Tt.scaleZ=(Math.sqrt(Ii*Ii+Di*Di+Fi*Fi)*te+.5|0)/te,ke/=Tt.scaleX,_e/=Tt.scaleY,ce/=Tt.scaleX,Le/=Tt.scaleY,Math.abs(Ui)>oe?(Tt.skewX=Ui*Dt,_e=0,Tt.skewType!=="simple"&&(Tt.scaleY*=1/Math.cos(Ui))):Tt.skewX=0,Tt.perspective=an?1/(0>an?-an:an):0,Tt.x=Ki,Tt.y=Qi,Tt.z=sn,Tt.svg&&(Tt.x-=Tt.xOrigin-(Tt.xOrigin*ke-Tt.yOrigin*_e),Tt.y-=Tt.yOrigin-(Tt.yOrigin*ce-Tt.xOrigin*Le))}else if(!ir||it||!O.length||Tt.x!==O[4]||Tt.y!==O[5]||!Tt.rotationX&&!Tt.rotationY){var zi=O.length>=6,Vi=zi?O[0]:1,gi=O[1]||0,Br=O[2]||0,Ln=zi?O[3]:1;Tt.x=O[4]||0,Tt.y=O[5]||0,ot=Math.sqrt(Vi*Vi+gi*gi),Ct=Math.sqrt(Ln*Ln+Br*Br),Ht=Vi||gi?Math.atan2(gi,Vi)*Dt:Tt.rotation||0,It=Br||Ln?Math.atan2(Br,Ln)*Dt+Ht:Tt.skewX||0,Tt.scaleX=ot,Tt.scaleY=Ct,Tt.rotation=Ht,Tt.skewX=It,ir&&(Tt.rotationX=Tt.rotationY=Tt.z=0,Tt.perspective=he,Tt.scaleZ=1),Tt.svg&&(Tt.x-=Tt.xOrigin-(Tt.xOrigin*Vi+Tt.yOrigin*Br),Tt.y-=Tt.yOrigin-(Tt.xOrigin*gi+Tt.yOrigin*Ln))}Math.abs(Tt.skewX)>90&&Math.abs(Tt.skewX)<270&&(le?(Tt.scaleX*=-1,Tt.skewX+=Tt.rotation<=0?180:-180,Tt.rotation+=Tt.rotation<=0?180:-180):(Tt.scaleY*=-1,Tt.skewX+=Tt.skewX<=0?180:-180)),Tt.zOrigin=ve;for(Mt in Tt)Tt[Mt]<oe&&Tt[Mt]>-oe&&(Tt[Mt]=0)}return rt&&(L._gsTransform=Tt,Tt.svg&&(Or&&L.style[gn]?ht.delayedCall(.001,function(){Oo(L.style,gn)}):!Or&&L.getAttribute("transform")&&ht.delayedCall(.001,function(){L.removeAttribute("transform")}))),Tt},Aa=function(L){var Y,rt,it=this.data,O=-it.rotation*Ft,Mt=O+it.skewX*Ft,ot=1e5,Ct=(Math.cos(O)*it.scaleX*ot|0)/ot,Ht=(Math.sin(O)*it.scaleX*ot|0)/ot,It=(Math.sin(Mt)*-it.scaleY*ot|0)/ot,Tt=(Math.cos(Mt)*it.scaleY*ot|0)/ot,le=this.t.style,oe=this.t.currentStyle;if(oe){rt=Ht,Ht=-It,It=-rt,Y=oe.filter,le.filter="";var te,ve,he=this.t.offsetWidth,je=this.t.offsetHeight,He=oe.position!=="absolute",ci="progid:DXImageTransform.Microsoft.Matrix(M11="+Ct+", M12="+Ht+", M21="+It+", M22="+Tt,Be=it.x+he*it.xPercent/100,ye=it.y+je*it.yPercent/100;if(it.ox!=null&&(te=(it.oxp?he*it.ox*.01:it.ox)-he/2,ve=(it.oyp?je*it.oy*.01:it.oy)-je/2,Be+=te-(te*Ct+ve*Ht),ye+=ve-(te*It+ve*Tt)),He?(te=he/2,ve=je/2,ci+=", Dx="+(te-(te*Ct+ve*Ht)+Be)+", Dy="+(ve-(te*It+ve*Tt)+ye)+")"):ci+=", sizingMethod='auto expand')",Y.indexOf("DXImageTransform.Microsoft.Matrix(")!==-1?le.filter=Y.replace(Rt,ci):le.filter=ci+" "+Y,(L===0||L===1)&&Ct===1&&Ht===0&&It===0&&Tt===1&&(He&&ci.indexOf("Dx=0, Dy=0")===-1||j.test(Y)&&parseFloat(RegExp.$1)!==100||Y.indexOf(Y.indexOf("Alpha"))===-1&&le.removeAttribute("filter")),!He){var ke,ce,mi,Ce=8>E?1:-1;for(te=it.ieOffsetX||0,ve=it.ieOffsetY||0,it.ieOffsetX=Math.round((he-((0>Ct?-Ct:Ct)*he+(0>Ht?-Ht:Ht)*je))/2+Be),it.ieOffsetY=Math.round((je-((0>Tt?-Tt:Tt)*je+(0>It?-It:It)*he))/2+ye),nn=0;4>nn;nn++)ce=X[nn],ke=oe[ce],rt=ke.indexOf("px")!==-1?parseFloat(ke):pt(this.t,ce,parseFloat(ke),ke.replace(z,""))||0,mi=rt!==it[ce]?2>nn?-it.ieOffsetX:-it.ieOffsetY:2>nn?te-it.ieOffsetX:ve-it.ieOffsetY,le[ce]=(it[ce]=Math.round(rt-mi*(nn===0||nn===2?1:Ce)))+"px"}}},el=Oe.set3DTransformRatio=Oe.setTransformRatio=function(L){var Y,rt,it,O,Mt,ot,Ct,Ht,It,Tt,le,oe,te,ve,he,je,He,ci,Be,ye,ke,ce,mi,Ce=this.data,_e=this.t.style,Le=Ce.rotation,vn=Ce.rotationX,zn=Ce.rotationY,Ii=Ce.scaleX,Di=Ce.scaleY,Fi=Ce.scaleZ,Ki=Ce.x,Qi=Ce.y,sn=Ce.z,an=Ce.svg,Ui=Ce.perspective,zi=Ce.force3D,Vi=Ce.skewY,gi=Ce.skewX;if(Vi&&(gi+=Vi,Le+=Vi),((L===1||L===0)&&zi==="auto"&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!zi)&&!sn&&!Ui&&!zn&&!vn&&Fi===1||Or&&an||!ir)return void(Le||gi||an?(Le*=Ft,ce=gi*Ft,mi=1e5,rt=Math.cos(Le)*Ii,Mt=Math.sin(Le)*Ii,it=Math.sin(Le-ce)*-Di,ot=Math.cos(Le-ce)*Di,ce&&Ce.skewType==="simple"&&(Y=Math.tan(ce-Vi*Ft),Y=Math.sqrt(1+Y*Y),it*=Y,ot*=Y,Vi&&(Y=Math.tan(Vi*Ft),Y=Math.sqrt(1+Y*Y),rt*=Y,Mt*=Y)),an&&(Ki+=Ce.xOrigin-(Ce.xOrigin*rt+Ce.yOrigin*it)+Ce.xOffset,Qi+=Ce.yOrigin-(Ce.xOrigin*Mt+Ce.yOrigin*ot)+Ce.yOffset,Or&&(Ce.xPercent||Ce.yPercent)&&(he=this.t.getBBox(),Ki+=.01*Ce.xPercent*he.width,Qi+=.01*Ce.yPercent*he.height),he=1e-6,he>Ki&&Ki>-he&&(Ki=0),he>Qi&&Qi>-he&&(Qi=0)),Be=(rt*mi|0)/mi+","+(Mt*mi|0)/mi+","+(it*mi|0)/mi+","+(ot*mi|0)/mi+","+Ki+","+Qi+")",an&&Or?this.t.setAttribute("transform","matrix("+Be):_e[gn]=(Ce.xPercent||Ce.yPercent?"translate("+Ce.xPercent+"%,"+Ce.yPercent+"%) matrix(":"matrix(")+Be):_e[gn]=(Ce.xPercent||Ce.yPercent?"translate("+Ce.xPercent+"%,"+Ce.yPercent+"%) matrix(":"matrix(")+Ii+",0,0,"+Di+","+Ki+","+Qi+")");if(B&&(he=1e-4,he>Ii&&Ii>-he&&(Ii=Fi=2e-5),he>Di&&Di>-he&&(Di=Fi=2e-5),!Ui||Ce.z||Ce.rotationX||Ce.rotationY||(Ui=0)),Le||gi)Le*=Ft,je=rt=Math.cos(Le),He=Mt=Math.sin(Le),gi&&(Le-=gi*Ft,je=Math.cos(Le),He=Math.sin(Le),Ce.skewType==="simple"&&(Y=Math.tan((gi-Vi)*Ft),Y=Math.sqrt(1+Y*Y),je*=Y,He*=Y,Ce.skewY&&(Y=Math.tan(Vi*Ft),Y=Math.sqrt(1+Y*Y),rt*=Y,Mt*=Y))),it=-He,ot=je;else{if(!(zn||vn||Fi!==1||Ui||an))return void(_e[gn]=(Ce.xPercent||Ce.yPercent?"translate("+Ce.xPercent+"%,"+Ce.yPercent+"%) translate3d(":"translate3d(")+Ki+"px,"+Qi+"px,"+sn+"px)"+(Ii!==1||Di!==1?" scale("+Ii+","+Di+")":""));rt=ot=1,it=Mt=0}Tt=1,O=Ct=Ht=It=le=oe=0,te=Ui?-1/Ui:0,ve=Ce.zOrigin,he=1e-6,ye=",",ke="0",Le=zn*Ft,Le&&(je=Math.cos(Le),He=Math.sin(Le),Ht=-He,le=te*-He,O=rt*He,Ct=Mt*He,Tt=je,te*=je,rt*=je,Mt*=je),Le=vn*Ft,Le&&(je=Math.cos(Le),He=Math.sin(Le),Y=it*je+O*He,ci=ot*je+Ct*He,It=Tt*He,oe=te*He,O=it*-He+O*je,Ct=ot*-He+Ct*je,Tt*=je,te*=je,it=Y,ot=ci),Fi!==1&&(O*=Fi,Ct*=Fi,Tt*=Fi,te*=Fi),Di!==1&&(it*=Di,ot*=Di,It*=Di,oe*=Di),Ii!==1&&(rt*=Ii,Mt*=Ii,Ht*=Ii,le*=Ii),(ve||an)&&(ve&&(Ki+=O*-ve,Qi+=Ct*-ve,sn+=Tt*-ve+ve),an&&(Ki+=Ce.xOrigin-(Ce.xOrigin*rt+Ce.yOrigin*it)+Ce.xOffset,Qi+=Ce.yOrigin-(Ce.xOrigin*Mt+Ce.yOrigin*ot)+Ce.yOffset),he>Ki&&Ki>-he&&(Ki=ke),he>Qi&&Qi>-he&&(Qi=ke),he>sn&&sn>-he&&(sn=0)),Be=Ce.xPercent||Ce.yPercent?"translate("+Ce.xPercent+"%,"+Ce.yPercent+"%) matrix3d(":"matrix3d(",Be+=(he>rt&&rt>-he?ke:rt)+ye+(he>Mt&&Mt>-he?ke:Mt)+ye+(he>Ht&&Ht>-he?ke:Ht),Be+=ye+(he>le&&le>-he?ke:le)+ye+(he>it&&it>-he?ke:it)+ye+(he>ot&&ot>-he?ke:ot),vn||zn||Fi!==1?(Be+=ye+(he>It&&It>-he?ke:It)+ye+(he>oe&&oe>-he?ke:oe)+ye+(he>O&&O>-he?ke:O),Be+=ye+(he>Ct&&Ct>-he?ke:Ct)+ye+(he>Tt&&Tt>-he?ke:Tt)+ye+(he>te&&te>-he?ke:te)+ye):Be+=",0,0,0,0,1,0,",Be+=Ki+ye+Qi+ye+sn+ye+(Ui?1+-sn/Ui:1)+")",_e[gn]=Be};F=us.prototype,F.x=F.y=F.z=F.skewX=F.skewY=F.rotation=F.rotationX=F.rotationY=F.zOrigin=F.xPercent=F.yPercent=F.xOffset=F.yOffset=0,F.scaleX=F.scaleY=F.scaleZ=1,Oi("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(L,Y,rt,it,O,Mt,ot){if(it._lastParsedTransform===ot)return O;it._lastParsedTransform=ot;var Ct,Ht=ot.scale&&typeof ot.scale=="function"?ot.scale:0;typeof ot[rt]=="function"&&(Ct=ot[rt],ot[rt]=Y),Ht&&(ot.scale=Ht(p,L));var It,Tt,le,oe,te,ve,he,je,He,ci=L._gsTransform,Be=L.style,ye=1e-6,ke=Ea.length,ce=ot,mi={},Ce="transformOrigin",_e=zr(L,H,!0,ce.parseTransform),Le=ce.transform&&(typeof ce.transform=="function"?ce.transform(p,b):ce.transform);if(_e.skewType=ce.skewType||_e.skewType||P.defaultSkewType,it._transform=_e,"rotationZ"in ce&&(ce.rotation=ce.rotationZ),Le&&typeof Le=="string"&&gn)Tt=ti.style,Tt[gn]=Le,Tt.display="block",Tt.position="absolute",Le.indexOf("%")!==-1&&(Tt.width=ct(L,"width"),Tt.height=ct(L,"height")),xe.body.appendChild(ti),It=zr(ti,null,!1),_e.skewType==="simple"&&(It.scaleY*=Math.cos(It.skewX*Ft)),_e.svg&&(ve=_e.xOrigin,he=_e.yOrigin,It.x-=_e.xOffset,It.y-=_e.yOffset,(ce.transformOrigin||ce.svgOrigin)&&(Le={},cs(L,K(ce.transformOrigin),Le,ce.svgOrigin,ce.smoothOrigin,!0),ve=Le.xOrigin,he=Le.yOrigin,It.x-=Le.xOffset-_e.xOffset,It.y-=Le.yOffset-_e.yOffset),(ve||he)&&(je=ps(ti,!0),It.x-=ve-(ve*je[0]+he*je[2]),It.y-=he-(ve*je[1]+he*je[3]))),xe.body.removeChild(ti),It.perspective||(It.perspective=_e.perspective),ce.xPercent!=null&&(It.xPercent=Gt(ce.xPercent,_e.xPercent)),ce.yPercent!=null&&(It.yPercent=Gt(ce.yPercent,_e.yPercent));else if(typeof ce=="object"){if(It={scaleX:Gt(ce.scaleX!=null?ce.scaleX:ce.scale,_e.scaleX),scaleY:Gt(ce.scaleY!=null?ce.scaleY:ce.scale,_e.scaleY),scaleZ:Gt(ce.scaleZ,_e.scaleZ),x:Gt(ce.x,_e.x),y:Gt(ce.y,_e.y),z:Gt(ce.z,_e.z),xPercent:Gt(ce.xPercent,_e.xPercent),yPercent:Gt(ce.yPercent,_e.yPercent),perspective:Gt(ce.transformPerspective,_e.perspective)},te=ce.directionalRotation,te!=null)if(typeof te=="object")for(Tt in te)ce[Tt]=te[Tt];else ce.rotation=te;typeof ce.x=="string"&&ce.x.indexOf("%")!==-1&&(It.x=0,It.xPercent=Gt(ce.x,_e.xPercent)),typeof ce.y=="string"&&ce.y.indexOf("%")!==-1&&(It.y=0,It.yPercent=Gt(ce.y,_e.yPercent)),It.rotation=Xt("rotation"in ce?ce.rotation:"shortRotation"in ce?ce.shortRotation+"_short":_e.rotation,_e.rotation,"rotation",mi),ir&&(It.rotationX=Xt("rotationX"in ce?ce.rotationX:"shortRotationX"in ce?ce.shortRotationX+"_short":_e.rotationX||0,_e.rotationX,"rotationX",mi),It.rotationY=Xt("rotationY"in ce?ce.rotationY:"shortRotationY"in ce?ce.shortRotationY+"_short":_e.rotationY||0,_e.rotationY,"rotationY",mi)),It.skewX=Xt(ce.skewX,_e.skewX),It.skewY=Xt(ce.skewY,_e.skewY)}for(ir&&ce.force3D!=null&&(_e.force3D=ce.force3D,oe=!0),le=_e.force3D||_e.z||_e.rotationX||_e.rotationY||It.z||It.rotationX||It.rotationY||It.perspective,le||ce.scale==null||(It.scaleZ=1);--ke>-1;)He=Ea[ke],Le=It[He]-_e[He],(Le>ye||-ye>Le||ce[He]!=null||kt[He]!=null)&&(oe=!0,O=new Ei(_e,He,_e[He],Le,O),He in mi&&(O.e=mi[He]),O.xs0=0,O.plugin=Mt,it._overwriteProps.push(O.n));return Le=ce.transformOrigin,_e.svg&&(Le||ce.svgOrigin)&&(ve=_e.xOffset,he=_e.yOffset,cs(L,K(Le),It,ce.svgOrigin,ce.smoothOrigin),O=Tr(_e,"xOrigin",(ci?_e:It).xOrigin,It.xOrigin,O,Ce),O=Tr(_e,"yOrigin",(ci?_e:It).yOrigin,It.yOrigin,O,Ce),(ve!==_e.xOffset||he!==_e.yOffset)&&(O=Tr(_e,"xOffset",ci?ve:_e.xOffset,_e.xOffset,O,Ce),O=Tr(_e,"yOffset",ci?he:_e.yOffset,_e.yOffset,O,Ce)),Le="0px 0px"),(Le||ir&&le&&_e.zOrigin)&&(gn?(oe=!0,He=Ro,Le=(Le||ct(L,He,H,!1,"50% 50%"))+"",O=new Ei(Be,He,0,0,O,-1,Ce),O.b=Be[He],O.plugin=Mt,ir?(Tt=_e.zOrigin,Le=Le.split(" "),_e.zOrigin=(Le.length>2&&(Tt===0||Le[2]!=="0px")?parseFloat(Le[2]):Tt)||0,O.xs0=O.e=Le[0]+" "+(Le[1]||"50%")+" 0px",O=new Ei(_e,"zOrigin",0,0,O,-1,O.n),O.b=Tt,O.xs0=O.e=_e.zOrigin):O.xs0=O.e=Le):K(Le+"",_e)),oe&&(it._transformType=_e.svg&&Or||!le&&this._transformType!==3?2:3),Ct&&(ot[rt]=Ct),Ht&&(ot.scale=Ht),O},prefix:!0}),Oi("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),Oi("borderRadius",{defaultValue:"0px",parser:function(L,Y,rt,it,O,Mt){Y=this.format(Y);var ot,Ct,Ht,It,Tt,le,oe,te,ve,he,je,He,ci,Be,ye,ke,ce=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],mi=L.style;for(ve=parseFloat(L.offsetWidth),he=parseFloat(L.offsetHeight),ot=Y.split(" "),Ct=0;Ct<ce.length;Ct++)this.p.indexOf("border")&&(ce[Ct]=Jt(ce[Ct])),Tt=It=ct(L,ce[Ct],H,!1,"0px"),Tt.indexOf(" ")!==-1&&(It=Tt.split(" "),Tt=It[0],It=It[1]),le=Ht=ot[Ct],oe=parseFloat(Tt),He=Tt.substr((oe+"").length),ci=le.charAt(1)==="=",ci?(te=parseInt(le.charAt(0)+"1",10),le=le.substr(2),te*=parseFloat(le),je=le.substr((te+"").length-(0>te?1:0))||""):(te=parseFloat(le),je=le.substr((te+"").length)),je===""&&(je=nt[rt]||He),je!==He&&(Be=pt(L,"borderLeft",oe,He),ye=pt(L,"borderTop",oe,He),je==="%"?(Tt=Be/ve*100+"%",It=ye/he*100+"%"):je==="em"?(ke=pt(L,"borderLeft",1,"em"),Tt=Be/ke+"em",It=ye/ke+"em"):(Tt=Be+"px",It=ye+"px"),ci&&(le=parseFloat(Tt)+te+je,Ht=parseFloat(It)+te+je)),O=Xn(mi,ce[Ct],Tt+" "+It,le+" "+Ht,!1,"0px",O);return O},prefix:!0,formatter:yi("0px 0px 0px 0px",!1,!0)}),Oi("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(L,Y,rt,it,O,Mt){return Xn(L.style,rt,this.format(ct(L,rt,H,!1,"0px 0px")),this.format(Y),!1,"0px",O)},prefix:!0,formatter:yi("0px 0px",!1,!0)}),Oi("backgroundPosition",{defaultValue:"0 0",parser:function(L,Y,rt,it,O,Mt){var ot,Ct,Ht,It,Tt,le,oe="background-position",te=H||Wt(L,null),ve=this.format((te?E?te.getPropertyValue(oe+"-x")+" "+te.getPropertyValue(oe+"-y"):te.getPropertyValue(oe):L.currentStyle.backgroundPositionX+" "+L.currentStyle.backgroundPositionY)||"0 0"),he=this.format(Y);if(ve.indexOf("%")!==-1!=(he.indexOf("%")!==-1)&&he.split(",").length<2&&(le=ct(L,"backgroundImage").replace(Et,""),le&&le!=="none")){for(ot=ve.split(" "),Ct=he.split(" "),ki.setAttribute("src",le),Ht=2;--Ht>-1;)ve=ot[Ht],It=ve.indexOf("%")!==-1,It!==(Ct[Ht].indexOf("%")!==-1)&&(Tt=Ht===0?L.offsetWidth-ki.width:L.offsetHeight-ki.height,ot[Ht]=It?parseFloat(ve)/100*Tt+"px":parseFloat(ve)/Tt*100+"%");ve=ot.join(" ")}return this.parseComplex(L.style,ve,he,O,Mt)},formatter:K}),Oi("backgroundSize",{defaultValue:"0 0",formatter:function(L){return L+="",L.substr(0,2)==="co"?L:K(L.indexOf(" ")===-1?L+" "+L:L)}}),Oi("perspective",{defaultValue:"0px",prefix:!0}),Oi("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),Oi("transformStyle",{prefix:!0}),Oi("backfaceVisibility",{prefix:!0}),Oi("userSelect",{prefix:!0}),Oi("margin",{parser:Si("marginTop,marginRight,marginBottom,marginLeft")}),Oi("padding",{parser:Si("paddingTop,paddingRight,paddingBottom,paddingLeft")}),Oi("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(L,Y,rt,it,O,Mt){var ot,Ct,Ht;return 9>E?(Ct=L.currentStyle,Ht=8>E?" ":",",ot="rect("+Ct.clipTop+Ht+Ct.clipRight+Ht+Ct.clipBottom+Ht+Ct.clipLeft+")",Y=this.format(Y).split(",").join(Ht)):(ot=this.format(ct(L,this.p,H,!1,this.dflt)),Y=this.format(Y)),this.parseComplex(L.style,ot,Y,O,Mt)}}),Oi("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),Oi("autoRound,strictUnits",{parser:function(L,Y,rt,it,O){return O}}),Oi("border",{defaultValue:"0px solid #000",parser:function(L,Y,rt,it,O,Mt){var ot=ct(L,"borderTopWidth",H,!1,"0px"),Ct=this.format(Y).split(" "),Ht=Ct[0].replace(z,"");return Ht!=="px"&&(ot=parseFloat(ot)/pt(L,"borderTopWidth",1,Ht)+Ht),this.parseComplex(L.style,this.format(ot+" "+ct(L,"borderTopStyle",H,!1,"solid")+" "+ct(L,"borderTopColor",H,!1,"#000")),Ct.join(" "),O,Mt)},color:!0,formatter:function(L){var Y=L.split(" ");return Y[0]+" "+(Y[1]||"solid")+" "+(L.match(we)||["#000"])[0]}}),Oi("borderWidth",{parser:Si("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),Oi("float,cssFloat,styleFloat",{parser:function(L,Y,rt,it,O,Mt){var ot=L.style,Ct="cssFloat"in ot?"cssFloat":"styleFloat";return new Ei(ot,Ct,0,0,O,-1,rt,!1,0,ot[Ct],Y)}});var il=function(L){var Y,rt=this.t,it=rt.filter||ct(this.data,"filter")||"",O=this.s+this.c*L|0;O===100&&(it.indexOf("atrix(")===-1&&it.indexOf("radient(")===-1&&it.indexOf("oader(")===-1?(rt.removeAttribute("filter"),Y=!ct(this.data,"filter")):(rt.filter=it.replace(ft,""),Y=!0)),Y||(this.xn1&&(rt.filter=it=it||"alpha(opacity="+O+")"),it.indexOf("pacity")===-1?O===0&&this.xn1||(rt.filter=it+" alpha(opacity="+O+")"):rt.filter=it.replace(j,"opacity="+O))};Oi("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(L,Y,rt,it,O,Mt){var ot=parseFloat(ct(L,"opacity",H,!1,"1")),Ct=L.style,Ht=rt==="autoAlpha";return typeof Y=="string"&&Y.charAt(1)==="="&&(Y=(Y.charAt(0)==="-"?-1:1)*parseFloat(Y.substr(2))+ot),Ht&&ot===1&&ct(L,"visibility",H)==="hidden"&&Y!==0&&(ot=0),di?O=new Ei(Ct,"opacity",ot,Y-ot,O):(O=new Ei(Ct,"opacity",100*ot,100*(Y-ot),O),O.xn1=Ht?1:0,Ct.zoom=1,O.type=2,O.b="alpha(opacity="+O.s+")",O.e="alpha(opacity="+(O.s+O.c)+")",O.data=L,O.plugin=Mt,O.setRatio=il),Ht&&(O=new Ei(Ct,"visibility",0,0,O,-1,null,!1,0,ot!==0?"inherit":"hidden",Y===0?"hidden":"inherit"),O.xs0="inherit",it._overwriteProps.push(O.n),it._overwriteProps.push(rt)),O}});var Oo=function(L,Y){Y&&(L.removeProperty?((Y.substr(0,2)==="ms"||Y.substr(0,6)==="webkit")&&(Y="-"+Y),L.removeProperty(Y.replace(Nt,"-$1").toLowerCase())):L.removeAttribute(Y))},Io=function(L){if(this.t._gsClassPT=this,L===1||L===0){this.t.setAttribute("class",L===0?this.b:this.e);for(var Y=this.data,rt=this.t.style;Y;)Y.v?rt[Y.p]=Y.v:Oo(rt,Y.p),Y=Y._next;L===1&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};Oi("className",{parser:function(L,Y,rt,it,O,Mt,ot){var Ct,Ht,It,Tt,le,oe=L.getAttribute("class")||"",te=L.style.cssText;if(O=it._classNamePT=new Ei(L,rt,0,0,O,2),O.setRatio=Io,O.pr=-11,d=!0,O.b=oe,Ht=ie(L,H),It=L._gsClassPT){for(Tt={},le=It.data;le;)Tt[le.p]=1,le=le._next;It.setRatio(1)}return L._gsClassPT=O,O.e=Y.charAt(1)!=="="?Y:oe.replace(new RegExp("(?:\\s|^)"+Y.substr(2)+"(?![\\w-])"),"")+(Y.charAt(0)==="+"?" "+Y.substr(2):""),L.setAttribute("class",O.e),Ct=Kt(L,Ht,ie(L),ot,Tt),L.setAttribute("class",oe),O.data=Ct.firstMPT,L.style.cssText=te,O=O.xfirst=it.parse(L,Ct.difs,O,Mt)}});var Pa=function(L){if((L===1||L===0)&&this.data._totalTime===this.data._totalDuration&&this.data.data!=="isFromStart"){var Y,rt,it,O,Mt,ot=this.t.style,Ct=A.transform.parse;if(this.e==="all")ot.cssText="",O=!0;else for(Y=this.e.split(" ").join("").split(","),it=Y.length;--it>-1;)rt=Y[it],A[rt]&&(A[rt].parse===Ct?O=!0:rt=rt==="transformOrigin"?Ro:A[rt].p),Oo(ot,rt);O&&(Oo(ot,gn),Mt=this.t._gsTransform,Mt&&(Mt.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(Oi("clearProps",{parser:function(L,Y,rt,it,O){return O=new Ei(L,rt,0,0,O,2),O.setRatio=Pa,O.e=Y,O.pr=-10,O.data=it._tween,d=!0,O}}),F="bezier,throwProps,physicsProps,physics2D".split(","),nn=F.length;nn--;)fo(F[nn]);F=P.prototype,F._firstPT=F._lastParsedTransform=F._transform=null,F._onInitTween=function(L,Y,rt,it){if(!L.nodeType)return!1;this._target=b=L,this._tween=rt,this._vars=Y,p=it,Z=Y.autoRound,d=!1,nt=Y.suffixMap||P.suffixMap,H=Wt(L,""),m=this._overwriteProps;var O,Mt,ot,Ct,Ht,It,Tt,le,oe,te=L.style;if(G&&te.zIndex===""&&(O=ct(L,"zIndex",H),(O==="auto"||O==="")&&this._addLazySet(te,"zIndex",0)),typeof Y=="string"&&(Ct=te.cssText,O=ie(L,H),te.cssText=Ct+";"+Y,O=Kt(L,O,ie(L)).difs,!di&<.test(Y)&&(O.opacity=parseFloat(RegExp.$1)),Y=O,te.cssText=Ct),Y.className?this._firstPT=Mt=A.className.parse(L,Y.className,"className",this,null,null,Y):this._firstPT=Mt=this.parse(L,Y,null),this._transformType){for(oe=this._transformType===3,gn?J&&(G=!0,te.zIndex===""&&(Tt=ct(L,"zIndex",H),(Tt==="auto"||Tt==="")&&this._addLazySet(te,"zIndex",0)),q&&this._addLazySet(te,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(oe?"visible":"hidden"))):te.zoom=1,ot=Mt;ot&&ot._next;)ot=ot._next;le=new Ei(L,"transform",0,0,null,2),this._linkCSSP(le,null,ot),le.setRatio=gn?el:Aa,le.data=this._transform||zr(L,H,!0),le.tween=rt,le.pr=-1,m.pop()}if(d){for(;Mt;){for(It=Mt._next,ot=Ct;ot&&ot.pr>Mt.pr;)ot=ot._next;(Mt._prev=ot?ot._prev:Ht)?Mt._prev._next=Mt:Ct=Mt,(Mt._next=ot)?ot._prev=Mt:Ht=Mt,Mt=It}this._firstPT=Ct}return!0},F.parse=function(L,Y,rt,it){var O,Mt,ot,Ct,Ht,It,Tt,le,oe,te,ve=L.style;for(O in Y){if(It=Y[O],typeof It=="function"&&(It=It(p,b)),Mt=A[O])rt=Mt.parse(L,It,O,this,rt,it,Y);else{if(O.substr(0,2)==="--"){this._tween._propLookup[O]=this._addTween.call(this._tween,L.style,"setProperty",Wt(L).getPropertyValue(O)+"",It+"",O,!1,O);continue}Ht=ct(L,O,H)+"",oe=typeof It=="string",O==="color"||O==="fill"||O==="stroke"||O.indexOf("Color")!==-1||oe&>.test(It)?(oe||(It=Re(It),It=(It.length>3?"rgba(":"rgb(")+It.join(",")+")"),rt=Xn(ve,O,Ht,It,!0,"transparent",rt,0,it)):oe&&ue.test(It)?rt=Xn(ve,O,Ht,It,!0,null,rt,0,it):(ot=parseFloat(Ht),Tt=ot||ot===0?Ht.substr((ot+"").length):"",(Ht===""||Ht==="auto")&&(O==="width"||O==="height"?(ot=et(L,O,H),Tt="px"):O==="left"||O==="top"?(ot=Lt(L,O,H),Tt="px"):(ot=O!=="opacity"?0:1,Tt="")),te=oe&&It.charAt(1)==="=",te?(Ct=parseInt(It.charAt(0)+"1",10),It=It.substr(2),Ct*=parseFloat(It),le=It.replace(z,"")):(Ct=parseFloat(It),le=oe?It.replace(z,""):""),le===""&&(le=O in nt?nt[O]:Tt),It=Ct||Ct===0?(te?Ct+ot:Ct)+le:Y[O],Tt!==le&&(le!==""||O==="lineHeight")&&(Ct||Ct===0)&&ot&&(ot=pt(L,O,ot,Tt),le==="%"?(ot/=pt(L,O,100,"%")/100,Y.strictUnits!==!0&&(Ht=ot+"%")):le==="em"||le==="rem"||le==="vw"||le==="vh"?ot/=pt(L,O,1,le):le!=="px"&&(Ct=pt(L,O,Ct,le),le="px"),te&&(Ct||Ct===0)&&(It=Ct+ot+le)),te&&(Ct+=ot),!ot&&ot!==0||!Ct&&Ct!==0?ve[O]!==void 0&&(It||It+""!="NaN"&&It!=null)?(rt=new Ei(ve,O,Ct||ot||0,0,rt,-1,O,!1,0,Ht,It),rt.xs0=It!=="none"||O!=="display"&&O.indexOf("Style")===-1?It:Ht):hn("invalid "+O+" tween value: "+Y[O]):(rt=new Ei(ve,O,ot,Ct-ot,rt,0,O,Z!==!1&&(le==="px"||O==="zIndex"),0,Ht,It),rt.xs0=le))}it&&rt&&!rt.plugin&&(rt.plugin=it)}return rt},F.setRatio=function(L){var Y,rt,it,O=this._firstPT,Mt=1e-6;if(L!==1||this._tween._time!==this._tween._duration&&this._tween._time!==0)if(L||this._tween._time!==this._tween._duration&&this._tween._time!==0||this._tween._rawPrevTime===-1e-6)for(;O;){if(Y=O.c*L+O.s,O.r?Y=O.r(Y):Mt>Y&&Y>-Mt&&(Y=0),O.type)if(O.type===1)if(it=O.l,it===2)O.t[O.p]=O.xs0+Y+O.xs1+O.xn1+O.xs2;else if(it===3)O.t[O.p]=O.xs0+Y+O.xs1+O.xn1+O.xs2+O.xn2+O.xs3;else if(it===4)O.t[O.p]=O.xs0+Y+O.xs1+O.xn1+O.xs2+O.xn2+O.xs3+O.xn3+O.xs4;else if(it===5)O.t[O.p]=O.xs0+Y+O.xs1+O.xn1+O.xs2+O.xn2+O.xs3+O.xn3+O.xs4+O.xn4+O.xs5;else{for(rt=O.xs0+Y+O.xs1,it=1;it<O.l;it++)rt+=O["xn"+it]+O["xs"+(it+1)];O.t[O.p]=rt}else O.type===-1?O.t[O.p]=O.xs0:O.setRatio&&O.setRatio(L);else O.t[O.p]=Y+O.xs0;O=O._next}else for(;O;)O.type!==2?O.t[O.p]=O.b:O.setRatio(L),O=O._next;else for(;O;){if(O.type!==2)if(O.r&&O.type!==-1)if(Y=O.r(O.s+O.c),O.type){if(O.type===1){for(it=O.l,rt=O.xs0+Y+O.xs1,it=1;it<O.l;it++)rt+=O["xn"+it]+O["xs"+(it+1)];O.t[O.p]=rt}}else O.t[O.p]=Y+O.xs0;else O.t[O.p]=O.e;else O.setRatio(L);O=O._next}},F._enableTransforms=function(L){this._transform=this._transform||zr(this._target,H,!0),this._transformType=this._transform.svg&&Or||!L&&this._transformType!==3?2:3};var Ca=function(L){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};F._addLazySet=function(L,Y,rt){var it=this._firstPT=new Ei(L,Y,0,0,this._firstPT,2);it.e=rt,it.setRatio=Ca,it.data=this},F._linkCSSP=function(L,Y,rt,it){return L&&(Y&&(Y._prev=L),L._next&&(L._next._prev=L._prev),L._prev?L._prev._next=L._next:this._firstPT===L&&(this._firstPT=L._next,it=!0),rt?rt._next=L:it||this._firstPT!==null||(this._firstPT=L),L._next=Y,L._prev=rt),L},F._mod=function(L){for(var Y=this._firstPT;Y;)typeof L[Y.p]=="function"&&(Y.r=L[Y.p]),Y=Y._next},F._kill=function(L){var Y,rt,it,O=L;if(L.autoAlpha||L.alpha){O={};for(rt in L)O[rt]=L[rt];O.opacity=1,O.autoAlpha&&(O.visibility=1)}for(L.className&&(Y=this._classNamePT)&&(it=Y.xfirst,it&&it._prev?this._linkCSSP(it._prev,Y._next,it._prev._prev):it===this._firstPT&&(this._firstPT=Y._next),Y._next&&this._linkCSSP(Y._next,Y._next._next,it._prev),this._classNamePT=null),Y=this._firstPT;Y;)Y.plugin&&Y.plugin!==rt&&Y.plugin._kill&&(Y.plugin._kill(L),rt=Y.plugin),Y=Y._next;return T.prototype._kill.call(this,O)};var Mr=function(L,Y,rt){var it,O,Mt,ot;if(L.slice)for(O=L.length;--O>-1;)Mr(L[O],Y,rt);else for(it=L.childNodes,O=it.length;--O>-1;)Mt=it[O],ot=Mt.type,Mt.style&&(Y.push(ie(Mt)),rt&&rt.push(Mt)),ot!==1&&ot!==9&&ot!==11||!Mt.childNodes.length||Mr(Mt,Y,rt)};return P.cascadeTo=function(L,Y,rt){var it,O,Mt,ot,Ct=ht.to(L,Y,rt),Ht=[Ct],It=[],Tt=[],le=[],oe=ht._internals.reservedProps;for(L=Ct._targets||Ct.target,Mr(L,It,le),Ct.render(Y,!0,!0),Mr(L,Tt),Ct.render(0,!0,!0),Ct._enabled(!0),it=le.length;--it>-1;)if(O=Kt(le[it],It[it],Tt[it]),O.firstMPT){O=O.difs;for(Mt in rt)oe[Mt]&&(O[Mt]=rt[Mt]);ot={};for(Mt in O)ot[Mt]=It[it][Mt];Ht.push(ht.fromTo(le[it],Y,ot,O))}return Ht},T.activate([P]),P},!0),function(){var T=on._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(H,m,P){return this._tween=P,!0}}),ht=function(H){var m=1>H?Math.pow(10,(H+"").length-2):1;return function(P){return(Math.round(P/H)*H*m|0)/m}},d=function(H,m){for(;H;)H.f||H.blob||(H.m=m||Math.round),H=H._next},nt=T.prototype;nt._onInitAllProps=function(){var H,m,P,D,A=this._tween,F=A.vars.roundProps,Z={},G=A._propLookup.roundProps;if(typeof F!="object"||F.push)for(typeof F=="string"&&(F=F.split(",")),P=F.length;--P>-1;)Z[F[P]]=Math.round;else for(D in F)Z[D]=ht(F[D]);for(D in Z)for(H=A._firstPT;H;)m=H._next,H.pg?H.t._mod(Z):H.n===D&&(H.f===2&&H.t?d(H.t._firstPT,Z[D]):(this._add(H.t,D,H.s,H.c,Z[D]),m&&(m._prev=H._prev),H._prev?H._prev._next=m:A._firstPT===H&&(A._firstPT=m),H._next=H._prev=null,A._propLookup[D]=G)),H=m;return!1},nt._add=function(H,m,P,D,A){this._addTween(H,m,P,P+D,m,A||Math.round),this._overwriteProps.push(m)}}(),function(){on._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(T,ht,d,nt){var H,m;if(typeof T.setAttribute!="function")return!1;for(H in ht)m=ht[H],typeof m=="function"&&(m=m(nt,T)),this._addTween(T,"setAttribute",T.getAttribute(H)+"",m+"",H,!1,H),this._overwriteProps.push(H);return!0}})}(),on._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(T,ht,d,nt){typeof ht!="object"&&(ht={rotation:ht}),this.finals={};var H,m,P,D,A,F,Z=ht.useRadians===!0?2*Math.PI:360,G=1e-6;for(H in ht)H!=="useRadians"&&(D=ht[H],typeof D=="function"&&(D=D(nt,T)),F=(D+"").split("_"),m=F[0],P=parseFloat(typeof T[H]!="function"?T[H]:T[H.indexOf("set")||typeof T["get"+H.substr(3)]!="function"?H:"get"+H.substr(3)]()),D=this.finals[H]=typeof m=="string"&&m.charAt(1)==="="?P+parseInt(m.charAt(0)+"1",10)*Number(m.substr(2)):Number(m)||0,A=D-P,F.length&&(m=F.join("_"),m.indexOf("short")!==-1&&(A%=Z,A!==A%(Z/2)&&(A=0>A?A+Z:A-Z)),m.indexOf("_cw")!==-1&&0>A?A=(A+9999999999*Z)%Z-(A/Z|0)*Z:m.indexOf("ccw")!==-1&&A>0&&(A=(A-9999999999*Z)%Z-(A/Z|0)*Z)),(A>G||-G>A)&&(this._addTween(T,H,P,P+A,H),this._overwriteProps.push(H)));return!0},set:function(T){var ht;if(T!==1)this._super.setRatio.call(this,T);else for(ht=this._firstPT;ht;)ht.f?ht.t[ht.p](this.finals[ht.p]):ht.t[ht.p]=this.finals[ht.p],ht=ht._next}})._autoCSS=!0,on._gsDefine("easing.Back",["easing.Ease"],function(T){var ht,d,nt,H,m=on.GreenSockGlobals||on,P=m.com.greensock,D=2*Math.PI,A=Math.PI/2,F=P._class,Z=function(g,S){var x=F("easing."+g,function(){},!0),U=x.prototype=new T;return U.constructor=x,U.getRatio=S,x},G=T.register||function(){},J=function(g,S,x,U,z){var j=F("easing."+g,{easeOut:new S,easeIn:new x,easeInOut:new U},!0);return G(j,g),j},B=function(g,S,x){this.t=g,this.v=S,x&&(this.next=x,x.prev=this,this.c=x.v-S,this.gap=x.t-g)},q=function(g,S){var x=F("easing."+g,function(z){this._p1=z||z===0?z:1.70158,this._p2=1.525*this._p1},!0),U=x.prototype=new T;return U.constructor=x,U.getRatio=S,U.config=function(z){return new x(z)},x},E=J("Back",q("BackOut",function(g){return(g-=1)*g*((this._p1+1)*g+this._p1)+1}),q("BackIn",function(g){return g*g*((this._p1+1)*g-this._p1)}),q("BackInOut",function(g){return(g*=2)<1?.5*g*g*((this._p2+1)*g-this._p2):.5*((g-=2)*g*((this._p2+1)*g+this._p2)+2)})),b=F("easing.SlowMo",function(g,S,x){S=S||S===0?S:.7,g==null?g=.7:g>1&&(g=1),this._p=g!==1?S:0,this._p1=(1-g)/2,this._p2=g,this._p3=this._p1+this._p2,this._calcEnd=x===!0},!0),p=b.prototype=new T;return p.constructor=b,p.getRatio=function(g){var S=g+(.5-g)*this._p;return g<this._p1?this._calcEnd?1-(g=1-g/this._p1)*g:S-(g=1-g/this._p1)*g*g*g*S:g>this._p3?this._calcEnd?g===1?0:1-(g=(g-this._p3)/this._p1)*g:S+(g-S)*(g=(g-this._p3)/this._p1)*g*g*g:this._calcEnd?1:S},b.ease=new b(.7,.7),p.config=b.config=function(g,S,x){return new b(g,S,x)},ht=F("easing.SteppedEase",function(g,S){g=g||1,this._p1=1/g,this._p2=g+(S?0:1),this._p3=S?1:0},!0),p=ht.prototype=new T,p.constructor=ht,p.getRatio=function(g){return 0>g?g=0:g>=1&&(g=.999999999),((this._p2*g|0)+this._p3)*this._p1},p.config=ht.config=function(g,S){return new ht(g,S)},d=F("easing.ExpoScaleEase",function(g,S,x){this._p1=Math.log(S/g),this._p2=S-g,this._p3=g,this._ease=x},!0),p=d.prototype=new T,p.constructor=d,p.getRatio=function(g){return this._ease&&(g=this._ease.getRatio(g)),(this._p3*Math.exp(this._p1*g)-this._p3)/this._p2},p.config=d.config=function(g,S,x){return new d(g,S,x)},nt=F("easing.RoughEase",function(g){g=g||{};for(var S,x,U,z,j,lt,ft=g.taper||"none",gt=[],Nt=0,at=0|(g.points||20),Et=at,I=g.randomize!==!1,zt=g.clamp===!0,Pt=g.template instanceof T?g.template:null,Rt=typeof g.strength=="number"?.4*g.strength:.4;--Et>-1;)S=I?Math.random():1/at*Et,x=Pt?Pt.getRatio(S):S,ft==="none"?U=Rt:ft==="out"?(z=1-S,U=z*z*Rt):ft==="in"?U=S*S*Rt:.5>S?(z=2*S,U=z*z*.5*Rt):(z=2*(1-S),U=z*z*.5*Rt),I?x+=Math.random()*U-.5*U:Et%2?x+=.5*U:x-=.5*U,zt&&(x>1?x=1:0>x&&(x=0)),gt[Nt++]={x:S,y:x};for(gt.sort(function(ge,ue){return ge.x-ue.x}),lt=new B(1,1,null),Et=at;--Et>-1;)j=gt[Et],lt=new B(j.x,j.y,lt);this._prev=new B(0,0,lt.t!==0?lt:lt.next)},!0),p=nt.prototype=new T,p.constructor=nt,p.getRatio=function(g){var S=this._prev;if(g>S.t){for(;S.next&&g>=S.t;)S=S.next;S=S.prev}else for(;S.prev&&g<=S.t;)S=S.prev;return this._prev=S,S.v+(g-S.t)/S.gap*S.c},p.config=function(g){return new nt(g)},nt.ease=new nt,J("Bounce",Z("BounceOut",function(g){return 1/2.75>g?7.5625*g*g:2/2.75>g?7.5625*(g-=1.5/2.75)*g+.75:2.5/2.75>g?7.5625*(g-=2.25/2.75)*g+.9375:7.5625*(g-=2.625/2.75)*g+.984375}),Z("BounceIn",function(g){return(g=1-g)<1/2.75?1-7.5625*g*g:2/2.75>g?1-(7.5625*(g-=1.5/2.75)*g+.75):2.5/2.75>g?1-(7.5625*(g-=2.25/2.75)*g+.9375):1-(7.5625*(g-=2.625/2.75)*g+.984375)}),Z("BounceInOut",function(g){var S=.5>g;return g=S?1-2*g:2*g-1,g=1/2.75>g?7.5625*g*g:2/2.75>g?7.5625*(g-=1.5/2.75)*g+.75:2.5/2.75>g?7.5625*(g-=2.25/2.75)*g+.9375:7.5625*(g-=2.625/2.75)*g+.984375,S?.5*(1-g):.5*g+.5})),J("Circ",Z("CircOut",function(g){return Math.sqrt(1-(g-=1)*g)}),Z("CircIn",function(g){return-(Math.sqrt(1-g*g)-1)}),Z("CircInOut",function(g){return(g*=2)<1?-.5*(Math.sqrt(1-g*g)-1):.5*(Math.sqrt(1-(g-=2)*g)+1)})),H=function(g,S,x){var U=F("easing."+g,function(j,lt){this._p1=j>=1?j:1,this._p2=(lt||x)/(1>j?j:1),this._p3=this._p2/D*(Math.asin(1/this._p1)||0),this._p2=D/this._p2},!0),z=U.prototype=new T;return z.constructor=U,z.getRatio=S,z.config=function(j,lt){return new U(j,lt)},U},J("Elastic",H("ElasticOut",function(g){return this._p1*Math.pow(2,-10*g)*Math.sin((g-this._p3)*this._p2)+1},.3),H("ElasticIn",function(g){return-(this._p1*Math.pow(2,10*(g-=1))*Math.sin((g-this._p3)*this._p2))},.3),H("ElasticInOut",function(g){return(g*=2)<1?-.5*(this._p1*Math.pow(2,10*(g-=1))*Math.sin((g-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(g-=1))*Math.sin((g-this._p3)*this._p2)*.5+1},.45)),J("Expo",Z("ExpoOut",function(g){return 1-Math.pow(2,-10*g)}),Z("ExpoIn",function(g){return Math.pow(2,10*(g-1))-.001}),Z("ExpoInOut",function(g){return(g*=2)<1?.5*Math.pow(2,10*(g-1)):.5*(2-Math.pow(2,-10*(g-1)))})),J("Sine",Z("SineOut",function(g){return Math.sin(g*A)}),Z("SineIn",function(g){return-Math.cos(g*A)+1}),Z("SineInOut",function(g){return-.5*(Math.cos(Math.PI*g)-1)})),F("easing.EaseLookup",{find:function(g){return T.map[g]}},!0),G(m.SlowMo,"SlowMo","ease,"),G(nt,"RoughEase","ease,"),G(ht,"SteppedEase","ease,"),E},!0)}),on._gsDefine&&on._gsQueue.pop()(),function(T,ht){var d={},nt=T.document,H=T.GreenSockGlobals=T.GreenSockGlobals||T,m=H[ht];if(m)return typeof module<"u"&&module.exports&&(module.exports=m),m;var P,D,A,F,Z,G=function(w){var X,et=w.split("."),K=H;for(X=0;X<et.length;X++)K[et[X]]=K=K[et[X]]||{};return K},J=G("com.greensock"),B=1e-10,q=function(w){var X,et=[],K=w.length;for(X=0;X!==K;et.push(w[X++]));return et},E=function(){},b=function(){var w=Object.prototype.toString,X=w.call([]);return function(et){return et!=null&&(et instanceof Array||typeof et=="object"&&!!et.push&&w.call(et)===X)}}(),p={},g=function(w,X,et,K){this.sc=p[w]?p[w].sc:[],p[w]=this,this.gsClass=null,this.func=et;var vt=[];this.check=function(Gt){for(var Xt,jt,Ne,Re,de=X.length,we=de;--de>-1;)(Xt=p[X[de]]||new g(X[de],[])).gsClass?(vt[de]=Xt.gsClass,we--):Gt&&Xt.sc.push(this);if(we===0&&et){if(jt=("com.greensock."+w).split("."),Ne=jt.pop(),Re=G(jt.join("."))[Ne]=this.gsClass=et.apply(et,vt),K)if(H[Ne]=d[Ne]=Re,typeof module<"u"&&module.exports)if(w===ht){module.exports=d[ht]=Re;for(de in d)Re[de]=d[de]}else d[ht]&&(d[ht][Ne]=Re);else typeof define=="function"&&define.amd&&define((T.GreenSockAMDPath?T.GreenSockAMDPath+"/":"")+w.split(".").pop(),[],function(){return Re});for(de=0;de<this.sc.length;de++)this.sc[de].check()}},this.check(!0)},S=T._gsDefine=function(w,X,et,K){return new g(w,X,et,K)},x=J._class=function(w,X,et){return X=X||function(){},S(w,[],function(){return X},et),X};S.globals=H;var U=[0,0,1,1],z=x("easing.Ease",function(w,X,et,K){this._func=w,this._type=et||0,this._power=K||0,this._params=X?U.concat(X):U},!0),j=z.map={},lt=z.register=function(w,X,et,K){for(var vt,Gt,Xt,jt,Ne=X.split(","),Re=Ne.length,de=(et||"easeIn,easeOut,easeInOut").split(",");--Re>-1;)for(Gt=Ne[Re],vt=K?x("easing."+Gt,null,!0):J.easing[Gt]||{},Xt=de.length;--Xt>-1;)jt=de[Xt],j[Gt+"."+jt]=j[jt+Gt]=vt[jt]=w.getRatio?w:w[jt]||new w};for(A=z.prototype,A._calcEnd=!1,A.getRatio=function(w){if(this._func)return this._params[0]=w,this._func.apply(null,this._params);var X=this._type,et=this._power,K=X===1?1-w:X===2?w:.5>w?2*w:2*(1-w);return et===1?K*=K:et===2?K*=K*K:et===3?K*=K*K*K:et===4&&(K*=K*K*K*K),X===1?1-K:X===2?K:.5>w?K/2:1-K/2},P=["Linear","Quad","Cubic","Quart","Quint,Strong"],D=P.length;--D>-1;)A=P[D]+",Power"+D,lt(new z(null,null,1,D),A,"easeOut",!0),lt(new z(null,null,2,D),A,"easeIn"+(D===0?",easeNone":"")),lt(new z(null,null,3,D),A,"easeInOut");j.linear=J.easing.Linear.easeIn,j.swing=J.easing.Quad.easeInOut;var ft=x("events.EventDispatcher",function(w){this._listeners={},this._eventTarget=w||this});A=ft.prototype,A.addEventListener=function(w,X,et,K,vt){vt=vt||0;var Gt,Xt,jt=this._listeners[w],Ne=0;for(this!==F||Z||F.wake(),jt==null&&(this._listeners[w]=jt=[]),Xt=jt.length;--Xt>-1;)Gt=jt[Xt],Gt.c===X&&Gt.s===et?jt.splice(Xt,1):Ne===0&&Gt.pr<vt&&(Ne=Xt+1);jt.splice(Ne,0,{c:X,s:et,up:K,pr:vt})},A.removeEventListener=function(w,X){var et,K=this._listeners[w];if(K){for(et=K.length;--et>-1;)if(K[et].c===X)return void K.splice(et,1)}},A.dispatchEvent=function(w){var X,et,K,vt=this._listeners[w];if(vt)for(X=vt.length,X>1&&(vt=vt.slice(0)),et=this._eventTarget;--X>-1;)K=vt[X],K&&(K.up?K.c.call(K.s||et,{type:w,target:et}):K.c.call(K.s||et))};var gt=T.requestAnimationFrame,Nt=T.cancelAnimationFrame,at=Date.now||function(){return new Date().getTime()},Et=at();for(P=["ms","moz","webkit","o"],D=P.length;--D>-1&&!gt;)gt=T[P[D]+"RequestAnimationFrame"],Nt=T[P[D]+"CancelAnimationFrame"]||T[P[D]+"CancelRequestAnimationFrame"];x("Ticker",function(w,X){var et,K,vt,Gt,Xt,jt=this,Ne=at(),Re=X!==!1&>?"auto":!1,de=500,we=33,yi="tick",Si=function(ni){var Ei,Tr,Xn=at()-Et;Xn>de&&(Ne+=Xn-we),Et+=Xn,jt.time=(Et-Ne)/1e3,Ei=jt.time-Xt,(!et||Ei>0||ni===!0)&&(jt.frame++,Xt+=Ei+(Ei>=Gt?.004:Gt-Ei),Tr=!0),ni!==!0&&(vt=K(Si)),Tr&&jt.dispatchEvent(yi)};ft.call(jt),jt.time=jt.frame=0,jt.tick=function(){Si(!0)},jt.lagSmoothing=function(ni,Ei){return arguments.length?(de=ni||1/B,void(we=Math.min(Ei,de,0))):1/B>de},jt.sleep=function(){vt!=null&&(Re&&Nt?Nt(vt):clearTimeout(vt),K=E,vt=null,jt===F&&(Z=!1))},jt.wake=function(ni){vt!==null?jt.sleep():ni?Ne+=-Et+(Et=at()):jt.frame>10&&(Et=at()-de+5),K=et===0?E:Re&>?gt:function(Ei){return setTimeout(Ei,1e3*(Xt-jt.time)+1|0)},jt===F&&(Z=!0),Si(2)},jt.fps=function(ni){return arguments.length?(et=ni,Gt=1/(et||60),Xt=this.time+Gt,void jt.wake()):et},jt.useRAF=function(ni){return arguments.length?(jt.sleep(),Re=ni,void jt.fps(et)):Re},jt.fps(w),setTimeout(function(){Re==="auto"&&jt.frame<5&&(nt||{}).visibilityState!=="hidden"&&jt.useRAF(!1)},1500)}),A=J.Ticker.prototype=new J.events.EventDispatcher,A.constructor=J.Ticker;var I=x("core.Animation",function(w,X){if(this.vars=X=X||{},this._duration=this._totalDuration=w||0,this._delay=Number(X.delay)||0,this._timeScale=1,this._active=X.immediateRender===!0,this.data=X.data,this._reversed=X.reversed===!0,R){Z||F.wake();var et=this.vars.useFrames?Ji:R;et.add(this,et._time),this.vars.paused&&this.paused(!0)}});F=I.ticker=new J.Ticker,A=I.prototype,A._dirty=A._gc=A._initted=A._paused=!1,A._totalTime=A._time=0,A._rawPrevTime=-1,A._next=A._last=A._onUpdate=A._timeline=A.timeline=null,A._paused=!1;var zt=function(){Z&&at()-Et>2e3&&((nt||{}).visibilityState!=="hidden"||!F.lagSmoothing())&&F.wake();var w=setTimeout(zt,2e3);w.unref&&w.unref()};zt(),A.play=function(w,X){return w!=null&&this.seek(w,X),this.reversed(!1).paused(!1)},A.pause=function(w,X){return w!=null&&this.seek(w,X),this.paused(!0)},A.resume=function(w,X){return w!=null&&this.seek(w,X),this.paused(!1)},A.seek=function(w,X){return this.totalTime(Number(w),X!==!1)},A.restart=function(w,X){return this.reversed(!1).paused(!1).totalTime(w?-this._delay:0,X!==!1,!0)},A.reverse=function(w,X){return w!=null&&this.seek(w||this.totalDuration(),X),this.reversed(!0).paused(!1)},A.render=function(w,X,et){},A.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},A.isActive=function(){var w,X=this._timeline,et=this._startTime;return!X||!this._gc&&!this._paused&&X.isActive()&&(w=X.rawTime(!0))>=et&&w<et+this.totalDuration()/this._timeScale-1e-7},A._enabled=function(w,X){return Z||F.wake(),this._gc=!w,this._active=this.isActive(),X!==!0&&(w&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!w&&this.timeline&&this._timeline._remove(this,!0)),!1},A._kill=function(w,X){return this._enabled(!1,!1)},A.kill=function(w,X){return this._kill(w,X),this},A._uncache=function(w){for(var X=w?this:this.timeline;X;)X._dirty=!0,X=X.timeline;return this},A._swapSelfInParams=function(w){for(var X=w.length,et=w.concat();--X>-1;)w[X]==="{self}"&&(et[X]=this);return et},A._callback=function(w){var X=this.vars,et=X[w],K=X[w+"Params"],vt=X[w+"Scope"]||X.callbackScope||this,Gt=K?K.length:0;switch(Gt){case 0:et.call(vt);break;case 1:et.call(vt,K[0]);break;case 2:et.call(vt,K[0],K[1]);break;default:et.apply(vt,K)}},A.eventCallback=function(w,X,et,K){if((w||"").substr(0,2)==="on"){var vt=this.vars;if(arguments.length===1)return vt[w];X==null?delete vt[w]:(vt[w]=X,vt[w+"Params"]=b(et)&&et.join("").indexOf("{self}")!==-1?this._swapSelfInParams(et):et,vt[w+"Scope"]=K),w==="onUpdate"&&(this._onUpdate=X)}return this},A.delay=function(w){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+w-this._delay),this._delay=w,this):this._delay},A.duration=function(w){return arguments.length?(this._duration=this._totalDuration=w,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&w!==0&&this.totalTime(this._totalTime*(w/this._duration),!0),this):(this._dirty=!1,this._duration)},A.totalDuration=function(w){return this._dirty=!1,arguments.length?this.duration(w):this._totalDuration},A.time=function(w,X){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(w>this._duration?this._duration:w,X)):this._time},A.totalTime=function(w,X,et){if(Z||F.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>w&&!et&&(w+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var K=this._totalDuration,vt=this._timeline;if(w>K&&!et&&(w=K),this._startTime=(this._paused?this._pauseTime:vt._time)-(this._reversed?K-w:w)/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!==w||this._duration===0)&&(Ft.length&&Wt(),this.render(w,X,!1),Ft.length&&Wt())}return this},A.progress=A.totalProgress=function(w,X){var et=this.duration();return arguments.length?this.totalTime(et*w,X):et?this._time/et:this.ratio},A.startTime=function(w){return arguments.length?(w!==this._startTime&&(this._startTime=w,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,w-this._delay)),this):this._startTime},A.endTime=function(w){return this._startTime+(w!=0?this.totalDuration():this.duration())/this._timeScale},A.timeScale=function(w){if(!arguments.length)return this._timeScale;var X,et;for(w=w||B,this._timeline&&this._timeline.smoothChildTiming&&(X=this._pauseTime,et=X||X===0?X:this._timeline.totalTime(),this._startTime=et-(et-this._startTime)*this._timeScale/w),this._timeScale=w,et=this.timeline;et&&et.timeline;)et._dirty=!0,et.totalDuration(),et=et.timeline;return this},A.reversed=function(w){return arguments.length?(w!=this._reversed&&(this._reversed=w,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},A.paused=function(w){if(!arguments.length)return this._paused;var X,et,K=this._timeline;return w!=this._paused&&K&&(Z||w||F.wake(),X=K.rawTime(),et=X-this._pauseTime,!w&&K.smoothChildTiming&&(this._startTime+=et,this._uncache(!1)),this._pauseTime=w?X:null,this._paused=w,this._active=this.isActive(),!w&&et!==0&&this._initted&&this.duration()&&(X=K.smoothChildTiming?this._totalTime:(X-this._startTime)/this._timeScale,this.render(X,X===this._totalTime,!0))),this._gc&&!w&&this._enabled(!0,!1),this};var Pt=x("core.SimpleTimeline",function(w){I.call(this,0,w),this.autoRemoveChildren=this.smoothChildTiming=!0});A=Pt.prototype=new I,A.constructor=Pt,A.kill()._gc=!1,A._first=A._last=A._recent=null,A._sortChildren=!1,A.add=A.insert=function(w,X,et,K){var vt,Gt;if(w._startTime=Number(X||0)+w._delay,w._paused&&this!==w._timeline&&(w._pauseTime=this.rawTime()-(w._timeline.rawTime()-w._pauseTime)),w.timeline&&w.timeline._remove(w,!0),w.timeline=w._timeline=this,w._gc&&w._enabled(!0,!0),vt=this._last,this._sortChildren)for(Gt=w._startTime;vt&&vt._startTime>Gt;)vt=vt._prev;return vt?(w._next=vt._next,vt._next=w):(w._next=this._first,this._first=w),w._next?w._next._prev=w:this._last=w,w._prev=vt,this._recent=w,this._timeline&&this._uncache(!0),this},A._remove=function(w,X){return w.timeline===this&&(X||w._enabled(!1,!0),w._prev?w._prev._next=w._next:this._first===w&&(this._first=w._next),w._next?w._next._prev=w._prev:this._last===w&&(this._last=w._prev),w._next=w._prev=w.timeline=null,w===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},A.render=function(w,X,et){var K,vt=this._first;for(this._totalTime=this._time=this._rawPrevTime=w;vt;)K=vt._next,(vt._active||w>=vt._startTime&&!vt._paused&&!vt._gc)&&(vt._reversed?vt.render((vt._dirty?vt.totalDuration():vt._totalDuration)-(w-vt._startTime)*vt._timeScale,X,et):vt.render((w-vt._startTime)*vt._timeScale,X,et)),vt=K},A.rawTime=function(){return Z||F.wake(),this._totalTime};var Rt=x("TweenLite",function(w,X,et){if(I.call(this,X,et),this.render=Rt.prototype.render,w==null)throw"Cannot tween a null target.";this.target=w=typeof w!="string"?w:Rt.selector(w)||w;var K,vt,Gt,Xt=w.jquery||w.length&&w!==T&&w[0]&&(w[0]===T||w[0].nodeType&&w[0].style&&!w.nodeType),jt=this.vars.overwrite;if(this._overwrite=jt=jt==null?hn[Rt.defaultOverwrite]:typeof jt=="number"?jt>>0:hn[jt],(Xt||w instanceof Array||w.push&&b(w))&&typeof w[0]!="number")for(this._targets=Gt=q(w),this._propLookup=[],this._siblings=[],K=0;K<Gt.length;K++)vt=Gt[K],vt?typeof vt!="string"?vt.length&&vt!==T&&vt[0]&&(vt[0]===T||vt[0].nodeType&&vt[0].style&&!vt.nodeType)?(Gt.splice(K--,1),this._targets=Gt=Gt.concat(q(vt))):(this._siblings[K]=ct(vt,this,!1),jt===1&&this._siblings[K].length>1&&Lt(vt,this,null,1,this._siblings[K])):(vt=Gt[K--]=Rt.selector(vt),typeof vt=="string"&&Gt.splice(K+1,1)):Gt.splice(K--,1);else this._propLookup={},this._siblings=ct(w,this,!1),jt===1&&this._siblings.length>1&&Lt(w,this,null,1,this._siblings);(this.vars.immediateRender||X===0&&this._delay===0&&this.vars.immediateRender!==!1)&&(this._time=-B,this.render(Math.min(0,-this._delay)))},!0),ge=function(w){return w&&w.length&&w!==T&&w[0]&&(w[0]===T||w[0].nodeType&&w[0].style&&!w.nodeType)},ue=function(w,X){var et,K={};for(et in w)Ri[et]||et in X&&et!=="transform"&&et!=="x"&&et!=="y"&&et!=="width"&&et!=="height"&&et!=="className"&&et!=="border"||!(!Oe[et]||Oe[et]&&Oe[et]._autoCSS)||(K[et]=w[et],delete w[et]);w.css=K};A=Rt.prototype=new I,A.constructor=Rt,A.kill()._gc=!1,A.ratio=0,A._firstPT=A._targets=A._overwrittenProps=A._startAt=null,A._notifyPluginsOfEnabled=A._lazy=!1,Rt.version="2.0.2",Rt.defaultEase=A._ease=new z(null,null,1,1),Rt.defaultOverwrite="auto",Rt.ticker=F,Rt.autoSleep=120,Rt.lagSmoothing=function(w,X){F.lagSmoothing(w,X)},Rt.selector=T.$||T.jQuery||function(w){var X=T.$||T.jQuery;return X?(Rt.selector=X,X(w)):(nt||(nt=T.document),nt?nt.querySelectorAll?nt.querySelectorAll(w):nt.getElementById(w.charAt(0)==="#"?w.substr(1):w):w)};var Ft=[],Dt={},kt=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Fe=/[\+-]=-?[\.\d]/,xe=function(w){for(var X,et=this._firstPT,K=1e-6;et;)X=et.blob?w===1&&this.end!=null?this.end:w?this.join(""):this.start:et.c*w+et.s,et.m?X=et.m.call(this._tween,X,this._target||et.t,this._tween):K>X&&X>-K&&!et.blob&&(X=0),et.f?et.fp?et.t[et.p](et.fp,X):et.t[et.p](X):et.t[et.p]=X,et=et._next},Zt=function(w,X,et,K){var vt,Gt,Xt,jt,Ne,Re,de,we=[],yi=0,Si="",ni=0;for(we.start=w,we.end=X,w=we[0]=w+"",X=we[1]=X+"",et&&(et(we),w=we[0],X=we[1]),we.length=0,vt=w.match(kt)||[],Gt=X.match(kt)||[],K&&(K._next=null,K.blob=1,we._firstPT=we._applyPT=K),Ne=Gt.length,jt=0;Ne>jt;jt++)de=Gt[jt],Re=X.substr(yi,X.indexOf(de,yi)-yi),Si+=Re||!jt?Re:",",yi+=Re.length,ni?ni=(ni+1)%5:Re.substr(-5)==="rgba("&&(ni=1),de===vt[jt]||vt.length<=jt?Si+=de:(Si&&(we.push(Si),Si=""),Xt=parseFloat(vt[jt]),we.push(Xt),we._firstPT={_next:we._firstPT,t:we,p:we.length-1,s:Xt,c:(de.charAt(1)==="="?parseInt(de.charAt(0)+"1",10)*parseFloat(de.substr(2)):parseFloat(de)-Xt)||0,f:0,m:ni&&4>ni?Math.round:0}),yi+=de.length;return Si+=X.substr(yi),Si&&we.push(Si),we.setRatio=xe,Fe.test(X)&&(we.end=null),we},ti=function(w,X,et,K,vt,Gt,Xt,jt,Ne){typeof K=="function"&&(K=K(Ne||0,w));var Re,de=typeof w[X],we=de!=="function"?"":X.indexOf("set")||typeof w["get"+X.substr(3)]!="function"?X:"get"+X.substr(3),yi=et!=="get"?et:we?Xt?w[we](Xt):w[we]():w[X],Si=typeof K=="string"&&K.charAt(1)==="=",ni={t:w,p:X,s:yi,f:de==="function",pg:0,n:vt||X,m:Gt?typeof Gt=="function"?Gt:Math.round:0,pr:0,c:Si?parseInt(K.charAt(0)+"1",10)*parseFloat(K.substr(2)):parseFloat(K)-yi||0};return(typeof yi!="number"||typeof K!="number"&&!Si)&&(Xt||isNaN(yi)||!Si&&isNaN(K)||typeof yi=="boolean"||typeof K=="boolean"?(ni.fp=Xt,Re=Zt(yi,Si?parseFloat(ni.s)+ni.c+(ni.s+"").replace(/[0-9\-\.]/g,""):K,jt||Rt.defaultStringFilter,ni),ni={t:Re,p:"setRatio",s:0,c:1,f:2,pg:0,n:vt||X,pr:0,m:0}):(ni.s=parseFloat(yi),Si||(ni.c=parseFloat(K)-ni.s||0))),ni.c?((ni._next=this._firstPT)&&(ni._next._prev=ni),this._firstPT=ni,ni):void 0},ki=Rt._internals={isArray:b,isSelector:ge,lazyTweens:Ft,blobDif:Zt},Oe=Rt._plugins={},Ge=ki.tweenLookup={},di=0,Ri=ki.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},hn={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},Ji=I._rootFramesTimeline=new Pt,R=I._rootTimeline=new Pt,Jt=30,Wt=ki.lazyRender=function(){var w,X=Ft.length;for(Dt={};--X>-1;)w=Ft[X],w&&w._lazy!==!1&&(w.render(w._lazy[0],w._lazy[1],!0),w._lazy=!1);Ft.length=0};R._startTime=F.time,Ji._startTime=F.frame,R._active=Ji._active=!0,setTimeout(Wt,1),I._updateRoot=Rt.render=function(){var w,X,et;if(Ft.length&&Wt(),R.render((F.time-R._startTime)*R._timeScale,!1,!1),Ji.render((F.frame-Ji._startTime)*Ji._timeScale,!1,!1),Ft.length&&Wt(),F.frame>=Jt){Jt=F.frame+(parseInt(Rt.autoSleep,10)||120);for(et in Ge){for(X=Ge[et].tweens,w=X.length;--w>-1;)X[w]._gc&&X.splice(w,1);X.length===0&&delete Ge[et]}if(et=R._first,(!et||et._paused)&&Rt.autoSleep&&!Ji._first&&F._listeners.tick.length===1){for(;et&&et._paused;)et=et._next;et||F.sleep()}}},F.addEventListener("tick",I._updateRoot);var ct=function(w,X,et){var K,vt,Gt=w._gsTweenID;if(Ge[Gt||(w._gsTweenID=Gt="t"+di++)]||(Ge[Gt]={target:w,tweens:[]}),X&&(K=Ge[Gt].tweens,K[vt=K.length]=X,et))for(;--vt>-1;)K[vt]===X&&K.splice(vt,1);return Ge[Gt].tweens},pt=function(w,X,et,K){var vt,Gt,Xt=w.vars.onOverwrite;return Xt&&(vt=Xt(w,X,et,K)),Xt=Rt.onOverwrite,Xt&&(Gt=Xt(w,X,et,K)),vt!==!1&&Gt!==!1},Lt=function(w,X,et,K,vt){var Gt,Xt,jt,Ne;if(K===1||K>=4){for(Ne=vt.length,Gt=0;Ne>Gt;Gt++)if((jt=vt[Gt])!==X)jt._gc||jt._kill(null,w,X)&&(Xt=!0);else if(K===5)break;return Xt}var Re,de=X._startTime+B,we=[],yi=0,Si=X._duration===0;for(Gt=vt.length;--Gt>-1;)(jt=vt[Gt])===X||jt._gc||jt._paused||(jt._timeline!==X._timeline?(Re=Re||ie(X,0,Si),ie(jt,Re,Si)===0&&(we[yi++]=jt)):jt._startTime<=de&&jt._startTime+jt.totalDuration()/jt._timeScale>de&&((Si||!jt._initted)&&de-jt._startTime<=2e-10||(we[yi++]=jt)));for(Gt=yi;--Gt>-1;)if(jt=we[Gt],Ne=jt._firstPT,K===2&&jt._kill(et,w,X)&&(Xt=!0),K!==2||!jt._firstPT&&jt._initted&&Ne){if(K!==2&&!pt(jt,X))continue;jt._enabled(!1,!1)&&(Xt=!0)}return Xt},ie=function(w,X,et){for(var K=w._timeline,vt=K._timeScale,Gt=w._startTime;K._timeline;){if(Gt+=K._startTime,vt*=K._timeScale,K._paused)return-100;K=K._timeline}return Gt/=vt,Gt>X?Gt-X:et&&Gt===X||!w._initted&&2*B>Gt-X?B:(Gt+=w.totalDuration()/w._timeScale/vt)>X+B?0:Gt-X-B};A._init=function(){var w,X,et,K,vt,Gt,Xt=this.vars,jt=this._overwrittenProps,Ne=this._duration,Re=!!Xt.immediateRender,de=Xt.ease;if(Xt.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),vt={};for(K in Xt.startAt)vt[K]=Xt.startAt[K];if(vt.data="isStart",vt.overwrite=!1,vt.immediateRender=!0,vt.lazy=Re&&Xt.lazy!==!1,vt.startAt=vt.delay=null,vt.onUpdate=Xt.onUpdate,vt.onUpdateParams=Xt.onUpdateParams,vt.onUpdateScope=Xt.onUpdateScope||Xt.callbackScope||this,this._startAt=Rt.to(this.target||{},0,vt),Re){if(this._time>0)this._startAt=null;else if(Ne!==0)return}}else if(Xt.runBackwards&&Ne!==0)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{this._time!==0&&(Re=!1),et={};for(K in Xt)Ri[K]&&K!=="autoCSS"||(et[K]=Xt[K]);if(et.overwrite=0,et.data="isFromStart",et.lazy=Re&&Xt.lazy!==!1,et.immediateRender=Re,this._startAt=Rt.to(this.target,0,et),Re){if(this._time===0)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=de=de?de instanceof z?de:typeof de=="function"?new z(de,Xt.easeParams):j[de]||Rt.defaultEase:Rt.defaultEase,Xt.easeParams instanceof Array&&de.config&&(this._ease=de.config.apply(de,Xt.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(Gt=this._targets.length,w=0;Gt>w;w++)this._initProps(this._targets[w],this._propLookup[w]={},this._siblings[w],jt?jt[w]:null,w)&&(X=!0);else X=this._initProps(this.target,this._propLookup,this._siblings,jt,0);if(X&&Rt._onPluginEvent("_onInitAllProps",this),jt&&(this._firstPT||typeof this.target!="function"&&this._enabled(!1,!1)),Xt.runBackwards)for(et=this._firstPT;et;)et.s+=et.c,et.c=-et.c,et=et._next;this._onUpdate=Xt.onUpdate,this._initted=!0},A._initProps=function(w,X,et,K,vt){var Gt,Xt,jt,Ne,Re,de;if(w==null)return!1;Dt[w._gsTweenID]&&Wt(),this.vars.css||w.style&&w!==T&&w.nodeType&&Oe.css&&this.vars.autoCSS!==!1&&ue(this.vars,w);for(Gt in this.vars)if(de=this.vars[Gt],Ri[Gt])de&&(de instanceof Array||de.push&&b(de))&&de.join("").indexOf("{self}")!==-1&&(this.vars[Gt]=de=this._swapSelfInParams(de,this));else if(Oe[Gt]&&(Ne=new Oe[Gt])._onInitTween(w,this.vars[Gt],this,vt)){for(this._firstPT=Re={_next:this._firstPT,t:Ne,p:"setRatio",s:0,c:1,f:1,n:Gt,pg:1,pr:Ne._priority,m:0},Xt=Ne._overwriteProps.length;--Xt>-1;)X[Ne._overwriteProps[Xt]]=this._firstPT;(Ne._priority||Ne._onInitAllProps)&&(jt=!0),(Ne._onDisable||Ne._onEnable)&&(this._notifyPluginsOfEnabled=!0),Re._next&&(Re._next._prev=Re)}else X[Gt]=ti.call(this,w,Gt,"get",de,Gt,0,null,this.vars.stringFilter,vt);return K&&this._kill(K,w)?this._initProps(w,X,et,K,vt):this._overwrite>1&&this._firstPT&&et.length>1&&Lt(w,this,X,this._overwrite,et)?(this._kill(X,w),this._initProps(w,X,et,K,vt)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(Dt[w._gsTweenID]=!0),jt)},A.render=function(w,X,et){var K,vt,Gt,Xt,jt=this._time,Ne=this._duration,Re=this._rawPrevTime;if(w>=Ne-1e-7&&w>=0)this._totalTime=this._time=Ne,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(K=!0,vt="onComplete",et=et||this._timeline.autoRemoveChildren),Ne===0&&(this._initted||!this.vars.lazy||et)&&(this._startTime===this._timeline._duration&&(w=0),(0>Re||0>=w&&w>=-1e-7||Re===B&&this.data!=="isPause")&&Re!==w&&(et=!0,Re>B&&(vt="onReverseComplete")),this._rawPrevTime=Xt=!X||w||Re===w?w:B);else if(1e-7>w)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(jt!==0||Ne===0&&Re>0)&&(vt="onReverseComplete",K=this._reversed),0>w&&(this._active=!1,Ne===0&&(this._initted||!this.vars.lazy||et)&&(Re>=0&&(Re!==B||this.data!=="isPause")&&(et=!0),this._rawPrevTime=Xt=!X||w||Re===w?w:B)),(!this._initted||this._startAt&&this._startAt.progress())&&(et=!0);else if(this._totalTime=this._time=w,this._easeType){var de=w/Ne,we=this._easeType,yi=this._easePower;(we===1||we===3&&de>=.5)&&(de=1-de),we===3&&(de*=2),yi===1?de*=de:yi===2?de*=de*de:yi===3?de*=de*de*de:yi===4&&(de*=de*de*de*de),we===1?this.ratio=1-de:we===2?this.ratio=de:.5>w/Ne?this.ratio=de/2:this.ratio=1-de/2}else this.ratio=this._ease.getRatio(w/Ne);if(this._time!==jt||et){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!et&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=jt,this._rawPrevTime=Re,Ft.push(this),void(this._lazy=[w,X]);this._time&&!K?this.ratio=this._ease.getRatio(this._time/Ne):K&&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!==jt&&w>=0&&(this._active=!0),jt===0&&(this._startAt&&(w>=0?this._startAt.render(w,!0,et):vt||(vt="_dummyGS")),this.vars.onStart&&(this._time!==0||Ne===0)&&(X||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>w&&this._startAt&&w!==-1e-4&&this._startAt.render(w,!0,et),X||(this._time!==jt||K||et)&&this._callback("onUpdate")),vt&&(!this._gc||et)&&(0>w&&this._startAt&&!this._onUpdate&&w!==-1e-4&&this._startAt.render(w,!0,et),K&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!X&&this.vars[vt]&&this._callback(vt),Ne===0&&this._rawPrevTime===B&&Xt!==B&&(this._rawPrevTime=0))}},A._kill=function(w,X,et){if(w==="all"&&(w=null),w==null&&(X==null||X===this.target))return this._lazy=!1,this._enabled(!1,!1);X=typeof X!="string"?X||this._targets||this.target:Rt.selector(X)||X;var K,vt,Gt,Xt,jt,Ne,Re,de,we,yi=et&&this._time&&et._startTime===this._startTime&&this._timeline===et._timeline,Si=this._firstPT;if((b(X)||ge(X))&&typeof X[0]!="number")for(K=X.length;--K>-1;)this._kill(w,X[K],et)&&(Ne=!0);else{if(this._targets){for(K=this._targets.length;--K>-1;)if(X===this._targets[K]){jt=this._propLookup[K]||{},this._overwrittenProps=this._overwrittenProps||[],vt=this._overwrittenProps[K]=w?this._overwrittenProps[K]||{}:"all";break}}else{if(X!==this.target)return!1;jt=this._propLookup,vt=this._overwrittenProps=w?this._overwrittenProps||{}:"all"}if(jt){if(Re=w||jt,de=w!==vt&&vt!=="all"&&w!==jt&&(typeof w!="object"||!w._tempKill),et&&(Rt.onOverwrite||this.vars.onOverwrite)){for(Gt in Re)jt[Gt]&&(we||(we=[]),we.push(Gt));if((we||!w)&&!pt(this,et,X,we))return!1}for(Gt in Re)(Xt=jt[Gt])&&(yi&&(Xt.f?Xt.t[Xt.p](Xt.s):Xt.t[Xt.p]=Xt.s,Ne=!0),Xt.pg&&Xt.t._kill(Re)&&(Ne=!0),Xt.pg&&Xt.t._overwriteProps.length!==0||(Xt._prev?Xt._prev._next=Xt._next:Xt===this._firstPT&&(this._firstPT=Xt._next),Xt._next&&(Xt._next._prev=Xt._prev),Xt._next=Xt._prev=null),delete jt[Gt]),de&&(vt[Gt]=1);!this._firstPT&&this._initted&&Si&&this._enabled(!1,!1)}}return Ne},A.invalidate=function(){return this._notifyPluginsOfEnabled&&Rt._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],I.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-B,this.render(Math.min(0,-this._delay))),this},A._enabled=function(w,X){if(Z||F.wake(),w&&this._gc){var et,K=this._targets;if(K)for(et=K.length;--et>-1;)this._siblings[et]=ct(K[et],this,!0);else this._siblings=ct(this.target,this,!0)}return I.prototype._enabled.call(this,w,X),this._notifyPluginsOfEnabled&&this._firstPT?Rt._onPluginEvent(w?"_onEnable":"_onDisable",this):!1},Rt.to=function(w,X,et){return new Rt(w,X,et)},Rt.from=function(w,X,et){return et.runBackwards=!0,et.immediateRender=et.immediateRender!=0,new Rt(w,X,et)},Rt.fromTo=function(w,X,et,K){return K.startAt=et,K.immediateRender=K.immediateRender!=0&&et.immediateRender!=0,new Rt(w,X,K)},Rt.delayedCall=function(w,X,et,K,vt){return new Rt(X,0,{delay:w,onComplete:X,onCompleteParams:et,callbackScope:K,onReverseComplete:X,onReverseCompleteParams:et,immediateRender:!1,lazy:!1,useFrames:vt,overwrite:0})},Rt.set=function(w,X){return new Rt(w,0,X)},Rt.getTweensOf=function(w,X){if(w==null)return[];w=typeof w!="string"?w:Rt.selector(w)||w;var et,K,vt,Gt;if((b(w)||ge(w))&&typeof w[0]!="number"){for(et=w.length,K=[];--et>-1;)K=K.concat(Rt.getTweensOf(w[et],X));for(et=K.length;--et>-1;)for(Gt=K[et],vt=et;--vt>-1;)Gt===K[vt]&&K.splice(et,1)}else if(w._gsTweenID)for(K=ct(w).concat(),et=K.length;--et>-1;)(K[et]._gc||X&&!K[et].isActive())&&K.splice(et,1);return K||[]},Rt.killTweensOf=Rt.killDelayedCallsTo=function(w,X,et){typeof X=="object"&&(et=X,X=!1);for(var K=Rt.getTweensOf(w,X),vt=K.length;--vt>-1;)K[vt]._kill(et,w)};var Kt=x("plugins.TweenPlugin",function(w,X){this._overwriteProps=(w||"").split(","),this._propName=this._overwriteProps[0],this._priority=X||0,this._super=Kt.prototype},!0);if(A=Kt.prototype,Kt.version="1.19.0",Kt.API=2,A._firstPT=null,A._addTween=ti,A.setRatio=xe,A._kill=function(w){var X,et=this._overwriteProps,K=this._firstPT;if(w[this._propName]!=null)this._overwriteProps=[];else for(X=et.length;--X>-1;)w[et[X]]!=null&&et.splice(X,1);for(;K;)w[K.n]!=null&&(K._next&&(K._next._prev=K._prev),K._prev?(K._prev._next=K._next,K._prev=null):this._firstPT===K&&(this._firstPT=K._next)),K=K._next;return!1},A._mod=A._roundProps=function(w){for(var X,et=this._firstPT;et;)X=w[this._propName]||et.n!=null&&w[et.n.split(this._propName+"_").join("")],X&&typeof X=="function"&&(et.f===2?et.t._applyPT.m=X:et.m=X),et=et._next},Rt._onPluginEvent=function(w,X){var et,K,vt,Gt,Xt,jt=X._firstPT;if(w==="_onInitAllProps"){for(;jt;){for(Xt=jt._next,K=vt;K&&K.pr>jt.pr;)K=K._next;(jt._prev=K?K._prev:Gt)?jt._prev._next=jt:vt=jt,(jt._next=K)?K._prev=jt:Gt=jt,jt=Xt}jt=X._firstPT=vt}for(;jt;)jt.pg&&typeof jt.t[w]=="function"&&jt.t[w]()&&(et=!0),jt=jt._next;return et},Kt.activate=function(w){for(var X=w.length;--X>-1;)w[X].API===Kt.API&&(Oe[new w[X]()._propName]=w[X]);return!0},S.plugin=function(w){if(!(w&&w.propName&&w.init&&w.API))throw"illegal plugin definition.";var X,et=w.propName,K=w.priority||0,vt=w.overwriteProps,Gt={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},Xt=x("plugins."+et.charAt(0).toUpperCase()+et.substr(1)+"Plugin",function(){Kt.call(this,et,K),this._overwriteProps=vt||[]},w.global===!0),jt=Xt.prototype=new Kt(et);jt.constructor=Xt,Xt.API=w.API;for(X in Gt)typeof w[X]=="function"&&(jt[Gt[X]]=w[X]);return Xt.version=w.version,Kt.activate([Xt]),Xt},P=T._gsQueue){for(D=0;D<P.length;D++)P[D]();for(A in p)p[A].func||T.console.log("GSAP encountered missing dependency: "+A)}Z=!1}(typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window,"TweenMax");const Ku={class:"modal-background"},Qu=["innerHTML"],tc={name:"MapModali"},Vh=oi.defineComponent({...tc,props:{},setup(T,{expose:ht}){const d=oi.ref(""),nt=oi.ref(""),H=P=>{nt.value=P,d.value="five"},m=()=>{d.value=d.value+" out"};return oi.onMounted(()=>{}),ht({text:nt,show:H,hide:m}),(P,D)=>(oi.openBlock(),oi.createElementBlock("div",{id:"modal-container",class:oi.normalizeClass(d.value),onClick:m},[oi.createElementVNode("div",Ku,[oi.createElementVNode("div",{class:"modal",onClick:D[0]||(D[0]=A=>{A.stopPropagation()})},[oi.createElementVNode("p",{style:{"white-space":"pre-line","line-height":"1",margin:"0",color:"#fff"},innerHTML:nt.value},null,8,Qu)])])],2))}}),og="",ec={class:"bim_background_plate"},ic={class:"content"},nc=oi.createElementVNode("canvas",{class:"landscape"},null,-1),rc={class:"content__title"},oc=oi.createElementVNode("div",{class:"overlay"},null,-1),sc={name:"BimBackgroundPlate"},Wh=oi.defineComponent({...sc,setup(T){const ht=()=>{let H=`
|
|
14
14
|
vec3 mod289(vec3 x)
|
|
15
15
|
{
|
|
16
16
|
return x - floor(x * (1.0 / 289.0)) * 289.0;
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
fogDepth = -mvPosition.z;
|
|
226
226
|
|
|
227
227
|
}
|
|
228
|
-
`,
|
|
228
|
+
`,m=`
|
|
229
229
|
uniform float time;
|
|
230
230
|
uniform vec3 color;
|
|
231
231
|
uniform sampler2D pallete;
|
|
@@ -248,23 +248,23 @@
|
|
|
248
248
|
float fogFactor = smoothstep( fogNear, fogFar, fogDepth );
|
|
249
249
|
gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
|
|
250
250
|
#endif
|
|
251
|
-
}`;var Mt=document.querySelector(".landscape"),kt=window.innerWidth,nt=window.innerHeight,Tt,Rt,vt,Nt,Ut={x:0,y:0,xDamped:0,yDamped:0},Ct=typeof window.orientation<"u";at();function at(){Y(),y(),x(),z(),Ct?window.addEventListener("touchmove",Z,{passive:!1}):window.addEventListener("mousemove",Z),window.addEventListener("resize",E),E()}function Y(){Tt=new THREE.Scene;var _t=new THREE.Color(3355443);Tt.background=_t,Tt.fog=new THREE.Fog(_t,0,400),B(),vt=new THREE.PerspectiveCamera(60,kt/nt,.1,1e4),vt.position.y=8,vt.position.z=4;let dt=new THREE.AmbientLight(16777215,1);Tt.add(dt),Rt=new THREE.WebGLRenderer({canvas:Mt,antialias:!0}),Rt.setPixelRatio=devicePixelRatio,Rt.setSize(kt,nt)}function y(){var _t=new THREE.PlaneBufferGeometry(100,400,400,400),dt={time:{type:"f",value:0},scroll:{type:"f",value:0},distortCenter:{type:"f",value:.1},roadWidth:{type:"f",value:.5},pallete:{type:"t",value:null},speed:{type:"f",value:3},maxHeight:{type:"f",value:10},color:new THREE.Color(1,1,1)},zt=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.merge([THREE.ShaderLib.basic.uniforms,dt]),vertexShader:gt,fragmentShader:S,wireframe:!1,fog:!0});Nt=new THREE.Mesh(_t,zt),Nt.position.z=-180,Nt.rotation.x=-Math.PI/2,Tt.add(Nt)}function x(){new THREE.TextureLoader().load("",function(_t){Nt.material.uniforms.pallete.value=_t,Nt.material.needsUpdate=!0})}function B(){B=new THREE.Sky,B.scale.setScalar(45e4),B.material.uniforms.turbidity.value=13,B.material.uniforms.rayleigh.value=1.2,B.material.uniforms.luminance.value=1,B.material.uniforms.mieCoefficient.value=.1,B.material.uniforms.mieDirectionalG.value=.58,Tt.add(B);let _t=new THREE.Mesh(new THREE.SphereBufferGeometry(2e4,16,8),new THREE.MeshBasicMaterial({color:16777215}));_t.visible=!1,Tt.add(_t);var dt=Math.PI*-.002,zt=2*Math.PI*-.25;_t.position.x=4e5*Math.cos(zt),_t.position.y=4e5*Math.sin(zt)*Math.sin(dt),_t.position.z=4e5*Math.sin(zt)*Math.cos(dt),B.material.uniforms.sunPosition.value.copy(_t.position)}function E(){kt=window.innerWidth,nt=window.innerHeight,vt.aspect=kt/nt,vt.updateProjectionMatrix(),Rt.setSize(kt,nt)}function Z(_t){_t.preventDefault();var dt,zt;_t.type=="mousemove"?(dt=_t.clientX,zt=_t.clientY):(dt=_t.changedTouches[0].clientX,zt=_t.changedTouches[0].clientY),Ut.x=dt,Ut.y=zt}function z(){requestAnimationFrame(z),Ut.xDamped=it(Ut.xDamped,Ut.x,.1),Ut.yDamped=it(Ut.yDamped,Ut.y,.1);var _t=performance.now()*.001;Nt.material.uniforms.time.value=_t,Nt.material.uniforms.scroll.value=_t+X(Ut.yDamped,0,nt,0,4),Nt.material.uniforms.distortCenter.value=Math.sin(_t)*.1,Nt.material.uniforms.roadWidth.value=X(Ut.xDamped,0,kt,1,4.5),vt.position.y=X(Ut.yDamped,0,nt,4,11),Rt.render(Tt,vt)}function X(_t,dt,zt,Yt,re){return Yt+(re-Yt)*((_t-dt)/(zt-dt))}function it(_t,dt,zt){return(1-zt)*_t+zt*dt}},_=()=>{const gt=document.querySelector(".overlay"),S=document.querySelector(".content__title");charming(S);const Mt=Array.from(S.querySelectorAll("span"));TweenMax.to(gt,2,{ease:Quad.easeOut,opacity:0}),TweenMax.set(Mt,{opacity:0}),TweenMax.staggerTo(Mt,1.5,{ease:Expo.easeOut,startAt:{rotationX:-100,z:-1e3},opacity:1,rotationX:0,z:0},.1)},pt=()=>{$(),_()};return ke.onMounted(()=>{pt()}),(gt,S)=>(ke.openBlock(),ke.createElementBlock("div",Ju,[ke.createElementVNode("div",$u,[Qu,ke.createElementVNode("h2",Ku,[ke.renderSlot(gt.$slots,"default")])]),tc]))}}),$m="";(function(g,$){typeof Zi=="object"&&typeof module<"u"?$(Zi):typeof define=="function"&&define.amd?define(["exports"],$):$(g.THREE={})})(window,function(g){function $(){}function _(t,e){this.x=t||0,this.y=e||0}function pt(){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 gt(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._w=n!==void 0?n:1}function S(t,e,i){this.x=t||0,this.y=e||0,this.z=i||0}function Mt(){this.elements=[1,0,0,0,1,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function kt(t,e,i,n,o,s,l,h,c,p){Object.defineProperty(this,"id",{value:$o++}),this.uuid=$e.generateUUID(),this.name="",this.image=t!==void 0?t:kt.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=e!==void 0?e:kt.DEFAULT_MAPPING,this.wrapS=i!==void 0?i:1001,this.wrapT=n!==void 0?n:1001,this.magFilter=o!==void 0?o:1006,this.minFilter=s!==void 0?s:1008,this.anisotropy=c!==void 0?c:1,this.format=l!==void 0?l:1023,this.type=h!==void 0?h:1009,this.offset=new _(0,0),this.repeat=new _(1,1),this.center=new _(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Mt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=p!==void 0?p:3e3,this.version=0,this.onUpdate=null}function nt(t,e,i,n){this.x=t||0,this.y=e||0,this.z=i||0,this.w=n!==void 0?n:1}function Tt(t,e,i){this.width=t,this.height=e,this.scissor=new nt(0,0,t,e),this.scissorTest=!1,this.viewport=new nt(0,0,t,e),i=i||{},i.minFilter===void 0&&(i.minFilter=1006),this.texture=new kt(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 Rt(t,e,i){Tt.call(this,t,e,i),this.activeMipMapLevel=this.activeCubeFace=0}function vt(t,e,i,n,o,s,l,h,c,p,f,d){kt.call(this,null,s,l,h,c,p,n,o,f,d),this.image={data:t,width:e,height:i},this.magFilter=c!==void 0?c:1003,this.minFilter=p!==void 0?p:1003,this.flipY=this.generateMipmaps=!1,this.unpackAlignment=1}function Nt(t,e){this.min=t!==void 0?t:new S(1/0,1/0,1/0),this.max=e!==void 0?e:new S(-1/0,-1/0,-1/0)}function Ut(t,e){this.center=t!==void 0?t:new S,this.radius=e!==void 0?e:0}function Ct(t,e){this.normal=t!==void 0?t:new S(1,0,0),this.constant=e!==void 0?e:0}function at(t,e,i,n,o,s){this.planes=[t!==void 0?t:new Ct,e!==void 0?e:new Ct,i!==void 0?i:new Ct,n!==void 0?n:new Ct,o!==void 0?o:new Ct,s!==void 0?s:new Ct]}function Y(t,e,i){return e===void 0&&i===void 0?this.set(t):this.setRGB(t,e,i)}function y(){function t(o,s){i!==!1&&(n(o,s),e.requestAnimationFrame(t))}var e=null,i=!1,n=null;return{start:function(){i!==!0&&n!==null&&(e.requestAnimationFrame(t),i=!0)},stop:function(){i=!1},setAnimationLoop:function(o){n=o},setContext:function(o){e=o}}}function x(t){function e(n,o){var s=n.array,l=n.dynamic?35048:35044,h=t.createBuffer();return t.bindBuffer(o,h),t.bufferData(o,s,l),n.onUploadCallback(),o=5126,s instanceof Float32Array?o=5126:s instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):s instanceof Uint16Array?o=5123:s instanceof Int16Array?o=5122:s instanceof Uint32Array?o=5125:s instanceof Int32Array?o=5124:s instanceof Int8Array?o=5120:s instanceof Uint8Array&&(o=5121),{buffer:h,type:o,bytesPerElement:s.BYTES_PER_ELEMENT,version:n.version}}var i=new WeakMap;return{get:function(n){return n.isInterleavedBufferAttribute&&(n=n.data),i.get(n)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var o=i.get(n);o&&(t.deleteBuffer(o.buffer),i.delete(n))},update:function(n,o){n.isInterleavedBufferAttribute&&(n=n.data);var s=i.get(n);if(s===void 0)i.set(n,e(n,o));else if(s.version<n.version){var l=n,h=l.array,c=l.updateRange;t.bindBuffer(o,s.buffer),l.dynamic===!1?t.bufferData(o,h,35044):c.count===-1?t.bufferSubData(o,0,h):c.count===0?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(o,c.offset*h.BYTES_PER_ELEMENT,h.subarray(c.offset,c.offset+c.count)),c.count=-1),s.version=n.version}}}}function B(t,e,i,n,o,s){this.a=t,this.b=e,this.c=i,this.normal=n&&n.isVector3?n:new S,this.vertexNormals=Array.isArray(n)?n:[],this.color=o&&o.isColor?o:new Y,this.vertexColors=Array.isArray(o)?o:[],this.materialIndex=s!==void 0?s:0}function E(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._order=n||E.DefaultOrder}function Z(){this.mask=1}function z(){Object.defineProperty(this,"id",{value:hh++}),this.uuid=$e.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=z.DefaultUp.clone();var t=new S,e=new E,i=new gt,n=new S(1,1,1);e.onChange(function(){i.setFromEuler(e,!1)}),i.onChange(function(){e.setFromQuaternion(i,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new pt},normalMatrix:{value:new Mt}}),this.matrix=new pt,this.matrixWorld=new pt,this.matrixAutoUpdate=z.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Z,this.visible=!0,this.receiveShadow=this.castShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function X(){Object.defineProperty(this,"id",{value:uh+=2}),this.uuid=$e.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function it(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 _t(t,e,i){it.call(this,new Int8Array(t),e,i)}function dt(t,e,i){it.call(this,new Uint8Array(t),e,i)}function zt(t,e,i){it.call(this,new Uint8ClampedArray(t),e,i)}function Yt(t,e,i){it.call(this,new Int16Array(t),e,i)}function re(t,e,i){it.call(this,new Uint16Array(t),e,i)}function se(t,e,i){it.call(this,new Int32Array(t),e,i)}function we(t,e,i){it.call(this,new Uint32Array(t),e,i)}function Et(t,e,i){it.call(this,new Float32Array(t),e,i)}function ie(t,e,i){it.call(this,new Float64Array(t),e,i)}function ze(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function on(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:ch+=2}),this.uuid=$e.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.drawRange={start:0,count:1/0},this.userData={}}function Qe(t,e,i,n,o,s){X.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:o,depthSegments:s},this.fromBufferGeometry(new Ii(t,e,i,n,o,s)),this.mergeVertices()}function Ii(t,e,i,n,o,s){function l(P,R,I,Q,W,st,K,wt,C,D,ct){var Dt=st/C,bt=K/D,St=st/2,oe=K/2,$t=wt/2;K=C+1;var me=D+1,ue=st=0,Wt,Ee,Be=new S;for(Ee=0;Ee<me;Ee++){var Ze=Ee*bt-oe;for(Wt=0;Wt<K;Wt++)Be[P]=(Wt*Dt-St)*Q,Be[R]=Ze*W,Be[I]=$t,p.push(Be.x,Be.y,Be.z),Be[P]=0,Be[R]=0,Be[I]=0<wt?1:-1,f.push(Be.x,Be.y,Be.z),d.push(Wt/C),d.push(1-Ee/D),st+=1}for(Ee=0;Ee<D;Ee++)for(Wt=0;Wt<C;Wt++)P=v+Wt+K*(Ee+1),R=v+(Wt+1)+K*(Ee+1),I=v+(Wt+1)+K*Ee,c.push(v+Wt+K*Ee,P,I),c.push(P,R,I),ue+=6;h.addGroup(w,ue,ct),w+=ue,v+=st}Ft.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:o,depthSegments:s};var h=this;t=t||1,e=e||1,i=i||1,n=Math.floor(n)||1,o=Math.floor(o)||1,s=Math.floor(s)||1;var c=[],p=[],f=[],d=[],v=0,w=0;l("z","y","x",-1,-1,i,e,t,s,o,0),l("z","y","x",1,-1,i,e,-t,s,o,1),l("x","z","y",1,1,t,i,e,n,s,2),l("x","z","y",1,-1,t,i,-e,n,s,3),l("x","y","z",1,-1,t,e,i,n,o,4),l("x","y","z",-1,-1,t,e,-i,n,o,5),this.setIndex(c),this.addAttribute("position",new Et(p,3)),this.addAttribute("normal",new Et(f,3)),this.addAttribute("uv",new Et(d,2))}function Pn(t,e,i,n){X.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new Ji(t,e,i,n)),this.mergeVertices()}function Ji(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,s=e/2;i=Math.floor(i)||1,n=Math.floor(n)||1;var l=i+1,h=n+1,c=t/i,p=e/n,f=[],d=[],v=[],w=[];for(t=0;t<h;t++){var P=t*p-s;for(e=0;e<l;e++)d.push(e*c-o,-P,0),v.push(0,0,1),w.push(e/i),w.push(1-t/n)}for(t=0;t<n;t++)for(e=0;e<i;e++)o=e+l*(t+1),s=e+1+l*(t+1),h=e+1+l*t,f.push(e+l*t,o,h),f.push(o,s,h);this.setIndex(f),this.addAttribute("position",new Et(d,3)),this.addAttribute("normal",new Et(v,3)),this.addAttribute("uv",new Et(w,2))}function Oe(){Object.defineProperty(this,"id",{value:kl++}),this.uuid=$e.generateUUID(),this.name="",this.type="Material",this.lights=this.fog=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=0,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null,this.depthFunc=3,this.depthWrite=this.depthTest=!0,this.clippingPlanes=null,this.clipShadows=this.clipIntersection=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetUnits=this.polygonOffsetFactor=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.userData={},this.needsUpdate=!0}function Pi(t){Oe.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=`void main() {
|
|
251
|
+
}`;var P=document.querySelector(".landscape"),D=window.innerWidth,A=window.innerHeight,F,Z,G,J,B={x:0,y:0,xDamped:0,yDamped:0},q=typeof window.orientation<"u";E();function E(){b(),p(),g(),z(),q?window.addEventListener("touchmove",U,{passive:!1}):window.addEventListener("mousemove",U),window.addEventListener("resize",x),x()}function b(){F=new THREE.Scene;var ft=new THREE.Color(3355443);F.background=ft,F.fog=new THREE.Fog(ft,0,400),S(),G=new THREE.PerspectiveCamera(60,D/A,.1,1e4),G.position.y=8,G.position.z=4;let gt=new THREE.AmbientLight(16777215,1);F.add(gt),Z=new THREE.WebGLRenderer({canvas:P,antialias:!0}),Z.setPixelRatio=devicePixelRatio,Z.setSize(D,A)}function p(){var ft=new THREE.PlaneBufferGeometry(100,400,400,400),gt={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)},Nt=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.merge([THREE.ShaderLib.basic.uniforms,gt]),vertexShader:H,fragmentShader:m,wireframe:!1,fog:!0});J=new THREE.Mesh(ft,Nt),J.position.z=-180,J.rotation.x=-Math.PI/2,F.add(J)}function g(){new THREE.TextureLoader().load("",function(ft){J.material.uniforms.pallete.value=ft,J.material.needsUpdate=!0})}function S(){S=new THREE.Sky,S.scale.setScalar(45e4),S.material.uniforms.turbidity.value=13,S.material.uniforms.rayleigh.value=1.2,S.material.uniforms.luminance.value=1,S.material.uniforms.mieCoefficient.value=.1,S.material.uniforms.mieDirectionalG.value=.58,F.add(S);let ft=new THREE.Mesh(new THREE.SphereBufferGeometry(2e4,16,8),new THREE.MeshBasicMaterial({color:16777215}));ft.visible=!1,F.add(ft);var gt=Math.PI*-.002,Nt=2*Math.PI*-.25;ft.position.x=4e5*Math.cos(Nt),ft.position.y=4e5*Math.sin(Nt)*Math.sin(gt),ft.position.z=4e5*Math.sin(Nt)*Math.cos(gt),S.material.uniforms.sunPosition.value.copy(ft.position)}function x(){D=window.innerWidth,A=window.innerHeight,G.aspect=D/A,G.updateProjectionMatrix(),Z.setSize(D,A)}function U(ft){ft.preventDefault();var gt,Nt;ft.type=="mousemove"?(gt=ft.clientX,Nt=ft.clientY):(gt=ft.changedTouches[0].clientX,Nt=ft.changedTouches[0].clientY),B.x=gt,B.y=Nt}function z(){requestAnimationFrame(z),B.xDamped=lt(B.xDamped,B.x,.1),B.yDamped=lt(B.yDamped,B.y,.1);var ft=performance.now()*.001;J.material.uniforms.time.value=ft,J.material.uniforms.scroll.value=ft+j(B.yDamped,0,A,0,4),J.material.uniforms.distortCenter.value=Math.sin(ft)*.1,J.material.uniforms.roadWidth.value=j(B.xDamped,0,D,1,4.5),G.position.y=j(B.yDamped,0,A,4,11),Z.render(F,G)}function j(ft,gt,Nt,at,Et){return at+(Et-at)*((ft-gt)/(Nt-gt))}function lt(ft,gt,Nt){return(1-Nt)*ft+Nt*gt}},d=()=>{const H=document.querySelector(".overlay"),m=document.querySelector(".content__title");charming(m);const P=Array.from(m.querySelectorAll("span"));TweenMax.to(H,2,{ease:Quad.easeOut,opacity:0}),TweenMax.set(P,{opacity:0}),TweenMax.staggerTo(P,1.5,{ease:Expo.easeOut,startAt:{rotationX:-100,z:-1e3},opacity:1,rotationX:0,z:0},.1)},nt=()=>{ht(),d()};return oi.onMounted(()=>{nt()}),(H,m)=>(oi.openBlock(),oi.createElementBlock("div",ec,[oi.createElementVNode("div",ic,[nc,oi.createElementVNode("h2",rc,[oi.renderSlot(H.$slots,"default")])]),oc]))}}),sg="";(function(T,ht){typeof en=="object"&&typeof module<"u"?ht(en):typeof define=="function"&&define.amd?define(["exports"],ht):ht(T.THREE={})})(window,function(T){function ht(){}function d(t,e){this.x=t||0,this.y=e||0}function nt(){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 H(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._w=n!==void 0?n:1}function m(t,e,i){this.x=t||0,this.y=e||0,this.z=i||0}function P(){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 D(t,e,i,n,o,s,l,h,c,f){Object.defineProperty(this,"id",{value:ts++}),this.uuid=pi.generateUUID(),this.name="",this.image=t!==void 0?t:D.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=e!==void 0?e:D.DEFAULT_MAPPING,this.wrapS=i!==void 0?i:1001,this.wrapT=n!==void 0?n:1001,this.magFilter=o!==void 0?o:1006,this.minFilter=s!==void 0?s:1008,this.anisotropy=c!==void 0?c:1,this.format=l!==void 0?l:1023,this.type=h!==void 0?h:1009,this.offset=new d(0,0),this.repeat=new d(1,1),this.center=new d(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new P,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=f!==void 0?f:3e3,this.version=0,this.onUpdate=null}function A(t,e,i,n){this.x=t||0,this.y=e||0,this.z=i||0,this.w=n!==void 0?n:1}function F(t,e,i){this.width=t,this.height=e,this.scissor=new A(0,0,t,e),this.scissorTest=!1,this.viewport=new A(0,0,t,e),i=i||{},i.minFilter===void 0&&(i.minFilter=1006),this.texture=new D(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 Z(t,e,i){F.call(this,t,e,i),this.activeMipMapLevel=this.activeCubeFace=0}function G(t,e,i,n,o,s,l,h,c,f,v,y){D.call(this,null,s,l,h,c,f,n,o,v,y),this.image={data:t,width:e,height:i},this.magFilter=c!==void 0?c:1003,this.minFilter=f!==void 0?f:1003,this.flipY=this.generateMipmaps=!1,this.unpackAlignment=1}function J(t,e){this.min=t!==void 0?t:new m(1/0,1/0,1/0),this.max=e!==void 0?e:new m(-1/0,-1/0,-1/0)}function B(t,e){this.center=t!==void 0?t:new m,this.radius=e!==void 0?e:0}function q(t,e){this.normal=t!==void 0?t:new m(1,0,0),this.constant=e!==void 0?e:0}function E(t,e,i,n,o,s){this.planes=[t!==void 0?t:new q,e!==void 0?e:new q,i!==void 0?i:new q,n!==void 0?n:new q,o!==void 0?o:new q,s!==void 0?s:new q]}function b(t,e,i){return e===void 0&&i===void 0?this.set(t):this.setRGB(t,e,i)}function p(){function t(o,s){i!==!1&&(n(o,s),e.requestAnimationFrame(t))}var e=null,i=!1,n=null;return{start:function(){i!==!0&&n!==null&&(e.requestAnimationFrame(t),i=!0)},stop:function(){i=!1},setAnimationLoop:function(o){n=o},setContext:function(o){e=o}}}function g(t){function e(n,o){var s=n.array,l=n.dynamic?35048:35044,h=t.createBuffer();return t.bindBuffer(o,h),t.bufferData(o,s,l),n.onUploadCallback(),o=5126,s instanceof Float32Array?o=5126:s instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):s instanceof Uint16Array?o=5123:s instanceof Int16Array?o=5122:s instanceof Uint32Array?o=5125:s instanceof Int32Array?o=5124:s instanceof Int8Array?o=5120:s instanceof Uint8Array&&(o=5121),{buffer:h,type:o,bytesPerElement:s.BYTES_PER_ELEMENT,version:n.version}}var i=new WeakMap;return{get:function(n){return n.isInterleavedBufferAttribute&&(n=n.data),i.get(n)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var o=i.get(n);o&&(t.deleteBuffer(o.buffer),i.delete(n))},update:function(n,o){n.isInterleavedBufferAttribute&&(n=n.data);var s=i.get(n);if(s===void 0)i.set(n,e(n,o));else if(s.version<n.version){var l=n,h=l.array,c=l.updateRange;t.bindBuffer(o,s.buffer),l.dynamic===!1?t.bufferData(o,h,35044):c.count===-1?t.bufferSubData(o,0,h):c.count===0?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(o,c.offset*h.BYTES_PER_ELEMENT,h.subarray(c.offset,c.offset+c.count)),c.count=-1),s.version=n.version}}}}function S(t,e,i,n,o,s){this.a=t,this.b=e,this.c=i,this.normal=n&&n.isVector3?n:new m,this.vertexNormals=Array.isArray(n)?n:[],this.color=o&&o.isColor?o:new b,this.vertexColors=Array.isArray(o)?o:[],this.materialIndex=s!==void 0?s:0}function x(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._order=n||x.DefaultOrder}function U(){this.mask=1}function z(){Object.defineProperty(this,"id",{value:fh++}),this.uuid=pi.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=z.DefaultUp.clone();var t=new m,e=new x,i=new H,n=new m(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 nt},normalMatrix:{value:new P}}),this.matrix=new nt,this.matrixWorld=new nt,this.matrixAutoUpdate=z.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 j(){Object.defineProperty(this,"id",{value:ph+=2}),this.uuid=pi.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 lt(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 ft(t,e,i){lt.call(this,new Int8Array(t),e,i)}function gt(t,e,i){lt.call(this,new Uint8Array(t),e,i)}function Nt(t,e,i){lt.call(this,new Uint8ClampedArray(t),e,i)}function at(t,e,i){lt.call(this,new Int16Array(t),e,i)}function Et(t,e,i){lt.call(this,new Uint16Array(t),e,i)}function I(t,e,i){lt.call(this,new Int32Array(t),e,i)}function zt(t,e,i){lt.call(this,new Uint32Array(t),e,i)}function Pt(t,e,i){lt.call(this,new Float32Array(t),e,i)}function Rt(t,e,i){lt.call(this,new Float64Array(t),e,i)}function ge(){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 ue(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:dh+=2}),this.uuid=pi.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 Dt(t,e,i,n,o,s){j.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:o,depthSegments:s},this.fromBufferGeometry(new kt(t,e,i,n,o,s)),this.mergeVertices()}function kt(t,e,i,n,o,s){function l(N,W,Q,_t,mt,bt,xt,Vt,V,tt,Ot){var ee=bt/V,$t=xt/tt,qt=bt/2,Te=xt/2,pe=Vt/2;xt=V+1;var Ie=tt+1,be=bt=0,se,We,Ke=new m;for(We=0;We<Ie;We++){var fi=We*$t-Te;for(se=0;se<xt;se++)Ke[N]=(se*ee-qt)*_t,Ke[W]=fi*mt,Ke[Q]=pe,f.push(Ke.x,Ke.y,Ke.z),Ke[N]=0,Ke[W]=0,Ke[Q]=0<Vt?1:-1,v.push(Ke.x,Ke.y,Ke.z),y.push(se/V),y.push(1-We/tt),bt+=1}for(We=0;We<tt;We++)for(se=0;se<V;se++)N=M+se+xt*(We+1),W=M+(se+1)+xt*(We+1),Q=M+(se+1)+xt*We,c.push(M+se+xt*We,N,Q),c.push(N,W,Q),be+=6;h.addGroup(C,be,Ot),C+=be,M+=bt}Ft.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:o,depthSegments:s};var h=this;t=t||1,e=e||1,i=i||1,n=Math.floor(n)||1,o=Math.floor(o)||1,s=Math.floor(s)||1;var c=[],f=[],v=[],y=[],M=0,C=0;l("z","y","x",-1,-1,i,e,t,s,o,0),l("z","y","x",1,-1,i,e,-t,s,o,1),l("x","z","y",1,1,t,i,e,n,s,2),l("x","z","y",1,-1,t,i,-e,n,s,3),l("x","y","z",1,-1,t,e,i,n,o,4),l("x","y","z",-1,-1,t,e,-i,n,o,5),this.setIndex(c),this.addAttribute("position",new Pt(f,3)),this.addAttribute("normal",new Pt(v,3)),this.addAttribute("uv",new Pt(y,2))}function Fe(t,e,i,n){j.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new xe(t,e,i,n)),this.mergeVertices()}function xe(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,s=e/2;i=Math.floor(i)||1,n=Math.floor(n)||1;var l=i+1,h=n+1,c=t/i,f=e/n,v=[],y=[],M=[],C=[];for(t=0;t<h;t++){var N=t*f-s;for(e=0;e<l;e++)y.push(e*c-o,-N,0),M.push(0,0,1),C.push(e/i),C.push(1-t/n)}for(t=0;t<n;t++)for(e=0;e<i;e++)o=e+l*(t+1),s=e+1+l*(t+1),h=e+1+l*t,v.push(e+l*t,o,h),v.push(o,s,h);this.setIndex(v),this.addAttribute("position",new Pt(y,3)),this.addAttribute("normal",new Pt(M,3)),this.addAttribute("uv",new Pt(C,2))}function Zt(){Object.defineProperty(this,"id",{value:Vl++}),this.uuid=pi.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 ti(t){Zt.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 In(t,e){this.origin=t!==void 0?t:new S,this.direction=e!==void 0?e:new S}function ni(t,e,i){this.a=t!==void 0?t:new S,this.b=e!==void 0?e:new S,this.c=i!==void 0?i:new S}function ci(t){Oe.call(this),this.type="MeshBasicMaterial",this.color=new Y(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.lights=this.morphTargets=this.skinning=!1,this.setValues(t)}function Fi(t,e){z.call(this),this.type="Mesh",this.geometry=t!==void 0?t:new Ft,this.material=e!==void 0?e:new ci({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function yr(t,e,i,n){function o(p,f){e.buffers.color.setClear(p.r,p.g,p.b,f,n)}var s=new Y(0),l=0,h,c;return{getClearColor:function(){return s},setClearColor:function(p,f){s.set(p),l=f!==void 0?f:1,o(s,l)},getClearAlpha:function(){return l},setClearAlpha:function(p){l=p,o(s,l)},render:function(p,f,d,v){f=f.background,f===null?o(s,l):f&&f.isColor&&(o(f,1),v=!0),(t.autoClear||v)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),f&&(f.isCubeTexture||f.isWebGLRenderTargetCube)?(c===void 0&&(c=new Fi(new Ii(1,1,1),new Pi({type:"BackgroundCubeMaterial",uniforms:_n.clone(kr.cube.uniforms),vertexShader:kr.cube.vertexShader,fragmentShader:kr.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1})),c.geometry.removeAttribute("normal"),c.geometry.removeAttribute("uv"),c.onBeforeRender=function(w,P,R){this.matrixWorld.copyPosition(R.matrixWorld)},i.update(c)),c.material.uniforms.tCube.value=f.isWebGLRenderTargetCube?f.texture:f,c.material.uniforms.tFlip.value=f.isWebGLRenderTargetCube?1:-1,p.push(c,c.geometry,c.material,0,null)):f&&f.isTexture&&(h===void 0&&(h=new Fi(new Ji(2,2),new Pi({type:"BackgroundMaterial",uniforms:_n.clone(kr.background.uniforms),vertexShader:kr.background.vertexShader,fragmentShader:kr.background.fragmentShader,side:0,depthTest:!0,depthWrite:!1,fog:!1})),h.geometry.removeAttribute("normal"),i.update(h)),h.material.uniforms.t2D.value=f,f.matrixAutoUpdate===!0&&f.updateMatrix(),h.material.uniforms.uvTransform.value.copy(f.matrix),p.push(h,h.geometry,h.material,0,null))}}}function Lr(t,e,i,n){var o;this.setMode=function(s){o=s},this.render=function(s,l){t.drawArrays(o,s,l),i.update(l,o)},this.renderInstances=function(s,l,h){if(n.isWebGL2)var c=t;else if(c=e.get("ANGLE_instanced_arrays"),c===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}c[n.isWebGL2?"drawArraysInstanced":"drawArraysInstancedANGLE"](o,l,h,s.maxInstancedCount),i.update(h,o,s.maxInstancedCount)}}function $n(t,e,i){function n(Q){if(Q==="highp"){if(0<t.getShaderPrecisionFormat(35633,36338).precision&&0<t.getShaderPrecisionFormat(35632,36338).precision)return"highp";Q="mediump"}return Q==="mediump"&&0<t.getShaderPrecisionFormat(35633,36337).precision&&0<t.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var o,s=typeof WebGL2RenderingContext<"u"&&t instanceof WebGL2RenderingContext,l=i.precision!==void 0?i.precision:"highp",h=n(l);h!==l&&(console.warn("THREE.WebGLRenderer:",l,"not supported, using",h,"instead."),l=h),i=i.logarithmicDepthBuffer===!0,h=t.getParameter(34930);var c=t.getParameter(35660),p=t.getParameter(3379),f=t.getParameter(34076),d=t.getParameter(34921),v=t.getParameter(36347),w=t.getParameter(36348),P=t.getParameter(36349),R=0<c,I=s||!!e.get("OES_texture_float");return{isWebGL2:s,getMaxAnisotropy:function(){if(o!==void 0)return o;var Q=e.get("EXT_texture_filter_anisotropic");return o=Q!==null?t.getParameter(Q.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:n,precision:l,logarithmicDepthBuffer:i,maxTextures:h,maxVertexTextures:c,maxTextureSize:p,maxCubemapSize:f,maxAttributes:d,maxVertexUniforms:v,maxVaryings:w,maxFragmentUniforms:P,vertexTextures:R,floatFragmentTextures:I,floatVertexTextures:R&&I}}function Gi(){function t(){p.value!==n&&(p.value=n,p.needsUpdate=0<o),i.numPlanes=o,i.numIntersection=0}function e(f,d,v,w){var P=f!==null?f.length:0,R=null;if(P!==0){if(R=p.value,w!==!0||R===null)for(w=v+4*P,d=d.matrixWorldInverse,c.getNormalMatrix(d),(R===null||R.length<w)&&(R=new Float32Array(w)),w=0;w!==P;++w,v+=4)h.copy(f[w]).applyMatrix4(d,c),h.normal.toArray(R,v),R[v+3]=h.constant;p.value=R,p.needsUpdate=!0}return i.numPlanes=P,R}var i=this,n=null,o=0,s=!1,l=!1,h=new Ct,c=new Mt,p={value:null,needsUpdate:!1};this.uniform=p,this.numIntersection=this.numPlanes=0,this.init=function(f,d,v){var w=f.length!==0||d||o!==0||s;return s=d,n=e(f,v,0),o=f.length,w},this.beginShadows=function(){l=!0,e(null)},this.endShadows=function(){l=!1,t()},this.setState=function(f,d,v,w,P,R){if(!s||f===null||f.length===0||l&&!v)l?e(null):t();else{v=l?0:o;var I=4*v,Q=P.clippingState||null;for(p.value=Q,Q=e(f,w,I,R),f=0;f!==I;++f)Q[f]=n[f];P.clippingState=Q,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=v}}}function Gn(t){var e={};return{get:function(i){if(e[i]!==void 0)return e[i];switch(i){case"WEBGL_depth_texture":var n=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=t.getExtension(i)}return n===null&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),e[i]=n}}}function sn(t,e,i){function n(l){var h=l.target;l=o[h.id],l.index!==null&&e.remove(l.index);for(var c in l.attributes)e.remove(l.attributes[c]);h.removeEventListener("dispose",n),delete o[h.id],(c=s[l.id])&&(e.remove(c),delete s[l.id]),i.memory.geometries--}var o={},s={};return{get:function(l,h){var c=o[h.id];return c||(h.addEventListener("dispose",n),h.isBufferGeometry?c=h:h.isGeometry&&(h._bufferGeometry===void 0&&(h._bufferGeometry=new Ft().setFromObject(l)),c=h._bufferGeometry),o[h.id]=c,i.memory.geometries++,c)},update:function(l){var h=l.index,c=l.attributes;h!==null&&e.update(h,34963);for(var p in c)e.update(c[p],34962);l=l.morphAttributes;for(p in l){h=l[p],c=0;for(var f=h.length;c<f;c++)e.update(h[c],34962)}},getWireframeAttribute:function(l){var h=s[l.id];if(h)return h;h=[];var c=l.index,p=l.attributes;if(c!==null){c=c.array,p=0;for(var f=c.length;p<f;p+=3){var d=c[p+0],v=c[p+1],w=c[p+2];h.push(d,v,v,w,w,d)}}else for(c=p.position.array,p=0,f=c.length/3-1;p<f;p+=3)d=p+0,v=p+1,w=p+2,h.push(d,v,v,w,w,d);return h=new(65535<on(h)?we:re)(h,1),e.update(h,34963),s[l.id]=h}}}function Je(t,e,i,n){var o,s,l;this.setMode=function(h){o=h},this.setIndex=function(h){s=h.type,l=h.bytesPerElement},this.render=function(h,c){t.drawElements(o,c,s,h*l),i.update(c,o)},this.renderInstances=function(h,c,p){if(n.isWebGL2)var f=t;else if(f=e.get("ANGLE_instanced_arrays"),f===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}f[n.isWebGL2?"drawElementsInstanced":"drawElementsInstancedANGLE"](o,p,s,c*l,h.maxInstancedCount),i.update(p,o,h.maxInstancedCount)}}function wn(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(i,n,o){switch(o=o||1,e.calls++,n){case 4:e.triangles+=i/3*o;break;case 5:case 6:e.triangles+=o*(i-2);break;case 1:e.lines+=i/2*o;break;case 3:e.lines+=o*(i-1);break;case 2:e.lines+=o*i;break;case 0:e.points+=o*i;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function ho(t,e){return Math.abs(e[1])-Math.abs(t[1])}function Hn(t){var e={},i=new Float32Array(8);return{update:function(n,o,s,l){var h=n.morphTargetInfluences,c=h.length;if(n=e[o.id],n===void 0){n=[];for(var p=0;p<c;p++)n[p]=[p,0];e[o.id]=n}var f=s.morphTargets&&o.morphAttributes.position;for(s=s.morphNormals&&o.morphAttributes.normal,p=0;p<c;p++){var d=n[p];d[1]!==0&&(f&&o.removeAttribute("morphTarget"+p),s&&o.removeAttribute("morphNormal"+p))}for(p=0;p<c;p++)d=n[p],d[0]=p,d[1]=h[p];for(n.sort(ho),p=0;8>p;p++){if((d=n[p])&&(h=d[0],c=d[1])){f&&o.addAttribute("morphTarget"+p,f[h]),s&&o.addAttribute("morphNormal"+p,s[h]),i[p]=c;continue}i[p]=0}l.getUniforms().setValue(t,"morphTargetInfluences",i)}}}function Bi(t,e){var i={};return{update:function(n){var o=e.render.frame,s=n.geometry,l=t.get(n,s);return i[l.id]!==o&&(s.isGeometry&&l.updateFromObject(n),t.update(l),i[l.id]=o),l},dispose:function(){i={}}}}function A(t,e,i,n,o,s,l,h,c,p){t=t!==void 0?t:[],kt.call(this,t,e!==void 0?e:301,i,n,o,s,l,h,c,p),this.flipY=!1}function k(t,e,i,n){kt.call(this,null),this.image={data:t,width:e,height:i,depth:n},this.minFilter=this.magFilter=1003,this.flipY=this.generateMipmaps=!1}function j(t,e,i){var n=t[0];if(0>=n||0<n)return t;var o=e*i,s=Ha[o];if(s===void 0&&(s=new Float32Array(o),Ha[o]=s),e!==0)for(n.toArray(s,0),n=1,o=0;n!==e;++n)o+=i,t[n].toArray(s,o);return s}function q(t,e){if(t.length!==e.length)return!1;for(var i=0,n=t.length;i<n;i++)if(t[i]!==e[i])return!1;return!0}function ht(t,e){for(var i=0,n=e.length;i<n;i++)t[i]=e[i]}function Lt(t,e){var i=Ds[e];i===void 0&&(i=new Int32Array(e),Ds[e]=i);for(var n=0;n!==e;++n)i[n]=t.allocTextureUnit();return i}function Gt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1f(this.addr,e),i[0]=e)}function Pt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1i(this.addr,e),i[0]=e)}function Ae(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),i[0]=e.x,i[1]=e.y):q(i,e)||(t.uniform2fv(this.addr,e),ht(i,e))}function Se(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y||i[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),i[0]=e.x,i[1]=e.y,i[2]=e.z):e.r!==void 0?(i[0]!==e.r||i[1]!==e.g||i[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),i[0]=e.r,i[1]=e.g,i[2]=e.b):q(i,e)||(t.uniform3fv(this.addr,e),ht(i,e))}function te(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y||i[2]!==e.z||i[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),i[0]=e.x,i[1]=e.y,i[2]=e.z,i[3]=e.w):q(i,e)||(t.uniform4fv(this.addr,e),ht(i,e))}function Pe(t,e){var i=this.cache,n=e.elements;n===void 0?q(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),ht(i,e)):q(i,n)||(ml.set(n),t.uniformMatrix2fv(this.addr,!1,ml),ht(i,n))}function pi(t,e){var i=this.cache,n=e.elements;n===void 0?q(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),ht(i,e)):q(i,n)||(Wl.set(n),t.uniformMatrix3fv(this.addr,!1,Wl),ht(i,n))}function Mi(t,e){var i=this.cache,n=e.elements;n===void 0?q(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),ht(i,e)):q(i,n)||(da.set(n),t.uniformMatrix4fv(this.addr,!1,da),ht(i,n))}function ti(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTexture2D(e||dl,o)}function gi(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTexture3D(e||ph,o)}function Zr(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTextureCube(e||Vl,o)}function sr(t,e){var i=this.cache;q(i,e)||(t.uniform2iv(this.addr,e),ht(i,e))}function $i(t,e){var i=this.cache;q(i,e)||(t.uniform3iv(this.addr,e),ht(i,e))}function ss(t,e){var i=this.cache;q(i,e)||(t.uniform4iv(this.addr,e),ht(i,e))}function Di(t){switch(t){case 5126:return Gt;case 35664:return Ae;case 35665:return Se;case 35666:return te;case 35674:return Pe;case 35675:return pi;case 35676:return Mi;case 35678:case 36198:return ti;case 35679:return gi;case 35680:return Zr;case 5124:case 35670:return Pt;case 35667:case 35671:return sr;case 35668:case 35672:return $i;case 35669:case 35673:return ss}}function Qa(t,e){var i=this.cache;q(i,e)||(t.uniform1fv(this.addr,e),ht(i,e))}function Cr(t,e){var i=this.cache;q(i,e)||(t.uniform1iv(this.addr,e),ht(i,e))}function Ta(t,e){var i=this.cache;e=j(e,this.size,2),q(i,e)||(t.uniform2fv(this.addr,e),this.updateCache(e))}function an(t,e){var i=this.cache;e=j(e,this.size,3),q(i,e)||(t.uniform3fv(this.addr,e),this.updateCache(e))}function as(t,e){var i=this.cache;e=j(e,this.size,4),q(i,e)||(t.uniform4fv(this.addr,e),this.updateCache(e))}function Lo(t,e){var i=this.cache;e=j(e,this.size,4),q(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),this.updateCache(e))}function Qn(t,e){var i=this.cache;e=j(e,this.size,9),q(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),this.updateCache(e))}function ls(t,e){var i=this.cache;e=j(e,this.size,16),q(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),this.updateCache(e))}function Hs(t,e,i){var n=this.cache,o=e.length,s=Lt(i,o);for(q(n,s)===!1&&(t.uniform1iv(this.addr,s),ht(n,s)),t=0;t!==o;++t)i.setTexture2D(e[t]||dl,s[t])}function Sa(t,e,i){var n=this.cache,o=e.length,s=Lt(i,o);for(q(n,s)===!1&&(t.uniform1iv(this.addr,s),ht(n,s)),t=0;t!==o;++t)i.setTextureCube(e[t]||Vl,s[t])}function Rr(t){switch(t){case 5126:return Qa;case 35664:return Ta;case 35665:return an;case 35666:return as;case 35674:return Lo;case 35675:return Qn;case 35676:return ls;case 35678:return Hs;case 35680:return Sa;case 5124:case 35670:return Cr;case 35667:case 35671:return sr;case 35668:case 35672:return $i;case 35669:case 35673:return ss}}function Ka(t,e,i){this.id=t,this.addr=i,this.cache=[],this.setValue=Di(e.type)}function hs(t,e,i){this.id=t,this.addr=i,this.cache=[],this.size=e.size,this.setValue=Rr(e.type)}function ks(t){this.id=t,this.seq=[],this.map={}}function br(t,e,i){this.seq=[],this.map={},this.renderer=i,i=t.getProgramParameter(e,35718);for(var n=0;n<i;++n){var o=t.getActiveUniform(e,n),s=t.getUniformLocation(e,o.name),l=this,h=o.name,c=h.length;for(gl.lastIndex=0;;){var p=gl.exec(h),f=gl.lastIndex,d=p[1],v=p[3];if(p[2]==="]"&&(d|=0),v===void 0||v==="["&&f+2===c){h=l,o=v===void 0?new Ka(d,o,s):new hs(d,o,s),h.seq.push(o),h.map[o.id]=o;break}else v=l.map[d],v===void 0&&(v=new ks(d),d=l,l=v,d.seq.push(l),d.map[l.id]=l),l=v}}}function Vs(t){t=t.split(`
|
|
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 ki(t,e){this.origin=t!==void 0?t:new m,this.direction=e!==void 0?e:new m}function Oe(t,e,i){this.a=t!==void 0?t:new m,this.b=e!==void 0?e:new m,this.c=i!==void 0?i:new m}function Ge(t){Zt.call(this),this.type="MeshBasicMaterial",this.color=new b(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 di(t,e){z.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 Ri(t,e,i,n){function o(f,v){e.buffers.color.setClear(f.r,f.g,f.b,v,n)}var s=new b(0),l=0,h,c;return{getClearColor:function(){return s},setClearColor:function(f,v){s.set(f),l=v!==void 0?v:1,o(s,l)},getClearAlpha:function(){return l},setClearAlpha:function(f){l=f,o(s,l)},render:function(f,v,y,M){v=v.background,v===null?o(s,l):v&&v.isColor&&(o(v,1),M=!0),(t.autoClear||M)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),v&&(v.isCubeTexture||v.isWebGLRenderTargetCube)?(c===void 0&&(c=new di(new kt(1,1,1),new ti({type:"BackgroundCubeMaterial",uniforms:Pn.clone(jr.cube.uniforms),vertexShader:jr.cube.vertexShader,fragmentShader:jr.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1})),c.geometry.removeAttribute("normal"),c.geometry.removeAttribute("uv"),c.onBeforeRender=function(C,N,W){this.matrixWorld.copyPosition(W.matrixWorld)},i.update(c)),c.material.uniforms.tCube.value=v.isWebGLRenderTargetCube?v.texture:v,c.material.uniforms.tFlip.value=v.isWebGLRenderTargetCube?1:-1,f.push(c,c.geometry,c.material,0,null)):v&&v.isTexture&&(h===void 0&&(h=new di(new xe(2,2),new ti({type:"BackgroundMaterial",uniforms:Pn.clone(jr.background.uniforms),vertexShader:jr.background.vertexShader,fragmentShader:jr.background.fragmentShader,side:0,depthTest:!0,depthWrite:!1,fog:!1})),h.geometry.removeAttribute("normal"),i.update(h)),h.material.uniforms.t2D.value=v,v.matrixAutoUpdate===!0&&v.updateMatrix(),h.material.uniforms.uvTransform.value.copy(v.matrix),f.push(h,h.geometry,h.material,0,null))}}}function hn(t,e,i,n){var o;this.setMode=function(s){o=s},this.render=function(s,l){t.drawArrays(o,s,l),i.update(l,o)},this.renderInstances=function(s,l,h){if(n.isWebGL2)var c=t;else if(c=e.get("ANGLE_instanced_arrays"),c===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}c[n.isWebGL2?"drawArraysInstanced":"drawArraysInstancedANGLE"](o,l,h,s.maxInstancedCount),i.update(h,o,s.maxInstancedCount)}}function Ji(t,e,i){function n(_t){if(_t==="highp"){if(0<t.getShaderPrecisionFormat(35633,36338).precision&&0<t.getShaderPrecisionFormat(35632,36338).precision)return"highp";_t="mediump"}return _t==="mediump"&&0<t.getShaderPrecisionFormat(35633,36337).precision&&0<t.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var o,s=typeof WebGL2RenderingContext<"u"&&t instanceof WebGL2RenderingContext,l=i.precision!==void 0?i.precision:"highp",h=n(l);h!==l&&(console.warn("THREE.WebGLRenderer:",l,"not supported, using",h,"instead."),l=h),i=i.logarithmicDepthBuffer===!0,h=t.getParameter(34930);var c=t.getParameter(35660),f=t.getParameter(3379),v=t.getParameter(34076),y=t.getParameter(34921),M=t.getParameter(36347),C=t.getParameter(36348),N=t.getParameter(36349),W=0<c,Q=s||!!e.get("OES_texture_float");return{isWebGL2:s,getMaxAnisotropy:function(){if(o!==void 0)return o;var _t=e.get("EXT_texture_filter_anisotropic");return o=_t!==null?t.getParameter(_t.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:n,precision:l,logarithmicDepthBuffer:i,maxTextures:h,maxVertexTextures:c,maxTextureSize:f,maxCubemapSize:v,maxAttributes:y,maxVertexUniforms:M,maxVaryings:C,maxFragmentUniforms:N,vertexTextures:W,floatFragmentTextures:Q,floatVertexTextures:W&&Q}}function R(){function t(){f.value!==n&&(f.value=n,f.needsUpdate=0<o),i.numPlanes=o,i.numIntersection=0}function e(v,y,M,C){var N=v!==null?v.length:0,W=null;if(N!==0){if(W=f.value,C!==!0||W===null)for(C=M+4*N,y=y.matrixWorldInverse,c.getNormalMatrix(y),(W===null||W.length<C)&&(W=new Float32Array(C)),C=0;C!==N;++C,M+=4)h.copy(v[C]).applyMatrix4(y,c),h.normal.toArray(W,M),W[M+3]=h.constant;f.value=W,f.needsUpdate=!0}return i.numPlanes=N,W}var i=this,n=null,o=0,s=!1,l=!1,h=new q,c=new P,f={value:null,needsUpdate:!1};this.uniform=f,this.numIntersection=this.numPlanes=0,this.init=function(v,y,M){var C=v.length!==0||y||o!==0||s;return s=y,n=e(v,M,0),o=v.length,C},this.beginShadows=function(){l=!0,e(null)},this.endShadows=function(){l=!1,t()},this.setState=function(v,y,M,C,N,W){if(!s||v===null||v.length===0||l&&!M)l?e(null):t();else{M=l?0:o;var Q=4*M,_t=N.clippingState||null;for(f.value=_t,_t=e(v,C,Q,W),v=0;v!==Q;++v)_t[v]=n[v];N.clippingState=_t,this.numIntersection=y?this.numPlanes:0,this.numPlanes+=M}}}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 Wt(t,e,i){function n(l){var h=l.target;l=o[h.id],l.index!==null&&e.remove(l.index);for(var c in l.attributes)e.remove(l.attributes[c]);h.removeEventListener("dispose",n),delete o[h.id],(c=s[l.id])&&(e.remove(c),delete s[l.id]),i.memory.geometries--}var o={},s={};return{get:function(l,h){var c=o[h.id];return c||(h.addEventListener("dispose",n),h.isBufferGeometry?c=h:h.isGeometry&&(h._bufferGeometry===void 0&&(h._bufferGeometry=new Ft().setFromObject(l)),c=h._bufferGeometry),o[h.id]=c,i.memory.geometries++,c)},update:function(l){var h=l.index,c=l.attributes;h!==null&&e.update(h,34963);for(var f in c)e.update(c[f],34962);l=l.morphAttributes;for(f in l){h=l[f],c=0;for(var v=h.length;c<v;c++)e.update(h[c],34962)}},getWireframeAttribute:function(l){var h=s[l.id];if(h)return h;h=[];var c=l.index,f=l.attributes;if(c!==null){c=c.array,f=0;for(var v=c.length;f<v;f+=3){var y=c[f+0],M=c[f+1],C=c[f+2];h.push(y,M,M,C,C,y)}}else for(c=f.position.array,f=0,v=c.length/3-1;f<v;f+=3)y=f+0,M=f+1,C=f+2,h.push(y,M,M,C,C,y);return h=new(65535<ue(h)?zt:Et)(h,1),e.update(h,34963),s[l.id]=h}}}function ct(t,e,i,n){var o,s,l;this.setMode=function(h){o=h},this.setIndex=function(h){s=h.type,l=h.bytesPerElement},this.render=function(h,c){t.drawElements(o,c,s,h*l),i.update(c,o)},this.renderInstances=function(h,c,f){if(n.isWebGL2)var v=t;else if(v=e.get("ANGLE_instanced_arrays"),v===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}v[n.isWebGL2?"drawElementsInstanced":"drawElementsInstancedANGLE"](o,f,s,c*l,h.maxInstancedCount),i.update(f,o,h.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 Lt(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,s,l){var h=n.morphTargetInfluences,c=h.length;if(n=e[o.id],n===void 0){n=[];for(var f=0;f<c;f++)n[f]=[f,0];e[o.id]=n}var v=s.morphTargets&&o.morphAttributes.position;for(s=s.morphNormals&&o.morphAttributes.normal,f=0;f<c;f++){var y=n[f];y[1]!==0&&(v&&o.removeAttribute("morphTarget"+f),s&&o.removeAttribute("morphNormal"+f))}for(f=0;f<c;f++)y=n[f],y[0]=f,y[1]=h[f];for(n.sort(Lt),f=0;8>f;f++){if((y=n[f])&&(h=y[0],c=y[1])){v&&o.addAttribute("morphTarget"+f,v[h]),s&&o.addAttribute("morphNormal"+f,s[h]),i[f]=c;continue}i[f]=0}l.getUniforms().setValue(t,"morphTargetInfluences",i)}}}function Kt(t,e){var i={};return{update:function(n){var o=e.render.frame,s=n.geometry,l=t.get(n,s);return i[l.id]!==o&&(s.isGeometry&&l.updateFromObject(n),t.update(l),i[l.id]=o),l},dispose:function(){i={}}}}function w(t,e,i,n,o,s,l,h,c,f){t=t!==void 0?t:[],D.call(this,t,e!==void 0?e:301,i,n,o,s,l,h,c,f),this.flipY=!1}function X(t,e,i,n){D.call(this,null),this.image={data:t,width:e,height:i,depth:n},this.minFilter=this.magFilter=1003,this.flipY=this.generateMipmaps=!1}function et(t,e,i){var n=t[0];if(0>=n||0<n)return t;var o=e*i,s=Va[o];if(s===void 0&&(s=new Float32Array(o),Va[o]=s),e!==0)for(n.toArray(s,0),n=1,o=0;n!==e;++n)o+=i,t[n].toArray(s,o);return s}function K(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=Bs[e];i===void 0&&(i=new Int32Array(e),Bs[e]=i);for(var n=0;n!==e;++n)i[n]=t.allocTextureUnit();return i}function Xt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1f(this.addr,e),i[0]=e)}function jt(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):K(i,e)||(t.uniform2fv(this.addr,e),vt(i,e))}function Re(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):K(i,e)||(t.uniform3fv(this.addr,e),vt(i,e))}function de(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):K(i,e)||(t.uniform4fv(this.addr,e),vt(i,e))}function we(t,e){var i=this.cache,n=e.elements;n===void 0?K(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),vt(i,e)):K(i,n)||(gl.set(n),t.uniformMatrix2fv(this.addr,!1,gl),vt(i,n))}function yi(t,e){var i=this.cache,n=e.elements;n===void 0?K(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),vt(i,e)):K(i,n)||(jl.set(n),t.uniformMatrix3fv(this.addr,!1,jl),vt(i,n))}function Si(t,e){var i=this.cache,n=e.elements;n===void 0?K(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),vt(i,e)):K(i,n)||(ga.set(n),t.uniformMatrix4fv(this.addr,!1,ga),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||ml,o)}function Ei(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTexture3D(e||mh,o)}function Tr(t,e,i){var n=this.cache,o=i.allocTextureUnit();n[0]!==o&&(t.uniform1i(this.addr,o),n[0]=o),i.setTextureCube(e||Wl,o)}function Xn(t,e){var i=this.cache;K(i,e)||(t.uniform2iv(this.addr,e),vt(i,e))}function nn(t,e){var i=this.cache;K(i,e)||(t.uniform3iv(this.addr,e),vt(i,e))}function Kr(t,e){var i=this.cache;K(i,e)||(t.uniform4iv(this.addr,e),vt(i,e))}function Oi(t){switch(t){case 5126:return Xt;case 35664:return Ne;case 35665:return Re;case 35666:return de;case 35674:return we;case 35675:return yi;case 35676:return Si;case 35678:case 36198:return ni;case 35679:return Ei;case 35680:return Tr;case 5124:case 35670:return jt;case 35667:case 35671:return Xn;case 35668:case 35672:return nn;case 35669:case 35673:return Kr}}function fo(t,e){var i=this.cache;K(i,e)||(t.uniform1fv(this.addr,e),vt(i,e))}function Or(t,e){var i=this.cache;K(i,e)||(t.uniform1iv(this.addr,e),vt(i,e))}function Ea(t,e){var i=this.cache;e=et(e,this.size,2),K(i,e)||(t.uniform2fv(this.addr,e),this.updateCache(e))}function gn(t,e){var i=this.cache;e=et(e,this.size,3),K(i,e)||(t.uniform3fv(this.addr,e),this.updateCache(e))}function hs(t,e){var i=this.cache;e=et(e,this.size,4),K(i,e)||(t.uniform4fv(this.addr,e),this.updateCache(e))}function Ro(t,e){var i=this.cache;e=et(e,this.size,4),K(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),this.updateCache(e))}function ir(t,e){var i=this.cache;e=et(e,this.size,9),K(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),this.updateCache(e))}function us(t,e){var i=this.cache;e=et(e,this.size,16),K(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),this.updateCache(e))}function Vs(t,e,i){var n=this.cache,o=e.length,s=Gt(i,o);for(K(n,s)===!1&&(t.uniform1iv(this.addr,s),vt(n,s)),t=0;t!==o;++t)i.setTexture2D(e[t]||ml,s[t])}function ba(t,e,i){var n=this.cache,o=e.length,s=Gt(i,o);for(K(n,s)===!1&&(t.uniform1iv(this.addr,s),vt(n,s)),t=0;t!==o;++t)i.setTextureCube(e[t]||Wl,s[t])}function Ir(t){switch(t){case 5126:return fo;case 35664:return Ea;case 35665:return gn;case 35666:return hs;case 35674:return Ro;case 35675:return ir;case 35676:return us;case 35678:return Vs;case 35680:return ba;case 5124:case 35670:return Or;case 35667:case 35671:return Xn;case 35668:case 35672:return nn;case 35669:case 35673:return Kr}}function tl(t,e,i){this.id=t,this.addr=i,this.cache=[],this.setValue=Oi(e.type)}function cs(t,e,i){this.id=t,this.addr=i,this.cache=[],this.size=e.size,this.setValue=Ir(e.type)}function Ws(t){this.id=t,this.seq=[],this.map={}}function Dr(t,e,i){this.seq=[],this.map={},this.renderer=i,i=t.getProgramParameter(e,35718);for(var n=0;n<i;++n){var o=t.getActiveUniform(e,n),s=t.getUniformLocation(e,o.name),l=this,h=o.name,c=h.length;for(vl.lastIndex=0;;){var f=vl.exec(h),v=vl.lastIndex,y=f[1],M=f[3];if(f[2]==="]"&&(y|=0),M===void 0||M==="["&&v+2===c){h=l,o=M===void 0?new tl(y,o,s):new cs(y,o,s),h.seq.push(o),h.map[o.id]=o;break}else M=l.map[y],M===void 0&&(M=new Ws(y),y=l,l=M,y.seq.push(l),y.map[l.id]=l),l=M}}}function js(t){t=t.split(`
|
|
256
256
|
`);for(var e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join(`
|
|
257
|
-
`)}function
|
|
258
|
-
`)}function
|
|
259
|
-
`)}function
|
|
257
|
+
`)}function fs(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),js(i)),n}function ps(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 zr(t,e){return e=ps(e),"vec4 "+t+"( vec4 value ) { return "+e[0]+"ToLinear"+e[1]+"; }"}function Aa(t,e){return e=ps(e),"vec4 "+t+"( vec4 value ) { return LinearTo"+e[0]+e[1]+"; }"}function el(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 il(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(Io).join(`
|
|
258
|
+
`)}function Oo(t){var e=[],i;for(i in t){var n=t[i];n!==!1&&e.push("#define "+i+" "+n)}return e.join(`
|
|
259
|
+
`)}function Io(t){return t!==""}function Pa(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 Ca(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function Mr(t){return t.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,function(e,i){if(e=bi[i],e===void 0)throw Error("Can not resolve #include <"+i+">");return Mr(e)})}function L(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 Y(t,e,i,n,o,s,l){var h=t.context,c=n.defines,f=o.vertexShader,v=o.fragmentShader,y="SHADOWMAP_TYPE_BASIC";s.shadowMapType===1?y="SHADOWMAP_TYPE_PCF":s.shadowMapType===2&&(y="SHADOWMAP_TYPE_PCF_SOFT");var M="ENVMAP_TYPE_CUBE",C="ENVMAP_MODE_REFLECTION",N="ENVMAP_BLENDING_MULTIPLY";if(s.envMap){switch(n.envMap.mapping){case 301:case 302:M="ENVMAP_TYPE_CUBE";break;case 306:case 307:M="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:M="ENVMAP_TYPE_EQUIREC";break;case 305:M="ENVMAP_TYPE_SPHERE"}switch(n.envMap.mapping){case 302:case 304:C="ENVMAP_MODE_REFRACTION"}switch(n.combine){case 0:N="ENVMAP_BLENDING_MULTIPLY";break;case 1:N="ENVMAP_BLENDING_MIX";break;case 2:N="ENVMAP_BLENDING_ADD"}}var W=0<t.gammaFactor?t.gammaFactor:1,Q=l.isWebGL2?"":il(n.extensions,s,e),_t=Oo(c),mt=h.createProgram();n.isRawShaderMaterial?(c=[_t].filter(Io).join(`
|
|
260
260
|
`),0<c.length&&(c+=`
|
|
261
|
-
`),e=[
|
|
261
|
+
`),e=[Q,_t].filter(Io).join(`
|
|
262
262
|
`),0<e.length&&(e+=`
|
|
263
|
-
`)):(c=["precision "+s.precision+" float;","precision "+s.precision+" int;","#define SHADER_NAME "+o.name,
|
|
264
|
-
`].filter(
|
|
265
|
-
`),e=[
|
|
266
|
-
`].filter(
|
|
267
|
-
`)),
|
|
263
|
+
`)):(c=["precision "+s.precision+" float;","precision "+s.precision+" int;","#define SHADER_NAME "+o.name,_t,s.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+W,"#define MAX_BONES "+s.maxBones,s.useFog&&s.fog?"#define USE_FOG":"",s.useFog&&s.fogExp?"#define FOG_EXP2":"",s.map?"#define USE_MAP":"",s.envMap?"#define USE_ENVMAP":"",s.envMap?"#define "+C:"",s.lightMap?"#define USE_LIGHTMAP":"",s.aoMap?"#define USE_AOMAP":"",s.emissiveMap?"#define USE_EMISSIVEMAP":"",s.bumpMap?"#define USE_BUMPMAP":"",s.normalMap?"#define USE_NORMALMAP":"",s.normalMap&&s.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",s.displacementMap&&s.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",s.specularMap?"#define USE_SPECULARMAP":"",s.roughnessMap?"#define USE_ROUGHNESSMAP":"",s.metalnessMap?"#define USE_METALNESSMAP":"",s.alphaMap?"#define USE_ALPHAMAP":"",s.vertexColors?"#define USE_COLOR":"",s.flatShading?"#define FLAT_SHADED":"",s.skinning?"#define USE_SKINNING":"",s.useVertexTexture?"#define BONE_TEXTURE":"",s.morphTargets?"#define USE_MORPHTARGETS":"",s.morphNormals&&s.flatShading===!1?"#define USE_MORPHNORMALS":"",s.doubleSided?"#define DOUBLE_SIDED":"",s.flipSided?"#define FLIP_SIDED":"",s.shadowMapEnabled?"#define USE_SHADOWMAP":"",s.shadowMapEnabled?"#define "+y:"",s.sizeAttenuation?"#define USE_SIZEATTENUATION":"",s.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",s.logarithmicDepthBuffer&&(l.isWebGL2||e.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR"," attribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",`
|
|
264
|
+
`].filter(Io).join(`
|
|
265
|
+
`),e=[Q,"precision "+s.precision+" float;","precision "+s.precision+" int;","#define SHADER_NAME "+o.name,_t,s.alphaTest?"#define ALPHATEST "+s.alphaTest+(s.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+W,s.useFog&&s.fog?"#define USE_FOG":"",s.useFog&&s.fogExp?"#define FOG_EXP2":"",s.map?"#define USE_MAP":"",s.envMap?"#define USE_ENVMAP":"",s.envMap?"#define "+M:"",s.envMap?"#define "+C:"",s.envMap?"#define "+N:"",s.lightMap?"#define USE_LIGHTMAP":"",s.aoMap?"#define USE_AOMAP":"",s.emissiveMap?"#define USE_EMISSIVEMAP":"",s.bumpMap?"#define USE_BUMPMAP":"",s.normalMap?"#define USE_NORMALMAP":"",s.normalMap&&s.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",s.specularMap?"#define USE_SPECULARMAP":"",s.roughnessMap?"#define USE_ROUGHNESSMAP":"",s.metalnessMap?"#define USE_METALNESSMAP":"",s.alphaMap?"#define USE_ALPHAMAP":"",s.vertexColors?"#define USE_COLOR":"",s.gradientMap?"#define USE_GRADIENTMAP":"",s.flatShading?"#define FLAT_SHADED":"",s.doubleSided?"#define DOUBLE_SIDED":"",s.flipSided?"#define FLIP_SIDED":"",s.shadowMapEnabled?"#define USE_SHADOWMAP":"",s.shadowMapEnabled?"#define "+y:"",s.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",s.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",s.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",s.logarithmicDepthBuffer&&(l.isWebGL2||e.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"",s.envMap&&(l.isWebGL2||e.get("EXT_shader_texture_lod"))?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",s.toneMapping!==0?"#define TONE_MAPPING":"",s.toneMapping!==0?bi.tonemapping_pars_fragment:"",s.toneMapping!==0?el("toneMapping",s.toneMapping):"",s.dithering?"#define DITHERING":"",s.outputEncoding||s.mapEncoding||s.matcapEncoding||s.envMapEncoding||s.emissiveMapEncoding?bi.encodings_pars_fragment:"",s.mapEncoding?zr("mapTexelToLinear",s.mapEncoding):"",s.matcapEncoding?zr("matcapTexelToLinear",s.matcapEncoding):"",s.envMapEncoding?zr("envMapTexelToLinear",s.envMapEncoding):"",s.emissiveMapEncoding?zr("emissiveMapTexelToLinear",s.emissiveMapEncoding):"",s.outputEncoding?Aa("linearToOutputTexel",s.outputEncoding):"",s.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",`
|
|
266
|
+
`].filter(Io).join(`
|
|
267
|
+
`)),f=Mr(f),f=Pa(f,s),f=Ca(f,s),v=Mr(v),v=Pa(v,s),v=Ca(v,s),f=L(f),v=L(v),l.isWebGL2&&!n.isRawShaderMaterial&&(l=!1,y=/^\s*#version\s+300\s+es\s*\n/,n.isShaderMaterial&&f.match(y)!==null&&v.match(y)!==null&&(l=!0,f=f.replace(y,""),v=v.replace(y,"")),c=`#version 300 es
|
|
268
268
|
|
|
269
269
|
#define attribute in
|
|
270
270
|
#define varying out
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
#define texture2DProjGradEXT textureProjGrad
|
|
283
283
|
#define textureCubeGradEXT textureGrad`].join(`
|
|
284
284
|
`)+`
|
|
285
|
-
`+e),f=e+f,p=us(h,35633,c+p),f=us(h,35632,f),h.attachShader(W,p),h.attachShader(W,f),n.index0AttributeName!==void 0?h.bindAttribLocation(W,0,n.index0AttributeName):s.morphTargets===!0&&h.bindAttribLocation(W,0,"position"),h.linkProgram(W),s=h.getProgramInfoLog(W).trim(),l=h.getShaderInfoLog(p).trim(),d=h.getShaderInfoLog(f).trim(),w=v=!0,h.getProgramParameter(W,35714)===!1?(v=!1,console.error("THREE.WebGLProgram: shader error: ",h.getError(),"35715",h.getProgramParameter(W,35715),"gl.getProgramInfoLog",s,l,d)):s!==""?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",s):(l===""||d==="")&&(w=!1),w&&(this.diagnostics={runnable:v,material:n,programLog:s,vertexShader:{log:l,prefix:c},fragmentShader:{log:d,prefix:e}}),h.deleteShader(p),h.deleteShader(f);var st;this.getUniforms=function(){return st===void 0&&(st=new br(h,W,t)),st};var K;return this.getAttributes=function(){if(K===void 0){for(var wt={},C=h.getProgramParameter(W,35721),D=0;D<C;D++){var ct=h.getActiveAttrib(W,D).name;wt[ct]=h.getAttribLocation(W,ct)}K=wt}return K},this.destroy=function(){h.deleteProgram(W),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=o.name,this.id=ro++,this.code=i,this.usedTimes=1,this.program=W,this.vertexShader=p,this.fragmentShader=f,this}function U(t,e,i){function n(h,c){if(h)h.isTexture?p=h.encoding:h.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),p=h.texture.encoding);else var p=3e3;return p===3e3&&c&&(p=3007),p}var o=[],s={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},l="precision supportsVertexTextures map mapEncoding matcapEncoding envMap envMapMode envMapEncoding lightMap aoMap emissiveMap emissiveMapEncoding bumpMap normalMap objectSpaceNormalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap combine vertexColors fog useFog fogExp flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights numRectAreaLights shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes numClipIntersection depthPacking dithering".split(" ");this.getParameters=function(h,c,p,f,d,v,w){var P=s[h.type];if(w.isSkinnedMesh){var R=w.skeleton.bones;if(i.floatVertexTextures)R=1024;else{var I=Math.min(Math.floor((i.maxVertexUniforms-20)/4),R.length);I<R.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+R.length+" bones. This GPU supports "+I+"."),R=0):R=I}}else R=0;I=i.precision,h.precision!==null&&(I=i.getMaxPrecision(h.precision),I!==h.precision&&console.warn("THREE.WebGLProgram.getParameters:",h.precision,"not supported, using",I,"instead."));var Q=t.getRenderTarget();return{shaderID:P,precision:I,supportsVertexTextures:i.vertexTextures,outputEncoding:n(Q?Q.texture:null,t.gammaOutput),map:!!h.map,mapEncoding:n(h.map,t.gammaInput),matcap:!!h.matcap,matcapEncoding:n(h.matcap,t.gammaInput),envMap:!!h.envMap,envMapMode:h.envMap&&h.envMap.mapping,envMapEncoding:n(h.envMap,t.gammaInput),envMapCubeUV:!!h.envMap&&(h.envMap.mapping===306||h.envMap.mapping===307),lightMap:!!h.lightMap,aoMap:!!h.aoMap,emissiveMap:!!h.emissiveMap,emissiveMapEncoding:n(h.emissiveMap,t.gammaInput),bumpMap:!!h.bumpMap,normalMap:!!h.normalMap,objectSpaceNormalMap:h.normalMapType===1,displacementMap:!!h.displacementMap,roughnessMap:!!h.roughnessMap,metalnessMap:!!h.metalnessMap,specularMap:!!h.specularMap,alphaMap:!!h.alphaMap,gradientMap:!!h.gradientMap,combine:h.combine,vertexColors:h.vertexColors,fog:!!f,useFog:h.fog,fogExp:f&&f.isFogExp2,flatShading:h.flatShading,sizeAttenuation:h.sizeAttenuation,logarithmicDepthBuffer:i.logarithmicDepthBuffer,skinning:h.skinning&&0<R,maxBones:R,useVertexTexture:i.floatVertexTextures,morphTargets:h.morphTargets,morphNormals:h.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:c.directional.length,numPointLights:c.point.length,numSpotLights:c.spot.length,numRectAreaLights:c.rectArea.length,numHemiLights:c.hemi.length,numClippingPlanes:d,numClipIntersection:v,dithering:h.dithering,shadowMapEnabled:t.shadowMap.enabled&&w.receiveShadow&&0<p.length,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:h.premultipliedAlpha,alphaTest:h.alphaTest,doubleSided:h.side===2,flipSided:h.side===1,depthPacking:h.depthPacking!==void 0?h.depthPacking:!1}},this.getProgramCode=function(h,c){var p=[];if(c.shaderID?p.push(c.shaderID):(p.push(h.fragmentShader),p.push(h.vertexShader)),h.defines!==void 0)for(var f in h.defines)p.push(f),p.push(h.defines[f]);for(f=0;f<l.length;f++)p.push(c[l[f]]);return p.push(h.onBeforeCompile.toString()),p.push(t.gammaOutput),p.push(t.gammaFactor),p.join()},this.acquireProgram=function(h,c,p,f){for(var d,v=0,w=o.length;v<w;v++){var P=o[v];if(P.code===f){d=P,++d.usedTimes;break}}return d===void 0&&(d=new b(t,e,f,h,c,p,i),o.push(d)),d},this.releaseProgram=function(h){if(--h.usedTimes===0){var c=o.indexOf(h);o[c]=o[o.length-1],o.pop(),h.destroy()}},this.programs=o}function N(){var t=new WeakMap;return{get:function(e){var i=t.get(e);return i===void 0&&(i={},t.set(e,i)),i},remove:function(e){t.delete(e)},update:function(e,i,n){t.get(e)[i]=n},dispose:function(){t=new WeakMap}}}function T(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function rt(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function F(){var t=[],e=0,i=[],n=[];return{opaque:i,transparent:n,init:function(){e=0,i.length=0,n.length=0},push:function(o,s,l,h,c){var p=t[e];p===void 0?(p={id:o.id,object:o,geometry:s,material:l,program:l.program,renderOrder:o.renderOrder,z:h,group:c},t[e]=p):(p.id=o.id,p.object=o,p.geometry=s,p.material=l,p.program=l.program,p.renderOrder=o.renderOrder,p.z=h,p.group=c),(l.transparent===!0?n:i).push(p),e++},sort:function(){1<i.length&&i.sort(T),1<n.length&&n.sort(rt)}}}function ut(){var t={};return{get:function(e,i){return e=e.id+","+i.id,i=t[e],i===void 0&&(i=new F,t[e]=i),i},dispose:function(){t={}}}}function xt(){var t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];switch(e.type){case"DirectionalLight":var i={direction:new S,color:new Y,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new _};break;case"SpotLight":i={position:new S,direction:new S,color:new Y,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new _};break;case"PointLight":i={position:new S,color:new Y,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new _,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":i={direction:new S,skyColor:new Y,groundColor:new Y};break;case"RectAreaLight":i={color:new Y,position:new S,halfWidth:new S,halfHeight:new S}}return t[e.id]=i}}}function ft(){var t=new xt,e={id:vl++,hash:{stateID:-1,directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,shadowsLength:-1},ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},i=new S,n=new pt,o=new pt;return{setup:function(s,l,h){var c=0,p=0,f=0,d=0,v=0,w=0,P=0,R=0;h=h.matrixWorldInverse;for(var I=0,Q=s.length;I<Q;I++){var W=s[I],st=W.color,K=W.intensity,wt=W.distance,C=W.shadow&&W.shadow.map?W.shadow.map.texture:null;if(W.isAmbientLight)c+=st.r*K,p+=st.g*K,f+=st.b*K;else if(W.isDirectionalLight){var D=t.get(W);D.color.copy(W.color).multiplyScalar(W.intensity),D.direction.setFromMatrixPosition(W.matrixWorld),i.setFromMatrixPosition(W.target.matrixWorld),D.direction.sub(i),D.direction.transformDirection(h),(D.shadow=W.castShadow)&&(st=W.shadow,D.shadowBias=st.bias,D.shadowRadius=st.radius,D.shadowMapSize=st.mapSize),e.directionalShadowMap[d]=C,e.directionalShadowMatrix[d]=W.shadow.matrix,e.directional[d]=D,d++}else W.isSpotLight?(D=t.get(W),D.position.setFromMatrixPosition(W.matrixWorld),D.position.applyMatrix4(h),D.color.copy(st).multiplyScalar(K),D.distance=wt,D.direction.setFromMatrixPosition(W.matrixWorld),i.setFromMatrixPosition(W.target.matrixWorld),D.direction.sub(i),D.direction.transformDirection(h),D.coneCos=Math.cos(W.angle),D.penumbraCos=Math.cos(W.angle*(1-W.penumbra)),D.decay=W.decay,(D.shadow=W.castShadow)&&(st=W.shadow,D.shadowBias=st.bias,D.shadowRadius=st.radius,D.shadowMapSize=st.mapSize),e.spotShadowMap[w]=C,e.spotShadowMatrix[w]=W.shadow.matrix,e.spot[w]=D,w++):W.isRectAreaLight?(D=t.get(W),D.color.copy(st).multiplyScalar(K),D.position.setFromMatrixPosition(W.matrixWorld),D.position.applyMatrix4(h),o.identity(),n.copy(W.matrixWorld),n.premultiply(h),o.extractRotation(n),D.halfWidth.set(.5*W.width,0,0),D.halfHeight.set(0,.5*W.height,0),D.halfWidth.applyMatrix4(o),D.halfHeight.applyMatrix4(o),e.rectArea[P]=D,P++):W.isPointLight?(D=t.get(W),D.position.setFromMatrixPosition(W.matrixWorld),D.position.applyMatrix4(h),D.color.copy(W.color).multiplyScalar(W.intensity),D.distance=W.distance,D.decay=W.decay,(D.shadow=W.castShadow)&&(st=W.shadow,D.shadowBias=st.bias,D.shadowRadius=st.radius,D.shadowMapSize=st.mapSize,D.shadowCameraNear=st.camera.near,D.shadowCameraFar=st.camera.far),e.pointShadowMap[v]=C,e.pointShadowMatrix[v]=W.shadow.matrix,e.point[v]=D,v++):W.isHemisphereLight&&(D=t.get(W),D.direction.setFromMatrixPosition(W.matrixWorld),D.direction.transformDirection(h),D.direction.normalize(),D.skyColor.copy(W.color).multiplyScalar(K),D.groundColor.copy(W.groundColor).multiplyScalar(K),e.hemi[R]=D,R++)}e.ambient[0]=c,e.ambient[1]=p,e.ambient[2]=f,e.directional.length=d,e.spot.length=w,e.rectArea.length=P,e.point.length=v,e.hemi.length=R,e.hash.stateID=e.id,e.hash.directionalLength=d,e.hash.pointLength=v,e.hash.spotLength=w,e.hash.rectAreaLength=P,e.hash.hemiLength=R,e.hash.shadowsLength=l.length},state:e}}function et(){var t=new ft,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 Xt(){var t={};return{get:function(e,i){if(t[e.id]===void 0){var n=new et;t[e.id]={},t[e.id][i.id]=n}else t[e.id][i.id]===void 0?(n=new et,t[e.id][i.id]=n):n=t[e.id][i.id];return n},dispose:function(){t={}}}}function Vt(t){Oe.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.lights=this.fog=!1,this.setValues(t)}function It(t){Oe.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new S,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.lights=this.fog=!1,this.setValues(t)}function Kt(t,e,i){function n(C,D,ct,Dt,bt,St){var oe=C.geometry,$t=d,me=C.customDepthMaterial;return ct&&($t=v,me=C.customDistanceMaterial),me?$t=me:(me=!1,D.morphTargets&&(oe&&oe.isBufferGeometry?me=oe.morphAttributes&&oe.morphAttributes.position&&0<oe.morphAttributes.position.length:oe&&oe.isGeometry&&(me=oe.morphTargets&&0<oe.morphTargets.length)),C.isSkinnedMesh&&D.skinning===!1&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",C),C=C.isSkinnedMesh&&D.skinning,oe=0,me&&(oe|=1),C&&(oe|=2),$t=$t[oe]),t.localClippingEnabled&&D.clipShadows===!0&&D.clippingPlanes.length!==0&&(oe=$t.uuid,me=D.uuid,C=w[oe],C===void 0&&(C={},w[oe]=C),oe=C[me],oe===void 0&&(oe=$t.clone(),C[me]=oe),$t=oe),$t.visible=D.visible,$t.wireframe=D.wireframe,$t.side=D.shadowSide!=null?D.shadowSide:P[D.side],$t.clipShadows=D.clipShadows,$t.clippingPlanes=D.clippingPlanes,$t.clipIntersection=D.clipIntersection,$t.wireframeLinewidth=D.wireframeLinewidth,$t.linewidth=D.linewidth,ct&&$t.isMeshDistanceMaterial&&($t.referencePosition.copy(Dt),$t.nearDistance=bt,$t.farDistance=St),$t}function o(C,D,ct,Dt){if(C.visible!==!1){if(C.layers.test(D.layers)&&(C.isMesh||C.isLine||C.isPoints)&&C.castShadow&&(!C.frustumCulled||s.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(ct.matrixWorldInverse,C.matrixWorld);var bt=e.update(C),St=C.material;if(Array.isArray(St))for(var oe=bt.groups,$t=0,me=oe.length;$t<me;$t++){var ue=oe[$t],Wt=St[ue.materialIndex];Wt&&Wt.visible&&(Wt=n(C,Wt,Dt,f,ct.near,ct.far),t.renderBufferDirect(ct,null,bt,Wt,C,ue))}else St.visible&&(Wt=n(C,St,Dt,f,ct.near,ct.far),t.renderBufferDirect(ct,null,bt,Wt,C,null))}for(C=C.children,bt=0,St=C.length;bt<St;bt++)o(C[bt],D,ct,Dt)}}var s=new at,l=new pt,h=new _,c=new _(i,i),p=new S,f=new S,d=Array(4),v=Array(4),w={},P={0:1,1:0,2:2},R=[new S(1,0,0),new S(-1,0,0),new S(0,0,1),new S(0,0,-1),new S(0,1,0),new S(0,-1,0)],I=[new S(0,1,0),new S(0,1,0),new S(0,1,0),new S(0,1,0),new S(0,0,1),new S(0,0,-1)],Q=[new nt,new nt,new nt,new nt,new nt,new nt];for(i=0;i!==4;++i){var W=(i&1)!==0,st=(i&2)!==0,K=new Vt({depthPacking:3201,morphTargets:W,skinning:st});d[i]=K,W=new It({morphTargets:W,skinning:st}),v[i]=W}var wt=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(C,D,ct){if(wt.enabled!==!1&&(wt.autoUpdate!==!1||wt.needsUpdate!==!1)&&C.length!==0){var Dt=t.state;Dt.disable(3042),Dt.buffers.color.setClear(1,1,1,1),Dt.buffers.depth.setTest(!0),Dt.setScissorTest(!1);for(var bt,St=0,oe=C.length;St<oe;St++){var $t=C[St];bt=$t.shadow;var me=$t&&$t.isPointLight;if(bt===void 0)console.warn("THREE.WebGLShadowMap:",$t,"has no shadow.");else{var ue=bt.camera;if(h.copy(bt.mapSize),h.min(c),me){var Wt=h.x,Ee=h.y;Q[0].set(2*Wt,Ee,Wt,Ee),Q[1].set(0,Ee,Wt,Ee),Q[2].set(3*Wt,Ee,Wt,Ee),Q[3].set(Wt,Ee,Wt,Ee),Q[4].set(3*Wt,0,Wt,Ee),Q[5].set(Wt,0,Wt,Ee),h.x*=4,h.y*=2}for(bt.map===null&&(bt.map=new Tt(h.x,h.y,{minFilter:1003,magFilter:1003,format:1023}),bt.map.texture.name=$t.name+".shadowMap",ue.updateProjectionMatrix()),bt.isSpotLightShadow&&bt.update($t),Wt=bt.map,Ee=bt.matrix,f.setFromMatrixPosition($t.matrixWorld),ue.position.copy(f),me?(bt=6,Ee.makeTranslation(-f.x,-f.y,-f.z)):(bt=1,p.setFromMatrixPosition($t.target.matrixWorld),ue.lookAt(p),ue.updateMatrixWorld(),Ee.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),Ee.multiply(ue.projectionMatrix),Ee.multiply(ue.matrixWorldInverse)),t.setRenderTarget(Wt),t.clear(),$t=0;$t<bt;$t++)me&&(p.copy(ue.position),p.add(R[$t]),ue.up.copy(I[$t]),ue.lookAt(p),ue.updateMatrixWorld(),Dt.viewport(Q[$t])),l.multiplyMatrices(ue.projectionMatrix,ue.matrixWorldInverse),s.setFromMatrix(l),o(D,ct,ue,me)}}wt.needsUpdate=!1}}}function qt(t,e,i,n){function o(yt,be,Fe){var Ai=new Uint8Array(4),pe=t.createTexture();for(t.bindTexture(yt,pe),t.texParameteri(yt,10241,9728),t.texParameteri(yt,10240,9728),yt=0;yt<Fe;yt++)t.texImage2D(be+yt,0,6408,1,1,0,6408,5121,Ai);return pe}function s(yt,be){Q[yt]=1,W[yt]===0&&(t.enableVertexAttribArray(yt),W[yt]=1),st[yt]!==be&&((n.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](yt,be),st[yt]=be)}function l(yt){K[yt]!==!0&&(t.enable(yt),K[yt]=!0)}function h(yt){K[yt]!==!1&&(t.disable(yt),K[yt]=!1)}function c(yt,be,Fe,Ai,pe,Ce,He,fi){if(yt===0)D&&(h(3042),D=!1);else if(D||(l(3042),D=!0),yt!==5){if(yt!==ct||fi!==ue){if((Dt!==100||oe!==100)&&(t.blendEquation(32774),oe=Dt=100),fi)switch(yt){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: ",yt)}else switch(yt){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: ",yt)}me=$t=St=bt=null,ct=yt,ue=fi}}else pe=pe||be,Ce=Ce||Fe,He=He||Ai,(be!==Dt||pe!==oe)&&(t.blendEquationSeparate(i.convert(be),i.convert(pe)),Dt=be,oe=pe),(Fe!==bt||Ai!==St||Ce!==$t||He!==me)&&(t.blendFuncSeparate(i.convert(Fe),i.convert(Ai),i.convert(Ce),i.convert(He)),bt=Fe,St=Ai,$t=Ce,me=He),ct=yt,ue=null}function p(yt){Wt!==yt&&(yt?t.frontFace(2304):t.frontFace(2305),Wt=yt)}function f(yt){yt!==0?(l(2884),yt!==Ee&&(yt===1?t.cullFace(1029):yt===2?t.cullFace(1028):t.cullFace(1032))):h(2884),Ee=yt}function d(yt,be,Fe){yt?(l(32823),(Ze!==be||cn!==Fe)&&(t.polygonOffset(be,Fe),Ze=be,cn=Fe)):h(32823)}function v(yt){yt===void 0&&(yt=33984+en-1),Ei!==yt&&(t.activeTexture(yt),Ei=yt)}var w=new function(){var yt=!1,be=new nt,Fe=null,Ai=new nt(0,0,0,0);return{setMask:function(pe){Fe===pe||yt||(t.colorMask(pe,pe,pe,pe),Fe=pe)},setLocked:function(pe){yt=pe},setClear:function(pe,Ce,He,fi,ui){ui===!0&&(pe*=fi,Ce*=fi,He*=fi),be.set(pe,Ce,He,fi),Ai.equals(be)===!1&&(t.clearColor(pe,Ce,He,fi),Ai.copy(be))},reset:function(){yt=!1,Fe=null,Ai.set(-1,0,0,0)}}},P=new function(){var yt=!1,be=null,Fe=null,Ai=null;return{setTest:function(pe){pe?l(2929):h(2929)},setMask:function(pe){be===pe||yt||(t.depthMask(pe),be=pe)},setFunc:function(pe){if(Fe!==pe){if(pe)switch(pe){case 0:t.depthFunc(512);break;case 1:t.depthFunc(519);break;case 2:t.depthFunc(513);break;case 3:t.depthFunc(515);break;case 4:t.depthFunc(514);break;case 5:t.depthFunc(518);break;case 6:t.depthFunc(516);break;case 7:t.depthFunc(517);break;default:t.depthFunc(515)}else t.depthFunc(515);Fe=pe}},setLocked:function(pe){yt=pe},setClear:function(pe){Ai!==pe&&(t.clearDepth(pe),Ai=pe)},reset:function(){yt=!1,Ai=Fe=be=null}}},R=new function(){var yt=!1,be=null,Fe=null,Ai=null,pe=null,Ce=null,He=null,fi=null,ui=null;return{setTest:function(Bt){Bt?l(2960):h(2960)},setMask:function(Bt){be===Bt||yt||(t.stencilMask(Bt),be=Bt)},setFunc:function(Bt,Ge,Ie){(Fe!==Bt||Ai!==Ge||pe!==Ie)&&(t.stencilFunc(Bt,Ge,Ie),Fe=Bt,Ai=Ge,pe=Ie)},setOp:function(Bt,Ge,Ie){(Ce!==Bt||He!==Ge||fi!==Ie)&&(t.stencilOp(Bt,Ge,Ie),Ce=Bt,He=Ge,fi=Ie)},setLocked:function(Bt){yt=Bt},setClear:function(Bt){ui!==Bt&&(t.clearStencil(Bt),ui=Bt)},reset:function(){yt=!1,ui=fi=He=Ce=pe=Ai=Fe=be=null}}},I=t.getParameter(34921),Q=new Uint8Array(I),W=new Uint8Array(I),st=new Uint8Array(I),K={},wt=null,C=null,D=null,ct=null,Dt=null,bt=null,St=null,oe=null,$t=null,me=null,ue=!1,Wt=null,Ee=null,Be=null,Ze=null,cn=null,en=t.getParameter(35661),Ri=!1;I=0,I=t.getParameter(7938),I.indexOf("WebGL")!==-1?(I=parseFloat(/^WebGL ([0-9])/.exec(I)[1]),Ri=1<=I):I.indexOf("OpenGL ES")!==-1&&(I=parseFloat(/^OpenGL ES ([0-9])/.exec(I)[1]),Ri=2<=I);var Ei=null,Vi={},pn=new nt,ce=new nt,Ue={};return Ue[3553]=o(3553,3553,1),Ue[34067]=o(34067,34069,6),w.setClear(0,0,0,1),P.setClear(1),R.setClear(0),l(2929),P.setFunc(3),p(!1),f(1),l(2884),c(0),{buffers:{color:w,depth:P,stencil:R},initAttributes:function(){for(var yt=0,be=Q.length;yt<be;yt++)Q[yt]=0},enableAttribute:function(yt){s(yt,0)},enableAttributeAndDivisor:s,disableUnusedAttributes:function(){for(var yt=0,be=W.length;yt!==be;++yt)W[yt]!==Q[yt]&&(t.disableVertexAttribArray(yt),W[yt]=0)},enable:l,disable:h,getCompressedTextureFormats:function(){if(wt===null&&(wt=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var yt=t.getParameter(34467),be=0;be<yt.length;be++)wt.push(yt[be]);return wt},useProgram:function(yt){return C!==yt?(t.useProgram(yt),C=yt,!0):!1},setBlending:c,setMaterial:function(yt,be){yt.side===2?h(2884):l(2884);var Fe=yt.side===1;be&&(Fe=!Fe),p(Fe),yt.blending===1&&yt.transparent===!1?c(0):c(yt.blending,yt.blendEquation,yt.blendSrc,yt.blendDst,yt.blendEquationAlpha,yt.blendSrcAlpha,yt.blendDstAlpha,yt.premultipliedAlpha),P.setFunc(yt.depthFunc),P.setTest(yt.depthTest),P.setMask(yt.depthWrite),w.setMask(yt.colorWrite),d(yt.polygonOffset,yt.polygonOffsetFactor,yt.polygonOffsetUnits)},setFlipSided:p,setCullFace:f,setLineWidth:function(yt){yt!==Be&&(Ri&&t.lineWidth(yt),Be=yt)},setPolygonOffset:d,setScissorTest:function(yt){yt?l(3089):h(3089)},activeTexture:v,bindTexture:function(yt,be){Ei===null&&v();var Fe=Vi[Ei];Fe===void 0&&(Fe={type:void 0,texture:void 0},Vi[Ei]=Fe),(Fe.type!==yt||Fe.texture!==be)&&(t.bindTexture(yt,be||Ue[yt]),Fe.type=yt,Fe.texture=be)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(yt){console.error("THREE.WebGLState:",yt)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(yt){console.error("THREE.WebGLState:",yt)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(yt){console.error("THREE.WebGLState:",yt)}},scissor:function(yt){pn.equals(yt)===!1&&(t.scissor(yt.x,yt.y,yt.z,yt.w),pn.copy(yt))},viewport:function(yt){ce.equals(yt)===!1&&(t.viewport(yt.x,yt.y,yt.z,yt.w),ce.copy(yt))},reset:function(){for(var yt=0;yt<W.length;yt++)W[yt]===1&&(t.disableVertexAttribArray(yt),W[yt]=0);K={},Ei=wt=null,Vi={},Ee=Wt=ct=C=null,w.reset(),P.reset(),R.reset()}}}function Le(t,e,i,n,o,s,l){function h(C,D){if(C.width>D||C.height>D){if("data"in C){console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+C.width+"x"+C.height+").");return}D/=Math.max(C.width,C.height);var ct=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return ct.width=Math.floor(C.width*D),ct.height=Math.floor(C.height*D),ct.getContext("2d").drawImage(C,0,0,C.width,C.height,0,0,ct.width,ct.height),console.warn("THREE.WebGLRenderer: image is too big ("+C.width+"x"+C.height+"). Resized to "+ct.width+"x"+ct.height),ct}return C}function c(C){return $e.isPowerOfTwo(C.width)&&$e.isPowerOfTwo(C.height)}function p(C,D){return C.generateMipmaps&&D&&C.minFilter!==1003&&C.minFilter!==1006}function f(C,D,ct,Dt){t.generateMipmap(C),n.get(D).__maxMipLevel=Math.log(Math.max(ct,Dt))*Math.LOG2E}function d(C,D){if(!o.isWebGL2)return C;if(C===6403){if(D===5126)return 33326;if(D===5131)return 33325;if(D===5121)return 33321}if(C===6407){if(D===5126)return 34837;if(D===5131)return 34843;if(D===5121)return 32849}if(C===6408){if(D===5126)return 34836;if(D===5131)return 34842;if(D===5121)return 32856}return C}function v(C){return C===1003||C===1004||C===1005?9728:9729}function w(C){C=C.target,C.removeEventListener("dispose",w);t:{var D=n.get(C);if(C.image&&D.__image__webglTextureCube)t.deleteTexture(D.__image__webglTextureCube);else{if(D.__webglInit===void 0)break t;t.deleteTexture(D.__webglTexture)}n.remove(C)}C.isVideoTexture&&delete K[C.id],l.memory.textures--}function P(C){C=C.target,C.removeEventListener("dispose",P);var D=n.get(C),ct=n.get(C.texture);if(C){if(ct.__webglTexture!==void 0&&t.deleteTexture(ct.__webglTexture),C.depthTexture&&C.depthTexture.dispose(),C.isWebGLRenderTargetCube)for(ct=0;6>ct;ct++)t.deleteFramebuffer(D.__webglFramebuffer[ct]),D.__webglDepthbuffer&&t.deleteRenderbuffer(D.__webglDepthbuffer[ct]);else t.deleteFramebuffer(D.__webglFramebuffer),D.__webglDepthbuffer&&t.deleteRenderbuffer(D.__webglDepthbuffer);n.remove(C.texture),n.remove(C)}l.memory.textures--}function R(C,D){var ct=n.get(C);if(C.isVideoTexture){var Dt=C.id,bt=l.render.frame;K[Dt]!==bt&&(K[Dt]=bt,C.update())}if(0<C.version&&ct.__version!==C.version)if(Dt=C.image,Dt===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(Dt.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Q(ct,C,D);return}i.activeTexture(33984+D),i.bindTexture(3553,ct.__webglTexture)}function I(C,D,ct){ct?(t.texParameteri(C,10242,s.convert(D.wrapS)),t.texParameteri(C,10243,s.convert(D.wrapT)),t.texParameteri(C,10240,s.convert(D.magFilter)),t.texParameteri(C,10241,s.convert(D.minFilter))):(t.texParameteri(C,10242,33071),t.texParameteri(C,10243,33071),D.wrapS===1001&&D.wrapT===1001||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(C,10240,v(D.magFilter)),t.texParameteri(C,10241,v(D.minFilter)),D.minFilter!==1003&&D.minFilter!==1006&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!(ct=e.get("EXT_texture_filter_anisotropic"))||D.type===1015&&e.get("OES_texture_float_linear")===null||D.type===1016&&(o.isWebGL2||e.get("OES_texture_half_float_linear"))===null||!(1<D.anisotropy||n.get(D).__currentAnisotropy)||(t.texParameterf(C,ct.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(D.anisotropy,o.getMaxAnisotropy())),n.get(D).__currentAnisotropy=D.anisotropy)}function Q(C,D,ct){var Dt=D.isDataTexture3D?32879:3553;C.__webglInit===void 0&&(C.__webglInit=!0,D.addEventListener("dispose",w),C.__webglTexture=t.createTexture(),l.memory.textures++),i.activeTexture(33984+ct),i.bindTexture(Dt,C.__webglTexture),t.pixelStorei(37440,D.flipY),t.pixelStorei(37441,D.premultiplyAlpha),t.pixelStorei(3317,D.unpackAlignment),ct=h(D.image,o.maxTextureSize);var bt=o.isWebGL2?!1:D.wrapS!==1001||D.wrapT!==1001||D.minFilter!==1003&&D.minFilter!==1006;bt&&c(ct)===!1&&(ct instanceof HTMLImageElement||ct instanceof HTMLCanvasElement||ct instanceof ImageBitmap)&&(wt===void 0&&(wt=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),wt.width=$e.floorPowerOfTwo(ct.width),wt.height=$e.floorPowerOfTwo(ct.height),wt.getContext("2d").drawImage(ct,0,0,wt.width,wt.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+ct.width+"x"+ct.height+"). Resized to "+wt.width+"x"+wt.height),ct=wt),bt=c(ct);var St=s.convert(D.format),oe=s.convert(D.type),$t=d(St,oe);I(Dt,D,bt);var me=D.mipmaps;if(D.isDepthTexture){if($t=6402,D.type===1015){if(!o.isWebGL2)throw Error("Float Depth Texture only supported in WebGL2.0");$t=36012}else o.isWebGL2&&($t=33189);D.format===1026&&$t===6402&&D.type!==1012&&D.type!==1014&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),D.type=1012,oe=s.convert(D.type)),D.format===1027&&($t=34041,D.type!==1020&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),D.type=1020,oe=s.convert(D.type))),i.texImage2D(3553,0,$t,ct.width,ct.height,0,St,oe,null)}else if(D.isDataTexture)if(0<me.length&&bt){for(var ue=0,Wt=me.length;ue<Wt;ue++)Dt=me[ue],i.texImage2D(3553,ue,$t,Dt.width,Dt.height,0,St,oe,Dt.data);D.generateMipmaps=!1,C.__maxMipLevel=me.length-1}else i.texImage2D(3553,0,$t,ct.width,ct.height,0,St,oe,ct.data),C.__maxMipLevel=0;else if(D.isCompressedTexture){for(ue=0,Wt=me.length;ue<Wt;ue++)Dt=me[ue],D.format!==1023&&D.format!==1022?-1<i.getCompressedTextureFormats().indexOf(St)?i.compressedTexImage2D(3553,ue,$t,Dt.width,Dt.height,0,Dt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):i.texImage2D(3553,ue,$t,Dt.width,Dt.height,0,St,oe,Dt.data);C.__maxMipLevel=me.length-1}else if(D.isDataTexture3D)i.texImage3D(32879,0,$t,ct.width,ct.height,ct.depth,0,St,oe,ct.data),C.__maxMipLevel=0;else if(0<me.length&&bt){for(ue=0,Wt=me.length;ue<Wt;ue++)Dt=me[ue],i.texImage2D(3553,ue,$t,St,oe,Dt);D.generateMipmaps=!1,C.__maxMipLevel=me.length-1}else i.texImage2D(3553,0,$t,St,oe,ct),C.__maxMipLevel=0;p(D,bt)&&f(3553,D,ct.width,ct.height),C.__version=D.version,D.onUpdate&&D.onUpdate(D)}function W(C,D,ct,Dt){var bt=s.convert(D.texture.format),St=s.convert(D.texture.type),oe=d(bt,St);i.texImage2D(Dt,0,oe,D.width,D.height,0,bt,St,null),t.bindFramebuffer(36160,C),t.framebufferTexture2D(36160,ct,Dt,n.get(D.texture).__webglTexture,0),t.bindFramebuffer(36160,null)}function st(C,D){t.bindRenderbuffer(36161,C),D.depthBuffer&&!D.stencilBuffer?(t.renderbufferStorage(36161,33189,D.width,D.height),t.framebufferRenderbuffer(36160,36096,36161,C)):D.depthBuffer&&D.stencilBuffer?(t.renderbufferStorage(36161,34041,D.width,D.height),t.framebufferRenderbuffer(36160,33306,36161,C)):t.renderbufferStorage(36161,32854,D.width,D.height),t.bindRenderbuffer(36161,null)}var K={},wt;this.setTexture2D=R,this.setTexture3D=function(C,D){var ct=n.get(C);0<C.version&&ct.__version!==C.version?Q(ct,C,D):(i.activeTexture(33984+D),i.bindTexture(32879,ct.__webglTexture))},this.setTextureCube=function(C,D){var ct=n.get(C);if(C.image.length===6)if(0<C.version&&ct.__version!==C.version){ct.__image__webglTextureCube||(C.addEventListener("dispose",w),ct.__image__webglTextureCube=t.createTexture(),l.memory.textures++),i.activeTexture(33984+D),i.bindTexture(34067,ct.__image__webglTextureCube),t.pixelStorei(37440,C.flipY),D=C&&C.isCompressedTexture;for(var Dt=C.image[0]&&C.image[0].isDataTexture,bt=[],St=0;6>St;St++)bt[St]=D||Dt?Dt?C.image[St].image:C.image[St]:h(C.image[St],o.maxCubemapSize);var oe=bt[0],$t=c(oe),me=s.convert(C.format),ue=s.convert(C.type),Wt=d(me,ue);for(I(34067,C,$t),St=0;6>St;St++)if(D)for(var Ee,Be=bt[St].mipmaps,Ze=0,cn=Be.length;Ze<cn;Ze++)Ee=Be[Ze],C.format!==1023&&C.format!==1022?-1<i.getCompressedTextureFormats().indexOf(me)?i.compressedTexImage2D(34069+St,Ze,Wt,Ee.width,Ee.height,0,Ee.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):i.texImage2D(34069+St,Ze,Wt,Ee.width,Ee.height,0,me,ue,Ee.data);else Dt?i.texImage2D(34069+St,0,Wt,bt[St].width,bt[St].height,0,me,ue,bt[St].data):i.texImage2D(34069+St,0,Wt,me,ue,bt[St]);ct.__maxMipLevel=D?Be.length-1:0,p(C,$t)&&f(34067,C,oe.width,oe.height),ct.__version=C.version,C.onUpdate&&C.onUpdate(C)}else i.activeTexture(33984+D),i.bindTexture(34067,ct.__image__webglTextureCube)},this.setTextureCubeDynamic=function(C,D){i.activeTexture(33984+D),i.bindTexture(34067,n.get(C).__webglTexture)},this.setupRenderTarget=function(C){var D=n.get(C),ct=n.get(C.texture);C.addEventListener("dispose",P),ct.__webglTexture=t.createTexture(),l.memory.textures++;var Dt=C.isWebGLRenderTargetCube===!0,bt=c(C);if(Dt){D.__webglFramebuffer=[];for(var St=0;6>St;St++)D.__webglFramebuffer[St]=t.createFramebuffer()}else D.__webglFramebuffer=t.createFramebuffer();if(Dt){for(i.bindTexture(34067,ct.__webglTexture),I(34067,C.texture,bt),St=0;6>St;St++)W(D.__webglFramebuffer[St],C,36064,34069+St);p(C.texture,bt)&&f(34067,C.texture,C.width,C.height),i.bindTexture(34067,null)}else i.bindTexture(3553,ct.__webglTexture),I(3553,C.texture,bt),W(D.__webglFramebuffer,C,36064,3553),p(C.texture,bt)&&f(3553,C.texture,C.width,C.height),i.bindTexture(3553,null);if(C.depthBuffer){if(D=n.get(C),ct=C.isWebGLRenderTargetCube===!0,C.depthTexture){if(ct)throw Error("target.depthTexture not supported in Cube render targets");if(C&&C.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,D.__webglFramebuffer),!C.depthTexture||!C.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");if(n.get(C.depthTexture).__webglTexture&&C.depthTexture.image.width===C.width&&C.depthTexture.image.height===C.height||(C.depthTexture.image.width=C.width,C.depthTexture.image.height=C.height,C.depthTexture.needsUpdate=!0),R(C.depthTexture,0),D=n.get(C.depthTexture).__webglTexture,C.depthTexture.format===1026)t.framebufferTexture2D(36160,36096,3553,D,0);else if(C.depthTexture.format===1027)t.framebufferTexture2D(36160,33306,3553,D,0);else throw Error("Unknown depthTexture format")}else if(ct)for(D.__webglDepthbuffer=[],ct=0;6>ct;ct++)t.bindFramebuffer(36160,D.__webglFramebuffer[ct]),D.__webglDepthbuffer[ct]=t.createRenderbuffer(),st(D.__webglDepthbuffer[ct],C);else t.bindFramebuffer(36160,D.__webglFramebuffer),D.__webglDepthbuffer=t.createRenderbuffer(),st(D.__webglDepthbuffer,C);t.bindFramebuffer(36160,null)}},this.updateRenderTargetMipmap=function(C){var D=C.texture,ct=c(C);if(p(D,ct)){ct=C.isWebGLRenderTargetCube?34067:3553;var Dt=n.get(D).__webglTexture;i.bindTexture(ct,Dt),f(ct,D,C.width,C.height),i.bindTexture(ct,null)}}}function Me(t,e,i){return{convert:function(n){if(n===1e3)return 10497;if(n===1001)return 33071;if(n===1002)return 33648;if(n===1003)return 9728;if(n===1004)return 9984;if(n===1005)return 9986;if(n===1006)return 9729;if(n===1007)return 9985;if(n===1008)return 9987;if(n===1009)return 5121;if(n===1017)return 32819;if(n===1018)return 32820;if(n===1019)return 33635;if(n===1010)return 5120;if(n===1011)return 5122;if(n===1012)return 5123;if(n===1013)return 5124;if(n===1014)return 5125;if(n===1015)return 5126;if(n===1016){if(i.isWebGL2)return 5131;var o=e.get("OES_texture_half_float");if(o!==null)return o.HALF_FLOAT_OES}if(n===1021)return 6406;if(n===1022)return 6407;if(n===1023)return 6408;if(n===1024)return 6409;if(n===1025)return 6410;if(n===1026)return 6402;if(n===1027)return 34041;if(n===1028)return 6403;if(n===100)return 32774;if(n===101)return 32778;if(n===102)return 32779;if(n===200)return 0;if(n===201)return 1;if(n===202)return 768;if(n===203)return 769;if(n===204)return 770;if(n===205)return 771;if(n===206)return 772;if(n===207)return 773;if(n===208)return 774;if(n===209)return 775;if(n===210)return 776;if((n===33776||n===33777||n===33778||n===33779)&&(o=e.get("WEBGL_compressed_texture_s3tc"),o!==null)){if(n===33776)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===33777)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===33778)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===33779)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===35840||n===35841||n===35842||n===35843)&&(o=e.get("WEBGL_compressed_texture_pvrtc"),o!==null)){if(n===35840)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===35841)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===35842)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===35843)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===36196&&(o=e.get("WEBGL_compressed_texture_etc1"),o!==null))return o.COMPRESSED_RGB_ETC1_WEBGL;if((n===37808||n===37809||n===37810||n===37811||n===37812||n===37813||n===37814||n===37815||n===37816||n===37817||n===37818||n===37819||n===37820||n===37821)&&(o=e.get("WEBGL_compressed_texture_astc"),o!==null))return n;if(n===103||n===104){if(i.isWebGL2){if(n===103)return 32775;if(n===104)return 32776}if(o=e.get("EXT_blend_minmax"),o!==null){if(n===103)return o.MIN_EXT;if(n===104)return o.MAX_EXT}}if(n===1020){if(i.isWebGL2)return 34042;if(o=e.get("WEBGL_depth_texture"),o!==null)return o.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Ye(){z.call(this),this.type="Group"}function ye(){z.call(this),this.type="Camera",this.matrixWorldInverse=new pt,this.projectionMatrix=new pt,this.projectionMatrixInverse=new pt}function ee(t,e,i,n){ye.call(this),this.type="PerspectiveCamera",this.fov=t!==void 0?t:50,this.zoom=1,this.near=i!==void 0?i:.1,this.far=n!==void 0?n:2e3,this.focus=10,this.aspect=e!==void 0?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function _e(t){ee.call(this),this.cameras=t||[]}function Zt(t,e,i){So.setFromMatrixPosition(e.matrixWorld),ir.setFromMatrixPosition(i.matrixWorld);var n=So.distanceTo(ir),o=e.projectionMatrix.elements,s=i.projectionMatrix.elements,l=o[14]/(o[10]-1);i=o[14]/(o[10]+1);var h=(o[9]+1)/o[5],c=(o[9]-1)/o[5],p=(o[8]-1)/o[0],f=(s[8]+1)/s[0];o=l*p,s=l*f,f=n/(-p+f),p=f*-p,e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(p),t.translateZ(f),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.getInverse(t.matrixWorld),e=l+f,l=i+f,t.projectionMatrix.makePerspective(o-p,s+(n-p),h*i/l*e,c*i/l*e,e,l)}function Ke(t){function e(){return o!==null&&o.isPresenting===!0}function i(){if(e()){var C=o.getEyeParameters("left"),D=C.renderWidth*f;C=C.renderHeight*f,st=t.getPixelRatio(),W=t.getSize(),t.setDrawingBufferSize(2*D,C,1),wt.start()}else n.enabled&&t.setDrawingBufferSize(W.width,W.height,st),wt.stop()}var n=this,o=null,s=null,l=null,h=[],c=new pt,p=new pt,f=1,d="stage";typeof window<"u"&&"VRFrameData"in window&&(s=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",i,!1));var v=new pt,w=new gt,P=new S,R=new ee;R.bounds=new nt(0,0,.5,1),R.layers.enable(1);var I=new ee;I.bounds=new nt(.5,0,.5,1),I.layers.enable(2);var Q=new _e([R,I]);Q.layers.enable(1),Q.layers.enable(2);var W,st,K=[];this.enabled=!1,this.getController=function(C){var D=h[C];return D===void 0&&(D=new Ye,D.matrixAutoUpdate=!1,D.visible=!1,h[C]=D),D},this.getDevice=function(){return o},this.setDevice=function(C){C!==void 0&&(o=C),wt.setContext(C)},this.setFramebufferScaleFactor=function(C){f=C},this.setFrameOfReferenceType=function(C){d=C},this.setPoseTarget=function(C){C!==void 0&&(l=C)},this.getCamera=function(C){var D=d==="stage"?1.6:0;if(o===null)return C.position.set(0,D,0),C;if(o.depthNear=C.near,o.depthFar=C.far,o.getFrameData(s),d==="stage"){var ct=o.stageParameters;ct?c.fromArray(ct.sittingToStandingTransform):c.makeTranslation(0,D,0)}if(D=s.pose,ct=l!==null?l:C,ct.matrix.copy(c),ct.matrix.decompose(ct.position,ct.quaternion,ct.scale),D.orientation!==null&&(w.fromArray(D.orientation),ct.quaternion.multiply(w)),D.position!==null&&(w.setFromRotationMatrix(c),P.fromArray(D.position),P.applyQuaternion(w),ct.position.add(P)),ct.updateMatrixWorld(),o.isPresenting===!1)return C;R.near=C.near,I.near=C.near,R.far=C.far,I.far=C.far,R.matrixWorldInverse.fromArray(s.leftViewMatrix),I.matrixWorldInverse.fromArray(s.rightViewMatrix),p.getInverse(c),d==="stage"&&(R.matrixWorldInverse.multiply(p),I.matrixWorldInverse.multiply(p)),C=ct.parent,C!==null&&(v.getInverse(C.matrixWorld),R.matrixWorldInverse.multiply(v),I.matrixWorldInverse.multiply(v)),R.matrixWorld.getInverse(R.matrixWorldInverse),I.matrixWorld.getInverse(I.matrixWorldInverse),R.projectionMatrix.fromArray(s.leftProjectionMatrix),I.projectionMatrix.fromArray(s.rightProjectionMatrix),Zt(Q,R,I),C=o.getLayers(),C.length&&(C=C[0],C.leftBounds!==null&&C.leftBounds.length===4&&R.bounds.fromArray(C.leftBounds),C.rightBounds!==null&&C.rightBounds.length===4&&I.bounds.fromArray(C.rightBounds));t:for(C=0;C<h.length;C++){D=h[C];e:{ct=C;for(var Dt=navigator.getGamepads&&navigator.getGamepads(),bt=0,St=0,oe=Dt.length;bt<oe;bt++){var $t=Dt[bt];if($t&&($t.id==="Daydream Controller"||$t.id==="Gear VR Controller"||$t.id==="Oculus Go Controller"||$t.id==="OpenVR Gamepad"||$t.id.startsWith("Oculus Touch")||$t.id.startsWith("Spatial Controller"))){if(St===ct){ct=$t;break e}St++}}ct=void 0}if(ct!==void 0&&ct.pose!==void 0){if(ct.pose===null)break t;Dt=ct.pose,Dt.hasPosition===!1&&D.position.set(.2,-.6,-.05),Dt.position!==null&&D.position.fromArray(Dt.position),Dt.orientation!==null&&D.quaternion.fromArray(Dt.orientation),D.matrix.compose(D.position,D.quaternion,D.scale),D.matrix.premultiply(c),D.matrix.decompose(D.position,D.quaternion,D.scale),D.matrixWorldNeedsUpdate=!0,D.visible=!0,Dt=ct.id==="Daydream Controller"?0:1,K[C]!==ct.buttons[Dt].pressed&&(K[C]=ct.buttons[Dt].pressed,K[C]===!0?D.dispatchEvent({type:"selectstart"}):(D.dispatchEvent({type:"selectend"}),D.dispatchEvent({type:"select"})))}else D.visible=!1}return Q},this.getStandingMatrix=function(){return c},this.isPresenting=e;var wt=new y;this.setAnimationLoop=function(C){wt.setAnimationLoop(C)},this.submitFrame=function(){e()&&o.submitFrame()},this.dispose=function(){typeof window<"u"&&window.removeEventListener("vrdisplaypresentchange",i)}}function fe(t){function e(){return h!==null&&p!==null}function i(st){var K=v[w.indexOf(st.inputSource)];K&&K.dispatchEvent({type:st.type})}function n(){t.setFramebuffer(null),W.stop()}function o(st,K){K===null?st.matrixWorld.copy(st.matrix):st.matrixWorld.multiplyMatrices(K.matrixWorld,st.matrix),st.matrixWorldInverse.getInverse(st.matrixWorld)}var s=t.context,l=null,h=null,c=1,p=null,f="stage",d=null,v=[],w=[],P=new ee;P.layers.enable(1),P.viewport=new nt;var R=new ee;R.layers.enable(2),R.viewport=new nt;var I=new _e([P,R]);I.layers.enable(1),I.layers.enable(2),this.enabled=!1,this.getController=function(st){var K=v[st];return K===void 0&&(K=new Ye,K.matrixAutoUpdate=!1,K.visible=!1,v[st]=K),K},this.getDevice=function(){return l},this.setDevice=function(st){st!==void 0&&(l=st),st instanceof XRDevice&&s.setCompatibleXRDevice(st)},this.setFramebufferScaleFactor=function(st){c=st},this.setFrameOfReferenceType=function(st){f=st},this.setSession=function(st){h=st,h!==null&&(h.addEventListener("select",i),h.addEventListener("selectstart",i),h.addEventListener("selectend",i),h.addEventListener("end",n),h.baseLayer=new XRWebGLLayer(h,s,{framebufferScaleFactor:c}),h.requestFrameOfReference(f).then(function(K){p=K,t.setFramebuffer(h.baseLayer.framebuffer),W.setContext(h),W.start()}),w=h.getInputSources(),h.addEventListener("inputsourceschange",function(){w=h.getInputSources(),console.log(w);for(var K=0;K<v.length;K++)v[K].userData.inputSource=w[K]}))},this.getCamera=function(st){if(e()){var K=st.parent,wt=I.cameras;o(I,K);for(var C=0;C<wt.length;C++)o(wt[C],K);for(st.matrixWorld.copy(I.matrixWorld),st=st.children,C=0,K=st.length;C<K;C++)st[C].updateMatrixWorld(!0);return Zt(I,P,R),I}return st},this.isPresenting=e;var Q=null,W=new y;W.setAnimationLoop(function(st,K){if(d=K.getDevicePose(p),d!==null)for(var wt=h.baseLayer,C=K.views,D=0;D<C.length;D++){var ct=C[D],Dt=wt.getViewport(ct),bt=d.getViewMatrix(ct),St=I.cameras[D];St.matrix.fromArray(bt).getInverse(St.matrix),St.projectionMatrix.fromArray(ct.projectionMatrix),St.viewport.set(Dt.x,Dt.y,Dt.width,Dt.height),D===0&&I.matrix.copy(St.matrix)}for(D=0;D<v.length;D++){if(wt=v[D],(C=w[D])&&(C=K.getInputPose(C,p),C!==null)){"targetRay"in C?wt.matrix.elements=C.targetRay.transformMatrix:"pointerMatrix"in C&&(wt.matrix.elements=C.pointerMatrix),wt.matrix.decompose(wt.position,wt.rotation,wt.scale),wt.visible=!0;continue}wt.visible=!1}Q&&Q(st)}),this.setAnimationLoop=function(st){Q=st},this.dispose=function(){},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}function ne(t){var e;function i(){Ge=new Gn(Bt),Ie=new $n(Bt,Ge,t),Ie.isWebGL2||(Ge.get("WEBGL_depth_texture"),Ge.get("OES_texture_float"),Ge.get("OES_texture_half_float"),Ge.get("OES_texture_half_float_linear"),Ge.get("OES_standard_derivatives"),Ge.get("OES_element_index_uint"),Ge.get("ANGLE_instanced_arrays")),Ge.get("OES_texture_float_linear"),gn=new Me(Bt,Ge,Ie),je=new qt(Bt,Ge,gn,Ie),je.scissor(Ri.copy(be).multiplyScalar(Ue)),je.viewport(en.copy(yt).multiplyScalar(Ue)),nn=new wn,fn=new N,oo=new Le(Bt,Ge,je,fn,Ie,gn,nn),Ns=new x(Bt),_l=new sn(Bt,Ns,nn),Bs=new Bi(_l,nn),xl=new Hn(Bt),Ko=new U(St,Ge,Ie),ya=new ut,ts=new Xt,Ao=new yr(St,je,Bs,C),wl=new Lr(Bt,Ge,nn,Ie),Un=new Je(Bt,Ge,nn,Ie),nn.programs=Ko.programs,St.context=Bt,St.capabilities=Ie,St.extensions=Ge,St.properties=fn,St.renderLists=ya,St.state=je,St.info=nn}function n(H){H.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),oe=!0}function o(){console.log("THREE.WebGLRenderer: Context Restored."),oe=!1,i()}function s(H){H=H.target,H.removeEventListener("dispose",s),l(H),fn.remove(H)}function l(H){var tt=fn.get(H).program;H.program=void 0,tt!==void 0&&Ko.releaseProgram(tt)}function h(H,tt){H.render(function(V){St.renderBufferImmediate(V,tt)})}function c(H,tt,V){if(H.visible!==!1){if(H.layers.test(tt.layers)){if(H.isLight)bt.pushLight(H),H.castShadow&&bt.pushShadow(H);else if(H.isSprite){if(!H.frustumCulled||Ai.intersectsSprite(H)){V&&ui.setFromMatrixPosition(H.matrixWorld).applyMatrix4(fi);var ae=Bs.update(H),ge=H.material;Dt.push(H,ae,ge,ui.z,null)}}else if(H.isImmediateRenderObject)V&&ui.setFromMatrixPosition(H.matrixWorld).applyMatrix4(fi),Dt.push(H,null,H.material,ui.z,null);else if((H.isMesh||H.isLine||H.isPoints)&&(H.isSkinnedMesh&&H.skeleton.update(),!H.frustumCulled||Ai.intersectsObject(H)))if(V&&ui.setFromMatrixPosition(H.matrixWorld).applyMatrix4(fi),ae=Bs.update(H),ge=H.material,Array.isArray(ge))for(var Te=ae.groups,le=0,Ne=Te.length;le<Ne;le++){var mi=Te[le],Ni=ge[mi.materialIndex];Ni&&Ni.visible&&Dt.push(H,ae,Ni,ui.z,mi)}else ge.visible&&Dt.push(H,ae,ge,ui.z,null)}for(H=H.children,le=0,Ne=H.length;le<Ne;le++)c(H[le],tt,V)}}function p(H,tt,V,ae){for(var ge=0,Te=H.length;ge<Te;ge++){var le=H[ge],Ne=le.object,mi=le.geometry,Ni=ae===void 0?le.material:ae;if(le=le.group,V.isArrayCamera){cn=V;for(var Qt=V.cameras,nr=0,xn=Qt.length;nr<xn;nr++){var Wi=Qt[nr];if(Ne.layers.test(Wi.layers)){if("viewport"in Wi)je.viewport(en.copy(Wi.viewport));else{var Zn=Wi.bounds;je.viewport(en.set(Zn.x*pn,Zn.y*ce,Zn.z*pn,Zn.w*ce).multiplyScalar(Ue))}bt.setupLights(Wi),f(Ne,tt,Wi,mi,Ni,le)}}}else cn=null,f(Ne,tt,V,mi,Ni,le)}}function f(H,tt,V,ae,ge,Te){if(H.onBeforeRender(St,tt,V,ae,ge,Te),bt=ts.get(tt,cn||V),H.modelViewMatrix.multiplyMatrices(V.matrixWorldInverse,H.matrixWorld),H.normalMatrix.getNormalMatrix(H.modelViewMatrix),H.isImmediateRenderObject){je.setMaterial(ge);var le=v(V,tt.fog,ge,H);Ee=e=null,Be=!1,h(H,le)}else St.renderBufferDirect(V,tt.fog,ae,ge,H,Te);H.onAfterRender(St,tt,V,ae,ge,Te),bt=ts.get(tt,cn||V)}function d(H,tt,V){var ae=fn.get(H),ge=bt.state.lights,Te=ae.lightsHash,le=ge.state.hash;V=Ko.getParameters(H,ge.state,bt.state.shadowsArray,tt,pe.numPlanes,pe.numIntersection,V);var Ne=Ko.getProgramCode(H,V),mi=ae.program,Ni=!0;if(mi===void 0)H.addEventListener("dispose",s);else if(mi.code!==Ne)l(H);else{if(Te.stateID!==le.stateID||Te.directionalLength!==le.directionalLength||Te.pointLength!==le.pointLength||Te.spotLength!==le.spotLength||Te.rectAreaLength!==le.rectAreaLength||Te.hemiLength!==le.hemiLength||Te.shadowsLength!==le.shadowsLength)Te.stateID=le.stateID,Te.directionalLength=le.directionalLength,Te.pointLength=le.pointLength,Te.spotLength=le.spotLength,Te.rectAreaLength=le.rectAreaLength,Te.hemiLength=le.hemiLength,Te.shadowsLength=le.shadowsLength;else if(V.shaderID!==void 0)return;Ni=!1}if(Ni&&(V.shaderID?(Ne=kr[V.shaderID],ae.shader={name:H.type,uniforms:_n.clone(Ne.uniforms),vertexShader:Ne.vertexShader,fragmentShader:Ne.fragmentShader}):ae.shader={name:H.type,uniforms:H.uniforms,vertexShader:H.vertexShader,fragmentShader:H.fragmentShader},H.onBeforeCompile(ae.shader,St),Ne=Ko.getProgramCode(H,V),mi=Ko.acquireProgram(H,ae.shader,V,Ne),ae.program=mi,H.program=mi),V=mi.getAttributes(),H.morphTargets)for(Ne=H.numSupportedMorphTargets=0;Ne<St.maxMorphTargets;Ne++)0<=V["morphTarget"+Ne]&&H.numSupportedMorphTargets++;if(H.morphNormals)for(Ne=H.numSupportedMorphNormals=0;Ne<St.maxMorphNormals;Ne++)0<=V["morphNormal"+Ne]&&H.numSupportedMorphNormals++;V=ae.shader.uniforms,(!H.isShaderMaterial&&!H.isRawShaderMaterial||H.clipping===!0)&&(ae.numClippingPlanes=pe.numPlanes,ae.numIntersection=pe.numIntersection,V.clippingPlanes=pe.uniform),ae.fog=tt,Te===void 0&&(ae.lightsHash=Te={}),Te.stateID=le.stateID,Te.directionalLength=le.directionalLength,Te.pointLength=le.pointLength,Te.spotLength=le.spotLength,Te.rectAreaLength=le.rectAreaLength,Te.hemiLength=le.hemiLength,Te.shadowsLength=le.shadowsLength,H.lights&&(V.ambientLightColor.value=ge.state.ambient,V.directionalLights.value=ge.state.directional,V.spotLights.value=ge.state.spot,V.rectAreaLights.value=ge.state.rectArea,V.pointLights.value=ge.state.point,V.hemisphereLights.value=ge.state.hemi,V.directionalShadowMap.value=ge.state.directionalShadowMap,V.directionalShadowMatrix.value=ge.state.directionalShadowMatrix,V.spotShadowMap.value=ge.state.spotShadowMap,V.spotShadowMatrix.value=ge.state.spotShadowMatrix,V.pointShadowMap.value=ge.state.pointShadowMap,V.pointShadowMatrix.value=ge.state.pointShadowMatrix),H=ae.program.getUniforms(),H=br.seqWithValue(H.seq,V),ae.uniformsList=H}function v(H,tt,V,ae){Vi=0;var ge=fn.get(V),Te=ge.lightsHash,le=bt.state.lights.state.hash;Ce&&(He||H!==Ze)&&pe.setState(V.clippingPlanes,V.clipIntersection,V.clipShadows,H,ge,H===Ze&&V.id===Wt),V.needsUpdate===!1&&(ge.program===void 0||V.fog&&ge.fog!==tt?V.needsUpdate=!0:(!V.lights||Te.stateID===le.stateID&&Te.directionalLength===le.directionalLength&&Te.pointLength===le.pointLength&&Te.spotLength===le.spotLength&&Te.rectAreaLength===le.rectAreaLength&&Te.hemiLength===le.hemiLength&&Te.shadowsLength===le.shadowsLength)&&(ge.numClippingPlanes===void 0||ge.numClippingPlanes===pe.numPlanes&&ge.numIntersection===pe.numIntersection)||(V.needsUpdate=!0)),V.needsUpdate&&(d(V,tt,ae),V.needsUpdate=!1);var Ne=!1,mi=!1,Ni=!1;Te=ge.program,le=Te.getUniforms();var Qt=ge.shader.uniforms;if(je.useProgram(Te.program)&&(Ni=mi=Ne=!0),V.id!==Wt&&(Wt=V.id,mi=!0),(Ne||Ze!==H)&&(le.setValue(Bt,"projectionMatrix",H.projectionMatrix),Ie.logarithmicDepthBuffer&&le.setValue(Bt,"logDepthBufFC",2/(Math.log(H.far+1)/Math.LN2)),Ze!==H&&(Ze=H,Ni=mi=!0),(V.isShaderMaterial||V.isMeshPhongMaterial||V.isMeshStandardMaterial||V.envMap)&&(Ne=le.map.cameraPosition,Ne!==void 0&&Ne.setValue(Bt,ui.setFromMatrixPosition(H.matrixWorld))),(V.isMeshPhongMaterial||V.isMeshLambertMaterial||V.isMeshBasicMaterial||V.isMeshStandardMaterial||V.isShaderMaterial||V.skinning)&&le.setValue(Bt,"viewMatrix",H.matrixWorldInverse)),V.skinning&&(le.setOptional(Bt,ae,"bindMatrix"),le.setOptional(Bt,ae,"bindMatrixInverse"),H=ae.skeleton))if(Ne=H.bones,Ie.floatVertexTextures){if(H.boneTexture===void 0){Ne=Math.sqrt(4*Ne.length),Ne=$e.ceilPowerOfTwo(Ne),Ne=Math.max(Ne,4);var nr=new Float32Array(Ne*Ne*4);nr.set(H.boneMatrices);var xn=new vt(nr,Ne,Ne,1023,1015);xn.needsUpdate=!0,H.boneMatrices=nr,H.boneTexture=xn,H.boneTextureSize=Ne}le.setValue(Bt,"boneTexture",H.boneTexture),le.setValue(Bt,"boneTextureSize",H.boneTextureSize)}else le.setOptional(Bt,H,"boneMatrices");return mi&&(le.setValue(Bt,"toneMappingExposure",St.toneMappingExposure),le.setValue(Bt,"toneMappingWhitePoint",St.toneMappingWhitePoint),V.lights&&(mi=Ni,Qt.ambientLightColor.needsUpdate=mi,Qt.directionalLights.needsUpdate=mi,Qt.pointLights.needsUpdate=mi,Qt.spotLights.needsUpdate=mi,Qt.rectAreaLights.needsUpdate=mi,Qt.hemisphereLights.needsUpdate=mi),tt&&V.fog&&(Qt.fogColor.value=tt.color,tt.isFog?(Qt.fogNear.value=tt.near,Qt.fogFar.value=tt.far):tt.isFogExp2&&(Qt.fogDensity.value=tt.density)),V.isMeshBasicMaterial?w(Qt,V):V.isMeshLambertMaterial?(w(Qt,V),V.emissiveMap&&(Qt.emissiveMap.value=V.emissiveMap)):V.isMeshPhongMaterial?(w(Qt,V),V.isMeshToonMaterial?(P(Qt,V),V.gradientMap&&(Qt.gradientMap.value=V.gradientMap)):P(Qt,V)):V.isMeshStandardMaterial?(w(Qt,V),V.isMeshPhysicalMaterial?(R(Qt,V),Qt.reflectivity.value=V.reflectivity,Qt.clearCoat.value=V.clearCoat,Qt.clearCoatRoughness.value=V.clearCoatRoughness):R(Qt,V)):V.isMeshMatcapMaterial?(w(Qt,V),V.matcap&&(Qt.matcap.value=V.matcap),V.bumpMap&&(Qt.bumpMap.value=V.bumpMap,Qt.bumpScale.value=V.bumpScale,V.side===1&&(Qt.bumpScale.value*=-1)),V.normalMap&&(Qt.normalMap.value=V.normalMap,Qt.normalScale.value.copy(V.normalScale),V.side===1&&Qt.normalScale.value.negate()),V.displacementMap&&(Qt.displacementMap.value=V.displacementMap,Qt.displacementScale.value=V.displacementScale,Qt.displacementBias.value=V.displacementBias)):V.isMeshDepthMaterial?(w(Qt,V),V.displacementMap&&(Qt.displacementMap.value=V.displacementMap,Qt.displacementScale.value=V.displacementScale,Qt.displacementBias.value=V.displacementBias)):V.isMeshDistanceMaterial?(w(Qt,V),V.displacementMap&&(Qt.displacementMap.value=V.displacementMap,Qt.displacementScale.value=V.displacementScale,Qt.displacementBias.value=V.displacementBias),Qt.referencePosition.value.copy(V.referencePosition),Qt.nearDistance.value=V.nearDistance,Qt.farDistance.value=V.farDistance):V.isMeshNormalMaterial?(w(Qt,V),V.bumpMap&&(Qt.bumpMap.value=V.bumpMap,Qt.bumpScale.value=V.bumpScale,V.side===1&&(Qt.bumpScale.value*=-1)),V.normalMap&&(Qt.normalMap.value=V.normalMap,Qt.normalScale.value.copy(V.normalScale),V.side===1&&Qt.normalScale.value.negate()),V.displacementMap&&(Qt.displacementMap.value=V.displacementMap,Qt.displacementScale.value=V.displacementScale,Qt.displacementBias.value=V.displacementBias)):V.isLineBasicMaterial?(Qt.diffuse.value=V.color,Qt.opacity.value=V.opacity,V.isLineDashedMaterial&&(Qt.dashSize.value=V.dashSize,Qt.totalSize.value=V.dashSize+V.gapSize,Qt.scale.value=V.scale)):V.isPointsMaterial?(Qt.diffuse.value=V.color,Qt.opacity.value=V.opacity,Qt.size.value=V.size*Ue,Qt.scale.value=.5*ce,Qt.map.value=V.map,V.map!==null&&(V.map.matrixAutoUpdate===!0&&V.map.updateMatrix(),Qt.uvTransform.value.copy(V.map.matrix))):V.isSpriteMaterial?(Qt.diffuse.value=V.color,Qt.opacity.value=V.opacity,Qt.rotation.value=V.rotation,Qt.map.value=V.map,V.map!==null&&(V.map.matrixAutoUpdate===!0&&V.map.updateMatrix(),Qt.uvTransform.value.copy(V.map.matrix))):V.isShadowMaterial&&(Qt.color.value=V.color,Qt.opacity.value=V.opacity),Qt.ltc_1!==void 0&&(Qt.ltc_1.value=Re.LTC_1),Qt.ltc_2!==void 0&&(Qt.ltc_2.value=Re.LTC_2),br.upload(Bt,ge.uniformsList,Qt,St)),V.isShaderMaterial&&V.uniformsNeedUpdate===!0&&(br.upload(Bt,ge.uniformsList,Qt,St),V.uniformsNeedUpdate=!1),V.isSpriteMaterial&&le.setValue(Bt,"center",ae.center),le.setValue(Bt,"modelViewMatrix",ae.modelViewMatrix),le.setValue(Bt,"normalMatrix",ae.normalMatrix),le.setValue(Bt,"modelMatrix",ae.matrixWorld),Te}function w(H,tt){if(H.opacity.value=tt.opacity,tt.color&&(H.diffuse.value=tt.color),tt.emissive&&H.emissive.value.copy(tt.emissive).multiplyScalar(tt.emissiveIntensity),tt.map&&(H.map.value=tt.map),tt.alphaMap&&(H.alphaMap.value=tt.alphaMap),tt.specularMap&&(H.specularMap.value=tt.specularMap),tt.envMap&&(H.envMap.value=tt.envMap,H.flipEnvMap.value=tt.envMap&&tt.envMap.isCubeTexture?-1:1,H.reflectivity.value=tt.reflectivity,H.refractionRatio.value=tt.refractionRatio,H.maxMipLevel.value=fn.get(tt.envMap).__maxMipLevel),tt.lightMap&&(H.lightMap.value=tt.lightMap,H.lightMapIntensity.value=tt.lightMapIntensity),tt.aoMap&&(H.aoMap.value=tt.aoMap,H.aoMapIntensity.value=tt.aoMapIntensity),tt.map)var V=tt.map;else tt.specularMap?V=tt.specularMap:tt.displacementMap?V=tt.displacementMap:tt.normalMap?V=tt.normalMap:tt.bumpMap?V=tt.bumpMap:tt.roughnessMap?V=tt.roughnessMap:tt.metalnessMap?V=tt.metalnessMap:tt.alphaMap?V=tt.alphaMap:tt.emissiveMap&&(V=tt.emissiveMap);V!==void 0&&(V.isWebGLRenderTarget&&(V=V.texture),V.matrixAutoUpdate===!0&&V.updateMatrix(),H.uvTransform.value.copy(V.matrix))}function P(H,tt){H.specular.value=tt.specular,H.shininess.value=Math.max(tt.shininess,1e-4),tt.emissiveMap&&(H.emissiveMap.value=tt.emissiveMap),tt.bumpMap&&(H.bumpMap.value=tt.bumpMap,H.bumpScale.value=tt.bumpScale,tt.side===1&&(H.bumpScale.value*=-1)),tt.normalMap&&(H.normalMap.value=tt.normalMap,H.normalScale.value.copy(tt.normalScale),tt.side===1&&H.normalScale.value.negate()),tt.displacementMap&&(H.displacementMap.value=tt.displacementMap,H.displacementScale.value=tt.displacementScale,H.displacementBias.value=tt.displacementBias)}function R(H,tt){H.roughness.value=tt.roughness,H.metalness.value=tt.metalness,tt.roughnessMap&&(H.roughnessMap.value=tt.roughnessMap),tt.metalnessMap&&(H.metalnessMap.value=tt.metalnessMap),tt.emissiveMap&&(H.emissiveMap.value=tt.emissiveMap),tt.bumpMap&&(H.bumpMap.value=tt.bumpMap,H.bumpScale.value=tt.bumpScale,tt.side===1&&(H.bumpScale.value*=-1)),tt.normalMap&&(H.normalMap.value=tt.normalMap,H.normalScale.value.copy(tt.normalScale),tt.side===1&&H.normalScale.value.negate()),tt.displacementMap&&(H.displacementMap.value=tt.displacementMap,H.displacementScale.value=tt.displacementScale,H.displacementBias.value=tt.displacementBias),tt.envMap&&(H.envMapIntensity.value=tt.envMapIntensity)}console.log("THREE.WebGLRenderer","98"),t=t||{};var I=t.canvas!==void 0?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),Q=t.context!==void 0?t.context:null,W=t.alpha!==void 0?t.alpha:!1,st=t.depth!==void 0?t.depth:!0,K=t.stencil!==void 0?t.stencil:!0,wt=t.antialias!==void 0?t.antialias:!1,C=t.premultipliedAlpha!==void 0?t.premultipliedAlpha:!0,D=t.preserveDrawingBuffer!==void 0?t.preserveDrawingBuffer:!1,ct=t.powerPreference!==void 0?t.powerPreference:"default",Dt=null,bt=null;this.domElement=I,this.context=null,this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1,this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var St=this,oe=!1,$t=null,me=null,ue=null,Wt=-1,Ee=e=null,Be=!1,Ze=null,cn=null,en=new nt,Ri=new nt,Ei=null,Vi=0,pn=I.width,ce=I.height,Ue=1,yt=new nt(0,0,pn,ce),be=new nt(0,0,pn,ce),Fe=!1,Ai=new at,pe=new Gi,Ce=!1,He=!1,fi=new pt,ui=new S;try{W={alpha:W,depth:st,stencil:K,antialias:wt,premultipliedAlpha:C,preserveDrawingBuffer:D,powerPreference:ct},I.addEventListener("webglcontextlost",n,!1),I.addEventListener("webglcontextrestored",o,!1);var Bt=Q||I.getContext("webgl",W)||I.getContext("experimental-webgl",W);if(Bt===null)throw I.getContext("webgl")!==null?Error("Error creating WebGL context with your selected attributes."):Error("Error creating WebGL context.");Bt.getShaderPrecisionFormat===void 0&&(Bt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(H){console.error("THREE.WebGLRenderer: "+H.message)}var Ge,Ie,je,nn,fn,oo,Ns,_l,Bs,Ko,ya,ts,Ao,xl,wl,Un,gn;i();var jr=null;typeof navigator<"u"&&(jr="xr"in navigator?new fe(St):new Ke(St)),this.vr=jr;var Yl=new Kt(St,Bs,Ie.maxTextureSize);this.shadowMap=Yl,this.getContext=function(){return Bt},this.getContextAttributes=function(){return Bt.getContextAttributes()},this.forceContextLoss=function(){var H=Ge.get("WEBGL_lose_context");H&&H.loseContext()},this.forceContextRestore=function(){var H=Ge.get("WEBGL_lose_context");H&&H.restoreContext()},this.getPixelRatio=function(){return Ue},this.setPixelRatio=function(H){H!==void 0&&(Ue=H,this.setSize(pn,ce,!1))},this.getSize=function(){return{width:pn,height:ce}},this.setSize=function(H,tt,V){jr.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(pn=H,ce=tt,I.width=H*Ue,I.height=tt*Ue,V!==!1&&(I.style.width=H+"px",I.style.height=tt+"px"),this.setViewport(0,0,H,tt))},this.getDrawingBufferSize=function(){return{width:pn*Ue,height:ce*Ue}},this.setDrawingBufferSize=function(H,tt,V){pn=H,ce=tt,Ue=V,I.width=H*V,I.height=tt*V,this.setViewport(0,0,H,tt)},this.getCurrentViewport=function(){return en},this.setViewport=function(H,tt,V,ae){yt.set(H,ce-tt-ae,V,ae),je.viewport(en.copy(yt).multiplyScalar(Ue))},this.setScissor=function(H,tt,V,ae){be.set(H,ce-tt-ae,V,ae),je.scissor(Ri.copy(be).multiplyScalar(Ue))},this.setScissorTest=function(H){je.setScissorTest(Fe=H)},this.getClearColor=function(){return Ao.getClearColor()},this.setClearColor=function(){Ao.setClearColor.apply(Ao,arguments)},this.getClearAlpha=function(){return Ao.getClearAlpha()},this.setClearAlpha=function(){Ao.setClearAlpha.apply(Ao,arguments)},this.clear=function(H,tt,V){var ae=0;(H===void 0||H)&&(ae|=16384),(tt===void 0||tt)&&(ae|=256),(V===void 0||V)&&(ae|=1024),Bt.clear(ae)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){I.removeEventListener("webglcontextlost",n,!1),I.removeEventListener("webglcontextrestored",o,!1),ya.dispose(),ts.dispose(),fn.dispose(),Bs.dispose(),jr.dispose(),so.stop()},this.renderBufferImmediate=function(H,tt){je.initAttributes();var V=fn.get(H);H.hasPositions&&!V.position&&(V.position=Bt.createBuffer()),H.hasNormals&&!V.normal&&(V.normal=Bt.createBuffer()),H.hasUvs&&!V.uv&&(V.uv=Bt.createBuffer()),H.hasColors&&!V.color&&(V.color=Bt.createBuffer()),tt=tt.getAttributes(),H.hasPositions&&(Bt.bindBuffer(34962,V.position),Bt.bufferData(34962,H.positionArray,35048),je.enableAttribute(tt.position),Bt.vertexAttribPointer(tt.position,3,5126,!1,0,0)),H.hasNormals&&(Bt.bindBuffer(34962,V.normal),Bt.bufferData(34962,H.normalArray,35048),je.enableAttribute(tt.normal),Bt.vertexAttribPointer(tt.normal,3,5126,!1,0,0)),H.hasUvs&&(Bt.bindBuffer(34962,V.uv),Bt.bufferData(34962,H.uvArray,35048),je.enableAttribute(tt.uv),Bt.vertexAttribPointer(tt.uv,2,5126,!1,0,0)),H.hasColors&&(Bt.bindBuffer(34962,V.color),Bt.bufferData(34962,H.colorArray,35048),je.enableAttribute(tt.color),Bt.vertexAttribPointer(tt.color,3,5126,!1,0,0)),je.disableUnusedAttributes(),Bt.drawArrays(4,0,H.count),H.count=0},this.renderBufferDirect=function(H,tt,V,ae,ge,Te){var le=ge.isMesh&&0>ge.normalMatrix.determinant();je.setMaterial(ae,le);var Ne=v(H,tt,ae,ge),mi=!1;(e!==V.id||Ee!==Ne.id||Be!==(ae.wireframe===!0))&&(e=V.id,Ee=Ne.id,Be=ae.wireframe===!0,mi=!0),ge.morphTargetInfluences&&(xl.update(ge,V,ae,Ne),mi=!0),le=V.index;var Ni=V.attributes.position;if(tt=1,ae.wireframe===!0&&(le=_l.getWireframeAttribute(V),tt=2),H=wl,le!==null){var Qt=Ns.get(le);H=Un,H.setIndex(Qt)}if(mi){if(V&&V.isInstancedBufferGeometry&!Ie.isWebGL2&&Ge.get("ANGLE_instanced_arrays")===null)console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{je.initAttributes(),mi=V.attributes,Ne=Ne.getAttributes();var nr=ae.defaultAttributeValues;for(Fn in Ne){var xn=Ne[Fn];if(0<=xn){var Wi=mi[Fn];if(Wi!==void 0){var Zn=Wi.normalized,Ml=Wi.itemSize,Xr=Ns.get(Wi);if(Xr!==void 0){var Tl=Xr.buffer,qa=Xr.type;if(Xr=Xr.bytesPerElement,Wi.isInterleavedBufferAttribute){var Fs=Wi.data,Zl=Fs.stride;Wi=Wi.offset,Fs&&Fs.isInstancedInterleavedBuffer?(je.enableAttributeAndDivisor(xn,Fs.meshPerAttribute),V.maxInstancedCount===void 0&&(V.maxInstancedCount=Fs.meshPerAttribute*Fs.count)):je.enableAttribute(xn),Bt.bindBuffer(34962,Tl),Bt.vertexAttribPointer(xn,Ml,qa,Zn,Zl*Xr,Wi*Xr)}else Wi.isInstancedBufferAttribute?(je.enableAttributeAndDivisor(xn,Wi.meshPerAttribute),V.maxInstancedCount===void 0&&(V.maxInstancedCount=Wi.meshPerAttribute*Wi.count)):je.enableAttribute(xn),Bt.bindBuffer(34962,Tl),Bt.vertexAttribPointer(xn,Ml,qa,Zn,0,0)}}else if(nr!==void 0&&(Zn=nr[Fn],Zn!==void 0))switch(Zn.length){case 2:Bt.vertexAttrib2fv(xn,Zn);break;case 3:Bt.vertexAttrib3fv(xn,Zn);break;case 4:Bt.vertexAttrib4fv(xn,Zn);break;default:Bt.vertexAttrib1fv(xn,Zn)}}}je.disableUnusedAttributes()}le!==null&&Bt.bindBuffer(34963,Qt.buffer)}Qt=1/0,le!==null?Qt=le.count:Ni!==void 0&&(Qt=Ni.count),le=V.drawRange.start*tt,Ni=Te!==null?Te.start*tt:0;var Fn=Math.max(le,Ni);if(Te=Math.max(0,Math.min(Qt,le+V.drawRange.count*tt,Ni+(Te!==null?Te.count*tt:1/0))-1-Fn+1),Te!==0){if(ge.isMesh)if(ae.wireframe===!0)je.setLineWidth(ae.wireframeLinewidth*(me===null?Ue:1)),H.setMode(1);else switch(ge.drawMode){case 0:H.setMode(4);break;case 1:H.setMode(5);break;case 2:H.setMode(6)}else ge.isLine?(ae=ae.linewidth,ae===void 0&&(ae=1),je.setLineWidth(ae*(me===null?Ue:1)),ge.isLineSegments?H.setMode(1):ge.isLineLoop?H.setMode(2):H.setMode(3)):ge.isPoints?H.setMode(0):ge.isSprite&&H.setMode(4);V&&V.isInstancedBufferGeometry?0<V.maxInstancedCount&&H.renderInstances(V,Fn,Te):H.render(Fn,Te)}},this.compile=function(H,tt){bt=ts.get(H,tt),bt.init(),H.traverse(function(V){V.isLight&&(bt.pushLight(V),V.castShadow&&bt.pushShadow(V))}),bt.setupLights(tt),H.traverse(function(V){if(V.material)if(Array.isArray(V.material))for(var ae=0;ae<V.material.length;ae++)d(V.material[ae],H.fog,V);else d(V.material,H.fog,V)})};var Us=null,so=new y;so.setAnimationLoop(function(H){jr.isPresenting()||Us&&Us(H)}),typeof window<"u"&&so.setContext(window),this.setAnimationLoop=function(H){Us=H,jr.setAnimationLoop(H),so.start()},this.render=function(H,tt,V,ae){if(!tt||!tt.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!oe){Ee=e=null,Be=!1,Wt=-1,Ze=null,H.autoUpdate===!0&&H.updateMatrixWorld(),tt.parent===null&&tt.updateMatrixWorld(),jr.enabled&&(tt=jr.getCamera(tt)),bt=ts.get(H,tt),bt.init(),H.onBeforeRender(St,H,tt,V),fi.multiplyMatrices(tt.projectionMatrix,tt.matrixWorldInverse),Ai.setFromMatrix(fi),He=this.localClippingEnabled,Ce=pe.init(this.clippingPlanes,He,tt),Dt=ya.get(H,tt),Dt.init(),c(H,tt,St.sortObjects),St.sortObjects===!0&&Dt.sort(),Ce&&pe.beginShadows(),Yl.render(bt.state.shadowsArray,H,tt),bt.setupLights(tt),Ce&&pe.endShadows(),this.info.autoReset&&this.info.reset(),V===void 0&&(V=null),this.setRenderTarget(V),Ao.render(Dt,H,tt,ae),ae=Dt.opaque;var ge=Dt.transparent;if(H.overrideMaterial){var Te=H.overrideMaterial;ae.length&&p(ae,H,tt,Te),ge.length&&p(ge,H,tt,Te)}else ae.length&&p(ae,H,tt),ge.length&&p(ge,H,tt);V&&oo.updateRenderTargetMipmap(V),je.buffers.depth.setTest(!0),je.buffers.depth.setMask(!0),je.buffers.color.setMask(!0),je.setPolygonOffset(!1),H.onAfterRender(St,H,tt),jr.enabled&&jr.submitFrame(),bt=Dt=null}},this.allocTextureUnit=function(){var H=Vi;return H>=Ie.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+H+" texture units while this GPU supports only "+Ie.maxTextures),Vi+=1,H},this.setTexture2D=function(){var H=!1;return function(tt,V){tt&&tt.isWebGLRenderTarget&&(H||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),H=!0),tt=tt.texture),oo.setTexture2D(tt,V)}}(),this.setTexture3D=function(){return function(H,tt){oo.setTexture3D(H,tt)}}(),this.setTexture=function(){var H=!1;return function(tt,V){H||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),H=!0),oo.setTexture2D(tt,V)}}(),this.setTextureCube=function(){var H=!1;return function(tt,V){tt&&tt.isWebGLRenderTargetCube&&(H||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),H=!0),tt=tt.texture),tt&&tt.isCubeTexture||Array.isArray(tt.image)&&tt.image.length===6?oo.setTextureCube(tt,V):oo.setTextureCubeDynamic(tt,V)}}(),this.setFramebuffer=function(H){$t=H},this.getRenderTarget=function(){return me},this.setRenderTarget=function(H){(me=H)&&fn.get(H).__webglFramebuffer===void 0&&oo.setupRenderTarget(H);var tt=$t,V=!1;H?(tt=fn.get(H).__webglFramebuffer,H.isWebGLRenderTargetCube&&(tt=tt[H.activeCubeFace],V=!0),en.copy(H.viewport),Ri.copy(H.scissor),Ei=H.scissorTest):(en.copy(yt).multiplyScalar(Ue),Ri.copy(be).multiplyScalar(Ue),Ei=Fe),ue!==tt&&(Bt.bindFramebuffer(36160,tt),ue=tt),je.viewport(en),je.scissor(Ri),je.setScissorTest(Ei),V&&(V=fn.get(H.texture),Bt.framebufferTexture2D(36160,36064,34069+H.activeCubeFace,V.__webglTexture,H.activeMipMapLevel))},this.readRenderTargetPixels=function(H,tt,V,ae,ge,Te){if(H&&H.isWebGLRenderTarget){var le=fn.get(H).__webglFramebuffer;if(le){var Ne=!1;le!==ue&&(Bt.bindFramebuffer(36160,le),Ne=!0);try{var mi=H.texture,Ni=mi.format,Qt=mi.type;Ni!==1023&&gn.convert(Ni)!==Bt.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):Qt===1009||gn.convert(Qt)===Bt.getParameter(35738)||Qt===1015&&(Ie.isWebGL2||Ge.get("OES_texture_float")||Ge.get("WEBGL_color_buffer_float"))||Qt===1016&&(Ie.isWebGL2?Ge.get("EXT_color_buffer_float"):Ge.get("EXT_color_buffer_half_float"))?Bt.checkFramebufferStatus(36160)===36053?0<=tt&&tt<=H.width-ae&&0<=V&&V<=H.height-ge&&Bt.readPixels(tt,V,ae,ge,gn.convert(Ni),gn.convert(Qt),Te):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{Ne&&Bt.bindFramebuffer(36160,ue)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(H,tt,V){var ae=tt.image.width,ge=tt.image.height,Te=gn.convert(tt.format);this.setTexture2D(tt,0),Bt.copyTexImage2D(3553,V||0,Te,H.x,H.y,ae,ge,0)},this.copyTextureToTexture=function(H,tt,V,ae){var ge=tt.image.width,Te=tt.image.height,le=gn.convert(V.format),Ne=gn.convert(V.type);this.setTexture2D(V,0),tt.isDataTexture?Bt.texSubImage2D(3553,ae||0,H.x,H.y,ge,Te,le,Ne,tt.image.data):Bt.texSubImage2D(3553,ae||0,H.x,H.y,le,Ne,tt.image)}}function de(t,e){this.name="",this.color=new Y(t),this.density=e!==void 0?e:25e-5}function ln(t,e,i){this.name="",this.color=new Y(t),this.near=e!==void 0?e:1,this.far=i!==void 0?i:1e3}function Ln(){z.call(this),this.type="Scene",this.overrideMaterial=this.fog=this.background=null,this.autoUpdate=!0}function vi(t,e){this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function yi(t,e,i,n){this.data=t,this.itemSize=e,this.offset=i,this.normalized=n===!0}function Si(t){Oe.call(this),this.type="SpriteMaterial",this.color=new Y(16777215),this.map=null,this.rotation=0,this.sizeAttenuation=!0,this.lights=!1,this.transparent=!0,this.setValues(t)}function Hi(t){if(z.call(this),this.type="Sprite",zs===void 0){zs=new 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 vi(e,5),zs.setIndex([0,1,2,0,2,3]),zs.addAttribute("position",new yi(e,3,0,!1)),zs.addAttribute("uv",new yi(e,2,3,!1))}this.geometry=zs,this.material=t!==void 0?t:new Si,this.center=new _(.5,.5)}function ki(){z.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Xi(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),e===void 0)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],t=0,e=this.bones.length;t<e;t++)this.boneInverses.push(new pt)}function qi(){z.call(this),this.type="Bone"}function Ti(t,e){Fi.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new pt,this.bindMatrixInverse=new pt,t=this.initBones(),t=new Xi(t),this.bind(t,this.matrixWorld),this.normalizeSkinWeights()}function _i(t){Oe.call(this),this.type="LineBasicMaterial",this.color=new Y(16777215),this.linewidth=1,this.linejoin=this.linecap="round",this.lights=!1,this.setValues(t)}function Li(t,e,i){i===1&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),z.call(this),this.type="Line",this.geometry=t!==void 0?t:new Ft,this.material=e!==void 0?e:new _i({color:16777215*Math.random()})}function ei(t,e){Li.call(this,t,e),this.type="LineSegments"}function Ir(t,e){Li.call(this,t,e),this.type="LineLoop"}function Mn(t){Oe.call(this),this.type="PointsMaterial",this.color=new Y(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=this.morphTargets=!1,this.setValues(t)}function ps(t,e){z.call(this),this.type="Points",this.geometry=t!==void 0?t:new Ft,this.material=e!==void 0?e:new Mn({color:16777215*Math.random()})}function il(t,e,i,n,o,s,l,h,c){kt.call(this,t,e,i,n,o,s,l,h,c),this.generateMipmaps=!1}function uo(t,e,i,n,o,s,l,h,c,p,f,d){kt.call(this,null,s,l,h,c,p,n,o,f,d),this.image={width:e,height:i},this.mipmaps=t,this.generateMipmaps=this.flipY=!1}function Ws(t,e,i,n,o,s,l,h,c){kt.call(this,t,e,i,n,o,s,l,h,c),this.needsUpdate=!0}function js(t,e,i,n,o,s,l,h,c,p){if(p=p!==void 0?p:1026,p!==1026&&p!==1027)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&p===1026&&(i=1012),i===void 0&&p===1027&&(i=1020),kt.call(this,null,n,o,s,l,h,p,i,c),this.image={width:t,height:e},this.magFilter=l!==void 0?l:1003,this.minFilter=h!==void 0?h:1003,this.generateMipmaps=this.flipY=!1}function fs(t){Ft.call(this),this.type="WireframeGeometry";var e=[],i,n,o,s=[0,0],l={},h=["a","b","c"];if(t&&t.isGeometry){var c=t.faces,p=0;for(n=c.length;p<n;p++){var f=c[p];for(i=0;3>i;i++){var d=f[h[i]],v=f[h[(i+1)%3]];s[0]=Math.min(d,v),s[1]=Math.max(d,v),d=s[0]+","+s[1],l[d]===void 0&&(l[d]={index1:s[0],index2:s[1]})}}for(d in l)p=l[d],h=t.vertices[p.index1],e.push(h.x,h.y,h.z),h=t.vertices[p.index2],e.push(h.x,h.y,h.z)}else if(t&&t.isBufferGeometry)if(h=new S,t.index!==null){c=t.attributes.position,f=t.index;var w=t.groups;for(w.length===0&&(w=[{start:0,count:f.count,materialIndex:0}]),t=0,o=w.length;t<o;++t)for(p=w[t],i=p.start,n=p.count,p=i,n=i+n;p<n;p+=3)for(i=0;3>i;i++)d=f.getX(p+i),v=f.getX(p+(i+1)%3),s[0]=Math.min(d,v),s[1]=Math.max(d,v),d=s[0]+","+s[1],l[d]===void 0&&(l[d]={index1:s[0],index2:s[1]});for(d in l)p=l[d],h.fromBufferAttribute(c,p.index1),e.push(h.x,h.y,h.z),h.fromBufferAttribute(c,p.index2),e.push(h.x,h.y,h.z)}else for(c=t.attributes.position,p=0,n=c.count/3;p<n;p++)for(i=0;3>i;i++)l=3*p+i,h.fromBufferAttribute(c,l),e.push(h.x,h.y,h.z),l=3*p+(i+1)%3,h.fromBufferAttribute(c,l),e.push(h.x,h.y,h.z);this.addAttribute("position",new Et(e,3))}function Xs(t,e,i){X.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:i},this.fromBufferGeometry(new ds(t,e,i)),this.mergeVertices()}function ds(t,e,i){Ft.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:i};var n=[],o=[],s=[],l=[],h=new S,c=new S,p=new S,f=new S,d=new S,v,w;3>t.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var P=e+1;for(v=0;v<=i;v++){var R=v/i;for(w=0;w<=e;w++){var I=w/e;t(I,R,c),o.push(c.x,c.y,c.z),0<=I-1e-5?(t(I-1e-5,R,p),f.subVectors(c,p)):(t(I+1e-5,R,p),f.subVectors(p,c)),0<=R-1e-5?(t(I,R-1e-5,p),d.subVectors(c,p)):(t(I,R+1e-5,p),d.subVectors(p,c)),h.crossVectors(f,d).normalize(),s.push(h.x,h.y,h.z),l.push(I,R)}}for(v=0;v<i;v++)for(w=0;w<e;w++)t=v*P+w+1,h=(v+1)*P+w+1,c=(v+1)*P+w,n.push(v*P+w,t,c),n.push(t,h,c);this.setIndex(n),this.addAttribute("position",new Et(o,3)),this.addAttribute("normal",new Et(s,3)),this.addAttribute("uv",new Et(l,2))}function Ci(t,e,i,n){X.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},this.fromBufferGeometry(new oi(t,e,i,n)),this.mergeVertices()}function oi(t,e,i,n){function o(p){h.push(p.x,p.y,p.z)}function s(p,f){p*=3,f.x=t[p+0],f.y=t[p+1],f.z=t[p+2]}function l(p,f,d,v){0>v&&p.x===1&&(c[f]=p.x-1),d.x===0&&d.z===0&&(c[f]=v/2/Math.PI+.5)}Ft.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},i=i||1,n=n||0;var h=[],c=[];(function(p){for(var f=new S,d=new S,v=new S,w=0;w<e.length;w+=3){s(e[w+0],f),s(e[w+1],d),s(e[w+2],v);var P,R,I=f,Q=d,W=v,st=Math.pow(2,p),K=[];for(R=0;R<=st;R++){K[R]=[];var wt=I.clone().lerp(W,R/st),C=Q.clone().lerp(W,R/st),D=st-R;for(P=0;P<=D;P++)K[R][P]=P===0&&R===st?wt:wt.clone().lerp(C,P/D)}for(R=0;R<st;R++)for(P=0;P<2*(st-R)-1;P++)I=Math.floor(P/2),P%2===0?(o(K[R][I+1]),o(K[R+1][I]),o(K[R][I])):(o(K[R][I+1]),o(K[R+1][I+1]),o(K[R+1][I]))}})(n),function(p){for(var f=new S,d=0;d<h.length;d+=3)f.x=h[d+0],f.y=h[d+1],f.z=h[d+2],f.normalize().multiplyScalar(p),h[d+0]=f.x,h[d+1]=f.y,h[d+2]=f.z}(i),function(){for(var p=new S,f=0;f<h.length;f+=3)p.x=h[f+0],p.y=h[f+1],p.z=h[f+2],c.push(Math.atan2(p.z,-p.x)/2/Math.PI+.5,1-(Math.atan2(-p.y,Math.sqrt(p.x*p.x+p.z*p.z))/Math.PI+.5));p=new S,f=new S;for(var d=new S,v=new S,w=new _,P=new _,R=new _,I=0,Q=0;I<h.length;I+=9,Q+=6){p.set(h[I+0],h[I+1],h[I+2]),f.set(h[I+3],h[I+4],h[I+5]),d.set(h[I+6],h[I+7],h[I+8]),w.set(c[Q+0],c[Q+1]),P.set(c[Q+2],c[Q+3]),R.set(c[Q+4],c[Q+5]),v.copy(p).add(f).add(d).divideScalar(3);var W=Math.atan2(v.z,-v.x);l(w,Q+0,p,W),l(P,Q+2,f,W),l(R,Q+4,d,W)}for(p=0;p<c.length;p+=6)f=c[p+0],d=c[p+2],v=c[p+4],w=Math.min(f,d,v),.9<Math.max(f,d,v)&&.1>w&&(.2>f&&(c[p+0]+=1),.2>d&&(c[p+2]+=1),.2>v&&(c[p+4]+=1))}(),this.addAttribute("position",new Et(h,3)),this.addAttribute("normal",new Et(h.slice(),3)),this.addAttribute("uv",new Et(c,2)),n===0?this.computeVertexNormals():this.normalizeNormals()}function qs(t,e){X.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new ms(t,e)),this.mergeVertices()}function ms(t,e){oi.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,e),this.type="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Ys(t,e){X.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new bo(t,e)),this.mergeVertices()}function bo(t,e){oi.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],t,e),this.type="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Zs(t,e){X.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new gs(t,e)),this.mergeVertices()}function gs(t,e){var i=(1+Math.sqrt(5))/2;oi.call(this,[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],t,e),this.type="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vs(t,e){X.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new ys(t,e)),this.mergeVertices()}function ys(t,e){var i=(1+Math.sqrt(5))/2,n=1/i;oi.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-i,0,-n,i,0,n,-i,0,n,i,-n,-i,0,-n,i,0,n,-i,0,n,i,0,-i,0,-n,i,0,-n,-i,0,n,i,0,n],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Qi(t,e,i,n,o,s){X.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:o},s!==void 0&&console.warn("THREE.TubeGeometry: taper has been removed."),t=new co(t,e,i,n,o),this.tangents=t.tangents,this.normals=t.normals,this.binormals=t.binormals,this.fromBufferGeometry(t),this.mergeVertices()}function co(t,e,i,n,o){function s(Q){f=t.getPointAt(Q/e,f);var W=l.normals[Q];for(Q=l.binormals[Q],v=0;v<=n;v++){var st=v/n*Math.PI*2,K=Math.sin(st);st=-Math.cos(st),c.x=st*W.x+K*Q.x,c.y=st*W.y+K*Q.y,c.z=st*W.z+K*Q.z,c.normalize(),P.push(c.x,c.y,c.z),h.x=f.x+i*c.x,h.y=f.y+i*c.y,h.z=f.z+i*c.z,w.push(h.x,h.y,h.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 l=t.computeFrenetFrames(e,o);this.tangents=l.tangents,this.normals=l.normals,this.binormals=l.binormals;var h=new S,c=new S,p=new _,f=new S,d,v,w=[],P=[],R=[],I=[];for(d=0;d<e;d++)s(d);for(s(o===!1?e:0),d=0;d<=e;d++)for(v=0;v<=n;v++)p.x=d/e,p.y=v/n,R.push(p.x,p.y);(function(){for(v=1;v<=e;v++)for(d=1;d<=n;d++){var Q=(n+1)*v+(d-1),W=(n+1)*v+d,st=(n+1)*(v-1)+d;I.push((n+1)*(v-1)+(d-1),Q,st),I.push(Q,W,st)}})(),this.setIndex(I),this.addAttribute("position",new Et(w,3)),this.addAttribute("normal",new Et(P,3)),this.addAttribute("uv",new Et(R,2))}function xr(t,e,i,n,o,s,l){X.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:o,q:s},l!==void 0&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new Oo(t,e,i,n,o,s)),this.mergeVertices()}function Oo(t,e,i,n,o,s){function l(C,D,ct,Dt,bt){var St=Math.sin(C);D=ct/D*C,ct=Math.cos(D),bt.x=Dt*(2+ct)*.5*Math.cos(C),bt.y=Dt*(2+ct)*St*.5,bt.z=Dt*Math.sin(D)*.5}Ft.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:o,q:s},t=t||1,e=e||.4,i=Math.floor(i)||64,n=Math.floor(n)||8,o=o||2,s=s||3;var h=[],c=[],p=[],f=[],d,v=new S,w=new S,P=new S,R=new S,I=new S,Q=new S,W=new S;for(d=0;d<=i;++d){var st=d/i*o*Math.PI*2;for(l(st,o,s,t,P),l(st+.01,o,s,t,R),Q.subVectors(R,P),W.addVectors(R,P),I.crossVectors(Q,W),W.crossVectors(I,Q),I.normalize(),W.normalize(),st=0;st<=n;++st){var K=st/n*Math.PI*2,wt=-e*Math.cos(K);K=e*Math.sin(K),v.x=P.x+(wt*W.x+K*I.x),v.y=P.y+(wt*W.y+K*I.y),v.z=P.z+(wt*W.z+K*I.z),c.push(v.x,v.y,v.z),w.subVectors(v,P).normalize(),p.push(w.x,w.y,w.z),f.push(d/i),f.push(st/n)}}for(st=1;st<=i;st++)for(d=1;d<=n;d++)t=(n+1)*st+(d-1),e=(n+1)*st+d,o=(n+1)*(st-1)+d,h.push((n+1)*(st-1)+(d-1),t,o),h.push(t,e,o);this.setIndex(h),this.addAttribute("position",new Et(c,3)),this.addAttribute("normal",new Et(p,3)),this.addAttribute("uv",new Et(f,2))}function Io(t,e,i,n,o){X.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:o},this.fromBufferGeometry(new Tn(t,e,i,n,o)),this.mergeVertices()}function Tn(t,e,i,n,o){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 s=[],l=[],h=[],c=[],p=new S,f=new S,d=new S,v,w;for(v=0;v<=i;v++)for(w=0;w<=n;w++){var P=w/n*o,R=v/i*Math.PI*2;f.x=(t+e*Math.cos(R))*Math.cos(P),f.y=(t+e*Math.cos(R))*Math.sin(P),f.z=e*Math.sin(R),l.push(f.x,f.y,f.z),p.x=t*Math.cos(P),p.y=t*Math.sin(P),d.subVectors(f,p).normalize(),h.push(d.x,d.y,d.z),c.push(w/n),c.push(v/i)}for(v=1;v<=i;v++)for(w=1;w<=n;w++)t=(n+1)*(v-1)+w-1,e=(n+1)*(v-1)+w,o=(n+1)*v+w,s.push((n+1)*v+w-1,t,o),s.push(t,e,o);this.setIndex(s),this.addAttribute("position",new Et(l,3)),this.addAttribute("normal",new Et(h,3)),this.addAttribute("uv",new Et(c,2))}function nl(t,e,i,n,o){for(var s,l=0,h=e,c=i-n;h<i;h+=n)l+=(t[c]-t[h])*(t[h+1]+t[c+1]),c=h;if(o===0<l)for(o=e;o<i;o+=n)s=Ra(o,t[o],t[o+1],s);else for(o=i-n;o>=e;o-=n)s=Ra(o,t[o],t[o+1],s);return s&&Do(s,s.next)&&(bi(s),s=s.next),s}function _s(t,e){if(!t)return t;e||(e=t);do{var i=!1;if(t.steiner||!Do(t,t.next)&&zi(t.prev,t,t.next)!==0)t=t.next;else{if(bi(t),t=e=t.prev,t===t.next)break;i=!0}}while(i||t!==e);return e}function xs(t,e,i,n,o,s,l){if(t){if(!l&&s){var h=t,c=h;do c.z===null&&(c.z=La(c.x,c.y,n,o,s)),c.prevZ=c.prev,c=c.nextZ=c.next;while(c!==h);c.prevZ.nextZ=null,c.prevZ=null,h=c;var p,f,d,v,w=1;do{c=h;var P=h=null;for(f=0;c;){f++;var R=c;for(p=d=0;p<w&&(d++,R=R.nextZ,R);p++);for(v=w;0<d||0<v&&R;)d!==0&&(v===0||!R||c.z<=R.z)?(p=c,c=c.nextZ,d--):(p=R,R=R.nextZ,v--),P?P.nextZ=p:h=p,p.prevZ=P,P=p;c=R}P.nextZ=null,w*=2}while(1<f)}for(h=t;t.prev!==t.next;){if(c=t.prev,R=t.next,s)t:{P=t,v=n;var I=o,Q=s;if(f=P.prev,d=P,w=P.next,0<=zi(f,d,w))P=!1;else{var W=f.x>d.x?f.x>w.x?f.x:w.x:d.x>w.x?d.x:w.x,st=f.y>d.y?f.y>w.y?f.y:w.y:d.y>w.y?d.y:w.y;for(p=La(f.x<d.x?f.x<w.x?f.x:w.x:d.x<w.x?d.x:w.x,f.y<d.y?f.y<w.y?f.y:w.y:d.y<w.y?d.y:w.y,v,I,Q),v=La(W,st,v,I,Q),I=P.nextZ;I&&I.z<=v;){if(I!==P.prev&&I!==P.next&&Ca(f.x,f.y,d.x,d.y,w.x,w.y,I.x,I.y)&&0<=zi(I.prev,I,I.next)){P=!1;break t}I=I.nextZ}for(I=P.prevZ;I&&I.z>=p;){if(I!==P.prev&&I!==P.next&&Ca(f.x,f.y,d.x,d.y,w.x,w.y,I.x,I.y)&&0<=zi(I.prev,I,I.next)){P=!1;break t}I=I.prevZ}P=!0}}else t:if(P=t,f=P.prev,d=P,w=P.next,0<=zi(f,d,w))P=!1;else{for(p=P.next.next;p!==P.prev;){if(Ca(f.x,f.y,d.x,d.y,w.x,w.y,p.x,p.y)&&0<=zi(p.prev,p,p.next)){P=!1;break t}p=p.next}P=!0}if(P)e.push(c.i/i),e.push(t.i/i),e.push(R.i/i),bi(t),h=t=R.next;else if(t=R,t===h){if(!l)xs(_s(t),e,i,n,o,s,1);else if(l===1){l=e,h=i,c=t;do R=c.prev,P=c.next.next,!Do(R,P)&&rl(R,c,c.next,P)&&ar(R,P)&&ar(P,R)&&(l.push(R.i/h),l.push(c.i/h),l.push(P.i/h),bi(c),bi(c.next),c=t=P),c=c.next;while(c!==t);t=c,xs(t,e,i,n,o,s,2)}else if(l===2)t:{l=t;do{for(h=l.next.next;h!==l.prev;){if(c=l.i!==h.i){if(c=l,R=h,P=c.next.i!==R.i&&c.prev.i!==R.i){e:{P=c;do{if(P.i!==c.i&&P.next.i!==c.i&&P.i!==R.i&&P.next.i!==R.i&&rl(P,P.next,c,R)){P=!0;break e}P=P.next}while(P!==c);P=!1}P=!P}if(P=P&&ar(c,R)&&ar(R,c)){P=c,f=!1,d=(c.x+R.x)/2,R=(c.y+R.y)/2;do P.y>R!=P.next.y>R&&P.next.y!==P.y&&d<(P.next.x-P.x)*(R-P.y)/(P.next.y-P.y)+P.x&&(f=!f),P=P.next;while(P!==c);P=f}c=P}if(c){t=Js(l,h),l=_s(l,l.next),t=_s(t,t.next),xs(l,e,i,n,o,s),xs(t,e,i,n,o,s);break t}h=h.next}l=l.next}while(l!==t)}break}}}}function bl(t,e){return t.x-e.x}function Ol(t,e){var i=e,n=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var l=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(l<=n&&l>s){if(s=l,l===n){if(o===i.y)return i;if(o===i.next.y)return i.next}var h=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!h)return null;if(n===s)return h.prev;e=h,l=h.x;var c=h.y,p=1/0;for(i=h.next;i!==e;){if(n>=i.x&&i.x>=l&&n!==i.x&&Ca(o<c?n:s,o,l,c,o<c?s:n,o,i.x,i.y)){var f=Math.abs(o-i.y)/(n-i.x);(f<p||f===p&&i.x>h.x)&&ar(i,t)&&(h=i,p=f)}i=i.next}return h}function La(t,e,i,n,o){return t=32767*(t-i)*o,e=32767*(e-n)*o,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,(t|t<<1)&1431655765|((e|e<<1)&1431655765)<<1}function Kn(t){var e=t,i=t;do e.x<i.x&&(i=e),e=e.next;while(e!==t);return i}function Ca(t,e,i,n,o,s,l,h){return 0<=(o-l)*(e-h)-(t-l)*(s-h)&&0<=(t-l)*(n-h)-(i-l)*(e-h)&&0<=(i-l)*(s-h)-(o-l)*(n-h)}function zi(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function Do(t,e){return t.x===e.x&&t.y===e.y}function rl(t,e,i,n){return Do(t,e)&&Do(i,n)||Do(t,n)&&Do(i,e)?!0:0<zi(t,e,i)!=0<zi(t,e,n)&&0<zi(i,n,t)!=0<zi(i,n,e)}function ar(t,e){return 0>zi(t.prev,t,t.next)?0<=zi(t,e,t.next)&&0<=zi(t,t.prev,e):0>zi(t,e,t.prev)||0>zi(t,t.next,e)}function Js(t,e){var i=new Dr(t.i,t.x,t.y),n=new Dr(e.i,e.x,e.y),o=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=o,o.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function Ra(t,e,i,n){return t=new Dr(t,e,i),n?(t.next=n.next,t.prev=n,n.next.prev=t,n.next=t):(t.prev=t,t.next=t),t}function bi(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Dr(t,e,i){this.i=t,this.x=e,this.y=i,this.nextZ=this.prevZ=this.z=this.next=this.prev=null,this.steiner=!1}function ba(t){var e=t.length;2<e&&t[e-1].equals(t[0])&&t.pop()}function Il(t,e){for(var i=0;i<e.length;i++)t.push(e[i].x),t.push(e[i].y)}function Jr(t,e){X.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new zr(t,e)),this.mergeVertices()}function zr(t,e){function i(c){function p(Ce,He,fi){return He||console.error("THREE.ExtrudeGeometry: vec does not exist"),He.clone().multiplyScalar(fi).add(Ce)}function f(Ce,He,fi){var ui=Ce.x-He.x,Bt=Ce.y-He.y,Ge=fi.x-Ce.x,Ie=fi.y-Ce.y,je=ui*ui+Bt*Bt;if(Math.abs(ui*Ie-Bt*Ge)>Number.EPSILON){var nn=Math.sqrt(je),fn=Math.sqrt(Ge*Ge+Ie*Ie);if(je=He.x-Bt/nn,He=He.y+ui/nn,Ie=((fi.x-Ie/fn-je)*Ie-(fi.y+Ge/fn-He)*Ge)/(ui*Ie-Bt*Ge),Ge=je+ui*Ie-Ce.x,ui=He+Bt*Ie-Ce.y,Bt=Ge*Ge+ui*ui,2>=Bt)return new _(Ge,ui);Bt=Math.sqrt(Bt/2)}else Ce=!1,ui>Number.EPSILON?Ge>Number.EPSILON&&(Ce=!0):ui<-Number.EPSILON?Ge<-Number.EPSILON&&(Ce=!0):Math.sign(Bt)===Math.sign(Ie)&&(Ce=!0),Ce?(Ge=-Bt,Bt=Math.sqrt(je)):(Ge=ui,ui=Bt,Bt=Math.sqrt(je/2));return new _(Ge/Bt,ui/Bt)}function d(Ce,He){for(ce=Ce.length;0<=--ce;){var fi=ce,ui=ce-1;0>ui&&(ui=Ce.length-1);var Bt,Ge=W+2*D;for(Bt=0;Bt<Ge;Bt++){var Ie=Ei*Bt,je=Ei*(Bt+1),nn=He+ui+Ie,fn=He+ui+je;je=He+fi+je,P(He+fi+Ie),P(nn),P(je),P(nn),P(fn),P(je),Ie=o.length/3,Ie=Dt.generateSideWallUV(n,o,Ie-6,Ie-3,Ie-2,Ie-1),R(Ie[0]),R(Ie[1]),R(Ie[3]),R(Ie[1]),R(Ie[2]),R(Ie[3])}}}function v(Ce,He,fi){I.push(Ce),I.push(He),I.push(fi)}function w(Ce,He,fi){P(Ce),P(He),P(fi),Ce=o.length/3,Ce=Dt.generateTopUV(n,o,Ce-3,Ce-2,Ce-1),R(Ce[0]),R(Ce[1]),R(Ce[2])}function P(Ce){o.push(I[3*Ce]),o.push(I[3*Ce+1]),o.push(I[3*Ce+2])}function R(Ce){s.push(Ce.x),s.push(Ce.y)}var I=[],Q=e.curveSegments!==void 0?e.curveSegments:12,W=e.steps!==void 0?e.steps:1,st=e.depth!==void 0?e.depth:100,K=e.bevelEnabled!==void 0?e.bevelEnabled:!0,wt=e.bevelThickness!==void 0?e.bevelThickness:6,C=e.bevelSize!==void 0?e.bevelSize:wt-2,D=e.bevelSegments!==void 0?e.bevelSegments:3,ct=e.extrudePath,Dt=e.UVGenerator!==void 0?e.UVGenerator:ma;e.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),st=e.amount);var bt=!1;if(ct){var St=ct.getSpacedPoints(W);bt=!0,K=!1;var oe=ct.computeFrenetFrames(W,!1),$t=new S,me=new S,ue=new S}K||(C=wt=D=0);var Wt;Q=c.extractPoints(Q),c=Q.shape;var Ee=Q.holes;if(!Vr.isClockWise(c)){c=c.reverse();var Be=0;for(Wt=Ee.length;Be<Wt;Be++){var Ze=Ee[Be];Vr.isClockWise(Ze)&&(Ee[Be]=Ze.reverse())}}var cn=Vr.triangulateShape(c,Ee),en=c;for(Be=0,Wt=Ee.length;Be<Wt;Be++)Ze=Ee[Be],c=c.concat(Ze);var Ri,Ei=c.length,Vi,pn=cn.length;Q=[];var ce=0,Ue=en.length,yt=Ue-1;for(Ri=ce+1;ce<Ue;ce++,yt++,Ri++)yt===Ue&&(yt=0),Ri===Ue&&(Ri=0),Q[ce]=f(en[ce],en[yt],en[Ri]);ct=[];var be=Q.concat();for(Be=0,Wt=Ee.length;Be<Wt;Be++){Ze=Ee[Be];var Fe=[];for(ce=0,Ue=Ze.length,yt=Ue-1,Ri=ce+1;ce<Ue;ce++,yt++,Ri++)yt===Ue&&(yt=0),Ri===Ue&&(Ri=0),Fe[ce]=f(Ze[ce],Ze[yt],Ze[Ri]);ct.push(Fe),be=be.concat(Fe)}for(yt=0;yt<D;yt++){Ue=yt/D;var Ai=wt*Math.cos(Ue*Math.PI/2);for(Ri=C*Math.sin(Ue*Math.PI/2),ce=0,Ue=en.length;ce<Ue;ce++){var pe=p(en[ce],Q[ce],Ri);v(pe.x,pe.y,-Ai)}for(Be=0,Wt=Ee.length;Be<Wt;Be++)for(Ze=Ee[Be],Fe=ct[Be],ce=0,Ue=Ze.length;ce<Ue;ce++)pe=p(Ze[ce],Fe[ce],Ri),v(pe.x,pe.y,-Ai)}for(Ri=C,ce=0;ce<Ei;ce++)pe=K?p(c[ce],be[ce],Ri):c[ce],bt?(me.copy(oe.normals[0]).multiplyScalar(pe.x),$t.copy(oe.binormals[0]).multiplyScalar(pe.y),ue.copy(St[0]).add(me).add($t),v(ue.x,ue.y,ue.z)):v(pe.x,pe.y,0);for(Ue=1;Ue<=W;Ue++)for(ce=0;ce<Ei;ce++)pe=K?p(c[ce],be[ce],Ri):c[ce],bt?(me.copy(oe.normals[Ue]).multiplyScalar(pe.x),$t.copy(oe.binormals[Ue]).multiplyScalar(pe.y),ue.copy(St[Ue]).add(me).add($t),v(ue.x,ue.y,ue.z)):v(pe.x,pe.y,st/W*Ue);for(yt=D-1;0<=yt;yt--){for(Ue=yt/D,Ai=wt*Math.cos(Ue*Math.PI/2),Ri=C*Math.sin(Ue*Math.PI/2),ce=0,Ue=en.length;ce<Ue;ce++)pe=p(en[ce],Q[ce],Ri),v(pe.x,pe.y,st+Ai);for(Be=0,Wt=Ee.length;Be<Wt;Be++)for(Ze=Ee[Be],Fe=ct[Be],ce=0,Ue=Ze.length;ce<Ue;ce++)pe=p(Ze[ce],Fe[ce],Ri),bt?v(pe.x,pe.y+St[W-1].y,St[W-1].x+Ai):v(pe.x,pe.y,st+Ai)}(function(){var Ce=o.length/3;if(K){var He=0*Ei;for(ce=0;ce<pn;ce++)Vi=cn[ce],w(Vi[2]+He,Vi[1]+He,Vi[0]+He);for(He=Ei*(W+2*D),ce=0;ce<pn;ce++)Vi=cn[ce],w(Vi[0]+He,Vi[1]+He,Vi[2]+He)}else{for(ce=0;ce<pn;ce++)Vi=cn[ce],w(Vi[2],Vi[1],Vi[0]);for(ce=0;ce<pn;ce++)Vi=cn[ce],w(Vi[0]+Ei*W,Vi[1]+Ei*W,Vi[2]+Ei*W)}n.addGroup(Ce,o.length/3-Ce,0)})(),function(){var Ce=o.length/3,He=0;for(d(en,He),He+=en.length,Be=0,Wt=Ee.length;Be<Wt;Be++)Ze=Ee[Be],d(Ze,He),He+=Ze.length;n.addGroup(Ce,o.length/3-Ce,1)}()}Ft.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];for(var n=this,o=[],s=[],l=0,h=t.length;l<h;l++)i(t[l]);this.addAttribute("position",new Et(o,3)),this.addAttribute("uv",new Et(s,2)),this.computeVertexNormals()}function Dl(t,e,i){if(i.shapes=[],Array.isArray(t))for(var n=0,o=t.length;n<o;n++)i.shapes.push(t[n].uuid);else i.shapes.push(t.uuid);return e.extrudePath!==void 0&&(i.options.extrudePath=e.extrudePath.toJSON()),i}function $s(t,e){X.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new zo(t,e)),this.mergeVertices()}function zo(t,e){e=e||{};var i=e.font;if(!i||!i.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new X;t=i.generateShapes(t,e.size),e.depth=e.height!==void 0?e.height:50,e.bevelThickness===void 0&&(e.bevelThickness=10),e.bevelSize===void 0&&(e.bevelSize=8),e.bevelEnabled===void 0&&(e.bevelEnabled=!1),zr.call(this,t,e),this.type="TextBufferGeometry"}function po(t,e,i,n,o,s,l){X.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:o,thetaStart:s,thetaLength:l},this.fromBufferGeometry(new lr(t,e,i,n,o,s,l)),this.mergeVertices()}function lr(t,e,i,n,o,s,l){Ft.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:o,thetaStart:s,thetaLength:l},t=t||1,e=Math.max(3,Math.floor(e)||8),i=Math.max(2,Math.floor(i)||6),n=n!==void 0?n:0,o=o!==void 0?o:2*Math.PI,s=s!==void 0?s:0,l=l!==void 0?l:Math.PI;var h=s+l,c,p,f=0,d=[],v=new S,w=new S,P=[],R=[],I=[],Q=[];for(p=0;p<=i;p++){var W=[],st=p/i;for(c=0;c<=e;c++){var K=c/e;v.x=-t*Math.cos(n+K*o)*Math.sin(s+st*l),v.y=t*Math.cos(s+st*l),v.z=t*Math.sin(n+K*o)*Math.sin(s+st*l),R.push(v.x,v.y,v.z),w.set(v.x,v.y,v.z).normalize(),I.push(w.x,w.y,w.z),Q.push(K,1-st),W.push(f++)}d.push(W)}for(p=0;p<i;p++)for(c=0;c<e;c++)t=d[p][c+1],n=d[p][c],o=d[p+1][c],l=d[p+1][c+1],(p!==0||0<s)&&P.push(t,n,l),(p!==i-1||h<Math.PI)&&P.push(n,o,l);this.setIndex(P),this.addAttribute("position",new Et(R,3)),this.addAttribute("normal",new Et(I,3)),this.addAttribute("uv",new Et(Q,2))}function Qs(t,e,i,n,o,s){X.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new No(t,e,i,n,o,s)),this.mergeVertices()}function No(t,e,i,n,o,s){Ft.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:o,thetaLength:s},t=t||.5,e=e||1,o=o!==void 0?o:0,s=s!==void 0?s:2*Math.PI,i=i!==void 0?Math.max(3,i):8,n=n!==void 0?Math.max(1,n):1;var l=[],h=[],c=[],p=[],f=t,d=(e-t)/n,v=new S,w=new _,P,R;for(P=0;P<=n;P++){for(R=0;R<=i;R++)t=o+R/i*s,v.x=f*Math.cos(t),v.y=f*Math.sin(t),h.push(v.x,v.y,v.z),c.push(0,0,1),w.x=(v.x/e+1)/2,w.y=(v.y/e+1)/2,p.push(w.x,w.y);f+=d}for(P=0;P<n;P++)for(e=P*(i+1),R=0;R<i;R++)t=R+e,o=t+i+1,s=t+i+2,f=t+1,l.push(t,o,f),l.push(o,s,f);this.setIndex(l),this.addAttribute("position",new Et(h,3)),this.addAttribute("normal",new Et(c,3)),this.addAttribute("uv",new Et(p,2))}function ws(t,e,i,n){X.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},this.fromBufferGeometry(new fo(t,e,i,n)),this.mergeVertices()}function fo(t,e,i,n){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=$e.clamp(n,0,2*Math.PI);var o=[],s=[],l=[],h=1/e,c=new S,p=new _,f;for(f=0;f<=e;f++){var d=i+f*h*n,v=Math.sin(d),w=Math.cos(d);for(d=0;d<=t.length-1;d++)c.x=t[d].x*v,c.y=t[d].y,c.z=t[d].x*w,s.push(c.x,c.y,c.z),p.x=f/e,p.y=d/(t.length-1),l.push(p.x,p.y)}for(f=0;f<e;f++)for(d=0;d<t.length-1;d++)i=d+f*t.length,h=i+t.length,c=i+t.length+1,p=i+1,o.push(i,h,p),o.push(h,c,p);if(this.setIndex(o),this.addAttribute("position",new Et(s,3)),this.addAttribute("uv",new Et(l,2)),this.computeVertexNormals(),n===2*Math.PI)for(n=this.attributes.normal.array,o=new S,s=new S,l=new S,i=e*t.length*3,d=f=0;f<t.length;f++,d+=3)o.x=n[d+0],o.y=n[d+1],o.z=n[d+2],s.x=n[i+d+0],s.y=n[i+d+1],s.z=n[i+d+2],l.addVectors(o,s).normalize(),n[d+0]=n[i+d+0]=l.x,n[d+1]=n[i+d+1]=l.y,n[d+2]=n[i+d+2]=l.z}function $r(t,e){X.call(this),this.type="ShapeGeometry",typeof e=="object"&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){function i(f){var d,v=o.length/3;f=f.extractPoints(e);var w=f.shape,P=f.holes;if(Vr.isClockWise(w)===!1)for(w=w.reverse(),f=0,d=P.length;f<d;f++){var R=P[f];Vr.isClockWise(R)===!0&&(P[f]=R.reverse())}var I=Vr.triangulateShape(w,P);for(f=0,d=P.length;f<d;f++)R=P[f],w=w.concat(R);for(f=0,d=w.length;f<d;f++)R=w[f],o.push(R.x,R.y,0),s.push(0,0,1),l.push(R.x,R.y);for(f=0,d=I.length;f<d;f++)w=I[f],n.push(w[0]+v,w[1]+v,w[2]+v),c+=3}Ft.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],o=[],s=[],l=[],h=0,c=0;if(Array.isArray(t)===!1)i(t);else for(var p=0;p<t.length;p++)i(t[p]),this.addGroup(h,c,p),h+=c,c=0;this.setIndex(n),this.addAttribute("position",new Et(o,3)),this.addAttribute("normal",new Et(s,3)),this.addAttribute("uv",new Et(l,2))}function zl(t,e){if(e.shapes=[],Array.isArray(t))for(var i=0,n=t.length;i<n;i++)e.shapes.push(t[i].uuid);else e.shapes.push(t.uuid);return e}function go(t,e){Ft.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e};var i=[];e=Math.cos($e.DEG2RAD*(e!==void 0?e:1));var n=[0,0],o={},s=["a","b","c"];if(t.isBufferGeometry){var l=new X;l.fromBufferGeometry(t)}else l=t.clone();l.mergeVertices(),l.computeFaceNormals(),t=l.vertices,l=l.faces;for(var h=0,c=l.length;h<c;h++)for(var p=l[h],f=0;3>f;f++){var d=p[s[f]],v=p[s[(f+1)%3]];n[0]=Math.min(d,v),n[1]=Math.max(d,v),d=n[0]+","+n[1],o[d]===void 0?o[d]={index1:n[0],index2:n[1],face1:h,face2:void 0}:o[d].face2=h}for(d in o)n=o[d],(n.face2===void 0||l[n.face1].normal.dot(l[n.face2].normal)<=e)&&(s=t[n.index1],i.push(s.x,s.y,s.z),s=t[n.index2],i.push(s.x,s.y,s.z));this.addAttribute("position",new Et(i,3))}function Qr(t,e,i,n,o,s,l,h){X.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:o,openEnded:s,thetaStart:l,thetaLength:h},this.fromBufferGeometry(new Kr(t,e,i,n,o,s,l,h)),this.mergeVertices()}function Kr(t,e,i,n,o,s,l,h){function c(W){var st,K=new _,wt=new S,C=0,D=W===!0?t:e,ct=W===!0?1:-1,Dt=P;for(st=1;st<=n;st++)d.push(0,I*ct,0),v.push(0,ct,0),w.push(.5,.5),P++;var bt=P;for(st=0;st<=n;st++){var St=st/n*h+l,oe=Math.cos(St);St=Math.sin(St),wt.x=D*St,wt.y=I*ct,wt.z=D*oe,d.push(wt.x,wt.y,wt.z),v.push(0,ct,0),K.x=.5*oe+.5,K.y=.5*St*ct+.5,w.push(K.x,K.y),P++}for(st=0;st<n;st++)K=Dt+st,wt=bt+st,W===!0?f.push(wt,wt+1,K):f.push(wt+1,wt,K),C+=3;p.addGroup(Q,C,W===!0?1:2),Q+=C}Ft.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:o,openEnded:s,thetaStart:l,thetaLength:h};var p=this;t=t!==void 0?t:1,e=e!==void 0?e:1,i=i||1,n=Math.floor(n)||8,o=Math.floor(o)||1,s=s!==void 0?s:!1,l=l!==void 0?l:0,h=h!==void 0?h:2*Math.PI;var f=[],d=[],v=[],w=[],P=0,R=[],I=i/2,Q=0;(function(){var W,st,K=new S,wt=new S,C=0,D=(e-t)/i;for(st=0;st<=o;st++){var ct=[],Dt=st/o,bt=Dt*(e-t)+t;for(W=0;W<=n;W++){var St=W/n,oe=St*h+l,$t=Math.sin(oe);oe=Math.cos(oe),wt.x=bt*$t,wt.y=-Dt*i+I,wt.z=bt*oe,d.push(wt.x,wt.y,wt.z),K.set($t,D,oe).normalize(),v.push(K.x,K.y,K.z),w.push(St,1-Dt),ct.push(P++)}R.push(ct)}for(W=0;W<n;W++)for(st=0;st<o;st++)K=R[st+1][W],wt=R[st+1][W+1],D=R[st][W+1],f.push(R[st][W],K,D),f.push(K,wt,D),C+=6;p.addGroup(Q,C,0),Q+=C})(),s===!1&&(0<t&&c(!0),0<e&&c(!1)),this.setIndex(f),this.addAttribute("position",new Et(d,3)),this.addAttribute("normal",new Et(v,3)),this.addAttribute("uv",new Et(w,2))}function Ms(t,e,i,n,o,s,l){Qr.call(this,0,t,e,i,n,o,s,l),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:o,thetaStart:s,thetaLength:l}}function Sn(t,e,i,n,o,s,l){Kr.call(this,0,t,e,i,n,o,s,l),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:o,thetaStart:s,thetaLength:l}}function Bo(t,e,i,n){X.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new Nr(t,e,i,n)),this.mergeVertices()}function Nr(t,e,i,n){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=[],s=[],l=[],h=[],c,p=new S,f=new _;s.push(0,0,0),l.push(0,0,1),h.push(.5,.5);var d=0;for(c=3;d<=e;d++,c+=3){var v=i+d/e*n;p.x=t*Math.cos(v),p.y=t*Math.sin(v),s.push(p.x,p.y,p.z),l.push(0,0,1),f.x=(s[c]/t+1)/2,f.y=(s[c+1]/t+1)/2,h.push(f.x,f.y)}for(c=1;c<=e;c++)o.push(c,c+1,0);this.setIndex(o),this.addAttribute("position",new Et(s,3)),this.addAttribute("normal",new Et(l,3)),this.addAttribute("uv",new Et(h,2))}function vo(t){Oe.call(this),this.type="ShadowMaterial",this.color=new Y(0),this.transparent=!0,this.setValues(t)}function Uo(t){Pi.call(this,t),this.type="RawShaderMaterial"}function Br(t){Oe.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Y(16777215),this.metalness=this.roughness=.5,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Y(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new _(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function Fo(t){Br.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoatRoughness=this.clearCoat=0,this.setValues(t)}function wr(t){Oe.call(this),this.type="MeshPhongMaterial",this.color=new Y(16777215),this.specular=new Y(1118481),this.shininess=30,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Y(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new _(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function Go(t){wr.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ho(t){Oe.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new _(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.morphNormals=this.morphTargets=this.skinning=this.lights=this.fog=!1,this.setValues(t)}function hr(t){Oe.call(this),this.type="MeshLambertMaterial",this.color=new Y(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Y(0),this.emissiveIntensity=1,this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function ko(t){if(Oe.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Y(16777215),this.bumpMap=this.map=this.matcap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new _(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.lights=this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t),this.matcap===null){t=document.createElement("canvas"),t.width=1,t.height=1;var e=t.getContext("2d");e.fillStyle="#fff",e.fillRect(0,0,1,1),this.matcap=new THREE.CanvasTexture(t)}}function Vo(t){_i.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}function Dn(t,e,i,n){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=n!==void 0?n:new e.constructor(i),this.sampleValues=e,this.valueSize=i}function Ks(t,e,i,n){Dn.call(this,t,e,i,n),this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function ur(t,e,i,n){Dn.call(this,t,e,i,n)}function Wo(t,e,i,n){Dn.call(this,t,e,i,n)}function En(t,e,i,n){if(t===void 0)throw Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Rn.convertArray(e,this.TimeBufferType),this.values=Rn.convertArray(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}function Oa(t,e,i){En.call(this,t,e,i)}function Ia(t,e,i,n){En.call(this,t,e,i,n)}function Mr(t,e,i,n){En.call(this,t,e,i,n)}function kn(t,e,i,n){Dn.call(this,t,e,i,n)}function Ts(t,e,i,n){En.call(this,t,e,i,n)}function Da(t,e,i,n){En.call(this,t,e,i,n)}function Ss(t,e,i,n){En.call(this,t,e,i,n)}function tr(t,e,i){this.name=t,this.tracks=i,this.duration=e!==void 0?e:-1,this.uuid=$e.generateUUID(),0>this.duration&&this.resetDuration()}function ah(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Mr;case"vector":case"vector2":case"vector3":case"vector4":return Ss;case"color":return Ia;case"quaternion":return Ts;case"bool":case"boolean":return Oa;case"string":return Da}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function lh(t){if(t.type===void 0)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=ah(t.type);if(t.times===void 0){var i=[],n=[];Rn.flattenJSON(t.keys,i,n,"value"),t.times=i,t.values=n}return e.parse!==void 0?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}function yo(t,e,i){var n=this,o=!1,s=0,l=0,h=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(c){l++,o===!1&&n.onStart!==void 0&&n.onStart(c,s,l),o=!0},this.itemEnd=function(c){s++,n.onProgress!==void 0&&n.onProgress(c,s,l),s===l&&(o=!1,n.onLoad!==void 0)&&n.onLoad()},this.itemError=function(c){n.onError!==void 0&&n.onError(c)},this.resolveURL=function(c){return h?h(c):c},this.setURLModifier=function(c){return h=c,this}}function lt(t){this.manager=t!==void 0?t:Bn}function Ot(t){this.manager=t!==void 0?t:Bn}function At(t){this.manager=t!==void 0?t:Bn,this._parser=null}function xe(t){this.manager=t!==void 0?t:Bn,this._parser=null}function We(t){this.manager=t!==void 0?t:Bn}function xi(t){this.manager=t!==void 0?t:Bn}function Yi(t){this.manager=t!==void 0?t:Bn}function he(){this.type="Curve",this.arcLengthDivisions=200}function zn(t,e,i,n,o,s,l,h){he.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=i||1,this.yRadius=n||1,this.aStartAngle=o||0,this.aEndAngle=s||2*Math.PI,this.aClockwise=l||!1,this.aRotation=h||0}function Es(t,e,i,n,o,s){zn.call(this,t,e,i,i,n,o,s),this.type="ArcCurve"}function Vn(){var t=0,e=0,i=0,n=0;return{initCatmullRom:function(o,s,l,h,c){o=c*(l-o),h=c*(h-s),t=s,e=o,i=-3*s+3*l-2*o-h,n=2*s-2*l+o+h},initNonuniformCatmullRom:function(o,s,l,h,c,p,f){o=((s-o)/c-(l-o)/(c+p)+(l-s)/p)*p,h=((l-s)/p-(h-s)/(p+f)+(h-l)/f)*p,t=s,e=o,i=-3*s+3*l-2*o-h,n=2*s-2*l+o+h},calc:function(o){var s=o*o;return t+e*o+i*s+n*s*o}}}function mn(t,e,i,n){he.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=i||"centripetal",this.tension=n||.5}function Nl(t,e,i,n,o){e=.5*(n-e),o=.5*(o-i);var s=t*t;return(2*i-2*n+e+o)*t*s+(-3*i+3*n-2*e-o)*s+e*t+i}function Ur(t,e,i,n){var o=1-t;return o*o*e+2*(1-t)*t*i+t*t*n}function _o(t,e,i,n,o){var s=1-t,l=1-t;return s*s*s*e+3*l*l*t*i+3*(1-t)*t*t*n+t*t*t*o}function Wn(t,e,i,n){he.call(this),this.type="CubicBezierCurve",this.v0=t||new _,this.v1=e||new _,this.v2=i||new _,this.v3=n||new _}function ai(t,e,i,n){he.call(this),this.type="CubicBezierCurve3",this.v0=t||new S,this.v1=e||new S,this.v2=i||new S,this.v3=n||new S}function jn(t,e){he.call(this),this.type="LineCurve",this.v1=t||new _,this.v2=e||new _}function cr(t,e){he.call(this),this.type="LineCurve3",this.v1=t||new S,this.v2=e||new S}function Xn(t,e,i){he.call(this),this.type="QuadraticBezierCurve",this.v0=t||new _,this.v1=e||new _,this.v2=i||new _}function Fr(t,e,i){he.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new S,this.v1=e||new S,this.v2=i||new S}function Tr(t){he.call(this),this.type="SplineCurve",this.points=t||[]}function to(){he.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function qn(t){to.call(this),this.type="Path",this.currentPoint=new _,t&&this.setFromPoints(t)}function Nn(t){qn.call(this,t),this.uuid=$e.generateUUID(),this.type="Shape",this.holes=[]}function Ui(t,e){z.call(this),this.type="Light",this.color=new Y(t),this.intensity=e!==void 0?e:1,this.receiveShadow=void 0}function ta(t,e,i){Ui.call(this,t,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(z.DefaultUp),this.updateMatrix(),this.groundColor=new Y(e)}function Gr(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new _(512,512),this.map=null,this.matrix=new pt}function ea(){Gr.call(this,new ee(50,1,.5,500))}function ia(t,e,i,n,o,s){Ui.call(this,t,e),this.type="SpotLight",this.position.copy(z.DefaultUp),this.updateMatrix(),this.target=new z,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(l){this.intensity=l/Math.PI}}),this.distance=i!==void 0?i:0,this.angle=n!==void 0?n:Math.PI/3,this.penumbra=o!==void 0?o:0,this.decay=s!==void 0?s:1,this.shadow=new ea}function jo(t,e,i,n){Ui.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(o){this.intensity=o/(4*Math.PI)}}),this.distance=i!==void 0?i:0,this.decay=n!==void 0?n:1,this.shadow=new Gr(new ee(90,1,.5,500))}function As(t,e,i,n,o,s){ye.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t!==void 0?t:-1,this.right=e!==void 0?e:1,this.top=i!==void 0?i:1,this.bottom=n!==void 0?n:-1,this.near=o!==void 0?o:.1,this.far=s!==void 0?s:2e3,this.updateProjectionMatrix()}function xo(){Gr.call(this,new As(-5,5,5,-5,.5,500))}function Hr(t,e){Ui.call(this,t,e),this.type="DirectionalLight",this.position.copy(z.DefaultUp),this.updateMatrix(),this.target=new z,this.shadow=new xo}function Xo(t,e){Ui.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function za(t,e,i,n){Ui.call(this,t,e),this.type="RectAreaLight",this.width=i!==void 0?i:10,this.height=n!==void 0?n:10}function Na(t){this.manager=t!==void 0?t:Bn,this.textures={}}function ol(t){this.manager=t!==void 0?t:Bn}function eo(){}function qo(t){typeof t=="boolean"&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=t!==void 0?t:Bn,this.withCredentials=!1}function na(t){this.manager=t!==void 0?t:Bn,this.resourcePath=""}function sl(t){typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=t!==void 0?t:Bn,this.options=void 0}function Ba(){this.type="ShapePath",this.color=new Y,this.subPaths=[],this.currentPath=null}function al(t){this.type="Font",this.data=t}function Bl(t){this.manager=t!==void 0?t:Bn}function Ki(t){this.manager=t!==void 0?t:Bn}function An(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new ee,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new ee,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function ra(t,e,i,n){z.call(this),this.type="CubeCamera";var o=new ee(90,1,t,e);o.up.set(0,-1,0),o.lookAt(new S(1,0,0)),this.add(o);var s=new ee(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new S(-1,0,0)),this.add(s);var l=new ee(90,1,t,e);l.up.set(0,0,1),l.lookAt(new S(0,1,0)),this.add(l);var h=new ee(90,1,t,e);h.up.set(0,0,-1),h.lookAt(new S(0,-1,0)),this.add(h);var c=new ee(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new S(0,0,1)),this.add(c);var p=new ee(90,1,t,e);p.up.set(0,-1,0),p.lookAt(new S(0,0,-1)),this.add(p),n=n||{format:1022,magFilter:1006,minFilter:1006},this.renderTarget=new Rt(i,i,n),this.renderTarget.texture.name="CubeCamera",this.update=function(f,d){this.parent===null&&this.updateMatrixWorld();var v=this.renderTarget,w=v.texture.generateMipmaps;v.texture.generateMipmaps=!1,v.activeCubeFace=0,f.render(d,o,v),v.activeCubeFace=1,f.render(d,s,v),v.activeCubeFace=2,f.render(d,l,v),v.activeCubeFace=3,f.render(d,h,v),v.activeCubeFace=4,f.render(d,c,v),v.texture.generateMipmaps=w,v.activeCubeFace=5,f.render(d,p,v),f.setRenderTarget(null)},this.clear=function(f,d,v,w){for(var P=this.renderTarget,R=0;6>R;R++)P.activeCubeFace=R,f.setRenderTarget(P),f.clear(d,v,w);f.setRenderTarget(null)}}function ll(t){this.autoStart=t!==void 0?t:!0,this.elapsedTime=this.oldTime=this.startTime=0,this.running=!1}function Ua(){z.call(this),this.type="AudioListener",this.context=yl.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0}function Ps(t){z.call(this),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.offset=this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function oa(t){Ps.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function Yo(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=e!==void 0?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function sa(t,e,i){switch(this.binding=t,this.valueSize=i,t=Float64Array,e){case"quaternion":e=this._slerp;break;case"string":case"bool":t=Array,e=this._select;break;default:e=this._lerp}this.buffer=new t(4*i),this._mixBufferRegion=e,this.referenceCount=this.useCount=this.cumulativeWeight=0}function Zo(t,e,i){i=i||hn.parseTrackName(e),this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function hn(t,e,i){this.path=e,this.parsedPath=i||hn.parseTrackName(e),this.node=hn.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Ls(){this.uuid=$e.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,i=arguments.length;e!==i;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}function aa(t,e,i){this._mixer=t,this._clip=e,this._localRoot=i||null,t=e.tracks,e=t.length,i=Array(e);for(var n={endingStart:2400,endingEnd:2400},o=0;o!==e;++o){var s=t[o].createInterpolant(null);i[o]=s,s.settings=n}this._interpolantSettings=n,this._interpolants=i,this._propertyBindings=Array(e),this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function wo(t){this._root=t,this._initMemoryManager(),this.time=this._accuIndex=0,this.timeScale=1}function Fa(t,e){typeof t=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=e),this.value=t}function hl(){Ft.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function ul(t,e,i){vi.call(this,t,e),this.meshPerAttribute=i||1}function cl(t,e,i,n){typeof i=="number"&&(n=i,i=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),it.call(this,t,e,i),this.meshPerAttribute=n||1}function Ul(t,e,i,n){this.ray=new In(t,e),this.near=i||0,this.far=n||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function la(t,e){return t.distance-e.distance}function Jo(t,e,i,n){if(t.visible!==!1&&(t.raycast(e,i),n===!0)){t=t.children,n=0;for(var o=t.length;n<o;n++)Jo(t[n],e,i,!0)}}function pl(t,e,i){return this.radius=t!==void 0?t:1,this.phi=e!==void 0?e:0,this.theta=i!==void 0?i:0,this}function O(t,e,i){return this.radius=t!==void 0?t:1,this.theta=e!==void 0?e:0,this.y=i!==void 0?i:0,this}function Mo(t,e){this.min=t!==void 0?t:new _(1/0,1/0),this.max=e!==void 0?e:new _(-1/0,-1/0)}function Cs(t,e){this.start=t!==void 0?t:new S,this.end=e!==void 0?e:new S}function Cn(t){z.call(this),this.material=t,this.render=function(){}}function ri(t,e,i,n){this.object=t,this.size=e!==void 0?e:1,t=i!==void 0?i:16711680,n=n!==void 0?n:1,e=0,(i=this.object.geometry)&&i.isGeometry?e=3*i.faces.length:i&&i.isBufferGeometry&&(e=i.attributes.normal.count),i=new Ft,e=new Et(6*e,3),i.addAttribute("position",e),ei.call(this,i,new _i({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Rs(t,e){z.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new 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,s=n/32*Math.PI*2;e.push(Math.cos(o),Math.sin(o),1,Math.cos(s),Math.sin(s),1)}t.addAttribute("position",new Et(e,3)),e=new _i({fog:!1}),this.cone=new ei(t,e),this.add(this.cone),this.update()}function Fl(t){var e=[];t&&t.isBone&&e.push(t);for(var i=0;i<t.children.length;i++)e.push.apply(e,Fl(t.children[i]));return e}function bs(t){for(var e=Fl(t),i=new Ft,n=[],o=[],s=new Y(0,0,1),l=new Y(0,1,0),h=0;h<e.length;h++){var c=e[h];c.parent&&c.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),o.push(s.r,s.g,s.b),o.push(l.r,l.g,l.b))}i.addAttribute("position",new Et(n,3)),i.addAttribute("color",new Et(o,3)),n=new _i({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0}),ei.call(this,i,n),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function pr(t,e,i){this.light=t,this.light.updateMatrixWorld(),this.color=i,t=new lr(e,4,2),e=new ci({wireframe:!0,fog:!1}),Fi.call(this,t,e),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Os(t,e){z.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new _i({fog:!1}),e=new Ft,e.addAttribute("position",new it(new Float32Array(15),3)),this.line=new Li(e,t),this.add(this.line),this.update()}function Is(t,e,i){z.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,t=new bo(e),t.rotateY(.5*Math.PI),this.material=new ci({wireframe:!0,fog:!1}),this.color===void 0&&(this.material.vertexColors=2),e=t.getAttribute("position"),e=new Float32Array(3*e.count),t.addAttribute("color",new it(e,3)),this.add(new Fi(t,this.material)),this.update()}function ha(t,e,i,n){t=t||10,e=e||10,i=new Y(i!==void 0?i:4473924),n=new Y(n!==void 0?n:8947848);var o=e/2,s=t/e,l=t/2;t=[];for(var h=[],c=0,p=0,f=-l;c<=e;c++,f+=s){t.push(-l,0,f,l,0,f),t.push(f,0,-l,f,0,l);var d=c===o?i:n;d.toArray(h,p),p+=3,d.toArray(h,p),p+=3,d.toArray(h,p),p+=3,d.toArray(h,p),p+=3}e=new Ft,e.addAttribute("position",new Et(t,3)),e.addAttribute("color",new Et(h,3)),i=new _i({vertexColors:2}),ei.call(this,e,i)}function Ga(t,e,i,n,o,s){t=t||10,e=e||16,i=i||8,n=n||64,o=new Y(o!==void 0?o:4473924),s=new Y(s!==void 0?s:8947848);var l=[],h=[],c;for(c=0;c<=e;c++){var p=c/e*2*Math.PI,f=Math.sin(p)*t;p=Math.cos(p)*t,l.push(0,0,0),l.push(f,0,p);var d=c&1?o:s;h.push(d.r,d.g,d.b),h.push(d.r,d.g,d.b)}for(c=0;c<=i;c++){d=c&1?o:s;var v=t-t/i*c;for(e=0;e<n;e++)p=e/n*2*Math.PI,f=Math.sin(p)*v,p=Math.cos(p)*v,l.push(f,0,p),h.push(d.r,d.g,d.b),p=(e+1)/n*2*Math.PI,f=Math.sin(p)*v,p=Math.cos(p)*v,l.push(f,0,p),h.push(d.r,d.g,d.b)}t=new Ft,t.addAttribute("position",new Et(l,3)),t.addAttribute("color",new Et(h,3)),l=new _i({vertexColors:2}),ei.call(this,t,l)}function ua(t,e,i,n){this.object=t,this.size=e!==void 0?e:1,t=i!==void 0?i:16776960,n=n!==void 0?n:1,e=0,(i=this.object.geometry)&&i.isGeometry?e=i.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead."),i=new Ft,e=new Et(6*e,3),i.addAttribute("position",e),ei.call(this,i,new _i({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Yn(t,e,i){z.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,e===void 0&&(e=1),t=new Ft,t.addAttribute("position",new Et([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3)),e=new _i({fog:!1}),this.lightPlane=new Li(t,e),this.add(this.lightPlane),t=new Ft,t.addAttribute("position",new Et([0,0,0,0,0,1],3)),this.targetLine=new Li(t,e),this.add(this.targetLine),this.update()}function ca(t){function e(w,P,R){i(w,R),i(P,R)}function i(w,P){s.push(0,0,0),l.push(P.r,P.g,P.b),h[w]===void 0&&(h[w]=[]),h[w].push(s.length/3-1)}var n=new Ft,o=new _i({color:16777215,vertexColors:1}),s=[],l=[],h={},c=new Y(16755200),p=new Y(16711680),f=new Y(43775),d=new Y(16777215),v=new Y(3355443);e("n1","n2",c),e("n2","n4",c),e("n4","n3",c),e("n3","n1",c),e("f1","f2",c),e("f2","f4",c),e("f4","f3",c),e("f3","f1",c),e("n1","f1",c),e("n2","f2",c),e("n3","f3",c),e("n4","f4",c),e("p","n1",p),e("p","n2",p),e("p","n3",p),e("p","n4",p),e("u1","u2",f),e("u2","u3",f),e("u3","u1",f),e("c","t",d),e("p","c",v),e("cn1","cn2",v),e("cn3","cn4",v),e("cf1","cf2",v),e("cf3","cf4",v),n.addAttribute("position",new Et(s,3)),n.addAttribute("color",new Et(l,3)),ei.call(this,n,o),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=h,this.update()}function io(t,e){this.object=t,e===void 0&&(e=16776960),t=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var i=new Float32Array(24),n=new Ft;n.setIndex(new it(t,1)),n.addAttribute("position",new it(i,3)),ei.call(this,n,new _i({color:e})),this.matrixAutoUpdate=!1,this.update()}function pa(t,e){this.type="Box3Helper",this.box=t,t=e!==void 0?e:16776960,e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var i=new Ft;i.setIndex(new it(e,1)),i.addAttribute("position",new Et([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),ei.call(this,i,new _i({color:t})),this.geometry.computeBoundingSphere()}function fa(t,e,i){this.type="PlaneHelper",this.plane=t,this.size=e===void 0?1:e,t=i!==void 0?i:16776960,e=new 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(),Li.call(this,e,new _i({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 Fi(e,new ci({color:t,opacity:.2,transparent:!0,depthWrite:!1})))}function no(t,e,i,n,o,s){z.call(this),t===void 0&&(t=new THREE.Vector3(0,0,1)),e===void 0&&(e=new THREE.Vector3(0,0,0)),i===void 0&&(i=1),n===void 0&&(n=16776960),o===void 0&&(o=.2*i),s===void 0&&(s=.2*o),Xa===void 0&&(Xa=new Ft,Xa.addAttribute("position",new Et([0,0,0,0,1,0],3)),va=new Kr(0,.5,1,5,1),va.translate(0,-.5,0)),this.position.copy(e),this.line=new Li(Xa,new _i({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Fi(va,new ci({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,o,s)}function er(t){t=t||1;var e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t];t=new 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 _i({vertexColors:2}),ei.call(this,t,e)}function Gl(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),mn.call(this,t),this.type="catmullrom",this.closed=!0}function Hl(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),mn.call(this,t),this.type="catmullrom"}function fl(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),mn.call(this,t),this.type="catmullrom"}Number.EPSILON===void 0&&(Number.EPSILON=Math.pow(2,-52)),Number.isInteger===void 0&&(Number.isInteger=function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}),Math.sign===void 0&&(Math.sign=function(t){return 0>t?-1:0<t?1:+t}),!("name"in Function.prototype)&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),Object.assign===void 0&&function(){Object.assign=function(t){if(t==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(n!=null)for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}}(),Object.assign($.prototype,{addEventListener:function(t,e){this._listeners===void 0&&(this._listeners={});var i=this._listeners;i[t]===void 0&&(i[t]=[]),i[t].indexOf(e)===-1&&i[t].push(e)},hasEventListener:function(t,e){if(this._listeners===void 0)return!1;var i=this._listeners;return i[t]!==void 0&&i[t].indexOf(e)!==-1},removeEventListener:function(t,e){this._listeners!==void 0&&(t=this._listeners[t],t!==void 0&&(e=t.indexOf(e),e!==-1&&t.splice(e,1)))},dispatchEvent:function(t){if(this._listeners!==void 0){var e=this._listeners[t.type];if(e!==void 0){t.target=this,e=e.slice(0);for(var i=0,n=e.length;i<n;i++)e[i].call(this,t)}}}});var $e={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;256>e;e++)t[e]=(16>e?"0":"")+e.toString(16);return function(){var i=4294967295*Math.random()|0,n=4294967295*Math.random()|0,o=4294967295*Math.random()|0,s=4294967295*Math.random()|0;return(t[i&255]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]+"-"+t[n&255]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[o&63|128]+t[o>>8&255]+"-"+t[o>>16&255]+t[o>>24&255]+t[s&255]+t[s>>8&255]+t[s>>16&255]+t[s>>24&255]).toUpperCase()}}(),clamp:function(t,e,i){return Math.max(e,Math.min(i,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,i,n,o){return n+(t-e)*(o-n)/(i-e)},lerp:function(t,e,i){return(1-i)*t+i*e},smoothstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*(3-2*t))},smootherstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*t*(t*(6*t-15)+10))},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*$e.DEG2RAD},radToDeg:function(t){return t*$e.RAD2DEG},isPowerOfTwo:function(t){return(t&t-1)===0&&t!==0},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};Object.defineProperties(_.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(_.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 _,e=new _;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(pt.prototype,{isMatrix4:!0,set:function(t,e,i,n,o,s,l,h,c,p,f,d,v,w,P,R){var I=this.elements;return I[0]=t,I[4]=e,I[8]=i,I[12]=n,I[1]=o,I[5]=s,I[9]=l,I[13]=h,I[2]=c,I[6]=p,I[10]=f,I[14]=d,I[3]=v,I[7]=w,I[11]=P,I[15]=R,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return new pt().fromArray(this.elements)},copy:function(t){var e=this.elements;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},copyPosition:function(t){var e=this.elements;return t=t.elements,e[12]=t[12],e[13]=t[13],e[14]=t[14],this},extractBasis:function(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this},extractRotation:function(){var t=new S;return function(e){var i=this.elements,n=e.elements,o=1/t.setFromMatrixColumn(e,0).length(),s=1/t.setFromMatrixColumn(e,1).length();return e=1/t.setFromMatrixColumn(e,2).length(),i[0]=n[0]*o,i[1]=n[1]*o,i[2]=n[2]*o,i[3]=0,i[4]=n[4]*s,i[5]=n[5]*s,i[6]=n[6]*s,i[7]=0,i[8]=n[8]*e,i[9]=n[9]*e,i[10]=n[10]*e,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}}(),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,i=t.x,n=t.y,o=t.z,s=Math.cos(i);i=Math.sin(i);var l=Math.cos(n);n=Math.sin(n);var h=Math.cos(o);if(o=Math.sin(o),t.order==="XYZ"){t=s*h;var c=s*o,p=i*h,f=i*o;e[0]=l*h,e[4]=-l*o,e[8]=n,e[1]=c+p*n,e[5]=t-f*n,e[9]=-i*l,e[2]=f-t*n,e[6]=p+c*n,e[10]=s*l}else t.order==="YXZ"?(t=l*h,c=l*o,p=n*h,f=n*o,e[0]=t+f*i,e[4]=p*i-c,e[8]=s*n,e[1]=s*o,e[5]=s*h,e[9]=-i,e[2]=c*i-p,e[6]=f+t*i,e[10]=s*l):t.order==="ZXY"?(t=l*h,c=l*o,p=n*h,f=n*o,e[0]=t-f*i,e[4]=-s*o,e[8]=p+c*i,e[1]=c+p*i,e[5]=s*h,e[9]=f-t*i,e[2]=-s*n,e[6]=i,e[10]=s*l):t.order==="ZYX"?(t=s*h,c=s*o,p=i*h,f=i*o,e[0]=l*h,e[4]=p*n-c,e[8]=t*n+f,e[1]=l*o,e[5]=f*n+t,e[9]=c*n-p,e[2]=-n,e[6]=i*l,e[10]=s*l):t.order==="YZX"?(t=s*l,c=s*n,p=i*l,f=i*n,e[0]=l*h,e[4]=f-t*o,e[8]=p*o+c,e[1]=o,e[5]=s*h,e[9]=-i*h,e[2]=-n*h,e[6]=c*o+p,e[10]=t-f*o):t.order==="XZY"&&(t=s*l,c=s*n,p=i*l,f=i*n,e[0]=l*h,e[4]=-o,e[8]=n*h,e[1]=t*o+f,e[5]=s*h,e[9]=c*o-p,e[2]=p*o-c,e[6]=i*h,e[10]=f*o+t);return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(){var t=new S(0,0,0),e=new S(1,1,1);return function(i){return this.compose(t,i,e)}}(),lookAt:function(){var t=new S,e=new S,i=new S;return function(n,o,s){var l=this.elements;return i.subVectors(n,o),i.lengthSq()===0&&(i.z=1),i.normalize(),t.crossVectors(s,i),t.lengthSq()===0&&(Math.abs(s.z)===1?i.x+=1e-4:i.z+=1e-4,i.normalize(),t.crossVectors(s,i)),t.normalize(),e.crossVectors(i,t),l[0]=t.x,l[4]=e.x,l[8]=i.x,l[1]=t.y,l[5]=e.y,l[9]=i.y,l[2]=t.z,l[6]=e.z,l[10]=i.z,this}}(),multiply:function(t,e){return e!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements;e=this.elements,t=i[0];var o=i[4],s=i[8],l=i[12],h=i[1],c=i[5],p=i[9],f=i[13],d=i[2],v=i[6],w=i[10],P=i[14],R=i[3],I=i[7],Q=i[11];i=i[15];var W=n[0],st=n[4],K=n[8],wt=n[12],C=n[1],D=n[5],ct=n[9],Dt=n[13],bt=n[2],St=n[6],oe=n[10],$t=n[14],me=n[3],ue=n[7],Wt=n[11];return n=n[15],e[0]=t*W+o*C+s*bt+l*me,e[4]=t*st+o*D+s*St+l*ue,e[8]=t*K+o*ct+s*oe+l*Wt,e[12]=t*wt+o*Dt+s*$t+l*n,e[1]=h*W+c*C+p*bt+f*me,e[5]=h*st+c*D+p*St+f*ue,e[9]=h*K+c*ct+p*oe+f*Wt,e[13]=h*wt+c*Dt+p*$t+f*n,e[2]=d*W+v*C+w*bt+P*me,e[6]=d*st+v*D+w*St+P*ue,e[10]=d*K+v*ct+w*oe+P*Wt,e[14]=d*wt+v*Dt+w*$t+P*n,e[3]=R*W+I*C+Q*bt+i*me,e[7]=R*st+I*D+Q*St+i*ue,e[11]=R*K+I*ct+Q*oe+i*Wt,e[15]=R*wt+I*Dt+Q*$t+i*n,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToBufferAttribute:function(){var t=new S;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix4(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],i=t[4],n=t[8],o=t[12],s=t[1],l=t[5],h=t[9],c=t[13],p=t[2],f=t[6],d=t[10],v=t[14];return t[3]*(+o*h*f-n*c*f-o*l*d+i*c*d+n*l*v-i*h*v)+t[7]*(+e*h*v-e*c*d+o*s*d-n*s*v+n*c*p-o*h*p)+t[11]*(+e*c*f-e*l*v-o*s*f+i*s*v+o*l*p-i*c*p)+t[15]*(-n*l*p-e*h*f+e*l*d+n*s*f-i*s*d+i*h*p)},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var i=this.elements,n=t.elements;t=n[0];var o=n[1],s=n[2],l=n[3],h=n[4],c=n[5],p=n[6],f=n[7],d=n[8],v=n[9],w=n[10],P=n[11],R=n[12],I=n[13],Q=n[14];n=n[15];var W=v*Q*f-I*w*f+I*p*P-c*Q*P-v*p*n+c*w*n,st=R*w*f-d*Q*f-R*p*P+h*Q*P+d*p*n-h*w*n,K=d*I*f-R*v*f+R*c*P-h*I*P-d*c*n+h*v*n,wt=R*v*p-d*I*p-R*c*w+h*I*w+d*c*Q-h*v*Q,C=t*W+o*st+s*K+l*wt;if(C===0){if(e===!0)throw Error("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/C,i[0]=W*e,i[1]=(I*w*l-v*Q*l-I*s*P+o*Q*P+v*s*n-o*w*n)*e,i[2]=(c*Q*l-I*p*l+I*s*f-o*Q*f-c*s*n+o*p*n)*e,i[3]=(v*p*l-c*w*l-v*s*f+o*w*f+c*s*P-o*p*P)*e,i[4]=st*e,i[5]=(d*Q*l-R*w*l+R*s*P-t*Q*P-d*s*n+t*w*n)*e,i[6]=(R*p*l-h*Q*l-R*s*f+t*Q*f+h*s*n-t*p*n)*e,i[7]=(h*w*l-d*p*l+d*s*f-t*w*f-h*s*P+t*p*P)*e,i[8]=K*e,i[9]=(R*v*l-d*I*l-R*o*P+t*I*P+d*o*n-t*v*n)*e,i[10]=(h*I*l-R*c*l+R*o*f-t*I*f-h*o*n+t*c*n)*e,i[11]=(d*c*l-h*v*l-d*o*f+t*v*f+h*o*P-t*c*P)*e,i[12]=wt*e,i[13]=(d*I*s-R*v*s+R*o*w-t*I*w-d*o*Q+t*v*Q)*e,i[14]=(R*c*s-h*I*s-R*o*p+t*I*p+h*o*Q-t*c*Q)*e,i[15]=(h*v*s-d*c*s+d*o*p-t*v*p-h*o*w+t*c*w)*e,this},scale:function(t){var e=this.elements,i=t.x,n=t.y;return t=t.z,e[0]*=i,e[4]*=n,e[8]*=t,e[1]*=i,e[5]*=n,e[9]*=t,e[2]*=i,e[6]*=n,e[10]*=t,e[3]*=i,e[7]*=n,e[11]*=t,this},getMaxScaleOnAxis:function(){var t=this.elements;return Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1]+t[2]*t[2],t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))},makeTranslation:function(t,e,i){return this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(1,0,0,0,0,e,-t,0,0,t,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,0,t,0,0,1,0,0,-t,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,-t,0,0,t,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var i=Math.cos(e);e=Math.sin(e);var n=1-i,o=t.x,s=t.y;t=t.z;var l=n*o,h=n*s;return this.set(l*o+i,l*s-e*t,l*t+e*s,0,l*s+e*t,h*s+i,h*t-e*o,0,l*t-e*s,h*t+e*o,n*t*t+i,0,0,0,0,1),this},makeScale:function(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this},makeShear:function(t,e,i){return this.set(1,e,i,0,t,1,i,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,i){var n=this.elements,o=e._x,s=e._y,l=e._z,h=e._w,c=o+o,p=s+s,f=l+l;e=o*c;var d=o*p;o*=f;var v=s*p;s*=f,l*=f,c*=h,p*=h,h*=f,f=i.x;var w=i.y;return i=i.z,n[0]=(1-(v+l))*f,n[1]=(d+h)*f,n[2]=(o-p)*f,n[3]=0,n[4]=(d-h)*w,n[5]=(1-(e+l))*w,n[6]=(s+c)*w,n[7]=0,n[8]=(o+p)*i,n[9]=(s-c)*i,n[10]=(1-(e+v))*i,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this},decompose:function(){var t=new S,e=new pt;return function(i,n,o){var s=this.elements,l=t.set(s[0],s[1],s[2]).length(),h=t.set(s[4],s[5],s[6]).length(),c=t.set(s[8],s[9],s[10]).length();0>this.determinant()&&(l=-l),i.x=s[12],i.y=s[13],i.z=s[14],e.copy(this),i=1/l,s=1/h;var p=1/c;return e.elements[0]*=i,e.elements[1]*=i,e.elements[2]*=i,e.elements[4]*=s,e.elements[5]*=s,e.elements[6]*=s,e.elements[8]*=p,e.elements[9]*=p,e.elements[10]*=p,n.setFromRotationMatrix(e),o.x=l,o.y=h,o.z=c,this}}(),makePerspective:function(t,e,i,n,o,s){s===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var l=this.elements;return l[0]=2*o/(e-t),l[4]=0,l[8]=(e+t)/(e-t),l[12]=0,l[1]=0,l[5]=2*o/(i-n),l[9]=(i+n)/(i-n),l[13]=0,l[2]=0,l[6]=0,l[10]=-(s+o)/(s-o),l[14]=-2*s*o/(s-o),l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this},makeOrthographic:function(t,e,i,n,o,s){var l=this.elements,h=1/(e-t),c=1/(i-n),p=1/(s-o);return l[0]=2*h,l[4]=0,l[8]=0,l[12]=-((e+t)*h),l[1]=0,l[5]=2*c,l[9]=0,l[13]=-((i+n)*c),l[2]=0,l[6]=0,l[10]=-2*p,l[14]=-((s+o)*p),l[3]=0,l[7]=0,l[11]=0,l[15]=1,this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;16>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;16>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}),Object.assign(gt,{slerp:function(t,e,i,n){return i.copy(t).slerp(e,n)},slerpFlat:function(t,e,i,n,o,s,l){var h=i[n+0],c=i[n+1],p=i[n+2];i=i[n+3],n=o[s+0];var f=o[s+1],d=o[s+2];if(o=o[s+3],i!==o||h!==n||c!==f||p!==d){s=1-l;var v=h*n+c*f+p*d+i*o,w=0<=v?1:-1,P=1-v*v;P>Number.EPSILON&&(P=Math.sqrt(P),v=Math.atan2(P,v*w),s=Math.sin(s*v)/P,l=Math.sin(l*v)/P),w*=l,h=h*s+n*w,c=c*s+f*w,p=p*s+d*w,i=i*s+o*w,s===1-l&&(l=1/Math.sqrt(h*h+c*c+p*p+i*i),h*=l,c*=l,p*=l,i*=l)}t[e]=h,t[e+1]=c,t[e+2]=p,t[e+3]=i}}),Object.defineProperties(gt.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(gt.prototype,{isQuaternion:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var i=t._x,n=t._y,o=t._z;t=t.order;var s=Math.cos,l=Math.sin,h=s(i/2),c=s(n/2);return s=s(o/2),i=l(i/2),n=l(n/2),o=l(o/2),t==="XYZ"?(this._x=i*c*s+h*n*o,this._y=h*n*s-i*c*o,this._z=h*c*o+i*n*s,this._w=h*c*s-i*n*o):t==="YXZ"?(this._x=i*c*s+h*n*o,this._y=h*n*s-i*c*o,this._z=h*c*o-i*n*s,this._w=h*c*s+i*n*o):t==="ZXY"?(this._x=i*c*s-h*n*o,this._y=h*n*s+i*c*o,this._z=h*c*o+i*n*s,this._w=h*c*s-i*n*o):t==="ZYX"?(this._x=i*c*s-h*n*o,this._y=h*n*s+i*c*o,this._z=h*c*o-i*n*s,this._w=h*c*s+i*n*o):t==="YZX"?(this._x=i*c*s+h*n*o,this._y=h*n*s+i*c*o,this._z=h*c*o-i*n*s,this._w=h*c*s-i*n*o):t==="XZY"&&(this._x=i*c*s-h*n*o,this._y=h*n*s-i*c*o,this._z=h*c*o+i*n*s,this._w=h*c*s+i*n*o),e!==!1&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){e/=2;var i=Math.sin(e);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(e),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e=t.elements,i=e[0];t=e[4];var n=e[8],o=e[1],s=e[5],l=e[9],h=e[2],c=e[6];e=e[10];var p=i+s+e;return 0<p?(i=.5/Math.sqrt(p+1),this._w=.25/i,this._x=(c-l)*i,this._y=(n-h)*i,this._z=(o-t)*i):i>s&&i>e?(i=2*Math.sqrt(1+i-s-e),this._w=(c-l)/i,this._x=.25*i,this._y=(t+o)/i,this._z=(n+h)/i):s>e?(i=2*Math.sqrt(1+s-i-e),this._w=(n-h)/i,this._x=(t+o)/i,this._y=.25*i,this._z=(l+c)/i):(i=2*Math.sqrt(1+e-i-s),this._w=(o-t)/i,this._x=(n+h)/i,this._y=(l+c)/i,this._z=.25*i),this.onChangeCallback(),this},setFromUnitVectors:function(){var t=new S,e;return function(i,n){return t===void 0&&(t=new S),e=i.dot(n)+1,1e-6>e?(e=0,Math.abs(i.x)>Math.abs(i.z)?t.set(-i.y,i.x,0):t.set(0,-i.z,i.y)):t.crossVectors(i,n),this._x=t.x,this._y=t.y,this._z=t.z,this._w=e,this.normalize()}}(),angleTo:function(t){return 2*Math.acos(Math.abs($e.clamp(this.dot(t),-1,1)))},rotateTowards:function(t,e){var i=this.angleTo(t);return i===0?this:(this.slerp(t,Math.min(1,e/i)),this)},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return t===0?(this._z=this._y=this._x=0,this._w=1):(t=1/t,this._x*=t,this._y*=t,this._z*=t,this._w*=t),this.onChangeCallback(),this},multiply:function(t,e){return e!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var i=t._x,n=t._y,o=t._z;t=t._w;var s=e._x,l=e._y,h=e._z;return e=e._w,this._x=i*e+t*s+n*h-o*l,this._y=n*e+t*l+o*s-i*h,this._z=o*e+t*h+i*l-n*s,this._w=t*e-i*s-n*l-o*h,this.onChangeCallback(),this},slerp:function(t,e){if(e===0)return this;if(e===1)return this.copy(t);var i=this._x,n=this._y,o=this._z,s=this._w,l=s*t._w+i*t._x+n*t._y+o*t._z;if(0>l?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,l=-l):this.copy(t),1<=l)return this._w=s,this._x=i,this._y=n,this._z=o,this;if(t=1-l*l,t<=Number.EPSILON)return l=1-e,this._w=l*s+e*this._w,this._x=l*i+e*this._x,this._y=l*n+e*this._y,this._z=l*o+e*this._z,this.normalize();t=Math.sqrt(t);var h=Math.atan2(t,l);return l=Math.sin((1-e)*h)/t,e=Math.sin(e*h)/t,this._w=s*l+this._w*e,this._x=i*l+this._x*e,this._y=n*l+this._y*e,this._z=o*l+this._z*e,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return e===void 0&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(S.prototype,{isVector3:!0,set:function(t,e,i){return this.x=t,this.y=e,this.z=i,this},setScalar:function(t){return this.z=this.y=this.x=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return e!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return e!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return e!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t=new gt;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 gt;return function(e,i){return this.applyQuaternion(t.setFromAxisAngle(e,i))}}(),applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[3]*i+t[6]*n,this.y=t[1]*e+t[4]*i+t[7]*n,this.z=t[2]*e+t[5]*i+t[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z;t=t.elements;var o=1/(t[3]*e+t[7]*i+t[11]*n+t[15]);return this.x=(t[0]*e+t[4]*i+t[8]*n+t[12])*o,this.y=(t[1]*e+t[5]*i+t[9]*n+t[13])*o,this.z=(t[2]*e+t[6]*i+t[10]*n+t[14])*o,this},applyQuaternion:function(t){var e=this.x,i=this.y,n=this.z,o=t.x,s=t.y,l=t.z;t=t.w;var h=t*e+s*n-l*i,c=t*i+l*e-o*n,p=t*n+o*i-s*e;return e=-o*e-s*i-l*n,this.x=h*t+e*-o+c*-l-p*-s,this.y=c*t+e*-s+p*-o-h*-l,this.z=p*t+e*-l+h*-s-c*-o,this},project:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)},unproject:function(){var t=new pt;return function(e){return this.applyMatrix4(t.getInverse(e.projectionMatrix)).applyMatrix4(e.matrixWorld)}}(),transformDirection:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n,this.y=t[1]*e+t[5]*i+t[9]*n,this.z=t[2]*e+t[6]*i+t[10]*n,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new S,e=new S;return function(i,n){return t.set(i,i,i),e.set(n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},cross:function(t,e){return e!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var i=t.x,n=t.y;t=t.z;var o=e.x,s=e.y;return e=e.z,this.x=n*e-t*s,this.y=t*o-i*e,this.z=i*s-n*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new S;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new S;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){return t=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq()),Math.acos($e.clamp(t,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,i=this.y-t.y;return t=this.z-t.z,e*e+i*i+t*t},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)},setFromSphericalCoords:function(t,e,i){var n=Math.sin(e)*t;return this.x=n*Math.sin(i),this.y=Math.cos(e)*t,this.z=n*Math.cos(i),this},setFromCylindrical:function(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)},setFromCylindricalCoords:function(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this},setFromMatrixPosition:function(t){return t=t.elements,this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length();return t=this.setFromMatrixColumn(t,2).length(),this.x=e,this.y=i,this.z=t,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return e===void 0&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,i){return i!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Mt.prototype,{isMatrix3:!0,set:function(t,e,i,n,o,s,l,h,c){var p=this.elements;return p[0]=t,p[1]=n,p[2]=l,p[3]=e,p[4]=o,p[5]=h,p[6]=i,p[7]=s,p[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return new this.constructor().fromArray(this.elements)},copy:function(t){var e=this.elements;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},setFromMatrix4:function(t){return t=t.elements,this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(){var t=new S;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix3(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements;e=this.elements,t=i[0];var o=i[3],s=i[6],l=i[1],h=i[4],c=i[7],p=i[2],f=i[5];i=i[8];var d=n[0],v=n[3],w=n[6],P=n[1],R=n[4],I=n[7],Q=n[2],W=n[5];return n=n[8],e[0]=t*d+o*P+s*Q,e[3]=t*v+o*R+s*W,e[6]=t*w+o*I+s*n,e[1]=l*d+h*P+c*Q,e[4]=l*v+h*R+c*W,e[7]=l*w+h*I+c*n,e[2]=p*d+f*P+i*Q,e[5]=p*v+f*R+i*W,e[8]=p*w+f*I+i*n,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],i=t[1],n=t[2],o=t[3],s=t[4],l=t[5],h=t[6],c=t[7];return t=t[8],e*s*t-e*l*c-i*o*t+i*l*h+n*o*c-n*s*h},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var i=t.elements;t=this.elements;var n=i[0],o=i[1],s=i[2],l=i[3],h=i[4],c=i[5],p=i[6],f=i[7];i=i[8];var d=i*h-c*f,v=c*p-i*l,w=f*l-h*p,P=n*d+o*v+s*w;if(P===0){if(e===!0)throw Error("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/P,t[0]=d*e,t[1]=(s*f-i*o)*e,t[2]=(c*o-s*h)*e,t[3]=v*e,t[4]=(i*n-s*p)*e,t[5]=(s*l-c*n)*e,t[6]=w*e,t[7]=(o*p-f*n)*e,t[8]=(h*n-o*l)*e,this},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},setUvTransform:function(t,e,i,n,o,s,l){var h=Math.cos(o);o=Math.sin(o),this.set(i*h,i*o,-i*(h*s+o*l)+s+t,-n*o,n*h,-n*(-o*s+h*l)+l+e,0,0,1)},scale:function(t,e){var i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=e,i[4]*=e,i[7]*=e,this},rotate:function(t){var e=Math.cos(t);t=Math.sin(t);var i=this.elements,n=i[0],o=i[3],s=i[6],l=i[1],h=i[4],c=i[7];return i[0]=e*n+t*l,i[3]=e*o+t*h,i[6]=e*s+t*c,i[1]=-t*n+e*l,i[4]=-t*o+e*h,i[7]=-t*s+e*c,this},translate:function(t,e){var i=this.elements;return i[0]+=t*i[2],i[3]+=t*i[5],i[6]+=t*i[8],i[1]+=e*i[2],i[4]+=e*i[5],i[7]+=e*i[8],this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;9>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;9>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}});var To={getDataURL:function(t){if(typeof HTMLCanvasElement>"u")return t.src;if(t instanceof HTMLCanvasElement)var e=t;else{e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),e.width=t.width,e.height=t.height;var i=e.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height)}return 2048<e.width||2048<e.height?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}},$o=0;kt.DEFAULT_IMAGE=void 0,kt.DEFAULT_MAPPING=300,kt.prototype=Object.assign(Object.create($.prototype),{constructor:kt,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];var i={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(this.image!==void 0){var n=this.image;if(n.uuid===void 0&&(n.uuid=$e.generateUUID()),!e&&t.images[n.uuid]===void 0){if(Array.isArray(n))for(var o=[],s=0,l=n.length;s<l;s++)o.push(To.getDataURL(n[s]));else o=To.getDataURL(n);t.images[n.uuid]={uuid:n.uuid,url:o}}i.image=n.uuid}return e||(t.textures[this.uuid]=i),i},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping!==300)return t;if(t.applyMatrix3(this.matrix),0>t.x||1<t.x)switch(this.wrapS){case 1e3:t.x-=Math.floor(t.x);break;case 1001:t.x=0>t.x?0:1;break;case 1002:t.x=Math.abs(Math.floor(t.x)%2)===1?Math.ceil(t.x)-t.x:t.x-Math.floor(t.x)}if(0>t.y||1<t.y)switch(this.wrapT){case 1e3:t.y-=Math.floor(t.y);break;case 1001:t.y=0>t.y?0:1;break;case 1002:t.y=Math.abs(Math.floor(t.y)%2)===1?Math.ceil(t.y)-t.y:t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}}),Object.defineProperty(kt.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(nt.prototype,{isVector4:!0,set:function(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this},setScalar:function(t){return this.w=this.z=this.y=this.x=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this},add:function(t,e){return e!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return e!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,o=this.w;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n+t[12]*o,this.y=t[1]*e+t[5]*i+t[9]*n+t[13]*o,this.z=t[2]*e+t[6]*i+t[10]*n+t[14]*o,this.w=t[3]*e+t[7]*i+t[11]*n+t[15]*o,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return 1e-4>e?(this.x=1,this.z=this.y=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){t=t.elements;var e=t[0],i=t[4],n=t[8],o=t[1],s=t[5],l=t[9],h=t[2],c=t[6],p=t[10];return .01>Math.abs(i-o)&&.01>Math.abs(n-h)&&.01>Math.abs(l-c)?.1>Math.abs(i+o)&&.1>Math.abs(n+h)&&.1>Math.abs(l+c)&&.1>Math.abs(e+s+p-3)?(this.set(1,0,0,0),this):(t=Math.PI,e=(e+1)/2,s=(s+1)/2,p=(p+1)/2,i=(i+o)/4,n=(n+h)/4,l=(l+c)/4,e>s&&e>p?.01>e?(c=0,i=h=.707106781):(c=Math.sqrt(e),h=i/c,i=n/c):s>p?.01>s?(c=.707106781,h=0,i=.707106781):(h=Math.sqrt(s),c=i/h,i=l/h):.01>p?(h=c=.707106781,i=0):(i=Math.sqrt(p),c=n/i,h=l/i),this.set(c,h,i,t),this):(t=Math.sqrt((c-l)*(c-l)+(n-h)*(n-h)+(o-i)*(o-i)),.001>Math.abs(t)&&(t=1),this.x=(c-l)/t,this.y=(n-h)/t,this.z=(o-i)/t,this.w=Math.acos((e+s+p-1)/2),this)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(i,n){return t===void 0&&(t=new nt,e=new nt),t.set(i,i,i,i),e.set(n,n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return e===void 0&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,i){return i!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),Tt.prototype=Object.assign(Object.create($.prototype),{constructor:Tt,isWebGLRenderTarget:!0,setSize:function(t,e){(this.width!==t||this.height!==e)&&(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Rt.prototype=Object.create(Tt.prototype),Rt.prototype.constructor=Rt,Rt.prototype.isWebGLRenderTargetCube=!0,vt.prototype=Object.create(kt.prototype),vt.prototype.constructor=vt,vt.prototype.isDataTexture=!0,Object.assign(Nt.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,i=1/0,n=1/0,o=-1/0,s=-1/0,l=-1/0,h=0,c=t.length;h<c;h+=3){var p=t[h],f=t[h+1],d=t[h+2];p<e&&(e=p),f<i&&(i=f),d<n&&(n=d),p>o&&(o=p),f>s&&(s=f),d>l&&(l=d)}return this.min.set(e,i,n),this.max.set(o,s,l),this},setFromBufferAttribute:function(t){for(var e=1/0,i=1/0,n=1/0,o=-1/0,s=-1/0,l=-1/0,h=0,c=t.count;h<c;h++){var p=t.getX(h),f=t.getY(h),d=t.getZ(h);p<e&&(e=p),f<i&&(i=f),d<n&&(n=d),p>o&&(o=p),f>s&&(s=f),d>l&&(l=d)}return this.min.set(e,i,n),this.max.set(o,s,l),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new S;return function(e,i){return i=t.copy(i).multiplyScalar(.5),this.min.copy(e).sub(i),this.max.copy(e).add(i),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return t===void 0&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new S),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return t===void 0&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new S),this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},expandByObject:function(){function t(s){var l=s.geometry;if(l!==void 0){if(l.isGeometry)for(l=l.vertices,i=0,n=l.length;i<n;i++)o.copy(l[i]),o.applyMatrix4(s.matrixWorld),e.expandByPoint(o);else if(l.isBufferGeometry&&(l=l.attributes.position,l!==void 0))for(i=0,n=l.count;i<n;i++)o.fromBufferAttribute(l,i).applyMatrix4(s.matrixWorld),e.expandByPoint(o)}}var e,i,n,o=new S;return function(s){return e=this,s.updateMatrixWorld(!0),s.traverse(t),this}}(),containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new S),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsSphere:function(){var t=new S;return function(e){return this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){if(0<t.normal.x)var e=t.normal.x*this.min.x,i=t.normal.x*this.max.x;else e=t.normal.x*this.max.x,i=t.normal.x*this.min.x;return 0<t.normal.y?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),0<t.normal.z?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant},intersectsTriangle:function(){function t(d){var v,w=0;for(v=d.length-3;w<=v;w+=3){h.fromArray(d,w);var P=p.x*Math.abs(h.x)+p.y*Math.abs(h.y)+p.z*Math.abs(h.z),R=e.dot(h),I=i.dot(h),Q=n.dot(h);if(Math.max(-Math.max(R,I,Q),Math.min(R,I,Q))>P)return!1}return!0}var e=new S,i=new S,n=new S,o=new S,s=new S,l=new S,h=new S,c=new S,p=new S,f=new S;return function(d){return this.isEmpty()||(this.getCenter(c),p.subVectors(this.max,c),e.subVectors(d.a,c),i.subVectors(d.b,c),n.subVectors(d.c,c),o.subVectors(i,e),s.subVectors(n,i),l.subVectors(e,n),d=[0,-o.z,o.y,0,-s.z,s.y,0,-l.z,l.y,o.z,0,-o.x,s.z,0,-s.x,l.z,0,-l.x,-o.y,o.x,0,-s.y,s.x,0,-l.y,l.x,0],!t(d))||(d=[1,0,0,0,1,0,0,0,1],!t(d))?!1:(f.crossVectors(o,s),d=[f.x,f.y,f.z],t(d))}}(),clampPoint:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new S),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new S;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new S;return function(e){return e===void 0&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new Ut),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new S,new S,new S,new S,new S,new S,new S,new S];return function(e){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(Ut.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new Nt;return function(e,i){var n=this.center;i!==void 0?n.copy(i):t.setFromPoints(e).getCenter(n);for(var o=i=0,s=e.length;o<s;o++)i=Math.max(i,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(i),this}}(),clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return 0>=this.radius},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var i=this.center.distanceToSquared(t);return e===void 0&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new S),e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return t===void 0&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new Nt),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius*=t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(Ct.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,i,n){return this.normal.set(t,e,i),this.constant=n,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new S,e=new S;return function(i,n,o){return n=t.subVectors(o,n).cross(e.subVectors(i,n)).normalize(),this.setFromNormalAndCoplanarPoint(n,i),this}}(),clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return e===void 0&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new S),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new S;return function(e,i){i===void 0&&(console.warn("THREE.Plane: .intersectLine() target is now required"),i=new S);var n=e.delta(t),o=this.normal.dot(n);if(o===0){if(this.distanceToPoint(e.start)===0)return i.copy(e.start)}else if(o=-(e.start.dot(this.normal)+this.constant)/o,!(0>o||1<o))return i.copy(n).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start);return t=this.distanceToPoint(t.end),0>e&&0<t||0>t&&0<e},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return t===void 0&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new S),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new S,e=new Mt;return function(i,n){return n=n||e.getNormalMatrix(i),i=this.coplanarPoint(t).applyMatrix4(i),n=this.normal.applyMatrix3(n).normalize(),this.constant=-i.dot(n),this}}(),translate:function(t){return this.constant-=t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}}),Object.assign(at.prototype,{set:function(t,e,i,n,o,s){var l=this.planes;return l[0].copy(t),l[1].copy(e),l[2].copy(i),l[3].copy(n),l[4].copy(o),l[5].copy(s),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){for(var e=this.planes,i=0;6>i;i++)e[i].copy(t.planes[i]);return this},setFromMatrix:function(t){var e=this.planes,i=t.elements;t=i[0];var n=i[1],o=i[2],s=i[3],l=i[4],h=i[5],c=i[6],p=i[7],f=i[8],d=i[9],v=i[10],w=i[11],P=i[12],R=i[13],I=i[14];return i=i[15],e[0].setComponents(s-t,p-l,w-f,i-P).normalize(),e[1].setComponents(s+t,p+l,w+f,i+P).normalize(),e[2].setComponents(s+n,p+h,w+d,i+R).normalize(),e[3].setComponents(s-n,p-h,w-d,i-R).normalize(),e[4].setComponents(s-o,p-c,w-v,i-I).normalize(),e[5].setComponents(s+o,p+c,w+v,i+I).normalize(),this},intersectsObject:function(){var t=new Ut;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 Ut;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){var e=this.planes,i=t.center;t=-t.radius;for(var n=0;6>n;n++)if(e[n].distanceToPoint(i)<t)return!1;return!0},intersectsBox:function(){var t=new S;return function(e){for(var i=this.planes,n=0;6>n;n++){var o=i[n];if(t.x=0<o.normal.x?e.max.x:e.min.x,t.y=0<o.normal.y?e.max.y:e.min.y,t.z=0<o.normal.z?e.max.z:e.min.z,0>o.distanceToPoint(t))return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,i=0;6>i;i++)if(0>e[i].distanceToPoint(t))return!1;return!0}});var hi={alphamap_fragment:`#ifdef USE_ALPHAMAP
|
|
285
|
+
`+e),v=e+v,f=fs(h,35633,c+f),v=fs(h,35632,v),h.attachShader(mt,f),h.attachShader(mt,v),n.index0AttributeName!==void 0?h.bindAttribLocation(mt,0,n.index0AttributeName):s.morphTargets===!0&&h.bindAttribLocation(mt,0,"position"),h.linkProgram(mt),s=h.getProgramInfoLog(mt).trim(),l=h.getShaderInfoLog(f).trim(),y=h.getShaderInfoLog(v).trim(),C=M=!0,h.getProgramParameter(mt,35714)===!1?(M=!1,console.error("THREE.WebGLProgram: shader error: ",h.getError(),"35715",h.getProgramParameter(mt,35715),"gl.getProgramInfoLog",s,l,y)):s!==""?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",s):(l===""||y==="")&&(C=!1),C&&(this.diagnostics={runnable:M,material:n,programLog:s,vertexShader:{log:l,prefix:c},fragmentShader:{log:y,prefix:e}}),h.deleteShader(f),h.deleteShader(v);var bt;this.getUniforms=function(){return bt===void 0&&(bt=new Dr(h,mt,t)),bt};var xt;return this.getAttributes=function(){if(xt===void 0){for(var Vt={},V=h.getProgramParameter(mt,35721),tt=0;tt<V;tt++){var Ot=h.getActiveAttrib(mt,tt).name;Vt[Ot]=h.getAttribLocation(mt,Ot)}xt=Vt}return xt},this.destroy=function(){h.deleteProgram(mt),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=ao++,this.code=i,this.usedTimes=1,this.program=mt,this.vertexShader=f,this.fragmentShader=v,this}function rt(t,e,i){function n(h,c){if(h)h.isTexture?f=h.encoding:h.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),f=h.texture.encoding);else var f=3e3;return f===3e3&&c&&(f=3007),f}var o=[],s={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},l="precision supportsVertexTextures map mapEncoding matcapEncoding envMap envMapMode envMapEncoding lightMap aoMap emissiveMap emissiveMapEncoding bumpMap normalMap objectSpaceNormalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap combine vertexColors fog useFog fogExp flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights numRectAreaLights shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes numClipIntersection depthPacking dithering".split(" ");this.getParameters=function(h,c,f,v,y,M,C){var N=s[h.type];if(C.isSkinnedMesh){var W=C.skeleton.bones;if(i.floatVertexTextures)W=1024;else{var Q=Math.min(Math.floor((i.maxVertexUniforms-20)/4),W.length);Q<W.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+W.length+" bones. This GPU supports "+Q+"."),W=0):W=Q}}else W=0;Q=i.precision,h.precision!==null&&(Q=i.getMaxPrecision(h.precision),Q!==h.precision&&console.warn("THREE.WebGLProgram.getParameters:",h.precision,"not supported, using",Q,"instead."));var _t=t.getRenderTarget();return{shaderID:N,precision:Q,supportsVertexTextures:i.vertexTextures,outputEncoding:n(_t?_t.texture:null,t.gammaOutput),map:!!h.map,mapEncoding:n(h.map,t.gammaInput),matcap:!!h.matcap,matcapEncoding:n(h.matcap,t.gammaInput),envMap:!!h.envMap,envMapMode:h.envMap&&h.envMap.mapping,envMapEncoding:n(h.envMap,t.gammaInput),envMapCubeUV:!!h.envMap&&(h.envMap.mapping===306||h.envMap.mapping===307),lightMap:!!h.lightMap,aoMap:!!h.aoMap,emissiveMap:!!h.emissiveMap,emissiveMapEncoding:n(h.emissiveMap,t.gammaInput),bumpMap:!!h.bumpMap,normalMap:!!h.normalMap,objectSpaceNormalMap:h.normalMapType===1,displacementMap:!!h.displacementMap,roughnessMap:!!h.roughnessMap,metalnessMap:!!h.metalnessMap,specularMap:!!h.specularMap,alphaMap:!!h.alphaMap,gradientMap:!!h.gradientMap,combine:h.combine,vertexColors:h.vertexColors,fog:!!v,useFog:h.fog,fogExp:v&&v.isFogExp2,flatShading:h.flatShading,sizeAttenuation:h.sizeAttenuation,logarithmicDepthBuffer:i.logarithmicDepthBuffer,skinning:h.skinning&&0<W,maxBones:W,useVertexTexture:i.floatVertexTextures,morphTargets:h.morphTargets,morphNormals:h.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:c.directional.length,numPointLights:c.point.length,numSpotLights:c.spot.length,numRectAreaLights:c.rectArea.length,numHemiLights:c.hemi.length,numClippingPlanes:y,numClipIntersection:M,dithering:h.dithering,shadowMapEnabled:t.shadowMap.enabled&&C.receiveShadow&&0<f.length,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:h.premultipliedAlpha,alphaTest:h.alphaTest,doubleSided:h.side===2,flipSided:h.side===1,depthPacking:h.depthPacking!==void 0?h.depthPacking:!1}},this.getProgramCode=function(h,c){var f=[];if(c.shaderID?f.push(c.shaderID):(f.push(h.fragmentShader),f.push(h.vertexShader)),h.defines!==void 0)for(var v in h.defines)f.push(v),f.push(h.defines[v]);for(v=0;v<l.length;v++)f.push(c[l[v]]);return f.push(h.onBeforeCompile.toString()),f.push(t.gammaOutput),f.push(t.gammaFactor),f.join()},this.acquireProgram=function(h,c,f,v){for(var y,M=0,C=o.length;M<C;M++){var N=o[M];if(N.code===v){y=N,++y.usedTimes;break}}return y===void 0&&(y=new Y(t,e,v,h,c,f,i),o.push(y)),y},this.releaseProgram=function(h){if(--h.usedTimes===0){var c=o.indexOf(h);o[c]=o[o.length-1],o.pop(),h.destroy()}},this.programs=o}function it(){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 O(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 Mt(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function ot(){var t=[],e=0,i=[],n=[];return{opaque:i,transparent:n,init:function(){e=0,i.length=0,n.length=0},push:function(o,s,l,h,c){var f=t[e];f===void 0?(f={id:o.id,object:o,geometry:s,material:l,program:l.program,renderOrder:o.renderOrder,z:h,group:c},t[e]=f):(f.id=o.id,f.object=o,f.geometry=s,f.material=l,f.program=l.program,f.renderOrder=o.renderOrder,f.z=h,f.group=c),(l.transparent===!0?n:i).push(f),e++},sort:function(){1<i.length&&i.sort(O),1<n.length&&n.sort(Mt)}}}function Ct(){var t={};return{get:function(e,i){return e=e.id+","+i.id,i=t[e],i===void 0&&(i=new ot,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 m,color:new b,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new d};break;case"SpotLight":i={position:new m,direction:new m,color:new b,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new d};break;case"PointLight":i={position:new m,color:new b,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new d,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":i={direction:new m,skyColor:new b,groundColor:new b};break;case"RectAreaLight":i={color:new b,position:new m,halfWidth:new m,halfHeight:new m}}return t[e.id]=i}}}function It(){var t=new Ht,e={id:yl++,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 m,n=new nt,o=new nt;return{setup:function(s,l,h){var c=0,f=0,v=0,y=0,M=0,C=0,N=0,W=0;h=h.matrixWorldInverse;for(var Q=0,_t=s.length;Q<_t;Q++){var mt=s[Q],bt=mt.color,xt=mt.intensity,Vt=mt.distance,V=mt.shadow&&mt.shadow.map?mt.shadow.map.texture:null;if(mt.isAmbientLight)c+=bt.r*xt,f+=bt.g*xt,v+=bt.b*xt;else if(mt.isDirectionalLight){var tt=t.get(mt);tt.color.copy(mt.color).multiplyScalar(mt.intensity),tt.direction.setFromMatrixPosition(mt.matrixWorld),i.setFromMatrixPosition(mt.target.matrixWorld),tt.direction.sub(i),tt.direction.transformDirection(h),(tt.shadow=mt.castShadow)&&(bt=mt.shadow,tt.shadowBias=bt.bias,tt.shadowRadius=bt.radius,tt.shadowMapSize=bt.mapSize),e.directionalShadowMap[y]=V,e.directionalShadowMatrix[y]=mt.shadow.matrix,e.directional[y]=tt,y++}else mt.isSpotLight?(tt=t.get(mt),tt.position.setFromMatrixPosition(mt.matrixWorld),tt.position.applyMatrix4(h),tt.color.copy(bt).multiplyScalar(xt),tt.distance=Vt,tt.direction.setFromMatrixPosition(mt.matrixWorld),i.setFromMatrixPosition(mt.target.matrixWorld),tt.direction.sub(i),tt.direction.transformDirection(h),tt.coneCos=Math.cos(mt.angle),tt.penumbraCos=Math.cos(mt.angle*(1-mt.penumbra)),tt.decay=mt.decay,(tt.shadow=mt.castShadow)&&(bt=mt.shadow,tt.shadowBias=bt.bias,tt.shadowRadius=bt.radius,tt.shadowMapSize=bt.mapSize),e.spotShadowMap[C]=V,e.spotShadowMatrix[C]=mt.shadow.matrix,e.spot[C]=tt,C++):mt.isRectAreaLight?(tt=t.get(mt),tt.color.copy(bt).multiplyScalar(xt),tt.position.setFromMatrixPosition(mt.matrixWorld),tt.position.applyMatrix4(h),o.identity(),n.copy(mt.matrixWorld),n.premultiply(h),o.extractRotation(n),tt.halfWidth.set(.5*mt.width,0,0),tt.halfHeight.set(0,.5*mt.height,0),tt.halfWidth.applyMatrix4(o),tt.halfHeight.applyMatrix4(o),e.rectArea[N]=tt,N++):mt.isPointLight?(tt=t.get(mt),tt.position.setFromMatrixPosition(mt.matrixWorld),tt.position.applyMatrix4(h),tt.color.copy(mt.color).multiplyScalar(mt.intensity),tt.distance=mt.distance,tt.decay=mt.decay,(tt.shadow=mt.castShadow)&&(bt=mt.shadow,tt.shadowBias=bt.bias,tt.shadowRadius=bt.radius,tt.shadowMapSize=bt.mapSize,tt.shadowCameraNear=bt.camera.near,tt.shadowCameraFar=bt.camera.far),e.pointShadowMap[M]=V,e.pointShadowMatrix[M]=mt.shadow.matrix,e.point[M]=tt,M++):mt.isHemisphereLight&&(tt=t.get(mt),tt.direction.setFromMatrixPosition(mt.matrixWorld),tt.direction.transformDirection(h),tt.direction.normalize(),tt.skyColor.copy(mt.color).multiplyScalar(xt),tt.groundColor.copy(mt.groundColor).multiplyScalar(xt),e.hemi[W]=tt,W++)}e.ambient[0]=c,e.ambient[1]=f,e.ambient[2]=v,e.directional.length=y,e.spot.length=C,e.rectArea.length=N,e.point.length=M,e.hemi.length=W,e.hash.stateID=e.id,e.hash.directionalLength=y,e.hash.pointLength=M,e.hash.spotLength=C,e.hash.rectAreaLength=N,e.hash.hemiLength=W,e.hash.shadowsLength=l.length},state:e}}function Tt(){var t=new It,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 le(){var t={};return{get:function(e,i){if(t[e.id]===void 0){var n=new Tt;t[e.id]={},t[e.id][i.id]=n}else t[e.id][i.id]===void 0?(n=new Tt,t[e.id][i.id]=n):n=t[e.id][i.id];return n},dispose:function(){t={}}}}function oe(t){Zt.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){Zt.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new m,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 ve(t,e,i){function n(V,tt,Ot,ee,$t,qt){var Te=V.geometry,pe=y,Ie=V.customDepthMaterial;return Ot&&(pe=M,Ie=V.customDistanceMaterial),Ie?pe=Ie:(Ie=!1,tt.morphTargets&&(Te&&Te.isBufferGeometry?Ie=Te.morphAttributes&&Te.morphAttributes.position&&0<Te.morphAttributes.position.length:Te&&Te.isGeometry&&(Ie=Te.morphTargets&&0<Te.morphTargets.length)),V.isSkinnedMesh&&tt.skinning===!1&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",V),V=V.isSkinnedMesh&&tt.skinning,Te=0,Ie&&(Te|=1),V&&(Te|=2),pe=pe[Te]),t.localClippingEnabled&&tt.clipShadows===!0&&tt.clippingPlanes.length!==0&&(Te=pe.uuid,Ie=tt.uuid,V=C[Te],V===void 0&&(V={},C[Te]=V),Te=V[Ie],Te===void 0&&(Te=pe.clone(),V[Ie]=Te),pe=Te),pe.visible=tt.visible,pe.wireframe=tt.wireframe,pe.side=tt.shadowSide!=null?tt.shadowSide:N[tt.side],pe.clipShadows=tt.clipShadows,pe.clippingPlanes=tt.clippingPlanes,pe.clipIntersection=tt.clipIntersection,pe.wireframeLinewidth=tt.wireframeLinewidth,pe.linewidth=tt.linewidth,Ot&&pe.isMeshDistanceMaterial&&(pe.referencePosition.copy(ee),pe.nearDistance=$t,pe.farDistance=qt),pe}function o(V,tt,Ot,ee){if(V.visible!==!1){if(V.layers.test(tt.layers)&&(V.isMesh||V.isLine||V.isPoints)&&V.castShadow&&(!V.frustumCulled||s.intersectsObject(V))){V.modelViewMatrix.multiplyMatrices(Ot.matrixWorldInverse,V.matrixWorld);var $t=e.update(V),qt=V.material;if(Array.isArray(qt))for(var Te=$t.groups,pe=0,Ie=Te.length;pe<Ie;pe++){var be=Te[pe],se=qt[be.materialIndex];se&&se.visible&&(se=n(V,se,ee,v,Ot.near,Ot.far),t.renderBufferDirect(Ot,null,$t,se,V,be))}else qt.visible&&(se=n(V,qt,ee,v,Ot.near,Ot.far),t.renderBufferDirect(Ot,null,$t,se,V,null))}for(V=V.children,$t=0,qt=V.length;$t<qt;$t++)o(V[$t],tt,Ot,ee)}}var s=new E,l=new nt,h=new d,c=new d(i,i),f=new m,v=new m,y=Array(4),M=Array(4),C={},N={0:1,1:0,2:2},W=[new m(1,0,0),new m(-1,0,0),new m(0,0,1),new m(0,0,-1),new m(0,1,0),new m(0,-1,0)],Q=[new m(0,1,0),new m(0,1,0),new m(0,1,0),new m(0,1,0),new m(0,0,1),new m(0,0,-1)],_t=[new A,new A,new A,new A,new A,new A];for(i=0;i!==4;++i){var mt=(i&1)!==0,bt=(i&2)!==0,xt=new oe({depthPacking:3201,morphTargets:mt,skinning:bt});y[i]=xt,mt=new te({morphTargets:mt,skinning:bt}),M[i]=mt}var Vt=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(V,tt,Ot){if(Vt.enabled!==!1&&(Vt.autoUpdate!==!1||Vt.needsUpdate!==!1)&&V.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,qt=0,Te=V.length;qt<Te;qt++){var pe=V[qt];$t=pe.shadow;var Ie=pe&&pe.isPointLight;if($t===void 0)console.warn("THREE.WebGLShadowMap:",pe,"has no shadow.");else{var be=$t.camera;if(h.copy($t.mapSize),h.min(c),Ie){var se=h.x,We=h.y;_t[0].set(2*se,We,se,We),_t[1].set(0,We,se,We),_t[2].set(3*se,We,se,We),_t[3].set(se,We,se,We),_t[4].set(3*se,0,se,We),_t[5].set(se,0,se,We),h.x*=4,h.y*=2}for($t.map===null&&($t.map=new F(h.x,h.y,{minFilter:1003,magFilter:1003,format:1023}),$t.map.texture.name=pe.name+".shadowMap",be.updateProjectionMatrix()),$t.isSpotLightShadow&&$t.update(pe),se=$t.map,We=$t.matrix,v.setFromMatrixPosition(pe.matrixWorld),be.position.copy(v),Ie?($t=6,We.makeTranslation(-v.x,-v.y,-v.z)):($t=1,f.setFromMatrixPosition(pe.target.matrixWorld),be.lookAt(f),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(se),t.clear(),pe=0;pe<$t;pe++)Ie&&(f.copy(be.position),f.add(W[pe]),be.up.copy(Q[pe]),be.lookAt(f),be.updateMatrixWorld(),ee.viewport(_t[pe])),l.multiplyMatrices(be.projectionMatrix,be.matrixWorldInverse),s.setFromMatrix(l),o(tt,Ot,be,Ie)}}Vt.needsUpdate=!1}}}function he(t,e,i,n){function o(Ut,Ye,ei){var Hi=new Uint8Array(4),Pe=t.createTexture();for(t.bindTexture(Ut,Pe),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,Hi);return Pe}function s(Ut,Ye){_t[Ut]=1,mt[Ut]===0&&(t.enableVertexAttribArray(Ut),mt[Ut]=1),bt[Ut]!==Ye&&((n.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](Ut,Ye),bt[Ut]=Ye)}function l(Ut){xt[Ut]!==!0&&(t.enable(Ut),xt[Ut]=!0)}function h(Ut){xt[Ut]!==!1&&(t.disable(Ut),xt[Ut]=!1)}function c(Ut,Ye,ei,Hi,Pe,Xe,ri,Pi){if(Ut===0)tt&&(h(3042),tt=!1);else if(tt||(l(3042),tt=!0),Ut!==5){if(Ut!==Ot||Pi!==be){if((ee!==100||Te!==100)&&(t.blendEquation(32774),Te=ee=100),Pi)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)}Ie=pe=qt=$t=null,Ot=Ut,be=Pi}}else Pe=Pe||Ye,Xe=Xe||ei,ri=ri||Hi,(Ye!==ee||Pe!==Te)&&(t.blendEquationSeparate(i.convert(Ye),i.convert(Pe)),ee=Ye,Te=Pe),(ei!==$t||Hi!==qt||Xe!==pe||ri!==Ie)&&(t.blendFuncSeparate(i.convert(ei),i.convert(Hi),i.convert(Xe),i.convert(ri)),$t=ei,qt=Hi,pe=Xe,Ie=ri),Ot=Ut,be=null}function f(Ut){se!==Ut&&(Ut?t.frontFace(2304):t.frontFace(2305),se=Ut)}function v(Ut){Ut!==0?(l(2884),Ut!==We&&(Ut===1?t.cullFace(1029):Ut===2?t.cullFace(1028):t.cullFace(1032))):h(2884),We=Ut}function y(Ut,Ye,ei){Ut?(l(32823),(fi!==Ye||xn!==ei)&&(t.polygonOffset(Ye,ei),fi=Ye,xn=ei)):h(32823)}function M(Ut){Ut===void 0&&(Ut=33984+pn-1),Gi!==Ut&&(t.activeTexture(Ut),Gi=Ut)}var C=new function(){var Ut=!1,Ye=new A,ei=null,Hi=new A(0,0,0,0);return{setMask:function(Pe){ei===Pe||Ut||(t.colorMask(Pe,Pe,Pe,Pe),ei=Pe)},setLocked:function(Pe){Ut=Pe},setClear:function(Pe,Xe,ri,Pi,Ai){Ai===!0&&(Pe*=Pi,Xe*=Pi,ri*=Pi),Ye.set(Pe,Xe,ri,Pi),Hi.equals(Ye)===!1&&(t.clearColor(Pe,Xe,ri,Pi),Hi.copy(Ye))},reset:function(){Ut=!1,ei=null,Hi.set(-1,0,0,0)}}},N=new function(){var Ut=!1,Ye=null,ei=null,Hi=null;return{setTest:function(Pe){Pe?l(2929):h(2929)},setMask:function(Pe){Ye===Pe||Ut||(t.depthMask(Pe),Ye=Pe)},setFunc:function(Pe){if(ei!==Pe){if(Pe)switch(Pe){case 0:t.depthFunc(512);break;case 1:t.depthFunc(519);break;case 2:t.depthFunc(513);break;case 3:t.depthFunc(515);break;case 4:t.depthFunc(514);break;case 5:t.depthFunc(518);break;case 6:t.depthFunc(516);break;case 7:t.depthFunc(517);break;default:t.depthFunc(515)}else t.depthFunc(515);ei=Pe}},setLocked:function(Pe){Ut=Pe},setClear:function(Pe){Hi!==Pe&&(t.clearDepth(Pe),Hi=Pe)},reset:function(){Ut=!1,Hi=ei=Ye=null}}},W=new function(){var Ut=!1,Ye=null,ei=null,Hi=null,Pe=null,Xe=null,ri=null,Pi=null,Ai=null;return{setTest:function(ne){ne?l(2960):h(2960)},setMask:function(ne){Ye===ne||Ut||(t.stencilMask(ne),Ye=ne)},setFunc:function(ne,ii,Ze){(ei!==ne||Hi!==ii||Pe!==Ze)&&(t.stencilFunc(ne,ii,Ze),ei=ne,Hi=ii,Pe=Ze)},setOp:function(ne,ii,Ze){(Xe!==ne||ri!==ii||Pi!==Ze)&&(t.stencilOp(ne,ii,Ze),Xe=ne,ri=ii,Pi=Ze)},setLocked:function(ne){Ut=ne},setClear:function(ne){Ai!==ne&&(t.clearStencil(ne),Ai=ne)},reset:function(){Ut=!1,Ai=Pi=ri=Xe=Pe=Hi=ei=Ye=null}}},Q=t.getParameter(34921),_t=new Uint8Array(Q),mt=new Uint8Array(Q),bt=new Uint8Array(Q),xt={},Vt=null,V=null,tt=null,Ot=null,ee=null,$t=null,qt=null,Te=null,pe=null,Ie=null,be=!1,se=null,We=null,Ke=null,fi=null,xn=null,pn=t.getParameter(35661),ji=!1;Q=0,Q=t.getParameter(7938),Q.indexOf("WebGL")!==-1?(Q=parseFloat(/^WebGL ([0-9])/.exec(Q)[1]),ji=1<=Q):Q.indexOf("OpenGL ES")!==-1&&(Q=parseFloat(/^OpenGL ES ([0-9])/.exec(Q)[1]),ji=2<=Q);var Gi=null,tn={},wn=new A,Ae=new A,Qe={};return Qe[3553]=o(3553,3553,1),Qe[34067]=o(34067,34069,6),C.setClear(0,0,0,1),N.setClear(1),W.setClear(0),l(2929),N.setFunc(3),f(!1),v(1),l(2884),c(0),{buffers:{color:C,depth:N,stencil:W},initAttributes:function(){for(var Ut=0,Ye=_t.length;Ut<Ye;Ut++)_t[Ut]=0},enableAttribute:function(Ut){s(Ut,0)},enableAttributeAndDivisor:s,disableUnusedAttributes:function(){for(var Ut=0,Ye=mt.length;Ut!==Ye;++Ut)mt[Ut]!==_t[Ut]&&(t.disableVertexAttribArray(Ut),mt[Ut]=0)},enable:l,disable:h,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 V!==Ut?(t.useProgram(Ut),V=Ut,!0):!1},setBlending:c,setMaterial:function(Ut,Ye){Ut.side===2?h(2884):l(2884);var ei=Ut.side===1;Ye&&(ei=!ei),f(ei),Ut.blending===1&&Ut.transparent===!1?c(0):c(Ut.blending,Ut.blendEquation,Ut.blendSrc,Ut.blendDst,Ut.blendEquationAlpha,Ut.blendSrcAlpha,Ut.blendDstAlpha,Ut.premultipliedAlpha),N.setFunc(Ut.depthFunc),N.setTest(Ut.depthTest),N.setMask(Ut.depthWrite),C.setMask(Ut.colorWrite),y(Ut.polygonOffset,Ut.polygonOffsetFactor,Ut.polygonOffsetUnits)},setFlipSided:f,setCullFace:v,setLineWidth:function(Ut){Ut!==Ke&&(ji&&t.lineWidth(Ut),Ke=Ut)},setPolygonOffset:y,setScissorTest:function(Ut){Ut?l(3089):h(3089)},activeTexture:M,bindTexture:function(Ut,Ye){Gi===null&&M();var ei=tn[Gi];ei===void 0&&(ei={type:void 0,texture:void 0},tn[Gi]=ei),(ei.type!==Ut||ei.texture!==Ye)&&(t.bindTexture(Ut,Ye||Qe[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){wn.equals(Ut)===!1&&(t.scissor(Ut.x,Ut.y,Ut.z,Ut.w),wn.copy(Ut))},viewport:function(Ut){Ae.equals(Ut)===!1&&(t.viewport(Ut.x,Ut.y,Ut.z,Ut.w),Ae.copy(Ut))},reset:function(){for(var Ut=0;Ut<mt.length;Ut++)mt[Ut]===1&&(t.disableVertexAttribArray(Ut),mt[Ut]=0);xt={},Gi=Vt=null,tn={},We=se=Ot=V=null,C.reset(),N.reset(),W.reset()}}}function je(t,e,i,n,o,s,l){function h(V,tt){if(V.width>tt||V.height>tt){if("data"in V){console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+V.width+"x"+V.height+").");return}tt/=Math.max(V.width,V.height);var Ot=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return Ot.width=Math.floor(V.width*tt),Ot.height=Math.floor(V.height*tt),Ot.getContext("2d").drawImage(V,0,0,V.width,V.height,0,0,Ot.width,Ot.height),console.warn("THREE.WebGLRenderer: image is too big ("+V.width+"x"+V.height+"). Resized to "+Ot.width+"x"+Ot.height),Ot}return V}function c(V){return pi.isPowerOfTwo(V.width)&&pi.isPowerOfTwo(V.height)}function f(V,tt){return V.generateMipmaps&&tt&&V.minFilter!==1003&&V.minFilter!==1006}function v(V,tt,Ot,ee){t.generateMipmap(V),n.get(tt).__maxMipLevel=Math.log(Math.max(Ot,ee))*Math.LOG2E}function y(V,tt){if(!o.isWebGL2)return V;if(V===6403){if(tt===5126)return 33326;if(tt===5131)return 33325;if(tt===5121)return 33321}if(V===6407){if(tt===5126)return 34837;if(tt===5131)return 34843;if(tt===5121)return 32849}if(V===6408){if(tt===5126)return 34836;if(tt===5131)return 34842;if(tt===5121)return 32856}return V}function M(V){return V===1003||V===1004||V===1005?9728:9729}function C(V){V=V.target,V.removeEventListener("dispose",C);t:{var tt=n.get(V);if(V.image&&tt.__image__webglTextureCube)t.deleteTexture(tt.__image__webglTextureCube);else{if(tt.__webglInit===void 0)break t;t.deleteTexture(tt.__webglTexture)}n.remove(V)}V.isVideoTexture&&delete xt[V.id],l.memory.textures--}function N(V){V=V.target,V.removeEventListener("dispose",N);var tt=n.get(V),Ot=n.get(V.texture);if(V){if(Ot.__webglTexture!==void 0&&t.deleteTexture(Ot.__webglTexture),V.depthTexture&&V.depthTexture.dispose(),V.isWebGLRenderTargetCube)for(Ot=0;6>Ot;Ot++)t.deleteFramebuffer(tt.__webglFramebuffer[Ot]),tt.__webglDepthbuffer&&t.deleteRenderbuffer(tt.__webglDepthbuffer[Ot]);else t.deleteFramebuffer(tt.__webglFramebuffer),tt.__webglDepthbuffer&&t.deleteRenderbuffer(tt.__webglDepthbuffer);n.remove(V.texture),n.remove(V)}l.memory.textures--}function W(V,tt){var Ot=n.get(V);if(V.isVideoTexture){var ee=V.id,$t=l.render.frame;xt[ee]!==$t&&(xt[ee]=$t,V.update())}if(0<V.version&&Ot.__version!==V.version)if(ee=V.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{_t(Ot,V,tt);return}i.activeTexture(33984+tt),i.bindTexture(3553,Ot.__webglTexture)}function Q(V,tt,Ot){Ot?(t.texParameteri(V,10242,s.convert(tt.wrapS)),t.texParameteri(V,10243,s.convert(tt.wrapT)),t.texParameteri(V,10240,s.convert(tt.magFilter)),t.texParameteri(V,10241,s.convert(tt.minFilter))):(t.texParameteri(V,10242,33071),t.texParameteri(V,10243,33071),tt.wrapS===1001&&tt.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(V,10240,M(tt.magFilter)),t.texParameteri(V,10241,M(tt.minFilter)),tt.minFilter!==1003&&tt.minFilter!==1006&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!(Ot=e.get("EXT_texture_filter_anisotropic"))||tt.type===1015&&e.get("OES_texture_float_linear")===null||tt.type===1016&&(o.isWebGL2||e.get("OES_texture_half_float_linear"))===null||!(1<tt.anisotropy||n.get(tt).__currentAnisotropy)||(t.texParameterf(V,Ot.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(tt.anisotropy,o.getMaxAnisotropy())),n.get(tt).__currentAnisotropy=tt.anisotropy)}function _t(V,tt,Ot){var ee=tt.isDataTexture3D?32879:3553;V.__webglInit===void 0&&(V.__webglInit=!0,tt.addEventListener("dispose",C),V.__webglTexture=t.createTexture(),l.memory.textures++),i.activeTexture(33984+Ot),i.bindTexture(ee,V.__webglTexture),t.pixelStorei(37440,tt.flipY),t.pixelStorei(37441,tt.premultiplyAlpha),t.pixelStorei(3317,tt.unpackAlignment),Ot=h(tt.image,o.maxTextureSize);var $t=o.isWebGL2?!1:tt.wrapS!==1001||tt.wrapT!==1001||tt.minFilter!==1003&&tt.minFilter!==1006;$t&&c(Ot)===!1&&(Ot instanceof HTMLImageElement||Ot instanceof HTMLCanvasElement||Ot instanceof ImageBitmap)&&(Vt===void 0&&(Vt=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),Vt.width=pi.floorPowerOfTwo(Ot.width),Vt.height=pi.floorPowerOfTwo(Ot.height),Vt.getContext("2d").drawImage(Ot,0,0,Vt.width,Vt.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+Ot.width+"x"+Ot.height+"). Resized to "+Vt.width+"x"+Vt.height),Ot=Vt),$t=c(Ot);var qt=s.convert(tt.format),Te=s.convert(tt.type),pe=y(qt,Te);Q(ee,tt,$t);var Ie=tt.mipmaps;if(tt.isDepthTexture){if(pe=6402,tt.type===1015){if(!o.isWebGL2)throw Error("Float Depth Texture only supported in WebGL2.0");pe=36012}else o.isWebGL2&&(pe=33189);tt.format===1026&&pe===6402&&tt.type!==1012&&tt.type!==1014&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),tt.type=1012,Te=s.convert(tt.type)),tt.format===1027&&(pe=34041,tt.type!==1020&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),tt.type=1020,Te=s.convert(tt.type))),i.texImage2D(3553,0,pe,Ot.width,Ot.height,0,qt,Te,null)}else if(tt.isDataTexture)if(0<Ie.length&&$t){for(var be=0,se=Ie.length;be<se;be++)ee=Ie[be],i.texImage2D(3553,be,pe,ee.width,ee.height,0,qt,Te,ee.data);tt.generateMipmaps=!1,V.__maxMipLevel=Ie.length-1}else i.texImage2D(3553,0,pe,Ot.width,Ot.height,0,qt,Te,Ot.data),V.__maxMipLevel=0;else if(tt.isCompressedTexture){for(be=0,se=Ie.length;be<se;be++)ee=Ie[be],tt.format!==1023&&tt.format!==1022?-1<i.getCompressedTextureFormats().indexOf(qt)?i.compressedTexImage2D(3553,be,pe,ee.width,ee.height,0,ee.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):i.texImage2D(3553,be,pe,ee.width,ee.height,0,qt,Te,ee.data);V.__maxMipLevel=Ie.length-1}else if(tt.isDataTexture3D)i.texImage3D(32879,0,pe,Ot.width,Ot.height,Ot.depth,0,qt,Te,Ot.data),V.__maxMipLevel=0;else if(0<Ie.length&&$t){for(be=0,se=Ie.length;be<se;be++)ee=Ie[be],i.texImage2D(3553,be,pe,qt,Te,ee);tt.generateMipmaps=!1,V.__maxMipLevel=Ie.length-1}else i.texImage2D(3553,0,pe,qt,Te,Ot),V.__maxMipLevel=0;f(tt,$t)&&v(3553,tt,Ot.width,Ot.height),V.__version=tt.version,tt.onUpdate&&tt.onUpdate(tt)}function mt(V,tt,Ot,ee){var $t=s.convert(tt.texture.format),qt=s.convert(tt.texture.type),Te=y($t,qt);i.texImage2D(ee,0,Te,tt.width,tt.height,0,$t,qt,null),t.bindFramebuffer(36160,V),t.framebufferTexture2D(36160,Ot,ee,n.get(tt.texture).__webglTexture,0),t.bindFramebuffer(36160,null)}function bt(V,tt){t.bindRenderbuffer(36161,V),tt.depthBuffer&&!tt.stencilBuffer?(t.renderbufferStorage(36161,33189,tt.width,tt.height),t.framebufferRenderbuffer(36160,36096,36161,V)):tt.depthBuffer&&tt.stencilBuffer?(t.renderbufferStorage(36161,34041,tt.width,tt.height),t.framebufferRenderbuffer(36160,33306,36161,V)):t.renderbufferStorage(36161,32854,tt.width,tt.height),t.bindRenderbuffer(36161,null)}var xt={},Vt;this.setTexture2D=W,this.setTexture3D=function(V,tt){var Ot=n.get(V);0<V.version&&Ot.__version!==V.version?_t(Ot,V,tt):(i.activeTexture(33984+tt),i.bindTexture(32879,Ot.__webglTexture))},this.setTextureCube=function(V,tt){var Ot=n.get(V);if(V.image.length===6)if(0<V.version&&Ot.__version!==V.version){Ot.__image__webglTextureCube||(V.addEventListener("dispose",C),Ot.__image__webglTextureCube=t.createTexture(),l.memory.textures++),i.activeTexture(33984+tt),i.bindTexture(34067,Ot.__image__webglTextureCube),t.pixelStorei(37440,V.flipY),tt=V&&V.isCompressedTexture;for(var ee=V.image[0]&&V.image[0].isDataTexture,$t=[],qt=0;6>qt;qt++)$t[qt]=tt||ee?ee?V.image[qt].image:V.image[qt]:h(V.image[qt],o.maxCubemapSize);var Te=$t[0],pe=c(Te),Ie=s.convert(V.format),be=s.convert(V.type),se=y(Ie,be);for(Q(34067,V,pe),qt=0;6>qt;qt++)if(tt)for(var We,Ke=$t[qt].mipmaps,fi=0,xn=Ke.length;fi<xn;fi++)We=Ke[fi],V.format!==1023&&V.format!==1022?-1<i.getCompressedTextureFormats().indexOf(Ie)?i.compressedTexImage2D(34069+qt,fi,se,We.width,We.height,0,We.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):i.texImage2D(34069+qt,fi,se,We.width,We.height,0,Ie,be,We.data);else ee?i.texImage2D(34069+qt,0,se,$t[qt].width,$t[qt].height,0,Ie,be,$t[qt].data):i.texImage2D(34069+qt,0,se,Ie,be,$t[qt]);Ot.__maxMipLevel=tt?Ke.length-1:0,f(V,pe)&&v(34067,V,Te.width,Te.height),Ot.__version=V.version,V.onUpdate&&V.onUpdate(V)}else i.activeTexture(33984+tt),i.bindTexture(34067,Ot.__image__webglTextureCube)},this.setTextureCubeDynamic=function(V,tt){i.activeTexture(33984+tt),i.bindTexture(34067,n.get(V).__webglTexture)},this.setupRenderTarget=function(V){var tt=n.get(V),Ot=n.get(V.texture);V.addEventListener("dispose",N),Ot.__webglTexture=t.createTexture(),l.memory.textures++;var ee=V.isWebGLRenderTargetCube===!0,$t=c(V);if(ee){tt.__webglFramebuffer=[];for(var qt=0;6>qt;qt++)tt.__webglFramebuffer[qt]=t.createFramebuffer()}else tt.__webglFramebuffer=t.createFramebuffer();if(ee){for(i.bindTexture(34067,Ot.__webglTexture),Q(34067,V.texture,$t),qt=0;6>qt;qt++)mt(tt.__webglFramebuffer[qt],V,36064,34069+qt);f(V.texture,$t)&&v(34067,V.texture,V.width,V.height),i.bindTexture(34067,null)}else i.bindTexture(3553,Ot.__webglTexture),Q(3553,V.texture,$t),mt(tt.__webglFramebuffer,V,36064,3553),f(V.texture,$t)&&v(3553,V.texture,V.width,V.height),i.bindTexture(3553,null);if(V.depthBuffer){if(tt=n.get(V),Ot=V.isWebGLRenderTargetCube===!0,V.depthTexture){if(Ot)throw Error("target.depthTexture not supported in Cube render targets");if(V&&V.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,tt.__webglFramebuffer),!V.depthTexture||!V.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");if(n.get(V.depthTexture).__webglTexture&&V.depthTexture.image.width===V.width&&V.depthTexture.image.height===V.height||(V.depthTexture.image.width=V.width,V.depthTexture.image.height=V.height,V.depthTexture.needsUpdate=!0),W(V.depthTexture,0),tt=n.get(V.depthTexture).__webglTexture,V.depthTexture.format===1026)t.framebufferTexture2D(36160,36096,3553,tt,0);else if(V.depthTexture.format===1027)t.framebufferTexture2D(36160,33306,3553,tt,0);else throw Error("Unknown depthTexture format")}else if(Ot)for(tt.__webglDepthbuffer=[],Ot=0;6>Ot;Ot++)t.bindFramebuffer(36160,tt.__webglFramebuffer[Ot]),tt.__webglDepthbuffer[Ot]=t.createRenderbuffer(),bt(tt.__webglDepthbuffer[Ot],V);else t.bindFramebuffer(36160,tt.__webglFramebuffer),tt.__webglDepthbuffer=t.createRenderbuffer(),bt(tt.__webglDepthbuffer,V);t.bindFramebuffer(36160,null)}},this.updateRenderTargetMipmap=function(V){var tt=V.texture,Ot=c(V);if(f(tt,Ot)){Ot=V.isWebGLRenderTargetCube?34067:3553;var ee=n.get(tt).__webglTexture;i.bindTexture(Ot,ee),v(Ot,tt,V.width,V.height),i.bindTexture(Ot,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(){z.call(this),this.type="Group"}function Be(){z.call(this),this.type="Camera",this.matrixWorldInverse=new nt,this.projectionMatrix=new nt,this.projectionMatrixInverse=new nt}function ye(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 ke(t){ye.call(this),this.cameras=t||[]}function ce(t,e,i){Ao.setFromMatrixPosition(e.matrixWorld),sr.setFromMatrixPosition(i.matrixWorld);var n=Ao.distanceTo(sr),o=e.projectionMatrix.elements,s=i.projectionMatrix.elements,l=o[14]/(o[10]-1);i=o[14]/(o[10]+1);var h=(o[9]+1)/o[5],c=(o[9]-1)/o[5],f=(o[8]-1)/o[0],v=(s[8]+1)/s[0];o=l*f,s=l*v,v=n/(-f+v),f=v*-f,e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(f),t.translateZ(v),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.getInverse(t.matrixWorld),e=l+v,l=i+v,t.projectionMatrix.makePerspective(o-f,s+(n-f),h*i/l*e,c*i/l*e,e,l)}function mi(t){function e(){return o!==null&&o.isPresenting===!0}function i(){if(e()){var V=o.getEyeParameters("left"),tt=V.renderWidth*v;V=V.renderHeight*v,bt=t.getPixelRatio(),mt=t.getSize(),t.setDrawingBufferSize(2*tt,V,1),Vt.start()}else n.enabled&&t.setDrawingBufferSize(mt.width,mt.height,bt),Vt.stop()}var n=this,o=null,s=null,l=null,h=[],c=new nt,f=new nt,v=1,y="stage";typeof window<"u"&&"VRFrameData"in window&&(s=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",i,!1));var M=new nt,C=new H,N=new m,W=new ye;W.bounds=new A(0,0,.5,1),W.layers.enable(1);var Q=new ye;Q.bounds=new A(.5,0,.5,1),Q.layers.enable(2);var _t=new ke([W,Q]);_t.layers.enable(1),_t.layers.enable(2);var mt,bt,xt=[];this.enabled=!1,this.getController=function(V){var tt=h[V];return tt===void 0&&(tt=new ci,tt.matrixAutoUpdate=!1,tt.visible=!1,h[V]=tt),tt},this.getDevice=function(){return o},this.setDevice=function(V){V!==void 0&&(o=V),Vt.setContext(V)},this.setFramebufferScaleFactor=function(V){v=V},this.setFrameOfReferenceType=function(V){y=V},this.setPoseTarget=function(V){V!==void 0&&(l=V)},this.getCamera=function(V){var tt=y==="stage"?1.6:0;if(o===null)return V.position.set(0,tt,0),V;if(o.depthNear=V.near,o.depthFar=V.far,o.getFrameData(s),y==="stage"){var Ot=o.stageParameters;Ot?c.fromArray(Ot.sittingToStandingTransform):c.makeTranslation(0,tt,0)}if(tt=s.pose,Ot=l!==null?l:V,Ot.matrix.copy(c),Ot.matrix.decompose(Ot.position,Ot.quaternion,Ot.scale),tt.orientation!==null&&(C.fromArray(tt.orientation),Ot.quaternion.multiply(C)),tt.position!==null&&(C.setFromRotationMatrix(c),N.fromArray(tt.position),N.applyQuaternion(C),Ot.position.add(N)),Ot.updateMatrixWorld(),o.isPresenting===!1)return V;W.near=V.near,Q.near=V.near,W.far=V.far,Q.far=V.far,W.matrixWorldInverse.fromArray(s.leftViewMatrix),Q.matrixWorldInverse.fromArray(s.rightViewMatrix),f.getInverse(c),y==="stage"&&(W.matrixWorldInverse.multiply(f),Q.matrixWorldInverse.multiply(f)),V=Ot.parent,V!==null&&(M.getInverse(V.matrixWorld),W.matrixWorldInverse.multiply(M),Q.matrixWorldInverse.multiply(M)),W.matrixWorld.getInverse(W.matrixWorldInverse),Q.matrixWorld.getInverse(Q.matrixWorldInverse),W.projectionMatrix.fromArray(s.leftProjectionMatrix),Q.projectionMatrix.fromArray(s.rightProjectionMatrix),ce(_t,W,Q),V=o.getLayers(),V.length&&(V=V[0],V.leftBounds!==null&&V.leftBounds.length===4&&W.bounds.fromArray(V.leftBounds),V.rightBounds!==null&&V.rightBounds.length===4&&Q.bounds.fromArray(V.rightBounds));t:for(V=0;V<h.length;V++){tt=h[V];e:{Ot=V;for(var ee=navigator.getGamepads&&navigator.getGamepads(),$t=0,qt=0,Te=ee.length;$t<Te;$t++){var pe=ee[$t];if(pe&&(pe.id==="Daydream Controller"||pe.id==="Gear VR Controller"||pe.id==="Oculus Go Controller"||pe.id==="OpenVR Gamepad"||pe.id.startsWith("Oculus Touch")||pe.id.startsWith("Spatial Controller"))){if(qt===Ot){Ot=pe;break e}qt++}}Ot=void 0}if(Ot!==void 0&&Ot.pose!==void 0){if(Ot.pose===null)break t;ee=Ot.pose,ee.hasPosition===!1&&tt.position.set(.2,-.6,-.05),ee.position!==null&&tt.position.fromArray(ee.position),ee.orientation!==null&&tt.quaternion.fromArray(ee.orientation),tt.matrix.compose(tt.position,tt.quaternion,tt.scale),tt.matrix.premultiply(c),tt.matrix.decompose(tt.position,tt.quaternion,tt.scale),tt.matrixWorldNeedsUpdate=!0,tt.visible=!0,ee=Ot.id==="Daydream Controller"?0:1,xt[V]!==Ot.buttons[ee].pressed&&(xt[V]=Ot.buttons[ee].pressed,xt[V]===!0?tt.dispatchEvent({type:"selectstart"}):(tt.dispatchEvent({type:"selectend"}),tt.dispatchEvent({type:"select"})))}else tt.visible=!1}return _t},this.getStandingMatrix=function(){return c},this.isPresenting=e;var Vt=new p;this.setAnimationLoop=function(V){Vt.setAnimationLoop(V)},this.submitFrame=function(){e()&&o.submitFrame()},this.dispose=function(){typeof window<"u"&&window.removeEventListener("vrdisplaypresentchange",i)}}function Ce(t){function e(){return h!==null&&f!==null}function i(bt){var xt=M[C.indexOf(bt.inputSource)];xt&&xt.dispatchEvent({type:bt.type})}function n(){t.setFramebuffer(null),mt.stop()}function o(bt,xt){xt===null?bt.matrixWorld.copy(bt.matrix):bt.matrixWorld.multiplyMatrices(xt.matrixWorld,bt.matrix),bt.matrixWorldInverse.getInverse(bt.matrixWorld)}var s=t.context,l=null,h=null,c=1,f=null,v="stage",y=null,M=[],C=[],N=new ye;N.layers.enable(1),N.viewport=new A;var W=new ye;W.layers.enable(2),W.viewport=new A;var Q=new ke([N,W]);Q.layers.enable(1),Q.layers.enable(2),this.enabled=!1,this.getController=function(bt){var xt=M[bt];return xt===void 0&&(xt=new ci,xt.matrixAutoUpdate=!1,xt.visible=!1,M[bt]=xt),xt},this.getDevice=function(){return l},this.setDevice=function(bt){bt!==void 0&&(l=bt),bt instanceof XRDevice&&s.setCompatibleXRDevice(bt)},this.setFramebufferScaleFactor=function(bt){c=bt},this.setFrameOfReferenceType=function(bt){v=bt},this.setSession=function(bt){h=bt,h!==null&&(h.addEventListener("select",i),h.addEventListener("selectstart",i),h.addEventListener("selectend",i),h.addEventListener("end",n),h.baseLayer=new XRWebGLLayer(h,s,{framebufferScaleFactor:c}),h.requestFrameOfReference(v).then(function(xt){f=xt,t.setFramebuffer(h.baseLayer.framebuffer),mt.setContext(h),mt.start()}),C=h.getInputSources(),h.addEventListener("inputsourceschange",function(){C=h.getInputSources(),console.log(C);for(var xt=0;xt<M.length;xt++)M[xt].userData.inputSource=C[xt]}))},this.getCamera=function(bt){if(e()){var xt=bt.parent,Vt=Q.cameras;o(Q,xt);for(var V=0;V<Vt.length;V++)o(Vt[V],xt);for(bt.matrixWorld.copy(Q.matrixWorld),bt=bt.children,V=0,xt=bt.length;V<xt;V++)bt[V].updateMatrixWorld(!0);return ce(Q,N,W),Q}return bt},this.isPresenting=e;var _t=null,mt=new p;mt.setAnimationLoop(function(bt,xt){if(y=xt.getDevicePose(f),y!==null)for(var Vt=h.baseLayer,V=xt.views,tt=0;tt<V.length;tt++){var Ot=V[tt],ee=Vt.getViewport(Ot),$t=y.getViewMatrix(Ot),qt=Q.cameras[tt];qt.matrix.fromArray($t).getInverse(qt.matrix),qt.projectionMatrix.fromArray(Ot.projectionMatrix),qt.viewport.set(ee.x,ee.y,ee.width,ee.height),tt===0&&Q.matrix.copy(qt.matrix)}for(tt=0;tt<M.length;tt++){if(Vt=M[tt],(V=C[tt])&&(V=xt.getInputPose(V,f),V!==null)){"targetRay"in V?Vt.matrix.elements=V.targetRay.transformMatrix:"pointerMatrix"in V&&(Vt.matrix.elements=V.pointerMatrix),Vt.matrix.decompose(Vt.position,Vt.rotation,Vt.scale),Vt.visible=!0;continue}Vt.visible=!1}_t&&_t(bt)}),this.setAnimationLoop=function(bt){_t=bt},this.dispose=function(){},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}function _e(t){var e;function i(){ii=new Jt(ne),Ze=new Ji(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"),En=new He(ne,ii,Ze),li=new he(ne,ii,En,Ze),li.scissor(ji.copy(Ye).multiplyScalar(Qe)),li.viewport(pn.copy(Ut).multiplyScalar(Qe)),dn=new pt,Tn=new it,lo=new je(ne,ii,li,Tn,Ze,En,dn),ks=new g(ne),xl=new Wt(ne,ks,dn),Us=new Kt(xl,dn),wl=new ie(ne),is=new rt(qt,ii,Ze),xa=new Ct,ns=new le,Co=new Ri(qt,li,Us,V),Tl=new hn(ne,ii,dn,Ze),Wn=new ct(ne,ii,dn,Ze),dn.programs=is.programs,qt.context=ne,qt.capabilities=Ze,qt.extensions=ii,qt.properties=Tn,qt.renderLists=xa,qt.state=li,qt.info=dn}function n(ut){ut.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),Te=!0}function o(){console.log("THREE.WebGLRenderer: Context Restored."),Te=!1,i()}function s(ut){ut=ut.target,ut.removeEventListener("dispose",s),l(ut),Tn.remove(ut)}function l(ut){var wt=Tn.get(ut).program;ut.program=void 0,wt!==void 0&&is.releaseProgram(wt)}function h(ut,wt){ut.render(function(dt){qt.renderBufferImmediate(dt,wt)})}function c(ut,wt,dt){if(ut.visible!==!1){if(ut.layers.test(wt.layers)){if(ut.isLight)$t.pushLight(ut),ut.castShadow&&$t.pushShadow(ut);else if(ut.isSprite){if(!ut.frustumCulled||Hi.intersectsSprite(ut)){dt&&Ai.setFromMatrixPosition(ut.matrixWorld).applyMatrix4(Pi);var Me=Us.update(ut),De=ut.material;ee.push(ut,Me,De,Ai.z,null)}}else if(ut.isImmediateRenderObject)dt&&Ai.setFromMatrixPosition(ut.matrixWorld).applyMatrix4(Pi),ee.push(ut,null,ut.material,Ai.z,null);else if((ut.isMesh||ut.isLine||ut.isPoints)&&(ut.isSkinnedMesh&&ut.skeleton.update(),!ut.frustumCulled||Hi.intersectsObject(ut)))if(dt&&Ai.setFromMatrixPosition(ut.matrixWorld).applyMatrix4(Pi),Me=Us.update(ut),De=ut.material,Array.isArray(De))for(var Ve=Me.groups,Se=0,$e=Ve.length;Se<$e;Se++){var Li=Ve[Se],Zi=De[Li.materialIndex];Zi&&Zi.visible&&ee.push(ut,Me,Zi,Ai.z,Li)}else De.visible&&ee.push(ut,Me,De,Ai.z,null)}for(ut=ut.children,Se=0,$e=ut.length;Se<$e;Se++)c(ut[Se],wt,dt)}}function f(ut,wt,dt,Me){for(var De=0,Ve=ut.length;De<Ve;De++){var Se=ut[De],$e=Se.object,Li=Se.geometry,Zi=Me===void 0?Se.material:Me;if(Se=Se.group,dt.isArrayCamera){xn=dt;for(var me=dt.cameras,ar=0,Cn=me.length;ar<Cn;ar++){var rn=me[ar];if($e.layers.test(rn.layers)){if("viewport"in rn)li.viewport(pn.copy(rn.viewport));else{var tr=rn.bounds;li.viewport(pn.set(tr.x*wn,tr.y*Ae,tr.z*wn,tr.w*Ae).multiplyScalar(Qe))}$t.setupLights(rn),v($e,wt,rn,Li,Zi,Se)}}}else xn=null,v($e,wt,dt,Li,Zi,Se)}}function v(ut,wt,dt,Me,De,Ve){if(ut.onBeforeRender(qt,wt,dt,Me,De,Ve),$t=ns.get(wt,xn||dt),ut.modelViewMatrix.multiplyMatrices(dt.matrixWorldInverse,ut.matrixWorld),ut.normalMatrix.getNormalMatrix(ut.modelViewMatrix),ut.isImmediateRenderObject){li.setMaterial(De);var Se=M(dt,wt.fog,De,ut);We=e=null,Ke=!1,h(ut,Se)}else qt.renderBufferDirect(dt,wt.fog,Me,De,ut,Ve);ut.onAfterRender(qt,wt,dt,Me,De,Ve),$t=ns.get(wt,xn||dt)}function y(ut,wt,dt){var Me=Tn.get(ut),De=$t.state.lights,Ve=Me.lightsHash,Se=De.state.hash;dt=is.getParameters(ut,De.state,$t.state.shadowsArray,wt,Pe.numPlanes,Pe.numIntersection,dt);var $e=is.getProgramCode(ut,dt),Li=Me.program,Zi=!0;if(Li===void 0)ut.addEventListener("dispose",s);else if(Li.code!==$e)l(ut);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(dt.shaderID!==void 0)return;Zi=!1}if(Zi&&(dt.shaderID?($e=jr[dt.shaderID],Me.shader={name:ut.type,uniforms:Pn.clone($e.uniforms),vertexShader:$e.vertexShader,fragmentShader:$e.fragmentShader}):Me.shader={name:ut.type,uniforms:ut.uniforms,vertexShader:ut.vertexShader,fragmentShader:ut.fragmentShader},ut.onBeforeCompile(Me.shader,qt),$e=is.getProgramCode(ut,dt),Li=is.acquireProgram(ut,Me.shader,dt,$e),Me.program=Li,ut.program=Li),dt=Li.getAttributes(),ut.morphTargets)for($e=ut.numSupportedMorphTargets=0;$e<qt.maxMorphTargets;$e++)0<=dt["morphTarget"+$e]&&ut.numSupportedMorphTargets++;if(ut.morphNormals)for($e=ut.numSupportedMorphNormals=0;$e<qt.maxMorphNormals;$e++)0<=dt["morphNormal"+$e]&&ut.numSupportedMorphNormals++;dt=Me.shader.uniforms,(!ut.isShaderMaterial&&!ut.isRawShaderMaterial||ut.clipping===!0)&&(Me.numClippingPlanes=Pe.numPlanes,Me.numIntersection=Pe.numIntersection,dt.clippingPlanes=Pe.uniform),Me.fog=wt,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,ut.lights&&(dt.ambientLightColor.value=De.state.ambient,dt.directionalLights.value=De.state.directional,dt.spotLights.value=De.state.spot,dt.rectAreaLights.value=De.state.rectArea,dt.pointLights.value=De.state.point,dt.hemisphereLights.value=De.state.hemi,dt.directionalShadowMap.value=De.state.directionalShadowMap,dt.directionalShadowMatrix.value=De.state.directionalShadowMatrix,dt.spotShadowMap.value=De.state.spotShadowMap,dt.spotShadowMatrix.value=De.state.spotShadowMatrix,dt.pointShadowMap.value=De.state.pointShadowMap,dt.pointShadowMatrix.value=De.state.pointShadowMatrix),ut=Me.program.getUniforms(),ut=Dr.seqWithValue(ut.seq,dt),Me.uniformsList=ut}function M(ut,wt,dt,Me){tn=0;var De=Tn.get(dt),Ve=De.lightsHash,Se=$t.state.lights.state.hash;Xe&&(ri||ut!==fi)&&Pe.setState(dt.clippingPlanes,dt.clipIntersection,dt.clipShadows,ut,De,ut===fi&&dt.id===se),dt.needsUpdate===!1&&(De.program===void 0||dt.fog&&De.fog!==wt?dt.needsUpdate=!0:(!dt.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)&&(De.numClippingPlanes===void 0||De.numClippingPlanes===Pe.numPlanes&&De.numIntersection===Pe.numIntersection)||(dt.needsUpdate=!0)),dt.needsUpdate&&(y(dt,wt,Me),dt.needsUpdate=!1);var $e=!1,Li=!1,Zi=!1;Ve=De.program,Se=Ve.getUniforms();var me=De.shader.uniforms;if(li.useProgram(Ve.program)&&(Zi=Li=$e=!0),dt.id!==se&&(se=dt.id,Li=!0),($e||fi!==ut)&&(Se.setValue(ne,"projectionMatrix",ut.projectionMatrix),Ze.logarithmicDepthBuffer&&Se.setValue(ne,"logDepthBufFC",2/(Math.log(ut.far+1)/Math.LN2)),fi!==ut&&(fi=ut,Zi=Li=!0),(dt.isShaderMaterial||dt.isMeshPhongMaterial||dt.isMeshStandardMaterial||dt.envMap)&&($e=Se.map.cameraPosition,$e!==void 0&&$e.setValue(ne,Ai.setFromMatrixPosition(ut.matrixWorld))),(dt.isMeshPhongMaterial||dt.isMeshLambertMaterial||dt.isMeshBasicMaterial||dt.isMeshStandardMaterial||dt.isShaderMaterial||dt.skinning)&&Se.setValue(ne,"viewMatrix",ut.matrixWorldInverse)),dt.skinning&&(Se.setOptional(ne,Me,"bindMatrix"),Se.setOptional(ne,Me,"bindMatrixInverse"),ut=Me.skeleton))if($e=ut.bones,Ze.floatVertexTextures){if(ut.boneTexture===void 0){$e=Math.sqrt(4*$e.length),$e=pi.ceilPowerOfTwo($e),$e=Math.max($e,4);var ar=new Float32Array($e*$e*4);ar.set(ut.boneMatrices);var Cn=new G(ar,$e,$e,1023,1015);Cn.needsUpdate=!0,ut.boneMatrices=ar,ut.boneTexture=Cn,ut.boneTextureSize=$e}Se.setValue(ne,"boneTexture",ut.boneTexture),Se.setValue(ne,"boneTextureSize",ut.boneTextureSize)}else Se.setOptional(ne,ut,"boneMatrices");return Li&&(Se.setValue(ne,"toneMappingExposure",qt.toneMappingExposure),Se.setValue(ne,"toneMappingWhitePoint",qt.toneMappingWhitePoint),dt.lights&&(Li=Zi,me.ambientLightColor.needsUpdate=Li,me.directionalLights.needsUpdate=Li,me.pointLights.needsUpdate=Li,me.spotLights.needsUpdate=Li,me.rectAreaLights.needsUpdate=Li,me.hemisphereLights.needsUpdate=Li),wt&&dt.fog&&(me.fogColor.value=wt.color,wt.isFog?(me.fogNear.value=wt.near,me.fogFar.value=wt.far):wt.isFogExp2&&(me.fogDensity.value=wt.density)),dt.isMeshBasicMaterial?C(me,dt):dt.isMeshLambertMaterial?(C(me,dt),dt.emissiveMap&&(me.emissiveMap.value=dt.emissiveMap)):dt.isMeshPhongMaterial?(C(me,dt),dt.isMeshToonMaterial?(N(me,dt),dt.gradientMap&&(me.gradientMap.value=dt.gradientMap)):N(me,dt)):dt.isMeshStandardMaterial?(C(me,dt),dt.isMeshPhysicalMaterial?(W(me,dt),me.reflectivity.value=dt.reflectivity,me.clearCoat.value=dt.clearCoat,me.clearCoatRoughness.value=dt.clearCoatRoughness):W(me,dt)):dt.isMeshMatcapMaterial?(C(me,dt),dt.matcap&&(me.matcap.value=dt.matcap),dt.bumpMap&&(me.bumpMap.value=dt.bumpMap,me.bumpScale.value=dt.bumpScale,dt.side===1&&(me.bumpScale.value*=-1)),dt.normalMap&&(me.normalMap.value=dt.normalMap,me.normalScale.value.copy(dt.normalScale),dt.side===1&&me.normalScale.value.negate()),dt.displacementMap&&(me.displacementMap.value=dt.displacementMap,me.displacementScale.value=dt.displacementScale,me.displacementBias.value=dt.displacementBias)):dt.isMeshDepthMaterial?(C(me,dt),dt.displacementMap&&(me.displacementMap.value=dt.displacementMap,me.displacementScale.value=dt.displacementScale,me.displacementBias.value=dt.displacementBias)):dt.isMeshDistanceMaterial?(C(me,dt),dt.displacementMap&&(me.displacementMap.value=dt.displacementMap,me.displacementScale.value=dt.displacementScale,me.displacementBias.value=dt.displacementBias),me.referencePosition.value.copy(dt.referencePosition),me.nearDistance.value=dt.nearDistance,me.farDistance.value=dt.farDistance):dt.isMeshNormalMaterial?(C(me,dt),dt.bumpMap&&(me.bumpMap.value=dt.bumpMap,me.bumpScale.value=dt.bumpScale,dt.side===1&&(me.bumpScale.value*=-1)),dt.normalMap&&(me.normalMap.value=dt.normalMap,me.normalScale.value.copy(dt.normalScale),dt.side===1&&me.normalScale.value.negate()),dt.displacementMap&&(me.displacementMap.value=dt.displacementMap,me.displacementScale.value=dt.displacementScale,me.displacementBias.value=dt.displacementBias)):dt.isLineBasicMaterial?(me.diffuse.value=dt.color,me.opacity.value=dt.opacity,dt.isLineDashedMaterial&&(me.dashSize.value=dt.dashSize,me.totalSize.value=dt.dashSize+dt.gapSize,me.scale.value=dt.scale)):dt.isPointsMaterial?(me.diffuse.value=dt.color,me.opacity.value=dt.opacity,me.size.value=dt.size*Qe,me.scale.value=.5*Ae,me.map.value=dt.map,dt.map!==null&&(dt.map.matrixAutoUpdate===!0&&dt.map.updateMatrix(),me.uvTransform.value.copy(dt.map.matrix))):dt.isSpriteMaterial?(me.diffuse.value=dt.color,me.opacity.value=dt.opacity,me.rotation.value=dt.rotation,me.map.value=dt.map,dt.map!==null&&(dt.map.matrixAutoUpdate===!0&&dt.map.updateMatrix(),me.uvTransform.value.copy(dt.map.matrix))):dt.isShadowMaterial&&(me.color.value=dt.color,me.opacity.value=dt.opacity),me.ltc_1!==void 0&&(me.ltc_1.value=qe.LTC_1),me.ltc_2!==void 0&&(me.ltc_2.value=qe.LTC_2),Dr.upload(ne,De.uniformsList,me,qt)),dt.isShaderMaterial&&dt.uniformsNeedUpdate===!0&&(Dr.upload(ne,De.uniformsList,me,qt),dt.uniformsNeedUpdate=!1),dt.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 C(ut,wt){if(ut.opacity.value=wt.opacity,wt.color&&(ut.diffuse.value=wt.color),wt.emissive&&ut.emissive.value.copy(wt.emissive).multiplyScalar(wt.emissiveIntensity),wt.map&&(ut.map.value=wt.map),wt.alphaMap&&(ut.alphaMap.value=wt.alphaMap),wt.specularMap&&(ut.specularMap.value=wt.specularMap),wt.envMap&&(ut.envMap.value=wt.envMap,ut.flipEnvMap.value=wt.envMap&&wt.envMap.isCubeTexture?-1:1,ut.reflectivity.value=wt.reflectivity,ut.refractionRatio.value=wt.refractionRatio,ut.maxMipLevel.value=Tn.get(wt.envMap).__maxMipLevel),wt.lightMap&&(ut.lightMap.value=wt.lightMap,ut.lightMapIntensity.value=wt.lightMapIntensity),wt.aoMap&&(ut.aoMap.value=wt.aoMap,ut.aoMapIntensity.value=wt.aoMapIntensity),wt.map)var dt=wt.map;else wt.specularMap?dt=wt.specularMap:wt.displacementMap?dt=wt.displacementMap:wt.normalMap?dt=wt.normalMap:wt.bumpMap?dt=wt.bumpMap:wt.roughnessMap?dt=wt.roughnessMap:wt.metalnessMap?dt=wt.metalnessMap:wt.alphaMap?dt=wt.alphaMap:wt.emissiveMap&&(dt=wt.emissiveMap);dt!==void 0&&(dt.isWebGLRenderTarget&&(dt=dt.texture),dt.matrixAutoUpdate===!0&&dt.updateMatrix(),ut.uvTransform.value.copy(dt.matrix))}function N(ut,wt){ut.specular.value=wt.specular,ut.shininess.value=Math.max(wt.shininess,1e-4),wt.emissiveMap&&(ut.emissiveMap.value=wt.emissiveMap),wt.bumpMap&&(ut.bumpMap.value=wt.bumpMap,ut.bumpScale.value=wt.bumpScale,wt.side===1&&(ut.bumpScale.value*=-1)),wt.normalMap&&(ut.normalMap.value=wt.normalMap,ut.normalScale.value.copy(wt.normalScale),wt.side===1&&ut.normalScale.value.negate()),wt.displacementMap&&(ut.displacementMap.value=wt.displacementMap,ut.displacementScale.value=wt.displacementScale,ut.displacementBias.value=wt.displacementBias)}function W(ut,wt){ut.roughness.value=wt.roughness,ut.metalness.value=wt.metalness,wt.roughnessMap&&(ut.roughnessMap.value=wt.roughnessMap),wt.metalnessMap&&(ut.metalnessMap.value=wt.metalnessMap),wt.emissiveMap&&(ut.emissiveMap.value=wt.emissiveMap),wt.bumpMap&&(ut.bumpMap.value=wt.bumpMap,ut.bumpScale.value=wt.bumpScale,wt.side===1&&(ut.bumpScale.value*=-1)),wt.normalMap&&(ut.normalMap.value=wt.normalMap,ut.normalScale.value.copy(wt.normalScale),wt.side===1&&ut.normalScale.value.negate()),wt.displacementMap&&(ut.displacementMap.value=wt.displacementMap,ut.displacementScale.value=wt.displacementScale,ut.displacementBias.value=wt.displacementBias),wt.envMap&&(ut.envMapIntensity.value=wt.envMapIntensity)}console.log("THREE.WebGLRenderer","98"),t=t||{};var Q=t.canvas!==void 0?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),_t=t.context!==void 0?t.context:null,mt=t.alpha!==void 0?t.alpha:!1,bt=t.depth!==void 0?t.depth:!0,xt=t.stencil!==void 0?t.stencil:!0,Vt=t.antialias!==void 0?t.antialias:!1,V=t.premultipliedAlpha!==void 0?t.premultipliedAlpha:!0,tt=t.preserveDrawingBuffer!==void 0?t.preserveDrawingBuffer:!1,Ot=t.powerPreference!==void 0?t.powerPreference:"default",ee=null,$t=null;this.domElement=Q,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 qt=this,Te=!1,pe=null,Ie=null,be=null,se=-1,We=e=null,Ke=!1,fi=null,xn=null,pn=new A,ji=new A,Gi=null,tn=0,wn=Q.width,Ae=Q.height,Qe=1,Ut=new A(0,0,wn,Ae),Ye=new A(0,0,wn,Ae),ei=!1,Hi=new E,Pe=new R,Xe=!1,ri=!1,Pi=new nt,Ai=new m;try{mt={alpha:mt,depth:bt,stencil:xt,antialias:Vt,premultipliedAlpha:V,preserveDrawingBuffer:tt,powerPreference:Ot},Q.addEventListener("webglcontextlost",n,!1),Q.addEventListener("webglcontextrestored",o,!1);var ne=_t||Q.getContext("webgl",mt)||Q.getContext("experimental-webgl",mt);if(ne===null)throw Q.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(ut){console.error("THREE.WebGLRenderer: "+ut.message)}var ii,Ze,li,dn,Tn,lo,ks,xl,Us,is,xa,ns,Co,wl,Tl,Wn,En;i();var Yr=null;typeof navigator<"u"&&(Yr="xr"in navigator?new Ce(qt):new mi(qt)),this.vr=Yr;var Zl=new ve(qt,Us,Ze.maxTextureSize);this.shadowMap=Zl,this.getContext=function(){return ne},this.getContextAttributes=function(){return ne.getContextAttributes()},this.forceContextLoss=function(){var ut=ii.get("WEBGL_lose_context");ut&&ut.loseContext()},this.forceContextRestore=function(){var ut=ii.get("WEBGL_lose_context");ut&&ut.restoreContext()},this.getPixelRatio=function(){return Qe},this.setPixelRatio=function(ut){ut!==void 0&&(Qe=ut,this.setSize(wn,Ae,!1))},this.getSize=function(){return{width:wn,height:Ae}},this.setSize=function(ut,wt,dt){Yr.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(wn=ut,Ae=wt,Q.width=ut*Qe,Q.height=wt*Qe,dt!==!1&&(Q.style.width=ut+"px",Q.style.height=wt+"px"),this.setViewport(0,0,ut,wt))},this.getDrawingBufferSize=function(){return{width:wn*Qe,height:Ae*Qe}},this.setDrawingBufferSize=function(ut,wt,dt){wn=ut,Ae=wt,Qe=dt,Q.width=ut*dt,Q.height=wt*dt,this.setViewport(0,0,ut,wt)},this.getCurrentViewport=function(){return pn},this.setViewport=function(ut,wt,dt,Me){Ut.set(ut,Ae-wt-Me,dt,Me),li.viewport(pn.copy(Ut).multiplyScalar(Qe))},this.setScissor=function(ut,wt,dt,Me){Ye.set(ut,Ae-wt-Me,dt,Me),li.scissor(ji.copy(Ye).multiplyScalar(Qe))},this.setScissorTest=function(ut){li.setScissorTest(ei=ut)},this.getClearColor=function(){return Co.getClearColor()},this.setClearColor=function(){Co.setClearColor.apply(Co,arguments)},this.getClearAlpha=function(){return Co.getClearAlpha()},this.setClearAlpha=function(){Co.setClearAlpha.apply(Co,arguments)},this.clear=function(ut,wt,dt){var Me=0;(ut===void 0||ut)&&(Me|=16384),(wt===void 0||wt)&&(Me|=256),(dt===void 0||dt)&&(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(){Q.removeEventListener("webglcontextlost",n,!1),Q.removeEventListener("webglcontextrestored",o,!1),xa.dispose(),ns.dispose(),Tn.dispose(),Us.dispose(),Yr.dispose(),ho.stop()},this.renderBufferImmediate=function(ut,wt){li.initAttributes();var dt=Tn.get(ut);ut.hasPositions&&!dt.position&&(dt.position=ne.createBuffer()),ut.hasNormals&&!dt.normal&&(dt.normal=ne.createBuffer()),ut.hasUvs&&!dt.uv&&(dt.uv=ne.createBuffer()),ut.hasColors&&!dt.color&&(dt.color=ne.createBuffer()),wt=wt.getAttributes(),ut.hasPositions&&(ne.bindBuffer(34962,dt.position),ne.bufferData(34962,ut.positionArray,35048),li.enableAttribute(wt.position),ne.vertexAttribPointer(wt.position,3,5126,!1,0,0)),ut.hasNormals&&(ne.bindBuffer(34962,dt.normal),ne.bufferData(34962,ut.normalArray,35048),li.enableAttribute(wt.normal),ne.vertexAttribPointer(wt.normal,3,5126,!1,0,0)),ut.hasUvs&&(ne.bindBuffer(34962,dt.uv),ne.bufferData(34962,ut.uvArray,35048),li.enableAttribute(wt.uv),ne.vertexAttribPointer(wt.uv,2,5126,!1,0,0)),ut.hasColors&&(ne.bindBuffer(34962,dt.color),ne.bufferData(34962,ut.colorArray,35048),li.enableAttribute(wt.color),ne.vertexAttribPointer(wt.color,3,5126,!1,0,0)),li.disableUnusedAttributes(),ne.drawArrays(4,0,ut.count),ut.count=0},this.renderBufferDirect=function(ut,wt,dt,Me,De,Ve){var Se=De.isMesh&&0>De.normalMatrix.determinant();li.setMaterial(Me,Se);var $e=M(ut,wt,Me,De),Li=!1;(e!==dt.id||We!==$e.id||Ke!==(Me.wireframe===!0))&&(e=dt.id,We=$e.id,Ke=Me.wireframe===!0,Li=!0),De.morphTargetInfluences&&(wl.update(De,dt,Me,$e),Li=!0),Se=dt.index;var Zi=dt.attributes.position;if(wt=1,Me.wireframe===!0&&(Se=xl.getWireframeAttribute(dt),wt=2),ut=Tl,Se!==null){var me=ks.get(Se);ut=Wn,ut.setIndex(me)}if(Li){if(dt&&dt.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(),Li=dt.attributes,$e=$e.getAttributes();var ar=Me.defaultAttributeValues;for(jn in $e){var Cn=$e[jn];if(0<=Cn){var rn=Li[jn];if(rn!==void 0){var tr=rn.normalized,Ml=rn.itemSize,Zr=ks.get(rn);if(Zr!==void 0){var Sl=Zr.buffer,Za=Zr.type;if(Zr=Zr.bytesPerElement,rn.isInterleavedBufferAttribute){var Gs=rn.data,Jl=Gs.stride;rn=rn.offset,Gs&&Gs.isInstancedInterleavedBuffer?(li.enableAttributeAndDivisor(Cn,Gs.meshPerAttribute),dt.maxInstancedCount===void 0&&(dt.maxInstancedCount=Gs.meshPerAttribute*Gs.count)):li.enableAttribute(Cn),ne.bindBuffer(34962,Sl),ne.vertexAttribPointer(Cn,Ml,Za,tr,Jl*Zr,rn*Zr)}else rn.isInstancedBufferAttribute?(li.enableAttributeAndDivisor(Cn,rn.meshPerAttribute),dt.maxInstancedCount===void 0&&(dt.maxInstancedCount=rn.meshPerAttribute*rn.count)):li.enableAttribute(Cn),ne.bindBuffer(34962,Sl),ne.vertexAttribPointer(Cn,Ml,Za,tr,0,0)}}else if(ar!==void 0&&(tr=ar[jn],tr!==void 0))switch(tr.length){case 2:ne.vertexAttrib2fv(Cn,tr);break;case 3:ne.vertexAttrib3fv(Cn,tr);break;case 4:ne.vertexAttrib4fv(Cn,tr);break;default:ne.vertexAttrib1fv(Cn,tr)}}}li.disableUnusedAttributes()}Se!==null&&ne.bindBuffer(34963,me.buffer)}me=1/0,Se!==null?me=Se.count:Zi!==void 0&&(me=Zi.count),Se=dt.drawRange.start*wt,Zi=Ve!==null?Ve.start*wt:0;var jn=Math.max(Se,Zi);if(Ve=Math.max(0,Math.min(me,Se+dt.drawRange.count*wt,Zi+(Ve!==null?Ve.count*wt:1/0))-1-jn+1),Ve!==0){if(De.isMesh)if(Me.wireframe===!0)li.setLineWidth(Me.wireframeLinewidth*(Ie===null?Qe:1)),ut.setMode(1);else switch(De.drawMode){case 0:ut.setMode(4);break;case 1:ut.setMode(5);break;case 2:ut.setMode(6)}else De.isLine?(Me=Me.linewidth,Me===void 0&&(Me=1),li.setLineWidth(Me*(Ie===null?Qe:1)),De.isLineSegments?ut.setMode(1):De.isLineLoop?ut.setMode(2):ut.setMode(3)):De.isPoints?ut.setMode(0):De.isSprite&&ut.setMode(4);dt&&dt.isInstancedBufferGeometry?0<dt.maxInstancedCount&&ut.renderInstances(dt,jn,Ve):ut.render(jn,Ve)}},this.compile=function(ut,wt){$t=ns.get(ut,wt),$t.init(),ut.traverse(function(dt){dt.isLight&&($t.pushLight(dt),dt.castShadow&&$t.pushShadow(dt))}),$t.setupLights(wt),ut.traverse(function(dt){if(dt.material)if(Array.isArray(dt.material))for(var Me=0;Me<dt.material.length;Me++)y(dt.material[Me],ut.fog,dt);else y(dt.material,ut.fog,dt)})};var Fs=null,ho=new p;ho.setAnimationLoop(function(ut){Yr.isPresenting()||Fs&&Fs(ut)}),typeof window<"u"&&ho.setContext(window),this.setAnimationLoop=function(ut){Fs=ut,Yr.setAnimationLoop(ut),ho.start()},this.render=function(ut,wt,dt,Me){if(!wt||!wt.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!Te){We=e=null,Ke=!1,se=-1,fi=null,ut.autoUpdate===!0&&ut.updateMatrixWorld(),wt.parent===null&&wt.updateMatrixWorld(),Yr.enabled&&(wt=Yr.getCamera(wt)),$t=ns.get(ut,wt),$t.init(),ut.onBeforeRender(qt,ut,wt,dt),Pi.multiplyMatrices(wt.projectionMatrix,wt.matrixWorldInverse),Hi.setFromMatrix(Pi),ri=this.localClippingEnabled,Xe=Pe.init(this.clippingPlanes,ri,wt),ee=xa.get(ut,wt),ee.init(),c(ut,wt,qt.sortObjects),qt.sortObjects===!0&&ee.sort(),Xe&&Pe.beginShadows(),Zl.render($t.state.shadowsArray,ut,wt),$t.setupLights(wt),Xe&&Pe.endShadows(),this.info.autoReset&&this.info.reset(),dt===void 0&&(dt=null),this.setRenderTarget(dt),Co.render(ee,ut,wt,Me),Me=ee.opaque;var De=ee.transparent;if(ut.overrideMaterial){var Ve=ut.overrideMaterial;Me.length&&f(Me,ut,wt,Ve),De.length&&f(De,ut,wt,Ve)}else Me.length&&f(Me,ut,wt),De.length&&f(De,ut,wt);dt&&lo.updateRenderTargetMipmap(dt),li.buffers.depth.setTest(!0),li.buffers.depth.setMask(!0),li.buffers.color.setMask(!0),li.setPolygonOffset(!1),ut.onAfterRender(qt,ut,wt),Yr.enabled&&Yr.submitFrame(),$t=ee=null}},this.allocTextureUnit=function(){var ut=tn;return ut>=Ze.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+ut+" texture units while this GPU supports only "+Ze.maxTextures),tn+=1,ut},this.setTexture2D=function(){var ut=!1;return function(wt,dt){wt&&wt.isWebGLRenderTarget&&(ut||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),ut=!0),wt=wt.texture),lo.setTexture2D(wt,dt)}}(),this.setTexture3D=function(){return function(ut,wt){lo.setTexture3D(ut,wt)}}(),this.setTexture=function(){var ut=!1;return function(wt,dt){ut||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),ut=!0),lo.setTexture2D(wt,dt)}}(),this.setTextureCube=function(){var ut=!1;return function(wt,dt){wt&&wt.isWebGLRenderTargetCube&&(ut||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),ut=!0),wt=wt.texture),wt&&wt.isCubeTexture||Array.isArray(wt.image)&&wt.image.length===6?lo.setTextureCube(wt,dt):lo.setTextureCubeDynamic(wt,dt)}}(),this.setFramebuffer=function(ut){pe=ut},this.getRenderTarget=function(){return Ie},this.setRenderTarget=function(ut){(Ie=ut)&&Tn.get(ut).__webglFramebuffer===void 0&&lo.setupRenderTarget(ut);var wt=pe,dt=!1;ut?(wt=Tn.get(ut).__webglFramebuffer,ut.isWebGLRenderTargetCube&&(wt=wt[ut.activeCubeFace],dt=!0),pn.copy(ut.viewport),ji.copy(ut.scissor),Gi=ut.scissorTest):(pn.copy(Ut).multiplyScalar(Qe),ji.copy(Ye).multiplyScalar(Qe),Gi=ei),be!==wt&&(ne.bindFramebuffer(36160,wt),be=wt),li.viewport(pn),li.scissor(ji),li.setScissorTest(Gi),dt&&(dt=Tn.get(ut.texture),ne.framebufferTexture2D(36160,36064,34069+ut.activeCubeFace,dt.__webglTexture,ut.activeMipMapLevel))},this.readRenderTargetPixels=function(ut,wt,dt,Me,De,Ve){if(ut&&ut.isWebGLRenderTarget){var Se=Tn.get(ut).__webglFramebuffer;if(Se){var $e=!1;Se!==be&&(ne.bindFramebuffer(36160,Se),$e=!0);try{var Li=ut.texture,Zi=Li.format,me=Li.type;Zi!==1023&&En.convert(Zi)!==ne.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):me===1009||En.convert(me)===ne.getParameter(35738)||me===1015&&(Ze.isWebGL2||ii.get("OES_texture_float")||ii.get("WEBGL_color_buffer_float"))||me===1016&&(Ze.isWebGL2?ii.get("EXT_color_buffer_float"):ii.get("EXT_color_buffer_half_float"))?ne.checkFramebufferStatus(36160)===36053?0<=wt&&wt<=ut.width-Me&&0<=dt&&dt<=ut.height-De&&ne.readPixels(wt,dt,Me,De,En.convert(Zi),En.convert(me),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{$e&&ne.bindFramebuffer(36160,be)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(ut,wt,dt){var Me=wt.image.width,De=wt.image.height,Ve=En.convert(wt.format);this.setTexture2D(wt,0),ne.copyTexImage2D(3553,dt||0,Ve,ut.x,ut.y,Me,De,0)},this.copyTextureToTexture=function(ut,wt,dt,Me){var De=wt.image.width,Ve=wt.image.height,Se=En.convert(dt.format),$e=En.convert(dt.type);this.setTexture2D(dt,0),wt.isDataTexture?ne.texSubImage2D(3553,Me||0,ut.x,ut.y,De,Ve,Se,$e,wt.image.data):ne.texSubImage2D(3553,Me||0,ut.x,ut.y,Se,$e,wt.image)}}function Le(t,e){this.name="",this.color=new b(t),this.density=e!==void 0?e:25e-5}function vn(t,e,i){this.name="",this.color=new b(t),this.near=e!==void 0?e:1,this.far=i!==void 0?i:1e3}function zn(){z.call(this),this.type="Scene",this.overrideMaterial=this.fog=this.background=null,this.autoUpdate=!0}function Ii(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 Di(t,e,i,n){this.data=t,this.itemSize=e,this.offset=i,this.normalized=n===!0}function Fi(t){Zt.call(this),this.type="SpriteMaterial",this.color=new b(16777215),this.map=null,this.rotation=0,this.sizeAttenuation=!0,this.lights=!1,this.transparent=!0,this.setValues(t)}function Ki(t){if(z.call(this),this.type="Sprite",Ns===void 0){Ns=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 Ii(e,5),Ns.setIndex([0,1,2,0,2,3]),Ns.addAttribute("position",new Di(e,3,0,!1)),Ns.addAttribute("uv",new Di(e,2,3,!1))}this.geometry=Ns,this.material=t!==void 0?t:new Fi,this.center=new d(.5,.5)}function Qi(){z.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function sn(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 nt)}function an(){z.call(this),this.type="Bone"}function Ui(t,e){di.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new nt,this.bindMatrixInverse=new nt,t=this.initBones(),t=new sn(t),this.bind(t,this.matrixWorld),this.normalizeSkinWeights()}function zi(t){Zt.call(this),this.type="LineBasicMaterial",this.color=new b(16777215),this.linewidth=1,this.linejoin=this.linecap="round",this.lights=!1,this.setValues(t)}function Vi(t,e,i){i===1&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),z.call(this),this.type="Line",this.geometry=t!==void 0?t:new Ft,this.material=e!==void 0?e:new zi({color:16777215*Math.random()})}function gi(t,e){Vi.call(this,t,e),this.type="LineSegments"}function Br(t,e){Vi.call(this,t,e),this.type="LineLoop"}function Ln(t){Zt.call(this),this.type="PointsMaterial",this.color=new b(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=this.morphTargets=!1,this.setValues(t)}function ds(t,e){z.call(this),this.type="Points",this.geometry=t!==void 0?t:new Ft,this.material=e!==void 0?e:new Ln({color:16777215*Math.random()})}function nl(t,e,i,n,o,s,l,h,c){D.call(this,t,e,i,n,o,s,l,h,c),this.generateMipmaps=!1}function po(t,e,i,n,o,s,l,h,c,f,v,y){D.call(this,null,s,l,h,c,f,n,o,v,y),this.image={width:e,height:i},this.mipmaps=t,this.generateMipmaps=this.flipY=!1}function Xs(t,e,i,n,o,s,l,h,c){D.call(this,t,e,i,n,o,s,l,h,c),this.needsUpdate=!0}function qs(t,e,i,n,o,s,l,h,c,f){if(f=f!==void 0?f:1026,f!==1026&&f!==1027)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&f===1026&&(i=1012),i===void 0&&f===1027&&(i=1020),D.call(this,null,n,o,s,l,h,f,i,c),this.image={width:t,height:e},this.magFilter=l!==void 0?l:1003,this.minFilter=h!==void 0?h:1003,this.generateMipmaps=this.flipY=!1}function ms(t){Ft.call(this),this.type="WireframeGeometry";var e=[],i,n,o,s=[0,0],l={},h=["a","b","c"];if(t&&t.isGeometry){var c=t.faces,f=0;for(n=c.length;f<n;f++){var v=c[f];for(i=0;3>i;i++){var y=v[h[i]],M=v[h[(i+1)%3]];s[0]=Math.min(y,M),s[1]=Math.max(y,M),y=s[0]+","+s[1],l[y]===void 0&&(l[y]={index1:s[0],index2:s[1]})}}for(y in l)f=l[y],h=t.vertices[f.index1],e.push(h.x,h.y,h.z),h=t.vertices[f.index2],e.push(h.x,h.y,h.z)}else if(t&&t.isBufferGeometry)if(h=new m,t.index!==null){c=t.attributes.position,v=t.index;var C=t.groups;for(C.length===0&&(C=[{start:0,count:v.count,materialIndex:0}]),t=0,o=C.length;t<o;++t)for(f=C[t],i=f.start,n=f.count,f=i,n=i+n;f<n;f+=3)for(i=0;3>i;i++)y=v.getX(f+i),M=v.getX(f+(i+1)%3),s[0]=Math.min(y,M),s[1]=Math.max(y,M),y=s[0]+","+s[1],l[y]===void 0&&(l[y]={index1:s[0],index2:s[1]});for(y in l)f=l[y],h.fromBufferAttribute(c,f.index1),e.push(h.x,h.y,h.z),h.fromBufferAttribute(c,f.index2),e.push(h.x,h.y,h.z)}else for(c=t.attributes.position,f=0,n=c.count/3;f<n;f++)for(i=0;3>i;i++)l=3*f+i,h.fromBufferAttribute(c,l),e.push(h.x,h.y,h.z),l=3*f+(i+1)%3,h.fromBufferAttribute(c,l),e.push(h.x,h.y,h.z);this.addAttribute("position",new Pt(e,3))}function Ys(t,e,i){j.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:i},this.fromBufferGeometry(new gs(t,e,i)),this.mergeVertices()}function gs(t,e,i){Ft.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:i};var n=[],o=[],s=[],l=[],h=new m,c=new m,f=new m,v=new m,y=new m,M,C;3>t.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var N=e+1;for(M=0;M<=i;M++){var W=M/i;for(C=0;C<=e;C++){var Q=C/e;t(Q,W,c),o.push(c.x,c.y,c.z),0<=Q-1e-5?(t(Q-1e-5,W,f),v.subVectors(c,f)):(t(Q+1e-5,W,f),v.subVectors(f,c)),0<=W-1e-5?(t(Q,W-1e-5,f),y.subVectors(c,f)):(t(Q,W+1e-5,f),y.subVectors(f,c)),h.crossVectors(v,y).normalize(),s.push(h.x,h.y,h.z),l.push(Q,W)}}for(M=0;M<i;M++)for(C=0;C<e;C++)t=M*N+C+1,h=(M+1)*N+C+1,c=(M+1)*N+C,n.push(M*N+C,t,c),n.push(t,h,c);this.setIndex(n),this.addAttribute("position",new Pt(o,3)),this.addAttribute("normal",new Pt(s,3)),this.addAttribute("uv",new Pt(l,2))}function Wi(t,e,i,n){j.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(f){h.push(f.x,f.y,f.z)}function s(f,v){f*=3,v.x=t[f+0],v.y=t[f+1],v.z=t[f+2]}function l(f,v,y,M){0>M&&f.x===1&&(c[v]=f.x-1),y.x===0&&y.z===0&&(c[v]=M/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 h=[],c=[];(function(f){for(var v=new m,y=new m,M=new m,C=0;C<e.length;C+=3){s(e[C+0],v),s(e[C+1],y),s(e[C+2],M);var N,W,Q=v,_t=y,mt=M,bt=Math.pow(2,f),xt=[];for(W=0;W<=bt;W++){xt[W]=[];var Vt=Q.clone().lerp(mt,W/bt),V=_t.clone().lerp(mt,W/bt),tt=bt-W;for(N=0;N<=tt;N++)xt[W][N]=N===0&&W===bt?Vt:Vt.clone().lerp(V,N/tt)}for(W=0;W<bt;W++)for(N=0;N<2*(bt-W)-1;N++)Q=Math.floor(N/2),N%2===0?(o(xt[W][Q+1]),o(xt[W+1][Q]),o(xt[W][Q])):(o(xt[W][Q+1]),o(xt[W+1][Q+1]),o(xt[W+1][Q]))}})(n),function(f){for(var v=new m,y=0;y<h.length;y+=3)v.x=h[y+0],v.y=h[y+1],v.z=h[y+2],v.normalize().multiplyScalar(f),h[y+0]=v.x,h[y+1]=v.y,h[y+2]=v.z}(i),function(){for(var f=new m,v=0;v<h.length;v+=3)f.x=h[v+0],f.y=h[v+1],f.z=h[v+2],c.push(Math.atan2(f.z,-f.x)/2/Math.PI+.5,1-(Math.atan2(-f.y,Math.sqrt(f.x*f.x+f.z*f.z))/Math.PI+.5));f=new m,v=new m;for(var y=new m,M=new m,C=new d,N=new d,W=new d,Q=0,_t=0;Q<h.length;Q+=9,_t+=6){f.set(h[Q+0],h[Q+1],h[Q+2]),v.set(h[Q+3],h[Q+4],h[Q+5]),y.set(h[Q+6],h[Q+7],h[Q+8]),C.set(c[_t+0],c[_t+1]),N.set(c[_t+2],c[_t+3]),W.set(c[_t+4],c[_t+5]),M.copy(f).add(v).add(y).divideScalar(3);var mt=Math.atan2(M.z,-M.x);l(C,_t+0,f,mt),l(N,_t+2,v,mt),l(W,_t+4,y,mt)}for(f=0;f<c.length;f+=6)v=c[f+0],y=c[f+2],M=c[f+4],C=Math.min(v,y,M),.9<Math.max(v,y,M)&&.1>C&&(.2>v&&(c[f+0]+=1),.2>y&&(c[f+2]+=1),.2>M&&(c[f+4]+=1))}(),this.addAttribute("position",new Pt(h,3)),this.addAttribute("normal",new Pt(h.slice(),3)),this.addAttribute("uv",new Pt(c,2)),n===0?this.computeVertexNormals():this.normalizeNormals()}function Zs(t,e){j.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new vs(t,e)),this.mergeVertices()}function vs(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 Js(t,e){j.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Do(t,e)),this.mergeVertices()}function Do(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 $s(t,e){j.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new ys(t,e)),this.mergeVertices()}function ys(t,e){var i=(1+Math.sqrt(5))/2;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 _s(t,e){j.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new xs(t,e)),this.mergeVertices()}function xs(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 un(t,e,i,n,o,s){j.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:o},s!==void 0&&console.warn("THREE.TubeGeometry: taper has been removed."),t=new mo(t,e,i,n,o),this.tangents=t.tangents,this.normals=t.normals,this.binormals=t.binormals,this.fromBufferGeometry(t),this.mergeVertices()}function mo(t,e,i,n,o){function s(_t){v=t.getPointAt(_t/e,v);var mt=l.normals[_t];for(_t=l.binormals[_t],M=0;M<=n;M++){var bt=M/n*Math.PI*2,xt=Math.sin(bt);bt=-Math.cos(bt),c.x=bt*mt.x+xt*_t.x,c.y=bt*mt.y+xt*_t.y,c.z=bt*mt.z+xt*_t.z,c.normalize(),N.push(c.x,c.y,c.z),h.x=v.x+i*c.x,h.y=v.y+i*c.y,h.z=v.z+i*c.z,C.push(h.x,h.y,h.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 l=t.computeFrenetFrames(e,o);this.tangents=l.tangents,this.normals=l.normals,this.binormals=l.binormals;var h=new m,c=new m,f=new d,v=new m,y,M,C=[],N=[],W=[],Q=[];for(y=0;y<e;y++)s(y);for(s(o===!1?e:0),y=0;y<=e;y++)for(M=0;M<=n;M++)f.x=y/e,f.y=M/n,W.push(f.x,f.y);(function(){for(M=1;M<=e;M++)for(y=1;y<=n;y++){var _t=(n+1)*M+(y-1),mt=(n+1)*M+y,bt=(n+1)*(M-1)+y;Q.push((n+1)*(M-1)+(y-1),_t,bt),Q.push(_t,mt,bt)}})(),this.setIndex(Q),this.addAttribute("position",new Pt(C,3)),this.addAttribute("normal",new Pt(N,3)),this.addAttribute("uv",new Pt(W,2))}function Sr(t,e,i,n,o,s,l){j.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:o,q:s},l!==void 0&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new zo(t,e,i,n,o,s)),this.mergeVertices()}function zo(t,e,i,n,o,s){function l(V,tt,Ot,ee,$t){var qt=Math.sin(V);tt=Ot/tt*V,Ot=Math.cos(tt),$t.x=ee*(2+Ot)*.5*Math.cos(V),$t.y=ee*(2+Ot)*qt*.5,$t.z=ee*Math.sin(tt)*.5}Ft.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:o,q:s},t=t||1,e=e||.4,i=Math.floor(i)||64,n=Math.floor(n)||8,o=o||2,s=s||3;var h=[],c=[],f=[],v=[],y,M=new m,C=new m,N=new m,W=new m,Q=new m,_t=new m,mt=new m;for(y=0;y<=i;++y){var bt=y/i*o*Math.PI*2;for(l(bt,o,s,t,N),l(bt+.01,o,s,t,W),_t.subVectors(W,N),mt.addVectors(W,N),Q.crossVectors(_t,mt),mt.crossVectors(Q,_t),Q.normalize(),mt.normalize(),bt=0;bt<=n;++bt){var xt=bt/n*Math.PI*2,Vt=-e*Math.cos(xt);xt=e*Math.sin(xt),M.x=N.x+(Vt*mt.x+xt*Q.x),M.y=N.y+(Vt*mt.y+xt*Q.y),M.z=N.z+(Vt*mt.z+xt*Q.z),c.push(M.x,M.y,M.z),C.subVectors(M,N).normalize(),f.push(C.x,C.y,C.z),v.push(y/i),v.push(bt/n)}}for(bt=1;bt<=i;bt++)for(y=1;y<=n;y++)t=(n+1)*bt+(y-1),e=(n+1)*bt+y,o=(n+1)*(bt-1)+y,h.push((n+1)*(bt-1)+(y-1),t,o),h.push(t,e,o);this.setIndex(h),this.addAttribute("position",new Pt(c,3)),this.addAttribute("normal",new Pt(f,3)),this.addAttribute("uv",new Pt(v,2))}function Bo(t,e,i,n,o){j.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:o},this.fromBufferGeometry(new Rn(t,e,i,n,o)),this.mergeVertices()}function Rn(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 s=[],l=[],h=[],c=[],f=new m,v=new m,y=new m,M,C;for(M=0;M<=i;M++)for(C=0;C<=n;C++){var N=C/n*o,W=M/i*Math.PI*2;v.x=(t+e*Math.cos(W))*Math.cos(N),v.y=(t+e*Math.cos(W))*Math.sin(N),v.z=e*Math.sin(W),l.push(v.x,v.y,v.z),f.x=t*Math.cos(N),f.y=t*Math.sin(N),y.subVectors(v,f).normalize(),h.push(y.x,y.y,y.z),c.push(C/n),c.push(M/i)}for(M=1;M<=i;M++)for(C=1;C<=n;C++)t=(n+1)*(M-1)+C-1,e=(n+1)*(M-1)+C,o=(n+1)*M+C,s.push((n+1)*M+C-1,t,o),s.push(t,e,o);this.setIndex(s),this.addAttribute("position",new Pt(l,3)),this.addAttribute("normal",new Pt(h,3)),this.addAttribute("uv",new Pt(c,2))}function rl(t,e,i,n,o){for(var s,l=0,h=e,c=i-n;h<i;h+=n)l+=(t[c]-t[h])*(t[h+1]+t[c+1]),c=h;if(o===0<l)for(o=e;o<i;o+=n)s=Oa(o,t[o],t[o+1],s);else for(o=i-n;o>=e;o-=n)s=Oa(o,t[o],t[o+1],s);return s&&No(s,s.next)&&(Xi(s),s=s.next),s}function ws(t,e){if(!t)return t;e||(e=t);do{var i=!1;if(t.steiner||!No(t,t.next)&&Yi(t.prev,t,t.next)!==0)t=t.next;else{if(Xi(t),t=e=t.prev,t===t.next)break;i=!0}}while(i||t!==e);return e}function Ts(t,e,i,n,o,s,l){if(t){if(!l&&s){var h=t,c=h;do c.z===null&&(c.z=La(c.x,c.y,n,o,s)),c.prevZ=c.prev,c=c.nextZ=c.next;while(c!==h);c.prevZ.nextZ=null,c.prevZ=null,h=c;var f,v,y,M,C=1;do{c=h;var N=h=null;for(v=0;c;){v++;var W=c;for(f=y=0;f<C&&(y++,W=W.nextZ,W);f++);for(M=C;0<y||0<M&&W;)y!==0&&(M===0||!W||c.z<=W.z)?(f=c,c=c.nextZ,y--):(f=W,W=W.nextZ,M--),N?N.nextZ=f:h=f,f.prevZ=N,N=f;c=W}N.nextZ=null,C*=2}while(1<v)}for(h=t;t.prev!==t.next;){if(c=t.prev,W=t.next,s)t:{N=t,M=n;var Q=o,_t=s;if(v=N.prev,y=N,C=N.next,0<=Yi(v,y,C))N=!1;else{var mt=v.x>y.x?v.x>C.x?v.x:C.x:y.x>C.x?y.x:C.x,bt=v.y>y.y?v.y>C.y?v.y:C.y:y.y>C.y?y.y:C.y;for(f=La(v.x<y.x?v.x<C.x?v.x:C.x:y.x<C.x?y.x:C.x,v.y<y.y?v.y<C.y?v.y:C.y:y.y<C.y?y.y:C.y,M,Q,_t),M=La(mt,bt,M,Q,_t),Q=N.nextZ;Q&&Q.z<=M;){if(Q!==N.prev&&Q!==N.next&&Ra(v.x,v.y,y.x,y.y,C.x,C.y,Q.x,Q.y)&&0<=Yi(Q.prev,Q,Q.next)){N=!1;break t}Q=Q.nextZ}for(Q=N.prevZ;Q&&Q.z>=f;){if(Q!==N.prev&&Q!==N.next&&Ra(v.x,v.y,y.x,y.y,C.x,C.y,Q.x,Q.y)&&0<=Yi(Q.prev,Q,Q.next)){N=!1;break t}Q=Q.prevZ}N=!0}}else t:if(N=t,v=N.prev,y=N,C=N.next,0<=Yi(v,y,C))N=!1;else{for(f=N.next.next;f!==N.prev;){if(Ra(v.x,v.y,y.x,y.y,C.x,C.y,f.x,f.y)&&0<=Yi(f.prev,f,f.next)){N=!1;break t}f=f.next}N=!0}if(N)e.push(c.i/i),e.push(t.i/i),e.push(W.i/i),Xi(t),h=t=W.next;else if(t=W,t===h){if(!l)Ts(ws(t),e,i,n,o,s,1);else if(l===1){l=e,h=i,c=t;do W=c.prev,N=c.next.next,!No(W,N)&&ol(W,c,c.next,N)&&cr(W,N)&&cr(N,W)&&(l.push(W.i/h),l.push(c.i/h),l.push(N.i/h),Xi(c),Xi(c.next),c=t=N),c=c.next;while(c!==t);t=c,Ts(t,e,i,n,o,s,2)}else if(l===2)t:{l=t;do{for(h=l.next.next;h!==l.prev;){if(c=l.i!==h.i){if(c=l,W=h,N=c.next.i!==W.i&&c.prev.i!==W.i){e:{N=c;do{if(N.i!==c.i&&N.next.i!==c.i&&N.i!==W.i&&N.next.i!==W.i&&ol(N,N.next,c,W)){N=!0;break e}N=N.next}while(N!==c);N=!1}N=!N}if(N=N&&cr(c,W)&&cr(W,c)){N=c,v=!1,y=(c.x+W.x)/2,W=(c.y+W.y)/2;do N.y>W!=N.next.y>W&&N.next.y!==N.y&&y<(N.next.x-N.x)*(W-N.y)/(N.next.y-N.y)+N.x&&(v=!v),N=N.next;while(N!==c);N=v}c=N}if(c){t=Ks(l,h),l=ws(l,l.next),t=ws(t,t.next),Ts(l,e,i,n,o,s),Ts(t,e,i,n,o,s);break t}h=h.next}l=l.next}while(l!==t)}break}}}}function Ol(t,e){return t.x-e.x}function Il(t,e){var i=e,n=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var l=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(l<=n&&l>s){if(s=l,l===n){if(o===i.y)return i;if(o===i.next.y)return i.next}var h=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!h)return null;if(n===s)return h.prev;e=h,l=h.x;var c=h.y,f=1/0;for(i=h.next;i!==e;){if(n>=i.x&&i.x>=l&&n!==i.x&&Ra(o<c?n:s,o,l,c,o<c?s:n,o,i.x,i.y)){var v=Math.abs(o-i.y)/(n-i.x);(v<f||v===f&&i.x>h.x)&&cr(i,t)&&(h=i,f=v)}i=i.next}return h}function La(t,e,i,n,o){return t=32767*(t-i)*o,e=32767*(e-n)*o,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,(t|t<<1)&1431655765|((e|e<<1)&1431655765)<<1}function nr(t){var e=t,i=t;do e.x<i.x&&(i=e),e=e.next;while(e!==t);return i}function Ra(t,e,i,n,o,s,l,h){return 0<=(o-l)*(e-h)-(t-l)*(s-h)&&0<=(t-l)*(n-h)-(i-l)*(e-h)&&0<=(i-l)*(s-h)-(o-l)*(n-h)}function Yi(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function No(t,e){return t.x===e.x&&t.y===e.y}function ol(t,e,i,n){return No(t,e)&&No(i,n)||No(t,n)&&No(i,e)?!0:0<Yi(t,e,i)!=0<Yi(t,e,n)&&0<Yi(i,n,t)!=0<Yi(i,n,e)}function cr(t,e){return 0>Yi(t.prev,t,t.next)?0<=Yi(t,e,t.next)&&0<=Yi(t,t.prev,e):0>Yi(t,e,t.prev)||0>Yi(t,t.next,e)}function Ks(t,e){var i=new Nr(t.i,t.x,t.y),n=new Nr(e.i,e.x,e.y),o=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=o,o.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function Oa(t,e,i,n){return t=new Nr(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 Xi(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 Nr(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 Ia(t){var e=t.length;2<e&&t[e-1].equals(t[0])&&t.pop()}function Dl(t,e){for(var i=0;i<e.length;i++)t.push(e[i].x),t.push(e[i].y)}function Qr(t,e){j.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new kr(t,e)),this.mergeVertices()}function kr(t,e){function i(c){function f(Xe,ri,Pi){return ri||console.error("THREE.ExtrudeGeometry: vec does not exist"),ri.clone().multiplyScalar(Pi).add(Xe)}function v(Xe,ri,Pi){var Ai=Xe.x-ri.x,ne=Xe.y-ri.y,ii=Pi.x-Xe.x,Ze=Pi.y-Xe.y,li=Ai*Ai+ne*ne;if(Math.abs(Ai*Ze-ne*ii)>Number.EPSILON){var dn=Math.sqrt(li),Tn=Math.sqrt(ii*ii+Ze*Ze);if(li=ri.x-ne/dn,ri=ri.y+Ai/dn,Ze=((Pi.x-Ze/Tn-li)*Ze-(Pi.y+ii/Tn-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 d(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 d(ii/ne,Ai/ne)}function y(Xe,ri){for(Ae=Xe.length;0<=--Ae;){var Pi=Ae,Ai=Ae-1;0>Ai&&(Ai=Xe.length-1);var ne,ii=mt+2*tt;for(ne=0;ne<ii;ne++){var Ze=Gi*ne,li=Gi*(ne+1),dn=ri+Ai+Ze,Tn=ri+Ai+li;li=ri+Pi+li,N(ri+Pi+Ze),N(dn),N(li),N(dn),N(Tn),N(li),Ze=o.length/3,Ze=ee.generateSideWallUV(n,o,Ze-6,Ze-3,Ze-2,Ze-1),W(Ze[0]),W(Ze[1]),W(Ze[3]),W(Ze[1]),W(Ze[2]),W(Ze[3])}}}function M(Xe,ri,Pi){Q.push(Xe),Q.push(ri),Q.push(Pi)}function C(Xe,ri,Pi){N(Xe),N(ri),N(Pi),Xe=o.length/3,Xe=ee.generateTopUV(n,o,Xe-3,Xe-2,Xe-1),W(Xe[0]),W(Xe[1]),W(Xe[2])}function N(Xe){o.push(Q[3*Xe]),o.push(Q[3*Xe+1]),o.push(Q[3*Xe+2])}function W(Xe){s.push(Xe.x),s.push(Xe.y)}var Q=[],_t=e.curveSegments!==void 0?e.curveSegments:12,mt=e.steps!==void 0?e.steps:1,bt=e.depth!==void 0?e.depth:100,xt=e.bevelEnabled!==void 0?e.bevelEnabled:!0,Vt=e.bevelThickness!==void 0?e.bevelThickness:6,V=e.bevelSize!==void 0?e.bevelSize:Vt-2,tt=e.bevelSegments!==void 0?e.bevelSegments:3,Ot=e.extrudePath,ee=e.UVGenerator!==void 0?e.UVGenerator:va;e.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),bt=e.amount);var $t=!1;if(Ot){var qt=Ot.getSpacedPoints(mt);$t=!0,xt=!1;var Te=Ot.computeFrenetFrames(mt,!1),pe=new m,Ie=new m,be=new m}xt||(V=Vt=tt=0);var se;_t=c.extractPoints(_t),c=_t.shape;var We=_t.holes;if(!Xr.isClockWise(c)){c=c.reverse();var Ke=0;for(se=We.length;Ke<se;Ke++){var fi=We[Ke];Xr.isClockWise(fi)&&(We[Ke]=fi.reverse())}}var xn=Xr.triangulateShape(c,We),pn=c;for(Ke=0,se=We.length;Ke<se;Ke++)fi=We[Ke],c=c.concat(fi);var ji,Gi=c.length,tn,wn=xn.length;_t=[];var Ae=0,Qe=pn.length,Ut=Qe-1;for(ji=Ae+1;Ae<Qe;Ae++,Ut++,ji++)Ut===Qe&&(Ut=0),ji===Qe&&(ji=0),_t[Ae]=v(pn[Ae],pn[Ut],pn[ji]);Ot=[];var Ye=_t.concat();for(Ke=0,se=We.length;Ke<se;Ke++){fi=We[Ke];var ei=[];for(Ae=0,Qe=fi.length,Ut=Qe-1,ji=Ae+1;Ae<Qe;Ae++,Ut++,ji++)Ut===Qe&&(Ut=0),ji===Qe&&(ji=0),ei[Ae]=v(fi[Ae],fi[Ut],fi[ji]);Ot.push(ei),Ye=Ye.concat(ei)}for(Ut=0;Ut<tt;Ut++){Qe=Ut/tt;var Hi=Vt*Math.cos(Qe*Math.PI/2);for(ji=V*Math.sin(Qe*Math.PI/2),Ae=0,Qe=pn.length;Ae<Qe;Ae++){var Pe=f(pn[Ae],_t[Ae],ji);M(Pe.x,Pe.y,-Hi)}for(Ke=0,se=We.length;Ke<se;Ke++)for(fi=We[Ke],ei=Ot[Ke],Ae=0,Qe=fi.length;Ae<Qe;Ae++)Pe=f(fi[Ae],ei[Ae],ji),M(Pe.x,Pe.y,-Hi)}for(ji=V,Ae=0;Ae<Gi;Ae++)Pe=xt?f(c[Ae],Ye[Ae],ji):c[Ae],$t?(Ie.copy(Te.normals[0]).multiplyScalar(Pe.x),pe.copy(Te.binormals[0]).multiplyScalar(Pe.y),be.copy(qt[0]).add(Ie).add(pe),M(be.x,be.y,be.z)):M(Pe.x,Pe.y,0);for(Qe=1;Qe<=mt;Qe++)for(Ae=0;Ae<Gi;Ae++)Pe=xt?f(c[Ae],Ye[Ae],ji):c[Ae],$t?(Ie.copy(Te.normals[Qe]).multiplyScalar(Pe.x),pe.copy(Te.binormals[Qe]).multiplyScalar(Pe.y),be.copy(qt[Qe]).add(Ie).add(pe),M(be.x,be.y,be.z)):M(Pe.x,Pe.y,bt/mt*Qe);for(Ut=tt-1;0<=Ut;Ut--){for(Qe=Ut/tt,Hi=Vt*Math.cos(Qe*Math.PI/2),ji=V*Math.sin(Qe*Math.PI/2),Ae=0,Qe=pn.length;Ae<Qe;Ae++)Pe=f(pn[Ae],_t[Ae],ji),M(Pe.x,Pe.y,bt+Hi);for(Ke=0,se=We.length;Ke<se;Ke++)for(fi=We[Ke],ei=Ot[Ke],Ae=0,Qe=fi.length;Ae<Qe;Ae++)Pe=f(fi[Ae],ei[Ae],ji),$t?M(Pe.x,Pe.y+qt[mt-1].y,qt[mt-1].x+Hi):M(Pe.x,Pe.y,bt+Hi)}(function(){var Xe=o.length/3;if(xt){var ri=0*Gi;for(Ae=0;Ae<wn;Ae++)tn=xn[Ae],C(tn[2]+ri,tn[1]+ri,tn[0]+ri);for(ri=Gi*(mt+2*tt),Ae=0;Ae<wn;Ae++)tn=xn[Ae],C(tn[0]+ri,tn[1]+ri,tn[2]+ri)}else{for(Ae=0;Ae<wn;Ae++)tn=xn[Ae],C(tn[2],tn[1],tn[0]);for(Ae=0;Ae<wn;Ae++)tn=xn[Ae],C(tn[0]+Gi*mt,tn[1]+Gi*mt,tn[2]+Gi*mt)}n.addGroup(Xe,o.length/3-Xe,0)})(),function(){var Xe=o.length/3,ri=0;for(y(pn,ri),ri+=pn.length,Ke=0,se=We.length;Ke<se;Ke++)fi=We[Ke],y(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=[],s=[],l=0,h=t.length;l<h;l++)i(t[l]);this.addAttribute("position",new Pt(o,3)),this.addAttribute("uv",new Pt(s,2)),this.computeVertexNormals()}function zl(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 Qs(t,e){j.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new ko(t,e)),this.mergeVertices()}function ko(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 j;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),kr.call(this,t,e),this.type="TextBufferGeometry"}function go(t,e,i,n,o,s,l){j.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:o,thetaStart:s,thetaLength:l},this.fromBufferGeometry(new fr(t,e,i,n,o,s,l)),this.mergeVertices()}function fr(t,e,i,n,o,s,l){Ft.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:o,thetaStart:s,thetaLength:l},t=t||1,e=Math.max(3,Math.floor(e)||8),i=Math.max(2,Math.floor(i)||6),n=n!==void 0?n:0,o=o!==void 0?o:2*Math.PI,s=s!==void 0?s:0,l=l!==void 0?l:Math.PI;var h=s+l,c,f,v=0,y=[],M=new m,C=new m,N=[],W=[],Q=[],_t=[];for(f=0;f<=i;f++){var mt=[],bt=f/i;for(c=0;c<=e;c++){var xt=c/e;M.x=-t*Math.cos(n+xt*o)*Math.sin(s+bt*l),M.y=t*Math.cos(s+bt*l),M.z=t*Math.sin(n+xt*o)*Math.sin(s+bt*l),W.push(M.x,M.y,M.z),C.set(M.x,M.y,M.z).normalize(),Q.push(C.x,C.y,C.z),_t.push(xt,1-bt),mt.push(v++)}y.push(mt)}for(f=0;f<i;f++)for(c=0;c<e;c++)t=y[f][c+1],n=y[f][c],o=y[f+1][c],l=y[f+1][c+1],(f!==0||0<s)&&N.push(t,n,l),(f!==i-1||h<Math.PI)&&N.push(n,o,l);this.setIndex(N),this.addAttribute("position",new Pt(W,3)),this.addAttribute("normal",new Pt(Q,3)),this.addAttribute("uv",new Pt(_t,2))}function ta(t,e,i,n,o,s){j.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new Uo(t,e,i,n,o,s)),this.mergeVertices()}function Uo(t,e,i,n,o,s){Ft.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:o,thetaLength:s},t=t||.5,e=e||1,o=o!==void 0?o:0,s=s!==void 0?s:2*Math.PI,i=i!==void 0?Math.max(3,i):8,n=n!==void 0?Math.max(1,n):1;var l=[],h=[],c=[],f=[],v=t,y=(e-t)/n,M=new m,C=new d,N,W;for(N=0;N<=n;N++){for(W=0;W<=i;W++)t=o+W/i*s,M.x=v*Math.cos(t),M.y=v*Math.sin(t),h.push(M.x,M.y,M.z),c.push(0,0,1),C.x=(M.x/e+1)/2,C.y=(M.y/e+1)/2,f.push(C.x,C.y);v+=y}for(N=0;N<n;N++)for(e=N*(i+1),W=0;W<i;W++)t=W+e,o=t+i+1,s=t+i+2,v=t+1,l.push(t,o,v),l.push(o,s,v);this.setIndex(l),this.addAttribute("position",new Pt(h,3)),this.addAttribute("normal",new Pt(c,3)),this.addAttribute("uv",new Pt(f,2))}function Ms(t,e,i,n){j.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},this.fromBufferGeometry(new vo(t,e,i,n)),this.mergeVertices()}function vo(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=pi.clamp(n,0,2*Math.PI);var o=[],s=[],l=[],h=1/e,c=new m,f=new d,v;for(v=0;v<=e;v++){var y=i+v*h*n,M=Math.sin(y),C=Math.cos(y);for(y=0;y<=t.length-1;y++)c.x=t[y].x*M,c.y=t[y].y,c.z=t[y].x*C,s.push(c.x,c.y,c.z),f.x=v/e,f.y=y/(t.length-1),l.push(f.x,f.y)}for(v=0;v<e;v++)for(y=0;y<t.length-1;y++)i=y+v*t.length,h=i+t.length,c=i+t.length+1,f=i+1,o.push(i,h,f),o.push(h,c,f);if(this.setIndex(o),this.addAttribute("position",new Pt(s,3)),this.addAttribute("uv",new Pt(l,2)),this.computeVertexNormals(),n===2*Math.PI)for(n=this.attributes.normal.array,o=new m,s=new m,l=new m,i=e*t.length*3,y=v=0;v<t.length;v++,y+=3)o.x=n[y+0],o.y=n[y+1],o.z=n[y+2],s.x=n[i+y+0],s.y=n[i+y+1],s.z=n[i+y+2],l.addVectors(o,s).normalize(),n[y+0]=n[i+y+0]=l.x,n[y+1]=n[i+y+1]=l.y,n[y+2]=n[i+y+2]=l.z}function to(t,e){j.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 yo(t,e)),this.mergeVertices()}function yo(t,e){function i(v){var y,M=o.length/3;v=v.extractPoints(e);var C=v.shape,N=v.holes;if(Xr.isClockWise(C)===!1)for(C=C.reverse(),v=0,y=N.length;v<y;v++){var W=N[v];Xr.isClockWise(W)===!0&&(N[v]=W.reverse())}var Q=Xr.triangulateShape(C,N);for(v=0,y=N.length;v<y;v++)W=N[v],C=C.concat(W);for(v=0,y=C.length;v<y;v++)W=C[v],o.push(W.x,W.y,0),s.push(0,0,1),l.push(W.x,W.y);for(v=0,y=Q.length;v<y;v++)C=Q[v],n.push(C[0]+M,C[1]+M,C[2]+M),c+=3}Ft.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],o=[],s=[],l=[],h=0,c=0;if(Array.isArray(t)===!1)i(t);else for(var f=0;f<t.length;f++)i(t[f]),this.addGroup(h,c,f),h+=c,c=0;this.setIndex(n),this.addAttribute("position",new Pt(o,3)),this.addAttribute("normal",new Pt(s,3)),this.addAttribute("uv",new Pt(l,2))}function Bl(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 _o(t,e){Ft.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e};var i=[];e=Math.cos(pi.DEG2RAD*(e!==void 0?e:1));var n=[0,0],o={},s=["a","b","c"];if(t.isBufferGeometry){var l=new j;l.fromBufferGeometry(t)}else l=t.clone();l.mergeVertices(),l.computeFaceNormals(),t=l.vertices,l=l.faces;for(var h=0,c=l.length;h<c;h++)for(var f=l[h],v=0;3>v;v++){var y=f[s[v]],M=f[s[(v+1)%3]];n[0]=Math.min(y,M),n[1]=Math.max(y,M),y=n[0]+","+n[1],o[y]===void 0?o[y]={index1:n[0],index2:n[1],face1:h,face2:void 0}:o[y].face2=h}for(y in o)n=o[y],(n.face2===void 0||l[n.face1].normal.dot(l[n.face2].normal)<=e)&&(s=t[n.index1],i.push(s.x,s.y,s.z),s=t[n.index2],i.push(s.x,s.y,s.z));this.addAttribute("position",new Pt(i,3))}function eo(t,e,i,n,o,s,l,h){j.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:o,openEnded:s,thetaStart:l,thetaLength:h},this.fromBufferGeometry(new io(t,e,i,n,o,s,l,h)),this.mergeVertices()}function io(t,e,i,n,o,s,l,h){function c(mt){var bt,xt=new d,Vt=new m,V=0,tt=mt===!0?t:e,Ot=mt===!0?1:-1,ee=N;for(bt=1;bt<=n;bt++)y.push(0,Q*Ot,0),M.push(0,Ot,0),C.push(.5,.5),N++;var $t=N;for(bt=0;bt<=n;bt++){var qt=bt/n*h+l,Te=Math.cos(qt);qt=Math.sin(qt),Vt.x=tt*qt,Vt.y=Q*Ot,Vt.z=tt*Te,y.push(Vt.x,Vt.y,Vt.z),M.push(0,Ot,0),xt.x=.5*Te+.5,xt.y=.5*qt*Ot+.5,C.push(xt.x,xt.y),N++}for(bt=0;bt<n;bt++)xt=ee+bt,Vt=$t+bt,mt===!0?v.push(Vt,Vt+1,xt):v.push(Vt+1,Vt,xt),V+=3;f.addGroup(_t,V,mt===!0?1:2),_t+=V}Ft.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:o,openEnded:s,thetaStart:l,thetaLength:h};var f=this;t=t!==void 0?t:1,e=e!==void 0?e:1,i=i||1,n=Math.floor(n)||8,o=Math.floor(o)||1,s=s!==void 0?s:!1,l=l!==void 0?l:0,h=h!==void 0?h:2*Math.PI;var v=[],y=[],M=[],C=[],N=0,W=[],Q=i/2,_t=0;(function(){var mt,bt,xt=new m,Vt=new m,V=0,tt=(e-t)/i;for(bt=0;bt<=o;bt++){var Ot=[],ee=bt/o,$t=ee*(e-t)+t;for(mt=0;mt<=n;mt++){var qt=mt/n,Te=qt*h+l,pe=Math.sin(Te);Te=Math.cos(Te),Vt.x=$t*pe,Vt.y=-ee*i+Q,Vt.z=$t*Te,y.push(Vt.x,Vt.y,Vt.z),xt.set(pe,tt,Te).normalize(),M.push(xt.x,xt.y,xt.z),C.push(qt,1-ee),Ot.push(N++)}W.push(Ot)}for(mt=0;mt<n;mt++)for(bt=0;bt<o;bt++)xt=W[bt+1][mt],Vt=W[bt+1][mt+1],tt=W[bt][mt+1],v.push(W[bt][mt],xt,tt),v.push(xt,Vt,tt),V+=6;f.addGroup(_t,V,0),_t+=V})(),s===!1&&(0<t&&c(!0),0<e&&c(!1)),this.setIndex(v),this.addAttribute("position",new Pt(y,3)),this.addAttribute("normal",new Pt(M,3)),this.addAttribute("uv",new Pt(C,2))}function Ss(t,e,i,n,o,s,l){eo.call(this,0,t,e,i,n,o,s,l),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:o,thetaStart:s,thetaLength:l}}function On(t,e,i,n,o,s,l){io.call(this,0,t,e,i,n,o,s,l),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:o,thetaStart:s,thetaLength:l}}function Fo(t,e,i,n){j.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new Ur(t,e,i,n)),this.mergeVertices()}function Ur(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=[],s=[],l=[],h=[],c,f=new m,v=new d;s.push(0,0,0),l.push(0,0,1),h.push(.5,.5);var y=0;for(c=3;y<=e;y++,c+=3){var M=i+y/e*n;f.x=t*Math.cos(M),f.y=t*Math.sin(M),s.push(f.x,f.y,f.z),l.push(0,0,1),v.x=(s[c]/t+1)/2,v.y=(s[c+1]/t+1)/2,h.push(v.x,v.y)}for(c=1;c<=e;c++)o.push(c,c+1,0);this.setIndex(o),this.addAttribute("position",new Pt(s,3)),this.addAttribute("normal",new Pt(l,3)),this.addAttribute("uv",new Pt(h,2))}function xo(t){Zt.call(this),this.type="ShadowMaterial",this.color=new b(0),this.transparent=!0,this.setValues(t)}function Go(t){ti.call(this,t),this.type="RawShaderMaterial"}function Fr(t){Zt.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new b(16777215),this.metalness=this.roughness=.5,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new b(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new d(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 Ho(t){Fr.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoatRoughness=this.clearCoat=0,this.setValues(t)}function Er(t){Zt.call(this),this.type="MeshPhongMaterial",this.color=new b(16777215),this.specular=new b(1118481),this.shininess=30,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new b(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new d(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 Vo(t){Er.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Wo(t){Zt.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new d(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 pr(t){Zt.call(this),this.type="MeshLambertMaterial",this.color=new b(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new b(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 jo(t){if(Zt.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new b(16777215),this.bumpMap=this.map=this.matcap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new d(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 Xo(t){zi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}function Fn(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 ea(t,e,i,n){Fn.call(this,t,e,i,n),this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function dr(t,e,i,n){Fn.call(this,t,e,i,n)}function qo(t,e,i,n){Fn.call(this,t,e,i,n)}function In(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=Nn.convertArray(e,this.TimeBufferType),this.values=Nn.convertArray(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}function Da(t,e,i){In.call(this,t,e,i)}function za(t,e,i,n){In.call(this,t,e,i,n)}function br(t,e,i,n){In.call(this,t,e,i,n)}function qn(t,e,i,n){Fn.call(this,t,e,i,n)}function Es(t,e,i,n){In.call(this,t,e,i,n)}function Ba(t,e,i,n){In.call(this,t,e,i,n)}function bs(t,e,i,n){In.call(this,t,e,i,n)}function rr(t,e,i){this.name=t,this.tracks=i,this.duration=e!==void 0?e:-1,this.uuid=pi.generateUUID(),0>this.duration&&this.resetDuration()}function uh(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return br;case"vector":case"vector2":case"vector3":case"vector4":return bs;case"color":return za;case"quaternion":return Es;case"bool":case"boolean":return Da;case"string":return Ba}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function ch(t){if(t.type===void 0)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=uh(t.type);if(t.times===void 0){var i=[],n=[];Nn.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 wo(t,e,i){var n=this,o=!1,s=0,l=0,h=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(c){l++,o===!1&&n.onStart!==void 0&&n.onStart(c,s,l),o=!0},this.itemEnd=function(c){s++,n.onProgress!==void 0&&n.onProgress(c,s,l),s===l&&(o=!1,n.onLoad!==void 0)&&n.onLoad()},this.itemError=function(c){n.onError!==void 0&&n.onError(c)},this.resolveURL=function(c){return h?h(c):c},this.setURLModifier=function(c){return h=c,this}}function At(t){this.manager=t!==void 0?t:Vn}function Qt(t){this.manager=t!==void 0?t:Vn}function Yt(t){this.manager=t!==void 0?t:Vn,this._parser=null}function Ue(t){this.manager=t!==void 0?t:Vn,this._parser=null}function ai(t){this.manager=t!==void 0?t:Vn}function Bi(t){this.manager=t!==void 0?t:Vn}function ln(t){this.manager=t!==void 0?t:Vn}function Ee(){this.type="Curve",this.arcLengthDivisions=200}function Gn(t,e,i,n,o,s,l,h){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=s||2*Math.PI,this.aClockwise=l||!1,this.aRotation=h||0}function As(t,e,i,n,o,s){Gn.call(this,t,e,i,i,n,o,s),this.type="ArcCurve"}function Yn(){var t=0,e=0,i=0,n=0;return{initCatmullRom:function(o,s,l,h,c){o=c*(l-o),h=c*(h-s),t=s,e=o,i=-3*s+3*l-2*o-h,n=2*s-2*l+o+h},initNonuniformCatmullRom:function(o,s,l,h,c,f,v){o=((s-o)/c-(l-o)/(c+f)+(l-s)/f)*f,h=((l-s)/f-(h-s)/(f+v)+(h-l)/v)*f,t=s,e=o,i=-3*s+3*l-2*o-h,n=2*s-2*l+o+h},calc:function(o){var s=o*o;return t+e*o+i*s+n*s*o}}}function Sn(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 Nl(t,e,i,n,o){e=.5*(n-e),o=.5*(o-i);var s=t*t;return(2*i-2*n+e+o)*t*s+(-3*i+3*n-2*e-o)*s+e*t+i}function Gr(t,e,i,n){var o=1-t;return o*o*e+2*(1-t)*t*i+t*t*n}function To(t,e,i,n,o){var s=1-t,l=1-t;return s*s*s*e+3*l*l*t*i+3*(1-t)*t*t*n+t*t*t*o}function Zn(t,e,i,n){Ee.call(this),this.type="CubicBezierCurve",this.v0=t||new d,this.v1=e||new d,this.v2=i||new d,this.v3=n||new d}function Ti(t,e,i,n){Ee.call(this),this.type="CubicBezierCurve3",this.v0=t||new m,this.v1=e||new m,this.v2=i||new m,this.v3=n||new m}function Jn(t,e){Ee.call(this),this.type="LineCurve",this.v1=t||new d,this.v2=e||new d}function mr(t,e){Ee.call(this),this.type="LineCurve3",this.v1=t||new m,this.v2=e||new m}function $n(t,e,i){Ee.call(this),this.type="QuadraticBezierCurve",this.v0=t||new d,this.v1=e||new d,this.v2=i||new d}function Hr(t,e,i){Ee.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new m,this.v1=e||new m,this.v2=i||new m}function Ar(t){Ee.call(this),this.type="SplineCurve",this.points=t||[]}function no(){Ee.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Kn(t){no.call(this),this.type="Path",this.currentPoint=new d,t&&this.setFromPoints(t)}function Hn(t){Kn.call(this,t),this.uuid=pi.generateUUID(),this.type="Shape",this.holes=[]}function $i(t,e){z.call(this),this.type="Light",this.color=new b(t),this.intensity=e!==void 0?e:1,this.receiveShadow=void 0}function ia(t,e,i){$i.call(this,t,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(z.DefaultUp),this.updateMatrix(),this.groundColor=new b(e)}function Vr(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new d(512,512),this.map=null,this.matrix=new nt}function na(){Vr.call(this,new ye(50,1,.5,500))}function ra(t,e,i,n,o,s){$i.call(this,t,e),this.type="SpotLight",this.position.copy(z.DefaultUp),this.updateMatrix(),this.target=new z,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(l){this.intensity=l/Math.PI}}),this.distance=i!==void 0?i:0,this.angle=n!==void 0?n:Math.PI/3,this.penumbra=o!==void 0?o:0,this.decay=s!==void 0?s:1,this.shadow=new na}function Yo(t,e,i,n){$i.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 Vr(new ye(90,1,.5,500))}function Ps(t,e,i,n,o,s){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=s!==void 0?s:2e3,this.updateProjectionMatrix()}function Mo(){Vr.call(this,new Ps(-5,5,5,-5,.5,500))}function Wr(t,e){$i.call(this,t,e),this.type="DirectionalLight",this.position.copy(z.DefaultUp),this.updateMatrix(),this.target=new z,this.shadow=new Mo}function Zo(t,e){$i.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function Na(t,e,i,n){$i.call(this,t,e),this.type="RectAreaLight",this.width=i!==void 0?i:10,this.height=n!==void 0?n:10}function ka(t){this.manager=t!==void 0?t:Vn,this.textures={}}function sl(t){this.manager=t!==void 0?t:Vn}function ro(){}function Jo(t){typeof t=="boolean"&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=t!==void 0?t:Vn,this.withCredentials=!1}function oa(t){this.manager=t!==void 0?t:Vn,this.resourcePath=""}function al(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:Vn,this.options=void 0}function Ua(){this.type="ShapePath",this.color=new b,this.subPaths=[],this.currentPath=null}function ll(t){this.type="Font",this.data=t}function kl(t){this.manager=t!==void 0?t:Vn}function cn(t){this.manager=t!==void 0?t:Vn}function Dn(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new ye,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new ye,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function sa(t,e,i,n){z.call(this),this.type="CubeCamera";var o=new ye(90,1,t,e);o.up.set(0,-1,0),o.lookAt(new m(1,0,0)),this.add(o);var s=new ye(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new m(-1,0,0)),this.add(s);var l=new ye(90,1,t,e);l.up.set(0,0,1),l.lookAt(new m(0,1,0)),this.add(l);var h=new ye(90,1,t,e);h.up.set(0,0,-1),h.lookAt(new m(0,-1,0)),this.add(h);var c=new ye(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new m(0,0,1)),this.add(c);var f=new ye(90,1,t,e);f.up.set(0,-1,0),f.lookAt(new m(0,0,-1)),this.add(f),n=n||{format:1022,magFilter:1006,minFilter:1006},this.renderTarget=new Z(i,i,n),this.renderTarget.texture.name="CubeCamera",this.update=function(v,y){this.parent===null&&this.updateMatrixWorld();var M=this.renderTarget,C=M.texture.generateMipmaps;M.texture.generateMipmaps=!1,M.activeCubeFace=0,v.render(y,o,M),M.activeCubeFace=1,v.render(y,s,M),M.activeCubeFace=2,v.render(y,l,M),M.activeCubeFace=3,v.render(y,h,M),M.activeCubeFace=4,v.render(y,c,M),M.texture.generateMipmaps=C,M.activeCubeFace=5,v.render(y,f,M),v.setRenderTarget(null)},this.clear=function(v,y,M,C){for(var N=this.renderTarget,W=0;6>W;W++)N.activeCubeFace=W,v.setRenderTarget(N),v.clear(y,M,C);v.setRenderTarget(null)}}function hl(t){this.autoStart=t!==void 0?t:!0,this.elapsedTime=this.oldTime=this.startTime=0,this.running=!1}function Fa(){z.call(this),this.type="AudioListener",this.context=_l.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0}function Cs(t){z.call(this),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.offset=this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function aa(t){Cs.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function $o(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 la(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 Ko(t,e,i){i=i||yn.parseTrackName(e),this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function yn(t,e,i){this.path=e,this.parsedPath=i||yn.parseTrackName(e),this.node=yn.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Ls(){this.uuid=pi.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 ha(t,e,i){this._mixer=t,this._clip=e,this._localRoot=i||null,t=e.tracks,e=t.length,i=Array(e);for(var n={endingStart:2400,endingEnd:2400},o=0;o!==e;++o){var s=t[o].createInterpolant(null);i[o]=s,s.settings=n}this._interpolantSettings=n,this._interpolants=i,this._propertyBindings=Array(e),this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function So(t){this._root=t,this._initMemoryManager(),this.time=this._accuIndex=0,this.timeScale=1}function Ga(t,e){typeof t=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=e),this.value=t}function ul(){Ft.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function cl(t,e,i){Ii.call(this,t,e),this.meshPerAttribute=i||1}function fl(t,e,i,n){typeof i=="number"&&(n=i,i=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),lt.call(this,t,e,i),this.meshPerAttribute=n||1}function Ul(t,e,i,n){this.ray=new ki(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 ua(t,e){return t.distance-e.distance}function Qo(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++)Qo(t[n],e,i,!0)}}function pl(t,e,i){return this.radius=t!==void 0?t:1,this.phi=e!==void 0?e:0,this.theta=i!==void 0?i:0,this}function $(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 Eo(t,e){this.min=t!==void 0?t:new d(1/0,1/0),this.max=e!==void 0?e:new d(-1/0,-1/0)}function Rs(t,e){this.start=t!==void 0?t:new m,this.end=e!==void 0?e:new m}function Bn(t){z.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 Pt(6*e,3),i.addAttribute("position",e),gi.call(this,i,new zi({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Os(t,e){z.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new 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,s=n/32*Math.PI*2;e.push(Math.cos(o),Math.sin(o),1,Math.cos(s),Math.sin(s),1)}t.addAttribute("position",new Pt(e,3)),e=new zi({fog:!1}),this.cone=new gi(t,e),this.add(this.cone),this.update()}function Fl(t){var e=[];t&&t.isBone&&e.push(t);for(var i=0;i<t.children.length;i++)e.push.apply(e,Fl(t.children[i]));return e}function Is(t){for(var e=Fl(t),i=new Ft,n=[],o=[],s=new b(0,0,1),l=new b(0,1,0),h=0;h<e.length;h++){var c=e[h];c.parent&&c.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),o.push(s.r,s.g,s.b),o.push(l.r,l.g,l.b))}i.addAttribute("position",new Pt(n,3)),i.addAttribute("color",new Pt(o,3)),n=new zi({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 gr(t,e,i){this.light=t,this.light.updateMatrixWorld(),this.color=i,t=new fr(e,4,2),e=new Ge({wireframe:!0,fog:!1}),di.call(this,t,e),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Ds(t,e){z.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new zi({fog:!1}),e=new Ft,e.addAttribute("position",new lt(new Float32Array(15),3)),this.line=new Vi(e,t),this.add(this.line),this.update()}function zs(t,e,i){z.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,t=new Do(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 lt(e,3)),this.add(new di(t,this.material)),this.update()}function ca(t,e,i,n){t=t||10,e=e||10,i=new b(i!==void 0?i:4473924),n=new b(n!==void 0?n:8947848);var o=e/2,s=t/e,l=t/2;t=[];for(var h=[],c=0,f=0,v=-l;c<=e;c++,v+=s){t.push(-l,0,v,l,0,v),t.push(v,0,-l,v,0,l);var y=c===o?i:n;y.toArray(h,f),f+=3,y.toArray(h,f),f+=3,y.toArray(h,f),f+=3,y.toArray(h,f),f+=3}e=new Ft,e.addAttribute("position",new Pt(t,3)),e.addAttribute("color",new Pt(h,3)),i=new zi({vertexColors:2}),gi.call(this,e,i)}function Ha(t,e,i,n,o,s){t=t||10,e=e||16,i=i||8,n=n||64,o=new b(o!==void 0?o:4473924),s=new b(s!==void 0?s:8947848);var l=[],h=[],c;for(c=0;c<=e;c++){var f=c/e*2*Math.PI,v=Math.sin(f)*t;f=Math.cos(f)*t,l.push(0,0,0),l.push(v,0,f);var y=c&1?o:s;h.push(y.r,y.g,y.b),h.push(y.r,y.g,y.b)}for(c=0;c<=i;c++){y=c&1?o:s;var M=t-t/i*c;for(e=0;e<n;e++)f=e/n*2*Math.PI,v=Math.sin(f)*M,f=Math.cos(f)*M,l.push(v,0,f),h.push(y.r,y.g,y.b),f=(e+1)/n*2*Math.PI,v=Math.sin(f)*M,f=Math.cos(f)*M,l.push(v,0,f),h.push(y.r,y.g,y.b)}t=new Ft,t.addAttribute("position",new Pt(l,3)),t.addAttribute("color",new Pt(h,3)),l=new zi({vertexColors:2}),gi.call(this,t,l)}function fa(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 Pt(6*e,3),i.addAttribute("position",e),gi.call(this,i,new zi({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Qn(t,e,i){z.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,e===void 0&&(e=1),t=new Ft,t.addAttribute("position",new Pt([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3)),e=new zi({fog:!1}),this.lightPlane=new Vi(t,e),this.add(this.lightPlane),t=new Ft,t.addAttribute("position",new Pt([0,0,0,0,0,1],3)),this.targetLine=new Vi(t,e),this.add(this.targetLine),this.update()}function pa(t){function e(C,N,W){i(C,W),i(N,W)}function i(C,N){s.push(0,0,0),l.push(N.r,N.g,N.b),h[C]===void 0&&(h[C]=[]),h[C].push(s.length/3-1)}var n=new Ft,o=new zi({color:16777215,vertexColors:1}),s=[],l=[],h={},c=new b(16755200),f=new b(16711680),v=new b(43775),y=new b(16777215),M=new b(3355443);e("n1","n2",c),e("n2","n4",c),e("n4","n3",c),e("n3","n1",c),e("f1","f2",c),e("f2","f4",c),e("f4","f3",c),e("f3","f1",c),e("n1","f1",c),e("n2","f2",c),e("n3","f3",c),e("n4","f4",c),e("p","n1",f),e("p","n2",f),e("p","n3",f),e("p","n4",f),e("u1","u2",v),e("u2","u3",v),e("u3","u1",v),e("c","t",y),e("p","c",M),e("cn1","cn2",M),e("cn3","cn4",M),e("cf1","cf2",M),e("cf3","cf4",M),n.addAttribute("position",new Pt(s,3)),n.addAttribute("color",new Pt(l,3)),gi.call(this,n,o),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=h,this.update()}function oo(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 lt(t,1)),n.addAttribute("position",new lt(i,3)),gi.call(this,n,new zi({color:e})),this.matrixAutoUpdate=!1,this.update()}function da(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 lt(e,1)),i.addAttribute("position",new Pt([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 zi({color:t})),this.geometry.computeBoundingSphere()}function ma(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 Pt([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(),Vi.call(this,e,new zi({color:t})),e=new Ft,e.addAttribute("position",new Pt([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),e.computeBoundingSphere(),this.add(new di(e,new Ge({color:t,opacity:.2,transparent:!0,depthWrite:!1})))}function so(t,e,i,n,o,s){z.call(this),t===void 0&&(t=new THREE.Vector3(0,0,1)),e===void 0&&(e=new THREE.Vector3(0,0,0)),i===void 0&&(i=1),n===void 0&&(n=16776960),o===void 0&&(o=.2*i),s===void 0&&(s=.2*o),Ya===void 0&&(Ya=new Ft,Ya.addAttribute("position",new Pt([0,0,0,0,1,0],3)),_a=new io(0,.5,1,5,1),_a.translate(0,-.5,0)),this.position.copy(e),this.line=new Vi(Ya,new zi({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new di(_a,new Ge({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,o,s)}function or(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 Pt(e,3)),t.addAttribute("color",new Pt([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),e=new zi({vertexColors:2}),gi.call(this,t,e)}function Gl(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Sn.call(this,t),this.type="catmullrom",this.closed=!0}function Hl(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Sn.call(this,t),this.type="catmullrom"}function dl(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Sn.call(this,t),this.type="catmullrom"}Number.EPSILON===void 0&&(Number.EPSILON=Math.pow(2,-52)),Number.isInteger===void 0&&(Number.isInteger=function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}),Math.sign===void 0&&(Math.sign=function(t){return 0>t?-1:0<t?1:+t}),!("name"in Function.prototype)&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),Object.assign===void 0&&function(){Object.assign=function(t){if(t==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(n!=null)for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}}(),Object.assign(ht.prototype,{addEventListener:function(t,e){this._listeners===void 0&&(this._listeners={});var i=this._listeners;i[t]===void 0&&(i[t]=[]),i[t].indexOf(e)===-1&&i[t].push(e)},hasEventListener:function(t,e){if(this._listeners===void 0)return!1;var i=this._listeners;return i[t]!==void 0&&i[t].indexOf(e)!==-1},removeEventListener:function(t,e){this._listeners!==void 0&&(t=this._listeners[t],t!==void 0&&(e=t.indexOf(e),e!==-1&&t.splice(e,1)))},dispatchEvent:function(t){if(this._listeners!==void 0){var e=this._listeners[t.type];if(e!==void 0){t.target=this,e=e.slice(0);for(var i=0,n=e.length;i<n;i++)e[i].call(this,t)}}}});var pi={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;256>e;e++)t[e]=(16>e?"0":"")+e.toString(16);return function(){var i=4294967295*Math.random()|0,n=4294967295*Math.random()|0,o=4294967295*Math.random()|0,s=4294967295*Math.random()|0;return(t[i&255]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]+"-"+t[n&255]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[o&63|128]+t[o>>8&255]+"-"+t[o>>16&255]+t[o>>24&255]+t[s&255]+t[s>>8&255]+t[s>>16&255]+t[s>>24&255]).toUpperCase()}}(),clamp:function(t,e,i){return Math.max(e,Math.min(i,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,i,n,o){return n+(t-e)*(o-n)/(i-e)},lerp:function(t,e,i){return(1-i)*t+i*e},smoothstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*(3-2*t))},smootherstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*t*(t*(6*t-15)+10))},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*pi.DEG2RAD},radToDeg:function(t){return t*pi.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(d.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(d.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 d,e=new d;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(nt.prototype,{isMatrix4:!0,set:function(t,e,i,n,o,s,l,h,c,f,v,y,M,C,N,W){var Q=this.elements;return Q[0]=t,Q[4]=e,Q[8]=i,Q[12]=n,Q[1]=o,Q[5]=s,Q[9]=l,Q[13]=h,Q[2]=c,Q[6]=f,Q[10]=v,Q[14]=y,Q[3]=M,Q[7]=C,Q[11]=N,Q[15]=W,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 nt().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 m;return function(e){var i=this.elements,n=e.elements,o=1/t.setFromMatrixColumn(e,0).length(),s=1/t.setFromMatrixColumn(e,1).length();return e=1/t.setFromMatrixColumn(e,2).length(),i[0]=n[0]*o,i[1]=n[1]*o,i[2]=n[2]*o,i[3]=0,i[4]=n[4]*s,i[5]=n[5]*s,i[6]=n[6]*s,i[7]=0,i[8]=n[8]*e,i[9]=n[9]*e,i[10]=n[10]*e,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}}(),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,i=t.x,n=t.y,o=t.z,s=Math.cos(i);i=Math.sin(i);var l=Math.cos(n);n=Math.sin(n);var h=Math.cos(o);if(o=Math.sin(o),t.order==="XYZ"){t=s*h;var c=s*o,f=i*h,v=i*o;e[0]=l*h,e[4]=-l*o,e[8]=n,e[1]=c+f*n,e[5]=t-v*n,e[9]=-i*l,e[2]=v-t*n,e[6]=f+c*n,e[10]=s*l}else t.order==="YXZ"?(t=l*h,c=l*o,f=n*h,v=n*o,e[0]=t+v*i,e[4]=f*i-c,e[8]=s*n,e[1]=s*o,e[5]=s*h,e[9]=-i,e[2]=c*i-f,e[6]=v+t*i,e[10]=s*l):t.order==="ZXY"?(t=l*h,c=l*o,f=n*h,v=n*o,e[0]=t-v*i,e[4]=-s*o,e[8]=f+c*i,e[1]=c+f*i,e[5]=s*h,e[9]=v-t*i,e[2]=-s*n,e[6]=i,e[10]=s*l):t.order==="ZYX"?(t=s*h,c=s*o,f=i*h,v=i*o,e[0]=l*h,e[4]=f*n-c,e[8]=t*n+v,e[1]=l*o,e[5]=v*n+t,e[9]=c*n-f,e[2]=-n,e[6]=i*l,e[10]=s*l):t.order==="YZX"?(t=s*l,c=s*n,f=i*l,v=i*n,e[0]=l*h,e[4]=v-t*o,e[8]=f*o+c,e[1]=o,e[5]=s*h,e[9]=-i*h,e[2]=-n*h,e[6]=c*o+f,e[10]=t-v*o):t.order==="XZY"&&(t=s*l,c=s*n,f=i*l,v=i*n,e[0]=l*h,e[4]=-o,e[8]=n*h,e[1]=t*o+v,e[5]=s*h,e[9]=c*o-f,e[2]=f*o-c,e[6]=i*h,e[10]=v*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 m(0,0,0),e=new m(1,1,1);return function(i){return this.compose(t,i,e)}}(),lookAt:function(){var t=new m,e=new m,i=new m;return function(n,o,s){var l=this.elements;return i.subVectors(n,o),i.lengthSq()===0&&(i.z=1),i.normalize(),t.crossVectors(s,i),t.lengthSq()===0&&(Math.abs(s.z)===1?i.x+=1e-4:i.z+=1e-4,i.normalize(),t.crossVectors(s,i)),t.normalize(),e.crossVectors(i,t),l[0]=t.x,l[4]=e.x,l[8]=i.x,l[1]=t.y,l[5]=e.y,l[9]=i.y,l[2]=t.z,l[6]=e.z,l[10]=i.z,this}}(),multiply:function(t,e){return e!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements;e=this.elements,t=i[0];var o=i[4],s=i[8],l=i[12],h=i[1],c=i[5],f=i[9],v=i[13],y=i[2],M=i[6],C=i[10],N=i[14],W=i[3],Q=i[7],_t=i[11];i=i[15];var mt=n[0],bt=n[4],xt=n[8],Vt=n[12],V=n[1],tt=n[5],Ot=n[9],ee=n[13],$t=n[2],qt=n[6],Te=n[10],pe=n[14],Ie=n[3],be=n[7],se=n[11];return n=n[15],e[0]=t*mt+o*V+s*$t+l*Ie,e[4]=t*bt+o*tt+s*qt+l*be,e[8]=t*xt+o*Ot+s*Te+l*se,e[12]=t*Vt+o*ee+s*pe+l*n,e[1]=h*mt+c*V+f*$t+v*Ie,e[5]=h*bt+c*tt+f*qt+v*be,e[9]=h*xt+c*Ot+f*Te+v*se,e[13]=h*Vt+c*ee+f*pe+v*n,e[2]=y*mt+M*V+C*$t+N*Ie,e[6]=y*bt+M*tt+C*qt+N*be,e[10]=y*xt+M*Ot+C*Te+N*se,e[14]=y*Vt+M*ee+C*pe+N*n,e[3]=W*mt+Q*V+_t*$t+i*Ie,e[7]=W*bt+Q*tt+_t*qt+i*be,e[11]=W*xt+Q*Ot+_t*Te+i*se,e[15]=W*Vt+Q*ee+_t*pe+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 m;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix4(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],i=t[4],n=t[8],o=t[12],s=t[1],l=t[5],h=t[9],c=t[13],f=t[2],v=t[6],y=t[10],M=t[14];return t[3]*(+o*h*v-n*c*v-o*l*y+i*c*y+n*l*M-i*h*M)+t[7]*(+e*h*M-e*c*y+o*s*y-n*s*M+n*c*f-o*h*f)+t[11]*(+e*c*v-e*l*M-o*s*v+i*s*M+o*l*f-i*c*f)+t[15]*(-n*l*f-e*h*v+e*l*y+n*s*v-i*s*y+i*h*f)},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var i=this.elements,n=t.elements;t=n[0];var o=n[1],s=n[2],l=n[3],h=n[4],c=n[5],f=n[6],v=n[7],y=n[8],M=n[9],C=n[10],N=n[11],W=n[12],Q=n[13],_t=n[14];n=n[15];var mt=M*_t*v-Q*C*v+Q*f*N-c*_t*N-M*f*n+c*C*n,bt=W*C*v-y*_t*v-W*f*N+h*_t*N+y*f*n-h*C*n,xt=y*Q*v-W*M*v+W*c*N-h*Q*N-y*c*n+h*M*n,Vt=W*M*f-y*Q*f-W*c*C+h*Q*C+y*c*_t-h*M*_t,V=t*mt+o*bt+s*xt+l*Vt;if(V===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/V,i[0]=mt*e,i[1]=(Q*C*l-M*_t*l-Q*s*N+o*_t*N+M*s*n-o*C*n)*e,i[2]=(c*_t*l-Q*f*l+Q*s*v-o*_t*v-c*s*n+o*f*n)*e,i[3]=(M*f*l-c*C*l-M*s*v+o*C*v+c*s*N-o*f*N)*e,i[4]=bt*e,i[5]=(y*_t*l-W*C*l+W*s*N-t*_t*N-y*s*n+t*C*n)*e,i[6]=(W*f*l-h*_t*l-W*s*v+t*_t*v+h*s*n-t*f*n)*e,i[7]=(h*C*l-y*f*l+y*s*v-t*C*v-h*s*N+t*f*N)*e,i[8]=xt*e,i[9]=(W*M*l-y*Q*l-W*o*N+t*Q*N+y*o*n-t*M*n)*e,i[10]=(h*Q*l-W*c*l+W*o*v-t*Q*v-h*o*n+t*c*n)*e,i[11]=(y*c*l-h*M*l-y*o*v+t*M*v+h*o*N-t*c*N)*e,i[12]=Vt*e,i[13]=(y*Q*s-W*M*s+W*o*C-t*Q*C-y*o*_t+t*M*_t)*e,i[14]=(W*c*s-h*Q*s-W*o*f+t*Q*f+h*o*_t-t*c*_t)*e,i[15]=(h*M*s-y*c*s+y*o*f-t*M*f-h*o*C+t*c*C)*e,this},scale:function(t){var e=this.elements,i=t.x,n=t.y;return t=t.z,e[0]*=i,e[4]*=n,e[8]*=t,e[1]*=i,e[5]*=n,e[9]*=t,e[2]*=i,e[6]*=n,e[10]*=t,e[3]*=i,e[7]*=n,e[11]*=t,this},getMaxScaleOnAxis:function(){var t=this.elements;return Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1]+t[2]*t[2],t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))},makeTranslation:function(t,e,i){return this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(1,0,0,0,0,e,-t,0,0,t,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,0,t,0,0,1,0,0,-t,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,-t,0,0,t,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var i=Math.cos(e);e=Math.sin(e);var n=1-i,o=t.x,s=t.y;t=t.z;var l=n*o,h=n*s;return this.set(l*o+i,l*s-e*t,l*t+e*s,0,l*s+e*t,h*s+i,h*t-e*o,0,l*t-e*s,h*t+e*o,n*t*t+i,0,0,0,0,1),this},makeScale:function(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this},makeShear:function(t,e,i){return this.set(1,e,i,0,t,1,i,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,i){var n=this.elements,o=e._x,s=e._y,l=e._z,h=e._w,c=o+o,f=s+s,v=l+l;e=o*c;var y=o*f;o*=v;var M=s*f;s*=v,l*=v,c*=h,f*=h,h*=v,v=i.x;var C=i.y;return i=i.z,n[0]=(1-(M+l))*v,n[1]=(y+h)*v,n[2]=(o-f)*v,n[3]=0,n[4]=(y-h)*C,n[5]=(1-(e+l))*C,n[6]=(s+c)*C,n[7]=0,n[8]=(o+f)*i,n[9]=(s-c)*i,n[10]=(1-(e+M))*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 m,e=new nt;return function(i,n,o){var s=this.elements,l=t.set(s[0],s[1],s[2]).length(),h=t.set(s[4],s[5],s[6]).length(),c=t.set(s[8],s[9],s[10]).length();0>this.determinant()&&(l=-l),i.x=s[12],i.y=s[13],i.z=s[14],e.copy(this),i=1/l,s=1/h;var f=1/c;return e.elements[0]*=i,e.elements[1]*=i,e.elements[2]*=i,e.elements[4]*=s,e.elements[5]*=s,e.elements[6]*=s,e.elements[8]*=f,e.elements[9]*=f,e.elements[10]*=f,n.setFromRotationMatrix(e),o.x=l,o.y=h,o.z=c,this}}(),makePerspective:function(t,e,i,n,o,s){s===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var l=this.elements;return l[0]=2*o/(e-t),l[4]=0,l[8]=(e+t)/(e-t),l[12]=0,l[1]=0,l[5]=2*o/(i-n),l[9]=(i+n)/(i-n),l[13]=0,l[2]=0,l[6]=0,l[10]=-(s+o)/(s-o),l[14]=-2*s*o/(s-o),l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this},makeOrthographic:function(t,e,i,n,o,s){var l=this.elements,h=1/(e-t),c=1/(i-n),f=1/(s-o);return l[0]=2*h,l[4]=0,l[8]=0,l[12]=-((e+t)*h),l[1]=0,l[5]=2*c,l[9]=0,l[13]=-((i+n)*c),l[2]=0,l[6]=0,l[10]=-2*f,l[14]=-((s+o)*f),l[3]=0,l[7]=0,l[11]=0,l[15]=1,this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;16>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;16>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}),Object.assign(H,{slerp:function(t,e,i,n){return i.copy(t).slerp(e,n)},slerpFlat:function(t,e,i,n,o,s,l){var h=i[n+0],c=i[n+1],f=i[n+2];i=i[n+3],n=o[s+0];var v=o[s+1],y=o[s+2];if(o=o[s+3],i!==o||h!==n||c!==v||f!==y){s=1-l;var M=h*n+c*v+f*y+i*o,C=0<=M?1:-1,N=1-M*M;N>Number.EPSILON&&(N=Math.sqrt(N),M=Math.atan2(N,M*C),s=Math.sin(s*M)/N,l=Math.sin(l*M)/N),C*=l,h=h*s+n*C,c=c*s+v*C,f=f*s+y*C,i=i*s+o*C,s===1-l&&(l=1/Math.sqrt(h*h+c*c+f*f+i*i),h*=l,c*=l,f*=l,i*=l)}t[e]=h,t[e+1]=c,t[e+2]=f,t[e+3]=i}}),Object.defineProperties(H.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(H.prototype,{isQuaternion:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var i=t._x,n=t._y,o=t._z;t=t.order;var s=Math.cos,l=Math.sin,h=s(i/2),c=s(n/2);return s=s(o/2),i=l(i/2),n=l(n/2),o=l(o/2),t==="XYZ"?(this._x=i*c*s+h*n*o,this._y=h*n*s-i*c*o,this._z=h*c*o+i*n*s,this._w=h*c*s-i*n*o):t==="YXZ"?(this._x=i*c*s+h*n*o,this._y=h*n*s-i*c*o,this._z=h*c*o-i*n*s,this._w=h*c*s+i*n*o):t==="ZXY"?(this._x=i*c*s-h*n*o,this._y=h*n*s+i*c*o,this._z=h*c*o+i*n*s,this._w=h*c*s-i*n*o):t==="ZYX"?(this._x=i*c*s-h*n*o,this._y=h*n*s+i*c*o,this._z=h*c*o-i*n*s,this._w=h*c*s+i*n*o):t==="YZX"?(this._x=i*c*s+h*n*o,this._y=h*n*s+i*c*o,this._z=h*c*o-i*n*s,this._w=h*c*s-i*n*o):t==="XZY"&&(this._x=i*c*s-h*n*o,this._y=h*n*s-i*c*o,this._z=h*c*o+i*n*s,this._w=h*c*s+i*n*o),e!==!1&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){e/=2;var i=Math.sin(e);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(e),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e=t.elements,i=e[0];t=e[4];var n=e[8],o=e[1],s=e[5],l=e[9],h=e[2],c=e[6];e=e[10];var f=i+s+e;return 0<f?(i=.5/Math.sqrt(f+1),this._w=.25/i,this._x=(c-l)*i,this._y=(n-h)*i,this._z=(o-t)*i):i>s&&i>e?(i=2*Math.sqrt(1+i-s-e),this._w=(c-l)/i,this._x=.25*i,this._y=(t+o)/i,this._z=(n+h)/i):s>e?(i=2*Math.sqrt(1+s-i-e),this._w=(n-h)/i,this._x=(t+o)/i,this._y=.25*i,this._z=(l+c)/i):(i=2*Math.sqrt(1+e-i-s),this._w=(o-t)/i,this._x=(n+h)/i,this._y=(l+c)/i,this._z=.25*i),this.onChangeCallback(),this},setFromUnitVectors:function(){var t=new m,e;return function(i,n){return t===void 0&&(t=new m),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(pi.clamp(this.dot(t),-1,1)))},rotateTowards:function(t,e){var i=this.angleTo(t);return i===0?this:(this.slerp(t,Math.min(1,e/i)),this)},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return t===0?(this._z=this._y=this._x=0,this._w=1):(t=1/t,this._x*=t,this._y*=t,this._z*=t,this._w*=t),this.onChangeCallback(),this},multiply:function(t,e){return e!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var i=t._x,n=t._y,o=t._z;t=t._w;var s=e._x,l=e._y,h=e._z;return e=e._w,this._x=i*e+t*s+n*h-o*l,this._y=n*e+t*l+o*s-i*h,this._z=o*e+t*h+i*l-n*s,this._w=t*e-i*s-n*l-o*h,this.onChangeCallback(),this},slerp:function(t,e){if(e===0)return this;if(e===1)return this.copy(t);var i=this._x,n=this._y,o=this._z,s=this._w,l=s*t._w+i*t._x+n*t._y+o*t._z;if(0>l?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,l=-l):this.copy(t),1<=l)return this._w=s,this._x=i,this._y=n,this._z=o,this;if(t=1-l*l,t<=Number.EPSILON)return l=1-e,this._w=l*s+e*this._w,this._x=l*i+e*this._x,this._y=l*n+e*this._y,this._z=l*o+e*this._z,this.normalize();t=Math.sqrt(t);var h=Math.atan2(t,l);return l=Math.sin((1-e)*h)/t,e=Math.sin(e*h)/t,this._w=s*l+this._w*e,this._x=i*l+this._x*e,this._y=n*l+this._y*e,this._z=o*l+this._z*e,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return e===void 0&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(m.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 H;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 H;return function(e,i){return this.applyQuaternion(t.setFromAxisAngle(e,i))}}(),applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[3]*i+t[6]*n,this.y=t[1]*e+t[4]*i+t[7]*n,this.z=t[2]*e+t[5]*i+t[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z;t=t.elements;var o=1/(t[3]*e+t[7]*i+t[11]*n+t[15]);return this.x=(t[0]*e+t[4]*i+t[8]*n+t[12])*o,this.y=(t[1]*e+t[5]*i+t[9]*n+t[13])*o,this.z=(t[2]*e+t[6]*i+t[10]*n+t[14])*o,this},applyQuaternion:function(t){var e=this.x,i=this.y,n=this.z,o=t.x,s=t.y,l=t.z;t=t.w;var h=t*e+s*n-l*i,c=t*i+l*e-o*n,f=t*n+o*i-s*e;return e=-o*e-s*i-l*n,this.x=h*t+e*-o+c*-l-f*-s,this.y=c*t+e*-s+f*-o-h*-l,this.z=f*t+e*-l+h*-s-c*-o,this},project:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)},unproject:function(){var t=new nt;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 m,e=new m;return function(i,n){return t.set(i,i,i),e.set(n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},cross:function(t,e){return e!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var i=t.x,n=t.y;t=t.z;var o=e.x,s=e.y;return e=e.z,this.x=n*e-t*s,this.y=t*o-i*e,this.z=i*s-n*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new m;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new m;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(pi.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(P.prototype,{isMatrix3:!0,set:function(t,e,i,n,o,s,l,h,c){var f=this.elements;return f[0]=t,f[1]=n,f[2]=l,f[3]=e,f[4]=o,f[5]=h,f[6]=i,f[7]=s,f[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return new this.constructor().fromArray(this.elements)},copy:function(t){var e=this.elements;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},setFromMatrix4:function(t){return t=t.elements,this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(){var t=new m;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix3(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements;e=this.elements,t=i[0];var o=i[3],s=i[6],l=i[1],h=i[4],c=i[7],f=i[2],v=i[5];i=i[8];var y=n[0],M=n[3],C=n[6],N=n[1],W=n[4],Q=n[7],_t=n[2],mt=n[5];return n=n[8],e[0]=t*y+o*N+s*_t,e[3]=t*M+o*W+s*mt,e[6]=t*C+o*Q+s*n,e[1]=l*y+h*N+c*_t,e[4]=l*M+h*W+c*mt,e[7]=l*C+h*Q+c*n,e[2]=f*y+v*N+i*_t,e[5]=f*M+v*W+i*mt,e[8]=f*C+v*Q+i*n,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],i=t[1],n=t[2],o=t[3],s=t[4],l=t[5],h=t[6],c=t[7];return t=t[8],e*s*t-e*l*c-i*o*t+i*l*h+n*o*c-n*s*h},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var i=t.elements;t=this.elements;var n=i[0],o=i[1],s=i[2],l=i[3],h=i[4],c=i[5],f=i[6],v=i[7];i=i[8];var y=i*h-c*v,M=c*f-i*l,C=v*l-h*f,N=n*y+o*M+s*C;if(N===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/N,t[0]=y*e,t[1]=(s*v-i*o)*e,t[2]=(c*o-s*h)*e,t[3]=M*e,t[4]=(i*n-s*f)*e,t[5]=(s*l-c*n)*e,t[6]=C*e,t[7]=(o*f-v*n)*e,t[8]=(h*n-o*l)*e,this},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},setUvTransform:function(t,e,i,n,o,s,l){var h=Math.cos(o);o=Math.sin(o),this.set(i*h,i*o,-i*(h*s+o*l)+s+t,-n*o,n*h,-n*(-o*s+h*l)+l+e,0,0,1)},scale:function(t,e){var i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=e,i[4]*=e,i[7]*=e,this},rotate:function(t){var e=Math.cos(t);t=Math.sin(t);var i=this.elements,n=i[0],o=i[3],s=i[6],l=i[1],h=i[4],c=i[7];return i[0]=e*n+t*l,i[3]=e*o+t*h,i[6]=e*s+t*c,i[1]=-t*n+e*l,i[4]=-t*o+e*h,i[7]=-t*s+e*c,this},translate:function(t,e){var i=this.elements;return i[0]+=t*i[2],i[3]+=t*i[5],i[6]+=t*i[8],i[1]+=e*i[2],i[4]+=e*i[5],i[7]+=e*i[8],this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;9>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;9>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}});var bo={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")}},ts=0;D.DEFAULT_IMAGE=void 0,D.DEFAULT_MAPPING=300,D.prototype=Object.assign(Object.create(ht.prototype),{constructor:D,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=pi.generateUUID()),!e&&t.images[n.uuid]===void 0){if(Array.isArray(n))for(var o=[],s=0,l=n.length;s<l;s++)o.push(bo.getDataURL(n[s]));else o=bo.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(D.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(A.prototype,{isVector4:!0,set:function(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this},setScalar:function(t){return this.w=this.z=this.y=this.x=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this},add:function(t,e){return e!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return e!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,o=this.w;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n+t[12]*o,this.y=t[1]*e+t[5]*i+t[9]*n+t[13]*o,this.z=t[2]*e+t[6]*i+t[10]*n+t[14]*o,this.w=t[3]*e+t[7]*i+t[11]*n+t[15]*o,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return 1e-4>e?(this.x=1,this.z=this.y=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){t=t.elements;var e=t[0],i=t[4],n=t[8],o=t[1],s=t[5],l=t[9],h=t[2],c=t[6],f=t[10];return .01>Math.abs(i-o)&&.01>Math.abs(n-h)&&.01>Math.abs(l-c)?.1>Math.abs(i+o)&&.1>Math.abs(n+h)&&.1>Math.abs(l+c)&&.1>Math.abs(e+s+f-3)?(this.set(1,0,0,0),this):(t=Math.PI,e=(e+1)/2,s=(s+1)/2,f=(f+1)/2,i=(i+o)/4,n=(n+h)/4,l=(l+c)/4,e>s&&e>f?.01>e?(c=0,i=h=.707106781):(c=Math.sqrt(e),h=i/c,i=n/c):s>f?.01>s?(c=.707106781,h=0,i=.707106781):(h=Math.sqrt(s),c=i/h,i=l/h):.01>f?(h=c=.707106781,i=0):(i=Math.sqrt(f),c=n/i,h=l/i),this.set(c,h,i,t),this):(t=Math.sqrt((c-l)*(c-l)+(n-h)*(n-h)+(o-i)*(o-i)),.001>Math.abs(t)&&(t=1),this.x=(c-l)/t,this.y=(n-h)/t,this.z=(o-i)/t,this.w=Math.acos((e+s+f-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 A,e=new A),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}}),F.prototype=Object.assign(Object.create(ht.prototype),{constructor:F,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"})}}),Z.prototype=Object.create(F.prototype),Z.prototype.constructor=Z,Z.prototype.isWebGLRenderTargetCube=!0,G.prototype=Object.create(D.prototype),G.prototype.constructor=G,G.prototype.isDataTexture=!0,Object.assign(J.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,i=1/0,n=1/0,o=-1/0,s=-1/0,l=-1/0,h=0,c=t.length;h<c;h+=3){var f=t[h],v=t[h+1],y=t[h+2];f<e&&(e=f),v<i&&(i=v),y<n&&(n=y),f>o&&(o=f),v>s&&(s=v),y>l&&(l=y)}return this.min.set(e,i,n),this.max.set(o,s,l),this},setFromBufferAttribute:function(t){for(var e=1/0,i=1/0,n=1/0,o=-1/0,s=-1/0,l=-1/0,h=0,c=t.count;h<c;h++){var f=t.getX(h),v=t.getY(h),y=t.getZ(h);f<e&&(e=f),v<i&&(i=v),y<n&&(n=y),f>o&&(o=f),v>s&&(s=v),y>l&&(l=y)}return this.min.set(e,i,n),this.max.set(o,s,l),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new m;return function(e,i){return i=t.copy(i).multiplyScalar(.5),this.min.copy(e).sub(i),this.max.copy(e).add(i),this}}(),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 m),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 m),this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},expandByObject:function(){function t(s){var l=s.geometry;if(l!==void 0){if(l.isGeometry)for(l=l.vertices,i=0,n=l.length;i<n;i++)o.copy(l[i]),o.applyMatrix4(s.matrixWorld),e.expandByPoint(o);else if(l.isBufferGeometry&&(l=l.attributes.position,l!==void 0))for(i=0,n=l.count;i<n;i++)o.fromBufferAttribute(l,i).applyMatrix4(s.matrixWorld),e.expandByPoint(o)}}var e,i,n,o=new m;return function(s){return e=this,s.updateMatrixWorld(!0),s.traverse(t),this}}(),containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new m),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(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 m;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(y){var M,C=0;for(M=y.length-3;C<=M;C+=3){h.fromArray(y,C);var N=f.x*Math.abs(h.x)+f.y*Math.abs(h.y)+f.z*Math.abs(h.z),W=e.dot(h),Q=i.dot(h),_t=n.dot(h);if(Math.max(-Math.max(W,Q,_t),Math.min(W,Q,_t))>N)return!1}return!0}var e=new m,i=new m,n=new m,o=new m,s=new m,l=new m,h=new m,c=new m,f=new m,v=new m;return function(y){return this.isEmpty()||(this.getCenter(c),f.subVectors(this.max,c),e.subVectors(y.a,c),i.subVectors(y.b,c),n.subVectors(y.c,c),o.subVectors(i,e),s.subVectors(n,i),l.subVectors(e,n),y=[0,-o.z,o.y,0,-s.z,s.y,0,-l.z,l.y,o.z,0,-o.x,s.z,0,-s.x,l.z,0,-l.x,-o.y,o.x,0,-s.y,s.x,0,-l.y,l.x,0],!t(y))||(y=[1,0,0,0,1,0,0,0,1],!t(y))?!1:(v.crossVectors(o,s),y=[v.x,v.y,v.z],t(y))}}(),clampPoint:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new m),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new m;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new m;return function(e){return e===void 0&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new B),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 m,new m,new m,new m,new m,new m,new m,new m];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(B.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new J;return function(e,i){var n=this.center;i!==void 0?n.copy(i):t.setFromPoints(e).getCenter(n);for(var o=i=0,s=e.length;o<s;o++)i=Math.max(i,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(i),this}}(),clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return 0>=this.radius},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var i=this.center.distanceToSquared(t);return e===void 0&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new m),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 J),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(q.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 m,e=new m;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 m),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new m;return function(e,i){i===void 0&&(console.warn("THREE.Plane: .intersectLine() target is now required"),i=new m);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 m),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new m,e=new P;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,s){var l=this.planes;return l[0].copy(t),l[1].copy(e),l[2].copy(i),l[3].copy(n),l[4].copy(o),l[5].copy(s),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){for(var e=this.planes,i=0;6>i;i++)e[i].copy(t.planes[i]);return this},setFromMatrix:function(t){var e=this.planes,i=t.elements;t=i[0];var n=i[1],o=i[2],s=i[3],l=i[4],h=i[5],c=i[6],f=i[7],v=i[8],y=i[9],M=i[10],C=i[11],N=i[12],W=i[13],Q=i[14];return i=i[15],e[0].setComponents(s-t,f-l,C-v,i-N).normalize(),e[1].setComponents(s+t,f+l,C+v,i+N).normalize(),e[2].setComponents(s+n,f+h,C+y,i+W).normalize(),e[3].setComponents(s-n,f-h,C-y,i-W).normalize(),e[4].setComponents(s-o,f-c,C-M,i-Q).normalize(),e[5].setComponents(s+o,f+c,C+M,i+Q).normalize(),this},intersectsObject:function(){var t=new B;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 B;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 m;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 bi={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,33 +2567,80 @@ void main() {
|
|
|
2567
2567
|
#include <clipping_planes_vertex>
|
|
2568
2568
|
#include <fog_vertex>
|
|
2569
2569
|
}
|
|
2570
|
-
`},_n={merge:function(t){for(var e={},i=0;i<t.length;i++){var n=this.clone(t[i]),o;for(o in n)e[o]=n[o]}return e},clone:function(t){var e={},i;for(i in t){e[i]={};for(var n in t[i]){var o=t[i][n];o&&(o.isColor||o.isMatrix3||o.isMatrix4||o.isVector2||o.isVector3||o.isVector4||o.isTexture)?e[i][n]=o.clone():Array.isArray(o)?e[i][n]=o.slice():e[i][n]=o}}return e}},Sr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object.assign(Y.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this},setScalar:function(t){return this.b=this.g=this.r=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this},setRGB:function(t,e,i){return this.r=t,this.g=e,this.b=i,this},setHSL:function(){function t(e,i,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?e+6*(i-e)*n:.5>n?i:n<2/3?e+6*(i-e)*(2/3-n):e}return function(e,i,n){return e=$e.euclideanModulo(e,1),i=$e.clamp(i,0,1),n=$e.clamp(n,0,1),i===0?this.r=this.g=this.b=n:(i=.5>=n?n*(1+i):n+i-n*i,n=2*n-i,this.r=t(n,i,e+1/3),this.g=t(n,i,e),this.b=t(n,i,e-1/3)),this}}(),setStyle:function(t){function e(l){l!==void 0&&1>parseFloat(l)&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n=i[2];switch(i[1]){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n)){n=parseFloat(i[1])/360;var o=parseInt(i[2],10)/100,s=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(n,o,s)}}}else if(i=/^#([A-Fa-f0-9]+)$/.exec(t)){if(i=i[1],n=i.length,n===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(n===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return t&&0<t.length&&(i=Sr[t],i!==void 0?this.setHex(i):console.warn("THREE.Color: Unknown color "+t)),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return e===void 0&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){return e===void 0&&(e=2),e=0<e?1/e:1,this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},copySRGBToLinear:function(){function t(e){return .04045>e?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),copyLinearToSRGB:function(){function t(e){return .0031308>e?12.92*e:1.055*Math.pow(e,.41666)-.055}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){t===void 0&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e=this.r,i=this.g,n=this.b,o=Math.max(e,i,n),s=Math.min(e,i,n),l,h=(s+o)/2;if(s===o)s=l=0;else{var c=o-s;switch(s=.5>=h?c/(o+s):c/(2-o-s),o){case e:l=(i-n)/c+(i<n?6:0);break;case i:l=(n-e)/c+2;break;case n:l=(e-i)/c+4}l/=6}return t.h=l,t.s=s,t.l=h,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var t={};return function(e,i,n){return this.getHSL(t),t.h+=e,t.s+=i,t.l+=n,this.setHSL(t.h,t.s,t.l),this}}(),add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},lerpHSL:function(){var t={h:0,s:0,l:0},e={h:0,s:0,l:0};return function(i,n){this.getHSL(t),i.getHSL(e),i=$e.lerp(t.h,e.h,n);var o=$e.lerp(t.s,e.s,n);return n=$e.lerp(t.l,e.l,n),this.setHSL(i,o,n),this}}(),equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return e===void 0&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var Re={common:{diffuse:{value:new Y(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Mt},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new _(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 Y(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 Y(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Mt}},sprite:{diffuse:{value:new Y(15658734)},opacity:{value:1},center:{value:new _(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new Mt}}},kr={basic:{uniforms:_n.merge([Re.common,Re.specularmap,Re.envmap,Re.aomap,Re.lightmap,Re.fog]),vertexShader:hi.meshbasic_vert,fragmentShader:hi.meshbasic_frag},lambert:{uniforms:_n.merge([Re.common,Re.specularmap,Re.envmap,Re.aomap,Re.lightmap,Re.emissivemap,Re.fog,Re.lights,{emissive:{value:new Y(0)}}]),vertexShader:hi.meshlambert_vert,fragmentShader:hi.meshlambert_frag},phong:{uniforms:_n.merge([Re.common,Re.specularmap,Re.envmap,Re.aomap,Re.lightmap,Re.emissivemap,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.gradientmap,Re.fog,Re.lights,{emissive:{value:new Y(0)},specular:{value:new Y(1118481)},shininess:{value:30}}]),vertexShader:hi.meshphong_vert,fragmentShader:hi.meshphong_frag},standard:{uniforms:_n.merge([Re.common,Re.envmap,Re.aomap,Re.lightmap,Re.emissivemap,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.roughnessmap,Re.metalnessmap,Re.fog,Re.lights,{emissive:{value:new Y(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:hi.meshphysical_vert,fragmentShader:hi.meshphysical_frag},matcap:{uniforms:_n.merge([Re.common,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.fog,{matcap:{value:null}}]),vertexShader:hi.meshmatcap_vert,fragmentShader:hi.meshmatcap_frag},points:{uniforms:_n.merge([Re.points,Re.fog]),vertexShader:hi.points_vert,fragmentShader:hi.points_frag},dashed:{uniforms:_n.merge([Re.common,Re.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:hi.linedashed_vert,fragmentShader:hi.linedashed_frag},depth:{uniforms:_n.merge([Re.common,Re.displacementmap]),vertexShader:hi.depth_vert,fragmentShader:hi.depth_frag},normal:{uniforms:_n.merge([Re.common,Re.bumpmap,Re.normalmap,Re.displacementmap,{opacity:{value:1}}]),vertexShader:hi.normal_vert,fragmentShader:hi.normal_frag},sprite:{uniforms:_n.merge([Re.sprite,Re.fog]),vertexShader:hi.sprite_vert,fragmentShader:hi.sprite_frag},background:{uniforms:{uvTransform:{value:new Mt},t2D:{value:null}},vertexShader:hi.background_vert,fragmentShader:hi.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:hi.cube_vert,fragmentShader:hi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:hi.equirect_vert,fragmentShader:hi.equirect_frag},distanceRGBA:{uniforms:_n.merge([Re.common,Re.displacementmap,{referencePosition:{value:new S},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:hi.distanceRGBA_vert,fragmentShader:hi.distanceRGBA_frag},shadow:{uniforms:_n.merge([Re.lights,Re.fog,{color:{value:new Y(0)},opacity:{value:1}}]),vertexShader:hi.shadow_vert,fragmentShader:hi.shadow_frag}};kr.physical={uniforms:_n.merge([kr.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:hi.meshphysical_vert,fragmentShader:hi.meshphysical_frag},Object.assign(B.prototype,{clone:function(){return new this.constructor().copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,i=t.vertexNormals.length;e<i;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,i=t.vertexColors.length;e<i;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}}),E.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),E.DefaultOrder="XYZ",Object.defineProperties(E.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(E.prototype,{isEuler:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._order=n||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,i){var n=$e.clamp,o=t.elements;t=o[0];var s=o[4],l=o[8],h=o[1],c=o[5],p=o[9],f=o[2],d=o[6];return o=o[10],e=e||this._order,e==="XYZ"?(this._y=Math.asin(n(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(-p,o),this._z=Math.atan2(-s,t)):(this._x=Math.atan2(d,c),this._z=0)):e==="YXZ"?(this._x=Math.asin(-n(p,-1,1)),.99999>Math.abs(p)?(this._y=Math.atan2(l,o),this._z=Math.atan2(h,c)):(this._y=Math.atan2(-f,t),this._z=0)):e==="ZXY"?(this._x=Math.asin(n(d,-1,1)),.99999>Math.abs(d)?(this._y=Math.atan2(-f,o),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(h,t))):e==="ZYX"?(this._y=Math.asin(-n(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(d,o),this._z=Math.atan2(h,t)):(this._x=0,this._z=Math.atan2(-s,c))):e==="YZX"?(this._z=Math.asin(n(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(-p,c),this._y=Math.atan2(-f,t)):(this._x=0,this._y=Math.atan2(l,o))):e==="XZY"?(this._z=Math.asin(-n(s,-1,1)),.99999>Math.abs(s)?(this._x=Math.atan2(d,c),this._y=Math.atan2(l,t)):(this._x=Math.atan2(-p,o),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,i!==!1&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new pt;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 gt;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new S(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(Z.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask=this.mask|1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return(this.mask&t.mask)!==0}});var hh=0;z.DefaultUp=new S(0,1,0),z.DefaultMatrixAutoUpdate=!0,z.prototype=Object.assign(Object.create($.prototype),{constructor:z,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new gt;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new gt;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new S(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new S(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new S(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new S;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new S(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new S(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new S(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new pt;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new gt,e=new pt,i=new S,n=new S;return function(o,s,l){o.isVector3?i.copy(o):i.set(o,s,l),o=this.parent,this.updateWorldMatrix(!0,!1),n.setFromMatrixPosition(this.matrixWorld),this.isCamera?e.lookAt(n,i,this.up):e.lookAt(i,n,this.up),this.quaternion.setFromRotationMatrix(e),o&&(e.extractRotation(o.matrixWorld),t.setFromRotationMatrix(e),this.quaternion.premultiply(t.inverse()))}}(),add:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.parent!==null&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}return e=this.children.indexOf(t),e!==-1&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(e,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var i=0,n=this.children.length;i<n;i++){var o=this.children[i].getObjectByProperty(t,e);if(o!==void 0)return o}},getWorldPosition:function(t){return t===void 0&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new S),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new S,e=new S;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),i=new gt),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,e),i}}(),getWorldScale:function(){var t=new S,e=new gt;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),i=new S),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,i),i}}(),getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),t=new S),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()},raycast:function(){},traverse:function(t){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverse(t)},traverseVisible:function(t){if(this.visible!==!1){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].updateMatrixWorld(t)},updateWorldMatrix:function(t,e){var i=this.parent;if(t===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),e===!0)for(t=this.children,e=0,i=t.length;e<i;e++)t[e].updateWorldMatrix(!1,!0)},toJSON:function(t){function e(f,d){return f[d.uuid]===void 0&&(f[d.uuid]=d.toJSON(t)),d.uuid}function i(f){var d=[],v;for(v in f){var w=f[v];delete w.metadata,d.push(w)}return d}var n=t===void 0||typeof t=="string",o={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},o.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var s={};if(s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.castShadow===!0&&(s.castShadow=!0),this.receiveShadow===!0&&(s.receiveShadow=!0),this.visible===!1&&(s.visible=!1),this.frustumCulled===!1&&(s.frustumCulled=!1),this.renderOrder!==0&&(s.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isMesh||this.isLine||this.isPoints){s.geometry=e(t.geometries,this.geometry);var l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0)if(l=l.shapes,Array.isArray(l))for(var h=0,c=l.length;h<c;h++)e(t.shapes,l[h]);else e(t.shapes,l)}if(this.material!==void 0)if(Array.isArray(this.material)){for(l=[],h=0,c=this.material.length;h<c;h++)l.push(e(t.materials,this.material[h]));s.material=l}else s.material=e(t.materials,this.material);if(0<this.children.length)for(s.children=[],h=0;h<this.children.length;h++)s.children.push(this.children[h].toJSON(t).object);if(n){n=i(t.geometries),h=i(t.materials),c=i(t.textures);var p=i(t.images);l=i(t.shapes),0<n.length&&(o.geometries=n),0<h.length&&(o.materials=h),0<c.length&&(o.textures=c),0<p.length&&(o.images=p),0<l.length&&(o.shapes=l)}return o.object=s,o},clone:function(t){return new this.constructor().copy(this,t)},copy:function(t,e){if(e===void 0&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(e=0;e<t.children.length;e++)this.add(t.children[e].clone());return this}});var uh=0;X.prototype=Object.assign(Object.create($.prototype),{constructor:X,isGeometry:!0,applyMatrix:function(t){for(var e=new Mt().getNormalMatrix(t),i=0,n=this.vertices.length;i<n;i++)this.vertices[i].applyMatrix4(t);for(i=0,n=this.faces.length;i<n;i++){t=this.faces[i],t.normal.applyMatrix3(e).normalize();for(var o=0,s=t.vertexNormals.length;o<s;o++)t.vertexNormals[o].applyMatrix3(e).normalize()}return this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this.normalsNeedUpdate=this.verticesNeedUpdate=!0,this},rotateX:function(){var t=new pt;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new pt;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new pt;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new pt;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new pt;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new z;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(P,R,I,Q){var W=h===void 0?[]:[i.colors[P].clone(),i.colors[R].clone(),i.colors[I].clone()],st=l===void 0?[]:[new S().fromArray(l,3*P),new S().fromArray(l,3*R),new S().fromArray(l,3*I)];Q=new B(P,R,I,st,W,Q),i.faces.push(Q),c!==void 0&&i.faceVertexUvs[0].push([new _().fromArray(c,2*P),new _().fromArray(c,2*R),new _().fromArray(c,2*I)]),p!==void 0&&i.faceVertexUvs[1].push([new _().fromArray(p,2*P),new _().fromArray(p,2*R),new _().fromArray(p,2*I)])}var i=this,n=t.index!==null?t.index.array:void 0,o=t.attributes,s=o.position.array,l=o.normal!==void 0?o.normal.array:void 0,h=o.color!==void 0?o.color.array:void 0,c=o.uv!==void 0?o.uv.array:void 0,p=o.uv2!==void 0?o.uv2.array:void 0;p!==void 0&&(this.faceVertexUvs[1]=[]);for(var f=o=0;o<s.length;o+=3,f+=2)i.vertices.push(new S().fromArray(s,o)),h!==void 0&&i.colors.push(new Y().fromArray(h,o));var d=t.groups;if(0<d.length)for(o=0;o<d.length;o++){s=d[o];var v=s.start,w=s.count;for(f=v,v+=w;f<v;f+=3)n!==void 0?e(n[f],n[f+1],n[f+2],s.materialIndex):e(f,f+1,f+2,s.materialIndex)}else if(n!==void 0)for(o=0;o<n.length;o+=3)e(n[o],n[o+1],n[o+2]);else for(o=0;o<s.length/3;o+=3)e(o,o+1,o+2);return this.computeFaceNormals(),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){var t=new S;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius;e=e===0?1:1/e;var i=new pt;return i.set(e,0,0,-e*t.x,0,e,0,-e*t.y,0,0,e,-e*t.z,0,0,0,1),this.applyMatrix(i),this},computeFaceNormals:function(){for(var t=new S,e=new S,i=0,n=this.faces.length;i<n;i++){var o=this.faces[i],s=this.vertices[o.a],l=this.vertices[o.b];t.subVectors(this.vertices[o.c],l),e.subVectors(s,l),t.cross(e),t.normalize(),o.normal.copy(t)}},computeVertexNormals:function(t){t===void 0&&(t=!0);var e,i=Array(this.vertices.length),n=0;for(e=this.vertices.length;n<e;n++)i[n]=new S;if(t){var o=new S,s=new S;for(t=0,n=this.faces.length;t<n;t++){e=this.faces[t];var l=this.vertices[e.a],h=this.vertices[e.b],c=this.vertices[e.c];o.subVectors(c,h),s.subVectors(l,h),o.cross(s),i[e.a].add(o),i[e.b].add(o),i[e.c].add(o)}}else for(this.computeFaceNormals(),t=0,n=this.faces.length;t<n;t++)e=this.faces[t],i[e.a].add(e.normal),i[e.b].add(e.normal),i[e.c].add(e.normal);for(n=0,e=this.vertices.length;n<e;n++)i[n].normalize();for(t=0,n=this.faces.length;t<n;t++)e=this.faces[t],l=e.vertexNormals,l.length===3?(l[0].copy(i[e.a]),l[1].copy(i[e.b]),l[2].copy(i[e.c])):(l[0]=i[e.a].clone(),l[1]=i[e.b].clone(),l[2]=i[e.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t;this.computeFaceNormals();var e=0;for(t=this.faces.length;e<t;e++){var i=this.faces[e],n=i.vertexNormals;n.length===3?(n[0].copy(i.normal),n[1].copy(i.normal),n[2].copy(i.normal)):(n[0]=i.normal.clone(),n[1]=i.normal.clone(),n[2]=i.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,i=0;for(e=this.faces.length;i<e;i++){var n=this.faces[i];n.__originalFaceNormal?n.__originalFaceNormal.copy(n.normal):n.__originalFaceNormal=n.normal.clone(),n.__originalVertexNormals||(n.__originalVertexNormals=[]);var o=0;for(t=n.vertexNormals.length;o<t;o++)n.__originalVertexNormals[o]?n.__originalVertexNormals[o].copy(n.vertexNormals[o]):n.__originalVertexNormals[o]=n.vertexNormals[o].clone()}var s=new X;for(s.faces=this.faces,o=0,t=this.morphTargets.length;o<t;o++){if(!this.morphNormals[o]){this.morphNormals[o]={},this.morphNormals[o].faceNormals=[],this.morphNormals[o].vertexNormals=[],n=this.morphNormals[o].faceNormals;var l=this.morphNormals[o].vertexNormals;for(i=0,e=this.faces.length;i<e;i++){var h=new S,c={a:new S,b:new S,c:new S};n.push(h),l.push(c)}}for(l=this.morphNormals[o],s.vertices=this.morphTargets[o].vertices,s.computeFaceNormals(),s.computeVertexNormals(),i=0,e=this.faces.length;i<e;i++)n=this.faces[i],h=l.faceNormals[i],c=l.vertexNormals[i],h.copy(n.normal),c.a.copy(n.vertexNormals[0]),c.b.copy(n.vertexNormals[1]),c.c.copy(n.vertexNormals[2])}for(i=0,e=this.faces.length;i<e;i++)n=this.faces[i],n.normal=n.__originalFaceNormal,n.vertexNormals=n.__originalVertexNormals},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new Nt),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new Ut),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,o=this.vertices.length,s=this.vertices,l=t.vertices,h=this.faces,c=t.faces,p=this.faceVertexUvs[0],f=t.faceVertexUvs[0],d=this.colors,v=t.colors;i===void 0&&(i=0),e!==void 0&&(n=new Mt().getNormalMatrix(e)),t=0;for(var w=l.length;t<w;t++){var P=l[t].clone();e!==void 0&&P.applyMatrix4(e),s.push(P)}for(t=0,w=v.length;t<w;t++)d.push(v[t].clone());for(t=0,w=c.length;t<w;t++){l=c[t];var R=l.vertexNormals;for(v=l.vertexColors,d=new B(l.a+o,l.b+o,l.c+o),d.normal.copy(l.normal),n!==void 0&&d.normal.applyMatrix3(n).normalize(),e=0,s=R.length;e<s;e++)P=R[e].clone(),n!==void 0&&P.applyMatrix3(n).normalize(),d.vertexNormals.push(P);for(d.color.copy(l.color),e=0,s=v.length;e<s;e++)P=v[e],d.vertexColors.push(P.clone());d.materialIndex=l.materialIndex+i,h.push(d)}for(t=0,w=f.length;t<w;t++)if(i=f[t],n=[],i!==void 0){for(e=0,s=i.length;e<s;e++)n.push(i[e].clone());p.push(n)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t={},e=[],i=[],n=Math.pow(10,4),o,s=0;for(o=this.vertices.length;s<o;s++){var l=this.vertices[s];l=Math.round(l.x*n)+"_"+Math.round(l.y*n)+"_"+Math.round(l.z*n),t[l]===void 0?(t[l]=s,e.push(this.vertices[s]),i[s]=e.length-1):i[s]=i[t[l]]}for(t=[],s=0,o=this.faces.length;s<o;s++)for(n=this.faces[s],n.a=i[n.a],n.b=i[n.b],n.c=i[n.c],n=[n.a,n.b,n.c],l=0;3>l;l++)if(n[l]===n[(l+1)%3]){t.push(s);break}for(s=t.length-1;0<=s;s--)for(n=t[s],this.faces.splice(n,1),i=0,o=this.faceVertexUvs.length;i<o;i++)this.faceVertexUvs[i].splice(n,1);return s=this.vertices.length-e.length,this.vertices=e,s},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new S(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,i=0;i<e;i++)t[i]._id=i;t.sort(function(c,p){return c.materialIndex-p.materialIndex});var n=this.faceVertexUvs[0],o=this.faceVertexUvs[1],s,l;for(n&&n.length===e&&(s=[]),o&&o.length===e&&(l=[]),i=0;i<e;i++){var h=t[i]._id;s&&s.push(n[h]),l&&l.push(o[h])}s&&(this.faceVertexUvs[0]=s),l&&(this.faceVertexUvs[1]=l)},toJSON:function(){function t(wt,C,D){return D?wt|1<<C:wt&~(1<<C)}function e(wt){var C=wt.x.toString()+wt.y.toString()+wt.z.toString();return p[C]!==void 0||(p[C]=c.length/3,c.push(wt.x,wt.y,wt.z)),p[C]}function i(wt){var C=wt.r.toString()+wt.g.toString()+wt.b.toString();return d[C]!==void 0||(d[C]=f.length,f.push(wt.getHex())),d[C]}function n(wt){var C=wt.x.toString()+wt.y.toString();return w[C]!==void 0||(w[C]=v.length/2,v.push(wt.x,wt.y)),w[C]}var o={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.parameters!==void 0){var s=this.parameters,l;for(l in s)s[l]!==void 0&&(o[l]=s[l]);return o}for(s=[],l=0;l<this.vertices.length;l++){var h=this.vertices[l];s.push(h.x,h.y,h.z)}h=[];var c=[],p={},f=[],d={},v=[],w={};for(l=0;l<this.faces.length;l++){var P=this.faces[l],R=this.faceVertexUvs[0][l]!==void 0,I=0<P.normal.length(),Q=0<P.vertexNormals.length,W=P.color.r!==1||P.color.g!==1||P.color.b!==1,st=0<P.vertexColors.length,K=0;K=t(K,0,0),K=t(K,1,!0),K=t(K,2,!1),K=t(K,3,R),K=t(K,4,I),K=t(K,5,Q),K=t(K,6,W),K=t(K,7,st),h.push(K),h.push(P.a,P.b,P.c),h.push(P.materialIndex),R&&(R=this.faceVertexUvs[0][l],h.push(n(R[0]),n(R[1]),n(R[2]))),I&&h.push(e(P.normal)),Q&&(I=P.vertexNormals,h.push(e(I[0]),e(I[1]),e(I[2]))),W&&h.push(i(P.color)),st&&(P=P.vertexColors,h.push(i(P[0]),i(P[1]),i(P[2])))}return o.data={},o.data.vertices=s,o.data.normals=c,0<f.length&&(o.data.colors=f),0<v.length&&(o.data.uvs=[v]),o.data.faces=h,o},clone:function(){return new X().copy(this)},copy:function(t){var e,i,n;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var o=t.vertices,s=0;for(e=o.length;s<e;s++)this.vertices.push(o[s].clone());for(o=t.colors,s=0,e=o.length;s<e;s++)this.colors.push(o[s].clone());for(o=t.faces,s=0,e=o.length;s<e;s++)this.faces.push(o[s].clone());for(s=0,e=t.faceVertexUvs.length;s<e;s++){var l=t.faceVertexUvs[s];for(this.faceVertexUvs[s]===void 0&&(this.faceVertexUvs[s]=[]),o=0,i=l.length;o<i;o++){var h=l[o],c=[],p=0;for(n=h.length;p<n;p++)c.push(h[p].clone());this.faceVertexUvs[s].push(c)}}for(p=t.morphTargets,s=0,e=p.length;s<e;s++){if(n={},n.name=p[s].name,p[s].vertices!==void 0)for(n.vertices=[],o=0,i=p[s].vertices.length;o<i;o++)n.vertices.push(p[s].vertices[o].clone());if(p[s].normals!==void 0)for(n.normals=[],o=0,i=p[s].normals.length;o<i;o++)n.normals.push(p[s].normals[o].clone());this.morphTargets.push(n)}for(p=t.morphNormals,s=0,e=p.length;s<e;s++){if(n={},p[s].vertexNormals!==void 0)for(n.vertexNormals=[],o=0,i=p[s].vertexNormals.length;o<i;o++)l=p[s].vertexNormals[o],h={},h.a=l.a.clone(),h.b=l.b.clone(),h.c=l.c.clone(),n.vertexNormals.push(h);if(p[s].faceNormals!==void 0)for(n.faceNormals=[],o=0,i=p[s].faceNormals.length;o<i;o++)n.faceNormals.push(p[s].faceNormals[o].clone());this.morphNormals.push(n)}for(o=t.skinWeights,s=0,e=o.length;s<e;s++)this.skinWeights.push(o[s].clone());for(o=t.skinIndices,s=0,e=o.length;s<e;s++)this.skinIndices.push(o[s].clone());for(o=t.lineDistances,s=0,e=o.length;s<e;s++)this.lineDistances.push(o[s]);return s=t.boundingBox,s!==null&&(this.boundingBox=s.clone()),s=t.boundingSphere,s!==null&&(this.boundingSphere=s.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(it.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(it.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=t!==void 0?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,o=this.itemSize;n<o;n++)this.array[t+n]=e.array[i+n];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),s=new Y),e[i++]=s.r,e[i++]=s.g,e[i++]=s.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),s=new _),e[i++]=s.x,e[i++]=s.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),s=new S),e[i++]=s.x,e[i++]=s.y,e[i++]=s.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),s=new nt),e[i++]=s.x,e[i++]=s.y,e[i++]=s.z,e[i++]=s.w}return this},set:function(t,e){return e===void 0&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this},setXYZW:function(t,e,i,n,o){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=o,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),_t.prototype=Object.create(it.prototype),_t.prototype.constructor=_t,dt.prototype=Object.create(it.prototype),dt.prototype.constructor=dt,zt.prototype=Object.create(it.prototype),zt.prototype.constructor=zt,Yt.prototype=Object.create(it.prototype),Yt.prototype.constructor=Yt,re.prototype=Object.create(it.prototype),re.prototype.constructor=re,se.prototype=Object.create(it.prototype),se.prototype.constructor=se,we.prototype=Object.create(it.prototype),we.prototype.constructor=we,Et.prototype=Object.create(it.prototype),Et.prototype.constructor=Et,ie.prototype=Object.create(it.prototype),ie.prototype.constructor=ie,Object.assign(ze.prototype,{computeGroups:function(t){var e=[],i=void 0;t=t.faces;for(var n=0;n<t.length;n++){var o=t[n];if(o.materialIndex!==i){i=o.materialIndex,s!==void 0&&(s.count=3*n-s.start,e.push(s));var s={start:3*n,materialIndex:i}}}s!==void 0&&(s.count=3*n-s.start,e.push(s)),this.groups=e},fromGeometry:function(t){var e=t.faces,i=t.vertices,n=t.faceVertexUvs,o=n[0]&&0<n[0].length,s=n[1]&&0<n[1].length,l=t.morphTargets,h=l.length;if(0<h){for(var c=[],p=0;p<h;p++)c[p]={name:l[p].name,data:[]};this.morphTargets.position=c}var f=t.morphNormals,d=f.length;if(0<d){var v=[];for(p=0;p<d;p++)v[p]={name:f[p].name,data:[]};this.morphTargets.normal=v}var w=t.skinIndices,P=t.skinWeights,R=w.length===i.length,I=P.length===i.length;for(0<i.length&&e.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),p=0;p<e.length;p++){var Q=e[p];this.vertices.push(i[Q.a],i[Q.b],i[Q.c]);var W=Q.vertexNormals;for(W.length===3?this.normals.push(W[0],W[1],W[2]):(W=Q.normal,this.normals.push(W,W,W)),W=Q.vertexColors,W.length===3?this.colors.push(W[0],W[1],W[2]):(W=Q.color,this.colors.push(W,W,W)),o===!0&&(W=n[0][p],W!==void 0?this.uvs.push(W[0],W[1],W[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",p),this.uvs.push(new _,new _,new _))),s===!0&&(W=n[1][p],W!==void 0?this.uvs2.push(W[0],W[1],W[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",p),this.uvs2.push(new _,new _,new _))),W=0;W<h;W++){var st=l[W].vertices;c[W].data.push(st[Q.a],st[Q.b],st[Q.c])}for(W=0;W<d;W++)st=f[W].vertexNormals[p],v[W].data.push(st.a,st.b,st.c);R&&this.skinIndices.push(w[Q.a],w[Q.b],w[Q.c]),I&&this.skinWeights.push(P[Q.a],P[Q.b],P[Q.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var ch=1;Ft.prototype=Object.assign(Object.create($.prototype),{constructor:Ft,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(65535<on(t)?we:re)(t,1):this.index=t},addAttribute:function(t,e,i){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?t==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(t,new it(e,i)))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,i){this.groups.push({start:t,count:e,materialIndex:i!==void 0?i:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;return e!==void 0&&(t.applyToBufferAttribute(e),e.needsUpdate=!0),e=this.attributes.normal,e!==void 0&&(new Mt().getNormalMatrix(t).applyToBufferAttribute(e),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},rotateX:function(){var t=new pt;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new pt;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new pt;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new pt;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new pt;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new z;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new S;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){t=new Et(3*e.vertices.length,3);var i=new Et(3*e.colors.length,3);this.addAttribute("position",t.copyVector3sArray(e.vertices)),this.addAttribute("color",i.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length&&(t=new Et(e.lineDistances.length,1),this.addAttribute("lineDistance",t.copyArray(e.lineDistances))),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var o=t[i];e.push(o.x,o.y,o.z||0)}return this.addAttribute("position",new Et(e,3)),this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var i=e.__directGeometry;if(e.elementsNeedUpdate===!0&&(i=void 0,e.elementsNeedUpdate=!1),i===void 0)return this.fromGeometry(e);i.verticesNeedUpdate=e.verticesNeedUpdate,i.normalsNeedUpdate=e.normalsNeedUpdate,i.colorsNeedUpdate=e.colorsNeedUpdate,i.uvsNeedUpdate=e.uvsNeedUpdate,i.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=i}return e.verticesNeedUpdate===!0&&(i=this.attributes.position,i!==void 0&&(i.copyVector3sArray(e.vertices),i.needsUpdate=!0),e.verticesNeedUpdate=!1),e.normalsNeedUpdate===!0&&(i=this.attributes.normal,i!==void 0&&(i.copyVector3sArray(e.normals),i.needsUpdate=!0),e.normalsNeedUpdate=!1),e.colorsNeedUpdate===!0&&(i=this.attributes.color,i!==void 0&&(i.copyColorsArray(e.colors),i.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(i=this.attributes.uv,i!==void 0&&(i.copyVector2sArray(e.uvs),i.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(i=this.attributes.lineDistance,i!==void 0&&(i.copyArray(e.lineDistances),i.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=new ze().fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);this.addAttribute("position",new it(e,3).copyVector3sArray(t.vertices)),0<t.normals.length&&(e=new Float32Array(3*t.normals.length),this.addAttribute("normal",new it(e,3).copyVector3sArray(t.normals))),0<t.colors.length&&(e=new Float32Array(3*t.colors.length),this.addAttribute("color",new it(e,3).copyColorsArray(t.colors))),0<t.uvs.length&&(e=new Float32Array(2*t.uvs.length),this.addAttribute("uv",new it(e,2).copyVector2sArray(t.uvs))),0<t.uvs2.length&&(e=new Float32Array(2*t.uvs2.length),this.addAttribute("uv2",new it(e,2).copyVector2sArray(t.uvs2))),this.groups=t.groups;for(var i in t.morphTargets){e=[];for(var n=t.morphTargets[i],o=0,s=n.length;o<s;o++){var l=n[o],h=new Et(3*l.data.length,3);h.name=l.name,e.push(h.copyVector3sArray(l.data))}this.morphAttributes[i]=e}return 0<t.skinIndices.length&&(i=new Et(4*t.skinIndices.length,4),this.addAttribute("skinIndex",i.copyVector4sArray(t.skinIndices))),0<t.skinWeights.length&&(i=new Et(4*t.skinWeights.length,4),this.addAttribute("skinWeight",i.copyVector4sArray(t.skinWeights))),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new Nt);var t=this.attributes.position;t!==void 0?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var t=new Nt,e=new S;return function(){this.boundingSphere===null&&(this.boundingSphere=new Ut);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var o=0,s=0,l=i.count;s<l;s++)e.x=i.getX(s),e.y=i.getY(s),e.z=i.getZ(s),o=Math.max(o,n.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(o),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes;if(e.position){var i=e.position.array;if(e.normal===void 0)this.addAttribute("normal",new it(new Float32Array(i.length),3));else for(var n=e.normal.array,o=0,s=n.length;o<s;o++)n[o]=0;n=e.normal.array;var l=new S,h=new S,c=new S,p=new S,f=new S;if(t){var d=t.array;for(o=0,s=t.count;o<s;o+=3){t=3*d[o+0];var v=3*d[o+1],w=3*d[o+2];l.fromArray(i,t),h.fromArray(i,v),c.fromArray(i,w),p.subVectors(c,h),f.subVectors(l,h),p.cross(f),n[t]+=p.x,n[t+1]+=p.y,n[t+2]+=p.z,n[v]+=p.x,n[v+1]+=p.y,n[v+2]+=p.z,n[w]+=p.x,n[w+1]+=p.y,n[w+2]+=p.z}}else for(o=0,s=i.length;o<s;o+=9)l.fromArray(i,o),h.fromArray(i,o+3),c.fromArray(i,o+6),p.subVectors(c,h),f.subVectors(l,h),p.cross(f),n[o]=p.x,n[o+1]=p.y,n[o+2]=p.z,n[o+3]=p.x,n[o+4]=p.y,n[o+5]=p.z,n[o+6]=p.x,n[o+7]=p.y,n[o+8]=p.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){e===void 0&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var i=this.attributes,n;for(n in i)if(t.attributes[n]!==void 0){var o=i[n].array,s=t.attributes[n],l=s.array,h=0;for(s=s.itemSize*e;h<l.length;h++,s++)o[s]=l[h]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new S;return function(){for(var e=this.attributes.normal,i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.normalize(),e.setXYZ(i,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Ft,e=this.index.array,i=this.attributes,n;for(n in i){var o=i[n],s=o.array,l=o.itemSize,h=new s.constructor(e.length*l),c=0;o=0;for(var p=e.length;o<p;o++)for(var f=e[o]*l,d=0;d<l;d++)h[c++]=s[f++];t.addAttribute(n,new it(h,l))}for(e=this.groups,o=0,p=e.length;o<p;o++)i=e[o],t.addGroup(i.start,i.count,i.materialIndex);return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),0<Object.keys(this.userData).length&&(t.userData=this.userData),this.parameters!==void 0){var e=this.parameters;for(o in e)e[o]!==void 0&&(t[o]=e[o]);return t}t.data={attributes:{}};var i=this.index;i!==null&&(e=Array.prototype.slice.call(i.array),t.data.index={type:i.array.constructor.name,array:e}),i=this.attributes;for(o in i){var n=i[o];e=Array.prototype.slice.call(n.array),t.data.attributes[o]={itemSize:n.itemSize,type:n.array.constructor.name,array:e,normalized:n.normalized}}var o=this.groups;return 0<o.length&&(t.data.groups=JSON.parse(JSON.stringify(o))),o=this.boundingSphere,o!==null&&(t.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),t},clone:function(){return new 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(l in i)this.addAttribute(l,i[l].clone());var n=t.morphAttributes;for(l in n){var o=[],s=n[l];for(i=0,e=s.length;i<e;i++)o.push(s[i].clone());this.morphAttributes[l]=o}var l=t.groups;for(i=0,e=l.length;i<e;i++)n=l[i],this.addGroup(n.start,n.count,n.materialIndex);return l=t.boundingBox,l!==null&&(this.boundingBox=l.clone()),l=t.boundingSphere,l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Qe.prototype=Object.create(X.prototype),Qe.prototype.constructor=Qe,Ii.prototype=Object.create(Ft.prototype),Ii.prototype.constructor=Ii,Pn.prototype=Object.create(X.prototype),Pn.prototype.constructor=Pn,Ji.prototype=Object.create(Ft.prototype),Ji.prototype.constructor=Ji;var kl=0;Oe.prototype=Object.assign(Object.create($.prototype),{constructor:Oe,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(t!==void 0)for(var e in t){var i=t[e];if(i===void 0)console.warn("THREE.Material: '"+e+"' parameter is undefined.");else if(e==="shading")console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===1;else{var n=this[e];n===void 0?console.warn("THREE."+this.type+": '"+e+"' is not a property of this material."):n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]=i}}},toJSON:function(t){function e(o){var s=[],l;for(l in o){var h=o[l];delete h.metadata,s.push(h)}return s}var i=t===void 0||typeof t=="string";i&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};return n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearCoat!==void 0&&(n.clearCoat=this.clearCoat),this.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity,this.combine!==void 0&&(n.combine=this.combine),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.size!==void 0&&(n.size=this.size),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.flatShading===!0&&(n.flatShading=this.flatShading),this.side!==0&&(n.side=this.side),this.vertexColors!==0&&(n.vertexColors=this.vertexColors),1>this.opacity&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),0<this.alphaTest&&(n.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),1<this.wireframeLinewidth&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.morphTargets===!0&&(n.morphTargets=!0),this.skinning===!0&&(n.skinning=!0),this.visible===!1&&(n.visible=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),i&&(i=e(t.textures),t=e(t.images),0<i.length&&(n.textures=i),0<t.length&&(n.images=t)),n},clone:function(){return new this.constructor().copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,i=null;if(e!==null){var n=e.length;i=Array(n);for(var o=0;o!==n;++o)i[o]=e[o].clone()}return this.clippingPlanes=i,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Pi.prototype=Object.create(Oe.prototype),Pi.prototype.constructor=Pi,Pi.prototype.isShaderMaterial=!0,Pi.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=_n.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},Pi.prototype.toJSON=function(t){var e=Oe.prototype.toJSON.call(this,t);e.uniforms={};for(var i in this.uniforms){var n=this.uniforms[i].value;e.uniforms[i]=n.isTexture?{type:"t",value:n.toJSON(t).uuid}:n.isColor?{type:"c",value:n.getHex()}:n.isVector2?{type:"v2",value:n.toArray()}:n.isVector3?{type:"v3",value:n.toArray()}:n.isVector4?{type:"v4",value:n.toArray()}:n.isMatrix4?{type:"m4",value:n.toArray()}:{value:n}}return 0<Object.keys(this.defines).length&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(In.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return e===void 0&&(console.warn("THREE.Ray: .at() target is now required"),e=new S),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new S;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){return e===void 0&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new S),e.subVectors(t,this.origin),t=e.dot(this.direction),0>t?e.copy(this.origin):e.copy(this.direction).multiplyScalar(t).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new S;return function(e){var i=t.subVectors(e,this.origin).dot(this.direction);return 0>i?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(i).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new S,e=new S,i=new S;return function(n,o,s,l){t.copy(n).add(o).multiplyScalar(.5),e.copy(o).sub(n).normalize(),i.copy(this.origin).sub(t);var h=.5*n.distanceTo(o),c=-this.direction.dot(e),p=i.dot(this.direction),f=-i.dot(e),d=i.lengthSq(),v=Math.abs(1-c*c);if(0<v){n=c*f-p,o=c*p-f;var w=h*v;0<=n?o>=-w?o<=w?(h=1/v,n*=h,o*=h,c=n*(n+c*o+2*p)+o*(c*n+o+2*f)+d):(o=h,n=Math.max(0,-(c*o+p)),c=-n*n+o*(o+2*f)+d):(o=-h,n=Math.max(0,-(c*o+p)),c=-n*n+o*(o+2*f)+d):o<=-w?(n=Math.max(0,-(-c*h+p)),o=0<n?-h:Math.min(Math.max(-h,-f),h),c=-n*n+o*(o+2*f)+d):o<=w?(n=0,o=Math.min(Math.max(-h,-f),h),c=o*(o+2*f)+d):(n=Math.max(0,-(c*h+p)),o=0<n?h:Math.min(Math.max(-h,-f),h),c=-n*n+o*(o+2*f)+d)}else o=0<c?-h:h,n=Math.max(0,-(c*o+p)),c=-n*n+o*(o+2*f)+d;return s&&s.copy(this.direction).multiplyScalar(n).add(this.origin),l&&l.copy(e).multiplyScalar(o).add(t),c}}(),intersectSphere:function(){var t=new S;return function(e,i){t.subVectors(e.center,this.origin);var n=t.dot(this.direction),o=t.dot(t)-n*n;return e=e.radius*e.radius,o>e?null:(e=Math.sqrt(e-o),o=n-e,n+=e,0>o&&0>n?null:0>o?this.at(n,i):this.at(o,i))}}(),intersectsSphere:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);return e===0?t.distanceToPoint(this.origin)===0?0:null:(t=-(this.origin.dot(t.normal)+t.constant)/e,0<=t?t:null)},intersectPlane:function(t,e){return t=this.distanceToPlane(t),t===null?null:this.at(t,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return e===0||0>t.normal.dot(this.direction)*e},intersectBox:function(t,e){var i=1/this.direction.x,n=1/this.direction.y,o=1/this.direction.z,s=this.origin;if(0<=i){var l=(t.min.x-s.x)*i;i*=t.max.x-s.x}else l=(t.max.x-s.x)*i,i*=t.min.x-s.x;if(0<=n){var h=(t.min.y-s.y)*n;n*=t.max.y-s.y}else h=(t.max.y-s.y)*n,n*=t.min.y-s.y;return l>n||h>i||((h>l||l!==l)&&(l=h),(n<i||i!==i)&&(i=n),0<=o?(h=(t.min.z-s.z)*o,t=(t.max.z-s.z)*o):(h=(t.max.z-s.z)*o,t=(t.min.z-s.z)*o),l>t||h>i)?null:((h>l||l!==l)&&(l=h),(t<i||i!==i)&&(i=t),0>i?null:this.at(0<=l?l:i,e))},intersectsBox:function(){var t=new S;return function(e){return this.intersectBox(e,t)!==null}}(),intersectTriangle:function(){var t=new S,e=new S,i=new S,n=new S;return function(o,s,l,h,c){if(e.subVectors(s,o),i.subVectors(l,o),n.crossVectors(e,i),s=this.direction.dot(n),0<s){if(h)return null;h=1}else if(0>s)h=-1,s=-s;else return null;return t.subVectors(this.origin,o),o=h*this.direction.dot(i.crossVectors(t,i)),0>o||(l=h*this.direction.dot(e.cross(t)),0>l||o+l>s)?null:(o=-h*t.dot(n),0>o?null:this.at(o/s,c))}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(ni,{getNormal:function(){var t=new S;return function(e,i,n,o){return o===void 0&&(console.warn("THREE.Triangle: .getNormal() target is now required"),o=new S),o.subVectors(n,i),t.subVectors(e,i),o.cross(t),e=o.lengthSq(),0<e?o.multiplyScalar(1/Math.sqrt(e)):o.set(0,0,0)}}(),getBarycoord:function(){var t=new S,e=new S,i=new S;return function(n,o,s,l,h){t.subVectors(l,o),e.subVectors(s,o),i.subVectors(n,o),n=t.dot(t),o=t.dot(e),s=t.dot(i);var c=e.dot(e);l=e.dot(i);var p=n*c-o*o;return h===void 0&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),h=new S),p===0?h.set(-2,-1,-1):(p=1/p,c=(c*s-o*l)*p,n=(n*l-o*s)*p,h.set(1-c-n,n,c))}}(),containsPoint:function(){var t=new S;return function(e,i,n,o){return ni.getBarycoord(e,i,n,o,t),0<=t.x&&0<=t.y&&1>=t.x+t.y}}(),getUV:function(){var t=new S;return function(e,i,n,o,s,l,h,c){return this.getBarycoord(e,i,n,o,t),c.set(0,0),c.addScaledVector(s,t.x),c.addScaledVector(l,t.y),c.addScaledVector(h,t.z),c}}()}),Object.assign(ni.prototype,{set:function(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this},setFromPointsAndIndices:function(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new S,e=new S;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new S),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return ni.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new S),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return ni.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return ni.containsPoint(t,this.a,this.b,this.c)},getUV:function(t,e,i,n,o){return ni.getUV(t,this.a,this.b,this.c,e,i,n,o)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new S,e=new S,i=new S,n=new S,o=new S,s=new S;return function(l,h){h===void 0&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),h=new S);var c=this.a,p=this.b,f=this.c;t.subVectors(p,c),e.subVectors(f,c),n.subVectors(l,c);var d=t.dot(n),v=e.dot(n);if(0>=d&&0>=v)return h.copy(c);o.subVectors(l,p);var w=t.dot(o),P=e.dot(o);if(0<=w&&P<=w)return h.copy(p);var R=d*P-w*v;if(0>=R&&0<=d&&0>=w)return p=d/(d-w),h.copy(c).addScaledVector(t,p);s.subVectors(l,f),l=t.dot(s);var I=e.dot(s);return 0<=I&&l<=I?h.copy(f):(d=l*v-d*I,0>=d&&0<=v&&0>=I?(R=v/(v-I),h.copy(c).addScaledVector(e,R)):(v=w*I-l*P,0>=v&&0<=P-w&&0<=l-I?(i.subVectors(f,p),R=(P-w)/(P-w+(l-I)),h.copy(p).addScaledVector(i,R)):(f=1/(v+d+R),p=d*f,R*=f,h.copy(c).addScaledVector(t,p).addScaledVector(e,R))))}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),ci.prototype=Object.create(Oe.prototype),ci.prototype.constructor=ci,ci.prototype.isMeshBasicMaterial=!0,ci.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},Fi.prototype=Object.assign(Object.create(z.prototype),{constructor:Fi,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return z.prototype.copy.call(this,t),this.drawMode=t.drawMode,t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t=this.geometry;if(t.isBufferGeometry){t=t.morphAttributes;var e=Object.keys(t);if(0<e.length){var i=t[e[0]];if(i!==void 0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++){var n=i[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}else if(i=t.morphTargets,i!==void 0&&0<i.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++)n=i[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t},raycast:function(){function t(I,Q,W,st,K,wt,C,D){return(Q.side===1?st.intersectTriangle(C,wt,K,!0,D):st.intersectTriangle(K,wt,C,Q.side!==2,D))===null?null:(R.copy(D),R.applyMatrix4(I.matrixWorld),Q=W.ray.origin.distanceTo(R),Q<W.near||Q>W.far?null:{distance:Q,point:R.clone(),object:I})}function e(I,Q,W,st,K,wt,C,D,ct){return s.fromBufferAttribute(K,C),l.fromBufferAttribute(K,D),h.fromBufferAttribute(K,ct),(I=t(I,Q,W,st,s,l,h,P))&&(wt&&(d.fromBufferAttribute(wt,C),v.fromBufferAttribute(wt,D),w.fromBufferAttribute(wt,ct),I.uv=ni.getUV(P,s,l,h,d,v,w,new _)),wt=new B(C,D,ct),ni.getNormal(s,l,h,wt.normal),I.face=wt),I}var i=new pt,n=new In,o=new Ut,s=new S,l=new S,h=new S,c=new S,p=new S,f=new S,d=new _,v=new _,w=new _,P=new S,R=new S;return function(I,Q){var W=this.geometry,st=this.material,K=this.matrixWorld;if(st!==void 0&&(W.boundingSphere===null&&W.computeBoundingSphere(),o.copy(W.boundingSphere),o.applyMatrix4(K),I.ray.intersectsSphere(o)!==!1&&(i.getInverse(K),n.copy(I.ray).applyMatrix4(i),W.boundingBox===null||n.intersectsBox(W.boundingBox)!==!1))){if(W.isBufferGeometry){var wt=W.index,C=W.attributes.position,D=W.attributes.uv,ct=W.groups;W=W.drawRange;var Dt;if(wt!==null)if(Array.isArray(st)){var bt=0;for(Dt=ct.length;bt<Dt;bt++){var St=ct[bt],oe=st[St.materialIndex];K=Math.max(St.start,W.start);var $t=Math.min(St.start+St.count,W.start+W.count);for(St=K;St<$t;St+=3){K=wt.getX(St);var me=wt.getX(St+1),ue=wt.getX(St+2);(K=e(this,oe,I,n,C,D,K,me,ue))&&(K.faceIndex=Math.floor(St/3),Q.push(K))}}}else for(K=Math.max(0,W.start),$t=Math.min(wt.count,W.start+W.count),bt=K,Dt=$t;bt<Dt;bt+=3)K=wt.getX(bt),me=wt.getX(bt+1),ue=wt.getX(bt+2),(K=e(this,st,I,n,C,D,K,me,ue))&&(K.faceIndex=Math.floor(bt/3),Q.push(K));else if(C!==void 0)if(Array.isArray(st))for(bt=0,Dt=ct.length;bt<Dt;bt++)for(St=ct[bt],oe=st[St.materialIndex],K=Math.max(St.start,W.start),$t=Math.min(St.start+St.count,W.start+W.count),St=K;St<$t;St+=3)K=St,me=St+1,ue=St+2,(K=e(this,oe,I,n,C,D,K,me,ue))&&(K.faceIndex=Math.floor(St/3),Q.push(K));else for(K=Math.max(0,W.start),$t=Math.min(C.count,W.start+W.count),bt=K,Dt=$t;bt<Dt;bt+=3)K=bt,me=bt+1,ue=bt+2,(K=e(this,st,I,n,C,D,K,me,ue))&&(K.faceIndex=Math.floor(bt/3),Q.push(K))}else if(W.isGeometry){for(C=Array.isArray(st),D=W.vertices,ct=W.faces,K=W.faceVertexUvs[0],0<K.length&&(wt=K),St=0,$t=ct.length;St<$t;St++)if(me=ct[St],K=C?st[me.materialIndex]:st,K!==void 0){if(bt=D[me.a],Dt=D[me.b],oe=D[me.c],K.morphTargets===!0){ue=W.morphTargets;var Wt=this.morphTargetInfluences;s.set(0,0,0),l.set(0,0,0),h.set(0,0,0);for(var Ee=0,Be=ue.length;Ee<Be;Ee++){var Ze=Wt[Ee];if(Ze!==0){var cn=ue[Ee].vertices;s.addScaledVector(c.subVectors(cn[me.a],bt),Ze),l.addScaledVector(p.subVectors(cn[me.b],Dt),Ze),h.addScaledVector(f.subVectors(cn[me.c],oe),Ze)}}s.add(bt),l.add(Dt),h.add(oe),bt=s,Dt=l,oe=h}(K=t(this,K,I,n,bt,Dt,oe,P))&&(wt&&wt[St]&&(ue=wt[St],d.copy(ue[0]),v.copy(ue[1]),w.copy(ue[2]),K.uv=ni.getUV(P,bt,Dt,oe,d,v,w,new _)),K.face=me,K.faceIndex=St,Q.push(K))}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),A.prototype=Object.create(kt.prototype),A.prototype.constructor=A,A.prototype.isCubeTexture=!0,Object.defineProperty(A.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),k.prototype=Object.create(kt.prototype),k.prototype.constructor=k,k.prototype.isDataTexture3D=!0;var dl=new kt,ph=new k,Vl=new A,Ha=[],Ds=[],da=new Float32Array(16),Wl=new Float32Array(9),ml=new Float32Array(4);hs.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),ht(e,t)},ks.prototype.setValue=function(t,e,i){for(var n=this.seq,o=0,s=n.length;o!==s;++o){var l=n[o];l.setValue(t,e[l.id],i)}};var gl=/([\w\d_]+)(\])?(\[|\.)?/g;br.prototype.setValue=function(t,e,i){e=this.map[e],e!==void 0&&e.setValue(t,i,this.renderer)},br.prototype.setOptional=function(t,e,i){e=e[i],e!==void 0&&this.setValue(t,i,e)},br.upload=function(t,e,i,n){for(var o=0,s=e.length;o!==s;++o){var l=e[o],h=i[l.id];h.needsUpdate!==!1&&l.setValue(t,h.value,n)}},br.seqWithValue=function(t,e){for(var i=[],n=0,o=t.length;n!==o;++n){var s=t[n];s.id in e&&i.push(s)}return i};var ro=0,vl=0;Vt.prototype=Object.create(Oe.prototype),Vt.prototype.constructor=Vt,Vt.prototype.isMeshDepthMaterial=!0,Vt.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},It.prototype=Object.create(Oe.prototype),It.prototype.constructor=It,It.prototype.isMeshDistanceMaterial=!0,It.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Ye.prototype=Object.assign(Object.create(z.prototype),{constructor:Ye,isGroup:!0}),ye.prototype=Object.assign(Object.create(z.prototype),{constructor:ye,isCamera:!0,copy:function(t,e){return z.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this},getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new S),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){z.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return new this.constructor().copy(this)}}),ee.prototype=Object.assign(Object.create(ye.prototype),{constructor:ee,isPerspectiveCamera:!0,copy:function(t,e){return ye.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){t=.5*this.getFilmHeight()/t,this.fov=2*$e.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*$e.DEG2RAD*this.fov);return .5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*$e.RAD2DEG*Math.atan(Math.tan(.5*$e.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,i,n,o,s){this.aspect=t/e,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*$e.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,o=-.5*n,s=this.view;if(this.view!==null&&this.view.enabled){var l=s.fullWidth,h=s.fullHeight;o+=s.offsetX*n/l,e-=s.offsetY*i/h,n*=s.width/l,i*=s.height/h}s=this.filmOffset,s!==0&&(o+=t*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+n,e,e-i,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=z.prototype.toJSON.call(this,t),t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),_e.prototype=Object.assign(Object.create(ee.prototype),{constructor:_e,isArrayCamera:!0});var So=new S,ir=new S;de.prototype.isFogExp2=!0,de.prototype.clone=function(){return new de(this.color,this.density)},de.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},ln.prototype.isFog=!0,ln.prototype.clone=function(){return new ln(this.color,this.near,this.far)},ln.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},Ln.prototype=Object.assign(Object.create(z.prototype),{constructor:Ln,copy:function(t,e){return z.prototype.copy.call(this,t,e),t.background!==null&&(this.background=t.background.clone()),t.fog!==null&&(this.fog=t.fog.clone()),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=z.prototype.toJSON.call(this,t);return this.background!==null&&(e.object.background=this.background.toJSON(t)),this.fog!==null&&(e.object.fog=this.fog.toJSON()),e}}),Object.defineProperty(vi.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(vi.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=t!==void 0?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.stride,i*=e.stride;for(var n=0,o=this.stride;n<o;n++)this.array[t+n]=e.array[i+n];return this},set:function(t,e){return e===void 0&&(e=0),this.array.set(t,e),this},clone:function(){return new this.constructor().copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Object.defineProperties(yi.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(yi.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this},setXYZW:function(t,e,i,n,o){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this.data.array[t+3]=o,this}}),Si.prototype=Object.create(Oe.prototype),Si.prototype.constructor=Si,Si.prototype.isSpriteMaterial=!0,Si.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this};var zs;Hi.prototype=Object.assign(Object.create(z.prototype),{constructor:Hi,isSprite:!0,raycast:function(){function t(w,P,R,I,Q,W){o.subVectors(w,R).addScalar(.5).multiply(I),Q!==void 0?(s.x=W*o.x-Q*o.y,s.y=Q*o.x+W*o.y):s.copy(o),w.copy(P),w.x+=s.x,w.y+=s.y,w.applyMatrix4(l)}var e=new S,i=new S,n=new S,o=new _,s=new _,l=new pt,h=new S,c=new S,p=new S,f=new _,d=new _,v=new _;return function(w,P){i.setFromMatrixScale(this.matrixWorld),l.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var R=this.material.rotation;if(R!==0)var I=Math.cos(R),Q=Math.sin(R);R=this.center,t(h.set(-.5,-.5,0),n,R,i,Q,I),t(c.set(.5,-.5,0),n,R,i,Q,I),t(p.set(.5,.5,0),n,R,i,Q,I),f.set(0,0),d.set(1,0),v.set(1,1);var W=w.ray.intersectTriangle(h,c,p,!1,e);W===null&&(t(c.set(-.5,.5,0),n,R,i,Q,I),d.set(0,1),W=w.ray.intersectTriangle(h,p,c,!1,e),W===null)||(Q=w.ray.origin.distanceTo(e),Q<w.near||Q>w.far||P.push({distance:Q,point:e.clone(),uv:ni.getUV(e,h,c,p,f,d,v,new _),face:null,object:this}))}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return z.prototype.copy.call(this,t),t.center!==void 0&&this.center.copy(t.center),this}}),ki.prototype=Object.assign(Object.create(z.prototype),{constructor:ki,copy:function(t){z.prototype.copy.call(this,t,!1),t=t.levels;for(var e=0,i=t.length;e<i;e++){var n=t[e];this.addLevel(n.object.clone(),n.distance)}return this},addLevel:function(t,e){e===void 0&&(e=0),e=Math.abs(e);for(var i=this.levels,n=0;n<i.length&&!(e<i[n].distance);n++);i.splice(n,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,i=1,n=e.length;i<n&&!(t<e[i].distance);i++);return e[i-1].object},raycast:function(){var t=new S;return function(e,i){t.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(t);this.getObjectForDistance(n).raycast(e,i)}}(),update:function(){var t=new S,e=new S;return function(i){var n=this.levels;if(1<n.length){t.setFromMatrixPosition(i.matrixWorld),e.setFromMatrixPosition(this.matrixWorld),i=t.distanceTo(e),n[0].object.visible=!0;for(var o=1,s=n.length;o<s&&i>=n[o].distance;o++)n[o-1].object.visible=!1,n[o].object.visible=!0;for(;o<s;o++)n[o].object.visible=!1}}}(),toJSON:function(t){t=z.prototype.toJSON.call(this,t),t.object.levels=[];for(var e=this.levels,i=0,n=e.length;i<n;i++){var o=e[i];t.object.levels.push({object:o.object.uuid,distance:o.distance})}return t}}),Object.assign(Xi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new pt;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 pt,e=new pt;return function(){for(var i=this.bones,n=this.boneInverses,o=this.boneMatrices,s=this.boneTexture,l=0,h=i.length;l<h;l++)t.multiplyMatrices(i[l]?i[l].matrixWorld:e,n[l]),t.toArray(o,16*l);s!==void 0&&(s.needsUpdate=!0)}}(),clone:function(){return new Xi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,i=this.bones.length;e<i;e++){var n=this.bones[e];if(n.name===t)return n}}}),qi.prototype=Object.assign(Object.create(z.prototype),{constructor:qi,isBone:!0}),Ti.prototype=Object.assign(Object.create(Fi.prototype),{constructor:Ti,isSkinnedMesh:!0,initBones:function(){var t=[],e;if(this.geometry&&this.geometry.bones!==void 0){var i=0;for(e=this.geometry.bones.length;i<e;i++){var n=this.geometry.bones[i],o=new qi;t.push(o),o.name=n.name,o.position.fromArray(n.pos),o.quaternion.fromArray(n.rotq),n.scl!==void 0&&o.scale.fromArray(n.scl)}for(i=0,e=this.geometry.bones.length;i<e;i++)n=this.geometry.bones[i],n.parent!==-1&&n.parent!==null&&t[n.parent]!==void 0?t[n.parent].add(t[i]):this.add(t[i])}return this.updateMatrixWorld(!0),t},bind:function(t,e){this.skeleton=t,e===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t;if(this.geometry&&this.geometry.isGeometry)for(t=0;t<this.geometry.skinWeights.length;t++){var e=this.geometry.skinWeights[t],i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){e=new nt;var n=this.geometry.attributes.skinWeight;for(t=0;t<n.count;t++)e.x=n.getX(t),e.y=n.getY(t),e.z=n.getZ(t),e.w=n.getW(t),i=1/e.manhattanLength(),i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),n.setXYZW(t,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(t){Fi.prototype.updateMatrixWorld.call(this,t),this.bindMode==="attached"?this.bindMatrixInverse.getInverse(this.matrixWorld):this.bindMode==="detached"?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),_i.prototype=Object.create(Oe.prototype),_i.prototype.constructor=_i,_i.prototype.isLineBasicMaterial=!0,_i.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Li.prototype=Object.assign(Object.create(z.prototype),{constructor:Li,isLine:!0,computeLineDistances:function(){var t=new S,e=new S;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[0],s=1,l=n.count;s<l;s++)t.fromBufferAttribute(n,s-1),e.fromBufferAttribute(n,s),o[s]=o[s-1],o[s]+=t.distanceTo(e);i.addAttribute("lineDistance",new Et(o,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,o=i.lineDistances,o[0]=0,s=1,l=n.length;s<l;s++)o[s]=o[s-1],o[s]+=n[s-1].distanceTo(n[s]);return this}}(),raycast:function(){var t=new pt,e=new In,i=new Ut;return function(n,o){var s=n.linePrecision,l=this.geometry,h=this.matrixWorld;if(l.boundingSphere===null&&l.computeBoundingSphere(),i.copy(l.boundingSphere),i.applyMatrix4(h),i.radius+=s,n.ray.intersectsSphere(i)!==!1){t.getInverse(h),e.copy(n.ray).applyMatrix4(t),s/=(this.scale.x+this.scale.y+this.scale.z)/3,s*=s;var c=new S,p=new S;h=new S;var f=new S,d=this&&this.isLineSegments?2:1;if(l.isBufferGeometry){var v=l.index,w=l.attributes.position.array;if(v!==null){v=v.array,l=0;for(var P=v.length-1;l<P;l+=d){var R=v[l+1];c.fromArray(w,3*v[l]),p.fromArray(w,3*R),R=e.distanceSqToSegment(c,p,f,h),R>s||(f.applyMatrix4(this.matrixWorld),R=n.ray.origin.distanceTo(f),R<n.near||R>n.far||o.push({distance:R,point:h.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}}else for(l=0,P=w.length/3-1;l<P;l+=d)c.fromArray(w,3*l),p.fromArray(w,3*l+3),R=e.distanceSqToSegment(c,p,f,h),R>s||(f.applyMatrix4(this.matrixWorld),R=n.ray.origin.distanceTo(f),R<n.near||R>n.far||o.push({distance:R,point:h.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}else if(l.isGeometry)for(c=l.vertices,p=c.length,l=0;l<p-1;l+=d)R=e.distanceSqToSegment(c[l],c[l+1],f,h),R>s||(f.applyMatrix4(this.matrixWorld),R=n.ray.origin.distanceTo(f),R<n.near||R>n.far||o.push({distance:R,point:h.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}}}(),copy:function(t){return z.prototype.copy.call(this,t),this.geometry.copy(t.geometry),this.material.copy(t.material),this},clone:function(){return new this.constructor().copy(this)}}),ei.prototype=Object.assign(Object.create(Li.prototype),{constructor:ei,isLineSegments:!0,computeLineDistances:function(){var t=new S,e=new S;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[],s=0,l=n.count;s<l;s+=2)t.fromBufferAttribute(n,s),e.fromBufferAttribute(n,s+1),o[s]=s===0?0:o[s-1],o[s+1]=o[s]+t.distanceTo(e);i.addAttribute("lineDistance",new Et(o,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,o=i.lineDistances,s=0,l=n.length;s<l;s+=2)t.copy(n[s]),e.copy(n[s+1]),o[s]=s===0?0:o[s-1],o[s+1]=o[s]+t.distanceTo(e);return this}}()}),Ir.prototype=Object.assign(Object.create(Li.prototype),{constructor:Ir,isLineLoop:!0}),Mn.prototype=Object.create(Oe.prototype),Mn.prototype.constructor=Mn,Mn.prototype.isPointsMaterial=!0,Mn.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.morphTargets=t.morphTargets,this},ps.prototype=Object.assign(Object.create(z.prototype),{constructor:ps,isPoints:!0,raycast:function(){var t=new pt,e=new In,i=new Ut;return function(n,o){function s(I,Q){var W=e.distanceSqToPoint(I);W<f&&(e.closestPointToPoint(I,d),d.applyMatrix4(c),I=n.ray.origin.distanceTo(d),I<n.near||I>n.far||o.push({distance:I,distanceToRay:Math.sqrt(W),point:d.clone(),index:Q,face:null,object:l}))}var l=this,h=this.geometry,c=this.matrixWorld,p=n.params.Points.threshold;if(h.boundingSphere===null&&h.computeBoundingSphere(),i.copy(h.boundingSphere),i.applyMatrix4(c),i.radius+=p,n.ray.intersectsSphere(i)!==!1){t.getInverse(c),e.copy(n.ray).applyMatrix4(t),p/=(this.scale.x+this.scale.y+this.scale.z)/3;var f=p*p;p=new S;var d=new S;if(h.isBufferGeometry){var v=h.index;if(h=h.attributes.position.array,v!==null){var w=v.array;v=0;for(var P=w.length;v<P;v++){var R=w[v];p.fromArray(h,3*R),s(p,R)}}else for(v=0,w=h.length/3;v<w;v++)p.fromArray(h,3*v),s(p,v)}else for(p=h.vertices,v=0,w=p.length;v<w;v++)s(p[v],v)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),il.prototype=Object.assign(Object.create(kt.prototype),{constructor:il,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),uo.prototype=Object.create(kt.prototype),uo.prototype.constructor=uo,uo.prototype.isCompressedTexture=!0,Ws.prototype=Object.create(kt.prototype),Ws.prototype.constructor=Ws,Ws.prototype.isCanvasTexture=!0,js.prototype=Object.create(kt.prototype),js.prototype.constructor=js,js.prototype.isDepthTexture=!0,fs.prototype=Object.create(Ft.prototype),fs.prototype.constructor=fs,Xs.prototype=Object.create(X.prototype),Xs.prototype.constructor=Xs,ds.prototype=Object.create(Ft.prototype),ds.prototype.constructor=ds,Ci.prototype=Object.create(X.prototype),Ci.prototype.constructor=Ci,oi.prototype=Object.create(Ft.prototype),oi.prototype.constructor=oi,qs.prototype=Object.create(X.prototype),qs.prototype.constructor=qs,ms.prototype=Object.create(oi.prototype),ms.prototype.constructor=ms,Ys.prototype=Object.create(X.prototype),Ys.prototype.constructor=Ys,bo.prototype=Object.create(oi.prototype),bo.prototype.constructor=bo,Zs.prototype=Object.create(X.prototype),Zs.prototype.constructor=Zs,gs.prototype=Object.create(oi.prototype),gs.prototype.constructor=gs,vs.prototype=Object.create(X.prototype),vs.prototype.constructor=vs,ys.prototype=Object.create(oi.prototype),ys.prototype.constructor=ys,Qi.prototype=Object.create(X.prototype),Qi.prototype.constructor=Qi,co.prototype=Object.create(Ft.prototype),co.prototype.constructor=co,xr.prototype=Object.create(X.prototype),xr.prototype.constructor=xr,Oo.prototype=Object.create(Ft.prototype),Oo.prototype.constructor=Oo,Io.prototype=Object.create(X.prototype),Io.prototype.constructor=Io,Tn.prototype=Object.create(Ft.prototype),Tn.prototype.constructor=Tn;var jl={triangulate:function(t,e,i){i=i||2;var n=e&&e.length,o=n?e[0]*i:t.length,s=nl(t,0,o,i,!0),l=[];if(!s)return l;var h;if(n){var c=i;n=[];var p,f=0;for(p=e.length;f<p;f++){var d=e[f]*c,v=f<p-1?e[f+1]*c:t.length;d=nl(t,d,v,c,!1),d===d.next&&(d.steiner=!0),n.push(Kn(d))}for(n.sort(bl),f=0;f<n.length;f++)e=n[f],c=s,(c=Ol(e,c))&&(e=Js(c,e),_s(e,e.next)),s=_s(s,s.next)}if(t.length>80*i){var w=h=t[0],P=n=t[1];for(c=i;c<o;c+=i)f=t[c],e=t[c+1],f<w&&(w=f),e<P&&(P=e),f>h&&(h=f),e>n&&(n=e);h=Math.max(h-w,n-P),h=h!==0?1/h:0}return xs(s,l,i,w,P,h),l}},Vr={area:function(t){for(var e=t.length,i=0,n=e-1,o=0;o<e;n=o++)i+=t[n].x*t[o].y-t[o].x*t[n].y;return .5*i},isClockWise:function(t){return 0>Vr.area(t)},triangulateShape:function(t,e){var i=[],n=[],o=[];ba(t),Il(i,t);var s=t.length;for(e.forEach(ba),t=0;t<e.length;t++)n.push(s),s+=e[t].length,Il(i,e[t]);for(e=jl.triangulate(i,n),t=0;t<e.length;t+=3)o.push(e.slice(t,t+3));return o}};Jr.prototype=Object.create(X.prototype),Jr.prototype.constructor=Jr,Jr.prototype.toJSON=function(){var t=X.prototype.toJSON.call(this);return Dl(this.parameters.shapes,this.parameters.options,t)},zr.prototype=Object.create(Ft.prototype),zr.prototype.constructor=zr,zr.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return Dl(this.parameters.shapes,this.parameters.options,t)};var ma={generateTopUV:function(t,e,i,n,o){t=e[3*n],n=e[3*n+1];var s=e[3*o];return o=e[3*o+1],[new _(e[3*i],e[3*i+1]),new _(t,n),new _(s,o)]},generateSideWallUV:function(t,e,i,n,o,s){t=e[3*i];var l=e[3*i+1];i=e[3*i+2];var h=e[3*n],c=e[3*n+1];n=e[3*n+2];var p=e[3*o],f=e[3*o+1];o=e[3*o+2];var d=e[3*s],v=e[3*s+1];return e=e[3*s+2],.01>Math.abs(l-c)?[new _(t,1-i),new _(h,1-n),new _(p,1-o),new _(d,1-e)]:[new _(l,1-i),new _(c,1-n),new _(f,1-o),new _(v,1-e)]}};$s.prototype=Object.create(X.prototype),$s.prototype.constructor=$s,zo.prototype=Object.create(zr.prototype),zo.prototype.constructor=zo,po.prototype=Object.create(X.prototype),po.prototype.constructor=po,lr.prototype=Object.create(Ft.prototype),lr.prototype.constructor=lr,Qs.prototype=Object.create(X.prototype),Qs.prototype.constructor=Qs,No.prototype=Object.create(Ft.prototype),No.prototype.constructor=No,ws.prototype=Object.create(X.prototype),ws.prototype.constructor=ws,fo.prototype=Object.create(Ft.prototype),fo.prototype.constructor=fo,$r.prototype=Object.create(X.prototype),$r.prototype.constructor=$r,$r.prototype.toJSON=function(){var t=X.prototype.toJSON.call(this);return zl(this.parameters.shapes,t)},mo.prototype=Object.create(Ft.prototype),mo.prototype.constructor=mo,mo.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return zl(this.parameters.shapes,t)},go.prototype=Object.create(Ft.prototype),go.prototype.constructor=go,Qr.prototype=Object.create(X.prototype),Qr.prototype.constructor=Qr,Kr.prototype=Object.create(Ft.prototype),Kr.prototype.constructor=Kr,Ms.prototype=Object.create(Qr.prototype),Ms.prototype.constructor=Ms,Sn.prototype=Object.create(Kr.prototype),Sn.prototype.constructor=Sn,Bo.prototype=Object.create(X.prototype),Bo.prototype.constructor=Bo,Nr.prototype=Object.create(Ft.prototype),Nr.prototype.constructor=Nr;var tn=Object.freeze({WireframeGeometry:fs,ParametricGeometry:Xs,ParametricBufferGeometry:ds,TetrahedronGeometry:qs,TetrahedronBufferGeometry:ms,OctahedronGeometry:Ys,OctahedronBufferGeometry:bo,IcosahedronGeometry:Zs,IcosahedronBufferGeometry:gs,DodecahedronGeometry:vs,DodecahedronBufferGeometry:ys,PolyhedronGeometry:Ci,PolyhedronBufferGeometry:oi,TubeGeometry:Qi,TubeBufferGeometry:co,TorusKnotGeometry:xr,TorusKnotBufferGeometry:Oo,TorusGeometry:Io,TorusBufferGeometry:Tn,TextGeometry:$s,TextBufferGeometry:zo,SphereGeometry:po,SphereBufferGeometry:lr,RingGeometry:Qs,RingBufferGeometry:No,PlaneGeometry:Pn,PlaneBufferGeometry:Ji,LatheGeometry:ws,LatheBufferGeometry:fo,ShapeGeometry:$r,ShapeBufferGeometry:mo,ExtrudeGeometry:Jr,ExtrudeBufferGeometry:zr,EdgesGeometry:go,ConeGeometry:Ms,ConeBufferGeometry:Sn,CylinderGeometry:Qr,CylinderBufferGeometry:Kr,CircleGeometry:Bo,CircleBufferGeometry:Nr,BoxGeometry:Qe,BoxBufferGeometry:Ii});vo.prototype=Object.create(Oe.prototype),vo.prototype.constructor=vo,vo.prototype.isShadowMaterial=!0,vo.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this},Uo.prototype=Object.create(Pi.prototype),Uo.prototype.constructor=Uo,Uo.prototype.isRawShaderMaterial=!0,Br.prototype=Object.create(Oe.prototype),Br.prototype.constructor=Br,Br.prototype.isMeshStandardMaterial=!0,Br.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Fo.prototype=Object.create(Br.prototype),Fo.prototype.constructor=Fo,Fo.prototype.isMeshPhysicalMaterial=!0,Fo.prototype.copy=function(t){return Br.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},wr.prototype=Object.create(Oe.prototype),wr.prototype.constructor=wr,wr.prototype.isMeshPhongMaterial=!0,wr.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Go.prototype=Object.create(wr.prototype),Go.prototype.constructor=Go,Go.prototype.isMeshToonMaterial=!0,Go.prototype.copy=function(t){return wr.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ho.prototype=Object.create(Oe.prototype),Ho.prototype.constructor=Ho,Ho.prototype.isMeshNormalMaterial=!0,Ho.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},hr.prototype=Object.create(Oe.prototype),hr.prototype.constructor=hr,hr.prototype.isMeshLambertMaterial=!0,hr.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},ko.prototype=Object.create(Oe.prototype),ko.prototype.constructor=ko,ko.prototype.isMeshMatcapMaterial=!0,ko.prototype.copy=function(t){return Oe.prototype.copy.call(this,t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Vo.prototype=Object.create(_i.prototype),Vo.prototype.constructor=Vo,Vo.prototype.isLineDashedMaterial=!0,Vo.prototype.copy=function(t){return _i.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Xl=Object.freeze({ShadowMaterial:vo,SpriteMaterial:Si,RawShaderMaterial:Uo,ShaderMaterial:Pi,PointsMaterial:Mn,MeshPhysicalMaterial:Fo,MeshStandardMaterial:Br,MeshPhongMaterial:wr,MeshToonMaterial:Go,MeshNormalMaterial:Ho,MeshLambertMaterial:hr,MeshDepthMaterial:Vt,MeshDistanceMaterial:It,MeshBasicMaterial:ci,MeshMatcapMaterial:ko,LineDashedMaterial:Vo,LineBasicMaterial:_i,Material:Oe}),Rn={arraySlice:function(t,e,i){return Rn.isTypedArray(t)?new t.constructor(t.subarray(e,i!==void 0?i:t.length)):t.slice(e,i)},convertArray:function(t,e,i){return!t||!i&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,i=Array(e),n=0;n!==e;++n)i[n]=n;return i.sort(function(o,s){return t[o]-t[s]}),i},sortedArray:function(t,e,i){for(var n=t.length,o=new t.constructor(n),s=0,l=0;l!==n;++s)for(var h=i[s]*e,c=0;c!==e;++c)o[l++]=t[h+c];return o},flattenJSON:function(t,e,i,n){for(var o=1,s=t[0];s!==void 0&&s[n]===void 0;)s=t[o++];if(s!==void 0){var l=s[n];if(l!==void 0)if(Array.isArray(l))do l=s[n],l!==void 0&&(e.push(s.time),i.push.apply(i,l)),s=t[o++];while(s!==void 0);else if(l.toArray!==void 0)do l=s[n],l!==void 0&&(e.push(s.time),l.toArray(i,i.length)),s=t[o++];while(s!==void 0);else do l=s[n],l!==void 0&&(e.push(s.time),i.push(l)),s=t[o++];while(s!==void 0)}}};Object.assign(Dn.prototype,{evaluate:function(t){var e=this.parameterPositions,i=this._cachedIndex,n=e[i],o=e[i-1];t:{e:{i:{n:if(!(t<n)){for(var s=i+2;;){if(n===void 0){if(t<o)break n;return this._cachedIndex=i=e.length,this.afterEnd_(i-1,t,o)}if(i===s)break;if(o=n,n=e[++i],t<n)break e}n=e.length;break i}if(t>=o)break t;for(s=e[1],t<s&&(i=2,o=s),s=i-2;;){if(o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===s)break;if(n=o,o=e[--i-1],t>=o)break e}n=i,i=0}for(;i<n;)o=i+n>>>1,t<e[o]?n=o:i=o+1;if(n=e[i],o=e[i-1],o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(n===void 0)return this._cachedIndex=i=e.length,this.afterEnd_(i-1,o,t)}this._cachedIndex=i,this.intervalChanged_(i,o,n)}return this.interpolate_(i,o,t,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){var e=this.resultBuffer,i=this.sampleValues,n=this.valueSize;t*=n;for(var o=0;o!==n;++o)e[o]=i[t+o];return e},interpolate_:function(){throw Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(Dn.prototype,{beforeStart_:Dn.prototype.copySampleValue_,afterEnd_:Dn.prototype.copySampleValue_}),Ks.prototype=Object.assign(Object.create(Dn.prototype),{constructor:Ks,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,o=t-2,s=t+1,l=n[o],h=n[s];if(l===void 0)switch(this.getSettings_().endingStart){case 2401:o=t,l=2*e-i;break;case 2402:o=n.length-2,l=e+n[o]-n[o+1];break;default:o=t,l=i}if(h===void 0)switch(this.getSettings_().endingEnd){case 2401:s=t,h=2*i-e;break;case 2402:s=1,h=i+n[1]-n[0];break;default:s=t-1,h=e}t=.5*(i-e),n=this.valueSize,this._weightPrev=t/(e-l),this._weightNext=t/(h-i),this._offsetPrev=o*n,this._offsetNext=s*n},interpolate_:function(t,e,i,n){var o=this.resultBuffer,s=this.sampleValues,l=this.valueSize;t*=l;var h=t-l,c=this._offsetPrev,p=this._offsetNext,f=this._weightPrev,d=this._weightNext,v=(i-e)/(n-e);for(i=v*v,n=i*v,e=-f*n+2*f*i-f*v,f=(1+f)*n+(-1.5-2*f)*i+(-.5+f)*v+1,v=(-1-d)*n+(1.5+d)*i+.5*v,d=d*n-d*i,i=0;i!==l;++i)o[i]=e*s[c+i]+f*s[h+i]+v*s[t+i]+d*s[p+i];return o}}),ur.prototype=Object.assign(Object.create(Dn.prototype),{constructor:ur,interpolate_:function(t,e,i,n){var o=this.resultBuffer,s=this.sampleValues,l=this.valueSize;t*=l;var h=t-l;for(e=(i-e)/(n-e),i=1-e,n=0;n!==l;++n)o[n]=s[h+n]*i+s[t+n]*e;return o}}),Wo.prototype=Object.assign(Object.create(Dn.prototype),{constructor:Wo,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(En,{toJSON:function(t){var e=t.constructor;if(e.toJSON!==void 0)e=e.toJSON(t);else{e={name:t.name,times:Rn.convertArray(t.times,Array),values:Rn.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e}}),Object.assign(En.prototype,{constructor:En,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new Wo(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new ur(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Ks(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){switch(t){case 2300:var e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(e===void 0){if(e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name,this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(e);return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(t!==0)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]+=t;return this},scale:function(t){if(t!==1)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]*=t;return this},trim:function(t,e){for(var i=this.times,n=i.length,o=0,s=n-1;o!==n&&i[o]<t;)++o;for(;s!==-1&&i[s]>e;)--s;return++s,(o!==0||s!==n)&&(o>=s&&(s=Math.max(s,1),o=s-1),t=this.getValueSize(),this.times=Rn.arraySlice(i,o,s),this.values=Rn.arraySlice(this.values,o*t,s*t)),this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var i=this.times;e=this.values;var n=i.length;n===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,s=0;s!==n;s++){var l=i[s];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,l),t=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,l,o),t=!1;break}o=l}if(e!==void 0&&Rn.isTypedArray(e)){for(s=0,i=e.length;s!==i;++s)if(n=e[s],isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,n),t=!1;break}}return t},optimize:function(){for(var t=this.times,e=this.values,i=this.getValueSize(),n=this.getInterpolation()===2302,o=1,s=t.length-1,l=1;l<s;++l){var h=!1,c=t[l];if(c!==t[l+1]&&(l!==1||c!==c[0]))if(n)h=!0;else{var p=l*i,f=p-i,d=p+i;for(c=0;c!==i;++c){var v=e[p+c];if(v!==e[f+c]||v!==e[d+c]){h=!0;break}}}if(h){if(l!==o)for(t[o]=t[l],h=l*i,p=o*i,c=0;c!==i;++c)e[p+c]=e[h+c];++o}}if(0<s){for(t[o]=t[s],h=s*i,p=o*i,c=0;c!==i;++c)e[p+c]=e[h+c];++o}return o!==t.length&&(this.times=Rn.arraySlice(t,0,o),this.values=Rn.arraySlice(e,0,o*i)),this}}),Oa.prototype=Object.assign(Object.create(En.prototype),{constructor:Oa,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ia.prototype=Object.assign(Object.create(En.prototype),{constructor:Ia,ValueTypeName:"color"}),Mr.prototype=Object.assign(Object.create(En.prototype),{constructor:Mr,ValueTypeName:"number"}),kn.prototype=Object.assign(Object.create(Dn.prototype),{constructor:kn,interpolate_:function(t,e,i,n){var o=this.resultBuffer,s=this.sampleValues,l=this.valueSize;for(t*=l,e=(i-e)/(n-e),i=t+l;t!==i;t+=4)gt.slerpFlat(o,0,s,t-l,s,t,e);return o}}),Ts.prototype=Object.assign(Object.create(En.prototype),{constructor:Ts,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new kn(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),Da.prototype=Object.assign(Object.create(En.prototype),{constructor:Da,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ss.prototype=Object.assign(Object.create(En.prototype),{constructor:Ss,ValueTypeName:"vector"}),Object.assign(tr,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),o=0,s=i.length;o!==s;++o)e.push(lh(i[o]).scale(n));return new tr(t.name,t.duration,e)},toJSON:function(t){var e=[],i=t.tracks;t={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid};for(var n=0,o=i.length;n!==o;++n)e.push(En.toJSON(i[n]));return t},CreateFromMorphTargetSequence:function(t,e,i,n){for(var o=e.length,s=[],l=0;l<o;l++){var h=[],c=[];h.push((l+o-1)%o,l,(l+1)%o),c.push(0,1,0);var p=Rn.getKeyframeOrder(h);h=Rn.sortedArray(h,1,p),c=Rn.sortedArray(c,1,p),n||h[0]!==0||(h.push(o),c.push(c[0])),s.push(new Mr(".morphTargetInfluences["+e[l].name+"]",h,c).scale(1/i))}return new tr(t,-1,s)},findByName:function(t,e){var i=t;for(Array.isArray(t)||(i=t.geometry&&t.geometry.animations||t.animations),t=0;t<i.length;t++)if(i[t].name===e)return i[t];return null},CreateClipsFromMorphTargetSequences:function(t,e,i){for(var n={},o=/^([\w-]*?)([\d]+)$/,s=0,l=t.length;s<l;s++){var h=t[s],c=h.name.match(o);if(c&&1<c.length){var p=c[1];(c=n[p])||(n[p]=c=[]),c.push(h)}}t=[];for(p in n)t.push(tr.CreateFromMorphTargetSequence(p,n[p],e,i));return t},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var i=function(R,I,Q,W,st){if(Q.length!==0){var K=[],wt=[];Rn.flattenJSON(Q,K,wt,W),K.length!==0&&st.push(new R(I,K,wt))}},n=[],o=t.name||"default",s=t.length||-1,l=t.fps||30;t=t.hierarchy||[];for(var h=0;h<t.length;h++){var c=t[h].keys;if(c&&c.length!==0)if(c[0].morphTargets){s={};for(var p=0;p<c.length;p++)if(c[p].morphTargets)for(var f=0;f<c[p].morphTargets.length;f++)s[c[p].morphTargets[f]]=-1;for(var d in s){var v=[],w=[];for(f=0;f!==c[p].morphTargets.length;++f){var P=c[p];v.push(P.time),w.push(P.morphTarget===d?1:0)}n.push(new Mr(".morphTargetInfluence["+d+"]",v,w))}s=s.length*(l||1)}else p=".bones["+e[h].name+"]",i(Ss,p+".position",c,"pos",n),i(Ts,p+".quaternion",c,"rot",n),i(Ss,p+".scale",c,"scl",n)}return n.length===0?null:new tr(o,s,n)}}),Object.assign(tr.prototype,{resetDuration:function(){for(var t=0,e=0,i=this.tracks.length;e!==i;++e){var n=this.tracks[e];t=Math.max(t,n.times[n.times.length-1])}return this.duration=t,this},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},validate:function(){for(var t=!0,e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}});var Wr={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},Bn=new yo,fr={};Object.assign(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,s=Wr.get(t);if(s!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;if(fr[t]!==void 0)fr[t].push({onLoad:e,onProgress:i,onError:n});else{var l=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(l){i=l[1];var h=!!l[2];l=l[3],l=decodeURIComponent(l),h&&(l=atob(l));try{var c=(this.responseType||"").toLowerCase();switch(c){case"arraybuffer":case"blob":var p=new Uint8Array(l.length);for(h=0;h<l.length;h++)p[h]=l.charCodeAt(h);var f=c==="blob"?new Blob([p.buffer],{type:i}):p.buffer;break;case"document":f=new DOMParser().parseFromString(l,i);break;case"json":f=JSON.parse(l);break;default:f=l}setTimeout(function(){e&&e(f),o.manager.itemEnd(t)},0)}catch(v){setTimeout(function(){n&&n(v),o.manager.itemError(t),o.manager.itemEnd(t)},0)}}else{fr[t]=[],fr[t].push({onLoad:e,onProgress:i,onError:n});var d=new XMLHttpRequest;d.open("GET",t,!0),d.addEventListener("load",function(v){var w=this.response;Wr.add(t,w);var P=fr[t];if(delete fr[t],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var R=0,I=P.length;R<I;R++){var Q=P[R];Q.onLoad&&Q.onLoad(w)}}else{for(R=0,I=P.length;R<I;R++)Q=P[R],Q.onError&&Q.onError(v);o.manager.itemError(t)}o.manager.itemEnd(t)},!1),d.addEventListener("progress",function(v){for(var w=fr[t],P=0,R=w.length;P<R;P++){var I=w[P];I.onProgress&&I.onProgress(v)}},!1),d.addEventListener("error",function(v){var w=fr[t];delete fr[t];for(var P=0,R=w.length;P<R;P++){var I=w[P];I.onError&&I.onError(v)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),d.addEventListener("abort",function(v){var w=fr[t];delete fr[t];for(var P=0,R=w.length;P<R;P++){var I=w[P];I.onError&&I.onError(v)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),this.responseType!==void 0&&(d.responseType=this.responseType),this.withCredentials!==void 0&&(d.withCredentials=this.withCredentials),d.overrideMimeType&&d.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(h in this.requestHeader)d.setRequestHeader(h,this.requestHeader[h]);d.send(null)}return o.manager.itemStart(t),d}},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Ot.prototype,{load:function(t,e,i,n){var o=this,s=new lt(o.manager);s.setPath(o.path),s.load(t,function(l){e(o.parse(JSON.parse(l)))},i,n)},parse:function(t,e){for(var i=[],n=0;n<t.length;n++){var o=tr.parse(t[n]);i.push(o)}e(i)},setPath:function(t){return this.path=t,this}}),Object.assign(At.prototype,{load:function(t,e,i,n){function o(v){c.load(t[v],function(w){w=s._parser(w,!0),l[v]={width:w.width,height:w.height,format:w.format,mipmaps:w.mipmaps},p+=1,p===6&&(w.mipmapCount===1&&(h.minFilter=1006),h.format=w.format,h.needsUpdate=!0,e&&e(h))},i,n)}var s=this,l=[],h=new uo;h.image=l;var c=new lt(this.manager);if(c.setPath(this.path),c.setResponseType("arraybuffer"),Array.isArray(t))for(var p=0,f=0,d=t.length;f<d;++f)o(f);else c.load(t,function(v){if(v=s._parser(v,!0),v.isCubemap)for(var w=v.mipmaps.length/v.mipmapCount,P=0;P<w;P++){l[P]={mipmaps:[]};for(var R=0;R<v.mipmapCount;R++)l[P].mipmaps.push(v.mipmaps[P*v.mipmapCount+R]),l[P].format=v.format,l[P].width=v.width,l[P].height=v.height}else h.image.width=v.width,h.image.height=v.height,h.mipmaps=v.mipmaps;v.mipmapCount===1&&(h.minFilter=1006),h.format=v.format,h.needsUpdate=!0,e&&e(h)},i,n);return h},setPath:function(t){return this.path=t,this}}),Object.assign(xe.prototype,{load:function(t,e,i,n){var o=this,s=new vt,l=new lt(this.manager);return l.setResponseType("arraybuffer"),l.setPath(this.path),l.load(t,function(h){(h=o._parser(h))&&(h.image!==void 0?s.image=h.image:h.data!==void 0&&(s.image.width=h.width,s.image.height=h.height,s.image.data=h.data),s.wrapS=h.wrapS!==void 0?h.wrapS:1001,s.wrapT=h.wrapT!==void 0?h.wrapT:1001,s.magFilter=h.magFilter!==void 0?h.magFilter:1006,s.minFilter=h.minFilter!==void 0?h.minFilter:1008,s.anisotropy=h.anisotropy!==void 0?h.anisotropy:1,h.format!==void 0&&(s.format=h.format),h.type!==void 0&&(s.type=h.type),h.mipmaps!==void 0&&(s.mipmaps=h.mipmaps),h.mipmapCount===1&&(s.minFilter=1006),s.needsUpdate=!0,e&&e(s,h))},i,n),s},setPath:function(t){return this.path=t,this}}),Object.assign(We.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(){c.removeEventListener("load",o,!1),c.removeEventListener("error",s,!1),Wr.add(t,this),e&&e(this),l.manager.itemEnd(t)}function s(p){c.removeEventListener("load",o,!1),c.removeEventListener("error",s,!1),n&&n(p),l.manager.itemError(t),l.manager.itemEnd(t)}t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var l=this,h=Wr.get(t);if(h!==void 0)return l.manager.itemStart(t),setTimeout(function(){e&&e(h),l.manager.itemEnd(t)},0),h;var c=document.createElementNS("http://www.w3.org/1999/xhtml","img");return c.addEventListener("load",o,!1),c.addEventListener("error",s,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(c.crossOrigin=this.crossOrigin),l.manager.itemStart(t),c.src=t,c},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(xi.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(c){l.load(t[c],function(p){s.images[c]=p,h++,h===6&&(s.needsUpdate=!0,e&&e(s))},void 0,n)}var s=new A,l=new We(this.manager);l.setCrossOrigin(this.crossOrigin),l.setPath(this.path);var h=0;for(i=0;i<t.length;++i)o(i);return s},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Yi.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=new kt,s=new We(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(t,function(l){o.image=l,l=0<t.search(/\.jpe?g$/i)||t.search(/^data:image\/jpeg/)===0,o.format=l?1022:1023,o.needsUpdate=!0,e!==void 0&&e(o)},i,n),o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(he.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){return t=this.getUtoTmapping(t),this.getPoint(t,e)},getPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getSpacedPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(t===void 0&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e=[],i=this.getPoint(0),n,o=0;for(e.push(0),n=1;n<=t;n++){var s=this.getPoint(n/t);o+=s.distanceTo(i),e.push(o),i=s}return this.cacheArcLengths=e},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var i=this.getLengths(),n=i.length;e=e||t*i[n-1];for(var o=0,s=n-1,l;o<=s;)if(t=Math.floor(o+(s-o)/2),l=i[t]-e,0>l)o=t+1;else if(0<l)s=t-1;else{s=t;break}return t=s,i[t]===e?t/(n-1):(o=i[t],(t+(e-o)/(i[t+1]-o))/(n-1))},getTangent:function(t){var e=t-1e-4;return t+=1e-4,0>e&&(e=0),1<t&&(t=1),e=this.getPoint(e),this.getPoint(t).clone().sub(e).normalize()},getTangentAt:function(t){return t=this.getUtoTmapping(t),this.getTangent(t)},computeFrenetFrames:function(t,e){var i=new S,n=[],o=[],s=[],l=new S,h=new pt,c;for(c=0;c<=t;c++){var p=c/t;n[c]=this.getTangentAt(p),n[c].normalize()}o[0]=new S,s[0]=new S,c=Number.MAX_VALUE,p=Math.abs(n[0].x);var f=Math.abs(n[0].y),d=Math.abs(n[0].z);for(p<=c&&(c=p,i.set(1,0,0)),f<=c&&(c=f,i.set(0,1,0)),d<=c&&i.set(0,0,1),l.crossVectors(n[0],i).normalize(),o[0].crossVectors(n[0],l),s[0].crossVectors(n[0],o[0]),c=1;c<=t;c++)o[c]=o[c-1].clone(),s[c]=s[c-1].clone(),l.crossVectors(n[c-1],n[c]),l.length()>Number.EPSILON&&(l.normalize(),i=Math.acos($e.clamp(n[c-1].dot(n[c]),-1,1)),o[c].applyMatrix4(h.makeRotationAxis(l,i))),s[c].crossVectors(n[c],o[c]);if(e===!0)for(i=Math.acos($e.clamp(o[0].dot(o[t]),-1,1)),i/=t,0<n[0].dot(l.crossVectors(o[0],o[t]))&&(i=-i),c=1;c<=t;c++)o[c].applyMatrix4(h.makeRotationAxis(n[c],i*c)),s[c].crossVectors(n[c],o[c]);return{tangents:n,normals:o,binormals:s}},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),zn.prototype=Object.create(he.prototype),zn.prototype.constructor=zn,zn.prototype.isEllipseCurve=!0,zn.prototype.getPoint=function(t,e){e=e||new _;for(var i=2*Math.PI,n=this.aEndAngle-this.aStartAngle,o=Math.abs(n)<Number.EPSILON;0>n;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=o?0:i),this.aClockwise!==!0||o||(n=n===i?-i:n-i),i=this.aStartAngle+t*n,t=this.aX+this.xRadius*Math.cos(i);var s=this.aY+this.yRadius*Math.sin(i);return this.aRotation!==0&&(i=Math.cos(this.aRotation),n=Math.sin(this.aRotation),o=t-this.aX,s-=this.aY,t=o*i-s*n+this.aX,s=o*n+s*i+this.aY),e.set(t,s)},zn.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},zn.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},zn.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Es.prototype=Object.create(zn.prototype),Es.prototype.constructor=Es,Es.prototype.isArcCurve=!0;var un=new S,ga=new Vn,ka=new Vn,dr=new Vn;mn.prototype=Object.create(he.prototype),mn.prototype.constructor=mn,mn.prototype.isCatmullRomCurve3=!0,mn.prototype.getPoint=function(t,e){e=e||new S;var i=this.points,n=i.length;t*=n-(this.closed?0:1);var o=Math.floor(t);if(t-=o,this.closed?o+=0<o?0:(Math.floor(Math.abs(o)/n)+1)*n:t===0&&o===n-1&&(o=n-2,t=1),this.closed||0<o)var s=i[(o-1)%n];else un.subVectors(i[0],i[1]).add(i[0]),s=un;var l=i[o%n],h=i[(o+1)%n];if(this.closed||o+2<n?i=i[(o+2)%n]:(un.subVectors(i[n-1],i[n-2]).add(i[n-1]),i=un),this.curveType==="centripetal"||this.curveType==="chordal"){var c=this.curveType==="chordal"?.5:.25;n=Math.pow(s.distanceToSquared(l),c),o=Math.pow(l.distanceToSquared(h),c),c=Math.pow(h.distanceToSquared(i),c),1e-4>o&&(o=1),1e-4>n&&(n=o),1e-4>c&&(c=o),ga.initNonuniformCatmullRom(s.x,l.x,h.x,i.x,n,o,c),ka.initNonuniformCatmullRom(s.y,l.y,h.y,i.y,n,o,c),dr.initNonuniformCatmullRom(s.z,l.z,h.z,i.z,n,o,c)}else this.curveType==="catmullrom"&&(ga.initCatmullRom(s.x,l.x,h.x,i.x,this.tension),ka.initCatmullRom(s.y,l.y,h.y,i.y,this.tension),dr.initCatmullRom(s.z,l.z,h.z,i.z,this.tension));return e.set(ga.calc(t),ka.calc(t),dr.calc(t)),e},mn.prototype.copy=function(t){he.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},mn.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},mn.prototype.fromJSON=function(t){he.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new S().fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wn.prototype=Object.create(he.prototype),Wn.prototype.constructor=Wn,Wn.prototype.isCubicBezierCurve=!0,Wn.prototype.getPoint=function(t,e){e=e||new _;var i=this.v0,n=this.v1,o=this.v2,s=this.v3;return e.set(_o(t,i.x,n.x,o.x,s.x),_o(t,i.y,n.y,o.y,s.y)),e},Wn.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Wn.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Wn.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},ai.prototype=Object.create(he.prototype),ai.prototype.constructor=ai,ai.prototype.isCubicBezierCurve3=!0,ai.prototype.getPoint=function(t,e){e=e||new S;var i=this.v0,n=this.v1,o=this.v2,s=this.v3;return e.set(_o(t,i.x,n.x,o.x,s.x),_o(t,i.y,n.y,o.y,s.y),_o(t,i.z,n.z,o.z,s.z)),e},ai.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},ai.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},ai.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},jn.prototype=Object.create(he.prototype),jn.prototype.constructor=jn,jn.prototype.isLineCurve=!0,jn.prototype.getPoint=function(t,e){return e=e||new _,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},jn.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},jn.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},jn.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},jn.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},jn.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},cr.prototype=Object.create(he.prototype),cr.prototype.constructor=cr,cr.prototype.isLineCurve3=!0,cr.prototype.getPoint=function(t,e){return e=e||new S,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},cr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},cr.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},cr.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},cr.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Xn.prototype=Object.create(he.prototype),Xn.prototype.constructor=Xn,Xn.prototype.isQuadraticBezierCurve=!0,Xn.prototype.getPoint=function(t,e){e=e||new _;var i=this.v0,n=this.v1,o=this.v2;return e.set(Ur(t,i.x,n.x,o.x),Ur(t,i.y,n.y,o.y)),e},Xn.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Xn.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Xn.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Fr.prototype=Object.create(he.prototype),Fr.prototype.constructor=Fr,Fr.prototype.isQuadraticBezierCurve3=!0,Fr.prototype.getPoint=function(t,e){e=e||new S;var i=this.v0,n=this.v1,o=this.v2;return e.set(Ur(t,i.x,n.x,o.x),Ur(t,i.y,n.y,o.y),Ur(t,i.z,n.z,o.z)),e},Fr.prototype.copy=function(t){return he.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Fr.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Fr.prototype.fromJSON=function(t){return he.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Tr.prototype=Object.create(he.prototype),Tr.prototype.constructor=Tr,Tr.prototype.isSplineCurve=!0,Tr.prototype.getPoint=function(t,e){e=e||new _;var i=this.points,n=(i.length-1)*t;t=Math.floor(n),n-=t;var o=i[t===0?t:t-1],s=i[t],l=i[t>i.length-2?i.length-1:t+1];return i=i[t>i.length-3?i.length-1:t+2],e.set(Nl(n,o.x,s.x,l.x,i.x),Nl(n,o.y,s.y,l.y,i.y)),e},Tr.prototype.copy=function(t){he.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this},Tr.prototype.toJSON=function(){var t=he.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t},Tr.prototype.fromJSON=function(t){he.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new _().fromArray(n))}return this};var Va=Object.freeze({ArcCurve:Es,CatmullRomCurve3:mn,CubicBezierCurve:Wn,CubicBezierCurve3:ai,EllipseCurve:zn,LineCurve:jn,LineCurve3:cr,QuadraticBezierCurve:Xn,QuadraticBezierCurve3:Fr,SplineCurve:Tr});to.prototype=Object.assign(Object.create(he.prototype),{constructor:to,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new jn(e,t))},getPoint:function(t){var e=t*this.getLength(),i=this.getCurveLengths();for(t=0;t<i.length;){if(i[t]>=e)return e=i[t]-e,t=this.curves[t],i=t.getLength(),t.getPointAt(i===0?0:1-e/i);t++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0,n=this.curves.length;i<n;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t},getSpacedPoints:function(t){t===void 0&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e=[],i,n=0,o=this.curves;n<o.length;n++){var s=o[n];s=s.getPoints(s&&s.isEllipseCurve?2*t:s&&(s.isLineCurve||s.isLineCurve3)?1:s&&s.isSplineCurve?t*s.points.length:t);for(var l=0;l<s.length;l++){var h=s[l];i&&i.equals(h)||(e.push(h),i=h)}}return this.autoClose&&1<e.length&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},copy:function(t){he.prototype.copy.call(this,t),this.curves=[];for(var e=0,i=t.curves.length;e<i;e++)this.curves.push(t.curves[e].clone());return this.autoClose=t.autoClose,this},toJSON:function(){var t=he.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,i=this.curves.length;e<i;e++)t.curves.push(this.curves[e].toJSON());return t},fromJSON:function(t){he.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,i=t.curves.length;e<i;e++){var n=t.curves[e];this.curves.push(new Va[n.type]().fromJSON(n))}return this}}),qn.prototype=Object.assign(Object.create(to.prototype),{constructor:qn,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var i=new jn(this.currentPoint.clone(),new _(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){t=new Xn(this.currentPoint.clone(),new _(t,e),new _(i,n)),this.curves.push(t),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,o,s){t=new Wn(this.currentPoint.clone(),new _(t,e),new _(i,n),new _(o,s)),this.curves.push(t),this.currentPoint.set(o,s)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t);e=new Tr(e),this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,o,s){this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,s)},absarc:function(t,e,i,n,o,s){this.absellipse(t,e,i,i,n,o,s)},ellipse:function(t,e,i,n,o,s,l,h){this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,s,l,h)},absellipse:function(t,e,i,n,o,s,l,h){t=new zn(t,e,i,n,o,s,l,h),0<this.curves.length&&(e=t.getPoint(0),e.equals(this.currentPoint)||this.lineTo(e.x,e.y)),this.curves.push(t),t=t.getPoint(1),this.currentPoint.copy(t)},copy:function(t){return to.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=to.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return to.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Nn.prototype=Object.assign(Object.create(qn.prototype),{constructor:Nn,getPointsHoles:function(t){for(var e=[],i=0,n=this.holes.length;i<n;i++)e[i]=this.holes[i].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){qn.prototype.copy.call(this,t),this.holes=[];for(var e=0,i=t.holes.length;e<i;e++)this.holes.push(t.holes[e].clone());return this},toJSON:function(){var t=qn.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,i=this.holes.length;e<i;e++)t.holes.push(this.holes[e].toJSON());return t},fromJSON:function(t){qn.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,i=t.holes.length;e<i;e++){var n=t.holes[e];this.holes.push(new qn().fromJSON(n))}return this}}),Ui.prototype=Object.assign(Object.create(z.prototype),{constructor:Ui,isLight:!0,copy:function(t){return z.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){return t=z.prototype.toJSON.call(this,t),t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}),ta.prototype=Object.assign(Object.create(Ui.prototype),{constructor:ta,isHemisphereLight:!0,copy:function(t){return Ui.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Gr.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return new this.constructor().copy(this)},toJSON:function(){var t={};return this.bias!==0&&(t.bias=this.bias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),ea.prototype=Object.assign(Object.create(Gr.prototype),{constructor:ea,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*$e.RAD2DEG*t.angle,n=this.mapSize.width/this.mapSize.height;t=t.distance||e.far,(i!==e.fov||n!==e.aspect||t!==e.far)&&(e.fov=i,e.aspect=n,e.far=t,e.updateProjectionMatrix())}}),ia.prototype=Object.assign(Object.create(Ui.prototype),{constructor:ia,isSpotLight:!0,copy:function(t){return Ui.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),jo.prototype=Object.assign(Object.create(Ui.prototype),{constructor:jo,isPointLight:!0,copy:function(t){return Ui.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),As.prototype=Object.assign(Object.create(ye.prototype),{constructor:As,isOrthographicCamera:!0,copy:function(t,e){return ye.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this},setViewOffset:function(t,e,i,n,o,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,o=i-t;if(i+=t,t=n+e,e=n-e,this.view!==null&&this.view.enabled){i=this.zoom/(this.view.width/this.view.fullWidth),e=this.zoom/(this.view.height/this.view.fullHeight);var s=(this.right-this.left)/this.view.width;n=(this.top-this.bottom)/this.view.height,o+=this.view.offsetX/i*s,i=o+this.view.width/i*s,t-=this.view.offsetY/e*n,e=t-this.view.height/e*n}this.projectionMatrix.makeOrthographic(o,i,t,e,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=z.prototype.toJSON.call(this,t),t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}),xo.prototype=Object.assign(Object.create(Gr.prototype),{constructor:xo}),Hr.prototype=Object.assign(Object.create(Ui.prototype),{constructor:Hr,isDirectionalLight:!0,copy:function(t){return Ui.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Xo.prototype=Object.assign(Object.create(Ui.prototype),{constructor:Xo,isAmbientLight:!0}),za.prototype=Object.assign(Object.create(Ui.prototype),{constructor:za,isRectAreaLight:!0,copy:function(t){return Ui.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){return t=Ui.prototype.toJSON.call(this,t),t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(Na.prototype,{load:function(t,e,i,n){var o=this,s=new lt(o.manager);s.setPath(o.path),s.load(t,function(l){e(o.parse(JSON.parse(l)))},i,n)},parse:function(t){function e(l){return i[l]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",l),i[l]}var i=this.textures,n=new Xl[t.type];if(t.uuid!==void 0&&(n.uuid=t.uuid),t.name!==void 0&&(n.name=t.name),t.color!==void 0&&n.color.setHex(t.color),t.roughness!==void 0&&(n.roughness=t.roughness),t.metalness!==void 0&&(n.metalness=t.metalness),t.emissive!==void 0&&n.emissive.setHex(t.emissive),t.specular!==void 0&&n.specular.setHex(t.specular),t.shininess!==void 0&&(n.shininess=t.shininess),t.clearCoat!==void 0&&(n.clearCoat=t.clearCoat),t.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=t.clearCoatRoughness),t.vertexColors!==void 0&&(n.vertexColors=t.vertexColors),t.fog!==void 0&&(n.fog=t.fog),t.flatShading!==void 0&&(n.flatShading=t.flatShading),t.blending!==void 0&&(n.blending=t.blending),t.combine!==void 0&&(n.combine=t.combine),t.side!==void 0&&(n.side=t.side),t.opacity!==void 0&&(n.opacity=t.opacity),t.transparent!==void 0&&(n.transparent=t.transparent),t.alphaTest!==void 0&&(n.alphaTest=t.alphaTest),t.depthTest!==void 0&&(n.depthTest=t.depthTest),t.depthWrite!==void 0&&(n.depthWrite=t.depthWrite),t.colorWrite!==void 0&&(n.colorWrite=t.colorWrite),t.wireframe!==void 0&&(n.wireframe=t.wireframe),t.wireframeLinewidth!==void 0&&(n.wireframeLinewidth=t.wireframeLinewidth),t.wireframeLinecap!==void 0&&(n.wireframeLinecap=t.wireframeLinecap),t.wireframeLinejoin!==void 0&&(n.wireframeLinejoin=t.wireframeLinejoin),t.rotation!==void 0&&(n.rotation=t.rotation),t.linewidth!==1&&(n.linewidth=t.linewidth),t.dashSize!==void 0&&(n.dashSize=t.dashSize),t.gapSize!==void 0&&(n.gapSize=t.gapSize),t.scale!==void 0&&(n.scale=t.scale),t.polygonOffset!==void 0&&(n.polygonOffset=t.polygonOffset),t.polygonOffsetFactor!==void 0&&(n.polygonOffsetFactor=t.polygonOffsetFactor),t.polygonOffsetUnits!==void 0&&(n.polygonOffsetUnits=t.polygonOffsetUnits),t.skinning!==void 0&&(n.skinning=t.skinning),t.morphTargets!==void 0&&(n.morphTargets=t.morphTargets),t.dithering!==void 0&&(n.dithering=t.dithering),t.visible!==void 0&&(n.visible=t.visible),t.userData!==void 0&&(n.userData=t.userData),t.uniforms!==void 0)for(var o in t.uniforms){var s=t.uniforms[o];switch(n.uniforms[o]={},s.type){case"t":n.uniforms[o].value=e(s.value);break;case"c":n.uniforms[o].value=new Y().setHex(s.value);break;case"v2":n.uniforms[o].value=new _().fromArray(s.value);break;case"v3":n.uniforms[o].value=new S().fromArray(s.value);break;case"v4":n.uniforms[o].value=new nt().fromArray(s.value);break;case"m4":n.uniforms[o].value=new pt().fromArray(s.value);break;default:n.uniforms[o].value=s.value}}return t.defines!==void 0&&(n.defines=t.defines),t.vertexShader!==void 0&&(n.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(n.fragmentShader=t.fragmentShader),t.shading!==void 0&&(n.flatShading=t.shading===1),t.size!==void 0&&(n.size=t.size),t.sizeAttenuation!==void 0&&(n.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(n.map=e(t.map)),t.alphaMap!==void 0&&(n.alphaMap=e(t.alphaMap),n.transparent=!0),t.bumpMap!==void 0&&(n.bumpMap=e(t.bumpMap)),t.bumpScale!==void 0&&(n.bumpScale=t.bumpScale),t.normalMap!==void 0&&(n.normalMap=e(t.normalMap)),t.normalMapType!==void 0&&(n.normalMapType=t.normalMapType),t.normalScale!==void 0&&(o=t.normalScale,Array.isArray(o)===!1&&(o=[o,o]),n.normalScale=new _().fromArray(o)),t.displacementMap!==void 0&&(n.displacementMap=e(t.displacementMap)),t.displacementScale!==void 0&&(n.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(n.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(n.roughnessMap=e(t.roughnessMap)),t.metalnessMap!==void 0&&(n.metalnessMap=e(t.metalnessMap)),t.emissiveMap!==void 0&&(n.emissiveMap=e(t.emissiveMap)),t.emissiveIntensity!==void 0&&(n.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(n.specularMap=e(t.specularMap)),t.envMap!==void 0&&(n.envMap=e(t.envMap)),t.envMapIntensity!==void 0&&(n.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(n.reflectivity=t.reflectivity),t.lightMap!==void 0&&(n.lightMap=e(t.lightMap)),t.lightMapIntensity!==void 0&&(n.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(n.aoMap=e(t.aoMap)),t.aoMapIntensity!==void 0&&(n.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(n.gradientMap=e(t.gradientMap)),n},setPath:function(t){return this.path=t,this},setTextures:function(t){return this.textures=t,this}});var Qo={decodeText:function(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);for(var e="",i=0,n=t.length;i<n;i++)e+=String.fromCharCode(t[i]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return e===-1?"./":t.substr(0,e+1)}};Object.assign(ol.prototype,{load:function(t,e,i,n){var o=this,s=new lt(o.manager);s.setPath(o.path),s.load(t,function(l){e(o.parse(JSON.parse(l)))},i,n)},parse:function(t){var e=new Ft,i=t.data.index;i!==void 0&&(i=new Eo[i.type](i.array),e.setIndex(new it(i,1)));var n=t.data.attributes;for(s in n){var o=n[s];i=new Eo[o.type](o.array),e.addAttribute(s,new it(i,o.itemSize,o.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(s!==void 0)for(i=0,n=s.length;i!==n;++i)o=s[i],e.addGroup(o.start,o.count,o.materialIndex);return t=t.data.boundingSphere,t!==void 0&&(s=new S,t.center!==void 0&&s.fromArray(t.center),e.boundingSphere=new Ut(s,t.radius)),e},setPath:function(t){return this.path=t,this}});var Eo={Int8Array,Uint8Array,Uint8ClampedArray:typeof Uint8ClampedArray<"u"?Uint8ClampedArray:Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};eo.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,i=0,n=e.length;i<n;i+=2){var o=e[i+1];if(e[i].test(t))return o}return null}},Object.assign(eo.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,i){for(var n=[],o=0;o<t.length;++o)n[o]=this.createMaterial(t[o],e,i);return n},createMaterial:function(){var t={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},e=new Y,i=new Yi,n=new Na;return function(o,s,l){function h(v,w,P,R,I){v=s+v;var Q=eo.Handlers.get(v);return Q!==null?v=Q.load(v):(i.setCrossOrigin(l),v=i.load(v)),w!==void 0&&(v.repeat.fromArray(w),w[0]!==1&&(v.wrapS=1e3),w[1]!==1&&(v.wrapT=1e3)),P!==void 0&&v.offset.fromArray(P),R!==void 0&&(R[0]==="repeat"&&(v.wrapS=1e3),R[0]==="mirror"&&(v.wrapS=1002),R[1]==="repeat"&&(v.wrapT=1e3),R[1]==="mirror"&&(v.wrapT=1002)),I!==void 0&&(v.anisotropy=I),w=$e.generateUUID(),c[w]=v,w}var c={},p={uuid:$e.generateUUID(),type:"MeshLambertMaterial"},f;for(f in o){var d=o[f];switch(f){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":p.name=d;break;case"blending":p.blending=t[d];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",f,"is no longer supported.");break;case"colorDiffuse":p.color=e.fromArray(d).getHex();break;case"colorSpecular":p.specular=e.fromArray(d).getHex();break;case"colorEmissive":p.emissive=e.fromArray(d).getHex();break;case"specularCoef":p.shininess=d;break;case"shading":d.toLowerCase()==="basic"&&(p.type="MeshBasicMaterial"),d.toLowerCase()==="phong"&&(p.type="MeshPhongMaterial"),d.toLowerCase()==="standard"&&(p.type="MeshStandardMaterial");break;case"mapDiffuse":p.map=h(d,o.mapDiffuseRepeat,o.mapDiffuseOffset,o.mapDiffuseWrap,o.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":p.emissiveMap=h(d,o.mapEmissiveRepeat,o.mapEmissiveOffset,o.mapEmissiveWrap,o.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":p.lightMap=h(d,o.mapLightRepeat,o.mapLightOffset,o.mapLightWrap,o.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":p.aoMap=h(d,o.mapAORepeat,o.mapAOOffset,o.mapAOWrap,o.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":p.bumpMap=h(d,o.mapBumpRepeat,o.mapBumpOffset,o.mapBumpWrap,o.mapBumpAnisotropy);break;case"mapBumpScale":p.bumpScale=d;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":p.normalMap=h(d,o.mapNormalRepeat,o.mapNormalOffset,o.mapNormalWrap,o.mapNormalAnisotropy);break;case"mapNormalFactor":p.normalScale=d;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":p.specularMap=h(d,o.mapSpecularRepeat,o.mapSpecularOffset,o.mapSpecularWrap,o.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":p.metalnessMap=h(d,o.mapMetalnessRepeat,o.mapMetalnessOffset,o.mapMetalnessWrap,o.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":p.roughnessMap=h(d,o.mapRoughnessRepeat,o.mapRoughnessOffset,o.mapRoughnessWrap,o.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":p.alphaMap=h(d,o.mapAlphaRepeat,o.mapAlphaOffset,o.mapAlphaWrap,o.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":p.side=1;break;case"doubleSided":p.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),p.opacity=d;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":p[f]=d;break;case"vertexColors":d===!0&&(p.vertexColors=2),d==="face"&&(p.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",f,d)}}return p.type==="MeshBasicMaterial"&&delete p.emissive,p.type!=="MeshPhongMaterial"&&delete p.specular,1>p.opacity&&(p.transparent=!0),n.setTextures(c),n.parse(p)}}()}),Object.assign(qo.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,s=this.path===void 0?Qo.extractUrlBase(t):this.path,l=new lt(this.manager);l.setPath(this.path),l.setWithCredentials(this.withCredentials),l.load(t,function(h){h=JSON.parse(h);var c=h.metadata;if(c!==void 0&&(c=c.type,c!==void 0&&c.toLowerCase()==="object")){console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");return}h=o.parse(h,s),e(h.geometry,h.materials)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(){return function(t,e){t.data!==void 0&&(t=t.data),t.scale=t.scale!==void 0?1/t.scale:1;var i=new X,n=t,o,s,l,h=n.faces,c=n.vertices,p=n.normals,f=n.colors,d=n.scale,v=0;if(n.uvs!==void 0){for(o=0;o<n.uvs.length;o++)n.uvs[o].length&&v++;for(o=0;o<v;o++)i.faceVertexUvs[o]=[]}var w=0;for(l=c.length;w<l;)o=new S,o.x=c[w++]*d,o.y=c[w++]*d,o.z=c[w++]*d,i.vertices.push(o);for(w=0,l=h.length;w<l;){c=h[w++];var P=c&1,R=c&2;o=c&8;var I=c&16,Q=c&32;if(d=c&64,c&=128,P){P=new B,P.a=h[w],P.b=h[w+1],P.c=h[w+3];var W=new B;if(W.a=h[w+1],W.b=h[w+2],W.c=h[w+3],w+=4,R&&(R=h[w++],P.materialIndex=R,W.materialIndex=R),R=i.faces.length,o)for(o=0;o<v;o++){var st=n.uvs[o];for(i.faceVertexUvs[o][R]=[],i.faceVertexUvs[o][R+1]=[],s=0;4>s;s++){var K=h[w++],wt=st[2*K];K=st[2*K+1],wt=new _(wt,K),s!==2&&i.faceVertexUvs[o][R].push(wt),s!==0&&i.faceVertexUvs[o][R+1].push(wt)}}if(I&&(I=3*h[w++],P.normal.set(p[I++],p[I++],p[I]),W.normal.copy(P.normal)),Q)for(o=0;4>o;o++)I=3*h[w++],Q=new S(p[I++],p[I++],p[I]),o!==2&&P.vertexNormals.push(Q),o!==0&&W.vertexNormals.push(Q);if(d&&(d=h[w++],d=f[d],P.color.setHex(d),W.color.setHex(d)),c)for(o=0;4>o;o++)d=h[w++],d=f[d],o!==2&&P.vertexColors.push(new Y(d)),o!==0&&W.vertexColors.push(new Y(d));i.faces.push(P),i.faces.push(W)}else{if(P=new B,P.a=h[w++],P.b=h[w++],P.c=h[w++],R&&(R=h[w++],P.materialIndex=R),R=i.faces.length,o)for(o=0;o<v;o++)for(st=n.uvs[o],i.faceVertexUvs[o][R]=[],s=0;3>s;s++)K=h[w++],wt=st[2*K],K=st[2*K+1],wt=new _(wt,K),i.faceVertexUvs[o][R].push(wt);if(I&&(I=3*h[w++],P.normal.set(p[I++],p[I++],p[I])),Q)for(o=0;3>o;o++)I=3*h[w++],Q=new S(p[I++],p[I++],p[I]),P.vertexNormals.push(Q);if(d&&(d=h[w++],P.color.setHex(f[d])),c)for(o=0;3>o;o++)d=h[w++],P.vertexColors.push(new Y(f[d]));i.faces.push(P)}}if(n=t,w=n.influencesPerVertex!==void 0?n.influencesPerVertex:2,n.skinWeights)for(l=0,h=n.skinWeights.length;l<h;l+=w)i.skinWeights.push(new nt(n.skinWeights[l],1<w?n.skinWeights[l+1]:0,2<w?n.skinWeights[l+2]:0,3<w?n.skinWeights[l+3]:0));if(n.skinIndices)for(l=0,h=n.skinIndices.length;l<h;l+=w)i.skinIndices.push(new nt(n.skinIndices[l],1<w?n.skinIndices[l+1]:0,2<w?n.skinIndices[l+2]:0,3<w?n.skinIndices[l+3]:0));if(i.bones=n.bones,i.bones&&0<i.bones.length&&(i.skinWeights.length!==i.skinIndices.length||i.skinIndices.length!==i.vertices.length)&&console.warn("When skinning, number of vertices ("+i.vertices.length+"), skinIndices ("+i.skinIndices.length+"), and skinWeights ("+i.skinWeights.length+") should match."),l=t,h=l.scale,l.morphTargets!==void 0)for(n=0,w=l.morphTargets.length;n<w;n++)for(i.morphTargets[n]={},i.morphTargets[n].name=l.morphTargets[n].name,i.morphTargets[n].vertices=[],p=i.morphTargets[n].vertices,f=l.morphTargets[n].vertices,v=0,c=f.length;v<c;v+=3)d=new S,d.x=f[v]*h,d.y=f[v+1]*h,d.z=f[v+2]*h,p.push(d);if(l.morphColors!==void 0&&0<l.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),h=i.faces,l=l.morphColors[0].colors,n=0,w=h.length;n<w;n++)h[n].color.fromArray(l,3*n);for(l=t,n=[],w=[],l.animation!==void 0&&w.push(l.animation),l.animations!==void 0&&(l.animations.length?w=w.concat(l.animations):w.push(l.animations)),l=0;l<w.length;l++)(h=tr.parseAnimation(w[l],i.bones))&&n.push(h);return i.morphTargets&&(w=tr.CreateClipsFromMorphTargetSequences(i.morphTargets,10),n=n.concat(w)),0<n.length&&(i.animations=n),i.computeFaceNormals(),i.computeBoundingSphere(),t.materials===void 0||t.materials.length===0?{geometry:i}:(t=eo.prototype.initMaterials(t.materials,this.resourcePath||e,this.crossOrigin),{geometry:i,materials:t})}}()}),Object.assign(na.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,s=this.path===void 0?Qo.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||s,s=new lt(o.manager),s.setPath(this.path),s.load(t,function(l){var h=null;try{h=JSON.parse(l)}catch(c){n!==void 0&&n(c),console.error("THREE:ObjectLoader: Can't parse "+t+".",c.message);return}l=h.metadata,l===void 0||l.type===void 0||l.type.toLowerCase()==="geometry"?console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead."):o.parse(h,e)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var i=this.parseShape(t.shapes);i=this.parseGeometries(t.geometries,i);var n=this.parseImages(t.images,function(){e!==void 0&&e(o)});n=this.parseTextures(t.textures,n),n=this.parseMaterials(t.materials,n);var o=this.parseObject(t.object,i,n);return t.animations&&(o.animations=this.parseAnimations(t.animations)),t.images!==void 0&&t.images.length!==0||e===void 0||e(o),o},parseShape:function(t){var e={};if(t!==void 0)for(var i=0,n=t.length;i<n;i++){var o=new Nn().fromJSON(t[i]);e[o.uuid]=o}return e},parseGeometries:function(t,e){var i={};if(t!==void 0)for(var n=new qo,o=new ol,s=0,l=t.length;s<l;s++){var h=t[s];switch(h.type){case"PlaneGeometry":case"PlaneBufferGeometry":var c=new tn[h.type](h.width,h.height,h.widthSegments,h.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":c=new tn[h.type](h.width,h.height,h.depth,h.widthSegments,h.heightSegments,h.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":c=new tn[h.type](h.radius,h.segments,h.thetaStart,h.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":c=new tn[h.type](h.radiusTop,h.radiusBottom,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":c=new tn[h.type](h.radius,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":c=new tn[h.type](h.radius,h.widthSegments,h.heightSegments,h.phiStart,h.phiLength,h.thetaStart,h.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":c=new tn[h.type](h.radius,h.detail);break;case"RingGeometry":case"RingBufferGeometry":c=new tn[h.type](h.innerRadius,h.outerRadius,h.thetaSegments,h.phiSegments,h.thetaStart,h.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":c=new tn[h.type](h.radius,h.tube,h.radialSegments,h.tubularSegments,h.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":c=new tn[h.type](h.radius,h.tube,h.tubularSegments,h.radialSegments,h.p,h.q);break;case"LatheGeometry":case"LatheBufferGeometry":c=new tn[h.type](h.points,h.segments,h.phiStart,h.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":c=new tn[h.type](h.vertices,h.indices,h.radius,h.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":c=[];for(var p=0,f=h.shapes.length;p<f;p++){var d=e[h.shapes[p]];c.push(d)}c=new tn[h.type](c,h.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(c=[],p=0,f=h.shapes.length;p<f;p++)d=e[h.shapes[p]],c.push(d);p=h.options.extrudePath,p!==void 0&&(h.options.extrudePath=new Va[p.type]().fromJSON(p)),c=new tn[h.type](c,h.options);break;case"BufferGeometry":c=o.parse(h);break;case"Geometry":c=n.parse(h,this.resourcePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+h.type+'"');continue}c.uuid=h.uuid,h.name!==void 0&&(c.name=h.name),c.isBufferGeometry===!0&&h.userData!==void 0&&(c.userData=h.userData),i[h.uuid]=c}return i},parseMaterials:function(t,e){var i={},n={};if(t!==void 0){var o=new Na;o.setTextures(e),e=0;for(var s=t.length;e<s;e++){var l=t[e];if(l.type==="MultiMaterial"){for(var h=[],c=0;c<l.materials.length;c++){var p=l.materials[c];i[p.uuid]===void 0&&(i[p.uuid]=o.parse(p)),h.push(i[p.uuid])}n[l.uuid]=h}else n[l.uuid]=o.parse(l),i[l.uuid]=n[l.uuid]}}return n},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],o=tr.parse(n);n.uuid!==void 0&&(o.uuid=n.uuid),e.push(o)}return e},parseImages:function(t,e){function i(v){return n.manager.itemStart(v),s.load(v,function(){n.manager.itemEnd(v)},void 0,function(){n.manager.itemError(v),n.manager.itemEnd(v)})}var n=this,o={};if(t!==void 0&&0<t.length){e=new yo(e);var s=new We(e);s.setCrossOrigin(this.crossOrigin),e=0;for(var l=t.length;e<l;e++){var h=t[e],c=h.url;if(Array.isArray(c)){o[h.uuid]=[];for(var p=0,f=c.length;p<f;p++){var d=c[p];d=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(d)?d:n.resourcePath+d,o[h.uuid].push(i(d))}}else d=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h.url)?h.url:n.resourcePath+h.url,o[h.uuid]=i(d)}}return o},parseTextures:function(t,e){function i(c,p){return typeof c=="number"?c:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",c),p[c])}var n={};if(t!==void 0)for(var o=0,s=t.length;o<s;o++){var l=t[o];l.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',l.uuid),e[l.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",l.image);var h=Array.isArray(e[l.image])?new A(e[l.image]):new kt(e[l.image]);h.needsUpdate=!0,h.uuid=l.uuid,l.name!==void 0&&(h.name=l.name),l.mapping!==void 0&&(h.mapping=i(l.mapping,ql)),l.offset!==void 0&&h.offset.fromArray(l.offset),l.repeat!==void 0&&h.repeat.fromArray(l.repeat),l.center!==void 0&&h.center.fromArray(l.center),l.rotation!==void 0&&(h.rotation=l.rotation),l.wrap!==void 0&&(h.wrapS=i(l.wrap[0],bn),h.wrapT=i(l.wrap[1],bn)),l.format!==void 0&&(h.format=l.format),l.minFilter!==void 0&&(h.minFilter=i(l.minFilter,Wa)),l.magFilter!==void 0&&(h.magFilter=i(l.magFilter,Wa)),l.anisotropy!==void 0&&(h.anisotropy=l.anisotropy),l.flipY!==void 0&&(h.flipY=l.flipY),n[l.uuid]=h}return n},parseObject:function(t,e,i){function n(p){return e[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",p),e[p]}function o(p){if(p!==void 0){if(Array.isArray(p)){for(var f=[],d=0,v=p.length;d<v;d++){var w=p[d];i[w]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",w),f.push(i[w])}return f}return i[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",p),i[p]}}switch(t.type){case"Scene":var s=new Ln;t.background!==void 0&&Number.isInteger(t.background)&&(s.background=new Y(t.background)),t.fog!==void 0&&(t.fog.type==="Fog"?s.fog=new ln(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(s.fog=new de(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":s=new ee(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(s.focus=t.focus),t.zoom!==void 0&&(s.zoom=t.zoom),t.filmGauge!==void 0&&(s.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(s.filmOffset=t.filmOffset),t.view!==void 0&&(s.view=Object.assign({},t.view));break;case"OrthographicCamera":s=new As(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(s.zoom=t.zoom),t.view!==void 0&&(s.view=Object.assign({},t.view));break;case"AmbientLight":s=new Xo(t.color,t.intensity);break;case"DirectionalLight":s=new Hr(t.color,t.intensity);break;case"PointLight":s=new jo(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":s=new za(t.color,t.intensity,t.width,t.height);break;case"SpotLight":s=new ia(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":s=new ta(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":s=n(t.geometry);var l=o(t.material);s=s.bones&&0<s.bones.length?new Ti(s,l):new Fi(s,l);break;case"LOD":s=new ki;break;case"Line":s=new Li(n(t.geometry),o(t.material),t.mode);break;case"LineLoop":s=new Ir(n(t.geometry),o(t.material));break;case"LineSegments":s=new ei(n(t.geometry),o(t.material));break;case"PointCloud":case"Points":s=new ps(n(t.geometry),o(t.material));break;case"Sprite":s=new Hi(o(t.material));break;case"Group":s=new Ye;break;default:s=new z}if(s.uuid=t.uuid,t.name!==void 0&&(s.name=t.name),t.matrix!==void 0?(s.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=t.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(t.position!==void 0&&s.position.fromArray(t.position),t.rotation!==void 0&&s.rotation.fromArray(t.rotation),t.quaternion!==void 0&&s.quaternion.fromArray(t.quaternion),t.scale!==void 0&&s.scale.fromArray(t.scale)),t.castShadow!==void 0&&(s.castShadow=t.castShadow),t.receiveShadow!==void 0&&(s.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(s.shadow.bias=t.shadow.bias),t.shadow.radius!==void 0&&(s.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(s.visible=t.visible),t.frustumCulled!==void 0&&(s.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(s.renderOrder=t.renderOrder),t.userData!==void 0&&(s.userData=t.userData),t.layers!==void 0&&(s.layers.mask=t.layers),t.children!==void 0){l=t.children;for(var h=0;h<l.length;h++)s.add(this.parseObject(l[h],e,i))}if(t.type==="LOD")for(t=t.levels,l=0;l<t.length;l++){h=t[l];var c=s.getObjectByProperty("uuid",h.object);c!==void 0&&s.addLevel(c,h.distance)}return s}});var ql={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},bn={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Wa={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};sl.prototype={constructor:sl,setOptions:function(t){return this.options=t,this},load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var o=this,s=Wr.get(t);if(s!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;fetch(t).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,o.options)}).then(function(l){Wr.add(t,l),e&&e(l),o.manager.itemEnd(t)}).catch(function(l){n&&n(l),o.manager.itemError(t),o.manager.itemEnd(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Ba.prototype,{moveTo:function(t,e){this.currentPath=new qn,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,i,n){this.currentPath.quadraticCurveTo(t,e,i,n)},bezierCurveTo:function(t,e,i,n,o,s){this.currentPath.bezierCurveTo(t,e,i,n,o,s)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(I){for(var Q=[],W=0,st=I.length;W<st;W++){var K=I[W],wt=new Nn;wt.curves=K.curves,Q.push(wt)}return Q}function n(I,Q){for(var W=Q.length,st=!1,K=W-1,wt=0;wt<W;K=wt++){var C=Q[K],D=Q[wt],ct=D.x-C.x,Dt=D.y-C.y;if(Math.abs(Dt)>Number.EPSILON){if(0>Dt&&(C=Q[wt],ct=-ct,D=Q[K],Dt=-Dt),!(I.y<C.y||I.y>D.y))if(I.y===C.y){if(I.x===C.x)return!0}else{if(K=Dt*(I.x-C.x)-ct*(I.y-C.y),K===0)return!0;0>K||(st=!st)}}else if(I.y===C.y&&(D.x<=I.x&&I.x<=C.x||C.x<=I.x&&I.x<=D.x))return!0}return st}var o=Vr.isClockWise,s=this.subPaths;if(s.length===0)return[];if(e===!0)return i(s);if(e=[],s.length===1){var l=s[0],h=new Nn;return h.curves=l.curves,e.push(h),e}var c=!o(s[0].getPoints());c=t?!c:c,h=[];var p=[],f=[],d=0;p[d]=void 0,f[d]=[];for(var v=0,w=s.length;v<w;v++){l=s[v];var P=l.getPoints(),R=o(P);(R=t?!R:R)?(!c&&p[d]&&d++,p[d]={s:new Nn,p:P},p[d].s.curves=l.curves,c&&d++,f[d]=[]):f[d].push({h:l,p:P[0]})}if(!p[0])return i(s);if(1<p.length){for(v=!1,t=[],o=0,s=p.length;o<s;o++)h[o]=[];for(o=0,s=p.length;o<s;o++)for(l=f[o],R=0;R<l.length;R++){for(c=l[R],d=!0,P=0;P<p.length;P++)n(c.p,p[P].p)&&(o!==P&&t.push({froms:o,tos:P,hole:R}),d?(d=!1,h[P].push(c)):v=!0);d&&h[o].push(c)}0<t.length&&(v||(f=h))}for(v=0,o=p.length;v<o;v++)for(h=p[v].s,e.push(h),t=f[v],s=0,l=t.length;s<l;s++)h.holes.push(t[s].h);return e}}),Object.assign(al.prototype,{isFont:!0,generateShapes:function(t,e){e===void 0&&(e=100);var i=[],n=e;e=this.data;var o=Array.from?Array.from(t):String(t).split("");n/=e.resolution;var s=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*n;t=[];for(var l=0,h=0,c=0;c<o.length;c++){var p=o[c];if(p===`
|
|
2571
|
-
`)l=0,h-=s;else{var f=n,d=l,v=h;if(p=e.glyphs[p]||e.glyphs["?"]){var w=new Ba;if(p.o)for(var P=p._cachedOutline||(p._cachedOutline=p.o.split(" ")),R=0,I=P.length;R<I;)switch(P[R++]){case"m":var Q=P[R++]*f+d,W=P[R++]*f+v;w.moveTo(Q,W);break;case"l":Q=P[R++]*f+d,W=P[R++]*f+v,w.lineTo(Q,W);break;case"q":var st=P[R++]*f+d,K=P[R++]*f+v,wt=P[R++]*f+d,C=P[R++]*f+v;w.quadraticCurveTo(wt,C,st,K);break;case"b":st=P[R++]*f+d,K=P[R++]*f+v,wt=P[R++]*f+d,C=P[R++]*f+v,Q=P[R++]*f+d,W=P[R++]*f+v,w.bezierCurveTo(wt,C,Q,W,st,K)}f={offsetX:p.ha*f,path:w}}else f=void 0;l+=f.offsetX,t.push(f.path)}}for(e=0,o=t.length;e<o;e++)Array.prototype.push.apply(i,t[e].toShapes());return i}}),Object.assign(Bl.prototype,{load:function(t,e,i,n){var o=this,s=new lt(this.manager);s.setPath(this.path),s.load(t,function(l){try{var h=JSON.parse(l)}catch{console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),h=JSON.parse(l.substring(65,l.length-2))}l=o.parse(h),e&&e(l)},i,n)},parse:function(t){return new al(t)},setPath:function(t){return this.path=t,this}});var ja,yl={getContext:function(){return ja===void 0&&(ja=new(window.AudioContext||window.webkitAudioContext)),ja},setContext:function(t){ja=t}};Object.assign(Ki.prototype,{load:function(t,e,i,n){var o=new lt(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.load(t,function(s){s=s.slice(0),yl.getContext().decodeAudioData(s,function(l){e(l)})},i,n)},setPath:function(t){return this.path=t,this}}),Object.assign(An.prototype,{update:function(){var t,e,i,n,o,s,l,h,c=new pt,p=new pt;return function(f){if(t!==this||e!==f.focus||i!==f.fov||n!==f.aspect*this.aspect||o!==f.near||s!==f.far||l!==f.zoom||h!==this.eyeSep){t=this,e=f.focus,i=f.fov,n=f.aspect*this.aspect,o=f.near,s=f.far,l=f.zoom;var d=f.projectionMatrix.clone();h=this.eyeSep/2;var v=h*o/e,w=o*Math.tan($e.DEG2RAD*i*.5)/l;p.elements[12]=-h,c.elements[12]=h;var P=-w*n+v,R=w*n+v;d.elements[0]=2*o/(R-P),d.elements[8]=(R+P)/(R-P),this.cameraL.projectionMatrix.copy(d),P=-w*n-v,R=w*n-v,d.elements[0]=2*o/(R-P),d.elements[8]=(R+P)/(R-P),this.cameraR.projectionMatrix.copy(d)}this.cameraL.matrixWorld.copy(f.matrixWorld).multiply(p),this.cameraR.matrixWorld.copy(f.matrixWorld).multiply(c)}}()}),ra.prototype=Object.create(z.prototype),ra.prototype.constructor=ra,Object.assign(ll.prototype,{start:function(){this.oldTime=this.startTime=(typeof performance>"u"?Date:performance).now(),this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.autoStart=this.running=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=(typeof performance>"u"?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Ua.prototype=Object.assign(Object.create(z.prototype),{constructor:Ua,getInput:function(){return this.gain},removeFilter:function(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this},getFilter:function(){return this.filter},setFilter:function(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this},updateMatrixWorld:function(){var t=new S,e=new gt,i=new S,n=new S,o=new ll;return function(s){z.prototype.updateMatrixWorld.call(this,s),s=this.context.listener;var l=this.up;if(this.timeDelta=o.getDelta(),this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),s.positionX){var h=this.context.currentTime+this.timeDelta;s.positionX.linearRampToValueAtTime(t.x,h),s.positionY.linearRampToValueAtTime(t.y,h),s.positionZ.linearRampToValueAtTime(t.z,h),s.forwardX.linearRampToValueAtTime(n.x,h),s.forwardY.linearRampToValueAtTime(n.y,h),s.forwardZ.linearRampToValueAtTime(n.z,h),s.upX.linearRampToValueAtTime(l.x,h),s.upY.linearRampToValueAtTime(l.y,h),s.upZ.linearRampToValueAtTime(l.z,h)}else s.setPosition(t.x,t.y,t.z),s.setOrientation(n.x,n.y,n.z,l.x,l.y,l.z)}}()}),Ps.prototype=Object.assign(Object.create(z.prototype),{constructor:Ps,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setMediaElementSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(this.isPlaying===!0)console.warn("THREE.Audio: Audio is already playing.");else if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else{var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}},pause:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.isPlaying===!0&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.source.onended=null,this.offset=0,this.isPlaying=!1,this},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),this.isPlaying===!0?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.playbackRate=t,this.isPlaying===!0&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.loop=t,this.isPlaying===!0&&(this.source.loop=this.loop),this},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),oa.prototype=Object.assign(Object.create(Ps.prototype),{constructor:oa,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){return this.panner.refDistance=t,this},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){return this.panner.rolloffFactor=t,this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){return this.panner.distanceModel=t,this},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){return this.panner.maxDistance=t,this},setDirectionalCone:function(t,e,i){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=i,this},updateMatrixWorld:function(){var t=new S,e=new gt,i=new S,n=new S;return function(o){if(z.prototype.updateMatrixWorld.call(this,o),o=this.panner,this.matrixWorld.decompose(t,e,i),n.set(0,0,1).applyQuaternion(e),o.positionX){var s=this.context.currentTime+this.listener.timeDelta;o.positionX.linearRampToValueAtTime(t.x,s),o.positionY.linearRampToValueAtTime(t.y,s),o.positionZ.linearRampToValueAtTime(t.z,s),o.orientationX.linearRampToValueAtTime(n.x,s),o.orientationY.linearRampToValueAtTime(n.y,s),o.orientationZ.linearRampToValueAtTime(n.z,s)}else o.setPosition(t.x,t.y,t.z),o.setOrientation(n.x,n.y,n.z)}}()}),Object.assign(Yo.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),i=0;i<e.length;i++)t+=e[i];return t/e.length}}),Object.assign(sa.prototype,{accumulate:function(t,e){var i=this.buffer,n=this.valueSize;t=t*n+n;var o=this.cumulativeWeight;if(o===0){for(o=0;o!==n;++o)i[t+o]=i[o];o=e}else o+=e,this._mixBufferRegion(i,t,0,e/o,n);this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,i=this.buffer;t=t*e+e;var n=this.cumulativeWeight,o=this.binding;this.cumulativeWeight=0,1>n&&this._mixBufferRegion(i,t,3*e,1-n,e),n=e;for(var s=e+e;n!==s;++n)if(i[n]!==i[n+e]){o.setValue(i,t);break}},saveOriginalState:function(){var t=this.buffer,e=this.valueSize,i=3*e;this.binding.getValue(t,i);for(var n=e;n!==i;++n)t[n]=t[i+n%e];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(t,e,i,n,o){if(.5<=n)for(n=0;n!==o;++n)t[e+n]=t[i+n]},_slerp:function(t,e,i,n){gt.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,o){for(var s=1-n,l=0;l!==o;++l){var h=e+l;t[h]=t[h]*s+t[i+l]*n}}}),Object.assign(Zo.prototype,{getValue:function(t,e){this.bind();var i=this._bindings[this._targetGroup.nCachedObjects_];i!==void 0&&i.getValue(t,e)},setValue:function(t,e){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,o=i.length;n!==o;++n)i[n].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}),Object.assign(hn,{Composite:Zo,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new hn.Composite(t,e,i):new hn(t,e,i)},sanitizeNodeName:function(){var t=/[\[\]\.:\/]/g;return function(e){return e.replace(/\s/g,"_").replace(t,"")}}(),parseTrackName:function(){var t="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",e=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");t=/(WCOD+)?/.source.replace("WCOD",t);var i=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),n=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),o=new RegExp("^"+e+t+i+n+"$"),s=["material","materials","bones"];return function(l){var h=o.exec(l);if(!h)throw Error("PropertyBinding: Cannot parse trackName: "+l);h={nodeName:h[2],objectName:h[3],objectIndex:h[4],propertyName:h[5],propertyIndex:h[6]};var c=h.nodeName&&h.nodeName.lastIndexOf(".");if(c!==void 0&&c!==-1){var p=h.nodeName.substring(c+1);s.indexOf(p)!==-1&&(h.nodeName=h.nodeName.substring(0,c),h.objectName=p)}if(h.propertyName===null||h.propertyName.length===0)throw Error("PropertyBinding: can not parse propertyName from trackName: "+l);return h}}(),findNode:function(t,e){if(!e||e===""||e==="root"||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){var i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){var n=function(o){for(var s=0;s<o.length;s++){var l=o[s];if(l.name===e||l.uuid===e||(l=n(l.children)))return l}return null};if(t=n(t.children))return t}return null}}),Object.assign(hn.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=hn.findNode(this.rootNode,e.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var s=e.objectIndex;switch(i){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}for(t=t.skeleton.bones,i=0;i<t.length;i++)if(t[i].name===s){s=i;break}break;default:if(t[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(s!==void 0){if(t[s]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[s]}}if(s=t[n],s===void 0)console.error("THREE.PropertyBinding: Trying to update property for track: "+e.nodeName+"."+n+" but it wasn't found.",t);else{if(e=this.Versioning.None,this.targetObject=t,t.needsUpdate!==void 0?e=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(e=this.Versioning.MatrixWorldNeedsUpdate),i=this.BindingType.Direct,o!==void 0){if(n==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}for(i=0;i<this.node.geometry.morphAttributes.position.length;i++)if(t.geometry.morphAttributes.position[i].name===o){o=i;break}}else{if(!t.geometry.morphTargets){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);return}for(i=0;i<this.node.geometry.morphTargets.length;i++)if(t.geometry.morphTargets[i].name===o){o=i;break}}}i=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=o}else s.fromArray!==void 0&&s.toArray!==void 0?(i=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(i=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=n;this.getValue=this.GetterByBindingType[i],this.setValue=this.SetterByBindingTypeAndVersioning[i][e]}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(hn.prototype,{_getValue_unbound:hn.prototype.getValue,_setValue_unbound:hn.prototype.setValue}),Object.assign(Ls.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._paths,s=this._parsedPaths,l=this._bindings,h=l.length,c=void 0,p=0,f=arguments.length;p!==f;++p){var d=arguments[p],v=d.uuid,w=n[v];if(w===void 0){w=e++,n[v]=w,t.push(d),v=0;for(var P=h;v!==P;++v)l[v].push(new hn(d,o[v],s[v]))}else if(w<i){c=t[w];var R=--i;for(P=t[R],n[P.uuid]=w,t[w]=P,n[v]=R,t[R]=d,v=0,P=h;v!==P;++v){var I=l[v],Q=I[w];I[w]=I[R],Q===void 0&&(Q=new hn(d,o[v],s[v])),I[R]=Q}}else t[w]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=i},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,i=this._indicesByUUID,n=this._bindings,o=n.length,s=0,l=arguments.length;s!==l;++s){var h=arguments[s],c=h.uuid,p=i[c];if(p!==void 0&&p>=e){var f=e++,d=t[f];for(i[d.uuid]=p,t[p]=d,i[c]=f,t[f]=h,h=0,c=o;h!==c;++h){d=n[h];var v=d[p];d[p]=d[f],d[f]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._bindings,s=o.length,l=0,h=arguments.length;l!==h;++l){var c=arguments[l].uuid,p=n[c];if(p!==void 0)if(delete n[c],p<i){c=--i;var f=t[c],d=--e,v=t[d];for(n[f.uuid]=p,t[p]=f,n[v.uuid]=c,t[c]=v,t.pop(),f=0,v=s;f!==v;++f){var w=o[f],P=w[d];w[p]=w[c],w[c]=P,w.pop()}}else for(d=--e,v=t[d],n[v.uuid]=p,t[p]=v,t.pop(),f=0,v=s;f!==v;++f)w=o[f],w[p]=w[d],w.pop()}this.nCachedObjects_=i},subscribe_:function(t,e){var i=this._bindingsIndicesByPath,n=i[t],o=this._bindings;if(n!==void 0)return o[n];var s=this._paths,l=this._parsedPaths,h=this._objects,c=this.nCachedObjects_,p=Array(h.length);for(n=o.length,i[t]=n,s.push(t),l.push(e),o.push(p),i=c,n=h.length;i!==n;++i)p[i]=new hn(h[i],t,e);return p},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){var n=this._paths,o=this._parsedPaths,s=this._bindings,l=s.length-1,h=s[l];e[t[l]]=i,s[i]=h,s.pop(),o[i]=o[l],o.pop(),n[i]=n[l],n.pop()}}}),Object.assign(aa.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,i){if(t.fadeOut(e),this.fadeIn(e),i){i=this._clip.duration;var n=t._clip.duration,o=i/n;t.warp(1,n/i,e),this.warp(o,1,e)}return this},crossFadeTo:function(t,e,i){return t.crossFadeFrom(this,e,i)},stopFading:function(){var t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,i){var n=this._mixer,o=n.time,s=this._timeScaleInterpolant,l=this.timeScale;return s===null&&(this._timeScaleInterpolant=s=n._lendControlInterpolant()),n=s.parameterPositions,s=s.sampleValues,n[0]=o,n[1]=o+i,s[0]=t/l,s[1]=e/l,this},stopWarping:function(){var t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,i,n){if(this.enabled){var o=this._startTime;if(o!==null){if(e=(t-o)*i,0>e||i===0)return;this._startTime=null,e*=i}if(e*=this._updateTimeScale(t),i=this._updateTime(e),t=this._updateWeight(t),0<t){e=this._interpolants,o=this._propertyBindings;for(var s=0,l=e.length;s!==l;++s)e[s].evaluate(i),o[s].accumulate(n,t)}}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var i=this._weightInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),n===0&&(this.enabled=!1))}}return this._effectiveWeight=e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var i=this._timeScaleInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e},_updateTime:function(t){var e=this.time+t,i=this._clip.duration,n=this.loop,o=this._loopCount,s=n===2202;if(t===0)return o===-1?e:s&&(o&1)===1?i-e:e;if(n===2200)t:{if(o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1)),e>=i)e=i;else if(0>e)e=0;else break t;this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:0>t?-1:1})}else{if(o===-1&&(0<=t?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),e>=i||0>e){n=Math.floor(e/i),e-=i*n,o+=Math.abs(n);var l=this.repetitions-o;0>=l?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=0<t?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<t?1:-1})):(l===1?(t=0>t,this._setEndings(t,!t,s)):this._setEndings(!1,!1,s),this._loopCount=o,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n}))}if(s&&(o&1)===1)return this.time=e,i-e}return this.time=e},_setEndings:function(t,e,i){var n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(n.endingStart=t?this.zeroSlopeAtStart?2401:2400:2402,n.endingEnd=e?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(t,e,i){var n=this._mixer,o=n.time,s=this._weightInterpolant;return s===null&&(this._weightInterpolant=s=n._lendControlInterpolant()),n=s.parameterPositions,s=s.sampleValues,n[0]=o,s[0]=e,n[1]=o+t,s[1]=i,this}}),wo.prototype=Object.assign(Object.create($.prototype),{constructor:wo,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,o=n.length,s=t._propertyBindings;t=t._interpolants;var l=i.uuid,h=this._bindingsByRootAndName,c=h[l];for(c===void 0&&(c={},h[l]=c),h=0;h!==o;++h){var p=n[h],f=p.name,d=c[f];if(d===void 0){if(d=s[h],d!==void 0){d._cacheIndex===null&&(++d.referenceCount,this._addInactiveBinding(d,l,f));continue}d=new sa(hn.create(i,f,e&&e._propertyBindings[h].binding.parsedPath),p.ValueTypeName,p.getValueSize()),++d.referenceCount,this._addInactiveBinding(d,l,f)}s[h]=d,t[h].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){var e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}for(e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var o=e[i];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var o=e[i];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){return t=t._cacheIndex,t!==null&&t<this._nActiveActions},_addInactiveAction:function(t,e,i){var n=this._actions,o=this._actionsByClip,s=o[e];s===void 0?(s={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,o[e]=s):(e=s.knownActions,t._byClipCacheIndex=e.length,e.push(t)),t._cacheIndex=n.length,n.push(t),s.actionByRoot[i]=t},_removeInactiveAction:function(t){var e=this._actions,i=e[e.length-1],n=t._cacheIndex;i._cacheIndex=n,e[n]=i,e.pop(),t._cacheIndex=null,e=t._clip.uuid,i=this._actionsByClip,n=i[e];var o=n.knownActions,s=o[o.length-1],l=t._byClipCacheIndex;s._byClipCacheIndex=l,o[l]=s,o.pop(),t._byClipCacheIndex=null,delete n.actionByRoot[(t._localRoot||this._root).uuid],o.length===0&&delete i[e],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){t=t._propertyBindings;for(var e=0,i=t.length;e!==i;++e){var n=t[e];--n.referenceCount===0&&this._removeInactiveBinding(n)}},_lendAction:function(t){var e=this._actions,i=t._cacheIndex,n=this._nActiveActions++,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_takeBackAction:function(t){var e=this._actions,i=t._cacheIndex,n=--this._nActiveActions,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_addInactiveBinding:function(t,e,i){var n=this._bindingsByRootAndName,o=n[e],s=this._bindings;o===void 0&&(o={},n[e]=o),o[i]=t,t._cacheIndex=s.length,s.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid;i=i.path;var o=this._bindingsByRootAndName,s=o[n],l=e[e.length-1];t=t._cacheIndex,l._cacheIndex=t,e[t]=l,e.pop(),delete s[i];t:{for(var h in s)break t;delete o[n]}},_lendBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=this._nActiveBindings++,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_takeBackBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=--this._nActiveBindings,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return i===void 0&&(i=new ur(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),i.__cacheIndex=e,t[e]=i),i},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,i=t.__cacheIndex,n=--this._nActiveControlInterpolants,o=e[n];t.__cacheIndex=n,e[n]=t,o.__cacheIndex=i,e[i]=o},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var i=e||this._root,n=i.uuid;i=typeof t=="string"?tr.findByName(i,t):t,t=i!==null?i.uuid:t;var o=this._actionsByClip[t],s=null;if(o!==void 0){if(s=o.actionByRoot[n],s!==void 0)return s;s=o.knownActions[0],i===null&&(i=s._clip)}return i===null?null:(e=new aa(this,i,e),this._bindAction(e,s),this._addInactiveAction(e,t,n),e)},existingAction:function(t,e){var i=e||this._root;return e=i.uuid,i=typeof t=="string"?tr.findByName(i,t):t,t=this._actionsByClip[i?i.uuid:t],t!==void 0&&t.actionByRoot[e]||null},stopAllAction:function(){for(var t=this._actions,e=this._nActiveActions,i=this._bindings,n=this._nActiveBindings,o=this._nActiveBindings=this._nActiveActions=0;o!==e;++o)t[o].reset();for(o=0;o!==n;++o)i[o].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,i=this._nActiveActions,n=this.time+=t,o=Math.sign(t),s=this._accuIndex^=1,l=0;l!==i;++l)e[l]._update(n,t,o,s);for(t=this._bindings,e=this._nActiveBindings,l=0;l!==e;++l)t[l].apply(s);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions;t=t.uuid;var i=this._actionsByClip,n=i[t];if(n!==void 0){n=n.knownActions;for(var o=0,s=n.length;o!==s;++o){var l=n[o];this._deactivateAction(l);var h=l._cacheIndex,c=e[e.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,c._cacheIndex=h,e[h]=c,e.pop(),this._removeInactiveBindingsForAction(l)}delete i[t]}},uncacheRoot:function(t){t=t.uuid;var e=this._actionsByClip;for(n in e){var i=e[n].actionByRoot[t];i!==void 0&&(this._deactivateAction(i),this._removeInactiveAction(i))}var n=this._bindingsByRootAndName[t];if(n!==void 0)for(var o in n)t=n[o],t.restoreOriginalState(),this._removeInactiveBinding(t)},uncacheAction:function(t,e){t=this.existingAction(t,e),t!==null&&(this._deactivateAction(t),this._removeInactiveAction(t))}}),Fa.prototype.clone=function(){return new Fa(this.value.clone===void 0?this.value:this.value.clone())},hl.prototype=Object.assign(Object.create(Ft.prototype),{constructor:hl,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)}}),ul.prototype=Object.assign(Object.create(vi.prototype),{constructor:ul,isInstancedInterleavedBuffer:!0,copy:function(t){return vi.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),cl.prototype=Object.assign(Object.create(it.prototype),{constructor:cl,isInstancedBufferAttribute:!0,copy:function(t){return it.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Ul.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,i){return i=i||[],Jo(t,this,i,e),i.sort(la),i},intersectObjects:function(t,e,i){if(i=i||[],Array.isArray(t)===!1)return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),i;for(var n=0,o=t.length;n<o;n++)Jo(t[n],this,i,e);return i.sort(la),i}}),Object.assign(pl.prototype,{set:function(t,e,i){return this.radius=t,this.phi=e,this.theta=i,this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,i){return this.radius=Math.sqrt(t*t+e*e+i*i),this.radius===0?this.phi=this.theta=0:(this.theta=Math.atan2(t,i),this.phi=Math.acos($e.clamp(e/this.radius,-1,1))),this}}),Object.assign(O.prototype,{set:function(t,e,i){return this.radius=t,this.theta=e,this.y=i,this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,i){return this.radius=Math.sqrt(t*t+i*i),this.theta=Math.atan2(t,i),this.y=e,this}}),Object.assign(Mo.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new _;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 _),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 _),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 _),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 _),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new _;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(Cs.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return t===void 0&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new S),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return t===void 0&&(console.warn("THREE.Line3: .delta() target is now required"),t=new S),t.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){return e===void 0&&(console.warn("THREE.Line3: .at() target is now required"),e=new S),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new S,e=new S;return function(i,n){return t.subVectors(i,this.start),e.subVectors(this.end,this.start),i=e.dot(e),i=e.dot(t)/i,n&&(i=$e.clamp(i,0,1)),i}}(),closestPointToPoint:function(t,e,i){return t=this.closestPointToPointParameter(t,e),i===void 0&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),i=new S),this.delta(i).multiplyScalar(t).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),Cn.prototype=Object.create(z.prototype),Cn.prototype.constructor=Cn,Cn.prototype.isImmediateRenderObject=!0,ri.prototype=Object.create(ei.prototype),ri.prototype.constructor=ri,ri.prototype.update=function(){var t=new S,e=new S,i=new Mt;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var o=this.object.matrixWorld,s=this.geometry.attributes.position,l=this.object.geometry;if(l&&l.isGeometry)for(var h=l.vertices,c=l.faces,p=l=0,f=c.length;p<f;p++)for(var d=c[p],v=0,w=d.vertexNormals.length;v<w;v++){var P=d.vertexNormals[v];t.copy(h[d[n[v]]]).applyMatrix4(o),e.copy(P).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),s.setXYZ(l,t.x,t.y,t.z),l+=1,s.setXYZ(l,e.x,e.y,e.z),l+=1}else if(l&&l.isBufferGeometry)for(n=l.attributes.position,h=l.attributes.normal,v=l=0,w=n.count;v<w;v++)t.set(n.getX(v),n.getY(v),n.getZ(v)).applyMatrix4(o),e.set(h.getX(v),h.getY(v),h.getZ(v)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),s.setXYZ(l,t.x,t.y,t.z),l+=1,s.setXYZ(l,e.x,e.y,e.z),l+=1;s.needsUpdate=!0}}(),Rs.prototype=Object.create(z.prototype),Rs.prototype.constructor=Rs,Rs.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Rs.prototype.update=function(){var t=new S,e=new S;return function(){this.light.updateMatrixWorld();var i=this.light.distance?this.light.distance:1e3,n=i*Math.tan(this.light.angle);this.cone.scale.set(n,n,i),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),bs.prototype=Object.create(ei.prototype),bs.prototype.constructor=bs,bs.prototype.updateMatrixWorld=function(){var t=new S,e=new pt,i=new pt;return function(n){var o=this.bones,s=this.geometry,l=s.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var h=0,c=0;h<o.length;h++){var p=o[h];p.parent&&p.parent.isBone&&(e.multiplyMatrices(i,p.matrixWorld),t.setFromMatrixPosition(e),l.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(i,p.parent.matrixWorld),t.setFromMatrixPosition(e),l.setXYZ(c+1,t.x,t.y,t.z),c+=2)}s.getAttribute("position").needsUpdate=!0,z.prototype.updateMatrixWorld.call(this,n)}}(),pr.prototype=Object.create(Fi.prototype),pr.prototype.constructor=pr,pr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},pr.prototype.update=function(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Os.prototype=Object.create(z.prototype),Os.prototype.constructor=Os,Os.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Os.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,i=this.line.geometry.attributes.position,n=i.array;n[0]=t,n[1]=-e,n[2]=0,n[3]=t,n[4]=e,n[5]=0,n[6]=-t,n[7]=e,n[8]=0,n[9]=-t,n[10]=-e,n[11]=0,n[12]=t,n[13]=-e,n[14]=0,i.needsUpdate=!0,this.color!==void 0?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Is.prototype=Object.create(z.prototype),Is.prototype.constructor=Is,Is.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Is.prototype.update=function(){var t=new S,e=new Y,i=new Y;return function(){var n=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{var o=n.geometry.getAttribute("color");e.copy(this.light.color),i.copy(this.light.groundColor);for(var s=0,l=o.count;s<l;s++){var h=s<l/2?e:i;o.setXYZ(s,h.r,h.g,h.b)}o.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),ha.prototype=Object.create(ei.prototype),ha.prototype.constructor=ha,Ga.prototype=Object.create(ei.prototype),Ga.prototype.constructor=Ga,ua.prototype=Object.create(ei.prototype),ua.prototype.constructor=ua,ua.prototype.update=function(){var t=new S,e=new S,i=new Mt;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var n=this.object.matrixWorld,o=this.geometry.attributes.position,s=this.object.geometry,l=s.vertices;s=s.faces;for(var h=0,c=0,p=s.length;c<p;c++){var f=s[c],d=f.normal;t.copy(l[f.a]).add(l[f.b]).add(l[f.c]).divideScalar(3).applyMatrix4(n),e.copy(d).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(h,t.x,t.y,t.z),h+=1,o.setXYZ(h,e.x,e.y,e.z),h+=1}o.needsUpdate=!0}}(),Yn.prototype=Object.create(z.prototype),Yn.prototype.constructor=Yn,Yn.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Yn.prototype.update=function(){var t=new S,e=new S,i=new S;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),i.subVectors(e,t),this.lightPlane.lookAt(i),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(i),this.targetLine.scale.z=i.length()}}(),ca.prototype=Object.create(ei.prototype),ca.prototype.constructor=ca,ca.prototype.update=function(){function t(s,l,h,c){if(n.set(l,h,c).unproject(o),s=i[s],s!==void 0)for(l=e.getAttribute("position"),h=0,c=s.length;h<c;h++)l.setXYZ(s[h],n.x,n.y,n.z)}var e,i,n=new S,o=new ye;return function(){e=this.geometry,i=this.pointMap,o.projectionMatrix.copy(this.camera.projectionMatrix),t("c",0,0,-1),t("t",0,0,1),t("n1",-1,-1,-1),t("n2",1,-1,-1),t("n3",-1,1,-1),t("n4",1,1,-1),t("f1",-1,-1,1),t("f2",1,-1,1),t("f3",-1,1,1),t("f4",1,1,1),t("u1",.7,1.1,-1),t("u2",-.7,1.1,-1),t("u3",0,2,-1),t("cf1",-1,0,1),t("cf2",1,0,1),t("cf3",0,-1,1),t("cf4",0,1,1),t("cn1",-1,0,-1),t("cn2",1,0,-1),t("cn3",0,-1,-1),t("cn4",0,1,-1),e.getAttribute("position").needsUpdate=!0}}(),io.prototype=Object.create(ei.prototype),io.prototype.constructor=io,io.prototype.update=function(){var t=new Nt;return function(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&t.setFromObject(this.object),!t.isEmpty()){e=t.min;var i=t.max,n=this.geometry.attributes.position,o=n.array;o[0]=i.x,o[1]=i.y,o[2]=i.z,o[3]=e.x,o[4]=i.y,o[5]=i.z,o[6]=e.x,o[7]=e.y,o[8]=i.z,o[9]=i.x,o[10]=e.y,o[11]=i.z,o[12]=i.x,o[13]=i.y,o[14]=e.z,o[15]=e.x,o[16]=i.y,o[17]=e.z,o[18]=e.x,o[19]=e.y,o[20]=e.z,o[21]=i.x,o[22]=e.y,o[23]=e.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),io.prototype.setFromObject=function(t){return this.object=t,this.update(),this},io.prototype.copy=function(t){return ei.prototype.copy.call(this,t),this.object=t.object,this},io.prototype.clone=function(){return new this.constructor().copy(this)},pa.prototype=Object.create(ei.prototype),pa.prototype.constructor=pa,pa.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),z.prototype.updateMatrixWorld.call(this,t))},fa.prototype=Object.create(Li.prototype),fa.prototype.constructor=fa,fa.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;1e-8>Math.abs(e)&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=0>e?1:0,this.lookAt(this.plane.normal),z.prototype.updateMatrixWorld.call(this,t)};var Xa,va;no.prototype=Object.create(z.prototype),no.prototype.constructor=no,no.prototype.setDirection=function(){var t=new S,e;return function(i){.99999<i.y?this.quaternion.set(0,0,0,1):-.99999>i.y?this.quaternion.set(1,0,0,0):(t.set(i.z,0,-i.x).normalize(),e=Math.acos(i.y),this.quaternion.setFromAxisAngle(t,e))}}(),no.prototype.setLength=function(t,e,i){e===void 0&&(e=.2*t),i===void 0&&(i=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()},no.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},no.prototype.copy=function(t){return z.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},no.prototype.clone=function(){return new this.constructor().copy(this)},er.prototype=Object.create(ei.prototype),er.prototype.constructor=er,he.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(he.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(to.prototype,{createPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getPoints(t),this.createGeometry(t)},createSpacedPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getSpacedPoints(t),this.createGeometry(t)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new X,i=0,n=t.length;i<n;i++){var o=t[i];e.vertices.push(new S(o.x,o.y,o.z||0))}return e}}),Object.assign(qn.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Gl.prototype=Object.create(mn.prototype),Hl.prototype=Object.create(mn.prototype),fl.prototype=Object.create(mn.prototype),Object.assign(fl.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),ha.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},bs.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(eo.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Qo.extractUrlBase(t)}}),Object.assign(qo.prototype,{setTexturePath:function(t){return console.warn("THREE.JSONLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(na.prototype,{setTexturePath:function(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(Mo.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(Nt.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),Cs.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign($e,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),$e.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),$e.ceilPowerOfTwo(t)}}),Object.assign(Mt.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(pt.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return t===void 0&&(t=new S),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,i,n,o,s){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,n,i,o,s)}}),Ct.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},gt.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(In.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(ni.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(ni,{barycoordFromPoint:function(t,e,i,n,o){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),ni.getBarycoord(t,e,i,n,o)},normal:function(t,e,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),ni.getNormal(t,e,i,n)}}),Object.assign(Nn.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Jr(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new $r(this,t)}}),Object.assign(_.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(S.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,i){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(nt.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(X.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(z.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(z.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(ki.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Xi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(he.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),ee.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(Ui.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(it.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(zr.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Fa.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(Oe.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Y}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===1}}}),Object.defineProperties(wr.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(Pi.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(ne.prototype,{clearTarget:function(t,e,i,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(t),this.clear(e,i,n)},animate:function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(ne.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Kt.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Tt.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ke.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}}),Ps.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return new Ki().load(t,function(i){e.setBuffer(i)}),this},Yo.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},ra.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},To.crossOrigin=void 0,To.loadTexture=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var o=new Yi;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},To.loadTextureCube=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var o=new xi;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},To.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},To.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},g.WebGLRenderTargetCube=Rt,g.WebGLRenderTarget=Tt,g.WebGLRenderer=ne,g.ShaderLib=kr,g.UniformsLib=Re,g.UniformsUtils=_n,g.ShaderChunk=hi,g.FogExp2=de,g.Fog=ln,g.Scene=Ln,g.Sprite=Hi,g.LOD=ki,g.SkinnedMesh=Ti,g.Skeleton=Xi,g.Bone=qi,g.Mesh=Fi,g.LineSegments=ei,g.LineLoop=Ir,g.Line=Li,g.Points=ps,g.Group=Ye,g.VideoTexture=il,g.DataTexture=vt,g.DataTexture3D=k,g.CompressedTexture=uo,g.CubeTexture=A,g.CanvasTexture=Ws,g.DepthTexture=js,g.Texture=kt,g.AnimationLoader=Ot,g.CompressedTextureLoader=At,g.DataTextureLoader=xe,g.CubeTextureLoader=xi,g.TextureLoader=Yi,g.ObjectLoader=na,g.MaterialLoader=Na,g.BufferGeometryLoader=ol,g.DefaultLoadingManager=Bn,g.LoadingManager=yo,g.JSONLoader=qo,g.ImageLoader=We,g.ImageBitmapLoader=sl,g.FontLoader=Bl,g.FileLoader=lt,g.Loader=eo,g.LoaderUtils=Qo,g.Cache=Wr,g.AudioLoader=Ki,g.SpotLightShadow=ea,g.SpotLight=ia,g.PointLight=jo,g.RectAreaLight=za,g.HemisphereLight=ta,g.DirectionalLightShadow=xo,g.DirectionalLight=Hr,g.AmbientLight=Xo,g.LightShadow=Gr,g.Light=Ui,g.StereoCamera=An,g.PerspectiveCamera=ee,g.OrthographicCamera=As,g.CubeCamera=ra,g.ArrayCamera=_e,g.Camera=ye,g.AudioListener=Ua,g.PositionalAudio=oa,g.AudioContext=yl,g.AudioAnalyser=Yo,g.Audio=Ps,g.VectorKeyframeTrack=Ss,g.StringKeyframeTrack=Da,g.QuaternionKeyframeTrack=Ts,g.NumberKeyframeTrack=Mr,g.ColorKeyframeTrack=Ia,g.BooleanKeyframeTrack=Oa,g.PropertyMixer=sa,g.PropertyBinding=hn,g.KeyframeTrack=En,g.AnimationUtils=Rn,g.AnimationObjectGroup=Ls,g.AnimationMixer=wo,g.AnimationClip=tr,g.Uniform=Fa,g.InstancedBufferGeometry=hl,g.BufferGeometry=Ft,g.Geometry=X,g.InterleavedBufferAttribute=yi,g.InstancedInterleavedBuffer=ul,g.InterleavedBuffer=vi,g.InstancedBufferAttribute=cl,g.Face3=B,g.Object3D=z,g.Raycaster=Ul,g.Layers=Z,g.EventDispatcher=$,g.Clock=ll,g.QuaternionLinearInterpolant=kn,g.LinearInterpolant=ur,g.DiscreteInterpolant=Wo,g.CubicInterpolant=Ks,g.Interpolant=Dn,g.Triangle=ni,g.Math=$e,g.Spherical=pl,g.Cylindrical=O,g.Plane=Ct,g.Frustum=at,g.Sphere=Ut,g.Ray=In,g.Matrix4=pt,g.Matrix3=Mt,g.Box3=Nt,g.Box2=Mo,g.Line3=Cs,g.Euler=E,g.Vector4=nt,g.Vector3=S,g.Vector2=_,g.Quaternion=gt,g.Color=Y,g.ImmediateRenderObject=Cn,g.VertexNormalsHelper=ri,g.SpotLightHelper=Rs,g.SkeletonHelper=bs,g.PointLightHelper=pr,g.RectAreaLightHelper=Os,g.HemisphereLightHelper=Is,g.GridHelper=ha,g.PolarGridHelper=Ga,g.FaceNormalsHelper=ua,g.DirectionalLightHelper=Yn,g.CameraHelper=ca,g.BoxHelper=io,g.Box3Helper=pa,g.PlaneHelper=fa,g.ArrowHelper=no,g.AxesHelper=er,g.Shape=Nn,g.Path=qn,g.ShapePath=Ba,g.Font=al,g.CurvePath=to,g.Curve=he,g.ImageUtils=To,g.ShapeUtils=Vr,g.WebGLUtils=Me,g.WireframeGeometry=fs,g.ParametricGeometry=Xs,g.ParametricBufferGeometry=ds,g.TetrahedronGeometry=qs,g.TetrahedronBufferGeometry=ms,g.OctahedronGeometry=Ys,g.OctahedronBufferGeometry=bo,g.IcosahedronGeometry=Zs,g.IcosahedronBufferGeometry=gs,g.DodecahedronGeometry=vs,g.DodecahedronBufferGeometry=ys,g.PolyhedronGeometry=Ci,g.PolyhedronBufferGeometry=oi,g.TubeGeometry=Qi,g.TubeBufferGeometry=co,g.TorusKnotGeometry=xr,g.TorusKnotBufferGeometry=Oo,g.TorusGeometry=Io,g.TorusBufferGeometry=Tn,g.TextGeometry=$s,g.TextBufferGeometry=zo,g.SphereGeometry=po,g.SphereBufferGeometry=lr,g.RingGeometry=Qs,g.RingBufferGeometry=No,g.PlaneGeometry=Pn,g.PlaneBufferGeometry=Ji,g.LatheGeometry=ws,g.LatheBufferGeometry=fo,g.ShapeGeometry=$r,g.ShapeBufferGeometry=mo,g.ExtrudeGeometry=Jr,g.ExtrudeBufferGeometry=zr,g.EdgesGeometry=go,g.ConeGeometry=Ms,g.ConeBufferGeometry=Sn,g.CylinderGeometry=Qr,g.CylinderBufferGeometry=Kr,g.CircleGeometry=Bo,g.CircleBufferGeometry=Nr,g.BoxGeometry=Qe,g.BoxBufferGeometry=Ii,g.ShadowMaterial=vo,g.SpriteMaterial=Si,g.RawShaderMaterial=Uo,g.ShaderMaterial=Pi,g.PointsMaterial=Mn,g.MeshPhysicalMaterial=Fo,g.MeshStandardMaterial=Br,g.MeshPhongMaterial=wr,g.MeshToonMaterial=Go,g.MeshNormalMaterial=Ho,g.MeshLambertMaterial=hr,g.MeshDepthMaterial=Vt,g.MeshDistanceMaterial=It,g.MeshBasicMaterial=ci,g.MeshMatcapMaterial=ko,g.LineDashedMaterial=Vo,g.LineBasicMaterial=_i,g.Material=Oe,g.Float64BufferAttribute=ie,g.Float32BufferAttribute=Et,g.Uint32BufferAttribute=we,g.Int32BufferAttribute=se,g.Uint16BufferAttribute=re,g.Int16BufferAttribute=Yt,g.Uint8ClampedBufferAttribute=zt,g.Uint8BufferAttribute=dt,g.Int8BufferAttribute=_t,g.BufferAttribute=it,g.ArcCurve=Es,g.CatmullRomCurve3=mn,g.CubicBezierCurve=Wn,g.CubicBezierCurve3=ai,g.EllipseCurve=zn,g.LineCurve=jn,g.LineCurve3=cr,g.QuadraticBezierCurve=Xn,g.QuadraticBezierCurve3=Fr,g.SplineCurve=Tr,g.REVISION="98",g.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},g.CullFaceNone=0,g.CullFaceBack=1,g.CullFaceFront=2,g.CullFaceFrontBack=3,g.FrontFaceDirectionCW=0,g.FrontFaceDirectionCCW=1,g.BasicShadowMap=0,g.PCFShadowMap=1,g.PCFSoftShadowMap=2,g.FrontSide=0,g.BackSide=1,g.DoubleSide=2,g.FlatShading=1,g.SmoothShading=2,g.NoColors=0,g.FaceColors=1,g.VertexColors=2,g.NoBlending=0,g.NormalBlending=1,g.AdditiveBlending=2,g.SubtractiveBlending=3,g.MultiplyBlending=4,g.CustomBlending=5,g.AddEquation=100,g.SubtractEquation=101,g.ReverseSubtractEquation=102,g.MinEquation=103,g.MaxEquation=104,g.ZeroFactor=200,g.OneFactor=201,g.SrcColorFactor=202,g.OneMinusSrcColorFactor=203,g.SrcAlphaFactor=204,g.OneMinusSrcAlphaFactor=205,g.DstAlphaFactor=206,g.OneMinusDstAlphaFactor=207,g.DstColorFactor=208,g.OneMinusDstColorFactor=209,g.SrcAlphaSaturateFactor=210,g.NeverDepth=0,g.AlwaysDepth=1,g.LessDepth=2,g.LessEqualDepth=3,g.EqualDepth=4,g.GreaterEqualDepth=5,g.GreaterDepth=6,g.NotEqualDepth=7,g.MultiplyOperation=0,g.MixOperation=1,g.AddOperation=2,g.NoToneMapping=0,g.LinearToneMapping=1,g.ReinhardToneMapping=2,g.Uncharted2ToneMapping=3,g.CineonToneMapping=4,g.UVMapping=300,g.CubeReflectionMapping=301,g.CubeRefractionMapping=302,g.EquirectangularReflectionMapping=303,g.EquirectangularRefractionMapping=304,g.SphericalReflectionMapping=305,g.CubeUVReflectionMapping=306,g.CubeUVRefractionMapping=307,g.RepeatWrapping=1e3,g.ClampToEdgeWrapping=1001,g.MirroredRepeatWrapping=1002,g.NearestFilter=1003,g.NearestMipMapNearestFilter=1004,g.NearestMipMapLinearFilter=1005,g.LinearFilter=1006,g.LinearMipMapNearestFilter=1007,g.LinearMipMapLinearFilter=1008,g.UnsignedByteType=1009,g.ByteType=1010,g.ShortType=1011,g.UnsignedShortType=1012,g.IntType=1013,g.UnsignedIntType=1014,g.FloatType=1015,g.HalfFloatType=1016,g.UnsignedShort4444Type=1017,g.UnsignedShort5551Type=1018,g.UnsignedShort565Type=1019,g.UnsignedInt248Type=1020,g.AlphaFormat=1021,g.RGBFormat=1022,g.RGBAFormat=1023,g.LuminanceFormat=1024,g.LuminanceAlphaFormat=1025,g.RGBEFormat=1023,g.DepthFormat=1026,g.DepthStencilFormat=1027,g.RedFormat=1028,g.RGB_S3TC_DXT1_Format=33776,g.RGBA_S3TC_DXT1_Format=33777,g.RGBA_S3TC_DXT3_Format=33778,g.RGBA_S3TC_DXT5_Format=33779,g.RGB_PVRTC_4BPPV1_Format=35840,g.RGB_PVRTC_2BPPV1_Format=35841,g.RGBA_PVRTC_4BPPV1_Format=35842,g.RGBA_PVRTC_2BPPV1_Format=35843,g.RGB_ETC1_Format=36196,g.RGBA_ASTC_4x4_Format=37808,g.RGBA_ASTC_5x4_Format=37809,g.RGBA_ASTC_5x5_Format=37810,g.RGBA_ASTC_6x5_Format=37811,g.RGBA_ASTC_6x6_Format=37812,g.RGBA_ASTC_8x5_Format=37813,g.RGBA_ASTC_8x6_Format=37814,g.RGBA_ASTC_8x8_Format=37815,g.RGBA_ASTC_10x5_Format=37816,g.RGBA_ASTC_10x6_Format=37817,g.RGBA_ASTC_10x8_Format=37818,g.RGBA_ASTC_10x10_Format=37819,g.RGBA_ASTC_12x10_Format=37820,g.RGBA_ASTC_12x12_Format=37821,g.LoopOnce=2200,g.LoopRepeat=2201,g.LoopPingPong=2202,g.InterpolateDiscrete=2300,g.InterpolateLinear=2301,g.InterpolateSmooth=2302,g.ZeroCurvatureEnding=2400,g.ZeroSlopeEnding=2401,g.WrapAroundEnding=2402,g.TrianglesDrawMode=0,g.TriangleStripDrawMode=1,g.TriangleFanDrawMode=2,g.LinearEncoding=3e3,g.sRGBEncoding=3001,g.GammaEncoding=3007,g.RGBEEncoding=3002,g.LogLuvEncoding=3003,g.RGBM7Encoding=3004,g.RGBM16Encoding=3005,g.RGBDEncoding=3006,g.BasicDepthPacking=3200,g.RGBADepthPacking=3201,g.TangentSpaceNormalMap=0,g.ObjectSpaceNormalMap=1,g.CubeGeometry=Qe,g.Face4=function(t,e,i,n,o,s,l){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new B(t,e,i,o,s,l)},g.LineStrip=0,g.LinePieces=1,g.MeshFaceMaterial=function(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t},g.MultiMaterial=function(t){return t===void 0&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t},g.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new ps(t,e)},g.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Hi(t)},g.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new ps(t,e)},g.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Mn(t)},g.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Mn(t)},g.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Mn(t)},g.Vertex=function(t,e,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new S(t,e,i)},g.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new it(t,e).setDynamic(!0)},g.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new _t(t,e)},g.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new dt(t,e)},g.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zt(t,e)},g.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new Yt(t,e)},g.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new re(t,e)},g.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new se(t,e)},g.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new we(t,e)},g.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Et(t,e)},g.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new ie(t,e)},g.ClosedSplineCurve3=Gl,g.SplineCurve3=Hl,g.Spline=fl,g.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new er(t)},g.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new io(t,e)},g.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new ei(new go(t.geometry),new _i({color:e!==void 0?e:16777215}))},g.WireframeHelper=function(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new ei(new fs(t.geometry),new _i({color:e!==void 0?e:16777215}))},g.XHRLoader=function(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new lt(t)},g.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new xe(t)},g.GeometryUtils={merge:function(t,e,i){if(console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh){e.matrixAutoUpdate&&e.updateMatrix();var n=e.matrix;e=e.geometry}t.merge(e,n,i)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},g.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}},g.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},g.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}},g.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(g,"__esModule",{value:!0})}),THREE.Sky=function(){var g=THREE.Sky.SkyShader,$=new THREE.ShaderMaterial({fragmentShader:g.fragmentShader,vertexShader:g.vertexShader,uniforms:THREE.UniformsUtils.clone(g.uniforms),side:THREE.BackSide});THREE.Mesh.call(this,new THREE.BoxBufferGeometry(1,1,1),$)},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
|
+
`},Pn={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}},Pr={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(b.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=pi.euclideanModulo(e,1),i=pi.clamp(i,0,1),n=pi.clamp(n,0,1),i===0?this.r=this.g=this.b=n:(i=.5>=n?n*(1+i):n+i-n*i,n=2*n-i,this.r=t(n,i,e+1/3),this.g=t(n,i,e),this.b=t(n,i,e-1/3)),this}}(),setStyle:function(t){function e(l){l!==void 0&&1>parseFloat(l)&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n=i[2];switch(i[1]){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n)){n=parseFloat(i[1])/360;var o=parseInt(i[2],10)/100,s=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(n,o,s)}}}else if(i=/^#([A-Fa-f0-9]+)$/.exec(t)){if(i=i[1],n=i.length,n===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(n===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return t&&0<t.length&&(i=Pr[t],i!==void 0?this.setHex(i):console.warn("THREE.Color: Unknown color "+t)),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return e===void 0&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){return e===void 0&&(e=2),e=0<e?1/e:1,this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},copySRGBToLinear:function(){function t(e){return .04045>e?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),copyLinearToSRGB:function(){function t(e){return .0031308>e?12.92*e:1.055*Math.pow(e,.41666)-.055}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){t===void 0&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e=this.r,i=this.g,n=this.b,o=Math.max(e,i,n),s=Math.min(e,i,n),l,h=(s+o)/2;if(s===o)s=l=0;else{var c=o-s;switch(s=.5>=h?c/(o+s):c/(2-o-s),o){case e:l=(i-n)/c+(i<n?6:0);break;case i:l=(n-e)/c+2;break;case n:l=(e-i)/c+4}l/=6}return t.h=l,t.s=s,t.l=h,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var t={};return function(e,i,n){return this.getHSL(t),t.h+=e,t.s+=i,t.l+=n,this.setHSL(t.h,t.s,t.l),this}}(),add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},lerpHSL:function(){var t={h:0,s:0,l:0},e={h:0,s:0,l:0};return function(i,n){this.getHSL(t),i.getHSL(e),i=pi.lerp(t.h,e.h,n);var o=pi.lerp(t.s,e.s,n);return n=pi.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 b(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new P},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 d(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 b(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 b(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new P}},sprite:{diffuse:{value:new b(15658734)},opacity:{value:1},center:{value:new d(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new P}}},jr={basic:{uniforms:Pn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.fog]),vertexShader:bi.meshbasic_vert,fragmentShader:bi.meshbasic_frag},lambert:{uniforms:Pn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.fog,qe.lights,{emissive:{value:new b(0)}}]),vertexShader:bi.meshlambert_vert,fragmentShader:bi.meshlambert_frag},phong:{uniforms:Pn.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 b(0)},specular:{value:new b(1118481)},shininess:{value:30}}]),vertexShader:bi.meshphong_vert,fragmentShader:bi.meshphong_frag},standard:{uniforms:Pn.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 b(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:bi.meshphysical_vert,fragmentShader:bi.meshphysical_frag},matcap:{uniforms:Pn.merge([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.fog,{matcap:{value:null}}]),vertexShader:bi.meshmatcap_vert,fragmentShader:bi.meshmatcap_frag},points:{uniforms:Pn.merge([qe.points,qe.fog]),vertexShader:bi.points_vert,fragmentShader:bi.points_frag},dashed:{uniforms:Pn.merge([qe.common,qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:bi.linedashed_vert,fragmentShader:bi.linedashed_frag},depth:{uniforms:Pn.merge([qe.common,qe.displacementmap]),vertexShader:bi.depth_vert,fragmentShader:bi.depth_frag},normal:{uniforms:Pn.merge([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,{opacity:{value:1}}]),vertexShader:bi.normal_vert,fragmentShader:bi.normal_frag},sprite:{uniforms:Pn.merge([qe.sprite,qe.fog]),vertexShader:bi.sprite_vert,fragmentShader:bi.sprite_frag},background:{uniforms:{uvTransform:{value:new P},t2D:{value:null}},vertexShader:bi.background_vert,fragmentShader:bi.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:bi.cube_vert,fragmentShader:bi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:bi.equirect_vert,fragmentShader:bi.equirect_frag},distanceRGBA:{uniforms:Pn.merge([qe.common,qe.displacementmap,{referencePosition:{value:new m},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:bi.distanceRGBA_vert,fragmentShader:bi.distanceRGBA_frag},shadow:{uniforms:Pn.merge([qe.lights,qe.fog,{color:{value:new b(0)},opacity:{value:1}}]),vertexShader:bi.shadow_vert,fragmentShader:bi.shadow_frag}};jr.physical={uniforms:Pn.merge([jr.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:bi.meshphysical_vert,fragmentShader:bi.meshphysical_frag},Object.assign(S.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}}),x.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),x.DefaultOrder="XYZ",Object.defineProperties(x.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(x.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=pi.clamp,o=t.elements;t=o[0];var s=o[4],l=o[8],h=o[1],c=o[5],f=o[9],v=o[2],y=o[6];return o=o[10],e=e||this._order,e==="XYZ"?(this._y=Math.asin(n(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(-f,o),this._z=Math.atan2(-s,t)):(this._x=Math.atan2(y,c),this._z=0)):e==="YXZ"?(this._x=Math.asin(-n(f,-1,1)),.99999>Math.abs(f)?(this._y=Math.atan2(l,o),this._z=Math.atan2(h,c)):(this._y=Math.atan2(-v,t),this._z=0)):e==="ZXY"?(this._x=Math.asin(n(y,-1,1)),.99999>Math.abs(y)?(this._y=Math.atan2(-v,o),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(h,t))):e==="ZYX"?(this._y=Math.asin(-n(v,-1,1)),.99999>Math.abs(v)?(this._x=Math.atan2(y,o),this._z=Math.atan2(h,t)):(this._x=0,this._z=Math.atan2(-s,c))):e==="YZX"?(this._z=Math.asin(n(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(-f,c),this._y=Math.atan2(-v,t)):(this._x=0,this._y=Math.atan2(l,o))):e==="XZY"?(this._z=Math.asin(-n(s,-1,1)),.99999>Math.abs(s)?(this._x=Math.atan2(y,c),this._y=Math.atan2(l,t)):(this._x=Math.atan2(-f,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 nt;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 H;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 m(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 fh=0;z.DefaultUp=new m(0,1,0),z.DefaultMatrixAutoUpdate=!0,z.prototype=Object.assign(Object.create(ht.prototype),{constructor:z,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new H;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new H;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new m(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new m(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new m(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new m;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new m(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new m(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new m(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new nt;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new H,e=new nt,i=new m,n=new m;return function(o,s,l){o.isVector3?i.copy(o):i.set(o,s,l),o=this.parent,this.updateWorldMatrix(!0,!1),n.setFromMatrixPosition(this.matrixWorld),this.isCamera?e.lookAt(n,i,this.up):e.lookAt(i,n,this.up),this.quaternion.setFromRotationMatrix(e),o&&(e.extractRotation(o.matrixWorld),t.setFromRotationMatrix(e),this.quaternion.premultiply(t.inverse()))}}(),add:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.parent!==null&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}return e=this.children.indexOf(t),e!==-1&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(e,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var i=0,n=this.children.length;i<n;i++){var o=this.children[i].getObjectByProperty(t,e);if(o!==void 0)return o}},getWorldPosition:function(t){return t===void 0&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new m),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new m,e=new m;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),i=new H),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,e),i}}(),getWorldScale:function(){var t=new m,e=new H;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),i=new m),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 m),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(v,y){return v[y.uuid]===void 0&&(v[y.uuid]=y.toJSON(t)),y.uuid}function i(v){var y=[],M;for(M in v){var C=v[M];delete C.metadata,y.push(C)}return y}var n=t===void 0||typeof t=="string",o={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},o.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var s={};if(s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.castShadow===!0&&(s.castShadow=!0),this.receiveShadow===!0&&(s.receiveShadow=!0),this.visible===!1&&(s.visible=!1),this.frustumCulled===!1&&(s.frustumCulled=!1),this.renderOrder!==0&&(s.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isMesh||this.isLine||this.isPoints){s.geometry=e(t.geometries,this.geometry);var l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0)if(l=l.shapes,Array.isArray(l))for(var h=0,c=l.length;h<c;h++)e(t.shapes,l[h]);else e(t.shapes,l)}if(this.material!==void 0)if(Array.isArray(this.material)){for(l=[],h=0,c=this.material.length;h<c;h++)l.push(e(t.materials,this.material[h]));s.material=l}else s.material=e(t.materials,this.material);if(0<this.children.length)for(s.children=[],h=0;h<this.children.length;h++)s.children.push(this.children[h].toJSON(t).object);if(n){n=i(t.geometries),h=i(t.materials),c=i(t.textures);var f=i(t.images);l=i(t.shapes),0<n.length&&(o.geometries=n),0<h.length&&(o.materials=h),0<c.length&&(o.textures=c),0<f.length&&(o.images=f),0<l.length&&(o.shapes=l)}return o.object=s,o},clone:function(t){return new this.constructor().copy(this,t)},copy:function(t,e){if(e===void 0&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(e=0;e<t.children.length;e++)this.add(t.children[e].clone());return this}});var ph=0;j.prototype=Object.assign(Object.create(ht.prototype),{constructor:j,isGeometry:!0,applyMatrix:function(t){for(var e=new P().getNormalMatrix(t),i=0,n=this.vertices.length;i<n;i++)this.vertices[i].applyMatrix4(t);for(i=0,n=this.faces.length;i<n;i++){t=this.faces[i],t.normal.applyMatrix3(e).normalize();for(var o=0,s=t.vertexNormals.length;o<s;o++)t.vertexNormals[o].applyMatrix3(e).normalize()}return this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this.normalsNeedUpdate=this.verticesNeedUpdate=!0,this},rotateX:function(){var t=new nt;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new nt;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new nt;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new nt;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new nt;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new z;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(N,W,Q,_t){var mt=h===void 0?[]:[i.colors[N].clone(),i.colors[W].clone(),i.colors[Q].clone()],bt=l===void 0?[]:[new m().fromArray(l,3*N),new m().fromArray(l,3*W),new m().fromArray(l,3*Q)];_t=new S(N,W,Q,bt,mt,_t),i.faces.push(_t),c!==void 0&&i.faceVertexUvs[0].push([new d().fromArray(c,2*N),new d().fromArray(c,2*W),new d().fromArray(c,2*Q)]),f!==void 0&&i.faceVertexUvs[1].push([new d().fromArray(f,2*N),new d().fromArray(f,2*W),new d().fromArray(f,2*Q)])}var i=this,n=t.index!==null?t.index.array:void 0,o=t.attributes,s=o.position.array,l=o.normal!==void 0?o.normal.array:void 0,h=o.color!==void 0?o.color.array:void 0,c=o.uv!==void 0?o.uv.array:void 0,f=o.uv2!==void 0?o.uv2.array:void 0;f!==void 0&&(this.faceVertexUvs[1]=[]);for(var v=o=0;o<s.length;o+=3,v+=2)i.vertices.push(new m().fromArray(s,o)),h!==void 0&&i.colors.push(new b().fromArray(h,o));var y=t.groups;if(0<y.length)for(o=0;o<y.length;o++){s=y[o];var M=s.start,C=s.count;for(v=M,M+=C;v<M;v+=3)n!==void 0?e(n[v],n[v+1],n[v+2],s.materialIndex):e(v,v+1,v+2,s.materialIndex)}else if(n!==void 0)for(o=0;o<n.length;o+=3)e(n[o],n[o+1],n[o+2]);else for(o=0;o<s.length/3;o+=3)e(o,o+1,o+2);return this.computeFaceNormals(),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){var t=new m;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 nt;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 m,e=new m,i=0,n=this.faces.length;i<n;i++){var o=this.faces[i],s=this.vertices[o.a],l=this.vertices[o.b];t.subVectors(this.vertices[o.c],l),e.subVectors(s,l),t.cross(e),t.normalize(),o.normal.copy(t)}},computeVertexNormals:function(t){t===void 0&&(t=!0);var e,i=Array(this.vertices.length),n=0;for(e=this.vertices.length;n<e;n++)i[n]=new m;if(t){var o=new m,s=new m;for(t=0,n=this.faces.length;t<n;t++){e=this.faces[t];var l=this.vertices[e.a],h=this.vertices[e.b],c=this.vertices[e.c];o.subVectors(c,h),s.subVectors(l,h),o.cross(s),i[e.a].add(o),i[e.b].add(o),i[e.c].add(o)}}else for(this.computeFaceNormals(),t=0,n=this.faces.length;t<n;t++)e=this.faces[t],i[e.a].add(e.normal),i[e.b].add(e.normal),i[e.c].add(e.normal);for(n=0,e=this.vertices.length;n<e;n++)i[n].normalize();for(t=0,n=this.faces.length;t<n;t++)e=this.faces[t],l=e.vertexNormals,l.length===3?(l[0].copy(i[e.a]),l[1].copy(i[e.b]),l[2].copy(i[e.c])):(l[0]=i[e.a].clone(),l[1]=i[e.b].clone(),l[2]=i[e.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t;this.computeFaceNormals();var e=0;for(t=this.faces.length;e<t;e++){var i=this.faces[e],n=i.vertexNormals;n.length===3?(n[0].copy(i.normal),n[1].copy(i.normal),n[2].copy(i.normal)):(n[0]=i.normal.clone(),n[1]=i.normal.clone(),n[2]=i.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,i=0;for(e=this.faces.length;i<e;i++){var n=this.faces[i];n.__originalFaceNormal?n.__originalFaceNormal.copy(n.normal):n.__originalFaceNormal=n.normal.clone(),n.__originalVertexNormals||(n.__originalVertexNormals=[]);var o=0;for(t=n.vertexNormals.length;o<t;o++)n.__originalVertexNormals[o]?n.__originalVertexNormals[o].copy(n.vertexNormals[o]):n.__originalVertexNormals[o]=n.vertexNormals[o].clone()}var s=new j;for(s.faces=this.faces,o=0,t=this.morphTargets.length;o<t;o++){if(!this.morphNormals[o]){this.morphNormals[o]={},this.morphNormals[o].faceNormals=[],this.morphNormals[o].vertexNormals=[],n=this.morphNormals[o].faceNormals;var l=this.morphNormals[o].vertexNormals;for(i=0,e=this.faces.length;i<e;i++){var h=new m,c={a:new m,b:new m,c:new m};n.push(h),l.push(c)}}for(l=this.morphNormals[o],s.vertices=this.morphTargets[o].vertices,s.computeFaceNormals(),s.computeVertexNormals(),i=0,e=this.faces.length;i<e;i++)n=this.faces[i],h=l.faceNormals[i],c=l.vertexNormals[i],h.copy(n.normal),c.a.copy(n.vertexNormals[0]),c.b.copy(n.vertexNormals[1]),c.c.copy(n.vertexNormals[2])}for(i=0,e=this.faces.length;i<e;i++)n=this.faces[i],n.normal=n.__originalFaceNormal,n.vertexNormals=n.__originalVertexNormals},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new J),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new B),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,o=this.vertices.length,s=this.vertices,l=t.vertices,h=this.faces,c=t.faces,f=this.faceVertexUvs[0],v=t.faceVertexUvs[0],y=this.colors,M=t.colors;i===void 0&&(i=0),e!==void 0&&(n=new P().getNormalMatrix(e)),t=0;for(var C=l.length;t<C;t++){var N=l[t].clone();e!==void 0&&N.applyMatrix4(e),s.push(N)}for(t=0,C=M.length;t<C;t++)y.push(M[t].clone());for(t=0,C=c.length;t<C;t++){l=c[t];var W=l.vertexNormals;for(M=l.vertexColors,y=new S(l.a+o,l.b+o,l.c+o),y.normal.copy(l.normal),n!==void 0&&y.normal.applyMatrix3(n).normalize(),e=0,s=W.length;e<s;e++)N=W[e].clone(),n!==void 0&&N.applyMatrix3(n).normalize(),y.vertexNormals.push(N);for(y.color.copy(l.color),e=0,s=M.length;e<s;e++)N=M[e],y.vertexColors.push(N.clone());y.materialIndex=l.materialIndex+i,h.push(y)}for(t=0,C=v.length;t<C;t++)if(i=v[t],n=[],i!==void 0){for(e=0,s=i.length;e<s;e++)n.push(i[e].clone());f.push(n)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t={},e=[],i=[],n=Math.pow(10,4),o,s=0;for(o=this.vertices.length;s<o;s++){var l=this.vertices[s];l=Math.round(l.x*n)+"_"+Math.round(l.y*n)+"_"+Math.round(l.z*n),t[l]===void 0?(t[l]=s,e.push(this.vertices[s]),i[s]=e.length-1):i[s]=i[t[l]]}for(t=[],s=0,o=this.faces.length;s<o;s++)for(n=this.faces[s],n.a=i[n.a],n.b=i[n.b],n.c=i[n.c],n=[n.a,n.b,n.c],l=0;3>l;l++)if(n[l]===n[(l+1)%3]){t.push(s);break}for(s=t.length-1;0<=s;s--)for(n=t[s],this.faces.splice(n,1),i=0,o=this.faceVertexUvs.length;i<o;i++)this.faceVertexUvs[i].splice(n,1);return s=this.vertices.length-e.length,this.vertices=e,s},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new m(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,i=0;i<e;i++)t[i]._id=i;t.sort(function(c,f){return c.materialIndex-f.materialIndex});var n=this.faceVertexUvs[0],o=this.faceVertexUvs[1],s,l;for(n&&n.length===e&&(s=[]),o&&o.length===e&&(l=[]),i=0;i<e;i++){var h=t[i]._id;s&&s.push(n[h]),l&&l.push(o[h])}s&&(this.faceVertexUvs[0]=s),l&&(this.faceVertexUvs[1]=l)},toJSON:function(){function t(Vt,V,tt){return tt?Vt|1<<V:Vt&~(1<<V)}function e(Vt){var V=Vt.x.toString()+Vt.y.toString()+Vt.z.toString();return f[V]!==void 0||(f[V]=c.length/3,c.push(Vt.x,Vt.y,Vt.z)),f[V]}function i(Vt){var V=Vt.r.toString()+Vt.g.toString()+Vt.b.toString();return y[V]!==void 0||(y[V]=v.length,v.push(Vt.getHex())),y[V]}function n(Vt){var V=Vt.x.toString()+Vt.y.toString();return C[V]!==void 0||(C[V]=M.length/2,M.push(Vt.x,Vt.y)),C[V]}var o={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.parameters!==void 0){var s=this.parameters,l;for(l in s)s[l]!==void 0&&(o[l]=s[l]);return o}for(s=[],l=0;l<this.vertices.length;l++){var h=this.vertices[l];s.push(h.x,h.y,h.z)}h=[];var c=[],f={},v=[],y={},M=[],C={};for(l=0;l<this.faces.length;l++){var N=this.faces[l],W=this.faceVertexUvs[0][l]!==void 0,Q=0<N.normal.length(),_t=0<N.vertexNormals.length,mt=N.color.r!==1||N.color.g!==1||N.color.b!==1,bt=0<N.vertexColors.length,xt=0;xt=t(xt,0,0),xt=t(xt,1,!0),xt=t(xt,2,!1),xt=t(xt,3,W),xt=t(xt,4,Q),xt=t(xt,5,_t),xt=t(xt,6,mt),xt=t(xt,7,bt),h.push(xt),h.push(N.a,N.b,N.c),h.push(N.materialIndex),W&&(W=this.faceVertexUvs[0][l],h.push(n(W[0]),n(W[1]),n(W[2]))),Q&&h.push(e(N.normal)),_t&&(Q=N.vertexNormals,h.push(e(Q[0]),e(Q[1]),e(Q[2]))),mt&&h.push(i(N.color)),bt&&(N=N.vertexColors,h.push(i(N[0]),i(N[1]),i(N[2])))}return o.data={},o.data.vertices=s,o.data.normals=c,0<v.length&&(o.data.colors=v),0<M.length&&(o.data.uvs=[M]),o.data.faces=h,o},clone:function(){return new j().copy(this)},copy:function(t){var e,i,n;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var o=t.vertices,s=0;for(e=o.length;s<e;s++)this.vertices.push(o[s].clone());for(o=t.colors,s=0,e=o.length;s<e;s++)this.colors.push(o[s].clone());for(o=t.faces,s=0,e=o.length;s<e;s++)this.faces.push(o[s].clone());for(s=0,e=t.faceVertexUvs.length;s<e;s++){var l=t.faceVertexUvs[s];for(this.faceVertexUvs[s]===void 0&&(this.faceVertexUvs[s]=[]),o=0,i=l.length;o<i;o++){var h=l[o],c=[],f=0;for(n=h.length;f<n;f++)c.push(h[f].clone());this.faceVertexUvs[s].push(c)}}for(f=t.morphTargets,s=0,e=f.length;s<e;s++){if(n={},n.name=f[s].name,f[s].vertices!==void 0)for(n.vertices=[],o=0,i=f[s].vertices.length;o<i;o++)n.vertices.push(f[s].vertices[o].clone());if(f[s].normals!==void 0)for(n.normals=[],o=0,i=f[s].normals.length;o<i;o++)n.normals.push(f[s].normals[o].clone());this.morphTargets.push(n)}for(f=t.morphNormals,s=0,e=f.length;s<e;s++){if(n={},f[s].vertexNormals!==void 0)for(n.vertexNormals=[],o=0,i=f[s].vertexNormals.length;o<i;o++)l=f[s].vertexNormals[o],h={},h.a=l.a.clone(),h.b=l.b.clone(),h.c=l.c.clone(),n.vertexNormals.push(h);if(f[s].faceNormals!==void 0)for(n.faceNormals=[],o=0,i=f[s].faceNormals.length;o<i;o++)n.faceNormals.push(f[s].faceNormals[o].clone());this.morphNormals.push(n)}for(o=t.skinWeights,s=0,e=o.length;s<e;s++)this.skinWeights.push(o[s].clone());for(o=t.skinIndices,s=0,e=o.length;s<e;s++)this.skinIndices.push(o[s].clone());for(o=t.lineDistances,s=0,e=o.length;s<e;s++)this.lineDistances.push(o[s]);return s=t.boundingBox,s!==null&&(this.boundingBox=s.clone()),s=t.boundingSphere,s!==null&&(this.boundingSphere=s.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(lt.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(lt.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=t!==void 0?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,o=this.itemSize;n<o;n++)this.array[t+n]=e.array[i+n];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),s=new b),e[i++]=s.r,e[i++]=s.g,e[i++]=s.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),s=new d),e[i++]=s.x,e[i++]=s.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),s=new m),e[i++]=s.x,e[i++]=s.y,e[i++]=s.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),s=new A),e[i++]=s.x,e[i++]=s.y,e[i++]=s.z,e[i++]=s.w}return this},set:function(t,e){return e===void 0&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this},setXYZW:function(t,e,i,n,o){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=o,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),ft.prototype=Object.create(lt.prototype),ft.prototype.constructor=ft,gt.prototype=Object.create(lt.prototype),gt.prototype.constructor=gt,Nt.prototype=Object.create(lt.prototype),Nt.prototype.constructor=Nt,at.prototype=Object.create(lt.prototype),at.prototype.constructor=at,Et.prototype=Object.create(lt.prototype),Et.prototype.constructor=Et,I.prototype=Object.create(lt.prototype),I.prototype.constructor=I,zt.prototype=Object.create(lt.prototype),zt.prototype.constructor=zt,Pt.prototype=Object.create(lt.prototype),Pt.prototype.constructor=Pt,Rt.prototype=Object.create(lt.prototype),Rt.prototype.constructor=Rt,Object.assign(ge.prototype,{computeGroups:function(t){var e=[],i=void 0;t=t.faces;for(var n=0;n<t.length;n++){var o=t[n];if(o.materialIndex!==i){i=o.materialIndex,s!==void 0&&(s.count=3*n-s.start,e.push(s));var s={start:3*n,materialIndex:i}}}s!==void 0&&(s.count=3*n-s.start,e.push(s)),this.groups=e},fromGeometry:function(t){var e=t.faces,i=t.vertices,n=t.faceVertexUvs,o=n[0]&&0<n[0].length,s=n[1]&&0<n[1].length,l=t.morphTargets,h=l.length;if(0<h){for(var c=[],f=0;f<h;f++)c[f]={name:l[f].name,data:[]};this.morphTargets.position=c}var v=t.morphNormals,y=v.length;if(0<y){var M=[];for(f=0;f<y;f++)M[f]={name:v[f].name,data:[]};this.morphTargets.normal=M}var C=t.skinIndices,N=t.skinWeights,W=C.length===i.length,Q=N.length===i.length;for(0<i.length&&e.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),f=0;f<e.length;f++){var _t=e[f];this.vertices.push(i[_t.a],i[_t.b],i[_t.c]);var mt=_t.vertexNormals;for(mt.length===3?this.normals.push(mt[0],mt[1],mt[2]):(mt=_t.normal,this.normals.push(mt,mt,mt)),mt=_t.vertexColors,mt.length===3?this.colors.push(mt[0],mt[1],mt[2]):(mt=_t.color,this.colors.push(mt,mt,mt)),o===!0&&(mt=n[0][f],mt!==void 0?this.uvs.push(mt[0],mt[1],mt[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",f),this.uvs.push(new d,new d,new d))),s===!0&&(mt=n[1][f],mt!==void 0?this.uvs2.push(mt[0],mt[1],mt[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",f),this.uvs2.push(new d,new d,new d))),mt=0;mt<h;mt++){var bt=l[mt].vertices;c[mt].data.push(bt[_t.a],bt[_t.b],bt[_t.c])}for(mt=0;mt<y;mt++)bt=v[mt].vertexNormals[f],M[mt].data.push(bt.a,bt.b,bt.c);W&&this.skinIndices.push(C[_t.a],C[_t.b],C[_t.c]),Q&&this.skinWeights.push(N[_t.a],N[_t.b],N[_t.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 dh=1;Ft.prototype=Object.assign(Object.create(ht.prototype),{constructor:Ft,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(65535<ue(t)?zt:Et)(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 lt(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 P().getNormalMatrix(t).applyToBufferAttribute(e),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},rotateX:function(){var t=new nt;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new nt;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new nt;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new nt;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new nt;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new z;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new m;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 Pt(3*e.vertices.length,3);var i=new Pt(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 Pt(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 Pt(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 ge().fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);this.addAttribute("position",new lt(e,3).copyVector3sArray(t.vertices)),0<t.normals.length&&(e=new Float32Array(3*t.normals.length),this.addAttribute("normal",new lt(e,3).copyVector3sArray(t.normals))),0<t.colors.length&&(e=new Float32Array(3*t.colors.length),this.addAttribute("color",new lt(e,3).copyColorsArray(t.colors))),0<t.uvs.length&&(e=new Float32Array(2*t.uvs.length),this.addAttribute("uv",new lt(e,2).copyVector2sArray(t.uvs))),0<t.uvs2.length&&(e=new Float32Array(2*t.uvs2.length),this.addAttribute("uv2",new lt(e,2).copyVector2sArray(t.uvs2))),this.groups=t.groups;for(var i in t.morphTargets){e=[];for(var n=t.morphTargets[i],o=0,s=n.length;o<s;o++){var l=n[o],h=new Pt(3*l.data.length,3);h.name=l.name,e.push(h.copyVector3sArray(l.data))}this.morphAttributes[i]=e}return 0<t.skinIndices.length&&(i=new Pt(4*t.skinIndices.length,4),this.addAttribute("skinIndex",i.copyVector4sArray(t.skinIndices))),0<t.skinWeights.length&&(i=new Pt(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 J);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 J,e=new m;return function(){this.boundingSphere===null&&(this.boundingSphere=new B);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var o=0,s=0,l=i.count;s<l;s++)e.x=i.getX(s),e.y=i.getY(s),e.z=i.getZ(s),o=Math.max(o,n.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(o),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes;if(e.position){var i=e.position.array;if(e.normal===void 0)this.addAttribute("normal",new lt(new Float32Array(i.length),3));else for(var n=e.normal.array,o=0,s=n.length;o<s;o++)n[o]=0;n=e.normal.array;var l=new m,h=new m,c=new m,f=new m,v=new m;if(t){var y=t.array;for(o=0,s=t.count;o<s;o+=3){t=3*y[o+0];var M=3*y[o+1],C=3*y[o+2];l.fromArray(i,t),h.fromArray(i,M),c.fromArray(i,C),f.subVectors(c,h),v.subVectors(l,h),f.cross(v),n[t]+=f.x,n[t+1]+=f.y,n[t+2]+=f.z,n[M]+=f.x,n[M+1]+=f.y,n[M+2]+=f.z,n[C]+=f.x,n[C+1]+=f.y,n[C+2]+=f.z}}else for(o=0,s=i.length;o<s;o+=9)l.fromArray(i,o),h.fromArray(i,o+3),c.fromArray(i,o+6),f.subVectors(c,h),v.subVectors(l,h),f.cross(v),n[o]=f.x,n[o+1]=f.y,n[o+2]=f.z,n[o+3]=f.x,n[o+4]=f.y,n[o+5]=f.z,n[o+6]=f.x,n[o+7]=f.y,n[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){e===void 0&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var i=this.attributes,n;for(n in i)if(t.attributes[n]!==void 0){var o=i[n].array,s=t.attributes[n],l=s.array,h=0;for(s=s.itemSize*e;h<l.length;h++,s++)o[s]=l[h]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new m;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],s=o.array,l=o.itemSize,h=new s.constructor(e.length*l),c=0;o=0;for(var f=e.length;o<f;o++)for(var v=e[o]*l,y=0;y<l;y++)h[c++]=s[v++];t.addAttribute(n,new lt(h,l))}for(e=this.groups,o=0,f=e.length;o<f;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(l in i)this.addAttribute(l,i[l].clone());var n=t.morphAttributes;for(l in n){var o=[],s=n[l];for(i=0,e=s.length;i<e;i++)o.push(s[i].clone());this.morphAttributes[l]=o}var l=t.groups;for(i=0,e=l.length;i<e;i++)n=l[i],this.addGroup(n.start,n.count,n.materialIndex);return l=t.boundingBox,l!==null&&(this.boundingBox=l.clone()),l=t.boundingSphere,l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Dt.prototype=Object.create(j.prototype),Dt.prototype.constructor=Dt,kt.prototype=Object.create(Ft.prototype),kt.prototype.constructor=kt,Fe.prototype=Object.create(j.prototype),Fe.prototype.constructor=Fe,xe.prototype=Object.create(Ft.prototype),xe.prototype.constructor=xe;var Vl=0;Zt.prototype=Object.assign(Object.create(ht.prototype),{constructor:Zt,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(t!==void 0)for(var e in t){var i=t[e];if(i===void 0)console.warn("THREE.Material: '"+e+"' parameter is undefined.");else if(e==="shading")console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===1;else{var n=this[e];n===void 0?console.warn("THREE."+this.type+": '"+e+"' is not a property of this material."):n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]=i}}},toJSON:function(t){function e(o){var s=[],l;for(l in o){var h=o[l];delete h.metadata,s.push(h)}return s}var i=t===void 0||typeof t=="string";i&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};return n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearCoat!==void 0&&(n.clearCoat=this.clearCoat),this.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity,this.combine!==void 0&&(n.combine=this.combine),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.size!==void 0&&(n.size=this.size),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.flatShading===!0&&(n.flatShading=this.flatShading),this.side!==0&&(n.side=this.side),this.vertexColors!==0&&(n.vertexColors=this.vertexColors),1>this.opacity&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),0<this.alphaTest&&(n.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),1<this.wireframeLinewidth&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.morphTargets===!0&&(n.morphTargets=!0),this.skinning===!0&&(n.skinning=!0),this.visible===!1&&(n.visible=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),i&&(i=e(t.textures),t=e(t.images),0<i.length&&(n.textures=i),0<t.length&&(n.images=t)),n},clone:function(){return new this.constructor().copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,i=null;if(e!==null){var n=e.length;i=Array(n);for(var o=0;o!==n;++o)i[o]=e[o].clone()}return this.clippingPlanes=i,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),ti.prototype=Object.create(Zt.prototype),ti.prototype.constructor=ti,ti.prototype.isShaderMaterial=!0,ti.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Pn.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},ti.prototype.toJSON=function(t){var e=Zt.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(ki.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 m),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 m;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 m),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 m;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 m,e=new m,i=new m;return function(n,o,s,l){t.copy(n).add(o).multiplyScalar(.5),e.copy(o).sub(n).normalize(),i.copy(this.origin).sub(t);var h=.5*n.distanceTo(o),c=-this.direction.dot(e),f=i.dot(this.direction),v=-i.dot(e),y=i.lengthSq(),M=Math.abs(1-c*c);if(0<M){n=c*v-f,o=c*f-v;var C=h*M;0<=n?o>=-C?o<=C?(h=1/M,n*=h,o*=h,c=n*(n+c*o+2*f)+o*(c*n+o+2*v)+y):(o=h,n=Math.max(0,-(c*o+f)),c=-n*n+o*(o+2*v)+y):(o=-h,n=Math.max(0,-(c*o+f)),c=-n*n+o*(o+2*v)+y):o<=-C?(n=Math.max(0,-(-c*h+f)),o=0<n?-h:Math.min(Math.max(-h,-v),h),c=-n*n+o*(o+2*v)+y):o<=C?(n=0,o=Math.min(Math.max(-h,-v),h),c=o*(o+2*v)+y):(n=Math.max(0,-(c*h+f)),o=0<n?h:Math.min(Math.max(-h,-v),h),c=-n*n+o*(o+2*v)+y)}else o=0<c?-h:h,n=Math.max(0,-(c*o+f)),c=-n*n+o*(o+2*v)+y;return s&&s.copy(this.direction).multiplyScalar(n).add(this.origin),l&&l.copy(e).multiplyScalar(o).add(t),c}}(),intersectSphere:function(){var t=new m;return function(e,i){t.subVectors(e.center,this.origin);var n=t.dot(this.direction),o=t.dot(t)-n*n;return e=e.radius*e.radius,o>e?null:(e=Math.sqrt(e-o),o=n-e,n+=e,0>o&&0>n?null:0>o?this.at(n,i):this.at(o,i))}}(),intersectsSphere:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);return e===0?t.distanceToPoint(this.origin)===0?0:null:(t=-(this.origin.dot(t.normal)+t.constant)/e,0<=t?t:null)},intersectPlane:function(t,e){return t=this.distanceToPlane(t),t===null?null:this.at(t,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return e===0||0>t.normal.dot(this.direction)*e},intersectBox:function(t,e){var i=1/this.direction.x,n=1/this.direction.y,o=1/this.direction.z,s=this.origin;if(0<=i){var l=(t.min.x-s.x)*i;i*=t.max.x-s.x}else l=(t.max.x-s.x)*i,i*=t.min.x-s.x;if(0<=n){var h=(t.min.y-s.y)*n;n*=t.max.y-s.y}else h=(t.max.y-s.y)*n,n*=t.min.y-s.y;return l>n||h>i||((h>l||l!==l)&&(l=h),(n<i||i!==i)&&(i=n),0<=o?(h=(t.min.z-s.z)*o,t=(t.max.z-s.z)*o):(h=(t.max.z-s.z)*o,t=(t.min.z-s.z)*o),l>t||h>i)?null:((h>l||l!==l)&&(l=h),(t<i||i!==i)&&(i=t),0>i?null:this.at(0<=l?l:i,e))},intersectsBox:function(){var t=new m;return function(e){return this.intersectBox(e,t)!==null}}(),intersectTriangle:function(){var t=new m,e=new m,i=new m,n=new m;return function(o,s,l,h,c){if(e.subVectors(s,o),i.subVectors(l,o),n.crossVectors(e,i),s=this.direction.dot(n),0<s){if(h)return null;h=1}else if(0>s)h=-1,s=-s;else return null;return t.subVectors(this.origin,o),o=h*this.direction.dot(i.crossVectors(t,i)),0>o||(l=h*this.direction.dot(e.cross(t)),0>l||o+l>s)?null:(o=-h*t.dot(n),0>o?null:this.at(o/s,c))}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(Oe,{getNormal:function(){var t=new m;return function(e,i,n,o){return o===void 0&&(console.warn("THREE.Triangle: .getNormal() target is now required"),o=new m),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 m,e=new m,i=new m;return function(n,o,s,l,h){t.subVectors(l,o),e.subVectors(s,o),i.subVectors(n,o),n=t.dot(t),o=t.dot(e),s=t.dot(i);var c=e.dot(e);l=e.dot(i);var f=n*c-o*o;return h===void 0&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),h=new m),f===0?h.set(-2,-1,-1):(f=1/f,c=(c*s-o*l)*f,n=(n*l-o*s)*f,h.set(1-c-n,n,c))}}(),containsPoint:function(){var t=new m;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 m;return function(e,i,n,o,s,l,h,c){return this.getBarycoord(e,i,n,o,t),c.set(0,0),c.addScaledVector(s,t.x),c.addScaledVector(l,t.y),c.addScaledVector(h,t.z),c}}()}),Object.assign(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 m,e=new m;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 m),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 m),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 m,e=new m,i=new m,n=new m,o=new m,s=new m;return function(l,h){h===void 0&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),h=new m);var c=this.a,f=this.b,v=this.c;t.subVectors(f,c),e.subVectors(v,c),n.subVectors(l,c);var y=t.dot(n),M=e.dot(n);if(0>=y&&0>=M)return h.copy(c);o.subVectors(l,f);var C=t.dot(o),N=e.dot(o);if(0<=C&&N<=C)return h.copy(f);var W=y*N-C*M;if(0>=W&&0<=y&&0>=C)return f=y/(y-C),h.copy(c).addScaledVector(t,f);s.subVectors(l,v),l=t.dot(s);var Q=e.dot(s);return 0<=Q&&l<=Q?h.copy(v):(y=l*M-y*Q,0>=y&&0<=M&&0>=Q?(W=M/(M-Q),h.copy(c).addScaledVector(e,W)):(M=C*Q-l*N,0>=M&&0<=N-C&&0<=l-Q?(i.subVectors(v,f),W=(N-C)/(N-C+(l-Q)),h.copy(f).addScaledVector(i,W)):(v=1/(M+y+W),f=y*v,W*=v,h.copy(c).addScaledVector(t,f).addScaledVector(e,W))))}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Ge.prototype=Object.create(Zt.prototype),Ge.prototype.constructor=Ge,Ge.prototype.isMeshBasicMaterial=!0,Ge.prototype.copy=function(t){return Zt.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},di.prototype=Object.assign(Object.create(z.prototype),{constructor:di,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return z.prototype.copy.call(this,t),this.drawMode=t.drawMode,t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t=this.geometry;if(t.isBufferGeometry){t=t.morphAttributes;var e=Object.keys(t);if(0<e.length){var i=t[e[0]];if(i!==void 0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++){var n=i[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}else if(i=t.morphTargets,i!==void 0&&0<i.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++)n=i[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t},raycast:function(){function t(Q,_t,mt,bt,xt,Vt,V,tt){return(_t.side===1?bt.intersectTriangle(V,Vt,xt,!0,tt):bt.intersectTriangle(xt,Vt,V,_t.side!==2,tt))===null?null:(W.copy(tt),W.applyMatrix4(Q.matrixWorld),_t=mt.ray.origin.distanceTo(W),_t<mt.near||_t>mt.far?null:{distance:_t,point:W.clone(),object:Q})}function e(Q,_t,mt,bt,xt,Vt,V,tt,Ot){return s.fromBufferAttribute(xt,V),l.fromBufferAttribute(xt,tt),h.fromBufferAttribute(xt,Ot),(Q=t(Q,_t,mt,bt,s,l,h,N))&&(Vt&&(y.fromBufferAttribute(Vt,V),M.fromBufferAttribute(Vt,tt),C.fromBufferAttribute(Vt,Ot),Q.uv=Oe.getUV(N,s,l,h,y,M,C,new d)),Vt=new S(V,tt,Ot),Oe.getNormal(s,l,h,Vt.normal),Q.face=Vt),Q}var i=new nt,n=new ki,o=new B,s=new m,l=new m,h=new m,c=new m,f=new m,v=new m,y=new d,M=new d,C=new d,N=new m,W=new m;return function(Q,_t){var mt=this.geometry,bt=this.material,xt=this.matrixWorld;if(bt!==void 0&&(mt.boundingSphere===null&&mt.computeBoundingSphere(),o.copy(mt.boundingSphere),o.applyMatrix4(xt),Q.ray.intersectsSphere(o)!==!1&&(i.getInverse(xt),n.copy(Q.ray).applyMatrix4(i),mt.boundingBox===null||n.intersectsBox(mt.boundingBox)!==!1))){if(mt.isBufferGeometry){var Vt=mt.index,V=mt.attributes.position,tt=mt.attributes.uv,Ot=mt.groups;mt=mt.drawRange;var ee;if(Vt!==null)if(Array.isArray(bt)){var $t=0;for(ee=Ot.length;$t<ee;$t++){var qt=Ot[$t],Te=bt[qt.materialIndex];xt=Math.max(qt.start,mt.start);var pe=Math.min(qt.start+qt.count,mt.start+mt.count);for(qt=xt;qt<pe;qt+=3){xt=Vt.getX(qt);var Ie=Vt.getX(qt+1),be=Vt.getX(qt+2);(xt=e(this,Te,Q,n,V,tt,xt,Ie,be))&&(xt.faceIndex=Math.floor(qt/3),_t.push(xt))}}}else for(xt=Math.max(0,mt.start),pe=Math.min(Vt.count,mt.start+mt.count),$t=xt,ee=pe;$t<ee;$t+=3)xt=Vt.getX($t),Ie=Vt.getX($t+1),be=Vt.getX($t+2),(xt=e(this,bt,Q,n,V,tt,xt,Ie,be))&&(xt.faceIndex=Math.floor($t/3),_t.push(xt));else if(V!==void 0)if(Array.isArray(bt))for($t=0,ee=Ot.length;$t<ee;$t++)for(qt=Ot[$t],Te=bt[qt.materialIndex],xt=Math.max(qt.start,mt.start),pe=Math.min(qt.start+qt.count,mt.start+mt.count),qt=xt;qt<pe;qt+=3)xt=qt,Ie=qt+1,be=qt+2,(xt=e(this,Te,Q,n,V,tt,xt,Ie,be))&&(xt.faceIndex=Math.floor(qt/3),_t.push(xt));else for(xt=Math.max(0,mt.start),pe=Math.min(V.count,mt.start+mt.count),$t=xt,ee=pe;$t<ee;$t+=3)xt=$t,Ie=$t+1,be=$t+2,(xt=e(this,bt,Q,n,V,tt,xt,Ie,be))&&(xt.faceIndex=Math.floor($t/3),_t.push(xt))}else if(mt.isGeometry){for(V=Array.isArray(bt),tt=mt.vertices,Ot=mt.faces,xt=mt.faceVertexUvs[0],0<xt.length&&(Vt=xt),qt=0,pe=Ot.length;qt<pe;qt++)if(Ie=Ot[qt],xt=V?bt[Ie.materialIndex]:bt,xt!==void 0){if($t=tt[Ie.a],ee=tt[Ie.b],Te=tt[Ie.c],xt.morphTargets===!0){be=mt.morphTargets;var se=this.morphTargetInfluences;s.set(0,0,0),l.set(0,0,0),h.set(0,0,0);for(var We=0,Ke=be.length;We<Ke;We++){var fi=se[We];if(fi!==0){var xn=be[We].vertices;s.addScaledVector(c.subVectors(xn[Ie.a],$t),fi),l.addScaledVector(f.subVectors(xn[Ie.b],ee),fi),h.addScaledVector(v.subVectors(xn[Ie.c],Te),fi)}}s.add($t),l.add(ee),h.add(Te),$t=s,ee=l,Te=h}(xt=t(this,xt,Q,n,$t,ee,Te,N))&&(Vt&&Vt[qt]&&(be=Vt[qt],y.copy(be[0]),M.copy(be[1]),C.copy(be[2]),xt.uv=Oe.getUV(N,$t,ee,Te,y,M,C,new d)),xt.face=Ie,xt.faceIndex=qt,_t.push(xt))}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.prototype.isCubeTexture=!0,Object.defineProperty(w.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),X.prototype=Object.create(D.prototype),X.prototype.constructor=X,X.prototype.isDataTexture3D=!0;var ml=new D,mh=new X,Wl=new w,Va=[],Bs=[],ga=new Float32Array(16),jl=new Float32Array(9),gl=new Float32Array(4);cs.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),vt(e,t)},Ws.prototype.setValue=function(t,e,i){for(var n=this.seq,o=0,s=n.length;o!==s;++o){var l=n[o];l.setValue(t,e[l.id],i)}};var vl=/([\w\d_]+)(\])?(\[|\.)?/g;Dr.prototype.setValue=function(t,e,i){e=this.map[e],e!==void 0&&e.setValue(t,i,this.renderer)},Dr.prototype.setOptional=function(t,e,i){e=e[i],e!==void 0&&this.setValue(t,i,e)},Dr.upload=function(t,e,i,n){for(var o=0,s=e.length;o!==s;++o){var l=e[o],h=i[l.id];h.needsUpdate!==!1&&l.setValue(t,h.value,n)}},Dr.seqWithValue=function(t,e){for(var i=[],n=0,o=t.length;n!==o;++n){var s=t[n];s.id in e&&i.push(s)}return i};var ao=0,yl=0;oe.prototype=Object.create(Zt.prototype),oe.prototype.constructor=oe,oe.prototype.isMeshDepthMaterial=!0,oe.prototype.copy=function(t){return Zt.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(Zt.prototype),te.prototype.constructor=te,te.prototype.isMeshDistanceMaterial=!0,te.prototype.copy=function(t){return Zt.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(z.prototype),{constructor:ci,isGroup:!0}),Be.prototype=Object.assign(Object.create(z.prototype),{constructor:Be,isCamera:!0,copy:function(t,e){return z.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this},getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new m),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){z.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return new this.constructor().copy(this)}}),ye.prototype=Object.assign(Object.create(Be.prototype),{constructor:ye,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*pi.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*pi.DEG2RAD*this.fov);return .5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*pi.RAD2DEG*Math.atan(Math.tan(.5*pi.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,i,n,o,s){this.aspect=t/e,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*pi.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,o=-.5*n,s=this.view;if(this.view!==null&&this.view.enabled){var l=s.fullWidth,h=s.fullHeight;o+=s.offsetX*n/l,e-=s.offsetY*i/h,n*=s.width/l,i*=s.height/h}s=this.filmOffset,s!==0&&(o+=t*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+n,e,e-i,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=z.prototype.toJSON.call(this,t),t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),ke.prototype=Object.assign(Object.create(ye.prototype),{constructor:ke,isArrayCamera:!0});var Ao=new m,sr=new m;Le.prototype.isFogExp2=!0,Le.prototype.clone=function(){return new Le(this.color,this.density)},Le.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},vn.prototype.isFog=!0,vn.prototype.clone=function(){return new vn(this.color,this.near,this.far)},vn.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},zn.prototype=Object.assign(Object.create(z.prototype),{constructor:zn,copy:function(t,e){return z.prototype.copy.call(this,t,e),t.background!==null&&(this.background=t.background.clone()),t.fog!==null&&(this.fog=t.fog.clone()),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=z.prototype.toJSON.call(this,t);return this.background!==null&&(e.object.background=this.background.toJSON(t)),this.fog!==null&&(e.object.fog=this.fog.toJSON()),e}}),Object.defineProperty(Ii.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(Ii.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(Di.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Di.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}}),Fi.prototype=Object.create(Zt.prototype),Fi.prototype.constructor=Fi,Fi.prototype.isSpriteMaterial=!0,Fi.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this};var Ns;Ki.prototype=Object.assign(Object.create(z.prototype),{constructor:Ki,isSprite:!0,raycast:function(){function t(C,N,W,Q,_t,mt){o.subVectors(C,W).addScalar(.5).multiply(Q),_t!==void 0?(s.x=mt*o.x-_t*o.y,s.y=_t*o.x+mt*o.y):s.copy(o),C.copy(N),C.x+=s.x,C.y+=s.y,C.applyMatrix4(l)}var e=new m,i=new m,n=new m,o=new d,s=new d,l=new nt,h=new m,c=new m,f=new m,v=new d,y=new d,M=new d;return function(C,N){i.setFromMatrixScale(this.matrixWorld),l.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var W=this.material.rotation;if(W!==0)var Q=Math.cos(W),_t=Math.sin(W);W=this.center,t(h.set(-.5,-.5,0),n,W,i,_t,Q),t(c.set(.5,-.5,0),n,W,i,_t,Q),t(f.set(.5,.5,0),n,W,i,_t,Q),v.set(0,0),y.set(1,0),M.set(1,1);var mt=C.ray.intersectTriangle(h,c,f,!1,e);mt===null&&(t(c.set(-.5,.5,0),n,W,i,_t,Q),y.set(0,1),mt=C.ray.intersectTriangle(h,f,c,!1,e),mt===null)||(_t=C.ray.origin.distanceTo(e),_t<C.near||_t>C.far||N.push({distance:_t,point:e.clone(),uv:Oe.getUV(e,h,c,f,v,y,M,new d),face:null,object:this}))}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return z.prototype.copy.call(this,t),t.center!==void 0&&this.center.copy(t.center),this}}),Qi.prototype=Object.assign(Object.create(z.prototype),{constructor:Qi,copy:function(t){z.prototype.copy.call(this,t,!1),t=t.levels;for(var e=0,i=t.length;e<i;e++){var n=t[e];this.addLevel(n.object.clone(),n.distance)}return this},addLevel:function(t,e){e===void 0&&(e=0),e=Math.abs(e);for(var i=this.levels,n=0;n<i.length&&!(e<i[n].distance);n++);i.splice(n,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,i=1,n=e.length;i<n&&!(t<e[i].distance);i++);return e[i-1].object},raycast:function(){var t=new m;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 m,e=new m;return function(i){var n=this.levels;if(1<n.length){t.setFromMatrixPosition(i.matrixWorld),e.setFromMatrixPosition(this.matrixWorld),i=t.distanceTo(e),n[0].object.visible=!0;for(var o=1,s=n.length;o<s&&i>=n[o].distance;o++)n[o-1].object.visible=!1,n[o].object.visible=!0;for(;o<s;o++)n[o].object.visible=!1}}}(),toJSON:function(t){t=z.prototype.toJSON.call(this,t),t.object.levels=[];for(var e=this.levels,i=0,n=e.length;i<n;i++){var o=e[i];t.object.levels.push({object:o.object.uuid,distance:o.distance})}return t}}),Object.assign(sn.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new nt;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 nt,e=new nt;return function(){for(var i=this.bones,n=this.boneInverses,o=this.boneMatrices,s=this.boneTexture,l=0,h=i.length;l<h;l++)t.multiplyMatrices(i[l]?i[l].matrixWorld:e,n[l]),t.toArray(o,16*l);s!==void 0&&(s.needsUpdate=!0)}}(),clone:function(){return new sn(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}}}),an.prototype=Object.assign(Object.create(z.prototype),{constructor:an,isBone:!0}),Ui.prototype=Object.assign(Object.create(di.prototype),{constructor:Ui,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 an;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 A;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){di.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)}}),zi.prototype=Object.create(Zt.prototype),zi.prototype.constructor=zi,zi.prototype.isLineBasicMaterial=!0,zi.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Vi.prototype=Object.assign(Object.create(z.prototype),{constructor:Vi,isLine:!0,computeLineDistances:function(){var t=new m,e=new m;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[0],s=1,l=n.count;s<l;s++)t.fromBufferAttribute(n,s-1),e.fromBufferAttribute(n,s),o[s]=o[s-1],o[s]+=t.distanceTo(e);i.addAttribute("lineDistance",new Pt(o,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,o=i.lineDistances,o[0]=0,s=1,l=n.length;s<l;s++)o[s]=o[s-1],o[s]+=n[s-1].distanceTo(n[s]);return this}}(),raycast:function(){var t=new nt,e=new ki,i=new B;return function(n,o){var s=n.linePrecision,l=this.geometry,h=this.matrixWorld;if(l.boundingSphere===null&&l.computeBoundingSphere(),i.copy(l.boundingSphere),i.applyMatrix4(h),i.radius+=s,n.ray.intersectsSphere(i)!==!1){t.getInverse(h),e.copy(n.ray).applyMatrix4(t),s/=(this.scale.x+this.scale.y+this.scale.z)/3,s*=s;var c=new m,f=new m;h=new m;var v=new m,y=this&&this.isLineSegments?2:1;if(l.isBufferGeometry){var M=l.index,C=l.attributes.position.array;if(M!==null){M=M.array,l=0;for(var N=M.length-1;l<N;l+=y){var W=M[l+1];c.fromArray(C,3*M[l]),f.fromArray(C,3*W),W=e.distanceSqToSegment(c,f,v,h),W>s||(v.applyMatrix4(this.matrixWorld),W=n.ray.origin.distanceTo(v),W<n.near||W>n.far||o.push({distance:W,point:h.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}}else for(l=0,N=C.length/3-1;l<N;l+=y)c.fromArray(C,3*l),f.fromArray(C,3*l+3),W=e.distanceSqToSegment(c,f,v,h),W>s||(v.applyMatrix4(this.matrixWorld),W=n.ray.origin.distanceTo(v),W<n.near||W>n.far||o.push({distance:W,point:h.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}else if(l.isGeometry)for(c=l.vertices,f=c.length,l=0;l<f-1;l+=y)W=e.distanceSqToSegment(c[l],c[l+1],v,h),W>s||(v.applyMatrix4(this.matrixWorld),W=n.ray.origin.distanceTo(v),W<n.near||W>n.far||o.push({distance:W,point:h.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}}}(),copy:function(t){return z.prototype.copy.call(this,t),this.geometry.copy(t.geometry),this.material.copy(t.material),this},clone:function(){return new this.constructor().copy(this)}}),gi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:gi,isLineSegments:!0,computeLineDistances:function(){var t=new m,e=new m;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[],s=0,l=n.count;s<l;s+=2)t.fromBufferAttribute(n,s),e.fromBufferAttribute(n,s+1),o[s]=s===0?0:o[s-1],o[s+1]=o[s]+t.distanceTo(e);i.addAttribute("lineDistance",new Pt(o,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,o=i.lineDistances,s=0,l=n.length;s<l;s+=2)t.copy(n[s]),e.copy(n[s+1]),o[s]=s===0?0:o[s-1],o[s+1]=o[s]+t.distanceTo(e);return this}}()}),Br.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Br,isLineLoop:!0}),Ln.prototype=Object.create(Zt.prototype),Ln.prototype.constructor=Ln,Ln.prototype.isPointsMaterial=!0,Ln.prototype.copy=function(t){return Zt.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},ds.prototype=Object.assign(Object.create(z.prototype),{constructor:ds,isPoints:!0,raycast:function(){var t=new nt,e=new ki,i=new B;return function(n,o){function s(Q,_t){var mt=e.distanceSqToPoint(Q);mt<v&&(e.closestPointToPoint(Q,y),y.applyMatrix4(c),Q=n.ray.origin.distanceTo(y),Q<n.near||Q>n.far||o.push({distance:Q,distanceToRay:Math.sqrt(mt),point:y.clone(),index:_t,face:null,object:l}))}var l=this,h=this.geometry,c=this.matrixWorld,f=n.params.Points.threshold;if(h.boundingSphere===null&&h.computeBoundingSphere(),i.copy(h.boundingSphere),i.applyMatrix4(c),i.radius+=f,n.ray.intersectsSphere(i)!==!1){t.getInverse(c),e.copy(n.ray).applyMatrix4(t),f/=(this.scale.x+this.scale.y+this.scale.z)/3;var v=f*f;f=new m;var y=new m;if(h.isBufferGeometry){var M=h.index;if(h=h.attributes.position.array,M!==null){var C=M.array;M=0;for(var N=C.length;M<N;M++){var W=C[M];f.fromArray(h,3*W),s(f,W)}}else for(M=0,C=h.length/3;M<C;M++)f.fromArray(h,3*M),s(f,M)}else for(f=h.vertices,M=0,C=f.length;M<C;M++)s(f[M],M)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),nl.prototype=Object.assign(Object.create(D.prototype),{constructor:nl,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),po.prototype=Object.create(D.prototype),po.prototype.constructor=po,po.prototype.isCompressedTexture=!0,Xs.prototype=Object.create(D.prototype),Xs.prototype.constructor=Xs,Xs.prototype.isCanvasTexture=!0,qs.prototype=Object.create(D.prototype),qs.prototype.constructor=qs,qs.prototype.isDepthTexture=!0,ms.prototype=Object.create(Ft.prototype),ms.prototype.constructor=ms,Ys.prototype=Object.create(j.prototype),Ys.prototype.constructor=Ys,gs.prototype=Object.create(Ft.prototype),gs.prototype.constructor=gs,Wi.prototype=Object.create(j.prototype),Wi.prototype.constructor=Wi,xi.prototype=Object.create(Ft.prototype),xi.prototype.constructor=xi,Zs.prototype=Object.create(j.prototype),Zs.prototype.constructor=Zs,vs.prototype=Object.create(xi.prototype),vs.prototype.constructor=vs,Js.prototype=Object.create(j.prototype),Js.prototype.constructor=Js,Do.prototype=Object.create(xi.prototype),Do.prototype.constructor=Do,$s.prototype=Object.create(j.prototype),$s.prototype.constructor=$s,ys.prototype=Object.create(xi.prototype),ys.prototype.constructor=ys,_s.prototype=Object.create(j.prototype),_s.prototype.constructor=_s,xs.prototype=Object.create(xi.prototype),xs.prototype.constructor=xs,un.prototype=Object.create(j.prototype),un.prototype.constructor=un,mo.prototype=Object.create(Ft.prototype),mo.prototype.constructor=mo,Sr.prototype=Object.create(j.prototype),Sr.prototype.constructor=Sr,zo.prototype=Object.create(Ft.prototype),zo.prototype.constructor=zo,Bo.prototype=Object.create(j.prototype),Bo.prototype.constructor=Bo,Rn.prototype=Object.create(Ft.prototype),Rn.prototype.constructor=Rn;var Xl={triangulate:function(t,e,i){i=i||2;var n=e&&e.length,o=n?e[0]*i:t.length,s=rl(t,0,o,i,!0),l=[];if(!s)return l;var h;if(n){var c=i;n=[];var f,v=0;for(f=e.length;v<f;v++){var y=e[v]*c,M=v<f-1?e[v+1]*c:t.length;y=rl(t,y,M,c,!1),y===y.next&&(y.steiner=!0),n.push(nr(y))}for(n.sort(Ol),v=0;v<n.length;v++)e=n[v],c=s,(c=Il(e,c))&&(e=Ks(c,e),ws(e,e.next)),s=ws(s,s.next)}if(t.length>80*i){var C=h=t[0],N=n=t[1];for(c=i;c<o;c+=i)v=t[c],e=t[c+1],v<C&&(C=v),e<N&&(N=e),v>h&&(h=v),e>n&&(n=e);h=Math.max(h-C,n-N),h=h!==0?1/h:0}return Ts(s,l,i,C,N,h),l}},Xr={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>Xr.area(t)},triangulateShape:function(t,e){var i=[],n=[],o=[];Ia(t),Dl(i,t);var s=t.length;for(e.forEach(Ia),t=0;t<e.length;t++)n.push(s),s+=e[t].length,Dl(i,e[t]);for(e=Xl.triangulate(i,n),t=0;t<e.length;t+=3)o.push(e.slice(t,t+3));return o}};Qr.prototype=Object.create(j.prototype),Qr.prototype.constructor=Qr,Qr.prototype.toJSON=function(){var t=j.prototype.toJSON.call(this);return zl(this.parameters.shapes,this.parameters.options,t)},kr.prototype=Object.create(Ft.prototype),kr.prototype.constructor=kr,kr.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return zl(this.parameters.shapes,this.parameters.options,t)};var va={generateTopUV:function(t,e,i,n,o){t=e[3*n],n=e[3*n+1];var s=e[3*o];return o=e[3*o+1],[new d(e[3*i],e[3*i+1]),new d(t,n),new d(s,o)]},generateSideWallUV:function(t,e,i,n,o,s){t=e[3*i];var l=e[3*i+1];i=e[3*i+2];var h=e[3*n],c=e[3*n+1];n=e[3*n+2];var f=e[3*o],v=e[3*o+1];o=e[3*o+2];var y=e[3*s],M=e[3*s+1];return e=e[3*s+2],.01>Math.abs(l-c)?[new d(t,1-i),new d(h,1-n),new d(f,1-o),new d(y,1-e)]:[new d(l,1-i),new d(c,1-n),new d(v,1-o),new d(M,1-e)]}};Qs.prototype=Object.create(j.prototype),Qs.prototype.constructor=Qs,ko.prototype=Object.create(kr.prototype),ko.prototype.constructor=ko,go.prototype=Object.create(j.prototype),go.prototype.constructor=go,fr.prototype=Object.create(Ft.prototype),fr.prototype.constructor=fr,ta.prototype=Object.create(j.prototype),ta.prototype.constructor=ta,Uo.prototype=Object.create(Ft.prototype),Uo.prototype.constructor=Uo,Ms.prototype=Object.create(j.prototype),Ms.prototype.constructor=Ms,vo.prototype=Object.create(Ft.prototype),vo.prototype.constructor=vo,to.prototype=Object.create(j.prototype),to.prototype.constructor=to,to.prototype.toJSON=function(){var t=j.prototype.toJSON.call(this);return Bl(this.parameters.shapes,t)},yo.prototype=Object.create(Ft.prototype),yo.prototype.constructor=yo,yo.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return Bl(this.parameters.shapes,t)},_o.prototype=Object.create(Ft.prototype),_o.prototype.constructor=_o,eo.prototype=Object.create(j.prototype),eo.prototype.constructor=eo,io.prototype=Object.create(Ft.prototype),io.prototype.constructor=io,Ss.prototype=Object.create(eo.prototype),Ss.prototype.constructor=Ss,On.prototype=Object.create(io.prototype),On.prototype.constructor=On,Fo.prototype=Object.create(j.prototype),Fo.prototype.constructor=Fo,Ur.prototype=Object.create(Ft.prototype),Ur.prototype.constructor=Ur;var fn=Object.freeze({WireframeGeometry:ms,ParametricGeometry:Ys,ParametricBufferGeometry:gs,TetrahedronGeometry:Zs,TetrahedronBufferGeometry:vs,OctahedronGeometry:Js,OctahedronBufferGeometry:Do,IcosahedronGeometry:$s,IcosahedronBufferGeometry:ys,DodecahedronGeometry:_s,DodecahedronBufferGeometry:xs,PolyhedronGeometry:Wi,PolyhedronBufferGeometry:xi,TubeGeometry:un,TubeBufferGeometry:mo,TorusKnotGeometry:Sr,TorusKnotBufferGeometry:zo,TorusGeometry:Bo,TorusBufferGeometry:Rn,TextGeometry:Qs,TextBufferGeometry:ko,SphereGeometry:go,SphereBufferGeometry:fr,RingGeometry:ta,RingBufferGeometry:Uo,PlaneGeometry:Fe,PlaneBufferGeometry:xe,LatheGeometry:Ms,LatheBufferGeometry:vo,ShapeGeometry:to,ShapeBufferGeometry:yo,ExtrudeGeometry:Qr,ExtrudeBufferGeometry:kr,EdgesGeometry:_o,ConeGeometry:Ss,ConeBufferGeometry:On,CylinderGeometry:eo,CylinderBufferGeometry:io,CircleGeometry:Fo,CircleBufferGeometry:Ur,BoxGeometry:Dt,BoxBufferGeometry:kt});xo.prototype=Object.create(Zt.prototype),xo.prototype.constructor=xo,xo.prototype.isShadowMaterial=!0,xo.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.color.copy(t.color),this},Go.prototype=Object.create(ti.prototype),Go.prototype.constructor=Go,Go.prototype.isRawShaderMaterial=!0,Fr.prototype=Object.create(Zt.prototype),Fr.prototype.constructor=Fr,Fr.prototype.isMeshStandardMaterial=!0,Fr.prototype.copy=function(t){return Zt.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},Ho.prototype=Object.create(Fr.prototype),Ho.prototype.constructor=Ho,Ho.prototype.isMeshPhysicalMaterial=!0,Ho.prototype.copy=function(t){return Fr.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},Er.prototype=Object.create(Zt.prototype),Er.prototype.constructor=Er,Er.prototype.isMeshPhongMaterial=!0,Er.prototype.copy=function(t){return Zt.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},Vo.prototype=Object.create(Er.prototype),Vo.prototype.constructor=Vo,Vo.prototype.isMeshToonMaterial=!0,Vo.prototype.copy=function(t){return Er.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Wo.prototype=Object.create(Zt.prototype),Wo.prototype.constructor=Wo,Wo.prototype.isMeshNormalMaterial=!0,Wo.prototype.copy=function(t){return Zt.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},pr.prototype=Object.create(Zt.prototype),pr.prototype.constructor=pr,pr.prototype.isMeshLambertMaterial=!0,pr.prototype.copy=function(t){return Zt.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},jo.prototype=Object.create(Zt.prototype),jo.prototype.constructor=jo,jo.prototype.isMeshMatcapMaterial=!0,jo.prototype.copy=function(t){return Zt.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},Xo.prototype=Object.create(zi.prototype),Xo.prototype.constructor=Xo,Xo.prototype.isLineDashedMaterial=!0,Xo.prototype.copy=function(t){return zi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var ql=Object.freeze({ShadowMaterial:xo,SpriteMaterial:Fi,RawShaderMaterial:Go,ShaderMaterial:ti,PointsMaterial:Ln,MeshPhysicalMaterial:Ho,MeshStandardMaterial:Fr,MeshPhongMaterial:Er,MeshToonMaterial:Vo,MeshNormalMaterial:Wo,MeshLambertMaterial:pr,MeshDepthMaterial:oe,MeshDistanceMaterial:te,MeshBasicMaterial:Ge,MeshMatcapMaterial:jo,LineDashedMaterial:Xo,LineBasicMaterial:zi,Material:Zt}),Nn={arraySlice:function(t,e,i){return Nn.isTypedArray(t)?new t.constructor(t.subarray(e,i!==void 0?i:t.length)):t.slice(e,i)},convertArray:function(t,e,i){return!t||!i&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,i=Array(e),n=0;n!==e;++n)i[n]=n;return i.sort(function(o,s){return t[o]-t[s]}),i},sortedArray:function(t,e,i){for(var n=t.length,o=new t.constructor(n),s=0,l=0;l!==n;++s)for(var h=i[s]*e,c=0;c!==e;++c)o[l++]=t[h+c];return o},flattenJSON:function(t,e,i,n){for(var o=1,s=t[0];s!==void 0&&s[n]===void 0;)s=t[o++];if(s!==void 0){var l=s[n];if(l!==void 0)if(Array.isArray(l))do l=s[n],l!==void 0&&(e.push(s.time),i.push.apply(i,l)),s=t[o++];while(s!==void 0);else if(l.toArray!==void 0)do l=s[n],l!==void 0&&(e.push(s.time),l.toArray(i,i.length)),s=t[o++];while(s!==void 0);else do l=s[n],l!==void 0&&(e.push(s.time),i.push(l)),s=t[o++];while(s!==void 0)}}};Object.assign(Fn.prototype,{evaluate:function(t){var e=this.parameterPositions,i=this._cachedIndex,n=e[i],o=e[i-1];t:{e:{i:{n:if(!(t<n)){for(var s=i+2;;){if(n===void 0){if(t<o)break n;return this._cachedIndex=i=e.length,this.afterEnd_(i-1,t,o)}if(i===s)break;if(o=n,n=e[++i],t<n)break e}n=e.length;break i}if(t>=o)break t;for(s=e[1],t<s&&(i=2,o=s),s=i-2;;){if(o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===s)break;if(n=o,o=e[--i-1],t>=o)break e}n=i,i=0}for(;i<n;)o=i+n>>>1,t<e[o]?n=o:i=o+1;if(n=e[i],o=e[i-1],o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(n===void 0)return this._cachedIndex=i=e.length,this.afterEnd_(i-1,o,t)}this._cachedIndex=i,this.intervalChanged_(i,o,n)}return this.interpolate_(i,o,t,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){var e=this.resultBuffer,i=this.sampleValues,n=this.valueSize;t*=n;for(var o=0;o!==n;++o)e[o]=i[t+o];return e},interpolate_:function(){throw Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(Fn.prototype,{beforeStart_:Fn.prototype.copySampleValue_,afterEnd_:Fn.prototype.copySampleValue_}),ea.prototype=Object.assign(Object.create(Fn.prototype),{constructor:ea,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,o=t-2,s=t+1,l=n[o],h=n[s];if(l===void 0)switch(this.getSettings_().endingStart){case 2401:o=t,l=2*e-i;break;case 2402:o=n.length-2,l=e+n[o]-n[o+1];break;default:o=t,l=i}if(h===void 0)switch(this.getSettings_().endingEnd){case 2401:s=t,h=2*i-e;break;case 2402:s=1,h=i+n[1]-n[0];break;default:s=t-1,h=e}t=.5*(i-e),n=this.valueSize,this._weightPrev=t/(e-l),this._weightNext=t/(h-i),this._offsetPrev=o*n,this._offsetNext=s*n},interpolate_:function(t,e,i,n){var o=this.resultBuffer,s=this.sampleValues,l=this.valueSize;t*=l;var h=t-l,c=this._offsetPrev,f=this._offsetNext,v=this._weightPrev,y=this._weightNext,M=(i-e)/(n-e);for(i=M*M,n=i*M,e=-v*n+2*v*i-v*M,v=(1+v)*n+(-1.5-2*v)*i+(-.5+v)*M+1,M=(-1-y)*n+(1.5+y)*i+.5*M,y=y*n-y*i,i=0;i!==l;++i)o[i]=e*s[c+i]+v*s[h+i]+M*s[t+i]+y*s[f+i];return o}}),dr.prototype=Object.assign(Object.create(Fn.prototype),{constructor:dr,interpolate_:function(t,e,i,n){var o=this.resultBuffer,s=this.sampleValues,l=this.valueSize;t*=l;var h=t-l;for(e=(i-e)/(n-e),i=1-e,n=0;n!==l;++n)o[n]=s[h+n]*i+s[t+n]*e;return o}}),qo.prototype=Object.assign(Object.create(Fn.prototype),{constructor:qo,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(In,{toJSON:function(t){var e=t.constructor;if(e.toJSON!==void 0)e=e.toJSON(t);else{e={name:t.name,times:Nn.convertArray(t.times,Array),values:Nn.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e}}),Object.assign(In.prototype,{constructor:In,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new qo(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 ea(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){switch(t){case 2300:var e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(e===void 0){if(e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name,this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(e);return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(t!==0)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]+=t;return this},scale:function(t){if(t!==1)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]*=t;return this},trim:function(t,e){for(var i=this.times,n=i.length,o=0,s=n-1;o!==n&&i[o]<t;)++o;for(;s!==-1&&i[s]>e;)--s;return++s,(o!==0||s!==n)&&(o>=s&&(s=Math.max(s,1),o=s-1),t=this.getValueSize(),this.times=Nn.arraySlice(i,o,s),this.values=Nn.arraySlice(this.values,o*t,s*t)),this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var i=this.times;e=this.values;var n=i.length;n===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,s=0;s!==n;s++){var l=i[s];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,l),t=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,l,o),t=!1;break}o=l}if(e!==void 0&&Nn.isTypedArray(e)){for(s=0,i=e.length;s!==i;++s)if(n=e[s],isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,n),t=!1;break}}return t},optimize:function(){for(var t=this.times,e=this.values,i=this.getValueSize(),n=this.getInterpolation()===2302,o=1,s=t.length-1,l=1;l<s;++l){var h=!1,c=t[l];if(c!==t[l+1]&&(l!==1||c!==c[0]))if(n)h=!0;else{var f=l*i,v=f-i,y=f+i;for(c=0;c!==i;++c){var M=e[f+c];if(M!==e[v+c]||M!==e[y+c]){h=!0;break}}}if(h){if(l!==o)for(t[o]=t[l],h=l*i,f=o*i,c=0;c!==i;++c)e[f+c]=e[h+c];++o}}if(0<s){for(t[o]=t[s],h=s*i,f=o*i,c=0;c!==i;++c)e[f+c]=e[h+c];++o}return o!==t.length&&(this.times=Nn.arraySlice(t,0,o),this.values=Nn.arraySlice(e,0,o*i)),this}}),Da.prototype=Object.assign(Object.create(In.prototype),{constructor:Da,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),za.prototype=Object.assign(Object.create(In.prototype),{constructor:za,ValueTypeName:"color"}),br.prototype=Object.assign(Object.create(In.prototype),{constructor:br,ValueTypeName:"number"}),qn.prototype=Object.assign(Object.create(Fn.prototype),{constructor:qn,interpolate_:function(t,e,i,n){var o=this.resultBuffer,s=this.sampleValues,l=this.valueSize;for(t*=l,e=(i-e)/(n-e),i=t+l;t!==i;t+=4)H.slerpFlat(o,0,s,t-l,s,t,e);return o}}),Es.prototype=Object.assign(Object.create(In.prototype),{constructor:Es,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new qn(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),Ba.prototype=Object.assign(Object.create(In.prototype),{constructor:Ba,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),bs.prototype=Object.assign(Object.create(In.prototype),{constructor:bs,ValueTypeName:"vector"}),Object.assign(rr,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),o=0,s=i.length;o!==s;++o)e.push(ch(i[o]).scale(n));return new rr(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(In.toJSON(i[n]));return t},CreateFromMorphTargetSequence:function(t,e,i,n){for(var o=e.length,s=[],l=0;l<o;l++){var h=[],c=[];h.push((l+o-1)%o,l,(l+1)%o),c.push(0,1,0);var f=Nn.getKeyframeOrder(h);h=Nn.sortedArray(h,1,f),c=Nn.sortedArray(c,1,f),n||h[0]!==0||(h.push(o),c.push(c[0])),s.push(new br(".morphTargetInfluences["+e[l].name+"]",h,c).scale(1/i))}return new rr(t,-1,s)},findByName:function(t,e){var i=t;for(Array.isArray(t)||(i=t.geometry&&t.geometry.animations||t.animations),t=0;t<i.length;t++)if(i[t].name===e)return i[t];return null},CreateClipsFromMorphTargetSequences:function(t,e,i){for(var n={},o=/^([\w-]*?)([\d]+)$/,s=0,l=t.length;s<l;s++){var h=t[s],c=h.name.match(o);if(c&&1<c.length){var f=c[1];(c=n[f])||(n[f]=c=[]),c.push(h)}}t=[];for(f in n)t.push(rr.CreateFromMorphTargetSequence(f,n[f],e,i));return t},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var i=function(W,Q,_t,mt,bt){if(_t.length!==0){var xt=[],Vt=[];Nn.flattenJSON(_t,xt,Vt,mt),xt.length!==0&&bt.push(new W(Q,xt,Vt))}},n=[],o=t.name||"default",s=t.length||-1,l=t.fps||30;t=t.hierarchy||[];for(var h=0;h<t.length;h++){var c=t[h].keys;if(c&&c.length!==0)if(c[0].morphTargets){s={};for(var f=0;f<c.length;f++)if(c[f].morphTargets)for(var v=0;v<c[f].morphTargets.length;v++)s[c[f].morphTargets[v]]=-1;for(var y in s){var M=[],C=[];for(v=0;v!==c[f].morphTargets.length;++v){var N=c[f];M.push(N.time),C.push(N.morphTarget===y?1:0)}n.push(new br(".morphTargetInfluence["+y+"]",M,C))}s=s.length*(l||1)}else f=".bones["+e[h].name+"]",i(bs,f+".position",c,"pos",n),i(Es,f+".quaternion",c,"rot",n),i(bs,f+".scale",c,"scl",n)}return n.length===0?null:new rr(o,s,n)}}),Object.assign(rr.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 qr={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={}}},Vn=new wo,vr={};Object.assign(At.prototype,{load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var o=this,s=qr.get(t);if(s!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;if(vr[t]!==void 0)vr[t].push({onLoad:e,onProgress:i,onError:n});else{var l=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(l){i=l[1];var h=!!l[2];l=l[3],l=decodeURIComponent(l),h&&(l=atob(l));try{var c=(this.responseType||"").toLowerCase();switch(c){case"arraybuffer":case"blob":var f=new Uint8Array(l.length);for(h=0;h<l.length;h++)f[h]=l.charCodeAt(h);var v=c==="blob"?new Blob([f.buffer],{type:i}):f.buffer;break;case"document":v=new DOMParser().parseFromString(l,i);break;case"json":v=JSON.parse(l);break;default:v=l}setTimeout(function(){e&&e(v),o.manager.itemEnd(t)},0)}catch(M){setTimeout(function(){n&&n(M),o.manager.itemError(t),o.manager.itemEnd(t)},0)}}else{vr[t]=[],vr[t].push({onLoad:e,onProgress:i,onError:n});var y=new XMLHttpRequest;y.open("GET",t,!0),y.addEventListener("load",function(M){var C=this.response;qr.add(t,C);var N=vr[t];if(delete vr[t],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var W=0,Q=N.length;W<Q;W++){var _t=N[W];_t.onLoad&&_t.onLoad(C)}}else{for(W=0,Q=N.length;W<Q;W++)_t=N[W],_t.onError&&_t.onError(M);o.manager.itemError(t)}o.manager.itemEnd(t)},!1),y.addEventListener("progress",function(M){for(var C=vr[t],N=0,W=C.length;N<W;N++){var Q=C[N];Q.onProgress&&Q.onProgress(M)}},!1),y.addEventListener("error",function(M){var C=vr[t];delete vr[t];for(var N=0,W=C.length;N<W;N++){var Q=C[N];Q.onError&&Q.onError(M)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),y.addEventListener("abort",function(M){var C=vr[t];delete vr[t];for(var N=0,W=C.length;N<W;N++){var Q=C[N];Q.onError&&Q.onError(M)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),this.responseType!==void 0&&(y.responseType=this.responseType),this.withCredentials!==void 0&&(y.withCredentials=this.withCredentials),y.overrideMimeType&&y.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(h in this.requestHeader)y.setRequestHeader(h,this.requestHeader[h]);y.send(null)}return o.manager.itemStart(t),y}},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,s=new At(o.manager);s.setPath(o.path),s.load(t,function(l){e(o.parse(JSON.parse(l)))},i,n)},parse:function(t,e){for(var i=[],n=0;n<t.length;n++){var o=rr.parse(t[n]);i.push(o)}e(i)},setPath:function(t){return this.path=t,this}}),Object.assign(Yt.prototype,{load:function(t,e,i,n){function o(M){c.load(t[M],function(C){C=s._parser(C,!0),l[M]={width:C.width,height:C.height,format:C.format,mipmaps:C.mipmaps},f+=1,f===6&&(C.mipmapCount===1&&(h.minFilter=1006),h.format=C.format,h.needsUpdate=!0,e&&e(h))},i,n)}var s=this,l=[],h=new po;h.image=l;var c=new At(this.manager);if(c.setPath(this.path),c.setResponseType("arraybuffer"),Array.isArray(t))for(var f=0,v=0,y=t.length;v<y;++v)o(v);else c.load(t,function(M){if(M=s._parser(M,!0),M.isCubemap)for(var C=M.mipmaps.length/M.mipmapCount,N=0;N<C;N++){l[N]={mipmaps:[]};for(var W=0;W<M.mipmapCount;W++)l[N].mipmaps.push(M.mipmaps[N*M.mipmapCount+W]),l[N].format=M.format,l[N].width=M.width,l[N].height=M.height}else h.image.width=M.width,h.image.height=M.height,h.mipmaps=M.mipmaps;M.mipmapCount===1&&(h.minFilter=1006),h.format=M.format,h.needsUpdate=!0,e&&e(h)},i,n);return h},setPath:function(t){return this.path=t,this}}),Object.assign(Ue.prototype,{load:function(t,e,i,n){var o=this,s=new G,l=new At(this.manager);return l.setResponseType("arraybuffer"),l.setPath(this.path),l.load(t,function(h){(h=o._parser(h))&&(h.image!==void 0?s.image=h.image:h.data!==void 0&&(s.image.width=h.width,s.image.height=h.height,s.image.data=h.data),s.wrapS=h.wrapS!==void 0?h.wrapS:1001,s.wrapT=h.wrapT!==void 0?h.wrapT:1001,s.magFilter=h.magFilter!==void 0?h.magFilter:1006,s.minFilter=h.minFilter!==void 0?h.minFilter:1008,s.anisotropy=h.anisotropy!==void 0?h.anisotropy:1,h.format!==void 0&&(s.format=h.format),h.type!==void 0&&(s.type=h.type),h.mipmaps!==void 0&&(s.mipmaps=h.mipmaps),h.mipmapCount===1&&(s.minFilter=1006),s.needsUpdate=!0,e&&e(s,h))},i,n),s},setPath:function(t){return this.path=t,this}}),Object.assign(ai.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(){c.removeEventListener("load",o,!1),c.removeEventListener("error",s,!1),qr.add(t,this),e&&e(this),l.manager.itemEnd(t)}function s(f){c.removeEventListener("load",o,!1),c.removeEventListener("error",s,!1),n&&n(f),l.manager.itemError(t),l.manager.itemEnd(t)}t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var l=this,h=qr.get(t);if(h!==void 0)return l.manager.itemStart(t),setTimeout(function(){e&&e(h),l.manager.itemEnd(t)},0),h;var c=document.createElementNS("http://www.w3.org/1999/xhtml","img");return c.addEventListener("load",o,!1),c.addEventListener("error",s,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(c.crossOrigin=this.crossOrigin),l.manager.itemStart(t),c.src=t,c},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Bi.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(c){l.load(t[c],function(f){s.images[c]=f,h++,h===6&&(s.needsUpdate=!0,e&&e(s))},void 0,n)}var s=new w,l=new ai(this.manager);l.setCrossOrigin(this.crossOrigin),l.setPath(this.path);var h=0;for(i=0;i<t.length;++i)o(i);return s},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(ln.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=new D,s=new ai(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(t,function(l){o.image=l,l=0<t.search(/\.jpe?g$/i)||t.search(/^data:image\/jpeg/)===0,o.format=l?1022:1023,o.needsUpdate=!0,e!==void 0&&e(o)},i,n),o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(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 s=this.getPoint(n/t);o+=s.distanceTo(i),e.push(o),i=s}return this.cacheArcLengths=e},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var i=this.getLengths(),n=i.length;e=e||t*i[n-1];for(var o=0,s=n-1,l;o<=s;)if(t=Math.floor(o+(s-o)/2),l=i[t]-e,0>l)o=t+1;else if(0<l)s=t-1;else{s=t;break}return t=s,i[t]===e?t/(n-1):(o=i[t],(t+(e-o)/(i[t+1]-o))/(n-1))},getTangent:function(t){var e=t-1e-4;return t+=1e-4,0>e&&(e=0),1<t&&(t=1),e=this.getPoint(e),this.getPoint(t).clone().sub(e).normalize()},getTangentAt:function(t){return t=this.getUtoTmapping(t),this.getTangent(t)},computeFrenetFrames:function(t,e){var i=new m,n=[],o=[],s=[],l=new m,h=new nt,c;for(c=0;c<=t;c++){var f=c/t;n[c]=this.getTangentAt(f),n[c].normalize()}o[0]=new m,s[0]=new m,c=Number.MAX_VALUE,f=Math.abs(n[0].x);var v=Math.abs(n[0].y),y=Math.abs(n[0].z);for(f<=c&&(c=f,i.set(1,0,0)),v<=c&&(c=v,i.set(0,1,0)),y<=c&&i.set(0,0,1),l.crossVectors(n[0],i).normalize(),o[0].crossVectors(n[0],l),s[0].crossVectors(n[0],o[0]),c=1;c<=t;c++)o[c]=o[c-1].clone(),s[c]=s[c-1].clone(),l.crossVectors(n[c-1],n[c]),l.length()>Number.EPSILON&&(l.normalize(),i=Math.acos(pi.clamp(n[c-1].dot(n[c]),-1,1)),o[c].applyMatrix4(h.makeRotationAxis(l,i))),s[c].crossVectors(n[c],o[c]);if(e===!0)for(i=Math.acos(pi.clamp(o[0].dot(o[t]),-1,1)),i/=t,0<n[0].dot(l.crossVectors(o[0],o[t]))&&(i=-i),c=1;c<=t;c++)o[c].applyMatrix4(h.makeRotationAxis(n[c],i*c)),s[c].crossVectors(n[c],o[c]);return{tangents:n,normals:o,binormals:s}},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Gn.prototype=Object.create(Ee.prototype),Gn.prototype.constructor=Gn,Gn.prototype.isEllipseCurve=!0,Gn.prototype.getPoint=function(t,e){e=e||new d;for(var i=2*Math.PI,n=this.aEndAngle-this.aStartAngle,o=Math.abs(n)<Number.EPSILON;0>n;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=o?0:i),this.aClockwise!==!0||o||(n=n===i?-i:n-i),i=this.aStartAngle+t*n,t=this.aX+this.xRadius*Math.cos(i);var s=this.aY+this.yRadius*Math.sin(i);return this.aRotation!==0&&(i=Math.cos(this.aRotation),n=Math.sin(this.aRotation),o=t-this.aX,s-=this.aY,t=o*i-s*n+this.aX,s=o*n+s*i+this.aY),e.set(t,s)},Gn.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},Gn.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},Gn.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},As.prototype=Object.create(Gn.prototype),As.prototype.constructor=As,As.prototype.isArcCurve=!0;var _n=new m,ya=new Yn,Wa=new Yn,yr=new Yn;Sn.prototype=Object.create(Ee.prototype),Sn.prototype.constructor=Sn,Sn.prototype.isCatmullRomCurve3=!0,Sn.prototype.getPoint=function(t,e){e=e||new m;var i=this.points,n=i.length;t*=n-(this.closed?0:1);var o=Math.floor(t);if(t-=o,this.closed?o+=0<o?0:(Math.floor(Math.abs(o)/n)+1)*n:t===0&&o===n-1&&(o=n-2,t=1),this.closed||0<o)var s=i[(o-1)%n];else _n.subVectors(i[0],i[1]).add(i[0]),s=_n;var l=i[o%n],h=i[(o+1)%n];if(this.closed||o+2<n?i=i[(o+2)%n]:(_n.subVectors(i[n-1],i[n-2]).add(i[n-1]),i=_n),this.curveType==="centripetal"||this.curveType==="chordal"){var c=this.curveType==="chordal"?.5:.25;n=Math.pow(s.distanceToSquared(l),c),o=Math.pow(l.distanceToSquared(h),c),c=Math.pow(h.distanceToSquared(i),c),1e-4>o&&(o=1),1e-4>n&&(n=o),1e-4>c&&(c=o),ya.initNonuniformCatmullRom(s.x,l.x,h.x,i.x,n,o,c),Wa.initNonuniformCatmullRom(s.y,l.y,h.y,i.y,n,o,c),yr.initNonuniformCatmullRom(s.z,l.z,h.z,i.z,n,o,c)}else this.curveType==="catmullrom"&&(ya.initCatmullRom(s.x,l.x,h.x,i.x,this.tension),Wa.initCatmullRom(s.y,l.y,h.y,i.y,this.tension),yr.initCatmullRom(s.z,l.z,h.z,i.z,this.tension));return e.set(ya.calc(t),Wa.calc(t),yr.calc(t)),e},Sn.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},Sn.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},Sn.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 m().fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Zn.prototype=Object.create(Ee.prototype),Zn.prototype.constructor=Zn,Zn.prototype.isCubicBezierCurve=!0,Zn.prototype.getPoint=function(t,e){e=e||new d;var i=this.v0,n=this.v1,o=this.v2,s=this.v3;return e.set(To(t,i.x,n.x,o.x,s.x),To(t,i.y,n.y,o.y,s.y)),e},Zn.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},Zn.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},Zn.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 m;var i=this.v0,n=this.v1,o=this.v2,s=this.v3;return e.set(To(t,i.x,n.x,o.x,s.x),To(t,i.y,n.y,o.y,s.y),To(t,i.z,n.z,o.z,s.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},Jn.prototype=Object.create(Ee.prototype),Jn.prototype.constructor=Jn,Jn.prototype.isLineCurve=!0,Jn.prototype.getPoint=function(t,e){return e=e||new d,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},Jn.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Jn.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Jn.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Jn.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Jn.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},mr.prototype=Object.create(Ee.prototype),mr.prototype.constructor=mr,mr.prototype.isLineCurve3=!0,mr.prototype.getPoint=function(t,e){return e=e||new m,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},mr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},mr.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},mr.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},mr.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$n.prototype=Object.create(Ee.prototype),$n.prototype.constructor=$n,$n.prototype.isQuadraticBezierCurve=!0,$n.prototype.getPoint=function(t,e){e=e||new d;var i=this.v0,n=this.v1,o=this.v2;return e.set(Gr(t,i.x,n.x,o.x),Gr(t,i.y,n.y,o.y)),e},$n.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},$n.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},$n.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},Hr.prototype=Object.create(Ee.prototype),Hr.prototype.constructor=Hr,Hr.prototype.isQuadraticBezierCurve3=!0,Hr.prototype.getPoint=function(t,e){e=e||new m;var i=this.v0,n=this.v1,o=this.v2;return e.set(Gr(t,i.x,n.x,o.x),Gr(t,i.y,n.y,o.y),Gr(t,i.z,n.z,o.z)),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},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},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},Ar.prototype=Object.create(Ee.prototype),Ar.prototype.constructor=Ar,Ar.prototype.isSplineCurve=!0,Ar.prototype.getPoint=function(t,e){e=e||new d;var i=this.points,n=(i.length-1)*t;t=Math.floor(n),n-=t;var o=i[t===0?t:t-1],s=i[t],l=i[t>i.length-2?i.length-1:t+1];return i=i[t>i.length-3?i.length-1:t+2],e.set(Nl(n,o.x,s.x,l.x,i.x),Nl(n,o.y,s.y,l.y,i.y)),e},Ar.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},Ar.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},Ar.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 d().fromArray(n))}return this};var ja=Object.freeze({ArcCurve:As,CatmullRomCurve3:Sn,CubicBezierCurve:Zn,CubicBezierCurve3:Ti,EllipseCurve:Gn,LineCurve:Jn,LineCurve3:mr,QuadraticBezierCurve:$n,QuadraticBezierCurve3:Hr,SplineCurve:Ar});no.prototype=Object.assign(Object.create(Ee.prototype),{constructor:no,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new Jn(e,t))},getPoint:function(t){var e=t*this.getLength(),i=this.getCurveLengths();for(t=0;t<i.length;){if(i[t]>=e)return e=i[t]-e,t=this.curves[t],i=t.getLength(),t.getPointAt(i===0?0:1-e/i);t++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0,n=this.curves.length;i<n;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t},getSpacedPoints:function(t){t===void 0&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e=[],i,n=0,o=this.curves;n<o.length;n++){var s=o[n];s=s.getPoints(s&&s.isEllipseCurve?2*t:s&&(s.isLineCurve||s.isLineCurve3)?1:s&&s.isSplineCurve?t*s.points.length:t);for(var l=0;l<s.length;l++){var h=s[l];i&&i.equals(h)||(e.push(h),i=h)}}return this.autoClose&&1<e.length&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},copy:function(t){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 ja[n.type]().fromJSON(n))}return this}}),Kn.prototype=Object.assign(Object.create(no.prototype),{constructor:Kn,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var i=new Jn(this.currentPoint.clone(),new d(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){t=new $n(this.currentPoint.clone(),new d(t,e),new d(i,n)),this.curves.push(t),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,o,s){t=new Zn(this.currentPoint.clone(),new d(t,e),new d(i,n),new d(o,s)),this.curves.push(t),this.currentPoint.set(o,s)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t);e=new Ar(e),this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,o,s){this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,s)},absarc:function(t,e,i,n,o,s){this.absellipse(t,e,i,i,n,o,s)},ellipse:function(t,e,i,n,o,s,l,h){this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,s,l,h)},absellipse:function(t,e,i,n,o,s,l,h){t=new Gn(t,e,i,n,o,s,l,h),0<this.curves.length&&(e=t.getPoint(0),e.equals(this.currentPoint)||this.lineTo(e.x,e.y)),this.curves.push(t),t=t.getPoint(1),this.currentPoint.copy(t)},copy:function(t){return no.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=no.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return no.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Hn.prototype=Object.assign(Object.create(Kn.prototype),{constructor:Hn,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){Kn.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=Kn.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){Kn.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 Kn().fromJSON(n))}return this}}),$i.prototype=Object.assign(Object.create(z.prototype),{constructor:$i,isLight:!0,copy:function(t){return z.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){return t=z.prototype.toJSON.call(this,t),t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}),ia.prototype=Object.assign(Object.create($i.prototype),{constructor:ia,isHemisphereLight:!0,copy:function(t){return $i.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Vr.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}}),na.prototype=Object.assign(Object.create(Vr.prototype),{constructor:na,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*pi.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())}}),ra.prototype=Object.assign(Object.create($i.prototype),{constructor:ra,isSpotLight:!0,copy:function(t){return $i.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}}),Yo.prototype=Object.assign(Object.create($i.prototype),{constructor:Yo,isPointLight:!0,copy:function(t){return $i.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),Ps.prototype=Object.assign(Object.create(Be.prototype),{constructor:Ps,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,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,o=i-t;if(i+=t,t=n+e,e=n-e,this.view!==null&&this.view.enabled){i=this.zoom/(this.view.width/this.view.fullWidth),e=this.zoom/(this.view.height/this.view.fullHeight);var s=(this.right-this.left)/this.view.width;n=(this.top-this.bottom)/this.view.height,o+=this.view.offsetX/i*s,i=o+this.view.width/i*s,t-=this.view.offsetY/e*n,e=t-this.view.height/e*n}this.projectionMatrix.makeOrthographic(o,i,t,e,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=z.prototype.toJSON.call(this,t),t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}),Mo.prototype=Object.assign(Object.create(Vr.prototype),{constructor:Mo}),Wr.prototype=Object.assign(Object.create($i.prototype),{constructor:Wr,isDirectionalLight:!0,copy:function(t){return $i.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Zo.prototype=Object.assign(Object.create($i.prototype),{constructor:Zo,isAmbientLight:!0}),Na.prototype=Object.assign(Object.create($i.prototype),{constructor:Na,isRectAreaLight:!0,copy:function(t){return $i.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){return t=$i.prototype.toJSON.call(this,t),t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(ka.prototype,{load:function(t,e,i,n){var o=this,s=new At(o.manager);s.setPath(o.path),s.load(t,function(l){e(o.parse(JSON.parse(l)))},i,n)},parse:function(t){function e(l){return i[l]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",l),i[l]}var i=this.textures,n=new ql[t.type];if(t.uuid!==void 0&&(n.uuid=t.uuid),t.name!==void 0&&(n.name=t.name),t.color!==void 0&&n.color.setHex(t.color),t.roughness!==void 0&&(n.roughness=t.roughness),t.metalness!==void 0&&(n.metalness=t.metalness),t.emissive!==void 0&&n.emissive.setHex(t.emissive),t.specular!==void 0&&n.specular.setHex(t.specular),t.shininess!==void 0&&(n.shininess=t.shininess),t.clearCoat!==void 0&&(n.clearCoat=t.clearCoat),t.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=t.clearCoatRoughness),t.vertexColors!==void 0&&(n.vertexColors=t.vertexColors),t.fog!==void 0&&(n.fog=t.fog),t.flatShading!==void 0&&(n.flatShading=t.flatShading),t.blending!==void 0&&(n.blending=t.blending),t.combine!==void 0&&(n.combine=t.combine),t.side!==void 0&&(n.side=t.side),t.opacity!==void 0&&(n.opacity=t.opacity),t.transparent!==void 0&&(n.transparent=t.transparent),t.alphaTest!==void 0&&(n.alphaTest=t.alphaTest),t.depthTest!==void 0&&(n.depthTest=t.depthTest),t.depthWrite!==void 0&&(n.depthWrite=t.depthWrite),t.colorWrite!==void 0&&(n.colorWrite=t.colorWrite),t.wireframe!==void 0&&(n.wireframe=t.wireframe),t.wireframeLinewidth!==void 0&&(n.wireframeLinewidth=t.wireframeLinewidth),t.wireframeLinecap!==void 0&&(n.wireframeLinecap=t.wireframeLinecap),t.wireframeLinejoin!==void 0&&(n.wireframeLinejoin=t.wireframeLinejoin),t.rotation!==void 0&&(n.rotation=t.rotation),t.linewidth!==1&&(n.linewidth=t.linewidth),t.dashSize!==void 0&&(n.dashSize=t.dashSize),t.gapSize!==void 0&&(n.gapSize=t.gapSize),t.scale!==void 0&&(n.scale=t.scale),t.polygonOffset!==void 0&&(n.polygonOffset=t.polygonOffset),t.polygonOffsetFactor!==void 0&&(n.polygonOffsetFactor=t.polygonOffsetFactor),t.polygonOffsetUnits!==void 0&&(n.polygonOffsetUnits=t.polygonOffsetUnits),t.skinning!==void 0&&(n.skinning=t.skinning),t.morphTargets!==void 0&&(n.morphTargets=t.morphTargets),t.dithering!==void 0&&(n.dithering=t.dithering),t.visible!==void 0&&(n.visible=t.visible),t.userData!==void 0&&(n.userData=t.userData),t.uniforms!==void 0)for(var o in t.uniforms){var s=t.uniforms[o];switch(n.uniforms[o]={},s.type){case"t":n.uniforms[o].value=e(s.value);break;case"c":n.uniforms[o].value=new b().setHex(s.value);break;case"v2":n.uniforms[o].value=new d().fromArray(s.value);break;case"v3":n.uniforms[o].value=new m().fromArray(s.value);break;case"v4":n.uniforms[o].value=new A().fromArray(s.value);break;case"m4":n.uniforms[o].value=new nt().fromArray(s.value);break;default:n.uniforms[o].value=s.value}}return t.defines!==void 0&&(n.defines=t.defines),t.vertexShader!==void 0&&(n.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(n.fragmentShader=t.fragmentShader),t.shading!==void 0&&(n.flatShading=t.shading===1),t.size!==void 0&&(n.size=t.size),t.sizeAttenuation!==void 0&&(n.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(n.map=e(t.map)),t.alphaMap!==void 0&&(n.alphaMap=e(t.alphaMap),n.transparent=!0),t.bumpMap!==void 0&&(n.bumpMap=e(t.bumpMap)),t.bumpScale!==void 0&&(n.bumpScale=t.bumpScale),t.normalMap!==void 0&&(n.normalMap=e(t.normalMap)),t.normalMapType!==void 0&&(n.normalMapType=t.normalMapType),t.normalScale!==void 0&&(o=t.normalScale,Array.isArray(o)===!1&&(o=[o,o]),n.normalScale=new d().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 es={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(sl.prototype,{load:function(t,e,i,n){var o=this,s=new At(o.manager);s.setPath(o.path),s.load(t,function(l){e(o.parse(JSON.parse(l)))},i,n)},parse:function(t){var e=new Ft,i=t.data.index;i!==void 0&&(i=new Po[i.type](i.array),e.setIndex(new lt(i,1)));var n=t.data.attributes;for(s in n){var o=n[s];i=new Po[o.type](o.array),e.addAttribute(s,new lt(i,o.itemSize,o.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(s!==void 0)for(i=0,n=s.length;i!==n;++i)o=s[i],e.addGroup(o.start,o.count,o.materialIndex);return t=t.data.boundingSphere,t!==void 0&&(s=new m,t.center!==void 0&&s.fromArray(t.center),e.boundingSphere=new B(s,t.radius)),e},setPath:function(t){return this.path=t,this}});var Po={Int8Array,Uint8Array,Uint8ClampedArray:typeof Uint8ClampedArray<"u"?Uint8ClampedArray:Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};ro.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(ro.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 b,i=new ln,n=new ka;return function(o,s,l){function h(M,C,N,W,Q){M=s+M;var _t=ro.Handlers.get(M);return _t!==null?M=_t.load(M):(i.setCrossOrigin(l),M=i.load(M)),C!==void 0&&(M.repeat.fromArray(C),C[0]!==1&&(M.wrapS=1e3),C[1]!==1&&(M.wrapT=1e3)),N!==void 0&&M.offset.fromArray(N),W!==void 0&&(W[0]==="repeat"&&(M.wrapS=1e3),W[0]==="mirror"&&(M.wrapS=1002),W[1]==="repeat"&&(M.wrapT=1e3),W[1]==="mirror"&&(M.wrapT=1002)),Q!==void 0&&(M.anisotropy=Q),C=pi.generateUUID(),c[C]=M,C}var c={},f={uuid:pi.generateUUID(),type:"MeshLambertMaterial"},v;for(v in o){var y=o[v];switch(v){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":f.name=y;break;case"blending":f.blending=t[y];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",v,"is no longer supported.");break;case"colorDiffuse":f.color=e.fromArray(y).getHex();break;case"colorSpecular":f.specular=e.fromArray(y).getHex();break;case"colorEmissive":f.emissive=e.fromArray(y).getHex();break;case"specularCoef":f.shininess=y;break;case"shading":y.toLowerCase()==="basic"&&(f.type="MeshBasicMaterial"),y.toLowerCase()==="phong"&&(f.type="MeshPhongMaterial"),y.toLowerCase()==="standard"&&(f.type="MeshStandardMaterial");break;case"mapDiffuse":f.map=h(y,o.mapDiffuseRepeat,o.mapDiffuseOffset,o.mapDiffuseWrap,o.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":f.emissiveMap=h(y,o.mapEmissiveRepeat,o.mapEmissiveOffset,o.mapEmissiveWrap,o.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":f.lightMap=h(y,o.mapLightRepeat,o.mapLightOffset,o.mapLightWrap,o.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":f.aoMap=h(y,o.mapAORepeat,o.mapAOOffset,o.mapAOWrap,o.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":f.bumpMap=h(y,o.mapBumpRepeat,o.mapBumpOffset,o.mapBumpWrap,o.mapBumpAnisotropy);break;case"mapBumpScale":f.bumpScale=y;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":f.normalMap=h(y,o.mapNormalRepeat,o.mapNormalOffset,o.mapNormalWrap,o.mapNormalAnisotropy);break;case"mapNormalFactor":f.normalScale=y;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":f.specularMap=h(y,o.mapSpecularRepeat,o.mapSpecularOffset,o.mapSpecularWrap,o.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":f.metalnessMap=h(y,o.mapMetalnessRepeat,o.mapMetalnessOffset,o.mapMetalnessWrap,o.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":f.roughnessMap=h(y,o.mapRoughnessRepeat,o.mapRoughnessOffset,o.mapRoughnessWrap,o.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":f.alphaMap=h(y,o.mapAlphaRepeat,o.mapAlphaOffset,o.mapAlphaWrap,o.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":f.side=1;break;case"doubleSided":f.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),f.opacity=y;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":f[v]=y;break;case"vertexColors":y===!0&&(f.vertexColors=2),y==="face"&&(f.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",v,y)}}return f.type==="MeshBasicMaterial"&&delete f.emissive,f.type!=="MeshPhongMaterial"&&delete f.specular,1>f.opacity&&(f.transparent=!0),n.setTextures(c),n.parse(f)}}()}),Object.assign(Jo.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,s=this.path===void 0?es.extractUrlBase(t):this.path,l=new At(this.manager);l.setPath(this.path),l.setWithCredentials(this.withCredentials),l.load(t,function(h){h=JSON.parse(h);var c=h.metadata;if(c!==void 0&&(c=c.type,c!==void 0&&c.toLowerCase()==="object")){console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");return}h=o.parse(h,s),e(h.geometry,h.materials)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(){return function(t,e){t.data!==void 0&&(t=t.data),t.scale=t.scale!==void 0?1/t.scale:1;var i=new j,n=t,o,s,l,h=n.faces,c=n.vertices,f=n.normals,v=n.colors,y=n.scale,M=0;if(n.uvs!==void 0){for(o=0;o<n.uvs.length;o++)n.uvs[o].length&&M++;for(o=0;o<M;o++)i.faceVertexUvs[o]=[]}var C=0;for(l=c.length;C<l;)o=new m,o.x=c[C++]*y,o.y=c[C++]*y,o.z=c[C++]*y,i.vertices.push(o);for(C=0,l=h.length;C<l;){c=h[C++];var N=c&1,W=c&2;o=c&8;var Q=c&16,_t=c&32;if(y=c&64,c&=128,N){N=new S,N.a=h[C],N.b=h[C+1],N.c=h[C+3];var mt=new S;if(mt.a=h[C+1],mt.b=h[C+2],mt.c=h[C+3],C+=4,W&&(W=h[C++],N.materialIndex=W,mt.materialIndex=W),W=i.faces.length,o)for(o=0;o<M;o++){var bt=n.uvs[o];for(i.faceVertexUvs[o][W]=[],i.faceVertexUvs[o][W+1]=[],s=0;4>s;s++){var xt=h[C++],Vt=bt[2*xt];xt=bt[2*xt+1],Vt=new d(Vt,xt),s!==2&&i.faceVertexUvs[o][W].push(Vt),s!==0&&i.faceVertexUvs[o][W+1].push(Vt)}}if(Q&&(Q=3*h[C++],N.normal.set(f[Q++],f[Q++],f[Q]),mt.normal.copy(N.normal)),_t)for(o=0;4>o;o++)Q=3*h[C++],_t=new m(f[Q++],f[Q++],f[Q]),o!==2&&N.vertexNormals.push(_t),o!==0&&mt.vertexNormals.push(_t);if(y&&(y=h[C++],y=v[y],N.color.setHex(y),mt.color.setHex(y)),c)for(o=0;4>o;o++)y=h[C++],y=v[y],o!==2&&N.vertexColors.push(new b(y)),o!==0&&mt.vertexColors.push(new b(y));i.faces.push(N),i.faces.push(mt)}else{if(N=new S,N.a=h[C++],N.b=h[C++],N.c=h[C++],W&&(W=h[C++],N.materialIndex=W),W=i.faces.length,o)for(o=0;o<M;o++)for(bt=n.uvs[o],i.faceVertexUvs[o][W]=[],s=0;3>s;s++)xt=h[C++],Vt=bt[2*xt],xt=bt[2*xt+1],Vt=new d(Vt,xt),i.faceVertexUvs[o][W].push(Vt);if(Q&&(Q=3*h[C++],N.normal.set(f[Q++],f[Q++],f[Q])),_t)for(o=0;3>o;o++)Q=3*h[C++],_t=new m(f[Q++],f[Q++],f[Q]),N.vertexNormals.push(_t);if(y&&(y=h[C++],N.color.setHex(v[y])),c)for(o=0;3>o;o++)y=h[C++],N.vertexColors.push(new b(v[y]));i.faces.push(N)}}if(n=t,C=n.influencesPerVertex!==void 0?n.influencesPerVertex:2,n.skinWeights)for(l=0,h=n.skinWeights.length;l<h;l+=C)i.skinWeights.push(new A(n.skinWeights[l],1<C?n.skinWeights[l+1]:0,2<C?n.skinWeights[l+2]:0,3<C?n.skinWeights[l+3]:0));if(n.skinIndices)for(l=0,h=n.skinIndices.length;l<h;l+=C)i.skinIndices.push(new A(n.skinIndices[l],1<C?n.skinIndices[l+1]:0,2<C?n.skinIndices[l+2]:0,3<C?n.skinIndices[l+3]:0));if(i.bones=n.bones,i.bones&&0<i.bones.length&&(i.skinWeights.length!==i.skinIndices.length||i.skinIndices.length!==i.vertices.length)&&console.warn("When skinning, number of vertices ("+i.vertices.length+"), skinIndices ("+i.skinIndices.length+"), and skinWeights ("+i.skinWeights.length+") should match."),l=t,h=l.scale,l.morphTargets!==void 0)for(n=0,C=l.morphTargets.length;n<C;n++)for(i.morphTargets[n]={},i.morphTargets[n].name=l.morphTargets[n].name,i.morphTargets[n].vertices=[],f=i.morphTargets[n].vertices,v=l.morphTargets[n].vertices,M=0,c=v.length;M<c;M+=3)y=new m,y.x=v[M]*h,y.y=v[M+1]*h,y.z=v[M+2]*h,f.push(y);if(l.morphColors!==void 0&&0<l.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),h=i.faces,l=l.morphColors[0].colors,n=0,C=h.length;n<C;n++)h[n].color.fromArray(l,3*n);for(l=t,n=[],C=[],l.animation!==void 0&&C.push(l.animation),l.animations!==void 0&&(l.animations.length?C=C.concat(l.animations):C.push(l.animations)),l=0;l<C.length;l++)(h=rr.parseAnimation(C[l],i.bones))&&n.push(h);return i.morphTargets&&(C=rr.CreateClipsFromMorphTargetSequences(i.morphTargets,10),n=n.concat(C)),0<n.length&&(i.animations=n),i.computeFaceNormals(),i.computeBoundingSphere(),t.materials===void 0||t.materials.length===0?{geometry:i}:(t=ro.prototype.initMaterials(t.materials,this.resourcePath||e,this.crossOrigin),{geometry:i,materials:t})}}()}),Object.assign(oa.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,s=this.path===void 0?es.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||s,s=new At(o.manager),s.setPath(this.path),s.load(t,function(l){var h=null;try{h=JSON.parse(l)}catch(c){n!==void 0&&n(c),console.error("THREE:ObjectLoader: Can't parse "+t+".",c.message);return}l=h.metadata,l===void 0||l.type===void 0||l.type.toLowerCase()==="geometry"?console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead."):o.parse(h,e)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var i=this.parseShape(t.shapes);i=this.parseGeometries(t.geometries,i);var n=this.parseImages(t.images,function(){e!==void 0&&e(o)});n=this.parseTextures(t.textures,n),n=this.parseMaterials(t.materials,n);var o=this.parseObject(t.object,i,n);return t.animations&&(o.animations=this.parseAnimations(t.animations)),t.images!==void 0&&t.images.length!==0||e===void 0||e(o),o},parseShape:function(t){var e={};if(t!==void 0)for(var i=0,n=t.length;i<n;i++){var o=new Hn().fromJSON(t[i]);e[o.uuid]=o}return e},parseGeometries:function(t,e){var i={};if(t!==void 0)for(var n=new Jo,o=new sl,s=0,l=t.length;s<l;s++){var h=t[s];switch(h.type){case"PlaneGeometry":case"PlaneBufferGeometry":var c=new fn[h.type](h.width,h.height,h.widthSegments,h.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":c=new fn[h.type](h.width,h.height,h.depth,h.widthSegments,h.heightSegments,h.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":c=new fn[h.type](h.radius,h.segments,h.thetaStart,h.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":c=new fn[h.type](h.radiusTop,h.radiusBottom,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":c=new fn[h.type](h.radius,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":c=new fn[h.type](h.radius,h.widthSegments,h.heightSegments,h.phiStart,h.phiLength,h.thetaStart,h.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":c=new fn[h.type](h.radius,h.detail);break;case"RingGeometry":case"RingBufferGeometry":c=new fn[h.type](h.innerRadius,h.outerRadius,h.thetaSegments,h.phiSegments,h.thetaStart,h.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":c=new fn[h.type](h.radius,h.tube,h.radialSegments,h.tubularSegments,h.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":c=new fn[h.type](h.radius,h.tube,h.tubularSegments,h.radialSegments,h.p,h.q);break;case"LatheGeometry":case"LatheBufferGeometry":c=new fn[h.type](h.points,h.segments,h.phiStart,h.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":c=new fn[h.type](h.vertices,h.indices,h.radius,h.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":c=[];for(var f=0,v=h.shapes.length;f<v;f++){var y=e[h.shapes[f]];c.push(y)}c=new fn[h.type](c,h.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(c=[],f=0,v=h.shapes.length;f<v;f++)y=e[h.shapes[f]],c.push(y);f=h.options.extrudePath,f!==void 0&&(h.options.extrudePath=new ja[f.type]().fromJSON(f)),c=new fn[h.type](c,h.options);break;case"BufferGeometry":c=o.parse(h);break;case"Geometry":c=n.parse(h,this.resourcePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+h.type+'"');continue}c.uuid=h.uuid,h.name!==void 0&&(c.name=h.name),c.isBufferGeometry===!0&&h.userData!==void 0&&(c.userData=h.userData),i[h.uuid]=c}return i},parseMaterials:function(t,e){var i={},n={};if(t!==void 0){var o=new ka;o.setTextures(e),e=0;for(var s=t.length;e<s;e++){var l=t[e];if(l.type==="MultiMaterial"){for(var h=[],c=0;c<l.materials.length;c++){var f=l.materials[c];i[f.uuid]===void 0&&(i[f.uuid]=o.parse(f)),h.push(i[f.uuid])}n[l.uuid]=h}else n[l.uuid]=o.parse(l),i[l.uuid]=n[l.uuid]}}return n},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],o=rr.parse(n);n.uuid!==void 0&&(o.uuid=n.uuid),e.push(o)}return e},parseImages:function(t,e){function i(M){return n.manager.itemStart(M),s.load(M,function(){n.manager.itemEnd(M)},void 0,function(){n.manager.itemError(M),n.manager.itemEnd(M)})}var n=this,o={};if(t!==void 0&&0<t.length){e=new wo(e);var s=new ai(e);s.setCrossOrigin(this.crossOrigin),e=0;for(var l=t.length;e<l;e++){var h=t[e],c=h.url;if(Array.isArray(c)){o[h.uuid]=[];for(var f=0,v=c.length;f<v;f++){var y=c[f];y=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(y)?y:n.resourcePath+y,o[h.uuid].push(i(y))}}else y=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h.url)?h.url:n.resourcePath+h.url,o[h.uuid]=i(y)}}return o},parseTextures:function(t,e){function i(c,f){return typeof c=="number"?c:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",c),f[c])}var n={};if(t!==void 0)for(var o=0,s=t.length;o<s;o++){var l=t[o];l.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',l.uuid),e[l.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",l.image);var h=Array.isArray(e[l.image])?new w(e[l.image]):new D(e[l.image]);h.needsUpdate=!0,h.uuid=l.uuid,l.name!==void 0&&(h.name=l.name),l.mapping!==void 0&&(h.mapping=i(l.mapping,Yl)),l.offset!==void 0&&h.offset.fromArray(l.offset),l.repeat!==void 0&&h.repeat.fromArray(l.repeat),l.center!==void 0&&h.center.fromArray(l.center),l.rotation!==void 0&&(h.rotation=l.rotation),l.wrap!==void 0&&(h.wrapS=i(l.wrap[0],kn),h.wrapT=i(l.wrap[1],kn)),l.format!==void 0&&(h.format=l.format),l.minFilter!==void 0&&(h.minFilter=i(l.minFilter,Xa)),l.magFilter!==void 0&&(h.magFilter=i(l.magFilter,Xa)),l.anisotropy!==void 0&&(h.anisotropy=l.anisotropy),l.flipY!==void 0&&(h.flipY=l.flipY),n[l.uuid]=h}return n},parseObject:function(t,e,i){function n(f){return e[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",f),e[f]}function o(f){if(f!==void 0){if(Array.isArray(f)){for(var v=[],y=0,M=f.length;y<M;y++){var C=f[y];i[C]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",C),v.push(i[C])}return v}return i[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",f),i[f]}}switch(t.type){case"Scene":var s=new zn;t.background!==void 0&&Number.isInteger(t.background)&&(s.background=new b(t.background)),t.fog!==void 0&&(t.fog.type==="Fog"?s.fog=new vn(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(s.fog=new Le(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":s=new ye(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(s.focus=t.focus),t.zoom!==void 0&&(s.zoom=t.zoom),t.filmGauge!==void 0&&(s.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(s.filmOffset=t.filmOffset),t.view!==void 0&&(s.view=Object.assign({},t.view));break;case"OrthographicCamera":s=new Ps(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(s.zoom=t.zoom),t.view!==void 0&&(s.view=Object.assign({},t.view));break;case"AmbientLight":s=new Zo(t.color,t.intensity);break;case"DirectionalLight":s=new Wr(t.color,t.intensity);break;case"PointLight":s=new Yo(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":s=new Na(t.color,t.intensity,t.width,t.height);break;case"SpotLight":s=new ra(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":s=new ia(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":s=n(t.geometry);var l=o(t.material);s=s.bones&&0<s.bones.length?new Ui(s,l):new di(s,l);break;case"LOD":s=new Qi;break;case"Line":s=new Vi(n(t.geometry),o(t.material),t.mode);break;case"LineLoop":s=new Br(n(t.geometry),o(t.material));break;case"LineSegments":s=new gi(n(t.geometry),o(t.material));break;case"PointCloud":case"Points":s=new ds(n(t.geometry),o(t.material));break;case"Sprite":s=new Ki(o(t.material));break;case"Group":s=new ci;break;default:s=new z}if(s.uuid=t.uuid,t.name!==void 0&&(s.name=t.name),t.matrix!==void 0?(s.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=t.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(t.position!==void 0&&s.position.fromArray(t.position),t.rotation!==void 0&&s.rotation.fromArray(t.rotation),t.quaternion!==void 0&&s.quaternion.fromArray(t.quaternion),t.scale!==void 0&&s.scale.fromArray(t.scale)),t.castShadow!==void 0&&(s.castShadow=t.castShadow),t.receiveShadow!==void 0&&(s.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(s.shadow.bias=t.shadow.bias),t.shadow.radius!==void 0&&(s.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(s.visible=t.visible),t.frustumCulled!==void 0&&(s.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(s.renderOrder=t.renderOrder),t.userData!==void 0&&(s.userData=t.userData),t.layers!==void 0&&(s.layers.mask=t.layers),t.children!==void 0){l=t.children;for(var h=0;h<l.length;h++)s.add(this.parseObject(l[h],e,i))}if(t.type==="LOD")for(t=t.levels,l=0;l<t.length;l++){h=t[l];var c=s.getObjectByProperty("uuid",h.object);c!==void 0&&s.addLevel(c,h.distance)}return s}});var Yl={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},kn={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Xa={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};al.prototype={constructor:al,setOptions:function(t){return this.options=t,this},load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var o=this,s=qr.get(t);if(s!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;fetch(t).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,o.options)}).then(function(l){qr.add(t,l),e&&e(l),o.manager.itemEnd(t)}).catch(function(l){n&&n(l),o.manager.itemError(t),o.manager.itemEnd(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Ua.prototype,{moveTo:function(t,e){this.currentPath=new Kn,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,i,n){this.currentPath.quadraticCurveTo(t,e,i,n)},bezierCurveTo:function(t,e,i,n,o,s){this.currentPath.bezierCurveTo(t,e,i,n,o,s)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(Q){for(var _t=[],mt=0,bt=Q.length;mt<bt;mt++){var xt=Q[mt],Vt=new Hn;Vt.curves=xt.curves,_t.push(Vt)}return _t}function n(Q,_t){for(var mt=_t.length,bt=!1,xt=mt-1,Vt=0;Vt<mt;xt=Vt++){var V=_t[xt],tt=_t[Vt],Ot=tt.x-V.x,ee=tt.y-V.y;if(Math.abs(ee)>Number.EPSILON){if(0>ee&&(V=_t[Vt],Ot=-Ot,tt=_t[xt],ee=-ee),!(Q.y<V.y||Q.y>tt.y))if(Q.y===V.y){if(Q.x===V.x)return!0}else{if(xt=ee*(Q.x-V.x)-Ot*(Q.y-V.y),xt===0)return!0;0>xt||(bt=!bt)}}else if(Q.y===V.y&&(tt.x<=Q.x&&Q.x<=V.x||V.x<=Q.x&&Q.x<=tt.x))return!0}return bt}var o=Xr.isClockWise,s=this.subPaths;if(s.length===0)return[];if(e===!0)return i(s);if(e=[],s.length===1){var l=s[0],h=new Hn;return h.curves=l.curves,e.push(h),e}var c=!o(s[0].getPoints());c=t?!c:c,h=[];var f=[],v=[],y=0;f[y]=void 0,v[y]=[];for(var M=0,C=s.length;M<C;M++){l=s[M];var N=l.getPoints(),W=o(N);(W=t?!W:W)?(!c&&f[y]&&y++,f[y]={s:new Hn,p:N},f[y].s.curves=l.curves,c&&y++,v[y]=[]):v[y].push({h:l,p:N[0]})}if(!f[0])return i(s);if(1<f.length){for(M=!1,t=[],o=0,s=f.length;o<s;o++)h[o]=[];for(o=0,s=f.length;o<s;o++)for(l=v[o],W=0;W<l.length;W++){for(c=l[W],y=!0,N=0;N<f.length;N++)n(c.p,f[N].p)&&(o!==N&&t.push({froms:o,tos:N,hole:W}),y?(y=!1,h[N].push(c)):M=!0);y&&h[o].push(c)}0<t.length&&(M||(v=h))}for(M=0,o=f.length;M<o;M++)for(h=f[M].s,e.push(h),t=v[M],s=0,l=t.length;s<l;s++)h.holes.push(t[s].h);return e}}),Object.assign(ll.prototype,{isFont:!0,generateShapes:function(t,e){e===void 0&&(e=100);var i=[],n=e;e=this.data;var o=Array.from?Array.from(t):String(t).split("");n/=e.resolution;var s=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*n;t=[];for(var l=0,h=0,c=0;c<o.length;c++){var f=o[c];if(f===`
|
|
2571
|
+
`)l=0,h-=s;else{var v=n,y=l,M=h;if(f=e.glyphs[f]||e.glyphs["?"]){var C=new Ua;if(f.o)for(var N=f._cachedOutline||(f._cachedOutline=f.o.split(" ")),W=0,Q=N.length;W<Q;)switch(N[W++]){case"m":var _t=N[W++]*v+y,mt=N[W++]*v+M;C.moveTo(_t,mt);break;case"l":_t=N[W++]*v+y,mt=N[W++]*v+M,C.lineTo(_t,mt);break;case"q":var bt=N[W++]*v+y,xt=N[W++]*v+M,Vt=N[W++]*v+y,V=N[W++]*v+M;C.quadraticCurveTo(Vt,V,bt,xt);break;case"b":bt=N[W++]*v+y,xt=N[W++]*v+M,Vt=N[W++]*v+y,V=N[W++]*v+M,_t=N[W++]*v+y,mt=N[W++]*v+M,C.bezierCurveTo(Vt,V,_t,mt,bt,xt)}v={offsetX:f.ha*v,path:C}}else v=void 0;l+=v.offsetX,t.push(v.path)}}for(e=0,o=t.length;e<o;e++)Array.prototype.push.apply(i,t[e].toShapes());return i}}),Object.assign(kl.prototype,{load:function(t,e,i,n){var o=this,s=new At(this.manager);s.setPath(this.path),s.load(t,function(l){try{var h=JSON.parse(l)}catch{console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),h=JSON.parse(l.substring(65,l.length-2))}l=o.parse(h),e&&e(l)},i,n)},parse:function(t){return new ll(t)},setPath:function(t){return this.path=t,this}});var qa,_l={getContext:function(){return qa===void 0&&(qa=new(window.AudioContext||window.webkitAudioContext)),qa},setContext:function(t){qa=t}};Object.assign(cn.prototype,{load:function(t,e,i,n){var o=new At(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.load(t,function(s){s=s.slice(0),_l.getContext().decodeAudioData(s,function(l){e(l)})},i,n)},setPath:function(t){return this.path=t,this}}),Object.assign(Dn.prototype,{update:function(){var t,e,i,n,o,s,l,h,c=new nt,f=new nt;return function(v){if(t!==this||e!==v.focus||i!==v.fov||n!==v.aspect*this.aspect||o!==v.near||s!==v.far||l!==v.zoom||h!==this.eyeSep){t=this,e=v.focus,i=v.fov,n=v.aspect*this.aspect,o=v.near,s=v.far,l=v.zoom;var y=v.projectionMatrix.clone();h=this.eyeSep/2;var M=h*o/e,C=o*Math.tan(pi.DEG2RAD*i*.5)/l;f.elements[12]=-h,c.elements[12]=h;var N=-C*n+M,W=C*n+M;y.elements[0]=2*o/(W-N),y.elements[8]=(W+N)/(W-N),this.cameraL.projectionMatrix.copy(y),N=-C*n-M,W=C*n-M,y.elements[0]=2*o/(W-N),y.elements[8]=(W+N)/(W-N),this.cameraR.projectionMatrix.copy(y)}this.cameraL.matrixWorld.copy(v.matrixWorld).multiply(f),this.cameraR.matrixWorld.copy(v.matrixWorld).multiply(c)}}()}),sa.prototype=Object.create(z.prototype),sa.prototype.constructor=sa,Object.assign(hl.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}}),Fa.prototype=Object.assign(Object.create(z.prototype),{constructor:Fa,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 m,e=new H,i=new m,n=new m,o=new hl;return function(s){z.prototype.updateMatrixWorld.call(this,s),s=this.context.listener;var l=this.up;if(this.timeDelta=o.getDelta(),this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),s.positionX){var h=this.context.currentTime+this.timeDelta;s.positionX.linearRampToValueAtTime(t.x,h),s.positionY.linearRampToValueAtTime(t.y,h),s.positionZ.linearRampToValueAtTime(t.z,h),s.forwardX.linearRampToValueAtTime(n.x,h),s.forwardY.linearRampToValueAtTime(n.y,h),s.forwardZ.linearRampToValueAtTime(n.z,h),s.upX.linearRampToValueAtTime(l.x,h),s.upY.linearRampToValueAtTime(l.y,h),s.upZ.linearRampToValueAtTime(l.z,h)}else s.setPosition(t.x,t.y,t.z),s.setOrientation(n.x,n.y,n.z,l.x,l.y,l.z)}}()}),Cs.prototype=Object.assign(Object.create(z.prototype),{constructor:Cs,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}}),aa.prototype=Object.assign(Object.create(Cs.prototype),{constructor:aa,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 m,e=new H,i=new m,n=new m;return function(o){if(z.prototype.updateMatrixWorld.call(this,o),o=this.panner,this.matrixWorld.decompose(t,e,i),n.set(0,0,1).applyQuaternion(e),o.positionX){var s=this.context.currentTime+this.listener.timeDelta;o.positionX.linearRampToValueAtTime(t.x,s),o.positionY.linearRampToValueAtTime(t.y,s),o.positionZ.linearRampToValueAtTime(t.z,s),o.orientationX.linearRampToValueAtTime(n.x,s),o.orientationY.linearRampToValueAtTime(n.y,s),o.orientationZ.linearRampToValueAtTime(n.z,s)}else o.setPosition(t.x,t.y,t.z),o.setOrientation(n.x,n.y,n.z)}}()}),Object.assign($o.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(la.prototype,{accumulate:function(t,e){var i=this.buffer,n=this.valueSize;t=t*n+n;var o=this.cumulativeWeight;if(o===0){for(o=0;o!==n;++o)i[t+o]=i[o];o=e}else o+=e,this._mixBufferRegion(i,t,0,e/o,n);this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,i=this.buffer;t=t*e+e;var n=this.cumulativeWeight,o=this.binding;this.cumulativeWeight=0,1>n&&this._mixBufferRegion(i,t,3*e,1-n,e),n=e;for(var s=e+e;n!==s;++n)if(i[n]!==i[n+e]){o.setValue(i,t);break}},saveOriginalState:function(){var t=this.buffer,e=this.valueSize,i=3*e;this.binding.getValue(t,i);for(var n=e;n!==i;++n)t[n]=t[i+n%e];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(t,e,i,n,o){if(.5<=n)for(n=0;n!==o;++n)t[e+n]=t[i+n]},_slerp:function(t,e,i,n){H.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,o){for(var s=1-n,l=0;l!==o;++l){var h=e+l;t[h]=t[h]*s+t[i+l]*n}}}),Object.assign(Ko.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(yn,{Composite:Ko,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new yn.Composite(t,e,i):new yn(t,e,i)},sanitizeNodeName:function(){var t=/[\[\]\.:\/]/g;return function(e){return e.replace(/\s/g,"_").replace(t,"")}}(),parseTrackName:function(){var t="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",e=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");t=/(WCOD+)?/.source.replace("WCOD",t);var i=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),n=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),o=new RegExp("^"+e+t+i+n+"$"),s=["material","materials","bones"];return function(l){var h=o.exec(l);if(!h)throw Error("PropertyBinding: Cannot parse trackName: "+l);h={nodeName:h[2],objectName:h[3],objectIndex:h[4],propertyName:h[5],propertyIndex:h[6]};var c=h.nodeName&&h.nodeName.lastIndexOf(".");if(c!==void 0&&c!==-1){var f=h.nodeName.substring(c+1);s.indexOf(f)!==-1&&(h.nodeName=h.nodeName.substring(0,c),h.objectName=f)}if(h.propertyName===null||h.propertyName.length===0)throw Error("PropertyBinding: can not parse propertyName from trackName: "+l);return h}}(),findNode:function(t,e){if(!e||e===""||e==="root"||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){var i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){var n=function(o){for(var s=0;s<o.length;s++){var l=o[s];if(l.name===e||l.uuid===e||(l=n(l.children)))return l}return null};if(t=n(t.children))return t}return null}}),Object.assign(yn.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=yn.findNode(this.rootNode,e.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var s=e.objectIndex;switch(i){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}for(t=t.skeleton.bones,i=0;i<t.length;i++)if(t[i].name===s){s=i;break}break;default:if(t[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(s!==void 0){if(t[s]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[s]}}if(s=t[n],s===void 0)console.error("THREE.PropertyBinding: Trying to update property for track: "+e.nodeName+"."+n+" but it wasn't found.",t);else{if(e=this.Versioning.None,this.targetObject=t,t.needsUpdate!==void 0?e=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(e=this.Versioning.MatrixWorldNeedsUpdate),i=this.BindingType.Direct,o!==void 0){if(n==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}for(i=0;i<this.node.geometry.morphAttributes.position.length;i++)if(t.geometry.morphAttributes.position[i].name===o){o=i;break}}else{if(!t.geometry.morphTargets){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);return}for(i=0;i<this.node.geometry.morphTargets.length;i++)if(t.geometry.morphTargets[i].name===o){o=i;break}}}i=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=o}else s.fromArray!==void 0&&s.toArray!==void 0?(i=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(i=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=n;this.getValue=this.GetterByBindingType[i],this.setValue=this.SetterByBindingTypeAndVersioning[i][e]}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(yn.prototype,{_getValue_unbound:yn.prototype.getValue,_setValue_unbound:yn.prototype.setValue}),Object.assign(Ls.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._paths,s=this._parsedPaths,l=this._bindings,h=l.length,c=void 0,f=0,v=arguments.length;f!==v;++f){var y=arguments[f],M=y.uuid,C=n[M];if(C===void 0){C=e++,n[M]=C,t.push(y),M=0;for(var N=h;M!==N;++M)l[M].push(new yn(y,o[M],s[M]))}else if(C<i){c=t[C];var W=--i;for(N=t[W],n[N.uuid]=C,t[C]=N,n[M]=W,t[W]=y,M=0,N=h;M!==N;++M){var Q=l[M],_t=Q[C];Q[C]=Q[W],_t===void 0&&(_t=new yn(y,o[M],s[M])),Q[W]=_t}}else t[C]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=i},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,i=this._indicesByUUID,n=this._bindings,o=n.length,s=0,l=arguments.length;s!==l;++s){var h=arguments[s],c=h.uuid,f=i[c];if(f!==void 0&&f>=e){var v=e++,y=t[v];for(i[y.uuid]=f,t[f]=y,i[c]=v,t[v]=h,h=0,c=o;h!==c;++h){y=n[h];var M=y[f];y[f]=y[v],y[v]=M}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._bindings,s=o.length,l=0,h=arguments.length;l!==h;++l){var c=arguments[l].uuid,f=n[c];if(f!==void 0)if(delete n[c],f<i){c=--i;var v=t[c],y=--e,M=t[y];for(n[v.uuid]=f,t[f]=v,n[M.uuid]=c,t[c]=M,t.pop(),v=0,M=s;v!==M;++v){var C=o[v],N=C[y];C[f]=C[c],C[c]=N,C.pop()}}else for(y=--e,M=t[y],n[M.uuid]=f,t[f]=M,t.pop(),v=0,M=s;v!==M;++v)C=o[v],C[f]=C[y],C.pop()}this.nCachedObjects_=i},subscribe_:function(t,e){var i=this._bindingsIndicesByPath,n=i[t],o=this._bindings;if(n!==void 0)return o[n];var s=this._paths,l=this._parsedPaths,h=this._objects,c=this.nCachedObjects_,f=Array(h.length);for(n=o.length,i[t]=n,s.push(t),l.push(e),o.push(f),i=c,n=h.length;i!==n;++i)f[i]=new yn(h[i],t,e);return f},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){var n=this._paths,o=this._parsedPaths,s=this._bindings,l=s.length-1,h=s[l];e[t[l]]=i,s[i]=h,s.pop(),o[i]=o[l],o.pop(),n[i]=n[l],n.pop()}}}),Object.assign(ha.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,i){if(t.fadeOut(e),this.fadeIn(e),i){i=this._clip.duration;var n=t._clip.duration,o=i/n;t.warp(1,n/i,e),this.warp(o,1,e)}return this},crossFadeTo:function(t,e,i){return t.crossFadeFrom(this,e,i)},stopFading:function(){var t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,i){var n=this._mixer,o=n.time,s=this._timeScaleInterpolant,l=this.timeScale;return s===null&&(this._timeScaleInterpolant=s=n._lendControlInterpolant()),n=s.parameterPositions,s=s.sampleValues,n[0]=o,n[1]=o+i,s[0]=t/l,s[1]=e/l,this},stopWarping:function(){var t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,i,n){if(this.enabled){var o=this._startTime;if(o!==null){if(e=(t-o)*i,0>e||i===0)return;this._startTime=null,e*=i}if(e*=this._updateTimeScale(t),i=this._updateTime(e),t=this._updateWeight(t),0<t){e=this._interpolants,o=this._propertyBindings;for(var s=0,l=e.length;s!==l;++s)e[s].evaluate(i),o[s].accumulate(n,t)}}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var i=this._weightInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),n===0&&(this.enabled=!1))}}return this._effectiveWeight=e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var i=this._timeScaleInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e},_updateTime:function(t){var e=this.time+t,i=this._clip.duration,n=this.loop,o=this._loopCount,s=n===2202;if(t===0)return o===-1?e:s&&(o&1)===1?i-e:e;if(n===2200)t:{if(o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1)),e>=i)e=i;else if(0>e)e=0;else break t;this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:0>t?-1:1})}else{if(o===-1&&(0<=t?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),e>=i||0>e){n=Math.floor(e/i),e-=i*n,o+=Math.abs(n);var l=this.repetitions-o;0>=l?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=0<t?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<t?1:-1})):(l===1?(t=0>t,this._setEndings(t,!t,s)):this._setEndings(!1,!1,s),this._loopCount=o,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n}))}if(s&&(o&1)===1)return this.time=e,i-e}return this.time=e},_setEndings:function(t,e,i){var n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(n.endingStart=t?this.zeroSlopeAtStart?2401:2400:2402,n.endingEnd=e?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(t,e,i){var n=this._mixer,o=n.time,s=this._weightInterpolant;return s===null&&(this._weightInterpolant=s=n._lendControlInterpolant()),n=s.parameterPositions,s=s.sampleValues,n[0]=o,s[0]=e,n[1]=o+t,s[1]=i,this}}),So.prototype=Object.assign(Object.create(ht.prototype),{constructor:So,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,o=n.length,s=t._propertyBindings;t=t._interpolants;var l=i.uuid,h=this._bindingsByRootAndName,c=h[l];for(c===void 0&&(c={},h[l]=c),h=0;h!==o;++h){var f=n[h],v=f.name,y=c[v];if(y===void 0){if(y=s[h],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,l,v));continue}y=new la(yn.create(i,v,e&&e._propertyBindings[h].binding.parsedPath),f.ValueTypeName,f.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,l,v)}s[h]=y,t[h].resultBuffer=y.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){var e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}for(e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var o=e[i];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var o=e[i];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){return t=t._cacheIndex,t!==null&&t<this._nActiveActions},_addInactiveAction:function(t,e,i){var n=this._actions,o=this._actionsByClip,s=o[e];s===void 0?(s={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,o[e]=s):(e=s.knownActions,t._byClipCacheIndex=e.length,e.push(t)),t._cacheIndex=n.length,n.push(t),s.actionByRoot[i]=t},_removeInactiveAction:function(t){var e=this._actions,i=e[e.length-1],n=t._cacheIndex;i._cacheIndex=n,e[n]=i,e.pop(),t._cacheIndex=null,e=t._clip.uuid,i=this._actionsByClip,n=i[e];var o=n.knownActions,s=o[o.length-1],l=t._byClipCacheIndex;s._byClipCacheIndex=l,o[l]=s,o.pop(),t._byClipCacheIndex=null,delete n.actionByRoot[(t._localRoot||this._root).uuid],o.length===0&&delete i[e],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){t=t._propertyBindings;for(var e=0,i=t.length;e!==i;++e){var n=t[e];--n.referenceCount===0&&this._removeInactiveBinding(n)}},_lendAction:function(t){var e=this._actions,i=t._cacheIndex,n=this._nActiveActions++,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_takeBackAction:function(t){var e=this._actions,i=t._cacheIndex,n=--this._nActiveActions,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_addInactiveBinding:function(t,e,i){var n=this._bindingsByRootAndName,o=n[e],s=this._bindings;o===void 0&&(o={},n[e]=o),o[i]=t,t._cacheIndex=s.length,s.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid;i=i.path;var o=this._bindingsByRootAndName,s=o[n],l=e[e.length-1];t=t._cacheIndex,l._cacheIndex=t,e[t]=l,e.pop(),delete s[i];t:{for(var h in s)break t;delete o[n]}},_lendBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=this._nActiveBindings++,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_takeBackBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=--this._nActiveBindings,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return i===void 0&&(i=new 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"?rr.findByName(i,t):t,t=i!==null?i.uuid:t;var o=this._actionsByClip[t],s=null;if(o!==void 0){if(s=o.actionByRoot[n],s!==void 0)return s;s=o.knownActions[0],i===null&&(i=s._clip)}return i===null?null:(e=new ha(this,i,e),this._bindAction(e,s),this._addInactiveAction(e,t,n),e)},existingAction:function(t,e){var i=e||this._root;return e=i.uuid,i=typeof t=="string"?rr.findByName(i,t):t,t=this._actionsByClip[i?i.uuid:t],t!==void 0&&t.actionByRoot[e]||null},stopAllAction:function(){for(var t=this._actions,e=this._nActiveActions,i=this._bindings,n=this._nActiveBindings,o=this._nActiveBindings=this._nActiveActions=0;o!==e;++o)t[o].reset();for(o=0;o!==n;++o)i[o].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,i=this._nActiveActions,n=this.time+=t,o=Math.sign(t),s=this._accuIndex^=1,l=0;l!==i;++l)e[l]._update(n,t,o,s);for(t=this._bindings,e=this._nActiveBindings,l=0;l!==e;++l)t[l].apply(s);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions;t=t.uuid;var i=this._actionsByClip,n=i[t];if(n!==void 0){n=n.knownActions;for(var o=0,s=n.length;o!==s;++o){var l=n[o];this._deactivateAction(l);var h=l._cacheIndex,c=e[e.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,c._cacheIndex=h,e[h]=c,e.pop(),this._removeInactiveBindingsForAction(l)}delete i[t]}},uncacheRoot:function(t){t=t.uuid;var e=this._actionsByClip;for(n in e){var i=e[n].actionByRoot[t];i!==void 0&&(this._deactivateAction(i),this._removeInactiveAction(i))}var n=this._bindingsByRootAndName[t];if(n!==void 0)for(var o in n)t=n[o],t.restoreOriginalState(),this._removeInactiveBinding(t)},uncacheAction:function(t,e){t=this.existingAction(t,e),t!==null&&(this._deactivateAction(t),this._removeInactiveAction(t))}}),Ga.prototype.clone=function(){return new Ga(this.value.clone===void 0?this.value:this.value.clone())},ul.prototype=Object.assign(Object.create(Ft.prototype),{constructor:ul,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)}}),cl.prototype=Object.assign(Object.create(Ii.prototype),{constructor:cl,isInstancedInterleavedBuffer:!0,copy:function(t){return Ii.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),fl.prototype=Object.assign(Object.create(lt.prototype),{constructor:fl,isInstancedBufferAttribute:!0,copy:function(t){return lt.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Ul.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,i){return i=i||[],Qo(t,this,i,e),i.sort(ua),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++)Qo(t[n],this,i,e);return i.sort(ua),i}}),Object.assign(pl.prototype,{set:function(t,e,i){return this.radius=t,this.phi=e,this.theta=i,this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,i){return this.radius=Math.sqrt(t*t+e*e+i*i),this.radius===0?this.phi=this.theta=0:(this.theta=Math.atan2(t,i),this.phi=Math.acos(pi.clamp(e/this.radius,-1,1))),this}}),Object.assign($.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(Eo.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 d;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 d),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 d),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 d),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 d),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new d;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(Rs.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 m),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 m),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 m),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new m,e=new m;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=pi.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 m),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)}}),Bn.prototype=Object.create(z.prototype),Bn.prototype.constructor=Bn,Bn.prototype.isImmediateRenderObject=!0,_i.prototype=Object.create(gi.prototype),_i.prototype.constructor=_i,_i.prototype.update=function(){var t=new m,e=new m,i=new P;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var o=this.object.matrixWorld,s=this.geometry.attributes.position,l=this.object.geometry;if(l&&l.isGeometry)for(var h=l.vertices,c=l.faces,f=l=0,v=c.length;f<v;f++)for(var y=c[f],M=0,C=y.vertexNormals.length;M<C;M++){var N=y.vertexNormals[M];t.copy(h[y[n[M]]]).applyMatrix4(o),e.copy(N).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),s.setXYZ(l,t.x,t.y,t.z),l+=1,s.setXYZ(l,e.x,e.y,e.z),l+=1}else if(l&&l.isBufferGeometry)for(n=l.attributes.position,h=l.attributes.normal,M=l=0,C=n.count;M<C;M++)t.set(n.getX(M),n.getY(M),n.getZ(M)).applyMatrix4(o),e.set(h.getX(M),h.getY(M),h.getZ(M)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),s.setXYZ(l,t.x,t.y,t.z),l+=1,s.setXYZ(l,e.x,e.y,e.z),l+=1;s.needsUpdate=!0}}(),Os.prototype=Object.create(z.prototype),Os.prototype.constructor=Os,Os.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Os.prototype.update=function(){var t=new m,e=new m;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)}}(),Is.prototype=Object.create(gi.prototype),Is.prototype.constructor=Is,Is.prototype.updateMatrixWorld=function(){var t=new m,e=new nt,i=new nt;return function(n){var o=this.bones,s=this.geometry,l=s.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var h=0,c=0;h<o.length;h++){var f=o[h];f.parent&&f.parent.isBone&&(e.multiplyMatrices(i,f.matrixWorld),t.setFromMatrixPosition(e),l.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(i,f.parent.matrixWorld),t.setFromMatrixPosition(e),l.setXYZ(c+1,t.x,t.y,t.z),c+=2)}s.getAttribute("position").needsUpdate=!0,z.prototype.updateMatrixWorld.call(this,n)}}(),gr.prototype=Object.create(di.prototype),gr.prototype.constructor=gr,gr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},gr.prototype.update=function(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Ds.prototype=Object.create(z.prototype),Ds.prototype.constructor=Ds,Ds.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Ds.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)},zs.prototype=Object.create(z.prototype),zs.prototype.constructor=zs,zs.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},zs.prototype.update=function(){var t=new m,e=new b,i=new b;return function(){var n=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{var o=n.geometry.getAttribute("color");e.copy(this.light.color),i.copy(this.light.groundColor);for(var s=0,l=o.count;s<l;s++){var h=s<l/2?e:i;o.setXYZ(s,h.r,h.g,h.b)}o.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),ca.prototype=Object.create(gi.prototype),ca.prototype.constructor=ca,Ha.prototype=Object.create(gi.prototype),Ha.prototype.constructor=Ha,fa.prototype=Object.create(gi.prototype),fa.prototype.constructor=fa,fa.prototype.update=function(){var t=new m,e=new m,i=new P;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var n=this.object.matrixWorld,o=this.geometry.attributes.position,s=this.object.geometry,l=s.vertices;s=s.faces;for(var h=0,c=0,f=s.length;c<f;c++){var v=s[c],y=v.normal;t.copy(l[v.a]).add(l[v.b]).add(l[v.c]).divideScalar(3).applyMatrix4(n),e.copy(y).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(h,t.x,t.y,t.z),h+=1,o.setXYZ(h,e.x,e.y,e.z),h+=1}o.needsUpdate=!0}}(),Qn.prototype=Object.create(z.prototype),Qn.prototype.constructor=Qn,Qn.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Qn.prototype.update=function(){var t=new m,e=new m,i=new m;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()}}(),pa.prototype=Object.create(gi.prototype),pa.prototype.constructor=pa,pa.prototype.update=function(){function t(s,l,h,c){if(n.set(l,h,c).unproject(o),s=i[s],s!==void 0)for(l=e.getAttribute("position"),h=0,c=s.length;h<c;h++)l.setXYZ(s[h],n.x,n.y,n.z)}var e,i,n=new m,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}}(),oo.prototype=Object.create(gi.prototype),oo.prototype.constructor=oo,oo.prototype.update=function(){var t=new J;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()}}}(),oo.prototype.setFromObject=function(t){return this.object=t,this.update(),this},oo.prototype.copy=function(t){return gi.prototype.copy.call(this,t),this.object=t.object,this},oo.prototype.clone=function(){return new this.constructor().copy(this)},da.prototype=Object.create(gi.prototype),da.prototype.constructor=da,da.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),z.prototype.updateMatrixWorld.call(this,t))},ma.prototype=Object.create(Vi.prototype),ma.prototype.constructor=ma,ma.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;1e-8>Math.abs(e)&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=0>e?1:0,this.lookAt(this.plane.normal),z.prototype.updateMatrixWorld.call(this,t)};var Ya,_a;so.prototype=Object.create(z.prototype),so.prototype.constructor=so,so.prototype.setDirection=function(){var t=new m,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))}}(),so.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()},so.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},so.prototype.copy=function(t){return z.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},so.prototype.clone=function(){return new this.constructor().copy(this)},or.prototype=Object.create(gi.prototype),or.prototype.constructor=or,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(no.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 j,i=0,n=t.length;i<n;i++){var o=t[i];e.vertices.push(new m(o.x,o.y,o.z||0))}return e}}),Object.assign(Kn.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Gl.prototype=Object.create(Sn.prototype),Hl.prototype=Object.create(Sn.prototype),dl.prototype=Object.create(Sn.prototype),Object.assign(dl.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.")}}),ca.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Is.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(ro.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),es.extractUrlBase(t)}}),Object.assign(Jo.prototype,{setTexturePath:function(t){return console.warn("THREE.JSONLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(oa.prototype,{setTexturePath:function(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(Eo.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(J.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)}}),Rs.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(pi,{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()."),pi.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),pi.ceilPowerOfTwo(t)}}),Object.assign(P.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(nt.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 m),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,i,n,o,s){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,n,i,o,s)}}),q.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},H.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(ki.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(Hn.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 Qr(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new to(this,t)}}),Object.assign(d.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(m.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(A.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(j.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(z.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(z.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Qi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(sn.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}}),ye.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($i.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(lt.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(kr.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(Ga.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(Zt.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 b}},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(Er.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(ti.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(_e.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(_e.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(ve.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(F.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.")}}}),Cs.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return new cn().load(t,function(i){e.setBuffer(i)}),this},$o.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},sa.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},bo.crossOrigin=void 0,bo.loadTexture=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var o=new ln;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},bo.loadTextureCube=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var o=new Bi;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},bo.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},bo.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},T.WebGLRenderTargetCube=Z,T.WebGLRenderTarget=F,T.WebGLRenderer=_e,T.ShaderLib=jr,T.UniformsLib=qe,T.UniformsUtils=Pn,T.ShaderChunk=bi,T.FogExp2=Le,T.Fog=vn,T.Scene=zn,T.Sprite=Ki,T.LOD=Qi,T.SkinnedMesh=Ui,T.Skeleton=sn,T.Bone=an,T.Mesh=di,T.LineSegments=gi,T.LineLoop=Br,T.Line=Vi,T.Points=ds,T.Group=ci,T.VideoTexture=nl,T.DataTexture=G,T.DataTexture3D=X,T.CompressedTexture=po,T.CubeTexture=w,T.CanvasTexture=Xs,T.DepthTexture=qs,T.Texture=D,T.AnimationLoader=Qt,T.CompressedTextureLoader=Yt,T.DataTextureLoader=Ue,T.CubeTextureLoader=Bi,T.TextureLoader=ln,T.ObjectLoader=oa,T.MaterialLoader=ka,T.BufferGeometryLoader=sl,T.DefaultLoadingManager=Vn,T.LoadingManager=wo,T.JSONLoader=Jo,T.ImageLoader=ai,T.ImageBitmapLoader=al,T.FontLoader=kl,T.FileLoader=At,T.Loader=ro,T.LoaderUtils=es,T.Cache=qr,T.AudioLoader=cn,T.SpotLightShadow=na,T.SpotLight=ra,T.PointLight=Yo,T.RectAreaLight=Na,T.HemisphereLight=ia,T.DirectionalLightShadow=Mo,T.DirectionalLight=Wr,T.AmbientLight=Zo,T.LightShadow=Vr,T.Light=$i,T.StereoCamera=Dn,T.PerspectiveCamera=ye,T.OrthographicCamera=Ps,T.CubeCamera=sa,T.ArrayCamera=ke,T.Camera=Be,T.AudioListener=Fa,T.PositionalAudio=aa,T.AudioContext=_l,T.AudioAnalyser=$o,T.Audio=Cs,T.VectorKeyframeTrack=bs,T.StringKeyframeTrack=Ba,T.QuaternionKeyframeTrack=Es,T.NumberKeyframeTrack=br,T.ColorKeyframeTrack=za,T.BooleanKeyframeTrack=Da,T.PropertyMixer=la,T.PropertyBinding=yn,T.KeyframeTrack=In,T.AnimationUtils=Nn,T.AnimationObjectGroup=Ls,T.AnimationMixer=So,T.AnimationClip=rr,T.Uniform=Ga,T.InstancedBufferGeometry=ul,T.BufferGeometry=Ft,T.Geometry=j,T.InterleavedBufferAttribute=Di,T.InstancedInterleavedBuffer=cl,T.InterleavedBuffer=Ii,T.InstancedBufferAttribute=fl,T.Face3=S,T.Object3D=z,T.Raycaster=Ul,T.Layers=U,T.EventDispatcher=ht,T.Clock=hl,T.QuaternionLinearInterpolant=qn,T.LinearInterpolant=dr,T.DiscreteInterpolant=qo,T.CubicInterpolant=ea,T.Interpolant=Fn,T.Triangle=Oe,T.Math=pi,T.Spherical=pl,T.Cylindrical=$,T.Plane=q,T.Frustum=E,T.Sphere=B,T.Ray=ki,T.Matrix4=nt,T.Matrix3=P,T.Box3=J,T.Box2=Eo,T.Line3=Rs,T.Euler=x,T.Vector4=A,T.Vector3=m,T.Vector2=d,T.Quaternion=H,T.Color=b,T.ImmediateRenderObject=Bn,T.VertexNormalsHelper=_i,T.SpotLightHelper=Os,T.SkeletonHelper=Is,T.PointLightHelper=gr,T.RectAreaLightHelper=Ds,T.HemisphereLightHelper=zs,T.GridHelper=ca,T.PolarGridHelper=Ha,T.FaceNormalsHelper=fa,T.DirectionalLightHelper=Qn,T.CameraHelper=pa,T.BoxHelper=oo,T.Box3Helper=da,T.PlaneHelper=ma,T.ArrowHelper=so,T.AxesHelper=or,T.Shape=Hn,T.Path=Kn,T.ShapePath=Ua,T.Font=ll,T.CurvePath=no,T.Curve=Ee,T.ImageUtils=bo,T.ShapeUtils=Xr,T.WebGLUtils=He,T.WireframeGeometry=ms,T.ParametricGeometry=Ys,T.ParametricBufferGeometry=gs,T.TetrahedronGeometry=Zs,T.TetrahedronBufferGeometry=vs,T.OctahedronGeometry=Js,T.OctahedronBufferGeometry=Do,T.IcosahedronGeometry=$s,T.IcosahedronBufferGeometry=ys,T.DodecahedronGeometry=_s,T.DodecahedronBufferGeometry=xs,T.PolyhedronGeometry=Wi,T.PolyhedronBufferGeometry=xi,T.TubeGeometry=un,T.TubeBufferGeometry=mo,T.TorusKnotGeometry=Sr,T.TorusKnotBufferGeometry=zo,T.TorusGeometry=Bo,T.TorusBufferGeometry=Rn,T.TextGeometry=Qs,T.TextBufferGeometry=ko,T.SphereGeometry=go,T.SphereBufferGeometry=fr,T.RingGeometry=ta,T.RingBufferGeometry=Uo,T.PlaneGeometry=Fe,T.PlaneBufferGeometry=xe,T.LatheGeometry=Ms,T.LatheBufferGeometry=vo,T.ShapeGeometry=to,T.ShapeBufferGeometry=yo,T.ExtrudeGeometry=Qr,T.ExtrudeBufferGeometry=kr,T.EdgesGeometry=_o,T.ConeGeometry=Ss,T.ConeBufferGeometry=On,T.CylinderGeometry=eo,T.CylinderBufferGeometry=io,T.CircleGeometry=Fo,T.CircleBufferGeometry=Ur,T.BoxGeometry=Dt,T.BoxBufferGeometry=kt,T.ShadowMaterial=xo,T.SpriteMaterial=Fi,T.RawShaderMaterial=Go,T.ShaderMaterial=ti,T.PointsMaterial=Ln,T.MeshPhysicalMaterial=Ho,T.MeshStandardMaterial=Fr,T.MeshPhongMaterial=Er,T.MeshToonMaterial=Vo,T.MeshNormalMaterial=Wo,T.MeshLambertMaterial=pr,T.MeshDepthMaterial=oe,T.MeshDistanceMaterial=te,T.MeshBasicMaterial=Ge,T.MeshMatcapMaterial=jo,T.LineDashedMaterial=Xo,T.LineBasicMaterial=zi,T.Material=Zt,T.Float64BufferAttribute=Rt,T.Float32BufferAttribute=Pt,T.Uint32BufferAttribute=zt,T.Int32BufferAttribute=I,T.Uint16BufferAttribute=Et,T.Int16BufferAttribute=at,T.Uint8ClampedBufferAttribute=Nt,T.Uint8BufferAttribute=gt,T.Int8BufferAttribute=ft,T.BufferAttribute=lt,T.ArcCurve=As,T.CatmullRomCurve3=Sn,T.CubicBezierCurve=Zn,T.CubicBezierCurve3=Ti,T.EllipseCurve=Gn,T.LineCurve=Jn,T.LineCurve3=mr,T.QuadraticBezierCurve=$n,T.QuadraticBezierCurve3=Hr,T.SplineCurve=Ar,T.REVISION="98",T.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},T.CullFaceNone=0,T.CullFaceBack=1,T.CullFaceFront=2,T.CullFaceFrontBack=3,T.FrontFaceDirectionCW=0,T.FrontFaceDirectionCCW=1,T.BasicShadowMap=0,T.PCFShadowMap=1,T.PCFSoftShadowMap=2,T.FrontSide=0,T.BackSide=1,T.DoubleSide=2,T.FlatShading=1,T.SmoothShading=2,T.NoColors=0,T.FaceColors=1,T.VertexColors=2,T.NoBlending=0,T.NormalBlending=1,T.AdditiveBlending=2,T.SubtractiveBlending=3,T.MultiplyBlending=4,T.CustomBlending=5,T.AddEquation=100,T.SubtractEquation=101,T.ReverseSubtractEquation=102,T.MinEquation=103,T.MaxEquation=104,T.ZeroFactor=200,T.OneFactor=201,T.SrcColorFactor=202,T.OneMinusSrcColorFactor=203,T.SrcAlphaFactor=204,T.OneMinusSrcAlphaFactor=205,T.DstAlphaFactor=206,T.OneMinusDstAlphaFactor=207,T.DstColorFactor=208,T.OneMinusDstColorFactor=209,T.SrcAlphaSaturateFactor=210,T.NeverDepth=0,T.AlwaysDepth=1,T.LessDepth=2,T.LessEqualDepth=3,T.EqualDepth=4,T.GreaterEqualDepth=5,T.GreaterDepth=6,T.NotEqualDepth=7,T.MultiplyOperation=0,T.MixOperation=1,T.AddOperation=2,T.NoToneMapping=0,T.LinearToneMapping=1,T.ReinhardToneMapping=2,T.Uncharted2ToneMapping=3,T.CineonToneMapping=4,T.UVMapping=300,T.CubeReflectionMapping=301,T.CubeRefractionMapping=302,T.EquirectangularReflectionMapping=303,T.EquirectangularRefractionMapping=304,T.SphericalReflectionMapping=305,T.CubeUVReflectionMapping=306,T.CubeUVRefractionMapping=307,T.RepeatWrapping=1e3,T.ClampToEdgeWrapping=1001,T.MirroredRepeatWrapping=1002,T.NearestFilter=1003,T.NearestMipMapNearestFilter=1004,T.NearestMipMapLinearFilter=1005,T.LinearFilter=1006,T.LinearMipMapNearestFilter=1007,T.LinearMipMapLinearFilter=1008,T.UnsignedByteType=1009,T.ByteType=1010,T.ShortType=1011,T.UnsignedShortType=1012,T.IntType=1013,T.UnsignedIntType=1014,T.FloatType=1015,T.HalfFloatType=1016,T.UnsignedShort4444Type=1017,T.UnsignedShort5551Type=1018,T.UnsignedShort565Type=1019,T.UnsignedInt248Type=1020,T.AlphaFormat=1021,T.RGBFormat=1022,T.RGBAFormat=1023,T.LuminanceFormat=1024,T.LuminanceAlphaFormat=1025,T.RGBEFormat=1023,T.DepthFormat=1026,T.DepthStencilFormat=1027,T.RedFormat=1028,T.RGB_S3TC_DXT1_Format=33776,T.RGBA_S3TC_DXT1_Format=33777,T.RGBA_S3TC_DXT3_Format=33778,T.RGBA_S3TC_DXT5_Format=33779,T.RGB_PVRTC_4BPPV1_Format=35840,T.RGB_PVRTC_2BPPV1_Format=35841,T.RGBA_PVRTC_4BPPV1_Format=35842,T.RGBA_PVRTC_2BPPV1_Format=35843,T.RGB_ETC1_Format=36196,T.RGBA_ASTC_4x4_Format=37808,T.RGBA_ASTC_5x4_Format=37809,T.RGBA_ASTC_5x5_Format=37810,T.RGBA_ASTC_6x5_Format=37811,T.RGBA_ASTC_6x6_Format=37812,T.RGBA_ASTC_8x5_Format=37813,T.RGBA_ASTC_8x6_Format=37814,T.RGBA_ASTC_8x8_Format=37815,T.RGBA_ASTC_10x5_Format=37816,T.RGBA_ASTC_10x6_Format=37817,T.RGBA_ASTC_10x8_Format=37818,T.RGBA_ASTC_10x10_Format=37819,T.RGBA_ASTC_12x10_Format=37820,T.RGBA_ASTC_12x12_Format=37821,T.LoopOnce=2200,T.LoopRepeat=2201,T.LoopPingPong=2202,T.InterpolateDiscrete=2300,T.InterpolateLinear=2301,T.InterpolateSmooth=2302,T.ZeroCurvatureEnding=2400,T.ZeroSlopeEnding=2401,T.WrapAroundEnding=2402,T.TrianglesDrawMode=0,T.TriangleStripDrawMode=1,T.TriangleFanDrawMode=2,T.LinearEncoding=3e3,T.sRGBEncoding=3001,T.GammaEncoding=3007,T.RGBEEncoding=3002,T.LogLuvEncoding=3003,T.RGBM7Encoding=3004,T.RGBM16Encoding=3005,T.RGBDEncoding=3006,T.BasicDepthPacking=3200,T.RGBADepthPacking=3201,T.TangentSpaceNormalMap=0,T.ObjectSpaceNormalMap=1,T.CubeGeometry=Dt,T.Face4=function(t,e,i,n,o,s,l){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new S(t,e,i,o,s,l)},T.LineStrip=0,T.LinePieces=1,T.MeshFaceMaterial=function(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t},T.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},T.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new ds(t,e)},T.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Ki(t)},T.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new ds(t,e)},T.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Ln(t)},T.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Ln(t)},T.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Ln(t)},T.Vertex=function(t,e,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new m(t,e,i)},T.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new lt(t,e).setDynamic(!0)},T.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new ft(t,e)},T.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new gt(t,e)},T.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Nt(t,e)},T.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new at(t,e)},T.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Et(t,e)},T.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new I(t,e)},T.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new zt(t,e)},T.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Pt(t,e)},T.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Rt(t,e)},T.ClosedSplineCurve3=Gl,T.SplineCurve3=Hl,T.Spline=dl,T.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new or(t)},T.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new oo(t,e)},T.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new gi(new _o(t.geometry),new zi({color:e!==void 0?e:16777215}))},T.WireframeHelper=function(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new gi(new ms(t.geometry),new zi({color:e!==void 0?e:16777215}))},T.XHRLoader=function(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new At(t)},T.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Ue(t)},T.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()}},T.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().")}},T.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},T.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")}},T.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(T,"__esModule",{value:!0})}),THREE.Sky=function(){var T=THREE.Sky.SkyShader,ht=new THREE.ShaderMaterial({fragmentShader:T.fragmentShader,vertexShader:T.vertexShader,uniforms:THREE.UniformsUtils.clone(T.uniforms),side:THREE.BackSide});THREE.Mesh.call(this,new THREE.BoxBufferGeometry(1,1,1),ht)},THREE.Sky.prototype=Object.create(THREE.Mesh.prototype),THREE.Sky.SkyShader={uniforms:{luminance:{value:1},turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new THREE.Vector3}},vertexShader:["uniform vec3 sunPosition;","uniform float rayleigh;","uniform float turbidity;","uniform float mieCoefficient;","varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","const vec3 up = vec3( 0.0, 1.0, 0.0 );","const float e = 2.71828182845904523536028747135266249775724709369995957;","const float pi = 3.141592653589793238462643383279502884197169;","const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );","const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );","const float v = 4.0;","const vec3 K = vec3( 0.686, 0.678, 0.666 );","const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );","const float cutoffAngle = 1.6110731556870734;","const float steepness = 1.5;","const float EE = 1000.0;","float sunIntensity( float zenithAngleCos ) {"," zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );"," return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );","}","vec3 totalMie( float T ) {"," float c = ( 0.2 * T ) * 10E-18;"," return 0.434 * c * MieConst;","}","void main() {"," vec4 worldPosition = modelMatrix * vec4( position, 1.0 );"," vWorldPosition = worldPosition.xyz;"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );"," gl_Position.z = gl_Position.w;"," vSunDirection = normalize( sunPosition );"," vSunE = sunIntensity( dot( vSunDirection, up ) );"," vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );"," float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );"," vBetaR = totalRayleigh * rayleighCoefficient;"," vBetaM = totalMie( turbidity ) * mieCoefficient;","}"].join(`
|
|
2572
2572
|
`),fragmentShader:["varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","uniform float luminance;","uniform float mieDirectionalG;","const vec3 cameraPos = vec3( 0.0, 1.0, 0.0 );","const float pi = 3.141592653589793238462643383279502884197169;","const float n = 1.0003;","const float N = 2.545E25;","const float rayleighZenithLength = 8.4E3;","const float mieZenithLength = 1.25E3;","const vec3 up = vec3( 0.0, 1.0, 0.0 );","const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;","const float THREE_OVER_SIXTEENPI = 0.05968310365946075;","const float ONE_OVER_FOURPI = 0.07957747154594767;","float rayleighPhase( float cosTheta ) {"," return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) );","}","float hgPhase( float cosTheta, float g ) {"," float g2 = pow( g, 2.0 );"," float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 );"," return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse );","}","const float A = 0.15;","const float B = 0.50;","const float C = 0.10;","const float D = 0.20;","const float E = 0.02;","const float F = 0.30;","const float whiteScale = 1.0748724675633854;","vec3 Uncharted2Tonemap( vec3 x ) {"," return ( ( x * ( A * x + C * B ) + D * E ) / ( x * ( A * x + B ) + D * F ) ) - E / F;","}","void main() {"," float zenithAngle = acos( max( 0.0, dot( up, normalize( vWorldPosition - cameraPos ) ) ) );"," float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) );"," float sR = rayleighZenithLength * inverse;"," float sM = mieZenithLength * inverse;"," vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) );"," float cosTheta = dot( normalize( vWorldPosition - cameraPos ), vSunDirection );"," float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 );"," vec3 betaRTheta = vBetaR * rPhase;"," float mPhase = hgPhase( cosTheta, mieDirectionalG );"," vec3 betaMTheta = vBetaM * mPhase;"," vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) );"," Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) );"," vec3 direction = normalize( vWorldPosition - cameraPos );"," float theta = acos( direction.y ); // elevation --> y-axis, [-pi/2, pi/2]"," float phi = atan( direction.z, direction.x ); // azimuth --> x-axis [-pi/2, pi/2]"," vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 );"," vec3 L0 = vec3( 0.1 ) * Fex;"," float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta );"," L0 += ( vSunE * 19000.0 * Fex ) * sundisk;"," vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 );"," vec3 curr = Uncharted2Tonemap( ( log2( 2.0 / pow( luminance, 4.0 ) ) ) * texColor );"," vec3 color = curr * whiteScale;"," vec3 retColor = pow( color, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) );"," gl_FragColor = vec4( retColor, 1.0 );","}"].join(`
|
|
2573
|
-
`)},function(
|
|
2573
|
+
`)},function(T){typeof module>"u"?window.charming=T:module.exports=T}(function(T,ht){ht=ht||{};var d=ht.tagName||"span",nt=ht.classPrefix!=null?ht.classPrefix:"char",H=1,m=function(P){for(var D=P.parentNode,A=P.nodeValue,F=A.length,Z=-1;++Z<F;){var G=document.createElement(d);nt&&(G.className=nt+H,H++),G.appendChild(document.createTextNode(A[Z])),D.insertBefore(G,P)}D.removeChild(P)};return function P(D){for(var A=[].slice.call(D.childNodes),F=A.length,Z=-1;++Z<F;)P(A[Z]);D.nodeType===Node.TEXT_NODE&&m(D)}(T),T});class ac{constructor(ht,d=[]){mars3d?(this.map=ht,this.tilesetLayer,this.modelArr=d,this.bimObliquePhotographyId=[],this.editDate={id:null}):console.error("未引入指定插件")}pushModel(ht){this.modelArr.push(ht)}add(ht,d){const nt=new Map([["click",mars3d.EventType.click]]);return new Promise((H,m)=>{let P,D,A,F,Z,G,J,B,q;if(typeof ht!="object"){let b=this.query(ht);b||m("缺少树结构");let{id:p,bimModelExcavationDetails:g,bimModel:S}=b;P=p,D=S.modelType,A=S.tender,F=S.releasedDistance,Z=S.modelName,G=S.isDynamicReleased,J={bimModelExcavationDetails:g},B=b.url,q=S.modelColor}else P=ht.modelId,D=ht.modelType,A=ht.tender,F=ht.releasedDistance,Z=ht.modelTitle,G=ht.permission,J=ht.customize,B=ht.url,q=ht.color;let E=this.map.getLayer(ht,"modelId");if(E)return H(E),!1;if(B.indexOf("tileset.json")<0)return console.error("链接不完整",Z),H({tite:"【模型】"+Z+"数据地址有误",type:"error",id:P,url:B}),!1;new Cesium.Resource({url:B}).fetchJson().then(p=>{let g=null,S={enabled:!0,precise:!1},x=[];q&&(g={color:{conditions:[["true","rgba(255, 255, 0, 1)"]]}}),window.bimClip&&window.bimClip.activeObj[P]&&(Object.keys(window.bimClip.activeObj[P]).forEach(U=>{let{item:z}=window.bimClip.activeObj[P][U],{bimModelExcavationDetails:j}=z,{excavationDetails:lt}=j;x.push({positions:JSON.parse(lt).excavationDetails,id:Number(U)})}),x.length>0&&(S.area=x)),this.tilesetLayer=new mars3d.layer.TilesetLayer({modelId:P,modelType:D,tender:A,releasedDistance:F,modelTitle:Z,permission:G,customize:J,url:encodeURI(B),flat:{precise:!1},skipLevelOfDetail:!0,loadSiblings:!0,cullRequestsWhileMoving:!0,cullRequestsWhileMovingMultiplier:10,preferLeaves:!0,progressiveResolutionHeightFraction:.5,dynamicScreenSpaceError:!0,preloadWhenHidden:!1,style:g,clip:S,cacheBytes:1073741824*2,maximumCacheOverflowBytes:2147483648*2}),this.tilesetLayer.bindPopup(U=>{if(U.graphic){const z=U.graphic.attr;let j=null,lt=null;return JSON.stringify(z)!=="{}"?(z.name&&(j=z.name.lastIndexOf("@")),j&&j>-1&&(lt=z.name.slice(0,j)),z.name?` <span>${lt||z.name}</span> `:` <span>${Z}</span> `):` <span>${Z}</span> `}else return` <span>${Z}</span> `}),this.tilesetLayer.readyPromise.then(U=>{console.log("加载完成",this.tilesetLayer,U),H(U);let{modelId:z}=U.options;U.clip.options.area.forEach(j=>{window.bimClip.activeObj[z][j.id].id==null&&(window.bimClip.activeObj[z][j.id].id=j.id)})}).catch(U=>{H()}),this.tilesetLayer.on("click",U=>{U.layer.style==null&&U.layer.openHighlight({color:"rgba(255,0,0,1)"},!0)}),d&&Object.keys(d).forEach(U=>{this.tilesetLayer.on(nt.get(U),z=>{d[U](z)})}),D==0&&this.bimObliquePhotographyId.push(P),this.map.addLayer(this.tilesetLayer)}).catch(p=>{console.error("数据加载失败",Z),H({tite:"【模型】"+Z+"数据加载失败",type:"error",id:P,url:B})})})}remove(ht){this.map.getLayer(ht,"modelId")&&(this.map.getLayer(ht,"modelId").closeHighlight(),this.map.removeLayer(this.map.getLayer(ht,"modelId")))}selected(ht,d=!0){return new Promise((nt,H)=>{let m=this.map.getLayer(ht,"modelId");m?(d&&m.flyTo(),m.style==null&&m.openHighlight({color:"rgba(255,0,0,1)"},!0),nt(m)):this.add(ht).then(P=>{P&&(d&&P.flyTo(),P.style==null&&P.openHighlight({color:"rgba(255,0,0,1)"},!0),nt(P))})})}initial(){this.modelArr=[],this.bimObliquePhotographyId=[],this.tilesetLayer=null}query(ht){return this.modelArr.length==0?!1:this.modelArr.find(d=>d.id==ht)}postEditDate(ht){this.editDate={id:ht}}editColor(ht,d,nt="true"){let H=this.map.getLayer(ht,"modelId");if(this.postEditDate(ht),d)H.style={color:{conditions:[[nt,d]]}};else{let m=this.query(ht).modelColor;m?H.style={color:{conditions:[[nt,m]]}}:H.style=null}}editOpacity(ht,d){this.map.getLayer(ht,"modelId").opacity=d}addClip(ht){return new Promise((d,nt)=>{window.bimClip?d(bimClip.clipModelAdd(ht)):nt("挖洞工具未初始化")})}removeClip(ht){window.bimClip?window.bimClip.clipModelremoveClip(ht):console.log("挖洞工具未初始化")}}const Pl=T=>Object.prototype.toString.call(T)==="[object Object]";function Cl(){const T=Array.from(arguments);if(T.length<2)return T[0];let ht=T[0];return T.shift(),T.forEach(d=>{if(Pl(d)){Pl(ht)||(ht={});for(let nt in d)ht[nt]&&Pl(d[nt])?ht[nt]=Cl(ht[nt],d[nt]):ht[nt]=d[nt]}else d instanceof Array&&(ht instanceof Array||(ht=[]),d.forEach((nt,H)=>{Pl(nt)?ht[H]=Cl(ht[H]):ht[H]=nt}))}),ht}let Qa={};const lc=(T,ht,d)=>{Qa={};let{vectorStyle:nt,difference:H}=T;if(nt){let{divType:m}=nt,P="";if(m){let{theme_color:D,title:A,font_color:F,content:Z,scaleByDistance:G,scaleByDistance_far:J,scaleByDistance_farValue:B,scaleByDistance_near:q,scaleByDistance_nearValue:E,distanceDisplayCondition:b,distanceDisplayCondition_far:p,distanceDisplayCondition_near:g,clampToGround:S,divStyle:x}=nt,{theme_color2:U,theme_color3:z}=x;switch(m){case"1":P=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${D};--theme-font-color1:${F};">
|
|
2574
|
+
<div class="title">${A}</div>
|
|
2575
|
+
</div >`;break;case"2":P=`<div class="entity-div-style entity-div-style2" style="--theme-color1:${D};--theme-font-color1:${F};">
|
|
2576
|
+
<div class="title">${A}</div>
|
|
2577
|
+
<div class="mars3d-divUpLabel-line"></div>
|
|
2578
|
+
</div >`;break;case"3":P=`<div class="entity-div-style entity-div-style3" style="--theme-color1:${D};--theme-font-color1:${F};--theme-color2:${U};--theme-color3:${z}">
|
|
2579
|
+
<div class="image"></div><div class="wave"></div><div class="wave"></div><div class="wave"></div>
|
|
2580
|
+
<div class="infotop"><div class="title">${A}</div><div class="content overflow-auto scrollbar h-full">${Z}</div></div>
|
|
2581
|
+
</div >`;break;case"4":P=`<div class="entity-div-style entity-div-style4" style="--theme-color1:${D};--theme-font-color1:${F};">
|
|
2582
|
+
<div class="title">${A}</div>
|
|
2583
|
+
</div >`;break;case"5":P=`<div class="entity-div-style entity-div-style5 marsTiltPanel marsTiltPanel-theme-green" style="--theme-color1:${D};--theme-font-color1:${F};--theme-color2:${U};">
|
|
2584
|
+
<div class="marsTiltPanel-wrap">
|
|
2585
|
+
<div class="area">
|
|
2586
|
+
<div class="arrow-lt"></div>
|
|
2587
|
+
<div class="b-t"></div>
|
|
2588
|
+
<div class="b-r"></div>
|
|
2589
|
+
<div class="b-b"></div>
|
|
2590
|
+
<div class="b-l"></div>
|
|
2591
|
+
<div class="arrow-rb"></div>
|
|
2592
|
+
<div class="label-wrap">
|
|
2593
|
+
<div class="title">${A}</div>
|
|
2594
|
+
<div class="content">${Z}</div>
|
|
2595
|
+
</div>
|
|
2596
|
+
</div>
|
|
2597
|
+
<div class="b-t-l"></div>
|
|
2598
|
+
<div class="b-b-r"></div>
|
|
2599
|
+
</div>
|
|
2600
|
+
<div class="arrow"></div>
|
|
2601
|
+
</div >`;break;case"6":P=`<div class="entity-div-style entity-div-style6" style="--theme-color1:${D};--theme-font-color1:${F};--theme-color2:${U};">
|
|
2602
|
+
<div class="title">${A}</div>
|
|
2603
|
+
</div >`;break;case"7":P=`<div class="entity-div-style entity-div-style7" style="--theme-color1:${D};--theme-font-color1:${F};">
|
|
2604
|
+
<div class="title">${A}</div>
|
|
2605
|
+
<div class="pile-number">
|
|
2606
|
+
<div class="circular"></div>
|
|
2607
|
+
<div class="pole"></div>
|
|
2608
|
+
</div>
|
|
2609
|
+
</div >`;break}Qa={html:P,scaleByDistance:G,scaleByDistance_far:J,scaleByDistance_farValue:B,scaleByDistance_near:q,scaleByDistance_nearValue:E,distanceDisplayCondition:b,distanceDisplayCondition_far:p,distanceDisplayCondition_near:g,clampToGround:S}}else T.difference&&T.difference.length>0&&T.difference.forEach(D=>{Cl(Qa,{[D]:nt[D]})}),ht&&ht.difference&&ht.difference.length>0&&ht.difference.forEach(D=>{Cl(Qa,{label:{[D]:ht.labelStyle[D]}})})}return Qa};var ur=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lh(T){return T&&T.__esModule&&Object.prototype.hasOwnProperty.call(T,"default")?T.default:T}var Ll={exports:{}};/**
|
|
2574
2610
|
* @license
|
|
2575
2611
|
* Lodash <https://lodash.com/>
|
|
2576
2612
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
2577
2613
|
* Released under MIT license <https://lodash.com/license>
|
|
2578
2614
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
2579
2615
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
2580
|
-
*/Rl.exports,function(g,$){(function(){var _,pt="4.17.21",gt=200,S="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",Mt="Expected a function",kt="Invalid `variable` option passed into `_.template`",nt="__lodash_hash_undefined__",Tt=500,Rt="__lodash_placeholder__",vt=1,Nt=2,Ut=4,Ct=1,at=2,Y=1,y=2,x=4,B=8,E=16,Z=32,z=64,X=128,it=256,_t=512,dt=30,zt="...",Yt=800,re=16,se=1,we=2,Et=3,ie=1/0,ze=9007199254740991,on=17976931348623157e292,Ft=0/0,Qe=4294967295,Ii=Qe-1,Pn=Qe>>>1,Ji=[["ary",X],["bind",Y],["bindKey",y],["curry",B],["curryRight",E],["flip",_t],["partial",Z],["partialRight",z],["rearg",it]],Oe="[object Arguments]",Pi="[object Array]",In="[object AsyncFunction]",ni="[object Boolean]",ci="[object Date]",Fi="[object DOMException]",yr="[object Error]",Lr="[object Function]",$n="[object GeneratorFunction]",Gi="[object Map]",Gn="[object Number]",sn="[object Null]",Je="[object Object]",wn="[object Promise]",ho="[object Proxy]",Hn="[object RegExp]",Bi="[object Set]",A="[object String]",k="[object Symbol]",j="[object Undefined]",q="[object WeakMap]",ht="[object WeakSet]",Lt="[object ArrayBuffer]",Gt="[object DataView]",Pt="[object Float32Array]",Ae="[object Float64Array]",Se="[object Int8Array]",te="[object Int16Array]",Pe="[object Int32Array]",pi="[object Uint8Array]",Mi="[object Uint8ClampedArray]",ti="[object Uint16Array]",gi="[object Uint32Array]",Zr=/\b__p \+= '';/g,sr=/\b(__p \+=) '' \+/g,$i=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ss=/&(?:amp|lt|gt|quot|#39);/g,Di=/[&<>"']/g,Qa=RegExp(ss.source),Cr=RegExp(Di.source),Ta=/<%-([\s\S]+?)%>/g,an=/<%([\s\S]+?)%>/g,as=/<%=([\s\S]+?)%>/g,Lo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qn=/^\w*$/,ls=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hs=/[\\^$.*+?()[\]{}|]/g,Sa=RegExp(Hs.source),Rr=/^\s+/,Ka=/\s/,hs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ks=/\{\n\/\* \[wrapped with (.+)\] \*/,br=/,? & /,Vs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,us=/[()=,{}\[\]\/\s]/,cs=/\\(\\)?/g,Or=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ea=/\w*$/,tl=/^[-+]0x[0-9a-f]+$/i,el=/^0b[01]+$/i,Co=/^\[object .+?Constructor\]$/,Ro=/^0o[0-7]+$/i,Aa=/^(?:0|[1-9]\d*)$/,Pa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_r=/($^)/,M=/['\n\r\u2028\u2029\\]/g,b="\\ud800-\\udfff",U="\\u0300-\\u036f",N="\\ufe20-\\ufe2f",T="\\u20d0-\\u20ff",rt=U+N+T,F="\\u2700-\\u27bf",ut="a-z\\xdf-\\xf6\\xf8-\\xff",xt="\\xac\\xb1\\xd7\\xf7",ft="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",et="\\u2000-\\u206f",Xt=" \\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",Vt="A-Z\\xc0-\\xd6\\xd8-\\xde",It="\\ufe0e\\ufe0f",Kt=xt+ft+et+Xt,qt="['’]",Le="["+b+"]",Me="["+Kt+"]",Ye="["+rt+"]",ye="\\d+",ee="["+F+"]",_e="["+ut+"]",Zt="[^"+b+Kt+ye+F+ut+Vt+"]",Ke="\\ud83c[\\udffb-\\udfff]",fe="(?:"+Ye+"|"+Ke+")",ne="[^"+b+"]",de="(?:\\ud83c[\\udde6-\\uddff]){2}",ln="[\\ud800-\\udbff][\\udc00-\\udfff]",Ln="["+Vt+"]",vi="\\u200d",yi="(?:"+_e+"|"+Zt+")",Si="(?:"+Ln+"|"+Zt+")",Hi="(?:"+qt+"(?:d|ll|m|re|s|t|ve))?",ki="(?:"+qt+"(?:D|LL|M|RE|S|T|VE))?",Xi=fe+"?",qi="["+It+"]?",Ti="(?:"+vi+"(?:"+[ne,de,ln].join("|")+")"+qi+Xi+")*",_i="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Li="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ei=qi+Xi+Ti,Ir="(?:"+[ee,de,ln].join("|")+")"+ei,Mn="(?:"+[ne+Ye+"?",Ye,de,ln,Le].join("|")+")",ps=RegExp(qt,"g"),il=RegExp(Ye,"g"),uo=RegExp(Ke+"(?="+Ke+")|"+Mn+ei,"g"),Ws=RegExp([Ln+"?"+_e+"+"+Hi+"(?="+[Me,Ln,"$"].join("|")+")",Si+"+"+ki+"(?="+[Me,Ln+yi,"$"].join("|")+")",Ln+"?"+yi+"+"+Hi,Ln+"+"+ki,Li,_i,ye,Ir].join("|"),"g"),js=RegExp("["+vi+b+rt+It+"]"),fs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xs=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ds=-1,Ci={};Ci[Pt]=Ci[Ae]=Ci[Se]=Ci[te]=Ci[Pe]=Ci[pi]=Ci[Mi]=Ci[ti]=Ci[gi]=!0,Ci[Oe]=Ci[Pi]=Ci[Lt]=Ci[ni]=Ci[Gt]=Ci[ci]=Ci[yr]=Ci[Lr]=Ci[Gi]=Ci[Gn]=Ci[Je]=Ci[Hn]=Ci[Bi]=Ci[A]=Ci[q]=!1;var oi={};oi[Oe]=oi[Pi]=oi[Lt]=oi[Gt]=oi[ni]=oi[ci]=oi[Pt]=oi[Ae]=oi[Se]=oi[te]=oi[Pe]=oi[Gi]=oi[Gn]=oi[Je]=oi[Hn]=oi[Bi]=oi[A]=oi[k]=oi[pi]=oi[Mi]=oi[ti]=oi[gi]=!0,oi[yr]=oi[Lr]=oi[q]=!1;var qs={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ms={"&":"&","<":"<",">":">",'"':""","'":"'"},Ys={"&":"&","<":"<",">":">",""":'"',"'":"'"},bo={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Zs=parseFloat,gs=parseInt,vs=typeof $a=="object"&&$a&&$a.Object===Object&&$a,ys=typeof self=="object"&&self&&self.Object===Object&&self,Qi=vs||ys||Function("return this")(),co=$&&!$.nodeType&&$,xr=co&&!0&&g&&!g.nodeType&&g,Oo=xr&&xr.exports===co,Io=Oo&&vs.process,Tn=function(){try{var lt=xr&&xr.require&&xr.require("util").types;return lt||Io&&Io.binding&&Io.binding("util")}catch{}}(),nl=Tn&&Tn.isArrayBuffer,_s=Tn&&Tn.isDate,xs=Tn&&Tn.isMap,bl=Tn&&Tn.isRegExp,Ol=Tn&&Tn.isSet,La=Tn&&Tn.isTypedArray;function Kn(lt,Ot,At){switch(At.length){case 0:return lt.call(Ot);case 1:return lt.call(Ot,At[0]);case 2:return lt.call(Ot,At[0],At[1]);case 3:return lt.call(Ot,At[0],At[1],At[2])}return lt.apply(Ot,At)}function Ca(lt,Ot,At,xe){for(var We=-1,xi=lt==null?0:lt.length;++We<xi;){var Yi=lt[We];Ot(xe,Yi,At(Yi),lt)}return xe}function zi(lt,Ot){for(var At=-1,xe=lt==null?0:lt.length;++At<xe&&Ot(lt[At],At,lt)!==!1;);return lt}function Do(lt,Ot){for(var At=lt==null?0:lt.length;At--&&Ot(lt[At],At,lt)!==!1;);return lt}function rl(lt,Ot){for(var At=-1,xe=lt==null?0:lt.length;++At<xe;)if(!Ot(lt[At],At,lt))return!1;return!0}function ar(lt,Ot){for(var At=-1,xe=lt==null?0:lt.length,We=0,xi=[];++At<xe;){var Yi=lt[At];Ot(Yi,At,lt)&&(xi[We++]=Yi)}return xi}function Js(lt,Ot){var At=lt==null?0:lt.length;return!!At&&lr(lt,Ot,0)>-1}function Ra(lt,Ot,At){for(var xe=-1,We=lt==null?0:lt.length;++xe<We;)if(At(Ot,lt[xe]))return!0;return!1}function bi(lt,Ot){for(var At=-1,xe=lt==null?0:lt.length,We=Array(xe);++At<xe;)We[At]=Ot(lt[At],At,lt);return We}function Dr(lt,Ot){for(var At=-1,xe=Ot.length,We=lt.length;++At<xe;)lt[We+At]=Ot[At];return lt}function ba(lt,Ot,At,xe){var We=-1,xi=lt==null?0:lt.length;for(xe&&xi&&(At=lt[++We]);++We<xi;)At=Ot(At,lt[We],We,lt);return At}function Il(lt,Ot,At,xe){var We=lt==null?0:lt.length;for(xe&&We&&(At=lt[--We]);We--;)At=Ot(At,lt[We],We,lt);return At}function Jr(lt,Ot){for(var At=-1,xe=lt==null?0:lt.length;++At<xe;)if(Ot(lt[At],At,lt))return!0;return!1}var zr=fo("length");function Dl(lt){return lt.split("")}function $s(lt){return lt.match(Vs)||[]}function zo(lt,Ot,At){var xe;return At(lt,function(We,xi,Yi){if(Ot(We,xi,Yi))return xe=xi,!1}),xe}function po(lt,Ot,At,xe){for(var We=lt.length,xi=At+(xe?1:-1);xe?xi--:++xi<We;)if(Ot(lt[xi],xi,lt))return xi;return-1}function lr(lt,Ot,At){return Ot===Ot?Oa(lt,Ot,At):po(lt,No,At)}function Qs(lt,Ot,At,xe){for(var We=At-1,xi=lt.length;++We<xi;)if(xe(lt[We],Ot))return We;return-1}function No(lt){return lt!==lt}function ws(lt,Ot){var At=lt==null?0:lt.length;return At?go(lt,Ot)/At:Ft}function fo(lt){return function(Ot){return Ot==null?_:Ot[lt]}}function $r(lt){return function(Ot){return lt==null?_:lt[Ot]}}function mo(lt,Ot,At,xe,We){return We(lt,function(xi,Yi,he){At=xe?(xe=!1,xi):Ot(At,xi,Yi,he)}),At}function zl(lt,Ot){var At=lt.length;for(lt.sort(Ot);At--;)lt[At]=lt[At].value;return lt}function go(lt,Ot){for(var At,xe=-1,We=lt.length;++xe<We;){var xi=Ot(lt[xe]);xi!==_&&(At=At===_?xi:At+xi)}return At}function Qr(lt,Ot){for(var At=-1,xe=Array(lt);++At<lt;)xe[At]=Ot(At);return xe}function Kr(lt,Ot){return bi(Ot,function(At){return[At,lt[At]]})}function Ms(lt){return lt&<.slice(0,Ts(lt)+1).replace(Rr,"")}function Sn(lt){return function(Ot){return lt(Ot)}}function Bo(lt,Ot){return bi(Ot,function(At){return lt[At]})}function Nr(lt,Ot){return lt.has(Ot)}function vo(lt,Ot){for(var At=-1,xe=lt.length;++At<xe&&lr(Ot,lt[At],0)>-1;);return At}function Uo(lt,Ot){for(var At=lt.length;At--&&lr(Ot,lt[At],0)>-1;);return At}function Br(lt,Ot){for(var At=lt.length,xe=0;At--;)lt[At]===Ot&&++xe;return xe}var Fo=$r(qs),wr=$r(ms);function Go(lt){return"\\"+bo[lt]}function Ho(lt,Ot){return lt==null?_:lt[Ot]}function hr(lt){return js.test(lt)}function ko(lt){return fs.test(lt)}function Vo(lt){for(var Ot,At=[];!(Ot=lt.next()).done;)At.push(Ot.value);return At}function Dn(lt){var Ot=-1,At=Array(lt.size);return lt.forEach(function(xe,We){At[++Ot]=[We,xe]}),At}function Ks(lt,Ot){return function(At){return lt(Ot(At))}}function ur(lt,Ot){for(var At=-1,xe=lt.length,We=0,xi=[];++At<xe;){var Yi=lt[At];(Yi===Ot||Yi===Rt)&&(lt[At]=Rt,xi[We++]=At)}return xi}function Wo(lt){var Ot=-1,At=Array(lt.size);return lt.forEach(function(xe){At[++Ot]=xe}),At}function En(lt){var Ot=-1,At=Array(lt.size);return lt.forEach(function(xe){At[++Ot]=[xe,xe]}),At}function Oa(lt,Ot,At){for(var xe=At-1,We=lt.length;++xe<We;)if(lt[xe]===Ot)return xe;return-1}function Ia(lt,Ot,At){for(var xe=At+1;xe--;)if(lt[xe]===Ot)return xe;return xe}function Mr(lt){return hr(lt)?Ss(lt):zr(lt)}function kn(lt){return hr(lt)?tr(lt):Dl(lt)}function Ts(lt){for(var Ot=lt.length;Ot--&&Ka.test(lt.charAt(Ot)););return Ot}var Da=$r(Ys);function Ss(lt){for(var Ot=uo.lastIndex=0;uo.test(lt);)++Ot;return Ot}function tr(lt){return lt.match(uo)||[]}function ah(lt){return lt.match(Ws)||[]}var lh=function lt(Ot){Ot=Ot==null?Qi:yo.defaults(Qi.Object(),Ot,yo.pick(Qi,Xs));var At=Ot.Array,xe=Ot.Date,We=Ot.Error,xi=Ot.Function,Yi=Ot.Math,he=Ot.Object,zn=Ot.RegExp,Es=Ot.String,Vn=Ot.TypeError,mn=At.prototype,Nl=xi.prototype,Ur=he.prototype,_o=Ot["__core-js_shared__"],Wn=Nl.toString,ai=Ur.hasOwnProperty,jn=0,cr=function(){var r=/[^.]+$/.exec(_o&&_o.keys&&_o.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Xn=Ur.toString,Fr=Wn.call(he),Tr=Qi._,to=zn("^"+Wn.call(ai).replace(Hs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qn=Oo?Ot.Buffer:_,Nn=Ot.Symbol,Ui=Ot.Uint8Array,ta=qn?qn.allocUnsafe:_,Gr=Ks(he.getPrototypeOf,he),ea=he.create,ia=Ur.propertyIsEnumerable,jo=mn.splice,As=Nn?Nn.isConcatSpreadable:_,xo=Nn?Nn.iterator:_,Hr=Nn?Nn.toStringTag:_,Xo=function(){try{var r=_a(he,"defineProperty");return r({},"",{}),r}catch{}}(),za=Ot.clearTimeout!==Qi.clearTimeout&&Ot.clearTimeout,Na=xe&&xe.now!==Qi.Date.now&&xe.now,ol=Ot.setTimeout!==Qi.setTimeout&&Ot.setTimeout,eo=Yi.ceil,qo=Yi.floor,na=he.getOwnPropertySymbols,sl=qn?qn.isBuffer:_,Ba=Ot.isFinite,al=mn.join,Bl=Ks(he.keys,he),Ki=Yi.max,An=Yi.min,ra=xe.now,ll=Ot.parseInt,Ua=Yi.random,Ps=mn.reverse,oa=_a(Ot,"DataView"),Yo=_a(Ot,"Map"),sa=_a(Ot,"Promise"),Zo=_a(Ot,"Set"),hn=_a(Ot,"WeakMap"),Ls=_a(he,"create"),aa=hn&&new hn,wo={},Fa=xa(oa),hl=xa(Yo),ul=xa(sa),cl=xa(Zo),Ul=xa(hn),la=Nn?Nn.prototype:_,Jo=la?la.valueOf:_,pl=la?la.toString:_;function O(r){if(dn(r)&&!ii(r)&&!(r instanceof ri)){if(r instanceof Cn)return r;if(ai.call(r,"__wrapped__"))return eu(r)}return new Cn(r)}var Mo=function(){function r(){}return function(a){if(!rn(a))return{};if(ea)return ea(a);r.prototype=a;var u=new r;return r.prototype=_,u}}();function Cs(){}function Cn(r,a){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=_}O.templateSettings={escape:Ta,evaluate:an,interpolate:as,variable:"",imports:{_:O}},O.prototype=Cs.prototype,O.prototype.constructor=O,Cn.prototype=Mo(Cs.prototype),Cn.prototype.constructor=Cn;function ri(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Qe,this.__views__=[]}function Rs(){var r=new ri(this.__wrapped__);return r.__actions__=Un(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Un(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Un(this.__views__),r}function Fl(){if(this.__filtered__){var r=new ri(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function bs(){var r=this.__wrapped__.value(),a=this.__dir__,u=ii(r),m=a<0,L=u?r.length:0,G=gc(0,L,this.__views__),J=G.start,ot=G.end,mt=ot-J,Ht=m?ot:J-1,jt=this.__iteratees__,Jt=jt.length,ve=0,De=An(mt,this.__takeCount__);if(!u||!m&&L==mt&&De==mt)return He(r,this.__actions__);var Xe=[];t:for(;mt--&&ve<De;){Ht+=a;for(var li=-1,qe=r[Ht];++li<Jt;){var di=jt[li],wi=di.iteratee,Ar=di.type,or=wi(qe);if(Ar==we)qe=or;else if(!or){if(Ar==se)continue t;break t}}Xe[ve++]=qe}return Xe}ri.prototype=Mo(Cs.prototype),ri.prototype.constructor=ri;function pr(r){var a=-1,u=r==null?0:r.length;for(this.clear();++a<u;){var m=r[a];this.set(m[0],m[1])}}function Os(){this.__data__=Ls?Ls(null):{},this.size=0}function Is(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}function ha(r){var a=this.__data__;if(Ls){var u=a[r];return u===nt?_:u}return ai.call(a,r)?a[r]:_}function Ga(r){var a=this.__data__;return Ls?a[r]!==_:ai.call(a,r)}function ua(r,a){var u=this.__data__;return this.size+=this.has(r)?0:1,u[r]=Ls&&a===_?nt:a,this}pr.prototype.clear=Os,pr.prototype.delete=Is,pr.prototype.get=ha,pr.prototype.has=Ga,pr.prototype.set=ua;function Yn(r){var a=-1,u=r==null?0:r.length;for(this.clear();++a<u;){var m=r[a];this.set(m[0],m[1])}}function ca(){this.__data__=[],this.size=0}function io(r){var a=this.__data__,u=da(a,r);if(u<0)return!1;var m=a.length-1;return u==m?a.pop():jo.call(a,u,1),--this.size,!0}function pa(r){var a=this.__data__,u=da(a,r);return u<0?_:a[u][1]}function fa(r){return da(this.__data__,r)>-1}function no(r,a){var u=this.__data__,m=da(u,r);return m<0?(++this.size,u.push([r,a])):u[m][1]=a,this}Yn.prototype.clear=ca,Yn.prototype.delete=io,Yn.prototype.get=pa,Yn.prototype.has=fa,Yn.prototype.set=no;function er(r){var a=-1,u=r==null?0:r.length;for(this.clear();++a<u;){var m=r[a];this.set(m[0],m[1])}}function Gl(){this.size=0,this.__data__={hash:new pr,map:new(Yo||Yn),string:new pr}}function Hl(r){var a=$l(this,r).delete(r);return this.size-=a?1:0,a}function fl(r){return $l(this,r).get(r)}function $e(r){return $l(this,r).has(r)}function To(r,a){var u=$l(this,r),m=u.size;return u.set(r,a),this.size+=u.size==m?0:1,this}er.prototype.clear=Gl,er.prototype.delete=Hl,er.prototype.get=fl,er.prototype.has=$e,er.prototype.set=To;function $o(r){var a=-1,u=r==null?0:r.length;for(this.__data__=new er;++a<u;)this.add(r[a])}function hi(r){return this.__data__.set(r,nt),this}function _n(r){return this.__data__.has(r)}$o.prototype.add=$o.prototype.push=hi,$o.prototype.has=_n;function Sr(r){var a=this.__data__=new Yn(r);this.size=a.size}function Re(){this.__data__=new Yn,this.size=0}function kr(r){var a=this.__data__,u=a.delete(r);return this.size=a.size,u}function hh(r){return this.__data__.get(r)}function uh(r){return this.__data__.has(r)}function ch(r,a){var u=this.__data__;if(u instanceof Yn){var m=u.__data__;if(!Yo||m.length<gt-1)return m.push([r,a]),this.size=++u.size,this;u=this.__data__=new er(m)}return u.set(r,a),this.size=u.size,this}Sr.prototype.clear=Re,Sr.prototype.delete=kr,Sr.prototype.get=hh,Sr.prototype.has=uh,Sr.prototype.set=ch;function kl(r,a){var u=ii(r),m=!u&&wa(r),L=!u&&!m&&Gs(r),G=!u&&!m&&!L&&Za(r),J=u||m||L||G,ot=J?Qr(r.length,Es):[],mt=ot.length;for(var Ht in r)(a||ai.call(r,Ht))&&!(J&&(Ht=="length"||L&&(Ht=="offset"||Ht=="parent")||G&&(Ht=="buffer"||Ht=="byteLength"||Ht=="byteOffset")||is(Ht,mt)))&&ot.push(Ht);return ot}function dl(r){var a=r.length;return a?r[$t(0,a-1)]:_}function ph(r,a){return Ql(Un(r),So(a,0,r.length))}function Vl(r){return Ql(Un(r))}function Ha(r,a,u){(u!==_&&!ao(r[a],u)||u===_&&!(a in r))&&ro(r,a,u)}function Ds(r,a,u){var m=r[a];(!(ai.call(r,a)&&ao(m,u))||u===_&&!(a in r))&&ro(r,a,u)}function da(r,a){for(var u=r.length;u--;)if(ao(r[u][0],a))return u;return-1}function Wl(r,a,u,m){return tn(r,function(L,G,J){a(m,L,u(L),J)}),m}function ml(r,a){return r&&gn(a,On(a),r)}function gl(r,a){return r&&gn(a,gr(a),r)}function ro(r,a,u){a=="__proto__"&&Xo?Xo(r,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):r[a]=u}function vl(r,a){for(var u=-1,m=a.length,L=At(m),G=r==null;++u<m;)L[u]=G?_:Lh(r,a[u]);return L}function So(r,a,u){return r===r&&(u!==_&&(r=r<=u?r:u),a!==_&&(r=r>=a?r:a)),r}function ir(r,a,u,m,L,G){var J,ot=a&vt,mt=a&Nt,Ht=a&Ut;if(u&&(J=L?u(r,m,L,G):u(r)),J!==_)return J;if(!rn(r))return r;var jt=ii(r);if(jt){if(J=yc(r),!ot)return Un(r,J)}else{var Jt=Jn(r),ve=Jt==Lr||Jt==$n;if(Gs(r))return oo(r,ot);if(Jt==Je||Jt==Oe||ve&&!L){if(J=mt||ve?{}:Xh(r),!ot)return mt?Yl(r,gl(J,r)):jr(r,ml(J,r))}else{if(!oi[Jt])return L?r:{};J=_c(r,Jt,ot)}}G||(G=new Sr);var De=G.get(r);if(De)return De;G.set(r,J),wu(r)?r.forEach(function(qe){J.add(ir(qe,a,u,qe,r,G))}):_u(r)&&r.forEach(function(qe,di){J.set(di,ir(qe,a,u,di,r,G))});var Xe=Ht?mt?dh:fh:mt?gr:On,li=jt?_:Xe(r);return zi(li||r,function(qe,di){li&&(di=qe,qe=r[di]),Ds(J,di,ir(qe,a,u,di,r,G))}),J}function zs(r){var a=On(r);return function(u){return jl(u,r,a)}}function jl(r,a,u){var m=u.length;if(r==null)return!m;for(r=he(r);m--;){var L=u[m],G=a[L],J=r[L];if(J===_&&!(L in r)||!G(J))return!1}return!0}function Vr(r,a,u){if(typeof r!="function")throw new Vn(Mt);return El(function(){r.apply(_,u)},a)}function ma(r,a,u,m){var L=-1,G=Js,J=!0,ot=r.length,mt=[],Ht=a.length;if(!ot)return mt;u&&(a=bi(a,Sn(u))),m?(G=Ra,J=!1):a.length>=gt&&(G=Nr,J=!1,a=new $o(a));t:for(;++L<ot;){var jt=r[L],Jt=u==null?jt:u(jt);if(jt=m||jt!==0?jt:0,J&&Jt===Jt){for(var ve=Ht;ve--;)if(a[ve]===Jt)continue t;mt.push(jt)}else G(a,Jt,m)||mt.push(jt)}return mt}var tn=H(dr),Xl=H(Va,!0);function Rn(r,a){var u=!0;return tn(r,function(m,L,G){return u=!!a(m,L,G),u}),u}function Wr(r,a,u){for(var m=-1,L=r.length;++m<L;){var G=r[m],J=a(G);if(J!=null&&(ot===_?J===J&&!Er(J):u(J,ot)))var ot=J,mt=G}return mt}function Bn(r,a,u,m){var L=r.length;for(u=si(u),u<0&&(u=-u>L?0:L+u),m=m===_||m>L?L:si(m),m<0&&(m+=L),m=u>m?0:Tu(m);u<m;)r[u++]=a;return r}function fr(r,a){var u=[];return tn(r,function(m,L,G){a(m,L,G)&&u.push(m)}),u}function un(r,a,u,m,L){var G=-1,J=r.length;for(u||(u=wc),L||(L=[]);++G<J;){var ot=r[G];a>0&&u(ot)?a>1?un(ot,a-1,u,m,L):Dr(L,ot):m||(L[L.length]=ot)}return L}var ga=tt(),ka=tt(!0);function dr(r,a){return r&&ga(r,a,On)}function Va(r,a){return r&&ka(r,a,On)}function Qo(r,a){return ar(a,function(u){return ns(r[u])})}function Eo(r,a){a=Ie(a,r);for(var u=0,m=a.length;r!=null&&u<m;)r=r[Po(a[u++])];return u&&u==m?r:_}function ql(r,a,u){var m=a(r);return ii(r)?m:Dr(m,u(r))}function bn(r){return r==null?r===_?j:sn:Hr&&Hr in he(r)?mc(r):Lc(r)}function Wa(r,a){return r>a}function ja(r,a){return r!=null&&ai.call(r,a)}function yl(r,a){return r!=null&&a in he(r)}function Xa(r,a,u){return r>=An(a,u)&&r<Ki(a,u)}function va(r,a,u){for(var m=u?Ra:Js,L=r[0].length,G=r.length,J=G,ot=At(G),mt=1/0,Ht=[];J--;){var jt=r[J];J&&a&&(jt=bi(jt,Sn(a))),mt=An(jt.length,mt),ot[J]=!u&&(a||L>=120&&jt.length>=120)?new $o(J&&jt):_}jt=r[0];var Jt=-1,ve=ot[0];t:for(;++Jt<L&&Ht.length<mt;){var De=jt[Jt],Xe=a?a(De):De;if(De=u||De!==0?De:0,!(ve?Nr(ve,Xe):m(Ht,Xe,u))){for(J=G;--J;){var li=ot[J];if(!(li?Nr(li,Xe):m(r[J],Xe,u)))continue t}ve&&ve.push(Xe),Ht.push(De)}}return Ht}function t(r,a,u,m){return dr(r,function(L,G,J){a(m,u(L),G,J)}),m}function e(r,a,u){a=Ie(a,r),r=Jh(r,a);var m=r==null?r:r[Po(qr(a))];return m==null?_:Kn(m,r,u)}function i(r){return dn(r)&&bn(r)==Oe}function n(r){return dn(r)&&bn(r)==Lt}function o(r){return dn(r)&&bn(r)==ci}function s(r,a,u,m,L){return r===a?!0:r==null||a==null||!dn(r)&&!dn(a)?r!==r&&a!==a:l(r,a,u,m,s,L)}function l(r,a,u,m,L,G){var J=ii(r),ot=ii(a),mt=J?Pi:Jn(r),Ht=ot?Pi:Jn(a);mt=mt==Oe?Je:mt,Ht=Ht==Oe?Je:Ht;var jt=mt==Je,Jt=Ht==Je,ve=mt==Ht;if(ve&&Gs(r)){if(!Gs(a))return!1;J=!0,jt=!1}if(ve&&!jt)return G||(G=new Sr),J||Za(r)?Vh(r,a,u,m,L,G):fc(r,a,mt,u,m,L,G);if(!(u&Ct)){var De=jt&&ai.call(r,"__wrapped__"),Xe=Jt&&ai.call(a,"__wrapped__");if(De||Xe){var li=De?r.value():r,qe=Xe?a.value():a;return G||(G=new Sr),L(li,qe,u,m,G)}}return ve?(G||(G=new Sr),dc(r,a,u,m,L,G)):!1}function h(r){return dn(r)&&Jn(r)==Gi}function c(r,a,u,m){var L=u.length,G=L,J=!m;if(r==null)return!G;for(r=he(r);L--;){var ot=u[L];if(J&&ot[2]?ot[1]!==r[ot[0]]:!(ot[0]in r))return!1}for(;++L<G;){ot=u[L];var mt=ot[0],Ht=r[mt],jt=ot[1];if(J&&ot[2]){if(Ht===_&&!(mt in r))return!1}else{var Jt=new Sr;if(m)var ve=m(Ht,jt,mt,r,a,Jt);if(!(ve===_?s(jt,Ht,Ct|at,m,Jt):ve))return!1}}return!0}function p(r){if(!rn(r)||Tc(r))return!1;var a=ns(r)?to:Co;return a.test(xa(r))}function f(r){return dn(r)&&bn(r)==Hn}function d(r){return dn(r)&&Jn(r)==Bi}function v(r){return dn(r)&&rh(r.length)&&!!Ci[bn(r)]}function w(r){return typeof r=="function"?r:r==null?vr:typeof r=="object"?ii(r)?st(r[0],r[1]):W(r):Du(r)}function P(r){if(!Sl(r))return Bl(r);var a=[];for(var u in he(r))ai.call(r,u)&&u!="constructor"&&a.push(u);return a}function R(r){if(!rn(r))return Pc(r);var a=Sl(r),u=[];for(var m in r)m=="constructor"&&(a||!ai.call(r,m))||u.push(m);return u}function I(r,a){return r<a}function Q(r,a){var u=-1,m=mr(r)?At(r.length):[];return tn(r,function(L,G,J){m[++u]=a(L,G,J)}),m}function W(r){var a=gh(r);return a.length==1&&a[0][2]?Yh(a[0][0],a[0][1]):function(u){return u===r||c(u,r,a)}}function st(r,a){return yh(r)&&qh(a)?Yh(Po(r),a):function(u){var m=Lh(u,r);return m===_&&m===a?Ch(u,r):s(a,m,Ct|at)}}function K(r,a,u,m,L){r!==a&&ga(a,function(G,J){if(L||(L=new Sr),rn(G))wt(r,a,J,u,K,m,L);else{var ot=m?m(xh(r,J),G,J+"",r,a,L):_;ot===_&&(ot=G),Ha(r,J,ot)}},gr)}function wt(r,a,u,m,L,G,J){var ot=xh(r,u),mt=xh(a,u),Ht=J.get(mt);if(Ht){Ha(r,u,Ht);return}var jt=G?G(ot,mt,u+"",r,a,J):_,Jt=jt===_;if(Jt){var ve=ii(mt),De=!ve&&Gs(mt),Xe=!ve&&!De&&Za(mt);jt=mt,ve||De||Xe?ii(ot)?jt=ot:vn(ot)?jt=Un(ot):De?(Jt=!1,jt=oo(mt,!0)):Xe?(Jt=!1,jt=ya(mt,!0)):jt=[]:Al(mt)||wa(mt)?(jt=ot,wa(ot)?jt=Su(ot):(!rn(ot)||ns(ot))&&(jt=Xh(mt))):Jt=!1}Jt&&(J.set(mt,jt),L(jt,mt,m,G,J),J.delete(mt)),Ha(r,u,jt)}function C(r,a){var u=r.length;if(u)return a+=a<0?u:0,is(a,u)?r[a]:_}function D(r,a,u){a.length?a=bi(a,function(G){return ii(G)?function(J){return Eo(J,G.length===1?G[0]:G)}:G}):a=[vr];var m=-1;a=bi(a,Sn(Ve()));var L=Q(r,function(G,J,ot){var mt=bi(a,function(Ht){return Ht(G)});return{criteria:mt,index:++m,value:G}});return zl(L,function(G,J){return Ao(G,J,u)})}function ct(r,a){return Dt(r,a,function(u,m){return Ch(r,m)})}function Dt(r,a,u){for(var m=-1,L=a.length,G={};++m<L;){var J=a[m],ot=Eo(r,J);u(ot,J)&&Ze(G,Ie(J,r),ot)}return G}function bt(r){return function(a){return Eo(a,r)}}function St(r,a,u,m){var L=m?Qs:lr,G=-1,J=a.length,ot=r;for(r===a&&(a=Un(a)),u&&(ot=bi(r,Sn(u)));++G<J;)for(var mt=0,Ht=a[G],jt=u?u(Ht):Ht;(mt=L(ot,jt,mt,m))>-1;)ot!==r&&jo.call(ot,mt,1),jo.call(r,mt,1);return r}function oe(r,a){for(var u=r?a.length:0,m=u-1;u--;){var L=a[u];if(u==m||L!==G){var G=L;is(L)?jo.call(r,L,1):Ai(r,L)}}return r}function $t(r,a){return r+qo(Ua()*(a-r+1))}function me(r,a,u,m){for(var L=-1,G=Ki(eo((a-r)/(u||1)),0),J=At(G);G--;)J[m?G:++L]=r,r+=u;return J}function ue(r,a){var u="";if(!r||a<1||a>ze)return u;do a%2&&(u+=r),a=qo(a/2),a&&(r+=r);while(a);return u}function Wt(r,a){return wh(Zh(r,a,vr),r+"")}function Ee(r){return dl(Ja(r))}function Be(r,a){var u=Ja(r);return Ql(u,So(a,0,u.length))}function Ze(r,a,u,m){if(!rn(r))return r;a=Ie(a,r);for(var L=-1,G=a.length,J=G-1,ot=r;ot!=null&&++L<G;){var mt=Po(a[L]),Ht=u;if(mt==="__proto__"||mt==="constructor"||mt==="prototype")return r;if(L!=J){var jt=ot[mt];Ht=m?m(jt,mt,ot):_,Ht===_&&(Ht=rn(jt)?jt:is(a[L+1])?[]:{})}Ds(ot,mt,Ht),ot=ot[mt]}return r}var cn=aa?function(r,a){return aa.set(r,a),r}:vr,en=Xo?function(r,a){return Xo(r,"toString",{configurable:!0,enumerable:!1,value:bh(a),writable:!0})}:vr;function Ri(r){return Ql(Ja(r))}function Ei(r,a,u){var m=-1,L=r.length;a<0&&(a=-a>L?0:L+a),u=u>L?L:u,u<0&&(u+=L),L=a>u?0:u-a>>>0,a>>>=0;for(var G=At(L);++m<L;)G[m]=r[m+a];return G}function Vi(r,a){var u;return tn(r,function(m,L,G){return u=a(m,L,G),!u}),!!u}function pn(r,a,u){var m=0,L=r==null?m:r.length;if(typeof a=="number"&&a===a&&L<=Pn){for(;m<L;){var G=m+L>>>1,J=r[G];J!==null&&!Er(J)&&(u?J<=a:J<a)?m=G+1:L=G}return L}return ce(r,a,vr,u)}function ce(r,a,u,m){var L=0,G=r==null?0:r.length;if(G===0)return 0;a=u(a);for(var J=a!==a,ot=a===null,mt=Er(a),Ht=a===_;L<G;){var jt=qo((L+G)/2),Jt=u(r[jt]),ve=Jt!==_,De=Jt===null,Xe=Jt===Jt,li=Er(Jt);if(J)var qe=m||Xe;else Ht?qe=Xe&&(m||ve):ot?qe=Xe&&ve&&(m||!De):mt?qe=Xe&&ve&&!De&&(m||!li):De||li?qe=!1:qe=m?Jt<=a:Jt<a;qe?L=jt+1:G=jt}return An(G,Ii)}function Ue(r,a){for(var u=-1,m=r.length,L=0,G=[];++u<m;){var J=r[u],ot=a?a(J):J;if(!u||!ao(ot,mt)){var mt=ot;G[L++]=J===0?0:J}}return G}function yt(r){return typeof r=="number"?r:Er(r)?Ft:+r}function be(r){if(typeof r=="string")return r;if(ii(r))return bi(r,be)+"";if(Er(r))return pl?pl.call(r):"";var a=r+"";return a=="0"&&1/r==-ie?"-0":a}function Fe(r,a,u){var m=-1,L=Js,G=r.length,J=!0,ot=[],mt=ot;if(u)J=!1,L=Ra;else if(G>=gt){var Ht=a?null:Fs(r);if(Ht)return Wo(Ht);J=!1,L=Nr,mt=new $o}else mt=a?[]:ot;t:for(;++m<G;){var jt=r[m],Jt=a?a(jt):jt;if(jt=u||jt!==0?jt:0,J&&Jt===Jt){for(var ve=mt.length;ve--;)if(mt[ve]===Jt)continue t;a&&mt.push(Jt),ot.push(jt)}else L(mt,Jt,u)||(mt!==ot&&mt.push(Jt),ot.push(jt))}return ot}function Ai(r,a){return a=Ie(a,r),r=Jh(r,a),r==null||delete r[Po(qr(a))]}function pe(r,a,u,m){return Ze(r,a,u(Eo(r,a)),m)}function Ce(r,a,u,m){for(var L=r.length,G=m?L:-1;(m?G--:++G<L)&&a(r[G],G,r););return u?Ei(r,m?0:G,m?G+1:L):Ei(r,m?G+1:0,m?L:G)}function He(r,a){var u=r;return u instanceof ri&&(u=u.value()),ba(a,function(m,L){return L.func.apply(L.thisArg,Dr([m],L.args))},u)}function fi(r,a,u){var m=r.length;if(m<2)return m?Fe(r[0]):[];for(var L=-1,G=At(m);++L<m;)for(var J=r[L],ot=-1;++ot<m;)ot!=L&&(G[L]=ma(G[L]||J,r[ot],a,u));return Fe(un(G,1),a,u)}function ui(r,a,u){for(var m=-1,L=r.length,G=a.length,J={};++m<L;){var ot=m<G?a[m]:_;u(J,r[m],ot)}return J}function Bt(r){return vn(r)?r:[]}function Ge(r){return typeof r=="function"?r:vr}function Ie(r,a){return ii(r)?r:yh(r,a)?[r]:tu(Oi(r))}var je=Wt;function nn(r,a,u){var m=r.length;return u=u===_?m:u,!a&&u>=m?r:Ei(r,a,u)}var fn=za||function(r){return Qi.clearTimeout(r)};function oo(r,a){if(a)return r.slice();var u=r.length,m=ta?ta(u):new r.constructor(u);return r.copy(m),m}function Ns(r){var a=new r.constructor(r.byteLength);return new Ui(a).set(new Ui(r)),a}function _l(r,a){var u=a?Ns(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.byteLength)}function Bs(r){var a=new r.constructor(r.source,Ea.exec(r));return a.lastIndex=r.lastIndex,a}function Ko(r){return Jo?he(Jo.call(r)):{}}function ya(r,a){var u=a?Ns(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.length)}function ts(r,a){if(r!==a){var u=r!==_,m=r===null,L=r===r,G=Er(r),J=a!==_,ot=a===null,mt=a===a,Ht=Er(a);if(!ot&&!Ht&&!G&&r>a||G&&J&&mt&&!ot&&!Ht||m&&J&&mt||!u&&mt||!L)return 1;if(!m&&!G&&!Ht&&r<a||Ht&&u&&L&&!m&&!G||ot&&u&&L||!J&&L||!mt)return-1}return 0}function Ao(r,a,u){for(var m=-1,L=r.criteria,G=a.criteria,J=L.length,ot=u.length;++m<J;){var mt=ts(L[m],G[m]);if(mt){if(m>=ot)return mt;var Ht=u[m];return mt*(Ht=="desc"?-1:1)}}return r.index-a.index}function xl(r,a,u,m){for(var L=-1,G=r.length,J=u.length,ot=-1,mt=a.length,Ht=Ki(G-J,0),jt=At(mt+Ht),Jt=!m;++ot<mt;)jt[ot]=a[ot];for(;++L<J;)(Jt||L<G)&&(jt[u[L]]=r[L]);for(;Ht--;)jt[ot++]=r[L++];return jt}function wl(r,a,u,m){for(var L=-1,G=r.length,J=-1,ot=u.length,mt=-1,Ht=a.length,jt=Ki(G-ot,0),Jt=At(jt+Ht),ve=!m;++L<jt;)Jt[L]=r[L];for(var De=L;++mt<Ht;)Jt[De+mt]=a[mt];for(;++J<ot;)(ve||L<G)&&(Jt[De+u[J]]=r[L++]);return Jt}function Un(r,a){var u=-1,m=r.length;for(a||(a=At(m));++u<m;)a[u]=r[u];return a}function gn(r,a,u,m){var L=!u;u||(u={});for(var G=-1,J=a.length;++G<J;){var ot=a[G],mt=m?m(u[ot],r[ot],ot,u,r):_;mt===_&&(mt=r[ot]),L?ro(u,ot,mt):Ds(u,ot,mt)}return u}function jr(r,a){return gn(r,vh(r),a)}function Yl(r,a){return gn(r,Wh(r),a)}function Us(r,a){return function(u,m){var L=ii(u)?Ca:Wl,G=a?a():{};return L(u,r,Ve(m,2),G)}}function so(r){return Wt(function(a,u){var m=-1,L=u.length,G=L>1?u[L-1]:_,J=L>2?u[2]:_;for(G=r.length>3&&typeof G=="function"?(L--,G):_,J&&rr(u[0],u[1],J)&&(G=L<3?_:G,L=1),a=he(a);++m<L;){var ot=u[m];ot&&r(a,ot,m,G)}return a})}function H(r,a){return function(u,m){if(u==null)return u;if(!mr(u))return r(u,m);for(var L=u.length,G=a?L:-1,J=he(u);(a?G--:++G<L)&&m(J[G],G,J)!==!1;);return u}}function tt(r){return function(a,u,m){for(var L=-1,G=he(a),J=m(a),ot=J.length;ot--;){var mt=J[r?ot:++L];if(u(G[mt],mt,G)===!1)break}return a}}function V(r,a,u){var m=a&Y,L=Te(r);function G(){var J=this&&this!==Qi&&this instanceof G?L:r;return J.apply(m?u:this,arguments)}return G}function ae(r){return function(a){a=Oi(a);var u=hr(a)?kn(a):_,m=u?u[0]:a.charAt(0),L=u?nn(u,1).join(""):a.slice(1);return m[r]()+L}}function ge(r){return function(a){return ba(Ou(bu(a).replace(ps,"")),r,"")}}function Te(r){return function(){var a=arguments;switch(a.length){case 0:return new r;case 1:return new r(a[0]);case 2:return new r(a[0],a[1]);case 3:return new r(a[0],a[1],a[2]);case 4:return new r(a[0],a[1],a[2],a[3]);case 5:return new r(a[0],a[1],a[2],a[3],a[4]);case 6:return new r(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new r(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=Mo(r.prototype),m=r.apply(u,a);return rn(m)?m:u}}function le(r,a,u){var m=Te(r);function L(){for(var G=arguments.length,J=At(G),ot=G,mt=Ya(L);ot--;)J[ot]=arguments[ot];var Ht=G<3&&J[0]!==mt&&J[G-1]!==mt?[]:ur(J,mt);if(G-=Ht.length,G<u)return Tl(r,a,Ni,L.placeholder,_,J,Ht,_,_,u-G);var jt=this&&this!==Qi&&this instanceof L?m:r;return Kn(jt,this,J)}return L}function Ne(r){return function(a,u,m){var L=he(a);if(!mr(a)){var G=Ve(u,3);a=On(a),u=function(ot){return G(L[ot],ot,L)}}var J=r(a,u,m);return J>-1?L[G?a[J]:J]:_}}function mi(r){return es(function(a){var u=a.length,m=u,L=Cn.prototype.thru;for(r&&a.reverse();m--;){var G=a[m];if(typeof G!="function")throw new Vn(Mt);if(L&&!J&&Jl(G)=="wrapper")var J=new Cn([],!0)}for(m=J?m:u;++m<u;){G=a[m];var ot=Jl(G),mt=ot=="wrapper"?mh(G):_;mt&&_h(mt[0])&&mt[1]==(X|B|Z|it)&&!mt[4].length&&mt[9]==1?J=J[Jl(mt[0])].apply(J,mt[3]):J=G.length==1&&_h(G)?J[ot]():J.thru(G)}return function(){var Ht=arguments,jt=Ht[0];if(J&&Ht.length==1&&ii(jt))return J.plant(jt).value();for(var Jt=0,ve=u?a[Jt].apply(this,Ht):jt;++Jt<u;)ve=a[Jt].call(this,ve);return ve}})}function Ni(r,a,u,m,L,G,J,ot,mt,Ht){var jt=a&X,Jt=a&Y,ve=a&y,De=a&(B|E),Xe=a&_t,li=ve?_:Te(r);function qe(){for(var di=arguments.length,wi=At(di),Ar=di;Ar--;)wi[Ar]=arguments[Ar];if(De)var or=Ya(qe),Pr=Br(wi,or);if(m&&(wi=xl(wi,m,L,De)),G&&(wi=wl(wi,G,J,De)),di-=Pr,De&&di<Ht){var yn=ur(wi,or);return Tl(r,a,Ni,qe.placeholder,u,wi,yn,ot,mt,Ht-di)}var lo=Jt?u:this,os=ve?lo[r]:r;return di=wi.length,ot?wi=Cc(wi,ot):Xe&&di>1&&wi.reverse(),jt&&mt<di&&(wi.length=mt),this&&this!==Qi&&this instanceof qe&&(os=li||Te(os)),os.apply(lo,wi)}return qe}function Qt(r,a){return function(u,m){return t(u,r,a(m),{})}}function nr(r,a){return function(u,m){var L;if(u===_&&m===_)return a;if(u!==_&&(L=u),m!==_){if(L===_)return m;typeof u=="string"||typeof m=="string"?(u=be(u),m=be(m)):(u=yt(u),m=yt(m)),L=r(u,m)}return L}}function xn(r){return es(function(a){return a=bi(a,Sn(Ve())),Wt(function(u){var m=this;return r(a,function(L){return Kn(L,m,u)})})})}function Wi(r,a){a=a===_?" ":be(a);var u=a.length;if(u<2)return u?ue(a,r):a;var m=ue(a,eo(r/Mr(a)));return hr(a)?nn(kn(m),0,r).join(""):m.slice(0,r)}function Zn(r,a,u,m){var L=a&Y,G=Te(r);function J(){for(var ot=-1,mt=arguments.length,Ht=-1,jt=m.length,Jt=At(jt+mt),ve=this&&this!==Qi&&this instanceof J?G:r;++Ht<jt;)Jt[Ht]=m[Ht];for(;mt--;)Jt[Ht++]=arguments[++ot];return Kn(ve,L?u:this,Jt)}return J}function Ml(r){return function(a,u,m){return m&&typeof m!="number"&&rr(a,u,m)&&(u=m=_),a=rs(a),u===_?(u=a,a=0):u=rs(u),m=m===_?a<u?1:-1:rs(m),me(a,u,m,r)}}function Xr(r){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=Yr(a),u=Yr(u)),r(a,u)}}function Tl(r,a,u,m,L,G,J,ot,mt,Ht){var jt=a&B,Jt=jt?J:_,ve=jt?_:J,De=jt?G:_,Xe=jt?_:G;a|=jt?Z:z,a&=~(jt?z:Z),a&x||(a&=~(Y|y));var li=[r,a,L,De,Jt,Xe,ve,ot,mt,Ht],qe=u.apply(_,li);return _h(r)&&$h(qe,li),qe.placeholder=m,Qh(qe,r,a)}function qa(r){var a=Yi[r];return function(u,m){if(u=Yr(u),m=m==null?0:An(si(m),292),m&&Ba(u)){var L=(Oi(u)+"e").split("e"),G=a(L[0]+"e"+(+L[1]+m));return L=(Oi(G)+"e").split("e"),+(L[0]+"e"+(+L[1]-m))}return a(u)}}var Fs=Zo&&1/Wo(new Zo([,-0]))[1]==ie?function(r){return new Zo(r)}:Dh;function Zl(r){return function(a){var u=Jn(a);return u==Gi?Dn(a):u==Bi?En(a):Kr(a,r(a))}}function Fn(r,a,u,m,L,G,J,ot){var mt=a&y;if(!mt&&typeof r!="function")throw new Vn(Mt);var Ht=m?m.length:0;if(Ht||(a&=~(Z|z),m=L=_),J=J===_?J:Ki(si(J),0),ot=ot===_?ot:si(ot),Ht-=L?L.length:0,a&z){var jt=m,Jt=L;m=L=_}var ve=mt?_:mh(r),De=[r,a,u,m,L,jt,Jt,G,J,ot];if(ve&&Ac(De,ve),r=De[0],a=De[1],u=De[2],m=De[3],L=De[4],ot=De[9]=De[9]===_?mt?0:r.length:Ki(De[9]-Ht,0),!ot&&a&(B|E)&&(a&=~(B|E)),!a||a==Y)var Xe=V(r,a,u);else a==B||a==E?Xe=le(r,a,ot):(a==Z||a==(Y|Z))&&!L.length?Xe=Zn(r,a,u,m):Xe=Ni.apply(_,De);var li=ve?cn:$h;return Qh(li(Xe,De),r,a)}function Hh(r,a,u,m){return r===_||ao(r,Ur[u])&&!ai.call(m,u)?a:r}function kh(r,a,u,m,L,G){return rn(r)&&rn(a)&&(G.set(a,r),K(r,a,_,kh,G),G.delete(a)),r}function pc(r){return Al(r)?_:r}function Vh(r,a,u,m,L,G){var J=u&Ct,ot=r.length,mt=a.length;if(ot!=mt&&!(J&&mt>ot))return!1;var Ht=G.get(r),jt=G.get(a);if(Ht&&jt)return Ht==a&&jt==r;var Jt=-1,ve=!0,De=u&at?new $o:_;for(G.set(r,a),G.set(a,r);++Jt<ot;){var Xe=r[Jt],li=a[Jt];if(m)var qe=J?m(li,Xe,Jt,a,r,G):m(Xe,li,Jt,r,a,G);if(qe!==_){if(qe)continue;ve=!1;break}if(De){if(!Jr(a,function(di,wi){if(!Nr(De,wi)&&(Xe===di||L(Xe,di,u,m,G)))return De.push(wi)})){ve=!1;break}}else if(!(Xe===li||L(Xe,li,u,m,G))){ve=!1;break}}return G.delete(r),G.delete(a),ve}function fc(r,a,u,m,L,G,J){switch(u){case Gt:if(r.byteLength!=a.byteLength||r.byteOffset!=a.byteOffset)return!1;r=r.buffer,a=a.buffer;case Lt:return!(r.byteLength!=a.byteLength||!G(new Ui(r),new Ui(a)));case ni:case ci:case Gn:return ao(+r,+a);case yr:return r.name==a.name&&r.message==a.message;case Hn:case A:return r==a+"";case Gi:var ot=Dn;case Bi:var mt=m&Ct;if(ot||(ot=Wo),r.size!=a.size&&!mt)return!1;var Ht=J.get(r);if(Ht)return Ht==a;m|=at,J.set(r,a);var jt=Vh(ot(r),ot(a),m,L,G,J);return J.delete(r),jt;case k:if(Jo)return Jo.call(r)==Jo.call(a)}return!1}function dc(r,a,u,m,L,G){var J=u&Ct,ot=fh(r),mt=ot.length,Ht=fh(a),jt=Ht.length;if(mt!=jt&&!J)return!1;for(var Jt=mt;Jt--;){var ve=ot[Jt];if(!(J?ve in a:ai.call(a,ve)))return!1}var De=G.get(r),Xe=G.get(a);if(De&&Xe)return De==a&&Xe==r;var li=!0;G.set(r,a),G.set(a,r);for(var qe=J;++Jt<mt;){ve=ot[Jt];var di=r[ve],wi=a[ve];if(m)var Ar=J?m(wi,di,ve,a,r,G):m(di,wi,ve,r,a,G);if(!(Ar===_?di===wi||L(di,wi,u,m,G):Ar)){li=!1;break}qe||(qe=ve=="constructor")}if(li&&!qe){var or=r.constructor,Pr=a.constructor;or!=Pr&&"constructor"in r&&"constructor"in a&&!(typeof or=="function"&&or instanceof or&&typeof Pr=="function"&&Pr instanceof Pr)&&(li=!1)}return G.delete(r),G.delete(a),li}function es(r){return wh(Zh(r,_,ru),r+"")}function fh(r){return ql(r,On,vh)}function dh(r){return ql(r,gr,Wh)}var mh=aa?function(r){return aa.get(r)}:Dh;function Jl(r){for(var a=r.name+"",u=wo[a],m=ai.call(wo,a)?u.length:0;m--;){var L=u[m],G=L.func;if(G==null||G==r)return L.name}return a}function Ya(r){var a=ai.call(O,"placeholder")?O:r;return a.placeholder}function Ve(){var r=O.iteratee||Oh;return r=r===Oh?w:r,arguments.length?r(arguments[0],arguments[1]):r}function $l(r,a){var u=r.__data__;return Mc(a)?u[typeof a=="string"?"string":"hash"]:u.map}function gh(r){for(var a=On(r),u=a.length;u--;){var m=a[u],L=r[m];a[u]=[m,L,qh(L)]}return a}function _a(r,a){var u=Ho(r,a);return p(u)?u:_}function mc(r){var a=ai.call(r,Hr),u=r[Hr];try{r[Hr]=_;var m=!0}catch{}var L=Xn.call(r);return m&&(a?r[Hr]=u:delete r[Hr]),L}var vh=na?function(r){return r==null?[]:(r=he(r),ar(na(r),function(a){return ia.call(r,a)}))}:zh,Wh=na?function(r){for(var a=[];r;)Dr(a,vh(r)),r=Gr(r);return a}:zh,Jn=bn;(oa&&Jn(new oa(new ArrayBuffer(1)))!=Gt||Yo&&Jn(new Yo)!=Gi||sa&&Jn(sa.resolve())!=wn||Zo&&Jn(new Zo)!=Bi||hn&&Jn(new hn)!=q)&&(Jn=function(r){var a=bn(r),u=a==Je?r.constructor:_,m=u?xa(u):"";if(m)switch(m){case Fa:return Gt;case hl:return Gi;case ul:return wn;case cl:return Bi;case Ul:return q}return a});function gc(r,a,u){for(var m=-1,L=u.length;++m<L;){var G=u[m],J=G.size;switch(G.type){case"drop":r+=J;break;case"dropRight":a-=J;break;case"take":a=An(a,r+J);break;case"takeRight":r=Ki(r,a-J);break}}return{start:r,end:a}}function vc(r){var a=r.match(ks);return a?a[1].split(br):[]}function jh(r,a,u){a=Ie(a,r);for(var m=-1,L=a.length,G=!1;++m<L;){var J=Po(a[m]);if(!(G=r!=null&&u(r,J)))break;r=r[J]}return G||++m!=L?G:(L=r==null?0:r.length,!!L&&rh(L)&&is(J,L)&&(ii(r)||wa(r)))}function yc(r){var a=r.length,u=new r.constructor(a);return a&&typeof r[0]=="string"&&ai.call(r,"index")&&(u.index=r.index,u.input=r.input),u}function Xh(r){return typeof r.constructor=="function"&&!Sl(r)?Mo(Gr(r)):{}}function _c(r,a,u){var m=r.constructor;switch(a){case Lt:return Ns(r);case ni:case ci:return new m(+r);case Gt:return _l(r,u);case Pt:case Ae:case Se:case te:case Pe:case pi:case Mi:case ti:case gi:return ya(r,u);case Gi:return new m;case Gn:case A:return new m(r);case Hn:return Bs(r);case Bi:return new m;case k:return Ko(r)}}function xc(r,a){var u=a.length;if(!u)return r;var m=u-1;return a[m]=(u>1?"& ":"")+a[m],a=a.join(u>2?", ":" "),r.replace(hs,`{
|
|
2616
|
+
*/Ll.exports,function(T,ht){(function(){var d,nt="4.17.21",H=200,m="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",P="Expected a function",D="Invalid `variable` option passed into `_.template`",A="__lodash_hash_undefined__",F=500,Z="__lodash_placeholder__",G=1,J=2,B=4,q=1,E=2,b=1,p=2,g=4,S=8,x=16,U=32,z=64,j=128,lt=256,ft=512,gt=30,Nt="...",at=800,Et=16,I=1,zt=2,Pt=3,Rt=1/0,ge=9007199254740991,ue=17976931348623157e292,Ft=0/0,Dt=4294967295,kt=Dt-1,Fe=Dt>>>1,xe=[["ary",j],["bind",b],["bindKey",p],["curry",S],["curryRight",x],["flip",ft],["partial",U],["partialRight",z],["rearg",lt]],Zt="[object Arguments]",ti="[object Array]",ki="[object AsyncFunction]",Oe="[object Boolean]",Ge="[object Date]",di="[object DOMException]",Ri="[object Error]",hn="[object Function]",Ji="[object GeneratorFunction]",R="[object Map]",Jt="[object Number]",Wt="[object Null]",ct="[object Object]",pt="[object Promise]",Lt="[object Proxy]",ie="[object RegExp]",Kt="[object Set]",w="[object String]",X="[object Symbol]",et="[object Undefined]",K="[object WeakMap]",vt="[object WeakSet]",Gt="[object ArrayBuffer]",Xt="[object DataView]",jt="[object Float32Array]",Ne="[object Float64Array]",Re="[object Int8Array]",de="[object Int16Array]",we="[object Int32Array]",yi="[object Uint8Array]",Si="[object Uint8ClampedArray]",ni="[object Uint16Array]",Ei="[object Uint32Array]",Tr=/\b__p \+= '';/g,Xn=/\b(__p \+=) '' \+/g,nn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Kr=/&(?:amp|lt|gt|quot|#39);/g,Oi=/[&<>"']/g,fo=RegExp(Kr.source),Or=RegExp(Oi.source),Ea=/<%-([\s\S]+?)%>/g,gn=/<%([\s\S]+?)%>/g,hs=/<%=([\s\S]+?)%>/g,Ro=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ir=/^\w*$/,us=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vs=/[\\^$.*+?()[\]{}|]/g,ba=RegExp(Vs.source),Ir=/^\s+/,tl=/\s/,cs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ws=/\{\n\/\* \[wrapped with (.+)\] \*/,Dr=/,? & /,js=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fs=/[()=,{}\[\]\/\s]/,ps=/\\(\\)?/g,zr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Aa=/\w*$/,el=/^[-+]0x[0-9a-f]+$/i,il=/^0b[01]+$/i,Oo=/^\[object .+?Constructor\]$/,Io=/^0o[0-7]+$/i,Pa=/^(?:0|[1-9]\d*)$/,Ca=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mr=/($^)/,L=/['\n\r\u2028\u2029\\]/g,Y="\\ud800-\\udfff",rt="\\u0300-\\u036f",it="\\ufe20-\\ufe2f",O="\\u20d0-\\u20ff",Mt=rt+it+O,ot="\\u2700-\\u27bf",Ct="a-z\\xdf-\\xf6\\xf8-\\xff",Ht="\\xac\\xb1\\xd7\\xf7",It="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Tt="\\u2000-\\u206f",le=" \\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",oe="A-Z\\xc0-\\xd6\\xd8-\\xde",te="\\ufe0e\\ufe0f",ve=Ht+It+Tt+le,he="['’]",je="["+Y+"]",He="["+ve+"]",ci="["+Mt+"]",Be="\\d+",ye="["+ot+"]",ke="["+Ct+"]",ce="[^"+Y+ve+Be+ot+Ct+oe+"]",mi="\\ud83c[\\udffb-\\udfff]",Ce="(?:"+ci+"|"+mi+")",_e="[^"+Y+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",vn="[\\ud800-\\udbff][\\udc00-\\udfff]",zn="["+oe+"]",Ii="\\u200d",Di="(?:"+ke+"|"+ce+")",Fi="(?:"+zn+"|"+ce+")",Ki="(?:"+he+"(?:d|ll|m|re|s|t|ve))?",Qi="(?:"+he+"(?:D|LL|M|RE|S|T|VE))?",sn=Ce+"?",an="["+te+"]?",Ui="(?:"+Ii+"(?:"+[_e,Le,vn].join("|")+")"+an+sn+")*",zi="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vi="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",gi=an+sn+Ui,Br="(?:"+[ye,Le,vn].join("|")+")"+gi,Ln="(?:"+[_e+ci+"?",ci,Le,vn,je].join("|")+")",ds=RegExp(he,"g"),nl=RegExp(ci,"g"),po=RegExp(mi+"(?="+mi+")|"+Ln+gi,"g"),Xs=RegExp([zn+"?"+ke+"+"+Ki+"(?="+[He,zn,"$"].join("|")+")",Fi+"+"+Qi+"(?="+[He,zn+Di,"$"].join("|")+")",zn+"?"+Di+"+"+Ki,zn+"+"+Qi,Vi,zi,Be,Br].join("|"),"g"),qs=RegExp("["+Ii+Y+Mt+te+"]"),ms=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ys=["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"],gs=-1,Wi={};Wi[jt]=Wi[Ne]=Wi[Re]=Wi[de]=Wi[we]=Wi[yi]=Wi[Si]=Wi[ni]=Wi[Ei]=!0,Wi[Zt]=Wi[ti]=Wi[Gt]=Wi[Oe]=Wi[Xt]=Wi[Ge]=Wi[Ri]=Wi[hn]=Wi[R]=Wi[Jt]=Wi[ct]=Wi[ie]=Wi[Kt]=Wi[w]=Wi[K]=!1;var xi={};xi[Zt]=xi[ti]=xi[Gt]=xi[Xt]=xi[Oe]=xi[Ge]=xi[jt]=xi[Ne]=xi[Re]=xi[de]=xi[we]=xi[R]=xi[Jt]=xi[ct]=xi[ie]=xi[Kt]=xi[w]=xi[X]=xi[yi]=xi[Si]=xi[ni]=xi[Ei]=!0,xi[Ri]=xi[hn]=xi[K]=!1;var Zs={À:"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"},vs={"&":"&","<":"<",">":">",'"':""","'":"'"},Js={"&":"&","<":"<",">":">",""":'"',"'":"'"},Do={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$s=parseFloat,ys=parseInt,_s=typeof ur=="object"&&ur&&ur.Object===Object&&ur,xs=typeof self=="object"&&self&&self.Object===Object&&self,un=_s||xs||Function("return this")(),mo=ht&&!ht.nodeType&&ht,Sr=mo&&!0&&T&&!T.nodeType&&T,zo=Sr&&Sr.exports===mo,Bo=zo&&_s.process,Rn=function(){try{var At=Sr&&Sr.require&&Sr.require("util").types;return At||Bo&&Bo.binding&&Bo.binding("util")}catch{}}(),rl=Rn&&Rn.isArrayBuffer,ws=Rn&&Rn.isDate,Ts=Rn&&Rn.isMap,Ol=Rn&&Rn.isRegExp,Il=Rn&&Rn.isSet,La=Rn&&Rn.isTypedArray;function nr(At,Qt,Yt){switch(Yt.length){case 0:return At.call(Qt);case 1:return At.call(Qt,Yt[0]);case 2:return At.call(Qt,Yt[0],Yt[1]);case 3:return At.call(Qt,Yt[0],Yt[1],Yt[2])}return At.apply(Qt,Yt)}function Ra(At,Qt,Yt,Ue){for(var ai=-1,Bi=At==null?0:At.length;++ai<Bi;){var ln=At[ai];Qt(Ue,ln,Yt(ln),At)}return Ue}function Yi(At,Qt){for(var Yt=-1,Ue=At==null?0:At.length;++Yt<Ue&&Qt(At[Yt],Yt,At)!==!1;);return At}function No(At,Qt){for(var Yt=At==null?0:At.length;Yt--&&Qt(At[Yt],Yt,At)!==!1;);return At}function ol(At,Qt){for(var Yt=-1,Ue=At==null?0:At.length;++Yt<Ue;)if(!Qt(At[Yt],Yt,At))return!1;return!0}function cr(At,Qt){for(var Yt=-1,Ue=At==null?0:At.length,ai=0,Bi=[];++Yt<Ue;){var ln=At[Yt];Qt(ln,Yt,At)&&(Bi[ai++]=ln)}return Bi}function Ks(At,Qt){var Yt=At==null?0:At.length;return!!Yt&&fr(At,Qt,0)>-1}function Oa(At,Qt,Yt){for(var Ue=-1,ai=At==null?0:At.length;++Ue<ai;)if(Yt(Qt,At[Ue]))return!0;return!1}function Xi(At,Qt){for(var Yt=-1,Ue=At==null?0:At.length,ai=Array(Ue);++Yt<Ue;)ai[Yt]=Qt(At[Yt],Yt,At);return ai}function Nr(At,Qt){for(var Yt=-1,Ue=Qt.length,ai=At.length;++Yt<Ue;)At[ai+Yt]=Qt[Yt];return At}function Ia(At,Qt,Yt,Ue){var ai=-1,Bi=At==null?0:At.length;for(Ue&&Bi&&(Yt=At[++ai]);++ai<Bi;)Yt=Qt(Yt,At[ai],ai,At);return Yt}function Dl(At,Qt,Yt,Ue){var ai=At==null?0:At.length;for(Ue&&ai&&(Yt=At[--ai]);ai--;)Yt=Qt(Yt,At[ai],ai,At);return Yt}function Qr(At,Qt){for(var Yt=-1,Ue=At==null?0:At.length;++Yt<Ue;)if(Qt(At[Yt],Yt,At))return!0;return!1}var kr=vo("length");function zl(At){return At.split("")}function Qs(At){return At.match(js)||[]}function ko(At,Qt,Yt){var Ue;return Yt(At,function(ai,Bi,ln){if(Qt(ai,Bi,ln))return Ue=Bi,!1}),Ue}function go(At,Qt,Yt,Ue){for(var ai=At.length,Bi=Yt+(Ue?1:-1);Ue?Bi--:++Bi<ai;)if(Qt(At[Bi],Bi,At))return Bi;return-1}function fr(At,Qt,Yt){return Qt===Qt?Da(At,Qt,Yt):go(At,Uo,Yt)}function ta(At,Qt,Yt,Ue){for(var ai=Yt-1,Bi=At.length;++ai<Bi;)if(Ue(At[ai],Qt))return ai;return-1}function Uo(At){return At!==At}function Ms(At,Qt){var Yt=At==null?0:At.length;return Yt?_o(At,Qt)/Yt:Ft}function vo(At){return function(Qt){return Qt==null?d:Qt[At]}}function to(At){return function(Qt){return At==null?d:At[Qt]}}function yo(At,Qt,Yt,Ue,ai){return ai(At,function(Bi,ln,Ee){Yt=Ue?(Ue=!1,Bi):Qt(Yt,Bi,ln,Ee)}),Yt}function Bl(At,Qt){var Yt=At.length;for(At.sort(Qt);Yt--;)At[Yt]=At[Yt].value;return At}function _o(At,Qt){for(var Yt,Ue=-1,ai=At.length;++Ue<ai;){var Bi=Qt(At[Ue]);Bi!==d&&(Yt=Yt===d?Bi:Yt+Bi)}return Yt}function eo(At,Qt){for(var Yt=-1,Ue=Array(At);++Yt<At;)Ue[Yt]=Qt(Yt);return Ue}function io(At,Qt){return Xi(Qt,function(Yt){return[Yt,At[Yt]]})}function Ss(At){return At&&At.slice(0,Es(At)+1).replace(Ir,"")}function On(At){return function(Qt){return At(Qt)}}function Fo(At,Qt){return Xi(Qt,function(Yt){return At[Yt]})}function Ur(At,Qt){return At.has(Qt)}function xo(At,Qt){for(var Yt=-1,Ue=At.length;++Yt<Ue&&fr(Qt,At[Yt],0)>-1;);return Yt}function Go(At,Qt){for(var Yt=At.length;Yt--&&fr(Qt,At[Yt],0)>-1;);return Yt}function Fr(At,Qt){for(var Yt=At.length,Ue=0;Yt--;)At[Yt]===Qt&&++Ue;return Ue}var Ho=to(Zs),Er=to(vs);function Vo(At){return"\\"+Do[At]}function Wo(At,Qt){return At==null?d:At[Qt]}function pr(At){return qs.test(At)}function jo(At){return ms.test(At)}function Xo(At){for(var Qt,Yt=[];!(Qt=At.next()).done;)Yt.push(Qt.value);return Yt}function Fn(At){var Qt=-1,Yt=Array(At.size);return At.forEach(function(Ue,ai){Yt[++Qt]=[ai,Ue]}),Yt}function ea(At,Qt){return function(Yt){return At(Qt(Yt))}}function dr(At,Qt){for(var Yt=-1,Ue=At.length,ai=0,Bi=[];++Yt<Ue;){var ln=At[Yt];(ln===Qt||ln===Z)&&(At[Yt]=Z,Bi[ai++]=Yt)}return Bi}function qo(At){var Qt=-1,Yt=Array(At.size);return At.forEach(function(Ue){Yt[++Qt]=Ue}),Yt}function In(At){var Qt=-1,Yt=Array(At.size);return At.forEach(function(Ue){Yt[++Qt]=[Ue,Ue]}),Yt}function Da(At,Qt,Yt){for(var Ue=Yt-1,ai=At.length;++Ue<ai;)if(At[Ue]===Qt)return Ue;return-1}function za(At,Qt,Yt){for(var Ue=Yt+1;Ue--;)if(At[Ue]===Qt)return Ue;return Ue}function br(At){return pr(At)?bs(At):kr(At)}function qn(At){return pr(At)?rr(At):zl(At)}function Es(At){for(var Qt=At.length;Qt--&&tl.test(At.charAt(Qt)););return Qt}var Ba=to(Js);function bs(At){for(var Qt=po.lastIndex=0;po.test(At);)++Qt;return Qt}function rr(At){return At.match(po)||[]}function uh(At){return At.match(Xs)||[]}var ch=function At(Qt){Qt=Qt==null?un:wo.defaults(un.Object(),Qt,wo.pick(un,Ys));var Yt=Qt.Array,Ue=Qt.Date,ai=Qt.Error,Bi=Qt.Function,ln=Qt.Math,Ee=Qt.Object,Gn=Qt.RegExp,As=Qt.String,Yn=Qt.TypeError,Sn=Yt.prototype,Nl=Bi.prototype,Gr=Ee.prototype,To=Qt["__core-js_shared__"],Zn=Nl.toString,Ti=Gr.hasOwnProperty,Jn=0,mr=function(){var r=/[^.]+$/.exec(To&&To.keys&&To.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),$n=Gr.toString,Hr=Zn.call(Ee),Ar=un._,no=Gn("^"+Zn.call(Ti).replace(Vs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Kn=zo?Qt.Buffer:d,Hn=Qt.Symbol,$i=Qt.Uint8Array,ia=Kn?Kn.allocUnsafe:d,Vr=ea(Ee.getPrototypeOf,Ee),na=Ee.create,ra=Gr.propertyIsEnumerable,Yo=Sn.splice,Ps=Hn?Hn.isConcatSpreadable:d,Mo=Hn?Hn.iterator:d,Wr=Hn?Hn.toStringTag:d,Zo=function(){try{var r=wa(Ee,"defineProperty");return r({},"",{}),r}catch{}}(),Na=Qt.clearTimeout!==un.clearTimeout&&Qt.clearTimeout,ka=Ue&&Ue.now!==un.Date.now&&Ue.now,sl=Qt.setTimeout!==un.setTimeout&&Qt.setTimeout,ro=ln.ceil,Jo=ln.floor,oa=Ee.getOwnPropertySymbols,al=Kn?Kn.isBuffer:d,Ua=Qt.isFinite,ll=Sn.join,kl=ea(Ee.keys,Ee),cn=ln.max,Dn=ln.min,sa=Ue.now,hl=Qt.parseInt,Fa=ln.random,Cs=Sn.reverse,aa=wa(Qt,"DataView"),$o=wa(Qt,"Map"),la=wa(Qt,"Promise"),Ko=wa(Qt,"Set"),yn=wa(Qt,"WeakMap"),Ls=wa(Ee,"create"),ha=yn&&new yn,So={},Ga=Ta(aa),ul=Ta($o),cl=Ta(la),fl=Ta(Ko),Ul=Ta(yn),ua=Hn?Hn.prototype:d,Qo=ua?ua.valueOf:d,pl=ua?ua.toString:d;function $(r){if(Mn(r)&&!vi(r)&&!(r instanceof _i)){if(r instanceof Bn)return r;if(Ti.call(r,"__wrapped__"))return au(r)}return new Bn(r)}var Eo=function(){function r(){}return function(a){if(!mn(a))return{};if(na)return na(a);r.prototype=a;var u=new r;return r.prototype=d,u}}();function Rs(){}function Bn(r,a){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=d}$.templateSettings={escape:Ea,evaluate:gn,interpolate:hs,variable:"",imports:{_:$}},$.prototype=Rs.prototype,$.prototype.constructor=$,Bn.prototype=Eo(Rs.prototype),Bn.prototype.constructor=Bn;function _i(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Dt,this.__views__=[]}function Os(){var r=new _i(this.__wrapped__);return r.__actions__=Wn(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Wn(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Wn(this.__views__),r}function Fl(){if(this.__filtered__){var r=new _i(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function Is(){var r=this.__wrapped__.value(),a=this.__dir__,u=vi(r),_=a<0,k=u?r.length:0,st=Ec(0,k,this.__views__),yt=st.start,St=st.end,Bt=St-yt,re=_?St:yt-1,ae=this.__iteratees__,fe=ae.length,ze=0,Je=Dn(Bt,this.__takeCount__);if(!u||!_&&k==Bt&&Je==Bt)return ri(r,this.__actions__);var hi=[];t:for(;Bt--&&ze<Je;){re+=a;for(var Mi=-1,ui=r[re];++Mi<fe;){var Ci=ae[Mi],Ni=Ci.iteratee,Lr=Ci.type,hr=Ni(ui);if(Lr==zt)ui=hr;else if(!hr){if(Lr==I)continue t;break t}}hi[ze++]=ui}return hi}_i.prototype=Eo(Rs.prototype),_i.prototype.constructor=_i;function gr(r){var a=-1,u=r==null?0:r.length;for(this.clear();++a<u;){var _=r[a];this.set(_[0],_[1])}}function Ds(){this.__data__=Ls?Ls(null):{},this.size=0}function zs(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}function ca(r){var a=this.__data__;if(Ls){var u=a[r];return u===A?d:u}return Ti.call(a,r)?a[r]:d}function Ha(r){var a=this.__data__;return Ls?a[r]!==d:Ti.call(a,r)}function fa(r,a){var u=this.__data__;return this.size+=this.has(r)?0:1,u[r]=Ls&&a===d?A:a,this}gr.prototype.clear=Ds,gr.prototype.delete=zs,gr.prototype.get=ca,gr.prototype.has=Ha,gr.prototype.set=fa;function Qn(r){var a=-1,u=r==null?0:r.length;for(this.clear();++a<u;){var _=r[a];this.set(_[0],_[1])}}function pa(){this.__data__=[],this.size=0}function oo(r){var a=this.__data__,u=ga(a,r);if(u<0)return!1;var _=a.length-1;return u==_?a.pop():Yo.call(a,u,1),--this.size,!0}function da(r){var a=this.__data__,u=ga(a,r);return u<0?d:a[u][1]}function ma(r){return ga(this.__data__,r)>-1}function so(r,a){var u=this.__data__,_=ga(u,r);return _<0?(++this.size,u.push([r,a])):u[_][1]=a,this}Qn.prototype.clear=pa,Qn.prototype.delete=oo,Qn.prototype.get=da,Qn.prototype.has=ma,Qn.prototype.set=so;function or(r){var a=-1,u=r==null?0:r.length;for(this.clear();++a<u;){var _=r[a];this.set(_[0],_[1])}}function Gl(){this.size=0,this.__data__={hash:new gr,map:new($o||Qn),string:new gr}}function Hl(r){var a=Kl(this,r).delete(r);return this.size-=a?1:0,a}function dl(r){return Kl(this,r).get(r)}function pi(r){return Kl(this,r).has(r)}function bo(r,a){var u=Kl(this,r),_=u.size;return u.set(r,a),this.size+=u.size==_?0:1,this}or.prototype.clear=Gl,or.prototype.delete=Hl,or.prototype.get=dl,or.prototype.has=pi,or.prototype.set=bo;function ts(r){var a=-1,u=r==null?0:r.length;for(this.__data__=new or;++a<u;)this.add(r[a])}function bi(r){return this.__data__.set(r,A),this}function Pn(r){return this.__data__.has(r)}ts.prototype.add=ts.prototype.push=bi,ts.prototype.has=Pn;function Pr(r){var a=this.__data__=new Qn(r);this.size=a.size}function qe(){this.__data__=new Qn,this.size=0}function jr(r){var a=this.__data__,u=a.delete(r);return this.size=a.size,u}function fh(r){return this.__data__.get(r)}function ph(r){return this.__data__.has(r)}function dh(r,a){var u=this.__data__;if(u instanceof Qn){var _=u.__data__;if(!$o||_.length<H-1)return _.push([r,a]),this.size=++u.size,this;u=this.__data__=new or(_)}return u.set(r,a),this.size=u.size,this}Pr.prototype.clear=qe,Pr.prototype.delete=jr,Pr.prototype.get=fh,Pr.prototype.has=ph,Pr.prototype.set=dh;function Vl(r,a){var u=vi(r),_=!u&&Ma(r),k=!u&&!_&&Hs(r),st=!u&&!_&&!k&&$a(r),yt=u||_||k||st,St=yt?eo(r.length,As):[],Bt=St.length;for(var re in r)(a||Ti.call(r,re))&&!(yt&&(re=="length"||k&&(re=="offset"||re=="parent")||st&&(re=="buffer"||re=="byteLength"||re=="byteOffset")||os(re,Bt)))&&St.push(re);return St}function ml(r){var a=r.length;return a?r[pe(0,a-1)]:d}function mh(r,a){return Ql(Wn(r),Ao(a,0,r.length))}function Wl(r){return Ql(Wn(r))}function Va(r,a,u){(u!==d&&!uo(r[a],u)||u===d&&!(a in r))&&ao(r,a,u)}function Bs(r,a,u){var _=r[a];(!(Ti.call(r,a)&&uo(_,u))||u===d&&!(a in r))&&ao(r,a,u)}function ga(r,a){for(var u=r.length;u--;)if(uo(r[u][0],a))return u;return-1}function jl(r,a,u,_){return fn(r,function(k,st,yt){a(_,k,u(k),yt)}),_}function gl(r,a){return r&&En(a,Un(a),r)}function vl(r,a){return r&&En(a,xr(a),r)}function ao(r,a,u){a=="__proto__"&&Zo?Zo(r,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):r[a]=u}function yl(r,a){for(var u=-1,_=a.length,k=Yt(_),st=r==null;++u<_;)k[u]=st?d:Rh(r,a[u]);return k}function Ao(r,a,u){return r===r&&(u!==d&&(r=r<=u?r:u),a!==d&&(r=r>=a?r:a)),r}function sr(r,a,u,_,k,st){var yt,St=a&G,Bt=a&J,re=a&B;if(u&&(yt=k?u(r,_,k,st):u(r)),yt!==d)return yt;if(!mn(r))return r;var ae=vi(r);if(ae){if(yt=Ac(r),!St)return Wn(r,yt)}else{var fe=er(r),ze=fe==hn||fe==Ji;if(Hs(r))return lo(r,St);if(fe==ct||fe==Zt||ze&&!k){if(yt=Bt||ze?{}:Kh(r),!St)return Bt?Zl(r,vl(yt,r)):Yr(r,gl(yt,r))}else{if(!xi[fe])return k?r:{};yt=Pc(r,fe,St)}}st||(st=new Pr);var Je=st.get(r);if(Je)return Je;st.set(r,yt),Au(r)?r.forEach(function(ui){yt.add(sr(ui,a,u,ui,r,st))}):Eu(r)&&r.forEach(function(ui,Ci){yt.set(Ci,sr(ui,a,u,Ci,r,st))});var hi=re?Bt?vh:gh:Bt?xr:Un,Mi=ae?d:hi(r);return Yi(Mi||r,function(ui,Ci){Mi&&(Ci=ui,ui=r[Ci]),Bs(yt,Ci,sr(ui,a,u,Ci,r,st))}),yt}function Ns(r){var a=Un(r);return function(u){return Xl(u,r,a)}}function Xl(r,a,u){var _=u.length;if(r==null)return!_;for(r=Ee(r);_--;){var k=u[_],st=a[k],yt=r[k];if(yt===d&&!(k in r)||!st(yt))return!1}return!0}function Xr(r,a,u){if(typeof r!="function")throw new Yn(P);return bl(function(){r.apply(d,u)},a)}function va(r,a,u,_){var k=-1,st=Ks,yt=!0,St=r.length,Bt=[],re=a.length;if(!St)return Bt;u&&(a=Xi(a,On(u))),_?(st=Oa,yt=!1):a.length>=H&&(st=Ur,yt=!1,a=new ts(a));t:for(;++k<St;){var ae=r[k],fe=u==null?ae:u(ae);if(ae=_||ae!==0?ae:0,yt&&fe===fe){for(var ze=re;ze--;)if(a[ze]===fe)continue t;Bt.push(ae)}else st(a,fe,_)||Bt.push(ae)}return Bt}var fn=ut(yr),ql=ut(ja,!0);function Nn(r,a){var u=!0;return fn(r,function(_,k,st){return u=!!a(_,k,st),u}),u}function qr(r,a,u){for(var _=-1,k=r.length;++_<k;){var st=r[_],yt=a(st);if(yt!=null&&(St===d?yt===yt&&!Cr(yt):u(yt,St)))var St=yt,Bt=st}return Bt}function Vn(r,a,u,_){var k=r.length;for(u=wi(u),u<0&&(u=-u>k?0:k+u),_=_===d||_>k?k:wi(_),_<0&&(_+=k),_=u>_?0:Cu(_);u<_;)r[u++]=a;return r}function vr(r,a){var u=[];return fn(r,function(_,k,st){a(_,k,st)&&u.push(_)}),u}function _n(r,a,u,_,k){var st=-1,yt=r.length;for(u||(u=Lc),k||(k=[]);++st<yt;){var St=r[st];a>0&&u(St)?a>1?_n(St,a-1,u,_,k):Nr(k,St):_||(k[k.length]=St)}return k}var ya=wt(),Wa=wt(!0);function yr(r,a){return r&&ya(r,a,Un)}function ja(r,a){return r&&Wa(r,a,Un)}function es(r,a){return cr(a,function(u){return ss(r[u])})}function Po(r,a){a=Ze(a,r);for(var u=0,_=a.length;r!=null&&u<_;)r=r[Lo(a[u++])];return u&&u==_?r:d}function Yl(r,a,u){var _=a(r);return vi(r)?_:Nr(_,u(r))}function kn(r){return r==null?r===d?et:Wt:Wr&&Wr in Ee(r)?Sc(r):Nc(r)}function Xa(r,a){return r>a}function qa(r,a){return r!=null&&Ti.call(r,a)}function _l(r,a){return r!=null&&a in Ee(r)}function Ya(r,a,u){return r>=Dn(a,u)&&r<cn(a,u)}function _a(r,a,u){for(var _=u?Oa:Ks,k=r[0].length,st=r.length,yt=st,St=Yt(st),Bt=1/0,re=[];yt--;){var ae=r[yt];yt&&a&&(ae=Xi(ae,On(a))),Bt=Dn(ae.length,Bt),St[yt]=!u&&(a||k>=120&&ae.length>=120)?new ts(yt&&ae):d}ae=r[0];var fe=-1,ze=St[0];t:for(;++fe<k&&re.length<Bt;){var Je=ae[fe],hi=a?a(Je):Je;if(Je=u||Je!==0?Je:0,!(ze?Ur(ze,hi):_(re,hi,u))){for(yt=st;--yt;){var Mi=St[yt];if(!(Mi?Ur(Mi,hi):_(r[yt],hi,u)))continue t}ze&&ze.push(hi),re.push(Je)}}return re}function t(r,a,u,_){return yr(r,function(k,st,yt){a(_,u(k),st,yt)}),_}function e(r,a,u){a=Ze(a,r),r=iu(r,a);var _=r==null?r:r[Lo(Jr(a))];return _==null?d:nr(_,r,u)}function i(r){return Mn(r)&&kn(r)==Zt}function n(r){return Mn(r)&&kn(r)==Gt}function o(r){return Mn(r)&&kn(r)==Ge}function s(r,a,u,_,k){return r===a?!0:r==null||a==null||!Mn(r)&&!Mn(a)?r!==r&&a!==a:l(r,a,u,_,s,k)}function l(r,a,u,_,k,st){var yt=vi(r),St=vi(a),Bt=yt?ti:er(r),re=St?ti:er(a);Bt=Bt==Zt?ct:Bt,re=re==Zt?ct:re;var ae=Bt==ct,fe=re==ct,ze=Bt==re;if(ze&&Hs(r)){if(!Hs(a))return!1;yt=!0,ae=!1}if(ze&&!ae)return st||(st=new Pr),yt||$a(r)?Zh(r,a,u,_,k,st):Tc(r,a,Bt,u,_,k,st);if(!(u&q)){var Je=ae&&Ti.call(r,"__wrapped__"),hi=fe&&Ti.call(a,"__wrapped__");if(Je||hi){var Mi=Je?r.value():r,ui=hi?a.value():a;return st||(st=new Pr),k(Mi,ui,u,_,st)}}return ze?(st||(st=new Pr),Mc(r,a,u,_,k,st)):!1}function h(r){return Mn(r)&&er(r)==R}function c(r,a,u,_){var k=u.length,st=k,yt=!_;if(r==null)return!st;for(r=Ee(r);k--;){var St=u[k];if(yt&&St[2]?St[1]!==r[St[0]]:!(St[0]in r))return!1}for(;++k<st;){St=u[k];var Bt=St[0],re=r[Bt],ae=St[1];if(yt&&St[2]){if(re===d&&!(Bt in r))return!1}else{var fe=new Pr;if(_)var ze=_(re,ae,Bt,r,a,fe);if(!(ze===d?s(ae,re,q|E,_,fe):ze))return!1}}return!0}function f(r){if(!mn(r)||Oc(r))return!1;var a=ss(r)?no:Oo;return a.test(Ta(r))}function v(r){return Mn(r)&&kn(r)==ie}function y(r){return Mn(r)&&er(r)==Kt}function M(r){return Mn(r)&&oh(r.length)&&!!Wi[kn(r)]}function C(r){return typeof r=="function"?r:r==null?wr:typeof r=="object"?vi(r)?bt(r[0],r[1]):mt(r):Fu(r)}function N(r){if(!El(r))return kl(r);var a=[];for(var u in Ee(r))Ti.call(r,u)&&u!="constructor"&&a.push(u);return a}function W(r){if(!mn(r))return Bc(r);var a=El(r),u=[];for(var _ in r)_=="constructor"&&(a||!Ti.call(r,_))||u.push(_);return u}function Q(r,a){return r<a}function _t(r,a){var u=-1,_=_r(r)?Yt(r.length):[];return fn(r,function(k,st,yt){_[++u]=a(k,st,yt)}),_}function mt(r){var a=_h(r);return a.length==1&&a[0][2]?tu(a[0][0],a[0][1]):function(u){return u===r||c(u,r,a)}}function bt(r,a){return wh(r)&&Qh(a)?tu(Lo(r),a):function(u){var _=Rh(u,r);return _===d&&_===a?Oh(u,r):s(a,_,q|E)}}function xt(r,a,u,_,k){r!==a&&ya(a,function(st,yt){if(k||(k=new Pr),mn(st))Vt(r,a,yt,u,xt,_,k);else{var St=_?_(Mh(r,yt),st,yt+"",r,a,k):d;St===d&&(St=st),Va(r,yt,St)}},xr)}function Vt(r,a,u,_,k,st,yt){var St=Mh(r,u),Bt=Mh(a,u),re=yt.get(Bt);if(re){Va(r,u,re);return}var ae=st?st(St,Bt,u+"",r,a,yt):d,fe=ae===d;if(fe){var ze=vi(Bt),Je=!ze&&Hs(Bt),hi=!ze&&!Je&&$a(Bt);ae=Bt,ze||Je||hi?vi(St)?ae=St:bn(St)?ae=Wn(St):Je?(fe=!1,ae=lo(Bt,!0)):hi?(fe=!1,ae=xa(Bt,!0)):ae=[]:Al(Bt)||Ma(Bt)?(ae=St,Ma(St)?ae=Lu(St):(!mn(St)||ss(St))&&(ae=Kh(Bt))):fe=!1}fe&&(yt.set(Bt,ae),k(ae,Bt,_,st,yt),yt.delete(Bt)),Va(r,u,ae)}function V(r,a){var u=r.length;if(u)return a+=a<0?u:0,os(a,u)?r[a]:d}function tt(r,a,u){a.length?a=Xi(a,function(st){return vi(st)?function(yt){return Po(yt,st.length===1?st[0]:st)}:st}):a=[wr];var _=-1;a=Xi(a,On(si()));var k=_t(r,function(st,yt,St){var Bt=Xi(a,function(re){return re(st)});return{criteria:Bt,index:++_,value:st}});return Bl(k,function(st,yt){return Co(st,yt,u)})}function Ot(r,a){return ee(r,a,function(u,_){return Oh(r,_)})}function ee(r,a,u){for(var _=-1,k=a.length,st={};++_<k;){var yt=a[_],St=Po(r,yt);u(St,yt)&&fi(st,Ze(yt,r),St)}return st}function $t(r){return function(a){return Po(a,r)}}function qt(r,a,u,_){var k=_?ta:fr,st=-1,yt=a.length,St=r;for(r===a&&(a=Wn(a)),u&&(St=Xi(r,On(u)));++st<yt;)for(var Bt=0,re=a[st],ae=u?u(re):re;(Bt=k(St,ae,Bt,_))>-1;)St!==r&&Yo.call(St,Bt,1),Yo.call(r,Bt,1);return r}function Te(r,a){for(var u=r?a.length:0,_=u-1;u--;){var k=a[u];if(u==_||k!==st){var st=k;os(k)?Yo.call(r,k,1):Hi(r,k)}}return r}function pe(r,a){return r+Jo(Fa()*(a-r+1))}function Ie(r,a,u,_){for(var k=-1,st=cn(ro((a-r)/(u||1)),0),yt=Yt(st);st--;)yt[_?st:++k]=r,r+=u;return yt}function be(r,a){var u="";if(!r||a<1||a>ge)return u;do a%2&&(u+=r),a=Jo(a/2),a&&(r+=r);while(a);return u}function se(r,a){return Sh(eu(r,a,wr),r+"")}function We(r){return ml(Ka(r))}function Ke(r,a){var u=Ka(r);return Ql(u,Ao(a,0,u.length))}function fi(r,a,u,_){if(!mn(r))return r;a=Ze(a,r);for(var k=-1,st=a.length,yt=st-1,St=r;St!=null&&++k<st;){var Bt=Lo(a[k]),re=u;if(Bt==="__proto__"||Bt==="constructor"||Bt==="prototype")return r;if(k!=yt){var ae=St[Bt];re=_?_(ae,Bt,St):d,re===d&&(re=mn(ae)?ae:os(a[k+1])?[]:{})}Bs(St,Bt,re),St=St[Bt]}return r}var xn=ha?function(r,a){return ha.set(r,a),r}:wr,pn=Zo?function(r,a){return Zo(r,"toString",{configurable:!0,enumerable:!1,value:Dh(a),writable:!0})}:wr;function ji(r){return Ql(Ka(r))}function Gi(r,a,u){var _=-1,k=r.length;a<0&&(a=-a>k?0:k+a),u=u>k?k:u,u<0&&(u+=k),k=a>u?0:u-a>>>0,a>>>=0;for(var st=Yt(k);++_<k;)st[_]=r[_+a];return st}function tn(r,a){var u;return fn(r,function(_,k,st){return u=a(_,k,st),!u}),!!u}function wn(r,a,u){var _=0,k=r==null?_:r.length;if(typeof a=="number"&&a===a&&k<=Fe){for(;_<k;){var st=_+k>>>1,yt=r[st];yt!==null&&!Cr(yt)&&(u?yt<=a:yt<a)?_=st+1:k=st}return k}return Ae(r,a,wr,u)}function Ae(r,a,u,_){var k=0,st=r==null?0:r.length;if(st===0)return 0;a=u(a);for(var yt=a!==a,St=a===null,Bt=Cr(a),re=a===d;k<st;){var ae=Jo((k+st)/2),fe=u(r[ae]),ze=fe!==d,Je=fe===null,hi=fe===fe,Mi=Cr(fe);if(yt)var ui=_||hi;else re?ui=hi&&(_||ze):St?ui=hi&&ze&&(_||!Je):Bt?ui=hi&&ze&&!Je&&(_||!Mi):Je||Mi?ui=!1:ui=_?fe<=a:fe<a;ui?k=ae+1:st=ae}return Dn(st,kt)}function Qe(r,a){for(var u=-1,_=r.length,k=0,st=[];++u<_;){var yt=r[u],St=a?a(yt):yt;if(!u||!uo(St,Bt)){var Bt=St;st[k++]=yt===0?0:yt}}return st}function Ut(r){return typeof r=="number"?r:Cr(r)?Ft:+r}function Ye(r){if(typeof r=="string")return r;if(vi(r))return Xi(r,Ye)+"";if(Cr(r))return pl?pl.call(r):"";var a=r+"";return a=="0"&&1/r==-Rt?"-0":a}function ei(r,a,u){var _=-1,k=Ks,st=r.length,yt=!0,St=[],Bt=St;if(u)yt=!1,k=Oa;else if(st>=H){var re=a?null:Gs(r);if(re)return qo(re);yt=!1,k=Ur,Bt=new ts}else Bt=a?[]:St;t:for(;++_<st;){var ae=r[_],fe=a?a(ae):ae;if(ae=u||ae!==0?ae:0,yt&&fe===fe){for(var ze=Bt.length;ze--;)if(Bt[ze]===fe)continue t;a&&Bt.push(fe),St.push(ae)}else k(Bt,fe,u)||(Bt!==St&&Bt.push(fe),St.push(ae))}return St}function Hi(r,a){return a=Ze(a,r),r=iu(r,a),r==null||delete r[Lo(Jr(a))]}function Pe(r,a,u,_){return fi(r,a,u(Po(r,a)),_)}function Xe(r,a,u,_){for(var k=r.length,st=_?k:-1;(_?st--:++st<k)&&a(r[st],st,r););return u?Gi(r,_?0:st,_?st+1:k):Gi(r,_?st+1:0,_?k:st)}function ri(r,a){var u=r;return u instanceof _i&&(u=u.value()),Ia(a,function(_,k){return k.func.apply(k.thisArg,Nr([_],k.args))},u)}function Pi(r,a,u){var _=r.length;if(_<2)return _?ei(r[0]):[];for(var k=-1,st=Yt(_);++k<_;)for(var yt=r[k],St=-1;++St<_;)St!=k&&(st[k]=va(st[k]||yt,r[St],a,u));return ei(_n(st,1),a,u)}function Ai(r,a,u){for(var _=-1,k=r.length,st=a.length,yt={};++_<k;){var St=_<st?a[_]:d;u(yt,r[_],St)}return yt}function ne(r){return bn(r)?r:[]}function ii(r){return typeof r=="function"?r:wr}function Ze(r,a){return vi(r)?r:wh(r,a)?[r]:su(qi(r))}var li=se;function dn(r,a,u){var _=r.length;return u=u===d?_:u,!a&&u>=_?r:Gi(r,a,u)}var Tn=Na||function(r){return un.clearTimeout(r)};function lo(r,a){if(a)return r.slice();var u=r.length,_=ia?ia(u):new r.constructor(u);return r.copy(_),_}function ks(r){var a=new r.constructor(r.byteLength);return new $i(a).set(new $i(r)),a}function xl(r,a){var u=a?ks(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.byteLength)}function Us(r){var a=new r.constructor(r.source,Aa.exec(r));return a.lastIndex=r.lastIndex,a}function is(r){return Qo?Ee(Qo.call(r)):{}}function xa(r,a){var u=a?ks(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.length)}function ns(r,a){if(r!==a){var u=r!==d,_=r===null,k=r===r,st=Cr(r),yt=a!==d,St=a===null,Bt=a===a,re=Cr(a);if(!St&&!re&&!st&&r>a||st&&yt&&Bt&&!St&&!re||_&&yt&&Bt||!u&&Bt||!k)return 1;if(!_&&!st&&!re&&r<a||re&&u&&k&&!_&&!st||St&&u&&k||!yt&&k||!Bt)return-1}return 0}function Co(r,a,u){for(var _=-1,k=r.criteria,st=a.criteria,yt=k.length,St=u.length;++_<yt;){var Bt=ns(k[_],st[_]);if(Bt){if(_>=St)return Bt;var re=u[_];return Bt*(re=="desc"?-1:1)}}return r.index-a.index}function wl(r,a,u,_){for(var k=-1,st=r.length,yt=u.length,St=-1,Bt=a.length,re=cn(st-yt,0),ae=Yt(Bt+re),fe=!_;++St<Bt;)ae[St]=a[St];for(;++k<yt;)(fe||k<st)&&(ae[u[k]]=r[k]);for(;re--;)ae[St++]=r[k++];return ae}function Tl(r,a,u,_){for(var k=-1,st=r.length,yt=-1,St=u.length,Bt=-1,re=a.length,ae=cn(st-St,0),fe=Yt(ae+re),ze=!_;++k<ae;)fe[k]=r[k];for(var Je=k;++Bt<re;)fe[Je+Bt]=a[Bt];for(;++yt<St;)(ze||k<st)&&(fe[Je+u[yt]]=r[k++]);return fe}function Wn(r,a){var u=-1,_=r.length;for(a||(a=Yt(_));++u<_;)a[u]=r[u];return a}function En(r,a,u,_){var k=!u;u||(u={});for(var st=-1,yt=a.length;++st<yt;){var St=a[st],Bt=_?_(u[St],r[St],St,u,r):d;Bt===d&&(Bt=r[St]),k?ao(u,St,Bt):Bs(u,St,Bt)}return u}function Yr(r,a){return En(r,xh(r),a)}function Zl(r,a){return En(r,Jh(r),a)}function Fs(r,a){return function(u,_){var k=vi(u)?Ra:jl,st=a?a():{};return k(u,r,si(_,2),st)}}function ho(r){return se(function(a,u){var _=-1,k=u.length,st=k>1?u[k-1]:d,yt=k>2?u[2]:d;for(st=r.length>3&&typeof st=="function"?(k--,st):d,yt&&lr(u[0],u[1],yt)&&(st=k<3?d:st,k=1),a=Ee(a);++_<k;){var St=u[_];St&&r(a,St,_,st)}return a})}function ut(r,a){return function(u,_){if(u==null)return u;if(!_r(u))return r(u,_);for(var k=u.length,st=a?k:-1,yt=Ee(u);(a?st--:++st<k)&&_(yt[st],st,yt)!==!1;);return u}}function wt(r){return function(a,u,_){for(var k=-1,st=Ee(a),yt=_(a),St=yt.length;St--;){var Bt=yt[r?St:++k];if(u(st[Bt],Bt,st)===!1)break}return a}}function dt(r,a,u){var _=a&b,k=Ve(r);function st(){var yt=this&&this!==un&&this instanceof st?k:r;return yt.apply(_?u:this,arguments)}return st}function Me(r){return function(a){a=qi(a);var u=pr(a)?qn(a):d,_=u?u[0]:a.charAt(0),k=u?dn(u,1).join(""):a.slice(1);return _[r]()+k}}function De(r){return function(a){return Ia(ku(Nu(a).replace(ds,"")),r,"")}}function Ve(r){return function(){var a=arguments;switch(a.length){case 0:return new r;case 1:return new r(a[0]);case 2:return new r(a[0],a[1]);case 3:return new r(a[0],a[1],a[2]);case 4:return new r(a[0],a[1],a[2],a[3]);case 5:return new r(a[0],a[1],a[2],a[3],a[4]);case 6:return new r(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new r(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=Eo(r.prototype),_=r.apply(u,a);return mn(_)?_:u}}function Se(r,a,u){var _=Ve(r);function k(){for(var st=arguments.length,yt=Yt(st),St=st,Bt=Ja(k);St--;)yt[St]=arguments[St];var re=st<3&&yt[0]!==Bt&&yt[st-1]!==Bt?[]:dr(yt,Bt);if(st-=re.length,st<u)return Sl(r,a,Zi,k.placeholder,d,yt,re,d,d,u-st);var ae=this&&this!==un&&this instanceof k?_:r;return nr(ae,this,yt)}return k}function $e(r){return function(a,u,_){var k=Ee(a);if(!_r(a)){var st=si(u,3);a=Un(a),u=function(St){return st(k[St],St,k)}}var yt=r(a,u,_);return yt>-1?k[st?a[yt]:yt]:d}}function Li(r){return rs(function(a){var u=a.length,_=u,k=Bn.prototype.thru;for(r&&a.reverse();_--;){var st=a[_];if(typeof st!="function")throw new Yn(P);if(k&&!yt&&$l(st)=="wrapper")var yt=new Bn([],!0)}for(_=yt?_:u;++_<u;){st=a[_];var St=$l(st),Bt=St=="wrapper"?yh(st):d;Bt&&Th(Bt[0])&&Bt[1]==(j|S|U|lt)&&!Bt[4].length&&Bt[9]==1?yt=yt[$l(Bt[0])].apply(yt,Bt[3]):yt=st.length==1&&Th(st)?yt[St]():yt.thru(st)}return function(){var re=arguments,ae=re[0];if(yt&&re.length==1&&vi(ae))return yt.plant(ae).value();for(var fe=0,ze=u?a[fe].apply(this,re):ae;++fe<u;)ze=a[fe].call(this,ze);return ze}})}function Zi(r,a,u,_,k,st,yt,St,Bt,re){var ae=a&j,fe=a&b,ze=a&p,Je=a&(S|x),hi=a&ft,Mi=ze?d:Ve(r);function ui(){for(var Ci=arguments.length,Ni=Yt(Ci),Lr=Ci;Lr--;)Ni[Lr]=arguments[Lr];if(Je)var hr=Ja(ui),Rr=Fr(Ni,hr);if(_&&(Ni=wl(Ni,_,k,Je)),st&&(Ni=Tl(Ni,st,yt,Je)),Ci-=Rr,Je&&Ci<re){var An=dr(Ni,hr);return Sl(r,a,Zi,ui.placeholder,u,Ni,An,St,Bt,re-Ci)}var co=fe?u:this,ls=ze?co[r]:r;return Ci=Ni.length,St?Ni=kc(Ni,St):hi&&Ci>1&&Ni.reverse(),ae&&Bt<Ci&&(Ni.length=Bt),this&&this!==un&&this instanceof ui&&(ls=Mi||Ve(ls)),ls.apply(co,Ni)}return ui}function me(r,a){return function(u,_){return t(u,r,a(_),{})}}function ar(r,a){return function(u,_){var k;if(u===d&&_===d)return a;if(u!==d&&(k=u),_!==d){if(k===d)return _;typeof u=="string"||typeof _=="string"?(u=Ye(u),_=Ye(_)):(u=Ut(u),_=Ut(_)),k=r(u,_)}return k}}function Cn(r){return rs(function(a){return a=Xi(a,On(si())),se(function(u){var _=this;return r(a,function(k){return nr(k,_,u)})})})}function rn(r,a){a=a===d?" ":Ye(a);var u=a.length;if(u<2)return u?be(a,r):a;var _=be(a,ro(r/br(a)));return pr(a)?dn(qn(_),0,r).join(""):_.slice(0,r)}function tr(r,a,u,_){var k=a&b,st=Ve(r);function yt(){for(var St=-1,Bt=arguments.length,re=-1,ae=_.length,fe=Yt(ae+Bt),ze=this&&this!==un&&this instanceof yt?st:r;++re<ae;)fe[re]=_[re];for(;Bt--;)fe[re++]=arguments[++St];return nr(ze,k?u:this,fe)}return yt}function Ml(r){return function(a,u,_){return _&&typeof _!="number"&&lr(a,u,_)&&(u=_=d),a=as(a),u===d?(u=a,a=0):u=as(u),_=_===d?a<u?1:-1:as(_),Ie(a,u,_,r)}}function Zr(r){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=$r(a),u=$r(u)),r(a,u)}}function Sl(r,a,u,_,k,st,yt,St,Bt,re){var ae=a&S,fe=ae?yt:d,ze=ae?d:yt,Je=ae?st:d,hi=ae?d:st;a|=ae?U:z,a&=~(ae?z:U),a&g||(a&=~(b|p));var Mi=[r,a,k,Je,fe,hi,ze,St,Bt,re],ui=u.apply(d,Mi);return Th(r)&&nu(ui,Mi),ui.placeholder=_,ru(ui,r,a)}function Za(r){var a=ln[r];return function(u,_){if(u=$r(u),_=_==null?0:Dn(wi(_),292),_&&Ua(u)){var k=(qi(u)+"e").split("e"),st=a(k[0]+"e"+(+k[1]+_));return k=(qi(st)+"e").split("e"),+(k[0]+"e"+(+k[1]-_))}return a(u)}}var Gs=Ko&&1/qo(new Ko([,-0]))[1]==Rt?function(r){return new Ko(r)}:Nh;function Jl(r){return function(a){var u=er(a);return u==R?Fn(a):u==Kt?In(a):io(a,r(a))}}function jn(r,a,u,_,k,st,yt,St){var Bt=a&p;if(!Bt&&typeof r!="function")throw new Yn(P);var re=_?_.length:0;if(re||(a&=~(U|z),_=k=d),yt=yt===d?yt:cn(wi(yt),0),St=St===d?St:wi(St),re-=k?k.length:0,a&z){var ae=_,fe=k;_=k=d}var ze=Bt?d:yh(r),Je=[r,a,u,_,k,ae,fe,st,yt,St];if(ze&&zc(Je,ze),r=Je[0],a=Je[1],u=Je[2],_=Je[3],k=Je[4],St=Je[9]=Je[9]===d?Bt?0:r.length:cn(Je[9]-re,0),!St&&a&(S|x)&&(a&=~(S|x)),!a||a==b)var hi=dt(r,a,u);else a==S||a==x?hi=Se(r,a,St):(a==U||a==(b|U))&&!k.length?hi=tr(r,a,u,_):hi=Zi.apply(d,Je);var Mi=ze?xn:nu;return ru(Mi(hi,Je),r,a)}function qh(r,a,u,_){return r===d||uo(r,Gr[u])&&!Ti.call(_,u)?a:r}function Yh(r,a,u,_,k,st){return mn(r)&&mn(a)&&(st.set(a,r),xt(r,a,d,Yh,st),st.delete(a)),r}function wc(r){return Al(r)?d:r}function Zh(r,a,u,_,k,st){var yt=u&q,St=r.length,Bt=a.length;if(St!=Bt&&!(yt&&Bt>St))return!1;var re=st.get(r),ae=st.get(a);if(re&&ae)return re==a&&ae==r;var fe=-1,ze=!0,Je=u&E?new ts:d;for(st.set(r,a),st.set(a,r);++fe<St;){var hi=r[fe],Mi=a[fe];if(_)var ui=yt?_(Mi,hi,fe,a,r,st):_(hi,Mi,fe,r,a,st);if(ui!==d){if(ui)continue;ze=!1;break}if(Je){if(!Qr(a,function(Ci,Ni){if(!Ur(Je,Ni)&&(hi===Ci||k(hi,Ci,u,_,st)))return Je.push(Ni)})){ze=!1;break}}else if(!(hi===Mi||k(hi,Mi,u,_,st))){ze=!1;break}}return st.delete(r),st.delete(a),ze}function Tc(r,a,u,_,k,st,yt){switch(u){case Xt:if(r.byteLength!=a.byteLength||r.byteOffset!=a.byteOffset)return!1;r=r.buffer,a=a.buffer;case Gt:return!(r.byteLength!=a.byteLength||!st(new $i(r),new $i(a)));case Oe:case Ge:case Jt:return uo(+r,+a);case Ri:return r.name==a.name&&r.message==a.message;case ie:case w:return r==a+"";case R:var St=Fn;case Kt:var Bt=_&q;if(St||(St=qo),r.size!=a.size&&!Bt)return!1;var re=yt.get(r);if(re)return re==a;_|=E,yt.set(r,a);var ae=Zh(St(r),St(a),_,k,st,yt);return yt.delete(r),ae;case X:if(Qo)return Qo.call(r)==Qo.call(a)}return!1}function Mc(r,a,u,_,k,st){var yt=u&q,St=gh(r),Bt=St.length,re=gh(a),ae=re.length;if(Bt!=ae&&!yt)return!1;for(var fe=Bt;fe--;){var ze=St[fe];if(!(yt?ze in a:Ti.call(a,ze)))return!1}var Je=st.get(r),hi=st.get(a);if(Je&&hi)return Je==a&&hi==r;var Mi=!0;st.set(r,a),st.set(a,r);for(var ui=yt;++fe<Bt;){ze=St[fe];var Ci=r[ze],Ni=a[ze];if(_)var Lr=yt?_(Ni,Ci,ze,a,r,st):_(Ci,Ni,ze,r,a,st);if(!(Lr===d?Ci===Ni||k(Ci,Ni,u,_,st):Lr)){Mi=!1;break}ui||(ui=ze=="constructor")}if(Mi&&!ui){var hr=r.constructor,Rr=a.constructor;hr!=Rr&&"constructor"in r&&"constructor"in a&&!(typeof hr=="function"&&hr instanceof hr&&typeof Rr=="function"&&Rr instanceof Rr)&&(Mi=!1)}return st.delete(r),st.delete(a),Mi}function rs(r){return Sh(eu(r,d,uu),r+"")}function gh(r){return Yl(r,Un,xh)}function vh(r){return Yl(r,xr,Jh)}var yh=ha?function(r){return ha.get(r)}:Nh;function $l(r){for(var a=r.name+"",u=So[a],_=Ti.call(So,a)?u.length:0;_--;){var k=u[_],st=k.func;if(st==null||st==r)return k.name}return a}function Ja(r){var a=Ti.call($,"placeholder")?$:r;return a.placeholder}function si(){var r=$.iteratee||zh;return r=r===zh?C:r,arguments.length?r(arguments[0],arguments[1]):r}function Kl(r,a){var u=r.__data__;return Rc(a)?u[typeof a=="string"?"string":"hash"]:u.map}function _h(r){for(var a=Un(r),u=a.length;u--;){var _=a[u],k=r[_];a[u]=[_,k,Qh(k)]}return a}function wa(r,a){var u=Wo(r,a);return f(u)?u:d}function Sc(r){var a=Ti.call(r,Wr),u=r[Wr];try{r[Wr]=d;var _=!0}catch{}var k=$n.call(r);return _&&(a?r[Wr]=u:delete r[Wr]),k}var xh=oa?function(r){return r==null?[]:(r=Ee(r),cr(oa(r),function(a){return ra.call(r,a)}))}:kh,Jh=oa?function(r){for(var a=[];r;)Nr(a,xh(r)),r=Vr(r);return a}:kh,er=kn;(aa&&er(new aa(new ArrayBuffer(1)))!=Xt||$o&&er(new $o)!=R||la&&er(la.resolve())!=pt||Ko&&er(new Ko)!=Kt||yn&&er(new yn)!=K)&&(er=function(r){var a=kn(r),u=a==ct?r.constructor:d,_=u?Ta(u):"";if(_)switch(_){case Ga:return Xt;case ul:return R;case cl:return pt;case fl:return Kt;case Ul:return K}return a});function Ec(r,a,u){for(var _=-1,k=u.length;++_<k;){var st=u[_],yt=st.size;switch(st.type){case"drop":r+=yt;break;case"dropRight":a-=yt;break;case"take":a=Dn(a,r+yt);break;case"takeRight":r=cn(r,a-yt);break}}return{start:r,end:a}}function bc(r){var a=r.match(Ws);return a?a[1].split(Dr):[]}function $h(r,a,u){a=Ze(a,r);for(var _=-1,k=a.length,st=!1;++_<k;){var yt=Lo(a[_]);if(!(st=r!=null&&u(r,yt)))break;r=r[yt]}return st||++_!=k?st:(k=r==null?0:r.length,!!k&&oh(k)&&os(yt,k)&&(vi(r)||Ma(r)))}function Ac(r){var a=r.length,u=new r.constructor(a);return a&&typeof r[0]=="string"&&Ti.call(r,"index")&&(u.index=r.index,u.input=r.input),u}function Kh(r){return typeof r.constructor=="function"&&!El(r)?Eo(Vr(r)):{}}function Pc(r,a,u){var _=r.constructor;switch(a){case Gt:return ks(r);case Oe:case Ge:return new _(+r);case Xt:return xl(r,u);case jt:case Ne:case Re:case de:case we:case yi:case Si:case ni:case Ei:return xa(r,u);case R:return new _;case Jt:case w:return new _(r);case ie:return Us(r);case Kt:return new _;case X:return is(r)}}function Cc(r,a){var u=a.length;if(!u)return r;var _=u-1;return a[_]=(u>1?"& ":"")+a[_],a=a.join(u>2?", ":" "),r.replace(cs,`{
|
|
2581
2617
|
/* [wrapped with `+a+`] */
|
|
2582
|
-
`)}function wc(r){return ii(r)||wa(r)||!!(As&&r&&r[As])}function is(r,a){var u=typeof r;return a=a??ze,!!a&&(u=="number"||u!="symbol"&&Aa.test(r))&&r>-1&&r%1==0&&r<a}function rr(r,a,u){if(!rn(u))return!1;var m=typeof a;return(m=="number"?mr(u)&&is(a,u.length):m=="string"&&a in u)?ao(u[a],r):!1}function yh(r,a){if(ii(r))return!1;var u=typeof r;return u=="number"||u=="symbol"||u=="boolean"||r==null||Er(r)?!0:Qn.test(r)||!Lo.test(r)||a!=null&&r in he(a)}function Mc(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}function _h(r){var a=Jl(r),u=O[a];if(typeof u!="function"||!(a in ri.prototype))return!1;if(r===u)return!0;var m=mh(u);return!!m&&r===m[0]}function Tc(r){return!!cr&&cr in r}var Sc=_o?ns:Nh;function Sl(r){var a=r&&r.constructor,u=typeof a=="function"&&a.prototype||Ur;return r===u}function qh(r){return r===r&&!rn(r)}function Yh(r,a){return function(u){return u==null?!1:u[r]===a&&(a!==_||r in he(u))}}function Ec(r){var a=ih(r,function(m){return u.size===Tt&&u.clear(),m}),u=a.cache;return a}function Ac(r,a){var u=r[1],m=a[1],L=u|m,G=L<(Y|y|X),J=m==X&&u==B||m==X&&u==it&&r[7].length<=a[8]||m==(X|it)&&a[7].length<=a[8]&&u==B;if(!(G||J))return r;m&Y&&(r[2]=a[2],L|=u&Y?0:x);var ot=a[3];if(ot){var mt=r[3];r[3]=mt?xl(mt,ot,a[4]):ot,r[4]=mt?ur(r[3],Rt):a[4]}return ot=a[5],ot&&(mt=r[5],r[5]=mt?wl(mt,ot,a[6]):ot,r[6]=mt?ur(r[5],Rt):a[6]),ot=a[7],ot&&(r[7]=ot),m&X&&(r[8]=r[8]==null?a[8]:An(r[8],a[8])),r[9]==null&&(r[9]=a[9]),r[0]=a[0],r[1]=L,r}function Pc(r){var a=[];if(r!=null)for(var u in he(r))a.push(u);return a}function Lc(r){return Xn.call(r)}function Zh(r,a,u){return a=Ki(a===_?r.length-1:a,0),function(){for(var m=arguments,L=-1,G=Ki(m.length-a,0),J=At(G);++L<G;)J[L]=m[a+L];L=-1;for(var ot=At(a+1);++L<a;)ot[L]=m[L];return ot[a]=u(J),Kn(r,this,ot)}}function Jh(r,a){return a.length<2?r:Eo(r,Ei(a,0,-1))}function Cc(r,a){for(var u=r.length,m=An(a.length,u),L=Un(r);m--;){var G=a[m];r[m]=is(G,u)?L[G]:_}return r}function xh(r,a){if(!(a==="constructor"&&typeof r[a]=="function")&&a!="__proto__")return r[a]}var $h=Kh(cn),El=ol||function(r,a){return Qi.setTimeout(r,a)},wh=Kh(en);function Qh(r,a,u){var m=a+"";return wh(r,xc(m,Rc(vc(m),u)))}function Kh(r){var a=0,u=0;return function(){var m=ra(),L=re-(m-u);if(u=m,L>0){if(++a>=Yt)return arguments[0]}else a=0;return r.apply(_,arguments)}}function Ql(r,a){var u=-1,m=r.length,L=m-1;for(a=a===_?m:a;++u<a;){var G=$t(u,L),J=r[G];r[G]=r[u],r[u]=J}return r.length=a,r}var tu=Ec(function(r){var a=[];return r.charCodeAt(0)===46&&a.push(""),r.replace(ls,function(u,m,L,G){a.push(L?G.replace(cs,"$1"):m||u)}),a});function Po(r){if(typeof r=="string"||Er(r))return r;var a=r+"";return a=="0"&&1/r==-ie?"-0":a}function xa(r){if(r!=null){try{return Wn.call(r)}catch{}try{return r+""}catch{}}return""}function Rc(r,a){return zi(Ji,function(u){var m="_."+u[0];a&u[1]&&!Js(r,m)&&r.push(m)}),r.sort()}function eu(r){if(r instanceof ri)return r.clone();var a=new Cn(r.__wrapped__,r.__chain__);return a.__actions__=Un(r.__actions__),a.__index__=r.__index__,a.__values__=r.__values__,a}function bc(r,a,u){(u?rr(r,a,u):a===_)?a=1:a=Ki(si(a),0);var m=r==null?0:r.length;if(!m||a<1)return[];for(var L=0,G=0,J=At(eo(m/a));L<m;)J[G++]=Ei(r,L,L+=a);return J}function Oc(r){for(var a=-1,u=r==null?0:r.length,m=0,L=[];++a<u;){var G=r[a];G&&(L[m++]=G)}return L}function Ic(){var r=arguments.length;if(!r)return[];for(var a=At(r-1),u=arguments[0],m=r;m--;)a[m-1]=arguments[m];return Dr(ii(u)?Un(u):[u],un(a,1))}var Dc=Wt(function(r,a){return vn(r)?ma(r,un(a,1,vn,!0)):[]}),zc=Wt(function(r,a){var u=qr(a);return vn(u)&&(u=_),vn(r)?ma(r,un(a,1,vn,!0),Ve(u,2)):[]}),Nc=Wt(function(r,a){var u=qr(a);return vn(u)&&(u=_),vn(r)?ma(r,un(a,1,vn,!0),_,u):[]});function Bc(r,a,u){var m=r==null?0:r.length;return m?(a=u||a===_?1:si(a),Ei(r,a<0?0:a,m)):[]}function Uc(r,a,u){var m=r==null?0:r.length;return m?(a=u||a===_?1:si(a),a=m-a,Ei(r,0,a<0?0:a)):[]}function Fc(r,a){return r&&r.length?Ce(r,Ve(a,3),!0,!0):[]}function Gc(r,a){return r&&r.length?Ce(r,Ve(a,3),!0):[]}function Hc(r,a,u,m){var L=r==null?0:r.length;return L?(u&&typeof u!="number"&&rr(r,a,u)&&(u=0,m=L),Bn(r,a,u,m)):[]}function iu(r,a,u){var m=r==null?0:r.length;if(!m)return-1;var L=u==null?0:si(u);return L<0&&(L=Ki(m+L,0)),po(r,Ve(a,3),L)}function nu(r,a,u){var m=r==null?0:r.length;if(!m)return-1;var L=m-1;return u!==_&&(L=si(u),L=u<0?Ki(m+L,0):An(L,m-1)),po(r,Ve(a,3),L,!0)}function ru(r){var a=r==null?0:r.length;return a?un(r,1):[]}function kc(r){var a=r==null?0:r.length;return a?un(r,ie):[]}function Vc(r,a){var u=r==null?0:r.length;return u?(a=a===_?1:si(a),un(r,a)):[]}function Wc(r){for(var a=-1,u=r==null?0:r.length,m={};++a<u;){var L=r[a];m[L[0]]=L[1]}return m}function ou(r){return r&&r.length?r[0]:_}function jc(r,a,u){var m=r==null?0:r.length;if(!m)return-1;var L=u==null?0:si(u);return L<0&&(L=Ki(m+L,0)),lr(r,a,L)}function Xc(r){var a=r==null?0:r.length;return a?Ei(r,0,-1):[]}var qc=Wt(function(r){var a=bi(r,Bt);return a.length&&a[0]===r[0]?va(a):[]}),Yc=Wt(function(r){var a=qr(r),u=bi(r,Bt);return a===qr(u)?a=_:u.pop(),u.length&&u[0]===r[0]?va(u,Ve(a,2)):[]}),Zc=Wt(function(r){var a=qr(r),u=bi(r,Bt);return a=typeof a=="function"?a:_,a&&u.pop(),u.length&&u[0]===r[0]?va(u,_,a):[]});function Jc(r,a){return r==null?"":al.call(r,a)}function qr(r){var a=r==null?0:r.length;return a?r[a-1]:_}function $c(r,a,u){var m=r==null?0:r.length;if(!m)return-1;var L=m;return u!==_&&(L=si(u),L=L<0?Ki(m+L,0):An(L,m-1)),a===a?Ia(r,a,L):po(r,No,L,!0)}function Qc(r,a){return r&&r.length?C(r,si(a)):_}var Kc=Wt(su);function su(r,a){return r&&r.length&&a&&a.length?St(r,a):r}function tp(r,a,u){return r&&r.length&&a&&a.length?St(r,a,Ve(u,2)):r}function ep(r,a,u){return r&&r.length&&a&&a.length?St(r,a,_,u):r}var ip=es(function(r,a){var u=r==null?0:r.length,m=vl(r,a);return oe(r,bi(a,function(L){return is(L,u)?+L:L}).sort(ts)),m});function np(r,a){var u=[];if(!(r&&r.length))return u;var m=-1,L=[],G=r.length;for(a=Ve(a,3);++m<G;){var J=r[m];a(J,m,r)&&(u.push(J),L.push(m))}return oe(r,L),u}function Mh(r){return r==null?r:Ps.call(r)}function rp(r,a,u){var m=r==null?0:r.length;return m?(u&&typeof u!="number"&&rr(r,a,u)?(a=0,u=m):(a=a==null?0:si(a),u=u===_?m:si(u)),Ei(r,a,u)):[]}function op(r,a){return pn(r,a)}function sp(r,a,u){return ce(r,a,Ve(u,2))}function ap(r,a){var u=r==null?0:r.length;if(u){var m=pn(r,a);if(m<u&&ao(r[m],a))return m}return-1}function lp(r,a){return pn(r,a,!0)}function hp(r,a,u){return ce(r,a,Ve(u,2),!0)}function up(r,a){var u=r==null?0:r.length;if(u){var m=pn(r,a,!0)-1;if(ao(r[m],a))return m}return-1}function cp(r){return r&&r.length?Ue(r):[]}function pp(r,a){return r&&r.length?Ue(r,Ve(a,2)):[]}function fp(r){var a=r==null?0:r.length;return a?Ei(r,1,a):[]}function dp(r,a,u){return r&&r.length?(a=u||a===_?1:si(a),Ei(r,0,a<0?0:a)):[]}function mp(r,a,u){var m=r==null?0:r.length;return m?(a=u||a===_?1:si(a),a=m-a,Ei(r,a<0?0:a,m)):[]}function gp(r,a){return r&&r.length?Ce(r,Ve(a,3),!1,!0):[]}function vp(r,a){return r&&r.length?Ce(r,Ve(a,3)):[]}var yp=Wt(function(r){return Fe(un(r,1,vn,!0))}),_p=Wt(function(r){var a=qr(r);return vn(a)&&(a=_),Fe(un(r,1,vn,!0),Ve(a,2))}),xp=Wt(function(r){var a=qr(r);return a=typeof a=="function"?a:_,Fe(un(r,1,vn,!0),_,a)});function wp(r){return r&&r.length?Fe(r):[]}function Mp(r,a){return r&&r.length?Fe(r,Ve(a,2)):[]}function Tp(r,a){return a=typeof a=="function"?a:_,r&&r.length?Fe(r,_,a):[]}function Th(r){if(!(r&&r.length))return[];var a=0;return r=ar(r,function(u){if(vn(u))return a=Ki(u.length,a),!0}),Qr(a,function(u){return bi(r,fo(u))})}function au(r,a){if(!(r&&r.length))return[];var u=Th(r);return a==null?u:bi(u,function(m){return Kn(a,_,m)})}var Sp=Wt(function(r,a){return vn(r)?ma(r,a):[]}),Ep=Wt(function(r){return fi(ar(r,vn))}),Ap=Wt(function(r){var a=qr(r);return vn(a)&&(a=_),fi(ar(r,vn),Ve(a,2))}),Pp=Wt(function(r){var a=qr(r);return a=typeof a=="function"?a:_,fi(ar(r,vn),_,a)}),Lp=Wt(Th);function Cp(r,a){return ui(r||[],a||[],Ds)}function Rp(r,a){return ui(r||[],a||[],Ze)}var bp=Wt(function(r){var a=r.length,u=a>1?r[a-1]:_;return u=typeof u=="function"?(r.pop(),u):_,au(r,u)});function lu(r){var a=O(r);return a.__chain__=!0,a}function Op(r,a){return a(r),r}function Kl(r,a){return a(r)}var Ip=es(function(r){var a=r.length,u=a?r[0]:0,m=this.__wrapped__,L=function(G){return vl(G,r)};return a>1||this.__actions__.length||!(m instanceof ri)||!is(u)?this.thru(L):(m=m.slice(u,+u+(a?1:0)),m.__actions__.push({func:Kl,args:[L],thisArg:_}),new Cn(m,this.__chain__).thru(function(G){return a&&!G.length&&G.push(_),G}))});function Dp(){return lu(this)}function zp(){return new Cn(this.value(),this.__chain__)}function Np(){this.__values__===_&&(this.__values__=Mu(this.value()));var r=this.__index__>=this.__values__.length,a=r?_:this.__values__[this.__index__++];return{done:r,value:a}}function Bp(){return this}function Up(r){for(var a,u=this;u instanceof Cs;){var m=eu(u);m.__index__=0,m.__values__=_,a?L.__wrapped__=m:a=m;var L=m;u=u.__wrapped__}return L.__wrapped__=r,a}function Fp(){var r=this.__wrapped__;if(r instanceof ri){var a=r;return this.__actions__.length&&(a=new ri(this)),a=a.reverse(),a.__actions__.push({func:Kl,args:[Mh],thisArg:_}),new Cn(a,this.__chain__)}return this.thru(Mh)}function Gp(){return He(this.__wrapped__,this.__actions__)}var Hp=Us(function(r,a,u){ai.call(r,u)?++r[u]:ro(r,u,1)});function kp(r,a,u){var m=ii(r)?rl:Rn;return u&&rr(r,a,u)&&(a=_),m(r,Ve(a,3))}function Vp(r,a){var u=ii(r)?ar:fr;return u(r,Ve(a,3))}var Wp=Ne(iu),jp=Ne(nu);function Xp(r,a){return un(th(r,a),1)}function qp(r,a){return un(th(r,a),ie)}function Yp(r,a,u){return u=u===_?1:si(u),un(th(r,a),u)}function hu(r,a){var u=ii(r)?zi:tn;return u(r,Ve(a,3))}function uu(r,a){var u=ii(r)?Do:Xl;return u(r,Ve(a,3))}var Zp=Us(function(r,a,u){ai.call(r,u)?r[u].push(a):ro(r,u,[a])});function Jp(r,a,u,m){r=mr(r)?r:Ja(r),u=u&&!m?si(u):0;var L=r.length;return u<0&&(u=Ki(L+u,0)),oh(r)?u<=L&&r.indexOf(a,u)>-1:!!L&&lr(r,a,u)>-1}var $p=Wt(function(r,a,u){var m=-1,L=typeof a=="function",G=mr(r)?At(r.length):[];return tn(r,function(J){G[++m]=L?Kn(a,J,u):e(J,a,u)}),G}),Qp=Us(function(r,a,u){ro(r,u,a)});function th(r,a){var u=ii(r)?bi:Q;return u(r,Ve(a,3))}function Kp(r,a,u,m){return r==null?[]:(ii(a)||(a=a==null?[]:[a]),u=m?_:u,ii(u)||(u=u==null?[]:[u]),D(r,a,u))}var tf=Us(function(r,a,u){r[u?0:1].push(a)},function(){return[[],[]]});function ef(r,a,u){var m=ii(r)?ba:mo,L=arguments.length<3;return m(r,Ve(a,4),u,L,tn)}function nf(r,a,u){var m=ii(r)?Il:mo,L=arguments.length<3;return m(r,Ve(a,4),u,L,Xl)}function rf(r,a){var u=ii(r)?ar:fr;return u(r,nh(Ve(a,3)))}function of(r){var a=ii(r)?dl:Ee;return a(r)}function sf(r,a,u){(u?rr(r,a,u):a===_)?a=1:a=si(a);var m=ii(r)?ph:Be;return m(r,a)}function af(r){var a=ii(r)?Vl:Ri;return a(r)}function lf(r){if(r==null)return 0;if(mr(r))return oh(r)?Mr(r):r.length;var a=Jn(r);return a==Gi||a==Bi?r.size:P(r).length}function hf(r,a,u){var m=ii(r)?Jr:Vi;return u&&rr(r,a,u)&&(a=_),m(r,Ve(a,3))}var uf=Wt(function(r,a){if(r==null)return[];var u=a.length;return u>1&&rr(r,a[0],a[1])?a=[]:u>2&&rr(a[0],a[1],a[2])&&(a=[a[0]]),D(r,un(a,1),[])}),eh=Na||function(){return Qi.Date.now()};function cf(r,a){if(typeof a!="function")throw new Vn(Mt);return r=si(r),function(){if(--r<1)return a.apply(this,arguments)}}function cu(r,a,u){return a=u?_:a,a=r&&a==null?r.length:a,Fn(r,X,_,_,_,_,a)}function pu(r,a){var u;if(typeof a!="function")throw new Vn(Mt);return r=si(r),function(){return--r>0&&(u=a.apply(this,arguments)),r<=1&&(a=_),u}}var Sh=Wt(function(r,a,u){var m=Y;if(u.length){var L=ur(u,Ya(Sh));m|=Z}return Fn(r,m,a,u,L)}),fu=Wt(function(r,a,u){var m=Y|y;if(u.length){var L=ur(u,Ya(fu));m|=Z}return Fn(a,m,r,u,L)});function du(r,a,u){a=u?_:a;var m=Fn(r,B,_,_,_,_,_,a);return m.placeholder=du.placeholder,m}function mu(r,a,u){a=u?_:a;var m=Fn(r,E,_,_,_,_,_,a);return m.placeholder=mu.placeholder,m}function gu(r,a,u){var m,L,G,J,ot,mt,Ht=0,jt=!1,Jt=!1,ve=!0;if(typeof r!="function")throw new Vn(Mt);a=Yr(a)||0,rn(u)&&(jt=!!u.leading,Jt="maxWait"in u,G=Jt?Ki(Yr(u.maxWait)||0,a):G,ve="trailing"in u?!!u.trailing:ve);function De(yn){var lo=m,os=L;return m=L=_,Ht=yn,J=r.apply(os,lo),J}function Xe(yn){return Ht=yn,ot=El(di,a),jt?De(yn):J}function li(yn){var lo=yn-mt,os=yn-Ht,zu=a-lo;return Jt?An(zu,G-os):zu}function qe(yn){var lo=yn-mt,os=yn-Ht;return mt===_||lo>=a||lo<0||Jt&&os>=G}function di(){var yn=eh();if(qe(yn))return wi(yn);ot=El(di,li(yn))}function wi(yn){return ot=_,ve&&m?De(yn):(m=L=_,J)}function Ar(){ot!==_&&fn(ot),Ht=0,m=mt=L=ot=_}function or(){return ot===_?J:wi(eh())}function Pr(){var yn=eh(),lo=qe(yn);if(m=arguments,L=this,mt=yn,lo){if(ot===_)return Xe(mt);if(Jt)return fn(ot),ot=El(di,a),De(mt)}return ot===_&&(ot=El(di,a)),J}return Pr.cancel=Ar,Pr.flush=or,Pr}var pf=Wt(function(r,a){return Vr(r,1,a)}),ff=Wt(function(r,a,u){return Vr(r,Yr(a)||0,u)});function df(r){return Fn(r,_t)}function ih(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new Vn(Mt);var u=function(){var m=arguments,L=a?a.apply(this,m):m[0],G=u.cache;if(G.has(L))return G.get(L);var J=r.apply(this,m);return u.cache=G.set(L,J)||G,J};return u.cache=new(ih.Cache||er),u}ih.Cache=er;function nh(r){if(typeof r!="function")throw new Vn(Mt);return function(){var a=arguments;switch(a.length){case 0:return!r.call(this);case 1:return!r.call(this,a[0]);case 2:return!r.call(this,a[0],a[1]);case 3:return!r.call(this,a[0],a[1],a[2])}return!r.apply(this,a)}}function mf(r){return pu(2,r)}var gf=je(function(r,a){a=a.length==1&&ii(a[0])?bi(a[0],Sn(Ve())):bi(un(a,1),Sn(Ve()));var u=a.length;return Wt(function(m){for(var L=-1,G=An(m.length,u);++L<G;)m[L]=a[L].call(this,m[L]);return Kn(r,this,m)})}),Eh=Wt(function(r,a){var u=ur(a,Ya(Eh));return Fn(r,Z,_,a,u)}),vu=Wt(function(r,a){var u=ur(a,Ya(vu));return Fn(r,z,_,a,u)}),vf=es(function(r,a){return Fn(r,it,_,_,_,a)});function yf(r,a){if(typeof r!="function")throw new Vn(Mt);return a=a===_?a:si(a),Wt(r,a)}function _f(r,a){if(typeof r!="function")throw new Vn(Mt);return a=a==null?0:Ki(si(a),0),Wt(function(u){var m=u[a],L=nn(u,0,a);return m&&Dr(L,m),Kn(r,this,L)})}function xf(r,a,u){var m=!0,L=!0;if(typeof r!="function")throw new Vn(Mt);return rn(u)&&(m="leading"in u?!!u.leading:m,L="trailing"in u?!!u.trailing:L),gu(r,a,{leading:m,maxWait:a,trailing:L})}function wf(r){return cu(r,1)}function Mf(r,a){return Eh(Ge(a),r)}function Tf(){if(!arguments.length)return[];var r=arguments[0];return ii(r)?r:[r]}function Sf(r){return ir(r,Ut)}function Ef(r,a){return a=typeof a=="function"?a:_,ir(r,Ut,a)}function Af(r){return ir(r,vt|Ut)}function Pf(r,a){return a=typeof a=="function"?a:_,ir(r,vt|Ut,a)}function Lf(r,a){return a==null||jl(r,a,On(a))}function ao(r,a){return r===a||r!==r&&a!==a}var Cf=Xr(Wa),Rf=Xr(function(r,a){return r>=a}),wa=i(function(){return arguments}())?i:function(r){return dn(r)&&ai.call(r,"callee")&&!ia.call(r,"callee")},ii=At.isArray,bf=nl?Sn(nl):n;function mr(r){return r!=null&&rh(r.length)&&!ns(r)}function vn(r){return dn(r)&&mr(r)}function Of(r){return r===!0||r===!1||dn(r)&&bn(r)==ni}var Gs=sl||Nh,If=_s?Sn(_s):o;function Df(r){return dn(r)&&r.nodeType===1&&!Al(r)}function zf(r){if(r==null)return!0;if(mr(r)&&(ii(r)||typeof r=="string"||typeof r.splice=="function"||Gs(r)||Za(r)||wa(r)))return!r.length;var a=Jn(r);if(a==Gi||a==Bi)return!r.size;if(Sl(r))return!P(r).length;for(var u in r)if(ai.call(r,u))return!1;return!0}function Nf(r,a){return s(r,a)}function Bf(r,a,u){u=typeof u=="function"?u:_;var m=u?u(r,a):_;return m===_?s(r,a,_,u):!!m}function Ah(r){if(!dn(r))return!1;var a=bn(r);return a==yr||a==Fi||typeof r.message=="string"&&typeof r.name=="string"&&!Al(r)}function Uf(r){return typeof r=="number"&&Ba(r)}function ns(r){if(!rn(r))return!1;var a=bn(r);return a==Lr||a==$n||a==In||a==ho}function yu(r){return typeof r=="number"&&r==si(r)}function rh(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ze}function rn(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}function dn(r){return r!=null&&typeof r=="object"}var _u=xs?Sn(xs):h;function Ff(r,a){return r===a||c(r,a,gh(a))}function Gf(r,a,u){return u=typeof u=="function"?u:_,c(r,a,gh(a),u)}function Hf(r){return xu(r)&&r!=+r}function kf(r){if(Sc(r))throw new We(S);return p(r)}function Vf(r){return r===null}function Wf(r){return r==null}function xu(r){return typeof r=="number"||dn(r)&&bn(r)==Gn}function Al(r){if(!dn(r)||bn(r)!=Je)return!1;var a=Gr(r);if(a===null)return!0;var u=ai.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&Wn.call(u)==Fr}var Ph=bl?Sn(bl):f;function jf(r){return yu(r)&&r>=-ze&&r<=ze}var wu=Ol?Sn(Ol):d;function oh(r){return typeof r=="string"||!ii(r)&&dn(r)&&bn(r)==A}function Er(r){return typeof r=="symbol"||dn(r)&&bn(r)==k}var Za=La?Sn(La):v;function Xf(r){return r===_}function qf(r){return dn(r)&&Jn(r)==q}function Yf(r){return dn(r)&&bn(r)==ht}var Zf=Xr(I),Jf=Xr(function(r,a){return r<=a});function Mu(r){if(!r)return[];if(mr(r))return oh(r)?kn(r):Un(r);if(xo&&r[xo])return Vo(r[xo]());var a=Jn(r),u=a==Gi?Dn:a==Bi?Wo:Ja;return u(r)}function rs(r){if(!r)return r===0?r:0;if(r=Yr(r),r===ie||r===-ie){var a=r<0?-1:1;return a*on}return r===r?r:0}function si(r){var a=rs(r),u=a%1;return a===a?u?a-u:a:0}function Tu(r){return r?So(si(r),0,Qe):0}function Yr(r){if(typeof r=="number")return r;if(Er(r))return Ft;if(rn(r)){var a=typeof r.valueOf=="function"?r.valueOf():r;r=rn(a)?a+"":a}if(typeof r!="string")return r===0?r:+r;r=Ms(r);var u=el.test(r);return u||Ro.test(r)?gs(r.slice(2),u?2:8):tl.test(r)?Ft:+r}function Su(r){return gn(r,gr(r))}function $f(r){return r?So(si(r),-ze,ze):r===0?r:0}function Oi(r){return r==null?"":be(r)}var Qf=so(function(r,a){if(Sl(a)||mr(a)){gn(a,On(a),r);return}for(var u in a)ai.call(a,u)&&Ds(r,u,a[u])}),Eu=so(function(r,a){gn(a,gr(a),r)}),sh=so(function(r,a,u,m){gn(a,gr(a),r,m)}),Kf=so(function(r,a,u,m){gn(a,On(a),r,m)}),td=es(vl);function ed(r,a){var u=Mo(r);return a==null?u:ml(u,a)}var id=Wt(function(r,a){r=he(r);var u=-1,m=a.length,L=m>2?a[2]:_;for(L&&rr(a[0],a[1],L)&&(m=1);++u<m;)for(var G=a[u],J=gr(G),ot=-1,mt=J.length;++ot<mt;){var Ht=J[ot],jt=r[Ht];(jt===_||ao(jt,Ur[Ht])&&!ai.call(r,Ht))&&(r[Ht]=G[Ht])}return r}),nd=Wt(function(r){return r.push(_,kh),Kn(Au,_,r)});function rd(r,a){return zo(r,Ve(a,3),dr)}function od(r,a){return zo(r,Ve(a,3),Va)}function sd(r,a){return r==null?r:ga(r,Ve(a,3),gr)}function ad(r,a){return r==null?r:ka(r,Ve(a,3),gr)}function ld(r,a){return r&&dr(r,Ve(a,3))}function hd(r,a){return r&&Va(r,Ve(a,3))}function ud(r){return r==null?[]:Qo(r,On(r))}function cd(r){return r==null?[]:Qo(r,gr(r))}function Lh(r,a,u){var m=r==null?_:Eo(r,a);return m===_?u:m}function pd(r,a){return r!=null&&jh(r,a,ja)}function Ch(r,a){return r!=null&&jh(r,a,yl)}var fd=Qt(function(r,a,u){a!=null&&typeof a.toString!="function"&&(a=Xn.call(a)),r[a]=u},bh(vr)),dd=Qt(function(r,a,u){a!=null&&typeof a.toString!="function"&&(a=Xn.call(a)),ai.call(r,a)?r[a].push(u):r[a]=[u]},Ve),md=Wt(e);function On(r){return mr(r)?kl(r):P(r)}function gr(r){return mr(r)?kl(r,!0):R(r)}function gd(r,a){var u={};return a=Ve(a,3),dr(r,function(m,L,G){ro(u,a(m,L,G),m)}),u}function vd(r,a){var u={};return a=Ve(a,3),dr(r,function(m,L,G){ro(u,L,a(m,L,G))}),u}var yd=so(function(r,a,u){K(r,a,u)}),Au=so(function(r,a,u,m){K(r,a,u,m)}),_d=es(function(r,a){var u={};if(r==null)return u;var m=!1;a=bi(a,function(G){return G=Ie(G,r),m||(m=G.length>1),G}),gn(r,dh(r),u),m&&(u=ir(u,vt|Nt|Ut,pc));for(var L=a.length;L--;)Ai(u,a[L]);return u});function xd(r,a){return Pu(r,nh(Ve(a)))}var wd=es(function(r,a){return r==null?{}:ct(r,a)});function Pu(r,a){if(r==null)return{};var u=bi(dh(r),function(m){return[m]});return a=Ve(a),Dt(r,u,function(m,L){return a(m,L[0])})}function Md(r,a,u){a=Ie(a,r);var m=-1,L=a.length;for(L||(L=1,r=_);++m<L;){var G=r==null?_:r[Po(a[m])];G===_&&(m=L,G=u),r=ns(G)?G.call(r):G}return r}function Td(r,a,u){return r==null?r:Ze(r,a,u)}function Sd(r,a,u,m){return m=typeof m=="function"?m:_,r==null?r:Ze(r,a,u,m)}var Lu=Zl(On),Cu=Zl(gr);function Ed(r,a,u){var m=ii(r),L=m||Gs(r)||Za(r);if(a=Ve(a,4),u==null){var G=r&&r.constructor;L?u=m?new G:[]:rn(r)?u=ns(G)?Mo(Gr(r)):{}:u={}}return(L?zi:dr)(r,function(J,ot,mt){return a(u,J,ot,mt)}),u}function Ad(r,a){return r==null?!0:Ai(r,a)}function Pd(r,a,u){return r==null?r:pe(r,a,Ge(u))}function Ld(r,a,u,m){return m=typeof m=="function"?m:_,r==null?r:pe(r,a,Ge(u),m)}function Ja(r){return r==null?[]:Bo(r,On(r))}function Cd(r){return r==null?[]:Bo(r,gr(r))}function Rd(r,a,u){return u===_&&(u=a,a=_),u!==_&&(u=Yr(u),u=u===u?u:0),a!==_&&(a=Yr(a),a=a===a?a:0),So(Yr(r),a,u)}function bd(r,a,u){return a=rs(a),u===_?(u=a,a=0):u=rs(u),r=Yr(r),Xa(r,a,u)}function Od(r,a,u){if(u&&typeof u!="boolean"&&rr(r,a,u)&&(a=u=_),u===_&&(typeof a=="boolean"?(u=a,a=_):typeof r=="boolean"&&(u=r,r=_)),r===_&&a===_?(r=0,a=1):(r=rs(r),a===_?(a=r,r=0):a=rs(a)),r>a){var m=r;r=a,a=m}if(u||r%1||a%1){var L=Ua();return An(r+L*(a-r+Zs("1e-"+((L+"").length-1))),a)}return $t(r,a)}var Id=ge(function(r,a,u){return a=a.toLowerCase(),r+(u?Ru(a):a)});function Ru(r){return Rh(Oi(r).toLowerCase())}function bu(r){return r=Oi(r),r&&r.replace(Pa,Fo).replace(il,"")}function Dd(r,a,u){r=Oi(r),a=be(a);var m=r.length;u=u===_?m:So(si(u),0,m);var L=u;return u-=a.length,u>=0&&r.slice(u,L)==a}function zd(r){return r=Oi(r),r&&Cr.test(r)?r.replace(Di,wr):r}function Nd(r){return r=Oi(r),r&&Sa.test(r)?r.replace(Hs,"\\$&"):r}var Bd=ge(function(r,a,u){return r+(u?"-":"")+a.toLowerCase()}),Ud=ge(function(r,a,u){return r+(u?" ":"")+a.toLowerCase()}),Fd=ae("toLowerCase");function Gd(r,a,u){r=Oi(r),a=si(a);var m=a?Mr(r):0;if(!a||m>=a)return r;var L=(a-m)/2;return Wi(qo(L),u)+r+Wi(eo(L),u)}function Hd(r,a,u){r=Oi(r),a=si(a);var m=a?Mr(r):0;return a&&m<a?r+Wi(a-m,u):r}function kd(r,a,u){r=Oi(r),a=si(a);var m=a?Mr(r):0;return a&&m<a?Wi(a-m,u)+r:r}function Vd(r,a,u){return u||a==null?a=0:a&&(a=+a),ll(Oi(r).replace(Rr,""),a||0)}function Wd(r,a,u){return(u?rr(r,a,u):a===_)?a=1:a=si(a),ue(Oi(r),a)}function jd(){var r=arguments,a=Oi(r[0]);return r.length<3?a:a.replace(r[1],r[2])}var Xd=ge(function(r,a,u){return r+(u?"_":"")+a.toLowerCase()});function qd(r,a,u){return u&&typeof u!="number"&&rr(r,a,u)&&(a=u=_),u=u===_?Qe:u>>>0,u?(r=Oi(r),r&&(typeof a=="string"||a!=null&&!Ph(a))&&(a=be(a),!a&&hr(r))?nn(kn(r),0,u):r.split(a,u)):[]}var Yd=ge(function(r,a,u){return r+(u?" ":"")+Rh(a)});function Zd(r,a,u){return r=Oi(r),u=u==null?0:So(si(u),0,r.length),a=be(a),r.slice(u,u+a.length)==a}function Jd(r,a,u){var m=O.templateSettings;u&&rr(r,a,u)&&(a=_),r=Oi(r),a=sh({},a,m,Hh);var L=sh({},a.imports,m.imports,Hh),G=On(L),J=Bo(L,G),ot,mt,Ht=0,jt=a.interpolate||_r,Jt="__p += '",ve=zn((a.escape||_r).source+"|"+jt.source+"|"+(jt===as?Or:_r).source+"|"+(a.evaluate||_r).source+"|$","g"),De="//# sourceURL="+(ai.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ds+"]")+`
|
|
2583
|
-
`;r.replace(
|
|
2584
|
-
__e(`+
|
|
2585
|
-
'`),
|
|
2586
|
-
`+
|
|
2587
|
-
__p += '`),
|
|
2588
|
-
((__t = (`+
|
|
2589
|
-
'`),
|
|
2590
|
-
`;var
|
|
2591
|
-
`+
|
|
2592
|
-
}
|
|
2593
|
-
`;else if(
|
|
2594
|
-
`+(
|
|
2595
|
-
`)+"var __t, __p = ''"+(
|
|
2618
|
+
`)}function Lc(r){return vi(r)||Ma(r)||!!(Ps&&r&&r[Ps])}function os(r,a){var u=typeof r;return a=a??ge,!!a&&(u=="number"||u!="symbol"&&Pa.test(r))&&r>-1&&r%1==0&&r<a}function lr(r,a,u){if(!mn(u))return!1;var _=typeof a;return(_=="number"?_r(u)&&os(a,u.length):_=="string"&&a in u)?uo(u[a],r):!1}function wh(r,a){if(vi(r))return!1;var u=typeof r;return u=="number"||u=="symbol"||u=="boolean"||r==null||Cr(r)?!0:ir.test(r)||!Ro.test(r)||a!=null&&r in Ee(a)}function Rc(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}function Th(r){var a=$l(r),u=$[a];if(typeof u!="function"||!(a in _i.prototype))return!1;if(r===u)return!0;var _=yh(u);return!!_&&r===_[0]}function Oc(r){return!!mr&&mr in r}var Ic=To?ss:Uh;function El(r){var a=r&&r.constructor,u=typeof a=="function"&&a.prototype||Gr;return r===u}function Qh(r){return r===r&&!mn(r)}function tu(r,a){return function(u){return u==null?!1:u[r]===a&&(a!==d||r in Ee(u))}}function Dc(r){var a=nh(r,function(_){return u.size===F&&u.clear(),_}),u=a.cache;return a}function zc(r,a){var u=r[1],_=a[1],k=u|_,st=k<(b|p|j),yt=_==j&&u==S||_==j&&u==lt&&r[7].length<=a[8]||_==(j|lt)&&a[7].length<=a[8]&&u==S;if(!(st||yt))return r;_&b&&(r[2]=a[2],k|=u&b?0:g);var St=a[3];if(St){var Bt=r[3];r[3]=Bt?wl(Bt,St,a[4]):St,r[4]=Bt?dr(r[3],Z):a[4]}return St=a[5],St&&(Bt=r[5],r[5]=Bt?Tl(Bt,St,a[6]):St,r[6]=Bt?dr(r[5],Z):a[6]),St=a[7],St&&(r[7]=St),_&j&&(r[8]=r[8]==null?a[8]:Dn(r[8],a[8])),r[9]==null&&(r[9]=a[9]),r[0]=a[0],r[1]=k,r}function Bc(r){var a=[];if(r!=null)for(var u in Ee(r))a.push(u);return a}function Nc(r){return $n.call(r)}function eu(r,a,u){return a=cn(a===d?r.length-1:a,0),function(){for(var _=arguments,k=-1,st=cn(_.length-a,0),yt=Yt(st);++k<st;)yt[k]=_[a+k];k=-1;for(var St=Yt(a+1);++k<a;)St[k]=_[k];return St[a]=u(yt),nr(r,this,St)}}function iu(r,a){return a.length<2?r:Po(r,Gi(a,0,-1))}function kc(r,a){for(var u=r.length,_=Dn(a.length,u),k=Wn(r);_--;){var st=a[_];r[_]=os(st,u)?k[st]:d}return r}function Mh(r,a){if(!(a==="constructor"&&typeof r[a]=="function")&&a!="__proto__")return r[a]}var nu=ou(xn),bl=sl||function(r,a){return un.setTimeout(r,a)},Sh=ou(pn);function ru(r,a,u){var _=a+"";return Sh(r,Cc(_,Uc(bc(_),u)))}function ou(r){var a=0,u=0;return function(){var _=sa(),k=Et-(_-u);if(u=_,k>0){if(++a>=at)return arguments[0]}else a=0;return r.apply(d,arguments)}}function Ql(r,a){var u=-1,_=r.length,k=_-1;for(a=a===d?_:a;++u<a;){var st=pe(u,k),yt=r[st];r[st]=r[u],r[u]=yt}return r.length=a,r}var su=Dc(function(r){var a=[];return r.charCodeAt(0)===46&&a.push(""),r.replace(us,function(u,_,k,st){a.push(k?st.replace(ps,"$1"):_||u)}),a});function Lo(r){if(typeof r=="string"||Cr(r))return r;var a=r+"";return a=="0"&&1/r==-Rt?"-0":a}function Ta(r){if(r!=null){try{return Zn.call(r)}catch{}try{return r+""}catch{}}return""}function Uc(r,a){return Yi(xe,function(u){var _="_."+u[0];a&u[1]&&!Ks(r,_)&&r.push(_)}),r.sort()}function au(r){if(r instanceof _i)return r.clone();var a=new Bn(r.__wrapped__,r.__chain__);return a.__actions__=Wn(r.__actions__),a.__index__=r.__index__,a.__values__=r.__values__,a}function Fc(r,a,u){(u?lr(r,a,u):a===d)?a=1:a=cn(wi(a),0);var _=r==null?0:r.length;if(!_||a<1)return[];for(var k=0,st=0,yt=Yt(ro(_/a));k<_;)yt[st++]=Gi(r,k,k+=a);return yt}function Gc(r){for(var a=-1,u=r==null?0:r.length,_=0,k=[];++a<u;){var st=r[a];st&&(k[_++]=st)}return k}function Hc(){var r=arguments.length;if(!r)return[];for(var a=Yt(r-1),u=arguments[0],_=r;_--;)a[_-1]=arguments[_];return Nr(vi(u)?Wn(u):[u],_n(a,1))}var Vc=se(function(r,a){return bn(r)?va(r,_n(a,1,bn,!0)):[]}),Wc=se(function(r,a){var u=Jr(a);return bn(u)&&(u=d),bn(r)?va(r,_n(a,1,bn,!0),si(u,2)):[]}),jc=se(function(r,a){var u=Jr(a);return bn(u)&&(u=d),bn(r)?va(r,_n(a,1,bn,!0),d,u):[]});function Xc(r,a,u){var _=r==null?0:r.length;return _?(a=u||a===d?1:wi(a),Gi(r,a<0?0:a,_)):[]}function qc(r,a,u){var _=r==null?0:r.length;return _?(a=u||a===d?1:wi(a),a=_-a,Gi(r,0,a<0?0:a)):[]}function Yc(r,a){return r&&r.length?Xe(r,si(a,3),!0,!0):[]}function Zc(r,a){return r&&r.length?Xe(r,si(a,3),!0):[]}function Jc(r,a,u,_){var k=r==null?0:r.length;return k?(u&&typeof u!="number"&&lr(r,a,u)&&(u=0,_=k),Vn(r,a,u,_)):[]}function lu(r,a,u){var _=r==null?0:r.length;if(!_)return-1;var k=u==null?0:wi(u);return k<0&&(k=cn(_+k,0)),go(r,si(a,3),k)}function hu(r,a,u){var _=r==null?0:r.length;if(!_)return-1;var k=_-1;return u!==d&&(k=wi(u),k=u<0?cn(_+k,0):Dn(k,_-1)),go(r,si(a,3),k,!0)}function uu(r){var a=r==null?0:r.length;return a?_n(r,1):[]}function $c(r){var a=r==null?0:r.length;return a?_n(r,Rt):[]}function Kc(r,a){var u=r==null?0:r.length;return u?(a=a===d?1:wi(a),_n(r,a)):[]}function Qc(r){for(var a=-1,u=r==null?0:r.length,_={};++a<u;){var k=r[a];_[k[0]]=k[1]}return _}function cu(r){return r&&r.length?r[0]:d}function tf(r,a,u){var _=r==null?0:r.length;if(!_)return-1;var k=u==null?0:wi(u);return k<0&&(k=cn(_+k,0)),fr(r,a,k)}function ef(r){var a=r==null?0:r.length;return a?Gi(r,0,-1):[]}var nf=se(function(r){var a=Xi(r,ne);return a.length&&a[0]===r[0]?_a(a):[]}),rf=se(function(r){var a=Jr(r),u=Xi(r,ne);return a===Jr(u)?a=d:u.pop(),u.length&&u[0]===r[0]?_a(u,si(a,2)):[]}),of=se(function(r){var a=Jr(r),u=Xi(r,ne);return a=typeof a=="function"?a:d,a&&u.pop(),u.length&&u[0]===r[0]?_a(u,d,a):[]});function sf(r,a){return r==null?"":ll.call(r,a)}function Jr(r){var a=r==null?0:r.length;return a?r[a-1]:d}function af(r,a,u){var _=r==null?0:r.length;if(!_)return-1;var k=_;return u!==d&&(k=wi(u),k=k<0?cn(_+k,0):Dn(k,_-1)),a===a?za(r,a,k):go(r,Uo,k,!0)}function lf(r,a){return r&&r.length?V(r,wi(a)):d}var hf=se(fu);function fu(r,a){return r&&r.length&&a&&a.length?qt(r,a):r}function uf(r,a,u){return r&&r.length&&a&&a.length?qt(r,a,si(u,2)):r}function cf(r,a,u){return r&&r.length&&a&&a.length?qt(r,a,d,u):r}var ff=rs(function(r,a){var u=r==null?0:r.length,_=yl(r,a);return Te(r,Xi(a,function(k){return os(k,u)?+k:k}).sort(ns)),_});function pf(r,a){var u=[];if(!(r&&r.length))return u;var _=-1,k=[],st=r.length;for(a=si(a,3);++_<st;){var yt=r[_];a(yt,_,r)&&(u.push(yt),k.push(_))}return Te(r,k),u}function Eh(r){return r==null?r:Cs.call(r)}function df(r,a,u){var _=r==null?0:r.length;return _?(u&&typeof u!="number"&&lr(r,a,u)?(a=0,u=_):(a=a==null?0:wi(a),u=u===d?_:wi(u)),Gi(r,a,u)):[]}function mf(r,a){return wn(r,a)}function gf(r,a,u){return Ae(r,a,si(u,2))}function vf(r,a){var u=r==null?0:r.length;if(u){var _=wn(r,a);if(_<u&&uo(r[_],a))return _}return-1}function yf(r,a){return wn(r,a,!0)}function _f(r,a,u){return Ae(r,a,si(u,2),!0)}function xf(r,a){var u=r==null?0:r.length;if(u){var _=wn(r,a,!0)-1;if(uo(r[_],a))return _}return-1}function wf(r){return r&&r.length?Qe(r):[]}function Tf(r,a){return r&&r.length?Qe(r,si(a,2)):[]}function Mf(r){var a=r==null?0:r.length;return a?Gi(r,1,a):[]}function Sf(r,a,u){return r&&r.length?(a=u||a===d?1:wi(a),Gi(r,0,a<0?0:a)):[]}function Ef(r,a,u){var _=r==null?0:r.length;return _?(a=u||a===d?1:wi(a),a=_-a,Gi(r,a<0?0:a,_)):[]}function bf(r,a){return r&&r.length?Xe(r,si(a,3),!1,!0):[]}function Af(r,a){return r&&r.length?Xe(r,si(a,3)):[]}var Pf=se(function(r){return ei(_n(r,1,bn,!0))}),Cf=se(function(r){var a=Jr(r);return bn(a)&&(a=d),ei(_n(r,1,bn,!0),si(a,2))}),Lf=se(function(r){var a=Jr(r);return a=typeof a=="function"?a:d,ei(_n(r,1,bn,!0),d,a)});function Rf(r){return r&&r.length?ei(r):[]}function Of(r,a){return r&&r.length?ei(r,si(a,2)):[]}function If(r,a){return a=typeof a=="function"?a:d,r&&r.length?ei(r,d,a):[]}function bh(r){if(!(r&&r.length))return[];var a=0;return r=cr(r,function(u){if(bn(u))return a=cn(u.length,a),!0}),eo(a,function(u){return Xi(r,vo(u))})}function pu(r,a){if(!(r&&r.length))return[];var u=bh(r);return a==null?u:Xi(u,function(_){return nr(a,d,_)})}var Df=se(function(r,a){return bn(r)?va(r,a):[]}),zf=se(function(r){return Pi(cr(r,bn))}),Bf=se(function(r){var a=Jr(r);return bn(a)&&(a=d),Pi(cr(r,bn),si(a,2))}),Nf=se(function(r){var a=Jr(r);return a=typeof a=="function"?a:d,Pi(cr(r,bn),d,a)}),kf=se(bh);function Uf(r,a){return Ai(r||[],a||[],Bs)}function Ff(r,a){return Ai(r||[],a||[],fi)}var Gf=se(function(r){var a=r.length,u=a>1?r[a-1]:d;return u=typeof u=="function"?(r.pop(),u):d,pu(r,u)});function du(r){var a=$(r);return a.__chain__=!0,a}function Hf(r,a){return a(r),r}function th(r,a){return a(r)}var Vf=rs(function(r){var a=r.length,u=a?r[0]:0,_=this.__wrapped__,k=function(st){return yl(st,r)};return a>1||this.__actions__.length||!(_ instanceof _i)||!os(u)?this.thru(k):(_=_.slice(u,+u+(a?1:0)),_.__actions__.push({func:th,args:[k],thisArg:d}),new Bn(_,this.__chain__).thru(function(st){return a&&!st.length&&st.push(d),st}))});function Wf(){return du(this)}function jf(){return new Bn(this.value(),this.__chain__)}function Xf(){this.__values__===d&&(this.__values__=Pu(this.value()));var r=this.__index__>=this.__values__.length,a=r?d:this.__values__[this.__index__++];return{done:r,value:a}}function qf(){return this}function Yf(r){for(var a,u=this;u instanceof Rs;){var _=au(u);_.__index__=0,_.__values__=d,a?k.__wrapped__=_:a=_;var k=_;u=u.__wrapped__}return k.__wrapped__=r,a}function Zf(){var r=this.__wrapped__;if(r instanceof _i){var a=r;return this.__actions__.length&&(a=new _i(this)),a=a.reverse(),a.__actions__.push({func:th,args:[Eh],thisArg:d}),new Bn(a,this.__chain__)}return this.thru(Eh)}function Jf(){return ri(this.__wrapped__,this.__actions__)}var $f=Fs(function(r,a,u){Ti.call(r,u)?++r[u]:ao(r,u,1)});function Kf(r,a,u){var _=vi(r)?ol:Nn;return u&&lr(r,a,u)&&(a=d),_(r,si(a,3))}function Qf(r,a){var u=vi(r)?cr:vr;return u(r,si(a,3))}var tp=$e(lu),ep=$e(hu);function ip(r,a){return _n(eh(r,a),1)}function np(r,a){return _n(eh(r,a),Rt)}function rp(r,a,u){return u=u===d?1:wi(u),_n(eh(r,a),u)}function mu(r,a){var u=vi(r)?Yi:fn;return u(r,si(a,3))}function gu(r,a){var u=vi(r)?No:ql;return u(r,si(a,3))}var op=Fs(function(r,a,u){Ti.call(r,u)?r[u].push(a):ao(r,u,[a])});function sp(r,a,u,_){r=_r(r)?r:Ka(r),u=u&&!_?wi(u):0;var k=r.length;return u<0&&(u=cn(k+u,0)),sh(r)?u<=k&&r.indexOf(a,u)>-1:!!k&&fr(r,a,u)>-1}var ap=se(function(r,a,u){var _=-1,k=typeof a=="function",st=_r(r)?Yt(r.length):[];return fn(r,function(yt){st[++_]=k?nr(a,yt,u):e(yt,a,u)}),st}),lp=Fs(function(r,a,u){ao(r,u,a)});function eh(r,a){var u=vi(r)?Xi:_t;return u(r,si(a,3))}function hp(r,a,u,_){return r==null?[]:(vi(a)||(a=a==null?[]:[a]),u=_?d:u,vi(u)||(u=u==null?[]:[u]),tt(r,a,u))}var up=Fs(function(r,a,u){r[u?0:1].push(a)},function(){return[[],[]]});function cp(r,a,u){var _=vi(r)?Ia:yo,k=arguments.length<3;return _(r,si(a,4),u,k,fn)}function fp(r,a,u){var _=vi(r)?Dl:yo,k=arguments.length<3;return _(r,si(a,4),u,k,ql)}function pp(r,a){var u=vi(r)?cr:vr;return u(r,rh(si(a,3)))}function dp(r){var a=vi(r)?ml:We;return a(r)}function mp(r,a,u){(u?lr(r,a,u):a===d)?a=1:a=wi(a);var _=vi(r)?mh:Ke;return _(r,a)}function gp(r){var a=vi(r)?Wl:ji;return a(r)}function vp(r){if(r==null)return 0;if(_r(r))return sh(r)?br(r):r.length;var a=er(r);return a==R||a==Kt?r.size:N(r).length}function yp(r,a,u){var _=vi(r)?Qr:tn;return u&&lr(r,a,u)&&(a=d),_(r,si(a,3))}var _p=se(function(r,a){if(r==null)return[];var u=a.length;return u>1&&lr(r,a[0],a[1])?a=[]:u>2&&lr(a[0],a[1],a[2])&&(a=[a[0]]),tt(r,_n(a,1),[])}),ih=ka||function(){return un.Date.now()};function xp(r,a){if(typeof a!="function")throw new Yn(P);return r=wi(r),function(){if(--r<1)return a.apply(this,arguments)}}function vu(r,a,u){return a=u?d:a,a=r&&a==null?r.length:a,jn(r,j,d,d,d,d,a)}function yu(r,a){var u;if(typeof a!="function")throw new Yn(P);return r=wi(r),function(){return--r>0&&(u=a.apply(this,arguments)),r<=1&&(a=d),u}}var Ah=se(function(r,a,u){var _=b;if(u.length){var k=dr(u,Ja(Ah));_|=U}return jn(r,_,a,u,k)}),_u=se(function(r,a,u){var _=b|p;if(u.length){var k=dr(u,Ja(_u));_|=U}return jn(a,_,r,u,k)});function xu(r,a,u){a=u?d:a;var _=jn(r,S,d,d,d,d,d,a);return _.placeholder=xu.placeholder,_}function wu(r,a,u){a=u?d:a;var _=jn(r,x,d,d,d,d,d,a);return _.placeholder=wu.placeholder,_}function Tu(r,a,u){var _,k,st,yt,St,Bt,re=0,ae=!1,fe=!1,ze=!0;if(typeof r!="function")throw new Yn(P);a=$r(a)||0,mn(u)&&(ae=!!u.leading,fe="maxWait"in u,st=fe?cn($r(u.maxWait)||0,a):st,ze="trailing"in u?!!u.trailing:ze);function Je(An){var co=_,ls=k;return _=k=d,re=An,yt=r.apply(ls,co),yt}function hi(An){return re=An,St=bl(Ci,a),ae?Je(An):yt}function Mi(An){var co=An-Bt,ls=An-re,Gu=a-co;return fe?Dn(Gu,st-ls):Gu}function ui(An){var co=An-Bt,ls=An-re;return Bt===d||co>=a||co<0||fe&&ls>=st}function Ci(){var An=ih();if(ui(An))return Ni(An);St=bl(Ci,Mi(An))}function Ni(An){return St=d,ze&&_?Je(An):(_=k=d,yt)}function Lr(){St!==d&&Tn(St),re=0,_=Bt=k=St=d}function hr(){return St===d?yt:Ni(ih())}function Rr(){var An=ih(),co=ui(An);if(_=arguments,k=this,Bt=An,co){if(St===d)return hi(Bt);if(fe)return Tn(St),St=bl(Ci,a),Je(Bt)}return St===d&&(St=bl(Ci,a)),yt}return Rr.cancel=Lr,Rr.flush=hr,Rr}var wp=se(function(r,a){return Xr(r,1,a)}),Tp=se(function(r,a,u){return Xr(r,$r(a)||0,u)});function Mp(r){return jn(r,ft)}function nh(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new Yn(P);var u=function(){var _=arguments,k=a?a.apply(this,_):_[0],st=u.cache;if(st.has(k))return st.get(k);var yt=r.apply(this,_);return u.cache=st.set(k,yt)||st,yt};return u.cache=new(nh.Cache||or),u}nh.Cache=or;function rh(r){if(typeof r!="function")throw new Yn(P);return function(){var a=arguments;switch(a.length){case 0:return!r.call(this);case 1:return!r.call(this,a[0]);case 2:return!r.call(this,a[0],a[1]);case 3:return!r.call(this,a[0],a[1],a[2])}return!r.apply(this,a)}}function Sp(r){return yu(2,r)}var Ep=li(function(r,a){a=a.length==1&&vi(a[0])?Xi(a[0],On(si())):Xi(_n(a,1),On(si()));var u=a.length;return se(function(_){for(var k=-1,st=Dn(_.length,u);++k<st;)_[k]=a[k].call(this,_[k]);return nr(r,this,_)})}),Ph=se(function(r,a){var u=dr(a,Ja(Ph));return jn(r,U,d,a,u)}),Mu=se(function(r,a){var u=dr(a,Ja(Mu));return jn(r,z,d,a,u)}),bp=rs(function(r,a){return jn(r,lt,d,d,d,a)});function Ap(r,a){if(typeof r!="function")throw new Yn(P);return a=a===d?a:wi(a),se(r,a)}function Pp(r,a){if(typeof r!="function")throw new Yn(P);return a=a==null?0:cn(wi(a),0),se(function(u){var _=u[a],k=dn(u,0,a);return _&&Nr(k,_),nr(r,this,k)})}function Cp(r,a,u){var _=!0,k=!0;if(typeof r!="function")throw new Yn(P);return mn(u)&&(_="leading"in u?!!u.leading:_,k="trailing"in u?!!u.trailing:k),Tu(r,a,{leading:_,maxWait:a,trailing:k})}function Lp(r){return vu(r,1)}function Rp(r,a){return Ph(ii(a),r)}function Op(){if(!arguments.length)return[];var r=arguments[0];return vi(r)?r:[r]}function Ip(r){return sr(r,B)}function Dp(r,a){return a=typeof a=="function"?a:d,sr(r,B,a)}function zp(r){return sr(r,G|B)}function Bp(r,a){return a=typeof a=="function"?a:d,sr(r,G|B,a)}function Np(r,a){return a==null||Xl(r,a,Un(a))}function uo(r,a){return r===a||r!==r&&a!==a}var kp=Zr(Xa),Up=Zr(function(r,a){return r>=a}),Ma=i(function(){return arguments}())?i:function(r){return Mn(r)&&Ti.call(r,"callee")&&!ra.call(r,"callee")},vi=Yt.isArray,Fp=rl?On(rl):n;function _r(r){return r!=null&&oh(r.length)&&!ss(r)}function bn(r){return Mn(r)&&_r(r)}function Gp(r){return r===!0||r===!1||Mn(r)&&kn(r)==Oe}var Hs=al||Uh,Hp=ws?On(ws):o;function Vp(r){return Mn(r)&&r.nodeType===1&&!Al(r)}function Wp(r){if(r==null)return!0;if(_r(r)&&(vi(r)||typeof r=="string"||typeof r.splice=="function"||Hs(r)||$a(r)||Ma(r)))return!r.length;var a=er(r);if(a==R||a==Kt)return!r.size;if(El(r))return!N(r).length;for(var u in r)if(Ti.call(r,u))return!1;return!0}function jp(r,a){return s(r,a)}function Xp(r,a,u){u=typeof u=="function"?u:d;var _=u?u(r,a):d;return _===d?s(r,a,d,u):!!_}function Ch(r){if(!Mn(r))return!1;var a=kn(r);return a==Ri||a==di||typeof r.message=="string"&&typeof r.name=="string"&&!Al(r)}function qp(r){return typeof r=="number"&&Ua(r)}function ss(r){if(!mn(r))return!1;var a=kn(r);return a==hn||a==Ji||a==ki||a==Lt}function Su(r){return typeof r=="number"&&r==wi(r)}function oh(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ge}function mn(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}function Mn(r){return r!=null&&typeof r=="object"}var Eu=Ts?On(Ts):h;function Yp(r,a){return r===a||c(r,a,_h(a))}function Zp(r,a,u){return u=typeof u=="function"?u:d,c(r,a,_h(a),u)}function Jp(r){return bu(r)&&r!=+r}function $p(r){if(Ic(r))throw new ai(m);return f(r)}function Kp(r){return r===null}function Qp(r){return r==null}function bu(r){return typeof r=="number"||Mn(r)&&kn(r)==Jt}function Al(r){if(!Mn(r)||kn(r)!=ct)return!1;var a=Vr(r);if(a===null)return!0;var u=Ti.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&Zn.call(u)==Hr}var Lh=Ol?On(Ol):v;function td(r){return Su(r)&&r>=-ge&&r<=ge}var Au=Il?On(Il):y;function sh(r){return typeof r=="string"||!vi(r)&&Mn(r)&&kn(r)==w}function Cr(r){return typeof r=="symbol"||Mn(r)&&kn(r)==X}var $a=La?On(La):M;function ed(r){return r===d}function id(r){return Mn(r)&&er(r)==K}function nd(r){return Mn(r)&&kn(r)==vt}var rd=Zr(Q),od=Zr(function(r,a){return r<=a});function Pu(r){if(!r)return[];if(_r(r))return sh(r)?qn(r):Wn(r);if(Mo&&r[Mo])return Xo(r[Mo]());var a=er(r),u=a==R?Fn:a==Kt?qo:Ka;return u(r)}function as(r){if(!r)return r===0?r:0;if(r=$r(r),r===Rt||r===-Rt){var a=r<0?-1:1;return a*ue}return r===r?r:0}function wi(r){var a=as(r),u=a%1;return a===a?u?a-u:a:0}function Cu(r){return r?Ao(wi(r),0,Dt):0}function $r(r){if(typeof r=="number")return r;if(Cr(r))return Ft;if(mn(r)){var a=typeof r.valueOf=="function"?r.valueOf():r;r=mn(a)?a+"":a}if(typeof r!="string")return r===0?r:+r;r=Ss(r);var u=il.test(r);return u||Io.test(r)?ys(r.slice(2),u?2:8):el.test(r)?Ft:+r}function Lu(r){return En(r,xr(r))}function sd(r){return r?Ao(wi(r),-ge,ge):r===0?r:0}function qi(r){return r==null?"":Ye(r)}var ad=ho(function(r,a){if(El(a)||_r(a)){En(a,Un(a),r);return}for(var u in a)Ti.call(a,u)&&Bs(r,u,a[u])}),Ru=ho(function(r,a){En(a,xr(a),r)}),ah=ho(function(r,a,u,_){En(a,xr(a),r,_)}),ld=ho(function(r,a,u,_){En(a,Un(a),r,_)}),hd=rs(yl);function ud(r,a){var u=Eo(r);return a==null?u:gl(u,a)}var cd=se(function(r,a){r=Ee(r);var u=-1,_=a.length,k=_>2?a[2]:d;for(k&&lr(a[0],a[1],k)&&(_=1);++u<_;)for(var st=a[u],yt=xr(st),St=-1,Bt=yt.length;++St<Bt;){var re=yt[St],ae=r[re];(ae===d||uo(ae,Gr[re])&&!Ti.call(r,re))&&(r[re]=st[re])}return r}),fd=se(function(r){return r.push(d,Yh),nr(Ou,d,r)});function pd(r,a){return ko(r,si(a,3),yr)}function dd(r,a){return ko(r,si(a,3),ja)}function md(r,a){return r==null?r:ya(r,si(a,3),xr)}function gd(r,a){return r==null?r:Wa(r,si(a,3),xr)}function vd(r,a){return r&&yr(r,si(a,3))}function yd(r,a){return r&&ja(r,si(a,3))}function _d(r){return r==null?[]:es(r,Un(r))}function xd(r){return r==null?[]:es(r,xr(r))}function Rh(r,a,u){var _=r==null?d:Po(r,a);return _===d?u:_}function wd(r,a){return r!=null&&$h(r,a,qa)}function Oh(r,a){return r!=null&&$h(r,a,_l)}var Td=me(function(r,a,u){a!=null&&typeof a.toString!="function"&&(a=$n.call(a)),r[a]=u},Dh(wr)),Md=me(function(r,a,u){a!=null&&typeof a.toString!="function"&&(a=$n.call(a)),Ti.call(r,a)?r[a].push(u):r[a]=[u]},si),Sd=se(e);function Un(r){return _r(r)?Vl(r):N(r)}function xr(r){return _r(r)?Vl(r,!0):W(r)}function Ed(r,a){var u={};return a=si(a,3),yr(r,function(_,k,st){ao(u,a(_,k,st),_)}),u}function bd(r,a){var u={};return a=si(a,3),yr(r,function(_,k,st){ao(u,k,a(_,k,st))}),u}var Ad=ho(function(r,a,u){xt(r,a,u)}),Ou=ho(function(r,a,u,_){xt(r,a,u,_)}),Pd=rs(function(r,a){var u={};if(r==null)return u;var _=!1;a=Xi(a,function(st){return st=Ze(st,r),_||(_=st.length>1),st}),En(r,vh(r),u),_&&(u=sr(u,G|J|B,wc));for(var k=a.length;k--;)Hi(u,a[k]);return u});function Cd(r,a){return Iu(r,rh(si(a)))}var Ld=rs(function(r,a){return r==null?{}:Ot(r,a)});function Iu(r,a){if(r==null)return{};var u=Xi(vh(r),function(_){return[_]});return a=si(a),ee(r,u,function(_,k){return a(_,k[0])})}function Rd(r,a,u){a=Ze(a,r);var _=-1,k=a.length;for(k||(k=1,r=d);++_<k;){var st=r==null?d:r[Lo(a[_])];st===d&&(_=k,st=u),r=ss(st)?st.call(r):st}return r}function Od(r,a,u){return r==null?r:fi(r,a,u)}function Id(r,a,u,_){return _=typeof _=="function"?_:d,r==null?r:fi(r,a,u,_)}var Du=Jl(Un),zu=Jl(xr);function Dd(r,a,u){var _=vi(r),k=_||Hs(r)||$a(r);if(a=si(a,4),u==null){var st=r&&r.constructor;k?u=_?new st:[]:mn(r)?u=ss(st)?Eo(Vr(r)):{}:u={}}return(k?Yi:yr)(r,function(yt,St,Bt){return a(u,yt,St,Bt)}),u}function zd(r,a){return r==null?!0:Hi(r,a)}function Bd(r,a,u){return r==null?r:Pe(r,a,ii(u))}function Nd(r,a,u,_){return _=typeof _=="function"?_:d,r==null?r:Pe(r,a,ii(u),_)}function Ka(r){return r==null?[]:Fo(r,Un(r))}function kd(r){return r==null?[]:Fo(r,xr(r))}function Ud(r,a,u){return u===d&&(u=a,a=d),u!==d&&(u=$r(u),u=u===u?u:0),a!==d&&(a=$r(a),a=a===a?a:0),Ao($r(r),a,u)}function Fd(r,a,u){return a=as(a),u===d?(u=a,a=0):u=as(u),r=$r(r),Ya(r,a,u)}function Gd(r,a,u){if(u&&typeof u!="boolean"&&lr(r,a,u)&&(a=u=d),u===d&&(typeof a=="boolean"?(u=a,a=d):typeof r=="boolean"&&(u=r,r=d)),r===d&&a===d?(r=0,a=1):(r=as(r),a===d?(a=r,r=0):a=as(a)),r>a){var _=r;r=a,a=_}if(u||r%1||a%1){var k=Fa();return Dn(r+k*(a-r+$s("1e-"+((k+"").length-1))),a)}return pe(r,a)}var Hd=De(function(r,a,u){return a=a.toLowerCase(),r+(u?Bu(a):a)});function Bu(r){return Ih(qi(r).toLowerCase())}function Nu(r){return r=qi(r),r&&r.replace(Ca,Ho).replace(nl,"")}function Vd(r,a,u){r=qi(r),a=Ye(a);var _=r.length;u=u===d?_:Ao(wi(u),0,_);var k=u;return u-=a.length,u>=0&&r.slice(u,k)==a}function Wd(r){return r=qi(r),r&&Or.test(r)?r.replace(Oi,Er):r}function jd(r){return r=qi(r),r&&ba.test(r)?r.replace(Vs,"\\$&"):r}var Xd=De(function(r,a,u){return r+(u?"-":"")+a.toLowerCase()}),qd=De(function(r,a,u){return r+(u?" ":"")+a.toLowerCase()}),Yd=Me("toLowerCase");function Zd(r,a,u){r=qi(r),a=wi(a);var _=a?br(r):0;if(!a||_>=a)return r;var k=(a-_)/2;return rn(Jo(k),u)+r+rn(ro(k),u)}function Jd(r,a,u){r=qi(r),a=wi(a);var _=a?br(r):0;return a&&_<a?r+rn(a-_,u):r}function $d(r,a,u){r=qi(r),a=wi(a);var _=a?br(r):0;return a&&_<a?rn(a-_,u)+r:r}function Kd(r,a,u){return u||a==null?a=0:a&&(a=+a),hl(qi(r).replace(Ir,""),a||0)}function Qd(r,a,u){return(u?lr(r,a,u):a===d)?a=1:a=wi(a),be(qi(r),a)}function tm(){var r=arguments,a=qi(r[0]);return r.length<3?a:a.replace(r[1],r[2])}var em=De(function(r,a,u){return r+(u?"_":"")+a.toLowerCase()});function im(r,a,u){return u&&typeof u!="number"&&lr(r,a,u)&&(a=u=d),u=u===d?Dt:u>>>0,u?(r=qi(r),r&&(typeof a=="string"||a!=null&&!Lh(a))&&(a=Ye(a),!a&&pr(r))?dn(qn(r),0,u):r.split(a,u)):[]}var nm=De(function(r,a,u){return r+(u?" ":"")+Ih(a)});function rm(r,a,u){return r=qi(r),u=u==null?0:Ao(wi(u),0,r.length),a=Ye(a),r.slice(u,u+a.length)==a}function om(r,a,u){var _=$.templateSettings;u&&lr(r,a,u)&&(a=d),r=qi(r),a=ah({},a,_,qh);var k=ah({},a.imports,_.imports,qh),st=Un(k),yt=Fo(k,st),St,Bt,re=0,ae=a.interpolate||Mr,fe="__p += '",ze=Gn((a.escape||Mr).source+"|"+ae.source+"|"+(ae===hs?zr:Mr).source+"|"+(a.evaluate||Mr).source+"|$","g"),Je="//# sourceURL="+(Ti.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++gs+"]")+`
|
|
2619
|
+
`;r.replace(ze,function(ui,Ci,Ni,Lr,hr,Rr){return Ni||(Ni=Lr),fe+=r.slice(re,Rr).replace(L,Vo),Ci&&(St=!0,fe+=`' +
|
|
2620
|
+
__e(`+Ci+`) +
|
|
2621
|
+
'`),hr&&(Bt=!0,fe+=`';
|
|
2622
|
+
`+hr+`;
|
|
2623
|
+
__p += '`),Ni&&(fe+=`' +
|
|
2624
|
+
((__t = (`+Ni+`)) == null ? '' : __t) +
|
|
2625
|
+
'`),re=Rr+ui.length,ui}),fe+=`';
|
|
2626
|
+
`;var hi=Ti.call(a,"variable")&&a.variable;if(!hi)fe=`with (obj) {
|
|
2627
|
+
`+fe+`
|
|
2628
|
+
}
|
|
2629
|
+
`;else if(fs.test(hi))throw new ai(D);fe=(Bt?fe.replace(Tr,""):fe).replace(Xn,"$1").replace(nn,"$1;"),fe="function("+(hi||"obj")+`) {
|
|
2630
|
+
`+(hi?"":`obj || (obj = {});
|
|
2631
|
+
`)+"var __t, __p = ''"+(St?", __e = _.escape":"")+(Bt?`, __j = Array.prototype.join;
|
|
2596
2632
|
function print() { __p += __j.call(arguments, '') }
|
|
2597
2633
|
`:`;
|
|
2598
|
-
`)+
|
|
2599
|
-
}`;var li=Iu(function(){return xi(G,De+"return "+Jt).apply(_,J)});if(li.source=Jt,Ah(li))throw li;return li}function $d(r){return Oi(r).toLowerCase()}function Qd(r){return Oi(r).toUpperCase()}function Kd(r,a,u){if(r=Oi(r),r&&(u||a===_))return Ms(r);if(!r||!(a=be(a)))return r;var m=kn(r),L=kn(a),G=vo(m,L),J=Uo(m,L)+1;return nn(m,G,J).join("")}function tm(r,a,u){if(r=Oi(r),r&&(u||a===_))return r.slice(0,Ts(r)+1);if(!r||!(a=be(a)))return r;var m=kn(r),L=Uo(m,kn(a))+1;return nn(m,0,L).join("")}function em(r,a,u){if(r=Oi(r),r&&(u||a===_))return r.replace(Rr,"");if(!r||!(a=be(a)))return r;var m=kn(r),L=vo(m,kn(a));return nn(m,L).join("")}function im(r,a){var u=dt,m=zt;if(rn(a)){var L="separator"in a?a.separator:L;u="length"in a?si(a.length):u,m="omission"in a?be(a.omission):m}r=Oi(r);var G=r.length;if(hr(r)){var J=kn(r);G=J.length}if(u>=G)return r;var ot=u-Mr(m);if(ot<1)return m;var mt=J?nn(J,0,ot).join(""):r.slice(0,ot);if(L===_)return mt+m;if(J&&(ot+=mt.length-ot),Ph(L)){if(r.slice(ot).search(L)){var Ht,jt=mt;for(L.global||(L=zn(L.source,Oi(Ea.exec(L))+"g")),L.lastIndex=0;Ht=L.exec(jt);)var Jt=Ht.index;mt=mt.slice(0,Jt===_?ot:Jt)}}else if(r.indexOf(be(L),ot)!=ot){var ve=mt.lastIndexOf(L);ve>-1&&(mt=mt.slice(0,ve))}return mt+m}function nm(r){return r=Oi(r),r&&Qa.test(r)?r.replace(ss,Da):r}var rm=ge(function(r,a,u){return r+(u?" ":"")+a.toUpperCase()}),Rh=ae("toUpperCase");function Ou(r,a,u){return r=Oi(r),a=u?_:a,a===_?ko(r)?ah(r):$s(r):r.match(a)||[]}var Iu=Wt(function(r,a){try{return Kn(r,_,a)}catch(u){return Ah(u)?u:new We(u)}}),om=es(function(r,a){return zi(a,function(u){u=Po(u),ro(r,u,Sh(r[u],r))}),r});function sm(r){var a=r==null?0:r.length,u=Ve();return r=a?bi(r,function(m){if(typeof m[1]!="function")throw new Vn(Mt);return[u(m[0]),m[1]]}):[],Wt(function(m){for(var L=-1;++L<a;){var G=r[L];if(Kn(G[0],this,m))return Kn(G[1],this,m)}})}function am(r){return zs(ir(r,vt))}function bh(r){return function(){return r}}function lm(r,a){return r==null||r!==r?a:r}var hm=mi(),um=mi(!0);function vr(r){return r}function Oh(r){return w(typeof r=="function"?r:ir(r,vt))}function cm(r){return W(ir(r,vt))}function pm(r,a){return st(r,ir(a,vt))}var fm=Wt(function(r,a){return function(u){return e(u,r,a)}}),dm=Wt(function(r,a){return function(u){return e(r,u,a)}});function Ih(r,a,u){var m=On(a),L=Qo(a,m);u==null&&!(rn(a)&&(L.length||!m.length))&&(u=a,a=r,r=this,L=Qo(a,On(a)));var G=!(rn(u)&&"chain"in u)||!!u.chain,J=ns(r);return zi(L,function(ot){var mt=a[ot];r[ot]=mt,J&&(r.prototype[ot]=function(){var Ht=this.__chain__;if(G||Ht){var jt=r(this.__wrapped__),Jt=jt.__actions__=Un(this.__actions__);return Jt.push({func:mt,args:arguments,thisArg:r}),jt.__chain__=Ht,jt}return mt.apply(r,Dr([this.value()],arguments))})}),r}function mm(){return Qi._===this&&(Qi._=Tr),this}function Dh(){}function gm(r){return r=si(r),Wt(function(a){return C(a,r)})}var vm=xn(bi),ym=xn(rl),_m=xn(Jr);function Du(r){return yh(r)?fo(Po(r)):bt(r)}function xm(r){return function(a){return r==null?_:Eo(r,a)}}var wm=Ml(),Mm=Ml(!0);function zh(){return[]}function Nh(){return!1}function Tm(){return{}}function Sm(){return""}function Em(){return!0}function Am(r,a){if(r=si(r),r<1||r>ze)return[];var u=Qe,m=An(r,Qe);a=Ve(a),r-=Qe;for(var L=Qr(m,a);++u<r;)a(u);return L}function Pm(r){return ii(r)?bi(r,Po):Er(r)?[r]:Un(tu(Oi(r)))}function Lm(r){var a=++jn;return Oi(r)+a}var Cm=nr(function(r,a){return r+a},0),Rm=qa("ceil"),bm=nr(function(r,a){return r/a},1),Om=qa("floor");function Im(r){return r&&r.length?Wr(r,vr,Wa):_}function Dm(r,a){return r&&r.length?Wr(r,Ve(a,2),Wa):_}function zm(r){return ws(r,vr)}function Nm(r,a){return ws(r,Ve(a,2))}function Bm(r){return r&&r.length?Wr(r,vr,I):_}function Um(r,a){return r&&r.length?Wr(r,Ve(a,2),I):_}var Fm=nr(function(r,a){return r*a},1),Gm=qa("round"),Hm=nr(function(r,a){return r-a},0);function km(r){return r&&r.length?go(r,vr):0}function Vm(r,a){return r&&r.length?go(r,Ve(a,2)):0}return O.after=cf,O.ary=cu,O.assign=Qf,O.assignIn=Eu,O.assignInWith=sh,O.assignWith=Kf,O.at=td,O.before=pu,O.bind=Sh,O.bindAll=om,O.bindKey=fu,O.castArray=Tf,O.chain=lu,O.chunk=bc,O.compact=Oc,O.concat=Ic,O.cond=sm,O.conforms=am,O.constant=bh,O.countBy=Hp,O.create=ed,O.curry=du,O.curryRight=mu,O.debounce=gu,O.defaults=id,O.defaultsDeep=nd,O.defer=pf,O.delay=ff,O.difference=Dc,O.differenceBy=zc,O.differenceWith=Nc,O.drop=Bc,O.dropRight=Uc,O.dropRightWhile=Fc,O.dropWhile=Gc,O.fill=Hc,O.filter=Vp,O.flatMap=Xp,O.flatMapDeep=qp,O.flatMapDepth=Yp,O.flatten=ru,O.flattenDeep=kc,O.flattenDepth=Vc,O.flip=df,O.flow=hm,O.flowRight=um,O.fromPairs=Wc,O.functions=ud,O.functionsIn=cd,O.groupBy=Zp,O.initial=Xc,O.intersection=qc,O.intersectionBy=Yc,O.intersectionWith=Zc,O.invert=fd,O.invertBy=dd,O.invokeMap=$p,O.iteratee=Oh,O.keyBy=Qp,O.keys=On,O.keysIn=gr,O.map=th,O.mapKeys=gd,O.mapValues=vd,O.matches=cm,O.matchesProperty=pm,O.memoize=ih,O.merge=yd,O.mergeWith=Au,O.method=fm,O.methodOf=dm,O.mixin=Ih,O.negate=nh,O.nthArg=gm,O.omit=_d,O.omitBy=xd,O.once=mf,O.orderBy=Kp,O.over=vm,O.overArgs=gf,O.overEvery=ym,O.overSome=_m,O.partial=Eh,O.partialRight=vu,O.partition=tf,O.pick=wd,O.pickBy=Pu,O.property=Du,O.propertyOf=xm,O.pull=Kc,O.pullAll=su,O.pullAllBy=tp,O.pullAllWith=ep,O.pullAt=ip,O.range=wm,O.rangeRight=Mm,O.rearg=vf,O.reject=rf,O.remove=np,O.rest=yf,O.reverse=Mh,O.sampleSize=sf,O.set=Td,O.setWith=Sd,O.shuffle=af,O.slice=rp,O.sortBy=uf,O.sortedUniq=cp,O.sortedUniqBy=pp,O.split=qd,O.spread=_f,O.tail=fp,O.take=dp,O.takeRight=mp,O.takeRightWhile=gp,O.takeWhile=vp,O.tap=Op,O.throttle=xf,O.thru=Kl,O.toArray=Mu,O.toPairs=Lu,O.toPairsIn=Cu,O.toPath=Pm,O.toPlainObject=Su,O.transform=Ed,O.unary=wf,O.union=yp,O.unionBy=_p,O.unionWith=xp,O.uniq=wp,O.uniqBy=Mp,O.uniqWith=Tp,O.unset=Ad,O.unzip=Th,O.unzipWith=au,O.update=Pd,O.updateWith=Ld,O.values=Ja,O.valuesIn=Cd,O.without=Sp,O.words=Ou,O.wrap=Mf,O.xor=Ep,O.xorBy=Ap,O.xorWith=Pp,O.zip=Lp,O.zipObject=Cp,O.zipObjectDeep=Rp,O.zipWith=bp,O.entries=Lu,O.entriesIn=Cu,O.extend=Eu,O.extendWith=sh,Ih(O,O),O.add=Cm,O.attempt=Iu,O.camelCase=Id,O.capitalize=Ru,O.ceil=Rm,O.clamp=Rd,O.clone=Sf,O.cloneDeep=Af,O.cloneDeepWith=Pf,O.cloneWith=Ef,O.conformsTo=Lf,O.deburr=bu,O.defaultTo=lm,O.divide=bm,O.endsWith=Dd,O.eq=ao,O.escape=zd,O.escapeRegExp=Nd,O.every=kp,O.find=Wp,O.findIndex=iu,O.findKey=rd,O.findLast=jp,O.findLastIndex=nu,O.findLastKey=od,O.floor=Om,O.forEach=hu,O.forEachRight=uu,O.forIn=sd,O.forInRight=ad,O.forOwn=ld,O.forOwnRight=hd,O.get=Lh,O.gt=Cf,O.gte=Rf,O.has=pd,O.hasIn=Ch,O.head=ou,O.identity=vr,O.includes=Jp,O.indexOf=jc,O.inRange=bd,O.invoke=md,O.isArguments=wa,O.isArray=ii,O.isArrayBuffer=bf,O.isArrayLike=mr,O.isArrayLikeObject=vn,O.isBoolean=Of,O.isBuffer=Gs,O.isDate=If,O.isElement=Df,O.isEmpty=zf,O.isEqual=Nf,O.isEqualWith=Bf,O.isError=Ah,O.isFinite=Uf,O.isFunction=ns,O.isInteger=yu,O.isLength=rh,O.isMap=_u,O.isMatch=Ff,O.isMatchWith=Gf,O.isNaN=Hf,O.isNative=kf,O.isNil=Wf,O.isNull=Vf,O.isNumber=xu,O.isObject=rn,O.isObjectLike=dn,O.isPlainObject=Al,O.isRegExp=Ph,O.isSafeInteger=jf,O.isSet=wu,O.isString=oh,O.isSymbol=Er,O.isTypedArray=Za,O.isUndefined=Xf,O.isWeakMap=qf,O.isWeakSet=Yf,O.join=Jc,O.kebabCase=Bd,O.last=qr,O.lastIndexOf=$c,O.lowerCase=Ud,O.lowerFirst=Fd,O.lt=Zf,O.lte=Jf,O.max=Im,O.maxBy=Dm,O.mean=zm,O.meanBy=Nm,O.min=Bm,O.minBy=Um,O.stubArray=zh,O.stubFalse=Nh,O.stubObject=Tm,O.stubString=Sm,O.stubTrue=Em,O.multiply=Fm,O.nth=Qc,O.noConflict=mm,O.noop=Dh,O.now=eh,O.pad=Gd,O.padEnd=Hd,O.padStart=kd,O.parseInt=Vd,O.random=Od,O.reduce=ef,O.reduceRight=nf,O.repeat=Wd,O.replace=jd,O.result=Md,O.round=Gm,O.runInContext=lt,O.sample=of,O.size=lf,O.snakeCase=Xd,O.some=hf,O.sortedIndex=op,O.sortedIndexBy=sp,O.sortedIndexOf=ap,O.sortedLastIndex=lp,O.sortedLastIndexBy=hp,O.sortedLastIndexOf=up,O.startCase=Yd,O.startsWith=Zd,O.subtract=Hm,O.sum=km,O.sumBy=Vm,O.template=Jd,O.times=Am,O.toFinite=rs,O.toInteger=si,O.toLength=Tu,O.toLower=$d,O.toNumber=Yr,O.toSafeInteger=$f,O.toString=Oi,O.toUpper=Qd,O.trim=Kd,O.trimEnd=tm,O.trimStart=em,O.truncate=im,O.unescape=nm,O.uniqueId=Lm,O.upperCase=rm,O.upperFirst=Rh,O.each=hu,O.eachRight=uu,O.first=ou,Ih(O,function(){var r={};return dr(O,function(a,u){ai.call(O.prototype,u)||(r[u]=a)}),r}(),{chain:!1}),O.VERSION=pt,zi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){O[r].placeholder=O}),zi(["drop","take"],function(r,a){ri.prototype[r]=function(u){u=u===_?1:Ki(si(u),0);var m=this.__filtered__&&!a?new ri(this):this.clone();return m.__filtered__?m.__takeCount__=An(u,m.__takeCount__):m.__views__.push({size:An(u,Qe),type:r+(m.__dir__<0?"Right":"")}),m},ri.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),zi(["filter","map","takeWhile"],function(r,a){var u=a+1,m=u==se||u==Et;ri.prototype[r]=function(L){var G=this.clone();return G.__iteratees__.push({iteratee:Ve(L,3),type:u}),G.__filtered__=G.__filtered__||m,G}}),zi(["head","last"],function(r,a){var u="take"+(a?"Right":"");ri.prototype[r]=function(){return this[u](1).value()[0]}}),zi(["initial","tail"],function(r,a){var u="drop"+(a?"":"Right");ri.prototype[r]=function(){return this.__filtered__?new ri(this):this[u](1)}}),ri.prototype.compact=function(){return this.filter(vr)},ri.prototype.find=function(r){return this.filter(r).head()},ri.prototype.findLast=function(r){return this.reverse().find(r)},ri.prototype.invokeMap=Wt(function(r,a){return typeof r=="function"?new ri(this):this.map(function(u){return e(u,r,a)})}),ri.prototype.reject=function(r){return this.filter(nh(Ve(r)))},ri.prototype.slice=function(r,a){r=si(r);var u=this;return u.__filtered__&&(r>0||a<0)?new ri(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),a!==_&&(a=si(a),u=a<0?u.dropRight(-a):u.take(a-r)),u)},ri.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},ri.prototype.toArray=function(){return this.take(Qe)},dr(ri.prototype,function(r,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),m=/^(?:head|last)$/.test(a),L=O[m?"take"+(a=="last"?"Right":""):a],G=m||/^find/.test(a);L&&(O.prototype[a]=function(){var J=this.__wrapped__,ot=m?[1]:arguments,mt=J instanceof ri,Ht=ot[0],jt=mt||ii(J),Jt=function(di){var wi=L.apply(O,Dr([di],ot));return m&&ve?wi[0]:wi};jt&&u&&typeof Ht=="function"&&Ht.length!=1&&(mt=jt=!1);var ve=this.__chain__,De=!!this.__actions__.length,Xe=G&&!ve,li=mt&&!De;if(!G&&jt){J=li?J:new ri(this);var qe=r.apply(J,ot);return qe.__actions__.push({func:Kl,args:[Jt],thisArg:_}),new Cn(qe,ve)}return Xe&&li?r.apply(this,ot):(qe=this.thru(Jt),Xe?m?qe.value()[0]:qe.value():qe)})}),zi(["pop","push","shift","sort","splice","unshift"],function(r){var a=mn[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",m=/^(?:pop|shift)$/.test(r);O.prototype[r]=function(){var L=arguments;if(m&&!this.__chain__){var G=this.value();return a.apply(ii(G)?G:[],L)}return this[u](function(J){return a.apply(ii(J)?J:[],L)})}}),dr(ri.prototype,function(r,a){var u=O[a];if(u){var m=u.name+"";ai.call(wo,m)||(wo[m]=[]),wo[m].push({name:a,func:u})}}),wo[Ni(_,y).name]=[{name:"wrapper",func:_}],ri.prototype.clone=Rs,ri.prototype.reverse=Fl,ri.prototype.value=bs,O.prototype.at=Ip,O.prototype.chain=Dp,O.prototype.commit=zp,O.prototype.next=Np,O.prototype.plant=Up,O.prototype.reverse=Fp,O.prototype.toJSON=O.prototype.valueOf=O.prototype.value=Gp,O.prototype.first=O.prototype.head,xo&&(O.prototype[xo]=Bp),O},yo=lh();xr?((xr.exports=yo)._=yo,co._=yo):Qi._=yo}).call($a)}(Rl,Rl.exports);var oc=Rl.exports;const sc=rc(oc);class ac{constructor($,_=[]){Nu(this,"simplifyFunc",$=>{try{$=turf.simplify($,{tolerance:5e-4,highQuality:!1,mutate:!0})}catch{}return $});mars3d?(this.map=$,this.vectorArr=_,this.geoJsonType=new Map([["Point"],["LineString"],["Polygon"],["MultiPoint"],["MultiLineString"],["MultiPolygon"]]),this.avoidanceArr=[],this.editDate={id:""}):console.error("未引入指定插件")}remove($){this.map.removeLayer(this.map.getLayer($,"vectorId")),window.dynamicMasking.remove($)}add($,_){return new Promise((pt,gt)=>{let S;if(typeof $!="object"){let vt=this.map.getLayer($,"vectorId");if(vt)return pt(vt);S=this.query($)}else{let vt=this.map.getLayer($.id,"vectorId");if(vt)return pt(vt);S=$}let{value:Mt,url:kt,id:nt,title:Tt}=S;new Cesium.Resource({url:kt}).fetchJson().then(vt=>{let{id:Nt,title:Ut,shpInfo:Ct}=S,{attributes:at,geometryType:Y,geometryCount:y,pointCount:x}=Ct,{width:B,materialType:E,materialOptions:Z,clampToGround:z,distanceDisplayCondition:X,distanceDisplayCondition_near:it,distanceDisplayCondition_far:_t,zIndex:dt,label:zt,fill:Yt,diffHeight:re,outline:se,outlineStyle:we,color:Et,pixelSize:ie,outlineColor:ze,outlineWidth:on}=JSON.parse(at),Ft;switch(console.log("geometryType",Y),zt.color=Cesium.Color.fromCssColorString(zt.color).withAlpha(0),zt.outlineColor=Cesium.Color.fromCssColorString(zt.outlineColor).withAlpha(.001),zt.backgroundColor=Cesium.Color.fromCssColorString(zt.backgroundColor).withAlpha(.001),zt.background=!1,zt.outline=!1,zt.show=!1,Y){case"LineString":case"MultiLineString":zt.backgroundPadding=5,Ft=new mars3d.layer.GeoJsonLayer({data:vt,vectorId:Nt,format:x>1e4?this.simplifyFunc:null,symbol:{type:"polylineC",styleOptions:{width:B,clampToGround:z,distanceDisplayCondition:X,distanceDisplayCondition_far:_t,distanceDisplayCondition_near:it,materialType:E,materialOptions:Z,label:zt}},popup:` ${Ut} `,hasZIndex:!0,zIndex:dt});break;case"Polygon":case"MultiPolygon":console.log("attributes",E,Z),E=="PolyGrass"&&(Z={evenColor:new Cesium.Color(.25,.4,.1,1),oddColor:new Cesium.Color(.1,.1,.1,1),frequency:1.5}),Ft=new mars3d.layer.GeoJsonLayer({data:vt,vectorId:Nt,format:x>1e4?this.simplifyFunc:null,symbol:{type:"polygon",styleOptions:{fill:Yt,diffHeight:re,clampToGround:z,materialType:E,materialOptions:Z,distanceDisplayCondition:X,distanceDisplayCondition_far:_t,distanceDisplayCondition_near:it,outlineStyle:we,outline:se,label:zt}},popup:` ${Ut} `});break;case"Point":case"MultiPoint":console.log(JSON.parse(at)),Ft=new mars3d.layer.GeoJsonLayer({data:vt,vectorId:Nt,format:x>1e4?this.simplifyFunc:null,symbol:{type:"pointP",styleOptions:{color:Et,pixelSize:ie,outline:se,outlineColor:ze,outlineWidth:on,visibleDepth:!1,label:zt}}});break}window.map.addLayer(Ft),Ft.bindPopup(Ii=>{console.log("event",Ii)});let Qe=sc.debounce(Ii=>{console.log("测试shp矢量加载完成"),window.dynamicMasking.add(Ii,JSON.parse(at))},500);Ft.readyPromise.then(Ii=>{Qe(Ii),pt(Ii)}).catch(Ii=>{console.error("测试shp矢量加载失败",Ii),pt({tite:"【矢量】"+modelTitle+"加载失败",type:"error",id:modelId,url:kt})})}).catch(vt=>{console.error("数据有误",vt),pt({tite:"【矢量】"+modelTitle+"数据有误",type:"error",id:modelId,url:kt})})})}updateData($){this.vectorArr=$}processingKML($){let _,pt=2e3,gt=!0,{kmlInfo:S}=$,{fill:Mt,areaColor:kt,areaSideColor:nt,transparency:Tt,isAreaSideColor:Rt,minDistinct:vt,textDistinct:Nt,textSize:Ut,textColor:Ct,fontStyle:at,outLine:Y,sideColor:y,backGround:x,backGroundColor:B,clampToGround:E}=S;console.log("minDistinct",vt);let Z={fill:Mt,color:kt,opacity:Tt||.5,outline:Rt,outlineColor:nt,outlineWidth:2,clampToGround:E,distanceDisplayCondition:!0,distanceDisplayCondition_far:Nt||1e6,distanceDisplayCondition_near:vt||0,classificationType:_,opacity:String(Tt)},z={text:"{name}",horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffsetY:-10,font_size:26,color:Ct||"#ffffff",font_family:at||"黑体",outline:Y||!0,outlineColor:y||"#000000",outlineWidth:4,scaleByDistance:!0,distanceDisplayCondition:!0,distanceDisplayCondition_far:Nt||1e6,distanceDisplayCondition_near:vt||0,background:x||!1,backgroundColor:B||"",visibleDepth:gt,clampToGround:E||!1,disableDepthTestDistance:pt};return{...Z,label:z}}selected($){this.map.getLayer($,"vectorId").flyTo()}query($){return this.vectorArr.length==0?!1:this.vectorArr.find(_=>_.id==$)}editVector($,_,pt){let gt=this.map.getLayer($,"vectorId"),S=nc(_,pt);console.log("编辑数据",S),gt&&(gt.eachGraphic(Mt=>{Mt.label.show===!1&&(delete Mt.label.outline,delete Mt.label.background,delete Mt.label.outlineColor,delete Mt.label.backgroundColor),Mt.setStyle({...S})}),dynamicMasking.modify($,S))}nationalBoundaries(){let $="./gis/nationalBoundaries.json",_=new mars3d.layer.GeoJsonLayer({name:"国界",url:$,format:pt=>{try{pt=turf.simplify(pt,{tolerance:1e-5,highQuality:!1,mutate:!0})}catch(gt){console.error(gt)}return pt},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(_)}}class lc{constructor($,_=[]){mars3d?(this.map=$,this.terrainProviderArr=_,this.terrainProviderId="",this.events={},this.map.on(mars3d.EventType.terrainLoadError,pt=>{console.error("地形服务加载失败",pt),this.hide()}),this.map.viewer.scene.globe.tileLoadProgressEvent.addEventListener(pt=>{this.map.viewer.scene.globe.tilesLoaded&&this.emit("load",pt)})):console.error("未引入指定插件")}add($){let{url:_,id:pt}=$;if(this.terrainProviderId==pt&&this.map.terrainProvider._layers)return!1;this.map.terrainProvider=mars3d.LayerUtil.createTerrainProvider({imageXyzId:pt,type:"xyz",url:_,requestVertexNormals:!0,requestMetadata:!0}),this.terrainProviderId=pt}show(){this.map.hasTerrain=!0}hide(){this.map.hasTerrain=!1}on($,_){$=="load"?this.events[$]?this.events[$].push(_):this.events[$]=[_]:console.log("未开放自定义")}emit($,..._){this.events[$]!=null&&this.events[$].forEach(pt=>pt(..._))}off($,_){this.events[$]=this.events[$].filter(pt=>pt!==_)}once($,_){const pt=()=>{_(),this.off($,pt)};this.on($,pt)}addClip($){return new Promise((_,pt)=>{window.bimClip?_(bimClip.clipGisAdd($)):pt("挖洞工具未初始化")})}}class hc{constructor($,_=[]){mars3d?(this.map=$,this.elevationImageArr=_,this.elevationImageLayer,this.form={brightnessVal:1.3,msaaSamples:4,surfaceOpacity:1,layerOpacity:1,layerBrightness:2,layerContrast:1,layerHue:0,layerSaturation:1,layerGamma:1}):console.error("未引入指定插件")}pushVector($){this.elevationImageArr.push($)}add($,_){let pt;if(typeof $!="object"?pt=$:pt=$.imageXyzId,this.map.getLayer(pt,"imageXyzId"))return!1;const{layerOpacity:gt,layerBrightness:S,layerContrast:Mt,layerHue:kt,layerSaturation:nt,layerGamma:Tt,surfaceOpacity:Rt}=this.exposureEnvironmentSettings();return new Promise((vt,Nt)=>{let Ut,Ct,at;if(typeof $!="object"){let Y=this.query($);Y||Nt("缺少树结构");let{gisInfo:y}=Y;Ut=y.id,at=y.order,Ct=Y.url}else Ut=$.imageXyzId,Ct=$.url,at=$.zIndex;this.elevationImageLayer=new mars3d.layer.XyzLayer({imageXyzId:Ut,type:"xyz",url:Ct,hasZIndex:!0,zIndex:at.toString(),brightness:S,opacity:gt,saturation:nt,contrast:Mt,hue:kt,gamma:Tt,alpha:Rt,show:!0}),this.elevationImageLayer.on(mars3d.EventType.load,Y=>{vt(Y)}),this.map.addLayer(this.elevationImageLayer),_&&Object.keys(_).forEach(Y=>{this.elevationImageLayer.on(fnType.get(Y),y=>{_[Y](y)})})})}remove($){console.log($),this.map.removeLayer(this.map.getLayer($,"imageXyzId"))}query($){return this.elevationImageArr.length==0?!1:this.elevationImageArr.find(_=>_.id==$)}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)))}}const uc=[Bh,Gh],cc={continuation:null,mapModali:null,install(g){if(uc.forEach((Mt,kt)=>{g.component(Mt.name,Mt)}),this.continuation){g.config.globalProperties.$continuation=this.continuation;return}let $=ke.createApp(Uh),_=document.createElement("div"),pt=document.body;if(pt.appendChild(_),this.loading=$.mount(_),g.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){g.config.globalProperties.$mapModali=this.mapModali;return}let gt=ke.createApp(Fh),S=document.createElement("div");pt.appendChild(S),this.mapModali=gt.mount(S),g.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};Zi.BimBackgroundPlate=Gh,Zi.BimCutscenes=Uh,Zi.BimElevationImage=hc,Zi.BimModel=ic,Zi.BimTerrainProvider=lc,Zi.BimVector=ac,Zi.Button=Bh,Zi.ChbimPlugins=cc,Zi.MapModali=Fh,Object.defineProperty(Zi,Symbol.toStringTag,{value:"Module"})});
|
|
2634
|
+
`)+fe+`return __p
|
|
2635
|
+
}`;var Mi=Uu(function(){return Bi(st,Je+"return "+fe).apply(d,yt)});if(Mi.source=fe,Ch(Mi))throw Mi;return Mi}function sm(r){return qi(r).toLowerCase()}function am(r){return qi(r).toUpperCase()}function lm(r,a,u){if(r=qi(r),r&&(u||a===d))return Ss(r);if(!r||!(a=Ye(a)))return r;var _=qn(r),k=qn(a),st=xo(_,k),yt=Go(_,k)+1;return dn(_,st,yt).join("")}function hm(r,a,u){if(r=qi(r),r&&(u||a===d))return r.slice(0,Es(r)+1);if(!r||!(a=Ye(a)))return r;var _=qn(r),k=Go(_,qn(a))+1;return dn(_,0,k).join("")}function um(r,a,u){if(r=qi(r),r&&(u||a===d))return r.replace(Ir,"");if(!r||!(a=Ye(a)))return r;var _=qn(r),k=xo(_,qn(a));return dn(_,k).join("")}function cm(r,a){var u=gt,_=Nt;if(mn(a)){var k="separator"in a?a.separator:k;u="length"in a?wi(a.length):u,_="omission"in a?Ye(a.omission):_}r=qi(r);var st=r.length;if(pr(r)){var yt=qn(r);st=yt.length}if(u>=st)return r;var St=u-br(_);if(St<1)return _;var Bt=yt?dn(yt,0,St).join(""):r.slice(0,St);if(k===d)return Bt+_;if(yt&&(St+=Bt.length-St),Lh(k)){if(r.slice(St).search(k)){var re,ae=Bt;for(k.global||(k=Gn(k.source,qi(Aa.exec(k))+"g")),k.lastIndex=0;re=k.exec(ae);)var fe=re.index;Bt=Bt.slice(0,fe===d?St:fe)}}else if(r.indexOf(Ye(k),St)!=St){var ze=Bt.lastIndexOf(k);ze>-1&&(Bt=Bt.slice(0,ze))}return Bt+_}function fm(r){return r=qi(r),r&&fo.test(r)?r.replace(Kr,Ba):r}var pm=De(function(r,a,u){return r+(u?" ":"")+a.toUpperCase()}),Ih=Me("toUpperCase");function ku(r,a,u){return r=qi(r),a=u?d:a,a===d?jo(r)?uh(r):Qs(r):r.match(a)||[]}var Uu=se(function(r,a){try{return nr(r,d,a)}catch(u){return Ch(u)?u:new ai(u)}}),dm=rs(function(r,a){return Yi(a,function(u){u=Lo(u),ao(r,u,Ah(r[u],r))}),r});function mm(r){var a=r==null?0:r.length,u=si();return r=a?Xi(r,function(_){if(typeof _[1]!="function")throw new Yn(P);return[u(_[0]),_[1]]}):[],se(function(_){for(var k=-1;++k<a;){var st=r[k];if(nr(st[0],this,_))return nr(st[1],this,_)}})}function gm(r){return Ns(sr(r,G))}function Dh(r){return function(){return r}}function vm(r,a){return r==null||r!==r?a:r}var ym=Li(),_m=Li(!0);function wr(r){return r}function zh(r){return C(typeof r=="function"?r:sr(r,G))}function xm(r){return mt(sr(r,G))}function wm(r,a){return bt(r,sr(a,G))}var Tm=se(function(r,a){return function(u){return e(u,r,a)}}),Mm=se(function(r,a){return function(u){return e(r,u,a)}});function Bh(r,a,u){var _=Un(a),k=es(a,_);u==null&&!(mn(a)&&(k.length||!_.length))&&(u=a,a=r,r=this,k=es(a,Un(a)));var st=!(mn(u)&&"chain"in u)||!!u.chain,yt=ss(r);return Yi(k,function(St){var Bt=a[St];r[St]=Bt,yt&&(r.prototype[St]=function(){var re=this.__chain__;if(st||re){var ae=r(this.__wrapped__),fe=ae.__actions__=Wn(this.__actions__);return fe.push({func:Bt,args:arguments,thisArg:r}),ae.__chain__=re,ae}return Bt.apply(r,Nr([this.value()],arguments))})}),r}function Sm(){return un._===this&&(un._=Ar),this}function Nh(){}function Em(r){return r=wi(r),se(function(a){return V(a,r)})}var bm=Cn(Xi),Am=Cn(ol),Pm=Cn(Qr);function Fu(r){return wh(r)?vo(Lo(r)):$t(r)}function Cm(r){return function(a){return r==null?d:Po(r,a)}}var Lm=Ml(),Rm=Ml(!0);function kh(){return[]}function Uh(){return!1}function Om(){return{}}function Im(){return""}function Dm(){return!0}function zm(r,a){if(r=wi(r),r<1||r>ge)return[];var u=Dt,_=Dn(r,Dt);a=si(a),r-=Dt;for(var k=eo(_,a);++u<r;)a(u);return k}function Bm(r){return vi(r)?Xi(r,Lo):Cr(r)?[r]:Wn(su(qi(r)))}function Nm(r){var a=++Jn;return qi(r)+a}var km=ar(function(r,a){return r+a},0),Um=Za("ceil"),Fm=ar(function(r,a){return r/a},1),Gm=Za("floor");function Hm(r){return r&&r.length?qr(r,wr,Xa):d}function Vm(r,a){return r&&r.length?qr(r,si(a,2),Xa):d}function Wm(r){return Ms(r,wr)}function jm(r,a){return Ms(r,si(a,2))}function Xm(r){return r&&r.length?qr(r,wr,Q):d}function qm(r,a){return r&&r.length?qr(r,si(a,2),Q):d}var Ym=ar(function(r,a){return r*a},1),Zm=Za("round"),Jm=ar(function(r,a){return r-a},0);function $m(r){return r&&r.length?_o(r,wr):0}function Km(r,a){return r&&r.length?_o(r,si(a,2)):0}return $.after=xp,$.ary=vu,$.assign=ad,$.assignIn=Ru,$.assignInWith=ah,$.assignWith=ld,$.at=hd,$.before=yu,$.bind=Ah,$.bindAll=dm,$.bindKey=_u,$.castArray=Op,$.chain=du,$.chunk=Fc,$.compact=Gc,$.concat=Hc,$.cond=mm,$.conforms=gm,$.constant=Dh,$.countBy=$f,$.create=ud,$.curry=xu,$.curryRight=wu,$.debounce=Tu,$.defaults=cd,$.defaultsDeep=fd,$.defer=wp,$.delay=Tp,$.difference=Vc,$.differenceBy=Wc,$.differenceWith=jc,$.drop=Xc,$.dropRight=qc,$.dropRightWhile=Yc,$.dropWhile=Zc,$.fill=Jc,$.filter=Qf,$.flatMap=ip,$.flatMapDeep=np,$.flatMapDepth=rp,$.flatten=uu,$.flattenDeep=$c,$.flattenDepth=Kc,$.flip=Mp,$.flow=ym,$.flowRight=_m,$.fromPairs=Qc,$.functions=_d,$.functionsIn=xd,$.groupBy=op,$.initial=ef,$.intersection=nf,$.intersectionBy=rf,$.intersectionWith=of,$.invert=Td,$.invertBy=Md,$.invokeMap=ap,$.iteratee=zh,$.keyBy=lp,$.keys=Un,$.keysIn=xr,$.map=eh,$.mapKeys=Ed,$.mapValues=bd,$.matches=xm,$.matchesProperty=wm,$.memoize=nh,$.merge=Ad,$.mergeWith=Ou,$.method=Tm,$.methodOf=Mm,$.mixin=Bh,$.negate=rh,$.nthArg=Em,$.omit=Pd,$.omitBy=Cd,$.once=Sp,$.orderBy=hp,$.over=bm,$.overArgs=Ep,$.overEvery=Am,$.overSome=Pm,$.partial=Ph,$.partialRight=Mu,$.partition=up,$.pick=Ld,$.pickBy=Iu,$.property=Fu,$.propertyOf=Cm,$.pull=hf,$.pullAll=fu,$.pullAllBy=uf,$.pullAllWith=cf,$.pullAt=ff,$.range=Lm,$.rangeRight=Rm,$.rearg=bp,$.reject=pp,$.remove=pf,$.rest=Ap,$.reverse=Eh,$.sampleSize=mp,$.set=Od,$.setWith=Id,$.shuffle=gp,$.slice=df,$.sortBy=_p,$.sortedUniq=wf,$.sortedUniqBy=Tf,$.split=im,$.spread=Pp,$.tail=Mf,$.take=Sf,$.takeRight=Ef,$.takeRightWhile=bf,$.takeWhile=Af,$.tap=Hf,$.throttle=Cp,$.thru=th,$.toArray=Pu,$.toPairs=Du,$.toPairsIn=zu,$.toPath=Bm,$.toPlainObject=Lu,$.transform=Dd,$.unary=Lp,$.union=Pf,$.unionBy=Cf,$.unionWith=Lf,$.uniq=Rf,$.uniqBy=Of,$.uniqWith=If,$.unset=zd,$.unzip=bh,$.unzipWith=pu,$.update=Bd,$.updateWith=Nd,$.values=Ka,$.valuesIn=kd,$.without=Df,$.words=ku,$.wrap=Rp,$.xor=zf,$.xorBy=Bf,$.xorWith=Nf,$.zip=kf,$.zipObject=Uf,$.zipObjectDeep=Ff,$.zipWith=Gf,$.entries=Du,$.entriesIn=zu,$.extend=Ru,$.extendWith=ah,Bh($,$),$.add=km,$.attempt=Uu,$.camelCase=Hd,$.capitalize=Bu,$.ceil=Um,$.clamp=Ud,$.clone=Ip,$.cloneDeep=zp,$.cloneDeepWith=Bp,$.cloneWith=Dp,$.conformsTo=Np,$.deburr=Nu,$.defaultTo=vm,$.divide=Fm,$.endsWith=Vd,$.eq=uo,$.escape=Wd,$.escapeRegExp=jd,$.every=Kf,$.find=tp,$.findIndex=lu,$.findKey=pd,$.findLast=ep,$.findLastIndex=hu,$.findLastKey=dd,$.floor=Gm,$.forEach=mu,$.forEachRight=gu,$.forIn=md,$.forInRight=gd,$.forOwn=vd,$.forOwnRight=yd,$.get=Rh,$.gt=kp,$.gte=Up,$.has=wd,$.hasIn=Oh,$.head=cu,$.identity=wr,$.includes=sp,$.indexOf=tf,$.inRange=Fd,$.invoke=Sd,$.isArguments=Ma,$.isArray=vi,$.isArrayBuffer=Fp,$.isArrayLike=_r,$.isArrayLikeObject=bn,$.isBoolean=Gp,$.isBuffer=Hs,$.isDate=Hp,$.isElement=Vp,$.isEmpty=Wp,$.isEqual=jp,$.isEqualWith=Xp,$.isError=Ch,$.isFinite=qp,$.isFunction=ss,$.isInteger=Su,$.isLength=oh,$.isMap=Eu,$.isMatch=Yp,$.isMatchWith=Zp,$.isNaN=Jp,$.isNative=$p,$.isNil=Qp,$.isNull=Kp,$.isNumber=bu,$.isObject=mn,$.isObjectLike=Mn,$.isPlainObject=Al,$.isRegExp=Lh,$.isSafeInteger=td,$.isSet=Au,$.isString=sh,$.isSymbol=Cr,$.isTypedArray=$a,$.isUndefined=ed,$.isWeakMap=id,$.isWeakSet=nd,$.join=sf,$.kebabCase=Xd,$.last=Jr,$.lastIndexOf=af,$.lowerCase=qd,$.lowerFirst=Yd,$.lt=rd,$.lte=od,$.max=Hm,$.maxBy=Vm,$.mean=Wm,$.meanBy=jm,$.min=Xm,$.minBy=qm,$.stubArray=kh,$.stubFalse=Uh,$.stubObject=Om,$.stubString=Im,$.stubTrue=Dm,$.multiply=Ym,$.nth=lf,$.noConflict=Sm,$.noop=Nh,$.now=ih,$.pad=Zd,$.padEnd=Jd,$.padStart=$d,$.parseInt=Kd,$.random=Gd,$.reduce=cp,$.reduceRight=fp,$.repeat=Qd,$.replace=tm,$.result=Rd,$.round=Zm,$.runInContext=At,$.sample=dp,$.size=vp,$.snakeCase=em,$.some=yp,$.sortedIndex=mf,$.sortedIndexBy=gf,$.sortedIndexOf=vf,$.sortedLastIndex=yf,$.sortedLastIndexBy=_f,$.sortedLastIndexOf=xf,$.startCase=nm,$.startsWith=rm,$.subtract=Jm,$.sum=$m,$.sumBy=Km,$.template=om,$.times=zm,$.toFinite=as,$.toInteger=wi,$.toLength=Cu,$.toLower=sm,$.toNumber=$r,$.toSafeInteger=sd,$.toString=qi,$.toUpper=am,$.trim=lm,$.trimEnd=hm,$.trimStart=um,$.truncate=cm,$.unescape=fm,$.uniqueId=Nm,$.upperCase=pm,$.upperFirst=Ih,$.each=mu,$.eachRight=gu,$.first=cu,Bh($,function(){var r={};return yr($,function(a,u){Ti.call($.prototype,u)||(r[u]=a)}),r}(),{chain:!1}),$.VERSION=nt,Yi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){$[r].placeholder=$}),Yi(["drop","take"],function(r,a){_i.prototype[r]=function(u){u=u===d?1:cn(wi(u),0);var _=this.__filtered__&&!a?new _i(this):this.clone();return _.__filtered__?_.__takeCount__=Dn(u,_.__takeCount__):_.__views__.push({size:Dn(u,Dt),type:r+(_.__dir__<0?"Right":"")}),_},_i.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),Yi(["filter","map","takeWhile"],function(r,a){var u=a+1,_=u==I||u==Pt;_i.prototype[r]=function(k){var st=this.clone();return st.__iteratees__.push({iteratee:si(k,3),type:u}),st.__filtered__=st.__filtered__||_,st}}),Yi(["head","last"],function(r,a){var u="take"+(a?"Right":"");_i.prototype[r]=function(){return this[u](1).value()[0]}}),Yi(["initial","tail"],function(r,a){var u="drop"+(a?"":"Right");_i.prototype[r]=function(){return this.__filtered__?new _i(this):this[u](1)}}),_i.prototype.compact=function(){return this.filter(wr)},_i.prototype.find=function(r){return this.filter(r).head()},_i.prototype.findLast=function(r){return this.reverse().find(r)},_i.prototype.invokeMap=se(function(r,a){return typeof r=="function"?new _i(this):this.map(function(u){return e(u,r,a)})}),_i.prototype.reject=function(r){return this.filter(rh(si(r)))},_i.prototype.slice=function(r,a){r=wi(r);var u=this;return u.__filtered__&&(r>0||a<0)?new _i(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),a!==d&&(a=wi(a),u=a<0?u.dropRight(-a):u.take(a-r)),u)},_i.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},_i.prototype.toArray=function(){return this.take(Dt)},yr(_i.prototype,function(r,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),_=/^(?:head|last)$/.test(a),k=$[_?"take"+(a=="last"?"Right":""):a],st=_||/^find/.test(a);k&&($.prototype[a]=function(){var yt=this.__wrapped__,St=_?[1]:arguments,Bt=yt instanceof _i,re=St[0],ae=Bt||vi(yt),fe=function(Ci){var Ni=k.apply($,Nr([Ci],St));return _&&ze?Ni[0]:Ni};ae&&u&&typeof re=="function"&&re.length!=1&&(Bt=ae=!1);var ze=this.__chain__,Je=!!this.__actions__.length,hi=st&&!ze,Mi=Bt&&!Je;if(!st&&ae){yt=Mi?yt:new _i(this);var ui=r.apply(yt,St);return ui.__actions__.push({func:th,args:[fe],thisArg:d}),new Bn(ui,ze)}return hi&&Mi?r.apply(this,St):(ui=this.thru(fe),hi?_?ui.value()[0]:ui.value():ui)})}),Yi(["pop","push","shift","sort","splice","unshift"],function(r){var a=Sn[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",_=/^(?:pop|shift)$/.test(r);$.prototype[r]=function(){var k=arguments;if(_&&!this.__chain__){var st=this.value();return a.apply(vi(st)?st:[],k)}return this[u](function(yt){return a.apply(vi(yt)?yt:[],k)})}}),yr(_i.prototype,function(r,a){var u=$[a];if(u){var _=u.name+"";Ti.call(So,_)||(So[_]=[]),So[_].push({name:a,func:u})}}),So[Zi(d,p).name]=[{name:"wrapper",func:d}],_i.prototype.clone=Os,_i.prototype.reverse=Fl,_i.prototype.value=Is,$.prototype.at=Vf,$.prototype.chain=Wf,$.prototype.commit=jf,$.prototype.next=Xf,$.prototype.plant=Yf,$.prototype.reverse=Zf,$.prototype.toJSON=$.prototype.valueOf=$.prototype.value=Jf,$.prototype.first=$.prototype.head,Mo&&($.prototype[Mo]=qf),$},wo=ch();Sr?((Sr.exports=wo)._=wo,mo._=wo):un._=wo}).call(ur)}(Ll,Ll.exports);var hc=Ll.exports;const hh=lh(hc);class uc{constructor(ht,d=[]){Fh(this,"simplifyFunc",ht=>{try{ht=turf.simplify(ht,{tolerance:5e-4,highQuality:!1,mutate:!0})}catch{}return ht});mars3d?(this.map=ht,this.vectorArr=d,this.geoJsonType=new Map([["Point"],["LineString"],["Polygon"],["MultiPoint"],["MultiLineString"],["MultiPolygon"]]),this.avoidanceArr=[],this.editDate={id:""}):console.error("未引入指定插件")}remove(ht){this.map.removeLayer(this.map.getLayer(ht,"vectorId")),window.dynamicMasking.remove(ht)}add(ht,d){return new Promise((nt,H)=>{let m;if(typeof ht!="object"){let G=this.map.getLayer(ht,"vectorId");if(G)return nt(G);m=this.query(ht)}else{let G=this.map.getLayer(ht.id,"vectorId");if(G)return nt(G);m=ht}let{value:P,url:D,id:A,title:F}=m;new Cesium.Resource({url:D}).fetchJson().then(G=>{let{id:J,title:B,shpInfo:q}=m,{attributes:E,geometryType:b,geometryCount:p,pointCount:g}=q,{width:S,materialType:x,materialOptions:U,clampToGround:z,distanceDisplayCondition:j,distanceDisplayCondition_near:lt,distanceDisplayCondition_far:ft,zIndex:gt,label:Nt,fill:at,diffHeight:Et,outline:I,outlineStyle:zt,color:Pt,pixelSize:Rt,outlineColor:ge,outlineWidth:ue}=JSON.parse(E),Ft;switch(console.log("geometryType",b),Nt.color=Cesium.Color.fromCssColorString(Nt.color).withAlpha(0),Nt.outlineColor=Cesium.Color.fromCssColorString(Nt.outlineColor).withAlpha(.001),Nt.backgroundColor=Cesium.Color.fromCssColorString(Nt.backgroundColor).withAlpha(.001),Nt.background=!1,Nt.outline=!1,Nt.show=!1,b){case"LineString":case"MultiLineString":Nt.backgroundPadding=5,Ft=new mars3d.layer.GeoJsonLayer({data:G,vectorId:J,format:g>1e4?this.simplifyFunc:null,symbol:{type:"polylineC",styleOptions:{width:S,clampToGround:z,distanceDisplayCondition:j,distanceDisplayCondition_far:ft,distanceDisplayCondition_near:lt,materialType:x,materialOptions:U,label:Nt}},popup:` ${B} `,hasZIndex:!0,zIndex:gt});break;case"Polygon":case"MultiPolygon":console.log("attributes",x,U),x=="PolyGrass"&&(U={evenColor:new Cesium.Color(.25,.4,.1,1),oddColor:new Cesium.Color(.1,.1,.1,1),frequency:1.5}),Ft=new mars3d.layer.GeoJsonLayer({data:G,vectorId:J,format:g>1e4?this.simplifyFunc:null,symbol:{type:"polygon",styleOptions:{fill:at,diffHeight:Et,clampToGround:z,materialType:x,materialOptions:U,distanceDisplayCondition:j,distanceDisplayCondition_far:ft,distanceDisplayCondition_near:lt,outlineStyle:zt,outline:I,label:Nt}},popup:` ${B} `});break;case"Point":case"MultiPoint":console.log(JSON.parse(E)),Ft=new mars3d.layer.GeoJsonLayer({data:G,vectorId:J,format:g>1e4?this.simplifyFunc:null,symbol:{type:"pointP",styleOptions:{color:Pt,pixelSize:Rt,outline:I,outlineColor:ge,outlineWidth:ue,visibleDepth:!1,label:Nt}}});break}window.map.addLayer(Ft),Ft.bindPopup(kt=>{console.log("event",kt)});let Dt=hh.debounce(kt=>{console.log("测试shp矢量加载完成"),window.dynamicMasking.add(kt,JSON.parse(E))},500);Ft.readyPromise.then(kt=>{Dt(kt),nt(kt)}).catch(kt=>{console.error("测试shp矢量加载失败",kt),nt({tite:"【矢量】"+modelTitle+"加载失败",type:"error",id:modelId,url:D})})}).catch(G=>{console.error("数据有误",G),nt({tite:"【矢量】"+modelTitle+"数据有误",type:"error",id:modelId,url:D})})})}updateData(ht){this.vectorArr=ht}processingKML(ht){let d,nt=2e3,H=!0,{kmlInfo:m}=ht,{fill:P,areaColor:D,areaSideColor:A,transparency:F,isAreaSideColor:Z,minDistinct:G,textDistinct:J,textSize:B,textColor:q,fontStyle:E,outLine:b,sideColor:p,backGround:g,backGroundColor:S,clampToGround:x}=m;console.log("minDistinct",G);let U={fill:P,color:D,opacity:F||.5,outline:Z,outlineColor:A,outlineWidth:2,clampToGround:x,distanceDisplayCondition:!0,distanceDisplayCondition_far:J||1e6,distanceDisplayCondition_near:G||0,classificationType:d,opacity:String(F)},z={text:"{name}",horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffsetY:-10,font_size:26,color:q||"#ffffff",font_family:E||"黑体",outline:b||!0,outlineColor:p||"#000000",outlineWidth:4,scaleByDistance:!0,distanceDisplayCondition:!0,distanceDisplayCondition_far:J||1e6,distanceDisplayCondition_near:G||0,background:g||!1,backgroundColor:S||"",visibleDepth:H,clampToGround:x||!1,disableDepthTestDistance:nt};return{...U,label:z}}selected(ht){this.map.getLayer(ht,"vectorId").flyTo()}query(ht){return this.vectorArr.length==0?!1:this.vectorArr.find(d=>d.id==ht)}editVector(ht,d,nt){let H=this.map.getLayer(ht,"vectorId"),m=lc(d,nt);console.log("编辑数据",m),H&&(H.eachGraphic(P=>{P.label.show===!1&&(delete P.label.outline,delete P.label.background,delete P.label.outlineColor,delete P.label.backgroundColor),P.setStyle({...m})}),dynamicMasking.modify(ht,m))}nationalBoundaries(){let ht="./gis/nationalBoundaries.json",d=new mars3d.layer.GeoJsonLayer({name:"国界",url:ht,format:nt=>{try{nt=turf.simplify(nt,{tolerance:1e-5,highQuality:!1,mutate:!0})}catch(H){console.error(H)}return nt},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(d)}}class cc{constructor(ht,d=[]){mars3d?(this.map=ht,this.terrainProviderArr=d,this.terrainProviderId="",this.events={},this.map.on(mars3d.EventType.terrainLoadError,nt=>{console.error("地形服务加载失败",nt),this.hide()}),this.map.viewer.scene.globe.tileLoadProgressEvent.addEventListener(nt=>{this.map.viewer.scene.globe.tilesLoaded&&this.emit("load",nt)})):console.error("未引入指定插件")}add(ht){let{url:d,id:nt}=ht;if(this.terrainProviderId==nt&&this.map.terrainProvider._layers)return!1;this.map.terrainProvider=mars3d.LayerUtil.createTerrainProvider({imageXyzId:nt,type:"xyz",url:d,requestVertexNormals:!0,requestMetadata:!0}),this.terrainProviderId=nt}show(){this.map.hasTerrain=!0}hide(){this.map.hasTerrain=!1}on(ht,d){ht=="load"?this.events[ht]?this.events[ht].push(d):this.events[ht]=[d]:console.log("未开放自定义")}emit(ht,...d){this.events[ht]!=null&&this.events[ht].forEach(nt=>nt(...d))}off(ht,d){this.events[ht]=this.events[ht].filter(nt=>nt!==d)}once(ht,d){const nt=()=>{d(),this.off(ht,nt)};this.on(ht,nt)}addClip(ht){return new Promise((d,nt)=>{window.bimClip?d(bimClip.clipGisAdd(ht)):nt("挖洞工具未初始化")})}}class fc{constructor(ht,d=[]){mars3d?(this.map=ht,this.elevationImageArr=d,this.elevationImageLayer,this.form={brightnessVal:1.3,msaaSamples:4,surfaceOpacity:1,layerOpacity:1,layerBrightness:2,layerContrast:1,layerHue:0,layerSaturation:1,layerGamma:1}):console.error("未引入指定插件")}pushVector(ht){this.elevationImageArr.push(ht)}add(ht,d){let nt;if(typeof ht!="object"?nt=ht:nt=ht.imageXyzId,this.map.getLayer(nt,"imageXyzId"))return!1;const{layerOpacity:H,layerBrightness:m,layerContrast:P,layerHue:D,layerSaturation:A,layerGamma:F,surfaceOpacity:Z}=this.exposureEnvironmentSettings();return new Promise((G,J)=>{let B,q,E;if(typeof ht!="object"){let b=this.query(ht);b||J("缺少树结构");let{gisInfo:p}=b;B=p.id,E=p.order,q=b.url}else B=ht.imageXyzId,q=ht.url,E=ht.zIndex;this.elevationImageLayer=new mars3d.layer.XyzLayer({imageXyzId:B,type:"xyz",url:q,hasZIndex:!0,zIndex:E.toString(),brightness:m,opacity:H,saturation:A,contrast:P,hue:D,gamma:F,alpha:Z,show:!0}),this.elevationImageLayer.on(mars3d.EventType.load,b=>{G(b)}),this.map.addLayer(this.elevationImageLayer),d&&Object.keys(d).forEach(b=>{this.elevationImageLayer.on(fnType.get(b),p=>{d[b](p)})})})}remove(ht){console.log(ht),this.map.removeLayer(this.map.getLayer(ht,"imageXyzId"))}query(ht){return this.elevationImageArr.length==0?!1:this.elevationImageArr.find(d=>d.id==ht)}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 pc{constructor(ht,d,...nt){Fh(this,"manualFreed",hh.debounce(()=>{let{lng:ht,lat:d,alt:nt,pitch:H}=this.map.getCameraView(),m;this.modelArray.forEach(P=>{m=P.releasedDistance?P.releasedDistance:1e4,this.disTance([ht,d,nt],[P.center._lng,P.center._lat,P.center._alt],this.calculateDistance(H,m))?this.map.getLayer(P.id,"modelId")&&this.emit("leave",P):this.map.getLayer(P.id,"modelId")||this.emit("enter",P)})},1e3));mars3d?(ht&&ht!=null&&(this.modelArray=ht),this.showModelArray=[],d&&d!=null&&(this.map=d),this.Cesium=mars3d.Cesium,this.events={}):console.error("未引入指定插件")}on(ht,d){ht=="enter"||ht=="leave"?this.events[ht]?this.events[ht].push(d):this.events[ht]=[d]:console.log("未开放自定义")}emit(ht,...d){this.events[ht]!=null&&this.events[ht].forEach(nt=>nt(...d))}off(ht,d){this.events[ht]=this.events[ht].filter(nt=>nt!==d)}once(ht,d){const nt=()=>{d(),this.off(ht,nt)};this.on(ht,nt)}say(ht){return this[ht]}add(ht,d){this[ht].push(d)}remove(ht,d){this[ht]=this[ht].filter(function(nt){return nt!==d})}initial(){this.modelArray=[],this.events={}}updateCustomExcavationDetails(ht,d,nt,H=[],m={}){let P,D,A;switch(P=this.modelArray.find(F=>F.modelId==ht).customize.bimModelExcavationDetails,A=P.find((F,Z)=>{if(F.id==d)return D=Z,F}),nt){case"delete":P.splice(D,1);break;case"update":A.excavationDetails=H;break;case"add":P.push(m);break;case"edit":A.excavationDetails=m.excavationDetails,A.kId=m.kId;break}return P}resourceRelease(){this.map.viewer.camera.moveEnd.addEventListener(()=>{this.freed()})}freed(){let{alt:ht}=this.map.getCameraView();ht<2e4&&(this.freed=hh.throttle(()=>{let{lng:d,lat:nt,alt:H,pitch:m}=this.map.getCameraView();this.modelArray&&this.modelArray.forEach(P=>{let D=P.bimModel.releasedDistance?P.bimModel.releasedDistance:1e4;P.center&&this.disTance([d,nt,H],[P.center._lng,P.center._lat,P.center._alt],this.calculateDistance(m,D))?this.map.getLayer(P.id,"modelId")&&this.emit("leave",P):this.showModelArray.indexOf(P.id)>=0&&!this.map.getLayer(P.id,"modelId")&&this.emit("enter",P)})},2e3),this.freed())}findPnodeId(ht,d,nt="id"){let H;if(ht){for(var m=0;m<ht.length;m++){let P=ht[m];if(P[nt]==d)return H=P,H;if(P.children&&P.children.length>0&&(H=this.findPnodeId(P.children,d,nt),H))return H}return H}}disTance(ht,d,nt){let H,m,P;return H=Cesium.Cartesian3.fromDegrees(...ht),m=Cesium.Cartesian3.fromDegrees(...d),P=Cesium.Cartesian3.distance(H,m),P>nt}calculateDistance(ht,d){let nt=(ht+180)%360-180;nt=Math.max(-90,Math.min(nt,90));let H=(d-d/5)*(Math.abs(nt)/90)+d/5;return Math.round(H)}}function Rl(T){throw new Error('Could not dynamically require "'+T+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var jh={exports:{}};/*!
|
|
2636
|
+
|
|
2637
|
+
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
2638
|
+
<http://stuartk.com/jszip>
|
|
2639
|
+
|
|
2640
|
+
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
|
2641
|
+
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
|
2642
|
+
|
|
2643
|
+
JSZip uses the library pako released under the MIT license :
|
|
2644
|
+
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
2645
|
+
*/(function(T,ht){(function(d){T.exports=d()})(function(){return function d(nt,H,m){function P(F,Z){if(!H[F]){if(!nt[F]){var G=typeof Rl=="function"&&Rl;if(!Z&&G)return G(F,!0);if(D)return D(F,!0);var J=new Error("Cannot find module '"+F+"'");throw J.code="MODULE_NOT_FOUND",J}var B=H[F]={exports:{}};nt[F][0].call(B.exports,function(q){var E=nt[F][1][q];return P(E||q)},B,B.exports,d,nt,H,m)}return H[F].exports}for(var D=typeof Rl=="function"&&Rl,A=0;A<m.length;A++)P(m[A]);return P}({1:[function(d,nt,H){var m=d("./utils"),P=d("./support"),D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";H.encode=function(A){for(var F,Z,G,J,B,q,E,b=[],p=0,g=A.length,S=g,x=m.getTypeOf(A)!=="string";p<A.length;)S=g-p,G=x?(F=A[p++],Z=p<g?A[p++]:0,p<g?A[p++]:0):(F=A.charCodeAt(p++),Z=p<g?A.charCodeAt(p++):0,p<g?A.charCodeAt(p++):0),J=F>>2,B=(3&F)<<4|Z>>4,q=1<S?(15&Z)<<2|G>>6:64,E=2<S?63&G:64,b.push(D.charAt(J)+D.charAt(B)+D.charAt(q)+D.charAt(E));return b.join("")},H.decode=function(A){var F,Z,G,J,B,q,E=0,b=0,p="data:";if(A.substr(0,p.length)===p)throw new Error("Invalid base64 input, it looks like a data url.");var g,S=3*(A=A.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(A.charAt(A.length-1)===D.charAt(64)&&S--,A.charAt(A.length-2)===D.charAt(64)&&S--,S%1!=0)throw new Error("Invalid base64 input, bad content length.");for(g=P.uint8array?new Uint8Array(0|S):new Array(0|S);E<A.length;)F=D.indexOf(A.charAt(E++))<<2|(J=D.indexOf(A.charAt(E++)))>>4,Z=(15&J)<<4|(B=D.indexOf(A.charAt(E++)))>>2,G=(3&B)<<6|(q=D.indexOf(A.charAt(E++))),g[b++]=F,B!==64&&(g[b++]=Z),q!==64&&(g[b++]=G);return g}},{"./support":30,"./utils":32}],2:[function(d,nt,H){var m=d("./external"),P=d("./stream/DataWorker"),D=d("./stream/Crc32Probe"),A=d("./stream/DataLengthProbe");function F(Z,G,J,B,q){this.compressedSize=Z,this.uncompressedSize=G,this.crc32=J,this.compression=B,this.compressedContent=q}F.prototype={getContentWorker:function(){var Z=new P(m.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new A("data_length")),G=this;return Z.on("end",function(){if(this.streamInfo.data_length!==G.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),Z},getCompressedWorker:function(){return new P(m.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},F.createWorkerFrom=function(Z,G,J){return Z.pipe(new D).pipe(new A("uncompressedSize")).pipe(G.compressWorker(J)).pipe(new A("compressedSize")).withStreamInfo("compression",G)},nt.exports=F},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(d,nt,H){var m=d("./stream/GenericWorker");H.STORE={magic:"\0\0",compressWorker:function(){return new m("STORE compression")},uncompressWorker:function(){return new m("STORE decompression")}},H.DEFLATE=d("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(d,nt,H){var m=d("./utils"),P=function(){for(var D,A=[],F=0;F<256;F++){D=F;for(var Z=0;Z<8;Z++)D=1&D?3988292384^D>>>1:D>>>1;A[F]=D}return A}();nt.exports=function(D,A){return D!==void 0&&D.length?m.getTypeOf(D)!=="string"?function(F,Z,G,J){var B=P,q=J+G;F^=-1;for(var E=J;E<q;E++)F=F>>>8^B[255&(F^Z[E])];return-1^F}(0|A,D,D.length,0):function(F,Z,G,J){var B=P,q=J+G;F^=-1;for(var E=J;E<q;E++)F=F>>>8^B[255&(F^Z.charCodeAt(E))];return-1^F}(0|A,D,D.length,0):0}},{"./utils":32}],5:[function(d,nt,H){H.base64=!1,H.binary=!1,H.dir=!1,H.createFolders=!0,H.date=null,H.compression=null,H.compressionOptions=null,H.comment=null,H.unixPermissions=null,H.dosPermissions=null},{}],6:[function(d,nt,H){var m=null;m=typeof Promise<"u"?Promise:d("lie"),nt.exports={Promise:m}},{lie:37}],7:[function(d,nt,H){var m=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",P=d("pako"),D=d("./utils"),A=d("./stream/GenericWorker"),F=m?"uint8array":"array";function Z(G,J){A.call(this,"FlateWorker/"+G),this._pako=null,this._pakoAction=G,this._pakoOptions=J,this.meta={}}H.magic="\b\0",D.inherits(Z,A),Z.prototype.processChunk=function(G){this.meta=G.meta,this._pako===null&&this._createPako(),this._pako.push(D.transformTo(F,G.data),!1)},Z.prototype.flush=function(){A.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},Z.prototype.cleanUp=function(){A.prototype.cleanUp.call(this),this._pako=null},Z.prototype._createPako=function(){this._pako=new P[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var G=this;this._pako.onData=function(J){G.push({data:J,meta:G.meta})}},H.compressWorker=function(G){return new Z("Deflate",G)},H.uncompressWorker=function(){return new Z("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(d,nt,H){function m(B,q){var E,b="";for(E=0;E<q;E++)b+=String.fromCharCode(255&B),B>>>=8;return b}function P(B,q,E,b,p,g){var S,x,U=B.file,z=B.compression,j=g!==F.utf8encode,lt=D.transformTo("string",g(U.name)),ft=D.transformTo("string",F.utf8encode(U.name)),gt=U.comment,Nt=D.transformTo("string",g(gt)),at=D.transformTo("string",F.utf8encode(gt)),Et=ft.length!==U.name.length,I=at.length!==gt.length,zt="",Pt="",Rt="",ge=U.dir,ue=U.date,Ft={crc32:0,compressedSize:0,uncompressedSize:0};q&&!E||(Ft.crc32=B.crc32,Ft.compressedSize=B.compressedSize,Ft.uncompressedSize=B.uncompressedSize);var Dt=0;q&&(Dt|=8),j||!Et&&!I||(Dt|=2048);var kt=0,Fe=0;ge&&(kt|=16),p==="UNIX"?(Fe=798,kt|=function(Zt,ti){var ki=Zt;return Zt||(ki=ti?16893:33204),(65535&ki)<<16}(U.unixPermissions,ge)):(Fe=20,kt|=function(Zt){return 63&(Zt||0)}(U.dosPermissions)),S=ue.getUTCHours(),S<<=6,S|=ue.getUTCMinutes(),S<<=5,S|=ue.getUTCSeconds()/2,x=ue.getUTCFullYear()-1980,x<<=4,x|=ue.getUTCMonth()+1,x<<=5,x|=ue.getUTCDate(),Et&&(Pt=m(1,1)+m(Z(lt),4)+ft,zt+="up"+m(Pt.length,2)+Pt),I&&(Rt=m(1,1)+m(Z(Nt),4)+at,zt+="uc"+m(Rt.length,2)+Rt);var xe="";return xe+=`
|
|
2646
|
+
\0`,xe+=m(Dt,2),xe+=z.magic,xe+=m(S,2),xe+=m(x,2),xe+=m(Ft.crc32,4),xe+=m(Ft.compressedSize,4),xe+=m(Ft.uncompressedSize,4),xe+=m(lt.length,2),xe+=m(zt.length,2),{fileRecord:G.LOCAL_FILE_HEADER+xe+lt+zt,dirRecord:G.CENTRAL_FILE_HEADER+m(Fe,2)+xe+m(Nt.length,2)+"\0\0\0\0"+m(kt,4)+m(b,4)+lt+zt+Nt}}var D=d("../utils"),A=d("../stream/GenericWorker"),F=d("../utf8"),Z=d("../crc32"),G=d("../signature");function J(B,q,E,b){A.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=q,this.zipPlatform=E,this.encodeFileName=b,this.streamFiles=B,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}D.inherits(J,A),J.prototype.push=function(B){var q=B.meta.percent||0,E=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(B):(this.bytesWritten+=B.data.length,A.prototype.push.call(this,{data:B.data,meta:{currentFile:this.currentFile,percent:E?(q+100*(E-b-1))/E:100}}))},J.prototype.openedSource=function(B){this.currentSourceOffset=this.bytesWritten,this.currentFile=B.file.name;var q=this.streamFiles&&!B.file.dir;if(q){var E=P(B,q,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},J.prototype.closedSource=function(B){this.accumulate=!1;var q=this.streamFiles&&!B.file.dir,E=P(B,q,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),q)this.push({data:function(b){return G.DATA_DESCRIPTOR+m(b.crc32,4)+m(b.compressedSize,4)+m(b.uncompressedSize,4)}(B),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},J.prototype.flush=function(){for(var B=this.bytesWritten,q=0;q<this.dirRecords.length;q++)this.push({data:this.dirRecords[q],meta:{percent:100}});var E=this.bytesWritten-B,b=function(p,g,S,x,U){var z=D.transformTo("string",U(x));return G.CENTRAL_DIRECTORY_END+"\0\0\0\0"+m(p,2)+m(p,2)+m(g,4)+m(S,4)+m(z.length,2)+z}(this.dirRecords.length,E,B,this.zipComment,this.encodeFileName);this.push({data:b,meta:{percent:100}})},J.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},J.prototype.registerPrevious=function(B){this._sources.push(B);var q=this;return B.on("data",function(E){q.processChunk(E)}),B.on("end",function(){q.closedSource(q.previous.streamInfo),q._sources.length?q.prepareNextSource():q.end()}),B.on("error",function(E){q.error(E)}),this},J.prototype.resume=function(){return!!A.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},J.prototype.error=function(B){var q=this._sources;if(!A.prototype.error.call(this,B))return!1;for(var E=0;E<q.length;E++)try{q[E].error(B)}catch{}return!0},J.prototype.lock=function(){A.prototype.lock.call(this);for(var B=this._sources,q=0;q<B.length;q++)B[q].lock()},nt.exports=J},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(d,nt,H){var m=d("../compressions"),P=d("./ZipFileWorker");H.generateWorker=function(D,A,F){var Z=new P(A.streamFiles,F,A.platform,A.encodeFileName),G=0;try{D.forEach(function(J,B){G++;var q=function(g,S){var x=g||S,U=m[x];if(!U)throw new Error(x+" is not a valid compression method !");return U}(B.options.compression,A.compression),E=B.options.compressionOptions||A.compressionOptions||{},b=B.dir,p=B.date;B._compressWorker(q,E).withStreamInfo("file",{name:J,dir:b,date:p,comment:B.comment||"",unixPermissions:B.unixPermissions,dosPermissions:B.dosPermissions}).pipe(Z)}),Z.entriesCount=G}catch(J){Z.error(J)}return Z}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(d,nt,H){function m(){if(!(this instanceof m))return new m;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 P=new m;for(var D in this)typeof this[D]!="function"&&(P[D]=this[D]);return P}}(m.prototype=d("./object")).loadAsync=d("./load"),m.support=d("./support"),m.defaults=d("./defaults"),m.version="3.10.1",m.loadAsync=function(P,D){return new m().loadAsync(P,D)},m.external=d("./external"),nt.exports=m},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(d,nt,H){var m=d("./utils"),P=d("./external"),D=d("./utf8"),A=d("./zipEntries"),F=d("./stream/Crc32Probe"),Z=d("./nodejsUtils");function G(J){return new P.Promise(function(B,q){var E=J.decompressed.getContentWorker().pipe(new F);E.on("error",function(b){q(b)}).on("end",function(){E.streamInfo.crc32!==J.decompressed.crc32?q(new Error("Corrupted zip : CRC32 mismatch")):B()}).resume()})}nt.exports=function(J,B){var q=this;return B=m.extend(B||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:D.utf8decode}),Z.isNode&&Z.isStream(J)?P.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):m.prepareContent("the loaded zip file",J,!0,B.optimizedBinaryString,B.base64).then(function(E){var b=new A(B);return b.load(E),b}).then(function(E){var b=[P.Promise.resolve(E)],p=E.files;if(B.checkCRC32)for(var g=0;g<p.length;g++)b.push(G(p[g]));return P.Promise.all(b)}).then(function(E){for(var b=E.shift(),p=b.files,g=0;g<p.length;g++){var S=p[g],x=S.fileNameStr,U=m.resolve(S.fileNameStr);q.file(U,S.decompressed,{binary:!0,optimizedBinaryString:!0,date:S.date,dir:S.dir,comment:S.fileCommentStr.length?S.fileCommentStr:null,unixPermissions:S.unixPermissions,dosPermissions:S.dosPermissions,createFolders:B.createFolders}),S.dir||(q.file(U).unsafeOriginalName=x)}return b.zipComment.length&&(q.comment=b.zipComment),q})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(d,nt,H){var m=d("../utils"),P=d("../stream/GenericWorker");function D(A,F){P.call(this,"Nodejs stream input adapter for "+A),this._upstreamEnded=!1,this._bindStream(F)}m.inherits(D,P),D.prototype._bindStream=function(A){var F=this;(this._stream=A).pause(),A.on("data",function(Z){F.push({data:Z,meta:{percent:0}})}).on("error",function(Z){F.isPaused?this.generatedError=Z:F.error(Z)}).on("end",function(){F.isPaused?F._upstreamEnded=!0:F.end()})},D.prototype.pause=function(){return!!P.prototype.pause.call(this)&&(this._stream.pause(),!0)},D.prototype.resume=function(){return!!P.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},nt.exports=D},{"../stream/GenericWorker":28,"../utils":32}],13:[function(d,nt,H){var m=d("readable-stream").Readable;function P(D,A,F){m.call(this,A),this._helper=D;var Z=this;D.on("data",function(G,J){Z.push(G)||Z._helper.pause(),F&&F(J)}).on("error",function(G){Z.emit("error",G)}).on("end",function(){Z.push(null)})}d("../utils").inherits(P,m),P.prototype._read=function(){this._helper.resume()},nt.exports=P},{"../utils":32,"readable-stream":16}],14:[function(d,nt,H){nt.exports={isNode:typeof Buffer<"u",newBufferFrom:function(m,P){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(m,P);if(typeof m=="number")throw new Error('The "data" argument must not be a number');return new Buffer(m,P)},allocBuffer:function(m){if(Buffer.alloc)return Buffer.alloc(m);var P=new Buffer(m);return P.fill(0),P},isBuffer:function(m){return Buffer.isBuffer(m)},isStream:function(m){return m&&typeof m.on=="function"&&typeof m.pause=="function"&&typeof m.resume=="function"}}},{}],15:[function(d,nt,H){function m(U,z,j){var lt,ft=D.getTypeOf(z),gt=D.extend(j||{},Z);gt.date=gt.date||new Date,gt.compression!==null&&(gt.compression=gt.compression.toUpperCase()),typeof gt.unixPermissions=="string"&&(gt.unixPermissions=parseInt(gt.unixPermissions,8)),gt.unixPermissions&&16384>.unixPermissions&&(gt.dir=!0),gt.dosPermissions&&16>.dosPermissions&&(gt.dir=!0),gt.dir&&(U=p(U)),gt.createFolders&&(lt=b(U))&&g.call(this,lt,!0);var Nt=ft==="string"&>.binary===!1&>.base64===!1;j&&j.binary!==void 0||(gt.binary=!Nt),(z instanceof G&&z.uncompressedSize===0||gt.dir||!z||z.length===0)&&(gt.base64=!1,gt.binary=!0,z="",gt.compression="STORE",ft="string");var at=null;at=z instanceof G||z instanceof A?z:q.isNode&&q.isStream(z)?new E(U,z):D.prepareContent(U,z,gt.binary,gt.optimizedBinaryString,gt.base64);var Et=new J(U,at,gt);this.files[U]=Et}var P=d("./utf8"),D=d("./utils"),A=d("./stream/GenericWorker"),F=d("./stream/StreamHelper"),Z=d("./defaults"),G=d("./compressedObject"),J=d("./zipObject"),B=d("./generate"),q=d("./nodejsUtils"),E=d("./nodejs/NodejsStreamInputAdapter"),b=function(U){U.slice(-1)==="/"&&(U=U.substring(0,U.length-1));var z=U.lastIndexOf("/");return 0<z?U.substring(0,z):""},p=function(U){return U.slice(-1)!=="/"&&(U+="/"),U},g=function(U,z){return z=z!==void 0?z:Z.createFolders,U=p(U),this.files[U]||m.call(this,U,null,{dir:!0,createFolders:z}),this.files[U]};function S(U){return Object.prototype.toString.call(U)==="[object RegExp]"}var x={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(U){var z,j,lt;for(z in this.files)lt=this.files[z],(j=z.slice(this.root.length,z.length))&&z.slice(0,this.root.length)===this.root&&U(j,lt)},filter:function(U){var z=[];return this.forEach(function(j,lt){U(j,lt)&&z.push(lt)}),z},file:function(U,z,j){if(arguments.length!==1)return U=this.root+U,m.call(this,U,z,j),this;if(S(U)){var lt=U;return this.filter(function(gt,Nt){return!Nt.dir&<.test(gt)})}var ft=this.files[this.root+U];return ft&&!ft.dir?ft:null},folder:function(U){if(!U)return this;if(S(U))return this.filter(function(ft,gt){return gt.dir&&U.test(ft)});var z=this.root+U,j=g.call(this,z),lt=this.clone();return lt.root=j.name,lt},remove:function(U){U=this.root+U;var z=this.files[U];if(z||(U.slice(-1)!=="/"&&(U+="/"),z=this.files[U]),z&&!z.dir)delete this.files[U];else for(var j=this.filter(function(ft,gt){return gt.name.slice(0,U.length)===U}),lt=0;lt<j.length;lt++)delete this.files[j[lt].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 z,j={};try{if((j=D.extend(U||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:P.utf8encode})).type=j.type.toLowerCase(),j.compression=j.compression.toUpperCase(),j.type==="binarystring"&&(j.type="string"),!j.type)throw new Error("No output type specified.");D.checkSupport(j.type),j.platform!=="darwin"&&j.platform!=="freebsd"&&j.platform!=="linux"&&j.platform!=="sunos"||(j.platform="UNIX"),j.platform==="win32"&&(j.platform="DOS");var lt=j.comment||this.comment||"";z=B.generateWorker(this,j,lt)}catch(ft){(z=new A("error")).error(ft)}return new F(z,j.type||"string",j.mimeType)},generateAsync:function(U,z){return this.generateInternalStream(U).accumulate(z)},generateNodeStream:function(U,z){return(U=U||{}).type||(U.type="nodebuffer"),this.generateInternalStream(U).toNodejsStream(z)}};nt.exports=x},{"./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(d,nt,H){nt.exports=d("stream")},{stream:void 0}],17:[function(d,nt,H){var m=d("./DataReader");function P(D){m.call(this,D);for(var A=0;A<this.data.length;A++)D[A]=255&D[A]}d("../utils").inherits(P,m),P.prototype.byteAt=function(D){return this.data[this.zero+D]},P.prototype.lastIndexOfSignature=function(D){for(var A=D.charCodeAt(0),F=D.charCodeAt(1),Z=D.charCodeAt(2),G=D.charCodeAt(3),J=this.length-4;0<=J;--J)if(this.data[J]===A&&this.data[J+1]===F&&this.data[J+2]===Z&&this.data[J+3]===G)return J-this.zero;return-1},P.prototype.readAndCheckSignature=function(D){var A=D.charCodeAt(0),F=D.charCodeAt(1),Z=D.charCodeAt(2),G=D.charCodeAt(3),J=this.readData(4);return A===J[0]&&F===J[1]&&Z===J[2]&&G===J[3]},P.prototype.readData=function(D){if(this.checkOffset(D),D===0)return[];var A=this.data.slice(this.zero+this.index,this.zero+this.index+D);return this.index+=D,A},nt.exports=P},{"../utils":32,"./DataReader":18}],18:[function(d,nt,H){var m=d("../utils");function P(D){this.data=D,this.length=D.length,this.index=0,this.zero=0}P.prototype={checkOffset:function(D){this.checkIndex(this.index+D)},checkIndex:function(D){if(this.length<this.zero+D||D<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+D+"). Corrupted zip ?")},setIndex:function(D){this.checkIndex(D),this.index=D},skip:function(D){this.setIndex(this.index+D)},byteAt:function(){},readInt:function(D){var A,F=0;for(this.checkOffset(D),A=this.index+D-1;A>=this.index;A--)F=(F<<8)+this.byteAt(A);return this.index+=D,F},readString:function(D){return m.transformTo("string",this.readData(D))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var D=this.readInt(4);return new Date(Date.UTC(1980+(D>>25&127),(D>>21&15)-1,D>>16&31,D>>11&31,D>>5&63,(31&D)<<1))}},nt.exports=P},{"../utils":32}],19:[function(d,nt,H){var m=d("./Uint8ArrayReader");function P(D){m.call(this,D)}d("../utils").inherits(P,m),P.prototype.readData=function(D){this.checkOffset(D);var A=this.data.slice(this.zero+this.index,this.zero+this.index+D);return this.index+=D,A},nt.exports=P},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(d,nt,H){var m=d("./DataReader");function P(D){m.call(this,D)}d("../utils").inherits(P,m),P.prototype.byteAt=function(D){return this.data.charCodeAt(this.zero+D)},P.prototype.lastIndexOfSignature=function(D){return this.data.lastIndexOf(D)-this.zero},P.prototype.readAndCheckSignature=function(D){return D===this.readData(4)},P.prototype.readData=function(D){this.checkOffset(D);var A=this.data.slice(this.zero+this.index,this.zero+this.index+D);return this.index+=D,A},nt.exports=P},{"../utils":32,"./DataReader":18}],21:[function(d,nt,H){var m=d("./ArrayReader");function P(D){m.call(this,D)}d("../utils").inherits(P,m),P.prototype.readData=function(D){if(this.checkOffset(D),D===0)return new Uint8Array(0);var A=this.data.subarray(this.zero+this.index,this.zero+this.index+D);return this.index+=D,A},nt.exports=P},{"../utils":32,"./ArrayReader":17}],22:[function(d,nt,H){var m=d("../utils"),P=d("../support"),D=d("./ArrayReader"),A=d("./StringReader"),F=d("./NodeBufferReader"),Z=d("./Uint8ArrayReader");nt.exports=function(G){var J=m.getTypeOf(G);return m.checkSupport(J),J!=="string"||P.uint8array?J==="nodebuffer"?new F(G):P.uint8array?new Z(m.transformTo("uint8array",G)):new D(m.transformTo("array",G)):new A(G)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(d,nt,H){H.LOCAL_FILE_HEADER="PK",H.CENTRAL_FILE_HEADER="PK",H.CENTRAL_DIRECTORY_END="PK",H.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",H.ZIP64_CENTRAL_DIRECTORY_END="PK",H.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(d,nt,H){var m=d("./GenericWorker"),P=d("../utils");function D(A){m.call(this,"ConvertWorker to "+A),this.destType=A}P.inherits(D,m),D.prototype.processChunk=function(A){this.push({data:P.transformTo(this.destType,A.data),meta:A.meta})},nt.exports=D},{"../utils":32,"./GenericWorker":28}],25:[function(d,nt,H){var m=d("./GenericWorker"),P=d("../crc32");function D(){m.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}d("../utils").inherits(D,m),D.prototype.processChunk=function(A){this.streamInfo.crc32=P(A.data,this.streamInfo.crc32||0),this.push(A)},nt.exports=D},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(d,nt,H){var m=d("../utils"),P=d("./GenericWorker");function D(A){P.call(this,"DataLengthProbe for "+A),this.propName=A,this.withStreamInfo(A,0)}m.inherits(D,P),D.prototype.processChunk=function(A){if(A){var F=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=F+A.data.length}P.prototype.processChunk.call(this,A)},nt.exports=D},{"../utils":32,"./GenericWorker":28}],27:[function(d,nt,H){var m=d("../utils"),P=d("./GenericWorker");function D(A){P.call(this,"DataWorker");var F=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,A.then(function(Z){F.dataIsReady=!0,F.data=Z,F.max=Z&&Z.length||0,F.type=m.getTypeOf(Z),F.isPaused||F._tickAndRepeat()},function(Z){F.error(Z)})}m.inherits(D,P),D.prototype.cleanUp=function(){P.prototype.cleanUp.call(this),this.data=null},D.prototype.resume=function(){return!!P.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,m.delay(this._tickAndRepeat,[],this)),!0)},D.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(m.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},D.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var A=null,F=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":A=this.data.substring(this.index,F);break;case"uint8array":A=this.data.subarray(this.index,F);break;case"array":case"nodebuffer":A=this.data.slice(this.index,F)}return this.index=F,this.push({data:A,meta:{percent:this.max?this.index/this.max*100:0}})},nt.exports=D},{"../utils":32,"./GenericWorker":28}],28:[function(d,nt,H){function m(P){this.name=P||"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}m.prototype={push:function(P){this.emit("data",P)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(P){this.emit("error",P)}return!0},error:function(P){return!this.isFinished&&(this.isPaused?this.generatedError=P:(this.isFinished=!0,this.emit("error",P),this.previous&&this.previous.error(P),this.cleanUp()),!0)},on:function(P,D){return this._listeners[P].push(D),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(P,D){if(this._listeners[P])for(var A=0;A<this._listeners[P].length;A++)this._listeners[P][A].call(this,D)},pipe:function(P){return P.registerPrevious(this)},registerPrevious:function(P){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=P.streamInfo,this.mergeStreamInfo(),this.previous=P;var D=this;return P.on("data",function(A){D.processChunk(A)}),P.on("end",function(){D.end()}),P.on("error",function(A){D.error(A)}),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 P=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),P=!0),this.previous&&this.previous.resume(),!P},flush:function(){},processChunk:function(P){this.push(P)},withStreamInfo:function(P,D){return this.extraStreamInfo[P]=D,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var P in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,P)&&(this.streamInfo[P]=this.extraStreamInfo[P])},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 P="Worker "+this.name;return this.previous?this.previous+" -> "+P:P}},nt.exports=m},{}],29:[function(d,nt,H){var m=d("../utils"),P=d("./ConvertWorker"),D=d("./GenericWorker"),A=d("../base64"),F=d("../support"),Z=d("../external"),G=null;if(F.nodestream)try{G=d("../nodejs/NodejsStreamOutputAdapter")}catch{}function J(q,E){return new Z.Promise(function(b,p){var g=[],S=q._internalType,x=q._outputType,U=q._mimeType;q.on("data",function(z,j){g.push(z),E&&E(j)}).on("error",function(z){g=[],p(z)}).on("end",function(){try{var z=function(j,lt,ft){switch(j){case"blob":return m.newBlob(m.transformTo("arraybuffer",lt),ft);case"base64":return A.encode(lt);default:return m.transformTo(j,lt)}}(x,function(j,lt){var ft,gt=0,Nt=null,at=0;for(ft=0;ft<lt.length;ft++)at+=lt[ft].length;switch(j){case"string":return lt.join("");case"array":return Array.prototype.concat.apply([],lt);case"uint8array":for(Nt=new Uint8Array(at),ft=0;ft<lt.length;ft++)Nt.set(lt[ft],gt),gt+=lt[ft].length;return Nt;case"nodebuffer":return Buffer.concat(lt);default:throw new Error("concat : unsupported type '"+j+"'")}}(S,g),U);b(z)}catch(j){p(j)}g=[]}).resume()})}function B(q,E,b){var p=E;switch(E){case"blob":case"arraybuffer":p="uint8array";break;case"base64":p="string"}try{this._internalType=p,this._outputType=E,this._mimeType=b,m.checkSupport(p),this._worker=q.pipe(new P(p)),q.lock()}catch(g){this._worker=new D("error"),this._worker.error(g)}}B.prototype={accumulate:function(q){return J(this,q)},on:function(q,E){var b=this;return q==="data"?this._worker.on(q,function(p){E.call(b,p.data,p.meta)}):this._worker.on(q,function(){m.delay(E,arguments,b)}),this},resume:function(){return m.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(q){if(m.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new G(this,{objectMode:this._outputType!=="nodebuffer"},q)}},nt.exports=B},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(d,nt,H){if(H.base64=!0,H.array=!0,H.string=!0,H.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",H.nodebuffer=typeof Buffer<"u",H.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")H.blob=!1;else{var m=new ArrayBuffer(0);try{H.blob=new Blob([m],{type:"application/zip"}).size===0}catch{try{var P=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);P.append(m),H.blob=P.getBlob("application/zip").size===0}catch{H.blob=!1}}}try{H.nodestream=!!d("readable-stream").Readable}catch{H.nodestream=!1}},{"readable-stream":16}],31:[function(d,nt,H){for(var m=d("./utils"),P=d("./support"),D=d("./nodejsUtils"),A=d("./stream/GenericWorker"),F=new Array(256),Z=0;Z<256;Z++)F[Z]=252<=Z?6:248<=Z?5:240<=Z?4:224<=Z?3:192<=Z?2:1;F[254]=F[254]=1;function G(){A.call(this,"utf-8 decode"),this.leftOver=null}function J(){A.call(this,"utf-8 encode")}H.utf8encode=function(B){return P.nodebuffer?D.newBufferFrom(B,"utf-8"):function(q){var E,b,p,g,S,x=q.length,U=0;for(g=0;g<x;g++)(64512&(b=q.charCodeAt(g)))==55296&&g+1<x&&(64512&(p=q.charCodeAt(g+1)))==56320&&(b=65536+(b-55296<<10)+(p-56320),g++),U+=b<128?1:b<2048?2:b<65536?3:4;for(E=P.uint8array?new Uint8Array(U):new Array(U),g=S=0;S<U;g++)(64512&(b=q.charCodeAt(g)))==55296&&g+1<x&&(64512&(p=q.charCodeAt(g+1)))==56320&&(b=65536+(b-55296<<10)+(p-56320),g++),b<128?E[S++]=b:(b<2048?E[S++]=192|b>>>6:(b<65536?E[S++]=224|b>>>12:(E[S++]=240|b>>>18,E[S++]=128|b>>>12&63),E[S++]=128|b>>>6&63),E[S++]=128|63&b);return E}(B)},H.utf8decode=function(B){return P.nodebuffer?m.transformTo("nodebuffer",B).toString("utf-8"):function(q){var E,b,p,g,S=q.length,x=new Array(2*S);for(E=b=0;E<S;)if((p=q[E++])<128)x[b++]=p;else if(4<(g=F[p]))x[b++]=65533,E+=g-1;else{for(p&=g===2?31:g===3?15:7;1<g&&E<S;)p=p<<6|63&q[E++],g--;1<g?x[b++]=65533:p<65536?x[b++]=p:(p-=65536,x[b++]=55296|p>>10&1023,x[b++]=56320|1023&p)}return x.length!==b&&(x.subarray?x=x.subarray(0,b):x.length=b),m.applyFromCharCode(x)}(B=m.transformTo(P.uint8array?"uint8array":"array",B))},m.inherits(G,A),G.prototype.processChunk=function(B){var q=m.transformTo(P.uint8array?"uint8array":"array",B.data);if(this.leftOver&&this.leftOver.length){if(P.uint8array){var E=q;(q=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),q.set(E,this.leftOver.length)}else q=this.leftOver.concat(q);this.leftOver=null}var b=function(g,S){var x;for((S=S||g.length)>g.length&&(S=g.length),x=S-1;0<=x&&(192&g[x])==128;)x--;return x<0||x===0?S:x+F[g[x]]>S?x:S}(q),p=q;b!==q.length&&(P.uint8array?(p=q.subarray(0,b),this.leftOver=q.subarray(b,q.length)):(p=q.slice(0,b),this.leftOver=q.slice(b,q.length))),this.push({data:H.utf8decode(p),meta:B.meta})},G.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:H.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},H.Utf8DecodeWorker=G,m.inherits(J,A),J.prototype.processChunk=function(B){this.push({data:H.utf8encode(B.data),meta:B.meta})},H.Utf8EncodeWorker=J},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(d,nt,H){var m=d("./support"),P=d("./base64"),D=d("./nodejsUtils"),A=d("./external");function F(E){return E}function Z(E,b){for(var p=0;p<E.length;++p)b[p]=255&E.charCodeAt(p);return b}d("setimmediate"),H.newBlob=function(E,b){H.checkSupport("blob");try{return new Blob([E],{type:b})}catch{try{var p=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return p.append(E),p.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var G={stringifyByChunk:function(E,b,p){var g=[],S=0,x=E.length;if(x<=p)return String.fromCharCode.apply(null,E);for(;S<x;)b==="array"||b==="nodebuffer"?g.push(String.fromCharCode.apply(null,E.slice(S,Math.min(S+p,x)))):g.push(String.fromCharCode.apply(null,E.subarray(S,Math.min(S+p,x)))),S+=p;return g.join("")},stringifyByChar:function(E){for(var b="",p=0;p<E.length;p++)b+=String.fromCharCode(E[p]);return b},applyCanBeUsed:{uint8array:function(){try{return m.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return m.nodebuffer&&String.fromCharCode.apply(null,D.allocBuffer(1)).length===1}catch{return!1}}()}};function J(E){var b=65536,p=H.getTypeOf(E),g=!0;if(p==="uint8array"?g=G.applyCanBeUsed.uint8array:p==="nodebuffer"&&(g=G.applyCanBeUsed.nodebuffer),g)for(;1<b;)try{return G.stringifyByChunk(E,p,b)}catch{b=Math.floor(b/2)}return G.stringifyByChar(E)}function B(E,b){for(var p=0;p<E.length;p++)b[p]=E[p];return b}H.applyFromCharCode=J;var q={};q.string={string:F,array:function(E){return Z(E,new Array(E.length))},arraybuffer:function(E){return q.string.uint8array(E).buffer},uint8array:function(E){return Z(E,new Uint8Array(E.length))},nodebuffer:function(E){return Z(E,D.allocBuffer(E.length))}},q.array={string:J,array:F,arraybuffer:function(E){return new Uint8Array(E).buffer},uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return D.newBufferFrom(E)}},q.arraybuffer={string:function(E){return J(new Uint8Array(E))},array:function(E){return B(new Uint8Array(E),new Array(E.byteLength))},arraybuffer:F,uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return D.newBufferFrom(new Uint8Array(E))}},q.uint8array={string:J,array:function(E){return B(E,new Array(E.length))},arraybuffer:function(E){return E.buffer},uint8array:F,nodebuffer:function(E){return D.newBufferFrom(E)}},q.nodebuffer={string:J,array:function(E){return B(E,new Array(E.length))},arraybuffer:function(E){return q.nodebuffer.uint8array(E).buffer},uint8array:function(E){return B(E,new Uint8Array(E.length))},nodebuffer:F},H.transformTo=function(E,b){if(b=b||"",!E)return b;H.checkSupport(E);var p=H.getTypeOf(b);return q[p][E](b)},H.resolve=function(E){for(var b=E.split("/"),p=[],g=0;g<b.length;g++){var S=b[g];S==="."||S===""&&g!==0&&g!==b.length-1||(S===".."?p.pop():p.push(S))}return p.join("/")},H.getTypeOf=function(E){return typeof E=="string"?"string":Object.prototype.toString.call(E)==="[object Array]"?"array":m.nodebuffer&&D.isBuffer(E)?"nodebuffer":m.uint8array&&E instanceof Uint8Array?"uint8array":m.arraybuffer&&E instanceof ArrayBuffer?"arraybuffer":void 0},H.checkSupport=function(E){if(!m[E.toLowerCase()])throw new Error(E+" is not supported by this platform")},H.MAX_VALUE_16BITS=65535,H.MAX_VALUE_32BITS=-1,H.pretty=function(E){var b,p,g="";for(p=0;p<(E||"").length;p++)g+="\\x"+((b=E.charCodeAt(p))<16?"0":"")+b.toString(16).toUpperCase();return g},H.delay=function(E,b,p){setImmediate(function(){E.apply(p||null,b||[])})},H.inherits=function(E,b){function p(){}p.prototype=b.prototype,E.prototype=new p},H.extend=function(){var E,b,p={};for(E=0;E<arguments.length;E++)for(b in arguments[E])Object.prototype.hasOwnProperty.call(arguments[E],b)&&p[b]===void 0&&(p[b]=arguments[E][b]);return p},H.prepareContent=function(E,b,p,g,S){return A.Promise.resolve(b).then(function(x){return m.blob&&(x instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(x))!==-1)&&typeof FileReader<"u"?new A.Promise(function(U,z){var j=new FileReader;j.onload=function(lt){U(lt.target.result)},j.onerror=function(lt){z(lt.target.error)},j.readAsArrayBuffer(x)}):x}).then(function(x){var U=H.getTypeOf(x);return U?(U==="arraybuffer"?x=H.transformTo("uint8array",x):U==="string"&&(S?x=P.decode(x):p&&g!==!0&&(x=function(z){return Z(z,m.uint8array?new Uint8Array(z.length):new Array(z.length))}(x))),x):A.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(d,nt,H){var m=d("./reader/readerFor"),P=d("./utils"),D=d("./signature"),A=d("./zipEntry"),F=d("./support");function Z(G){this.files=[],this.loadOptions=G}Z.prototype={checkSignature:function(G){if(!this.reader.readAndCheckSignature(G)){this.reader.index-=4;var J=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+P.pretty(J)+", expected "+P.pretty(G)+")")}},isSignature:function(G,J){var B=this.reader.index;this.reader.setIndex(G);var q=this.reader.readString(4)===J;return this.reader.setIndex(B),q},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 G=this.reader.readData(this.zipCommentLength),J=F.uint8array?"uint8array":"array",B=P.transformTo(J,G);this.zipComment=this.loadOptions.decodeFileName(B)},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 G,J,B,q=this.zip64EndOfCentralSize-44;0<q;)G=this.reader.readInt(2),J=this.reader.readInt(4),B=this.reader.readData(J),this.zip64ExtensibleData[G]={id:G,length:J,value:B}},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 G,J;for(G=0;G<this.files.length;G++)J=this.files[G],this.reader.setIndex(J.localHeaderOffset),this.checkSignature(D.LOCAL_FILE_HEADER),J.readLocalPart(this.reader),J.handleUTF8(),J.processAttributes()},readCentralDir:function(){var G;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(D.CENTRAL_FILE_HEADER);)(G=new A({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(G);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 G=this.reader.lastIndexOfSignature(D.CENTRAL_DIRECTORY_END);if(G<0)throw this.isSignature(0,D.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(G);var J=G;if(this.checkSignature(D.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===P.MAX_VALUE_16BITS||this.diskWithCentralDirStart===P.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===P.MAX_VALUE_16BITS||this.centralDirRecords===P.MAX_VALUE_16BITS||this.centralDirSize===P.MAX_VALUE_32BITS||this.centralDirOffset===P.MAX_VALUE_32BITS){if(this.zip64=!0,(G=this.reader.lastIndexOfSignature(D.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(G),this.checkSignature(D.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,D.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(D.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(D.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var B=this.centralDirOffset+this.centralDirSize;this.zip64&&(B+=20,B+=12+this.zip64EndOfCentralSize);var q=J-B;if(0<q)this.isSignature(J,D.CENTRAL_FILE_HEADER)||(this.reader.zero=q);else if(q<0)throw new Error("Corrupted zip: missing "+Math.abs(q)+" bytes.")},prepareReader:function(G){this.reader=m(G)},load:function(G){this.prepareReader(G),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},nt.exports=Z},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(d,nt,H){var m=d("./reader/readerFor"),P=d("./utils"),D=d("./compressedObject"),A=d("./crc32"),F=d("./utf8"),Z=d("./compressions"),G=d("./support");function J(B,q){this.options=B,this.loadOptions=q}J.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(B){var q,E;if(B.skip(22),this.fileNameLength=B.readInt(2),E=B.readInt(2),this.fileName=B.readData(this.fileNameLength),B.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((q=function(b){for(var p in Z)if(Object.prototype.hasOwnProperty.call(Z,p)&&Z[p].magic===b)return Z[p];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+P.pretty(this.compressionMethod)+" unknown (inner file : "+P.transformTo("string",this.fileName)+")");this.decompressed=new D(this.compressedSize,this.uncompressedSize,this.crc32,q,B.readData(this.compressedSize))},readCentralPart:function(B){this.versionMadeBy=B.readInt(2),B.skip(2),this.bitFlag=B.readInt(2),this.compressionMethod=B.readString(2),this.date=B.readDate(),this.crc32=B.readInt(4),this.compressedSize=B.readInt(4),this.uncompressedSize=B.readInt(4);var q=B.readInt(2);if(this.extraFieldsLength=B.readInt(2),this.fileCommentLength=B.readInt(2),this.diskNumberStart=B.readInt(2),this.internalFileAttributes=B.readInt(2),this.externalFileAttributes=B.readInt(4),this.localHeaderOffset=B.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");B.skip(q),this.readExtraFields(B),this.parseZIP64ExtraField(B),this.fileComment=B.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var B=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),B==0&&(this.dosPermissions=63&this.externalFileAttributes),B==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var B=m(this.extraFields[1].value);this.uncompressedSize===P.MAX_VALUE_32BITS&&(this.uncompressedSize=B.readInt(8)),this.compressedSize===P.MAX_VALUE_32BITS&&(this.compressedSize=B.readInt(8)),this.localHeaderOffset===P.MAX_VALUE_32BITS&&(this.localHeaderOffset=B.readInt(8)),this.diskNumberStart===P.MAX_VALUE_32BITS&&(this.diskNumberStart=B.readInt(4))}},readExtraFields:function(B){var q,E,b,p=B.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});B.index+4<p;)q=B.readInt(2),E=B.readInt(2),b=B.readData(E),this.extraFields[q]={id:q,length:E,value:b};B.setIndex(p)},handleUTF8:function(){var B=G.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=F.utf8decode(this.fileName),this.fileCommentStr=F.utf8decode(this.fileComment);else{var q=this.findExtraFieldUnicodePath();if(q!==null)this.fileNameStr=q;else{var E=P.transformTo(B,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(E)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var p=P.transformTo(B,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(p)}}},findExtraFieldUnicodePath:function(){var B=this.extraFields[28789];if(B){var q=m(B.value);return q.readInt(1)!==1||A(this.fileName)!==q.readInt(4)?null:F.utf8decode(q.readData(B.length-5))}return null},findExtraFieldUnicodeComment:function(){var B=this.extraFields[25461];if(B){var q=m(B.value);return q.readInt(1)!==1||A(this.fileComment)!==q.readInt(4)?null:F.utf8decode(q.readData(B.length-5))}return null}},nt.exports=J},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(d,nt,H){function m(q,E,b){this.name=q,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=E,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var P=d("./stream/StreamHelper"),D=d("./stream/DataWorker"),A=d("./utf8"),F=d("./compressedObject"),Z=d("./stream/GenericWorker");m.prototype={internalStream:function(q){var E=null,b="string";try{if(!q)throw new Error("No output type specified.");var p=(b=q.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),E=this._decompressWorker();var g=!this._dataBinary;g&&!p&&(E=E.pipe(new A.Utf8EncodeWorker)),!g&&p&&(E=E.pipe(new A.Utf8DecodeWorker))}catch(S){(E=new Z("error")).error(S)}return new P(E,b,"")},async:function(q,E){return this.internalStream(q).accumulate(E)},nodeStream:function(q,E){return this.internalStream(q||"nodebuffer").toNodejsStream(E)},_compressWorker:function(q,E){if(this._data instanceof F&&this._data.compression.magic===q.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new A.Utf8EncodeWorker)),F.createWorkerFrom(b,q,E)},_decompressWorker:function(){return this._data instanceof F?this._data.getContentWorker():this._data instanceof Z?this._data:new D(this._data)}};for(var G=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],J=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},B=0;B<G.length;B++)m.prototype[G[B]]=J;nt.exports=m},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(d,nt,H){(function(m){var P,D,A=m.MutationObserver||m.WebKitMutationObserver;if(A){var F=0,Z=new A(q),G=m.document.createTextNode("");Z.observe(G,{characterData:!0}),P=function(){G.data=F=++F%2}}else if(m.setImmediate||m.MessageChannel===void 0)P="document"in m&&"onreadystatechange"in m.document.createElement("script")?function(){var E=m.document.createElement("script");E.onreadystatechange=function(){q(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},m.document.documentElement.appendChild(E)}:function(){setTimeout(q,0)};else{var J=new m.MessageChannel;J.port1.onmessage=q,P=function(){J.port2.postMessage(0)}}var B=[];function q(){var E,b;D=!0;for(var p=B.length;p;){for(b=B,B=[],E=-1;++E<p;)b[E]();p=B.length}D=!1}nt.exports=function(E){B.push(E)!==1||D||P()}}).call(this,typeof ur<"u"?ur:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(d,nt,H){var m=d("immediate");function P(){}var D={},A=["REJECTED"],F=["FULFILLED"],Z=["PENDING"];function G(p){if(typeof p!="function")throw new TypeError("resolver must be a function");this.state=Z,this.queue=[],this.outcome=void 0,p!==P&&E(this,p)}function J(p,g,S){this.promise=p,typeof g=="function"&&(this.onFulfilled=g,this.callFulfilled=this.otherCallFulfilled),typeof S=="function"&&(this.onRejected=S,this.callRejected=this.otherCallRejected)}function B(p,g,S){m(function(){var x;try{x=g(S)}catch(U){return D.reject(p,U)}x===p?D.reject(p,new TypeError("Cannot resolve promise with itself")):D.resolve(p,x)})}function q(p){var g=p&&p.then;if(p&&(typeof p=="object"||typeof p=="function")&&typeof g=="function")return function(){g.apply(p,arguments)}}function E(p,g){var S=!1;function x(j){S||(S=!0,D.reject(p,j))}function U(j){S||(S=!0,D.resolve(p,j))}var z=b(function(){g(U,x)});z.status==="error"&&x(z.value)}function b(p,g){var S={};try{S.value=p(g),S.status="success"}catch(x){S.status="error",S.value=x}return S}(nt.exports=G).prototype.finally=function(p){if(typeof p!="function")return this;var g=this.constructor;return this.then(function(S){return g.resolve(p()).then(function(){return S})},function(S){return g.resolve(p()).then(function(){throw S})})},G.prototype.catch=function(p){return this.then(null,p)},G.prototype.then=function(p,g){if(typeof p!="function"&&this.state===F||typeof g!="function"&&this.state===A)return this;var S=new this.constructor(P);return this.state!==Z?B(S,this.state===F?p:g,this.outcome):this.queue.push(new J(S,p,g)),S},J.prototype.callFulfilled=function(p){D.resolve(this.promise,p)},J.prototype.otherCallFulfilled=function(p){B(this.promise,this.onFulfilled,p)},J.prototype.callRejected=function(p){D.reject(this.promise,p)},J.prototype.otherCallRejected=function(p){B(this.promise,this.onRejected,p)},D.resolve=function(p,g){var S=b(q,g);if(S.status==="error")return D.reject(p,S.value);var x=S.value;if(x)E(p,x);else{p.state=F,p.outcome=g;for(var U=-1,z=p.queue.length;++U<z;)p.queue[U].callFulfilled(g)}return p},D.reject=function(p,g){p.state=A,p.outcome=g;for(var S=-1,x=p.queue.length;++S<x;)p.queue[S].callRejected(g);return p},G.resolve=function(p){return p instanceof this?p:D.resolve(new this(P),p)},G.reject=function(p){var g=new this(P);return D.reject(g,p)},G.all=function(p){var g=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var S=p.length,x=!1;if(!S)return this.resolve([]);for(var U=new Array(S),z=0,j=-1,lt=new this(P);++j<S;)ft(p[j],j);return lt;function ft(gt,Nt){g.resolve(gt).then(function(at){U[Nt]=at,++z!==S||x||(x=!0,D.resolve(lt,U))},function(at){x||(x=!0,D.reject(lt,at))})}},G.race=function(p){var g=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var S=p.length,x=!1;if(!S)return this.resolve([]);for(var U=-1,z=new this(P);++U<S;)j=p[U],g.resolve(j).then(function(lt){x||(x=!0,D.resolve(z,lt))},function(lt){x||(x=!0,D.reject(z,lt))});var j;return z}},{immediate:36}],38:[function(d,nt,H){var m={};(0,d("./lib/utils/common").assign)(m,d("./lib/deflate"),d("./lib/inflate"),d("./lib/zlib/constants")),nt.exports=m},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(d,nt,H){var m=d("./zlib/deflate"),P=d("./utils/common"),D=d("./utils/strings"),A=d("./zlib/messages"),F=d("./zlib/zstream"),Z=Object.prototype.toString,G=0,J=-1,B=0,q=8;function E(p){if(!(this instanceof E))return new E(p);this.options=P.assign({level:J,method:q,chunkSize:16384,windowBits:15,memLevel:8,strategy:B,to:""},p||{});var g=this.options;g.raw&&0<g.windowBits?g.windowBits=-g.windowBits:g.gzip&&0<g.windowBits&&g.windowBits<16&&(g.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new F,this.strm.avail_out=0;var S=m.deflateInit2(this.strm,g.level,g.method,g.windowBits,g.memLevel,g.strategy);if(S!==G)throw new Error(A[S]);if(g.header&&m.deflateSetHeader(this.strm,g.header),g.dictionary){var x;if(x=typeof g.dictionary=="string"?D.string2buf(g.dictionary):Z.call(g.dictionary)==="[object ArrayBuffer]"?new Uint8Array(g.dictionary):g.dictionary,(S=m.deflateSetDictionary(this.strm,x))!==G)throw new Error(A[S]);this._dict_set=!0}}function b(p,g){var S=new E(g);if(S.push(p,!0),S.err)throw S.msg||A[S.err];return S.result}E.prototype.push=function(p,g){var S,x,U=this.strm,z=this.options.chunkSize;if(this.ended)return!1;x=g===~~g?g:g===!0?4:0,typeof p=="string"?U.input=D.string2buf(p):Z.call(p)==="[object ArrayBuffer]"?U.input=new Uint8Array(p):U.input=p,U.next_in=0,U.avail_in=U.input.length;do{if(U.avail_out===0&&(U.output=new P.Buf8(z),U.next_out=0,U.avail_out=z),(S=m.deflate(U,x))!==1&&S!==G)return this.onEnd(S),!(this.ended=!0);U.avail_out!==0&&(U.avail_in!==0||x!==4&&x!==2)||(this.options.to==="string"?this.onData(D.buf2binstring(P.shrinkBuf(U.output,U.next_out))):this.onData(P.shrinkBuf(U.output,U.next_out)))}while((0<U.avail_in||U.avail_out===0)&&S!==1);return x===4?(S=m.deflateEnd(this.strm),this.onEnd(S),this.ended=!0,S===G):x!==2||(this.onEnd(G),!(U.avail_out=0))},E.prototype.onData=function(p){this.chunks.push(p)},E.prototype.onEnd=function(p){p===G&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=P.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},H.Deflate=E,H.deflate=b,H.deflateRaw=function(p,g){return(g=g||{}).raw=!0,b(p,g)},H.gzip=function(p,g){return(g=g||{}).gzip=!0,b(p,g)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(d,nt,H){var m=d("./zlib/inflate"),P=d("./utils/common"),D=d("./utils/strings"),A=d("./zlib/constants"),F=d("./zlib/messages"),Z=d("./zlib/zstream"),G=d("./zlib/gzheader"),J=Object.prototype.toString;function B(E){if(!(this instanceof B))return new B(E);this.options=P.assign({chunkSize:16384,windowBits:0,to:""},E||{});var b=this.options;b.raw&&0<=b.windowBits&&b.windowBits<16&&(b.windowBits=-b.windowBits,b.windowBits===0&&(b.windowBits=-15)),!(0<=b.windowBits&&b.windowBits<16)||E&&E.windowBits||(b.windowBits+=32),15<b.windowBits&&b.windowBits<48&&!(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Z,this.strm.avail_out=0;var p=m.inflateInit2(this.strm,b.windowBits);if(p!==A.Z_OK)throw new Error(F[p]);this.header=new G,m.inflateGetHeader(this.strm,this.header)}function q(E,b){var p=new B(b);if(p.push(E,!0),p.err)throw p.msg||F[p.err];return p.result}B.prototype.push=function(E,b){var p,g,S,x,U,z,j=this.strm,lt=this.options.chunkSize,ft=this.options.dictionary,gt=!1;if(this.ended)return!1;g=b===~~b?b:b===!0?A.Z_FINISH:A.Z_NO_FLUSH,typeof E=="string"?j.input=D.binstring2buf(E):J.call(E)==="[object ArrayBuffer]"?j.input=new Uint8Array(E):j.input=E,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new P.Buf8(lt),j.next_out=0,j.avail_out=lt),(p=m.inflate(j,A.Z_NO_FLUSH))===A.Z_NEED_DICT&&ft&&(z=typeof ft=="string"?D.string2buf(ft):J.call(ft)==="[object ArrayBuffer]"?new Uint8Array(ft):ft,p=m.inflateSetDictionary(this.strm,z)),p===A.Z_BUF_ERROR&>===!0&&(p=A.Z_OK,gt=!1),p!==A.Z_STREAM_END&&p!==A.Z_OK)return this.onEnd(p),!(this.ended=!0);j.next_out&&(j.avail_out!==0&&p!==A.Z_STREAM_END&&(j.avail_in!==0||g!==A.Z_FINISH&&g!==A.Z_SYNC_FLUSH)||(this.options.to==="string"?(S=D.utf8border(j.output,j.next_out),x=j.next_out-S,U=D.buf2string(j.output,S),j.next_out=x,j.avail_out=lt-x,x&&P.arraySet(j.output,j.output,S,x,0),this.onData(U)):this.onData(P.shrinkBuf(j.output,j.next_out)))),j.avail_in===0&&j.avail_out===0&&(gt=!0)}while((0<j.avail_in||j.avail_out===0)&&p!==A.Z_STREAM_END);return p===A.Z_STREAM_END&&(g=A.Z_FINISH),g===A.Z_FINISH?(p=m.inflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===A.Z_OK):g!==A.Z_SYNC_FLUSH||(this.onEnd(A.Z_OK),!(j.avail_out=0))},B.prototype.onData=function(E){this.chunks.push(E)},B.prototype.onEnd=function(E){E===A.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=P.flattenChunks(this.chunks)),this.chunks=[],this.err=E,this.msg=this.strm.msg},H.Inflate=B,H.inflate=q,H.inflateRaw=function(E,b){return(b=b||{}).raw=!0,q(E,b)},H.ungzip=q},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(d,nt,H){var m=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";H.assign=function(A){for(var F=Array.prototype.slice.call(arguments,1);F.length;){var Z=F.shift();if(Z){if(typeof Z!="object")throw new TypeError(Z+"must be non-object");for(var G in Z)Z.hasOwnProperty(G)&&(A[G]=Z[G])}}return A},H.shrinkBuf=function(A,F){return A.length===F?A:A.subarray?A.subarray(0,F):(A.length=F,A)};var P={arraySet:function(A,F,Z,G,J){if(F.subarray&&A.subarray)A.set(F.subarray(Z,Z+G),J);else for(var B=0;B<G;B++)A[J+B]=F[Z+B]},flattenChunks:function(A){var F,Z,G,J,B,q;for(F=G=0,Z=A.length;F<Z;F++)G+=A[F].length;for(q=new Uint8Array(G),F=J=0,Z=A.length;F<Z;F++)B=A[F],q.set(B,J),J+=B.length;return q}},D={arraySet:function(A,F,Z,G,J){for(var B=0;B<G;B++)A[J+B]=F[Z+B]},flattenChunks:function(A){return[].concat.apply([],A)}};H.setTyped=function(A){A?(H.Buf8=Uint8Array,H.Buf16=Uint16Array,H.Buf32=Int32Array,H.assign(H,P)):(H.Buf8=Array,H.Buf16=Array,H.Buf32=Array,H.assign(H,D))},H.setTyped(m)},{}],42:[function(d,nt,H){var m=d("./common"),P=!0,D=!0;try{String.fromCharCode.apply(null,[0])}catch{P=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{D=!1}for(var A=new m.Buf8(256),F=0;F<256;F++)A[F]=252<=F?6:248<=F?5:240<=F?4:224<=F?3:192<=F?2:1;function Z(G,J){if(J<65537&&(G.subarray&&D||!G.subarray&&P))return String.fromCharCode.apply(null,m.shrinkBuf(G,J));for(var B="",q=0;q<J;q++)B+=String.fromCharCode(G[q]);return B}A[254]=A[254]=1,H.string2buf=function(G){var J,B,q,E,b,p=G.length,g=0;for(E=0;E<p;E++)(64512&(B=G.charCodeAt(E)))==55296&&E+1<p&&(64512&(q=G.charCodeAt(E+1)))==56320&&(B=65536+(B-55296<<10)+(q-56320),E++),g+=B<128?1:B<2048?2:B<65536?3:4;for(J=new m.Buf8(g),E=b=0;b<g;E++)(64512&(B=G.charCodeAt(E)))==55296&&E+1<p&&(64512&(q=G.charCodeAt(E+1)))==56320&&(B=65536+(B-55296<<10)+(q-56320),E++),B<128?J[b++]=B:(B<2048?J[b++]=192|B>>>6:(B<65536?J[b++]=224|B>>>12:(J[b++]=240|B>>>18,J[b++]=128|B>>>12&63),J[b++]=128|B>>>6&63),J[b++]=128|63&B);return J},H.buf2binstring=function(G){return Z(G,G.length)},H.binstring2buf=function(G){for(var J=new m.Buf8(G.length),B=0,q=J.length;B<q;B++)J[B]=G.charCodeAt(B);return J},H.buf2string=function(G,J){var B,q,E,b,p=J||G.length,g=new Array(2*p);for(B=q=0;B<p;)if((E=G[B++])<128)g[q++]=E;else if(4<(b=A[E]))g[q++]=65533,B+=b-1;else{for(E&=b===2?31:b===3?15:7;1<b&&B<p;)E=E<<6|63&G[B++],b--;1<b?g[q++]=65533:E<65536?g[q++]=E:(E-=65536,g[q++]=55296|E>>10&1023,g[q++]=56320|1023&E)}return Z(g,q)},H.utf8border=function(G,J){var B;for((J=J||G.length)>G.length&&(J=G.length),B=J-1;0<=B&&(192&G[B])==128;)B--;return B<0||B===0?J:B+A[G[B]]>J?B:J}},{"./common":41}],43:[function(d,nt,H){nt.exports=function(m,P,D,A){for(var F=65535&m|0,Z=m>>>16&65535|0,G=0;D!==0;){for(D-=G=2e3<D?2e3:D;Z=Z+(F=F+P[A++]|0)|0,--G;);F%=65521,Z%=65521}return F|Z<<16|0}},{}],44:[function(d,nt,H){nt.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(d,nt,H){var m=function(){for(var P,D=[],A=0;A<256;A++){P=A;for(var F=0;F<8;F++)P=1&P?3988292384^P>>>1:P>>>1;D[A]=P}return D}();nt.exports=function(P,D,A,F){var Z=m,G=F+A;P^=-1;for(var J=F;J<G;J++)P=P>>>8^Z[255&(P^D[J])];return-1^P}},{}],46:[function(d,nt,H){var m,P=d("../utils/common"),D=d("./trees"),A=d("./adler32"),F=d("./crc32"),Z=d("./messages"),G=0,J=4,B=0,q=-2,E=-1,b=4,p=2,g=8,S=9,x=286,U=30,z=19,j=2*x+1,lt=15,ft=3,gt=258,Nt=gt+ft+1,at=42,Et=113,I=1,zt=2,Pt=3,Rt=4;function ge(R,Jt){return R.msg=Z[Jt],Jt}function ue(R){return(R<<1)-(4<R?9:0)}function Ft(R){for(var Jt=R.length;0<=--Jt;)R[Jt]=0}function Dt(R){var Jt=R.state,Wt=Jt.pending;Wt>R.avail_out&&(Wt=R.avail_out),Wt!==0&&(P.arraySet(R.output,Jt.pending_buf,Jt.pending_out,Wt,R.next_out),R.next_out+=Wt,Jt.pending_out+=Wt,R.total_out+=Wt,R.avail_out-=Wt,Jt.pending-=Wt,Jt.pending===0&&(Jt.pending_out=0))}function kt(R,Jt){D._tr_flush_block(R,0<=R.block_start?R.block_start:-1,R.strstart-R.block_start,Jt),R.block_start=R.strstart,Dt(R.strm)}function Fe(R,Jt){R.pending_buf[R.pending++]=Jt}function xe(R,Jt){R.pending_buf[R.pending++]=Jt>>>8&255,R.pending_buf[R.pending++]=255&Jt}function Zt(R,Jt){var Wt,ct,pt=R.max_chain_length,Lt=R.strstart,ie=R.prev_length,Kt=R.nice_match,w=R.strstart>R.w_size-Nt?R.strstart-(R.w_size-Nt):0,X=R.window,et=R.w_mask,K=R.prev,vt=R.strstart+gt,Gt=X[Lt+ie-1],Xt=X[Lt+ie];R.prev_length>=R.good_match&&(pt>>=2),Kt>R.lookahead&&(Kt=R.lookahead);do if(X[(Wt=Jt)+ie]===Xt&&X[Wt+ie-1]===Gt&&X[Wt]===X[Lt]&&X[++Wt]===X[Lt+1]){Lt+=2,Wt++;do;while(X[++Lt]===X[++Wt]&&X[++Lt]===X[++Wt]&&X[++Lt]===X[++Wt]&&X[++Lt]===X[++Wt]&&X[++Lt]===X[++Wt]&&X[++Lt]===X[++Wt]&&X[++Lt]===X[++Wt]&&X[++Lt]===X[++Wt]&&Lt<vt);if(ct=gt-(vt-Lt),Lt=vt-gt,ie<ct){if(R.match_start=Jt,Kt<=(ie=ct))break;Gt=X[Lt+ie-1],Xt=X[Lt+ie]}}while((Jt=K[Jt&et])>w&&--pt!=0);return ie<=R.lookahead?ie:R.lookahead}function ti(R){var Jt,Wt,ct,pt,Lt,ie,Kt,w,X,et,K=R.w_size;do{if(pt=R.window_size-R.lookahead-R.strstart,R.strstart>=K+(K-Nt)){for(P.arraySet(R.window,R.window,K,K,0),R.match_start-=K,R.strstart-=K,R.block_start-=K,Jt=Wt=R.hash_size;ct=R.head[--Jt],R.head[Jt]=K<=ct?ct-K:0,--Wt;);for(Jt=Wt=K;ct=R.prev[--Jt],R.prev[Jt]=K<=ct?ct-K:0,--Wt;);pt+=K}if(R.strm.avail_in===0)break;if(ie=R.strm,Kt=R.window,w=R.strstart+R.lookahead,X=pt,et=void 0,et=ie.avail_in,X<et&&(et=X),Wt=et===0?0:(ie.avail_in-=et,P.arraySet(Kt,ie.input,ie.next_in,et,w),ie.state.wrap===1?ie.adler=A(ie.adler,Kt,et,w):ie.state.wrap===2&&(ie.adler=F(ie.adler,Kt,et,w)),ie.next_in+=et,ie.total_in+=et,et),R.lookahead+=Wt,R.lookahead+R.insert>=ft)for(Lt=R.strstart-R.insert,R.ins_h=R.window[Lt],R.ins_h=(R.ins_h<<R.hash_shift^R.window[Lt+1])&R.hash_mask;R.insert&&(R.ins_h=(R.ins_h<<R.hash_shift^R.window[Lt+ft-1])&R.hash_mask,R.prev[Lt&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=Lt,Lt++,R.insert--,!(R.lookahead+R.insert<ft)););}while(R.lookahead<Nt&&R.strm.avail_in!==0)}function ki(R,Jt){for(var Wt,ct;;){if(R.lookahead<Nt){if(ti(R),R.lookahead<Nt&&Jt===G)return I;if(R.lookahead===0)break}if(Wt=0,R.lookahead>=ft&&(R.ins_h=(R.ins_h<<R.hash_shift^R.window[R.strstart+ft-1])&R.hash_mask,Wt=R.prev[R.strstart&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=R.strstart),Wt!==0&&R.strstart-Wt<=R.w_size-Nt&&(R.match_length=Zt(R,Wt)),R.match_length>=ft)if(ct=D._tr_tally(R,R.strstart-R.match_start,R.match_length-ft),R.lookahead-=R.match_length,R.match_length<=R.max_lazy_match&&R.lookahead>=ft){for(R.match_length--;R.strstart++,R.ins_h=(R.ins_h<<R.hash_shift^R.window[R.strstart+ft-1])&R.hash_mask,Wt=R.prev[R.strstart&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=R.strstart,--R.match_length!=0;);R.strstart++}else R.strstart+=R.match_length,R.match_length=0,R.ins_h=R.window[R.strstart],R.ins_h=(R.ins_h<<R.hash_shift^R.window[R.strstart+1])&R.hash_mask;else ct=D._tr_tally(R,0,R.window[R.strstart]),R.lookahead--,R.strstart++;if(ct&&(kt(R,!1),R.strm.avail_out===0))return I}return R.insert=R.strstart<ft-1?R.strstart:ft-1,Jt===J?(kt(R,!0),R.strm.avail_out===0?Pt:Rt):R.last_lit&&(kt(R,!1),R.strm.avail_out===0)?I:zt}function Oe(R,Jt){for(var Wt,ct,pt;;){if(R.lookahead<Nt){if(ti(R),R.lookahead<Nt&&Jt===G)return I;if(R.lookahead===0)break}if(Wt=0,R.lookahead>=ft&&(R.ins_h=(R.ins_h<<R.hash_shift^R.window[R.strstart+ft-1])&R.hash_mask,Wt=R.prev[R.strstart&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=R.strstart),R.prev_length=R.match_length,R.prev_match=R.match_start,R.match_length=ft-1,Wt!==0&&R.prev_length<R.max_lazy_match&&R.strstart-Wt<=R.w_size-Nt&&(R.match_length=Zt(R,Wt),R.match_length<=5&&(R.strategy===1||R.match_length===ft&&4096<R.strstart-R.match_start)&&(R.match_length=ft-1)),R.prev_length>=ft&&R.match_length<=R.prev_length){for(pt=R.strstart+R.lookahead-ft,ct=D._tr_tally(R,R.strstart-1-R.prev_match,R.prev_length-ft),R.lookahead-=R.prev_length-1,R.prev_length-=2;++R.strstart<=pt&&(R.ins_h=(R.ins_h<<R.hash_shift^R.window[R.strstart+ft-1])&R.hash_mask,Wt=R.prev[R.strstart&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=R.strstart),--R.prev_length!=0;);if(R.match_available=0,R.match_length=ft-1,R.strstart++,ct&&(kt(R,!1),R.strm.avail_out===0))return I}else if(R.match_available){if((ct=D._tr_tally(R,0,R.window[R.strstart-1]))&&kt(R,!1),R.strstart++,R.lookahead--,R.strm.avail_out===0)return I}else R.match_available=1,R.strstart++,R.lookahead--}return R.match_available&&(ct=D._tr_tally(R,0,R.window[R.strstart-1]),R.match_available=0),R.insert=R.strstart<ft-1?R.strstart:ft-1,Jt===J?(kt(R,!0),R.strm.avail_out===0?Pt:Rt):R.last_lit&&(kt(R,!1),R.strm.avail_out===0)?I:zt}function Ge(R,Jt,Wt,ct,pt){this.good_length=R,this.max_lazy=Jt,this.nice_length=Wt,this.max_chain=ct,this.func=pt}function di(){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=g,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 P.Buf16(2*j),this.dyn_dtree=new P.Buf16(2*(2*U+1)),this.bl_tree=new P.Buf16(2*(2*z+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 P.Buf16(lt+1),this.heap=new P.Buf16(2*x+1),Ft(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new P.Buf16(2*x+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 Ri(R){var Jt;return R&&R.state?(R.total_in=R.total_out=0,R.data_type=p,(Jt=R.state).pending=0,Jt.pending_out=0,Jt.wrap<0&&(Jt.wrap=-Jt.wrap),Jt.status=Jt.wrap?at:Et,R.adler=Jt.wrap===2?0:1,Jt.last_flush=G,D._tr_init(Jt),B):ge(R,q)}function hn(R){var Jt=Ri(R);return Jt===B&&function(Wt){Wt.window_size=2*Wt.w_size,Ft(Wt.head),Wt.max_lazy_match=m[Wt.level].max_lazy,Wt.good_match=m[Wt.level].good_length,Wt.nice_match=m[Wt.level].nice_length,Wt.max_chain_length=m[Wt.level].max_chain,Wt.strstart=0,Wt.block_start=0,Wt.lookahead=0,Wt.insert=0,Wt.match_length=Wt.prev_length=ft-1,Wt.match_available=0,Wt.ins_h=0}(R.state),Jt}function Ji(R,Jt,Wt,ct,pt,Lt){if(!R)return q;var ie=1;if(Jt===E&&(Jt=6),ct<0?(ie=0,ct=-ct):15<ct&&(ie=2,ct-=16),pt<1||S<pt||Wt!==g||ct<8||15<ct||Jt<0||9<Jt||Lt<0||b<Lt)return ge(R,q);ct===8&&(ct=9);var Kt=new di;return(R.state=Kt).strm=R,Kt.wrap=ie,Kt.gzhead=null,Kt.w_bits=ct,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+ft-1)/ft),Kt.window=new P.Buf8(2*Kt.w_size),Kt.head=new P.Buf16(Kt.hash_size),Kt.prev=new P.Buf16(Kt.w_size),Kt.lit_bufsize=1<<pt+6,Kt.pending_buf_size=4*Kt.lit_bufsize,Kt.pending_buf=new P.Buf8(Kt.pending_buf_size),Kt.d_buf=1*Kt.lit_bufsize,Kt.l_buf=3*Kt.lit_bufsize,Kt.level=Jt,Kt.strategy=Lt,Kt.method=Wt,hn(R)}m=[new Ge(0,0,0,0,function(R,Jt){var Wt=65535;for(Wt>R.pending_buf_size-5&&(Wt=R.pending_buf_size-5);;){if(R.lookahead<=1){if(ti(R),R.lookahead===0&&Jt===G)return I;if(R.lookahead===0)break}R.strstart+=R.lookahead,R.lookahead=0;var ct=R.block_start+Wt;if((R.strstart===0||R.strstart>=ct)&&(R.lookahead=R.strstart-ct,R.strstart=ct,kt(R,!1),R.strm.avail_out===0)||R.strstart-R.block_start>=R.w_size-Nt&&(kt(R,!1),R.strm.avail_out===0))return I}return R.insert=0,Jt===J?(kt(R,!0),R.strm.avail_out===0?Pt:Rt):(R.strstart>R.block_start&&(kt(R,!1),R.strm.avail_out),I)}),new Ge(4,4,8,4,ki),new Ge(4,5,16,8,ki),new Ge(4,6,32,32,ki),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)],H.deflateInit=function(R,Jt){return Ji(R,Jt,g,15,8,0)},H.deflateInit2=Ji,H.deflateReset=hn,H.deflateResetKeep=Ri,H.deflateSetHeader=function(R,Jt){return R&&R.state?R.state.wrap!==2?q:(R.state.gzhead=Jt,B):q},H.deflate=function(R,Jt){var Wt,ct,pt,Lt;if(!R||!R.state||5<Jt||Jt<0)return R?ge(R,q):q;if(ct=R.state,!R.output||!R.input&&R.avail_in!==0||ct.status===666&&Jt!==J)return ge(R,R.avail_out===0?-5:q);if(ct.strm=R,Wt=ct.last_flush,ct.last_flush=Jt,ct.status===at)if(ct.wrap===2)R.adler=0,Fe(ct,31),Fe(ct,139),Fe(ct,8),ct.gzhead?(Fe(ct,(ct.gzhead.text?1:0)+(ct.gzhead.hcrc?2:0)+(ct.gzhead.extra?4:0)+(ct.gzhead.name?8:0)+(ct.gzhead.comment?16:0)),Fe(ct,255&ct.gzhead.time),Fe(ct,ct.gzhead.time>>8&255),Fe(ct,ct.gzhead.time>>16&255),Fe(ct,ct.gzhead.time>>24&255),Fe(ct,ct.level===9?2:2<=ct.strategy||ct.level<2?4:0),Fe(ct,255&ct.gzhead.os),ct.gzhead.extra&&ct.gzhead.extra.length&&(Fe(ct,255&ct.gzhead.extra.length),Fe(ct,ct.gzhead.extra.length>>8&255)),ct.gzhead.hcrc&&(R.adler=F(R.adler,ct.pending_buf,ct.pending,0)),ct.gzindex=0,ct.status=69):(Fe(ct,0),Fe(ct,0),Fe(ct,0),Fe(ct,0),Fe(ct,0),Fe(ct,ct.level===9?2:2<=ct.strategy||ct.level<2?4:0),Fe(ct,3),ct.status=Et);else{var ie=g+(ct.w_bits-8<<4)<<8;ie|=(2<=ct.strategy||ct.level<2?0:ct.level<6?1:ct.level===6?2:3)<<6,ct.strstart!==0&&(ie|=32),ie+=31-ie%31,ct.status=Et,xe(ct,ie),ct.strstart!==0&&(xe(ct,R.adler>>>16),xe(ct,65535&R.adler)),R.adler=1}if(ct.status===69)if(ct.gzhead.extra){for(pt=ct.pending;ct.gzindex<(65535&ct.gzhead.extra.length)&&(ct.pending!==ct.pending_buf_size||(ct.gzhead.hcrc&&ct.pending>pt&&(R.adler=F(R.adler,ct.pending_buf,ct.pending-pt,pt)),Dt(R),pt=ct.pending,ct.pending!==ct.pending_buf_size));)Fe(ct,255&ct.gzhead.extra[ct.gzindex]),ct.gzindex++;ct.gzhead.hcrc&&ct.pending>pt&&(R.adler=F(R.adler,ct.pending_buf,ct.pending-pt,pt)),ct.gzindex===ct.gzhead.extra.length&&(ct.gzindex=0,ct.status=73)}else ct.status=73;if(ct.status===73)if(ct.gzhead.name){pt=ct.pending;do{if(ct.pending===ct.pending_buf_size&&(ct.gzhead.hcrc&&ct.pending>pt&&(R.adler=F(R.adler,ct.pending_buf,ct.pending-pt,pt)),Dt(R),pt=ct.pending,ct.pending===ct.pending_buf_size)){Lt=1;break}Lt=ct.gzindex<ct.gzhead.name.length?255&ct.gzhead.name.charCodeAt(ct.gzindex++):0,Fe(ct,Lt)}while(Lt!==0);ct.gzhead.hcrc&&ct.pending>pt&&(R.adler=F(R.adler,ct.pending_buf,ct.pending-pt,pt)),Lt===0&&(ct.gzindex=0,ct.status=91)}else ct.status=91;if(ct.status===91)if(ct.gzhead.comment){pt=ct.pending;do{if(ct.pending===ct.pending_buf_size&&(ct.gzhead.hcrc&&ct.pending>pt&&(R.adler=F(R.adler,ct.pending_buf,ct.pending-pt,pt)),Dt(R),pt=ct.pending,ct.pending===ct.pending_buf_size)){Lt=1;break}Lt=ct.gzindex<ct.gzhead.comment.length?255&ct.gzhead.comment.charCodeAt(ct.gzindex++):0,Fe(ct,Lt)}while(Lt!==0);ct.gzhead.hcrc&&ct.pending>pt&&(R.adler=F(R.adler,ct.pending_buf,ct.pending-pt,pt)),Lt===0&&(ct.status=103)}else ct.status=103;if(ct.status===103&&(ct.gzhead.hcrc?(ct.pending+2>ct.pending_buf_size&&Dt(R),ct.pending+2<=ct.pending_buf_size&&(Fe(ct,255&R.adler),Fe(ct,R.adler>>8&255),R.adler=0,ct.status=Et)):ct.status=Et),ct.pending!==0){if(Dt(R),R.avail_out===0)return ct.last_flush=-1,B}else if(R.avail_in===0&&ue(Jt)<=ue(Wt)&&Jt!==J)return ge(R,-5);if(ct.status===666&&R.avail_in!==0)return ge(R,-5);if(R.avail_in!==0||ct.lookahead!==0||Jt!==G&&ct.status!==666){var Kt=ct.strategy===2?function(w,X){for(var et;;){if(w.lookahead===0&&(ti(w),w.lookahead===0)){if(X===G)return I;break}if(w.match_length=0,et=D._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++,et&&(kt(w,!1),w.strm.avail_out===0))return I}return w.insert=0,X===J?(kt(w,!0),w.strm.avail_out===0?Pt:Rt):w.last_lit&&(kt(w,!1),w.strm.avail_out===0)?I:zt}(ct,Jt):ct.strategy===3?function(w,X){for(var et,K,vt,Gt,Xt=w.window;;){if(w.lookahead<=gt){if(ti(w),w.lookahead<=gt&&X===G)return I;if(w.lookahead===0)break}if(w.match_length=0,w.lookahead>=ft&&0<w.strstart&&(K=Xt[vt=w.strstart-1])===Xt[++vt]&&K===Xt[++vt]&&K===Xt[++vt]){Gt=w.strstart+gt;do;while(K===Xt[++vt]&&K===Xt[++vt]&&K===Xt[++vt]&&K===Xt[++vt]&&K===Xt[++vt]&&K===Xt[++vt]&&K===Xt[++vt]&&K===Xt[++vt]&&vt<Gt);w.match_length=gt-(Gt-vt),w.match_length>w.lookahead&&(w.match_length=w.lookahead)}if(w.match_length>=ft?(et=D._tr_tally(w,1,w.match_length-ft),w.lookahead-=w.match_length,w.strstart+=w.match_length,w.match_length=0):(et=D._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++),et&&(kt(w,!1),w.strm.avail_out===0))return I}return w.insert=0,X===J?(kt(w,!0),w.strm.avail_out===0?Pt:Rt):w.last_lit&&(kt(w,!1),w.strm.avail_out===0)?I:zt}(ct,Jt):m[ct.level].func(ct,Jt);if(Kt!==Pt&&Kt!==Rt||(ct.status=666),Kt===I||Kt===Pt)return R.avail_out===0&&(ct.last_flush=-1),B;if(Kt===zt&&(Jt===1?D._tr_align(ct):Jt!==5&&(D._tr_stored_block(ct,0,0,!1),Jt===3&&(Ft(ct.head),ct.lookahead===0&&(ct.strstart=0,ct.block_start=0,ct.insert=0))),Dt(R),R.avail_out===0))return ct.last_flush=-1,B}return Jt!==J?B:ct.wrap<=0?1:(ct.wrap===2?(Fe(ct,255&R.adler),Fe(ct,R.adler>>8&255),Fe(ct,R.adler>>16&255),Fe(ct,R.adler>>24&255),Fe(ct,255&R.total_in),Fe(ct,R.total_in>>8&255),Fe(ct,R.total_in>>16&255),Fe(ct,R.total_in>>24&255)):(xe(ct,R.adler>>>16),xe(ct,65535&R.adler)),Dt(R),0<ct.wrap&&(ct.wrap=-ct.wrap),ct.pending!==0?B:1)},H.deflateEnd=function(R){var Jt;return R&&R.state?(Jt=R.state.status)!==at&&Jt!==69&&Jt!==73&&Jt!==91&&Jt!==103&&Jt!==Et&&Jt!==666?ge(R,q):(R.state=null,Jt===Et?ge(R,-3):B):q},H.deflateSetDictionary=function(R,Jt){var Wt,ct,pt,Lt,ie,Kt,w,X,et=Jt.length;if(!R||!R.state||(Lt=(Wt=R.state).wrap)===2||Lt===1&&Wt.status!==at||Wt.lookahead)return q;for(Lt===1&&(R.adler=A(R.adler,Jt,et,0)),Wt.wrap=0,et>=Wt.w_size&&(Lt===0&&(Ft(Wt.head),Wt.strstart=0,Wt.block_start=0,Wt.insert=0),X=new P.Buf8(Wt.w_size),P.arraySet(X,Jt,et-Wt.w_size,Wt.w_size,0),Jt=X,et=Wt.w_size),ie=R.avail_in,Kt=R.next_in,w=R.input,R.avail_in=et,R.next_in=0,R.input=Jt,ti(Wt);Wt.lookahead>=ft;){for(ct=Wt.strstart,pt=Wt.lookahead-(ft-1);Wt.ins_h=(Wt.ins_h<<Wt.hash_shift^Wt.window[ct+ft-1])&Wt.hash_mask,Wt.prev[ct&Wt.w_mask]=Wt.head[Wt.ins_h],Wt.head[Wt.ins_h]=ct,ct++,--pt;);Wt.strstart=ct,Wt.lookahead=ft-1,ti(Wt)}return Wt.strstart+=Wt.lookahead,Wt.block_start=Wt.strstart,Wt.insert=Wt.lookahead,Wt.lookahead=0,Wt.match_length=Wt.prev_length=ft-1,Wt.match_available=0,R.next_in=Kt,R.input=w,R.avail_in=ie,Wt.wrap=Lt,B},H.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(d,nt,H){nt.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(d,nt,H){nt.exports=function(m,P){var D,A,F,Z,G,J,B,q,E,b,p,g,S,x,U,z,j,lt,ft,gt,Nt,at,Et,I,zt;D=m.state,A=m.next_in,I=m.input,F=A+(m.avail_in-5),Z=m.next_out,zt=m.output,G=Z-(P-m.avail_out),J=Z+(m.avail_out-257),B=D.dmax,q=D.wsize,E=D.whave,b=D.wnext,p=D.window,g=D.hold,S=D.bits,x=D.lencode,U=D.distcode,z=(1<<D.lenbits)-1,j=(1<<D.distbits)-1;t:do{S<15&&(g+=I[A++]<<S,S+=8,g+=I[A++]<<S,S+=8),lt=x[g&z];e:for(;;){if(g>>>=ft=lt>>>24,S-=ft,(ft=lt>>>16&255)===0)zt[Z++]=65535<else{if(!(16&ft)){if(!(64&ft)){lt=x[(65535<)+(g&(1<<ft)-1)];continue e}if(32&ft){D.mode=12;break t}m.msg="invalid literal/length code",D.mode=30;break t}gt=65535<,(ft&=15)&&(S<ft&&(g+=I[A++]<<S,S+=8),gt+=g&(1<<ft)-1,g>>>=ft,S-=ft),S<15&&(g+=I[A++]<<S,S+=8,g+=I[A++]<<S,S+=8),lt=U[g&j];i:for(;;){if(g>>>=ft=lt>>>24,S-=ft,!(16&(ft=lt>>>16&255))){if(!(64&ft)){lt=U[(65535<)+(g&(1<<ft)-1)];continue i}m.msg="invalid distance code",D.mode=30;break t}if(Nt=65535<,S<(ft&=15)&&(g+=I[A++]<<S,(S+=8)<ft&&(g+=I[A++]<<S,S+=8)),B<(Nt+=g&(1<<ft)-1)){m.msg="invalid distance too far back",D.mode=30;break t}if(g>>>=ft,S-=ft,(ft=Z-G)<Nt){if(E<(ft=Nt-ft)&&D.sane){m.msg="invalid distance too far back",D.mode=30;break t}if(Et=p,(at=0)===b){if(at+=q-ft,ft<gt){for(gt-=ft;zt[Z++]=p[at++],--ft;);at=Z-Nt,Et=zt}}else if(b<ft){if(at+=q+b-ft,(ft-=b)<gt){for(gt-=ft;zt[Z++]=p[at++],--ft;);if(at=0,b<gt){for(gt-=ft=b;zt[Z++]=p[at++],--ft;);at=Z-Nt,Et=zt}}}else if(at+=b-ft,ft<gt){for(gt-=ft;zt[Z++]=p[at++],--ft;);at=Z-Nt,Et=zt}for(;2<gt;)zt[Z++]=Et[at++],zt[Z++]=Et[at++],zt[Z++]=Et[at++],gt-=3;gt&&(zt[Z++]=Et[at++],1<gt&&(zt[Z++]=Et[at++]))}else{for(at=Z-Nt;zt[Z++]=zt[at++],zt[Z++]=zt[at++],zt[Z++]=zt[at++],2<(gt-=3););gt&&(zt[Z++]=zt[at++],1<gt&&(zt[Z++]=zt[at++]))}break}}break}}while(A<F&&Z<J);A-=gt=S>>3,g&=(1<<(S-=gt<<3))-1,m.next_in=A,m.next_out=Z,m.avail_in=A<F?F-A+5:5-(A-F),m.avail_out=Z<J?J-Z+257:257-(Z-J),D.hold=g,D.bits=S}},{}],49:[function(d,nt,H){var m=d("../utils/common"),P=d("./adler32"),D=d("./crc32"),A=d("./inffast"),F=d("./inftrees"),Z=1,G=2,J=0,B=-2,q=1,E=852,b=592;function p(at){return(at>>>24&255)+(at>>>8&65280)+((65280&at)<<8)+((255&at)<<24)}function g(){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 m.Buf16(320),this.work=new m.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function S(at){var Et;return at&&at.state?(Et=at.state,at.total_in=at.total_out=Et.total=0,at.msg="",Et.wrap&&(at.adler=1&Et.wrap),Et.mode=q,Et.last=0,Et.havedict=0,Et.dmax=32768,Et.head=null,Et.hold=0,Et.bits=0,Et.lencode=Et.lendyn=new m.Buf32(E),Et.distcode=Et.distdyn=new m.Buf32(b),Et.sane=1,Et.back=-1,J):B}function x(at){var Et;return at&&at.state?((Et=at.state).wsize=0,Et.whave=0,Et.wnext=0,S(at)):B}function U(at,Et){var I,zt;return at&&at.state?(zt=at.state,Et<0?(I=0,Et=-Et):(I=1+(Et>>4),Et<48&&(Et&=15)),Et&&(Et<8||15<Et)?B:(zt.window!==null&&zt.wbits!==Et&&(zt.window=null),zt.wrap=I,zt.wbits=Et,x(at))):B}function z(at,Et){var I,zt;return at?(zt=new g,(at.state=zt).window=null,(I=U(at,Et))!==J&&(at.state=null),I):B}var j,lt,ft=!0;function gt(at){if(ft){var Et;for(j=new m.Buf32(512),lt=new m.Buf32(32),Et=0;Et<144;)at.lens[Et++]=8;for(;Et<256;)at.lens[Et++]=9;for(;Et<280;)at.lens[Et++]=7;for(;Et<288;)at.lens[Et++]=8;for(F(Z,at.lens,0,288,j,0,at.work,{bits:9}),Et=0;Et<32;)at.lens[Et++]=5;F(G,at.lens,0,32,lt,0,at.work,{bits:5}),ft=!1}at.lencode=j,at.lenbits=9,at.distcode=lt,at.distbits=5}function Nt(at,Et,I,zt){var Pt,Rt=at.state;return Rt.window===null&&(Rt.wsize=1<<Rt.wbits,Rt.wnext=0,Rt.whave=0,Rt.window=new m.Buf8(Rt.wsize)),zt>=Rt.wsize?(m.arraySet(Rt.window,Et,I-Rt.wsize,Rt.wsize,0),Rt.wnext=0,Rt.whave=Rt.wsize):(zt<(Pt=Rt.wsize-Rt.wnext)&&(Pt=zt),m.arraySet(Rt.window,Et,I-zt,Pt,Rt.wnext),(zt-=Pt)?(m.arraySet(Rt.window,Et,I-zt,zt,0),Rt.wnext=zt,Rt.whave=Rt.wsize):(Rt.wnext+=Pt,Rt.wnext===Rt.wsize&&(Rt.wnext=0),Rt.whave<Rt.wsize&&(Rt.whave+=Pt))),0}H.inflateReset=x,H.inflateReset2=U,H.inflateResetKeep=S,H.inflateInit=function(at){return z(at,15)},H.inflateInit2=z,H.inflate=function(at,Et){var I,zt,Pt,Rt,ge,ue,Ft,Dt,kt,Fe,xe,Zt,ti,ki,Oe,Ge,di,Ri,hn,Ji,R,Jt,Wt,ct,pt=0,Lt=new m.Buf8(4),ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!at||!at.state||!at.output||!at.input&&at.avail_in!==0)return B;(I=at.state).mode===12&&(I.mode=13),ge=at.next_out,Pt=at.output,Ft=at.avail_out,Rt=at.next_in,zt=at.input,ue=at.avail_in,Dt=I.hold,kt=I.bits,Fe=ue,xe=Ft,Jt=J;t:for(;;)switch(I.mode){case q:if(I.wrap===0){I.mode=13;break}for(;kt<16;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}if(2&I.wrap&&Dt===35615){Lt[I.check=0]=255&Dt,Lt[1]=Dt>>>8&255,I.check=D(I.check,Lt,2,0),kt=Dt=0,I.mode=2;break}if(I.flags=0,I.head&&(I.head.done=!1),!(1&I.wrap)||(((255&Dt)<<8)+(Dt>>8))%31){at.msg="incorrect header check",I.mode=30;break}if((15&Dt)!=8){at.msg="unknown compression method",I.mode=30;break}if(kt-=4,R=8+(15&(Dt>>>=4)),I.wbits===0)I.wbits=R;else if(R>I.wbits){at.msg="invalid window size",I.mode=30;break}I.dmax=1<<R,at.adler=I.check=1,I.mode=512&Dt?10:12,kt=Dt=0;break;case 2:for(;kt<16;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}if(I.flags=Dt,(255&I.flags)!=8){at.msg="unknown compression method",I.mode=30;break}if(57344&I.flags){at.msg="unknown header flags set",I.mode=30;break}I.head&&(I.head.text=Dt>>8&1),512&I.flags&&(Lt[0]=255&Dt,Lt[1]=Dt>>>8&255,I.check=D(I.check,Lt,2,0)),kt=Dt=0,I.mode=3;case 3:for(;kt<32;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}I.head&&(I.head.time=Dt),512&I.flags&&(Lt[0]=255&Dt,Lt[1]=Dt>>>8&255,Lt[2]=Dt>>>16&255,Lt[3]=Dt>>>24&255,I.check=D(I.check,Lt,4,0)),kt=Dt=0,I.mode=4;case 4:for(;kt<16;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}I.head&&(I.head.xflags=255&Dt,I.head.os=Dt>>8),512&I.flags&&(Lt[0]=255&Dt,Lt[1]=Dt>>>8&255,I.check=D(I.check,Lt,2,0)),kt=Dt=0,I.mode=5;case 5:if(1024&I.flags){for(;kt<16;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}I.length=Dt,I.head&&(I.head.extra_len=Dt),512&I.flags&&(Lt[0]=255&Dt,Lt[1]=Dt>>>8&255,I.check=D(I.check,Lt,2,0)),kt=Dt=0}else I.head&&(I.head.extra=null);I.mode=6;case 6:if(1024&I.flags&&(ue<(Zt=I.length)&&(Zt=ue),Zt&&(I.head&&(R=I.head.extra_len-I.length,I.head.extra||(I.head.extra=new Array(I.head.extra_len)),m.arraySet(I.head.extra,zt,Rt,Zt,R)),512&I.flags&&(I.check=D(I.check,zt,Zt,Rt)),ue-=Zt,Rt+=Zt,I.length-=Zt),I.length))break t;I.length=0,I.mode=7;case 7:if(2048&I.flags){if(ue===0)break t;for(Zt=0;R=zt[Rt+Zt++],I.head&&R&&I.length<65536&&(I.head.name+=String.fromCharCode(R)),R&&Zt<ue;);if(512&I.flags&&(I.check=D(I.check,zt,Zt,Rt)),ue-=Zt,Rt+=Zt,R)break t}else I.head&&(I.head.name=null);I.length=0,I.mode=8;case 8:if(4096&I.flags){if(ue===0)break t;for(Zt=0;R=zt[Rt+Zt++],I.head&&R&&I.length<65536&&(I.head.comment+=String.fromCharCode(R)),R&&Zt<ue;);if(512&I.flags&&(I.check=D(I.check,zt,Zt,Rt)),ue-=Zt,Rt+=Zt,R)break t}else I.head&&(I.head.comment=null);I.mode=9;case 9:if(512&I.flags){for(;kt<16;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}if(Dt!==(65535&I.check)){at.msg="header crc mismatch",I.mode=30;break}kt=Dt=0}I.head&&(I.head.hcrc=I.flags>>9&1,I.head.done=!0),at.adler=I.check=0,I.mode=12;break;case 10:for(;kt<32;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}at.adler=I.check=p(Dt),kt=Dt=0,I.mode=11;case 11:if(I.havedict===0)return at.next_out=ge,at.avail_out=Ft,at.next_in=Rt,at.avail_in=ue,I.hold=Dt,I.bits=kt,2;at.adler=I.check=1,I.mode=12;case 12:if(Et===5||Et===6)break t;case 13:if(I.last){Dt>>>=7&kt,kt-=7&kt,I.mode=27;break}for(;kt<3;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}switch(I.last=1&Dt,kt-=1,3&(Dt>>>=1)){case 0:I.mode=14;break;case 1:if(gt(I),I.mode=20,Et!==6)break;Dt>>>=2,kt-=2;break t;case 2:I.mode=17;break;case 3:at.msg="invalid block type",I.mode=30}Dt>>>=2,kt-=2;break;case 14:for(Dt>>>=7&kt,kt-=7&kt;kt<32;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}if((65535&Dt)!=(Dt>>>16^65535)){at.msg="invalid stored block lengths",I.mode=30;break}if(I.length=65535&Dt,kt=Dt=0,I.mode=15,Et===6)break t;case 15:I.mode=16;case 16:if(Zt=I.length){if(ue<Zt&&(Zt=ue),Ft<Zt&&(Zt=Ft),Zt===0)break t;m.arraySet(Pt,zt,Rt,Zt,ge),ue-=Zt,Rt+=Zt,Ft-=Zt,ge+=Zt,I.length-=Zt;break}I.mode=12;break;case 17:for(;kt<14;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}if(I.nlen=257+(31&Dt),Dt>>>=5,kt-=5,I.ndist=1+(31&Dt),Dt>>>=5,kt-=5,I.ncode=4+(15&Dt),Dt>>>=4,kt-=4,286<I.nlen||30<I.ndist){at.msg="too many length or distance symbols",I.mode=30;break}I.have=0,I.mode=18;case 18:for(;I.have<I.ncode;){for(;kt<3;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}I.lens[ie[I.have++]]=7&Dt,Dt>>>=3,kt-=3}for(;I.have<19;)I.lens[ie[I.have++]]=0;if(I.lencode=I.lendyn,I.lenbits=7,Wt={bits:I.lenbits},Jt=F(0,I.lens,0,19,I.lencode,0,I.work,Wt),I.lenbits=Wt.bits,Jt){at.msg="invalid code lengths set",I.mode=30;break}I.have=0,I.mode=19;case 19:for(;I.have<I.nlen+I.ndist;){for(;Ge=(pt=I.lencode[Dt&(1<<I.lenbits)-1])>>>16&255,di=65535&pt,!((Oe=pt>>>24)<=kt);){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}if(di<16)Dt>>>=Oe,kt-=Oe,I.lens[I.have++]=di;else{if(di===16){for(ct=Oe+2;kt<ct;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}if(Dt>>>=Oe,kt-=Oe,I.have===0){at.msg="invalid bit length repeat",I.mode=30;break}R=I.lens[I.have-1],Zt=3+(3&Dt),Dt>>>=2,kt-=2}else if(di===17){for(ct=Oe+3;kt<ct;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}kt-=Oe,R=0,Zt=3+(7&(Dt>>>=Oe)),Dt>>>=3,kt-=3}else{for(ct=Oe+7;kt<ct;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}kt-=Oe,R=0,Zt=11+(127&(Dt>>>=Oe)),Dt>>>=7,kt-=7}if(I.have+Zt>I.nlen+I.ndist){at.msg="invalid bit length repeat",I.mode=30;break}for(;Zt--;)I.lens[I.have++]=R}}if(I.mode===30)break;if(I.lens[256]===0){at.msg="invalid code -- missing end-of-block",I.mode=30;break}if(I.lenbits=9,Wt={bits:I.lenbits},Jt=F(Z,I.lens,0,I.nlen,I.lencode,0,I.work,Wt),I.lenbits=Wt.bits,Jt){at.msg="invalid literal/lengths set",I.mode=30;break}if(I.distbits=6,I.distcode=I.distdyn,Wt={bits:I.distbits},Jt=F(G,I.lens,I.nlen,I.ndist,I.distcode,0,I.work,Wt),I.distbits=Wt.bits,Jt){at.msg="invalid distances set",I.mode=30;break}if(I.mode=20,Et===6)break t;case 20:I.mode=21;case 21:if(6<=ue&&258<=Ft){at.next_out=ge,at.avail_out=Ft,at.next_in=Rt,at.avail_in=ue,I.hold=Dt,I.bits=kt,A(at,xe),ge=at.next_out,Pt=at.output,Ft=at.avail_out,Rt=at.next_in,zt=at.input,ue=at.avail_in,Dt=I.hold,kt=I.bits,I.mode===12&&(I.back=-1);break}for(I.back=0;Ge=(pt=I.lencode[Dt&(1<<I.lenbits)-1])>>>16&255,di=65535&pt,!((Oe=pt>>>24)<=kt);){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}if(Ge&&!(240&Ge)){for(Ri=Oe,hn=Ge,Ji=di;Ge=(pt=I.lencode[Ji+((Dt&(1<<Ri+hn)-1)>>Ri)])>>>16&255,di=65535&pt,!(Ri+(Oe=pt>>>24)<=kt);){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}Dt>>>=Ri,kt-=Ri,I.back+=Ri}if(Dt>>>=Oe,kt-=Oe,I.back+=Oe,I.length=di,Ge===0){I.mode=26;break}if(32&Ge){I.back=-1,I.mode=12;break}if(64&Ge){at.msg="invalid literal/length code",I.mode=30;break}I.extra=15&Ge,I.mode=22;case 22:if(I.extra){for(ct=I.extra;kt<ct;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}I.length+=Dt&(1<<I.extra)-1,Dt>>>=I.extra,kt-=I.extra,I.back+=I.extra}I.was=I.length,I.mode=23;case 23:for(;Ge=(pt=I.distcode[Dt&(1<<I.distbits)-1])>>>16&255,di=65535&pt,!((Oe=pt>>>24)<=kt);){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}if(!(240&Ge)){for(Ri=Oe,hn=Ge,Ji=di;Ge=(pt=I.distcode[Ji+((Dt&(1<<Ri+hn)-1)>>Ri)])>>>16&255,di=65535&pt,!(Ri+(Oe=pt>>>24)<=kt);){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}Dt>>>=Ri,kt-=Ri,I.back+=Ri}if(Dt>>>=Oe,kt-=Oe,I.back+=Oe,64&Ge){at.msg="invalid distance code",I.mode=30;break}I.offset=di,I.extra=15&Ge,I.mode=24;case 24:if(I.extra){for(ct=I.extra;kt<ct;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}I.offset+=Dt&(1<<I.extra)-1,Dt>>>=I.extra,kt-=I.extra,I.back+=I.extra}if(I.offset>I.dmax){at.msg="invalid distance too far back",I.mode=30;break}I.mode=25;case 25:if(Ft===0)break t;if(Zt=xe-Ft,I.offset>Zt){if((Zt=I.offset-Zt)>I.whave&&I.sane){at.msg="invalid distance too far back",I.mode=30;break}ti=Zt>I.wnext?(Zt-=I.wnext,I.wsize-Zt):I.wnext-Zt,Zt>I.length&&(Zt=I.length),ki=I.window}else ki=Pt,ti=ge-I.offset,Zt=I.length;for(Ft<Zt&&(Zt=Ft),Ft-=Zt,I.length-=Zt;Pt[ge++]=ki[ti++],--Zt;);I.length===0&&(I.mode=21);break;case 26:if(Ft===0)break t;Pt[ge++]=I.length,Ft--,I.mode=21;break;case 27:if(I.wrap){for(;kt<32;){if(ue===0)break t;ue--,Dt|=zt[Rt++]<<kt,kt+=8}if(xe-=Ft,at.total_out+=xe,I.total+=xe,xe&&(at.adler=I.check=I.flags?D(I.check,Pt,xe,ge-xe):P(I.check,Pt,xe,ge-xe)),xe=Ft,(I.flags?Dt:p(Dt))!==I.check){at.msg="incorrect data check",I.mode=30;break}kt=Dt=0}I.mode=28;case 28:if(I.wrap&&I.flags){for(;kt<32;){if(ue===0)break t;ue--,Dt+=zt[Rt++]<<kt,kt+=8}if(Dt!==(4294967295&I.total)){at.msg="incorrect length check",I.mode=30;break}kt=Dt=0}I.mode=29;case 29:Jt=1;break t;case 30:Jt=-3;break t;case 31:return-4;case 32:default:return B}return at.next_out=ge,at.avail_out=Ft,at.next_in=Rt,at.avail_in=ue,I.hold=Dt,I.bits=kt,(I.wsize||xe!==at.avail_out&&I.mode<30&&(I.mode<27||Et!==4))&&Nt(at,at.output,at.next_out,xe-at.avail_out)?(I.mode=31,-4):(Fe-=at.avail_in,xe-=at.avail_out,at.total_in+=Fe,at.total_out+=xe,I.total+=xe,I.wrap&&xe&&(at.adler=I.check=I.flags?D(I.check,Pt,xe,at.next_out-xe):P(I.check,Pt,xe,at.next_out-xe)),at.data_type=I.bits+(I.last?64:0)+(I.mode===12?128:0)+(I.mode===20||I.mode===15?256:0),(Fe==0&&xe===0||Et===4)&&Jt===J&&(Jt=-5),Jt)},H.inflateEnd=function(at){if(!at||!at.state)return B;var Et=at.state;return Et.window&&(Et.window=null),at.state=null,J},H.inflateGetHeader=function(at,Et){var I;return at&&at.state&&2&(I=at.state).wrap?((I.head=Et).done=!1,J):B},H.inflateSetDictionary=function(at,Et){var I,zt=Et.length;return at&&at.state?(I=at.state).wrap!==0&&I.mode!==11?B:I.mode===11&&P(1,Et,zt,0)!==I.check?-3:Nt(at,Et,zt,zt)?(I.mode=31,-4):(I.havedict=1,J):B},H.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(d,nt,H){var m=d("../utils/common"),P=[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],D=[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],A=[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],F=[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];nt.exports=function(Z,G,J,B,q,E,b,p){var g,S,x,U,z,j,lt,ft,gt,Nt=p.bits,at=0,Et=0,I=0,zt=0,Pt=0,Rt=0,ge=0,ue=0,Ft=0,Dt=0,kt=null,Fe=0,xe=new m.Buf16(16),Zt=new m.Buf16(16),ti=null,ki=0;for(at=0;at<=15;at++)xe[at]=0;for(Et=0;Et<B;Et++)xe[G[J+Et]]++;for(Pt=Nt,zt=15;1<=zt&&xe[zt]===0;zt--);if(zt<Pt&&(Pt=zt),zt===0)return q[E++]=20971520,q[E++]=20971520,p.bits=1,0;for(I=1;I<zt&&xe[I]===0;I++);for(Pt<I&&(Pt=I),at=ue=1;at<=15;at++)if(ue<<=1,(ue-=xe[at])<0)return-1;if(0<ue&&(Z===0||zt!==1))return-1;for(Zt[1]=0,at=1;at<15;at++)Zt[at+1]=Zt[at]+xe[at];for(Et=0;Et<B;Et++)G[J+Et]!==0&&(b[Zt[G[J+Et]]++]=Et);if(j=Z===0?(kt=ti=b,19):Z===1?(kt=P,Fe-=257,ti=D,ki-=257,256):(kt=A,ti=F,-1),at=I,z=E,ge=Et=Dt=0,x=-1,U=(Ft=1<<(Rt=Pt))-1,Z===1&&852<Ft||Z===2&&592<Ft)return 1;for(;;){for(lt=at-ge,gt=b[Et]<j?(ft=0,b[Et]):b[Et]>j?(ft=ti[ki+b[Et]],kt[Fe+b[Et]]):(ft=96,0),g=1<<at-ge,I=S=1<<Rt;q[z+(Dt>>ge)+(S-=g)]=lt<<24|ft<<16|gt|0,S!==0;);for(g=1<<at-1;Dt&g;)g>>=1;if(g!==0?(Dt&=g-1,Dt+=g):Dt=0,Et++,--xe[at]==0){if(at===zt)break;at=G[J+b[Et]]}if(Pt<at&&(Dt&U)!==x){for(ge===0&&(ge=Pt),z+=I,ue=1<<(Rt=at-ge);Rt+ge<zt&&!((ue-=xe[Rt+ge])<=0);)Rt++,ue<<=1;if(Ft+=1<<Rt,Z===1&&852<Ft||Z===2&&592<Ft)return 1;q[x=Dt&U]=Pt<<24|Rt<<16|z-E|0}}return Dt!==0&&(q[z+Dt]=at-ge<<24|64<<16|0),p.bits=Pt,0}},{"../utils/common":41}],51:[function(d,nt,H){nt.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(d,nt,H){var m=d("../utils/common"),P=0,D=1;function A(pt){for(var Lt=pt.length;0<=--Lt;)pt[Lt]=0}var F=0,Z=29,G=256,J=G+1+Z,B=30,q=19,E=2*J+1,b=15,p=16,g=7,S=256,x=16,U=17,z=18,j=[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],lt=[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],ft=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],gt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Nt=new Array(2*(J+2));A(Nt);var at=new Array(2*B);A(at);var Et=new Array(512);A(Et);var I=new Array(256);A(I);var zt=new Array(Z);A(zt);var Pt,Rt,ge,ue=new Array(B);function Ft(pt,Lt,ie,Kt,w){this.static_tree=pt,this.extra_bits=Lt,this.extra_base=ie,this.elems=Kt,this.max_length=w,this.has_stree=pt&&pt.length}function Dt(pt,Lt){this.dyn_tree=pt,this.max_code=0,this.stat_desc=Lt}function kt(pt){return pt<256?Et[pt]:Et[256+(pt>>>7)]}function Fe(pt,Lt){pt.pending_buf[pt.pending++]=255&Lt,pt.pending_buf[pt.pending++]=Lt>>>8&255}function xe(pt,Lt,ie){pt.bi_valid>p-ie?(pt.bi_buf|=Lt<<pt.bi_valid&65535,Fe(pt,pt.bi_buf),pt.bi_buf=Lt>>p-pt.bi_valid,pt.bi_valid+=ie-p):(pt.bi_buf|=Lt<<pt.bi_valid&65535,pt.bi_valid+=ie)}function Zt(pt,Lt,ie){xe(pt,ie[2*Lt],ie[2*Lt+1])}function ti(pt,Lt){for(var ie=0;ie|=1&pt,pt>>>=1,ie<<=1,0<--Lt;);return ie>>>1}function ki(pt,Lt,ie){var Kt,w,X=new Array(b+1),et=0;for(Kt=1;Kt<=b;Kt++)X[Kt]=et=et+ie[Kt-1]<<1;for(w=0;w<=Lt;w++){var K=pt[2*w+1];K!==0&&(pt[2*w]=ti(X[K]++,K))}}function Oe(pt){var Lt;for(Lt=0;Lt<J;Lt++)pt.dyn_ltree[2*Lt]=0;for(Lt=0;Lt<B;Lt++)pt.dyn_dtree[2*Lt]=0;for(Lt=0;Lt<q;Lt++)pt.bl_tree[2*Lt]=0;pt.dyn_ltree[2*S]=1,pt.opt_len=pt.static_len=0,pt.last_lit=pt.matches=0}function Ge(pt){8<pt.bi_valid?Fe(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 di(pt,Lt,ie,Kt){var w=2*Lt,X=2*ie;return pt[w]<pt[X]||pt[w]===pt[X]&&Kt[Lt]<=Kt[ie]}function Ri(pt,Lt,ie){for(var Kt=pt.heap[ie],w=ie<<1;w<=pt.heap_len&&(w<pt.heap_len&&di(Lt,pt.heap[w+1],pt.heap[w],pt.depth)&&w++,!di(Lt,Kt,pt.heap[w],pt.depth));)pt.heap[ie]=pt.heap[w],ie=w,w<<=1;pt.heap[ie]=Kt}function hn(pt,Lt,ie){var Kt,w,X,et,K=0;if(pt.last_lit!==0)for(;Kt=pt.pending_buf[pt.d_buf+2*K]<<8|pt.pending_buf[pt.d_buf+2*K+1],w=pt.pending_buf[pt.l_buf+K],K++,Kt===0?Zt(pt,w,Lt):(Zt(pt,(X=I[w])+G+1,Lt),(et=j[X])!==0&&xe(pt,w-=zt[X],et),Zt(pt,X=kt(--Kt),ie),(et=lt[X])!==0&&xe(pt,Kt-=ue[X],et)),K<pt.last_lit;);Zt(pt,S,Lt)}function Ji(pt,Lt){var ie,Kt,w,X=Lt.dyn_tree,et=Lt.stat_desc.static_tree,K=Lt.stat_desc.has_stree,vt=Lt.stat_desc.elems,Gt=-1;for(pt.heap_len=0,pt.heap_max=E,ie=0;ie<vt;ie++)X[2*ie]!==0?(pt.heap[++pt.heap_len]=Gt=ie,pt.depth[ie]=0):X[2*ie+1]=0;for(;pt.heap_len<2;)X[2*(w=pt.heap[++pt.heap_len]=Gt<2?++Gt:0)]=1,pt.depth[w]=0,pt.opt_len--,K&&(pt.static_len-=et[2*w+1]);for(Lt.max_code=Gt,ie=pt.heap_len>>1;1<=ie;ie--)Ri(pt,X,ie);for(w=vt;ie=pt.heap[1],pt.heap[1]=pt.heap[pt.heap_len--],Ri(pt,X,1),Kt=pt.heap[1],pt.heap[--pt.heap_max]=ie,pt.heap[--pt.heap_max]=Kt,X[2*w]=X[2*ie]+X[2*Kt],pt.depth[w]=(pt.depth[ie]>=pt.depth[Kt]?pt.depth[ie]:pt.depth[Kt])+1,X[2*ie+1]=X[2*Kt+1]=w,pt.heap[1]=w++,Ri(pt,X,1),2<=pt.heap_len;);pt.heap[--pt.heap_max]=pt.heap[1],function(Xt,jt){var Ne,Re,de,we,yi,Si,ni=jt.dyn_tree,Ei=jt.max_code,Tr=jt.stat_desc.static_tree,Xn=jt.stat_desc.has_stree,nn=jt.stat_desc.extra_bits,Kr=jt.stat_desc.extra_base,Oi=jt.stat_desc.max_length,fo=0;for(we=0;we<=b;we++)Xt.bl_count[we]=0;for(ni[2*Xt.heap[Xt.heap_max]+1]=0,Ne=Xt.heap_max+1;Ne<E;Ne++)Oi<(we=ni[2*ni[2*(Re=Xt.heap[Ne])+1]+1]+1)&&(we=Oi,fo++),ni[2*Re+1]=we,Ei<Re||(Xt.bl_count[we]++,yi=0,Kr<=Re&&(yi=nn[Re-Kr]),Si=ni[2*Re],Xt.opt_len+=Si*(we+yi),Xn&&(Xt.static_len+=Si*(Tr[2*Re+1]+yi)));if(fo!==0){do{for(we=Oi-1;Xt.bl_count[we]===0;)we--;Xt.bl_count[we]--,Xt.bl_count[we+1]+=2,Xt.bl_count[Oi]--,fo-=2}while(0<fo);for(we=Oi;we!==0;we--)for(Re=Xt.bl_count[we];Re!==0;)Ei<(de=Xt.heap[--Ne])||(ni[2*de+1]!==we&&(Xt.opt_len+=(we-ni[2*de+1])*ni[2*de],ni[2*de+1]=we),Re--)}}(pt,Lt),ki(X,Gt,pt.bl_count)}function R(pt,Lt,ie){var Kt,w,X=-1,et=Lt[1],K=0,vt=7,Gt=4;for(et===0&&(vt=138,Gt=3),Lt[2*(ie+1)+1]=65535,Kt=0;Kt<=ie;Kt++)w=et,et=Lt[2*(Kt+1)+1],++K<vt&&w===et||(K<Gt?pt.bl_tree[2*w]+=K:w!==0?(w!==X&&pt.bl_tree[2*w]++,pt.bl_tree[2*x]++):K<=10?pt.bl_tree[2*U]++:pt.bl_tree[2*z]++,X=w,Gt=(K=0)===et?(vt=138,3):w===et?(vt=6,3):(vt=7,4))}function Jt(pt,Lt,ie){var Kt,w,X=-1,et=Lt[1],K=0,vt=7,Gt=4;for(et===0&&(vt=138,Gt=3),Kt=0;Kt<=ie;Kt++)if(w=et,et=Lt[2*(Kt+1)+1],!(++K<vt&&w===et)){if(K<Gt)for(;Zt(pt,w,pt.bl_tree),--K!=0;);else w!==0?(w!==X&&(Zt(pt,w,pt.bl_tree),K--),Zt(pt,x,pt.bl_tree),xe(pt,K-3,2)):K<=10?(Zt(pt,U,pt.bl_tree),xe(pt,K-3,3)):(Zt(pt,z,pt.bl_tree),xe(pt,K-11,7));X=w,Gt=(K=0)===et?(vt=138,3):w===et?(vt=6,3):(vt=7,4)}}A(ue);var Wt=!1;function ct(pt,Lt,ie,Kt){xe(pt,(F<<1)+(Kt?1:0),3),function(w,X,et,K){Ge(w),K&&(Fe(w,et),Fe(w,~et)),m.arraySet(w.pending_buf,w.window,X,et,w.pending),w.pending+=et}(pt,Lt,ie,!0)}H._tr_init=function(pt){Wt||(function(){var Lt,ie,Kt,w,X,et=new Array(b+1);for(w=Kt=0;w<Z-1;w++)for(zt[w]=Kt,Lt=0;Lt<1<<j[w];Lt++)I[Kt++]=w;for(I[Kt-1]=w,w=X=0;w<16;w++)for(ue[w]=X,Lt=0;Lt<1<<lt[w];Lt++)Et[X++]=w;for(X>>=7;w<B;w++)for(ue[w]=X<<7,Lt=0;Lt<1<<lt[w]-7;Lt++)Et[256+X++]=w;for(ie=0;ie<=b;ie++)et[ie]=0;for(Lt=0;Lt<=143;)Nt[2*Lt+1]=8,Lt++,et[8]++;for(;Lt<=255;)Nt[2*Lt+1]=9,Lt++,et[9]++;for(;Lt<=279;)Nt[2*Lt+1]=7,Lt++,et[7]++;for(;Lt<=287;)Nt[2*Lt+1]=8,Lt++,et[8]++;for(ki(Nt,J+1,et),Lt=0;Lt<B;Lt++)at[2*Lt+1]=5,at[2*Lt]=ti(Lt,5);Pt=new Ft(Nt,j,G+1,J,b),Rt=new Ft(at,lt,0,B,b),ge=new Ft(new Array(0),ft,0,q,g)}(),Wt=!0),pt.l_desc=new Dt(pt.dyn_ltree,Pt),pt.d_desc=new Dt(pt.dyn_dtree,Rt),pt.bl_desc=new Dt(pt.bl_tree,ge),pt.bi_buf=0,pt.bi_valid=0,Oe(pt)},H._tr_stored_block=ct,H._tr_flush_block=function(pt,Lt,ie,Kt){var w,X,et=0;0<pt.level?(pt.strm.data_type===2&&(pt.strm.data_type=function(K){var vt,Gt=4093624447;for(vt=0;vt<=31;vt++,Gt>>>=1)if(1&Gt&&K.dyn_ltree[2*vt]!==0)return P;if(K.dyn_ltree[18]!==0||K.dyn_ltree[20]!==0||K.dyn_ltree[26]!==0)return D;for(vt=32;vt<G;vt++)if(K.dyn_ltree[2*vt]!==0)return D;return P}(pt)),Ji(pt,pt.l_desc),Ji(pt,pt.d_desc),et=function(K){var vt;for(R(K,K.dyn_ltree,K.l_desc.max_code),R(K,K.dyn_dtree,K.d_desc.max_code),Ji(K,K.bl_desc),vt=q-1;3<=vt&&K.bl_tree[2*gt[vt]+1]===0;vt--);return K.opt_len+=3*(vt+1)+5+5+4,vt}(pt),w=pt.opt_len+3+7>>>3,(X=pt.static_len+3+7>>>3)<=w&&(w=X)):w=X=ie+5,ie+4<=w&&Lt!==-1?ct(pt,Lt,ie,Kt):pt.strategy===4||X===w?(xe(pt,2+(Kt?1:0),3),hn(pt,Nt,at)):(xe(pt,4+(Kt?1:0),3),function(K,vt,Gt,Xt){var jt;for(xe(K,vt-257,5),xe(K,Gt-1,5),xe(K,Xt-4,4),jt=0;jt<Xt;jt++)xe(K,K.bl_tree[2*gt[jt]+1],3);Jt(K,K.dyn_ltree,vt-1),Jt(K,K.dyn_dtree,Gt-1)}(pt,pt.l_desc.max_code+1,pt.d_desc.max_code+1,et+1),hn(pt,pt.dyn_ltree,pt.dyn_dtree)),Oe(pt),Kt&&Ge(pt)},H._tr_tally=function(pt,Lt,ie){return pt.pending_buf[pt.d_buf+2*pt.last_lit]=Lt>>>8&255,pt.pending_buf[pt.d_buf+2*pt.last_lit+1]=255&Lt,pt.pending_buf[pt.l_buf+pt.last_lit]=255&ie,pt.last_lit++,Lt===0?pt.dyn_ltree[2*ie]++:(pt.matches++,Lt--,pt.dyn_ltree[2*(I[ie]+G+1)]++,pt.dyn_dtree[2*kt(Lt)]++),pt.last_lit===pt.lit_bufsize-1},H._tr_align=function(pt){xe(pt,2,3),Zt(pt,S,Nt),function(Lt){Lt.bi_valid===16?(Fe(Lt,Lt.bi_buf),Lt.bi_buf=0,Lt.bi_valid=0):8<=Lt.bi_valid&&(Lt.pending_buf[Lt.pending++]=255&Lt.bi_buf,Lt.bi_buf>>=8,Lt.bi_valid-=8)}(pt)}},{"../utils/common":41}],53:[function(d,nt,H){nt.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(d,nt,H){(function(m){(function(P,D){if(!P.setImmediate){var A,F,Z,G,J=1,B={},q=!1,E=P.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(P);b=b&&b.setTimeout?b:P,A={}.toString.call(P.process)==="[object process]"?function(x){process.nextTick(function(){g(x)})}:function(){if(P.postMessage&&!P.importScripts){var x=!0,U=P.onmessage;return P.onmessage=function(){x=!1},P.postMessage("","*"),P.onmessage=U,x}}()?(G="setImmediate$"+Math.random()+"$",P.addEventListener?P.addEventListener("message",S,!1):P.attachEvent("onmessage",S),function(x){P.postMessage(G+x,"*")}):P.MessageChannel?((Z=new MessageChannel).port1.onmessage=function(x){g(x.data)},function(x){Z.port2.postMessage(x)}):E&&"onreadystatechange"in E.createElement("script")?(F=E.documentElement,function(x){var U=E.createElement("script");U.onreadystatechange=function(){g(x),U.onreadystatechange=null,F.removeChild(U),U=null},F.appendChild(U)}):function(x){setTimeout(g,0,x)},b.setImmediate=function(x){typeof x!="function"&&(x=new Function(""+x));for(var U=new Array(arguments.length-1),z=0;z<U.length;z++)U[z]=arguments[z+1];var j={callback:x,args:U};return B[J]=j,A(J),J++},b.clearImmediate=p}function p(x){delete B[x]}function g(x){if(q)setTimeout(g,0,x);else{var U=B[x];if(U){q=!0;try{(function(z){var j=z.callback,lt=z.args;switch(lt.length){case 0:j();break;case 1:j(lt[0]);break;case 2:j(lt[0],lt[1]);break;case 3:j(lt[0],lt[1],lt[2]);break;default:j.apply(D,lt)}})(U)}finally{p(x),q=!1}}}}function S(x){x.source===P&&typeof x.data=="string"&&x.data.indexOf(G)===0&&g(+x.data.slice(G.length))}})(typeof self>"u"?m===void 0?this:m:self)}).call(this,typeof ur<"u"?ur:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(jh);var dc=jh.exports;const mc=lh(dc);var Xh={exports:{}};(function(T,ht){(function(d,nt){nt()})(ur,function(){function d(F,Z){return typeof Z>"u"?Z={autoBom:!1}:typeof Z!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),Z={autoBom:!Z}),Z.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(F.type)?new Blob(["\uFEFF",F],{type:F.type}):F}function nt(F,Z,G){var J=new XMLHttpRequest;J.open("GET",F),J.responseType="blob",J.onload=function(){A(J.response,Z,G)},J.onerror=function(){console.error("could not download file")},J.send()}function H(F){var Z=new XMLHttpRequest;Z.open("HEAD",F,!1);try{Z.send()}catch{}return 200<=Z.status&&299>=Z.status}function m(F){try{F.dispatchEvent(new MouseEvent("click"))}catch{var Z=document.createEvent("MouseEvents");Z.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),F.dispatchEvent(Z)}}var P=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ur=="object"&&ur.global===ur?ur:void 0,D=P.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),A=P.saveAs||(typeof window!="object"||window!==P?function(){}:"download"in HTMLAnchorElement.prototype&&!D?function(F,Z,G){var J=P.URL||P.webkitURL,B=document.createElement("a");Z=Z||F.name||"download",B.download=Z,B.rel="noopener",typeof F=="string"?(B.href=F,B.origin===location.origin?m(B):H(B.href)?nt(F,Z,G):m(B,B.target="_blank")):(B.href=J.createObjectURL(F),setTimeout(function(){J.revokeObjectURL(B.href)},4e4),setTimeout(function(){m(B)},0))}:"msSaveOrOpenBlob"in navigator?function(F,Z,G){if(Z=Z||F.name||"download",typeof F!="string")navigator.msSaveOrOpenBlob(d(F,G),Z);else if(H(F))nt(F,Z,G);else{var J=document.createElement("a");J.href=F,J.target="_blank",setTimeout(function(){m(J)})}}:function(F,Z,G,J){if(J=J||open("","_blank"),J&&(J.document.title=J.document.body.innerText="downloading..."),typeof F=="string")return nt(F,Z,G);var B=F.type==="application/octet-stream",q=/constructor/i.test(P.HTMLElement)||P.safari,E=/CriOS\/[\d]+/.test(navigator.userAgent);if((E||B&&q||D)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var S=b.result;S=E?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),J?J.location.href=S:location=S,J=null},b.readAsDataURL(F)}else{var p=P.URL||P.webkitURL,g=p.createObjectURL(F);J?J.location=g:location.href=g,J=null,setTimeout(function(){p.revokeObjectURL(g)},4e4)}});P.saveAs=A.saveAs=A,T.exports=A})})(Xh);var gc=Xh.exports;const vc=lh(gc);class yc{constructor(ht,d){window.mars3d?(this.map=ht,this.panoramicViewClass=d,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(ht=!0){var d,nt;if(ht){this.timestamp=new Date().getTime();const H=document.getElementById("app"),m=window.innerHeight,P=document.getElementById("mars3dContainer");P&&(P.style.width=m.toString()+"px",P.style.height=m.toString()+"px"),H!==null&&H.classList.add(this.panoramicViewClass);let{lat:D,lng:A,alt:F}=this.map.getCameraView();this.lat=D,this.lng=A,this.alt=F,this.map.viewer.scene.camera.frustum.fov=window.Cesium.Math.PI_OVER_THREE*1.5}this.screenshotArray&&this.coordinate?this.coordinate[(d=this.screenshotArray)==null?void 0:d.length]?this.map.setCameraView({lat:this.lat,lng:this.lng,alt:this.alt,...this.coordinate[(nt=this.screenshotArray)==null?void 0:nt.length]},{complete:()=>{setTimeout(()=>{var H;this.screenshot((H=this.screenshotArray)==null?void 0:H.length)},100)}}):(this.downloadImagesAsZip(),this.screenshotArray=[]):(console.error("初始化失效"),this.emit("state",{type:"error"}))}async screenshot(ht){const d=await this.map.expImage({download:!1}),nt=this.map.container.getElementsByClassName("cesium-viewer-cesiumWidgetContainer"),H=await window.domtoimage.toPng(this.map.container,{filter:m=>m!==nt[0]});this.mergeImage(d.image,H,d.width,d.height).then(m=>{var A;let P=Number(ht)+1,D={src:m,name:"全景图_"+this.timestamp+"_"+P+".jpg"};this.emit("intercept",D),(A=this.screenshotArray)==null||A.push(D),this.start(!1)})}mergeImage(ht,d,nt,H){return new Promise((m,P)=>{const D=document.createElement("canvas");D.width=nt,D.height=H;const A=D.getContext("2d");if(D&&A){const F=new Image;F.crossOrigin="Anonymous",F.onload=()=>{A.drawImage(F,0,0,nt,H);const Z=new Image;Z.crossOrigin="Anonymous",Z.onload=()=>{A.drawImage(Z,0,0,nt,H);const G=D.toDataURL("image/png");m(G)},Z.src=d},F.src=ht}else P()})}download(){this.screenshotArray&&this.screenshotArray.forEach(ht=>{window.mars3d.Util.downloadBase64Image(ht.name,ht.src)})}async downloadImagesAsZip(){if(this.screenshotArray){const ht=new mc;this.screenshotArray.forEach(nt=>{const H=nt.src.split(",")[1],m=atob(H),P=[];for(let F=0;F<m.length;F+=1024){const Z=m.slice(F,F+1024),G=new Array(Z.length);for(let B=0;B<Z.length;B++)G[B]=Z.charCodeAt(B);const J=new Uint8Array(G);P.push(J)}const D=new Blob(P,{type:"image/jpeg"}),A=`${nt.name}`;ht.file(A,D,{binary:!0})});const d=await ht.generateAsync({type:"blob"});vc(d,"CHBIM-Panorama.zip"),this.emit("state",{type:"success",schedule:100}),this.init()}}init(){const ht=document.getElementById("app");ht&&ht.classList.remove(this.panoramicViewClass);const d=document.getElementById("mars3dContainer");d&&(d.style.width="",d.style.height="")}on(ht,d){this.events[ht]?this.events[ht].push(d):this.events[ht]=[d]}emit(ht,...d){this.events[ht]!=null&&this.events[ht].forEach(nt=>nt(...d))}off(ht,d){this.events[ht]=this.events[ht].filter(nt=>nt!==d)}}const _c=[Gh,Wh],xc={continuation:null,mapModali:null,install(T){if(_c.forEach((P,D)=>{T.component(P.name,P)}),this.continuation){T.config.globalProperties.$continuation=this.continuation;return}let ht=oi.createApp(Hh),d=document.createElement("div"),nt=document.body;if(nt.appendChild(d),this.loading=ht.mount(d),T.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){T.config.globalProperties.$mapModali=this.mapModali;return}let H=oi.createApp(Vh),m=document.createElement("div");nt.appendChild(m),this.mapModali=H.mount(m),T.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};en.BimBackgroundPlate=Wh,en.BimCutscenes=Hh,en.BimElevationImage=fc,en.BimModel=ac,en.BimTerrainProvider=cc,en.BimVector=uc,en.Button=Gh,en.ChbimPlugins=xc,en.MapModali=Vh,en.PanoramicView=yc,en.ViewShed=pc,Object.defineProperty(en,Symbol.toStringTag,{value:"Module"})});
|