chbim-plugins 0.0.8 → 0.0.10
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 +19528 -2152
- package/chbim-plugins.umd.cjs +2562 -2
- package/package.json +1 -1
- package/style.css +1 -1
package/chbim-plugins.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Fi,Se){typeof exports=="object"&&typeof module<"u"?Se(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],Se):(Fi=typeof globalThis<"u"?globalThis:Fi||self,Se(Fi["chbim-plugins"]={},Fi.Vue))})(this,function(Fi,Se){"use strict";const vh="",Fs=((p,bt)=>{const $=p.__vccOpts||p;for(const[gt,at]of bt)$[gt]=at;return $})(Object.assign({name:"MukButton"},{props:{size:{type:String,default:"middle"},type:{type:String,default:"default"}},setup(p){return(bt,$)=>(Se.openBlock(),Se.createElementBlock("button",{class:Se.normalizeClass(["muk-btn",[p.size,p.type]])},[Se.renderSlot(bt.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-0e6d93cd"]]);class Oa{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 Ia={class:"mask js-mask"},Da=Se.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),za=Se.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),Na=Se.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),Ba={class:"mask__inner"},Ua={class:"logo logo--mask"},Fa={class:"js-logo",style:{color:"#fff"}},Ga=Se.createElementVNode("div",{class:"mask-line js-mask-line"},[Se.createElementVNode("div",{class:"mask-line__inner js-mask-line"})],-1),Ha={name:"BimCutscenes"},Gs=Se.defineComponent({...Ha,props:{text:{type:String,default:"CHBIM云平台"}},setup(p,{expose:bt}){const $=Se.ref(null),gt=()=>{$.value===null&&($.value=new Oa)},at=()=>{gt(),$.value.continuation()};return Se.onMounted(()=>{gt()}),bt({continuation:at}),(M,_t)=>(Se.openBlock(),Se.createElementBlock("div",Ia,[Da,za,Na,Se.createElementVNode("div",Ba,[Se.createElementVNode("figure",Ua,[Se.createElementVNode("p",Fa,Se.toDisplayString(p.text),1)]),Ga])]))}}),wh="";/*!
|
|
2
2
|
* VERSION: 2.0.2
|
|
3
3
|
* DATE: 2018-08-27
|
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
|
@@ -10,4 +10,2564 @@
|
|
|
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 Mt=typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window;(Mt._gsQueue||(Mt._gsQueue=[])).push(function(){Mt._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(N,J,Q){var nt=function(v){var P,e=[],t=v.length;for(P=0;P!==t;e.push(v[P++]));return e},F=function(v,P,e){var t,_,n=v.cycle;for(t in n)_=n[t],v[t]=typeof _=="function"?_(e,P[e]):_[e%_.length];delete v.cycle},Y=function(v,P,e){Q.call(this,v,P,e),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=Y.prototype.render},$=1e-10,mt=Q._internals,O=mt.isSelector,M=mt.isArray,b=Y.prototype=Q.to({},.1,{}),E=[];Y.version="2.0.2",b.constructor=Y,b.kill()._gc=!1,Y.killTweensOf=Y.killDelayedCallsTo=Q.killTweensOf,Y.getTweensOf=Q.getTweensOf,Y.lagSmoothing=Q.lagSmoothing,Y.ticker=Q.ticker,Y.render=Q.render,b.invalidate=function(){return this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._yoyoEase=null,this._uncache(!0),Q.prototype.invalidate.call(this)},b.updateTo=function(v,P){var e,t=this.ratio,_=this.vars.immediateRender||v.immediateRender;P&&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(e in v)this.vars[e]=v[e];if(this._initted||_){if(P)this._initted=!1,_&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&Q._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var n=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(n,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||_)for(var g,p=1/(1-t),T=this._firstPT;T;)g=T.s+T.c,T.c*=p,T.s=g-T.c,T=T._next}return this},b.render=function(v,P,e){this._initted||this._duration===0&&this.vars.repeat&&this.invalidate();var t,_,n,g,p,T,S,D,R,Z=this._dirty?this.totalDuration():this._totalDuration,U=this._time,tt=this._totalTime,et=this._cycle,dt=this._duration,at=this._rawPrevTime;if(v>=Z-1e-7&&v>=0?(this._totalTime=Z,this._cycle=this._repeat,this._yoyo&&1&this._cycle?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=dt,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(t=!0,_="onComplete",e=e||this._timeline.autoRemoveChildren),dt===0&&(this._initted||!this.vars.lazy||e)&&(this._startTime===this._timeline._duration&&(v=0),(0>at||0>=v&&v>=-1e-7||at===$&&this.data!=="isPause")&&at!==v&&(e=!0,at>$&&(_="onReverseComplete")),this._rawPrevTime=D=!P||v||at===v?v:$)):1e-7>v?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(tt!==0||dt===0&&at>0)&&(_="onReverseComplete",t=this._reversed),0>v&&(this._active=!1,dt===0&&(this._initted||!this.vars.lazy||e)&&(at>=0&&(e=!0),this._rawPrevTime=D=!P||v||at===v?v:$)),this._initted||(e=!0)):(this._totalTime=this._time=v,this._repeat!==0&&(g=dt+this._repeatDelay,this._cycle=this._totalTime/g>>0,this._cycle!==0&&this._cycle===this._totalTime/g&&v>=tt&&this._cycle--,this._time=this._totalTime-this._cycle*g,this._yoyo&&1&this._cycle&&(this._time=dt-this._time,R=this._yoyoEase||this.vars.yoyoEase,R&&(this._yoyoEase||(R!==!0||this._initted?this._yoyoEase=R=R===!0?this._ease:R instanceof Ease?R:Ease.map[R]:(R=this.vars.ease,this._yoyoEase=R=R?R instanceof Ease?R:typeof R=="function"?new Ease(R,this.vars.easeParams):Ease.map[R]||Q.defaultEase:Q.defaultEase)),this.ratio=R?1-R.getRatio((dt-this._time)/dt):0)),this._time>dt?this._time=dt:this._time<0&&(this._time=0)),this._easeType&&!R?(p=this._time/dt,T=this._easeType,S=this._easePower,(T===1||T===3&&p>=.5)&&(p=1-p),T===3&&(p*=2),S===1?p*=p:S===2?p*=p*p:S===3?p*=p*p*p:S===4&&(p*=p*p*p*p),T===1?this.ratio=1-p:T===2?this.ratio=p:this._time/dt<.5?this.ratio=p/2:this.ratio=1-p/2):R||(this.ratio=this._ease.getRatio(this._time/dt))),U===this._time&&!e&&et===this._cycle)return void(tt!==this._totalTime&&this._onUpdate&&(P||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!e&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=U,this._totalTime=tt,this._rawPrevTime=at,this._cycle=et,mt.lazyTweens.push(this),void(this._lazy=[v,P]);!this._time||t||R?t&&this._ease._calcEnd&&!R&&(this.ratio=this._ease.getRatio(this._time===0?0:1)):this.ratio=this._ease.getRatio(this._time/dt)}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==U&&v>=0&&(this._active=!0),tt===0&&(this._initted===2&&v>0&&this._init(),this._startAt&&(v>=0?this._startAt.render(v,!0,e):_||(_="_dummyGS")),this.vars.onStart&&(this._totalTime!==0||dt===0)&&(P||this._callback("onStart"))),n=this._firstPT;n;)n.f?n.t[n.p](n.c*this.ratio+n.s):n.t[n.p]=n.c*this.ratio+n.s,n=n._next;this._onUpdate&&(0>v&&this._startAt&&this._startTime&&this._startAt.render(v,!0,e),P||(this._totalTime!==tt||_)&&this._callback("onUpdate")),this._cycle!==et&&(P||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),_&&(!this._gc||e)&&(0>v&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(v,!0,e),t&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!P&&this.vars[_]&&this._callback(_),dt===0&&this._rawPrevTime===$&&D!==$&&(this._rawPrevTime=0))},Y.to=function(v,P,e){return new Y(v,P,e)},Y.from=function(v,P,e){return e.runBackwards=!0,e.immediateRender=e.immediateRender!=0,new Y(v,P,e)},Y.fromTo=function(v,P,e,t){return t.startAt=e,t.immediateRender=t.immediateRender!=0&&e.immediateRender!=0,new Y(v,P,t)},Y.staggerTo=Y.allTo=function(v,P,e,t,_,n,g){t=t||0;var p,T,S,D,R=0,Z=[],U=function(){e.onComplete&&e.onComplete.apply(e.onCompleteScope||this,arguments),_.apply(g||e.callbackScope||this,n||E)},tt=e.cycle,et=e.startAt&&e.startAt.cycle;for(M(v)||(typeof v=="string"&&(v=Q.selector(v)||v),O(v)&&(v=nt(v))),v=v||[],0>t&&(v=nt(v),v.reverse(),t*=-1),p=v.length-1,S=0;p>=S;S++){T={};for(D in e)T[D]=e[D];if(tt&&(F(T,v,S),T.duration!=null&&(P=T.duration,delete T.duration)),et){et=T.startAt={};for(D in e.startAt)et[D]=e.startAt[D];F(T.startAt,v,S)}T.delay=R+(T.delay||0),S===p&&_&&(T.onComplete=U),Z[S]=new Y(v[S],P,T),R+=t}return Z},Y.staggerFrom=Y.allFrom=function(v,P,e,t,_,n,g){return e.runBackwards=!0,e.immediateRender=e.immediateRender!=0,Y.staggerTo(v,P,e,t,_,n,g)},Y.staggerFromTo=Y.allFromTo=function(v,P,e,t,_,n,g,p){return t.startAt=e,t.immediateRender=t.immediateRender!=0&&e.immediateRender!=0,Y.staggerTo(v,P,t,_,n,g,p)},Y.delayedCall=function(v,P,e,t,_){return new Y(P,0,{delay:v,onComplete:P,onCompleteParams:e,callbackScope:t,onReverseComplete:P,onReverseCompleteParams:e,immediateRender:!1,useFrames:_,overwrite:0})},Y.set=function(v,P){return new Y(v,0,P)},Y.isTweening=function(v){return Q.getTweensOf(v,!0).length>0};var G=function(v,P){for(var e=[],t=0,_=v._first;_;)_ instanceof Q?e[t++]=_:(P&&(e[t++]=_),e=e.concat(G(_,P)),t=e.length),_=_._next;return e},st=Y.getAllTweens=function(v){return G(N._rootTimeline,v).concat(G(N._rootFramesTimeline,v))};Y.killAll=function(v,P,e,t){P==null&&(P=!0),e==null&&(e=!0);var _,n,g,p=st(t!=0),T=p.length,S=P&&e&&t;for(g=0;T>g;g++)n=p[g],(S||n instanceof J||(_=n.target===n.vars.onComplete)&&e||P&&!_)&&(v?n.totalTime(n._reversed?0:n.totalDuration()):n._enabled(!1,!1))},Y.killChildTweensOf=function(v,P){if(v!=null){var e,t,_,n,g,p=mt.tweenLookup;if(typeof v=="string"&&(v=Q.selector(v)||v),O(v)&&(v=nt(v)),M(v))for(n=v.length;--n>-1;)Y.killChildTweensOf(v[n],P);else{e=[];for(_ in p)for(t=p[_].target.parentNode;t;)t===v&&(e=e.concat(p[_].tweens)),t=t.parentNode;for(g=e.length,n=0;g>n;n++)P&&e[n].totalTime(e[n].totalDuration()),e[n]._enabled(!1,!1)}}};var L=function(v,P,e,t){P=P!==!1,e=e!==!1,t=t!==!1;for(var _,n,g=st(t),p=P&&e&&t,T=g.length;--T>-1;)n=g[T],(p||n instanceof J||(_=n.target===n.vars.onComplete)&&e||P&&!_)&&n.paused(v)};return Y.pauseAll=function(v,P,e){L(!0,v,P,e)},Y.resumeAll=function(v,P,e){L(!1,v,P,e)},Y.globalTimeScale=function(v){var P=N._rootTimeline,e=Q.ticker.time;return arguments.length?(v=v||$,P._startTime=e-(e-P._startTime)*P._timeScale/v,P=N._rootFramesTimeline,e=Q.ticker.frame,P._startTime=e-(e-P._startTime)*P._timeScale/v,P._timeScale=N._rootTimeline._timeScale=v,v):P._timeScale},b.progress=function(v,P){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-v:v)+this._cycle*(this._duration+this._repeatDelay),P):this._time/this.duration()},b.totalProgress=function(v,P){return arguments.length?this.totalTime(this.totalDuration()*v,P):this._totalTime/this.totalDuration()},b.time=function(v,P){return arguments.length?(this._dirty&&this.totalDuration(),v>this._duration&&(v=this._duration),this._yoyo&&1&this._cycle?v=this._duration-v+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(v+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(v,P)):this._time},b.duration=function(v){return arguments.length?N.prototype.duration.call(this,v):this._duration},b.totalDuration=function(v){return arguments.length?this._repeat===-1?this:this.duration((v-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},b.repeat=function(v){return arguments.length?(this._repeat=v,this._uncache(!0)):this._repeat},b.repeatDelay=function(v){return arguments.length?(this._repeatDelay=v,this._uncache(!0)):this._repeatDelay},b.yoyo=function(v){return arguments.length?(this._yoyo=v,this):this._yoyo},Y},!0),Mt._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(N,J,Q){var nt=function(e){J.call(this,e),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var t,_,n=this.vars;for(_ in n)t=n[_],O(t)&&t.join("").indexOf("{self}")!==-1&&(n[_]=this._swapSelfInParams(t));O(n.tweens)&&this.add(n.tweens,0,n.align,n.stagger)},F=1e-10,Y=Q._internals,$=nt._internals={},mt=Y.isSelector,O=Y.isArray,M=Y.lazyTweens,b=Y.lazyRender,E=Mt._gsDefine.globals,G=function(e){var t,_={};for(t in e)_[t]=e[t];return _},st=function(e,t,_){var n,g,p=e.cycle;for(n in p)g=p[n],e[n]=typeof g=="function"?g(_,t[_]):g[_%g.length];delete e.cycle},L=$.pauseCallback=function(){},v=function(e){var t,_=[],n=e.length;for(t=0;t!==n;_.push(e[t++]));return _},P=nt.prototype=new J;return nt.version="2.0.2",P.constructor=nt,P.kill()._gc=P._forcingPlayhead=P._hasPause=!1,P.to=function(e,t,_,n){var g=_.repeat&&E.TweenMax||Q;return t?this.add(new g(e,t,_),n):this.set(e,_,n)},P.from=function(e,t,_,n){return this.add((_.repeat&&E.TweenMax||Q).from(e,t,_),n)},P.fromTo=function(e,t,_,n,g){var p=n.repeat&&E.TweenMax||Q;return t?this.add(p.fromTo(e,t,_,n),g):this.set(e,n,g)},P.staggerTo=function(e,t,_,n,g,p,T,S){var D,R,Z=new nt({onComplete:p,onCompleteParams:T,callbackScope:S,smoothChildTiming:this.smoothChildTiming}),U=_.cycle;for(typeof e=="string"&&(e=Q.selector(e)||e),e=e||[],mt(e)&&(e=v(e)),n=n||0,0>n&&(e=v(e),e.reverse(),n*=-1),R=0;R<e.length;R++)D=G(_),D.startAt&&(D.startAt=G(D.startAt),D.startAt.cycle&&st(D.startAt,e,R)),U&&(st(D,e,R),D.duration!=null&&(t=D.duration,delete D.duration)),Z.to(e[R],t,D,R*n);return this.add(Z,g)},P.staggerFrom=function(e,t,_,n,g,p,T,S){return _.immediateRender=_.immediateRender!=0,_.runBackwards=!0,this.staggerTo(e,t,_,n,g,p,T,S)},P.staggerFromTo=function(e,t,_,n,g,p,T,S,D){return n.startAt=_,n.immediateRender=n.immediateRender!=0&&_.immediateRender!=0,this.staggerTo(e,t,n,g,p,T,S,D)},P.call=function(e,t,_,n){return this.add(Q.delayedCall(0,e,t,_),n)},P.set=function(e,t,_){return _=this._parseTimeOrLabel(_,0,!0),t.immediateRender==null&&(t.immediateRender=_===this._time&&!this._paused),this.add(new Q(e,0,t),_)},nt.exportRoot=function(e,t){e=e||{},e.smoothChildTiming==null&&(e.smoothChildTiming=!0);var _,n,g,p,T=new nt(e),S=T._timeline;for(t==null&&(t=!0),S._remove(T,!0),T._startTime=0,T._rawPrevTime=T._time=T._totalTime=S._time,g=S._first;g;)p=g._next,t&&g instanceof Q&&g.target===g.vars.onComplete||(n=g._startTime-g._delay,0>n&&(_=1),T.add(g,n)),g=p;return S.add(T,0),_&&T.totalDuration(),T},P.add=function(e,t,_,n){var g,p,T,S,D,R;if(typeof t!="number"&&(t=this._parseTimeOrLabel(t,0,!0,e)),!(e instanceof N)){if(e instanceof Array||e&&e.push&&O(e)){for(_=_||"normal",n=n||0,g=t,p=e.length,T=0;p>T;T++)O(S=e[T])&&(S=new nt({tweens:S})),this.add(S,g),typeof S!="string"&&typeof S!="function"&&(_==="sequence"?g=S._startTime+S.totalDuration()/S._timeScale:_==="start"&&(S._startTime-=S.delay())),g+=n;return this._uncache(!0)}if(typeof e=="string")return this.addLabel(e,t);if(typeof e!="function")throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=Q.delayedCall(0,e)}if(J.prototype.add.call(this,e,t),e._time&&(g=Math.max(0,Math.min(e.totalDuration(),(this.rawTime()-e._startTime)*e._timeScale)),Math.abs(g-e._totalTime)>1e-5&&e.render(g,!1,!1)),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(D=this,R=D.rawTime()>e._startTime;D._timeline;)R&&D._timeline.smoothChildTiming?D.totalTime(D._totalTime,!0):D._gc&&D._enabled(!0,!1),D=D._timeline;return this},P.remove=function(e){if(e instanceof N){this._remove(e,!1);var t=e._timeline=e.vars.useFrames?N._rootFramesTimeline:N._rootTimeline;return e._startTime=(e._paused?e._pauseTime:t._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this}if(e instanceof Array||e&&e.push&&O(e)){for(var _=e.length;--_>-1;)this.remove(e[_]);return this}return typeof e=="string"?this.removeLabel(e):this.kill(null,e)},P._remove=function(e,t){J.prototype._remove.call(this,e,t);var _=this._last;return _?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},P.append=function(e,t){return this.add(e,this._parseTimeOrLabel(null,t,!0,e))},P.insert=P.insertMultiple=function(e,t,_,n){return this.add(e,t||0,_,n)},P.appendMultiple=function(e,t,_,n){return this.add(e,this._parseTimeOrLabel(null,t,!0,e),_,n)},P.addLabel=function(e,t){return this._labels[e]=this._parseTimeOrLabel(t),this},P.addPause=function(e,t,_,n){var g=Q.delayedCall(0,L,_,n||this);return g.vars.onComplete=g.vars.onReverseComplete=t,g.data="isPause",this._hasPause=!0,this.add(g,e)},P.removeLabel=function(e){return delete this._labels[e],this},P.getLabelTime=function(e){return this._labels[e]!=null?this._labels[e]:-1},P._parseTimeOrLabel=function(e,t,_,n){var g,p;if(n instanceof N&&n.timeline===this)this.remove(n);else if(n&&(n instanceof Array||n.push&&O(n)))for(p=n.length;--p>-1;)n[p]instanceof N&&n[p].timeline===this&&this.remove(n[p]);if(g=typeof e!="number"||t?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,typeof t=="string")return this._parseTimeOrLabel(t,_&&typeof e=="number"&&this._labels[t]==null?e-g:0,_);if(t=t||0,typeof e!="string"||!isNaN(e)&&this._labels[e]==null)e==null&&(e=g);else{if(p=e.indexOf("="),p===-1)return this._labels[e]==null?_?this._labels[e]=g+t:t:this._labels[e]+t;t=parseInt(e.charAt(p-1)+"1",10)*Number(e.substr(p+1)),e=p>1?this._parseTimeOrLabel(e.substr(0,p-1),0,_):g}return Number(e)+t},P.seek=function(e,t){return this.totalTime(typeof e=="number"?e:this._parseTimeOrLabel(e),t!==!1)},P.stop=function(){return this.paused(!0)},P.gotoAndPlay=function(e,t){return this.play(e,t)},P.gotoAndStop=function(e,t){return this.pause(e,t)},P.render=function(e,t,_){this._gc&&this._enabled(!0,!1);var n,g,p,T,S,D,R,Z=this._time,U=this._dirty?this.totalDuration():this._totalDuration,tt=this._startTime,et=this._timeScale,dt=this._paused;if(Z!==this._time&&(e+=this._time-Z),e>=U-1e-7&&e>=0)this._totalTime=this._time=U,this._reversed||this._hasPausedChild()||(g=!0,T="onComplete",S=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=e&&e>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===F)&&this._rawPrevTime!==e&&this._first&&(S=!0,this._rawPrevTime>F&&(T="onReverseComplete"))),this._rawPrevTime=this._duration||!t||e||this._rawPrevTime===e?e:F,e=U+1e-4;else if(1e-7>e)if(this._totalTime=this._time=0,(Z!==0||this._duration===0&&this._rawPrevTime!==F&&(this._rawPrevTime>0||0>e&&this._rawPrevTime>=0))&&(T="onReverseComplete",g=this._reversed),0>e)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(S=g=!0,T="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(S=!0),this._rawPrevTime=e;else{if(this._rawPrevTime=this._duration||!t||e||this._rawPrevTime===e?e:F,e===0&&g)for(n=this._first;n&&n._startTime===0;)n._duration||(g=!1),n=n._next;e=0,this._initted||(S=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!t){if(e>=Z)for(n=this._first;n&&n._startTime<=e&&!D;)n._duration||n.data!=="isPause"||n.ratio||n._startTime===0&&this._rawPrevTime===0||(D=n),n=n._next;else for(n=this._last;n&&n._startTime>=e&&!D;)n._duration||n.data==="isPause"&&n._rawPrevTime>0&&(D=n),n=n._prev;D&&(this._time=e=D._startTime,this._totalTime=e+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=e}if(this._time!==Z&&this._first||_||S||D){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==Z&&e>0&&(this._active=!0),Z===0&&this.vars.onStart&&(this._time===0&&this._duration||t||this._callback("onStart")),R=this._time,R>=Z)for(n=this._first;n&&(p=n._next,R===this._time&&(!this._paused||dt));)(n._active||n._startTime<=R&&!n._paused&&!n._gc)&&(D===n&&this.pause(),n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(e-n._startTime)*n._timeScale,t,_):n.render((e-n._startTime)*n._timeScale,t,_)),n=p;else for(n=this._last;n&&(p=n._prev,R===this._time&&(!this._paused||dt));){if(n._active||n._startTime<=Z&&!n._paused&&!n._gc){if(D===n){for(D=n._prev;D&&D.endTime()>this._time;)D.render(D._reversed?D.totalDuration()-(e-D._startTime)*D._timeScale:(e-D._startTime)*D._timeScale,t,_),D=D._prev;D=null,this.pause()}n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(e-n._startTime)*n._timeScale,t,_):n.render((e-n._startTime)*n._timeScale,t,_)}n=p}this._onUpdate&&(t||(M.length&&b(),this._callback("onUpdate"))),T&&(this._gc||(tt===this._startTime||et!==this._timeScale)&&(this._time===0||U>=this.totalDuration())&&(g&&(M.length&&b(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[T]&&this._callback(T)))}},P._hasPausedChild=function(){for(var e=this._first;e;){if(e._paused||e instanceof nt&&e._hasPausedChild())return!0;e=e._next}return!1},P.getChildren=function(e,t,_,n){n=n||-9999999999;for(var g=[],p=this._first,T=0;p;)p._startTime<n||(p instanceof Q?t!==!1&&(g[T++]=p):(_!==!1&&(g[T++]=p),e!==!1&&(g=g.concat(p.getChildren(!0,t,_)),T=g.length))),p=p._next;return g},P.getTweensOf=function(e,t){var _,n,g=this._gc,p=[],T=0;for(g&&this._enabled(!0,!0),_=Q.getTweensOf(e),n=_.length;--n>-1;)(_[n].timeline===this||t&&this._contains(_[n]))&&(p[T++]=_[n]);return g&&this._enabled(!1,!0),p},P.recent=function(){return this._recent},P._contains=function(e){for(var t=e.timeline;t;){if(t===this)return!0;t=t.timeline}return!1},P.shiftChildren=function(e,t,_){_=_||0;for(var n,g=this._first,p=this._labels;g;)g._startTime>=_&&(g._startTime+=e),g=g._next;if(t)for(n in p)p[n]>=_&&(p[n]+=e);return this._uncache(!0)},P._kill=function(e,t){if(!e&&!t)return this._enabled(!1,!1);for(var _=t?this.getTweensOf(t):this.getChildren(!0,!0,!1),n=_.length,g=!1;--n>-1;)_[n]._kill(e,t)&&(g=!0);return g},P.clear=function(e){var t=this.getChildren(!1,!0,!0),_=t.length;for(this._time=this._totalTime=0;--_>-1;)t[_]._enabled(!1,!1);return e!==!1&&(this._labels={}),this._uncache(!0)},P.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return N.prototype.invalidate.call(this)},P._enabled=function(e,t){if(e===this._gc)for(var _=this._first;_;)_._enabled(e,!0),_=_._next;return J.prototype._enabled.call(this,e,t)},P.totalTime=function(e,t,_){this._forcingPlayhead=!0;var n=N.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,n},P.duration=function(e){return arguments.length?(this.duration()!==0&&e!==0&&this.timeScale(this._duration/e),this):(this._dirty&&this.totalDuration(),this._duration)},P.totalDuration=function(e){if(!arguments.length){if(this._dirty){for(var t,_,n=0,g=this._last,p=999999999999;g;)t=g._prev,g._dirty&&g.totalDuration(),g._startTime>p&&this._sortChildren&&!g._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(g,g._startTime-g._delay),this._calculatingDuration=0):p=g._startTime,g._startTime<0&&!g._paused&&(n-=g._startTime,this._timeline.smoothChildTiming&&(this._startTime+=g._startTime/this._timeScale,this._time-=g._startTime,this._totalTime-=g._startTime,this._rawPrevTime-=g._startTime),this.shiftChildren(-g._startTime,!1,-9999999999),p=0),_=g._startTime+g._totalDuration/g._timeScale,_>n&&(n=_),g=t;this._duration=this._totalDuration=n,this._dirty=!1}return this._totalDuration}return e&&this.totalDuration()?this.timeScale(this._totalDuration/e):this},P.paused=function(e){if(!e)for(var t=this._first,_=this._time;t;)t._startTime===_&&t.data==="isPause"&&(t._rawPrevTime=0),t=t._next;return N.prototype.paused.apply(this,arguments)},P.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===N._rootFramesTimeline},P.rawTime=function(e){return e&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(e)-this._startTime)*this._timeScale},nt},!0),Mt._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(N,J,Q){var nt=function(E){N.call(this,E),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},F=1e-10,Y=J._internals,$=Y.lazyTweens,mt=Y.lazyRender,O=Mt._gsDefine.globals,M=new Q(null,null,1,0),b=nt.prototype=new N;return b.constructor=nt,b.kill()._gc=!1,nt.version="2.0.2",b.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),N.prototype.invalidate.call(this)},b.addCallback=function(E,G,st,L){return this.add(J.delayedCall(0,E,st,L),G)},b.removeCallback=function(E,G){if(E)if(G==null)this._kill(null,E);else for(var st=this.getTweensOf(E,!1),L=st.length,v=this._parseTimeOrLabel(G);--L>-1;)st[L]._startTime===v&&st[L]._enabled(!1,!1);return this},b.removePause=function(E){return this.removeCallback(N._internals.pauseCallback,E)},b.tweenTo=function(E,G){G=G||{};var st,L,v,P={ease:M,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},e=G.repeat&&O.TweenMax||J;for(L in G)P[L]=G[L];return P.time=this._parseTimeOrLabel(E),st=Math.abs(Number(P.time)-this._time)/this._timeScale||.001,v=new e(this,st,P),P.onStart=function(){v.target.paused(!0),v.vars.time===v.target.time()||st!==v.duration()||v.isFromTo||v.duration(Math.abs(v.vars.time-v.target.time())/v.target._timeScale).render(v.time(),!0,!0),G.onStart&&G.onStart.apply(G.onStartScope||G.callbackScope||v,G.onStartParams||[])},v},b.tweenFromTo=function(E,G,st){st=st||{},E=this._parseTimeOrLabel(E),st.startAt={onComplete:this.seek,onCompleteParams:[E],callbackScope:this},st.immediateRender=st.immediateRender!==!1;var L=this.tweenTo(G,st);return L.isFromTo=1,L.duration(Math.abs(L.vars.time-E)/this._timeScale||.001)},b.render=function(E,G,st){this._gc&&this._enabled(!0,!1);var L,v,P,e,t,_,n,g,p=this._time,T=this._dirty?this.totalDuration():this._totalDuration,S=this._duration,D=this._totalTime,R=this._startTime,Z=this._timeScale,U=this._rawPrevTime,tt=this._paused,et=this._cycle;if(p!==this._time&&(E+=this._time-p),E>=T-1e-7&&E>=0)this._locked||(this._totalTime=T,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(v=!0,e="onComplete",t=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=E&&E>=-1e-7||0>U||U===F)&&U!==E&&this._first&&(t=!0,U>F&&(e="onReverseComplete"))),this._rawPrevTime=this._duration||!G||E||this._rawPrevTime===E?E:F,this._yoyo&&1&this._cycle?this._time=E=0:(this._time=S,E=S+1e-4);else if(1e-7>E)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(p!==0||S===0&&U!==F&&(U>0||0>E&&U>=0)&&!this._locked)&&(e="onReverseComplete",v=this._reversed),0>E)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(t=v=!0,e="onReverseComplete"):U>=0&&this._first&&(t=!0),this._rawPrevTime=E;else{if(this._rawPrevTime=S||!G||E||this._rawPrevTime===E?E:F,E===0&&v)for(L=this._first;L&&L._startTime===0;)L._duration||(v=!1),L=L._next;E=0,this._initted||(t=!0)}else if(S===0&&0>U&&(t=!0),this._time=this._rawPrevTime=E,this._locked||(this._totalTime=E,this._repeat!==0&&(_=S+this._repeatDelay,this._cycle=this._totalTime/_>>0,this._cycle!==0&&this._cycle===this._totalTime/_&&E>=D&&this._cycle--,this._time=this._totalTime-this._cycle*_,this._yoyo&&1&this._cycle&&(this._time=S-this._time),this._time>S?(this._time=S,E=S+1e-4):this._time<0?this._time=E=0:E=this._time)),this._hasPause&&!this._forcingPlayhead&&!G){if(E=this._time,E>=p||this._repeat&&et!==this._cycle)for(L=this._first;L&&L._startTime<=E&&!n;)L._duration||L.data!=="isPause"||L.ratio||L._startTime===0&&this._rawPrevTime===0||(n=L),L=L._next;else for(L=this._last;L&&L._startTime>=E&&!n;)L._duration||L.data==="isPause"&&L._rawPrevTime>0&&(n=L),L=L._prev;n&&n._startTime<S&&(this._time=E=n._startTime,this._totalTime=E+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==et&&!this._locked){var dt=this._yoyo&&(1&et)!==0,at=dt===(this._yoyo&&(1&this._cycle)!==0),K=this._totalTime,gt=this._cycle,Vt=this._rawPrevTime,yt=this._time;if(this._totalTime=et*S,this._cycle<et?dt=!dt:this._totalTime+=S,this._time=p,this._rawPrevTime=S===0?U-1e-4:U,this._cycle=et,this._locked=!0,p=dt?0:S,this.render(p,G,S===0),G||this._gc||this.vars.onRepeat&&(this._cycle=gt,this._locked=!1,this._callback("onRepeat")),p!==this._time||(at&&(this._cycle=et,this._locked=!0,p=dt?S+1e-4:-1e-4,this.render(p,!0,!1)),this._locked=!1,this._paused&&!tt))return;this._time=yt,this._totalTime=K,this._cycle=gt,this._rawPrevTime=Vt}if(!(this._time!==p&&this._first||st||t||n))return void(D!==this._totalTime&&this._onUpdate&&(G||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==D&&E>0&&(this._active=!0),D===0&&this.vars.onStart&&(this._totalTime===0&&this._totalDuration||G||this._callback("onStart")),g=this._time,g>=p)for(L=this._first;L&&(P=L._next,g===this._time&&(!this._paused||tt));)(L._active||L._startTime<=this._time&&!L._paused&&!L._gc)&&(n===L&&this.pause(),L._reversed?L.render((L._dirty?L.totalDuration():L._totalDuration)-(E-L._startTime)*L._timeScale,G,st):L.render((E-L._startTime)*L._timeScale,G,st)),L=P;else for(L=this._last;L&&(P=L._prev,g===this._time&&(!this._paused||tt));){if(L._active||L._startTime<=p&&!L._paused&&!L._gc){if(n===L){for(n=L._prev;n&&n.endTime()>this._time;)n.render(n._reversed?n.totalDuration()-(E-n._startTime)*n._timeScale:(E-n._startTime)*n._timeScale,G,st),n=n._prev;n=null,this.pause()}L._reversed?L.render((L._dirty?L.totalDuration():L._totalDuration)-(E-L._startTime)*L._timeScale,G,st):L.render((E-L._startTime)*L._timeScale,G,st)}L=P}this._onUpdate&&(G||($.length&&mt(),this._callback("onUpdate"))),e&&(this._locked||this._gc||(R===this._startTime||Z!==this._timeScale)&&(this._time===0||T>=this.totalDuration())&&(v&&($.length&&mt(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!G&&this.vars[e]&&this._callback(e)))},b.getActive=function(E,G,st){E==null&&(E=!0),G==null&&(G=!0),st==null&&(st=!1);var L,v,P=[],e=this.getChildren(E,G,st),t=0,_=e.length;for(L=0;_>L;L++)v=e[L],v.isActive()&&(P[t++]=v);return P},b.getLabelAfter=function(E){E||E!==0&&(E=this._time);var G,st=this.getLabelsArray(),L=st.length;for(G=0;L>G;G++)if(st[G].time>E)return st[G].name;return null},b.getLabelBefore=function(E){E==null&&(E=this._time);for(var G=this.getLabelsArray(),st=G.length;--st>-1;)if(G[st].time<E)return G[st].name;return null},b.getLabelsArray=function(){var E,G=[],st=0;for(E in this._labels)G[st++]={time:this._labels[E],name:E};return G.sort(function(L,v){return L.time-v.time}),G},b.invalidate=function(){return this._locked=!1,N.prototype.invalidate.call(this)},b.progress=function(E,G){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-E:E)+this._cycle*(this._duration+this._repeatDelay),G):this._time/this.duration()||0},b.totalProgress=function(E,G){return arguments.length?this.totalTime(this.totalDuration()*E,G):this._totalTime/this.totalDuration()||0},b.totalDuration=function(E){return arguments.length?this._repeat!==-1&&E?this.timeScale(this.totalDuration()/E):this:(this._dirty&&(N.prototype.totalDuration.call(this),this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},b.time=function(E,G){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,G)):this._time},b.repeat=function(E){return arguments.length?(this._repeat=E,this._uncache(!0)):this._repeat},b.repeatDelay=function(E){return arguments.length?(this._repeatDelay=E,this._uncache(!0)):this._repeatDelay},b.yoyo=function(E){return arguments.length?(this._yoyo=E,this):this._yoyo},b.currentLabel=function(E){return arguments.length?this.seek(E,!0):this.getLabelBefore(this._time+1e-8)},nt},!0),function(){var N=180/Math.PI,J=[],Q=[],nt=[],F={},Y=Mt._gsDefine.globals,$=function(e,t,_,n){_===n&&(_=n-(n-t)/1e6),e===t&&(t=e+(_-e)/1e6),this.a=e,this.b=t,this.c=_,this.d=n,this.da=n-e,this.ca=_-e,this.ba=t-e},mt=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",O=function(e,t,_,n){var g={a:e},p={},T={},S={c:n},D=(e+t)/2,R=(t+_)/2,Z=(_+n)/2,U=(D+R)/2,tt=(R+Z)/2,et=(tt-U)/8;return g.b=D+(e-D)/4,p.b=U+et,g.c=p.a=(g.b+p.b)/2,p.c=T.a=(U+tt)/2,T.b=tt-et,S.b=Z+(n-Z)/4,T.c=S.a=(T.b+S.b)/2,[g,p,T,S]},M=function(e,t,_,n,g){var p,T,S,D,R,Z,U,tt,et,dt,at,K,gt,Vt=e.length-1,yt=0,Ct=e[0].a;for(p=0;Vt>p;p++)R=e[yt],T=R.a,S=R.d,D=e[yt+1].d,g?(at=J[p],K=Q[p],gt=(K+at)*t*.25/(n?.5:nt[p]||.5),Z=S-(S-T)*(n?.5*t:at!==0?gt/at:0),U=S+(D-S)*(n?.5*t:K!==0?gt/K:0),tt=S-(Z+((U-Z)*(3*at/(at+K)+.5)/4||0))):(Z=S-(S-T)*t*.5,U=S+(D-S)*t*.5,tt=S-(Z+U)/2),Z+=tt,U+=tt,R.c=et=Z,p!==0?R.b=Ct:R.b=Ct=R.a+.6*(R.c-R.a),R.da=S-T,R.ca=et-T,R.ba=Ct-T,_?(dt=O(T,Ct,et,S),e.splice(yt,1,dt[0],dt[1],dt[2],dt[3]),yt+=4):yt++,Ct=U;R=e[yt],R.b=Ct,R.c=Ct+.4*(R.d-Ct),R.da=R.d-R.a,R.ca=R.c-R.a,R.ba=Ct-R.a,_&&(dt=O(R.a,Ct,R.c,R.d),e.splice(yt,1,dt[0],dt[1],dt[2],dt[3]))},b=function(e,t,_,n){var g,p,T,S,D,R,Z=[];if(n)for(e=[n].concat(e),p=e.length;--p>-1;)typeof(R=e[p][t])=="string"&&R.charAt(1)==="="&&(e[p][t]=n[t]+Number(R.charAt(0)+R.substr(2)));if(g=e.length-2,0>g)return Z[0]=new $(e[0][t],0,0,e[0][t]),Z;for(p=0;g>p;p++)T=e[p][t],S=e[p+1][t],Z[p]=new $(T,0,0,S),_&&(D=e[p+2][t],J[p]=(J[p]||0)+(S-T)*(S-T),Q[p]=(Q[p]||0)+(D-S)*(D-S));return Z[p]=new $(e[p][t],0,0,e[p+1][t]),Z},E=function(e,t,_,n,g,p){var T,S,D,R,Z,U,tt,et,dt={},at=[],K=p||e[0];g=typeof g=="string"?","+g+",":mt,t==null&&(t=1);for(S in e[0])at.push(S);if(e.length>1){for(et=e[e.length-1],tt=!0,T=at.length;--T>-1;)if(S=at[T],Math.abs(K[S]-et[S])>.05){tt=!1;break}tt&&(e=e.concat(),p&&e.unshift(p),e.push(e[1]),p=e[e.length-3])}for(J.length=Q.length=nt.length=0,T=at.length;--T>-1;)S=at[T],F[S]=g.indexOf(","+S+",")!==-1,dt[S]=b(e,S,F[S],p);for(T=J.length;--T>-1;)J[T]=Math.sqrt(J[T]),Q[T]=Math.sqrt(Q[T]);if(!n){for(T=at.length;--T>-1;)if(F[S])for(D=dt[at[T]],U=D.length-1,R=0;U>R;R++)Z=D[R+1].da/Q[R]+D[R].da/J[R]||0,nt[R]=(nt[R]||0)+Z*Z;for(T=nt.length;--T>-1;)nt[T]=Math.sqrt(nt[T])}for(T=at.length,R=_?4:1;--T>-1;)S=at[T],D=dt[S],M(D,t,_,n,F[S]),tt&&(D.splice(0,R),D.splice(D.length-R,R));return dt},G=function(e,t,_){t=t||"soft";var n,g,p,T,S,D,R,Z,U,tt,et,dt={},at=t==="cubic"?3:2,K=t==="soft",gt=[];if(K&&_&&(e=[_].concat(e)),e==null||e.length<at+1)throw"invalid Bezier data";for(U in e[0])gt.push(U);for(D=gt.length;--D>-1;){for(U=gt[D],dt[U]=S=[],tt=0,Z=e.length,R=0;Z>R;R++)n=_==null?e[R][U]:typeof(et=e[R][U])=="string"&&et.charAt(1)==="="?_[U]+Number(et.charAt(0)+et.substr(2)):Number(et),K&&R>1&&Z-1>R&&(S[tt++]=(n+S[tt-2])/2),S[tt++]=n;for(Z=tt-at+1,tt=0,R=0;Z>R;R+=at)n=S[R],g=S[R+1],p=S[R+2],T=at===2?0:S[R+3],S[tt++]=et=at===3?new $(n,g,p,T):new $(n,(2*g+n)/3,(2*g+p)/3,p);S.length=tt}return dt},st=function(e,t,_){for(var n,g,p,T,S,D,R,Z,U,tt,et,dt=1/_,at=e.length;--at>-1;)for(tt=e[at],p=tt.a,T=tt.d-p,S=tt.c-p,D=tt.b-p,n=g=0,Z=1;_>=Z;Z++)R=dt*Z,U=1-R,n=g-(g=(R*R*T+3*U*(R*S+U*D))*R),et=at*_+Z-1,t[et]=(t[et]||0)+n*n},L=function(e,t){t=t>>0||6;var _,n,g,p,T=[],S=[],D=0,R=0,Z=t-1,U=[],tt=[];for(_ in e)st(e[_],T,t);for(g=T.length,n=0;g>n;n++)D+=Math.sqrt(T[n]),p=n%t,tt[p]=D,p===Z&&(R+=D,p=n/t>>0,U[p]=tt,S[p]=R,D=0,tt=[]);return{length:R,lengths:S,segments:U}},v=Mt._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(e,t,_){this._target=e,t instanceof Array&&(t={values:t}),this._func={},this._mod={},this._props=[],this._timeRes=t.timeResolution==null?6:parseInt(t.timeResolution,10);var n,g,p,T,S,D=t.values||[],R={},Z=D[0],U=t.autoRotate||_.vars.orientToBezier;this._autoRotate=U?U instanceof Array?U:[["x","y","rotation",U===!0?0:Number(U)||0]]:null;for(n in Z)this._props.push(n);for(p=this._props.length;--p>-1;)n=this._props[p],this._overwriteProps.push(n),g=this._func[n]=typeof e[n]=="function",R[n]=g?e[n.indexOf("set")||typeof e["get"+n.substr(3)]!="function"?n:"get"+n.substr(3)]():parseFloat(e[n]),S||R[n]!==D[0][n]&&(S=R);if(this._beziers=t.type!=="cubic"&&t.type!=="quadratic"&&t.type!=="soft"?E(D,isNaN(t.curviness)?1:t.curviness,!1,t.type==="thruBasic",t.correlate,S):G(D,t.type,R),this._segCount=this._beziers[n].length,this._timeRes){var tt=L(this._beziers,this._timeRes);this._length=tt.length,this._lengths=tt.lengths,this._segments=tt.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(U=this._autoRotate)for(this._initialRotations=[],U[0]instanceof Array||(this._autoRotate=U=[U]),p=U.length;--p>-1;){for(T=0;3>T;T++)n=U[p][T],this._func[n]=typeof e[n]=="function"?e[n.indexOf("set")||typeof e["get"+n.substr(3)]!="function"?n:"get"+n.substr(3)]:!1;n=U[p][2],this._initialRotations[p]=(this._func[n]?this._func[n].call(this._target):this._target[n])||0,this._overwriteProps.push(n)}return this._startRatio=_.vars.runBackwards?1:0,!0},set:function(e){var t,_,n,g,p,T,S,D,R,Z,U=this._segCount,tt=this._func,et=this._target,dt=e!==this._startRatio;if(this._timeRes){if(R=this._lengths,Z=this._curSeg,e*=this._length,n=this._li,e>this._l2&&U-1>n){for(D=U-1;D>n&&(this._l2=R[++n])<=e;);this._l1=R[n-1],this._li=n,this._curSeg=Z=this._segments[n],this._s2=Z[this._s1=this._si=0]}else if(e<this._l1&&n>0){for(;n>0&&(this._l1=R[--n])>=e;);n===0&&e<this._l1?this._l1=0:n++,this._l2=R[n],this._li=n,this._curSeg=Z=this._segments[n],this._s1=Z[(this._si=Z.length-1)-1]||0,this._s2=Z[this._si]}if(t=n,e-=this._l1,n=this._si,e>this._s2&&n<Z.length-1){for(D=Z.length-1;D>n&&(this._s2=Z[++n])<=e;);this._s1=Z[n-1],this._si=n}else if(e<this._s1&&n>0){for(;n>0&&(this._s1=Z[--n])>=e;);n===0&&e<this._s1?this._s1=0:n++,this._s2=Z[n],this._si=n}T=(n+(e-this._s1)/(this._s2-this._s1))*this._prec||0}else t=0>e?0:e>=1?U-1:U*e>>0,T=(e-t*(1/U))*U;for(_=1-T,n=this._props.length;--n>-1;)g=this._props[n],p=this._beziers[g][t],S=(T*T*p.da+3*_*(T*p.ca+_*p.ba))*T+p.a,this._mod[g]&&(S=this._mod[g](S,et)),tt[g]?et[g](S):et[g]=S;if(this._autoRotate){var at,K,gt,Vt,yt,Ct,te,ee=this._autoRotate;for(n=ee.length;--n>-1;)g=ee[n][2],Ct=ee[n][3]||0,te=ee[n][4]===!0?1:N,p=this._beziers[ee[n][0]],at=this._beziers[ee[n][1]],p&&at&&(p=p[t],at=at[t],K=p.a+(p.b-p.a)*T,Vt=p.b+(p.c-p.b)*T,K+=(Vt-K)*T,Vt+=(p.c+(p.d-p.c)*T-Vt)*T,gt=at.a+(at.b-at.a)*T,yt=at.b+(at.c-at.b)*T,gt+=(yt-gt)*T,yt+=(at.c+(at.d-at.c)*T-yt)*T,S=dt?Math.atan2(yt-gt,Vt-K)*te+Ct:this._initialRotations[n],this._mod[g]&&(S=this._mod[g](S,et)),tt[g]?et[g](S):et[g]=S)}}}),P=v.prototype;v.bezierThrough=E,v.cubicToQuadratic=O,v._autoCSS=!0,v.quadraticToCubic=function(e,t,_){return new $(e,(2*t+e)/3,(2*t+_)/3,_)},v._cssRegister=function(){var e=Y.CSSPlugin;if(e){var t=e._internals,_=t._parseToProxy,n=t._setPluginRatio,g=t.CSSPropTween;t._registerComplexSpecialProp("bezier",{parser:function(p,T,S,D,R,Z){T instanceof Array&&(T={values:T}),Z=new v;var U,tt,et,dt=T.values,at=dt.length-1,K=[],gt={};if(0>at)return R;for(U=0;at>=U;U++)et=_(p,dt[U],D,R,Z,at!==U),K[U]=et.end;for(tt in T)gt[tt]=T[tt];return gt.values=K,R=new g(p,"bezier",0,0,et.pt,2),R.data=et,R.plugin=Z,R.setRatio=n,gt.autoRotate===0&&(gt.autoRotate=!0),!gt.autoRotate||gt.autoRotate instanceof Array||(U=gt.autoRotate===!0?0:Number(gt.autoRotate),gt.autoRotate=et.end.left!=null?[["left","top","rotation",U,!1]]:et.end.x!=null?[["x","y","rotation",U,!1]]:!1),gt.autoRotate&&(D._transform||D._enableTransforms(!1),et.autoRotate=D._target._gsTransform,et.proxy.rotation=et.autoRotate.rotation||0,D._overwriteProps.push("rotation")),Z._onInitTween(et.proxy,gt,D._tween),R}})}},P._mod=function(e){for(var t,_=this._overwriteProps,n=_.length;--n>-1;)t=e[_[n]],t&&typeof t=="function"&&(this._mod[_[n]]=t)},P._kill=function(e){var t,_,n=this._props;for(t in this._beziers)if(t in e)for(delete this._beziers[t],delete this._func[t],_=n.length;--_>-1;)n[_]===t&&n.splice(_,1);if(n=this._autoRotate)for(_=n.length;--_>-1;)e[n[_][2]]&&n.splice(_,1);return this._super._kill.call(this,e)}}(),Mt._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(N,J){var Q,nt,F,Y,$=function(){N.call(this,"css"),this._overwriteProps.length=0,this.setRatio=$.prototype.setRatio},mt=Mt._gsDefine.globals,O={},M=$.prototype=new N("css");M.constructor=$,$.version="2.0.2",$.API=2,$.defaultTransformPerspective=0,$.defaultSkewType="compensated",$.defaultSmoothOrigin=!0,M="px",$.suffixMap={top:M,right:M,bottom:M,left:M,width:M,height:M,fontSize:M,padding:M,margin:M,perspective:M,lineHeight:""};var b,E,G,st,L,v,P,e,t=/(?:\-|\.|\b)(\d|\.|e\-)+/g,_=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,n=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,g=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,p=/(?:\d|\-|\+|=|#|\.)*/g,T=/opacity *= *([^)]*)/i,S=/opacity:([^;]*)/i,D=/alpha\(opacity *=.+?\)/i,R=/^(rgb|hsl)/,Z=/([A-Z])/g,U=/-([a-z])/gi,tt=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,et=function(i,o){return o.toUpperCase()},dt=/(?:Left|Right|Width)/i,at=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,K=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,gt=/,(?=[^\)]*(?:\(|$))/gi,Vt=/[\s,\(]/i,yt=Math.PI/180,Ct=180/Math.PI,te={},ee={style:{}},$t=Mt.document||{createElement:function(){return ee}},le=function(i,o){return $t.createElementNS?$t.createElementNS(o||"http://www.w3.org/1999/xhtml",i):$t.createElement(i)},Wt=le("div"),he=le("img"),zt=$._internals={_specialProps:O},jt=(Mt.navigator||{}).userAgent||"",se=function(){var i=jt.indexOf("Android"),o=le("a");return G=jt.indexOf("Safari")!==-1&&jt.indexOf("Chrome")===-1&&(i===-1||parseFloat(jt.substr(i+8,2))>3),L=G&&parseFloat(jt.substr(jt.indexOf("Version/")+8,2))<6,st=jt.indexOf("Firefox")!==-1,(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(jt)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(jt))&&(v=parseFloat(RegExp.$1)),o?(o.style.cssText="top:1px;opacity:.55;",/^0.55/.test(o.style.opacity)):!1}(),ue=function(i){return T.test(typeof i=="string"?i:(i.currentStyle?i.currentStyle.filter:i.style.filter)||"")?parseFloat(RegExp.$1)/100:1},me=function(i){Mt.console&&console.log(i)},ie="",Ht="",ne=function(i,o){o=o||Wt;var l,a,s=o.style;if(s[i]!==void 0)return i;for(i=i.charAt(0).toUpperCase()+i.substr(1),l=["O","Moz","ms","Ms","Webkit"],a=5;--a>-1&&s[l[a]+i]===void 0;);return a>=0?(Ht=a===3?"ms":l[a],ie="-"+Ht.toLowerCase()+"-",Ht+i):null},It=(typeof window<"u"?window:$t.defaultView||{getComputedStyle:function(){}}).getComputedStyle,Pt=$.getStyle=function(i,o,l,a,s){var d;return se||o!=="opacity"?(!a&&i.style[o]?d=i.style[o]:(l=l||It(i))?d=l[o]||l.getPropertyValue(o)||l.getPropertyValue(o.replace(Z,"-$1").toLowerCase()):i.currentStyle&&(d=i.currentStyle[o]),s==null||d&&d!=="none"&&d!=="auto"&&d!=="auto auto"?d:s):ue(i)},qt=zt.convertToPixels=function(i,o,l,a,s){if(a==="px"||!a&&o!=="lineHeight")return l;if(a==="auto"||!l)return 0;var d,h,y,k=dt.test(o),x=i,m=Wt.style,I=0>l,B=l===1;if(I&&(l=-l),B&&(l*=100),o!=="lineHeight"||a)if(a==="%"&&o.indexOf("border")!==-1)d=l/100*(k?i.clientWidth:i.clientHeight);else{if(m.cssText="border:0 solid red;position:"+Pt(i,"position")+";line-height:0;",a!=="%"&&x.appendChild&&a.charAt(0)!=="v"&&a!=="rem")m[k?"borderLeftWidth":"borderTopWidth"]=l+a;else{if(x=i.parentNode||$t.body,Pt(x,"display").indexOf("flex")!==-1&&(m.position="absolute"),h=x._gsCache,y=J.ticker.frame,h&&k&&h.time===y)return h.width*l/100;m[k?"width":"height"]=l+a}x.appendChild(Wt),d=parseFloat(Wt[k?"offsetWidth":"offsetHeight"]),x.removeChild(Wt),k&&a==="%"&&$.cacheWidths!==!1&&(h=x._gsCache=x._gsCache||{},h.time=y,h.width=d/l*100),d!==0||s||(d=qt(i,o,l,a,!0))}else h=It(i).lineHeight,i.style.lineHeight=l,d=parseFloat(It(i).lineHeight),i.style.lineHeight=h;return B&&(d/=100),I?-d:d},fe=zt.calculateOffset=function(i,o,l){if(Pt(i,"position",l)!=="absolute")return 0;var a=o==="left"?"Left":"Top",s=Pt(i,"margin"+a,l);return i["offset"+a]-(qt(i,o,parseFloat(s),s.replace(p,""))||0)},oe=function(i,o){var l,a,s,d={};if(o=o||It(i,null))if(l=o.length)for(;--l>-1;)s=o[l],(s.indexOf("-transform")===-1||ke===s)&&(d[s.replace(U,et)]=o.getPropertyValue(s));else for(l in o)(l.indexOf("Transform")===-1||Lt===l)&&(d[l]=o[l]);else if(o=i.currentStyle||i.style)for(l in o)typeof l=="string"&&d[l]===void 0&&(d[l.replace(U,et)]=o[l]);return se||(d.opacity=ue(i)),a=ge(i,o,!1),d.rotation=a.rotation,d.skewX=a.skewX,d.scaleX=a.scaleX,d.scaleY=a.scaleY,d.x=a.x,d.y=a.y,Qt&&(d.z=a.z,d.rotationX=a.rotationX,d.rotationY=a.rotationY,d.scaleZ=a.scaleZ),d.filters&&delete d.filters,d},Zt=function(i,o,l,a,s){var d,h,y,k={},x=i.style;for(h in l)h!=="cssText"&&h!=="length"&&isNaN(h)&&(o[h]!==(d=l[h])||s&&s[h])&&h.indexOf("Origin")===-1&&(typeof d=="number"||typeof d=="string")&&(k[h]=d!=="auto"||h!=="left"&&h!=="top"?d!==""&&d!=="auto"&&d!=="none"||typeof o[h]!="string"||o[h].replace(g,"")===""?d:0:fe(i,h),x[h]!==void 0&&(y=new vt(x,h,x[h],y)));if(a)for(h in a)h!=="className"&&(k[h]=a[h]);return{difs:k,firstMPT:y}},r={width:["Left","Right"],height:["Top","Bottom"]},u=["marginLeft","marginRight","marginTop","marginBottom"],f=function(i,o,l){if((i.nodeName+"").toLowerCase()==="svg")return(l||It(i))[o]||0;if(i.getCTM&&Se(i))return i.getBBox()[o]||0;var a=parseFloat(o==="width"?i.offsetWidth:i.offsetHeight),s=r[o],d=s.length;for(l=l||It(i,null);--d>-1;)a-=parseFloat(Pt(i,"padding"+s[d],l,!0))||0,a-=parseFloat(Pt(i,"border"+s[d]+"Width",l,!0))||0;return a},c=function(i,o){if(i==="contain"||i==="auto"||i==="auto auto")return i+" ";(i==null||i==="")&&(i="0 0");var l,a=i.split(" "),s=i.indexOf("left")!==-1?"0%":i.indexOf("right")!==-1?"100%":a[0],d=i.indexOf("top")!==-1?"0%":i.indexOf("bottom")!==-1?"100%":a[1];if(a.length>3&&!o){for(a=i.split(", ").join(",").split(","),i=[],l=0;l<a.length;l++)i.push(c(a[l]));return i.join(",")}return d==null?d=s==="center"?"50%":"0":d==="center"&&(d="50%"),(s==="center"||isNaN(parseFloat(s))&&(s+"").indexOf("=")===-1)&&(s="50%"),i=s+" "+d+(a.length>2?" "+a[2]:""),o&&(o.oxp=s.indexOf("%")!==-1,o.oyp=d.indexOf("%")!==-1,o.oxr=s.charAt(1)==="=",o.oyr=d.charAt(1)==="=",o.ox=parseFloat(s.replace(g,"")),o.oy=parseFloat(d.replace(g,"")),o.v=i),o||i},w=function(i,o){return typeof i=="function"&&(i=i(e,P)),typeof i=="string"&&i.charAt(1)==="="?parseInt(i.charAt(0)+"1",10)*parseFloat(i.substr(2)):parseFloat(i)-parseFloat(o)||0},C=function(i,o){typeof i=="function"&&(i=i(e,P));var l=typeof i=="string"&&i.charAt(1)==="=";return typeof i=="string"&&i.charAt(i.length-2)==="v"&&(i=(l?i.substr(0,2):0)+window["inner"+(i.substr(-2)==="vh"?"Height":"Width")]*(parseFloat(l?i.substr(2):i)/100)),i==null?o:l?parseInt(i.charAt(0)+"1",10)*parseFloat(i.substr(2))+o:parseFloat(i)||0},j=function(i,o,l,a){var s,d,h,y,k,x=1e-6;return typeof i=="function"&&(i=i(e,P)),i==null?y=o:typeof i=="number"?y=i:(s=360,d=i.split("_"),k=i.charAt(1)==="=",h=(k?parseInt(i.charAt(0)+"1",10)*parseFloat(d[0].substr(2)):parseFloat(d[0]))*(i.indexOf("rad")===-1?1:Ct)-(k?0:o),d.length&&(a&&(a[l]=o+h),i.indexOf("short")!==-1&&(h%=s,h!==h%(s/2)&&(h=0>h?h+s:h-s)),i.indexOf("_cw")!==-1&&0>h?h=(h+9999999999*s)%s-(h/s|0)*s:i.indexOf("ccw")!==-1&&h>0&&(h=(h-9999999999*s)%s-(h/s|0)*s)),y=o+h),x>y&&y>-x&&(y=0),y},A={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]},ft=function(i,o,l){return i=0>i?i+1:i>1?i-1:i,255*(1>6*i?o+(l-o)*i*6:.5>i?l:2>3*i?o+(l-o)*(2/3-i)*6:o)+.5|0},ut=$.parseColor=function(i,o){var l,a,s,d,h,y,k,x,m,I,B;if(i)if(typeof i=="number")l=[i>>16,i>>8&255,255&i];else{if(i.charAt(i.length-1)===","&&(i=i.substr(0,i.length-1)),A[i])l=A[i];else if(i.charAt(0)==="#")i.length===4&&(a=i.charAt(1),s=i.charAt(2),d=i.charAt(3),i="#"+a+a+s+s+d+d),i=parseInt(i.substr(1),16),l=[i>>16,i>>8&255,255&i];else if(i.substr(0,3)==="hsl")if(l=B=i.match(t),o){if(i.indexOf("=")!==-1)return i.match(_)}else h=Number(l[0])%360/360,y=Number(l[1])/100,k=Number(l[2])/100,s=.5>=k?k*(y+1):k+y-k*y,a=2*k-s,l.length>3&&(l[3]=Number(l[3])),l[0]=ft(h+1/3,a,s),l[1]=ft(h,a,s),l[2]=ft(h-1/3,a,s);else l=i.match(t)||A.transparent;l[0]=Number(l[0]),l[1]=Number(l[1]),l[2]=Number(l[2]),l.length>3&&(l[3]=Number(l[3]))}else l=A.black;return o&&!B&&(a=l[0]/255,s=l[1]/255,d=l[2]/255,x=Math.max(a,s,d),m=Math.min(a,s,d),k=(x+m)/2,x===m?h=y=0:(I=x-m,y=k>.5?I/(2-x-m):I/(x+m),h=x===a?(s-d)/I+(d>s?6:0):x===s?(d-a)/I+2:(a-s)/I+4,h*=60),l[0]=h+.5|0,l[1]=100*y+.5|0,l[2]=100*k+.5|0),l},W=function(i,o){var l,a,s,d=i.match(pt)||[],h=0,y="";if(!d.length)return i;for(l=0;l<d.length;l++)a=d[l],s=i.substr(h,i.indexOf(a,h)-h),h+=s.length+a.length,a=ut(a,o),a.length===3&&a.push(1),y+=s+(o?"hsla("+a[0]+","+a[1]+"%,"+a[2]+"%,"+a[3]:"rgba("+a.join(","))+")";return y+i.substr(h)},pt="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(M in A)pt+="|"+M+"\\b";pt=new RegExp(pt+")","gi"),$.colorStringFilter=function(i){var o,l=i[0]+" "+i[1];pt.test(l)&&(o=l.indexOf("hsl(")!==-1||l.indexOf("hsla(")!==-1,i[0]=W(i[0],o),i[1]=W(i[1],o)),pt.lastIndex=0},J.defaultStringFilter||(J.defaultStringFilter=$.colorStringFilter);var kt=function(i,o,l,a){if(i==null)return function(B){return B};var s,d=o?(i.match(pt)||[""])[0]:"",h=i.split(d).join("").match(n)||[],y=i.substr(0,i.indexOf(h[0])),k=i.charAt(i.length-1)===")"?")":"",x=i.indexOf(" ")!==-1?" ":",",m=h.length,I=m>0?h[0].replace(t,""):"";return m?s=o?function(B){var z,q,X,lt;if(typeof B=="number")B+=I;else if(a&>.test(B)){for(lt=B.replace(gt,"|").split("|"),X=0;X<lt.length;X++)lt[X]=s(lt[X]);return lt.join(",")}if(z=(B.match(pt)||[d])[0],q=B.split(z).join("").match(n)||[],X=q.length,m>X--)for(;++X<m;)q[X]=l?q[(X-1)/2|0]:h[X];return y+q.join(x)+x+z+k+(B.indexOf("inset")!==-1?" inset":"")}:function(B){var z,q,X;if(typeof B=="number")B+=I;else if(a&>.test(B)){for(q=B.replace(gt,"|").split("|"),X=0;X<q.length;X++)q[X]=s(q[X]);return q.join(",")}if(z=B.match(n)||[],X=z.length,m>X--)for(;++X<m;)z[X]=l?z[(X-1)/2|0]:h[X];return y+z.join(x)+k}:function(B){return B}},St=function(i){return i=i.split(","),function(o,l,a,s,d,h,y){var k,x=(l+"").split(" ");for(y={},k=0;4>k;k++)y[i[k]]=x[k]=x[k]||x[(k-1)/2>>0];return s.parse(o,y,d,h)}},vt=(zt._setPluginRatio=function(i){this.plugin.setRatio(i);for(var o,l,a,s,d,h=this.data,y=h.proxy,k=h.firstMPT,x=1e-6;k;)o=y[k.v],k.r?o=k.r(o):x>o&&o>-x&&(o=0),k.t[k.p]=o,k=k._next;if(h.autoRotate&&(h.autoRotate.rotation=h.mod?h.mod.call(this._tween,y.rotation,this.t,this._tween):y.rotation),i===1||i===0)for(k=h.firstMPT,d=i===1?"e":"b";k;){if(l=k.t,l.type){if(l.type===1){for(s=l.xs0+l.s+l.xs1,a=1;a<l.l;a++)s+=l["xn"+a]+l["xs"+(a+1)];l[d]=s}}else l[d]=l.s+l.xs0;k=k._next}},function(i,o,l,a,s){this.t=i,this.p=o,this.v=l,this.r=s,a&&(a._prev=this,this._next=a)}),Ot=(zt._parseToProxy=function(i,o,l,a,s,d){var h,y,k,x,m,I=a,B={},z={},q=l._transform,X=te;for(l._transform=null,te=o,a=m=l.parse(i,o,a,s),te=X,d&&(l._transform=q,I&&(I._prev=null,I._prev&&(I._prev._next=null)));a&&a!==I;){if(a.type<=1&&(y=a.p,z[y]=a.s+a.c,B[y]=a.s,d||(x=new vt(a,"s",y,x,a.r),a.c=0),a.type===1))for(h=a.l;--h>0;)k="xn"+h,y=a.p+"_"+k,z[y]=a.data[k],B[y]=a[k],d||(x=new vt(a,k,y,x,a.rxp[k]));a=a._next}return{proxy:B,end:z,firstMPT:x,pt:m}},zt.CSSPropTween=function(i,o,l,a,s,d,h,y,k,x,m){this.t=i,this.p=o,this.s=l,this.c=a,this.n=h||o,i instanceof Ot||Y.push(this.n),this.r=y&&(typeof y=="function"?y:Math.round),this.type=d||0,k&&(this.pr=k,Q=!0),this.b=x===void 0?l:x,this.e=m===void 0?l+a:m,s&&(this._next=s,s._prev=this)}),_e=function(i,o,l,a,s,d){var h=new Ot(i,o,l,a-l,s,-1,d);return h.b=l,h.e=h.xs0=a,h},re=$.parseComplex=function(i,o,l,a,s,d,h,y,k,x){l=l||d||"",typeof a=="function"&&(a=a(e,P)),h=new Ot(i,o,0,0,h,x?2:1,null,!1,y,l,a),a+="",s&&pt.test(a+l)&&(a=[l,a],$.colorStringFilter(a),l=a[0],a=a[1]);var m,I,B,z,q,X,lt,ht,xt,ct,rt,_t,V,Tt=l.split(", ").join(",").split(" "),it=a.split(", ").join(",").split(" "),H=Tt.length,ot=b!==!1;for((a.indexOf(",")!==-1||l.indexOf(",")!==-1)&&((a+l).indexOf("rgb")!==-1||(a+l).indexOf("hsl")!==-1?(Tt=Tt.join(" ").replace(gt,", ").split(" "),it=it.join(" ").replace(gt,", ").split(" ")):(Tt=Tt.join(" ").split(",").join(", ").split(" "),it=it.join(" ").split(",").join(", ").split(" ")),H=Tt.length),H!==it.length&&(Tt=(d||"").split(" "),H=Tt.length),h.plugin=k,h.setRatio=x,pt.lastIndex=0,m=0;H>m;m++)if(z=Tt[m],q=it[m]+"",ht=parseFloat(z),ht||ht===0)h.appendXtra("",ht,w(q,ht),q.replace(_,""),ot&&q.indexOf("px")!==-1?Math.round:!1,!0);else if(s&&pt.test(z))_t=q.indexOf(")")+1,_t=")"+(_t?q.substr(_t):""),V=q.indexOf("hsl")!==-1&&se,ct=q,z=ut(z,V),q=ut(q,V),xt=z.length+q.length>6,xt&&!se&&q[3]===0?(h["xs"+h.l]+=h.l?" transparent":"transparent",h.e=h.e.split(it[m]).join("transparent")):(se||(xt=!1),V?h.appendXtra(ct.substr(0,ct.indexOf("hsl"))+(xt?"hsla(":"hsl("),z[0],w(q[0],z[0]),",",!1,!0).appendXtra("",z[1],w(q[1],z[1]),"%,",!1).appendXtra("",z[2],w(q[2],z[2]),xt?"%,":"%"+_t,!1):h.appendXtra(ct.substr(0,ct.indexOf("rgb"))+(xt?"rgba(":"rgb("),z[0],q[0]-z[0],",",Math.round,!0).appendXtra("",z[1],q[1]-z[1],",",Math.round).appendXtra("",z[2],q[2]-z[2],xt?",":_t,Math.round),xt&&(z=z.length<4?1:z[3],h.appendXtra("",z,(q.length<4?1:q[3])-z,_t,!1))),pt.lastIndex=0;else if(X=z.match(t)){if(lt=q.match(_),!lt||lt.length!==X.length)return h;for(B=0,I=0;I<X.length;I++)rt=X[I],ct=z.indexOf(rt,B),h.appendXtra(z.substr(B,ct-B),Number(rt),w(lt[I],rt),"",ot&&z.substr(ct+rt.length,2)==="px"?Math.round:!1,I===0),B=ct+rt.length;h["xs"+h.l]+=z.substr(B)}else h["xs"+h.l]+=h.l||h["xs"+h.l]?" "+q:q;if(a.indexOf("=")!==-1&&h.data){for(_t=h.xs0+h.data.s,m=1;m<h.l;m++)_t+=h["xs"+m]+h.data["xn"+m];h.e=_t+h["xs"+m]}return h.l||(h.type=-1,h.xs0=h.e),h.xfirst||h},Xt=9;for(M=Ot.prototype,M.l=M.pr=0;--Xt>0;)M["xn"+Xt]=0,M["xs"+Xt]="";M.xs0="",M._next=M._prev=M.xfirst=M.data=M.plugin=M.setRatio=M.rxp=null,M.appendXtra=function(i,o,l,a,s,d){var h=this,y=h.l;return h["xs"+y]+=d&&(y||h["xs"+y])?" "+i:i||"",l||y===0||h.plugin?(h.l++,h.type=h.setRatio?2:1,h["xs"+h.l]=a||"",y>0?(h.data["xn"+y]=o+l,h.rxp["xn"+y]=s,h["xn"+y]=o,h.plugin||(h.xfirst=new Ot(h,"xn"+y,o,l,h.xfirst||h,0,h.n,s,h.pr),h.xfirst.xs0=0),h):(h.data={s:o+l},h.rxp={},h.s=o,h.c=l,h.r=s,h)):(h["xs"+y]+=o+(a||""),h)};var Ee=function(i,o){o=o||{},this.p=o.prefix&&ne(i)||i,O[i]=O[this.p]=this,this.format=o.formatter||kt(o.defaultValue,o.color,o.collapsible,o.multi),o.parser&&(this.parse=o.parser),this.clrs=o.color,this.multi=o.multi,this.keyword=o.keyword,this.dflt=o.defaultValue,this.pr=o.priority||0},Dt=zt._registerComplexSpecialProp=function(i,o,l){typeof o!="object"&&(o={parser:l});var a,s=i.split(","),d=o.defaultValue;for(l=l||[d],a=0;a<s.length;a++)o.prefix=a===0&&o.prefix,o.defaultValue=l[a]||d,new Ee(s[a],o)},Qe=zt._registerPluginProp=function(i){if(!O[i]){var o=i.charAt(0).toUpperCase()+i.substr(1)+"Plugin";Dt(i,{parser:function(l,a,s,d,h,y,k){var x=mt.com.greensock.plugins[o];return x?(x._cssRegister(),O[s].parse(l,a,s,d,h,y,k)):(me("Error: "+o+" js file not loaded."),h)}})}};M=Ee.prototype,M.parseComplex=function(i,o,l,a,s,d){var h,y,k,x,m,I,B=this.keyword;if(this.multi&&(gt.test(l)||gt.test(o)?(y=o.replace(gt,"|").split("|"),k=l.replace(gt,"|").split("|")):B&&(y=[o],k=[l])),k){for(x=k.length>y.length?k.length:y.length,h=0;x>h;h++)o=y[h]=y[h]||this.dflt,l=k[h]=k[h]||this.dflt,B&&(m=o.indexOf(B),I=l.indexOf(B),m!==I&&(I===-1?y[h]=y[h].split(B).join(""):m===-1&&(y[h]+=" "+B)));o=y.join(", "),l=k.join(", ")}return re(i,this.p,o,l,this.clrs,this.dflt,a,this.pr,s,d)},M.parse=function(i,o,l,a,s,d,h){return this.parseComplex(i.style,this.format(Pt(i,this.p,F,!1,this.dflt)),this.format(o),s,d)},$.registerSpecialProp=function(i,o,l){Dt(i,{parser:function(a,s,d,h,y,k,x){var m=new Ot(a,d,0,0,y,2,d,!1,l);return m.plugin=k,m.setRatio=o(a,s,h._tween,d),m},priority:l})},$.useSVGTransformAttr=!0;var ae,Fe="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Lt=ne("transform"),ke=ie+"transform",de=ne("transformOrigin"),Qt=ne("perspective")!==null,we=zt.Transform=function(){this.perspective=parseFloat($.defaultTransformPerspective)||0,this.force3D=$.defaultForce3D!==!1&&Qt?$.defaultForce3D||"auto":!1},Je=Mt.SVGElement,ze=function(i,o,l){var a,s=$t.createElementNS("http://www.w3.org/2000/svg",i),d=/([a-z])([A-Z])/g;for(a in l)s.setAttributeNS(null,a.replace(d,"$1-$2").toLowerCase(),l[a]);return o.appendChild(s),s},pe=$t.documentElement||{},Ke=function(){var i,o,l,a=v||/Android/i.test(jt)&&!Mt.chrome;return $t.createElementNS&&!a&&(i=ze("svg",pe),o=ze("rect",i,{width:100,height:50,x:100}),l=o.getBoundingClientRect().width,o.style[de]="50% 50%",o.style[Lt]="scaleX(0.5)",a=l===o.getBoundingClientRect().width&&!(st&&Qt),pe.removeChild(i)),a}(),Oe=function(i,o,l,a,s,d){var h,y,k,x,m,I,B,z,q,X,lt,ht,xt,ct,rt=i._gsTransform,_t=Ae(i,!0);rt&&(xt=rt.xOrigin,ct=rt.yOrigin),(!a||(h=a.split(" ")).length<2)&&(B=i.getBBox(),B.x===0&&B.y===0&&B.width+B.height===0&&(B={x:parseFloat(i.hasAttribute("x")?i.getAttribute("x"):i.hasAttribute("cx")?i.getAttribute("cx"):0)||0,y:parseFloat(i.hasAttribute("y")?i.getAttribute("y"):i.hasAttribute("cy")?i.getAttribute("cy"):0)||0,width:0,height:0}),o=c(o).split(" "),h=[(o[0].indexOf("%")!==-1?parseFloat(o[0])/100*B.width:parseFloat(o[0]))+B.x,(o[1].indexOf("%")!==-1?parseFloat(o[1])/100*B.height:parseFloat(o[1]))+B.y]),l.xOrigin=x=parseFloat(h[0]),l.yOrigin=m=parseFloat(h[1]),a&&_t!==Re&&(I=_t[0],B=_t[1],z=_t[2],q=_t[3],X=_t[4],lt=_t[5],ht=I*q-B*z,ht&&(y=x*(q/ht)+m*(-z/ht)+(z*lt-q*X)/ht,k=x*(-B/ht)+m*(I/ht)-(I*lt-B*X)/ht,x=l.xOrigin=h[0]=y,m=l.yOrigin=h[1]=k)),rt&&(d&&(l.xOffset=rt.xOffset,l.yOffset=rt.yOffset,rt=l),s||s!==!1&&$.defaultSmoothOrigin!==!1?(y=x-xt,k=m-ct,rt.xOffset+=y*_t[0]+k*_t[2]-y,rt.yOffset+=y*_t[1]+k*_t[3]-k):rt.xOffset=rt.yOffset=0),d||i.setAttribute("data-svg-origin",h.join(" "))},je=function(i){var o,l=le("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),a=this.parentNode,s=this.nextSibling,d=this.style.cssText;if(pe.appendChild(l),l.appendChild(this),this.style.display="block",i)try{o=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=je}catch{}else this._originalGetBBox&&(o=this._originalGetBBox());return s?a.insertBefore(this,s):a.appendChild(this),pe.removeChild(l),this.style.cssText=d,o},ti=function(i){try{return i.getBBox()}catch{return je.call(i,!0)}},Se=function(i){return!(!Je||!i.getCTM||i.parentNode&&!i.ownerSVGElement||!ti(i))},Re=[1,0,0,1,0,0],Ae=function(i,o){var l,a,s,d,h,y,k=i._gsTransform||new we,x=1e5,m=i.style;if(Lt?a=Pt(i,ke,null,!0):i.currentStyle&&(a=i.currentStyle.filter.match(at),a=a&&a.length===4?[a[0].substr(4),Number(a[2].substr(4)),Number(a[1].substr(4)),a[3].substr(4),k.x||0,k.y||0].join(","):""),l=!a||a==="none"||a==="matrix(1, 0, 0, 1, 0, 0)",!Lt||!(y=!It(i)||It(i).display==="none")&&i.parentNode||(y&&(d=m.display,m.display="block"),i.parentNode||(h=1,pe.appendChild(i)),a=Pt(i,ke,null,!0),l=!a||a==="none"||a==="matrix(1, 0, 0, 1, 0, 0)",d?m.display=d:y&&ye(m,"display"),h&&pe.removeChild(i)),(k.svg||i.getCTM&&Se(i))&&(l&&(m[Lt]+"").indexOf("matrix")!==-1&&(a=m[Lt],l=0),s=i.getAttribute("transform"),l&&s&&(s=i.transform.baseVal.consolidate().matrix,a="matrix("+s.a+","+s.b+","+s.c+","+s.d+","+s.e+","+s.f+")",l=0)),l)return Re;for(s=(a||"").match(t)||[],Xt=s.length;--Xt>-1;)d=Number(s[Xt]),s[Xt]=(h=d-(d|=0))?(h*x+(0>h?-.5:.5)|0)/x+d:d;return o&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s},ge=zt.getTransform=function(i,o,l,a){if(i._gsTransform&&l&&!a)return i._gsTransform;var s,d,h,y,k,x,m=l?i._gsTransform||new we:new we,I=m.scaleX<0,B=2e-5,z=1e5,q=Qt&&(parseFloat(Pt(i,de,o,!1,"0 0 0").split(" ")[2])||m.zOrigin)||0,X=parseFloat($.defaultTransformPerspective)||0;if(m.svg=!(!i.getCTM||!Se(i)),m.svg&&(Oe(i,Pt(i,de,o,!1,"50% 50%")+"",m,i.getAttribute("data-svg-origin")),ae=$.useSVGTransformAttr||Ke),s=Ae(i),s!==Re){if(s.length===16){var lt,ht,xt,ct,rt,_t=s[0],V=s[1],Tt=s[2],it=s[3],H=s[4],ot=s[5],Jt=s[6],ce=s[7],Et=s[8],At=s[9],Ft=s[10],Nt=s[12],Bt=s[13],Ut=s[14],Yt=s[11],Rt=Math.atan2(Jt,Ft);m.zOrigin&&(Ut=-m.zOrigin,Nt=Et*Ut-s[12],Bt=At*Ut-s[13],Ut=Ft*Ut+m.zOrigin-s[14]),m.rotationX=Rt*Ct,Rt&&(ct=Math.cos(-Rt),rt=Math.sin(-Rt),lt=H*ct+Et*rt,ht=ot*ct+At*rt,xt=Jt*ct+Ft*rt,Et=H*-rt+Et*ct,At=ot*-rt+At*ct,Ft=Jt*-rt+Ft*ct,Yt=ce*-rt+Yt*ct,H=lt,ot=ht,Jt=xt),Rt=Math.atan2(-Tt,Ft),m.rotationY=Rt*Ct,Rt&&(ct=Math.cos(-Rt),rt=Math.sin(-Rt),lt=_t*ct-Et*rt,ht=V*ct-At*rt,xt=Tt*ct-Ft*rt,At=V*rt+At*ct,Ft=Tt*rt+Ft*ct,Yt=it*rt+Yt*ct,_t=lt,V=ht,Tt=xt),Rt=Math.atan2(V,_t),m.rotation=Rt*Ct,Rt&&(ct=Math.cos(Rt),rt=Math.sin(Rt),lt=_t*ct+V*rt,ht=H*ct+ot*rt,xt=Et*ct+At*rt,V=V*ct-_t*rt,ot=ot*ct-H*rt,At=At*ct-Et*rt,_t=lt,H=ht,Et=xt),m.rotationX&&Math.abs(m.rotationX)+Math.abs(m.rotation)>359.9&&(m.rotationX=m.rotation=0,m.rotationY=180-m.rotationY),Rt=Math.atan2(H,ot),m.scaleX=(Math.sqrt(_t*_t+V*V+Tt*Tt)*z+.5|0)/z,m.scaleY=(Math.sqrt(ot*ot+Jt*Jt)*z+.5|0)/z,m.scaleZ=(Math.sqrt(Et*Et+At*At+Ft*Ft)*z+.5|0)/z,_t/=m.scaleX,H/=m.scaleY,V/=m.scaleX,ot/=m.scaleY,Math.abs(Rt)>B?(m.skewX=Rt*Ct,H=0,m.skewType!=="simple"&&(m.scaleY*=1/Math.cos(Rt))):m.skewX=0,m.perspective=Yt?1/(0>Yt?-Yt:Yt):0,m.x=Nt,m.y=Bt,m.z=Ut,m.svg&&(m.x-=m.xOrigin-(m.xOrigin*_t-m.yOrigin*H),m.y-=m.yOrigin-(m.yOrigin*V-m.xOrigin*ot))}else if(!Qt||a||!s.length||m.x!==s[4]||m.y!==s[5]||!m.rotationX&&!m.rotationY){var ve=s.length>=6,bt=ve?s[0]:1,Gt=s[1]||0,Te=s[2]||0,xe=ve?s[3]:1;m.x=s[4]||0,m.y=s[5]||0,h=Math.sqrt(bt*bt+Gt*Gt),y=Math.sqrt(xe*xe+Te*Te),k=bt||Gt?Math.atan2(Gt,bt)*Ct:m.rotation||0,x=Te||xe?Math.atan2(Te,xe)*Ct+k:m.skewX||0,m.scaleX=h,m.scaleY=y,m.rotation=k,m.skewX=x,Qt&&(m.rotationX=m.rotationY=m.z=0,m.perspective=X,m.scaleZ=1),m.svg&&(m.x-=m.xOrigin-(m.xOrigin*bt+m.yOrigin*Te),m.y-=m.yOrigin-(m.xOrigin*Gt+m.yOrigin*xe))}Math.abs(m.skewX)>90&&Math.abs(m.skewX)<270&&(I?(m.scaleX*=-1,m.skewX+=m.rotation<=0?180:-180,m.rotation+=m.rotation<=0?180:-180):(m.scaleY*=-1,m.skewX+=m.skewX<=0?180:-180)),m.zOrigin=q;for(d in m)m[d]<B&&m[d]>-B&&(m[d]=0)}return l&&(i._gsTransform=m,m.svg&&(ae&&i.style[Lt]?J.delayedCall(.001,function(){ye(i.style,Lt)}):!ae&&i.getAttribute("transform")&&J.delayedCall(.001,function(){i.removeAttribute("transform")}))),m},ei=function(i){var o,l,a=this.data,s=-a.rotation*yt,d=s+a.skewX*yt,h=1e5,y=(Math.cos(s)*a.scaleX*h|0)/h,k=(Math.sin(s)*a.scaleX*h|0)/h,x=(Math.sin(d)*-a.scaleY*h|0)/h,m=(Math.cos(d)*a.scaleY*h|0)/h,I=this.t.style,B=this.t.currentStyle;if(B){l=k,k=-x,x=-l,o=B.filter,I.filter="";var z,q,X=this.t.offsetWidth,lt=this.t.offsetHeight,ht=B.position!=="absolute",xt="progid:DXImageTransform.Microsoft.Matrix(M11="+y+", M12="+k+", M21="+x+", M22="+m,ct=a.x+X*a.xPercent/100,rt=a.y+lt*a.yPercent/100;if(a.ox!=null&&(z=(a.oxp?X*a.ox*.01:a.ox)-X/2,q=(a.oyp?lt*a.oy*.01:a.oy)-lt/2,ct+=z-(z*y+q*k),rt+=q-(z*x+q*m)),ht?(z=X/2,q=lt/2,xt+=", Dx="+(z-(z*y+q*k)+ct)+", Dy="+(q-(z*x+q*m)+rt)+")"):xt+=", sizingMethod='auto expand')",o.indexOf("DXImageTransform.Microsoft.Matrix(")!==-1?I.filter=o.replace(K,xt):I.filter=xt+" "+o,(i===0||i===1)&&y===1&&k===0&&x===0&&m===1&&(ht&&xt.indexOf("Dx=0, Dy=0")===-1||T.test(o)&&parseFloat(RegExp.$1)!==100||o.indexOf(o.indexOf("Alpha"))===-1&&I.removeAttribute("filter")),!ht){var _t,V,Tt,it=8>v?1:-1;for(z=a.ieOffsetX||0,q=a.ieOffsetY||0,a.ieOffsetX=Math.round((X-((0>y?-y:y)*X+(0>k?-k:k)*lt))/2+ct),a.ieOffsetY=Math.round((lt-((0>m?-m:m)*lt+(0>x?-x:x)*X))/2+rt),Xt=0;4>Xt;Xt++)V=u[Xt],_t=B[V],l=_t.indexOf("px")!==-1?parseFloat(_t):qt(this.t,V,parseFloat(_t),_t.replace(p,""))||0,Tt=l!==a[V]?2>Xt?-a.ieOffsetX:-a.ieOffsetY:2>Xt?z-a.ieOffsetX:q-a.ieOffsetY,I[V]=(a[V]=Math.round(l-Tt*(Xt===0||Xt===2?1:it)))+"px"}}},ii=zt.set3DTransformRatio=zt.setTransformRatio=function(i){var o,l,a,s,d,h,y,k,x,m,I,B,z,q,X,lt,ht,xt,ct,rt,_t,V,Tt,it=this.data,H=this.t.style,ot=it.rotation,Jt=it.rotationX,ce=it.rotationY,Et=it.scaleX,At=it.scaleY,Ft=it.scaleZ,Nt=it.x,Bt=it.y,Ut=it.z,Yt=it.svg,Rt=it.perspective,ve=it.force3D,bt=it.skewY,Gt=it.skewX;if(bt&&(Gt+=bt,ot+=bt),((i===1||i===0)&&ve==="auto"&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!ve)&&!Ut&&!Rt&&!ce&&!Jt&&Ft===1||ae&&Yt||!Qt)return void(ot||Gt||Yt?(ot*=yt,V=Gt*yt,Tt=1e5,l=Math.cos(ot)*Et,d=Math.sin(ot)*Et,a=Math.sin(ot-V)*-At,h=Math.cos(ot-V)*At,V&&it.skewType==="simple"&&(o=Math.tan(V-bt*yt),o=Math.sqrt(1+o*o),a*=o,h*=o,bt&&(o=Math.tan(bt*yt),o=Math.sqrt(1+o*o),l*=o,d*=o)),Yt&&(Nt+=it.xOrigin-(it.xOrigin*l+it.yOrigin*a)+it.xOffset,Bt+=it.yOrigin-(it.xOrigin*d+it.yOrigin*h)+it.yOffset,ae&&(it.xPercent||it.yPercent)&&(X=this.t.getBBox(),Nt+=.01*it.xPercent*X.width,Bt+=.01*it.yPercent*X.height),X=1e-6,X>Nt&&Nt>-X&&(Nt=0),X>Bt&&Bt>-X&&(Bt=0)),ct=(l*Tt|0)/Tt+","+(d*Tt|0)/Tt+","+(a*Tt|0)/Tt+","+(h*Tt|0)/Tt+","+Nt+","+Bt+")",Yt&&ae?this.t.setAttribute("transform","matrix("+ct):H[Lt]=(it.xPercent||it.yPercent?"translate("+it.xPercent+"%,"+it.yPercent+"%) matrix(":"matrix(")+ct):H[Lt]=(it.xPercent||it.yPercent?"translate("+it.xPercent+"%,"+it.yPercent+"%) matrix(":"matrix(")+Et+",0,0,"+At+","+Nt+","+Bt+")");if(st&&(X=1e-4,X>Et&&Et>-X&&(Et=Ft=2e-5),X>At&&At>-X&&(At=Ft=2e-5),!Rt||it.z||it.rotationX||it.rotationY||(Rt=0)),ot||Gt)ot*=yt,lt=l=Math.cos(ot),ht=d=Math.sin(ot),Gt&&(ot-=Gt*yt,lt=Math.cos(ot),ht=Math.sin(ot),it.skewType==="simple"&&(o=Math.tan((Gt-bt)*yt),o=Math.sqrt(1+o*o),lt*=o,ht*=o,it.skewY&&(o=Math.tan(bt*yt),o=Math.sqrt(1+o*o),l*=o,d*=o))),a=-ht,h=lt;else{if(!(ce||Jt||Ft!==1||Rt||Yt))return void(H[Lt]=(it.xPercent||it.yPercent?"translate("+it.xPercent+"%,"+it.yPercent+"%) translate3d(":"translate3d(")+Nt+"px,"+Bt+"px,"+Ut+"px)"+(Et!==1||At!==1?" scale("+Et+","+At+")":""));l=h=1,a=d=0}m=1,s=y=k=x=I=B=0,z=Rt?-1/Rt:0,q=it.zOrigin,X=1e-6,rt=",",_t="0",ot=ce*yt,ot&&(lt=Math.cos(ot),ht=Math.sin(ot),k=-ht,I=z*-ht,s=l*ht,y=d*ht,m=lt,z*=lt,l*=lt,d*=lt),ot=Jt*yt,ot&&(lt=Math.cos(ot),ht=Math.sin(ot),o=a*lt+s*ht,xt=h*lt+y*ht,x=m*ht,B=z*ht,s=a*-ht+s*lt,y=h*-ht+y*lt,m*=lt,z*=lt,a=o,h=xt),Ft!==1&&(s*=Ft,y*=Ft,m*=Ft,z*=Ft),At!==1&&(a*=At,h*=At,x*=At,B*=At),Et!==1&&(l*=Et,d*=Et,k*=Et,I*=Et),(q||Yt)&&(q&&(Nt+=s*-q,Bt+=y*-q,Ut+=m*-q+q),Yt&&(Nt+=it.xOrigin-(it.xOrigin*l+it.yOrigin*a)+it.xOffset,Bt+=it.yOrigin-(it.xOrigin*d+it.yOrigin*h)+it.yOffset),X>Nt&&Nt>-X&&(Nt=_t),X>Bt&&Bt>-X&&(Bt=_t),X>Ut&&Ut>-X&&(Ut=0)),ct=it.xPercent||it.yPercent?"translate("+it.xPercent+"%,"+it.yPercent+"%) matrix3d(":"matrix3d(",ct+=(X>l&&l>-X?_t:l)+rt+(X>d&&d>-X?_t:d)+rt+(X>k&&k>-X?_t:k),ct+=rt+(X>I&&I>-X?_t:I)+rt+(X>a&&a>-X?_t:a)+rt+(X>h&&h>-X?_t:h),Jt||ce||Ft!==1?(ct+=rt+(X>x&&x>-X?_t:x)+rt+(X>B&&B>-X?_t:B)+rt+(X>s&&s>-X?_t:s),ct+=rt+(X>y&&y>-X?_t:y)+rt+(X>m&&m>-X?_t:m)+rt+(X>z&&z>-X?_t:z)+rt):ct+=",0,0,0,0,1,0,",ct+=Nt+rt+Bt+rt+Ut+rt+(Rt?1+-Ut/Rt:1)+")",H[Lt]=ct};M=we.prototype,M.x=M.y=M.z=M.skewX=M.skewY=M.rotation=M.rotationX=M.rotationY=M.zOrigin=M.xPercent=M.yPercent=M.xOffset=M.yOffset=0,M.scaleX=M.scaleY=M.scaleZ=1,Dt("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(i,o,l,a,s,d,h){if(a._lastParsedTransform===h)return s;a._lastParsedTransform=h;var y,k=h.scale&&typeof h.scale=="function"?h.scale:0;typeof h[l]=="function"&&(y=h[l],h[l]=o),k&&(h.scale=k(e,i));var x,m,I,B,z,q,X,lt,ht,xt=i._gsTransform,ct=i.style,rt=1e-6,_t=Fe.length,V=h,Tt={},it="transformOrigin",H=ge(i,F,!0,V.parseTransform),ot=V.transform&&(typeof V.transform=="function"?V.transform(e,P):V.transform);if(H.skewType=V.skewType||H.skewType||$.defaultSkewType,a._transform=H,"rotationZ"in V&&(V.rotation=V.rotationZ),ot&&typeof ot=="string"&&Lt)m=Wt.style,m[Lt]=ot,m.display="block",m.position="absolute",ot.indexOf("%")!==-1&&(m.width=Pt(i,"width"),m.height=Pt(i,"height")),$t.body.appendChild(Wt),x=ge(Wt,null,!1),H.skewType==="simple"&&(x.scaleY*=Math.cos(x.skewX*yt)),H.svg&&(q=H.xOrigin,X=H.yOrigin,x.x-=H.xOffset,x.y-=H.yOffset,(V.transformOrigin||V.svgOrigin)&&(ot={},Oe(i,c(V.transformOrigin),ot,V.svgOrigin,V.smoothOrigin,!0),q=ot.xOrigin,X=ot.yOrigin,x.x-=ot.xOffset-H.xOffset,x.y-=ot.yOffset-H.yOffset),(q||X)&&(lt=Ae(Wt,!0),x.x-=q-(q*lt[0]+X*lt[2]),x.y-=X-(q*lt[1]+X*lt[3]))),$t.body.removeChild(Wt),x.perspective||(x.perspective=H.perspective),V.xPercent!=null&&(x.xPercent=C(V.xPercent,H.xPercent)),V.yPercent!=null&&(x.yPercent=C(V.yPercent,H.yPercent));else if(typeof V=="object"){if(x={scaleX:C(V.scaleX!=null?V.scaleX:V.scale,H.scaleX),scaleY:C(V.scaleY!=null?V.scaleY:V.scale,H.scaleY),scaleZ:C(V.scaleZ,H.scaleZ),x:C(V.x,H.x),y:C(V.y,H.y),z:C(V.z,H.z),xPercent:C(V.xPercent,H.xPercent),yPercent:C(V.yPercent,H.yPercent),perspective:C(V.transformPerspective,H.perspective)},z=V.directionalRotation,z!=null)if(typeof z=="object")for(m in z)V[m]=z[m];else V.rotation=z;typeof V.x=="string"&&V.x.indexOf("%")!==-1&&(x.x=0,x.xPercent=C(V.x,H.xPercent)),typeof V.y=="string"&&V.y.indexOf("%")!==-1&&(x.y=0,x.yPercent=C(V.y,H.yPercent)),x.rotation=j("rotation"in V?V.rotation:"shortRotation"in V?V.shortRotation+"_short":H.rotation,H.rotation,"rotation",Tt),Qt&&(x.rotationX=j("rotationX"in V?V.rotationX:"shortRotationX"in V?V.shortRotationX+"_short":H.rotationX||0,H.rotationX,"rotationX",Tt),x.rotationY=j("rotationY"in V?V.rotationY:"shortRotationY"in V?V.shortRotationY+"_short":H.rotationY||0,H.rotationY,"rotationY",Tt)),x.skewX=j(V.skewX,H.skewX),x.skewY=j(V.skewY,H.skewY)}for(Qt&&V.force3D!=null&&(H.force3D=V.force3D,B=!0),I=H.force3D||H.z||H.rotationX||H.rotationY||x.z||x.rotationX||x.rotationY||x.perspective,I||V.scale==null||(x.scaleZ=1);--_t>-1;)ht=Fe[_t],ot=x[ht]-H[ht],(ot>rt||-rt>ot||V[ht]!=null||te[ht]!=null)&&(B=!0,s=new Ot(H,ht,H[ht],ot,s),ht in Tt&&(s.e=Tt[ht]),s.xs0=0,s.plugin=d,a._overwriteProps.push(s.n));return ot=V.transformOrigin,H.svg&&(ot||V.svgOrigin)&&(q=H.xOffset,X=H.yOffset,Oe(i,c(ot),x,V.svgOrigin,V.smoothOrigin),s=_e(H,"xOrigin",(xt?H:x).xOrigin,x.xOrigin,s,it),s=_e(H,"yOrigin",(xt?H:x).yOrigin,x.yOrigin,s,it),(q!==H.xOffset||X!==H.yOffset)&&(s=_e(H,"xOffset",xt?q:H.xOffset,H.xOffset,s,it),s=_e(H,"yOffset",xt?X:H.yOffset,H.yOffset,s,it)),ot="0px 0px"),(ot||Qt&&I&&H.zOrigin)&&(Lt?(B=!0,ht=de,ot=(ot||Pt(i,ht,F,!1,"50% 50%"))+"",s=new Ot(ct,ht,0,0,s,-1,it),s.b=ct[ht],s.plugin=d,Qt?(m=H.zOrigin,ot=ot.split(" "),H.zOrigin=(ot.length>2&&(m===0||ot[2]!=="0px")?parseFloat(ot[2]):m)||0,s.xs0=s.e=ot[0]+" "+(ot[1]||"50%")+" 0px",s=new Ot(H,"zOrigin",0,0,s,-1,s.n),s.b=m,s.xs0=s.e=H.zOrigin):s.xs0=s.e=ot):c(ot+"",H)),B&&(a._transformType=H.svg&&ae||!I&&this._transformType!==3?2:3),y&&(h[l]=y),k&&(h.scale=k),s},prefix:!0}),Dt("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),Dt("borderRadius",{defaultValue:"0px",parser:function(i,o,l,a,s,d){o=this.format(o);var h,y,k,x,m,I,B,z,q,X,lt,ht,xt,ct,rt,_t,V=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],Tt=i.style;for(q=parseFloat(i.offsetWidth),X=parseFloat(i.offsetHeight),h=o.split(" "),y=0;y<V.length;y++)this.p.indexOf("border")&&(V[y]=ne(V[y])),m=x=Pt(i,V[y],F,!1,"0px"),m.indexOf(" ")!==-1&&(x=m.split(" "),m=x[0],x=x[1]),I=k=h[y],B=parseFloat(m),ht=m.substr((B+"").length),xt=I.charAt(1)==="=",xt?(z=parseInt(I.charAt(0)+"1",10),I=I.substr(2),z*=parseFloat(I),lt=I.substr((z+"").length-(0>z?1:0))||""):(z=parseFloat(I),lt=I.substr((z+"").length)),lt===""&&(lt=nt[l]||ht),lt!==ht&&(ct=qt(i,"borderLeft",B,ht),rt=qt(i,"borderTop",B,ht),lt==="%"?(m=ct/q*100+"%",x=rt/X*100+"%"):lt==="em"?(_t=qt(i,"borderLeft",1,"em"),m=ct/_t+"em",x=rt/_t+"em"):(m=ct+"px",x=rt+"px"),xt&&(I=parseFloat(m)+z+lt,k=parseFloat(x)+z+lt)),s=re(Tt,V[y],m+" "+x,I+" "+k,!1,"0px",s);return s},prefix:!0,formatter:kt("0px 0px 0px 0px",!1,!0)}),Dt("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(i,o,l,a,s,d){return re(i.style,l,this.format(Pt(i,l,F,!1,"0px 0px")),this.format(o),!1,"0px",s)},prefix:!0,formatter:kt("0px 0px",!1,!0)}),Dt("backgroundPosition",{defaultValue:"0 0",parser:function(i,o,l,a,s,d){var h,y,k,x,m,I,B="background-position",z=F||It(i,null),q=this.format((z?v?z.getPropertyValue(B+"-x")+" "+z.getPropertyValue(B+"-y"):z.getPropertyValue(B):i.currentStyle.backgroundPositionX+" "+i.currentStyle.backgroundPositionY)||"0 0"),X=this.format(o);if(q.indexOf("%")!==-1!=(X.indexOf("%")!==-1)&&X.split(",").length<2&&(I=Pt(i,"backgroundImage").replace(tt,""),I&&I!=="none")){for(h=q.split(" "),y=X.split(" "),he.setAttribute("src",I),k=2;--k>-1;)q=h[k],x=q.indexOf("%")!==-1,x!==(y[k].indexOf("%")!==-1)&&(m=k===0?i.offsetWidth-he.width:i.offsetHeight-he.height,h[k]=x?parseFloat(q)/100*m+"px":parseFloat(q)/m*100+"%");q=h.join(" ")}return this.parseComplex(i.style,q,X,s,d)},formatter:c}),Dt("backgroundSize",{defaultValue:"0 0",formatter:function(i){return i+="",i.substr(0,2)==="co"?i:c(i.indexOf(" ")===-1?i+" "+i:i)}}),Dt("perspective",{defaultValue:"0px",prefix:!0}),Dt("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),Dt("transformStyle",{prefix:!0}),Dt("backfaceVisibility",{prefix:!0}),Dt("userSelect",{prefix:!0}),Dt("margin",{parser:St("marginTop,marginRight,marginBottom,marginLeft")}),Dt("padding",{parser:St("paddingTop,paddingRight,paddingBottom,paddingLeft")}),Dt("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(i,o,l,a,s,d){var h,y,k;return 9>v?(y=i.currentStyle,k=8>v?" ":",",h="rect("+y.clipTop+k+y.clipRight+k+y.clipBottom+k+y.clipLeft+")",o=this.format(o).split(",").join(k)):(h=this.format(Pt(i,this.p,F,!1,this.dflt)),o=this.format(o)),this.parseComplex(i.style,h,o,s,d)}}),Dt("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),Dt("autoRound,strictUnits",{parser:function(i,o,l,a,s){return s}}),Dt("border",{defaultValue:"0px solid #000",parser:function(i,o,l,a,s,d){var h=Pt(i,"borderTopWidth",F,!1,"0px"),y=this.format(o).split(" "),k=y[0].replace(p,"");return k!=="px"&&(h=parseFloat(h)/qt(i,"borderTopWidth",1,k)+k),this.parseComplex(i.style,this.format(h+" "+Pt(i,"borderTopStyle",F,!1,"solid")+" "+Pt(i,"borderTopColor",F,!1,"#000")),y.join(" "),s,d)},color:!0,formatter:function(i){var o=i.split(" ");return o[0]+" "+(o[1]||"solid")+" "+(i.match(pt)||["#000"])[0]}}),Dt("borderWidth",{parser:St("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),Dt("float,cssFloat,styleFloat",{parser:function(i,o,l,a,s,d){var h=i.style,y="cssFloat"in h?"cssFloat":"styleFloat";return new Ot(h,y,0,0,s,-1,l,!1,0,h[y],o)}});var si=function(i){var o,l=this.t,a=l.filter||Pt(this.data,"filter")||"",s=this.s+this.c*i|0;s===100&&(a.indexOf("atrix(")===-1&&a.indexOf("radient(")===-1&&a.indexOf("oader(")===-1?(l.removeAttribute("filter"),o=!Pt(this.data,"filter")):(l.filter=a.replace(D,""),o=!0)),o||(this.xn1&&(l.filter=a=a||"alpha(opacity="+s+")"),a.indexOf("pacity")===-1?s===0&&this.xn1||(l.filter=a+" alpha(opacity="+s+")"):l.filter=a.replace(T,"opacity="+s))};Dt("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(i,o,l,a,s,d){var h=parseFloat(Pt(i,"opacity",F,!1,"1")),y=i.style,k=l==="autoAlpha";return typeof o=="string"&&o.charAt(1)==="="&&(o=(o.charAt(0)==="-"?-1:1)*parseFloat(o.substr(2))+h),k&&h===1&&Pt(i,"visibility",F)==="hidden"&&o!==0&&(h=0),se?s=new Ot(y,"opacity",h,o-h,s):(s=new Ot(y,"opacity",100*h,100*(o-h),s),s.xn1=k?1:0,y.zoom=1,s.type=2,s.b="alpha(opacity="+s.s+")",s.e="alpha(opacity="+(s.s+s.c)+")",s.data=i,s.plugin=d,s.setRatio=si),k&&(s=new Ot(y,"visibility",0,0,s,-1,null,!1,0,h!==0?"inherit":"hidden",o===0?"hidden":"inherit"),s.xs0="inherit",a._overwriteProps.push(s.n),a._overwriteProps.push(l)),s}});var ye=function(i,o){o&&(i.removeProperty?((o.substr(0,2)==="ms"||o.substr(0,6)==="webkit")&&(o="-"+o),i.removeProperty(o.replace(Z,"-$1").toLowerCase())):i.removeAttribute(o))},ri=function(i){if(this.t._gsClassPT=this,i===1||i===0){this.t.setAttribute("class",i===0?this.b:this.e);for(var o=this.data,l=this.t.style;o;)o.v?l[o.p]=o.v:ye(l,o.p),o=o._next;i===1&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};Dt("className",{parser:function(i,o,l,a,s,d,h){var y,k,x,m,I,B=i.getAttribute("class")||"",z=i.style.cssText;if(s=a._classNamePT=new Ot(i,l,0,0,s,2),s.setRatio=ri,s.pr=-11,Q=!0,s.b=B,k=oe(i,F),x=i._gsClassPT){for(m={},I=x.data;I;)m[I.p]=1,I=I._next;x.setRatio(1)}return i._gsClassPT=s,s.e=o.charAt(1)!=="="?o:B.replace(new RegExp("(?:\\s|^)"+o.substr(2)+"(?![\\w-])"),"")+(o.charAt(0)==="+"?" "+o.substr(2):""),i.setAttribute("class",s.e),y=Zt(i,k,oe(i),h,m),i.setAttribute("class",B),s.data=y.firstMPT,i.style.cssText=z,s=s.xfirst=a.parse(i,y.difs,s,d)}});var ni=function(i){if((i===1||i===0)&&this.data._totalTime===this.data._totalDuration&&this.data.data!=="isFromStart"){var o,l,a,s,d,h=this.t.style,y=O.transform.parse;if(this.e==="all")h.cssText="",s=!0;else for(o=this.e.split(" ").join("").split(","),a=o.length;--a>-1;)l=o[a],O[l]&&(O[l].parse===y?s=!0:l=l==="transformOrigin"?de:O[l].p),ye(h,l);s&&(ye(h,Lt),d=this.t._gsTransform,d&&(d.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(Dt("clearProps",{parser:function(i,o,l,a,s){return s=new Ot(i,l,0,0,s,2),s.setRatio=ni,s.e=o,s.pr=-10,s.data=a._tween,Q=!0,s}}),M="bezier,throwProps,physicsProps,physics2D".split(","),Xt=M.length;Xt--;)Qe(M[Xt]);M=$.prototype,M._firstPT=M._lastParsedTransform=M._transform=null,M._onInitTween=function(i,o,l,a){if(!i.nodeType)return!1;this._target=P=i,this._tween=l,this._vars=o,e=a,b=o.autoRound,Q=!1,nt=o.suffixMap||$.suffixMap,F=It(i,""),Y=this._overwriteProps;var s,d,h,y,k,x,m,I,B,z=i.style;if(E&&z.zIndex===""&&(s=Pt(i,"zIndex",F),(s==="auto"||s==="")&&this._addLazySet(z,"zIndex",0)),typeof o=="string"&&(y=z.cssText,s=oe(i,F),z.cssText=y+";"+o,s=Zt(i,s,oe(i)).difs,!se&&S.test(o)&&(s.opacity=parseFloat(RegExp.$1)),o=s,z.cssText=y),o.className?this._firstPT=d=O.className.parse(i,o.className,"className",this,null,null,o):this._firstPT=d=this.parse(i,o,null),this._transformType){for(B=this._transformType===3,Lt?G&&(E=!0,z.zIndex===""&&(m=Pt(i,"zIndex",F),(m==="auto"||m==="")&&this._addLazySet(z,"zIndex",0)),L&&this._addLazySet(z,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(B?"visible":"hidden"))):z.zoom=1,h=d;h&&h._next;)h=h._next;I=new Ot(i,"transform",0,0,null,2),this._linkCSSP(I,null,h),I.setRatio=Lt?ii:ei,I.data=this._transform||ge(i,F,!0),I.tween=l,I.pr=-1,Y.pop()}if(Q){for(;d;){for(x=d._next,h=y;h&&h.pr>d.pr;)h=h._next;(d._prev=h?h._prev:k)?d._prev._next=d:y=d,(d._next=h)?h._prev=d:k=d,d=x}this._firstPT=y}return!0},M.parse=function(i,o,l,a){var s,d,h,y,k,x,m,I,B,z,q=i.style;for(s in o){if(x=o[s],typeof x=="function"&&(x=x(e,P)),d=O[s])l=d.parse(i,x,s,this,l,a,o);else{if(s.substr(0,2)==="--"){this._tween._propLookup[s]=this._addTween.call(this._tween,i.style,"setProperty",It(i).getPropertyValue(s)+"",x+"",s,!1,s);continue}k=Pt(i,s,F)+"",B=typeof x=="string",s==="color"||s==="fill"||s==="stroke"||s.indexOf("Color")!==-1||B&&R.test(x)?(B||(x=ut(x),x=(x.length>3?"rgba(":"rgb(")+x.join(",")+")"),l=re(q,s,k,x,!0,"transparent",l,0,a)):B&&Vt.test(x)?l=re(q,s,k,x,!0,null,l,0,a):(h=parseFloat(k),m=h||h===0?k.substr((h+"").length):"",(k===""||k==="auto")&&(s==="width"||s==="height"?(h=f(i,s,F),m="px"):s==="left"||s==="top"?(h=fe(i,s,F),m="px"):(h=s!=="opacity"?0:1,m="")),z=B&&x.charAt(1)==="=",z?(y=parseInt(x.charAt(0)+"1",10),x=x.substr(2),y*=parseFloat(x),I=x.replace(p,"")):(y=parseFloat(x),I=B?x.replace(p,""):""),I===""&&(I=s in nt?nt[s]:m),x=y||y===0?(z?y+h:y)+I:o[s],m!==I&&(I!==""||s==="lineHeight")&&(y||y===0)&&h&&(h=qt(i,s,h,m),I==="%"?(h/=qt(i,s,100,"%")/100,o.strictUnits!==!0&&(k=h+"%")):I==="em"||I==="rem"||I==="vw"||I==="vh"?h/=qt(i,s,1,I):I!=="px"&&(y=qt(i,s,y,I),I="px"),z&&(y||y===0)&&(x=y+h+I)),z&&(y+=h),!h&&h!==0||!y&&y!==0?q[s]!==void 0&&(x||x+""!="NaN"&&x!=null)?(l=new Ot(q,s,y||h||0,0,l,-1,s,!1,0,k,x),l.xs0=x!=="none"||s!=="display"&&s.indexOf("Style")===-1?x:k):me("invalid "+s+" tween value: "+o[s]):(l=new Ot(q,s,h,y-h,l,0,s,b!==!1&&(I==="px"||s==="zIndex"),0,k,x),l.xs0=I))}a&&l&&!l.plugin&&(l.plugin=a)}return l},M.setRatio=function(i){var o,l,a,s=this._firstPT,d=1e-6;if(i!==1||this._tween._time!==this._tween._duration&&this._tween._time!==0)if(i||this._tween._time!==this._tween._duration&&this._tween._time!==0||this._tween._rawPrevTime===-1e-6)for(;s;){if(o=s.c*i+s.s,s.r?o=s.r(o):d>o&&o>-d&&(o=0),s.type)if(s.type===1)if(a=s.l,a===2)s.t[s.p]=s.xs0+o+s.xs1+s.xn1+s.xs2;else if(a===3)s.t[s.p]=s.xs0+o+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3;else if(a===4)s.t[s.p]=s.xs0+o+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3+s.xn3+s.xs4;else if(a===5)s.t[s.p]=s.xs0+o+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3+s.xn3+s.xs4+s.xn4+s.xs5;else{for(l=s.xs0+o+s.xs1,a=1;a<s.l;a++)l+=s["xn"+a]+s["xs"+(a+1)];s.t[s.p]=l}else s.type===-1?s.t[s.p]=s.xs0:s.setRatio&&s.setRatio(i);else s.t[s.p]=o+s.xs0;s=s._next}else for(;s;)s.type!==2?s.t[s.p]=s.b:s.setRatio(i),s=s._next;else for(;s;){if(s.type!==2)if(s.r&&s.type!==-1)if(o=s.r(s.s+s.c),s.type){if(s.type===1){for(a=s.l,l=s.xs0+o+s.xs1,a=1;a<s.l;a++)l+=s["xn"+a]+s["xs"+(a+1)];s.t[s.p]=l}}else s.t[s.p]=o+s.xs0;else s.t[s.p]=s.e;else s.setRatio(i);s=s._next}},M._enableTransforms=function(i){this._transform=this._transform||ge(this._target,F,!0),this._transformType=this._transform.svg&&ae||!i&&this._transformType!==3?2:3};var oi=function(i){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};M._addLazySet=function(i,o,l){var a=this._firstPT=new Ot(i,o,0,0,this._firstPT,2);a.e=l,a.setRatio=oi,a.data=this},M._linkCSSP=function(i,o,l,a){return i&&(o&&(o._prev=i),i._next&&(i._next._prev=i._prev),i._prev?i._prev._next=i._next:this._firstPT===i&&(this._firstPT=i._next,a=!0),l?l._next=i:a||this._firstPT!==null||(this._firstPT=i),i._next=o,i._prev=l),i},M._mod=function(i){for(var o=this._firstPT;o;)typeof i[o.p]=="function"&&(o.r=i[o.p]),o=o._next},M._kill=function(i){var o,l,a,s=i;if(i.autoAlpha||i.alpha){s={};for(l in i)s[l]=i[l];s.opacity=1,s.autoAlpha&&(s.visibility=1)}for(i.className&&(o=this._classNamePT)&&(a=o.xfirst,a&&a._prev?this._linkCSSP(a._prev,o._next,a._prev._prev):a===this._firstPT&&(this._firstPT=o._next),o._next&&this._linkCSSP(o._next,o._next._next,a._prev),this._classNamePT=null),o=this._firstPT;o;)o.plugin&&o.plugin!==l&&o.plugin._kill&&(o.plugin._kill(i),l=o.plugin),o=o._next;return N.prototype._kill.call(this,s)};var Pe=function(i,o,l){var a,s,d,h;if(i.slice)for(s=i.length;--s>-1;)Pe(i[s],o,l);else for(a=i.childNodes,s=a.length;--s>-1;)d=a[s],h=d.type,d.style&&(o.push(oe(d)),l&&l.push(d)),h!==1&&h!==9&&h!==11||!d.childNodes.length||Pe(d,o,l)};return $.cascadeTo=function(i,o,l){var a,s,d,h,y=J.to(i,o,l),k=[y],x=[],m=[],I=[],B=J._internals.reservedProps;for(i=y._targets||y.target,Pe(i,x,I),y.render(o,!0,!0),Pe(i,m),y.render(0,!0,!0),y._enabled(!0),a=I.length;--a>-1;)if(s=Zt(I[a],x[a],m[a]),s.firstMPT){s=s.difs;for(d in l)B[d]&&(s[d]=l[d]);h={};for(d in s)h[d]=x[a][d];k.push(J.fromTo(I[a],o,h,s))}return k},N.activate([$]),$},!0),function(){var N=Mt._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(F,Y,$){return this._tween=$,!0}}),J=function(F){var Y=1>F?Math.pow(10,(F+"").length-2):1;return function($){return(Math.round($/F)*F*Y|0)/Y}},Q=function(F,Y){for(;F;)F.f||F.blob||(F.m=Y||Math.round),F=F._next},nt=N.prototype;nt._onInitAllProps=function(){var F,Y,$,mt,O=this._tween,M=O.vars.roundProps,b={},E=O._propLookup.roundProps;if(typeof M!="object"||M.push)for(typeof M=="string"&&(M=M.split(",")),$=M.length;--$>-1;)b[M[$]]=Math.round;else for(mt in M)b[mt]=J(M[mt]);for(mt in b)for(F=O._firstPT;F;)Y=F._next,F.pg?F.t._mod(b):F.n===mt&&(F.f===2&&F.t?Q(F.t._firstPT,b[mt]):(this._add(F.t,mt,F.s,F.c,b[mt]),Y&&(Y._prev=F._prev),F._prev?F._prev._next=Y:O._firstPT===F&&(O._firstPT=Y),F._next=F._prev=null,O._propLookup[mt]=E)),F=Y;return!1},nt._add=function(F,Y,$,mt,O){this._addTween(F,Y,$,$+mt,Y,O||Math.round),this._overwriteProps.push(Y)}}(),function(){Mt._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(N,J,Q,nt){var F,Y;if(typeof N.setAttribute!="function")return!1;for(F in J)Y=J[F],typeof Y=="function"&&(Y=Y(nt,N)),this._addTween(N,"setAttribute",N.getAttribute(F)+"",Y+"",F,!1,F),this._overwriteProps.push(F);return!0}})}(),Mt._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(N,J,Q,nt){typeof J!="object"&&(J={rotation:J}),this.finals={};var F,Y,$,mt,O,M,b=J.useRadians===!0?2*Math.PI:360,E=1e-6;for(F in J)F!=="useRadians"&&(mt=J[F],typeof mt=="function"&&(mt=mt(nt,N)),M=(mt+"").split("_"),Y=M[0],$=parseFloat(typeof N[F]!="function"?N[F]:N[F.indexOf("set")||typeof N["get"+F.substr(3)]!="function"?F:"get"+F.substr(3)]()),mt=this.finals[F]=typeof Y=="string"&&Y.charAt(1)==="="?$+parseInt(Y.charAt(0)+"1",10)*Number(Y.substr(2)):Number(Y)||0,O=mt-$,M.length&&(Y=M.join("_"),Y.indexOf("short")!==-1&&(O%=b,O!==O%(b/2)&&(O=0>O?O+b:O-b)),Y.indexOf("_cw")!==-1&&0>O?O=(O+9999999999*b)%b-(O/b|0)*b:Y.indexOf("ccw")!==-1&&O>0&&(O=(O-9999999999*b)%b-(O/b|0)*b)),(O>E||-E>O)&&(this._addTween(N,F,$,$+O,F),this._overwriteProps.push(F)));return!0},set:function(N){var J;if(N!==1)this._super.setRatio.call(this,N);else for(J=this._firstPT;J;)J.f?J.t[J.p](this.finals[J.p]):J.t[J.p]=this.finals[J.p],J=J._next}})._autoCSS=!0,Mt._gsDefine("easing.Back",["easing.Ease"],function(N){var J,Q,nt,F,Y=Mt.GreenSockGlobals||Mt,$=Y.com.greensock,mt=2*Math.PI,O=Math.PI/2,M=$._class,b=function(t,_){var n=M("easing."+t,function(){},!0),g=n.prototype=new N;return g.constructor=n,g.getRatio=_,n},E=N.register||function(){},G=function(t,_,n,g,p){var T=M("easing."+t,{easeOut:new _,easeIn:new n,easeInOut:new g},!0);return E(T,t),T},st=function(t,_,n){this.t=t,this.v=_,n&&(this.next=n,n.prev=this,this.c=n.v-_,this.gap=n.t-t)},L=function(t,_){var n=M("easing."+t,function(p){this._p1=p||p===0?p:1.70158,this._p2=1.525*this._p1},!0),g=n.prototype=new N;return g.constructor=n,g.getRatio=_,g.config=function(p){return new n(p)},n},v=G("Back",L("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),L("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),L("BackInOut",function(t){return(t*=2)<1?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),P=M("easing.SlowMo",function(t,_,n){_=_||_===0?_:.7,t==null?t=.7:t>1&&(t=1),this._p=t!==1?_:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=n===!0},!0),e=P.prototype=new N;return e.constructor=P,e.getRatio=function(t){var _=t+(.5-t)*this._p;return t<this._p1?this._calcEnd?1-(t=1-t/this._p1)*t:_-(t=1-t/this._p1)*t*t*t*_:t>this._p3?this._calcEnd?t===1?0:1-(t=(t-this._p3)/this._p1)*t:_+(t-_)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:_},P.ease=new P(.7,.7),e.config=P.config=function(t,_,n){return new P(t,_,n)},J=M("easing.SteppedEase",function(t,_){t=t||1,this._p1=1/t,this._p2=t+(_?0:1),this._p3=_?1:0},!0),e=J.prototype=new N,e.constructor=J,e.getRatio=function(t){return 0>t?t=0:t>=1&&(t=.999999999),((this._p2*t|0)+this._p3)*this._p1},e.config=J.config=function(t,_){return new J(t,_)},Q=M("easing.ExpoScaleEase",function(t,_,n){this._p1=Math.log(_/t),this._p2=_-t,this._p3=t,this._ease=n},!0),e=Q.prototype=new N,e.constructor=Q,e.getRatio=function(t){return this._ease&&(t=this._ease.getRatio(t)),(this._p3*Math.exp(this._p1*t)-this._p3)/this._p2},e.config=Q.config=function(t,_,n){return new Q(t,_,n)},nt=M("easing.RoughEase",function(t){t=t||{};for(var _,n,g,p,T,S,D=t.taper||"none",R=[],Z=0,U=0|(t.points||20),tt=U,et=t.randomize!==!1,dt=t.clamp===!0,at=t.template instanceof N?t.template:null,K=typeof t.strength=="number"?.4*t.strength:.4;--tt>-1;)_=et?Math.random():1/U*tt,n=at?at.getRatio(_):_,D==="none"?g=K:D==="out"?(p=1-_,g=p*p*K):D==="in"?g=_*_*K:.5>_?(p=2*_,g=p*p*.5*K):(p=2*(1-_),g=p*p*.5*K),et?n+=Math.random()*g-.5*g:tt%2?n+=.5*g:n-=.5*g,dt&&(n>1?n=1:0>n&&(n=0)),R[Z++]={x:_,y:n};for(R.sort(function(gt,Vt){return gt.x-Vt.x}),S=new st(1,1,null),tt=U;--tt>-1;)T=R[tt],S=new st(T.x,T.y,S);this._prev=new st(0,0,S.t!==0?S:S.next)},!0),e=nt.prototype=new N,e.constructor=nt,e.getRatio=function(t){var _=this._prev;if(t>_.t){for(;_.next&&t>=_.t;)_=_.next;_=_.prev}else for(;_.prev&&t<=_.t;)_=_.prev;return this._prev=_,_.v+(t-_.t)/_.gap*_.c},e.config=function(t){return new nt(t)},nt.ease=new nt,G("Bounce",b("BounceOut",function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),b("BounceIn",function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:2/2.75>t?1-(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),b("BounceInOut",function(t){var _=.5>t;return t=_?1-2*t:2*t-1,t=1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,_?.5*(1-t):.5*t+.5})),G("Circ",b("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),b("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),b("CircInOut",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),F=function(t,_,n){var g=M("easing."+t,function(T,S){this._p1=T>=1?T:1,this._p2=(S||n)/(1>T?T:1),this._p3=this._p2/mt*(Math.asin(1/this._p1)||0),this._p2=mt/this._p2},!0),p=g.prototype=new N;return p.constructor=g,p.getRatio=_,p.config=function(T,S){return new g(T,S)},g},G("Elastic",F("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*this._p2)+1},.3),F("ElasticIn",function(t){return-(this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2))},.3),F("ElasticInOut",function(t){return(t*=2)<1?-.5*(this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*this._p2)*.5+1},.45)),G("Expo",b("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),b("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),b("ExpoInOut",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),G("Sine",b("SineOut",function(t){return Math.sin(t*O)}),b("SineIn",function(t){return-Math.cos(t*O)+1}),b("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),M("easing.EaseLookup",{find:function(t){return N.map[t]}},!0),E(Y.SlowMo,"SlowMo","ease,"),E(nt,"RoughEase","ease,"),E(J,"SteppedEase","ease,"),v},!0)}),Mt._gsDefine&&Mt._gsQueue.pop()(),function(N,J){var Q={},nt=N.document,F=N.GreenSockGlobals=N.GreenSockGlobals||N,Y=F[J];if(Y)return typeof module<"u"&&module.exports&&(module.exports=Y),Y;var $,mt,O,M,b,E=function(r){var u,f=r.split("."),c=F;for(u=0;u<f.length;u++)c[f[u]]=c=c[f[u]]||{};return c},G=E("com.greensock"),st=1e-10,L=function(r){var u,f=[],c=r.length;for(u=0;u!==c;f.push(r[u++]));return f},v=function(){},P=function(){var r=Object.prototype.toString,u=r.call([]);return function(f){return f!=null&&(f instanceof Array||typeof f=="object"&&!!f.push&&r.call(f)===u)}}(),e={},t=function(r,u,f,c){this.sc=e[r]?e[r].sc:[],e[r]=this,this.gsClass=null,this.func=f;var w=[];this.check=function(C){for(var j,A,ft,ut,W=u.length,pt=W;--W>-1;)(j=e[u[W]]||new t(u[W],[])).gsClass?(w[W]=j.gsClass,pt--):C&&j.sc.push(this);if(pt===0&&f){if(A=("com.greensock."+r).split("."),ft=A.pop(),ut=E(A.join("."))[ft]=this.gsClass=f.apply(f,w),c)if(F[ft]=Q[ft]=ut,typeof module<"u"&&module.exports)if(r===J){module.exports=Q[J]=ut;for(W in Q)ut[W]=Q[W]}else Q[J]&&(Q[J][ft]=ut);else typeof define=="function"&&define.amd&&define((N.GreenSockAMDPath?N.GreenSockAMDPath+"/":"")+r.split(".").pop(),[],function(){return ut});for(W=0;W<this.sc.length;W++)this.sc[W].check()}},this.check(!0)},_=N._gsDefine=function(r,u,f,c){return new t(r,u,f,c)},n=G._class=function(r,u,f){return u=u||function(){},_(r,[],function(){return u},f),u};_.globals=F;var g=[0,0,1,1],p=n("easing.Ease",function(r,u,f,c){this._func=r,this._type=f||0,this._power=c||0,this._params=u?g.concat(u):g},!0),T=p.map={},S=p.register=function(r,u,f,c){for(var w,C,j,A,ft=u.split(","),ut=ft.length,W=(f||"easeIn,easeOut,easeInOut").split(",");--ut>-1;)for(C=ft[ut],w=c?n("easing."+C,null,!0):G.easing[C]||{},j=W.length;--j>-1;)A=W[j],T[C+"."+A]=T[A+C]=w[A]=r.getRatio?r:r[A]||new r};for(O=p.prototype,O._calcEnd=!1,O.getRatio=function(r){if(this._func)return this._params[0]=r,this._func.apply(null,this._params);var u=this._type,f=this._power,c=u===1?1-r:u===2?r:.5>r?2*r:2*(1-r);return f===1?c*=c:f===2?c*=c*c:f===3?c*=c*c*c:f===4&&(c*=c*c*c*c),u===1?1-c:u===2?c:.5>r?c/2:1-c/2},$=["Linear","Quad","Cubic","Quart","Quint,Strong"],mt=$.length;--mt>-1;)O=$[mt]+",Power"+mt,S(new p(null,null,1,mt),O,"easeOut",!0),S(new p(null,null,2,mt),O,"easeIn"+(mt===0?",easeNone":"")),S(new p(null,null,3,mt),O,"easeInOut");T.linear=G.easing.Linear.easeIn,T.swing=G.easing.Quad.easeInOut;var D=n("events.EventDispatcher",function(r){this._listeners={},this._eventTarget=r||this});O=D.prototype,O.addEventListener=function(r,u,f,c,w){w=w||0;var C,j,A=this._listeners[r],ft=0;for(this!==M||b||M.wake(),A==null&&(this._listeners[r]=A=[]),j=A.length;--j>-1;)C=A[j],C.c===u&&C.s===f?A.splice(j,1):ft===0&&C.pr<w&&(ft=j+1);A.splice(ft,0,{c:u,s:f,up:c,pr:w})},O.removeEventListener=function(r,u){var f,c=this._listeners[r];if(c){for(f=c.length;--f>-1;)if(c[f].c===u)return void c.splice(f,1)}},O.dispatchEvent=function(r){var u,f,c,w=this._listeners[r];if(w)for(u=w.length,u>1&&(w=w.slice(0)),f=this._eventTarget;--u>-1;)c=w[u],c&&(c.up?c.c.call(c.s||f,{type:r,target:f}):c.c.call(c.s||f))};var R=N.requestAnimationFrame,Z=N.cancelAnimationFrame,U=Date.now||function(){return new Date().getTime()},tt=U();for($=["ms","moz","webkit","o"],mt=$.length;--mt>-1&&!R;)R=N[$[mt]+"RequestAnimationFrame"],Z=N[$[mt]+"CancelAnimationFrame"]||N[$[mt]+"CancelRequestAnimationFrame"];n("Ticker",function(r,u){var f,c,w,C,j,A=this,ft=U(),ut=u!==!1&&R?"auto":!1,W=500,pt=33,kt="tick",St=function(vt){var Ot,_e,re=U()-tt;re>W&&(ft+=re-pt),tt+=re,A.time=(tt-ft)/1e3,Ot=A.time-j,(!f||Ot>0||vt===!0)&&(A.frame++,j+=Ot+(Ot>=C?.004:C-Ot),_e=!0),vt!==!0&&(w=c(St)),_e&&A.dispatchEvent(kt)};D.call(A),A.time=A.frame=0,A.tick=function(){St(!0)},A.lagSmoothing=function(vt,Ot){return arguments.length?(W=vt||1/st,void(pt=Math.min(Ot,W,0))):1/st>W},A.sleep=function(){w!=null&&(ut&&Z?Z(w):clearTimeout(w),c=v,w=null,A===M&&(b=!1))},A.wake=function(vt){w!==null?A.sleep():vt?ft+=-tt+(tt=U()):A.frame>10&&(tt=U()-W+5),c=f===0?v:ut&&R?R:function(Ot){return setTimeout(Ot,1e3*(j-A.time)+1|0)},A===M&&(b=!0),St(2)},A.fps=function(vt){return arguments.length?(f=vt,C=1/(f||60),j=this.time+C,void A.wake()):f},A.useRAF=function(vt){return arguments.length?(A.sleep(),ut=vt,void A.fps(f)):ut},A.fps(r),setTimeout(function(){ut==="auto"&&A.frame<5&&(nt||{}).visibilityState!=="hidden"&&A.useRAF(!1)},1500)}),O=G.Ticker.prototype=new G.events.EventDispatcher,O.constructor=G.Ticker;var et=n("core.Animation",function(r,u){if(this.vars=u=u||{},this._duration=this._totalDuration=r||0,this._delay=Number(u.delay)||0,this._timeScale=1,this._active=u.immediateRender===!0,this.data=u.data,this._reversed=u.reversed===!0,Ht){b||M.wake();var f=this.vars.useFrames?ie:Ht;f.add(this,f._time),this.vars.paused&&this.paused(!0)}});M=et.ticker=new G.Ticker,O=et.prototype,O._dirty=O._gc=O._initted=O._paused=!1,O._totalTime=O._time=0,O._rawPrevTime=-1,O._next=O._last=O._onUpdate=O._timeline=O.timeline=null,O._paused=!1;var dt=function(){b&&U()-tt>2e3&&((nt||{}).visibilityState!=="hidden"||!M.lagSmoothing())&&M.wake();var r=setTimeout(dt,2e3);r.unref&&r.unref()};dt(),O.play=function(r,u){return r!=null&&this.seek(r,u),this.reversed(!1).paused(!1)},O.pause=function(r,u){return r!=null&&this.seek(r,u),this.paused(!0)},O.resume=function(r,u){return r!=null&&this.seek(r,u),this.paused(!1)},O.seek=function(r,u){return this.totalTime(Number(r),u!==!1)},O.restart=function(r,u){return this.reversed(!1).paused(!1).totalTime(r?-this._delay:0,u!==!1,!0)},O.reverse=function(r,u){return r!=null&&this.seek(r||this.totalDuration(),u),this.reversed(!0).paused(!1)},O.render=function(r,u,f){},O.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},O.isActive=function(){var r,u=this._timeline,f=this._startTime;return!u||!this._gc&&!this._paused&&u.isActive()&&(r=u.rawTime(!0))>=f&&r<f+this.totalDuration()/this._timeScale-1e-7},O._enabled=function(r,u){return b||M.wake(),this._gc=!r,this._active=this.isActive(),u!==!0&&(r&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!r&&this.timeline&&this._timeline._remove(this,!0)),!1},O._kill=function(r,u){return this._enabled(!1,!1)},O.kill=function(r,u){return this._kill(r,u),this},O._uncache=function(r){for(var u=r?this:this.timeline;u;)u._dirty=!0,u=u.timeline;return this},O._swapSelfInParams=function(r){for(var u=r.length,f=r.concat();--u>-1;)r[u]==="{self}"&&(f[u]=this);return f},O._callback=function(r){var u=this.vars,f=u[r],c=u[r+"Params"],w=u[r+"Scope"]||u.callbackScope||this,C=c?c.length:0;switch(C){case 0:f.call(w);break;case 1:f.call(w,c[0]);break;case 2:f.call(w,c[0],c[1]);break;default:f.apply(w,c)}},O.eventCallback=function(r,u,f,c){if((r||"").substr(0,2)==="on"){var w=this.vars;if(arguments.length===1)return w[r];u==null?delete w[r]:(w[r]=u,w[r+"Params"]=P(f)&&f.join("").indexOf("{self}")!==-1?this._swapSelfInParams(f):f,w[r+"Scope"]=c),r==="onUpdate"&&(this._onUpdate=u)}return this},O.delay=function(r){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+r-this._delay),this._delay=r,this):this._delay},O.duration=function(r){return arguments.length?(this._duration=this._totalDuration=r,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&r!==0&&this.totalTime(this._totalTime*(r/this._duration),!0),this):(this._dirty=!1,this._duration)},O.totalDuration=function(r){return this._dirty=!1,arguments.length?this.duration(r):this._totalDuration},O.time=function(r,u){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(r>this._duration?this._duration:r,u)):this._time},O.totalTime=function(r,u,f){if(b||M.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>r&&!f&&(r+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var c=this._totalDuration,w=this._timeline;if(r>c&&!f&&(r=c),this._startTime=(this._paused?this._pauseTime:w._time)-(this._reversed?c-r:r)/this._timeScale,w._dirty||this._uncache(!1),w._timeline)for(;w._timeline;)w._timeline._time!==(w._startTime+w._totalTime)/w._timeScale&&w.totalTime(w._totalTime,!0),w=w._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==r||this._duration===0)&&(yt.length&&It(),this.render(r,u,!1),yt.length&&It())}return this},O.progress=O.totalProgress=function(r,u){var f=this.duration();return arguments.length?this.totalTime(f*r,u):f?this._time/f:this.ratio},O.startTime=function(r){return arguments.length?(r!==this._startTime&&(this._startTime=r,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,r-this._delay)),this):this._startTime},O.endTime=function(r){return this._startTime+(r!=0?this.totalDuration():this.duration())/this._timeScale},O.timeScale=function(r){if(!arguments.length)return this._timeScale;var u,f;for(r=r||st,this._timeline&&this._timeline.smoothChildTiming&&(u=this._pauseTime,f=u||u===0?u:this._timeline.totalTime(),this._startTime=f-(f-this._startTime)*this._timeScale/r),this._timeScale=r,f=this.timeline;f&&f.timeline;)f._dirty=!0,f.totalDuration(),f=f.timeline;return this},O.reversed=function(r){return arguments.length?(r!=this._reversed&&(this._reversed=r,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},O.paused=function(r){if(!arguments.length)return this._paused;var u,f,c=this._timeline;return r!=this._paused&&c&&(b||r||M.wake(),u=c.rawTime(),f=u-this._pauseTime,!r&&c.smoothChildTiming&&(this._startTime+=f,this._uncache(!1)),this._pauseTime=r?u:null,this._paused=r,this._active=this.isActive(),!r&&f!==0&&this._initted&&this.duration()&&(u=c.smoothChildTiming?this._totalTime:(u-this._startTime)/this._timeScale,this.render(u,u===this._totalTime,!0))),this._gc&&!r&&this._enabled(!0,!1),this};var at=n("core.SimpleTimeline",function(r){et.call(this,0,r),this.autoRemoveChildren=this.smoothChildTiming=!0});O=at.prototype=new et,O.constructor=at,O.kill()._gc=!1,O._first=O._last=O._recent=null,O._sortChildren=!1,O.add=O.insert=function(r,u,f,c){var w,C;if(r._startTime=Number(u||0)+r._delay,r._paused&&this!==r._timeline&&(r._pauseTime=this.rawTime()-(r._timeline.rawTime()-r._pauseTime)),r.timeline&&r.timeline._remove(r,!0),r.timeline=r._timeline=this,r._gc&&r._enabled(!0,!0),w=this._last,this._sortChildren)for(C=r._startTime;w&&w._startTime>C;)w=w._prev;return w?(r._next=w._next,w._next=r):(r._next=this._first,this._first=r),r._next?r._next._prev=r:this._last=r,r._prev=w,this._recent=r,this._timeline&&this._uncache(!0),this},O._remove=function(r,u){return r.timeline===this&&(u||r._enabled(!1,!0),r._prev?r._prev._next=r._next:this._first===r&&(this._first=r._next),r._next?r._next._prev=r._prev:this._last===r&&(this._last=r._prev),r._next=r._prev=r.timeline=null,r===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},O.render=function(r,u,f){var c,w=this._first;for(this._totalTime=this._time=this._rawPrevTime=r;w;)c=w._next,(w._active||r>=w._startTime&&!w._paused&&!w._gc)&&(w._reversed?w.render((w._dirty?w.totalDuration():w._totalDuration)-(r-w._startTime)*w._timeScale,u,f):w.render((r-w._startTime)*w._timeScale,u,f)),w=c},O.rawTime=function(){return b||M.wake(),this._totalTime};var K=n("TweenLite",function(r,u,f){if(et.call(this,u,f),this.render=K.prototype.render,r==null)throw"Cannot tween a null target.";this.target=r=typeof r!="string"?r:K.selector(r)||r;var c,w,C,j=r.jquery||r.length&&r!==N&&r[0]&&(r[0]===N||r[0].nodeType&&r[0].style&&!r.nodeType),A=this.vars.overwrite;if(this._overwrite=A=A==null?me[K.defaultOverwrite]:typeof A=="number"?A>>0:me[A],(j||r instanceof Array||r.push&&P(r))&&typeof r[0]!="number")for(this._targets=C=L(r),this._propLookup=[],this._siblings=[],c=0;c<C.length;c++)w=C[c],w?typeof w!="string"?w.length&&w!==N&&w[0]&&(w[0]===N||w[0].nodeType&&w[0].style&&!w.nodeType)?(C.splice(c--,1),this._targets=C=C.concat(L(w))):(this._siblings[c]=Pt(w,this,!1),A===1&&this._siblings[c].length>1&&fe(w,this,null,1,this._siblings[c])):(w=C[c--]=K.selector(w),typeof w=="string"&&C.splice(c+1,1)):C.splice(c--,1);else this._propLookup={},this._siblings=Pt(r,this,!1),A===1&&this._siblings.length>1&&fe(r,this,null,1,this._siblings);(this.vars.immediateRender||u===0&&this._delay===0&&this.vars.immediateRender!==!1)&&(this._time=-st,this.render(Math.min(0,-this._delay)))},!0),gt=function(r){return r&&r.length&&r!==N&&r[0]&&(r[0]===N||r[0].nodeType&&r[0].style&&!r.nodeType)},Vt=function(r,u){var f,c={};for(f in r)ue[f]||f in u&&f!=="transform"&&f!=="x"&&f!=="y"&&f!=="width"&&f!=="height"&&f!=="className"&&f!=="border"||!(!zt[f]||zt[f]&&zt[f]._autoCSS)||(c[f]=r[f],delete r[f]);r.css=c};O=K.prototype=new et,O.constructor=K,O.kill()._gc=!1,O.ratio=0,O._firstPT=O._targets=O._overwrittenProps=O._startAt=null,O._notifyPluginsOfEnabled=O._lazy=!1,K.version="2.0.2",K.defaultEase=O._ease=new p(null,null,1,1),K.defaultOverwrite="auto",K.ticker=M,K.autoSleep=120,K.lagSmoothing=function(r,u){M.lagSmoothing(r,u)},K.selector=N.$||N.jQuery||function(r){var u=N.$||N.jQuery;return u?(K.selector=u,u(r)):(nt||(nt=N.document),nt?nt.querySelectorAll?nt.querySelectorAll(r):nt.getElementById(r.charAt(0)==="#"?r.substr(1):r):r)};var yt=[],Ct={},te=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,ee=/[\+-]=-?[\.\d]/,$t=function(r){for(var u,f=this._firstPT,c=1e-6;f;)u=f.blob?r===1&&this.end!=null?this.end:r?this.join(""):this.start:f.c*r+f.s,f.m?u=f.m.call(this._tween,u,this._target||f.t,this._tween):c>u&&u>-c&&!f.blob&&(u=0),f.f?f.fp?f.t[f.p](f.fp,u):f.t[f.p](u):f.t[f.p]=u,f=f._next},le=function(r,u,f,c){var w,C,j,A,ft,ut,W,pt=[],kt=0,St="",vt=0;for(pt.start=r,pt.end=u,r=pt[0]=r+"",u=pt[1]=u+"",f&&(f(pt),r=pt[0],u=pt[1]),pt.length=0,w=r.match(te)||[],C=u.match(te)||[],c&&(c._next=null,c.blob=1,pt._firstPT=pt._applyPT=c),ft=C.length,A=0;ft>A;A++)W=C[A],ut=u.substr(kt,u.indexOf(W,kt)-kt),St+=ut||!A?ut:",",kt+=ut.length,vt?vt=(vt+1)%5:ut.substr(-5)==="rgba("&&(vt=1),W===w[A]||w.length<=A?St+=W:(St&&(pt.push(St),St=""),j=parseFloat(w[A]),pt.push(j),pt._firstPT={_next:pt._firstPT,t:pt,p:pt.length-1,s:j,c:(W.charAt(1)==="="?parseInt(W.charAt(0)+"1",10)*parseFloat(W.substr(2)):parseFloat(W)-j)||0,f:0,m:vt&&4>vt?Math.round:0}),kt+=W.length;return St+=u.substr(kt),St&&pt.push(St),pt.setRatio=$t,ee.test(u)&&(pt.end=null),pt},Wt=function(r,u,f,c,w,C,j,A,ft){typeof c=="function"&&(c=c(ft||0,r));var ut,W=typeof r[u],pt=W!=="function"?"":u.indexOf("set")||typeof r["get"+u.substr(3)]!="function"?u:"get"+u.substr(3),kt=f!=="get"?f:pt?j?r[pt](j):r[pt]():r[u],St=typeof c=="string"&&c.charAt(1)==="=",vt={t:r,p:u,s:kt,f:W==="function",pg:0,n:w||u,m:C?typeof C=="function"?C:Math.round:0,pr:0,c:St?parseInt(c.charAt(0)+"1",10)*parseFloat(c.substr(2)):parseFloat(c)-kt||0};return(typeof kt!="number"||typeof c!="number"&&!St)&&(j||isNaN(kt)||!St&&isNaN(c)||typeof kt=="boolean"||typeof c=="boolean"?(vt.fp=j,ut=le(kt,St?parseFloat(vt.s)+vt.c+(vt.s+"").replace(/[0-9\-\.]/g,""):c,A||K.defaultStringFilter,vt),vt={t:ut,p:"setRatio",s:0,c:1,f:2,pg:0,n:w||u,pr:0,m:0}):(vt.s=parseFloat(kt),St||(vt.c=parseFloat(c)-vt.s||0))),vt.c?((vt._next=this._firstPT)&&(vt._next._prev=vt),this._firstPT=vt,vt):void 0},he=K._internals={isArray:P,isSelector:gt,lazyTweens:yt,blobDif:le},zt=K._plugins={},jt=he.tweenLookup={},se=0,ue=he.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},me={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},ie=et._rootFramesTimeline=new at,Ht=et._rootTimeline=new at,ne=30,It=he.lazyRender=function(){var r,u=yt.length;for(Ct={};--u>-1;)r=yt[u],r&&r._lazy!==!1&&(r.render(r._lazy[0],r._lazy[1],!0),r._lazy=!1);yt.length=0};Ht._startTime=M.time,ie._startTime=M.frame,Ht._active=ie._active=!0,setTimeout(It,1),et._updateRoot=K.render=function(){var r,u,f;if(yt.length&&It(),Ht.render((M.time-Ht._startTime)*Ht._timeScale,!1,!1),ie.render((M.frame-ie._startTime)*ie._timeScale,!1,!1),yt.length&&It(),M.frame>=ne){ne=M.frame+(parseInt(K.autoSleep,10)||120);for(f in jt){for(u=jt[f].tweens,r=u.length;--r>-1;)u[r]._gc&&u.splice(r,1);u.length===0&&delete jt[f]}if(f=Ht._first,(!f||f._paused)&&K.autoSleep&&!ie._first&&M._listeners.tick.length===1){for(;f&&f._paused;)f=f._next;f||M.sleep()}}},M.addEventListener("tick",et._updateRoot);var Pt=function(r,u,f){var c,w,C=r._gsTweenID;if(jt[C||(r._gsTweenID=C="t"+se++)]||(jt[C]={target:r,tweens:[]}),u&&(c=jt[C].tweens,c[w=c.length]=u,f))for(;--w>-1;)c[w]===u&&c.splice(w,1);return jt[C].tweens},qt=function(r,u,f,c){var w,C,j=r.vars.onOverwrite;return j&&(w=j(r,u,f,c)),j=K.onOverwrite,j&&(C=j(r,u,f,c)),w!==!1&&C!==!1},fe=function(r,u,f,c,w){var C,j,A,ft;if(c===1||c>=4){for(ft=w.length,C=0;ft>C;C++)if((A=w[C])!==u)A._gc||A._kill(null,r,u)&&(j=!0);else if(c===5)break;return j}var ut,W=u._startTime+st,pt=[],kt=0,St=u._duration===0;for(C=w.length;--C>-1;)(A=w[C])===u||A._gc||A._paused||(A._timeline!==u._timeline?(ut=ut||oe(u,0,St),oe(A,ut,St)===0&&(pt[kt++]=A)):A._startTime<=W&&A._startTime+A.totalDuration()/A._timeScale>W&&((St||!A._initted)&&W-A._startTime<=2e-10||(pt[kt++]=A)));for(C=kt;--C>-1;)if(A=pt[C],ft=A._firstPT,c===2&&A._kill(f,r,u)&&(j=!0),c!==2||!A._firstPT&&A._initted&&ft){if(c!==2&&!qt(A,u))continue;A._enabled(!1,!1)&&(j=!0)}return j},oe=function(r,u,f){for(var c=r._timeline,w=c._timeScale,C=r._startTime;c._timeline;){if(C+=c._startTime,w*=c._timeScale,c._paused)return-100;c=c._timeline}return C/=w,C>u?C-u:f&&C===u||!r._initted&&2*st>C-u?st:(C+=r.totalDuration()/r._timeScale/w)>u+st?0:C-u-st};O._init=function(){var r,u,f,c,w,C,j=this.vars,A=this._overwrittenProps,ft=this._duration,ut=!!j.immediateRender,W=j.ease;if(j.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),w={};for(c in j.startAt)w[c]=j.startAt[c];if(w.data="isStart",w.overwrite=!1,w.immediateRender=!0,w.lazy=ut&&j.lazy!==!1,w.startAt=w.delay=null,w.onUpdate=j.onUpdate,w.onUpdateParams=j.onUpdateParams,w.onUpdateScope=j.onUpdateScope||j.callbackScope||this,this._startAt=K.to(this.target||{},0,w),ut){if(this._time>0)this._startAt=null;else if(ft!==0)return}}else if(j.runBackwards&&ft!==0)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{this._time!==0&&(ut=!1),f={};for(c in j)ue[c]&&c!=="autoCSS"||(f[c]=j[c]);if(f.overwrite=0,f.data="isFromStart",f.lazy=ut&&j.lazy!==!1,f.immediateRender=ut,this._startAt=K.to(this.target,0,f),ut){if(this._time===0)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=W=W?W instanceof p?W:typeof W=="function"?new p(W,j.easeParams):T[W]||K.defaultEase:K.defaultEase,j.easeParams instanceof Array&&W.config&&(this._ease=W.config.apply(W,j.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(C=this._targets.length,r=0;C>r;r++)this._initProps(this._targets[r],this._propLookup[r]={},this._siblings[r],A?A[r]:null,r)&&(u=!0);else u=this._initProps(this.target,this._propLookup,this._siblings,A,0);if(u&&K._onPluginEvent("_onInitAllProps",this),A&&(this._firstPT||typeof this.target!="function"&&this._enabled(!1,!1)),j.runBackwards)for(f=this._firstPT;f;)f.s+=f.c,f.c=-f.c,f=f._next;this._onUpdate=j.onUpdate,this._initted=!0},O._initProps=function(r,u,f,c,w){var C,j,A,ft,ut,W;if(r==null)return!1;Ct[r._gsTweenID]&&It(),this.vars.css||r.style&&r!==N&&r.nodeType&&zt.css&&this.vars.autoCSS!==!1&&Vt(this.vars,r);for(C in this.vars)if(W=this.vars[C],ue[C])W&&(W instanceof Array||W.push&&P(W))&&W.join("").indexOf("{self}")!==-1&&(this.vars[C]=W=this._swapSelfInParams(W,this));else if(zt[C]&&(ft=new zt[C])._onInitTween(r,this.vars[C],this,w)){for(this._firstPT=ut={_next:this._firstPT,t:ft,p:"setRatio",s:0,c:1,f:1,n:C,pg:1,pr:ft._priority,m:0},j=ft._overwriteProps.length;--j>-1;)u[ft._overwriteProps[j]]=this._firstPT;(ft._priority||ft._onInitAllProps)&&(A=!0),(ft._onDisable||ft._onEnable)&&(this._notifyPluginsOfEnabled=!0),ut._next&&(ut._next._prev=ut)}else u[C]=Wt.call(this,r,C,"get",W,C,0,null,this.vars.stringFilter,w);return c&&this._kill(c,r)?this._initProps(r,u,f,c,w):this._overwrite>1&&this._firstPT&&f.length>1&&fe(r,this,u,this._overwrite,f)?(this._kill(u,r),this._initProps(r,u,f,c,w)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(Ct[r._gsTweenID]=!0),A)},O.render=function(r,u,f){var c,w,C,j,A=this._time,ft=this._duration,ut=this._rawPrevTime;if(r>=ft-1e-7&&r>=0)this._totalTime=this._time=ft,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(c=!0,w="onComplete",f=f||this._timeline.autoRemoveChildren),ft===0&&(this._initted||!this.vars.lazy||f)&&(this._startTime===this._timeline._duration&&(r=0),(0>ut||0>=r&&r>=-1e-7||ut===st&&this.data!=="isPause")&&ut!==r&&(f=!0,ut>st&&(w="onReverseComplete")),this._rawPrevTime=j=!u||r||ut===r?r:st);else if(1e-7>r)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(A!==0||ft===0&&ut>0)&&(w="onReverseComplete",c=this._reversed),0>r&&(this._active=!1,ft===0&&(this._initted||!this.vars.lazy||f)&&(ut>=0&&(ut!==st||this.data!=="isPause")&&(f=!0),this._rawPrevTime=j=!u||r||ut===r?r:st)),(!this._initted||this._startAt&&this._startAt.progress())&&(f=!0);else if(this._totalTime=this._time=r,this._easeType){var W=r/ft,pt=this._easeType,kt=this._easePower;(pt===1||pt===3&&W>=.5)&&(W=1-W),pt===3&&(W*=2),kt===1?W*=W:kt===2?W*=W*W:kt===3?W*=W*W*W:kt===4&&(W*=W*W*W*W),pt===1?this.ratio=1-W:pt===2?this.ratio=W:.5>r/ft?this.ratio=W/2:this.ratio=1-W/2}else this.ratio=this._ease.getRatio(r/ft);if(this._time!==A||f){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!f&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=A,this._rawPrevTime=ut,yt.push(this),void(this._lazy=[r,u]);this._time&&!c?this.ratio=this._ease.getRatio(this._time/ft):c&&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!==A&&r>=0&&(this._active=!0),A===0&&(this._startAt&&(r>=0?this._startAt.render(r,!0,f):w||(w="_dummyGS")),this.vars.onStart&&(this._time!==0||ft===0)&&(u||this._callback("onStart"))),C=this._firstPT;C;)C.f?C.t[C.p](C.c*this.ratio+C.s):C.t[C.p]=C.c*this.ratio+C.s,C=C._next;this._onUpdate&&(0>r&&this._startAt&&r!==-1e-4&&this._startAt.render(r,!0,f),u||(this._time!==A||c||f)&&this._callback("onUpdate")),w&&(!this._gc||f)&&(0>r&&this._startAt&&!this._onUpdate&&r!==-1e-4&&this._startAt.render(r,!0,f),c&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!u&&this.vars[w]&&this._callback(w),ft===0&&this._rawPrevTime===st&&j!==st&&(this._rawPrevTime=0))}},O._kill=function(r,u,f){if(r==="all"&&(r=null),r==null&&(u==null||u===this.target))return this._lazy=!1,this._enabled(!1,!1);u=typeof u!="string"?u||this._targets||this.target:K.selector(u)||u;var c,w,C,j,A,ft,ut,W,pt,kt=f&&this._time&&f._startTime===this._startTime&&this._timeline===f._timeline,St=this._firstPT;if((P(u)||gt(u))&&typeof u[0]!="number")for(c=u.length;--c>-1;)this._kill(r,u[c],f)&&(ft=!0);else{if(this._targets){for(c=this._targets.length;--c>-1;)if(u===this._targets[c]){A=this._propLookup[c]||{},this._overwrittenProps=this._overwrittenProps||[],w=this._overwrittenProps[c]=r?this._overwrittenProps[c]||{}:"all";break}}else{if(u!==this.target)return!1;A=this._propLookup,w=this._overwrittenProps=r?this._overwrittenProps||{}:"all"}if(A){if(ut=r||A,W=r!==w&&w!=="all"&&r!==A&&(typeof r!="object"||!r._tempKill),f&&(K.onOverwrite||this.vars.onOverwrite)){for(C in ut)A[C]&&(pt||(pt=[]),pt.push(C));if((pt||!r)&&!qt(this,f,u,pt))return!1}for(C in ut)(j=A[C])&&(kt&&(j.f?j.t[j.p](j.s):j.t[j.p]=j.s,ft=!0),j.pg&&j.t._kill(ut)&&(ft=!0),j.pg&&j.t._overwriteProps.length!==0||(j._prev?j._prev._next=j._next:j===this._firstPT&&(this._firstPT=j._next),j._next&&(j._next._prev=j._prev),j._next=j._prev=null),delete A[C]),W&&(w[C]=1);!this._firstPT&&this._initted&&St&&this._enabled(!1,!1)}}return ft},O.invalidate=function(){return this._notifyPluginsOfEnabled&&K._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],et.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-st,this.render(Math.min(0,-this._delay))),this},O._enabled=function(r,u){if(b||M.wake(),r&&this._gc){var f,c=this._targets;if(c)for(f=c.length;--f>-1;)this._siblings[f]=Pt(c[f],this,!0);else this._siblings=Pt(this.target,this,!0)}return et.prototype._enabled.call(this,r,u),this._notifyPluginsOfEnabled&&this._firstPT?K._onPluginEvent(r?"_onEnable":"_onDisable",this):!1},K.to=function(r,u,f){return new K(r,u,f)},K.from=function(r,u,f){return f.runBackwards=!0,f.immediateRender=f.immediateRender!=0,new K(r,u,f)},K.fromTo=function(r,u,f,c){return c.startAt=f,c.immediateRender=c.immediateRender!=0&&f.immediateRender!=0,new K(r,u,c)},K.delayedCall=function(r,u,f,c,w){return new K(u,0,{delay:r,onComplete:u,onCompleteParams:f,callbackScope:c,onReverseComplete:u,onReverseCompleteParams:f,immediateRender:!1,lazy:!1,useFrames:w,overwrite:0})},K.set=function(r,u){return new K(r,0,u)},K.getTweensOf=function(r,u){if(r==null)return[];r=typeof r!="string"?r:K.selector(r)||r;var f,c,w,C;if((P(r)||gt(r))&&typeof r[0]!="number"){for(f=r.length,c=[];--f>-1;)c=c.concat(K.getTweensOf(r[f],u));for(f=c.length;--f>-1;)for(C=c[f],w=f;--w>-1;)C===c[w]&&c.splice(f,1)}else if(r._gsTweenID)for(c=Pt(r).concat(),f=c.length;--f>-1;)(c[f]._gc||u&&!c[f].isActive())&&c.splice(f,1);return c||[]},K.killTweensOf=K.killDelayedCallsTo=function(r,u,f){typeof u=="object"&&(f=u,u=!1);for(var c=K.getTweensOf(r,u),w=c.length;--w>-1;)c[w]._kill(f,r)};var Zt=n("plugins.TweenPlugin",function(r,u){this._overwriteProps=(r||"").split(","),this._propName=this._overwriteProps[0],this._priority=u||0,this._super=Zt.prototype},!0);if(O=Zt.prototype,Zt.version="1.19.0",Zt.API=2,O._firstPT=null,O._addTween=Wt,O.setRatio=$t,O._kill=function(r){var u,f=this._overwriteProps,c=this._firstPT;if(r[this._propName]!=null)this._overwriteProps=[];else for(u=f.length;--u>-1;)r[f[u]]!=null&&f.splice(u,1);for(;c;)r[c.n]!=null&&(c._next&&(c._next._prev=c._prev),c._prev?(c._prev._next=c._next,c._prev=null):this._firstPT===c&&(this._firstPT=c._next)),c=c._next;return!1},O._mod=O._roundProps=function(r){for(var u,f=this._firstPT;f;)u=r[this._propName]||f.n!=null&&r[f.n.split(this._propName+"_").join("")],u&&typeof u=="function"&&(f.f===2?f.t._applyPT.m=u:f.m=u),f=f._next},K._onPluginEvent=function(r,u){var f,c,w,C,j,A=u._firstPT;if(r==="_onInitAllProps"){for(;A;){for(j=A._next,c=w;c&&c.pr>A.pr;)c=c._next;(A._prev=c?c._prev:C)?A._prev._next=A:w=A,(A._next=c)?c._prev=A:C=A,A=j}A=u._firstPT=w}for(;A;)A.pg&&typeof A.t[r]=="function"&&A.t[r]()&&(f=!0),A=A._next;return f},Zt.activate=function(r){for(var u=r.length;--u>-1;)r[u].API===Zt.API&&(zt[new r[u]()._propName]=r[u]);return!0},_.plugin=function(r){if(!(r&&r.propName&&r.init&&r.API))throw"illegal plugin definition.";var u,f=r.propName,c=r.priority||0,w=r.overwriteProps,C={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},j=n("plugins."+f.charAt(0).toUpperCase()+f.substr(1)+"Plugin",function(){Zt.call(this,f,c),this._overwriteProps=w||[]},r.global===!0),A=j.prototype=new Zt(f);A.constructor=j,j.API=r.API;for(u in C)typeof r[u]=="function"&&(A[C[u]]=r[u]);return j.version=r.version,Zt.activate([j]),j},$=N._gsQueue){for(mt=0;mt<$.length;mt++)$[mt]();for(O in e)e[O].func||N.console.log("GSAP encountered missing dependency: "+O)}b=!1}(typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window,"TweenMax");const $e={class:"modal-background"},We=["innerHTML"],Ze={name:"MapModali"},De=wt.defineComponent({...Ze,props:{},setup(N,{expose:J}){const Q=wt.ref(""),nt=wt.ref(""),F=$=>{nt.value=$,Q.value="five"},Y=()=>{Q.value=Q.value+" out"};return wt.onMounted(()=>{}),J({text:nt,show:F}),($,mt)=>(wt.openBlock(),wt.createElementBlock("div",{id:"modal-container",class:wt.normalizeClass(Q.value),onClick:Y},[wt.createElementVNode("div",$e,[wt.createElementVNode("div",{class:"modal",onClick:mt[0]||(mt[0]=O=>{O.stopPropagation()})},[wt.createElementVNode("p",{style:{"white-space":"pre-line","line-height":"1",margin:"0",color:"#fff"},innerHTML:nt.value},null,8,We)])])],2))}}),fi="",Ge=[Ce],He={continuation:null,mapModali:null,install(N){if(Ge.forEach(($,mt)=>{N.component($.name,$)}),this.continuation){N.config.globalProperties.$continuation=this.continuation;return}let J=wt.createApp(Me),Q=document.createElement("div"),nt=document.body;if(nt.appendChild(Q),this.loading=J.mount(Q),N.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){N.config.globalProperties.$mapModali=this.mapModali;return}let F=wt.createApp(De),Y=document.createElement("div");nt.appendChild(Y),this.mapModali=F.mount(Y),N.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};Kt.Button=Ce,Kt.Cutscenes=Me,Kt.MapModali=De,Kt.default=He,Object.defineProperties(Kt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
13
|
+
**/var $e=typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window;($e._gsQueue||($e._gsQueue=[])).push(function(){$e._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(p,bt,$){var gt=function(K){var H,m=[],f=K.length;for(H=0;H!==f;m.push(K[H++]));return m},at=function(K,H,m){var f,O,x=K.cycle;for(f in x)O=x[f],K[f]=typeof O=="function"?O(m,H[m]):O[m%O.length];delete K.cycle},M=function(K,H,m){$.call(this,K,H,m),this._cycle=0,this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._repeat&&this._uncache(!0),this.render=M.prototype.render},_t=1e-10,Ot=$._internals,Z=Ot.isSelector,ht=Ot.isArray,Mt=M.prototype=$.to({},.1,{}),ct=[];M.version="2.0.2",Mt.constructor=M,Mt.kill()._gc=!1,M.killTweensOf=M.killDelayedCallsTo=$.killTweensOf,M.getTweensOf=$.getTweensOf,M.lagSmoothing=$.lagSmoothing,M.ticker=$.ticker,M.render=$.render,Mt.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)},Mt.updateTo=function(K,H){var m,f=this.ratio,O=this.vars.immediateRender||K.immediateRender;H&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(m in K)this.vars[m]=K[m];if(this._initted||O){if(H)this._initted=!1,O&&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 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||O)for(var X,b=1/(1-f),F=this._firstPT;F;)X=F.s+F.c,F.c*=b,F.s=X-F.c,F=F._next}return this},Mt.render=function(K,H,m){this._initted||this._duration===0&&this.vars.repeat&&this.invalidate();var f,O,x,X,b,F,Y,pt,tt,At=this._dirty?this.totalDuration():this._totalDuration,xt=this._time,Gt=this._totalTime,kt=this._cycle,ie=this._duration,lt=this._rawPrevTime;if(K>=At-1e-7&&K>=0?(this._totalTime=At,this._cycle=this._repeat,this._yoyo&&1&this._cycle?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=ie,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(f=!0,O="onComplete",m=m||this._timeline.autoRemoveChildren),ie===0&&(this._initted||!this.vars.lazy||m)&&(this._startTime===this._timeline._duration&&(K=0),(0>lt||0>=K&&K>=-1e-7||lt===_t&&this.data!=="isPause")&<!==K&&(m=!0,lt>_t&&(O="onReverseComplete")),this._rawPrevTime=pt=!H||K||lt===K?K:_t)):1e-7>K?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(Gt!==0||ie===0&<>0)&&(O="onReverseComplete",f=this._reversed),0>K&&(this._active=!1,ie===0&&(this._initted||!this.vars.lazy||m)&&(lt>=0&&(m=!0),this._rawPrevTime=pt=!H||K||lt===K?K:_t)),this._initted||(m=!0)):(this._totalTime=this._time=K,this._repeat!==0&&(X=ie+this._repeatDelay,this._cycle=this._totalTime/X>>0,this._cycle!==0&&this._cycle===this._totalTime/X&&K>=Gt&&this._cycle--,this._time=this._totalTime-this._cycle*X,this._yoyo&&1&this._cycle&&(this._time=ie-this._time,tt=this._yoyoEase||this.vars.yoyoEase,tt&&(this._yoyoEase||(tt!==!0||this._initted?this._yoyoEase=tt=tt===!0?this._ease:tt instanceof Ease?tt:Ease.map[tt]:(tt=this.vars.ease,this._yoyoEase=tt=tt?tt instanceof Ease?tt:typeof tt=="function"?new Ease(tt,this.vars.easeParams):Ease.map[tt]||$.defaultEase:$.defaultEase)),this.ratio=tt?1-tt.getRatio((ie-this._time)/ie):0)),this._time>ie?this._time=ie:this._time<0&&(this._time=0)),this._easeType&&!tt?(b=this._time/ie,F=this._easeType,Y=this._easePower,(F===1||F===3&&b>=.5)&&(b=1-b),F===3&&(b*=2),Y===1?b*=b:Y===2?b*=b*b:Y===3?b*=b*b*b:Y===4&&(b*=b*b*b*b),F===1?this.ratio=1-b:F===2?this.ratio=b:this._time/ie<.5?this.ratio=b/2:this.ratio=1-b/2):tt||(this.ratio=this._ease.getRatio(this._time/ie))),xt===this._time&&!m&&kt===this._cycle)return void(Gt!==this._totalTime&&this._onUpdate&&(H||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!m&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=xt,this._totalTime=Gt,this._rawPrevTime=lt,this._cycle=kt,Ot.lazyTweens.push(this),void(this._lazy=[K,H]);!this._time||f||tt?f&&this._ease._calcEnd&&!tt&&(this.ratio=this._ease.getRatio(this._time===0?0:1)):this.ratio=this._ease.getRatio(this._time/ie)}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==xt&&K>=0&&(this._active=!0),Gt===0&&(this._initted===2&&K>0&&this._init(),this._startAt&&(K>=0?this._startAt.render(K,!0,m):O||(O="_dummyGS")),this.vars.onStart&&(this._totalTime!==0||ie===0)&&(H||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>K&&this._startAt&&this._startTime&&this._startAt.render(K,!0,m),H||(this._totalTime!==Gt||O)&&this._callback("onUpdate")),this._cycle!==kt&&(H||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),O&&(!this._gc||m)&&(0>K&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(K,!0,m),f&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!H&&this.vars[O]&&this._callback(O),ie===0&&this._rawPrevTime===_t&&pt!==_t&&(this._rawPrevTime=0))},M.to=function(K,H,m){return new M(K,H,m)},M.from=function(K,H,m){return m.runBackwards=!0,m.immediateRender=m.immediateRender!=0,new M(K,H,m)},M.fromTo=function(K,H,m,f){return f.startAt=m,f.immediateRender=f.immediateRender!=0&&m.immediateRender!=0,new M(K,H,f)},M.staggerTo=M.allTo=function(K,H,m,f,O,x,X){f=f||0;var b,F,Y,pt,tt=0,At=[],xt=function(){m.onComplete&&m.onComplete.apply(m.onCompleteScope||this,arguments),O.apply(X||m.callbackScope||this,x||ct)},Gt=m.cycle,kt=m.startAt&&m.startAt.cycle;for(ht(K)||(typeof K=="string"&&(K=$.selector(K)||K),Z(K)&&(K=gt(K))),K=K||[],0>f&&(K=gt(K),K.reverse(),f*=-1),b=K.length-1,Y=0;b>=Y;Y++){F={};for(pt in m)F[pt]=m[pt];if(Gt&&(at(F,K,Y),F.duration!=null&&(H=F.duration,delete F.duration)),kt){kt=F.startAt={};for(pt in m.startAt)kt[pt]=m.startAt[pt];at(F.startAt,K,Y)}F.delay=tt+(F.delay||0),Y===b&&O&&(F.onComplete=xt),At[Y]=new M(K[Y],H,F),tt+=f}return At},M.staggerFrom=M.allFrom=function(K,H,m,f,O,x,X){return m.runBackwards=!0,m.immediateRender=m.immediateRender!=0,M.staggerTo(K,H,m,f,O,x,X)},M.staggerFromTo=M.allFromTo=function(K,H,m,f,O,x,X,b){return f.startAt=m,f.immediateRender=f.immediateRender!=0&&m.immediateRender!=0,M.staggerTo(K,H,f,O,x,X,b)},M.delayedCall=function(K,H,m,f,O){return new M(H,0,{delay:K,onComplete:H,onCompleteParams:m,callbackScope:f,onReverseComplete:H,onReverseCompleteParams:m,immediateRender:!1,useFrames:O,overwrite:0})},M.set=function(K,H){return new M(K,0,H)},M.isTweening=function(K){return $.getTweensOf(K,!0).length>0};var Rt=function(K,H){for(var m=[],f=0,O=K._first;O;)O instanceof $?m[f++]=O:(H&&(m[f++]=O),m=m.concat(Rt(O,H)),f=m.length),O=O._next;return m},zt=M.getAllTweens=function(K){return Rt(p._rootTimeline,K).concat(Rt(p._rootFramesTimeline,K))};M.killAll=function(K,H,m,f){H==null&&(H=!0),m==null&&(m=!0);var O,x,X,b=zt(f!=0),F=b.length,Y=H&&m&&f;for(X=0;F>X;X++)x=b[X],(Y||x instanceof bt||(O=x.target===x.vars.onComplete)&&m||H&&!O)&&(K?x.totalTime(x._reversed?0:x.totalDuration()):x._enabled(!1,!1))},M.killChildTweensOf=function(K,H){if(K!=null){var m,f,O,x,X,b=Ot.tweenLookup;if(typeof K=="string"&&(K=$.selector(K)||K),Z(K)&&(K=gt(K)),ht(K))for(x=K.length;--x>-1;)M.killChildTweensOf(K[x],H);else{m=[];for(O in b)for(f=b[O].target.parentNode;f;)f===K&&(m=m.concat(b[O].tweens)),f=f.parentNode;for(X=m.length,x=0;X>x;x++)H&&m[x].totalTime(m[x].totalDuration()),m[x]._enabled(!1,!1)}}};var mt=function(K,H,m,f){H=H!==!1,m=m!==!1,f=f!==!1;for(var O,x,X=zt(f),b=H&&m&&f,F=X.length;--F>-1;)x=X[F],(b||x instanceof bt||(O=x.target===x.vars.onComplete)&&m||H&&!O)&&x.paused(K)};return M.pauseAll=function(K,H,m){mt(!0,K,H,m)},M.resumeAll=function(K,H,m){mt(!1,K,H,m)},M.globalTimeScale=function(K){var H=p._rootTimeline,m=$.ticker.time;return arguments.length?(K=K||_t,H._startTime=m-(m-H._startTime)*H._timeScale/K,H=p._rootFramesTimeline,m=$.ticker.frame,H._startTime=m-(m-H._startTime)*H._timeScale/K,H._timeScale=p._rootTimeline._timeScale=K,K):H._timeScale},Mt.progress=function(K,H){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-K:K)+this._cycle*(this._duration+this._repeatDelay),H):this._time/this.duration()},Mt.totalProgress=function(K,H){return arguments.length?this.totalTime(this.totalDuration()*K,H):this._totalTime/this.totalDuration()},Mt.time=function(K,H){return arguments.length?(this._dirty&&this.totalDuration(),K>this._duration&&(K=this._duration),this._yoyo&&1&this._cycle?K=this._duration-K+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(K+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(K,H)):this._time},Mt.duration=function(K){return arguments.length?p.prototype.duration.call(this,K):this._duration},Mt.totalDuration=function(K){return arguments.length?this._repeat===-1?this:this.duration((K-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)},Mt.repeat=function(K){return arguments.length?(this._repeat=K,this._uncache(!0)):this._repeat},Mt.repeatDelay=function(K){return arguments.length?(this._repeatDelay=K,this._uncache(!0)):this._repeatDelay},Mt.yoyo=function(K){return arguments.length?(this._yoyo=K,this):this._yoyo},M},!0),$e._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(p,bt,$){var gt=function(m){bt.call(this,m),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var f,O,x=this.vars;for(O in x)f=x[O],Z(f)&&f.join("").indexOf("{self}")!==-1&&(x[O]=this._swapSelfInParams(f));Z(x.tweens)&&this.add(x.tweens,0,x.align,x.stagger)},at=1e-10,M=$._internals,_t=gt._internals={},Ot=M.isSelector,Z=M.isArray,ht=M.lazyTweens,Mt=M.lazyRender,ct=$e._gsDefine.globals,Rt=function(m){var f,O={};for(f in m)O[f]=m[f];return O},zt=function(m,f,O){var x,X,b=m.cycle;for(x in b)X=b[x],m[x]=typeof X=="function"?X(O,f[O]):X[O%X.length];delete m.cycle},mt=_t.pauseCallback=function(){},K=function(m){var f,O=[],x=m.length;for(f=0;f!==x;O.push(m[f++]));return O},H=gt.prototype=new bt;return gt.version="2.0.2",H.constructor=gt,H.kill()._gc=H._forcingPlayhead=H._hasPause=!1,H.to=function(m,f,O,x){var X=O.repeat&&ct.TweenMax||$;return f?this.add(new X(m,f,O),x):this.set(m,O,x)},H.from=function(m,f,O,x){return this.add((O.repeat&&ct.TweenMax||$).from(m,f,O),x)},H.fromTo=function(m,f,O,x,X){var b=x.repeat&&ct.TweenMax||$;return f?this.add(b.fromTo(m,f,O,x),X):this.set(m,x,X)},H.staggerTo=function(m,f,O,x,X,b,F,Y){var pt,tt,At=new gt({onComplete:b,onCompleteParams:F,callbackScope:Y,smoothChildTiming:this.smoothChildTiming}),xt=O.cycle;for(typeof m=="string"&&(m=$.selector(m)||m),m=m||[],Ot(m)&&(m=K(m)),x=x||0,0>x&&(m=K(m),m.reverse(),x*=-1),tt=0;tt<m.length;tt++)pt=Rt(O),pt.startAt&&(pt.startAt=Rt(pt.startAt),pt.startAt.cycle&&zt(pt.startAt,m,tt)),xt&&(zt(pt,m,tt),pt.duration!=null&&(f=pt.duration,delete pt.duration)),At.to(m[tt],f,pt,tt*x);return this.add(At,X)},H.staggerFrom=function(m,f,O,x,X,b,F,Y){return O.immediateRender=O.immediateRender!=0,O.runBackwards=!0,this.staggerTo(m,f,O,x,X,b,F,Y)},H.staggerFromTo=function(m,f,O,x,X,b,F,Y,pt){return x.startAt=O,x.immediateRender=x.immediateRender!=0&&O.immediateRender!=0,this.staggerTo(m,f,x,X,b,F,Y,pt)},H.call=function(m,f,O,x){return this.add($.delayedCall(0,m,f,O),x)},H.set=function(m,f,O){return O=this._parseTimeOrLabel(O,0,!0),f.immediateRender==null&&(f.immediateRender=O===this._time&&!this._paused),this.add(new $(m,0,f),O)},gt.exportRoot=function(m,f){m=m||{},m.smoothChildTiming==null&&(m.smoothChildTiming=!0);var O,x,X,b,F=new gt(m),Y=F._timeline;for(f==null&&(f=!0),Y._remove(F,!0),F._startTime=0,F._rawPrevTime=F._time=F._totalTime=Y._time,X=Y._first;X;)b=X._next,f&&X instanceof $&&X.target===X.vars.onComplete||(x=X._startTime-X._delay,0>x&&(O=1),F.add(X,x)),X=b;return Y.add(F,0),O&&F.totalDuration(),F},H.add=function(m,f,O,x){var X,b,F,Y,pt,tt;if(typeof f!="number"&&(f=this._parseTimeOrLabel(f,0,!0,m)),!(m instanceof p)){if(m instanceof Array||m&&m.push&&Z(m)){for(O=O||"normal",x=x||0,X=f,b=m.length,F=0;b>F;F++)Z(Y=m[F])&&(Y=new gt({tweens:Y})),this.add(Y,X),typeof Y!="string"&&typeof Y!="function"&&(O==="sequence"?X=Y._startTime+Y.totalDuration()/Y._timeScale:O==="start"&&(Y._startTime-=Y.delay())),X+=x;return this._uncache(!0)}if(typeof m=="string")return this.addLabel(m,f);if(typeof m!="function")throw"Cannot add "+m+" into the timeline; it is not a tween, timeline, function, or string.";m=$.delayedCall(0,m)}if(bt.prototype.add.call(this,m,f),m._time&&(X=Math.max(0,Math.min(m.totalDuration(),(this.rawTime()-m._startTime)*m._timeScale)),Math.abs(X-m._totalTime)>1e-5&&m.render(X,!1,!1)),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(pt=this,tt=pt.rawTime()>m._startTime;pt._timeline;)tt&&pt._timeline.smoothChildTiming?pt.totalTime(pt._totalTime,!0):pt._gc&&pt._enabled(!0,!1),pt=pt._timeline;return this},H.remove=function(m){if(m instanceof p){this._remove(m,!1);var f=m._timeline=m.vars.useFrames?p._rootFramesTimeline:p._rootTimeline;return m._startTime=(m._paused?m._pauseTime:f._time)-(m._reversed?m.totalDuration()-m._totalTime:m._totalTime)/m._timeScale,this}if(m instanceof Array||m&&m.push&&Z(m)){for(var O=m.length;--O>-1;)this.remove(m[O]);return this}return typeof m=="string"?this.removeLabel(m):this.kill(null,m)},H._remove=function(m,f){bt.prototype._remove.call(this,m,f);var O=this._last;return O?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},H.append=function(m,f){return this.add(m,this._parseTimeOrLabel(null,f,!0,m))},H.insert=H.insertMultiple=function(m,f,O,x){return this.add(m,f||0,O,x)},H.appendMultiple=function(m,f,O,x){return this.add(m,this._parseTimeOrLabel(null,f,!0,m),O,x)},H.addLabel=function(m,f){return this._labels[m]=this._parseTimeOrLabel(f),this},H.addPause=function(m,f,O,x){var X=$.delayedCall(0,mt,O,x||this);return X.vars.onComplete=X.vars.onReverseComplete=f,X.data="isPause",this._hasPause=!0,this.add(X,m)},H.removeLabel=function(m){return delete this._labels[m],this},H.getLabelTime=function(m){return this._labels[m]!=null?this._labels[m]:-1},H._parseTimeOrLabel=function(m,f,O,x){var X,b;if(x instanceof p&&x.timeline===this)this.remove(x);else if(x&&(x instanceof Array||x.push&&Z(x)))for(b=x.length;--b>-1;)x[b]instanceof p&&x[b].timeline===this&&this.remove(x[b]);if(X=typeof m!="number"||f?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,typeof f=="string")return this._parseTimeOrLabel(f,O&&typeof m=="number"&&this._labels[f]==null?m-X:0,O);if(f=f||0,typeof m!="string"||!isNaN(m)&&this._labels[m]==null)m==null&&(m=X);else{if(b=m.indexOf("="),b===-1)return this._labels[m]==null?O?this._labels[m]=X+f:f:this._labels[m]+f;f=parseInt(m.charAt(b-1)+"1",10)*Number(m.substr(b+1)),m=b>1?this._parseTimeOrLabel(m.substr(0,b-1),0,O):X}return Number(m)+f},H.seek=function(m,f){return this.totalTime(typeof m=="number"?m:this._parseTimeOrLabel(m),f!==!1)},H.stop=function(){return this.paused(!0)},H.gotoAndPlay=function(m,f){return this.play(m,f)},H.gotoAndStop=function(m,f){return this.pause(m,f)},H.render=function(m,f,O){this._gc&&this._enabled(!0,!1);var x,X,b,F,Y,pt,tt,At=this._time,xt=this._dirty?this.totalDuration():this._totalDuration,Gt=this._startTime,kt=this._timeScale,ie=this._paused;if(At!==this._time&&(m+=this._time-At),m>=xt-1e-7&&m>=0)this._totalTime=this._time=xt,this._reversed||this._hasPausedChild()||(X=!0,F="onComplete",Y=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=m&&m>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===at)&&this._rawPrevTime!==m&&this._first&&(Y=!0,this._rawPrevTime>at&&(F="onReverseComplete"))),this._rawPrevTime=this._duration||!f||m||this._rawPrevTime===m?m:at,m=xt+1e-4;else if(1e-7>m)if(this._totalTime=this._time=0,(At!==0||this._duration===0&&this._rawPrevTime!==at&&(this._rawPrevTime>0||0>m&&this._rawPrevTime>=0))&&(F="onReverseComplete",X=this._reversed),0>m)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(Y=X=!0,F="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(Y=!0),this._rawPrevTime=m;else{if(this._rawPrevTime=this._duration||!f||m||this._rawPrevTime===m?m:at,m===0&&X)for(x=this._first;x&&x._startTime===0;)x._duration||(X=!1),x=x._next;m=0,this._initted||(Y=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!f){if(m>=At)for(x=this._first;x&&x._startTime<=m&&!pt;)x._duration||x.data!=="isPause"||x.ratio||x._startTime===0&&this._rawPrevTime===0||(pt=x),x=x._next;else for(x=this._last;x&&x._startTime>=m&&!pt;)x._duration||x.data==="isPause"&&x._rawPrevTime>0&&(pt=x),x=x._prev;pt&&(this._time=m=pt._startTime,this._totalTime=m+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=m}if(this._time!==At&&this._first||O||Y||pt){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==At&&m>0&&(this._active=!0),At===0&&this.vars.onStart&&(this._time===0&&this._duration||f||this._callback("onStart")),tt=this._time,tt>=At)for(x=this._first;x&&(b=x._next,tt===this._time&&(!this._paused||ie));)(x._active||x._startTime<=tt&&!x._paused&&!x._gc)&&(pt===x&&this.pause(),x._reversed?x.render((x._dirty?x.totalDuration():x._totalDuration)-(m-x._startTime)*x._timeScale,f,O):x.render((m-x._startTime)*x._timeScale,f,O)),x=b;else for(x=this._last;x&&(b=x._prev,tt===this._time&&(!this._paused||ie));){if(x._active||x._startTime<=At&&!x._paused&&!x._gc){if(pt===x){for(pt=x._prev;pt&&pt.endTime()>this._time;)pt.render(pt._reversed?pt.totalDuration()-(m-pt._startTime)*pt._timeScale:(m-pt._startTime)*pt._timeScale,f,O),pt=pt._prev;pt=null,this.pause()}x._reversed?x.render((x._dirty?x.totalDuration():x._totalDuration)-(m-x._startTime)*x._timeScale,f,O):x.render((m-x._startTime)*x._timeScale,f,O)}x=b}this._onUpdate&&(f||(ht.length&&Mt(),this._callback("onUpdate"))),F&&(this._gc||(Gt===this._startTime||kt!==this._timeScale)&&(this._time===0||xt>=this.totalDuration())&&(X&&(ht.length&&Mt(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!f&&this.vars[F]&&this._callback(F)))}},H._hasPausedChild=function(){for(var m=this._first;m;){if(m._paused||m instanceof gt&&m._hasPausedChild())return!0;m=m._next}return!1},H.getChildren=function(m,f,O,x){x=x||-9999999999;for(var X=[],b=this._first,F=0;b;)b._startTime<x||(b instanceof $?f!==!1&&(X[F++]=b):(O!==!1&&(X[F++]=b),m!==!1&&(X=X.concat(b.getChildren(!0,f,O)),F=X.length))),b=b._next;return X},H.getTweensOf=function(m,f){var O,x,X=this._gc,b=[],F=0;for(X&&this._enabled(!0,!0),O=$.getTweensOf(m),x=O.length;--x>-1;)(O[x].timeline===this||f&&this._contains(O[x]))&&(b[F++]=O[x]);return X&&this._enabled(!1,!0),b},H.recent=function(){return this._recent},H._contains=function(m){for(var f=m.timeline;f;){if(f===this)return!0;f=f.timeline}return!1},H.shiftChildren=function(m,f,O){O=O||0;for(var x,X=this._first,b=this._labels;X;)X._startTime>=O&&(X._startTime+=m),X=X._next;if(f)for(x in b)b[x]>=O&&(b[x]+=m);return this._uncache(!0)},H._kill=function(m,f){if(!m&&!f)return this._enabled(!1,!1);for(var O=f?this.getTweensOf(f):this.getChildren(!0,!0,!1),x=O.length,X=!1;--x>-1;)O[x]._kill(m,f)&&(X=!0);return X},H.clear=function(m){var f=this.getChildren(!1,!0,!0),O=f.length;for(this._time=this._totalTime=0;--O>-1;)f[O]._enabled(!1,!1);return m!==!1&&(this._labels={}),this._uncache(!0)},H.invalidate=function(){for(var m=this._first;m;)m.invalidate(),m=m._next;return p.prototype.invalidate.call(this)},H._enabled=function(m,f){if(m===this._gc)for(var O=this._first;O;)O._enabled(m,!0),O=O._next;return bt.prototype._enabled.call(this,m,f)},H.totalTime=function(m,f,O){this._forcingPlayhead=!0;var x=p.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,x},H.duration=function(m){return arguments.length?(this.duration()!==0&&m!==0&&this.timeScale(this._duration/m),this):(this._dirty&&this.totalDuration(),this._duration)},H.totalDuration=function(m){if(!arguments.length){if(this._dirty){for(var f,O,x=0,X=this._last,b=999999999999;X;)f=X._prev,X._dirty&&X.totalDuration(),X._startTime>b&&this._sortChildren&&!X._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(X,X._startTime-X._delay),this._calculatingDuration=0):b=X._startTime,X._startTime<0&&!X._paused&&(x-=X._startTime,this._timeline.smoothChildTiming&&(this._startTime+=X._startTime/this._timeScale,this._time-=X._startTime,this._totalTime-=X._startTime,this._rawPrevTime-=X._startTime),this.shiftChildren(-X._startTime,!1,-9999999999),b=0),O=X._startTime+X._totalDuration/X._timeScale,O>x&&(x=O),X=f;this._duration=this._totalDuration=x,this._dirty=!1}return this._totalDuration}return m&&this.totalDuration()?this.timeScale(this._totalDuration/m):this},H.paused=function(m){if(!m)for(var f=this._first,O=this._time;f;)f._startTime===O&&f.data==="isPause"&&(f._rawPrevTime=0),f=f._next;return p.prototype.paused.apply(this,arguments)},H.usesFrames=function(){for(var m=this._timeline;m._timeline;)m=m._timeline;return m===p._rootFramesTimeline},H.rawTime=function(m){return m&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(m)-this._startTime)*this._timeScale},gt},!0),$e._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(p,bt,$){var gt=function(ct){p.call(this,ct),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},at=1e-10,M=bt._internals,_t=M.lazyTweens,Ot=M.lazyRender,Z=$e._gsDefine.globals,ht=new $(null,null,1,0),Mt=gt.prototype=new p;return Mt.constructor=gt,Mt.kill()._gc=!1,gt.version="2.0.2",Mt.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),p.prototype.invalidate.call(this)},Mt.addCallback=function(ct,Rt,zt,mt){return this.add(bt.delayedCall(0,ct,zt,mt),Rt)},Mt.removeCallback=function(ct,Rt){if(ct)if(Rt==null)this._kill(null,ct);else for(var zt=this.getTweensOf(ct,!1),mt=zt.length,K=this._parseTimeOrLabel(Rt);--mt>-1;)zt[mt]._startTime===K&&zt[mt]._enabled(!1,!1);return this},Mt.removePause=function(ct){return this.removeCallback(p._internals.pauseCallback,ct)},Mt.tweenTo=function(ct,Rt){Rt=Rt||{};var zt,mt,K,H={ease:ht,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},m=Rt.repeat&&Z.TweenMax||bt;for(mt in Rt)H[mt]=Rt[mt];return H.time=this._parseTimeOrLabel(ct),zt=Math.abs(Number(H.time)-this._time)/this._timeScale||.001,K=new m(this,zt,H),H.onStart=function(){K.target.paused(!0),K.vars.time===K.target.time()||zt!==K.duration()||K.isFromTo||K.duration(Math.abs(K.vars.time-K.target.time())/K.target._timeScale).render(K.time(),!0,!0),Rt.onStart&&Rt.onStart.apply(Rt.onStartScope||Rt.callbackScope||K,Rt.onStartParams||[])},K},Mt.tweenFromTo=function(ct,Rt,zt){zt=zt||{},ct=this._parseTimeOrLabel(ct),zt.startAt={onComplete:this.seek,onCompleteParams:[ct],callbackScope:this},zt.immediateRender=zt.immediateRender!==!1;var mt=this.tweenTo(Rt,zt);return mt.isFromTo=1,mt.duration(Math.abs(mt.vars.time-ct)/this._timeScale||.001)},Mt.render=function(ct,Rt,zt){this._gc&&this._enabled(!0,!1);var mt,K,H,m,f,O,x,X,b=this._time,F=this._dirty?this.totalDuration():this._totalDuration,Y=this._duration,pt=this._totalTime,tt=this._startTime,At=this._timeScale,xt=this._rawPrevTime,Gt=this._paused,kt=this._cycle;if(b!==this._time&&(ct+=this._time-b),ct>=F-1e-7&&ct>=0)this._locked||(this._totalTime=F,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(K=!0,m="onComplete",f=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=ct&&ct>=-1e-7||0>xt||xt===at)&&xt!==ct&&this._first&&(f=!0,xt>at&&(m="onReverseComplete"))),this._rawPrevTime=this._duration||!Rt||ct||this._rawPrevTime===ct?ct:at,this._yoyo&&1&this._cycle?this._time=ct=0:(this._time=Y,ct=Y+1e-4);else if(1e-7>ct)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(b!==0||Y===0&&xt!==at&&(xt>0||0>ct&&xt>=0)&&!this._locked)&&(m="onReverseComplete",K=this._reversed),0>ct)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(f=K=!0,m="onReverseComplete"):xt>=0&&this._first&&(f=!0),this._rawPrevTime=ct;else{if(this._rawPrevTime=Y||!Rt||ct||this._rawPrevTime===ct?ct:at,ct===0&&K)for(mt=this._first;mt&&mt._startTime===0;)mt._duration||(K=!1),mt=mt._next;ct=0,this._initted||(f=!0)}else if(Y===0&&0>xt&&(f=!0),this._time=this._rawPrevTime=ct,this._locked||(this._totalTime=ct,this._repeat!==0&&(O=Y+this._repeatDelay,this._cycle=this._totalTime/O>>0,this._cycle!==0&&this._cycle===this._totalTime/O&&ct>=pt&&this._cycle--,this._time=this._totalTime-this._cycle*O,this._yoyo&&1&this._cycle&&(this._time=Y-this._time),this._time>Y?(this._time=Y,ct=Y+1e-4):this._time<0?this._time=ct=0:ct=this._time)),this._hasPause&&!this._forcingPlayhead&&!Rt){if(ct=this._time,ct>=b||this._repeat&&kt!==this._cycle)for(mt=this._first;mt&&mt._startTime<=ct&&!x;)mt._duration||mt.data!=="isPause"||mt.ratio||mt._startTime===0&&this._rawPrevTime===0||(x=mt),mt=mt._next;else for(mt=this._last;mt&&mt._startTime>=ct&&!x;)mt._duration||mt.data==="isPause"&&mt._rawPrevTime>0&&(x=mt),mt=mt._prev;x&&x._startTime<Y&&(this._time=ct=x._startTime,this._totalTime=ct+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==kt&&!this._locked){var ie=this._yoyo&&(1&kt)!==0,lt=ie===(this._yoyo&&(1&this._cycle)!==0),Vt=this._totalTime,Me=this._cycle,gi=this._rawPrevTime,Lt=this._time;if(this._totalTime=kt*Y,this._cycle<kt?ie=!ie:this._totalTime+=Y,this._time=b,this._rawPrevTime=Y===0?xt-1e-4:xt,this._cycle=kt,this._locked=!0,b=ie?0:Y,this.render(b,Rt,Y===0),Rt||this._gc||this.vars.onRepeat&&(this._cycle=Me,this._locked=!1,this._callback("onRepeat")),b!==this._time||(lt&&(this._cycle=kt,this._locked=!0,b=ie?Y+1e-4:-1e-4,this.render(b,!0,!1)),this._locked=!1,this._paused&&!Gt))return;this._time=Lt,this._totalTime=Vt,this._cycle=Me,this._rawPrevTime=gi}if(!(this._time!==b&&this._first||zt||f||x))return void(pt!==this._totalTime&&this._onUpdate&&(Rt||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==pt&&ct>0&&(this._active=!0),pt===0&&this.vars.onStart&&(this._totalTime===0&&this._totalDuration||Rt||this._callback("onStart")),X=this._time,X>=b)for(mt=this._first;mt&&(H=mt._next,X===this._time&&(!this._paused||Gt));)(mt._active||mt._startTime<=this._time&&!mt._paused&&!mt._gc)&&(x===mt&&this.pause(),mt._reversed?mt.render((mt._dirty?mt.totalDuration():mt._totalDuration)-(ct-mt._startTime)*mt._timeScale,Rt,zt):mt.render((ct-mt._startTime)*mt._timeScale,Rt,zt)),mt=H;else for(mt=this._last;mt&&(H=mt._prev,X===this._time&&(!this._paused||Gt));){if(mt._active||mt._startTime<=b&&!mt._paused&&!mt._gc){if(x===mt){for(x=mt._prev;x&&x.endTime()>this._time;)x.render(x._reversed?x.totalDuration()-(ct-x._startTime)*x._timeScale:(ct-x._startTime)*x._timeScale,Rt,zt),x=x._prev;x=null,this.pause()}mt._reversed?mt.render((mt._dirty?mt.totalDuration():mt._totalDuration)-(ct-mt._startTime)*mt._timeScale,Rt,zt):mt.render((ct-mt._startTime)*mt._timeScale,Rt,zt)}mt=H}this._onUpdate&&(Rt||(_t.length&&Ot(),this._callback("onUpdate"))),m&&(this._locked||this._gc||(tt===this._startTime||At!==this._timeScale)&&(this._time===0||F>=this.totalDuration())&&(K&&(_t.length&&Ot(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!Rt&&this.vars[m]&&this._callback(m)))},Mt.getActive=function(ct,Rt,zt){ct==null&&(ct=!0),Rt==null&&(Rt=!0),zt==null&&(zt=!1);var mt,K,H=[],m=this.getChildren(ct,Rt,zt),f=0,O=m.length;for(mt=0;O>mt;mt++)K=m[mt],K.isActive()&&(H[f++]=K);return H},Mt.getLabelAfter=function(ct){ct||ct!==0&&(ct=this._time);var Rt,zt=this.getLabelsArray(),mt=zt.length;for(Rt=0;mt>Rt;Rt++)if(zt[Rt].time>ct)return zt[Rt].name;return null},Mt.getLabelBefore=function(ct){ct==null&&(ct=this._time);for(var Rt=this.getLabelsArray(),zt=Rt.length;--zt>-1;)if(Rt[zt].time<ct)return Rt[zt].name;return null},Mt.getLabelsArray=function(){var ct,Rt=[],zt=0;for(ct in this._labels)Rt[zt++]={time:this._labels[ct],name:ct};return Rt.sort(function(mt,K){return mt.time-K.time}),Rt},Mt.invalidate=function(){return this._locked=!1,p.prototype.invalidate.call(this)},Mt.progress=function(ct,Rt){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-ct:ct)+this._cycle*(this._duration+this._repeatDelay),Rt):this._time/this.duration()||0},Mt.totalProgress=function(ct,Rt){return arguments.length?this.totalTime(this.totalDuration()*ct,Rt):this._totalTime/this.totalDuration()||0},Mt.totalDuration=function(ct){return arguments.length?this._repeat!==-1&&ct?this.timeScale(this.totalDuration()/ct):this:(this._dirty&&(p.prototype.totalDuration.call(this),this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},Mt.time=function(ct,Rt){return arguments.length?(this._dirty&&this.totalDuration(),ct>this._duration&&(ct=this._duration),this._yoyo&&1&this._cycle?ct=this._duration-ct+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(ct+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(ct,Rt)):this._time},Mt.repeat=function(ct){return arguments.length?(this._repeat=ct,this._uncache(!0)):this._repeat},Mt.repeatDelay=function(ct){return arguments.length?(this._repeatDelay=ct,this._uncache(!0)):this._repeatDelay},Mt.yoyo=function(ct){return arguments.length?(this._yoyo=ct,this):this._yoyo},Mt.currentLabel=function(ct){return arguments.length?this.seek(ct,!0):this.getLabelBefore(this._time+1e-8)},gt},!0),function(){var p=180/Math.PI,bt=[],$=[],gt=[],at={},M=$e._gsDefine.globals,_t=function(m,f,O,x){O===x&&(O=x-(x-f)/1e6),m===f&&(f=m+(O-m)/1e6),this.a=m,this.b=f,this.c=O,this.d=x,this.da=x-m,this.ca=O-m,this.ba=f-m},Ot=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",Z=function(m,f,O,x){var X={a:m},b={},F={},Y={c:x},pt=(m+f)/2,tt=(f+O)/2,At=(O+x)/2,xt=(pt+tt)/2,Gt=(tt+At)/2,kt=(Gt-xt)/8;return X.b=pt+(m-pt)/4,b.b=xt+kt,X.c=b.a=(X.b+b.b)/2,b.c=F.a=(xt+Gt)/2,F.b=Gt-kt,Y.b=At+(x-At)/4,F.c=Y.a=(F.b+Y.b)/2,[X,b,F,Y]},ht=function(m,f,O,x,X){var b,F,Y,pt,tt,At,xt,Gt,kt,ie,lt,Vt,Me,gi=m.length-1,Lt=0,Fe=m[0].a;for(b=0;gi>b;b++)tt=m[Lt],F=tt.a,Y=tt.d,pt=m[Lt+1].d,X?(lt=bt[b],Vt=$[b],Me=(Vt+lt)*f*.25/(x?.5:gt[b]||.5),At=Y-(Y-F)*(x?.5*f:lt!==0?Me/lt:0),xt=Y+(pt-Y)*(x?.5*f:Vt!==0?Me/Vt:0),Gt=Y-(At+((xt-At)*(3*lt/(lt+Vt)+.5)/4||0))):(At=Y-(Y-F)*f*.5,xt=Y+(pt-Y)*f*.5,Gt=Y-(At+xt)/2),At+=Gt,xt+=Gt,tt.c=kt=At,b!==0?tt.b=Fe:tt.b=Fe=tt.a+.6*(tt.c-tt.a),tt.da=Y-F,tt.ca=kt-F,tt.ba=Fe-F,O?(ie=Z(F,Fe,kt,Y),m.splice(Lt,1,ie[0],ie[1],ie[2],ie[3]),Lt+=4):Lt++,Fe=xt;tt=m[Lt],tt.b=Fe,tt.c=Fe+.4*(tt.d-Fe),tt.da=tt.d-tt.a,tt.ca=tt.c-tt.a,tt.ba=Fe-tt.a,O&&(ie=Z(tt.a,Fe,tt.c,tt.d),m.splice(Lt,1,ie[0],ie[1],ie[2],ie[3]))},Mt=function(m,f,O,x){var X,b,F,Y,pt,tt,At=[];if(x)for(m=[x].concat(m),b=m.length;--b>-1;)typeof(tt=m[b][f])=="string"&&tt.charAt(1)==="="&&(m[b][f]=x[f]+Number(tt.charAt(0)+tt.substr(2)));if(X=m.length-2,0>X)return At[0]=new _t(m[0][f],0,0,m[0][f]),At;for(b=0;X>b;b++)F=m[b][f],Y=m[b+1][f],At[b]=new _t(F,0,0,Y),O&&(pt=m[b+2][f],bt[b]=(bt[b]||0)+(Y-F)*(Y-F),$[b]=($[b]||0)+(pt-Y)*(pt-Y));return At[b]=new _t(m[b][f],0,0,m[b+1][f]),At},ct=function(m,f,O,x,X,b){var F,Y,pt,tt,At,xt,Gt,kt,ie={},lt=[],Vt=b||m[0];X=typeof X=="string"?","+X+",":Ot,f==null&&(f=1);for(Y in m[0])lt.push(Y);if(m.length>1){for(kt=m[m.length-1],Gt=!0,F=lt.length;--F>-1;)if(Y=lt[F],Math.abs(Vt[Y]-kt[Y])>.05){Gt=!1;break}Gt&&(m=m.concat(),b&&m.unshift(b),m.push(m[1]),b=m[m.length-3])}for(bt.length=$.length=gt.length=0,F=lt.length;--F>-1;)Y=lt[F],at[Y]=X.indexOf(","+Y+",")!==-1,ie[Y]=Mt(m,Y,at[Y],b);for(F=bt.length;--F>-1;)bt[F]=Math.sqrt(bt[F]),$[F]=Math.sqrt($[F]);if(!x){for(F=lt.length;--F>-1;)if(at[Y])for(pt=ie[lt[F]],xt=pt.length-1,tt=0;xt>tt;tt++)At=pt[tt+1].da/$[tt]+pt[tt].da/bt[tt]||0,gt[tt]=(gt[tt]||0)+At*At;for(F=gt.length;--F>-1;)gt[F]=Math.sqrt(gt[F])}for(F=lt.length,tt=O?4:1;--F>-1;)Y=lt[F],pt=ie[Y],ht(pt,f,O,x,at[Y]),Gt&&(pt.splice(0,tt),pt.splice(pt.length-tt,tt));return ie},Rt=function(m,f,O){f=f||"soft";var x,X,b,F,Y,pt,tt,At,xt,Gt,kt,ie={},lt=f==="cubic"?3:2,Vt=f==="soft",Me=[];if(Vt&&O&&(m=[O].concat(m)),m==null||m.length<lt+1)throw"invalid Bezier data";for(xt in m[0])Me.push(xt);for(pt=Me.length;--pt>-1;){for(xt=Me[pt],ie[xt]=Y=[],Gt=0,At=m.length,tt=0;At>tt;tt++)x=O==null?m[tt][xt]:typeof(kt=m[tt][xt])=="string"&&kt.charAt(1)==="="?O[xt]+Number(kt.charAt(0)+kt.substr(2)):Number(kt),Vt&&tt>1&&At-1>tt&&(Y[Gt++]=(x+Y[Gt-2])/2),Y[Gt++]=x;for(At=Gt-lt+1,Gt=0,tt=0;At>tt;tt+=lt)x=Y[tt],X=Y[tt+1],b=Y[tt+2],F=lt===2?0:Y[tt+3],Y[Gt++]=kt=lt===3?new _t(x,X,b,F):new _t(x,(2*X+x)/3,(2*X+b)/3,b);Y.length=Gt}return ie},zt=function(m,f,O){for(var x,X,b,F,Y,pt,tt,At,xt,Gt,kt,ie=1/O,lt=m.length;--lt>-1;)for(Gt=m[lt],b=Gt.a,F=Gt.d-b,Y=Gt.c-b,pt=Gt.b-b,x=X=0,At=1;O>=At;At++)tt=ie*At,xt=1-tt,x=X-(X=(tt*tt*F+3*xt*(tt*Y+xt*pt))*tt),kt=lt*O+At-1,f[kt]=(f[kt]||0)+x*x},mt=function(m,f){f=f>>0||6;var O,x,X,b,F=[],Y=[],pt=0,tt=0,At=f-1,xt=[],Gt=[];for(O in m)zt(m[O],F,f);for(X=F.length,x=0;X>x;x++)pt+=Math.sqrt(F[x]),b=x%f,Gt[b]=pt,b===At&&(tt+=pt,b=x/f>>0,xt[b]=Gt,Y[b]=tt,pt=0,Gt=[]);return{length:tt,lengths:Y,segments:xt}},K=$e._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(m,f,O){this._target=m,f instanceof Array&&(f={values:f}),this._func={},this._mod={},this._props=[],this._timeRes=f.timeResolution==null?6:parseInt(f.timeResolution,10);var x,X,b,F,Y,pt=f.values||[],tt={},At=pt[0],xt=f.autoRotate||O.vars.orientToBezier;this._autoRotate=xt?xt instanceof Array?xt:[["x","y","rotation",xt===!0?0:Number(xt)||0]]:null;for(x in At)this._props.push(x);for(b=this._props.length;--b>-1;)x=this._props[b],this._overwriteProps.push(x),X=this._func[x]=typeof m[x]=="function",tt[x]=X?m[x.indexOf("set")||typeof m["get"+x.substr(3)]!="function"?x:"get"+x.substr(3)]():parseFloat(m[x]),Y||tt[x]!==pt[0][x]&&(Y=tt);if(this._beziers=f.type!=="cubic"&&f.type!=="quadratic"&&f.type!=="soft"?ct(pt,isNaN(f.curviness)?1:f.curviness,!1,f.type==="thruBasic",f.correlate,Y):Rt(pt,f.type,tt),this._segCount=this._beziers[x].length,this._timeRes){var Gt=mt(this._beziers,this._timeRes);this._length=Gt.length,this._lengths=Gt.lengths,this._segments=Gt.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(xt=this._autoRotate)for(this._initialRotations=[],xt[0]instanceof Array||(this._autoRotate=xt=[xt]),b=xt.length;--b>-1;){for(F=0;3>F;F++)x=xt[b][F],this._func[x]=typeof m[x]=="function"?m[x.indexOf("set")||typeof m["get"+x.substr(3)]!="function"?x:"get"+x.substr(3)]:!1;x=xt[b][2],this._initialRotations[b]=(this._func[x]?this._func[x].call(this._target):this._target[x])||0,this._overwriteProps.push(x)}return this._startRatio=O.vars.runBackwards?1:0,!0},set:function(m){var f,O,x,X,b,F,Y,pt,tt,At,xt=this._segCount,Gt=this._func,kt=this._target,ie=m!==this._startRatio;if(this._timeRes){if(tt=this._lengths,At=this._curSeg,m*=this._length,x=this._li,m>this._l2&&xt-1>x){for(pt=xt-1;pt>x&&(this._l2=tt[++x])<=m;);this._l1=tt[x-1],this._li=x,this._curSeg=At=this._segments[x],this._s2=At[this._s1=this._si=0]}else if(m<this._l1&&x>0){for(;x>0&&(this._l1=tt[--x])>=m;);x===0&&m<this._l1?this._l1=0:x++,this._l2=tt[x],this._li=x,this._curSeg=At=this._segments[x],this._s1=At[(this._si=At.length-1)-1]||0,this._s2=At[this._si]}if(f=x,m-=this._l1,x=this._si,m>this._s2&&x<At.length-1){for(pt=At.length-1;pt>x&&(this._s2=At[++x])<=m;);this._s1=At[x-1],this._si=x}else if(m<this._s1&&x>0){for(;x>0&&(this._s1=At[--x])>=m;);x===0&&m<this._s1?this._s1=0:x++,this._s2=At[x],this._si=x}F=(x+(m-this._s1)/(this._s2-this._s1))*this._prec||0}else f=0>m?0:m>=1?xt-1:xt*m>>0,F=(m-f*(1/xt))*xt;for(O=1-F,x=this._props.length;--x>-1;)X=this._props[x],b=this._beziers[X][f],Y=(F*F*b.da+3*O*(F*b.ca+O*b.ba))*F+b.a,this._mod[X]&&(Y=this._mod[X](Y,kt)),Gt[X]?kt[X](Y):kt[X]=Y;if(this._autoRotate){var lt,Vt,Me,gi,Lt,Fe,vi,Ti=this._autoRotate;for(x=Ti.length;--x>-1;)X=Ti[x][2],Fe=Ti[x][3]||0,vi=Ti[x][4]===!0?1:p,b=this._beziers[Ti[x][0]],lt=this._beziers[Ti[x][1]],b&<&&(b=b[f],lt=lt[f],Vt=b.a+(b.b-b.a)*F,gi=b.b+(b.c-b.b)*F,Vt+=(gi-Vt)*F,gi+=(b.c+(b.d-b.c)*F-gi)*F,Me=lt.a+(lt.b-lt.a)*F,Lt=lt.b+(lt.c-lt.b)*F,Me+=(Lt-Me)*F,Lt+=(lt.c+(lt.d-lt.c)*F-Lt)*F,Y=ie?Math.atan2(Lt-Me,gi-Vt)*vi+Fe:this._initialRotations[x],this._mod[X]&&(Y=this._mod[X](Y,kt)),Gt[X]?kt[X](Y):kt[X]=Y)}}}),H=K.prototype;K.bezierThrough=ct,K.cubicToQuadratic=Z,K._autoCSS=!0,K.quadraticToCubic=function(m,f,O){return new _t(m,(2*f+m)/3,(2*f+O)/3,O)},K._cssRegister=function(){var m=M.CSSPlugin;if(m){var f=m._internals,O=f._parseToProxy,x=f._setPluginRatio,X=f.CSSPropTween;f._registerComplexSpecialProp("bezier",{parser:function(b,F,Y,pt,tt,At){F instanceof Array&&(F={values:F}),At=new K;var xt,Gt,kt,ie=F.values,lt=ie.length-1,Vt=[],Me={};if(0>lt)return tt;for(xt=0;lt>=xt;xt++)kt=O(b,ie[xt],pt,tt,At,lt!==xt),Vt[xt]=kt.end;for(Gt in F)Me[Gt]=F[Gt];return Me.values=Vt,tt=new X(b,"bezier",0,0,kt.pt,2),tt.data=kt,tt.plugin=At,tt.setRatio=x,Me.autoRotate===0&&(Me.autoRotate=!0),!Me.autoRotate||Me.autoRotate instanceof Array||(xt=Me.autoRotate===!0?0:Number(Me.autoRotate),Me.autoRotate=kt.end.left!=null?[["left","top","rotation",xt,!1]]:kt.end.x!=null?[["x","y","rotation",xt,!1]]:!1),Me.autoRotate&&(pt._transform||pt._enableTransforms(!1),kt.autoRotate=pt._target._gsTransform,kt.proxy.rotation=kt.autoRotate.rotation||0,pt._overwriteProps.push("rotation")),At._onInitTween(kt.proxy,Me,pt._tween),tt}})}},H._mod=function(m){for(var f,O=this._overwriteProps,x=O.length;--x>-1;)f=m[O[x]],f&&typeof f=="function"&&(this._mod[O[x]]=f)},H._kill=function(m){var f,O,x=this._props;for(f in this._beziers)if(f in m)for(delete this._beziers[f],delete this._func[f],O=x.length;--O>-1;)x[O]===f&&x.splice(O,1);if(x=this._autoRotate)for(O=x.length;--O>-1;)m[x[O][2]]&&x.splice(O,1);return this._super._kill.call(this,m)}}(),$e._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(p,bt){var $,gt,at,M,_t=function(){p.call(this,"css"),this._overwriteProps.length=0,this.setRatio=_t.prototype.setRatio},Ot=$e._gsDefine.globals,Z={},ht=_t.prototype=new p("css");ht.constructor=_t,_t.version="2.0.2",_t.API=2,_t.defaultTransformPerspective=0,_t.defaultSkewType="compensated",_t.defaultSmoothOrigin=!0,ht="px",_t.suffixMap={top:ht,right:ht,bottom:ht,left:ht,width:ht,height:ht,fontSize:ht,padding:ht,margin:ht,perspective:ht,lineHeight:""};var Mt,ct,Rt,zt,mt,K,H,m,f=/(?:\-|\.|\b)(\d|\.|e\-)+/g,O=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,x=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,X=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,b=/(?:\d|\-|\+|=|#|\.)*/g,F=/opacity *= *([^)]*)/i,Y=/opacity:([^;]*)/i,pt=/alpha\(opacity *=.+?\)/i,tt=/^(rgb|hsl)/,At=/([A-Z])/g,xt=/-([a-z])/gi,Gt=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,kt=function(v,E){return E.toUpperCase()},ie=/(?:Left|Right|Width)/i,lt=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,Vt=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,Me=/,(?=[^\)]*(?:\(|$))/gi,gi=/[\s,\(]/i,Lt=Math.PI/180,Fe=180/Math.PI,vi={},Ti={style:{}},oi=$e.document||{createElement:function(){return Ti}},fe=function(v,E){return oi.createElementNS?oi.createElementNS(E||"http://www.w3.org/1999/xhtml",v):oi.createElement(v)},Je=fe("div"),Ri=fe("img"),be=_t._internals={_specialProps:Z},Ve=($e.navigator||{}).userAgent||"",Ke=function(){var v=Ve.indexOf("Android"),E=fe("a");return Rt=Ve.indexOf("Safari")!==-1&&Ve.indexOf("Chrome")===-1&&(v===-1||parseFloat(Ve.substr(v+8,2))>3),mt=Rt&&parseFloat(Ve.substr(Ve.indexOf("Version/")+8,2))<6,zt=Ve.indexOf("Firefox")!==-1,(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Ve)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Ve))&&(K=parseFloat(RegExp.$1)),E?(E.style.cssText="top:1px;opacity:.55;",/^0.55/.test(E.style.opacity)):!1}(),Mn=function(v){return F.test(typeof v=="string"?v:(v.currentStyle?v.currentStyle.filter:v.style.filter)||"")?parseFloat(RegExp.$1)/100:1},Cn=function(v){$e.console&&console.log(v)},ji="",Ii="",en=function(v,E){E=E||Je;var R,L,y=E.style;if(y[v]!==void 0)return v;for(v=v.charAt(0).toUpperCase()+v.substr(1),R=["O","Moz","ms","Ms","Webkit"],L=5;--L>-1&&y[R[L]+v]===void 0;);return L>=0?(Ii=L===3?"ms":R[L],ji="-"+Ii.toLowerCase()+"-",Ii+v):null},ci=(typeof window<"u"?window:oi.defaultView||{getComputedStyle:function(){}}).getComputedStyle,Oe=_t.getStyle=function(v,E,R,L,y){var W;return Ke||E!=="opacity"?(!L&&v.style[E]?W=v.style[E]:(R=R||ci(v))?W=R[E]||R.getPropertyValue(E)||R.getPropertyValue(E.replace(At,"-$1").toLowerCase()):v.currentStyle&&(W=v.currentStyle[E]),y==null||W&&W!=="none"&&W!=="auto"&&W!=="auto auto"?W:y):Mn(v)},Si=be.convertToPixels=function(v,E,R,L,y){if(L==="px"||!L&&E!=="lineHeight")return R;if(L==="auto"||!R)return 0;var W,C,Q,rt=ie.test(E),it=v,j=Je.style,St=0>R,Et=R===1;if(St&&(R=-R),Et&&(R*=100),E!=="lineHeight"||L)if(L==="%"&&E.indexOf("border")!==-1)W=R/100*(rt?v.clientWidth:v.clientHeight);else{if(j.cssText="border:0 solid red;position:"+Oe(v,"position")+";line-height:0;",L!=="%"&&it.appendChild&&L.charAt(0)!=="v"&&L!=="rem")j[rt?"borderLeftWidth":"borderTopWidth"]=R+L;else{if(it=v.parentNode||oi.body,Oe(it,"display").indexOf("flex")!==-1&&(j.position="absolute"),C=it._gsCache,Q=bt.ticker.frame,C&&rt&&C.time===Q)return C.width*R/100;j[rt?"width":"height"]=R+L}it.appendChild(Je),W=parseFloat(Je[rt?"offsetWidth":"offsetHeight"]),it.removeChild(Je),rt&&L==="%"&&_t.cacheWidths!==!1&&(C=it._gsCache=it._gsCache||{},C.time=Q,C.width=W/R*100),W!==0||y||(W=Si(v,E,R,L,!0))}else C=ci(v).lineHeight,v.style.lineHeight=R,W=parseFloat(ci(v).lineHeight),v.style.lineHeight=C;return Et&&(W/=100),St?-W:W},Tn=be.calculateOffset=function(v,E,R){if(Oe(v,"position",R)!=="absolute")return 0;var L=E==="left"?"Left":"Top",y=Oe(v,"margin"+L,R);return v["offset"+L]-(Si(v,E,parseFloat(y),y.replace(b,""))||0)},nn=function(v,E){var R,L,y,W={};if(E=E||ci(v,null))if(R=E.length)for(;--R>-1;)y=E[R],(y.indexOf("-transform")===-1||zr===y)&&(W[y.replace(xt,kt)]=E.getPropertyValue(y));else for(R in E)(R.indexOf("Transform")===-1||ui===R)&&(W[R]=E[R]);else if(E=v.currentStyle||v.style)for(R in E)typeof R=="string"&&W[R]===void 0&&(W[R.replace(xt,kt)]=E[R]);return Ke||(W.opacity=Mn(v)),L=sn(v,E,!1),W.rotation=L.rotation,W.skewX=L.skewX,W.scaleX=L.scaleX,W.scaleY=L.scaleY,W.x=L.x,W.y=L.y,Gi&&(W.z=L.z,W.rotationX=L.rotationX,W.rotationY=L.rotationY,W.scaleZ=L.scaleZ),W.filters&&delete W.filters,W},Ci=function(v,E,R,L,y){var W,C,Q,rt={},it=v.style;for(C in R)C!=="cssText"&&C!=="length"&&isNaN(C)&&(E[C]!==(W=R[C])||y&&y[C])&&C.indexOf("Origin")===-1&&(typeof W=="number"||typeof W=="string")&&(rt[C]=W!=="auto"||C!=="left"&&C!=="top"?W!==""&&W!=="auto"&&W!=="none"||typeof E[C]!="string"||E[C].replace(X,"")===""?W:0:Tn(v,C),it[C]!==void 0&&(Q=new Ce(it,C,it[C],Q)));if(L)for(C in L)C!=="className"&&(rt[C]=L[C]);return{difs:rt,firstMPT:Q}},_={width:["Left","Right"],height:["Top","Bottom"]},D=["marginLeft","marginRight","marginTop","marginBottom"],B=function(v,E,R){if((v.nodeName+"").toLowerCase()==="svg")return(R||ci(v))[E]||0;if(v.getCTM&&Br(v))return v.getBBox()[E]||0;var L=parseFloat(E==="width"?v.offsetWidth:v.offsetHeight),y=_[E],W=y.length;for(R=R||ci(v,null);--W>-1;)L-=parseFloat(Oe(v,"padding"+y[W],R,!0))||0,L-=parseFloat(Oe(v,"border"+y[W]+"Width",R,!0))||0;return L},U=function(v,E){if(v==="contain"||v==="auto"||v==="auto auto")return v+" ";(v==null||v==="")&&(v="0 0");var R,L=v.split(" "),y=v.indexOf("left")!==-1?"0%":v.indexOf("right")!==-1?"100%":L[0],W=v.indexOf("top")!==-1?"0%":v.indexOf("bottom")!==-1?"100%":L[1];if(L.length>3&&!E){for(L=v.split(", ").join(",").split(","),v=[],R=0;R<L.length;R++)v.push(U(L[R]));return v.join(",")}return W==null?W=y==="center"?"50%":"0":W==="center"&&(W="50%"),(y==="center"||isNaN(parseFloat(y))&&(y+"").indexOf("=")===-1)&&(y="50%"),v=y+" "+W+(L.length>2?" "+L[2]:""),E&&(E.oxp=y.indexOf("%")!==-1,E.oyp=W.indexOf("%")!==-1,E.oxr=y.charAt(1)==="=",E.oyr=W.charAt(1)==="=",E.ox=parseFloat(y.replace(X,"")),E.oy=parseFloat(W.replace(X,"")),E.v=v),E||v},J=function(v,E){return typeof v=="function"&&(v=v(m,H)),typeof v=="string"&&v.charAt(1)==="="?parseInt(v.charAt(0)+"1",10)*parseFloat(v.substr(2)):parseFloat(v)-parseFloat(E)||0},dt=function(v,E){typeof v=="function"&&(v=v(m,H));var R=typeof v=="string"&&v.charAt(1)==="=";return typeof v=="string"&&v.charAt(v.length-2)==="v"&&(v=(R?v.substr(0,2):0)+window["inner"+(v.substr(-2)==="vh"?"Height":"Width")]*(parseFloat(R?v.substr(2):v)/100)),v==null?E:R?parseInt(v.charAt(0)+"1",10)*parseFloat(v.substr(2))+E:parseFloat(v)||0},Tt=function(v,E,R,L){var y,W,C,Q,rt,it=1e-6;return typeof v=="function"&&(v=v(m,H)),v==null?Q=E:typeof v=="number"?Q=v:(y=360,W=v.split("_"),rt=v.charAt(1)==="=",C=(rt?parseInt(v.charAt(0)+"1",10)*parseFloat(W[0].substr(2)):parseFloat(W[0]))*(v.indexOf("rad")===-1?1:Fe)-(rt?0:E),W.length&&(L&&(L[R]=E+C),v.indexOf("short")!==-1&&(C%=y,C!==C%(y/2)&&(C=0>C?C+y:C-y)),v.indexOf("_cw")!==-1&&0>C?C=(C+9999999999*y)%y-(C/y|0)*y:v.indexOf("ccw")!==-1&&C>0&&(C=(C-9999999999*y)%y-(C/y|0)*y)),Q=E+C),it>Q&&Q>-it&&(Q=0),Q},ut={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ae=function(v,E,R){return v=0>v?v+1:v>1?v-1:v,255*(1>6*v?E+(R-E)*v*6:.5>v?R:2>3*v?E+(R-E)*(2/3-v)*6:E)+.5|0},se=_t.parseColor=function(v,E){var R,L,y,W,C,Q,rt,it,j,St,Et;if(v)if(typeof v=="number")R=[v>>16,v>>8&255,255&v];else{if(v.charAt(v.length-1)===","&&(v=v.substr(0,v.length-1)),ut[v])R=ut[v];else if(v.charAt(0)==="#")v.length===4&&(L=v.charAt(1),y=v.charAt(2),W=v.charAt(3),v="#"+L+L+y+y+W+W),v=parseInt(v.substr(1),16),R=[v>>16,v>>8&255,255&v];else if(v.substr(0,3)==="hsl")if(R=Et=v.match(f),E){if(v.indexOf("=")!==-1)return v.match(O)}else C=Number(R[0])%360/360,Q=Number(R[1])/100,rt=Number(R[2])/100,y=.5>=rt?rt*(Q+1):rt+Q-rt*Q,L=2*rt-y,R.length>3&&(R[3]=Number(R[3])),R[0]=ae(C+1/3,L,y),R[1]=ae(C,L,y),R[2]=ae(C-1/3,L,y);else R=v.match(f)||ut.transparent;R[0]=Number(R[0]),R[1]=Number(R[1]),R[2]=Number(R[2]),R.length>3&&(R[3]=Number(R[3]))}else R=ut.black;return E&&!Et&&(L=R[0]/255,y=R[1]/255,W=R[2]/255,it=Math.max(L,y,W),j=Math.min(L,y,W),rt=(it+j)/2,it===j?C=Q=0:(St=it-j,Q=rt>.5?St/(2-it-j):St/(it+j),C=it===L?(y-W)/St+(W>y?6:0):it===y?(W-L)/St+2:(L-y)/St+4,C*=60),R[0]=C+.5|0,R[1]=100*Q+.5|0,R[2]=100*rt+.5|0),R},Ut=function(v,E){var R,L,y,W=v.match(he)||[],C=0,Q="";if(!W.length)return v;for(R=0;R<W.length;R++)L=W[R],y=v.substr(C,v.indexOf(L,C)-C),C+=y.length+L.length,L=se(L,E),L.length===3&&L.push(1),Q+=y+(E?"hsla("+L[0]+","+L[1]+"%,"+L[2]+"%,"+L[3]:"rgba("+L.join(","))+")";return Q+v.substr(C)},he="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(ht in ut)he+="|"+ht+"\\b";he=new RegExp(he+")","gi"),_t.colorStringFilter=function(v){var E,R=v[0]+" "+v[1];he.test(R)&&(E=R.indexOf("hsl(")!==-1||R.indexOf("hsla(")!==-1,v[0]=Ut(v[0],E),v[1]=Ut(v[1],E)),he.lastIndex=0},bt.defaultStringFilter||(bt.defaultStringFilter=_t.colorStringFilter);var ze=function(v,E,R,L){if(v==null)return function(Et){return Et};var y,W=E?(v.match(he)||[""])[0]:"",C=v.split(W).join("").match(x)||[],Q=v.substr(0,v.indexOf(C[0])),rt=v.charAt(v.length-1)===")"?")":"",it=v.indexOf(" ")!==-1?" ":",",j=C.length,St=j>0?C[0].replace(f,""):"";return j?y=E?function(Et){var vt,Nt,Pt,oe;if(typeof Et=="number")Et+=St;else if(L&&Me.test(Et)){for(oe=Et.replace(Me,"|").split("|"),Pt=0;Pt<oe.length;Pt++)oe[Pt]=y(oe[Pt]);return oe.join(",")}if(vt=(Et.match(he)||[W])[0],Nt=Et.split(vt).join("").match(x)||[],Pt=Nt.length,j>Pt--)for(;++Pt<j;)Nt[Pt]=R?Nt[(Pt-1)/2|0]:C[Pt];return Q+Nt.join(it)+it+vt+rt+(Et.indexOf("inset")!==-1?" inset":"")}:function(Et){var vt,Nt,Pt;if(typeof Et=="number")Et+=St;else if(L&&Me.test(Et)){for(Nt=Et.replace(Me,"|").split("|"),Pt=0;Pt<Nt.length;Pt++)Nt[Pt]=y(Nt[Pt]);return Nt.join(",")}if(vt=Et.match(x)||[],Pt=vt.length,j>Pt--)for(;++Pt<j;)vt[Pt]=R?vt[(Pt-1)/2|0]:C[Pt];return Q+vt.join(it)+rt}:function(Et){return Et}},Xe=function(v){return v=v.split(","),function(E,R,L,y,W,C,Q){var rt,it=(R+"").split(" ");for(Q={},rt=0;4>rt;rt++)Q[v[rt]]=it[rt]=it[rt]||it[(rt-1)/2>>0];return y.parse(E,Q,W,C)}},Ce=(be._setPluginRatio=function(v){this.plugin.setRatio(v);for(var E,R,L,y,W,C=this.data,Q=C.proxy,rt=C.firstMPT,it=1e-6;rt;)E=Q[rt.v],rt.r?E=rt.r(E):it>E&&E>-it&&(E=0),rt.t[rt.p]=E,rt=rt._next;if(C.autoRotate&&(C.autoRotate.rotation=C.mod?C.mod.call(this._tween,Q.rotation,this.t,this._tween):Q.rotation),v===1||v===0)for(rt=C.firstMPT,W=v===1?"e":"b";rt;){if(R=rt.t,R.type){if(R.type===1){for(y=R.xs0+R.s+R.xs1,L=1;L<R.l;L++)y+=R["xn"+L]+R["xs"+(L+1)];R[W]=y}}else R[W]=R.s+R.xs0;rt=rt._next}},function(v,E,R,L,y){this.t=v,this.p=E,this.v=R,this.r=y,L&&(L._prev=this,this._next=L)}),je=(be._parseToProxy=function(v,E,R,L,y,W){var C,Q,rt,it,j,St=L,Et={},vt={},Nt=R._transform,Pt=vi;for(R._transform=null,vi=E,L=j=R.parse(v,E,L,y),vi=Pt,W&&(R._transform=Nt,St&&(St._prev=null,St._prev&&(St._prev._next=null)));L&&L!==St;){if(L.type<=1&&(Q=L.p,vt[Q]=L.s+L.c,Et[Q]=L.s,W||(it=new Ce(L,"s",Q,it,L.r),L.c=0),L.type===1))for(C=L.l;--C>0;)rt="xn"+C,Q=L.p+"_"+rt,vt[Q]=L.data[rt],Et[Q]=L[rt],W||(it=new Ce(L,rt,Q,it,L.rxp[rt]));L=L._next}return{proxy:Et,end:vt,firstMPT:it,pt:j}},be.CSSPropTween=function(v,E,R,L,y,W,C,Q,rt,it,j){this.t=v,this.p=E,this.s=R,this.c=L,this.n=C||E,v instanceof je||M.push(this.n),this.r=Q&&(typeof Q=="function"?Q:Math.round),this.type=W||0,rt&&(this.pr=rt,$=!0),this.b=it===void 0?R:it,this.e=j===void 0?R+L:j,y&&(this._next=y,y._prev=this)}),gn=function(v,E,R,L,y,W){var C=new je(v,E,R,L-R,y,-1,W);return C.b=R,C.e=C.xs0=L,C},Wi=_t.parseComplex=function(v,E,R,L,y,W,C,Q,rt,it){R=R||W||"",typeof L=="function"&&(L=L(m,H)),C=new je(v,E,0,0,C,it?2:1,null,!1,Q,R,L),L+="",y&&he.test(L+R)&&(L=[R,L],_t.colorStringFilter(L),R=L[0],L=L[1]);var j,St,Et,vt,Nt,Pt,oe,ne,Pe,Kt,Bt,te,Ct,Le=R.split(", ").join(",").split(" "),Zt=L.split(", ").join(",").split(" "),Ft=Le.length,Jt=Mt!==!1;for((L.indexOf(",")!==-1||R.indexOf(",")!==-1)&&((L+R).indexOf("rgb")!==-1||(L+R).indexOf("hsl")!==-1?(Le=Le.join(" ").replace(Me,", ").split(" "),Zt=Zt.join(" ").replace(Me,", ").split(" ")):(Le=Le.join(" ").split(",").join(", ").split(" "),Zt=Zt.join(" ").split(",").join(", ").split(" ")),Ft=Le.length),Ft!==Zt.length&&(Le=(W||"").split(" "),Ft=Le.length),C.plugin=rt,C.setRatio=it,he.lastIndex=0,j=0;Ft>j;j++)if(vt=Le[j],Nt=Zt[j]+"",ne=parseFloat(vt),ne||ne===0)C.appendXtra("",ne,J(Nt,ne),Nt.replace(O,""),Jt&&Nt.indexOf("px")!==-1?Math.round:!1,!0);else if(y&&he.test(vt))te=Nt.indexOf(")")+1,te=")"+(te?Nt.substr(te):""),Ct=Nt.indexOf("hsl")!==-1&&Ke,Kt=Nt,vt=se(vt,Ct),Nt=se(Nt,Ct),Pe=vt.length+Nt.length>6,Pe&&!Ke&&Nt[3]===0?(C["xs"+C.l]+=C.l?" transparent":"transparent",C.e=C.e.split(Zt[j]).join("transparent")):(Ke||(Pe=!1),Ct?C.appendXtra(Kt.substr(0,Kt.indexOf("hsl"))+(Pe?"hsla(":"hsl("),vt[0],J(Nt[0],vt[0]),",",!1,!0).appendXtra("",vt[1],J(Nt[1],vt[1]),"%,",!1).appendXtra("",vt[2],J(Nt[2],vt[2]),Pe?"%,":"%"+te,!1):C.appendXtra(Kt.substr(0,Kt.indexOf("rgb"))+(Pe?"rgba(":"rgb("),vt[0],Nt[0]-vt[0],",",Math.round,!0).appendXtra("",vt[1],Nt[1]-vt[1],",",Math.round).appendXtra("",vt[2],Nt[2]-vt[2],Pe?",":te,Math.round),Pe&&(vt=vt.length<4?1:vt[3],C.appendXtra("",vt,(Nt.length<4?1:Nt[3])-vt,te,!1))),he.lastIndex=0;else if(Pt=vt.match(f)){if(oe=Nt.match(O),!oe||oe.length!==Pt.length)return C;for(Et=0,St=0;St<Pt.length;St++)Bt=Pt[St],Kt=vt.indexOf(Bt,Et),C.appendXtra(vt.substr(Et,Kt-Et),Number(Bt),J(oe[St],Bt),"",Jt&&vt.substr(Kt+Bt.length,2)==="px"?Math.round:!1,St===0),Et=Kt+Bt.length;C["xs"+C.l]+=vt.substr(Et)}else C["xs"+C.l]+=C.l||C["xs"+C.l]?" "+Nt:Nt;if(L.indexOf("=")!==-1&&C.data){for(te=C.xs0+C.data.s,j=1;j<C.l;j++)te+=C["xs"+j]+C.data["xn"+j];C.e=te+C["xs"+j]}return C.l||(C.type=-1,C.xs0=C.e),C.xfirst||C},si=9;for(ht=je.prototype,ht.l=ht.pr=0;--si>0;)ht["xn"+si]=0,ht["xs"+si]="";ht.xs0="",ht._next=ht._prev=ht.xfirst=ht.data=ht.plugin=ht.setRatio=ht.rxp=null,ht.appendXtra=function(v,E,R,L,y,W){var C=this,Q=C.l;return C["xs"+Q]+=W&&(Q||C["xs"+Q])?" "+v:v||"",R||Q===0||C.plugin?(C.l++,C.type=C.setRatio?2:1,C["xs"+C.l]=L||"",Q>0?(C.data["xn"+Q]=E+R,C.rxp["xn"+Q]=y,C["xn"+Q]=E,C.plugin||(C.xfirst=new je(C,"xn"+Q,E,R,C.xfirst||C,0,C.n,y,C.pr),C.xfirst.xs0=0),C):(C.data={s:E+R},C.rxp={},C.s=E,C.c=R,C.r=y,C)):(C["xs"+Q]+=E+(L||""),C)};var Dr=function(v,E){E=E||{},this.p=E.prefix&&en(v)||v,Z[v]=Z[this.p]=this,this.format=E.formatter||ze(E.defaultValue,E.color,E.collapsible,E.multi),E.parser&&(this.parse=E.parser),this.clrs=E.color,this.multi=E.multi,this.keyword=E.keyword,this.dflt=E.defaultValue,this.pr=E.priority||0},Qe=be._registerComplexSpecialProp=function(v,E,R){typeof E!="object"&&(E={parser:R});var L,y=v.split(","),W=E.defaultValue;for(R=R||[W],L=0;L<y.length;L++)E.prefix=L===0&&E.prefix,E.defaultValue=R[L]||W,new Dr(y[L],E)},Ko=be._registerPluginProp=function(v){if(!Z[v]){var E=v.charAt(0).toUpperCase()+v.substr(1)+"Plugin";Qe(v,{parser:function(R,L,y,W,C,Q,rt){var it=Ot.com.greensock.plugins[E];return it?(it._cssRegister(),Z[y].parse(R,L,y,W,C,Q,rt)):(Cn("Error: "+E+" js file not loaded."),C)}})}};ht=Dr.prototype,ht.parseComplex=function(v,E,R,L,y,W){var C,Q,rt,it,j,St,Et=this.keyword;if(this.multi&&(Me.test(R)||Me.test(E)?(Q=E.replace(Me,"|").split("|"),rt=R.replace(Me,"|").split("|")):Et&&(Q=[E],rt=[R])),rt){for(it=rt.length>Q.length?rt.length:Q.length,C=0;it>C;C++)E=Q[C]=Q[C]||this.dflt,R=rt[C]=rt[C]||this.dflt,Et&&(j=E.indexOf(Et),St=R.indexOf(Et),j!==St&&(St===-1?Q[C]=Q[C].split(Et).join(""):j===-1&&(Q[C]+=" "+Et)));E=Q.join(", "),R=rt.join(", ")}return Wi(v,this.p,E,R,this.clrs,this.dflt,L,this.pr,y,W)},ht.parse=function(v,E,R,L,y,W,C){return this.parseComplex(v.style,this.format(Oe(v,this.p,at,!1,this.dflt)),this.format(E),y,W)},_t.registerSpecialProp=function(v,E,R){Qe(v,{parser:function(L,y,W,C,Q,rt,it){var j=new je(L,W,0,0,Q,2,W,!1,R);return j.plugin=rt,j.setRatio=E(L,y,C._tween,W),j},priority:R})},_t.useSVGTransformAttr=!0;var rn,Mo="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),ui=en("transform"),zr=ji+"transform",bn=en("transformOrigin"),Gi=en("perspective")!==null,Kn=be.Transform=function(){this.perspective=parseFloat(_t.defaultTransformPerspective)||0,this.force3D=_t.defaultForce3D!==!1&&Gi?_t.defaultForce3D||"auto":!1},ts=$e.SVGElement,To=function(v,E,R){var L,y=oi.createElementNS("http://www.w3.org/2000/svg",v),W=/([a-z])([A-Z])/g;for(L in R)y.setAttributeNS(null,L.replace(W,"$1-$2").toLowerCase(),R[L]);return E.appendChild(y),y},Sn=oi.documentElement||{},es=function(){var v,E,R,L=K||/Android/i.test(Ve)&&!$e.chrome;return oi.createElementNS&&!L&&(v=To("svg",Sn),E=To("rect",v,{width:100,height:50,x:100}),R=E.getBoundingClientRect().width,E.style[bn]="50% 50%",E.style[ui]="scaleX(0.5)",L=R===E.getBoundingClientRect().width&&!(zt&&Gi),Sn.removeChild(v)),L}(),tr=function(v,E,R,L,y,W){var C,Q,rt,it,j,St,Et,vt,Nt,Pt,oe,ne,Pe,Kt,Bt=v._gsTransform,te=ir(v,!0);Bt&&(Pe=Bt.xOrigin,Kt=Bt.yOrigin),(!L||(C=L.split(" ")).length<2)&&(Et=v.getBBox(),Et.x===0&&Et.y===0&&Et.width+Et.height===0&&(Et={x:parseFloat(v.hasAttribute("x")?v.getAttribute("x"):v.hasAttribute("cx")?v.getAttribute("cx"):0)||0,y:parseFloat(v.hasAttribute("y")?v.getAttribute("y"):v.hasAttribute("cy")?v.getAttribute("cy"):0)||0,width:0,height:0}),E=U(E).split(" "),C=[(E[0].indexOf("%")!==-1?parseFloat(E[0])/100*Et.width:parseFloat(E[0]))+Et.x,(E[1].indexOf("%")!==-1?parseFloat(E[1])/100*Et.height:parseFloat(E[1]))+Et.y]),R.xOrigin=it=parseFloat(C[0]),R.yOrigin=j=parseFloat(C[1]),L&&te!==er&&(St=te[0],Et=te[1],vt=te[2],Nt=te[3],Pt=te[4],oe=te[5],ne=St*Nt-Et*vt,ne&&(Q=it*(Nt/ne)+j*(-vt/ne)+(vt*oe-Nt*Pt)/ne,rt=it*(-Et/ne)+j*(St/ne)-(St*oe-Et*Pt)/ne,it=R.xOrigin=C[0]=Q,j=R.yOrigin=C[1]=rt)),Bt&&(W&&(R.xOffset=Bt.xOffset,R.yOffset=Bt.yOffset,Bt=R),y||y!==!1&&_t.defaultSmoothOrigin!==!1?(Q=it-Pe,rt=j-Kt,Bt.xOffset+=Q*te[0]+rt*te[2]-Q,Bt.yOffset+=Q*te[1]+rt*te[3]-rt):Bt.xOffset=Bt.yOffset=0),W||v.setAttribute("data-svg-origin",C.join(" "))},Nr=function(v){var E,R=fe("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),L=this.parentNode,y=this.nextSibling,W=this.style.cssText;if(Sn.appendChild(R),R.appendChild(this),this.style.display="block",v)try{E=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Nr}catch{}else this._originalGetBBox&&(E=this._originalGetBBox());return y?L.insertBefore(this,y):L.appendChild(this),Sn.removeChild(R),this.style.cssText=W,E},on=function(v){try{return v.getBBox()}catch{return Nr.call(v,!0)}},Br=function(v){return!(!ts||!v.getCTM||v.parentNode&&!v.ownerSVGElement||!on(v))},er=[1,0,0,1,0,0],ir=function(v,E){var R,L,y,W,C,Q,rt=v._gsTransform||new Kn,it=1e5,j=v.style;if(ui?L=Oe(v,zr,null,!0):v.currentStyle&&(L=v.currentStyle.filter.match(lt),L=L&&L.length===4?[L[0].substr(4),Number(L[2].substr(4)),Number(L[1].substr(4)),L[3].substr(4),rt.x||0,rt.y||0].join(","):""),R=!L||L==="none"||L==="matrix(1, 0, 0, 1, 0, 0)",!ui||!(Q=!ci(v)||ci(v).display==="none")&&v.parentNode||(Q&&(W=j.display,j.display="block"),v.parentNode||(C=1,Sn.appendChild(v)),L=Oe(v,zr,null,!0),R=!L||L==="none"||L==="matrix(1, 0, 0, 1, 0, 0)",W?j.display=W:Q&&On(j,"display"),C&&Sn.removeChild(v)),(rt.svg||v.getCTM&&Br(v))&&(R&&(j[ui]+"").indexOf("matrix")!==-1&&(L=j[ui],R=0),y=v.getAttribute("transform"),R&&y&&(y=v.transform.baseVal.consolidate().matrix,L="matrix("+y.a+","+y.b+","+y.c+","+y.d+","+y.e+","+y.f+")",R=0)),R)return er;for(y=(L||"").match(f)||[],si=y.length;--si>-1;)W=Number(y[si]),y[si]=(C=W-(W|=0))?(C*it+(0>C?-.5:.5)|0)/it+W:W;return E&&y.length>6?[y[0],y[1],y[4],y[5],y[12],y[13]]:y},sn=be.getTransform=function(v,E,R,L){if(v._gsTransform&&R&&!L)return v._gsTransform;var y,W,C,Q,rt,it,j=R?v._gsTransform||new Kn:new Kn,St=j.scaleX<0,Et=2e-5,vt=1e5,Nt=Gi&&(parseFloat(Oe(v,bn,E,!1,"0 0 0").split(" ")[2])||j.zOrigin)||0,Pt=parseFloat(_t.defaultTransformPerspective)||0;if(j.svg=!(!v.getCTM||!Br(v)),j.svg&&(tr(v,Oe(v,bn,E,!1,"50% 50%")+"",j,v.getAttribute("data-svg-origin")),rn=_t.useSVGTransformAttr||es),y=ir(v),y!==er){if(y.length===16){var oe,ne,Pe,Kt,Bt,te=y[0],Ct=y[1],Le=y[2],Zt=y[3],Ft=y[4],Jt=y[5],yi=y[6],qi=y[7],Ge=y[8],He=y[9],We=y[10],ei=y[12],ii=y[13],ai=y[14],hi=y[11],ke=Math.atan2(yi,We);j.zOrigin&&(ai=-j.zOrigin,ei=Ge*ai-y[12],ii=He*ai-y[13],ai=We*ai+j.zOrigin-y[14]),j.rotationX=ke*Fe,ke&&(Kt=Math.cos(-ke),Bt=Math.sin(-ke),oe=Ft*Kt+Ge*Bt,ne=Jt*Kt+He*Bt,Pe=yi*Kt+We*Bt,Ge=Ft*-Bt+Ge*Kt,He=Jt*-Bt+He*Kt,We=yi*-Bt+We*Kt,hi=qi*-Bt+hi*Kt,Ft=oe,Jt=ne,yi=Pe),ke=Math.atan2(-Le,We),j.rotationY=ke*Fe,ke&&(Kt=Math.cos(-ke),Bt=Math.sin(-ke),oe=te*Kt-Ge*Bt,ne=Ct*Kt-He*Bt,Pe=Le*Kt-We*Bt,He=Ct*Bt+He*Kt,We=Le*Bt+We*Kt,hi=Zt*Bt+hi*Kt,te=oe,Ct=ne,Le=Pe),ke=Math.atan2(Ct,te),j.rotation=ke*Fe,ke&&(Kt=Math.cos(ke),Bt=Math.sin(ke),oe=te*Kt+Ct*Bt,ne=Ft*Kt+Jt*Bt,Pe=Ge*Kt+He*Bt,Ct=Ct*Kt-te*Bt,Jt=Jt*Kt-Ft*Bt,He=He*Kt-Ge*Bt,te=oe,Ft=ne,Ge=Pe),j.rotationX&&Math.abs(j.rotationX)+Math.abs(j.rotation)>359.9&&(j.rotationX=j.rotation=0,j.rotationY=180-j.rotationY),ke=Math.atan2(Ft,Jt),j.scaleX=(Math.sqrt(te*te+Ct*Ct+Le*Le)*vt+.5|0)/vt,j.scaleY=(Math.sqrt(Jt*Jt+yi*yi)*vt+.5|0)/vt,j.scaleZ=(Math.sqrt(Ge*Ge+He*He+We*We)*vt+.5|0)/vt,te/=j.scaleX,Ft/=j.scaleY,Ct/=j.scaleX,Jt/=j.scaleY,Math.abs(ke)>Et?(j.skewX=ke*Fe,Ft=0,j.skewType!=="simple"&&(j.scaleY*=1/Math.cos(ke))):j.skewX=0,j.perspective=hi?1/(0>hi?-hi:hi):0,j.x=ei,j.y=ii,j.z=ai,j.svg&&(j.x-=j.xOrigin-(j.xOrigin*te-j.yOrigin*Ft),j.y-=j.yOrigin-(j.yOrigin*Ct-j.xOrigin*Jt))}else if(!Gi||L||!y.length||j.x!==y[4]||j.y!==y[5]||!j.rotationX&&!j.rotationY){var Ne=y.length>=6,qe=Ne?y[0]:1,Re=y[1]||0,an=y[2]||0,xi=Ne?y[3]:1;j.x=y[4]||0,j.y=y[5]||0,C=Math.sqrt(qe*qe+Re*Re),Q=Math.sqrt(xi*xi+an*an),rt=qe||Re?Math.atan2(Re,qe)*Fe:j.rotation||0,it=an||xi?Math.atan2(an,xi)*Fe+rt:j.skewX||0,j.scaleX=C,j.scaleY=Q,j.rotation=rt,j.skewX=it,Gi&&(j.rotationX=j.rotationY=j.z=0,j.perspective=Pt,j.scaleZ=1),j.svg&&(j.x-=j.xOrigin-(j.xOrigin*qe+j.yOrigin*an),j.y-=j.yOrigin-(j.xOrigin*Re+j.yOrigin*xi))}Math.abs(j.skewX)>90&&Math.abs(j.skewX)<270&&(St?(j.scaleX*=-1,j.skewX+=j.rotation<=0?180:-180,j.rotation+=j.rotation<=0?180:-180):(j.scaleY*=-1,j.skewX+=j.skewX<=0?180:-180)),j.zOrigin=Nt;for(W in j)j[W]<Et&&j[W]>-Et&&(j[W]=0)}return R&&(v._gsTransform=j,j.svg&&(rn&&v.style[ui]?bt.delayedCall(.001,function(){On(v.style,ui)}):!rn&&v.getAttribute("transform")&&bt.delayedCall(.001,function(){v.removeAttribute("transform")}))),j},is=function(v){var E,R,L=this.data,y=-L.rotation*Lt,W=y+L.skewX*Lt,C=1e5,Q=(Math.cos(y)*L.scaleX*C|0)/C,rt=(Math.sin(y)*L.scaleX*C|0)/C,it=(Math.sin(W)*-L.scaleY*C|0)/C,j=(Math.cos(W)*L.scaleY*C|0)/C,St=this.t.style,Et=this.t.currentStyle;if(Et){R=rt,rt=-it,it=-R,E=Et.filter,St.filter="";var vt,Nt,Pt=this.t.offsetWidth,oe=this.t.offsetHeight,ne=Et.position!=="absolute",Pe="progid:DXImageTransform.Microsoft.Matrix(M11="+Q+", M12="+rt+", M21="+it+", M22="+j,Kt=L.x+Pt*L.xPercent/100,Bt=L.y+oe*L.yPercent/100;if(L.ox!=null&&(vt=(L.oxp?Pt*L.ox*.01:L.ox)-Pt/2,Nt=(L.oyp?oe*L.oy*.01:L.oy)-oe/2,Kt+=vt-(vt*Q+Nt*rt),Bt+=Nt-(vt*it+Nt*j)),ne?(vt=Pt/2,Nt=oe/2,Pe+=", Dx="+(vt-(vt*Q+Nt*rt)+Kt)+", Dy="+(Nt-(vt*it+Nt*j)+Bt)+")"):Pe+=", sizingMethod='auto expand')",E.indexOf("DXImageTransform.Microsoft.Matrix(")!==-1?St.filter=E.replace(Vt,Pe):St.filter=Pe+" "+E,(v===0||v===1)&&Q===1&&rt===0&&it===0&&j===1&&(ne&&Pe.indexOf("Dx=0, Dy=0")===-1||F.test(E)&&parseFloat(RegExp.$1)!==100||E.indexOf(E.indexOf("Alpha"))===-1&&St.removeAttribute("filter")),!ne){var te,Ct,Le,Zt=8>K?1:-1;for(vt=L.ieOffsetX||0,Nt=L.ieOffsetY||0,L.ieOffsetX=Math.round((Pt-((0>Q?-Q:Q)*Pt+(0>rt?-rt:rt)*oe))/2+Kt),L.ieOffsetY=Math.round((oe-((0>j?-j:j)*oe+(0>it?-it:it)*Pt))/2+Bt),si=0;4>si;si++)Ct=D[si],te=Et[Ct],R=te.indexOf("px")!==-1?parseFloat(te):Si(this.t,Ct,parseFloat(te),te.replace(b,""))||0,Le=R!==L[Ct]?2>si?-L.ieOffsetX:-L.ieOffsetY:2>si?vt-L.ieOffsetX:Nt-L.ieOffsetY,St[Ct]=(L[Ct]=Math.round(R-Le*(si===0||si===2?1:Zt)))+"px"}}},ns=be.set3DTransformRatio=be.setTransformRatio=function(v){var E,R,L,y,W,C,Q,rt,it,j,St,Et,vt,Nt,Pt,oe,ne,Pe,Kt,Bt,te,Ct,Le,Zt=this.data,Ft=this.t.style,Jt=Zt.rotation,yi=Zt.rotationX,qi=Zt.rotationY,Ge=Zt.scaleX,He=Zt.scaleY,We=Zt.scaleZ,ei=Zt.x,ii=Zt.y,ai=Zt.z,hi=Zt.svg,ke=Zt.perspective,Ne=Zt.force3D,qe=Zt.skewY,Re=Zt.skewX;if(qe&&(Re+=qe,Jt+=qe),((v===1||v===0)&&Ne==="auto"&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!Ne)&&!ai&&!ke&&!qi&&!yi&&We===1||rn&&hi||!Gi)return void(Jt||Re||hi?(Jt*=Lt,Ct=Re*Lt,Le=1e5,R=Math.cos(Jt)*Ge,W=Math.sin(Jt)*Ge,L=Math.sin(Jt-Ct)*-He,C=Math.cos(Jt-Ct)*He,Ct&&Zt.skewType==="simple"&&(E=Math.tan(Ct-qe*Lt),E=Math.sqrt(1+E*E),L*=E,C*=E,qe&&(E=Math.tan(qe*Lt),E=Math.sqrt(1+E*E),R*=E,W*=E)),hi&&(ei+=Zt.xOrigin-(Zt.xOrigin*R+Zt.yOrigin*L)+Zt.xOffset,ii+=Zt.yOrigin-(Zt.xOrigin*W+Zt.yOrigin*C)+Zt.yOffset,rn&&(Zt.xPercent||Zt.yPercent)&&(Pt=this.t.getBBox(),ei+=.01*Zt.xPercent*Pt.width,ii+=.01*Zt.yPercent*Pt.height),Pt=1e-6,Pt>ei&&ei>-Pt&&(ei=0),Pt>ii&&ii>-Pt&&(ii=0)),Kt=(R*Le|0)/Le+","+(W*Le|0)/Le+","+(L*Le|0)/Le+","+(C*Le|0)/Le+","+ei+","+ii+")",hi&&rn?this.t.setAttribute("transform","matrix("+Kt):Ft[ui]=(Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) matrix(":"matrix(")+Kt):Ft[ui]=(Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) matrix(":"matrix(")+Ge+",0,0,"+He+","+ei+","+ii+")");if(zt&&(Pt=1e-4,Pt>Ge&&Ge>-Pt&&(Ge=We=2e-5),Pt>He&&He>-Pt&&(He=We=2e-5),!ke||Zt.z||Zt.rotationX||Zt.rotationY||(ke=0)),Jt||Re)Jt*=Lt,oe=R=Math.cos(Jt),ne=W=Math.sin(Jt),Re&&(Jt-=Re*Lt,oe=Math.cos(Jt),ne=Math.sin(Jt),Zt.skewType==="simple"&&(E=Math.tan((Re-qe)*Lt),E=Math.sqrt(1+E*E),oe*=E,ne*=E,Zt.skewY&&(E=Math.tan(qe*Lt),E=Math.sqrt(1+E*E),R*=E,W*=E))),L=-ne,C=oe;else{if(!(qi||yi||We!==1||ke||hi))return void(Ft[ui]=(Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) translate3d(":"translate3d(")+ei+"px,"+ii+"px,"+ai+"px)"+(Ge!==1||He!==1?" scale("+Ge+","+He+")":""));R=C=1,L=W=0}j=1,y=Q=rt=it=St=Et=0,vt=ke?-1/ke:0,Nt=Zt.zOrigin,Pt=1e-6,Bt=",",te="0",Jt=qi*Lt,Jt&&(oe=Math.cos(Jt),ne=Math.sin(Jt),rt=-ne,St=vt*-ne,y=R*ne,Q=W*ne,j=oe,vt*=oe,R*=oe,W*=oe),Jt=yi*Lt,Jt&&(oe=Math.cos(Jt),ne=Math.sin(Jt),E=L*oe+y*ne,Pe=C*oe+Q*ne,it=j*ne,Et=vt*ne,y=L*-ne+y*oe,Q=C*-ne+Q*oe,j*=oe,vt*=oe,L=E,C=Pe),We!==1&&(y*=We,Q*=We,j*=We,vt*=We),He!==1&&(L*=He,C*=He,it*=He,Et*=He),Ge!==1&&(R*=Ge,W*=Ge,rt*=Ge,St*=Ge),(Nt||hi)&&(Nt&&(ei+=y*-Nt,ii+=Q*-Nt,ai+=j*-Nt+Nt),hi&&(ei+=Zt.xOrigin-(Zt.xOrigin*R+Zt.yOrigin*L)+Zt.xOffset,ii+=Zt.yOrigin-(Zt.xOrigin*W+Zt.yOrigin*C)+Zt.yOffset),Pt>ei&&ei>-Pt&&(ei=te),Pt>ii&&ii>-Pt&&(ii=te),Pt>ai&&ai>-Pt&&(ai=0)),Kt=Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) matrix3d(":"matrix3d(",Kt+=(Pt>R&&R>-Pt?te:R)+Bt+(Pt>W&&W>-Pt?te:W)+Bt+(Pt>rt&&rt>-Pt?te:rt),Kt+=Bt+(Pt>St&&St>-Pt?te:St)+Bt+(Pt>L&&L>-Pt?te:L)+Bt+(Pt>C&&C>-Pt?te:C),yi||qi||We!==1?(Kt+=Bt+(Pt>it&&it>-Pt?te:it)+Bt+(Pt>Et&&Et>-Pt?te:Et)+Bt+(Pt>y&&y>-Pt?te:y),Kt+=Bt+(Pt>Q&&Q>-Pt?te:Q)+Bt+(Pt>j&&j>-Pt?te:j)+Bt+(Pt>vt&&vt>-Pt?te:vt)+Bt):Kt+=",0,0,0,0,1,0,",Kt+=ei+Bt+ii+Bt+ai+Bt+(ke?1+-ai/ke:1)+")",Ft[ui]=Kt};ht=Kn.prototype,ht.x=ht.y=ht.z=ht.skewX=ht.skewY=ht.rotation=ht.rotationX=ht.rotationY=ht.zOrigin=ht.xPercent=ht.yPercent=ht.xOffset=ht.yOffset=0,ht.scaleX=ht.scaleY=ht.scaleZ=1,Qe("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(v,E,R,L,y,W,C){if(L._lastParsedTransform===C)return y;L._lastParsedTransform=C;var Q,rt=C.scale&&typeof C.scale=="function"?C.scale:0;typeof C[R]=="function"&&(Q=C[R],C[R]=E),rt&&(C.scale=rt(m,v));var it,j,St,Et,vt,Nt,Pt,oe,ne,Pe=v._gsTransform,Kt=v.style,Bt=1e-6,te=Mo.length,Ct=C,Le={},Zt="transformOrigin",Ft=sn(v,at,!0,Ct.parseTransform),Jt=Ct.transform&&(typeof Ct.transform=="function"?Ct.transform(m,H):Ct.transform);if(Ft.skewType=Ct.skewType||Ft.skewType||_t.defaultSkewType,L._transform=Ft,"rotationZ"in Ct&&(Ct.rotation=Ct.rotationZ),Jt&&typeof Jt=="string"&&ui)j=Je.style,j[ui]=Jt,j.display="block",j.position="absolute",Jt.indexOf("%")!==-1&&(j.width=Oe(v,"width"),j.height=Oe(v,"height")),oi.body.appendChild(Je),it=sn(Je,null,!1),Ft.skewType==="simple"&&(it.scaleY*=Math.cos(it.skewX*Lt)),Ft.svg&&(Nt=Ft.xOrigin,Pt=Ft.yOrigin,it.x-=Ft.xOffset,it.y-=Ft.yOffset,(Ct.transformOrigin||Ct.svgOrigin)&&(Jt={},tr(v,U(Ct.transformOrigin),Jt,Ct.svgOrigin,Ct.smoothOrigin,!0),Nt=Jt.xOrigin,Pt=Jt.yOrigin,it.x-=Jt.xOffset-Ft.xOffset,it.y-=Jt.yOffset-Ft.yOffset),(Nt||Pt)&&(oe=ir(Je,!0),it.x-=Nt-(Nt*oe[0]+Pt*oe[2]),it.y-=Pt-(Nt*oe[1]+Pt*oe[3]))),oi.body.removeChild(Je),it.perspective||(it.perspective=Ft.perspective),Ct.xPercent!=null&&(it.xPercent=dt(Ct.xPercent,Ft.xPercent)),Ct.yPercent!=null&&(it.yPercent=dt(Ct.yPercent,Ft.yPercent));else if(typeof Ct=="object"){if(it={scaleX:dt(Ct.scaleX!=null?Ct.scaleX:Ct.scale,Ft.scaleX),scaleY:dt(Ct.scaleY!=null?Ct.scaleY:Ct.scale,Ft.scaleY),scaleZ:dt(Ct.scaleZ,Ft.scaleZ),x:dt(Ct.x,Ft.x),y:dt(Ct.y,Ft.y),z:dt(Ct.z,Ft.z),xPercent:dt(Ct.xPercent,Ft.xPercent),yPercent:dt(Ct.yPercent,Ft.yPercent),perspective:dt(Ct.transformPerspective,Ft.perspective)},vt=Ct.directionalRotation,vt!=null)if(typeof vt=="object")for(j in vt)Ct[j]=vt[j];else Ct.rotation=vt;typeof Ct.x=="string"&&Ct.x.indexOf("%")!==-1&&(it.x=0,it.xPercent=dt(Ct.x,Ft.xPercent)),typeof Ct.y=="string"&&Ct.y.indexOf("%")!==-1&&(it.y=0,it.yPercent=dt(Ct.y,Ft.yPercent)),it.rotation=Tt("rotation"in Ct?Ct.rotation:"shortRotation"in Ct?Ct.shortRotation+"_short":Ft.rotation,Ft.rotation,"rotation",Le),Gi&&(it.rotationX=Tt("rotationX"in Ct?Ct.rotationX:"shortRotationX"in Ct?Ct.shortRotationX+"_short":Ft.rotationX||0,Ft.rotationX,"rotationX",Le),it.rotationY=Tt("rotationY"in Ct?Ct.rotationY:"shortRotationY"in Ct?Ct.shortRotationY+"_short":Ft.rotationY||0,Ft.rotationY,"rotationY",Le)),it.skewX=Tt(Ct.skewX,Ft.skewX),it.skewY=Tt(Ct.skewY,Ft.skewY)}for(Gi&&Ct.force3D!=null&&(Ft.force3D=Ct.force3D,Et=!0),St=Ft.force3D||Ft.z||Ft.rotationX||Ft.rotationY||it.z||it.rotationX||it.rotationY||it.perspective,St||Ct.scale==null||(it.scaleZ=1);--te>-1;)ne=Mo[te],Jt=it[ne]-Ft[ne],(Jt>Bt||-Bt>Jt||Ct[ne]!=null||vi[ne]!=null)&&(Et=!0,y=new je(Ft,ne,Ft[ne],Jt,y),ne in Le&&(y.e=Le[ne]),y.xs0=0,y.plugin=W,L._overwriteProps.push(y.n));return Jt=Ct.transformOrigin,Ft.svg&&(Jt||Ct.svgOrigin)&&(Nt=Ft.xOffset,Pt=Ft.yOffset,tr(v,U(Jt),it,Ct.svgOrigin,Ct.smoothOrigin),y=gn(Ft,"xOrigin",(Pe?Ft:it).xOrigin,it.xOrigin,y,Zt),y=gn(Ft,"yOrigin",(Pe?Ft:it).yOrigin,it.yOrigin,y,Zt),(Nt!==Ft.xOffset||Pt!==Ft.yOffset)&&(y=gn(Ft,"xOffset",Pe?Nt:Ft.xOffset,Ft.xOffset,y,Zt),y=gn(Ft,"yOffset",Pe?Pt:Ft.yOffset,Ft.yOffset,y,Zt)),Jt="0px 0px"),(Jt||Gi&&St&&Ft.zOrigin)&&(ui?(Et=!0,ne=bn,Jt=(Jt||Oe(v,ne,at,!1,"50% 50%"))+"",y=new je(Kt,ne,0,0,y,-1,Zt),y.b=Kt[ne],y.plugin=W,Gi?(j=Ft.zOrigin,Jt=Jt.split(" "),Ft.zOrigin=(Jt.length>2&&(j===0||Jt[2]!=="0px")?parseFloat(Jt[2]):j)||0,y.xs0=y.e=Jt[0]+" "+(Jt[1]||"50%")+" 0px",y=new je(Ft,"zOrigin",0,0,y,-1,y.n),y.b=j,y.xs0=y.e=Ft.zOrigin):y.xs0=y.e=Jt):U(Jt+"",Ft)),Et&&(L._transformType=Ft.svg&&rn||!St&&this._transformType!==3?2:3),Q&&(C[R]=Q),rt&&(C.scale=rt),y},prefix:!0}),Qe("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),Qe("borderRadius",{defaultValue:"0px",parser:function(v,E,R,L,y,W){E=this.format(E);var C,Q,rt,it,j,St,Et,vt,Nt,Pt,oe,ne,Pe,Kt,Bt,te,Ct=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],Le=v.style;for(Nt=parseFloat(v.offsetWidth),Pt=parseFloat(v.offsetHeight),C=E.split(" "),Q=0;Q<Ct.length;Q++)this.p.indexOf("border")&&(Ct[Q]=en(Ct[Q])),j=it=Oe(v,Ct[Q],at,!1,"0px"),j.indexOf(" ")!==-1&&(it=j.split(" "),j=it[0],it=it[1]),St=rt=C[Q],Et=parseFloat(j),ne=j.substr((Et+"").length),Pe=St.charAt(1)==="=",Pe?(vt=parseInt(St.charAt(0)+"1",10),St=St.substr(2),vt*=parseFloat(St),oe=St.substr((vt+"").length-(0>vt?1:0))||""):(vt=parseFloat(St),oe=St.substr((vt+"").length)),oe===""&&(oe=gt[R]||ne),oe!==ne&&(Kt=Si(v,"borderLeft",Et,ne),Bt=Si(v,"borderTop",Et,ne),oe==="%"?(j=Kt/Nt*100+"%",it=Bt/Pt*100+"%"):oe==="em"?(te=Si(v,"borderLeft",1,"em"),j=Kt/te+"em",it=Bt/te+"em"):(j=Kt+"px",it=Bt+"px"),Pe&&(St=parseFloat(j)+vt+oe,rt=parseFloat(it)+vt+oe)),y=Wi(Le,Ct[Q],j+" "+it,St+" "+rt,!1,"0px",y);return y},prefix:!0,formatter:ze("0px 0px 0px 0px",!1,!0)}),Qe("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(v,E,R,L,y,W){return Wi(v.style,R,this.format(Oe(v,R,at,!1,"0px 0px")),this.format(E),!1,"0px",y)},prefix:!0,formatter:ze("0px 0px",!1,!0)}),Qe("backgroundPosition",{defaultValue:"0 0",parser:function(v,E,R,L,y,W){var C,Q,rt,it,j,St,Et="background-position",vt=at||ci(v,null),Nt=this.format((vt?K?vt.getPropertyValue(Et+"-x")+" "+vt.getPropertyValue(Et+"-y"):vt.getPropertyValue(Et):v.currentStyle.backgroundPositionX+" "+v.currentStyle.backgroundPositionY)||"0 0"),Pt=this.format(E);if(Nt.indexOf("%")!==-1!=(Pt.indexOf("%")!==-1)&&Pt.split(",").length<2&&(St=Oe(v,"backgroundImage").replace(Gt,""),St&&St!=="none")){for(C=Nt.split(" "),Q=Pt.split(" "),Ri.setAttribute("src",St),rt=2;--rt>-1;)Nt=C[rt],it=Nt.indexOf("%")!==-1,it!==(Q[rt].indexOf("%")!==-1)&&(j=rt===0?v.offsetWidth-Ri.width:v.offsetHeight-Ri.height,C[rt]=it?parseFloat(Nt)/100*j+"px":parseFloat(Nt)/j*100+"%");Nt=C.join(" ")}return this.parseComplex(v.style,Nt,Pt,y,W)},formatter:U}),Qe("backgroundSize",{defaultValue:"0 0",formatter:function(v){return v+="",v.substr(0,2)==="co"?v:U(v.indexOf(" ")===-1?v+" "+v:v)}}),Qe("perspective",{defaultValue:"0px",prefix:!0}),Qe("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),Qe("transformStyle",{prefix:!0}),Qe("backfaceVisibility",{prefix:!0}),Qe("userSelect",{prefix:!0}),Qe("margin",{parser:Xe("marginTop,marginRight,marginBottom,marginLeft")}),Qe("padding",{parser:Xe("paddingTop,paddingRight,paddingBottom,paddingLeft")}),Qe("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(v,E,R,L,y,W){var C,Q,rt;return 9>K?(Q=v.currentStyle,rt=8>K?" ":",",C="rect("+Q.clipTop+rt+Q.clipRight+rt+Q.clipBottom+rt+Q.clipLeft+")",E=this.format(E).split(",").join(rt)):(C=this.format(Oe(v,this.p,at,!1,this.dflt)),E=this.format(E)),this.parseComplex(v.style,C,E,y,W)}}),Qe("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),Qe("autoRound,strictUnits",{parser:function(v,E,R,L,y){return y}}),Qe("border",{defaultValue:"0px solid #000",parser:function(v,E,R,L,y,W){var C=Oe(v,"borderTopWidth",at,!1,"0px"),Q=this.format(E).split(" "),rt=Q[0].replace(b,"");return rt!=="px"&&(C=parseFloat(C)/Si(v,"borderTopWidth",1,rt)+rt),this.parseComplex(v.style,this.format(C+" "+Oe(v,"borderTopStyle",at,!1,"solid")+" "+Oe(v,"borderTopColor",at,!1,"#000")),Q.join(" "),y,W)},color:!0,formatter:function(v){var E=v.split(" ");return E[0]+" "+(E[1]||"solid")+" "+(v.match(he)||["#000"])[0]}}),Qe("borderWidth",{parser:Xe("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),Qe("float,cssFloat,styleFloat",{parser:function(v,E,R,L,y,W){var C=v.style,Q="cssFloat"in C?"cssFloat":"styleFloat";return new je(C,Q,0,0,y,-1,R,!1,0,C[Q],E)}});var rs=function(v){var E,R=this.t,L=R.filter||Oe(this.data,"filter")||"",y=this.s+this.c*v|0;y===100&&(L.indexOf("atrix(")===-1&&L.indexOf("radient(")===-1&&L.indexOf("oader(")===-1?(R.removeAttribute("filter"),E=!Oe(this.data,"filter")):(R.filter=L.replace(pt,""),E=!0)),E||(this.xn1&&(R.filter=L=L||"alpha(opacity="+y+")"),L.indexOf("pacity")===-1?y===0&&this.xn1||(R.filter=L+" alpha(opacity="+y+")"):R.filter=L.replace(F,"opacity="+y))};Qe("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(v,E,R,L,y,W){var C=parseFloat(Oe(v,"opacity",at,!1,"1")),Q=v.style,rt=R==="autoAlpha";return typeof E=="string"&&E.charAt(1)==="="&&(E=(E.charAt(0)==="-"?-1:1)*parseFloat(E.substr(2))+C),rt&&C===1&&Oe(v,"visibility",at)==="hidden"&&E!==0&&(C=0),Ke?y=new je(Q,"opacity",C,E-C,y):(y=new je(Q,"opacity",100*C,100*(E-C),y),y.xn1=rt?1:0,Q.zoom=1,y.type=2,y.b="alpha(opacity="+y.s+")",y.e="alpha(opacity="+(y.s+y.c)+")",y.data=v,y.plugin=W,y.setRatio=rs),rt&&(y=new je(Q,"visibility",0,0,y,-1,null,!1,0,C!==0?"inherit":"hidden",E===0?"hidden":"inherit"),y.xs0="inherit",L._overwriteProps.push(y.n),L._overwriteProps.push(R)),y}});var On=function(v,E){E&&(v.removeProperty?((E.substr(0,2)==="ms"||E.substr(0,6)==="webkit")&&(E="-"+E),v.removeProperty(E.replace(At,"-$1").toLowerCase())):v.removeAttribute(E))},In=function(v){if(this.t._gsClassPT=this,v===1||v===0){this.t.setAttribute("class",v===0?this.b:this.e);for(var E=this.data,R=this.t.style;E;)E.v?R[E.p]=E.v:On(R,E.p),E=E._next;v===1&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};Qe("className",{parser:function(v,E,R,L,y,W,C){var Q,rt,it,j,St,Et=v.getAttribute("class")||"",vt=v.style.cssText;if(y=L._classNamePT=new je(v,R,0,0,y,2),y.setRatio=In,y.pr=-11,$=!0,y.b=Et,rt=nn(v,at),it=v._gsClassPT){for(j={},St=it.data;St;)j[St.p]=1,St=St._next;it.setRatio(1)}return v._gsClassPT=y,y.e=E.charAt(1)!=="="?E:Et.replace(new RegExp("(?:\\s|^)"+E.substr(2)+"(?![\\w-])"),"")+(E.charAt(0)==="+"?" "+E.substr(2):""),v.setAttribute("class",y.e),Q=Ci(v,rt,nn(v),C,j),v.setAttribute("class",Et),y.data=Q.firstMPT,v.style.cssText=vt,y=y.xfirst=L.parse(v,Q.difs,y,W)}});var So=function(v){if((v===1||v===0)&&this.data._totalTime===this.data._totalDuration&&this.data.data!=="isFromStart"){var E,R,L,y,W,C=this.t.style,Q=Z.transform.parse;if(this.e==="all")C.cssText="",y=!0;else for(E=this.e.split(" ").join("").split(","),L=E.length;--L>-1;)R=E[L],Z[R]&&(Z[R].parse===Q?y=!0:R=R==="transformOrigin"?bn:Z[R].p),On(C,R);y&&(On(C,ui),W=this.t._gsTransform,W&&(W.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(Qe("clearProps",{parser:function(v,E,R,L,y){return y=new je(v,R,0,0,y,2),y.setRatio=So,y.e=E,y.pr=-10,y.data=L._tween,$=!0,y}}),ht="bezier,throwProps,physicsProps,physics2D".split(","),si=ht.length;si--;)Ko(ht[si]);ht=_t.prototype,ht._firstPT=ht._lastParsedTransform=ht._transform=null,ht._onInitTween=function(v,E,R,L){if(!v.nodeType)return!1;this._target=H=v,this._tween=R,this._vars=E,m=L,Mt=E.autoRound,$=!1,gt=E.suffixMap||_t.suffixMap,at=ci(v,""),M=this._overwriteProps;var y,W,C,Q,rt,it,j,St,Et,vt=v.style;if(ct&&vt.zIndex===""&&(y=Oe(v,"zIndex",at),(y==="auto"||y==="")&&this._addLazySet(vt,"zIndex",0)),typeof E=="string"&&(Q=vt.cssText,y=nn(v,at),vt.cssText=Q+";"+E,y=Ci(v,y,nn(v)).difs,!Ke&&Y.test(E)&&(y.opacity=parseFloat(RegExp.$1)),E=y,vt.cssText=Q),E.className?this._firstPT=W=Z.className.parse(v,E.className,"className",this,null,null,E):this._firstPT=W=this.parse(v,E,null),this._transformType){for(Et=this._transformType===3,ui?Rt&&(ct=!0,vt.zIndex===""&&(j=Oe(v,"zIndex",at),(j==="auto"||j==="")&&this._addLazySet(vt,"zIndex",0)),mt&&this._addLazySet(vt,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(Et?"visible":"hidden"))):vt.zoom=1,C=W;C&&C._next;)C=C._next;St=new je(v,"transform",0,0,null,2),this._linkCSSP(St,null,C),St.setRatio=ui?ns:is,St.data=this._transform||sn(v,at,!0),St.tween=R,St.pr=-1,M.pop()}if($){for(;W;){for(it=W._next,C=Q;C&&C.pr>W.pr;)C=C._next;(W._prev=C?C._prev:rt)?W._prev._next=W:Q=W,(W._next=C)?C._prev=W:rt=W,W=it}this._firstPT=Q}return!0},ht.parse=function(v,E,R,L){var y,W,C,Q,rt,it,j,St,Et,vt,Nt=v.style;for(y in E){if(it=E[y],typeof it=="function"&&(it=it(m,H)),W=Z[y])R=W.parse(v,it,y,this,R,L,E);else{if(y.substr(0,2)==="--"){this._tween._propLookup[y]=this._addTween.call(this._tween,v.style,"setProperty",ci(v).getPropertyValue(y)+"",it+"",y,!1,y);continue}rt=Oe(v,y,at)+"",Et=typeof it=="string",y==="color"||y==="fill"||y==="stroke"||y.indexOf("Color")!==-1||Et&&tt.test(it)?(Et||(it=se(it),it=(it.length>3?"rgba(":"rgb(")+it.join(",")+")"),R=Wi(Nt,y,rt,it,!0,"transparent",R,0,L)):Et&&gi.test(it)?R=Wi(Nt,y,rt,it,!0,null,R,0,L):(C=parseFloat(rt),j=C||C===0?rt.substr((C+"").length):"",(rt===""||rt==="auto")&&(y==="width"||y==="height"?(C=B(v,y,at),j="px"):y==="left"||y==="top"?(C=Tn(v,y,at),j="px"):(C=y!=="opacity"?0:1,j="")),vt=Et&&it.charAt(1)==="=",vt?(Q=parseInt(it.charAt(0)+"1",10),it=it.substr(2),Q*=parseFloat(it),St=it.replace(b,"")):(Q=parseFloat(it),St=Et?it.replace(b,""):""),St===""&&(St=y in gt?gt[y]:j),it=Q||Q===0?(vt?Q+C:Q)+St:E[y],j!==St&&(St!==""||y==="lineHeight")&&(Q||Q===0)&&C&&(C=Si(v,y,C,j),St==="%"?(C/=Si(v,y,100,"%")/100,E.strictUnits!==!0&&(rt=C+"%")):St==="em"||St==="rem"||St==="vw"||St==="vh"?C/=Si(v,y,1,St):St!=="px"&&(Q=Si(v,y,Q,St),St="px"),vt&&(Q||Q===0)&&(it=Q+C+St)),vt&&(Q+=C),!C&&C!==0||!Q&&Q!==0?Nt[y]!==void 0&&(it||it+""!="NaN"&&it!=null)?(R=new je(Nt,y,Q||C||0,0,R,-1,y,!1,0,rt,it),R.xs0=it!=="none"||y!=="display"&&y.indexOf("Style")===-1?it:rt):Cn("invalid "+y+" tween value: "+E[y]):(R=new je(Nt,y,C,Q-C,R,0,y,Mt!==!1&&(St==="px"||y==="zIndex"),0,rt,it),R.xs0=St))}L&&R&&!R.plugin&&(R.plugin=L)}return R},ht.setRatio=function(v){var E,R,L,y=this._firstPT,W=1e-6;if(v!==1||this._tween._time!==this._tween._duration&&this._tween._time!==0)if(v||this._tween._time!==this._tween._duration&&this._tween._time!==0||this._tween._rawPrevTime===-1e-6)for(;y;){if(E=y.c*v+y.s,y.r?E=y.r(E):W>E&&E>-W&&(E=0),y.type)if(y.type===1)if(L=y.l,L===2)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2;else if(L===3)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2+y.xn2+y.xs3;else if(L===4)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2+y.xn2+y.xs3+y.xn3+y.xs4;else if(L===5)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2+y.xn2+y.xs3+y.xn3+y.xs4+y.xn4+y.xs5;else{for(R=y.xs0+E+y.xs1,L=1;L<y.l;L++)R+=y["xn"+L]+y["xs"+(L+1)];y.t[y.p]=R}else y.type===-1?y.t[y.p]=y.xs0:y.setRatio&&y.setRatio(v);else y.t[y.p]=E+y.xs0;y=y._next}else for(;y;)y.type!==2?y.t[y.p]=y.b:y.setRatio(v),y=y._next;else for(;y;){if(y.type!==2)if(y.r&&y.type!==-1)if(E=y.r(y.s+y.c),y.type){if(y.type===1){for(L=y.l,R=y.xs0+E+y.xs1,L=1;L<y.l;L++)R+=y["xn"+L]+y["xs"+(L+1)];y.t[y.p]=R}}else y.t[y.p]=E+y.xs0;else y.t[y.p]=y.e;else y.setRatio(v);y=y._next}},ht._enableTransforms=function(v){this._transform=this._transform||sn(this._target,at,!0),this._transformType=this._transform.svg&&rn||!v&&this._transformType!==3?2:3};var Eo=function(v){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};ht._addLazySet=function(v,E,R){var L=this._firstPT=new je(v,E,0,0,this._firstPT,2);L.e=R,L.setRatio=Eo,L.data=this},ht._linkCSSP=function(v,E,R,L){return v&&(E&&(E._prev=v),v._next&&(v._next._prev=v._prev),v._prev?v._prev._next=v._next:this._firstPT===v&&(this._firstPT=v._next,L=!0),R?R._next=v:L||this._firstPT!==null||(this._firstPT=v),v._next=E,v._prev=R),v},ht._mod=function(v){for(var E=this._firstPT;E;)typeof v[E.p]=="function"&&(E.r=v[E.p]),E=E._next},ht._kill=function(v){var E,R,L,y=v;if(v.autoAlpha||v.alpha){y={};for(R in v)y[R]=v[R];y.opacity=1,y.autoAlpha&&(y.visibility=1)}for(v.className&&(E=this._classNamePT)&&(L=E.xfirst,L&&L._prev?this._linkCSSP(L._prev,E._next,L._prev._prev):L===this._firstPT&&(this._firstPT=E._next),E._next&&this._linkCSSP(E._next,E._next._next,L._prev),this._classNamePT=null),E=this._firstPT;E;)E.plugin&&E.plugin!==R&&E.plugin._kill&&(E.plugin._kill(v),R=E.plugin),E=E._next;return p.prototype._kill.call(this,y)};var En=function(v,E,R){var L,y,W,C;if(v.slice)for(y=v.length;--y>-1;)En(v[y],E,R);else for(L=v.childNodes,y=L.length;--y>-1;)W=L[y],C=W.type,W.style&&(E.push(nn(W)),R&&R.push(W)),C!==1&&C!==9&&C!==11||!W.childNodes.length||En(W,E,R)};return _t.cascadeTo=function(v,E,R){var L,y,W,C,Q=bt.to(v,E,R),rt=[Q],it=[],j=[],St=[],Et=bt._internals.reservedProps;for(v=Q._targets||Q.target,En(v,it,St),Q.render(E,!0,!0),En(v,j),Q.render(0,!0,!0),Q._enabled(!0),L=St.length;--L>-1;)if(y=Ci(St[L],it[L],j[L]),y.firstMPT){y=y.difs;for(W in R)Et[W]&&(y[W]=R[W]);C={};for(W in y)C[W]=it[L][W];rt.push(bt.fromTo(St[L],E,C,y))}return rt},p.activate([_t]),_t},!0),function(){var p=$e._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(at,M,_t){return this._tween=_t,!0}}),bt=function(at){var M=1>at?Math.pow(10,(at+"").length-2):1;return function(_t){return(Math.round(_t/at)*at*M|0)/M}},$=function(at,M){for(;at;)at.f||at.blob||(at.m=M||Math.round),at=at._next},gt=p.prototype;gt._onInitAllProps=function(){var at,M,_t,Ot,Z=this._tween,ht=Z.vars.roundProps,Mt={},ct=Z._propLookup.roundProps;if(typeof ht!="object"||ht.push)for(typeof ht=="string"&&(ht=ht.split(",")),_t=ht.length;--_t>-1;)Mt[ht[_t]]=Math.round;else for(Ot in ht)Mt[Ot]=bt(ht[Ot]);for(Ot in Mt)for(at=Z._firstPT;at;)M=at._next,at.pg?at.t._mod(Mt):at.n===Ot&&(at.f===2&&at.t?$(at.t._firstPT,Mt[Ot]):(this._add(at.t,Ot,at.s,at.c,Mt[Ot]),M&&(M._prev=at._prev),at._prev?at._prev._next=M:Z._firstPT===at&&(Z._firstPT=M),at._next=at._prev=null,Z._propLookup[Ot]=ct)),at=M;return!1},gt._add=function(at,M,_t,Ot,Z){this._addTween(at,M,_t,_t+Ot,M,Z||Math.round),this._overwriteProps.push(M)}}(),function(){$e._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(p,bt,$,gt){var at,M;if(typeof p.setAttribute!="function")return!1;for(at in bt)M=bt[at],typeof M=="function"&&(M=M(gt,p)),this._addTween(p,"setAttribute",p.getAttribute(at)+"",M+"",at,!1,at),this._overwriteProps.push(at);return!0}})}(),$e._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(p,bt,$,gt){typeof bt!="object"&&(bt={rotation:bt}),this.finals={};var at,M,_t,Ot,Z,ht,Mt=bt.useRadians===!0?2*Math.PI:360,ct=1e-6;for(at in bt)at!=="useRadians"&&(Ot=bt[at],typeof Ot=="function"&&(Ot=Ot(gt,p)),ht=(Ot+"").split("_"),M=ht[0],_t=parseFloat(typeof p[at]!="function"?p[at]:p[at.indexOf("set")||typeof p["get"+at.substr(3)]!="function"?at:"get"+at.substr(3)]()),Ot=this.finals[at]=typeof M=="string"&&M.charAt(1)==="="?_t+parseInt(M.charAt(0)+"1",10)*Number(M.substr(2)):Number(M)||0,Z=Ot-_t,ht.length&&(M=ht.join("_"),M.indexOf("short")!==-1&&(Z%=Mt,Z!==Z%(Mt/2)&&(Z=0>Z?Z+Mt:Z-Mt)),M.indexOf("_cw")!==-1&&0>Z?Z=(Z+9999999999*Mt)%Mt-(Z/Mt|0)*Mt:M.indexOf("ccw")!==-1&&Z>0&&(Z=(Z-9999999999*Mt)%Mt-(Z/Mt|0)*Mt)),(Z>ct||-ct>Z)&&(this._addTween(p,at,_t,_t+Z,at),this._overwriteProps.push(at)));return!0},set:function(p){var bt;if(p!==1)this._super.setRatio.call(this,p);else for(bt=this._firstPT;bt;)bt.f?bt.t[bt.p](this.finals[bt.p]):bt.t[bt.p]=this.finals[bt.p],bt=bt._next}})._autoCSS=!0,$e._gsDefine("easing.Back",["easing.Ease"],function(p){var bt,$,gt,at,M=$e.GreenSockGlobals||$e,_t=M.com.greensock,Ot=2*Math.PI,Z=Math.PI/2,ht=_t._class,Mt=function(f,O){var x=ht("easing."+f,function(){},!0),X=x.prototype=new p;return X.constructor=x,X.getRatio=O,x},ct=p.register||function(){},Rt=function(f,O,x,X,b){var F=ht("easing."+f,{easeOut:new O,easeIn:new x,easeInOut:new X},!0);return ct(F,f),F},zt=function(f,O,x){this.t=f,this.v=O,x&&(this.next=x,x.prev=this,this.c=x.v-O,this.gap=x.t-f)},mt=function(f,O){var x=ht("easing."+f,function(b){this._p1=b||b===0?b:1.70158,this._p2=1.525*this._p1},!0),X=x.prototype=new p;return X.constructor=x,X.getRatio=O,X.config=function(b){return new x(b)},x},K=Rt("Back",mt("BackOut",function(f){return(f-=1)*f*((this._p1+1)*f+this._p1)+1}),mt("BackIn",function(f){return f*f*((this._p1+1)*f-this._p1)}),mt("BackInOut",function(f){return(f*=2)<1?.5*f*f*((this._p2+1)*f-this._p2):.5*((f-=2)*f*((this._p2+1)*f+this._p2)+2)})),H=ht("easing.SlowMo",function(f,O,x){O=O||O===0?O:.7,f==null?f=.7:f>1&&(f=1),this._p=f!==1?O:0,this._p1=(1-f)/2,this._p2=f,this._p3=this._p1+this._p2,this._calcEnd=x===!0},!0),m=H.prototype=new p;return m.constructor=H,m.getRatio=function(f){var O=f+(.5-f)*this._p;return f<this._p1?this._calcEnd?1-(f=1-f/this._p1)*f:O-(f=1-f/this._p1)*f*f*f*O:f>this._p3?this._calcEnd?f===1?0:1-(f=(f-this._p3)/this._p1)*f:O+(f-O)*(f=(f-this._p3)/this._p1)*f*f*f:this._calcEnd?1:O},H.ease=new H(.7,.7),m.config=H.config=function(f,O,x){return new H(f,O,x)},bt=ht("easing.SteppedEase",function(f,O){f=f||1,this._p1=1/f,this._p2=f+(O?0:1),this._p3=O?1:0},!0),m=bt.prototype=new p,m.constructor=bt,m.getRatio=function(f){return 0>f?f=0:f>=1&&(f=.999999999),((this._p2*f|0)+this._p3)*this._p1},m.config=bt.config=function(f,O){return new bt(f,O)},$=ht("easing.ExpoScaleEase",function(f,O,x){this._p1=Math.log(O/f),this._p2=O-f,this._p3=f,this._ease=x},!0),m=$.prototype=new p,m.constructor=$,m.getRatio=function(f){return this._ease&&(f=this._ease.getRatio(f)),(this._p3*Math.exp(this._p1*f)-this._p3)/this._p2},m.config=$.config=function(f,O,x){return new $(f,O,x)},gt=ht("easing.RoughEase",function(f){f=f||{};for(var O,x,X,b,F,Y,pt=f.taper||"none",tt=[],At=0,xt=0|(f.points||20),Gt=xt,kt=f.randomize!==!1,ie=f.clamp===!0,lt=f.template instanceof p?f.template:null,Vt=typeof f.strength=="number"?.4*f.strength:.4;--Gt>-1;)O=kt?Math.random():1/xt*Gt,x=lt?lt.getRatio(O):O,pt==="none"?X=Vt:pt==="out"?(b=1-O,X=b*b*Vt):pt==="in"?X=O*O*Vt:.5>O?(b=2*O,X=b*b*.5*Vt):(b=2*(1-O),X=b*b*.5*Vt),kt?x+=Math.random()*X-.5*X:Gt%2?x+=.5*X:x-=.5*X,ie&&(x>1?x=1:0>x&&(x=0)),tt[At++]={x:O,y:x};for(tt.sort(function(Me,gi){return Me.x-gi.x}),Y=new zt(1,1,null),Gt=xt;--Gt>-1;)F=tt[Gt],Y=new zt(F.x,F.y,Y);this._prev=new zt(0,0,Y.t!==0?Y:Y.next)},!0),m=gt.prototype=new p,m.constructor=gt,m.getRatio=function(f){var O=this._prev;if(f>O.t){for(;O.next&&f>=O.t;)O=O.next;O=O.prev}else for(;O.prev&&f<=O.t;)O=O.prev;return this._prev=O,O.v+(f-O.t)/O.gap*O.c},m.config=function(f){return new gt(f)},gt.ease=new gt,Rt("Bounce",Mt("BounceOut",function(f){return 1/2.75>f?7.5625*f*f:2/2.75>f?7.5625*(f-=1.5/2.75)*f+.75:2.5/2.75>f?7.5625*(f-=2.25/2.75)*f+.9375:7.5625*(f-=2.625/2.75)*f+.984375}),Mt("BounceIn",function(f){return(f=1-f)<1/2.75?1-7.5625*f*f:2/2.75>f?1-(7.5625*(f-=1.5/2.75)*f+.75):2.5/2.75>f?1-(7.5625*(f-=2.25/2.75)*f+.9375):1-(7.5625*(f-=2.625/2.75)*f+.984375)}),Mt("BounceInOut",function(f){var O=.5>f;return f=O?1-2*f:2*f-1,f=1/2.75>f?7.5625*f*f:2/2.75>f?7.5625*(f-=1.5/2.75)*f+.75:2.5/2.75>f?7.5625*(f-=2.25/2.75)*f+.9375:7.5625*(f-=2.625/2.75)*f+.984375,O?.5*(1-f):.5*f+.5})),Rt("Circ",Mt("CircOut",function(f){return Math.sqrt(1-(f-=1)*f)}),Mt("CircIn",function(f){return-(Math.sqrt(1-f*f)-1)}),Mt("CircInOut",function(f){return(f*=2)<1?-.5*(Math.sqrt(1-f*f)-1):.5*(Math.sqrt(1-(f-=2)*f)+1)})),at=function(f,O,x){var X=ht("easing."+f,function(F,Y){this._p1=F>=1?F:1,this._p2=(Y||x)/(1>F?F:1),this._p3=this._p2/Ot*(Math.asin(1/this._p1)||0),this._p2=Ot/this._p2},!0),b=X.prototype=new p;return b.constructor=X,b.getRatio=O,b.config=function(F,Y){return new X(F,Y)},X},Rt("Elastic",at("ElasticOut",function(f){return this._p1*Math.pow(2,-10*f)*Math.sin((f-this._p3)*this._p2)+1},.3),at("ElasticIn",function(f){return-(this._p1*Math.pow(2,10*(f-=1))*Math.sin((f-this._p3)*this._p2))},.3),at("ElasticInOut",function(f){return(f*=2)<1?-.5*(this._p1*Math.pow(2,10*(f-=1))*Math.sin((f-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(f-=1))*Math.sin((f-this._p3)*this._p2)*.5+1},.45)),Rt("Expo",Mt("ExpoOut",function(f){return 1-Math.pow(2,-10*f)}),Mt("ExpoIn",function(f){return Math.pow(2,10*(f-1))-.001}),Mt("ExpoInOut",function(f){return(f*=2)<1?.5*Math.pow(2,10*(f-1)):.5*(2-Math.pow(2,-10*(f-1)))})),Rt("Sine",Mt("SineOut",function(f){return Math.sin(f*Z)}),Mt("SineIn",function(f){return-Math.cos(f*Z)+1}),Mt("SineInOut",function(f){return-.5*(Math.cos(Math.PI*f)-1)})),ht("easing.EaseLookup",{find:function(f){return p.map[f]}},!0),ct(M.SlowMo,"SlowMo","ease,"),ct(gt,"RoughEase","ease,"),ct(bt,"SteppedEase","ease,"),K},!0)}),$e._gsDefine&&$e._gsQueue.pop()(),function(p,bt){var $={},gt=p.document,at=p.GreenSockGlobals=p.GreenSockGlobals||p,M=at[bt];if(M)return typeof module<"u"&&module.exports&&(module.exports=M),M;var _t,Ot,Z,ht,Mt,ct=function(_){var D,B=_.split("."),U=at;for(D=0;D<B.length;D++)U[B[D]]=U=U[B[D]]||{};return U},Rt=ct("com.greensock"),zt=1e-10,mt=function(_){var D,B=[],U=_.length;for(D=0;D!==U;B.push(_[D++]));return B},K=function(){},H=function(){var _=Object.prototype.toString,D=_.call([]);return function(B){return B!=null&&(B instanceof Array||typeof B=="object"&&!!B.push&&_.call(B)===D)}}(),m={},f=function(_,D,B,U){this.sc=m[_]?m[_].sc:[],m[_]=this,this.gsClass=null,this.func=B;var J=[];this.check=function(dt){for(var Tt,ut,ae,se,Ut=D.length,he=Ut;--Ut>-1;)(Tt=m[D[Ut]]||new f(D[Ut],[])).gsClass?(J[Ut]=Tt.gsClass,he--):dt&&Tt.sc.push(this);if(he===0&&B){if(ut=("com.greensock."+_).split("."),ae=ut.pop(),se=ct(ut.join("."))[ae]=this.gsClass=B.apply(B,J),U)if(at[ae]=$[ae]=se,typeof module<"u"&&module.exports)if(_===bt){module.exports=$[bt]=se;for(Ut in $)se[Ut]=$[Ut]}else $[bt]&&($[bt][ae]=se);else typeof define=="function"&&define.amd&&define((p.GreenSockAMDPath?p.GreenSockAMDPath+"/":"")+_.split(".").pop(),[],function(){return se});for(Ut=0;Ut<this.sc.length;Ut++)this.sc[Ut].check()}},this.check(!0)},O=p._gsDefine=function(_,D,B,U){return new f(_,D,B,U)},x=Rt._class=function(_,D,B){return D=D||function(){},O(_,[],function(){return D},B),D};O.globals=at;var X=[0,0,1,1],b=x("easing.Ease",function(_,D,B,U){this._func=_,this._type=B||0,this._power=U||0,this._params=D?X.concat(D):X},!0),F=b.map={},Y=b.register=function(_,D,B,U){for(var J,dt,Tt,ut,ae=D.split(","),se=ae.length,Ut=(B||"easeIn,easeOut,easeInOut").split(",");--se>-1;)for(dt=ae[se],J=U?x("easing."+dt,null,!0):Rt.easing[dt]||{},Tt=Ut.length;--Tt>-1;)ut=Ut[Tt],F[dt+"."+ut]=F[ut+dt]=J[ut]=_.getRatio?_:_[ut]||new _};for(Z=b.prototype,Z._calcEnd=!1,Z.getRatio=function(_){if(this._func)return this._params[0]=_,this._func.apply(null,this._params);var D=this._type,B=this._power,U=D===1?1-_:D===2?_:.5>_?2*_:2*(1-_);return B===1?U*=U:B===2?U*=U*U:B===3?U*=U*U*U:B===4&&(U*=U*U*U*U),D===1?1-U:D===2?U:.5>_?U/2:1-U/2},_t=["Linear","Quad","Cubic","Quart","Quint,Strong"],Ot=_t.length;--Ot>-1;)Z=_t[Ot]+",Power"+Ot,Y(new b(null,null,1,Ot),Z,"easeOut",!0),Y(new b(null,null,2,Ot),Z,"easeIn"+(Ot===0?",easeNone":"")),Y(new b(null,null,3,Ot),Z,"easeInOut");F.linear=Rt.easing.Linear.easeIn,F.swing=Rt.easing.Quad.easeInOut;var pt=x("events.EventDispatcher",function(_){this._listeners={},this._eventTarget=_||this});Z=pt.prototype,Z.addEventListener=function(_,D,B,U,J){J=J||0;var dt,Tt,ut=this._listeners[_],ae=0;for(this!==ht||Mt||ht.wake(),ut==null&&(this._listeners[_]=ut=[]),Tt=ut.length;--Tt>-1;)dt=ut[Tt],dt.c===D&&dt.s===B?ut.splice(Tt,1):ae===0&&dt.pr<J&&(ae=Tt+1);ut.splice(ae,0,{c:D,s:B,up:U,pr:J})},Z.removeEventListener=function(_,D){var B,U=this._listeners[_];if(U){for(B=U.length;--B>-1;)if(U[B].c===D)return void U.splice(B,1)}},Z.dispatchEvent=function(_){var D,B,U,J=this._listeners[_];if(J)for(D=J.length,D>1&&(J=J.slice(0)),B=this._eventTarget;--D>-1;)U=J[D],U&&(U.up?U.c.call(U.s||B,{type:_,target:B}):U.c.call(U.s||B))};var tt=p.requestAnimationFrame,At=p.cancelAnimationFrame,xt=Date.now||function(){return new Date().getTime()},Gt=xt();for(_t=["ms","moz","webkit","o"],Ot=_t.length;--Ot>-1&&!tt;)tt=p[_t[Ot]+"RequestAnimationFrame"],At=p[_t[Ot]+"CancelAnimationFrame"]||p[_t[Ot]+"CancelRequestAnimationFrame"];x("Ticker",function(_,D){var B,U,J,dt,Tt,ut=this,ae=xt(),se=D!==!1&&tt?"auto":!1,Ut=500,he=33,ze="tick",Xe=function(Ce){var je,gn,Wi=xt()-Gt;Wi>Ut&&(ae+=Wi-he),Gt+=Wi,ut.time=(Gt-ae)/1e3,je=ut.time-Tt,(!B||je>0||Ce===!0)&&(ut.frame++,Tt+=je+(je>=dt?.004:dt-je),gn=!0),Ce!==!0&&(J=U(Xe)),gn&&ut.dispatchEvent(ze)};pt.call(ut),ut.time=ut.frame=0,ut.tick=function(){Xe(!0)},ut.lagSmoothing=function(Ce,je){return arguments.length?(Ut=Ce||1/zt,void(he=Math.min(je,Ut,0))):1/zt>Ut},ut.sleep=function(){J!=null&&(se&&At?At(J):clearTimeout(J),U=K,J=null,ut===ht&&(Mt=!1))},ut.wake=function(Ce){J!==null?ut.sleep():Ce?ae+=-Gt+(Gt=xt()):ut.frame>10&&(Gt=xt()-Ut+5),U=B===0?K:se&&tt?tt:function(je){return setTimeout(je,1e3*(Tt-ut.time)+1|0)},ut===ht&&(Mt=!0),Xe(2)},ut.fps=function(Ce){return arguments.length?(B=Ce,dt=1/(B||60),Tt=this.time+dt,void ut.wake()):B},ut.useRAF=function(Ce){return arguments.length?(ut.sleep(),se=Ce,void ut.fps(B)):se},ut.fps(_),setTimeout(function(){se==="auto"&&ut.frame<5&&(gt||{}).visibilityState!=="hidden"&&ut.useRAF(!1)},1500)}),Z=Rt.Ticker.prototype=new Rt.events.EventDispatcher,Z.constructor=Rt.Ticker;var kt=x("core.Animation",function(_,D){if(this.vars=D=D||{},this._duration=this._totalDuration=_||0,this._delay=Number(D.delay)||0,this._timeScale=1,this._active=D.immediateRender===!0,this.data=D.data,this._reversed=D.reversed===!0,Ii){Mt||ht.wake();var B=this.vars.useFrames?ji:Ii;B.add(this,B._time),this.vars.paused&&this.paused(!0)}});ht=kt.ticker=new Rt.Ticker,Z=kt.prototype,Z._dirty=Z._gc=Z._initted=Z._paused=!1,Z._totalTime=Z._time=0,Z._rawPrevTime=-1,Z._next=Z._last=Z._onUpdate=Z._timeline=Z.timeline=null,Z._paused=!1;var ie=function(){Mt&&xt()-Gt>2e3&&((gt||{}).visibilityState!=="hidden"||!ht.lagSmoothing())&&ht.wake();var _=setTimeout(ie,2e3);_.unref&&_.unref()};ie(),Z.play=function(_,D){return _!=null&&this.seek(_,D),this.reversed(!1).paused(!1)},Z.pause=function(_,D){return _!=null&&this.seek(_,D),this.paused(!0)},Z.resume=function(_,D){return _!=null&&this.seek(_,D),this.paused(!1)},Z.seek=function(_,D){return this.totalTime(Number(_),D!==!1)},Z.restart=function(_,D){return this.reversed(!1).paused(!1).totalTime(_?-this._delay:0,D!==!1,!0)},Z.reverse=function(_,D){return _!=null&&this.seek(_||this.totalDuration(),D),this.reversed(!0).paused(!1)},Z.render=function(_,D,B){},Z.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},Z.isActive=function(){var _,D=this._timeline,B=this._startTime;return!D||!this._gc&&!this._paused&&D.isActive()&&(_=D.rawTime(!0))>=B&&_<B+this.totalDuration()/this._timeScale-1e-7},Z._enabled=function(_,D){return Mt||ht.wake(),this._gc=!_,this._active=this.isActive(),D!==!0&&(_&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!_&&this.timeline&&this._timeline._remove(this,!0)),!1},Z._kill=function(_,D){return this._enabled(!1,!1)},Z.kill=function(_,D){return this._kill(_,D),this},Z._uncache=function(_){for(var D=_?this:this.timeline;D;)D._dirty=!0,D=D.timeline;return this},Z._swapSelfInParams=function(_){for(var D=_.length,B=_.concat();--D>-1;)_[D]==="{self}"&&(B[D]=this);return B},Z._callback=function(_){var D=this.vars,B=D[_],U=D[_+"Params"],J=D[_+"Scope"]||D.callbackScope||this,dt=U?U.length:0;switch(dt){case 0:B.call(J);break;case 1:B.call(J,U[0]);break;case 2:B.call(J,U[0],U[1]);break;default:B.apply(J,U)}},Z.eventCallback=function(_,D,B,U){if((_||"").substr(0,2)==="on"){var J=this.vars;if(arguments.length===1)return J[_];D==null?delete J[_]:(J[_]=D,J[_+"Params"]=H(B)&&B.join("").indexOf("{self}")!==-1?this._swapSelfInParams(B):B,J[_+"Scope"]=U),_==="onUpdate"&&(this._onUpdate=D)}return this},Z.delay=function(_){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+_-this._delay),this._delay=_,this):this._delay},Z.duration=function(_){return arguments.length?(this._duration=this._totalDuration=_,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&_!==0&&this.totalTime(this._totalTime*(_/this._duration),!0),this):(this._dirty=!1,this._duration)},Z.totalDuration=function(_){return this._dirty=!1,arguments.length?this.duration(_):this._totalDuration},Z.time=function(_,D){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(_>this._duration?this._duration:_,D)):this._time},Z.totalTime=function(_,D,B){if(Mt||ht.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>_&&!B&&(_+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var U=this._totalDuration,J=this._timeline;if(_>U&&!B&&(_=U),this._startTime=(this._paused?this._pauseTime:J._time)-(this._reversed?U-_:_)/this._timeScale,J._dirty||this._uncache(!1),J._timeline)for(;J._timeline;)J._timeline._time!==(J._startTime+J._totalTime)/J._timeScale&&J.totalTime(J._totalTime,!0),J=J._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==_||this._duration===0)&&(Lt.length&&ci(),this.render(_,D,!1),Lt.length&&ci())}return this},Z.progress=Z.totalProgress=function(_,D){var B=this.duration();return arguments.length?this.totalTime(B*_,D):B?this._time/B:this.ratio},Z.startTime=function(_){return arguments.length?(_!==this._startTime&&(this._startTime=_,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,_-this._delay)),this):this._startTime},Z.endTime=function(_){return this._startTime+(_!=0?this.totalDuration():this.duration())/this._timeScale},Z.timeScale=function(_){if(!arguments.length)return this._timeScale;var D,B;for(_=_||zt,this._timeline&&this._timeline.smoothChildTiming&&(D=this._pauseTime,B=D||D===0?D:this._timeline.totalTime(),this._startTime=B-(B-this._startTime)*this._timeScale/_),this._timeScale=_,B=this.timeline;B&&B.timeline;)B._dirty=!0,B.totalDuration(),B=B.timeline;return this},Z.reversed=function(_){return arguments.length?(_!=this._reversed&&(this._reversed=_,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},Z.paused=function(_){if(!arguments.length)return this._paused;var D,B,U=this._timeline;return _!=this._paused&&U&&(Mt||_||ht.wake(),D=U.rawTime(),B=D-this._pauseTime,!_&&U.smoothChildTiming&&(this._startTime+=B,this._uncache(!1)),this._pauseTime=_?D:null,this._paused=_,this._active=this.isActive(),!_&&B!==0&&this._initted&&this.duration()&&(D=U.smoothChildTiming?this._totalTime:(D-this._startTime)/this._timeScale,this.render(D,D===this._totalTime,!0))),this._gc&&!_&&this._enabled(!0,!1),this};var lt=x("core.SimpleTimeline",function(_){kt.call(this,0,_),this.autoRemoveChildren=this.smoothChildTiming=!0});Z=lt.prototype=new kt,Z.constructor=lt,Z.kill()._gc=!1,Z._first=Z._last=Z._recent=null,Z._sortChildren=!1,Z.add=Z.insert=function(_,D,B,U){var J,dt;if(_._startTime=Number(D||0)+_._delay,_._paused&&this!==_._timeline&&(_._pauseTime=this.rawTime()-(_._timeline.rawTime()-_._pauseTime)),_.timeline&&_.timeline._remove(_,!0),_.timeline=_._timeline=this,_._gc&&_._enabled(!0,!0),J=this._last,this._sortChildren)for(dt=_._startTime;J&&J._startTime>dt;)J=J._prev;return J?(_._next=J._next,J._next=_):(_._next=this._first,this._first=_),_._next?_._next._prev=_:this._last=_,_._prev=J,this._recent=_,this._timeline&&this._uncache(!0),this},Z._remove=function(_,D){return _.timeline===this&&(D||_._enabled(!1,!0),_._prev?_._prev._next=_._next:this._first===_&&(this._first=_._next),_._next?_._next._prev=_._prev:this._last===_&&(this._last=_._prev),_._next=_._prev=_.timeline=null,_===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},Z.render=function(_,D,B){var U,J=this._first;for(this._totalTime=this._time=this._rawPrevTime=_;J;)U=J._next,(J._active||_>=J._startTime&&!J._paused&&!J._gc)&&(J._reversed?J.render((J._dirty?J.totalDuration():J._totalDuration)-(_-J._startTime)*J._timeScale,D,B):J.render((_-J._startTime)*J._timeScale,D,B)),J=U},Z.rawTime=function(){return Mt||ht.wake(),this._totalTime};var Vt=x("TweenLite",function(_,D,B){if(kt.call(this,D,B),this.render=Vt.prototype.render,_==null)throw"Cannot tween a null target.";this.target=_=typeof _!="string"?_:Vt.selector(_)||_;var U,J,dt,Tt=_.jquery||_.length&&_!==p&&_[0]&&(_[0]===p||_[0].nodeType&&_[0].style&&!_.nodeType),ut=this.vars.overwrite;if(this._overwrite=ut=ut==null?Cn[Vt.defaultOverwrite]:typeof ut=="number"?ut>>0:Cn[ut],(Tt||_ instanceof Array||_.push&&H(_))&&typeof _[0]!="number")for(this._targets=dt=mt(_),this._propLookup=[],this._siblings=[],U=0;U<dt.length;U++)J=dt[U],J?typeof J!="string"?J.length&&J!==p&&J[0]&&(J[0]===p||J[0].nodeType&&J[0].style&&!J.nodeType)?(dt.splice(U--,1),this._targets=dt=dt.concat(mt(J))):(this._siblings[U]=Oe(J,this,!1),ut===1&&this._siblings[U].length>1&&Tn(J,this,null,1,this._siblings[U])):(J=dt[U--]=Vt.selector(J),typeof J=="string"&&dt.splice(U+1,1)):dt.splice(U--,1);else this._propLookup={},this._siblings=Oe(_,this,!1),ut===1&&this._siblings.length>1&&Tn(_,this,null,1,this._siblings);(this.vars.immediateRender||D===0&&this._delay===0&&this.vars.immediateRender!==!1)&&(this._time=-zt,this.render(Math.min(0,-this._delay)))},!0),Me=function(_){return _&&_.length&&_!==p&&_[0]&&(_[0]===p||_[0].nodeType&&_[0].style&&!_.nodeType)},gi=function(_,D){var B,U={};for(B in _)Mn[B]||B in D&&B!=="transform"&&B!=="x"&&B!=="y"&&B!=="width"&&B!=="height"&&B!=="className"&&B!=="border"||!(!be[B]||be[B]&&be[B]._autoCSS)||(U[B]=_[B],delete _[B]);_.css=U};Z=Vt.prototype=new kt,Z.constructor=Vt,Z.kill()._gc=!1,Z.ratio=0,Z._firstPT=Z._targets=Z._overwrittenProps=Z._startAt=null,Z._notifyPluginsOfEnabled=Z._lazy=!1,Vt.version="2.0.2",Vt.defaultEase=Z._ease=new b(null,null,1,1),Vt.defaultOverwrite="auto",Vt.ticker=ht,Vt.autoSleep=120,Vt.lagSmoothing=function(_,D){ht.lagSmoothing(_,D)},Vt.selector=p.$||p.jQuery||function(_){var D=p.$||p.jQuery;return D?(Vt.selector=D,D(_)):(gt||(gt=p.document),gt?gt.querySelectorAll?gt.querySelectorAll(_):gt.getElementById(_.charAt(0)==="#"?_.substr(1):_):_)};var Lt=[],Fe={},vi=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Ti=/[\+-]=-?[\.\d]/,oi=function(_){for(var D,B=this._firstPT,U=1e-6;B;)D=B.blob?_===1&&this.end!=null?this.end:_?this.join(""):this.start:B.c*_+B.s,B.m?D=B.m.call(this._tween,D,this._target||B.t,this._tween):U>D&&D>-U&&!B.blob&&(D=0),B.f?B.fp?B.t[B.p](B.fp,D):B.t[B.p](D):B.t[B.p]=D,B=B._next},fe=function(_,D,B,U){var J,dt,Tt,ut,ae,se,Ut,he=[],ze=0,Xe="",Ce=0;for(he.start=_,he.end=D,_=he[0]=_+"",D=he[1]=D+"",B&&(B(he),_=he[0],D=he[1]),he.length=0,J=_.match(vi)||[],dt=D.match(vi)||[],U&&(U._next=null,U.blob=1,he._firstPT=he._applyPT=U),ae=dt.length,ut=0;ae>ut;ut++)Ut=dt[ut],se=D.substr(ze,D.indexOf(Ut,ze)-ze),Xe+=se||!ut?se:",",ze+=se.length,Ce?Ce=(Ce+1)%5:se.substr(-5)==="rgba("&&(Ce=1),Ut===J[ut]||J.length<=ut?Xe+=Ut:(Xe&&(he.push(Xe),Xe=""),Tt=parseFloat(J[ut]),he.push(Tt),he._firstPT={_next:he._firstPT,t:he,p:he.length-1,s:Tt,c:(Ut.charAt(1)==="="?parseInt(Ut.charAt(0)+"1",10)*parseFloat(Ut.substr(2)):parseFloat(Ut)-Tt)||0,f:0,m:Ce&&4>Ce?Math.round:0}),ze+=Ut.length;return Xe+=D.substr(ze),Xe&&he.push(Xe),he.setRatio=oi,Ti.test(D)&&(he.end=null),he},Je=function(_,D,B,U,J,dt,Tt,ut,ae){typeof U=="function"&&(U=U(ae||0,_));var se,Ut=typeof _[D],he=Ut!=="function"?"":D.indexOf("set")||typeof _["get"+D.substr(3)]!="function"?D:"get"+D.substr(3),ze=B!=="get"?B:he?Tt?_[he](Tt):_[he]():_[D],Xe=typeof U=="string"&&U.charAt(1)==="=",Ce={t:_,p:D,s:ze,f:Ut==="function",pg:0,n:J||D,m:dt?typeof dt=="function"?dt:Math.round:0,pr:0,c:Xe?parseInt(U.charAt(0)+"1",10)*parseFloat(U.substr(2)):parseFloat(U)-ze||0};return(typeof ze!="number"||typeof U!="number"&&!Xe)&&(Tt||isNaN(ze)||!Xe&&isNaN(U)||typeof ze=="boolean"||typeof U=="boolean"?(Ce.fp=Tt,se=fe(ze,Xe?parseFloat(Ce.s)+Ce.c+(Ce.s+"").replace(/[0-9\-\.]/g,""):U,ut||Vt.defaultStringFilter,Ce),Ce={t:se,p:"setRatio",s:0,c:1,f:2,pg:0,n:J||D,pr:0,m:0}):(Ce.s=parseFloat(ze),Xe||(Ce.c=parseFloat(U)-Ce.s||0))),Ce.c?((Ce._next=this._firstPT)&&(Ce._next._prev=Ce),this._firstPT=Ce,Ce):void 0},Ri=Vt._internals={isArray:H,isSelector:Me,lazyTweens:Lt,blobDif:fe},be=Vt._plugins={},Ve=Ri.tweenLookup={},Ke=0,Mn=Ri.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},Cn={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},ji=kt._rootFramesTimeline=new lt,Ii=kt._rootTimeline=new lt,en=30,ci=Ri.lazyRender=function(){var _,D=Lt.length;for(Fe={};--D>-1;)_=Lt[D],_&&_._lazy!==!1&&(_.render(_._lazy[0],_._lazy[1],!0),_._lazy=!1);Lt.length=0};Ii._startTime=ht.time,ji._startTime=ht.frame,Ii._active=ji._active=!0,setTimeout(ci,1),kt._updateRoot=Vt.render=function(){var _,D,B;if(Lt.length&&ci(),Ii.render((ht.time-Ii._startTime)*Ii._timeScale,!1,!1),ji.render((ht.frame-ji._startTime)*ji._timeScale,!1,!1),Lt.length&&ci(),ht.frame>=en){en=ht.frame+(parseInt(Vt.autoSleep,10)||120);for(B in Ve){for(D=Ve[B].tweens,_=D.length;--_>-1;)D[_]._gc&&D.splice(_,1);D.length===0&&delete Ve[B]}if(B=Ii._first,(!B||B._paused)&&Vt.autoSleep&&!ji._first&&ht._listeners.tick.length===1){for(;B&&B._paused;)B=B._next;B||ht.sleep()}}},ht.addEventListener("tick",kt._updateRoot);var Oe=function(_,D,B){var U,J,dt=_._gsTweenID;if(Ve[dt||(_._gsTweenID=dt="t"+Ke++)]||(Ve[dt]={target:_,tweens:[]}),D&&(U=Ve[dt].tweens,U[J=U.length]=D,B))for(;--J>-1;)U[J]===D&&U.splice(J,1);return Ve[dt].tweens},Si=function(_,D,B,U){var J,dt,Tt=_.vars.onOverwrite;return Tt&&(J=Tt(_,D,B,U)),Tt=Vt.onOverwrite,Tt&&(dt=Tt(_,D,B,U)),J!==!1&&dt!==!1},Tn=function(_,D,B,U,J){var dt,Tt,ut,ae;if(U===1||U>=4){for(ae=J.length,dt=0;ae>dt;dt++)if((ut=J[dt])!==D)ut._gc||ut._kill(null,_,D)&&(Tt=!0);else if(U===5)break;return Tt}var se,Ut=D._startTime+zt,he=[],ze=0,Xe=D._duration===0;for(dt=J.length;--dt>-1;)(ut=J[dt])===D||ut._gc||ut._paused||(ut._timeline!==D._timeline?(se=se||nn(D,0,Xe),nn(ut,se,Xe)===0&&(he[ze++]=ut)):ut._startTime<=Ut&&ut._startTime+ut.totalDuration()/ut._timeScale>Ut&&((Xe||!ut._initted)&&Ut-ut._startTime<=2e-10||(he[ze++]=ut)));for(dt=ze;--dt>-1;)if(ut=he[dt],ae=ut._firstPT,U===2&&ut._kill(B,_,D)&&(Tt=!0),U!==2||!ut._firstPT&&ut._initted&&ae){if(U!==2&&!Si(ut,D))continue;ut._enabled(!1,!1)&&(Tt=!0)}return Tt},nn=function(_,D,B){for(var U=_._timeline,J=U._timeScale,dt=_._startTime;U._timeline;){if(dt+=U._startTime,J*=U._timeScale,U._paused)return-100;U=U._timeline}return dt/=J,dt>D?dt-D:B&&dt===D||!_._initted&&2*zt>dt-D?zt:(dt+=_.totalDuration()/_._timeScale/J)>D+zt?0:dt-D-zt};Z._init=function(){var _,D,B,U,J,dt,Tt=this.vars,ut=this._overwrittenProps,ae=this._duration,se=!!Tt.immediateRender,Ut=Tt.ease;if(Tt.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),J={};for(U in Tt.startAt)J[U]=Tt.startAt[U];if(J.data="isStart",J.overwrite=!1,J.immediateRender=!0,J.lazy=se&&Tt.lazy!==!1,J.startAt=J.delay=null,J.onUpdate=Tt.onUpdate,J.onUpdateParams=Tt.onUpdateParams,J.onUpdateScope=Tt.onUpdateScope||Tt.callbackScope||this,this._startAt=Vt.to(this.target||{},0,J),se){if(this._time>0)this._startAt=null;else if(ae!==0)return}}else if(Tt.runBackwards&&ae!==0)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{this._time!==0&&(se=!1),B={};for(U in Tt)Mn[U]&&U!=="autoCSS"||(B[U]=Tt[U]);if(B.overwrite=0,B.data="isFromStart",B.lazy=se&&Tt.lazy!==!1,B.immediateRender=se,this._startAt=Vt.to(this.target,0,B),se){if(this._time===0)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=Ut=Ut?Ut instanceof b?Ut:typeof Ut=="function"?new b(Ut,Tt.easeParams):F[Ut]||Vt.defaultEase:Vt.defaultEase,Tt.easeParams instanceof Array&&Ut.config&&(this._ease=Ut.config.apply(Ut,Tt.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(dt=this._targets.length,_=0;dt>_;_++)this._initProps(this._targets[_],this._propLookup[_]={},this._siblings[_],ut?ut[_]:null,_)&&(D=!0);else D=this._initProps(this.target,this._propLookup,this._siblings,ut,0);if(D&&Vt._onPluginEvent("_onInitAllProps",this),ut&&(this._firstPT||typeof this.target!="function"&&this._enabled(!1,!1)),Tt.runBackwards)for(B=this._firstPT;B;)B.s+=B.c,B.c=-B.c,B=B._next;this._onUpdate=Tt.onUpdate,this._initted=!0},Z._initProps=function(_,D,B,U,J){var dt,Tt,ut,ae,se,Ut;if(_==null)return!1;Fe[_._gsTweenID]&&ci(),this.vars.css||_.style&&_!==p&&_.nodeType&&be.css&&this.vars.autoCSS!==!1&&gi(this.vars,_);for(dt in this.vars)if(Ut=this.vars[dt],Mn[dt])Ut&&(Ut instanceof Array||Ut.push&&H(Ut))&&Ut.join("").indexOf("{self}")!==-1&&(this.vars[dt]=Ut=this._swapSelfInParams(Ut,this));else if(be[dt]&&(ae=new be[dt])._onInitTween(_,this.vars[dt],this,J)){for(this._firstPT=se={_next:this._firstPT,t:ae,p:"setRatio",s:0,c:1,f:1,n:dt,pg:1,pr:ae._priority,m:0},Tt=ae._overwriteProps.length;--Tt>-1;)D[ae._overwriteProps[Tt]]=this._firstPT;(ae._priority||ae._onInitAllProps)&&(ut=!0),(ae._onDisable||ae._onEnable)&&(this._notifyPluginsOfEnabled=!0),se._next&&(se._next._prev=se)}else D[dt]=Je.call(this,_,dt,"get",Ut,dt,0,null,this.vars.stringFilter,J);return U&&this._kill(U,_)?this._initProps(_,D,B,U,J):this._overwrite>1&&this._firstPT&&B.length>1&&Tn(_,this,D,this._overwrite,B)?(this._kill(D,_),this._initProps(_,D,B,U,J)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(Fe[_._gsTweenID]=!0),ut)},Z.render=function(_,D,B){var U,J,dt,Tt,ut=this._time,ae=this._duration,se=this._rawPrevTime;if(_>=ae-1e-7&&_>=0)this._totalTime=this._time=ae,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(U=!0,J="onComplete",B=B||this._timeline.autoRemoveChildren),ae===0&&(this._initted||!this.vars.lazy||B)&&(this._startTime===this._timeline._duration&&(_=0),(0>se||0>=_&&_>=-1e-7||se===zt&&this.data!=="isPause")&&se!==_&&(B=!0,se>zt&&(J="onReverseComplete")),this._rawPrevTime=Tt=!D||_||se===_?_:zt);else if(1e-7>_)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(ut!==0||ae===0&&se>0)&&(J="onReverseComplete",U=this._reversed),0>_&&(this._active=!1,ae===0&&(this._initted||!this.vars.lazy||B)&&(se>=0&&(se!==zt||this.data!=="isPause")&&(B=!0),this._rawPrevTime=Tt=!D||_||se===_?_:zt)),(!this._initted||this._startAt&&this._startAt.progress())&&(B=!0);else if(this._totalTime=this._time=_,this._easeType){var Ut=_/ae,he=this._easeType,ze=this._easePower;(he===1||he===3&&Ut>=.5)&&(Ut=1-Ut),he===3&&(Ut*=2),ze===1?Ut*=Ut:ze===2?Ut*=Ut*Ut:ze===3?Ut*=Ut*Ut*Ut:ze===4&&(Ut*=Ut*Ut*Ut*Ut),he===1?this.ratio=1-Ut:he===2?this.ratio=Ut:.5>_/ae?this.ratio=Ut/2:this.ratio=1-Ut/2}else this.ratio=this._ease.getRatio(_/ae);if(this._time!==ut||B){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!B&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=ut,this._rawPrevTime=se,Lt.push(this),void(this._lazy=[_,D]);this._time&&!U?this.ratio=this._ease.getRatio(this._time/ae):U&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(this._time===0?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==ut&&_>=0&&(this._active=!0),ut===0&&(this._startAt&&(_>=0?this._startAt.render(_,!0,B):J||(J="_dummyGS")),this.vars.onStart&&(this._time!==0||ae===0)&&(D||this._callback("onStart"))),dt=this._firstPT;dt;)dt.f?dt.t[dt.p](dt.c*this.ratio+dt.s):dt.t[dt.p]=dt.c*this.ratio+dt.s,dt=dt._next;this._onUpdate&&(0>_&&this._startAt&&_!==-1e-4&&this._startAt.render(_,!0,B),D||(this._time!==ut||U||B)&&this._callback("onUpdate")),J&&(!this._gc||B)&&(0>_&&this._startAt&&!this._onUpdate&&_!==-1e-4&&this._startAt.render(_,!0,B),U&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!D&&this.vars[J]&&this._callback(J),ae===0&&this._rawPrevTime===zt&&Tt!==zt&&(this._rawPrevTime=0))}},Z._kill=function(_,D,B){if(_==="all"&&(_=null),_==null&&(D==null||D===this.target))return this._lazy=!1,this._enabled(!1,!1);D=typeof D!="string"?D||this._targets||this.target:Vt.selector(D)||D;var U,J,dt,Tt,ut,ae,se,Ut,he,ze=B&&this._time&&B._startTime===this._startTime&&this._timeline===B._timeline,Xe=this._firstPT;if((H(D)||Me(D))&&typeof D[0]!="number")for(U=D.length;--U>-1;)this._kill(_,D[U],B)&&(ae=!0);else{if(this._targets){for(U=this._targets.length;--U>-1;)if(D===this._targets[U]){ut=this._propLookup[U]||{},this._overwrittenProps=this._overwrittenProps||[],J=this._overwrittenProps[U]=_?this._overwrittenProps[U]||{}:"all";break}}else{if(D!==this.target)return!1;ut=this._propLookup,J=this._overwrittenProps=_?this._overwrittenProps||{}:"all"}if(ut){if(se=_||ut,Ut=_!==J&&J!=="all"&&_!==ut&&(typeof _!="object"||!_._tempKill),B&&(Vt.onOverwrite||this.vars.onOverwrite)){for(dt in se)ut[dt]&&(he||(he=[]),he.push(dt));if((he||!_)&&!Si(this,B,D,he))return!1}for(dt in se)(Tt=ut[dt])&&(ze&&(Tt.f?Tt.t[Tt.p](Tt.s):Tt.t[Tt.p]=Tt.s,ae=!0),Tt.pg&&Tt.t._kill(se)&&(ae=!0),Tt.pg&&Tt.t._overwriteProps.length!==0||(Tt._prev?Tt._prev._next=Tt._next:Tt===this._firstPT&&(this._firstPT=Tt._next),Tt._next&&(Tt._next._prev=Tt._prev),Tt._next=Tt._prev=null),delete ut[dt]),Ut&&(J[dt]=1);!this._firstPT&&this._initted&&Xe&&this._enabled(!1,!1)}}return ae},Z.invalidate=function(){return this._notifyPluginsOfEnabled&&Vt._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],kt.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-zt,this.render(Math.min(0,-this._delay))),this},Z._enabled=function(_,D){if(Mt||ht.wake(),_&&this._gc){var B,U=this._targets;if(U)for(B=U.length;--B>-1;)this._siblings[B]=Oe(U[B],this,!0);else this._siblings=Oe(this.target,this,!0)}return kt.prototype._enabled.call(this,_,D),this._notifyPluginsOfEnabled&&this._firstPT?Vt._onPluginEvent(_?"_onEnable":"_onDisable",this):!1},Vt.to=function(_,D,B){return new Vt(_,D,B)},Vt.from=function(_,D,B){return B.runBackwards=!0,B.immediateRender=B.immediateRender!=0,new Vt(_,D,B)},Vt.fromTo=function(_,D,B,U){return U.startAt=B,U.immediateRender=U.immediateRender!=0&&B.immediateRender!=0,new Vt(_,D,U)},Vt.delayedCall=function(_,D,B,U,J){return new Vt(D,0,{delay:_,onComplete:D,onCompleteParams:B,callbackScope:U,onReverseComplete:D,onReverseCompleteParams:B,immediateRender:!1,lazy:!1,useFrames:J,overwrite:0})},Vt.set=function(_,D){return new Vt(_,0,D)},Vt.getTweensOf=function(_,D){if(_==null)return[];_=typeof _!="string"?_:Vt.selector(_)||_;var B,U,J,dt;if((H(_)||Me(_))&&typeof _[0]!="number"){for(B=_.length,U=[];--B>-1;)U=U.concat(Vt.getTweensOf(_[B],D));for(B=U.length;--B>-1;)for(dt=U[B],J=B;--J>-1;)dt===U[J]&&U.splice(B,1)}else if(_._gsTweenID)for(U=Oe(_).concat(),B=U.length;--B>-1;)(U[B]._gc||D&&!U[B].isActive())&&U.splice(B,1);return U||[]},Vt.killTweensOf=Vt.killDelayedCallsTo=function(_,D,B){typeof D=="object"&&(B=D,D=!1);for(var U=Vt.getTweensOf(_,D),J=U.length;--J>-1;)U[J]._kill(B,_)};var Ci=x("plugins.TweenPlugin",function(_,D){this._overwriteProps=(_||"").split(","),this._propName=this._overwriteProps[0],this._priority=D||0,this._super=Ci.prototype},!0);if(Z=Ci.prototype,Ci.version="1.19.0",Ci.API=2,Z._firstPT=null,Z._addTween=Je,Z.setRatio=oi,Z._kill=function(_){var D,B=this._overwriteProps,U=this._firstPT;if(_[this._propName]!=null)this._overwriteProps=[];else for(D=B.length;--D>-1;)_[B[D]]!=null&&B.splice(D,1);for(;U;)_[U.n]!=null&&(U._next&&(U._next._prev=U._prev),U._prev?(U._prev._next=U._next,U._prev=null):this._firstPT===U&&(this._firstPT=U._next)),U=U._next;return!1},Z._mod=Z._roundProps=function(_){for(var D,B=this._firstPT;B;)D=_[this._propName]||B.n!=null&&_[B.n.split(this._propName+"_").join("")],D&&typeof D=="function"&&(B.f===2?B.t._applyPT.m=D:B.m=D),B=B._next},Vt._onPluginEvent=function(_,D){var B,U,J,dt,Tt,ut=D._firstPT;if(_==="_onInitAllProps"){for(;ut;){for(Tt=ut._next,U=J;U&&U.pr>ut.pr;)U=U._next;(ut._prev=U?U._prev:dt)?ut._prev._next=ut:J=ut,(ut._next=U)?U._prev=ut:dt=ut,ut=Tt}ut=D._firstPT=J}for(;ut;)ut.pg&&typeof ut.t[_]=="function"&&ut.t[_]()&&(B=!0),ut=ut._next;return B},Ci.activate=function(_){for(var D=_.length;--D>-1;)_[D].API===Ci.API&&(be[new _[D]()._propName]=_[D]);return!0},O.plugin=function(_){if(!(_&&_.propName&&_.init&&_.API))throw"illegal plugin definition.";var D,B=_.propName,U=_.priority||0,J=_.overwriteProps,dt={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},Tt=x("plugins."+B.charAt(0).toUpperCase()+B.substr(1)+"Plugin",function(){Ci.call(this,B,U),this._overwriteProps=J||[]},_.global===!0),ut=Tt.prototype=new Ci(B);ut.constructor=Tt,Tt.API=_.API;for(D in dt)typeof _[D]=="function"&&(ut[dt[D]]=_[D]);return Tt.version=_.version,Ci.activate([Tt]),Tt},_t=p._gsQueue){for(Ot=0;Ot<_t.length;Ot++)_t[Ot]();for(Z in m)m[Z].func||p.console.log("GSAP encountered missing dependency: "+Z)}Mt=!1}(typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window,"TweenMax");const ka={class:"modal-background"},Va=["innerHTML"],ja={name:"MapModali"},Hs=Se.defineComponent({...ja,props:{},setup(p,{expose:bt}){const $=Se.ref(""),gt=Se.ref(""),at=_t=>{gt.value=_t,$.value="five"},M=()=>{$.value=$.value+" out"};return Se.onMounted(()=>{}),bt({text:gt,show:at,hide:M}),(_t,Ot)=>(Se.openBlock(),Se.createElementBlock("div",{id:"modal-container",class:Se.normalizeClass($.value),onClick:M},[Se.createElementVNode("div",ka,[Se.createElementVNode("div",{class:"modal",onClick:Ot[0]||(Ot[0]=Z=>{Z.stopPropagation()})},[Se.createElementVNode("p",{style:{"white-space":"pre-line","line-height":"1",margin:"0",color:"#fff"},innerHTML:gt.value},null,8,Va)])])],2))}}),Mh="",Wa={class:"content"},Xa=Se.createElementVNode("canvas",{class:"landscape"},null,-1),qa={class:"content__title"},Ya=Se.createElementVNode("div",{class:"overlay"},null,-1),Za={name:"BimBackgroundPlate"},ks=Se.defineComponent({...Za,setup(p){const bt=at=>{let M=`
|
|
14
|
+
vec3 mod289(vec3 x)
|
|
15
|
+
{
|
|
16
|
+
return x - floor(x * (1.0 / 289.0)) * 289.0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
vec4 mod289(vec4 x)
|
|
20
|
+
{
|
|
21
|
+
return x - floor(x * (1.0 / 289.0)) * 289.0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
vec4 permute(vec4 x)
|
|
25
|
+
{
|
|
26
|
+
return mod289(((x*34.0)+1.0)*x);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
vec4 taylorInvSqrt(vec4 r)
|
|
30
|
+
{
|
|
31
|
+
return 1.79284291400159 - 0.85373472095314 * r;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
vec3 fade(vec3 t) {
|
|
35
|
+
return t*t*t*(t*(t*6.0-15.0)+10.0);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Classic Perlin noise
|
|
39
|
+
float cnoise(vec3 P)
|
|
40
|
+
{
|
|
41
|
+
vec3 Pi0 = floor(P); // Integer part for indexing
|
|
42
|
+
vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1
|
|
43
|
+
Pi0 = mod289(Pi0);
|
|
44
|
+
Pi1 = mod289(Pi1);
|
|
45
|
+
vec3 Pf0 = fract(P); // Fractional part for interpolation
|
|
46
|
+
vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0
|
|
47
|
+
vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
|
|
48
|
+
vec4 iy = vec4(Pi0.yy, Pi1.yy);
|
|
49
|
+
vec4 iz0 = Pi0.zzzz;
|
|
50
|
+
vec4 iz1 = Pi1.zzzz;
|
|
51
|
+
|
|
52
|
+
vec4 ixy = permute(permute(ix) + iy);
|
|
53
|
+
vec4 ixy0 = permute(ixy + iz0);
|
|
54
|
+
vec4 ixy1 = permute(ixy + iz1);
|
|
55
|
+
|
|
56
|
+
vec4 gx0 = ixy0 * (1.0 / 7.0);
|
|
57
|
+
vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;
|
|
58
|
+
gx0 = fract(gx0);
|
|
59
|
+
vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);
|
|
60
|
+
vec4 sz0 = step(gz0, vec4(0.0));
|
|
61
|
+
gx0 -= sz0 * (step(0.0, gx0) - 0.5);
|
|
62
|
+
gy0 -= sz0 * (step(0.0, gy0) - 0.5);
|
|
63
|
+
|
|
64
|
+
vec4 gx1 = ixy1 * (1.0 / 7.0);
|
|
65
|
+
vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;
|
|
66
|
+
gx1 = fract(gx1);
|
|
67
|
+
vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);
|
|
68
|
+
vec4 sz1 = step(gz1, vec4(0.0));
|
|
69
|
+
gx1 -= sz1 * (step(0.0, gx1) - 0.5);
|
|
70
|
+
gy1 -= sz1 * (step(0.0, gy1) - 0.5);
|
|
71
|
+
|
|
72
|
+
vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);
|
|
73
|
+
vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);
|
|
74
|
+
vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);
|
|
75
|
+
vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);
|
|
76
|
+
vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);
|
|
77
|
+
vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);
|
|
78
|
+
vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);
|
|
79
|
+
vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);
|
|
80
|
+
|
|
81
|
+
vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));
|
|
82
|
+
g000 *= norm0.x;
|
|
83
|
+
g010 *= norm0.y;
|
|
84
|
+
g100 *= norm0.z;
|
|
85
|
+
g110 *= norm0.w;
|
|
86
|
+
vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));
|
|
87
|
+
g001 *= norm1.x;
|
|
88
|
+
g011 *= norm1.y;
|
|
89
|
+
g101 *= norm1.z;
|
|
90
|
+
g111 *= norm1.w;
|
|
91
|
+
|
|
92
|
+
float n000 = dot(g000, Pf0);
|
|
93
|
+
float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));
|
|
94
|
+
float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));
|
|
95
|
+
float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));
|
|
96
|
+
float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));
|
|
97
|
+
float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));
|
|
98
|
+
float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));
|
|
99
|
+
float n111 = dot(g111, Pf1);
|
|
100
|
+
|
|
101
|
+
vec3 fade_xyz = fade(Pf0);
|
|
102
|
+
vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);
|
|
103
|
+
vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);
|
|
104
|
+
float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);
|
|
105
|
+
return 2.2 * n_xyz;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Classic Perlin noise, periodic variant
|
|
109
|
+
float pnoise(vec3 P, vec3 rep)
|
|
110
|
+
{
|
|
111
|
+
vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period
|
|
112
|
+
vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period
|
|
113
|
+
Pi0 = mod289(Pi0);
|
|
114
|
+
Pi1 = mod289(Pi1);
|
|
115
|
+
vec3 Pf0 = fract(P); // Fractional part for interpolation
|
|
116
|
+
vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0
|
|
117
|
+
vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
|
|
118
|
+
vec4 iy = vec4(Pi0.yy, Pi1.yy);
|
|
119
|
+
vec4 iz0 = Pi0.zzzz;
|
|
120
|
+
vec4 iz1 = Pi1.zzzz;
|
|
121
|
+
|
|
122
|
+
vec4 ixy = permute(permute(ix) + iy);
|
|
123
|
+
vec4 ixy0 = permute(ixy + iz0);
|
|
124
|
+
vec4 ixy1 = permute(ixy + iz1);
|
|
125
|
+
|
|
126
|
+
vec4 gx0 = ixy0 * (1.0 / 7.0);
|
|
127
|
+
vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;
|
|
128
|
+
gx0 = fract(gx0);
|
|
129
|
+
vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);
|
|
130
|
+
vec4 sz0 = step(gz0, vec4(0.0));
|
|
131
|
+
gx0 -= sz0 * (step(0.0, gx0) - 0.5);
|
|
132
|
+
gy0 -= sz0 * (step(0.0, gy0) - 0.5);
|
|
133
|
+
|
|
134
|
+
vec4 gx1 = ixy1 * (1.0 / 7.0);
|
|
135
|
+
vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;
|
|
136
|
+
gx1 = fract(gx1);
|
|
137
|
+
vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);
|
|
138
|
+
vec4 sz1 = step(gz1, vec4(0.0));
|
|
139
|
+
gx1 -= sz1 * (step(0.0, gx1) - 0.5);
|
|
140
|
+
gy1 -= sz1 * (step(0.0, gy1) - 0.5);
|
|
141
|
+
|
|
142
|
+
vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);
|
|
143
|
+
vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);
|
|
144
|
+
vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);
|
|
145
|
+
vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);
|
|
146
|
+
vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);
|
|
147
|
+
vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);
|
|
148
|
+
vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);
|
|
149
|
+
vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);
|
|
150
|
+
|
|
151
|
+
vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));
|
|
152
|
+
g000 *= norm0.x;
|
|
153
|
+
g010 *= norm0.y;
|
|
154
|
+
g100 *= norm0.z;
|
|
155
|
+
g110 *= norm0.w;
|
|
156
|
+
vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));
|
|
157
|
+
g001 *= norm1.x;
|
|
158
|
+
g011 *= norm1.y;
|
|
159
|
+
g101 *= norm1.z;
|
|
160
|
+
g111 *= norm1.w;
|
|
161
|
+
|
|
162
|
+
float n000 = dot(g000, Pf0);
|
|
163
|
+
float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));
|
|
164
|
+
float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));
|
|
165
|
+
float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));
|
|
166
|
+
float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));
|
|
167
|
+
float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));
|
|
168
|
+
float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));
|
|
169
|
+
float n111 = dot(g111, Pf1);
|
|
170
|
+
|
|
171
|
+
vec3 fade_xyz = fade(Pf0);
|
|
172
|
+
vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);
|
|
173
|
+
vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);
|
|
174
|
+
float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);
|
|
175
|
+
return 2.2 * n_xyz;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
#define PI 3.1415926535897932384626433832795
|
|
179
|
+
|
|
180
|
+
uniform float time;
|
|
181
|
+
uniform float scroll;
|
|
182
|
+
uniform float maxHeight;
|
|
183
|
+
uniform float speed;
|
|
184
|
+
uniform float distortCenter;
|
|
185
|
+
uniform float roadWidth;
|
|
186
|
+
varying float vDisplace;
|
|
187
|
+
|
|
188
|
+
varying float fogDepth;
|
|
189
|
+
|
|
190
|
+
void main(){
|
|
191
|
+
|
|
192
|
+
float t = time * speed;
|
|
193
|
+
float wRoad = distortCenter;
|
|
194
|
+
float wRoad2 = wRoad * 0.5;
|
|
195
|
+
|
|
196
|
+
float angleCenter = uv.y * PI*4.0;
|
|
197
|
+
angleCenter += t * 0.9;
|
|
198
|
+
|
|
199
|
+
float centerOff = (
|
|
200
|
+
sin(angleCenter) +
|
|
201
|
+
sin(angleCenter*0.5)
|
|
202
|
+
) * wRoad;
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
vec3 noiseIn = vec3(uv, 1.0)*10.0;
|
|
206
|
+
float noise = cnoise(vec3(noiseIn.x, noiseIn.y + scroll, noiseIn.z));
|
|
207
|
+
noise += 1.0;
|
|
208
|
+
float h = noise;
|
|
209
|
+
float angle = (uv.x - centerOff) * PI;
|
|
210
|
+
float f = abs(cos(angle));
|
|
211
|
+
h *= pow(f, 1.5 + roadWidth);
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
vDisplace = h;
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
h*=maxHeight;
|
|
218
|
+
|
|
219
|
+
vec3 transformed = vec3( position.x, position.y, position.z + h );
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );
|
|
223
|
+
gl_Position = projectionMatrix * mvPosition;
|
|
224
|
+
|
|
225
|
+
fogDepth = -mvPosition.z;
|
|
226
|
+
|
|
227
|
+
}
|
|
228
|
+
`,_t=`
|
|
229
|
+
uniform float time;
|
|
230
|
+
uniform vec3 color;
|
|
231
|
+
uniform sampler2D pallete;
|
|
232
|
+
varying float vDisplace;
|
|
233
|
+
|
|
234
|
+
uniform vec3 fogColor;
|
|
235
|
+
uniform float fogNear;
|
|
236
|
+
uniform float fogFar;
|
|
237
|
+
varying float fogDepth;
|
|
238
|
+
|
|
239
|
+
void main(){
|
|
240
|
+
|
|
241
|
+
vec2 stripPos = vec2( 0.0, vDisplace * (sin(time)*0.5+0.7) );
|
|
242
|
+
vec4 stripColor = texture2D( pallete, stripPos );
|
|
243
|
+
stripColor *= pow(1.0-vDisplace, 1.0);
|
|
244
|
+
|
|
245
|
+
gl_FragColor = stripColor;
|
|
246
|
+
|
|
247
|
+
#ifdef USE_FOG
|
|
248
|
+
float fogFactor = smoothstep( fogNear, fogFar, fogDepth );
|
|
249
|
+
gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
|
|
250
|
+
#endif
|
|
251
|
+
}`;var Ot=document.querySelector(".landscape"),Z=window.innerWidth,ht=window.innerHeight,Mt,ct,Rt,zt,mt={x:0,y:0,xDamped:0,yDamped:0},K=typeof window.orientation<"u";H();function H(){m(),f(),O(),F(),K?window.addEventListener("touchmove",b,{passive:!1}):window.addEventListener("mousemove",b),window.addEventListener("resize",X),X()}function m(){Mt=new THREE.Scene;var tt=new THREE.Color(3355443);Mt.background=tt,Mt.fog=new THREE.Fog(tt,0,400),x(),Rt=new THREE.PerspectiveCamera(60,Z/ht,.1,1e4),Rt.position.y=8,Rt.position.z=4;let At=new THREE.AmbientLight(16777215,1);Mt.add(At),ct=new THREE.WebGLRenderer({canvas:Ot,antialias:!0}),ct.setPixelRatio=devicePixelRatio,ct.setSize(Z,ht)}function f(){var tt=new THREE.PlaneBufferGeometry(100,400,400,400),At={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)},xt=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.merge([THREE.ShaderLib.basic.uniforms,At]),vertexShader:M,fragmentShader:_t,wireframe:!1,fog:!0});zt=new THREE.Mesh(tt,xt),zt.position.z=-180,zt.rotation.x=-Math.PI/2,Mt.add(zt)}function O(){new THREE.TextureLoader().load(at.palleteImage,function(tt){zt.material.uniforms.pallete.value=tt,zt.material.needsUpdate=!0})}function x(){x=new THREE.Sky,x.scale.setScalar(45e4),x.material.uniforms.turbidity.value=13,x.material.uniforms.rayleigh.value=1.2,x.material.uniforms.luminance.value=1,x.material.uniforms.mieCoefficient.value=.1,x.material.uniforms.mieDirectionalG.value=.58,Mt.add(x);let tt=new THREE.Mesh(new THREE.SphereBufferGeometry(2e4,16,8),new THREE.MeshBasicMaterial({color:16777215}));tt.visible=!1,Mt.add(tt);var At=Math.PI*-.002,xt=2*Math.PI*-.25;tt.position.x=4e5*Math.cos(xt),tt.position.y=4e5*Math.sin(xt)*Math.sin(At),tt.position.z=4e5*Math.sin(xt)*Math.cos(At),x.material.uniforms.sunPosition.value.copy(tt.position)}function X(){Z=window.innerWidth,ht=window.innerHeight,Rt.aspect=Z/ht,Rt.updateProjectionMatrix(),ct.setSize(Z,ht)}function b(tt){tt.preventDefault();var At,xt;tt.type=="mousemove"?(At=tt.clientX,xt=tt.clientY):(At=tt.changedTouches[0].clientX,xt=tt.changedTouches[0].clientY),mt.x=At,mt.y=xt}function F(){requestAnimationFrame(F),mt.xDamped=pt(mt.xDamped,mt.x,.1),mt.yDamped=pt(mt.yDamped,mt.y,.1);var tt=performance.now()*.001;zt.material.uniforms.time.value=tt,zt.material.uniforms.scroll.value=tt+Y(mt.yDamped,0,ht,0,4),zt.material.uniforms.distortCenter.value=Math.sin(tt)*.1,zt.material.uniforms.roadWidth.value=Y(mt.xDamped,0,Z,1,4.5),Rt.position.y=Y(mt.yDamped,0,ht,4,11),ct.render(Mt,Rt)}function Y(tt,At,xt,Gt,kt){return Gt+(kt-Gt)*((tt-At)/(xt-At))}function pt(tt,At,xt){return(1-xt)*tt+xt*At}},$=()=>{const at=document.querySelector(".overlay"),M=document.querySelector(".content__title");charming(M);const _t=Array.from(M.querySelectorAll("span"));TweenMax.to(at,2,{ease:Quad.easeOut,opacity:0}),TweenMax.set(_t,{opacity:0}),TweenMax.staggerTo(_t,1.5,{ease:Expo.easeOut,startAt:{rotationX:-100,z:-1e3},opacity:1,rotationX:0,z:0},.1);const Ot=document.querySelector(".content__subtitle");TweenMax.set(Ot,{opacity:0}),TweenMax.to(Ot,1.5,{ease:Expo.easeOut,startAt:{y:30},opacity:1,y:0})},gt=()=>{bt({palleteImage:"img/pallete.png"}),$()};return Se.onMounted(()=>{gt()}),(at,M)=>(Se.openBlock(),Se.createElementBlock(Se.Fragment,null,[Se.createElementVNode("div",Wa,[Xa,Se.createElementVNode("h2",qa,[Se.renderSlot(at.$slots,"default")])]),Ya],64))}}),Th="";(function(p,bt){typeof Fi=="object"&&typeof module<"u"?bt(Fi):typeof define=="function"&&define.amd?define(["exports"],bt):bt(p.THREE={})})(window,function(p){function bt(){}function $(t,e){this.x=t||0,this.y=e||0}function gt(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function at(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._w=n!==void 0?n:1}function M(t,e,i){this.x=t||0,this.y=e||0,this.z=i||0}function _t(){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 Ot(t,e,i,n,r,o,s,a,h,l){Object.defineProperty(this,"id",{value:nh++}),this.uuid=Ee.generateUUID(),this.name="",this.image=t!==void 0?t:Ot.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=e!==void 0?e:Ot.DEFAULT_MAPPING,this.wrapS=i!==void 0?i:1001,this.wrapT=n!==void 0?n:1001,this.magFilter=r!==void 0?r:1006,this.minFilter=o!==void 0?o:1008,this.anisotropy=h!==void 0?h:1,this.format=s!==void 0?s:1023,this.type=a!==void 0?a:1009,this.offset=new $(0,0),this.repeat=new $(1,1),this.center=new $(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new _t,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=l!==void 0?l:3e3,this.version=0,this.onUpdate=null}function Z(t,e,i,n){this.x=t||0,this.y=e||0,this.z=i||0,this.w=n!==void 0?n:1}function ht(t,e,i){this.width=t,this.height=e,this.scissor=new Z(0,0,t,e),this.scissorTest=!1,this.viewport=new Z(0,0,t,e),i=i||{},i.minFilter===void 0&&(i.minFilter=1006),this.texture=new Ot(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 Mt(t,e,i){ht.call(this,t,e,i),this.activeMipMapLevel=this.activeCubeFace=0}function ct(t,e,i,n,r,o,s,a,h,l,c,u){Ot.call(this,null,o,s,a,h,l,n,r,c,u),this.image={data:t,width:e,height:i},this.magFilter=h!==void 0?h:1003,this.minFilter=l!==void 0?l:1003,this.flipY=this.generateMipmaps=!1,this.unpackAlignment=1}function Rt(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 zt(t,e){this.center=t!==void 0?t:new M,this.radius=e!==void 0?e:0}function mt(t,e){this.normal=t!==void 0?t:new M(1,0,0),this.constant=e!==void 0?e:0}function K(t,e,i,n,r,o){this.planes=[t!==void 0?t:new mt,e!==void 0?e:new mt,i!==void 0?i:new mt,n!==void 0?n:new mt,r!==void 0?r:new mt,o!==void 0?o:new mt]}function H(t,e,i){return e===void 0&&i===void 0?this.set(t):this.setRGB(t,e,i)}function m(){function t(r,o){i!==!1&&(n(r,o),e.requestAnimationFrame(t))}var e=null,i=!1,n=null;return{start:function(){i!==!0&&n!==null&&(e.requestAnimationFrame(t),i=!0)},stop:function(){i=!1},setAnimationLoop:function(r){n=r},setContext:function(r){e=r}}}function f(t){function e(n,r){var o=n.array,s=n.dynamic?35048:35044,a=t.createBuffer();return t.bindBuffer(r,a),t.bufferData(r,o,s),n.onUploadCallback(),r=5126,o instanceof Float32Array?r=5126:o instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):o instanceof Uint16Array?r=5123:o instanceof Int16Array?r=5122:o instanceof Uint32Array?r=5125:o instanceof Int32Array?r=5124:o instanceof Int8Array?r=5120:o instanceof Uint8Array&&(r=5121),{buffer:a,type:r,bytesPerElement:o.BYTES_PER_ELEMENT,version:n.version}}var i=new WeakMap;return{get:function(n){return n.isInterleavedBufferAttribute&&(n=n.data),i.get(n)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=i.get(n);r&&(t.deleteBuffer(r.buffer),i.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var o=i.get(n);if(o===void 0)i.set(n,e(n,r));else if(o.version<n.version){var s=n,a=s.array,h=s.updateRange;t.bindBuffer(r,o.buffer),s.dynamic===!1?t.bufferData(r,a,35044):h.count===-1?t.bufferSubData(r,0,a):h.count===0?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,h.offset*a.BYTES_PER_ELEMENT,a.subarray(h.offset,h.offset+h.count)),h.count=-1),o.version=n.version}}}}function O(t,e,i,n,r,o){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=r&&r.isColor?r:new H,this.vertexColors=Array.isArray(r)?r:[],this.materialIndex=o!==void 0?o: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 X(){this.mask=1}function b(){Object.defineProperty(this,"id",{value:oh++}),this.uuid=Ee.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=b.DefaultUp.clone();var t=new M,e=new x,i=new at,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 gt},normalMatrix:{value:new _t}}),this.matrix=new gt,this.matrixWorld=new gt,this.matrixAutoUpdate=b.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new X,this.visible=!0,this.receiveShadow=this.castShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function F(){Object.defineProperty(this,"id",{value:sh+=2}),this.uuid=Ee.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 Y(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 pt(t,e,i){Y.call(this,new Int8Array(t),e,i)}function tt(t,e,i){Y.call(this,new Uint8Array(t),e,i)}function At(t,e,i){Y.call(this,new Uint8ClampedArray(t),e,i)}function xt(t,e,i){Y.call(this,new Int16Array(t),e,i)}function Gt(t,e,i){Y.call(this,new Uint16Array(t),e,i)}function kt(t,e,i){Y.call(this,new Int32Array(t),e,i)}function ie(t,e,i){Y.call(this,new Uint32Array(t),e,i)}function lt(t,e,i){Y.call(this,new Float32Array(t),e,i)}function Vt(t,e,i){Y.call(this,new Float64Array(t),e,i)}function Me(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function gi(t){if(t.length===0)return-1/0;for(var e=t[0],i=1,n=t.length;i<n;++i)t[i]>e&&(e=t[i]);return e}function Lt(){Object.defineProperty(this,"id",{value:ah+=2}),this.uuid=Ee.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.drawRange={start:0,count:1/0},this.userData={}}function Fe(t,e,i,n,r,o){F.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:o},this.fromBufferGeometry(new vi(t,e,i,n,r,o)),this.mergeVertices()}function vi(t,e,i,n,r,o){function s(w,S,P,G,N,q,V,ot,T,A,et){var yt=q/T,ft=V/A,st=q/2,Ht=V/2,It=ot/2;V=T+1;var $t=A+1,Xt=q=0,Qt,re,me=new M;for(re=0;re<$t;re++){var Ae=re*ft-Ht;for(Qt=0;Qt<V;Qt++)me[w]=(Qt*yt-st)*G,me[S]=Ae*N,me[P]=It,l.push(me.x,me.y,me.z),me[w]=0,me[S]=0,me[P]=0<ot?1:-1,c.push(me.x,me.y,me.z),u.push(Qt/T),u.push(1-re/A),q+=1}for(re=0;re<A;re++)for(Qt=0;Qt<T;Qt++)w=d+Qt+V*(re+1),S=d+(Qt+1)+V*(re+1),P=d+(Qt+1)+V*re,h.push(d+Qt+V*re,w,P),h.push(w,S,P),Xt+=6;a.addGroup(g,Xt,et),g+=Xt,d+=q}Lt.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:o};var a=this;t=t||1,e=e||1,i=i||1,n=Math.floor(n)||1,r=Math.floor(r)||1,o=Math.floor(o)||1;var h=[],l=[],c=[],u=[],d=0,g=0;s("z","y","x",-1,-1,i,e,t,o,r,0),s("z","y","x",1,-1,i,e,-t,o,r,1),s("x","z","y",1,1,t,i,e,n,o,2),s("x","z","y",1,-1,t,i,-e,n,o,3),s("x","y","z",1,-1,t,e,i,n,r,4),s("x","y","z",-1,-1,t,e,-i,n,r,5),this.setIndex(h),this.addAttribute("position",new lt(l,3)),this.addAttribute("normal",new lt(c,3)),this.addAttribute("uv",new lt(u,2))}function Ti(t,e,i,n){F.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new oi(t,e,i,n)),this.mergeVertices()}function oi(t,e,i,n){Lt.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},t=t||1,e=e||1;var r=t/2,o=e/2;i=Math.floor(i)||1,n=Math.floor(n)||1;var s=i+1,a=n+1,h=t/i,l=e/n,c=[],u=[],d=[],g=[];for(t=0;t<a;t++){var w=t*l-o;for(e=0;e<s;e++)u.push(e*h-r,-w,0),d.push(0,0,1),g.push(e/i),g.push(1-t/n)}for(t=0;t<n;t++)for(e=0;e<i;e++)r=e+s*(t+1),o=e+1+s*(t+1),a=e+1+s*t,c.push(e+s*t,r,a),c.push(r,o,a);this.setIndex(c),this.addAttribute("position",new lt(u,3)),this.addAttribute("normal",new lt(d,3)),this.addAttribute("uv",new lt(g,2))}function fe(){Object.defineProperty(this,"id",{value:hh++}),this.uuid=Ee.generateUUID(),this.name="",this.type="Material",this.lights=this.fog=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=0,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null,this.depthFunc=3,this.depthWrite=this.depthTest=!0,this.clippingPlanes=null,this.clipShadows=this.clipIntersection=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetUnits=this.polygonOffsetFactor=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.userData={},this.needsUpdate=!0}function Je(t){fe.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=`void main() {
|
|
252
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
253
|
+
}`,this.fragmentShader=`void main() {
|
|
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 Ri(t,e){this.origin=t!==void 0?t:new M,this.direction=e!==void 0?e:new M}function be(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 Ve(t){fe.call(this),this.type="MeshBasicMaterial",this.color=new H(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.lights=this.morphTargets=this.skinning=!1,this.setValues(t)}function Ke(t,e){b.call(this),this.type="Mesh",this.geometry=t!==void 0?t:new Lt,this.material=e!==void 0?e:new Ve({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function Mn(t,e,i,n){function r(l,c){e.buffers.color.setClear(l.r,l.g,l.b,c,n)}var o=new H(0),s=0,a,h;return{getClearColor:function(){return o},setClearColor:function(l,c){o.set(l),s=c!==void 0?c:1,r(o,s)},getClearAlpha:function(){return s},setClearAlpha:function(l){s=l,r(o,s)},render:function(l,c,u,d){c=c.background,c===null?r(o,s):c&&c.isColor&&(r(c,1),d=!0),(t.autoClear||d)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),c&&(c.isCubeTexture||c.isWebGLRenderTargetCube)?(h===void 0&&(h=new Ke(new vi(1,1,1),new Je({type:"BackgroundCubeMaterial",uniforms:_i.clone(pn.cube.uniforms),vertexShader:pn.cube.vertexShader,fragmentShader:pn.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1})),h.geometry.removeAttribute("normal"),h.geometry.removeAttribute("uv"),h.onBeforeRender=function(g,w,S){this.matrixWorld.copyPosition(S.matrixWorld)},i.update(h)),h.material.uniforms.tCube.value=c.isWebGLRenderTargetCube?c.texture:c,h.material.uniforms.tFlip.value=c.isWebGLRenderTargetCube?1:-1,l.push(h,h.geometry,h.material,0,null)):c&&c.isTexture&&(a===void 0&&(a=new Ke(new oi(2,2),new Je({type:"BackgroundMaterial",uniforms:_i.clone(pn.background.uniforms),vertexShader:pn.background.vertexShader,fragmentShader:pn.background.fragmentShader,side:0,depthTest:!0,depthWrite:!1,fog:!1})),a.geometry.removeAttribute("normal"),i.update(a)),a.material.uniforms.t2D.value=c,c.matrixAutoUpdate===!0&&c.updateMatrix(),a.material.uniforms.uvTransform.value.copy(c.matrix),l.push(a,a.geometry,a.material,0,null))}}}function Cn(t,e,i,n){var r;this.setMode=function(o){r=o},this.render=function(o,s){t.drawArrays(r,o,s),i.update(s,r)},this.renderInstances=function(o,s,a){if(n.isWebGL2)var h=t;else if(h=e.get("ANGLE_instanced_arrays"),h===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}h[n.isWebGL2?"drawArraysInstanced":"drawArraysInstancedANGLE"](r,s,a,o.maxInstancedCount),i.update(a,r,o.maxInstancedCount)}}function ji(t,e,i){function n(G){if(G==="highp"){if(0<t.getShaderPrecisionFormat(35633,36338).precision&&0<t.getShaderPrecisionFormat(35632,36338).precision)return"highp";G="mediump"}return G==="mediump"&&0<t.getShaderPrecisionFormat(35633,36337).precision&&0<t.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var r,o=typeof WebGL2RenderingContext<"u"&&t instanceof WebGL2RenderingContext,s=i.precision!==void 0?i.precision:"highp",a=n(s);a!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",a,"instead."),s=a),i=i.logarithmicDepthBuffer===!0,a=t.getParameter(34930);var h=t.getParameter(35660),l=t.getParameter(3379),c=t.getParameter(34076),u=t.getParameter(34921),d=t.getParameter(36347),g=t.getParameter(36348),w=t.getParameter(36349),S=0<h,P=o||!!e.get("OES_texture_float");return{isWebGL2:o,getMaxAnisotropy:function(){if(r!==void 0)return r;var G=e.get("EXT_texture_filter_anisotropic");return r=G!==null?t.getParameter(G.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:n,precision:s,logarithmicDepthBuffer:i,maxTextures:a,maxVertexTextures:h,maxTextureSize:l,maxCubemapSize:c,maxAttributes:u,maxVertexUniforms:d,maxVaryings:g,maxFragmentUniforms:w,vertexTextures:S,floatFragmentTextures:P,floatVertexTextures:S&&P}}function Ii(){function t(){l.value!==n&&(l.value=n,l.needsUpdate=0<r),i.numPlanes=r,i.numIntersection=0}function e(c,u,d,g){var w=c!==null?c.length:0,S=null;if(w!==0){if(S=l.value,g!==!0||S===null)for(g=d+4*w,u=u.matrixWorldInverse,h.getNormalMatrix(u),(S===null||S.length<g)&&(S=new Float32Array(g)),g=0;g!==w;++g,d+=4)a.copy(c[g]).applyMatrix4(u,h),a.normal.toArray(S,d),S[d+3]=a.constant;l.value=S,l.needsUpdate=!0}return i.numPlanes=w,S}var i=this,n=null,r=0,o=!1,s=!1,a=new mt,h=new _t,l={value:null,needsUpdate:!1};this.uniform=l,this.numIntersection=this.numPlanes=0,this.init=function(c,u,d){var g=c.length!==0||u||r!==0||o;return o=u,n=e(c,d,0),r=c.length,g},this.beginShadows=function(){s=!0,e(null)},this.endShadows=function(){s=!1,t()},this.setState=function(c,u,d,g,w,S){if(!o||c===null||c.length===0||s&&!d)s?e(null):t();else{d=s?0:r;var P=4*d,G=w.clippingState||null;for(l.value=G,G=e(c,g,P,S),c=0;c!==P;++c)G[c]=n[c];w.clippingState=G,this.numIntersection=u?this.numPlanes:0,this.numPlanes+=d}}}function en(t){var e={};return{get:function(i){if(e[i]!==void 0)return e[i];switch(i){case"WEBGL_depth_texture":var n=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=t.getExtension(i)}return n===null&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),e[i]=n}}}function ci(t,e,i){function n(s){var a=s.target;s=r[a.id],s.index!==null&&e.remove(s.index);for(var h in s.attributes)e.remove(s.attributes[h]);a.removeEventListener("dispose",n),delete r[a.id],(h=o[s.id])&&(e.remove(h),delete o[s.id]),i.memory.geometries--}var r={},o={};return{get:function(s,a){var h=r[a.id];return h||(a.addEventListener("dispose",n),a.isBufferGeometry?h=a:a.isGeometry&&(a._bufferGeometry===void 0&&(a._bufferGeometry=new Lt().setFromObject(s)),h=a._bufferGeometry),r[a.id]=h,i.memory.geometries++,h)},update:function(s){var a=s.index,h=s.attributes;a!==null&&e.update(a,34963);for(var l in h)e.update(h[l],34962);s=s.morphAttributes;for(l in s){a=s[l],h=0;for(var c=a.length;h<c;h++)e.update(a[h],34962)}},getWireframeAttribute:function(s){var a=o[s.id];if(a)return a;a=[];var h=s.index,l=s.attributes;if(h!==null){h=h.array,l=0;for(var c=h.length;l<c;l+=3){var u=h[l+0],d=h[l+1],g=h[l+2];a.push(u,d,d,g,g,u)}}else for(h=l.position.array,l=0,c=h.length/3-1;l<c;l+=3)u=l+0,d=l+1,g=l+2,a.push(u,d,d,g,g,u);return a=new(65535<gi(a)?ie:Gt)(a,1),e.update(a,34963),o[s.id]=a}}}function Oe(t,e,i,n){var r,o,s;this.setMode=function(a){r=a},this.setIndex=function(a){o=a.type,s=a.bytesPerElement},this.render=function(a,h){t.drawElements(r,h,o,a*s),i.update(h,r)},this.renderInstances=function(a,h,l){if(n.isWebGL2)var c=t;else if(c=e.get("ANGLE_instanced_arrays"),c===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}c[n.isWebGL2?"drawElementsInstanced":"drawElementsInstancedANGLE"](r,l,o,h*s,a.maxInstancedCount),i.update(l,r,a.maxInstancedCount)}}function Si(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(i,n,r){switch(r=r||1,e.calls++,n){case 4:e.triangles+=i/3*r;break;case 5:case 6:e.triangles+=r*(i-2);break;case 1:e.lines+=i/2*r;break;case 3:e.lines+=r*(i-1);break;case 2:e.lines+=r*i;break;case 0:e.points+=r*i;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function Tn(t,e){return Math.abs(e[1])-Math.abs(t[1])}function nn(t){var e={},i=new Float32Array(8);return{update:function(n,r,o,s){var a=n.morphTargetInfluences,h=a.length;if(n=e[r.id],n===void 0){n=[];for(var l=0;l<h;l++)n[l]=[l,0];e[r.id]=n}var c=o.morphTargets&&r.morphAttributes.position;for(o=o.morphNormals&&r.morphAttributes.normal,l=0;l<h;l++){var u=n[l];u[1]!==0&&(c&&r.removeAttribute("morphTarget"+l),o&&r.removeAttribute("morphNormal"+l))}for(l=0;l<h;l++)u=n[l],u[0]=l,u[1]=a[l];for(n.sort(Tn),l=0;8>l;l++){if((u=n[l])&&(a=u[0],h=u[1])){c&&r.addAttribute("morphTarget"+l,c[a]),o&&r.addAttribute("morphNormal"+l,o[a]),i[l]=h;continue}i[l]=0}s.getUniforms().setValue(t,"morphTargetInfluences",i)}}}function Ci(t,e){var i={};return{update:function(n){var r=e.render.frame,o=n.geometry,s=t.get(n,o);return i[s.id]!==r&&(o.isGeometry&&s.updateFromObject(n),t.update(s),i[s.id]=r),s},dispose:function(){i={}}}}function _(t,e,i,n,r,o,s,a,h,l){t=t!==void 0?t:[],Ot.call(this,t,e!==void 0?e:301,i,n,r,o,s,a,h,l),this.flipY=!1}function D(t,e,i,n){Ot.call(this,null),this.image={data:t,width:e,height:i,depth:n},this.minFilter=this.magFilter=1003,this.flipY=this.generateMipmaps=!1}function B(t,e,i){var n=t[0];if(0>=n||0<n)return t;var r=e*i,o=fa[r];if(o===void 0&&(o=new Float32Array(r),fa[r]=o),e!==0)for(n.toArray(o,0),n=1,r=0;n!==e;++n)r+=i,t[n].toArray(o,r);return o}function U(t,e){if(t.length!==e.length)return!1;for(var i=0,n=t.length;i<n;i++)if(t[i]!==e[i])return!1;return!0}function J(t,e){for(var i=0,n=e.length;i<n;i++)t[i]=e[i]}function dt(t,e){var i=ma[e];i===void 0&&(i=new Int32Array(e),ma[e]=i);for(var n=0;n!==e;++n)i[n]=t.allocTextureUnit();return i}function Tt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1f(this.addr,e),i[0]=e)}function ut(t,e){var i=this.cache;i[0]!==e&&(t.uniform1i(this.addr,e),i[0]=e)}function ae(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),i[0]=e.x,i[1]=e.y):U(i,e)||(t.uniform2fv(this.addr,e),J(i,e))}function se(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y||i[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),i[0]=e.x,i[1]=e.y,i[2]=e.z):e.r!==void 0?(i[0]!==e.r||i[1]!==e.g||i[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),i[0]=e.r,i[1]=e.g,i[2]=e.b):U(i,e)||(t.uniform3fv(this.addr,e),J(i,e))}function Ut(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y||i[2]!==e.z||i[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),i[0]=e.x,i[1]=e.y,i[2]=e.z,i[3]=e.w):U(i,e)||(t.uniform4fv(this.addr,e),J(i,e))}function he(t,e){var i=this.cache,n=e.elements;n===void 0?U(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),J(i,e)):U(i,n)||(ya.set(n),t.uniformMatrix2fv(this.addr,!1,ya),J(i,n))}function ze(t,e){var i=this.cache,n=e.elements;n===void 0?U(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),J(i,e)):U(i,n)||(va.set(n),t.uniformMatrix3fv(this.addr,!1,va),J(i,n))}function Xe(t,e){var i=this.cache,n=e.elements;n===void 0?U(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),J(i,e)):U(i,n)||(ga.set(n),t.uniformMatrix4fv(this.addr,!1,ga),J(i,n))}function Ce(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTexture2D(e||pa,r)}function je(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTexture3D(e||lh,r)}function gn(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTextureCube(e||da,r)}function Wi(t,e){var i=this.cache;U(i,e)||(t.uniform2iv(this.addr,e),J(i,e))}function si(t,e){var i=this.cache;U(i,e)||(t.uniform3iv(this.addr,e),J(i,e))}function Dr(t,e){var i=this.cache;U(i,e)||(t.uniform4iv(this.addr,e),J(i,e))}function Qe(t){switch(t){case 5126:return Tt;case 35664:return ae;case 35665:return se;case 35666:return Ut;case 35674:return he;case 35675:return ze;case 35676:return Xe;case 35678:case 36198:return Ce;case 35679:return je;case 35680:return gn;case 5124:case 35670:return ut;case 35667:case 35671:return Wi;case 35668:case 35672:return si;case 35669:case 35673:return Dr}}function Ko(t,e){var i=this.cache;U(i,e)||(t.uniform1fv(this.addr,e),J(i,e))}function rn(t,e){var i=this.cache;U(i,e)||(t.uniform1iv(this.addr,e),J(i,e))}function Mo(t,e){var i=this.cache;e=B(e,this.size,2),U(i,e)||(t.uniform2fv(this.addr,e),this.updateCache(e))}function ui(t,e){var i=this.cache;e=B(e,this.size,3),U(i,e)||(t.uniform3fv(this.addr,e),this.updateCache(e))}function zr(t,e){var i=this.cache;e=B(e,this.size,4),U(i,e)||(t.uniform4fv(this.addr,e),this.updateCache(e))}function bn(t,e){var i=this.cache;e=B(e,this.size,4),U(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),this.updateCache(e))}function Gi(t,e){var i=this.cache;e=B(e,this.size,9),U(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),this.updateCache(e))}function Kn(t,e){var i=this.cache;e=B(e,this.size,16),U(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),this.updateCache(e))}function ts(t,e,i){var n=this.cache,r=e.length,o=dt(i,r);for(U(n,o)===!1&&(t.uniform1iv(this.addr,o),J(n,o)),t=0;t!==r;++t)i.setTexture2D(e[t]||pa,o[t])}function To(t,e,i){var n=this.cache,r=e.length,o=dt(i,r);for(U(n,o)===!1&&(t.uniform1iv(this.addr,o),J(n,o)),t=0;t!==r;++t)i.setTextureCube(e[t]||da,o[t])}function Sn(t){switch(t){case 5126:return Ko;case 35664:return Mo;case 35665:return ui;case 35666:return zr;case 35674:return bn;case 35675:return Gi;case 35676:return Kn;case 35678:return ts;case 35680:return To;case 5124:case 35670:return rn;case 35667:case 35671:return Wi;case 35668:case 35672:return si;case 35669:case 35673:return Dr}}function es(t,e,i){this.id=t,this.addr=i,this.cache=[],this.setValue=Qe(e.type)}function tr(t,e,i){this.id=t,this.addr=i,this.cache=[],this.size=e.size,this.setValue=Sn(e.type)}function Nr(t){this.id=t,this.seq=[],this.map={}}function on(t,e,i){this.seq=[],this.map={},this.renderer=i,i=t.getProgramParameter(e,35718);for(var n=0;n<i;++n){var r=t.getActiveUniform(e,n),o=t.getUniformLocation(e,r.name),s=this,a=r.name,h=a.length;for(bs.lastIndex=0;;){var l=bs.exec(a),c=bs.lastIndex,u=l[1],d=l[3];if(l[2]==="]"&&(u|=0),d===void 0||d==="["&&c+2===h){a=s,r=d===void 0?new es(u,r,o):new tr(u,r,o),a.seq.push(r),a.map[r.id]=r;break}else d=s.map[u],d===void 0&&(d=new Nr(u),u=s,s=d,u.seq.push(s),u.map[s.id]=s),s=d}}}function Br(t){t=t.split(`
|
|
256
|
+
`);for(var e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join(`
|
|
257
|
+
`)}function er(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),Br(i)),n}function ir(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 sn(t,e){return e=ir(e),"vec4 "+t+"( vec4 value ) { return "+e[0]+"ToLinear"+e[1]+"; }"}function is(t,e){return e=ir(e),"vec4 "+t+"( vec4 value ) { return LinearTo"+e[0]+e[1]+"; }"}function ns(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 rs(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(In).join(`
|
|
258
|
+
`)}function On(t){var e=[],i;for(i in t){var n=t[i];n!==!1&&e.push("#define "+i+" "+n)}return e.join(`
|
|
259
|
+
`)}function In(t){return t!==""}function So(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 Eo(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function En(t){return t.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,function(e,i){if(e=Ie[i],e===void 0)throw Error("Can not resolve #include <"+i+">");return En(e)})}function v(t){return t.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(e,i,n,r){for(e="",i=parseInt(i);i<parseInt(n);i++)e+=r.replace(/\[ i \]/g,"[ "+i+" ]");return e})}function E(t,e,i,n,r,o,s){var a=t.context,h=n.defines,l=r.vertexShader,c=r.fragmentShader,u="SHADOWMAP_TYPE_BASIC";o.shadowMapType===1?u="SHADOWMAP_TYPE_PCF":o.shadowMapType===2&&(u="SHADOWMAP_TYPE_PCF_SOFT");var d="ENVMAP_TYPE_CUBE",g="ENVMAP_MODE_REFLECTION",w="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(n.envMap.mapping){case 301:case 302:d="ENVMAP_TYPE_CUBE";break;case 306:case 307:d="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:d="ENVMAP_TYPE_EQUIREC";break;case 305:d="ENVMAP_TYPE_SPHERE"}switch(n.envMap.mapping){case 302:case 304:g="ENVMAP_MODE_REFRACTION"}switch(n.combine){case 0:w="ENVMAP_BLENDING_MULTIPLY";break;case 1:w="ENVMAP_BLENDING_MIX";break;case 2:w="ENVMAP_BLENDING_ADD"}}var S=0<t.gammaFactor?t.gammaFactor:1,P=s.isWebGL2?"":rs(n.extensions,o,e),G=On(h),N=a.createProgram();n.isRawShaderMaterial?(h=[G].filter(In).join(`
|
|
260
|
+
`),0<h.length&&(h+=`
|
|
261
|
+
`),e=[P,G].filter(In).join(`
|
|
262
|
+
`),0<e.length&&(e+=`
|
|
263
|
+
`)):(h=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+r.name,G,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+S,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+g:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.normalMap&&o.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&o.flatShading===!1?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+u:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&(s.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(In).join(`
|
|
265
|
+
`),e=[P,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+r.name,G,o.alphaTest?"#define ALPHATEST "+o.alphaTest+(o.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+S,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+d:"",o.envMap?"#define "+g:"",o.envMap?"#define "+w:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.normalMap&&o.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+u:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&(s.isWebGL2||e.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&(s.isWebGL2||e.get("EXT_shader_texture_lod"))?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==0?"#define TONE_MAPPING":"",o.toneMapping!==0?Ie.tonemapping_pars_fragment:"",o.toneMapping!==0?ns("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.matcapEncoding||o.envMapEncoding||o.emissiveMapEncoding?Ie.encodings_pars_fragment:"",o.mapEncoding?sn("mapTexelToLinear",o.mapEncoding):"",o.matcapEncoding?sn("matcapTexelToLinear",o.matcapEncoding):"",o.envMapEncoding?sn("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?sn("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?is("linearToOutputTexel",o.outputEncoding):"",o.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",`
|
|
266
|
+
`].filter(In).join(`
|
|
267
|
+
`)),l=En(l),l=So(l,o),l=Eo(l,o),c=En(c),c=So(c,o),c=Eo(c,o),l=v(l),c=v(c),s.isWebGL2&&!n.isRawShaderMaterial&&(s=!1,u=/^\s*#version\s+300\s+es\s*\n/,n.isShaderMaterial&&l.match(u)!==null&&c.match(u)!==null&&(s=!0,l=l.replace(u,""),c=c.replace(u,"")),h=`#version 300 es
|
|
268
|
+
|
|
269
|
+
#define attribute in
|
|
270
|
+
#define varying out
|
|
271
|
+
#define texture2D texture
|
|
272
|
+
`+h,e=[`#version 300 es
|
|
273
|
+
|
|
274
|
+
#define varying in`,s?"":"out highp vec4 pc_fragColor;",s?"":"#define gl_FragColor pc_fragColor",`#define gl_FragDepthEXT gl_FragDepth
|
|
275
|
+
#define texture2D texture
|
|
276
|
+
#define textureCube texture
|
|
277
|
+
#define texture2DProj textureProj
|
|
278
|
+
#define texture2DLodEXT textureLod
|
|
279
|
+
#define texture2DProjLodEXT textureProjLod
|
|
280
|
+
#define textureCubeLodEXT textureLod
|
|
281
|
+
#define texture2DGradEXT textureGrad
|
|
282
|
+
#define texture2DProjGradEXT textureProjGrad
|
|
283
|
+
#define textureCubeGradEXT textureGrad`].join(`
|
|
284
|
+
`)+`
|
|
285
|
+
`+e),c=e+c,l=er(a,35633,h+l),c=er(a,35632,c),a.attachShader(N,l),a.attachShader(N,c),n.index0AttributeName!==void 0?a.bindAttribLocation(N,0,n.index0AttributeName):o.morphTargets===!0&&a.bindAttribLocation(N,0,"position"),a.linkProgram(N),o=a.getProgramInfoLog(N).trim(),s=a.getShaderInfoLog(l).trim(),u=a.getShaderInfoLog(c).trim(),g=d=!0,a.getProgramParameter(N,35714)===!1?(d=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"35715",a.getProgramParameter(N,35715),"gl.getProgramInfoLog",o,s,u)):o!==""?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",o):(s===""||u==="")&&(g=!1),g&&(this.diagnostics={runnable:d,material:n,programLog:o,vertexShader:{log:s,prefix:h},fragmentShader:{log:u,prefix:e}}),a.deleteShader(l),a.deleteShader(c);var q;this.getUniforms=function(){return q===void 0&&(q=new on(a,N,t)),q};var V;return this.getAttributes=function(){if(V===void 0){for(var ot={},T=a.getProgramParameter(N,35721),A=0;A<T;A++){var et=a.getActiveAttrib(N,A).name;ot[et]=a.getAttribLocation(N,et)}V=ot}return V},this.destroy=function(){a.deleteProgram(N),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=r.name,this.id=ch++,this.code=i,this.usedTimes=1,this.program=N,this.vertexShader=l,this.fragmentShader=c,this}function R(t,e,i){function n(a,h){if(a)a.isTexture?l=a.encoding:a.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),l=a.texture.encoding);else var l=3e3;return l===3e3&&h&&(l=3007),l}var r=[],o={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},s="precision supportsVertexTextures map mapEncoding matcapEncoding envMap envMapMode envMapEncoding lightMap aoMap emissiveMap emissiveMapEncoding bumpMap normalMap objectSpaceNormalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap combine vertexColors fog useFog fogExp flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights numRectAreaLights shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes numClipIntersection depthPacking dithering".split(" ");this.getParameters=function(a,h,l,c,u,d,g){var w=o[a.type];if(g.isSkinnedMesh){var S=g.skeleton.bones;if(i.floatVertexTextures)S=1024;else{var P=Math.min(Math.floor((i.maxVertexUniforms-20)/4),S.length);P<S.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+S.length+" bones. This GPU supports "+P+"."),S=0):S=P}}else S=0;P=i.precision,a.precision!==null&&(P=i.getMaxPrecision(a.precision),P!==a.precision&&console.warn("THREE.WebGLProgram.getParameters:",a.precision,"not supported, using",P,"instead."));var G=t.getRenderTarget();return{shaderID:w,precision:P,supportsVertexTextures:i.vertexTextures,outputEncoding:n(G?G.texture:null,t.gammaOutput),map:!!a.map,mapEncoding:n(a.map,t.gammaInput),matcap:!!a.matcap,matcapEncoding:n(a.matcap,t.gammaInput),envMap:!!a.envMap,envMapMode:a.envMap&&a.envMap.mapping,envMapEncoding:n(a.envMap,t.gammaInput),envMapCubeUV:!!a.envMap&&(a.envMap.mapping===306||a.envMap.mapping===307),lightMap:!!a.lightMap,aoMap:!!a.aoMap,emissiveMap:!!a.emissiveMap,emissiveMapEncoding:n(a.emissiveMap,t.gammaInput),bumpMap:!!a.bumpMap,normalMap:!!a.normalMap,objectSpaceNormalMap:a.normalMapType===1,displacementMap:!!a.displacementMap,roughnessMap:!!a.roughnessMap,metalnessMap:!!a.metalnessMap,specularMap:!!a.specularMap,alphaMap:!!a.alphaMap,gradientMap:!!a.gradientMap,combine:a.combine,vertexColors:a.vertexColors,fog:!!c,useFog:a.fog,fogExp:c&&c.isFogExp2,flatShading:a.flatShading,sizeAttenuation:a.sizeAttenuation,logarithmicDepthBuffer:i.logarithmicDepthBuffer,skinning:a.skinning&&0<S,maxBones:S,useVertexTexture:i.floatVertexTextures,morphTargets:a.morphTargets,morphNormals:a.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:h.directional.length,numPointLights:h.point.length,numSpotLights:h.spot.length,numRectAreaLights:h.rectArea.length,numHemiLights:h.hemi.length,numClippingPlanes:u,numClipIntersection:d,dithering:a.dithering,shadowMapEnabled:t.shadowMap.enabled&&g.receiveShadow&&0<l.length,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:a.premultipliedAlpha,alphaTest:a.alphaTest,doubleSided:a.side===2,flipSided:a.side===1,depthPacking:a.depthPacking!==void 0?a.depthPacking:!1}},this.getProgramCode=function(a,h){var l=[];if(h.shaderID?l.push(h.shaderID):(l.push(a.fragmentShader),l.push(a.vertexShader)),a.defines!==void 0)for(var c in a.defines)l.push(c),l.push(a.defines[c]);for(c=0;c<s.length;c++)l.push(h[s[c]]);return l.push(a.onBeforeCompile.toString()),l.push(t.gammaOutput),l.push(t.gammaFactor),l.join()},this.acquireProgram=function(a,h,l,c){for(var u,d=0,g=r.length;d<g;d++){var w=r[d];if(w.code===c){u=w,++u.usedTimes;break}}return u===void 0&&(u=new E(t,e,c,a,h,l,i),r.push(u)),u},this.releaseProgram=function(a){if(--a.usedTimes===0){var h=r.indexOf(a);r[h]=r[r.length-1],r.pop(),a.destroy()}},this.programs=r}function L(){var t=new WeakMap;return{get:function(e){var i=t.get(e);return i===void 0&&(i={},t.set(e,i)),i},remove:function(e){t.delete(e)},update:function(e,i,n){t.get(e)[i]=n},dispose:function(){t=new WeakMap}}}function y(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function W(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function C(){var t=[],e=0,i=[],n=[];return{opaque:i,transparent:n,init:function(){e=0,i.length=0,n.length=0},push:function(r,o,s,a,h){var l=t[e];l===void 0?(l={id:r.id,object:r,geometry:o,material:s,program:s.program,renderOrder:r.renderOrder,z:a,group:h},t[e]=l):(l.id=r.id,l.object=r,l.geometry=o,l.material=s,l.program=s.program,l.renderOrder=r.renderOrder,l.z=a,l.group=h),(s.transparent===!0?n:i).push(l),e++},sort:function(){1<i.length&&i.sort(y),1<n.length&&n.sort(W)}}}function Q(){var t={};return{get:function(e,i){return e=e.id+","+i.id,i=t[e],i===void 0&&(i=new C,t[e]=i),i},dispose:function(){t={}}}}function rt(){var t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];switch(e.type){case"DirectionalLight":var i={direction:new M,color:new H,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new $};break;case"SpotLight":i={position:new M,direction:new M,color:new H,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new $};break;case"PointLight":i={position:new M,color:new H,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new $,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":i={direction:new M,skyColor:new H,groundColor:new H};break;case"RectAreaLight":i={color:new H,position:new M,halfWidth:new M,halfHeight:new M}}return t[e.id]=i}}}function it(){var t=new rt,e={id:uh++,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 gt,r=new gt;return{setup:function(o,s,a){var h=0,l=0,c=0,u=0,d=0,g=0,w=0,S=0;a=a.matrixWorldInverse;for(var P=0,G=o.length;P<G;P++){var N=o[P],q=N.color,V=N.intensity,ot=N.distance,T=N.shadow&&N.shadow.map?N.shadow.map.texture:null;if(N.isAmbientLight)h+=q.r*V,l+=q.g*V,c+=q.b*V;else if(N.isDirectionalLight){var A=t.get(N);A.color.copy(N.color).multiplyScalar(N.intensity),A.direction.setFromMatrixPosition(N.matrixWorld),i.setFromMatrixPosition(N.target.matrixWorld),A.direction.sub(i),A.direction.transformDirection(a),(A.shadow=N.castShadow)&&(q=N.shadow,A.shadowBias=q.bias,A.shadowRadius=q.radius,A.shadowMapSize=q.mapSize),e.directionalShadowMap[u]=T,e.directionalShadowMatrix[u]=N.shadow.matrix,e.directional[u]=A,u++}else N.isSpotLight?(A=t.get(N),A.position.setFromMatrixPosition(N.matrixWorld),A.position.applyMatrix4(a),A.color.copy(q).multiplyScalar(V),A.distance=ot,A.direction.setFromMatrixPosition(N.matrixWorld),i.setFromMatrixPosition(N.target.matrixWorld),A.direction.sub(i),A.direction.transformDirection(a),A.coneCos=Math.cos(N.angle),A.penumbraCos=Math.cos(N.angle*(1-N.penumbra)),A.decay=N.decay,(A.shadow=N.castShadow)&&(q=N.shadow,A.shadowBias=q.bias,A.shadowRadius=q.radius,A.shadowMapSize=q.mapSize),e.spotShadowMap[g]=T,e.spotShadowMatrix[g]=N.shadow.matrix,e.spot[g]=A,g++):N.isRectAreaLight?(A=t.get(N),A.color.copy(q).multiplyScalar(V),A.position.setFromMatrixPosition(N.matrixWorld),A.position.applyMatrix4(a),r.identity(),n.copy(N.matrixWorld),n.premultiply(a),r.extractRotation(n),A.halfWidth.set(.5*N.width,0,0),A.halfHeight.set(0,.5*N.height,0),A.halfWidth.applyMatrix4(r),A.halfHeight.applyMatrix4(r),e.rectArea[w]=A,w++):N.isPointLight?(A=t.get(N),A.position.setFromMatrixPosition(N.matrixWorld),A.position.applyMatrix4(a),A.color.copy(N.color).multiplyScalar(N.intensity),A.distance=N.distance,A.decay=N.decay,(A.shadow=N.castShadow)&&(q=N.shadow,A.shadowBias=q.bias,A.shadowRadius=q.radius,A.shadowMapSize=q.mapSize,A.shadowCameraNear=q.camera.near,A.shadowCameraFar=q.camera.far),e.pointShadowMap[d]=T,e.pointShadowMatrix[d]=N.shadow.matrix,e.point[d]=A,d++):N.isHemisphereLight&&(A=t.get(N),A.direction.setFromMatrixPosition(N.matrixWorld),A.direction.transformDirection(a),A.direction.normalize(),A.skyColor.copy(N.color).multiplyScalar(V),A.groundColor.copy(N.groundColor).multiplyScalar(V),e.hemi[S]=A,S++)}e.ambient[0]=h,e.ambient[1]=l,e.ambient[2]=c,e.directional.length=u,e.spot.length=g,e.rectArea.length=w,e.point.length=d,e.hemi.length=S,e.hash.stateID=e.id,e.hash.directionalLength=u,e.hash.pointLength=d,e.hash.spotLength=g,e.hash.rectAreaLength=w,e.hash.hemiLength=S,e.hash.shadowsLength=s.length},state:e}}function j(){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 St(){var t={};return{get:function(e,i){if(t[e.id]===void 0){var n=new j;t[e.id]={},t[e.id][i.id]=n}else t[e.id][i.id]===void 0?(n=new j,t[e.id][i.id]=n):n=t[e.id][i.id];return n},dispose:function(){t={}}}}function Et(t){fe.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.lights=this.fog=!1,this.setValues(t)}function vt(t){fe.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 Nt(t,e,i){function n(T,A,et,yt,ft,st){var Ht=T.geometry,It=u,$t=T.customDepthMaterial;return et&&(It=d,$t=T.customDistanceMaterial),$t?It=$t:($t=!1,A.morphTargets&&(Ht&&Ht.isBufferGeometry?$t=Ht.morphAttributes&&Ht.morphAttributes.position&&0<Ht.morphAttributes.position.length:Ht&&Ht.isGeometry&&($t=Ht.morphTargets&&0<Ht.morphTargets.length)),T.isSkinnedMesh&&A.skinning===!1&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",T),T=T.isSkinnedMesh&&A.skinning,Ht=0,$t&&(Ht|=1),T&&(Ht|=2),It=It[Ht]),t.localClippingEnabled&&A.clipShadows===!0&&A.clippingPlanes.length!==0&&(Ht=It.uuid,$t=A.uuid,T=g[Ht],T===void 0&&(T={},g[Ht]=T),Ht=T[$t],Ht===void 0&&(Ht=It.clone(),T[$t]=Ht),It=Ht),It.visible=A.visible,It.wireframe=A.wireframe,It.side=A.shadowSide!=null?A.shadowSide:w[A.side],It.clipShadows=A.clipShadows,It.clippingPlanes=A.clippingPlanes,It.clipIntersection=A.clipIntersection,It.wireframeLinewidth=A.wireframeLinewidth,It.linewidth=A.linewidth,et&&It.isMeshDistanceMaterial&&(It.referencePosition.copy(yt),It.nearDistance=ft,It.farDistance=st),It}function r(T,A,et,yt){if(T.visible!==!1){if(T.layers.test(A.layers)&&(T.isMesh||T.isLine||T.isPoints)&&T.castShadow&&(!T.frustumCulled||o.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(et.matrixWorldInverse,T.matrixWorld);var ft=e.update(T),st=T.material;if(Array.isArray(st))for(var Ht=ft.groups,It=0,$t=Ht.length;It<$t;It++){var Xt=Ht[It],Qt=st[Xt.materialIndex];Qt&&Qt.visible&&(Qt=n(T,Qt,yt,c,et.near,et.far),t.renderBufferDirect(et,null,ft,Qt,T,Xt))}else st.visible&&(Qt=n(T,st,yt,c,et.near,et.far),t.renderBufferDirect(et,null,ft,Qt,T,null))}for(T=T.children,ft=0,st=T.length;ft<st;ft++)r(T[ft],A,et,yt)}}var o=new K,s=new gt,a=new $,h=new $(i,i),l=new M,c=new M,u=Array(4),d=Array(4),g={},w={0:1,1:0,2:2},S=[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)],P=[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)],G=[new Z,new Z,new Z,new Z,new Z,new Z];for(i=0;i!==4;++i){var N=(i&1)!==0,q=(i&2)!==0,V=new Et({depthPacking:3201,morphTargets:N,skinning:q});u[i]=V,N=new vt({morphTargets:N,skinning:q}),d[i]=N}var ot=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(T,A,et){if(ot.enabled!==!1&&(ot.autoUpdate!==!1||ot.needsUpdate!==!1)&&T.length!==0){var yt=t.state;yt.disable(3042),yt.buffers.color.setClear(1,1,1,1),yt.buffers.depth.setTest(!0),yt.setScissorTest(!1);for(var ft,st=0,Ht=T.length;st<Ht;st++){var It=T[st];ft=It.shadow;var $t=It&&It.isPointLight;if(ft===void 0)console.warn("THREE.WebGLShadowMap:",It,"has no shadow.");else{var Xt=ft.camera;if(a.copy(ft.mapSize),a.min(h),$t){var Qt=a.x,re=a.y;G[0].set(2*Qt,re,Qt,re),G[1].set(0,re,Qt,re),G[2].set(3*Qt,re,Qt,re),G[3].set(Qt,re,Qt,re),G[4].set(3*Qt,0,Qt,re),G[5].set(Qt,0,Qt,re),a.x*=4,a.y*=2}for(ft.map===null&&(ft.map=new ht(a.x,a.y,{minFilter:1003,magFilter:1003,format:1023}),ft.map.texture.name=It.name+".shadowMap",Xt.updateProjectionMatrix()),ft.isSpotLightShadow&&ft.update(It),Qt=ft.map,re=ft.matrix,c.setFromMatrixPosition(It.matrixWorld),Xt.position.copy(c),$t?(ft=6,re.makeTranslation(-c.x,-c.y,-c.z)):(ft=1,l.setFromMatrixPosition(It.target.matrixWorld),Xt.lookAt(l),Xt.updateMatrixWorld(),re.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),re.multiply(Xt.projectionMatrix),re.multiply(Xt.matrixWorldInverse)),t.setRenderTarget(Qt),t.clear(),It=0;It<ft;It++)$t&&(l.copy(Xt.position),l.add(S[It]),Xt.up.copy(P[It]),Xt.lookAt(l),Xt.updateMatrixWorld(),yt.viewport(G[It])),s.multiplyMatrices(Xt.projectionMatrix,Xt.matrixWorldInverse),o.setFromMatrix(s),r(A,et,Xt,$t)}}ot.needsUpdate=!1}}}function Pt(t,e,i,n){function r(nt,ye,Te){var Ze=new Uint8Array(4),Yt=t.createTexture();for(t.bindTexture(nt,Yt),t.texParameteri(nt,10241,9728),t.texParameteri(nt,10240,9728),nt=0;nt<Te;nt++)t.texImage2D(ye+nt,0,6408,1,1,0,6408,5121,Ze);return Yt}function o(nt,ye){G[nt]=1,N[nt]===0&&(t.enableVertexAttribArray(nt),N[nt]=1),q[nt]!==ye&&((n.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](nt,ye),q[nt]=ye)}function s(nt){V[nt]!==!0&&(t.enable(nt),V[nt]=!0)}function a(nt){V[nt]!==!1&&(t.disable(nt),V[nt]=!1)}function h(nt,ye,Te,Ze,Yt,ue,_e,Be){if(nt===0)A&&(a(3042),A=!1);else if(A||(s(3042),A=!0),nt!==5){if(nt!==et||Be!==Xt){if((yt!==100||Ht!==100)&&(t.blendEquation(32774),Ht=yt=100),Be)switch(nt){case 1:t.blendFuncSeparate(1,771,1,771);break;case 2:t.blendFunc(1,1);break;case 3:t.blendFuncSeparate(0,0,769,771);break;case 4:t.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",nt)}else switch(nt){case 1:t.blendFuncSeparate(770,771,1,771);break;case 2:t.blendFunc(770,1);break;case 3:t.blendFunc(0,769);break;case 4:t.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",nt)}$t=It=st=ft=null,et=nt,Xt=Be}}else Yt=Yt||ye,ue=ue||Te,_e=_e||Ze,(ye!==yt||Yt!==Ht)&&(t.blendEquationSeparate(i.convert(ye),i.convert(Yt)),yt=ye,Ht=Yt),(Te!==ft||Ze!==st||ue!==It||_e!==$t)&&(t.blendFuncSeparate(i.convert(Te),i.convert(Ze),i.convert(ue),i.convert(_e)),ft=Te,st=Ze,It=ue,$t=_e),et=nt,Xt=null}function l(nt){Qt!==nt&&(nt?t.frontFace(2304):t.frontFace(2305),Qt=nt)}function c(nt){nt!==0?(s(2884),nt!==re&&(nt===1?t.cullFace(1029):nt===2?t.cullFace(1028):t.cullFace(1032))):a(2884),re=nt}function u(nt,ye,Te){nt?(s(32823),(Ae!==ye||fi!==Te)&&(t.polygonOffset(ye,Te),Ae=ye,fi=Te)):a(32823)}function d(nt){nt===void 0&&(nt=33984+li-1),pi!==nt&&(t.activeTexture(nt),pi=nt)}var g=new function(){var nt=!1,ye=new Z,Te=null,Ze=new Z(0,0,0,0);return{setMask:function(Yt){Te===Yt||nt||(t.colorMask(Yt,Yt,Yt,Yt),Te=Yt)},setLocked:function(Yt){nt=Yt},setClear:function(Yt,ue,_e,Be,De){De===!0&&(Yt*=Be,ue*=Be,_e*=Be),ye.set(Yt,ue,_e,Be),Ze.equals(ye)===!1&&(t.clearColor(Yt,ue,_e,Be),Ze.copy(ye))},reset:function(){nt=!1,Te=null,Ze.set(-1,0,0,0)}}},w=new function(){var nt=!1,ye=null,Te=null,Ze=null;return{setTest:function(Yt){Yt?s(2929):a(2929)},setMask:function(Yt){ye===Yt||nt||(t.depthMask(Yt),ye=Yt)},setFunc:function(Yt){if(Te!==Yt){if(Yt)switch(Yt){case 0:t.depthFunc(512);break;case 1:t.depthFunc(519);break;case 2:t.depthFunc(513);break;case 3:t.depthFunc(515);break;case 4:t.depthFunc(514);break;case 5:t.depthFunc(518);break;case 6:t.depthFunc(516);break;case 7:t.depthFunc(517);break;default:t.depthFunc(515)}else t.depthFunc(515);Te=Yt}},setLocked:function(Yt){nt=Yt},setClear:function(Yt){Ze!==Yt&&(t.clearDepth(Yt),Ze=Yt)},reset:function(){nt=!1,Ze=Te=ye=null}}},S=new function(){var nt=!1,ye=null,Te=null,Ze=null,Yt=null,ue=null,_e=null,Be=null,De=null;return{setTest:function(wt){wt?s(2960):a(2960)},setMask:function(wt){ye===wt||nt||(t.stencilMask(wt),ye=wt)},setFunc:function(wt,xe,ve){(Te!==wt||Ze!==xe||Yt!==ve)&&(t.stencilFunc(wt,xe,ve),Te=wt,Ze=xe,Yt=ve)},setOp:function(wt,xe,ve){(ue!==wt||_e!==xe||Be!==ve)&&(t.stencilOp(wt,xe,ve),ue=wt,_e=xe,Be=ve)},setLocked:function(wt){nt=wt},setClear:function(wt){De!==wt&&(t.clearStencil(wt),De=wt)},reset:function(){nt=!1,De=Be=_e=ue=Yt=Ze=Te=ye=null}}},P=t.getParameter(34921),G=new Uint8Array(P),N=new Uint8Array(P),q=new Uint8Array(P),V={},ot=null,T=null,A=null,et=null,yt=null,ft=null,st=null,Ht=null,It=null,$t=null,Xt=!1,Qt=null,re=null,me=null,Ae=null,fi=null,li=t.getParameter(35661),Ye=!1;P=0,P=t.getParameter(7938),P.indexOf("WebGL")!==-1?(P=parseFloat(/^WebGL ([0-9])/.exec(P)[1]),Ye=1<=P):P.indexOf("OpenGL ES")!==-1&&(P=parseFloat(/^OpenGL ES ([0-9])/.exec(P)[1]),Ye=2<=P);var pi=null,ti={},Mi=new Z,qt=new Z,ge={};return ge[3553]=r(3553,3553,1),ge[34067]=r(34067,34069,6),g.setClear(0,0,0,1),w.setClear(1),S.setClear(0),s(2929),w.setFunc(3),l(!1),c(1),s(2884),h(0),{buffers:{color:g,depth:w,stencil:S},initAttributes:function(){for(var nt=0,ye=G.length;nt<ye;nt++)G[nt]=0},enableAttribute:function(nt){o(nt,0)},enableAttributeAndDivisor:o,disableUnusedAttributes:function(){for(var nt=0,ye=N.length;nt!==ye;++nt)N[nt]!==G[nt]&&(t.disableVertexAttribArray(nt),N[nt]=0)},enable:s,disable:a,getCompressedTextureFormats:function(){if(ot===null&&(ot=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var nt=t.getParameter(34467),ye=0;ye<nt.length;ye++)ot.push(nt[ye]);return ot},useProgram:function(nt){return T!==nt?(t.useProgram(nt),T=nt,!0):!1},setBlending:h,setMaterial:function(nt,ye){nt.side===2?a(2884):s(2884);var Te=nt.side===1;ye&&(Te=!Te),l(Te),nt.blending===1&&nt.transparent===!1?h(0):h(nt.blending,nt.blendEquation,nt.blendSrc,nt.blendDst,nt.blendEquationAlpha,nt.blendSrcAlpha,nt.blendDstAlpha,nt.premultipliedAlpha),w.setFunc(nt.depthFunc),w.setTest(nt.depthTest),w.setMask(nt.depthWrite),g.setMask(nt.colorWrite),u(nt.polygonOffset,nt.polygonOffsetFactor,nt.polygonOffsetUnits)},setFlipSided:l,setCullFace:c,setLineWidth:function(nt){nt!==me&&(Ye&&t.lineWidth(nt),me=nt)},setPolygonOffset:u,setScissorTest:function(nt){nt?s(3089):a(3089)},activeTexture:d,bindTexture:function(nt,ye){pi===null&&d();var Te=ti[pi];Te===void 0&&(Te={type:void 0,texture:void 0},ti[pi]=Te),(Te.type!==nt||Te.texture!==ye)&&(t.bindTexture(nt,ye||ge[nt]),Te.type=nt,Te.texture=ye)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(nt){console.error("THREE.WebGLState:",nt)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(nt){console.error("THREE.WebGLState:",nt)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(nt){console.error("THREE.WebGLState:",nt)}},scissor:function(nt){Mi.equals(nt)===!1&&(t.scissor(nt.x,nt.y,nt.z,nt.w),Mi.copy(nt))},viewport:function(nt){qt.equals(nt)===!1&&(t.viewport(nt.x,nt.y,nt.z,nt.w),qt.copy(nt))},reset:function(){for(var nt=0;nt<N.length;nt++)N[nt]===1&&(t.disableVertexAttribArray(nt),N[nt]=0);V={},pi=ot=null,ti={},re=Qt=et=T=null,g.reset(),w.reset(),S.reset()}}}function oe(t,e,i,n,r,o,s){function a(T,A){if(T.width>A||T.height>A){if("data"in T){console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+T.width+"x"+T.height+").");return}A/=Math.max(T.width,T.height);var et=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return et.width=Math.floor(T.width*A),et.height=Math.floor(T.height*A),et.getContext("2d").drawImage(T,0,0,T.width,T.height,0,0,et.width,et.height),console.warn("THREE.WebGLRenderer: image is too big ("+T.width+"x"+T.height+"). Resized to "+et.width+"x"+et.height),et}return T}function h(T){return Ee.isPowerOfTwo(T.width)&&Ee.isPowerOfTwo(T.height)}function l(T,A){return T.generateMipmaps&&A&&T.minFilter!==1003&&T.minFilter!==1006}function c(T,A,et,yt){t.generateMipmap(T),n.get(A).__maxMipLevel=Math.log(Math.max(et,yt))*Math.LOG2E}function u(T,A){if(!r.isWebGL2)return T;if(T===6403){if(A===5126)return 33326;if(A===5131)return 33325;if(A===5121)return 33321}if(T===6407){if(A===5126)return 34837;if(A===5131)return 34843;if(A===5121)return 32849}if(T===6408){if(A===5126)return 34836;if(A===5131)return 34842;if(A===5121)return 32856}return T}function d(T){return T===1003||T===1004||T===1005?9728:9729}function g(T){T=T.target,T.removeEventListener("dispose",g);t:{var A=n.get(T);if(T.image&&A.__image__webglTextureCube)t.deleteTexture(A.__image__webglTextureCube);else{if(A.__webglInit===void 0)break t;t.deleteTexture(A.__webglTexture)}n.remove(T)}T.isVideoTexture&&delete V[T.id],s.memory.textures--}function w(T){T=T.target,T.removeEventListener("dispose",w);var A=n.get(T),et=n.get(T.texture);if(T){if(et.__webglTexture!==void 0&&t.deleteTexture(et.__webglTexture),T.depthTexture&&T.depthTexture.dispose(),T.isWebGLRenderTargetCube)for(et=0;6>et;et++)t.deleteFramebuffer(A.__webglFramebuffer[et]),A.__webglDepthbuffer&&t.deleteRenderbuffer(A.__webglDepthbuffer[et]);else t.deleteFramebuffer(A.__webglFramebuffer),A.__webglDepthbuffer&&t.deleteRenderbuffer(A.__webglDepthbuffer);n.remove(T.texture),n.remove(T)}s.memory.textures--}function S(T,A){var et=n.get(T);if(T.isVideoTexture){var yt=T.id,ft=s.render.frame;V[yt]!==ft&&(V[yt]=ft,T.update())}if(0<T.version&&et.__version!==T.version)if(yt=T.image,yt===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(yt.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{G(et,T,A);return}i.activeTexture(33984+A),i.bindTexture(3553,et.__webglTexture)}function P(T,A,et){et?(t.texParameteri(T,10242,o.convert(A.wrapS)),t.texParameteri(T,10243,o.convert(A.wrapT)),t.texParameteri(T,10240,o.convert(A.magFilter)),t.texParameteri(T,10241,o.convert(A.minFilter))):(t.texParameteri(T,10242,33071),t.texParameteri(T,10243,33071),A.wrapS===1001&&A.wrapT===1001||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(T,10240,d(A.magFilter)),t.texParameteri(T,10241,d(A.minFilter)),A.minFilter!==1003&&A.minFilter!==1006&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!(et=e.get("EXT_texture_filter_anisotropic"))||A.type===1015&&e.get("OES_texture_float_linear")===null||A.type===1016&&(r.isWebGL2||e.get("OES_texture_half_float_linear"))===null||!(1<A.anisotropy||n.get(A).__currentAnisotropy)||(t.texParameterf(T,et.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(A.anisotropy,r.getMaxAnisotropy())),n.get(A).__currentAnisotropy=A.anisotropy)}function G(T,A,et){var yt=A.isDataTexture3D?32879:3553;T.__webglInit===void 0&&(T.__webglInit=!0,A.addEventListener("dispose",g),T.__webglTexture=t.createTexture(),s.memory.textures++),i.activeTexture(33984+et),i.bindTexture(yt,T.__webglTexture),t.pixelStorei(37440,A.flipY),t.pixelStorei(37441,A.premultiplyAlpha),t.pixelStorei(3317,A.unpackAlignment),et=a(A.image,r.maxTextureSize);var ft=r.isWebGL2?!1:A.wrapS!==1001||A.wrapT!==1001||A.minFilter!==1003&&A.minFilter!==1006;ft&&h(et)===!1&&(et instanceof HTMLImageElement||et instanceof HTMLCanvasElement||et instanceof ImageBitmap)&&(ot===void 0&&(ot=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),ot.width=Ee.floorPowerOfTwo(et.width),ot.height=Ee.floorPowerOfTwo(et.height),ot.getContext("2d").drawImage(et,0,0,ot.width,ot.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+et.width+"x"+et.height+"). Resized to "+ot.width+"x"+ot.height),et=ot),ft=h(et);var st=o.convert(A.format),Ht=o.convert(A.type),It=u(st,Ht);P(yt,A,ft);var $t=A.mipmaps;if(A.isDepthTexture){if(It=6402,A.type===1015){if(!r.isWebGL2)throw Error("Float Depth Texture only supported in WebGL2.0");It=36012}else r.isWebGL2&&(It=33189);A.format===1026&&It===6402&&A.type!==1012&&A.type!==1014&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),A.type=1012,Ht=o.convert(A.type)),A.format===1027&&(It=34041,A.type!==1020&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),A.type=1020,Ht=o.convert(A.type))),i.texImage2D(3553,0,It,et.width,et.height,0,st,Ht,null)}else if(A.isDataTexture)if(0<$t.length&&ft){for(var Xt=0,Qt=$t.length;Xt<Qt;Xt++)yt=$t[Xt],i.texImage2D(3553,Xt,It,yt.width,yt.height,0,st,Ht,yt.data);A.generateMipmaps=!1,T.__maxMipLevel=$t.length-1}else i.texImage2D(3553,0,It,et.width,et.height,0,st,Ht,et.data),T.__maxMipLevel=0;else if(A.isCompressedTexture){for(Xt=0,Qt=$t.length;Xt<Qt;Xt++)yt=$t[Xt],A.format!==1023&&A.format!==1022?-1<i.getCompressedTextureFormats().indexOf(st)?i.compressedTexImage2D(3553,Xt,It,yt.width,yt.height,0,yt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):i.texImage2D(3553,Xt,It,yt.width,yt.height,0,st,Ht,yt.data);T.__maxMipLevel=$t.length-1}else if(A.isDataTexture3D)i.texImage3D(32879,0,It,et.width,et.height,et.depth,0,st,Ht,et.data),T.__maxMipLevel=0;else if(0<$t.length&&ft){for(Xt=0,Qt=$t.length;Xt<Qt;Xt++)yt=$t[Xt],i.texImage2D(3553,Xt,It,st,Ht,yt);A.generateMipmaps=!1,T.__maxMipLevel=$t.length-1}else i.texImage2D(3553,0,It,st,Ht,et),T.__maxMipLevel=0;l(A,ft)&&c(3553,A,et.width,et.height),T.__version=A.version,A.onUpdate&&A.onUpdate(A)}function N(T,A,et,yt){var ft=o.convert(A.texture.format),st=o.convert(A.texture.type),Ht=u(ft,st);i.texImage2D(yt,0,Ht,A.width,A.height,0,ft,st,null),t.bindFramebuffer(36160,T),t.framebufferTexture2D(36160,et,yt,n.get(A.texture).__webglTexture,0),t.bindFramebuffer(36160,null)}function q(T,A){t.bindRenderbuffer(36161,T),A.depthBuffer&&!A.stencilBuffer?(t.renderbufferStorage(36161,33189,A.width,A.height),t.framebufferRenderbuffer(36160,36096,36161,T)):A.depthBuffer&&A.stencilBuffer?(t.renderbufferStorage(36161,34041,A.width,A.height),t.framebufferRenderbuffer(36160,33306,36161,T)):t.renderbufferStorage(36161,32854,A.width,A.height),t.bindRenderbuffer(36161,null)}var V={},ot;this.setTexture2D=S,this.setTexture3D=function(T,A){var et=n.get(T);0<T.version&&et.__version!==T.version?G(et,T,A):(i.activeTexture(33984+A),i.bindTexture(32879,et.__webglTexture))},this.setTextureCube=function(T,A){var et=n.get(T);if(T.image.length===6)if(0<T.version&&et.__version!==T.version){et.__image__webglTextureCube||(T.addEventListener("dispose",g),et.__image__webglTextureCube=t.createTexture(),s.memory.textures++),i.activeTexture(33984+A),i.bindTexture(34067,et.__image__webglTextureCube),t.pixelStorei(37440,T.flipY),A=T&&T.isCompressedTexture;for(var yt=T.image[0]&&T.image[0].isDataTexture,ft=[],st=0;6>st;st++)ft[st]=A||yt?yt?T.image[st].image:T.image[st]:a(T.image[st],r.maxCubemapSize);var Ht=ft[0],It=h(Ht),$t=o.convert(T.format),Xt=o.convert(T.type),Qt=u($t,Xt);for(P(34067,T,It),st=0;6>st;st++)if(A)for(var re,me=ft[st].mipmaps,Ae=0,fi=me.length;Ae<fi;Ae++)re=me[Ae],T.format!==1023&&T.format!==1022?-1<i.getCompressedTextureFormats().indexOf($t)?i.compressedTexImage2D(34069+st,Ae,Qt,re.width,re.height,0,re.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):i.texImage2D(34069+st,Ae,Qt,re.width,re.height,0,$t,Xt,re.data);else yt?i.texImage2D(34069+st,0,Qt,ft[st].width,ft[st].height,0,$t,Xt,ft[st].data):i.texImage2D(34069+st,0,Qt,$t,Xt,ft[st]);et.__maxMipLevel=A?me.length-1:0,l(T,It)&&c(34067,T,Ht.width,Ht.height),et.__version=T.version,T.onUpdate&&T.onUpdate(T)}else i.activeTexture(33984+A),i.bindTexture(34067,et.__image__webglTextureCube)},this.setTextureCubeDynamic=function(T,A){i.activeTexture(33984+A),i.bindTexture(34067,n.get(T).__webglTexture)},this.setupRenderTarget=function(T){var A=n.get(T),et=n.get(T.texture);T.addEventListener("dispose",w),et.__webglTexture=t.createTexture(),s.memory.textures++;var yt=T.isWebGLRenderTargetCube===!0,ft=h(T);if(yt){A.__webglFramebuffer=[];for(var st=0;6>st;st++)A.__webglFramebuffer[st]=t.createFramebuffer()}else A.__webglFramebuffer=t.createFramebuffer();if(yt){for(i.bindTexture(34067,et.__webglTexture),P(34067,T.texture,ft),st=0;6>st;st++)N(A.__webglFramebuffer[st],T,36064,34069+st);l(T.texture,ft)&&c(34067,T.texture,T.width,T.height),i.bindTexture(34067,null)}else i.bindTexture(3553,et.__webglTexture),P(3553,T.texture,ft),N(A.__webglFramebuffer,T,36064,3553),l(T.texture,ft)&&c(3553,T.texture,T.width,T.height),i.bindTexture(3553,null);if(T.depthBuffer){if(A=n.get(T),et=T.isWebGLRenderTargetCube===!0,T.depthTexture){if(et)throw Error("target.depthTexture not supported in Cube render targets");if(T&&T.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,A.__webglFramebuffer),!T.depthTexture||!T.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");if(n.get(T.depthTexture).__webglTexture&&T.depthTexture.image.width===T.width&&T.depthTexture.image.height===T.height||(T.depthTexture.image.width=T.width,T.depthTexture.image.height=T.height,T.depthTexture.needsUpdate=!0),S(T.depthTexture,0),A=n.get(T.depthTexture).__webglTexture,T.depthTexture.format===1026)t.framebufferTexture2D(36160,36096,3553,A,0);else if(T.depthTexture.format===1027)t.framebufferTexture2D(36160,33306,3553,A,0);else throw Error("Unknown depthTexture format")}else if(et)for(A.__webglDepthbuffer=[],et=0;6>et;et++)t.bindFramebuffer(36160,A.__webglFramebuffer[et]),A.__webglDepthbuffer[et]=t.createRenderbuffer(),q(A.__webglDepthbuffer[et],T);else t.bindFramebuffer(36160,A.__webglFramebuffer),A.__webglDepthbuffer=t.createRenderbuffer(),q(A.__webglDepthbuffer,T);t.bindFramebuffer(36160,null)}},this.updateRenderTargetMipmap=function(T){var A=T.texture,et=h(T);if(l(A,et)){et=T.isWebGLRenderTargetCube?34067:3553;var yt=n.get(A).__webglTexture;i.bindTexture(et,yt),c(et,A,T.width,T.height),i.bindTexture(et,null)}}}function ne(t,e,i){return{convert:function(n){if(n===1e3)return 10497;if(n===1001)return 33071;if(n===1002)return 33648;if(n===1003)return 9728;if(n===1004)return 9984;if(n===1005)return 9986;if(n===1006)return 9729;if(n===1007)return 9985;if(n===1008)return 9987;if(n===1009)return 5121;if(n===1017)return 32819;if(n===1018)return 32820;if(n===1019)return 33635;if(n===1010)return 5120;if(n===1011)return 5122;if(n===1012)return 5123;if(n===1013)return 5124;if(n===1014)return 5125;if(n===1015)return 5126;if(n===1016){if(i.isWebGL2)return 5131;var r=e.get("OES_texture_half_float");if(r!==null)return r.HALF_FLOAT_OES}if(n===1021)return 6406;if(n===1022)return 6407;if(n===1023)return 6408;if(n===1024)return 6409;if(n===1025)return 6410;if(n===1026)return 6402;if(n===1027)return 34041;if(n===1028)return 6403;if(n===100)return 32774;if(n===101)return 32778;if(n===102)return 32779;if(n===200)return 0;if(n===201)return 1;if(n===202)return 768;if(n===203)return 769;if(n===204)return 770;if(n===205)return 771;if(n===206)return 772;if(n===207)return 773;if(n===208)return 774;if(n===209)return 775;if(n===210)return 776;if((n===33776||n===33777||n===33778||n===33779)&&(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null)){if(n===33776)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===33777)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===33778)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===33779)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===35840||n===35841||n===35842||n===35843)&&(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null)){if(n===35840)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===35841)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===35842)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===35843)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===36196&&(r=e.get("WEBGL_compressed_texture_etc1"),r!==null))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===37808||n===37809||n===37810||n===37811||n===37812||n===37813||n===37814||n===37815||n===37816||n===37817||n===37818||n===37819||n===37820||n===37821)&&(r=e.get("WEBGL_compressed_texture_astc"),r!==null))return n;if(n===103||n===104){if(i.isWebGL2){if(n===103)return 32775;if(n===104)return 32776}if(r=e.get("EXT_blend_minmax"),r!==null){if(n===103)return r.MIN_EXT;if(n===104)return r.MAX_EXT}}if(n===1020){if(i.isWebGL2)return 34042;if(r=e.get("WEBGL_depth_texture"),r!==null)return r.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Pe(){b.call(this),this.type="Group"}function Kt(){b.call(this),this.type="Camera",this.matrixWorldInverse=new gt,this.projectionMatrix=new gt,this.projectionMatrixInverse=new gt}function Bt(t,e,i,n){Kt.call(this),this.type="PerspectiveCamera",this.fov=t!==void 0?t:50,this.zoom=1,this.near=i!==void 0?i:.1,this.far=n!==void 0?n:2e3,this.focus=10,this.aspect=e!==void 0?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function te(t){Bt.call(this),this.cameras=t||[]}function Ct(t,e,i){_a.setFromMatrixPosition(e.matrixWorld),xa.setFromMatrixPosition(i.matrixWorld);var n=_a.distanceTo(xa),r=e.projectionMatrix.elements,o=i.projectionMatrix.elements,s=r[14]/(r[10]-1);i=r[14]/(r[10]+1);var a=(r[9]+1)/r[5],h=(r[9]-1)/r[5],l=(r[8]-1)/r[0],c=(o[8]+1)/o[0];r=s*l,o=s*c,c=n/(-l+c),l=c*-l,e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(l),t.translateZ(c),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.getInverse(t.matrixWorld),e=s+c,s=i+c,t.projectionMatrix.makePerspective(r-l,o+(n-l),a*i/s*e,h*i/s*e,e,s)}function Le(t){function e(){return r!==null&&r.isPresenting===!0}function i(){if(e()){var T=r.getEyeParameters("left"),A=T.renderWidth*c;T=T.renderHeight*c,q=t.getPixelRatio(),N=t.getSize(),t.setDrawingBufferSize(2*A,T,1),ot.start()}else n.enabled&&t.setDrawingBufferSize(N.width,N.height,q),ot.stop()}var n=this,r=null,o=null,s=null,a=[],h=new gt,l=new gt,c=1,u="stage";typeof window<"u"&&"VRFrameData"in window&&(o=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",i,!1));var d=new gt,g=new at,w=new M,S=new Bt;S.bounds=new Z(0,0,.5,1),S.layers.enable(1);var P=new Bt;P.bounds=new Z(.5,0,.5,1),P.layers.enable(2);var G=new te([S,P]);G.layers.enable(1),G.layers.enable(2);var N,q,V=[];this.enabled=!1,this.getController=function(T){var A=a[T];return A===void 0&&(A=new Pe,A.matrixAutoUpdate=!1,A.visible=!1,a[T]=A),A},this.getDevice=function(){return r},this.setDevice=function(T){T!==void 0&&(r=T),ot.setContext(T)},this.setFramebufferScaleFactor=function(T){c=T},this.setFrameOfReferenceType=function(T){u=T},this.setPoseTarget=function(T){T!==void 0&&(s=T)},this.getCamera=function(T){var A=u==="stage"?1.6:0;if(r===null)return T.position.set(0,A,0),T;if(r.depthNear=T.near,r.depthFar=T.far,r.getFrameData(o),u==="stage"){var et=r.stageParameters;et?h.fromArray(et.sittingToStandingTransform):h.makeTranslation(0,A,0)}if(A=o.pose,et=s!==null?s:T,et.matrix.copy(h),et.matrix.decompose(et.position,et.quaternion,et.scale),A.orientation!==null&&(g.fromArray(A.orientation),et.quaternion.multiply(g)),A.position!==null&&(g.setFromRotationMatrix(h),w.fromArray(A.position),w.applyQuaternion(g),et.position.add(w)),et.updateMatrixWorld(),r.isPresenting===!1)return T;S.near=T.near,P.near=T.near,S.far=T.far,P.far=T.far,S.matrixWorldInverse.fromArray(o.leftViewMatrix),P.matrixWorldInverse.fromArray(o.rightViewMatrix),l.getInverse(h),u==="stage"&&(S.matrixWorldInverse.multiply(l),P.matrixWorldInverse.multiply(l)),T=et.parent,T!==null&&(d.getInverse(T.matrixWorld),S.matrixWorldInverse.multiply(d),P.matrixWorldInverse.multiply(d)),S.matrixWorld.getInverse(S.matrixWorldInverse),P.matrixWorld.getInverse(P.matrixWorldInverse),S.projectionMatrix.fromArray(o.leftProjectionMatrix),P.projectionMatrix.fromArray(o.rightProjectionMatrix),Ct(G,S,P),T=r.getLayers(),T.length&&(T=T[0],T.leftBounds!==null&&T.leftBounds.length===4&&S.bounds.fromArray(T.leftBounds),T.rightBounds!==null&&T.rightBounds.length===4&&P.bounds.fromArray(T.rightBounds));t:for(T=0;T<a.length;T++){A=a[T];e:{et=T;for(var yt=navigator.getGamepads&&navigator.getGamepads(),ft=0,st=0,Ht=yt.length;ft<Ht;ft++){var It=yt[ft];if(It&&(It.id==="Daydream Controller"||It.id==="Gear VR Controller"||It.id==="Oculus Go Controller"||It.id==="OpenVR Gamepad"||It.id.startsWith("Oculus Touch")||It.id.startsWith("Spatial Controller"))){if(st===et){et=It;break e}st++}}et=void 0}if(et!==void 0&&et.pose!==void 0){if(et.pose===null)break t;yt=et.pose,yt.hasPosition===!1&&A.position.set(.2,-.6,-.05),yt.position!==null&&A.position.fromArray(yt.position),yt.orientation!==null&&A.quaternion.fromArray(yt.orientation),A.matrix.compose(A.position,A.quaternion,A.scale),A.matrix.premultiply(h),A.matrix.decompose(A.position,A.quaternion,A.scale),A.matrixWorldNeedsUpdate=!0,A.visible=!0,yt=et.id==="Daydream Controller"?0:1,V[T]!==et.buttons[yt].pressed&&(V[T]=et.buttons[yt].pressed,V[T]===!0?A.dispatchEvent({type:"selectstart"}):(A.dispatchEvent({type:"selectend"}),A.dispatchEvent({type:"select"})))}else A.visible=!1}return G},this.getStandingMatrix=function(){return h},this.isPresenting=e;var ot=new m;this.setAnimationLoop=function(T){ot.setAnimationLoop(T)},this.submitFrame=function(){e()&&r.submitFrame()},this.dispose=function(){typeof window<"u"&&window.removeEventListener("vrdisplaypresentchange",i)}}function Zt(t){function e(){return a!==null&&l!==null}function i(q){var V=d[g.indexOf(q.inputSource)];V&&V.dispatchEvent({type:q.type})}function n(){t.setFramebuffer(null),N.stop()}function r(q,V){V===null?q.matrixWorld.copy(q.matrix):q.matrixWorld.multiplyMatrices(V.matrixWorld,q.matrix),q.matrixWorldInverse.getInverse(q.matrixWorld)}var o=t.context,s=null,a=null,h=1,l=null,c="stage",u=null,d=[],g=[],w=new Bt;w.layers.enable(1),w.viewport=new Z;var S=new Bt;S.layers.enable(2),S.viewport=new Z;var P=new te([w,S]);P.layers.enable(1),P.layers.enable(2),this.enabled=!1,this.getController=function(q){var V=d[q];return V===void 0&&(V=new Pe,V.matrixAutoUpdate=!1,V.visible=!1,d[q]=V),V},this.getDevice=function(){return s},this.setDevice=function(q){q!==void 0&&(s=q),q instanceof XRDevice&&o.setCompatibleXRDevice(q)},this.setFramebufferScaleFactor=function(q){h=q},this.setFrameOfReferenceType=function(q){c=q},this.setSession=function(q){a=q,a!==null&&(a.addEventListener("select",i),a.addEventListener("selectstart",i),a.addEventListener("selectend",i),a.addEventListener("end",n),a.baseLayer=new XRWebGLLayer(a,o,{framebufferScaleFactor:h}),a.requestFrameOfReference(c).then(function(V){l=V,t.setFramebuffer(a.baseLayer.framebuffer),N.setContext(a),N.start()}),g=a.getInputSources(),a.addEventListener("inputsourceschange",function(){g=a.getInputSources(),console.log(g);for(var V=0;V<d.length;V++)d[V].userData.inputSource=g[V]}))},this.getCamera=function(q){if(e()){var V=q.parent,ot=P.cameras;r(P,V);for(var T=0;T<ot.length;T++)r(ot[T],V);for(q.matrixWorld.copy(P.matrixWorld),q=q.children,T=0,V=q.length;T<V;T++)q[T].updateMatrixWorld(!0);return Ct(P,w,S),P}return q},this.isPresenting=e;var G=null,N=new m;N.setAnimationLoop(function(q,V){if(u=V.getDevicePose(l),u!==null)for(var ot=a.baseLayer,T=V.views,A=0;A<T.length;A++){var et=T[A],yt=ot.getViewport(et),ft=u.getViewMatrix(et),st=P.cameras[A];st.matrix.fromArray(ft).getInverse(st.matrix),st.projectionMatrix.fromArray(et.projectionMatrix),st.viewport.set(yt.x,yt.y,yt.width,yt.height),A===0&&P.matrix.copy(st.matrix)}for(A=0;A<d.length;A++){if(ot=d[A],(T=g[A])&&(T=V.getInputPose(T,l),T!==null)){"targetRay"in T?ot.matrix.elements=T.targetRay.transformMatrix:"pointerMatrix"in T&&(ot.matrix.elements=T.pointerMatrix),ot.matrix.decompose(ot.position,ot.rotation,ot.scale),ot.visible=!0;continue}ot.visible=!1}G&&G(q)}),this.setAnimationLoop=function(q){G=q},this.dispose=function(){},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}function Ft(t){var e;function i(){xe=new en(wt),ve=new ji(wt,xe,t),ve.isWebGL2||(xe.get("WEBGL_depth_texture"),xe.get("OES_texture_float"),xe.get("OES_texture_half_float"),xe.get("OES_texture_half_float_linear"),xe.get("OES_standard_derivatives"),xe.get("OES_element_index_uint"),xe.get("ANGLE_instanced_arrays")),xe.get("OES_texture_float_linear"),dn=new ne(wt,xe,ve),we=new Pt(wt,xe,dn,ve),we.scissor(Ye.copy(ye).multiplyScalar(ge)),we.viewport(li.copy(nt).multiplyScalar(ge)),Bi=new Si,mi=new L,Ln=new oe(wt,xe,we,mi,ve,dn,Bi),Jo=new f(wt),Bs=new ci(wt,Jo,Bi),br=new Ci(Bs,Bi),Ea=new nn(wt),Jn=new R(st,xe,ve),Qo=new Q,Or=new St,Rn=new Mn(st,we,br,T),Pa=new Cn(wt,xe,Bi,ve),Aa=new Oe(wt,xe,Bi,ve),Bi.programs=Jn.programs,st.context=wt,st.capabilities=ve,st.extensions=xe,st.properties=mi,st.renderLists=Qo,st.state=we,st.info=Bi}function n(I){I.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),Ht=!0}function r(){console.log("THREE.WebGLRenderer: Context Restored."),Ht=!1,i()}function o(I){I=I.target,I.removeEventListener("dispose",o),s(I),mi.remove(I)}function s(I){var k=mi.get(I).program;I.program=void 0,k!==void 0&&Jn.releaseProgram(k)}function a(I,k){I.render(function(z){st.renderBufferImmediate(z,k)})}function h(I,k,z){if(I.visible!==!1){if(I.layers.test(k.layers)){if(I.isLight)ft.pushLight(I),I.castShadow&&ft.pushShadow(I);else if(I.isSprite){if(!I.frustumCulled||Ze.intersectsSprite(I)){z&&De.setFromMatrixPosition(I.matrixWorld).applyMatrix4(Be);var Wt=br.update(I),ee=I.material;yt.push(I,Wt,ee,De.z,null)}}else if(I.isImmediateRenderObject)z&&De.setFromMatrixPosition(I.matrixWorld).applyMatrix4(Be),yt.push(I,null,I.material,De.z,null);else if((I.isMesh||I.isLine||I.isPoints)&&(I.isSkinnedMesh&&I.skeleton.update(),!I.frustumCulled||Ze.intersectsObject(I)))if(z&&De.setFromMatrixPosition(I.matrixWorld).applyMatrix4(Be),Wt=br.update(I),ee=I.material,Array.isArray(ee))for(var ce=Wt.groups,jt=0,de=ce.length;jt<de;jt++){var Ue=ce[jt],ni=ee[Ue.materialIndex];ni&&ni.visible&&yt.push(I,Wt,ni,De.z,Ue)}else ee.visible&&yt.push(I,Wt,ee,De.z,null)}for(I=I.children,jt=0,de=I.length;jt<de;jt++)h(I[jt],k,z)}}function l(I,k,z,Wt){for(var ee=0,ce=I.length;ee<ce;ee++){var jt=I[ee],de=jt.object,Ue=jt.geometry,ni=Wt===void 0?jt.material:Wt;if(jt=jt.group,z.isArrayCamera){fi=z;for(var Dt=z.cameras,mn=0,Li=Dt.length;mn<Li;mn++){var di=Dt[mn];if(de.layers.test(di.layers)){if("viewport"in di)we.viewport(li.copy(di.viewport));else{var Ui=di.bounds;we.viewport(li.set(Ui.x*Mi,Ui.y*qt,Ui.z*Mi,Ui.w*qt).multiplyScalar(ge))}ft.setupLights(di),c(de,k,di,Ue,ni,jt)}}}else fi=null,c(de,k,z,Ue,ni,jt)}}function c(I,k,z,Wt,ee,ce){if(I.onBeforeRender(st,k,z,Wt,ee,ce),ft=Or.get(k,fi||z),I.modelViewMatrix.multiplyMatrices(z.matrixWorldInverse,I.matrixWorld),I.normalMatrix.getNormalMatrix(I.modelViewMatrix),I.isImmediateRenderObject){we.setMaterial(ee);var jt=d(z,k.fog,ee,I);re=e=null,me=!1,a(I,jt)}else st.renderBufferDirect(z,k.fog,Wt,ee,I,ce);I.onAfterRender(st,k,z,Wt,ee,ce),ft=Or.get(k,fi||z)}function u(I,k,z){var Wt=mi.get(I),ee=ft.state.lights,ce=Wt.lightsHash,jt=ee.state.hash;z=Jn.getParameters(I,ee.state,ft.state.shadowsArray,k,Yt.numPlanes,Yt.numIntersection,z);var de=Jn.getProgramCode(I,z),Ue=Wt.program,ni=!0;if(Ue===void 0)I.addEventListener("dispose",o);else if(Ue.code!==de)s(I);else{if(ce.stateID!==jt.stateID||ce.directionalLength!==jt.directionalLength||ce.pointLength!==jt.pointLength||ce.spotLength!==jt.spotLength||ce.rectAreaLength!==jt.rectAreaLength||ce.hemiLength!==jt.hemiLength||ce.shadowsLength!==jt.shadowsLength)ce.stateID=jt.stateID,ce.directionalLength=jt.directionalLength,ce.pointLength=jt.pointLength,ce.spotLength=jt.spotLength,ce.rectAreaLength=jt.rectAreaLength,ce.hemiLength=jt.hemiLength,ce.shadowsLength=jt.shadowsLength;else if(z.shaderID!==void 0)return;ni=!1}if(ni&&(z.shaderID?(de=pn[z.shaderID],Wt.shader={name:I.type,uniforms:_i.clone(de.uniforms),vertexShader:de.vertexShader,fragmentShader:de.fragmentShader}):Wt.shader={name:I.type,uniforms:I.uniforms,vertexShader:I.vertexShader,fragmentShader:I.fragmentShader},I.onBeforeCompile(Wt.shader,st),de=Jn.getProgramCode(I,z),Ue=Jn.acquireProgram(I,Wt.shader,z,de),Wt.program=Ue,I.program=Ue),z=Ue.getAttributes(),I.morphTargets)for(de=I.numSupportedMorphTargets=0;de<st.maxMorphTargets;de++)0<=z["morphTarget"+de]&&I.numSupportedMorphTargets++;if(I.morphNormals)for(de=I.numSupportedMorphNormals=0;de<st.maxMorphNormals;de++)0<=z["morphNormal"+de]&&I.numSupportedMorphNormals++;z=Wt.shader.uniforms,(!I.isShaderMaterial&&!I.isRawShaderMaterial||I.clipping===!0)&&(Wt.numClippingPlanes=Yt.numPlanes,Wt.numIntersection=Yt.numIntersection,z.clippingPlanes=Yt.uniform),Wt.fog=k,ce===void 0&&(Wt.lightsHash=ce={}),ce.stateID=jt.stateID,ce.directionalLength=jt.directionalLength,ce.pointLength=jt.pointLength,ce.spotLength=jt.spotLength,ce.rectAreaLength=jt.rectAreaLength,ce.hemiLength=jt.hemiLength,ce.shadowsLength=jt.shadowsLength,I.lights&&(z.ambientLightColor.value=ee.state.ambient,z.directionalLights.value=ee.state.directional,z.spotLights.value=ee.state.spot,z.rectAreaLights.value=ee.state.rectArea,z.pointLights.value=ee.state.point,z.hemisphereLights.value=ee.state.hemi,z.directionalShadowMap.value=ee.state.directionalShadowMap,z.directionalShadowMatrix.value=ee.state.directionalShadowMatrix,z.spotShadowMap.value=ee.state.spotShadowMap,z.spotShadowMatrix.value=ee.state.spotShadowMatrix,z.pointShadowMap.value=ee.state.pointShadowMap,z.pointShadowMatrix.value=ee.state.pointShadowMatrix),I=Wt.program.getUniforms(),I=on.seqWithValue(I.seq,z),Wt.uniformsList=I}function d(I,k,z,Wt){ti=0;var ee=mi.get(z),ce=ee.lightsHash,jt=ft.state.lights.state.hash;ue&&(_e||I!==Ae)&&Yt.setState(z.clippingPlanes,z.clipIntersection,z.clipShadows,I,ee,I===Ae&&z.id===Qt),z.needsUpdate===!1&&(ee.program===void 0||z.fog&&ee.fog!==k?z.needsUpdate=!0:(!z.lights||ce.stateID===jt.stateID&&ce.directionalLength===jt.directionalLength&&ce.pointLength===jt.pointLength&&ce.spotLength===jt.spotLength&&ce.rectAreaLength===jt.rectAreaLength&&ce.hemiLength===jt.hemiLength&&ce.shadowsLength===jt.shadowsLength)&&(ee.numClippingPlanes===void 0||ee.numClippingPlanes===Yt.numPlanes&&ee.numIntersection===Yt.numIntersection)||(z.needsUpdate=!0)),z.needsUpdate&&(u(z,k,Wt),z.needsUpdate=!1);var de=!1,Ue=!1,ni=!1;ce=ee.program,jt=ce.getUniforms();var Dt=ee.shader.uniforms;if(we.useProgram(ce.program)&&(ni=Ue=de=!0),z.id!==Qt&&(Qt=z.id,Ue=!0),(de||Ae!==I)&&(jt.setValue(wt,"projectionMatrix",I.projectionMatrix),ve.logarithmicDepthBuffer&&jt.setValue(wt,"logDepthBufFC",2/(Math.log(I.far+1)/Math.LN2)),Ae!==I&&(Ae=I,ni=Ue=!0),(z.isShaderMaterial||z.isMeshPhongMaterial||z.isMeshStandardMaterial||z.envMap)&&(de=jt.map.cameraPosition,de!==void 0&&de.setValue(wt,De.setFromMatrixPosition(I.matrixWorld))),(z.isMeshPhongMaterial||z.isMeshLambertMaterial||z.isMeshBasicMaterial||z.isMeshStandardMaterial||z.isShaderMaterial||z.skinning)&&jt.setValue(wt,"viewMatrix",I.matrixWorldInverse)),z.skinning&&(jt.setOptional(wt,Wt,"bindMatrix"),jt.setOptional(wt,Wt,"bindMatrixInverse"),I=Wt.skeleton))if(de=I.bones,ve.floatVertexTextures){if(I.boneTexture===void 0){de=Math.sqrt(4*de.length),de=Ee.ceilPowerOfTwo(de),de=Math.max(de,4);var mn=new Float32Array(de*de*4);mn.set(I.boneMatrices);var Li=new ct(mn,de,de,1023,1015);Li.needsUpdate=!0,I.boneMatrices=mn,I.boneTexture=Li,I.boneTextureSize=de}jt.setValue(wt,"boneTexture",I.boneTexture),jt.setValue(wt,"boneTextureSize",I.boneTextureSize)}else jt.setOptional(wt,I,"boneMatrices");return Ue&&(jt.setValue(wt,"toneMappingExposure",st.toneMappingExposure),jt.setValue(wt,"toneMappingWhitePoint",st.toneMappingWhitePoint),z.lights&&(Ue=ni,Dt.ambientLightColor.needsUpdate=Ue,Dt.directionalLights.needsUpdate=Ue,Dt.pointLights.needsUpdate=Ue,Dt.spotLights.needsUpdate=Ue,Dt.rectAreaLights.needsUpdate=Ue,Dt.hemisphereLights.needsUpdate=Ue),k&&z.fog&&(Dt.fogColor.value=k.color,k.isFog?(Dt.fogNear.value=k.near,Dt.fogFar.value=k.far):k.isFogExp2&&(Dt.fogDensity.value=k.density)),z.isMeshBasicMaterial?g(Dt,z):z.isMeshLambertMaterial?(g(Dt,z),z.emissiveMap&&(Dt.emissiveMap.value=z.emissiveMap)):z.isMeshPhongMaterial?(g(Dt,z),z.isMeshToonMaterial?(w(Dt,z),z.gradientMap&&(Dt.gradientMap.value=z.gradientMap)):w(Dt,z)):z.isMeshStandardMaterial?(g(Dt,z),z.isMeshPhysicalMaterial?(S(Dt,z),Dt.reflectivity.value=z.reflectivity,Dt.clearCoat.value=z.clearCoat,Dt.clearCoatRoughness.value=z.clearCoatRoughness):S(Dt,z)):z.isMeshMatcapMaterial?(g(Dt,z),z.matcap&&(Dt.matcap.value=z.matcap),z.bumpMap&&(Dt.bumpMap.value=z.bumpMap,Dt.bumpScale.value=z.bumpScale,z.side===1&&(Dt.bumpScale.value*=-1)),z.normalMap&&(Dt.normalMap.value=z.normalMap,Dt.normalScale.value.copy(z.normalScale),z.side===1&&Dt.normalScale.value.negate()),z.displacementMap&&(Dt.displacementMap.value=z.displacementMap,Dt.displacementScale.value=z.displacementScale,Dt.displacementBias.value=z.displacementBias)):z.isMeshDepthMaterial?(g(Dt,z),z.displacementMap&&(Dt.displacementMap.value=z.displacementMap,Dt.displacementScale.value=z.displacementScale,Dt.displacementBias.value=z.displacementBias)):z.isMeshDistanceMaterial?(g(Dt,z),z.displacementMap&&(Dt.displacementMap.value=z.displacementMap,Dt.displacementScale.value=z.displacementScale,Dt.displacementBias.value=z.displacementBias),Dt.referencePosition.value.copy(z.referencePosition),Dt.nearDistance.value=z.nearDistance,Dt.farDistance.value=z.farDistance):z.isMeshNormalMaterial?(g(Dt,z),z.bumpMap&&(Dt.bumpMap.value=z.bumpMap,Dt.bumpScale.value=z.bumpScale,z.side===1&&(Dt.bumpScale.value*=-1)),z.normalMap&&(Dt.normalMap.value=z.normalMap,Dt.normalScale.value.copy(z.normalScale),z.side===1&&Dt.normalScale.value.negate()),z.displacementMap&&(Dt.displacementMap.value=z.displacementMap,Dt.displacementScale.value=z.displacementScale,Dt.displacementBias.value=z.displacementBias)):z.isLineBasicMaterial?(Dt.diffuse.value=z.color,Dt.opacity.value=z.opacity,z.isLineDashedMaterial&&(Dt.dashSize.value=z.dashSize,Dt.totalSize.value=z.dashSize+z.gapSize,Dt.scale.value=z.scale)):z.isPointsMaterial?(Dt.diffuse.value=z.color,Dt.opacity.value=z.opacity,Dt.size.value=z.size*ge,Dt.scale.value=.5*qt,Dt.map.value=z.map,z.map!==null&&(z.map.matrixAutoUpdate===!0&&z.map.updateMatrix(),Dt.uvTransform.value.copy(z.map.matrix))):z.isSpriteMaterial?(Dt.diffuse.value=z.color,Dt.opacity.value=z.opacity,Dt.rotation.value=z.rotation,Dt.map.value=z.map,z.map!==null&&(z.map.matrixAutoUpdate===!0&&z.map.updateMatrix(),Dt.uvTransform.value.copy(z.map.matrix))):z.isShadowMaterial&&(Dt.color.value=z.color,Dt.opacity.value=z.opacity),Dt.ltc_1!==void 0&&(Dt.ltc_1.value=le.LTC_1),Dt.ltc_2!==void 0&&(Dt.ltc_2.value=le.LTC_2),on.upload(wt,ee.uniformsList,Dt,st)),z.isShaderMaterial&&z.uniformsNeedUpdate===!0&&(on.upload(wt,ee.uniformsList,Dt,st),z.uniformsNeedUpdate=!1),z.isSpriteMaterial&&jt.setValue(wt,"center",Wt.center),jt.setValue(wt,"modelViewMatrix",Wt.modelViewMatrix),jt.setValue(wt,"normalMatrix",Wt.normalMatrix),jt.setValue(wt,"modelMatrix",Wt.matrixWorld),ce}function g(I,k){if(I.opacity.value=k.opacity,k.color&&(I.diffuse.value=k.color),k.emissive&&I.emissive.value.copy(k.emissive).multiplyScalar(k.emissiveIntensity),k.map&&(I.map.value=k.map),k.alphaMap&&(I.alphaMap.value=k.alphaMap),k.specularMap&&(I.specularMap.value=k.specularMap),k.envMap&&(I.envMap.value=k.envMap,I.flipEnvMap.value=k.envMap&&k.envMap.isCubeTexture?-1:1,I.reflectivity.value=k.reflectivity,I.refractionRatio.value=k.refractionRatio,I.maxMipLevel.value=mi.get(k.envMap).__maxMipLevel),k.lightMap&&(I.lightMap.value=k.lightMap,I.lightMapIntensity.value=k.lightMapIntensity),k.aoMap&&(I.aoMap.value=k.aoMap,I.aoMapIntensity.value=k.aoMapIntensity),k.map)var z=k.map;else k.specularMap?z=k.specularMap:k.displacementMap?z=k.displacementMap:k.normalMap?z=k.normalMap:k.bumpMap?z=k.bumpMap:k.roughnessMap?z=k.roughnessMap:k.metalnessMap?z=k.metalnessMap:k.alphaMap?z=k.alphaMap:k.emissiveMap&&(z=k.emissiveMap);z!==void 0&&(z.isWebGLRenderTarget&&(z=z.texture),z.matrixAutoUpdate===!0&&z.updateMatrix(),I.uvTransform.value.copy(z.matrix))}function w(I,k){I.specular.value=k.specular,I.shininess.value=Math.max(k.shininess,1e-4),k.emissiveMap&&(I.emissiveMap.value=k.emissiveMap),k.bumpMap&&(I.bumpMap.value=k.bumpMap,I.bumpScale.value=k.bumpScale,k.side===1&&(I.bumpScale.value*=-1)),k.normalMap&&(I.normalMap.value=k.normalMap,I.normalScale.value.copy(k.normalScale),k.side===1&&I.normalScale.value.negate()),k.displacementMap&&(I.displacementMap.value=k.displacementMap,I.displacementScale.value=k.displacementScale,I.displacementBias.value=k.displacementBias)}function S(I,k){I.roughness.value=k.roughness,I.metalness.value=k.metalness,k.roughnessMap&&(I.roughnessMap.value=k.roughnessMap),k.metalnessMap&&(I.metalnessMap.value=k.metalnessMap),k.emissiveMap&&(I.emissiveMap.value=k.emissiveMap),k.bumpMap&&(I.bumpMap.value=k.bumpMap,I.bumpScale.value=k.bumpScale,k.side===1&&(I.bumpScale.value*=-1)),k.normalMap&&(I.normalMap.value=k.normalMap,I.normalScale.value.copy(k.normalScale),k.side===1&&I.normalScale.value.negate()),k.displacementMap&&(I.displacementMap.value=k.displacementMap,I.displacementScale.value=k.displacementScale,I.displacementBias.value=k.displacementBias),k.envMap&&(I.envMapIntensity.value=k.envMapIntensity)}console.log("THREE.WebGLRenderer","98"),t=t||{};var P=t.canvas!==void 0?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),G=t.context!==void 0?t.context:null,N=t.alpha!==void 0?t.alpha:!1,q=t.depth!==void 0?t.depth:!0,V=t.stencil!==void 0?t.stencil:!0,ot=t.antialias!==void 0?t.antialias:!1,T=t.premultipliedAlpha!==void 0?t.premultipliedAlpha:!0,A=t.preserveDrawingBuffer!==void 0?t.preserveDrawingBuffer:!1,et=t.powerPreference!==void 0?t.powerPreference:"default",yt=null,ft=null;this.domElement=P,this.context=null,this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1,this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var st=this,Ht=!1,It=null,$t=null,Xt=null,Qt=-1,re=e=null,me=!1,Ae=null,fi=null,li=new Z,Ye=new Z,pi=null,ti=0,Mi=P.width,qt=P.height,ge=1,nt=new Z(0,0,Mi,qt),ye=new Z(0,0,Mi,qt),Te=!1,Ze=new K,Yt=new Ii,ue=!1,_e=!1,Be=new gt,De=new M;try{N={alpha:N,depth:q,stencil:V,antialias:ot,premultipliedAlpha:T,preserveDrawingBuffer:A,powerPreference:et},P.addEventListener("webglcontextlost",n,!1),P.addEventListener("webglcontextrestored",r,!1);var wt=G||P.getContext("webgl",N)||P.getContext("experimental-webgl",N);if(wt===null)throw P.getContext("webgl")!==null?Error("Error creating WebGL context with your selected attributes."):Error("Error creating WebGL context.");wt.getShaderPrecisionFormat===void 0&&(wt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(I){console.error("THREE.WebGLRenderer: "+I.message)}var xe,ve,we,Bi,mi,Ln,Jo,Bs,br,Jn,Qo,Or,Rn,Ea,Pa,Aa,dn;i();var fn=null;typeof navigator<"u"&&(fn="xr"in navigator?new Zt(st):new Le(st)),this.vr=fn;var La=new Nt(st,br,ve.maxTextureSize);this.shadowMap=La,this.getContext=function(){return wt},this.getContextAttributes=function(){return wt.getContextAttributes()},this.forceContextLoss=function(){var I=xe.get("WEBGL_lose_context");I&&I.loseContext()},this.forceContextRestore=function(){var I=xe.get("WEBGL_lose_context");I&&I.restoreContext()},this.getPixelRatio=function(){return ge},this.setPixelRatio=function(I){I!==void 0&&(ge=I,this.setSize(Mi,qt,!1))},this.getSize=function(){return{width:Mi,height:qt}},this.setSize=function(I,k,z){fn.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(Mi=I,qt=k,P.width=I*ge,P.height=k*ge,z!==!1&&(P.style.width=I+"px",P.style.height=k+"px"),this.setViewport(0,0,I,k))},this.getDrawingBufferSize=function(){return{width:Mi*ge,height:qt*ge}},this.setDrawingBufferSize=function(I,k,z){Mi=I,qt=k,ge=z,P.width=I*z,P.height=k*z,this.setViewport(0,0,I,k)},this.getCurrentViewport=function(){return li},this.setViewport=function(I,k,z,Wt){nt.set(I,qt-k-Wt,z,Wt),we.viewport(li.copy(nt).multiplyScalar(ge))},this.setScissor=function(I,k,z,Wt){ye.set(I,qt-k-Wt,z,Wt),we.scissor(Ye.copy(ye).multiplyScalar(ge))},this.setScissorTest=function(I){we.setScissorTest(Te=I)},this.getClearColor=function(){return Rn.getClearColor()},this.setClearColor=function(){Rn.setClearColor.apply(Rn,arguments)},this.getClearAlpha=function(){return Rn.getClearAlpha()},this.setClearAlpha=function(){Rn.setClearAlpha.apply(Rn,arguments)},this.clear=function(I,k,z){var Wt=0;(I===void 0||I)&&(Wt|=16384),(k===void 0||k)&&(Wt|=256),(z===void 0||z)&&(Wt|=1024),wt.clear(Wt)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){P.removeEventListener("webglcontextlost",n,!1),P.removeEventListener("webglcontextrestored",r,!1),Qo.dispose(),Or.dispose(),mi.dispose(),br.dispose(),fn.dispose(),$o.stop()},this.renderBufferImmediate=function(I,k){we.initAttributes();var z=mi.get(I);I.hasPositions&&!z.position&&(z.position=wt.createBuffer()),I.hasNormals&&!z.normal&&(z.normal=wt.createBuffer()),I.hasUvs&&!z.uv&&(z.uv=wt.createBuffer()),I.hasColors&&!z.color&&(z.color=wt.createBuffer()),k=k.getAttributes(),I.hasPositions&&(wt.bindBuffer(34962,z.position),wt.bufferData(34962,I.positionArray,35048),we.enableAttribute(k.position),wt.vertexAttribPointer(k.position,3,5126,!1,0,0)),I.hasNormals&&(wt.bindBuffer(34962,z.normal),wt.bufferData(34962,I.normalArray,35048),we.enableAttribute(k.normal),wt.vertexAttribPointer(k.normal,3,5126,!1,0,0)),I.hasUvs&&(wt.bindBuffer(34962,z.uv),wt.bufferData(34962,I.uvArray,35048),we.enableAttribute(k.uv),wt.vertexAttribPointer(k.uv,2,5126,!1,0,0)),I.hasColors&&(wt.bindBuffer(34962,z.color),wt.bufferData(34962,I.colorArray,35048),we.enableAttribute(k.color),wt.vertexAttribPointer(k.color,3,5126,!1,0,0)),we.disableUnusedAttributes(),wt.drawArrays(4,0,I.count),I.count=0},this.renderBufferDirect=function(I,k,z,Wt,ee,ce){var jt=ee.isMesh&&0>ee.normalMatrix.determinant();we.setMaterial(Wt,jt);var de=d(I,k,Wt,ee),Ue=!1;(e!==z.id||re!==de.id||me!==(Wt.wireframe===!0))&&(e=z.id,re=de.id,me=Wt.wireframe===!0,Ue=!0),ee.morphTargetInfluences&&(Ea.update(ee,z,Wt,de),Ue=!0),jt=z.index;var ni=z.attributes.position;if(k=1,Wt.wireframe===!0&&(jt=Bs.getWireframeAttribute(z),k=2),I=Pa,jt!==null){var Dt=Jo.get(jt);I=Aa,I.setIndex(Dt)}if(Ue){if(z&&z.isInstancedBufferGeometry&!ve.isWebGL2&&xe.get("ANGLE_instanced_arrays")===null)console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{we.initAttributes(),Ue=z.attributes,de=de.getAttributes();var mn=Wt.defaultAttributeValues;for($n in de){var Li=de[$n];if(0<=Li){var di=Ue[$n];if(di!==void 0){var Ui=di.normalized,Ra=di.itemSize,Qn=Jo.get(di);if(Qn!==void 0){var Ca=Qn.buffer,ba=Qn.type;if(Qn=Qn.bytesPerElement,di.isInterleavedBufferAttribute){var Ir=di.data,gh=Ir.stride;di=di.offset,Ir&&Ir.isInstancedInterleavedBuffer?(we.enableAttributeAndDivisor(Li,Ir.meshPerAttribute),z.maxInstancedCount===void 0&&(z.maxInstancedCount=Ir.meshPerAttribute*Ir.count)):we.enableAttribute(Li),wt.bindBuffer(34962,Ca),wt.vertexAttribPointer(Li,Ra,ba,Ui,gh*Qn,di*Qn)}else di.isInstancedBufferAttribute?(we.enableAttributeAndDivisor(Li,di.meshPerAttribute),z.maxInstancedCount===void 0&&(z.maxInstancedCount=di.meshPerAttribute*di.count)):we.enableAttribute(Li),wt.bindBuffer(34962,Ca),wt.vertexAttribPointer(Li,Ra,ba,Ui,0,0)}}else if(mn!==void 0&&(Ui=mn[$n],Ui!==void 0))switch(Ui.length){case 2:wt.vertexAttrib2fv(Li,Ui);break;case 3:wt.vertexAttrib3fv(Li,Ui);break;case 4:wt.vertexAttrib4fv(Li,Ui);break;default:wt.vertexAttrib1fv(Li,Ui)}}}we.disableUnusedAttributes()}jt!==null&&wt.bindBuffer(34963,Dt.buffer)}Dt=1/0,jt!==null?Dt=jt.count:ni!==void 0&&(Dt=ni.count),jt=z.drawRange.start*k,ni=ce!==null?ce.start*k:0;var $n=Math.max(jt,ni);if(ce=Math.max(0,Math.min(Dt,jt+z.drawRange.count*k,ni+(ce!==null?ce.count*k:1/0))-1-$n+1),ce!==0){if(ee.isMesh)if(Wt.wireframe===!0)we.setLineWidth(Wt.wireframeLinewidth*($t===null?ge:1)),I.setMode(1);else switch(ee.drawMode){case 0:I.setMode(4);break;case 1:I.setMode(5);break;case 2:I.setMode(6)}else ee.isLine?(Wt=Wt.linewidth,Wt===void 0&&(Wt=1),we.setLineWidth(Wt*($t===null?ge:1)),ee.isLineSegments?I.setMode(1):ee.isLineLoop?I.setMode(2):I.setMode(3)):ee.isPoints?I.setMode(0):ee.isSprite&&I.setMode(4);z&&z.isInstancedBufferGeometry?0<z.maxInstancedCount&&I.renderInstances(z,$n,ce):I.render($n,ce)}},this.compile=function(I,k){ft=Or.get(I,k),ft.init(),I.traverse(function(z){z.isLight&&(ft.pushLight(z),z.castShadow&&ft.pushShadow(z))}),ft.setupLights(k),I.traverse(function(z){if(z.material)if(Array.isArray(z.material))for(var Wt=0;Wt<z.material.length;Wt++)u(z.material[Wt],I.fog,z);else u(z.material,I.fog,z)})};var Us=null,$o=new m;$o.setAnimationLoop(function(I){fn.isPresenting()||Us&&Us(I)}),typeof window<"u"&&$o.setContext(window),this.setAnimationLoop=function(I){Us=I,fn.setAnimationLoop(I),$o.start()},this.render=function(I,k,z,Wt){if(!k||!k.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!Ht){re=e=null,me=!1,Qt=-1,Ae=null,I.autoUpdate===!0&&I.updateMatrixWorld(),k.parent===null&&k.updateMatrixWorld(),fn.enabled&&(k=fn.getCamera(k)),ft=Or.get(I,k),ft.init(),I.onBeforeRender(st,I,k,z),Be.multiplyMatrices(k.projectionMatrix,k.matrixWorldInverse),Ze.setFromMatrix(Be),_e=this.localClippingEnabled,ue=Yt.init(this.clippingPlanes,_e,k),yt=Qo.get(I,k),yt.init(),h(I,k,st.sortObjects),st.sortObjects===!0&&yt.sort(),ue&&Yt.beginShadows(),La.render(ft.state.shadowsArray,I,k),ft.setupLights(k),ue&&Yt.endShadows(),this.info.autoReset&&this.info.reset(),z===void 0&&(z=null),this.setRenderTarget(z),Rn.render(yt,I,k,Wt),Wt=yt.opaque;var ee=yt.transparent;if(I.overrideMaterial){var ce=I.overrideMaterial;Wt.length&&l(Wt,I,k,ce),ee.length&&l(ee,I,k,ce)}else Wt.length&&l(Wt,I,k),ee.length&&l(ee,I,k);z&&Ln.updateRenderTargetMipmap(z),we.buffers.depth.setTest(!0),we.buffers.depth.setMask(!0),we.buffers.color.setMask(!0),we.setPolygonOffset(!1),I.onAfterRender(st,I,k),fn.enabled&&fn.submitFrame(),ft=yt=null}},this.allocTextureUnit=function(){var I=ti;return I>=ve.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+I+" texture units while this GPU supports only "+ve.maxTextures),ti+=1,I},this.setTexture2D=function(){var I=!1;return function(k,z){k&&k.isWebGLRenderTarget&&(I||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),I=!0),k=k.texture),Ln.setTexture2D(k,z)}}(),this.setTexture3D=function(){return function(I,k){Ln.setTexture3D(I,k)}}(),this.setTexture=function(){var I=!1;return function(k,z){I||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),I=!0),Ln.setTexture2D(k,z)}}(),this.setTextureCube=function(){var I=!1;return function(k,z){k&&k.isWebGLRenderTargetCube&&(I||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),I=!0),k=k.texture),k&&k.isCubeTexture||Array.isArray(k.image)&&k.image.length===6?Ln.setTextureCube(k,z):Ln.setTextureCubeDynamic(k,z)}}(),this.setFramebuffer=function(I){It=I},this.getRenderTarget=function(){return $t},this.setRenderTarget=function(I){($t=I)&&mi.get(I).__webglFramebuffer===void 0&&Ln.setupRenderTarget(I);var k=It,z=!1;I?(k=mi.get(I).__webglFramebuffer,I.isWebGLRenderTargetCube&&(k=k[I.activeCubeFace],z=!0),li.copy(I.viewport),Ye.copy(I.scissor),pi=I.scissorTest):(li.copy(nt).multiplyScalar(ge),Ye.copy(ye).multiplyScalar(ge),pi=Te),Xt!==k&&(wt.bindFramebuffer(36160,k),Xt=k),we.viewport(li),we.scissor(Ye),we.setScissorTest(pi),z&&(z=mi.get(I.texture),wt.framebufferTexture2D(36160,36064,34069+I.activeCubeFace,z.__webglTexture,I.activeMipMapLevel))},this.readRenderTargetPixels=function(I,k,z,Wt,ee,ce){if(I&&I.isWebGLRenderTarget){var jt=mi.get(I).__webglFramebuffer;if(jt){var de=!1;jt!==Xt&&(wt.bindFramebuffer(36160,jt),de=!0);try{var Ue=I.texture,ni=Ue.format,Dt=Ue.type;ni!==1023&&dn.convert(ni)!==wt.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):Dt===1009||dn.convert(Dt)===wt.getParameter(35738)||Dt===1015&&(ve.isWebGL2||xe.get("OES_texture_float")||xe.get("WEBGL_color_buffer_float"))||Dt===1016&&(ve.isWebGL2?xe.get("EXT_color_buffer_float"):xe.get("EXT_color_buffer_half_float"))?wt.checkFramebufferStatus(36160)===36053?0<=k&&k<=I.width-Wt&&0<=z&&z<=I.height-ee&&wt.readPixels(k,z,Wt,ee,dn.convert(ni),dn.convert(Dt),ce):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{de&&wt.bindFramebuffer(36160,Xt)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(I,k,z){var Wt=k.image.width,ee=k.image.height,ce=dn.convert(k.format);this.setTexture2D(k,0),wt.copyTexImage2D(3553,z||0,ce,I.x,I.y,Wt,ee,0)},this.copyTextureToTexture=function(I,k,z,Wt){var ee=k.image.width,ce=k.image.height,jt=dn.convert(z.format),de=dn.convert(z.type);this.setTexture2D(z,0),k.isDataTexture?wt.texSubImage2D(3553,Wt||0,I.x,I.y,ee,ce,jt,de,k.image.data):wt.texSubImage2D(3553,Wt||0,I.x,I.y,jt,de,k.image)}}function Jt(t,e){this.name="",this.color=new H(t),this.density=e!==void 0?e:25e-5}function yi(t,e,i){this.name="",this.color=new H(t),this.near=e!==void 0?e:1,this.far=i!==void 0?i:1e3}function qi(){b.call(this),this.type="Scene",this.overrideMaterial=this.fog=this.background=null,this.autoUpdate=!0}function Ge(t,e){this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function He(t,e,i,n){this.data=t,this.itemSize=e,this.offset=i,this.normalized=n===!0}function We(t){fe.call(this),this.type="SpriteMaterial",this.color=new H(16777215),this.map=null,this.rotation=0,this.sizeAttenuation=!0,this.lights=!1,this.transparent=!0,this.setValues(t)}function ei(t){if(b.call(this),this.type="Sprite",Cr===void 0){Cr=new Lt;var e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);e=new Ge(e,5),Cr.setIndex([0,1,2,0,2,3]),Cr.addAttribute("position",new He(e,3,0,!1)),Cr.addAttribute("uv",new He(e,2,3,!1))}this.geometry=Cr,this.material=t!==void 0?t:new We,this.center=new $(.5,.5)}function ii(){b.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function ai(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),e===void 0)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],t=0,e=this.bones.length;t<e;t++)this.boneInverses.push(new gt)}function hi(){b.call(this),this.type="Bone"}function ke(t,e){Ke.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new gt,this.bindMatrixInverse=new gt,t=this.initBones(),t=new ai(t),this.bind(t,this.matrixWorld),this.normalizeSkinWeights()}function Ne(t){fe.call(this),this.type="LineBasicMaterial",this.color=new H(16777215),this.linewidth=1,this.linejoin=this.linecap="round",this.lights=!1,this.setValues(t)}function qe(t,e,i){i===1&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),b.call(this),this.type="Line",this.geometry=t!==void 0?t:new Lt,this.material=e!==void 0?e:new Ne({color:16777215*Math.random()})}function Re(t,e){qe.call(this,t,e),this.type="LineSegments"}function an(t,e){qe.call(this,t,e),this.type="LineLoop"}function xi(t){fe.call(this),this.type="PointsMaterial",this.color=new H(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=this.morphTargets=!1,this.setValues(t)}function nr(t,e){b.call(this),this.type="Points",this.geometry=t!==void 0?t:new Lt,this.material=e!==void 0?e:new xi({color:16777215*Math.random()})}function os(t,e,i,n,r,o,s,a,h){Ot.call(this,t,e,i,n,r,o,s,a,h),this.generateMipmaps=!1}function rr(t,e,i,n,r,o,s,a,h,l,c,u){Ot.call(this,null,o,s,a,h,l,n,r,c,u),this.image={width:e,height:i},this.mipmaps=t,this.generateMipmaps=this.flipY=!1}function Ur(t,e,i,n,r,o,s,a,h){Ot.call(this,t,e,i,n,r,o,s,a,h),this.needsUpdate=!0}function Fr(t,e,i,n,r,o,s,a,h,l){if(l=l!==void 0?l:1026,l!==1026&&l!==1027)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&l===1026&&(i=1012),i===void 0&&l===1027&&(i=1020),Ot.call(this,null,n,r,o,s,a,l,i,h),this.image={width:t,height:e},this.magFilter=s!==void 0?s:1003,this.minFilter=a!==void 0?a:1003,this.generateMipmaps=this.flipY=!1}function or(t){Lt.call(this),this.type="WireframeGeometry";var e=[],i,n,r,o=[0,0],s={},a=["a","b","c"];if(t&&t.isGeometry){var h=t.faces,l=0;for(n=h.length;l<n;l++){var c=h[l];for(i=0;3>i;i++){var u=c[a[i]],d=c[a[(i+1)%3]];o[0]=Math.min(u,d),o[1]=Math.max(u,d),u=o[0]+","+o[1],s[u]===void 0&&(s[u]={index1:o[0],index2:o[1]})}}for(u in s)l=s[u],a=t.vertices[l.index1],e.push(a.x,a.y,a.z),a=t.vertices[l.index2],e.push(a.x,a.y,a.z)}else if(t&&t.isBufferGeometry)if(a=new M,t.index!==null){h=t.attributes.position,c=t.index;var g=t.groups;for(g.length===0&&(g=[{start:0,count:c.count,materialIndex:0}]),t=0,r=g.length;t<r;++t)for(l=g[t],i=l.start,n=l.count,l=i,n=i+n;l<n;l+=3)for(i=0;3>i;i++)u=c.getX(l+i),d=c.getX(l+(i+1)%3),o[0]=Math.min(u,d),o[1]=Math.max(u,d),u=o[0]+","+o[1],s[u]===void 0&&(s[u]={index1:o[0],index2:o[1]});for(u in s)l=s[u],a.fromBufferAttribute(h,l.index1),e.push(a.x,a.y,a.z),a.fromBufferAttribute(h,l.index2),e.push(a.x,a.y,a.z)}else for(h=t.attributes.position,l=0,n=h.count/3;l<n;l++)for(i=0;3>i;i++)s=3*l+i,a.fromBufferAttribute(h,s),e.push(a.x,a.y,a.z),s=3*l+(i+1)%3,a.fromBufferAttribute(h,s),e.push(a.x,a.y,a.z);this.addAttribute("position",new lt(e,3))}function Gr(t,e,i){F.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:i},this.fromBufferGeometry(new sr(t,e,i)),this.mergeVertices()}function sr(t,e,i){Lt.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:i};var n=[],r=[],o=[],s=[],a=new M,h=new M,l=new M,c=new M,u=new M,d,g;3>t.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var w=e+1;for(d=0;d<=i;d++){var S=d/i;for(g=0;g<=e;g++){var P=g/e;t(P,S,h),r.push(h.x,h.y,h.z),0<=P-1e-5?(t(P-1e-5,S,l),c.subVectors(h,l)):(t(P+1e-5,S,l),c.subVectors(l,h)),0<=S-1e-5?(t(P,S-1e-5,l),u.subVectors(h,l)):(t(P,S+1e-5,l),u.subVectors(l,h)),a.crossVectors(c,u).normalize(),o.push(a.x,a.y,a.z),s.push(P,S)}}for(d=0;d<i;d++)for(g=0;g<e;g++)t=d*w+g+1,a=(d+1)*w+g+1,h=(d+1)*w+g,n.push(d*w+g,t,h),n.push(t,a,h);this.setIndex(n),this.addAttribute("position",new lt(r,3)),this.addAttribute("normal",new lt(o,3)),this.addAttribute("uv",new lt(s,2))}function Hr(t,e,i,n){F.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},this.fromBufferGeometry(new Di(t,e,i,n)),this.mergeVertices()}function Di(t,e,i,n){function r(l){a.push(l.x,l.y,l.z)}function o(l,c){l*=3,c.x=t[l+0],c.y=t[l+1],c.z=t[l+2]}function s(l,c,u,d){0>d&&l.x===1&&(h[c]=l.x-1),u.x===0&&u.z===0&&(h[c]=d/2/Math.PI+.5)}Lt.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},i=i||1,n=n||0;var a=[],h=[];(function(l){for(var c=new M,u=new M,d=new M,g=0;g<e.length;g+=3){o(e[g+0],c),o(e[g+1],u),o(e[g+2],d);var w,S,P=c,G=u,N=d,q=Math.pow(2,l),V=[];for(S=0;S<=q;S++){V[S]=[];var ot=P.clone().lerp(N,S/q),T=G.clone().lerp(N,S/q),A=q-S;for(w=0;w<=A;w++)V[S][w]=w===0&&S===q?ot:ot.clone().lerp(T,w/A)}for(S=0;S<q;S++)for(w=0;w<2*(q-S)-1;w++)P=Math.floor(w/2),w%2===0?(r(V[S][P+1]),r(V[S+1][P]),r(V[S][P])):(r(V[S][P+1]),r(V[S+1][P+1]),r(V[S+1][P]))}})(n),function(l){for(var c=new M,u=0;u<a.length;u+=3)c.x=a[u+0],c.y=a[u+1],c.z=a[u+2],c.normalize().multiplyScalar(l),a[u+0]=c.x,a[u+1]=c.y,a[u+2]=c.z}(i),function(){for(var l=new M,c=0;c<a.length;c+=3)l.x=a[c+0],l.y=a[c+1],l.z=a[c+2],h.push(Math.atan2(l.z,-l.x)/2/Math.PI+.5,1-(Math.atan2(-l.y,Math.sqrt(l.x*l.x+l.z*l.z))/Math.PI+.5));l=new M,c=new M;for(var u=new M,d=new M,g=new $,w=new $,S=new $,P=0,G=0;P<a.length;P+=9,G+=6){l.set(a[P+0],a[P+1],a[P+2]),c.set(a[P+3],a[P+4],a[P+5]),u.set(a[P+6],a[P+7],a[P+8]),g.set(h[G+0],h[G+1]),w.set(h[G+2],h[G+3]),S.set(h[G+4],h[G+5]),d.copy(l).add(c).add(u).divideScalar(3);var N=Math.atan2(d.z,-d.x);s(g,G+0,l,N),s(w,G+2,c,N),s(S,G+4,u,N)}for(l=0;l<h.length;l+=6)c=h[l+0],u=h[l+2],d=h[l+4],g=Math.min(c,u,d),.9<Math.max(c,u,d)&&.1>g&&(.2>c&&(h[l+0]+=1),.2>u&&(h[l+2]+=1),.2>d&&(h[l+4]+=1))}(),this.addAttribute("position",new lt(a,3)),this.addAttribute("normal",new lt(a.slice(),3)),this.addAttribute("uv",new lt(h,2)),n===0?this.computeVertexNormals():this.normalizeNormals()}function kr(t,e){F.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new ar(t,e)),this.mergeVertices()}function ar(t,e){Di.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 Vr(t,e){F.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Dn(t,e)),this.mergeVertices()}function Dn(t,e){Di.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 jr(t,e){F.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new hr(t,e)),this.mergeVertices()}function hr(t,e){var i=(1+Math.sqrt(5))/2;Di.call(this,[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],t,e),this.type="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Wr(t,e){F.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lr(t,e)),this.mergeVertices()}function lr(t,e){var i=(1+Math.sqrt(5))/2,n=1/i;Di.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-i,0,-n,i,0,n,-i,0,n,i,-n,-i,0,-n,i,0,n,-i,0,n,i,0,-i,0,-n,i,0,-n,-i,0,n,i,0,n],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Xr(t,e,i,n,r,o){F.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:r},o!==void 0&&console.warn("THREE.TubeGeometry: taper has been removed."),t=new cr(t,e,i,n,r),this.tangents=t.tangents,this.normals=t.normals,this.binormals=t.binormals,this.fromBufferGeometry(t),this.mergeVertices()}function cr(t,e,i,n,r){function o(G){c=t.getPointAt(G/e,c);var N=s.normals[G];for(G=s.binormals[G],d=0;d<=n;d++){var q=d/n*Math.PI*2,V=Math.sin(q);q=-Math.cos(q),h.x=q*N.x+V*G.x,h.y=q*N.y+V*G.y,h.z=q*N.z+V*G.z,h.normalize(),w.push(h.x,h.y,h.z),a.x=c.x+i*h.x,a.y=c.y+i*h.y,a.z=c.z+i*h.z,g.push(a.x,a.y,a.z)}}Lt.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:r},e=e||64,i=i||1,n=n||8,r=r||!1;var s=t.computeFrenetFrames(e,r);this.tangents=s.tangents,this.normals=s.normals,this.binormals=s.binormals;var a=new M,h=new M,l=new $,c=new M,u,d,g=[],w=[],S=[],P=[];for(u=0;u<e;u++)o(u);for(o(r===!1?e:0),u=0;u<=e;u++)for(d=0;d<=n;d++)l.x=u/e,l.y=d/n,S.push(l.x,l.y);(function(){for(d=1;d<=e;d++)for(u=1;u<=n;u++){var G=(n+1)*d+(u-1),N=(n+1)*d+u,q=(n+1)*(d-1)+u;P.push((n+1)*(d-1)+(u-1),G,q),P.push(G,N,q)}})(),this.setIndex(P),this.addAttribute("position",new lt(g,3)),this.addAttribute("normal",new lt(w,3)),this.addAttribute("uv",new lt(S,2))}function qr(t,e,i,n,r,o,s){F.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:r,q:o},s!==void 0&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new ur(t,e,i,n,r,o)),this.mergeVertices()}function ur(t,e,i,n,r,o){function s(T,A,et,yt,ft){var st=Math.sin(T);A=et/A*T,et=Math.cos(A),ft.x=yt*(2+et)*.5*Math.cos(T),ft.y=yt*(2+et)*st*.5,ft.z=yt*Math.sin(A)*.5}Lt.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:r,q:o},t=t||1,e=e||.4,i=Math.floor(i)||64,n=Math.floor(n)||8,r=r||2,o=o||3;var a=[],h=[],l=[],c=[],u,d=new M,g=new M,w=new M,S=new M,P=new M,G=new M,N=new M;for(u=0;u<=i;++u){var q=u/i*r*Math.PI*2;for(s(q,r,o,t,w),s(q+.01,r,o,t,S),G.subVectors(S,w),N.addVectors(S,w),P.crossVectors(G,N),N.crossVectors(P,G),P.normalize(),N.normalize(),q=0;q<=n;++q){var V=q/n*Math.PI*2,ot=-e*Math.cos(V);V=e*Math.sin(V),d.x=w.x+(ot*N.x+V*P.x),d.y=w.y+(ot*N.y+V*P.y),d.z=w.z+(ot*N.z+V*P.z),h.push(d.x,d.y,d.z),g.subVectors(d,w).normalize(),l.push(g.x,g.y,g.z),c.push(u/i),c.push(q/n)}}for(q=1;q<=i;q++)for(u=1;u<=n;u++)t=(n+1)*q+(u-1),e=(n+1)*q+u,r=(n+1)*(q-1)+u,a.push((n+1)*(q-1)+(u-1),t,r),a.push(t,e,r);this.setIndex(a),this.addAttribute("position",new lt(h,3)),this.addAttribute("normal",new lt(l,3)),this.addAttribute("uv",new lt(c,2))}function Yr(t,e,i,n,r){F.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},this.fromBufferGeometry(new pr(t,e,i,n,r)),this.mergeVertices()}function pr(t,e,i,n,r){Lt.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},t=t||1,e=e||.4,i=Math.floor(i)||8,n=Math.floor(n)||6,r=r||2*Math.PI;var o=[],s=[],a=[],h=[],l=new M,c=new M,u=new M,d,g;for(d=0;d<=i;d++)for(g=0;g<=n;g++){var w=g/n*r,S=d/i*Math.PI*2;c.x=(t+e*Math.cos(S))*Math.cos(w),c.y=(t+e*Math.cos(S))*Math.sin(w),c.z=e*Math.sin(S),s.push(c.x,c.y,c.z),l.x=t*Math.cos(w),l.y=t*Math.sin(w),u.subVectors(c,l).normalize(),a.push(u.x,u.y,u.z),h.push(g/n),h.push(d/i)}for(d=1;d<=i;d++)for(g=1;g<=n;g++)t=(n+1)*(d-1)+g-1,e=(n+1)*(d-1)+g,r=(n+1)*d+g,o.push((n+1)*d+g-1,t,r),o.push(t,e,r);this.setIndex(o),this.addAttribute("position",new lt(s,3)),this.addAttribute("normal",new lt(a,3)),this.addAttribute("uv",new lt(h,2))}function Vs(t,e,i,n,r){for(var o,s=0,a=e,h=i-n;a<i;a+=n)s+=(t[h]-t[a])*(t[a+1]+t[h+1]),h=a;if(r===0<s)for(r=e;r<i;r+=n)o=Xs(r,t[r],t[r+1],o);else for(r=i-n;r>=e;r-=n)o=Xs(r,t[r],t[r+1],o);return o&&zn(o,o.next)&&($r(o),o=o.next),o}function Zr(t,e){if(!t)return t;e||(e=t);do{var i=!1;if(t.steiner||!zn(t,t.next)&&bi(t.prev,t,t.next)!==0)t=t.next;else{if($r(t),t=e=t.prev,t===t.next)break;i=!0}}while(i||t!==e);return e}function Jr(t,e,i,n,r,o,s){if(t){if(!s&&o){var a=t,h=a;do h.z===null&&(h.z=ss(h.x,h.y,n,r,o)),h.prevZ=h.prev,h=h.nextZ=h.next;while(h!==a);h.prevZ.nextZ=null,h.prevZ=null,a=h;var l,c,u,d,g=1;do{h=a;var w=a=null;for(c=0;h;){c++;var S=h;for(l=u=0;l<g&&(u++,S=S.nextZ,S);l++);for(d=g;0<u||0<d&&S;)u!==0&&(d===0||!S||h.z<=S.z)?(l=h,h=h.nextZ,u--):(l=S,S=S.nextZ,d--),w?w.nextZ=l:a=l,l.prevZ=w,w=l;h=S}w.nextZ=null,g*=2}while(1<c)}for(a=t;t.prev!==t.next;){if(h=t.prev,S=t.next,o)t:{w=t,d=n;var P=r,G=o;if(c=w.prev,u=w,g=w.next,0<=bi(c,u,g))w=!1;else{var N=c.x>u.x?c.x>g.x?c.x:g.x:u.x>g.x?u.x:g.x,q=c.y>u.y?c.y>g.y?c.y:g.y:u.y>g.y?u.y:g.y;for(l=ss(c.x<u.x?c.x<g.x?c.x:g.x:u.x<g.x?u.x:g.x,c.y<u.y?c.y<g.y?c.y:g.y:u.y<g.y?u.y:g.y,d,P,G),d=ss(N,q,d,P,G),P=w.nextZ;P&&P.z<=d;){if(P!==w.prev&&P!==w.next&&Po(c.x,c.y,u.x,u.y,g.x,g.y,P.x,P.y)&&0<=bi(P.prev,P,P.next)){w=!1;break t}P=P.nextZ}for(P=w.prevZ;P&&P.z>=l;){if(P!==w.prev&&P!==w.next&&Po(c.x,c.y,u.x,u.y,g.x,g.y,P.x,P.y)&&0<=bi(P.prev,P,P.next)){w=!1;break t}P=P.prevZ}w=!0}}else t:if(w=t,c=w.prev,u=w,g=w.next,0<=bi(c,u,g))w=!1;else{for(l=w.next.next;l!==w.prev;){if(Po(c.x,c.y,u.x,u.y,g.x,g.y,l.x,l.y)&&0<=bi(l.prev,l,l.next)){w=!1;break t}l=l.next}w=!0}if(w)e.push(h.i/i),e.push(t.i/i),e.push(S.i/i),$r(t),a=t=S.next;else if(t=S,t===a){if(!s)Jr(Zr(t),e,i,n,r,o,1);else if(s===1){s=e,a=i,h=t;do S=h.prev,w=h.next.next,!zn(S,w)&&js(S,h,h.next,w)&&Qr(S,w)&&Qr(w,S)&&(s.push(S.i/a),s.push(h.i/a),s.push(w.i/a),$r(h),$r(h.next),h=t=w),h=h.next;while(h!==t);t=h,Jr(t,e,i,n,r,o,2)}else if(s===2)t:{s=t;do{for(a=s.next.next;a!==s.prev;){if(h=s.i!==a.i){if(h=s,S=a,w=h.next.i!==S.i&&h.prev.i!==S.i){e:{w=h;do{if(w.i!==h.i&&w.next.i!==h.i&&w.i!==S.i&&w.next.i!==S.i&&js(w,w.next,h,S)){w=!0;break e}w=w.next}while(w!==h);w=!1}w=!w}if(w=w&&Qr(h,S)&&Qr(S,h)){w=h,c=!1,u=(h.x+S.x)/2,S=(h.y+S.y)/2;do w.y>S!=w.next.y>S&&w.next.y!==w.y&&u<(w.next.x-w.x)*(S-w.y)/(w.next.y-w.y)+w.x&&(c=!c),w=w.next;while(w!==h);w=c}h=w}if(h){t=Ws(s,a),s=Zr(s,s.next),t=Zr(t,t.next),Jr(s,e,i,n,r,o),Jr(t,e,i,n,r,o);break t}a=a.next}s=s.next}while(s!==t)}break}}}}function $a(t,e){return t.x-e.x}function Ka(t,e){var i=e,n=t.x,r=t.y,o=-1/0;do{if(r<=i.y&&r>=i.next.y&&i.next.y!==i.y){var s=i.x+(r-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=n&&s>o){if(o=s,s===n){if(r===i.y)return i;if(r===i.next.y)return i.next}var a=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!a)return null;if(n===o)return a.prev;e=a,s=a.x;var h=a.y,l=1/0;for(i=a.next;i!==e;){if(n>=i.x&&i.x>=s&&n!==i.x&&Po(r<h?n:o,r,s,h,r<h?o:n,r,i.x,i.y)){var c=Math.abs(r-i.y)/(n-i.x);(c<l||c===l&&i.x>a.x)&&Qr(i,t)&&(a=i,l=c)}i=i.next}return a}function ss(t,e,i,n,r){return t=32767*(t-i)*r,e=32767*(e-n)*r,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,(t|t<<1)&1431655765|((e|e<<1)&1431655765)<<1}function th(t){var e=t,i=t;do e.x<i.x&&(i=e),e=e.next;while(e!==t);return i}function Po(t,e,i,n,r,o,s,a){return 0<=(r-s)*(e-a)-(t-s)*(o-a)&&0<=(t-s)*(n-a)-(i-s)*(e-a)&&0<=(i-s)*(o-a)-(r-s)*(n-a)}function bi(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function zn(t,e){return t.x===e.x&&t.y===e.y}function js(t,e,i,n){return zn(t,e)&&zn(i,n)||zn(t,n)&&zn(i,e)?!0:0<bi(t,e,i)!=0<bi(t,e,n)&&0<bi(i,n,t)!=0<bi(i,n,e)}function Qr(t,e){return 0>bi(t.prev,t,t.next)?0<=bi(t,e,t.next)&&0<=bi(t,t.prev,e):0>bi(t,e,t.prev)||0>bi(t,t.next,e)}function Ws(t,e){var i=new as(t.i,t.x,t.y),n=new as(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function Xs(t,e,i,n){return t=new as(t,e,i),n?(t.next=n.next,t.prev=n,n.next.prev=t,n.next=t):(t.prev=t,t.next=t),t}function $r(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function as(t,e,i){this.i=t,this.x=e,this.y=i,this.nextZ=this.prevZ=this.z=this.next=this.prev=null,this.steiner=!1}function qs(t){var e=t.length;2<e&&t[e-1].equals(t[0])&&t.pop()}function Ys(t,e){for(var i=0;i<e.length;i++)t.push(e[i].x),t.push(e[i].y)}function Nn(t,e){F.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new hn(t,e)),this.mergeVertices()}function hn(t,e){function i(h){function l(ue,_e,Be){return _e||console.error("THREE.ExtrudeGeometry: vec does not exist"),_e.clone().multiplyScalar(Be).add(ue)}function c(ue,_e,Be){var De=ue.x-_e.x,wt=ue.y-_e.y,xe=Be.x-ue.x,ve=Be.y-ue.y,we=De*De+wt*wt;if(Math.abs(De*ve-wt*xe)>Number.EPSILON){var Bi=Math.sqrt(we),mi=Math.sqrt(xe*xe+ve*ve);if(we=_e.x-wt/Bi,_e=_e.y+De/Bi,ve=((Be.x-ve/mi-we)*ve-(Be.y+xe/mi-_e)*xe)/(De*ve-wt*xe),xe=we+De*ve-ue.x,De=_e+wt*ve-ue.y,wt=xe*xe+De*De,2>=wt)return new $(xe,De);wt=Math.sqrt(wt/2)}else ue=!1,De>Number.EPSILON?xe>Number.EPSILON&&(ue=!0):De<-Number.EPSILON?xe<-Number.EPSILON&&(ue=!0):Math.sign(wt)===Math.sign(ve)&&(ue=!0),ue?(xe=-wt,wt=Math.sqrt(we)):(xe=De,De=wt,wt=Math.sqrt(we/2));return new $(xe/wt,De/wt)}function u(ue,_e){for(qt=ue.length;0<=--qt;){var Be=qt,De=qt-1;0>De&&(De=ue.length-1);var wt,xe=N+2*A;for(wt=0;wt<xe;wt++){var ve=pi*wt,we=pi*(wt+1),Bi=_e+De+ve,mi=_e+De+we;we=_e+Be+we,w(_e+Be+ve),w(Bi),w(we),w(Bi),w(mi),w(we),ve=r.length/3,ve=yt.generateSideWallUV(n,r,ve-6,ve-3,ve-2,ve-1),S(ve[0]),S(ve[1]),S(ve[3]),S(ve[1]),S(ve[2]),S(ve[3])}}}function d(ue,_e,Be){P.push(ue),P.push(_e),P.push(Be)}function g(ue,_e,Be){w(ue),w(_e),w(Be),ue=r.length/3,ue=yt.generateTopUV(n,r,ue-3,ue-2,ue-1),S(ue[0]),S(ue[1]),S(ue[2])}function w(ue){r.push(P[3*ue]),r.push(P[3*ue+1]),r.push(P[3*ue+2])}function S(ue){o.push(ue.x),o.push(ue.y)}var P=[],G=e.curveSegments!==void 0?e.curveSegments:12,N=e.steps!==void 0?e.steps:1,q=e.depth!==void 0?e.depth:100,V=e.bevelEnabled!==void 0?e.bevelEnabled:!0,ot=e.bevelThickness!==void 0?e.bevelThickness:6,T=e.bevelSize!==void 0?e.bevelSize:ot-2,A=e.bevelSegments!==void 0?e.bevelSegments:3,et=e.extrudePath,yt=e.UVGenerator!==void 0?e.UVGenerator:dh;e.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),q=e.amount);var ft=!1;if(et){var st=et.getSpacedPoints(N);ft=!0,V=!1;var Ht=et.computeFrenetFrames(N,!1),It=new M,$t=new M,Xt=new M}V||(T=ot=A=0);var Qt;G=h.extractPoints(G),h=G.shape;var re=G.holes;if(!wn.isClockWise(h)){h=h.reverse();var me=0;for(Qt=re.length;me<Qt;me++){var Ae=re[me];wn.isClockWise(Ae)&&(re[me]=Ae.reverse())}}var fi=wn.triangulateShape(h,re),li=h;for(me=0,Qt=re.length;me<Qt;me++)Ae=re[me],h=h.concat(Ae);var Ye,pi=h.length,ti,Mi=fi.length;G=[];var qt=0,ge=li.length,nt=ge-1;for(Ye=qt+1;qt<ge;qt++,nt++,Ye++)nt===ge&&(nt=0),Ye===ge&&(Ye=0),G[qt]=c(li[qt],li[nt],li[Ye]);et=[];var ye=G.concat();for(me=0,Qt=re.length;me<Qt;me++){Ae=re[me];var Te=[];for(qt=0,ge=Ae.length,nt=ge-1,Ye=qt+1;qt<ge;qt++,nt++,Ye++)nt===ge&&(nt=0),Ye===ge&&(Ye=0),Te[qt]=c(Ae[qt],Ae[nt],Ae[Ye]);et.push(Te),ye=ye.concat(Te)}for(nt=0;nt<A;nt++){ge=nt/A;var Ze=ot*Math.cos(ge*Math.PI/2);for(Ye=T*Math.sin(ge*Math.PI/2),qt=0,ge=li.length;qt<ge;qt++){var Yt=l(li[qt],G[qt],Ye);d(Yt.x,Yt.y,-Ze)}for(me=0,Qt=re.length;me<Qt;me++)for(Ae=re[me],Te=et[me],qt=0,ge=Ae.length;qt<ge;qt++)Yt=l(Ae[qt],Te[qt],Ye),d(Yt.x,Yt.y,-Ze)}for(Ye=T,qt=0;qt<pi;qt++)Yt=V?l(h[qt],ye[qt],Ye):h[qt],ft?($t.copy(Ht.normals[0]).multiplyScalar(Yt.x),It.copy(Ht.binormals[0]).multiplyScalar(Yt.y),Xt.copy(st[0]).add($t).add(It),d(Xt.x,Xt.y,Xt.z)):d(Yt.x,Yt.y,0);for(ge=1;ge<=N;ge++)for(qt=0;qt<pi;qt++)Yt=V?l(h[qt],ye[qt],Ye):h[qt],ft?($t.copy(Ht.normals[ge]).multiplyScalar(Yt.x),It.copy(Ht.binormals[ge]).multiplyScalar(Yt.y),Xt.copy(st[ge]).add($t).add(It),d(Xt.x,Xt.y,Xt.z)):d(Yt.x,Yt.y,q/N*ge);for(nt=A-1;0<=nt;nt--){for(ge=nt/A,Ze=ot*Math.cos(ge*Math.PI/2),Ye=T*Math.sin(ge*Math.PI/2),qt=0,ge=li.length;qt<ge;qt++)Yt=l(li[qt],G[qt],Ye),d(Yt.x,Yt.y,q+Ze);for(me=0,Qt=re.length;me<Qt;me++)for(Ae=re[me],Te=et[me],qt=0,ge=Ae.length;qt<ge;qt++)Yt=l(Ae[qt],Te[qt],Ye),ft?d(Yt.x,Yt.y+st[N-1].y,st[N-1].x+Ze):d(Yt.x,Yt.y,q+Ze)}(function(){var ue=r.length/3;if(V){var _e=0*pi;for(qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[2]+_e,ti[1]+_e,ti[0]+_e);for(_e=pi*(N+2*A),qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[0]+_e,ti[1]+_e,ti[2]+_e)}else{for(qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[2],ti[1],ti[0]);for(qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[0]+pi*N,ti[1]+pi*N,ti[2]+pi*N)}n.addGroup(ue,r.length/3-ue,0)})(),function(){var ue=r.length/3,_e=0;for(u(li,_e),_e+=li.length,me=0,Qt=re.length;me<Qt;me++)Ae=re[me],u(Ae,_e),_e+=Ae.length;n.addGroup(ue,r.length/3-ue,1)}()}Lt.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];for(var n=this,r=[],o=[],s=0,a=t.length;s<a;s++)i(t[s]);this.addAttribute("position",new lt(r,3)),this.addAttribute("uv",new lt(o,2)),this.computeVertexNormals()}function Zs(t,e,i){if(i.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++)i.shapes.push(t[n].uuid);else i.shapes.push(t.uuid);return e.extrudePath!==void 0&&(i.options.extrudePath=e.extrudePath.toJSON()),i}function Kr(t,e){F.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new dr(t,e)),this.mergeVertices()}function dr(t,e){e=e||{};var i=e.font;if(!i||!i.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new F;t=i.generateShapes(t,e.size),e.depth=e.height!==void 0?e.height:50,e.bevelThickness===void 0&&(e.bevelThickness=10),e.bevelSize===void 0&&(e.bevelSize=8),e.bevelEnabled===void 0&&(e.bevelEnabled=!1),hn.call(this,t,e),this.type="TextBufferGeometry"}function to(t,e,i,n,r,o,s){F.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new Bn(t,e,i,n,r,o,s)),this.mergeVertices()}function Bn(t,e,i,n,r,o,s){Lt.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:o,thetaLength:s},t=t||1,e=Math.max(3,Math.floor(e)||8),i=Math.max(2,Math.floor(i)||6),n=n!==void 0?n:0,r=r!==void 0?r:2*Math.PI,o=o!==void 0?o:0,s=s!==void 0?s:Math.PI;var a=o+s,h,l,c=0,u=[],d=new M,g=new M,w=[],S=[],P=[],G=[];for(l=0;l<=i;l++){var N=[],q=l/i;for(h=0;h<=e;h++){var V=h/e;d.x=-t*Math.cos(n+V*r)*Math.sin(o+q*s),d.y=t*Math.cos(o+q*s),d.z=t*Math.sin(n+V*r)*Math.sin(o+q*s),S.push(d.x,d.y,d.z),g.set(d.x,d.y,d.z).normalize(),P.push(g.x,g.y,g.z),G.push(V,1-q),N.push(c++)}u.push(N)}for(l=0;l<i;l++)for(h=0;h<e;h++)t=u[l][h+1],n=u[l][h],r=u[l+1][h],s=u[l+1][h+1],(l!==0||0<o)&&w.push(t,n,s),(l!==i-1||a<Math.PI)&&w.push(n,r,s);this.setIndex(w),this.addAttribute("position",new lt(S,3)),this.addAttribute("normal",new lt(P,3)),this.addAttribute("uv",new lt(G,2))}function eo(t,e,i,n,r,o){F.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:o},this.fromBufferGeometry(new fr(t,e,i,n,r,o)),this.mergeVertices()}function fr(t,e,i,n,r,o){Lt.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:o},t=t||.5,e=e||1,r=r!==void 0?r:0,o=o!==void 0?o:2*Math.PI,i=i!==void 0?Math.max(3,i):8,n=n!==void 0?Math.max(1,n):1;var s=[],a=[],h=[],l=[],c=t,u=(e-t)/n,d=new M,g=new $,w,S;for(w=0;w<=n;w++){for(S=0;S<=i;S++)t=r+S/i*o,d.x=c*Math.cos(t),d.y=c*Math.sin(t),a.push(d.x,d.y,d.z),h.push(0,0,1),g.x=(d.x/e+1)/2,g.y=(d.y/e+1)/2,l.push(g.x,g.y);c+=u}for(w=0;w<n;w++)for(e=w*(i+1),S=0;S<i;S++)t=S+e,r=t+i+1,o=t+i+2,c=t+1,s.push(t,r,c),s.push(r,o,c);this.setIndex(s),this.addAttribute("position",new lt(a,3)),this.addAttribute("normal",new lt(h,3)),this.addAttribute("uv",new lt(l,2))}function io(t,e,i,n){F.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},this.fromBufferGeometry(new mr(t,e,i,n)),this.mergeVertices()}function mr(t,e,i,n){Lt.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=Ee.clamp(n,0,2*Math.PI);var r=[],o=[],s=[],a=1/e,h=new M,l=new $,c;for(c=0;c<=e;c++){var u=i+c*a*n,d=Math.sin(u),g=Math.cos(u);for(u=0;u<=t.length-1;u++)h.x=t[u].x*d,h.y=t[u].y,h.z=t[u].x*g,o.push(h.x,h.y,h.z),l.x=c/e,l.y=u/(t.length-1),s.push(l.x,l.y)}for(c=0;c<e;c++)for(u=0;u<t.length-1;u++)i=u+c*t.length,a=i+t.length,h=i+t.length+1,l=i+1,r.push(i,a,l),r.push(a,h,l);if(this.setIndex(r),this.addAttribute("position",new lt(o,3)),this.addAttribute("uv",new lt(s,2)),this.computeVertexNormals(),n===2*Math.PI)for(n=this.attributes.normal.array,r=new M,o=new M,s=new M,i=e*t.length*3,u=c=0;c<t.length;c++,u+=3)r.x=n[u+0],r.y=n[u+1],r.z=n[u+2],o.x=n[i+u+0],o.y=n[i+u+1],o.z=n[i+u+2],s.addVectors(r,o).normalize(),n[u+0]=n[i+u+0]=s.x,n[u+1]=n[i+u+1]=s.y,n[u+2]=n[i+u+2]=s.z}function Un(t,e){F.call(this),this.type="ShapeGeometry",typeof e=="object"&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new Fn(t,e)),this.mergeVertices()}function Fn(t,e){function i(c){var u,d=r.length/3;c=c.extractPoints(e);var g=c.shape,w=c.holes;if(wn.isClockWise(g)===!1)for(g=g.reverse(),c=0,u=w.length;c<u;c++){var S=w[c];wn.isClockWise(S)===!0&&(w[c]=S.reverse())}var P=wn.triangulateShape(g,w);for(c=0,u=w.length;c<u;c++)S=w[c],g=g.concat(S);for(c=0,u=g.length;c<u;c++)S=g[c],r.push(S.x,S.y,0),o.push(0,0,1),s.push(S.x,S.y);for(c=0,u=P.length;c<u;c++)g=P[c],n.push(g[0]+d,g[1]+d,g[2]+d),h+=3}Lt.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],o=[],s=[],a=0,h=0;if(Array.isArray(t)===!1)i(t);else for(var l=0;l<t.length;l++)i(t[l]),this.addGroup(a,h,l),a+=h,h=0;this.setIndex(n),this.addAttribute("position",new lt(r,3)),this.addAttribute("normal",new lt(o,3)),this.addAttribute("uv",new lt(s,2))}function Js(t,e){if(e.shapes=[],Array.isArray(t))for(var i=0,n=t.length;i<n;i++)e.shapes.push(t[i].uuid);else e.shapes.push(t.uuid);return e}function gr(t,e){Lt.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e};var i=[];e=Math.cos(Ee.DEG2RAD*(e!==void 0?e:1));var n=[0,0],r={},o=["a","b","c"];if(t.isBufferGeometry){var s=new F;s.fromBufferGeometry(t)}else s=t.clone();s.mergeVertices(),s.computeFaceNormals(),t=s.vertices,s=s.faces;for(var a=0,h=s.length;a<h;a++)for(var l=s[a],c=0;3>c;c++){var u=l[o[c]],d=l[o[(c+1)%3]];n[0]=Math.min(u,d),n[1]=Math.max(u,d),u=n[0]+","+n[1],r[u]===void 0?r[u]={index1:n[0],index2:n[1],face1:a,face2:void 0}:r[u].face2=a}for(u in r)n=r[u],(n.face2===void 0||s[n.face1].normal.dot(s[n.face2].normal)<=e)&&(o=t[n.index1],i.push(o.x,o.y,o.z),o=t[n.index2],i.push(o.x,o.y,o.z));this.addAttribute("position",new lt(i,3))}function Gn(t,e,i,n,r,o,s,a){F.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:o,thetaStart:s,thetaLength:a},this.fromBufferGeometry(new vn(t,e,i,n,r,o,s,a)),this.mergeVertices()}function vn(t,e,i,n,r,o,s,a){function h(N){var q,V=new $,ot=new M,T=0,A=N===!0?t:e,et=N===!0?1:-1,yt=w;for(q=1;q<=n;q++)u.push(0,P*et,0),d.push(0,et,0),g.push(.5,.5),w++;var ft=w;for(q=0;q<=n;q++){var st=q/n*a+s,Ht=Math.cos(st);st=Math.sin(st),ot.x=A*st,ot.y=P*et,ot.z=A*Ht,u.push(ot.x,ot.y,ot.z),d.push(0,et,0),V.x=.5*Ht+.5,V.y=.5*st*et+.5,g.push(V.x,V.y),w++}for(q=0;q<n;q++)V=yt+q,ot=ft+q,N===!0?c.push(ot,ot+1,V):c.push(ot+1,ot,V),T+=3;l.addGroup(G,T,N===!0?1:2),G+=T}Lt.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:o,thetaStart:s,thetaLength:a};var l=this;t=t!==void 0?t:1,e=e!==void 0?e:1,i=i||1,n=Math.floor(n)||8,r=Math.floor(r)||1,o=o!==void 0?o:!1,s=s!==void 0?s:0,a=a!==void 0?a:2*Math.PI;var c=[],u=[],d=[],g=[],w=0,S=[],P=i/2,G=0;(function(){var N,q,V=new M,ot=new M,T=0,A=(e-t)/i;for(q=0;q<=r;q++){var et=[],yt=q/r,ft=yt*(e-t)+t;for(N=0;N<=n;N++){var st=N/n,Ht=st*a+s,It=Math.sin(Ht);Ht=Math.cos(Ht),ot.x=ft*It,ot.y=-yt*i+P,ot.z=ft*Ht,u.push(ot.x,ot.y,ot.z),V.set(It,A,Ht).normalize(),d.push(V.x,V.y,V.z),g.push(st,1-yt),et.push(w++)}S.push(et)}for(N=0;N<n;N++)for(q=0;q<r;q++)V=S[q+1][N],ot=S[q+1][N+1],A=S[q][N+1],c.push(S[q][N],V,A),c.push(V,ot,A),T+=6;l.addGroup(G,T,0),G+=T})(),o===!1&&(0<t&&h(!0),0<e&&h(!1)),this.setIndex(c),this.addAttribute("position",new lt(u,3)),this.addAttribute("normal",new lt(d,3)),this.addAttribute("uv",new lt(g,2))}function no(t,e,i,n,r,o,s){Gn.call(this,0,t,e,i,n,r,o,s),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:o,thetaLength:s}}function ro(t,e,i,n,r,o,s){vn.call(this,0,t,e,i,n,r,o,s),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:o,thetaLength:s}}function oo(t,e,i,n){F.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new vr(t,e,i,n)),this.mergeVertices()}function vr(t,e,i,n){Lt.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},t=t||1,e=e!==void 0?Math.max(3,e):8,i=i!==void 0?i:0,n=n!==void 0?n:2*Math.PI;var r=[],o=[],s=[],a=[],h,l=new M,c=new $;o.push(0,0,0),s.push(0,0,1),a.push(.5,.5);var u=0;for(h=3;u<=e;u++,h+=3){var d=i+u/e*n;l.x=t*Math.cos(d),l.y=t*Math.sin(d),o.push(l.x,l.y,l.z),s.push(0,0,1),c.x=(o[h]/t+1)/2,c.y=(o[h+1]/t+1)/2,a.push(c.x,c.y)}for(h=1;h<=e;h++)r.push(h,h+1,0);this.setIndex(r),this.addAttribute("position",new lt(o,3)),this.addAttribute("normal",new lt(s,3)),this.addAttribute("uv",new lt(a,2))}function Hn(t){fe.call(this),this.type="ShadowMaterial",this.color=new H(0),this.transparent=!0,this.setValues(t)}function yr(t){Je.call(this,t),this.type="RawShaderMaterial"}function ln(t){fe.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new H(16777215),this.metalness=this.roughness=.5,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new $(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function kn(t){ln.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoatRoughness=this.clearCoat=0,this.setValues(t)}function Yi(t){fe.call(this),this.type="MeshPhongMaterial",this.color=new H(16777215),this.specular=new H(1118481),this.shininess=30,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new $(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 Vn(t){Yi.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function jn(t){fe.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 Wn(t){fe.call(this),this.type="MeshLambertMaterial",this.color=new H(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function Xn(t){if(fe.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new H(16777215),this.bumpMap=this.map=this.matcap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new $(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.lights=this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t),this.matcap===null){t=document.createElement("canvas"),t.width=1,t.height=1;var e=t.getContext("2d");e.fillStyle="#fff",e.fillRect(0,0,1,1),this.matcap=new THREE.CanvasTexture(t)}}function qn(t){Ne.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}function Hi(t,e,i,n){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=n!==void 0?n:new e.constructor(i),this.sampleValues=e,this.valueSize=i}function Ao(t,e,i,n){Hi.call(this,t,e,i,n),this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function so(t,e,i,n){Hi.call(this,t,e,i,n)}function Lo(t,e,i,n){Hi.call(this,t,e,i,n)}function wi(t,e,i,n){if(t===void 0)throw Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ai.convertArray(e,this.TimeBufferType),this.values=Ai.convertArray(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}function Ro(t,e,i){wi.call(this,t,e,i)}function Co(t,e,i,n){wi.call(this,t,e,i,n)}function _r(t,e,i,n){wi.call(this,t,e,i,n)}function bo(t,e,i,n){Hi.call(this,t,e,i,n)}function ao(t,e,i,n){wi.call(this,t,e,i,n)}function Oo(t,e,i,n){wi.call(this,t,e,i,n)}function xr(t,e,i,n){wi.call(this,t,e,i,n)}function ki(t,e,i){this.name=t,this.tracks=i,this.duration=e!==void 0?e:-1,this.uuid=Ee.generateUUID(),0>this.duration&&this.resetDuration()}function eh(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return _r;case"vector":case"vector2":case"vector3":case"vector4":return xr;case"color":return Co;case"quaternion":return ao;case"bool":case"boolean":return Ro;case"string":return Oo}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function ih(t){if(t.type===void 0)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=eh(t.type);if(t.times===void 0){var i=[],n=[];Ai.flattenJSON(t.keys,i,n,"value"),t.times=i,t.values=n}return e.parse!==void 0?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}function hs(t,e,i){var n=this,r=!1,o=0,s=0,a=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(h){s++,r===!1&&n.onStart!==void 0&&n.onStart(h,o,s),r=!0},this.itemEnd=function(h){o++,n.onProgress!==void 0&&n.onProgress(h,o,s),o===s&&(r=!1,n.onLoad!==void 0)&&n.onLoad()},this.itemError=function(h){n.onError!==void 0&&n.onError(h)},this.resolveURL=function(h){return a?a(h):h},this.setURLModifier=function(h){return a=h,this}}function Xi(t){this.manager=t!==void 0?t:Oi}function Qs(t){this.manager=t!==void 0?t:Oi}function $s(t){this.manager=t!==void 0?t:Oi,this._parser=null}function ls(t){this.manager=t!==void 0?t:Oi,this._parser=null}function ho(t){this.manager=t!==void 0?t:Oi}function cs(t){this.manager=t!==void 0?t:Oi}function Io(t){this.manager=t!==void 0?t:Oi}function pe(){this.type="Curve",this.arcLengthDivisions=200}function Vi(t,e,i,n,r,o,s,a){pe.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=i||1,this.yRadius=n||1,this.aStartAngle=r||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=s||!1,this.aRotation=a||0}function wr(t,e,i,n,r,o){Vi.call(this,t,e,i,i,n,r,o),this.type="ArcCurve"}function us(){var t=0,e=0,i=0,n=0;return{initCatmullRom:function(r,o,s,a,h){r=h*(s-r),a=h*(a-o),t=o,e=r,i=-3*o+3*s-2*r-a,n=2*o-2*s+r+a},initNonuniformCatmullRom:function(r,o,s,a,h,l,c){r=((o-r)/h-(s-r)/(h+l)+(s-o)/l)*l,a=((s-o)/l-(a-o)/(l+c)+(a-s)/c)*l,t=o,e=r,i=-3*o+3*s-2*r-a,n=2*o-2*s+r+a},calc:function(r){var o=r*r;return t+e*r+i*o+n*o*r}}}function Ei(t,e,i,n){pe.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=i||"centripetal",this.tension=n||.5}function Ks(t,e,i,n,r){e=.5*(n-e),r=.5*(r-i);var o=t*t;return(2*i-2*n+e+r)*t*o+(-3*i+3*n-2*e-r)*o+e*t+i}function lo(t,e,i,n){var r=1-t;return r*r*e+2*(1-t)*t*i+t*t*n}function co(t,e,i,n,r){var o=1-t,s=1-t;return o*o*o*e+3*s*s*t*i+3*(1-t)*t*t*n+t*t*t*r}function Zi(t,e,i,n){pe.call(this),this.type="CubicBezierCurve",this.v0=t||new $,this.v1=e||new $,this.v2=i||new $,this.v3=n||new $}function cn(t,e,i,n){pe.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 zi(t,e){pe.call(this),this.type="LineCurve",this.v1=t||new $,this.v2=e||new $}function Ji(t,e){pe.call(this),this.type="LineCurve3",this.v1=t||new M,this.v2=e||new M}function Qi(t,e,i){pe.call(this),this.type="QuadraticBezierCurve",this.v0=t||new $,this.v1=e||new $,this.v2=i||new $}function un(t,e,i){pe.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new M,this.v1=e||new M,this.v2=i||new M}function $i(t){pe.call(this),this.type="SplineCurve",this.points=t||[]}function yn(){pe.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Ki(t){yn.call(this),this.type="Path",this.currentPoint=new $,t&&this.setFromPoints(t)}function Pn(t){Ki.call(this,t),this.uuid=Ee.generateUUID(),this.type="Shape",this.holes=[]}function ri(t,e){b.call(this),this.type="Light",this.color=new H(t),this.intensity=e!==void 0?e:1,this.receiveShadow=void 0}function Do(t,e,i){ri.call(this,t,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(b.DefaultUp),this.updateMatrix(),this.groundColor=new H(e)}function Yn(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new $(512,512),this.map=null,this.matrix=new gt}function zo(){Yn.call(this,new Bt(50,1,.5,500))}function No(t,e,i,n,r,o){ri.call(this,t,e),this.type="SpotLight",this.position.copy(b.DefaultUp),this.updateMatrix(),this.target=new b,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(s){this.intensity=s/Math.PI}}),this.distance=i!==void 0?i:0,this.angle=n!==void 0?n:Math.PI/3,this.penumbra=r!==void 0?r:0,this.decay=o!==void 0?o:1,this.shadow=new zo}function Bo(t,e,i,n){ri.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(r){this.intensity=r/(4*Math.PI)}}),this.distance=i!==void 0?i:0,this.decay=n!==void 0?n:1,this.shadow=new Yn(new Bt(90,1,.5,500))}function uo(t,e,i,n,r,o){Kt.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t!==void 0?t:-1,this.right=e!==void 0?e:1,this.top=i!==void 0?i:1,this.bottom=n!==void 0?n:-1,this.near=r!==void 0?r:.1,this.far=o!==void 0?o:2e3,this.updateProjectionMatrix()}function Uo(){Yn.call(this,new uo(-5,5,5,-5,.5,500))}function Fo(t,e){ri.call(this,t,e),this.type="DirectionalLight",this.position.copy(b.DefaultUp),this.updateMatrix(),this.target=new b,this.shadow=new Uo}function Go(t,e){ri.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function Ho(t,e,i,n){ri.call(this,t,e),this.type="RectAreaLight",this.width=i!==void 0?i:10,this.height=n!==void 0?n:10}function ko(t){this.manager=t!==void 0?t:Oi,this.textures={}}function ps(t){this.manager=t!==void 0?t:Oi}function Mr(){}function Vo(t){typeof t=="boolean"&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=t!==void 0?t:Oi,this.withCredentials=!1}function ds(t){this.manager=t!==void 0?t:Oi,this.resourcePath=""}function fs(t){typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=t!==void 0?t:Oi,this.options=void 0}function ms(){this.type="ShapePath",this.color=new H,this.subPaths=[],this.currentPath=null}function gs(t){this.type="Font",this.data=t}function ta(t){this.manager=t!==void 0?t:Oi}function vs(t){this.manager=t!==void 0?t:Oi}function ea(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Bt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Bt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function po(t,e,i,n){b.call(this),this.type="CubeCamera";var r=new Bt(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new M(1,0,0)),this.add(r);var o=new Bt(90,1,t,e);o.up.set(0,-1,0),o.lookAt(new M(-1,0,0)),this.add(o);var s=new Bt(90,1,t,e);s.up.set(0,0,1),s.lookAt(new M(0,1,0)),this.add(s);var a=new Bt(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new M(0,-1,0)),this.add(a);var h=new Bt(90,1,t,e);h.up.set(0,-1,0),h.lookAt(new M(0,0,1)),this.add(h);var l=new Bt(90,1,t,e);l.up.set(0,-1,0),l.lookAt(new M(0,0,-1)),this.add(l),n=n||{format:1022,magFilter:1006,minFilter:1006},this.renderTarget=new Mt(i,i,n),this.renderTarget.texture.name="CubeCamera",this.update=function(c,u){this.parent===null&&this.updateMatrixWorld();var d=this.renderTarget,g=d.texture.generateMipmaps;d.texture.generateMipmaps=!1,d.activeCubeFace=0,c.render(u,r,d),d.activeCubeFace=1,c.render(u,o,d),d.activeCubeFace=2,c.render(u,s,d),d.activeCubeFace=3,c.render(u,a,d),d.activeCubeFace=4,c.render(u,h,d),d.texture.generateMipmaps=g,d.activeCubeFace=5,c.render(u,l,d),c.setRenderTarget(null)},this.clear=function(c,u,d,g){for(var w=this.renderTarget,S=0;6>S;S++)w.activeCubeFace=S,c.setRenderTarget(w),c.clear(u,d,g);c.setRenderTarget(null)}}function ys(t){this.autoStart=t!==void 0?t:!0,this.elapsedTime=this.oldTime=this.startTime=0,this.running=!1}function _s(){b.call(this),this.type="AudioListener",this.context=zs.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0}function Tr(t){b.call(this),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.offset=this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function xs(t){Tr.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function ws(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=e!==void 0?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function Ms(t,e,i){switch(this.binding=t,this.valueSize=i,t=Float64Array,e){case"quaternion":e=this._slerp;break;case"string":case"bool":t=Array,e=this._select;break;default:e=this._lerp}this.buffer=new t(4*i),this._mixBufferRegion=e,this.referenceCount=this.useCount=this.cumulativeWeight=0}function ia(t,e,i){i=i||Pi.parseTrackName(e),this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function Pi(t,e,i){this.path=e,this.parsedPath=i||Pi.parseTrackName(e),this.node=Pi.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function na(){this.uuid=Ee.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,i=arguments.length;e!==i;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}function ra(t,e,i){this._mixer=t,this._clip=e,this._localRoot=i||null,t=e.tracks,e=t.length,i=Array(e);for(var n={endingStart:2400,endingEnd:2400},r=0;r!==e;++r){var o=t[r].createInterpolant(null);i[r]=o,o.settings=n}this._interpolantSettings=n,this._interpolants=i,this._propertyBindings=Array(e),this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Ts(t){this._root=t,this._initMemoryManager(),this.time=this._accuIndex=0,this.timeScale=1}function jo(t,e){typeof t=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=e),this.value=t}function Ss(){Lt.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Es(t,e,i){Ge.call(this,t,e),this.meshPerAttribute=i||1}function Ps(t,e,i,n){typeof i=="number"&&(n=i,i=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),Y.call(this,t,e,i),this.meshPerAttribute=n||1}function oa(t,e,i,n){this.ray=new Ri(t,e),this.near=i||0,this.far=n||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function sa(t,e){return t.distance-e.distance}function As(t,e,i,n){if(t.visible!==!1&&(t.raycast(e,i),n===!0)){t=t.children,n=0;for(var r=t.length;n<r;n++)As(t[n],e,i,!0)}}function aa(t,e,i){return this.radius=t!==void 0?t:1,this.phi=e!==void 0?e:0,this.theta=i!==void 0?i:0,this}function ha(t,e,i){return this.radius=t!==void 0?t:1,this.theta=e!==void 0?e:0,this.y=i!==void 0?i:0,this}function Ls(t,e){this.min=t!==void 0?t:new $(1/0,1/0),this.max=e!==void 0?e:new $(-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 fo(t){b.call(this),this.material=t,this.render=function(){}}function mo(t,e,i,n){this.object=t,this.size=e!==void 0?e:1,t=i!==void 0?i:16711680,n=n!==void 0?n:1,e=0,(i=this.object.geometry)&&i.isGeometry?e=3*i.faces.length:i&&i.isBufferGeometry&&(e=i.attributes.normal.count),i=new Lt,e=new lt(6*e,3),i.addAttribute("position",e),Re.call(this,i,new Ne({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Sr(t,e){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new Lt,e=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var i=0,n=1;32>i;i++,n++){var r=i/32*Math.PI*2,o=n/32*Math.PI*2;e.push(Math.cos(r),Math.sin(r),1,Math.cos(o),Math.sin(o),1)}t.addAttribute("position",new lt(e,3)),e=new Ne({fog:!1}),this.cone=new Re(t,e),this.add(this.cone),this.update()}function la(t){var e=[];t&&t.isBone&&e.push(t);for(var i=0;i<t.children.length;i++)e.push.apply(e,la(t.children[i]));return e}function Er(t){for(var e=la(t),i=new Lt,n=[],r=[],o=new H(0,0,1),s=new H(0,1,0),a=0;a<e.length;a++){var h=e[a];h.parent&&h.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),r.push(o.r,o.g,o.b),r.push(s.r,s.g,s.b))}i.addAttribute("position",new lt(n,3)),i.addAttribute("color",new lt(r,3)),n=new Ne({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0}),Re.call(this,i,n),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Pr(t,e,i){this.light=t,this.light.updateMatrixWorld(),this.color=i,t=new Bn(e,4,2),e=new Ve({wireframe:!0,fog:!1}),Ke.call(this,t,e),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Ar(t,e){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new Ne({fog:!1}),e=new Lt,e.addAttribute("position",new Y(new Float32Array(15),3)),this.line=new qe(e,t),this.add(this.line),this.update()}function Lr(t,e,i){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,t=new Dn(e),t.rotateY(.5*Math.PI),this.material=new Ve({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 Y(e,3)),this.add(new Ke(t,this.material)),this.update()}function go(t,e,i,n){t=t||10,e=e||10,i=new H(i!==void 0?i:4473924),n=new H(n!==void 0?n:8947848);var r=e/2,o=t/e,s=t/2;t=[];for(var a=[],h=0,l=0,c=-s;h<=e;h++,c+=o){t.push(-s,0,c,s,0,c),t.push(c,0,-s,c,0,s);var u=h===r?i:n;u.toArray(a,l),l+=3,u.toArray(a,l),l+=3,u.toArray(a,l),l+=3,u.toArray(a,l),l+=3}e=new Lt,e.addAttribute("position",new lt(t,3)),e.addAttribute("color",new lt(a,3)),i=new Ne({vertexColors:2}),Re.call(this,e,i)}function Wo(t,e,i,n,r,o){t=t||10,e=e||16,i=i||8,n=n||64,r=new H(r!==void 0?r:4473924),o=new H(o!==void 0?o:8947848);var s=[],a=[],h;for(h=0;h<=e;h++){var l=h/e*2*Math.PI,c=Math.sin(l)*t;l=Math.cos(l)*t,s.push(0,0,0),s.push(c,0,l);var u=h&1?r:o;a.push(u.r,u.g,u.b),a.push(u.r,u.g,u.b)}for(h=0;h<=i;h++){u=h&1?r:o;var d=t-t/i*h;for(e=0;e<n;e++)l=e/n*2*Math.PI,c=Math.sin(l)*d,l=Math.cos(l)*d,s.push(c,0,l),a.push(u.r,u.g,u.b),l=(e+1)/n*2*Math.PI,c=Math.sin(l)*d,l=Math.cos(l)*d,s.push(c,0,l),a.push(u.r,u.g,u.b)}t=new Lt,t.addAttribute("position",new lt(s,3)),t.addAttribute("color",new lt(a,3)),s=new Ne({vertexColors:2}),Re.call(this,t,s)}function vo(t,e,i,n){this.object=t,this.size=e!==void 0?e:1,t=i!==void 0?i:16776960,n=n!==void 0?n:1,e=0,(i=this.object.geometry)&&i.isGeometry?e=i.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead."),i=new Lt,e=new lt(6*e,3),i.addAttribute("position",e),Re.call(this,i,new Ne({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Rr(t,e,i){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,e===void 0&&(e=1),t=new Lt,t.addAttribute("position",new lt([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3)),e=new Ne({fog:!1}),this.lightPlane=new qe(t,e),this.add(this.lightPlane),t=new Lt,t.addAttribute("position",new lt([0,0,0,0,0,1],3)),this.targetLine=new qe(t,e),this.add(this.targetLine),this.update()}function yo(t){function e(g,w,S){i(g,S),i(w,S)}function i(g,w){o.push(0,0,0),s.push(w.r,w.g,w.b),a[g]===void 0&&(a[g]=[]),a[g].push(o.length/3-1)}var n=new Lt,r=new Ne({color:16777215,vertexColors:1}),o=[],s=[],a={},h=new H(16755200),l=new H(16711680),c=new H(43775),u=new H(16777215),d=new H(3355443);e("n1","n2",h),e("n2","n4",h),e("n4","n3",h),e("n3","n1",h),e("f1","f2",h),e("f2","f4",h),e("f4","f3",h),e("f3","f1",h),e("n1","f1",h),e("n2","f2",h),e("n3","f3",h),e("n4","f4",h),e("p","n1",l),e("p","n2",l),e("p","n3",l),e("p","n4",l),e("u1","u2",c),e("u2","u3",c),e("u3","u1",c),e("c","t",u),e("p","c",d),e("cn1","cn2",d),e("cn3","cn4",d),e("cf1","cf2",d),e("cf3","cf4",d),n.addAttribute("position",new lt(o,3)),n.addAttribute("color",new lt(s,3)),Re.call(this,n,r),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}function _n(t,e){this.object=t,e===void 0&&(e=16776960),t=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var i=new Float32Array(24),n=new Lt;n.setIndex(new Y(t,1)),n.addAttribute("position",new Y(i,3)),Re.call(this,n,new Ne({color:e})),this.matrixAutoUpdate=!1,this.update()}function _o(t,e){this.type="Box3Helper",this.box=t,t=e!==void 0?e:16776960,e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var i=new Lt;i.setIndex(new Y(e,1)),i.addAttribute("position",new lt([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)),Re.call(this,i,new Ne({color:t})),this.geometry.computeBoundingSphere()}function xo(t,e,i){this.type="PlaneHelper",this.plane=t,this.size=e===void 0?1:e,t=i!==void 0?i:16776960,e=new Lt,e.addAttribute("position",new lt([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),e.computeBoundingSphere(),qe.call(this,e,new Ne({color:t})),e=new Lt,e.addAttribute("position",new lt([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),e.computeBoundingSphere(),this.add(new Ke(e,new Ve({color:t,opacity:.2,transparent:!0,depthWrite:!1})))}function xn(t,e,i,n,r,o){b.call(this),t===void 0&&(t=new THREE.Vector3(0,0,1)),e===void 0&&(e=new THREE.Vector3(0,0,0)),i===void 0&&(i=1),n===void 0&&(n=16776960),r===void 0&&(r=.2*i),o===void 0&&(o=.2*r),Zo===void 0&&(Zo=new Lt,Zo.addAttribute("position",new lt([0,0,0,0,1,0],3)),Ns=new vn(0,.5,1,5,1),Ns.translate(0,-.5,0)),this.position.copy(e),this.line=new qe(Zo,new Ne({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Ke(Ns,new Ve({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,r,o)}function wo(t){t=t||1;var e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t];t=new Lt,t.addAttribute("position",new lt(e,3)),t.addAttribute("color",new lt([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),e=new Ne({vertexColors:2}),Re.call(this,t,e)}function ca(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom",this.closed=!0}function ua(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom"}function Cs(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom"}Number.EPSILON===void 0&&(Number.EPSILON=Math.pow(2,-52)),Number.isInteger===void 0&&(Number.isInteger=function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}),Math.sign===void 0&&(Math.sign=function(t){return 0>t?-1:0<t?1:+t}),!("name"in Function.prototype)&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),Object.assign===void 0&&function(){Object.assign=function(t){if(t==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(n!=null)for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}}(),Object.assign(bt.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 Ee={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;256>e;e++)t[e]=(16>e?"0":"")+e.toString(16);return function(){var i=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,o=4294967295*Math.random()|0;return(t[i&255]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]+"-"+t[n&255]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[r&63|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[o&255]+t[o>>8&255]+t[o>>16&255]+t[o>>24&255]).toUpperCase()}}(),clamp:function(t,e,i){return Math.max(e,Math.min(i,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,i,n,r){return n+(t-e)*(r-n)/(i-e)},lerp:function(t,e,i){return(1-i)*t+i*e},smoothstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*(3-2*t))},smootherstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*t*(t*(6*t-15)+10))},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*Ee.DEG2RAD},radToDeg:function(t){return t*Ee.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,r=this.y-t.y;return this.x=n*i-r*e+t.x,this.y=n*e+r*i+t.y,this}}),Object.assign(gt.prototype,{isMatrix4:!0,set:function(t,e,i,n,r,o,s,a,h,l,c,u,d,g,w,S){var P=this.elements;return P[0]=t,P[4]=e,P[8]=i,P[12]=n,P[1]=r,P[5]=o,P[9]=s,P[13]=a,P[2]=h,P[6]=l,P[10]=c,P[14]=u,P[3]=d,P[7]=g,P[11]=w,P[15]=S,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return new gt().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,r=1/t.setFromMatrixColumn(e,0).length(),o=1/t.setFromMatrixColumn(e,1).length();return e=1/t.setFromMatrixColumn(e,2).length(),i[0]=n[0]*r,i[1]=n[1]*r,i[2]=n[2]*r,i[3]=0,i[4]=n[4]*o,i[5]=n[5]*o,i[6]=n[6]*o,i[7]=0,i[8]=n[8]*e,i[9]=n[9]*e,i[10]=n[10]*e,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}}(),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,i=t.x,n=t.y,r=t.z,o=Math.cos(i);i=Math.sin(i);var s=Math.cos(n);n=Math.sin(n);var a=Math.cos(r);if(r=Math.sin(r),t.order==="XYZ"){t=o*a;var h=o*r,l=i*a,c=i*r;e[0]=s*a,e[4]=-s*r,e[8]=n,e[1]=h+l*n,e[5]=t-c*n,e[9]=-i*s,e[2]=c-t*n,e[6]=l+h*n,e[10]=o*s}else t.order==="YXZ"?(t=s*a,h=s*r,l=n*a,c=n*r,e[0]=t+c*i,e[4]=l*i-h,e[8]=o*n,e[1]=o*r,e[5]=o*a,e[9]=-i,e[2]=h*i-l,e[6]=c+t*i,e[10]=o*s):t.order==="ZXY"?(t=s*a,h=s*r,l=n*a,c=n*r,e[0]=t-c*i,e[4]=-o*r,e[8]=l+h*i,e[1]=h+l*i,e[5]=o*a,e[9]=c-t*i,e[2]=-o*n,e[6]=i,e[10]=o*s):t.order==="ZYX"?(t=o*a,h=o*r,l=i*a,c=i*r,e[0]=s*a,e[4]=l*n-h,e[8]=t*n+c,e[1]=s*r,e[5]=c*n+t,e[9]=h*n-l,e[2]=-n,e[6]=i*s,e[10]=o*s):t.order==="YZX"?(t=o*s,h=o*n,l=i*s,c=i*n,e[0]=s*a,e[4]=c-t*r,e[8]=l*r+h,e[1]=r,e[5]=o*a,e[9]=-i*a,e[2]=-n*a,e[6]=h*r+l,e[10]=t-c*r):t.order==="XZY"&&(t=o*s,h=o*n,l=i*s,c=i*n,e[0]=s*a,e[4]=-r,e[8]=n*a,e[1]=t*r+c,e[5]=o*a,e[9]=h*r-l,e[2]=l*r-h,e[6]=i*a,e[10]=c*r+t);return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(){var t=new 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,r,o){var s=this.elements;return i.subVectors(n,r),i.lengthSq()===0&&(i.z=1),i.normalize(),t.crossVectors(o,i),t.lengthSq()===0&&(Math.abs(o.z)===1?i.x+=1e-4:i.z+=1e-4,i.normalize(),t.crossVectors(o,i)),t.normalize(),e.crossVectors(i,t),s[0]=t.x,s[4]=e.x,s[8]=i.x,s[1]=t.y,s[5]=e.y,s[9]=i.y,s[2]=t.z,s[6]=e.z,s[10]=i.z,this}}(),multiply:function(t,e){return e!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements;e=this.elements,t=i[0];var r=i[4],o=i[8],s=i[12],a=i[1],h=i[5],l=i[9],c=i[13],u=i[2],d=i[6],g=i[10],w=i[14],S=i[3],P=i[7],G=i[11];i=i[15];var N=n[0],q=n[4],V=n[8],ot=n[12],T=n[1],A=n[5],et=n[9],yt=n[13],ft=n[2],st=n[6],Ht=n[10],It=n[14],$t=n[3],Xt=n[7],Qt=n[11];return n=n[15],e[0]=t*N+r*T+o*ft+s*$t,e[4]=t*q+r*A+o*st+s*Xt,e[8]=t*V+r*et+o*Ht+s*Qt,e[12]=t*ot+r*yt+o*It+s*n,e[1]=a*N+h*T+l*ft+c*$t,e[5]=a*q+h*A+l*st+c*Xt,e[9]=a*V+h*et+l*Ht+c*Qt,e[13]=a*ot+h*yt+l*It+c*n,e[2]=u*N+d*T+g*ft+w*$t,e[6]=u*q+d*A+g*st+w*Xt,e[10]=u*V+d*et+g*Ht+w*Qt,e[14]=u*ot+d*yt+g*It+w*n,e[3]=S*N+P*T+G*ft+i*$t,e[7]=S*q+P*A+G*st+i*Xt,e[11]=S*V+P*et+G*Ht+i*Qt,e[15]=S*ot+P*yt+G*It+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],r=t[12],o=t[1],s=t[5],a=t[9],h=t[13],l=t[2],c=t[6],u=t[10],d=t[14];return t[3]*(+r*a*c-n*h*c-r*s*u+i*h*u+n*s*d-i*a*d)+t[7]*(+e*a*d-e*h*u+r*o*u-n*o*d+n*h*l-r*a*l)+t[11]*(+e*h*c-e*s*d-r*o*c+i*o*d+r*s*l-i*h*l)+t[15]*(-n*s*l-e*a*c+e*s*u+n*o*c-i*o*u+i*a*l)},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var i=this.elements,n=t.elements;t=n[0];var r=n[1],o=n[2],s=n[3],a=n[4],h=n[5],l=n[6],c=n[7],u=n[8],d=n[9],g=n[10],w=n[11],S=n[12],P=n[13],G=n[14];n=n[15];var N=d*G*c-P*g*c+P*l*w-h*G*w-d*l*n+h*g*n,q=S*g*c-u*G*c-S*l*w+a*G*w+u*l*n-a*g*n,V=u*P*c-S*d*c+S*h*w-a*P*w-u*h*n+a*d*n,ot=S*d*l-u*P*l-S*h*g+a*P*g+u*h*G-a*d*G,T=t*N+r*q+o*V+s*ot;if(T===0){if(e===!0)throw Error("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/T,i[0]=N*e,i[1]=(P*g*s-d*G*s-P*o*w+r*G*w+d*o*n-r*g*n)*e,i[2]=(h*G*s-P*l*s+P*o*c-r*G*c-h*o*n+r*l*n)*e,i[3]=(d*l*s-h*g*s-d*o*c+r*g*c+h*o*w-r*l*w)*e,i[4]=q*e,i[5]=(u*G*s-S*g*s+S*o*w-t*G*w-u*o*n+t*g*n)*e,i[6]=(S*l*s-a*G*s-S*o*c+t*G*c+a*o*n-t*l*n)*e,i[7]=(a*g*s-u*l*s+u*o*c-t*g*c-a*o*w+t*l*w)*e,i[8]=V*e,i[9]=(S*d*s-u*P*s-S*r*w+t*P*w+u*r*n-t*d*n)*e,i[10]=(a*P*s-S*h*s+S*r*c-t*P*c-a*r*n+t*h*n)*e,i[11]=(u*h*s-a*d*s-u*r*c+t*d*c+a*r*w-t*h*w)*e,i[12]=ot*e,i[13]=(u*P*o-S*d*o+S*r*g-t*P*g-u*r*G+t*d*G)*e,i[14]=(S*h*o-a*P*o-S*r*l+t*P*l+a*r*G-t*h*G)*e,i[15]=(a*d*o-u*h*o+u*r*l-t*d*l-a*r*g+t*h*g)*e,this},scale:function(t){var e=this.elements,i=t.x,n=t.y;return t=t.z,e[0]*=i,e[4]*=n,e[8]*=t,e[1]*=i,e[5]*=n,e[9]*=t,e[2]*=i,e[6]*=n,e[10]*=t,e[3]*=i,e[7]*=n,e[11]*=t,this},getMaxScaleOnAxis:function(){var t=this.elements;return Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1]+t[2]*t[2],t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))},makeTranslation:function(t,e,i){return this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(1,0,0,0,0,e,-t,0,0,t,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,0,t,0,0,1,0,0,-t,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,-t,0,0,t,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var i=Math.cos(e);e=Math.sin(e);var n=1-i,r=t.x,o=t.y;t=t.z;var s=n*r,a=n*o;return this.set(s*r+i,s*o-e*t,s*t+e*o,0,s*o+e*t,a*o+i,a*t-e*r,0,s*t-e*o,a*t+e*r,n*t*t+i,0,0,0,0,1),this},makeScale:function(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this},makeShear:function(t,e,i){return this.set(1,e,i,0,t,1,i,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,i){var n=this.elements,r=e._x,o=e._y,s=e._z,a=e._w,h=r+r,l=o+o,c=s+s;e=r*h;var u=r*l;r*=c;var d=o*l;o*=c,s*=c,h*=a,l*=a,a*=c,c=i.x;var g=i.y;return i=i.z,n[0]=(1-(d+s))*c,n[1]=(u+a)*c,n[2]=(r-l)*c,n[3]=0,n[4]=(u-a)*g,n[5]=(1-(e+s))*g,n[6]=(o+h)*g,n[7]=0,n[8]=(r+l)*i,n[9]=(o-h)*i,n[10]=(1-(e+d))*i,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this},decompose:function(){var t=new M,e=new gt;return function(i,n,r){var o=this.elements,s=t.set(o[0],o[1],o[2]).length(),a=t.set(o[4],o[5],o[6]).length(),h=t.set(o[8],o[9],o[10]).length();0>this.determinant()&&(s=-s),i.x=o[12],i.y=o[13],i.z=o[14],e.copy(this),i=1/s,o=1/a;var l=1/h;return e.elements[0]*=i,e.elements[1]*=i,e.elements[2]*=i,e.elements[4]*=o,e.elements[5]*=o,e.elements[6]*=o,e.elements[8]*=l,e.elements[9]*=l,e.elements[10]*=l,n.setFromRotationMatrix(e),r.x=s,r.y=a,r.z=h,this}}(),makePerspective:function(t,e,i,n,r,o){o===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var s=this.elements;return s[0]=2*r/(e-t),s[4]=0,s[8]=(e+t)/(e-t),s[12]=0,s[1]=0,s[5]=2*r/(i-n),s[9]=(i+n)/(i-n),s[13]=0,s[2]=0,s[6]=0,s[10]=-(o+r)/(o-r),s[14]=-2*o*r/(o-r),s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this},makeOrthographic:function(t,e,i,n,r,o){var s=this.elements,a=1/(e-t),h=1/(i-n),l=1/(o-r);return s[0]=2*a,s[4]=0,s[8]=0,s[12]=-((e+t)*a),s[1]=0,s[5]=2*h,s[9]=0,s[13]=-((i+n)*h),s[2]=0,s[6]=0,s[10]=-2*l,s[14]=-((o+r)*l),s[3]=0,s[7]=0,s[11]=0,s[15]=1,this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;16>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;16>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}),Object.assign(at,{slerp:function(t,e,i,n){return i.copy(t).slerp(e,n)},slerpFlat:function(t,e,i,n,r,o,s){var a=i[n+0],h=i[n+1],l=i[n+2];i=i[n+3],n=r[o+0];var c=r[o+1],u=r[o+2];if(r=r[o+3],i!==r||a!==n||h!==c||l!==u){o=1-s;var d=a*n+h*c+l*u+i*r,g=0<=d?1:-1,w=1-d*d;w>Number.EPSILON&&(w=Math.sqrt(w),d=Math.atan2(w,d*g),o=Math.sin(o*d)/w,s=Math.sin(s*d)/w),g*=s,a=a*o+n*g,h=h*o+c*g,l=l*o+u*g,i=i*o+r*g,o===1-s&&(s=1/Math.sqrt(a*a+h*h+l*l+i*i),a*=s,h*=s,l*=s,i*=s)}t[e]=a,t[e+1]=h,t[e+2]=l,t[e+3]=i}}),Object.defineProperties(at.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(at.prototype,{isQuaternion:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var i=t._x,n=t._y,r=t._z;t=t.order;var o=Math.cos,s=Math.sin,a=o(i/2),h=o(n/2);return o=o(r/2),i=s(i/2),n=s(n/2),r=s(r/2),t==="XYZ"?(this._x=i*h*o+a*n*r,this._y=a*n*o-i*h*r,this._z=a*h*r+i*n*o,this._w=a*h*o-i*n*r):t==="YXZ"?(this._x=i*h*o+a*n*r,this._y=a*n*o-i*h*r,this._z=a*h*r-i*n*o,this._w=a*h*o+i*n*r):t==="ZXY"?(this._x=i*h*o-a*n*r,this._y=a*n*o+i*h*r,this._z=a*h*r+i*n*o,this._w=a*h*o-i*n*r):t==="ZYX"?(this._x=i*h*o-a*n*r,this._y=a*n*o+i*h*r,this._z=a*h*r-i*n*o,this._w=a*h*o+i*n*r):t==="YZX"?(this._x=i*h*o+a*n*r,this._y=a*n*o+i*h*r,this._z=a*h*r-i*n*o,this._w=a*h*o-i*n*r):t==="XZY"&&(this._x=i*h*o-a*n*r,this._y=a*n*o-i*h*r,this._z=a*h*r+i*n*o,this._w=a*h*o+i*n*r),e!==!1&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){e/=2;var i=Math.sin(e);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(e),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e=t.elements,i=e[0];t=e[4];var n=e[8],r=e[1],o=e[5],s=e[9],a=e[2],h=e[6];e=e[10];var l=i+o+e;return 0<l?(i=.5/Math.sqrt(l+1),this._w=.25/i,this._x=(h-s)*i,this._y=(n-a)*i,this._z=(r-t)*i):i>o&&i>e?(i=2*Math.sqrt(1+i-o-e),this._w=(h-s)/i,this._x=.25*i,this._y=(t+r)/i,this._z=(n+a)/i):o>e?(i=2*Math.sqrt(1+o-i-e),this._w=(n-a)/i,this._x=(t+r)/i,this._y=.25*i,this._z=(s+h)/i):(i=2*Math.sqrt(1+e-i-o),this._w=(r-t)/i,this._x=(n+a)/i,this._y=(s+h)/i,this._z=.25*i),this.onChangeCallback(),this},setFromUnitVectors:function(){var t=new 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(Ee.clamp(this.dot(t),-1,1)))},rotateTowards:function(t,e){var i=this.angleTo(t);return i===0?this:(this.slerp(t,Math.min(1,e/i)),this)},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return t===0?(this._z=this._y=this._x=0,this._w=1):(t=1/t,this._x*=t,this._y*=t,this._z*=t,this._w*=t),this.onChangeCallback(),this},multiply:function(t,e){return e!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var i=t._x,n=t._y,r=t._z;t=t._w;var o=e._x,s=e._y,a=e._z;return e=e._w,this._x=i*e+t*o+n*a-r*s,this._y=n*e+t*s+r*o-i*a,this._z=r*e+t*a+i*s-n*o,this._w=t*e-i*o-n*s-r*a,this.onChangeCallback(),this},slerp:function(t,e){if(e===0)return this;if(e===1)return this.copy(t);var i=this._x,n=this._y,r=this._z,o=this._w,s=o*t._w+i*t._x+n*t._y+r*t._z;if(0>s?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),1<=s)return this._w=o,this._x=i,this._y=n,this._z=r,this;if(t=1-s*s,t<=Number.EPSILON)return s=1-e,this._w=s*o+e*this._w,this._x=s*i+e*this._x,this._y=s*n+e*this._y,this._z=s*r+e*this._z,this.normalize();t=Math.sqrt(t);var a=Math.atan2(t,s);return s=Math.sin((1-e)*a)/t,e=Math.sin(e*a)/t,this._w=o*s+this._w*e,this._x=i*s+this._x*e,this._y=n*s+this._y*e,this._z=r*s+this._z*e,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return e===void 0&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(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 at;return function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(t.setFromEuler(e))}}(),applyAxisAngle:function(){var t=new at;return function(e,i){return this.applyQuaternion(t.setFromAxisAngle(e,i))}}(),applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[3]*i+t[6]*n,this.y=t[1]*e+t[4]*i+t[7]*n,this.z=t[2]*e+t[5]*i+t[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z;t=t.elements;var r=1/(t[3]*e+t[7]*i+t[11]*n+t[15]);return this.x=(t[0]*e+t[4]*i+t[8]*n+t[12])*r,this.y=(t[1]*e+t[5]*i+t[9]*n+t[13])*r,this.z=(t[2]*e+t[6]*i+t[10]*n+t[14])*r,this},applyQuaternion:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,o=t.y,s=t.z;t=t.w;var a=t*e+o*n-s*i,h=t*i+s*e-r*n,l=t*n+r*i-o*e;return e=-r*e-o*i-s*n,this.x=a*t+e*-r+h*-s-l*-o,this.y=h*t+e*-o+l*-r-a*-s,this.z=l*t+e*-s+a*-o-h*-r,this},project:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)},unproject:function(){var t=new gt;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 r=e.x,o=e.y;return e=e.z,this.x=n*e-t*o,this.y=t*r-i*e,this.z=i*o-n*r,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new 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(Ee.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(_t.prototype,{isMatrix3:!0,set:function(t,e,i,n,r,o,s,a,h){var l=this.elements;return l[0]=t,l[1]=n,l[2]=s,l[3]=e,l[4]=r,l[5]=a,l[6]=i,l[7]=o,l[8]=h,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return new this.constructor().fromArray(this.elements)},copy:function(t){var e=this.elements;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},setFromMatrix4:function(t){return t=t.elements,this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(){var t=new 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 r=i[3],o=i[6],s=i[1],a=i[4],h=i[7],l=i[2],c=i[5];i=i[8];var u=n[0],d=n[3],g=n[6],w=n[1],S=n[4],P=n[7],G=n[2],N=n[5];return n=n[8],e[0]=t*u+r*w+o*G,e[3]=t*d+r*S+o*N,e[6]=t*g+r*P+o*n,e[1]=s*u+a*w+h*G,e[4]=s*d+a*S+h*N,e[7]=s*g+a*P+h*n,e[2]=l*u+c*w+i*G,e[5]=l*d+c*S+i*N,e[8]=l*g+c*P+i*n,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],i=t[1],n=t[2],r=t[3],o=t[4],s=t[5],a=t[6],h=t[7];return t=t[8],e*o*t-e*s*h-i*r*t+i*s*a+n*r*h-n*o*a},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var i=t.elements;t=this.elements;var n=i[0],r=i[1],o=i[2],s=i[3],a=i[4],h=i[5],l=i[6],c=i[7];i=i[8];var u=i*a-h*c,d=h*l-i*s,g=c*s-a*l,w=n*u+r*d+o*g;if(w===0){if(e===!0)throw Error("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/w,t[0]=u*e,t[1]=(o*c-i*r)*e,t[2]=(h*r-o*a)*e,t[3]=d*e,t[4]=(i*n-o*l)*e,t[5]=(o*s-h*n)*e,t[6]=g*e,t[7]=(r*l-c*n)*e,t[8]=(a*n-r*s)*e,this},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},setUvTransform:function(t,e,i,n,r,o,s){var a=Math.cos(r);r=Math.sin(r),this.set(i*a,i*r,-i*(a*o+r*s)+o+t,-n*r,n*a,-n*(-r*o+a*s)+s+e,0,0,1)},scale:function(t,e){var i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=e,i[4]*=e,i[7]*=e,this},rotate:function(t){var e=Math.cos(t);t=Math.sin(t);var i=this.elements,n=i[0],r=i[3],o=i[6],s=i[1],a=i[4],h=i[7];return i[0]=e*n+t*s,i[3]=e*r+t*a,i[6]=e*o+t*h,i[1]=-t*n+e*s,i[4]=-t*r+e*a,i[7]=-t*o+e*h,this},translate:function(t,e){var i=this.elements;return i[0]+=t*i[2],i[3]+=t*i[5],i[6]+=t*i[8],i[1]+=e*i[2],i[4]+=e*i[5],i[7]+=e*i[8],this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;9>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;9>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}});var An={getDataURL:function(t){if(typeof HTMLCanvasElement>"u")return t.src;if(t instanceof HTMLCanvasElement)var e=t;else{e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),e.width=t.width,e.height=t.height;var i=e.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height)}return 2048<e.width||2048<e.height?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}},nh=0;Ot.DEFAULT_IMAGE=void 0,Ot.DEFAULT_MAPPING=300,Ot.prototype=Object.assign(Object.create(bt.prototype),{constructor:Ot,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=Ee.generateUUID()),!e&&t.images[n.uuid]===void 0){if(Array.isArray(n))for(var r=[],o=0,s=n.length;o<s;o++)r.push(An.getDataURL(n[o]));else r=An.getDataURL(n);t.images[n.uuid]={uuid:n.uuid,url:r}}i.image=n.uuid}return e||(t.textures[this.uuid]=i),i},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping!==300)return t;if(t.applyMatrix3(this.matrix),0>t.x||1<t.x)switch(this.wrapS){case 1e3:t.x-=Math.floor(t.x);break;case 1001:t.x=0>t.x?0:1;break;case 1002:t.x=Math.abs(Math.floor(t.x)%2)===1?Math.ceil(t.x)-t.x:t.x-Math.floor(t.x)}if(0>t.y||1<t.y)switch(this.wrapT){case 1e3:t.y-=Math.floor(t.y);break;case 1001:t.y=0>t.y?0:1;break;case 1002:t.y=Math.abs(Math.floor(t.y)%2)===1?Math.ceil(t.y)-t.y:t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}}),Object.defineProperty(Ot.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(Z.prototype,{isVector4:!0,set:function(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this},setScalar:function(t){return this.w=this.z=this.y=this.x=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this},add:function(t,e){return e!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return e!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=this.w;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n+t[12]*r,this.y=t[1]*e+t[5]*i+t[9]*n+t[13]*r,this.z=t[2]*e+t[6]*i+t[10]*n+t[14]*r,this.w=t[3]*e+t[7]*i+t[11]*n+t[15]*r,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return 1e-4>e?(this.x=1,this.z=this.y=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){t=t.elements;var e=t[0],i=t[4],n=t[8],r=t[1],o=t[5],s=t[9],a=t[2],h=t[6],l=t[10];return .01>Math.abs(i-r)&&.01>Math.abs(n-a)&&.01>Math.abs(s-h)?.1>Math.abs(i+r)&&.1>Math.abs(n+a)&&.1>Math.abs(s+h)&&.1>Math.abs(e+o+l-3)?(this.set(1,0,0,0),this):(t=Math.PI,e=(e+1)/2,o=(o+1)/2,l=(l+1)/2,i=(i+r)/4,n=(n+a)/4,s=(s+h)/4,e>o&&e>l?.01>e?(h=0,i=a=.707106781):(h=Math.sqrt(e),a=i/h,i=n/h):o>l?.01>o?(h=.707106781,a=0,i=.707106781):(a=Math.sqrt(o),h=i/a,i=s/a):.01>l?(a=h=.707106781,i=0):(i=Math.sqrt(l),h=n/i,a=s/i),this.set(h,a,i,t),this):(t=Math.sqrt((h-s)*(h-s)+(n-a)*(n-a)+(r-i)*(r-i)),.001>Math.abs(t)&&(t=1),this.x=(h-s)/t,this.y=(n-a)/t,this.z=(r-i)/t,this.w=Math.acos((e+o+l-1)/2),this)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(i,n){return t===void 0&&(t=new Z,e=new Z),t.set(i,i,i,i),e.set(n,n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return e===void 0&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,i){return i!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),ht.prototype=Object.assign(Object.create(bt.prototype),{constructor:ht,isWebGLRenderTarget:!0,setSize:function(t,e){(this.width!==t||this.height!==e)&&(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Mt.prototype=Object.create(ht.prototype),Mt.prototype.constructor=Mt,Mt.prototype.isWebGLRenderTargetCube=!0,ct.prototype=Object.create(Ot.prototype),ct.prototype.constructor=ct,ct.prototype.isDataTexture=!0,Object.assign(Rt.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,i=1/0,n=1/0,r=-1/0,o=-1/0,s=-1/0,a=0,h=t.length;a<h;a+=3){var l=t[a],c=t[a+1],u=t[a+2];l<e&&(e=l),c<i&&(i=c),u<n&&(n=u),l>r&&(r=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(e,i,n),this.max.set(r,o,s),this},setFromBufferAttribute:function(t){for(var e=1/0,i=1/0,n=1/0,r=-1/0,o=-1/0,s=-1/0,a=0,h=t.count;a<h;a++){var l=t.getX(a),c=t.getY(a),u=t.getZ(a);l<e&&(e=l),c<i&&(i=c),u<n&&(n=u),l>r&&(r=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(e,i,n),this.max.set(r,o,s),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new 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(o){var s=o.geometry;if(s!==void 0){if(s.isGeometry)for(s=s.vertices,i=0,n=s.length;i<n;i++)r.copy(s[i]),r.applyMatrix4(o.matrixWorld),e.expandByPoint(r);else if(s.isBufferGeometry&&(s=s.attributes.position,s!==void 0))for(i=0,n=s.count;i<n;i++)r.fromBufferAttribute(s,i).applyMatrix4(o.matrixWorld),e.expandByPoint(r)}}var e,i,n,r=new M;return function(o){return e=this,o.updateMatrixWorld(!0),o.traverse(t),this}}(),containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new 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(u){var d,g=0;for(d=u.length-3;g<=d;g+=3){a.fromArray(u,g);var w=l.x*Math.abs(a.x)+l.y*Math.abs(a.y)+l.z*Math.abs(a.z),S=e.dot(a),P=i.dot(a),G=n.dot(a);if(Math.max(-Math.max(S,P,G),Math.min(S,P,G))>w)return!1}return!0}var e=new M,i=new M,n=new M,r=new M,o=new M,s=new M,a=new M,h=new M,l=new M,c=new M;return function(u){return this.isEmpty()||(this.getCenter(h),l.subVectors(this.max,h),e.subVectors(u.a,h),i.subVectors(u.b,h),n.subVectors(u.c,h),r.subVectors(i,e),o.subVectors(n,i),s.subVectors(e,n),u=[0,-r.z,r.y,0,-o.z,o.y,0,-s.z,s.y,r.z,0,-r.x,o.z,0,-o.x,s.z,0,-s.x,-r.y,r.x,0,-o.y,o.x,0,-s.y,s.x,0],!t(u))||(u=[1,0,0,0,1,0,0,0,1],!t(u))?!1:(c.crossVectors(r,o),u=[c.x,c.y,c.z],t(u))}}(),clampPoint:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new 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 zt),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(zt.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new Rt;return function(e,i){var n=this.center;i!==void 0?n.copy(i):t.setFromPoints(e).getCenter(n);for(var r=i=0,o=e.length;r<o;r++)i=Math.max(i,n.distanceToSquared(e[r]));return this.radius=Math.sqrt(i),this}}(),clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return 0>=this.radius},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var i=this.center.distanceToSquared(t);return e===void 0&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new 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 Rt),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(mt.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,r){return n=t.subVectors(r,n).cross(e.subVectors(i,n)).normalize(),this.setFromNormalAndCoplanarPoint(n,i),this}}(),clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return e===void 0&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new 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),r=this.normal.dot(n);if(r===0){if(this.distanceToPoint(e.start)===0)return i.copy(e.start)}else if(r=-(e.start.dot(this.normal)+this.constant)/r,!(0>r||1<r))return i.copy(n).multiplyScalar(r).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start);return t=this.distanceToPoint(t.end),0>e&&0<t||0>t&&0<e},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return t===void 0&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new M),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new M,e=new _t;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(K.prototype,{set:function(t,e,i,n,r,o){var s=this.planes;return s[0].copy(t),s[1].copy(e),s[2].copy(i),s[3].copy(n),s[4].copy(r),s[5].copy(o),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){for(var e=this.planes,i=0;6>i;i++)e[i].copy(t.planes[i]);return this},setFromMatrix:function(t){var e=this.planes,i=t.elements;t=i[0];var n=i[1],r=i[2],o=i[3],s=i[4],a=i[5],h=i[6],l=i[7],c=i[8],u=i[9],d=i[10],g=i[11],w=i[12],S=i[13],P=i[14];return i=i[15],e[0].setComponents(o-t,l-s,g-c,i-w).normalize(),e[1].setComponents(o+t,l+s,g+c,i+w).normalize(),e[2].setComponents(o+n,l+a,g+u,i+S).normalize(),e[3].setComponents(o-n,l-a,g-u,i-S).normalize(),e[4].setComponents(o-r,l-h,g-d,i-P).normalize(),e[5].setComponents(o+r,l+h,g+d,i+P).normalize(),this},intersectsObject:function(){var t=new zt;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 zt;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 r=i[n];if(t.x=0<r.normal.x?e.max.x:e.min.x,t.y=0<r.normal.y?e.max.y:e.min.y,t.z=0<r.normal.z?e.max.z:e.min.z,0>r.distanceToPoint(t))return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,i=0;6>i;i++)if(0>e[i].distanceToPoint(t))return!1;return!0}});var Ie={alphamap_fragment:`#ifdef USE_ALPHAMAP
|
|
286
|
+
diffuseColor.a *= texture2D( alphaMap, vUv ).g;
|
|
287
|
+
#endif
|
|
288
|
+
`,alphamap_pars_fragment:`#ifdef USE_ALPHAMAP
|
|
289
|
+
uniform sampler2D alphaMap;
|
|
290
|
+
#endif
|
|
291
|
+
`,alphatest_fragment:`#ifdef ALPHATEST
|
|
292
|
+
if ( diffuseColor.a < ALPHATEST ) discard;
|
|
293
|
+
#endif
|
|
294
|
+
`,aomap_fragment:`#ifdef USE_AOMAP
|
|
295
|
+
float ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;
|
|
296
|
+
reflectedLight.indirectDiffuse *= ambientOcclusion;
|
|
297
|
+
#if defined( USE_ENVMAP ) && defined( PHYSICAL )
|
|
298
|
+
float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );
|
|
299
|
+
reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );
|
|
300
|
+
#endif
|
|
301
|
+
#endif
|
|
302
|
+
`,aomap_pars_fragment:`#ifdef USE_AOMAP
|
|
303
|
+
uniform sampler2D aoMap;
|
|
304
|
+
uniform float aoMapIntensity;
|
|
305
|
+
#endif`,begin_vertex:`
|
|
306
|
+
vec3 transformed = vec3( position );
|
|
307
|
+
`,beginnormal_vertex:`
|
|
308
|
+
vec3 objectNormal = vec3( normal );
|
|
309
|
+
`,bsdfs:`float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
|
|
310
|
+
#if defined ( PHYSICALLY_CORRECT_LIGHTS )
|
|
311
|
+
float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
|
|
312
|
+
if( cutoffDistance > 0.0 ) {
|
|
313
|
+
distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
|
|
314
|
+
}
|
|
315
|
+
return distanceFalloff;
|
|
316
|
+
#else
|
|
317
|
+
if( cutoffDistance > 0.0 && decayExponent > 0.0 ) {
|
|
318
|
+
return pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );
|
|
319
|
+
}
|
|
320
|
+
return 1.0;
|
|
321
|
+
#endif
|
|
322
|
+
}
|
|
323
|
+
vec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {
|
|
324
|
+
return RECIPROCAL_PI * diffuseColor;
|
|
325
|
+
}
|
|
326
|
+
vec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {
|
|
327
|
+
float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );
|
|
328
|
+
return ( 1.0 - specularColor ) * fresnel + specularColor;
|
|
329
|
+
}
|
|
330
|
+
float G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {
|
|
331
|
+
float a2 = pow2( alpha );
|
|
332
|
+
float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
|
|
333
|
+
float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
|
|
334
|
+
return 1.0 / ( gl * gv );
|
|
335
|
+
}
|
|
336
|
+
float G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
|
|
337
|
+
float a2 = pow2( alpha );
|
|
338
|
+
float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
|
|
339
|
+
float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
|
|
340
|
+
return 0.5 / max( gv + gl, EPSILON );
|
|
341
|
+
}
|
|
342
|
+
float D_GGX( const in float alpha, const in float dotNH ) {
|
|
343
|
+
float a2 = pow2( alpha );
|
|
344
|
+
float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
|
|
345
|
+
return RECIPROCAL_PI * a2 / pow2( denom );
|
|
346
|
+
}
|
|
347
|
+
vec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {
|
|
348
|
+
float alpha = pow2( roughness );
|
|
349
|
+
vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );
|
|
350
|
+
float dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );
|
|
351
|
+
float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );
|
|
352
|
+
float dotNH = saturate( dot( geometry.normal, halfDir ) );
|
|
353
|
+
float dotLH = saturate( dot( incidentLight.direction, halfDir ) );
|
|
354
|
+
vec3 F = F_Schlick( specularColor, dotLH );
|
|
355
|
+
float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );
|
|
356
|
+
float D = D_GGX( alpha, dotNH );
|
|
357
|
+
return F * ( G * D );
|
|
358
|
+
}
|
|
359
|
+
vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
|
|
360
|
+
const float LUT_SIZE = 64.0;
|
|
361
|
+
const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
|
|
362
|
+
const float LUT_BIAS = 0.5 / LUT_SIZE;
|
|
363
|
+
float dotNV = saturate( dot( N, V ) );
|
|
364
|
+
vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
|
|
365
|
+
uv = uv * LUT_SCALE + LUT_BIAS;
|
|
366
|
+
return uv;
|
|
367
|
+
}
|
|
368
|
+
float LTC_ClippedSphereFormFactor( const in vec3 f ) {
|
|
369
|
+
float l = length( f );
|
|
370
|
+
return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
|
|
371
|
+
}
|
|
372
|
+
vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
|
|
373
|
+
float x = dot( v1, v2 );
|
|
374
|
+
float y = abs( x );
|
|
375
|
+
float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
|
|
376
|
+
float b = 3.4175940 + ( 4.1616724 + y ) * y;
|
|
377
|
+
float v = a / b;
|
|
378
|
+
float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
|
|
379
|
+
return cross( v1, v2 ) * theta_sintheta;
|
|
380
|
+
}
|
|
381
|
+
vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
|
|
382
|
+
vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
|
|
383
|
+
vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
|
|
384
|
+
vec3 lightNormal = cross( v1, v2 );
|
|
385
|
+
if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
|
|
386
|
+
vec3 T1, T2;
|
|
387
|
+
T1 = normalize( V - N * dot( V, N ) );
|
|
388
|
+
T2 = - cross( N, T1 );
|
|
389
|
+
mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
|
|
390
|
+
vec3 coords[ 4 ];
|
|
391
|
+
coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
|
|
392
|
+
coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
|
|
393
|
+
coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
|
|
394
|
+
coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
|
|
395
|
+
coords[ 0 ] = normalize( coords[ 0 ] );
|
|
396
|
+
coords[ 1 ] = normalize( coords[ 1 ] );
|
|
397
|
+
coords[ 2 ] = normalize( coords[ 2 ] );
|
|
398
|
+
coords[ 3 ] = normalize( coords[ 3 ] );
|
|
399
|
+
vec3 vectorFormFactor = vec3( 0.0 );
|
|
400
|
+
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
|
|
401
|
+
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
|
|
402
|
+
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
|
|
403
|
+
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
|
|
404
|
+
float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
|
|
405
|
+
return vec3( result );
|
|
406
|
+
}
|
|
407
|
+
vec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {
|
|
408
|
+
float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );
|
|
409
|
+
const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
|
|
410
|
+
const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
|
|
411
|
+
vec4 r = roughness * c0 + c1;
|
|
412
|
+
float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
|
|
413
|
+
vec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;
|
|
414
|
+
return specularColor * AB.x + AB.y;
|
|
415
|
+
}
|
|
416
|
+
float G_BlinnPhong_Implicit( ) {
|
|
417
|
+
return 0.25;
|
|
418
|
+
}
|
|
419
|
+
float D_BlinnPhong( const in float shininess, const in float dotNH ) {
|
|
420
|
+
return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
|
|
421
|
+
}
|
|
422
|
+
vec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {
|
|
423
|
+
vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );
|
|
424
|
+
float dotNH = saturate( dot( geometry.normal, halfDir ) );
|
|
425
|
+
float dotLH = saturate( dot( incidentLight.direction, halfDir ) );
|
|
426
|
+
vec3 F = F_Schlick( specularColor, dotLH );
|
|
427
|
+
float G = G_BlinnPhong_Implicit( );
|
|
428
|
+
float D = D_BlinnPhong( shininess, dotNH );
|
|
429
|
+
return F * ( G * D );
|
|
430
|
+
}
|
|
431
|
+
float GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {
|
|
432
|
+
return ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );
|
|
433
|
+
}
|
|
434
|
+
float BlinnExponentToGGXRoughness( const in float blinnExponent ) {
|
|
435
|
+
return sqrt( 2.0 / ( blinnExponent + 2.0 ) );
|
|
436
|
+
}
|
|
437
|
+
`,bumpmap_pars_fragment:`#ifdef USE_BUMPMAP
|
|
438
|
+
uniform sampler2D bumpMap;
|
|
439
|
+
uniform float bumpScale;
|
|
440
|
+
vec2 dHdxy_fwd() {
|
|
441
|
+
vec2 dSTdx = dFdx( vUv );
|
|
442
|
+
vec2 dSTdy = dFdy( vUv );
|
|
443
|
+
float Hll = bumpScale * texture2D( bumpMap, vUv ).x;
|
|
444
|
+
float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;
|
|
445
|
+
float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;
|
|
446
|
+
return vec2( dBx, dBy );
|
|
447
|
+
}
|
|
448
|
+
vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {
|
|
449
|
+
vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );
|
|
450
|
+
vec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );
|
|
451
|
+
vec3 vN = surf_norm;
|
|
452
|
+
vec3 R1 = cross( vSigmaY, vN );
|
|
453
|
+
vec3 R2 = cross( vN, vSigmaX );
|
|
454
|
+
float fDet = dot( vSigmaX, R1 );
|
|
455
|
+
fDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );
|
|
456
|
+
vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
|
|
457
|
+
return normalize( abs( fDet ) * surf_norm - vGrad );
|
|
458
|
+
}
|
|
459
|
+
#endif
|
|
460
|
+
`,clipping_planes_fragment:`#if NUM_CLIPPING_PLANES > 0
|
|
461
|
+
vec4 plane;
|
|
462
|
+
#pragma unroll_loop
|
|
463
|
+
for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
|
|
464
|
+
plane = clippingPlanes[ i ];
|
|
465
|
+
if ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;
|
|
466
|
+
}
|
|
467
|
+
#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
|
|
468
|
+
bool clipped = true;
|
|
469
|
+
#pragma unroll_loop
|
|
470
|
+
for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
|
|
471
|
+
plane = clippingPlanes[ i ];
|
|
472
|
+
clipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;
|
|
473
|
+
}
|
|
474
|
+
if ( clipped ) discard;
|
|
475
|
+
#endif
|
|
476
|
+
#endif
|
|
477
|
+
`,clipping_planes_pars_fragment:`#if NUM_CLIPPING_PLANES > 0
|
|
478
|
+
#if ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )
|
|
479
|
+
varying vec3 vViewPosition;
|
|
480
|
+
#endif
|
|
481
|
+
uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
|
|
482
|
+
#endif
|
|
483
|
+
`,clipping_planes_pars_vertex:`#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )
|
|
484
|
+
varying vec3 vViewPosition;
|
|
485
|
+
#endif
|
|
486
|
+
`,clipping_planes_vertex:`#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )
|
|
487
|
+
vViewPosition = - mvPosition.xyz;
|
|
488
|
+
#endif
|
|
489
|
+
`,color_fragment:`#ifdef USE_COLOR
|
|
490
|
+
diffuseColor.rgb *= vColor;
|
|
491
|
+
#endif`,color_pars_fragment:`#ifdef USE_COLOR
|
|
492
|
+
varying vec3 vColor;
|
|
493
|
+
#endif
|
|
494
|
+
`,color_pars_vertex:`#ifdef USE_COLOR
|
|
495
|
+
varying vec3 vColor;
|
|
496
|
+
#endif`,color_vertex:`#ifdef USE_COLOR
|
|
497
|
+
vColor.xyz = color.xyz;
|
|
498
|
+
#endif`,common:`#define PI 3.14159265359
|
|
499
|
+
#define PI2 6.28318530718
|
|
500
|
+
#define PI_HALF 1.5707963267949
|
|
501
|
+
#define RECIPROCAL_PI 0.31830988618
|
|
502
|
+
#define RECIPROCAL_PI2 0.15915494
|
|
503
|
+
#define LOG2 1.442695
|
|
504
|
+
#define EPSILON 1e-6
|
|
505
|
+
#define saturate(a) clamp( a, 0.0, 1.0 )
|
|
506
|
+
#define whiteCompliment(a) ( 1.0 - saturate( a ) )
|
|
507
|
+
float pow2( const in float x ) { return x*x; }
|
|
508
|
+
float pow3( const in float x ) { return x*x*x; }
|
|
509
|
+
float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
|
|
510
|
+
float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }
|
|
511
|
+
highp float rand( const in vec2 uv ) {
|
|
512
|
+
const highp float a = 12.9898, b = 78.233, c = 43758.5453;
|
|
513
|
+
highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
|
|
514
|
+
return fract(sin(sn) * c);
|
|
515
|
+
}
|
|
516
|
+
struct IncidentLight {
|
|
517
|
+
vec3 color;
|
|
518
|
+
vec3 direction;
|
|
519
|
+
bool visible;
|
|
520
|
+
};
|
|
521
|
+
struct ReflectedLight {
|
|
522
|
+
vec3 directDiffuse;
|
|
523
|
+
vec3 directSpecular;
|
|
524
|
+
vec3 indirectDiffuse;
|
|
525
|
+
vec3 indirectSpecular;
|
|
526
|
+
};
|
|
527
|
+
struct GeometricContext {
|
|
528
|
+
vec3 position;
|
|
529
|
+
vec3 normal;
|
|
530
|
+
vec3 viewDir;
|
|
531
|
+
};
|
|
532
|
+
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
|
|
533
|
+
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
|
|
534
|
+
}
|
|
535
|
+
vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
|
|
536
|
+
return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
|
|
537
|
+
}
|
|
538
|
+
vec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {
|
|
539
|
+
float distance = dot( planeNormal, point - pointOnPlane );
|
|
540
|
+
return - distance * planeNormal + point;
|
|
541
|
+
}
|
|
542
|
+
float sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {
|
|
543
|
+
return sign( dot( point - pointOnPlane, planeNormal ) );
|
|
544
|
+
}
|
|
545
|
+
vec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {
|
|
546
|
+
return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;
|
|
547
|
+
}
|
|
548
|
+
mat3 transposeMat3( const in mat3 m ) {
|
|
549
|
+
mat3 tmp;
|
|
550
|
+
tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
|
|
551
|
+
tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
|
|
552
|
+
tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
|
|
553
|
+
return tmp;
|
|
554
|
+
}
|
|
555
|
+
float linearToRelativeLuminance( const in vec3 color ) {
|
|
556
|
+
vec3 weights = vec3( 0.2126, 0.7152, 0.0722 );
|
|
557
|
+
return dot( weights, color.rgb );
|
|
558
|
+
}
|
|
559
|
+
`,cube_uv_reflection_fragment:`#ifdef ENVMAP_TYPE_CUBE_UV
|
|
560
|
+
#define cubeUV_textureSize (1024.0)
|
|
561
|
+
int getFaceFromDirection(vec3 direction) {
|
|
562
|
+
vec3 absDirection = abs(direction);
|
|
563
|
+
int face = -1;
|
|
564
|
+
if( absDirection.x > absDirection.z ) {
|
|
565
|
+
if(absDirection.x > absDirection.y )
|
|
566
|
+
face = direction.x > 0.0 ? 0 : 3;
|
|
567
|
+
else
|
|
568
|
+
face = direction.y > 0.0 ? 1 : 4;
|
|
569
|
+
}
|
|
570
|
+
else {
|
|
571
|
+
if(absDirection.z > absDirection.y )
|
|
572
|
+
face = direction.z > 0.0 ? 2 : 5;
|
|
573
|
+
else
|
|
574
|
+
face = direction.y > 0.0 ? 1 : 4;
|
|
575
|
+
}
|
|
576
|
+
return face;
|
|
577
|
+
}
|
|
578
|
+
#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)
|
|
579
|
+
#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))
|
|
580
|
+
vec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {
|
|
581
|
+
float scale = exp2(cubeUV_maxLods1 - roughnessLevel);
|
|
582
|
+
float dxRoughness = dFdx(roughness);
|
|
583
|
+
float dyRoughness = dFdy(roughness);
|
|
584
|
+
vec3 dx = dFdx( vec * scale * dxRoughness );
|
|
585
|
+
vec3 dy = dFdy( vec * scale * dyRoughness );
|
|
586
|
+
float d = max( dot( dx, dx ), dot( dy, dy ) );
|
|
587
|
+
d = clamp(d, 1.0, cubeUV_rangeClamp);
|
|
588
|
+
float mipLevel = 0.5 * log2(d);
|
|
589
|
+
return vec2(floor(mipLevel), fract(mipLevel));
|
|
590
|
+
}
|
|
591
|
+
#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)
|
|
592
|
+
#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)
|
|
593
|
+
vec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {
|
|
594
|
+
mipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;
|
|
595
|
+
float a = 16.0 * cubeUV_rcpTextureSize;
|
|
596
|
+
vec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );
|
|
597
|
+
vec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;
|
|
598
|
+
float powScale = exp2_packed.x * exp2_packed.y;
|
|
599
|
+
float scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;
|
|
600
|
+
float mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;
|
|
601
|
+
bool bRes = mipLevel == 0.0;
|
|
602
|
+
scale = bRes && (scale < a) ? a : scale;
|
|
603
|
+
vec3 r;
|
|
604
|
+
vec2 offset;
|
|
605
|
+
int face = getFaceFromDirection(direction);
|
|
606
|
+
float rcpPowScale = 1.0 / powScale;
|
|
607
|
+
if( face == 0) {
|
|
608
|
+
r = vec3(direction.x, -direction.z, direction.y);
|
|
609
|
+
offset = vec2(0.0+mipOffset,0.75 * rcpPowScale);
|
|
610
|
+
offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;
|
|
611
|
+
}
|
|
612
|
+
else if( face == 1) {
|
|
613
|
+
r = vec3(direction.y, direction.x, direction.z);
|
|
614
|
+
offset = vec2(scale+mipOffset, 0.75 * rcpPowScale);
|
|
615
|
+
offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;
|
|
616
|
+
}
|
|
617
|
+
else if( face == 2) {
|
|
618
|
+
r = vec3(direction.z, direction.x, direction.y);
|
|
619
|
+
offset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);
|
|
620
|
+
offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;
|
|
621
|
+
}
|
|
622
|
+
else if( face == 3) {
|
|
623
|
+
r = vec3(direction.x, direction.z, direction.y);
|
|
624
|
+
offset = vec2(0.0+mipOffset,0.5 * rcpPowScale);
|
|
625
|
+
offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;
|
|
626
|
+
}
|
|
627
|
+
else if( face == 4) {
|
|
628
|
+
r = vec3(direction.y, direction.x, -direction.z);
|
|
629
|
+
offset = vec2(scale+mipOffset, 0.5 * rcpPowScale);
|
|
630
|
+
offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;
|
|
631
|
+
}
|
|
632
|
+
else {
|
|
633
|
+
r = vec3(direction.z, -direction.x, direction.y);
|
|
634
|
+
offset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);
|
|
635
|
+
offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;
|
|
636
|
+
}
|
|
637
|
+
r = normalize(r);
|
|
638
|
+
float texelOffset = 0.5 * cubeUV_rcpTextureSize;
|
|
639
|
+
vec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;
|
|
640
|
+
vec2 base = offset + vec2( texelOffset );
|
|
641
|
+
return base + s * ( scale - 2.0 * texelOffset );
|
|
642
|
+
}
|
|
643
|
+
#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)
|
|
644
|
+
vec4 textureCubeUV( sampler2D envMap, vec3 reflectedDirection, float roughness ) {
|
|
645
|
+
float roughnessVal = roughness* cubeUV_maxLods3;
|
|
646
|
+
float r1 = floor(roughnessVal);
|
|
647
|
+
float r2 = r1 + 1.0;
|
|
648
|
+
float t = fract(roughnessVal);
|
|
649
|
+
vec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);
|
|
650
|
+
float s = mipInfo.y;
|
|
651
|
+
float level0 = mipInfo.x;
|
|
652
|
+
float level1 = level0 + 1.0;
|
|
653
|
+
level1 = level1 > 5.0 ? 5.0 : level1;
|
|
654
|
+
level0 += min( floor( s + 0.5 ), 5.0 );
|
|
655
|
+
vec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);
|
|
656
|
+
vec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));
|
|
657
|
+
vec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);
|
|
658
|
+
vec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));
|
|
659
|
+
vec4 result = mix(color10, color20, t);
|
|
660
|
+
return vec4(result.rgb, 1.0);
|
|
661
|
+
}
|
|
662
|
+
#endif
|
|
663
|
+
`,defaultnormal_vertex:`vec3 transformedNormal = normalMatrix * objectNormal;
|
|
664
|
+
#ifdef FLIP_SIDED
|
|
665
|
+
transformedNormal = - transformedNormal;
|
|
666
|
+
#endif
|
|
667
|
+
`,displacementmap_pars_vertex:`#ifdef USE_DISPLACEMENTMAP
|
|
668
|
+
uniform sampler2D displacementMap;
|
|
669
|
+
uniform float displacementScale;
|
|
670
|
+
uniform float displacementBias;
|
|
671
|
+
#endif
|
|
672
|
+
`,displacementmap_vertex:`#ifdef USE_DISPLACEMENTMAP
|
|
673
|
+
transformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );
|
|
674
|
+
#endif
|
|
675
|
+
`,emissivemap_fragment:`#ifdef USE_EMISSIVEMAP
|
|
676
|
+
vec4 emissiveColor = texture2D( emissiveMap, vUv );
|
|
677
|
+
emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;
|
|
678
|
+
totalEmissiveRadiance *= emissiveColor.rgb;
|
|
679
|
+
#endif
|
|
680
|
+
`,emissivemap_pars_fragment:`#ifdef USE_EMISSIVEMAP
|
|
681
|
+
uniform sampler2D emissiveMap;
|
|
682
|
+
#endif
|
|
683
|
+
`,encodings_fragment:` gl_FragColor = linearToOutputTexel( gl_FragColor );
|
|
684
|
+
`,encodings_pars_fragment:`
|
|
685
|
+
vec4 LinearToLinear( in vec4 value ) {
|
|
686
|
+
return value;
|
|
687
|
+
}
|
|
688
|
+
vec4 GammaToLinear( in vec4 value, in float gammaFactor ) {
|
|
689
|
+
return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );
|
|
690
|
+
}
|
|
691
|
+
vec4 LinearToGamma( in vec4 value, in float gammaFactor ) {
|
|
692
|
+
return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );
|
|
693
|
+
}
|
|
694
|
+
vec4 sRGBToLinear( in vec4 value ) {
|
|
695
|
+
return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );
|
|
696
|
+
}
|
|
697
|
+
vec4 LinearTosRGB( in vec4 value ) {
|
|
698
|
+
return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
|
|
699
|
+
}
|
|
700
|
+
vec4 RGBEToLinear( in vec4 value ) {
|
|
701
|
+
return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );
|
|
702
|
+
}
|
|
703
|
+
vec4 LinearToRGBE( in vec4 value ) {
|
|
704
|
+
float maxComponent = max( max( value.r, value.g ), value.b );
|
|
705
|
+
float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );
|
|
706
|
+
return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );
|
|
707
|
+
}
|
|
708
|
+
vec4 RGBMToLinear( in vec4 value, in float maxRange ) {
|
|
709
|
+
return vec4( value.rgb * value.a * maxRange, 1.0 );
|
|
710
|
+
}
|
|
711
|
+
vec4 LinearToRGBM( in vec4 value, in float maxRange ) {
|
|
712
|
+
float maxRGB = max( value.r, max( value.g, value.b ) );
|
|
713
|
+
float M = clamp( maxRGB / maxRange, 0.0, 1.0 );
|
|
714
|
+
M = ceil( M * 255.0 ) / 255.0;
|
|
715
|
+
return vec4( value.rgb / ( M * maxRange ), M );
|
|
716
|
+
}
|
|
717
|
+
vec4 RGBDToLinear( in vec4 value, in float maxRange ) {
|
|
718
|
+
return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );
|
|
719
|
+
}
|
|
720
|
+
vec4 LinearToRGBD( in vec4 value, in float maxRange ) {
|
|
721
|
+
float maxRGB = max( value.r, max( value.g, value.b ) );
|
|
722
|
+
float D = max( maxRange / maxRGB, 1.0 );
|
|
723
|
+
D = min( floor( D ) / 255.0, 1.0 );
|
|
724
|
+
return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );
|
|
725
|
+
}
|
|
726
|
+
const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );
|
|
727
|
+
vec4 LinearToLogLuv( in vec4 value ) {
|
|
728
|
+
vec3 Xp_Y_XYZp = value.rgb * cLogLuvM;
|
|
729
|
+
Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );
|
|
730
|
+
vec4 vResult;
|
|
731
|
+
vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;
|
|
732
|
+
float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;
|
|
733
|
+
vResult.w = fract( Le );
|
|
734
|
+
vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;
|
|
735
|
+
return vResult;
|
|
736
|
+
}
|
|
737
|
+
const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );
|
|
738
|
+
vec4 LogLuvToLinear( in vec4 value ) {
|
|
739
|
+
float Le = value.z * 255.0 + value.w;
|
|
740
|
+
vec3 Xp_Y_XYZp;
|
|
741
|
+
Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );
|
|
742
|
+
Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;
|
|
743
|
+
Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;
|
|
744
|
+
vec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;
|
|
745
|
+
return vec4( max( vRGB, 0.0 ), 1.0 );
|
|
746
|
+
}
|
|
747
|
+
`,envmap_fragment:`#ifdef USE_ENVMAP
|
|
748
|
+
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )
|
|
749
|
+
vec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );
|
|
750
|
+
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
|
|
751
|
+
#ifdef ENVMAP_MODE_REFLECTION
|
|
752
|
+
vec3 reflectVec = reflect( cameraToVertex, worldNormal );
|
|
753
|
+
#else
|
|
754
|
+
vec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );
|
|
755
|
+
#endif
|
|
756
|
+
#else
|
|
757
|
+
vec3 reflectVec = vReflect;
|
|
758
|
+
#endif
|
|
759
|
+
#ifdef ENVMAP_TYPE_CUBE
|
|
760
|
+
vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
|
|
761
|
+
#elif defined( ENVMAP_TYPE_EQUIREC )
|
|
762
|
+
vec2 sampleUV;
|
|
763
|
+
reflectVec = normalize( reflectVec );
|
|
764
|
+
sampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
|
|
765
|
+
sampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;
|
|
766
|
+
vec4 envColor = texture2D( envMap, sampleUV );
|
|
767
|
+
#elif defined( ENVMAP_TYPE_SPHERE )
|
|
768
|
+
reflectVec = normalize( reflectVec );
|
|
769
|
+
vec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );
|
|
770
|
+
vec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );
|
|
771
|
+
#else
|
|
772
|
+
vec4 envColor = vec4( 0.0 );
|
|
773
|
+
#endif
|
|
774
|
+
envColor = envMapTexelToLinear( envColor );
|
|
775
|
+
#ifdef ENVMAP_BLENDING_MULTIPLY
|
|
776
|
+
outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
|
|
777
|
+
#elif defined( ENVMAP_BLENDING_MIX )
|
|
778
|
+
outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
|
|
779
|
+
#elif defined( ENVMAP_BLENDING_ADD )
|
|
780
|
+
outgoingLight += envColor.xyz * specularStrength * reflectivity;
|
|
781
|
+
#endif
|
|
782
|
+
#endif
|
|
783
|
+
`,envmap_pars_fragment:`#if defined( USE_ENVMAP ) || defined( PHYSICAL )
|
|
784
|
+
uniform float reflectivity;
|
|
785
|
+
uniform float envMapIntensity;
|
|
786
|
+
#endif
|
|
787
|
+
#ifdef USE_ENVMAP
|
|
788
|
+
#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )
|
|
789
|
+
varying vec3 vWorldPosition;
|
|
790
|
+
#endif
|
|
791
|
+
#ifdef ENVMAP_TYPE_CUBE
|
|
792
|
+
uniform samplerCube envMap;
|
|
793
|
+
#else
|
|
794
|
+
uniform sampler2D envMap;
|
|
795
|
+
#endif
|
|
796
|
+
uniform float flipEnvMap;
|
|
797
|
+
uniform int maxMipLevel;
|
|
798
|
+
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )
|
|
799
|
+
uniform float refractionRatio;
|
|
800
|
+
#else
|
|
801
|
+
varying vec3 vReflect;
|
|
802
|
+
#endif
|
|
803
|
+
#endif
|
|
804
|
+
`,envmap_pars_vertex:`#ifdef USE_ENVMAP
|
|
805
|
+
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )
|
|
806
|
+
varying vec3 vWorldPosition;
|
|
807
|
+
#else
|
|
808
|
+
varying vec3 vReflect;
|
|
809
|
+
uniform float refractionRatio;
|
|
810
|
+
#endif
|
|
811
|
+
#endif
|
|
812
|
+
`,envmap_physical_pars_fragment:`#if defined( USE_ENVMAP ) && defined( PHYSICAL )
|
|
813
|
+
vec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {
|
|
814
|
+
vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );
|
|
815
|
+
#ifdef ENVMAP_TYPE_CUBE
|
|
816
|
+
vec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );
|
|
817
|
+
#ifdef TEXTURE_LOD_EXT
|
|
818
|
+
vec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );
|
|
819
|
+
#else
|
|
820
|
+
vec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );
|
|
821
|
+
#endif
|
|
822
|
+
envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;
|
|
823
|
+
#elif defined( ENVMAP_TYPE_CUBE_UV )
|
|
824
|
+
vec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );
|
|
825
|
+
vec4 envMapColor = textureCubeUV( envMap, queryVec, 1.0 );
|
|
826
|
+
#else
|
|
827
|
+
vec4 envMapColor = vec4( 0.0 );
|
|
828
|
+
#endif
|
|
829
|
+
return PI * envMapColor.rgb * envMapIntensity;
|
|
830
|
+
}
|
|
831
|
+
float getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {
|
|
832
|
+
float maxMIPLevelScalar = float( maxMIPLevel );
|
|
833
|
+
float desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );
|
|
834
|
+
return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );
|
|
835
|
+
}
|
|
836
|
+
vec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {
|
|
837
|
+
#ifdef ENVMAP_MODE_REFLECTION
|
|
838
|
+
vec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );
|
|
839
|
+
#else
|
|
840
|
+
vec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );
|
|
841
|
+
#endif
|
|
842
|
+
reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
|
|
843
|
+
float specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );
|
|
844
|
+
#ifdef ENVMAP_TYPE_CUBE
|
|
845
|
+
vec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );
|
|
846
|
+
#ifdef TEXTURE_LOD_EXT
|
|
847
|
+
vec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );
|
|
848
|
+
#else
|
|
849
|
+
vec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );
|
|
850
|
+
#endif
|
|
851
|
+
envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;
|
|
852
|
+
#elif defined( ENVMAP_TYPE_CUBE_UV )
|
|
853
|
+
vec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );
|
|
854
|
+
vec4 envMapColor = textureCubeUV( envMap, queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent ));
|
|
855
|
+
#elif defined( ENVMAP_TYPE_EQUIREC )
|
|
856
|
+
vec2 sampleUV;
|
|
857
|
+
sampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
|
|
858
|
+
sampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;
|
|
859
|
+
#ifdef TEXTURE_LOD_EXT
|
|
860
|
+
vec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );
|
|
861
|
+
#else
|
|
862
|
+
vec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );
|
|
863
|
+
#endif
|
|
864
|
+
envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;
|
|
865
|
+
#elif defined( ENVMAP_TYPE_SPHERE )
|
|
866
|
+
vec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );
|
|
867
|
+
#ifdef TEXTURE_LOD_EXT
|
|
868
|
+
vec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );
|
|
869
|
+
#else
|
|
870
|
+
vec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );
|
|
871
|
+
#endif
|
|
872
|
+
envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;
|
|
873
|
+
#endif
|
|
874
|
+
return envMapColor.rgb * envMapIntensity;
|
|
875
|
+
}
|
|
876
|
+
#endif
|
|
877
|
+
`,envmap_vertex:`#ifdef USE_ENVMAP
|
|
878
|
+
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )
|
|
879
|
+
vWorldPosition = worldPosition.xyz;
|
|
880
|
+
#else
|
|
881
|
+
vec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
|
|
882
|
+
vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
|
|
883
|
+
#ifdef ENVMAP_MODE_REFLECTION
|
|
884
|
+
vReflect = reflect( cameraToVertex, worldNormal );
|
|
885
|
+
#else
|
|
886
|
+
vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
|
|
887
|
+
#endif
|
|
888
|
+
#endif
|
|
889
|
+
#endif
|
|
890
|
+
`,fog_vertex:`#ifdef USE_FOG
|
|
891
|
+
fogDepth = -mvPosition.z;
|
|
892
|
+
#endif
|
|
893
|
+
`,fog_pars_vertex:`#ifdef USE_FOG
|
|
894
|
+
varying float fogDepth;
|
|
895
|
+
#endif
|
|
896
|
+
`,fog_fragment:`#ifdef USE_FOG
|
|
897
|
+
#ifdef FOG_EXP2
|
|
898
|
+
float fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );
|
|
899
|
+
#else
|
|
900
|
+
float fogFactor = smoothstep( fogNear, fogFar, fogDepth );
|
|
901
|
+
#endif
|
|
902
|
+
gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
|
|
903
|
+
#endif
|
|
904
|
+
`,fog_pars_fragment:`#ifdef USE_FOG
|
|
905
|
+
uniform vec3 fogColor;
|
|
906
|
+
varying float fogDepth;
|
|
907
|
+
#ifdef FOG_EXP2
|
|
908
|
+
uniform float fogDensity;
|
|
909
|
+
#else
|
|
910
|
+
uniform float fogNear;
|
|
911
|
+
uniform float fogFar;
|
|
912
|
+
#endif
|
|
913
|
+
#endif
|
|
914
|
+
`,gradientmap_pars_fragment:`#ifdef TOON
|
|
915
|
+
uniform sampler2D gradientMap;
|
|
916
|
+
vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
|
|
917
|
+
float dotNL = dot( normal, lightDirection );
|
|
918
|
+
vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
|
|
919
|
+
#ifdef USE_GRADIENTMAP
|
|
920
|
+
return texture2D( gradientMap, coord ).rgb;
|
|
921
|
+
#else
|
|
922
|
+
return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );
|
|
923
|
+
#endif
|
|
924
|
+
}
|
|
925
|
+
#endif
|
|
926
|
+
`,lightmap_fragment:`#ifdef USE_LIGHTMAP
|
|
927
|
+
reflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;
|
|
928
|
+
#endif
|
|
929
|
+
`,lightmap_pars_fragment:`#ifdef USE_LIGHTMAP
|
|
930
|
+
uniform sampler2D lightMap;
|
|
931
|
+
uniform float lightMapIntensity;
|
|
932
|
+
#endif`,lights_lambert_vertex:`vec3 diffuse = vec3( 1.0 );
|
|
933
|
+
GeometricContext geometry;
|
|
934
|
+
geometry.position = mvPosition.xyz;
|
|
935
|
+
geometry.normal = normalize( transformedNormal );
|
|
936
|
+
geometry.viewDir = normalize( -mvPosition.xyz );
|
|
937
|
+
GeometricContext backGeometry;
|
|
938
|
+
backGeometry.position = geometry.position;
|
|
939
|
+
backGeometry.normal = -geometry.normal;
|
|
940
|
+
backGeometry.viewDir = geometry.viewDir;
|
|
941
|
+
vLightFront = vec3( 0.0 );
|
|
942
|
+
#ifdef DOUBLE_SIDED
|
|
943
|
+
vLightBack = vec3( 0.0 );
|
|
944
|
+
#endif
|
|
945
|
+
IncidentLight directLight;
|
|
946
|
+
float dotNL;
|
|
947
|
+
vec3 directLightColor_Diffuse;
|
|
948
|
+
#if NUM_POINT_LIGHTS > 0
|
|
949
|
+
#pragma unroll_loop
|
|
950
|
+
for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
|
|
951
|
+
getPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );
|
|
952
|
+
dotNL = dot( geometry.normal, directLight.direction );
|
|
953
|
+
directLightColor_Diffuse = PI * directLight.color;
|
|
954
|
+
vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
|
|
955
|
+
#ifdef DOUBLE_SIDED
|
|
956
|
+
vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;
|
|
957
|
+
#endif
|
|
958
|
+
}
|
|
959
|
+
#endif
|
|
960
|
+
#if NUM_SPOT_LIGHTS > 0
|
|
961
|
+
#pragma unroll_loop
|
|
962
|
+
for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
|
|
963
|
+
getSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );
|
|
964
|
+
dotNL = dot( geometry.normal, directLight.direction );
|
|
965
|
+
directLightColor_Diffuse = PI * directLight.color;
|
|
966
|
+
vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
|
|
967
|
+
#ifdef DOUBLE_SIDED
|
|
968
|
+
vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;
|
|
969
|
+
#endif
|
|
970
|
+
}
|
|
971
|
+
#endif
|
|
972
|
+
#if NUM_DIR_LIGHTS > 0
|
|
973
|
+
#pragma unroll_loop
|
|
974
|
+
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
|
|
975
|
+
getDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );
|
|
976
|
+
dotNL = dot( geometry.normal, directLight.direction );
|
|
977
|
+
directLightColor_Diffuse = PI * directLight.color;
|
|
978
|
+
vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
|
|
979
|
+
#ifdef DOUBLE_SIDED
|
|
980
|
+
vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;
|
|
981
|
+
#endif
|
|
982
|
+
}
|
|
983
|
+
#endif
|
|
984
|
+
#if NUM_HEMI_LIGHTS > 0
|
|
985
|
+
#pragma unroll_loop
|
|
986
|
+
for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
|
|
987
|
+
vLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );
|
|
988
|
+
#ifdef DOUBLE_SIDED
|
|
989
|
+
vLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );
|
|
990
|
+
#endif
|
|
991
|
+
}
|
|
992
|
+
#endif
|
|
993
|
+
`,lights_pars_begin:`uniform vec3 ambientLightColor;
|
|
994
|
+
vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
|
|
995
|
+
vec3 irradiance = ambientLightColor;
|
|
996
|
+
#ifndef PHYSICALLY_CORRECT_LIGHTS
|
|
997
|
+
irradiance *= PI;
|
|
998
|
+
#endif
|
|
999
|
+
return irradiance;
|
|
1000
|
+
}
|
|
1001
|
+
#if NUM_DIR_LIGHTS > 0
|
|
1002
|
+
struct DirectionalLight {
|
|
1003
|
+
vec3 direction;
|
|
1004
|
+
vec3 color;
|
|
1005
|
+
int shadow;
|
|
1006
|
+
float shadowBias;
|
|
1007
|
+
float shadowRadius;
|
|
1008
|
+
vec2 shadowMapSize;
|
|
1009
|
+
};
|
|
1010
|
+
uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
|
|
1011
|
+
void getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {
|
|
1012
|
+
directLight.color = directionalLight.color;
|
|
1013
|
+
directLight.direction = directionalLight.direction;
|
|
1014
|
+
directLight.visible = true;
|
|
1015
|
+
}
|
|
1016
|
+
#endif
|
|
1017
|
+
#if NUM_POINT_LIGHTS > 0
|
|
1018
|
+
struct PointLight {
|
|
1019
|
+
vec3 position;
|
|
1020
|
+
vec3 color;
|
|
1021
|
+
float distance;
|
|
1022
|
+
float decay;
|
|
1023
|
+
int shadow;
|
|
1024
|
+
float shadowBias;
|
|
1025
|
+
float shadowRadius;
|
|
1026
|
+
vec2 shadowMapSize;
|
|
1027
|
+
float shadowCameraNear;
|
|
1028
|
+
float shadowCameraFar;
|
|
1029
|
+
};
|
|
1030
|
+
uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
|
|
1031
|
+
void getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {
|
|
1032
|
+
vec3 lVector = pointLight.position - geometry.position;
|
|
1033
|
+
directLight.direction = normalize( lVector );
|
|
1034
|
+
float lightDistance = length( lVector );
|
|
1035
|
+
directLight.color = pointLight.color;
|
|
1036
|
+
directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );
|
|
1037
|
+
directLight.visible = ( directLight.color != vec3( 0.0 ) );
|
|
1038
|
+
}
|
|
1039
|
+
#endif
|
|
1040
|
+
#if NUM_SPOT_LIGHTS > 0
|
|
1041
|
+
struct SpotLight {
|
|
1042
|
+
vec3 position;
|
|
1043
|
+
vec3 direction;
|
|
1044
|
+
vec3 color;
|
|
1045
|
+
float distance;
|
|
1046
|
+
float decay;
|
|
1047
|
+
float coneCos;
|
|
1048
|
+
float penumbraCos;
|
|
1049
|
+
int shadow;
|
|
1050
|
+
float shadowBias;
|
|
1051
|
+
float shadowRadius;
|
|
1052
|
+
vec2 shadowMapSize;
|
|
1053
|
+
};
|
|
1054
|
+
uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
|
|
1055
|
+
void getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {
|
|
1056
|
+
vec3 lVector = spotLight.position - geometry.position;
|
|
1057
|
+
directLight.direction = normalize( lVector );
|
|
1058
|
+
float lightDistance = length( lVector );
|
|
1059
|
+
float angleCos = dot( directLight.direction, spotLight.direction );
|
|
1060
|
+
if ( angleCos > spotLight.coneCos ) {
|
|
1061
|
+
float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );
|
|
1062
|
+
directLight.color = spotLight.color;
|
|
1063
|
+
directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );
|
|
1064
|
+
directLight.visible = true;
|
|
1065
|
+
} else {
|
|
1066
|
+
directLight.color = vec3( 0.0 );
|
|
1067
|
+
directLight.visible = false;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
#endif
|
|
1071
|
+
#if NUM_RECT_AREA_LIGHTS > 0
|
|
1072
|
+
struct RectAreaLight {
|
|
1073
|
+
vec3 color;
|
|
1074
|
+
vec3 position;
|
|
1075
|
+
vec3 halfWidth;
|
|
1076
|
+
vec3 halfHeight;
|
|
1077
|
+
};
|
|
1078
|
+
uniform sampler2D ltc_1; uniform sampler2D ltc_2;
|
|
1079
|
+
uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
|
|
1080
|
+
#endif
|
|
1081
|
+
#if NUM_HEMI_LIGHTS > 0
|
|
1082
|
+
struct HemisphereLight {
|
|
1083
|
+
vec3 direction;
|
|
1084
|
+
vec3 skyColor;
|
|
1085
|
+
vec3 groundColor;
|
|
1086
|
+
};
|
|
1087
|
+
uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
|
|
1088
|
+
vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {
|
|
1089
|
+
float dotNL = dot( geometry.normal, hemiLight.direction );
|
|
1090
|
+
float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
|
|
1091
|
+
vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
|
|
1092
|
+
#ifndef PHYSICALLY_CORRECT_LIGHTS
|
|
1093
|
+
irradiance *= PI;
|
|
1094
|
+
#endif
|
|
1095
|
+
return irradiance;
|
|
1096
|
+
}
|
|
1097
|
+
#endif
|
|
1098
|
+
`,lights_phong_fragment:`BlinnPhongMaterial material;
|
|
1099
|
+
material.diffuseColor = diffuseColor.rgb;
|
|
1100
|
+
material.specularColor = specular;
|
|
1101
|
+
material.specularShininess = shininess;
|
|
1102
|
+
material.specularStrength = specularStrength;
|
|
1103
|
+
`,lights_phong_pars_fragment:`varying vec3 vViewPosition;
|
|
1104
|
+
#ifndef FLAT_SHADED
|
|
1105
|
+
varying vec3 vNormal;
|
|
1106
|
+
#endif
|
|
1107
|
+
struct BlinnPhongMaterial {
|
|
1108
|
+
vec3 diffuseColor;
|
|
1109
|
+
vec3 specularColor;
|
|
1110
|
+
float specularShininess;
|
|
1111
|
+
float specularStrength;
|
|
1112
|
+
};
|
|
1113
|
+
void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
|
|
1114
|
+
#ifdef TOON
|
|
1115
|
+
vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;
|
|
1116
|
+
#else
|
|
1117
|
+
float dotNL = saturate( dot( geometry.normal, directLight.direction ) );
|
|
1118
|
+
vec3 irradiance = dotNL * directLight.color;
|
|
1119
|
+
#endif
|
|
1120
|
+
#ifndef PHYSICALLY_CORRECT_LIGHTS
|
|
1121
|
+
irradiance *= PI;
|
|
1122
|
+
#endif
|
|
1123
|
+
reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
|
|
1124
|
+
reflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;
|
|
1125
|
+
}
|
|
1126
|
+
void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
|
|
1127
|
+
reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
|
|
1128
|
+
}
|
|
1129
|
+
#define RE_Direct RE_Direct_BlinnPhong
|
|
1130
|
+
#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong
|
|
1131
|
+
#define Material_LightProbeLOD( material ) (0)
|
|
1132
|
+
`,lights_physical_fragment:`PhysicalMaterial material;
|
|
1133
|
+
material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
|
|
1134
|
+
material.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );
|
|
1135
|
+
#ifdef STANDARD
|
|
1136
|
+
material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );
|
|
1137
|
+
#else
|
|
1138
|
+
material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );
|
|
1139
|
+
material.clearCoat = saturate( clearCoat ); material.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );
|
|
1140
|
+
#endif
|
|
1141
|
+
`,lights_physical_pars_fragment:`struct PhysicalMaterial {
|
|
1142
|
+
vec3 diffuseColor;
|
|
1143
|
+
float specularRoughness;
|
|
1144
|
+
vec3 specularColor;
|
|
1145
|
+
#ifndef STANDARD
|
|
1146
|
+
float clearCoat;
|
|
1147
|
+
float clearCoatRoughness;
|
|
1148
|
+
#endif
|
|
1149
|
+
};
|
|
1150
|
+
#define MAXIMUM_SPECULAR_COEFFICIENT 0.16
|
|
1151
|
+
#define DEFAULT_SPECULAR_COEFFICIENT 0.04
|
|
1152
|
+
float clearCoatDHRApprox( const in float roughness, const in float dotNL ) {
|
|
1153
|
+
return DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );
|
|
1154
|
+
}
|
|
1155
|
+
#if NUM_RECT_AREA_LIGHTS > 0
|
|
1156
|
+
void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
|
|
1157
|
+
vec3 normal = geometry.normal;
|
|
1158
|
+
vec3 viewDir = geometry.viewDir;
|
|
1159
|
+
vec3 position = geometry.position;
|
|
1160
|
+
vec3 lightPos = rectAreaLight.position;
|
|
1161
|
+
vec3 halfWidth = rectAreaLight.halfWidth;
|
|
1162
|
+
vec3 halfHeight = rectAreaLight.halfHeight;
|
|
1163
|
+
vec3 lightColor = rectAreaLight.color;
|
|
1164
|
+
float roughness = material.specularRoughness;
|
|
1165
|
+
vec3 rectCoords[ 4 ];
|
|
1166
|
+
rectCoords[ 0 ] = lightPos - halfWidth - halfHeight; rectCoords[ 1 ] = lightPos + halfWidth - halfHeight;
|
|
1167
|
+
rectCoords[ 2 ] = lightPos + halfWidth + halfHeight;
|
|
1168
|
+
rectCoords[ 3 ] = lightPos - halfWidth + halfHeight;
|
|
1169
|
+
vec2 uv = LTC_Uv( normal, viewDir, roughness );
|
|
1170
|
+
vec4 t1 = texture2D( ltc_1, uv );
|
|
1171
|
+
vec4 t2 = texture2D( ltc_2, uv );
|
|
1172
|
+
mat3 mInv = mat3(
|
|
1173
|
+
vec3( t1.x, 0, t1.y ),
|
|
1174
|
+
vec3( 0, 1, 0 ),
|
|
1175
|
+
vec3( t1.z, 0, t1.w )
|
|
1176
|
+
);
|
|
1177
|
+
vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
|
|
1178
|
+
reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
|
|
1179
|
+
reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
|
|
1180
|
+
}
|
|
1181
|
+
#endif
|
|
1182
|
+
void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
|
|
1183
|
+
float dotNL = saturate( dot( geometry.normal, directLight.direction ) );
|
|
1184
|
+
vec3 irradiance = dotNL * directLight.color;
|
|
1185
|
+
#ifndef PHYSICALLY_CORRECT_LIGHTS
|
|
1186
|
+
irradiance *= PI;
|
|
1187
|
+
#endif
|
|
1188
|
+
#ifndef STANDARD
|
|
1189
|
+
float clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );
|
|
1190
|
+
#else
|
|
1191
|
+
float clearCoatDHR = 0.0;
|
|
1192
|
+
#endif
|
|
1193
|
+
reflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );
|
|
1194
|
+
reflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
|
|
1195
|
+
#ifndef STANDARD
|
|
1196
|
+
reflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );
|
|
1197
|
+
#endif
|
|
1198
|
+
}
|
|
1199
|
+
void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
|
|
1200
|
+
reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
|
|
1201
|
+
}
|
|
1202
|
+
void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
|
|
1203
|
+
#ifndef STANDARD
|
|
1204
|
+
float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );
|
|
1205
|
+
float dotNL = dotNV;
|
|
1206
|
+
float clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );
|
|
1207
|
+
#else
|
|
1208
|
+
float clearCoatDHR = 0.0;
|
|
1209
|
+
#endif
|
|
1210
|
+
reflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );
|
|
1211
|
+
#ifndef STANDARD
|
|
1212
|
+
reflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );
|
|
1213
|
+
#endif
|
|
1214
|
+
}
|
|
1215
|
+
#define RE_Direct RE_Direct_Physical
|
|
1216
|
+
#define RE_Direct_RectArea RE_Direct_RectArea_Physical
|
|
1217
|
+
#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical
|
|
1218
|
+
#define RE_IndirectSpecular RE_IndirectSpecular_Physical
|
|
1219
|
+
#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )
|
|
1220
|
+
#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )
|
|
1221
|
+
float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
|
|
1222
|
+
return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
|
|
1223
|
+
}
|
|
1224
|
+
`,lights_fragment_begin:`
|
|
1225
|
+
GeometricContext geometry;
|
|
1226
|
+
geometry.position = - vViewPosition;
|
|
1227
|
+
geometry.normal = normal;
|
|
1228
|
+
geometry.viewDir = normalize( vViewPosition );
|
|
1229
|
+
IncidentLight directLight;
|
|
1230
|
+
#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
|
|
1231
|
+
PointLight pointLight;
|
|
1232
|
+
#pragma unroll_loop
|
|
1233
|
+
for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
|
|
1234
|
+
pointLight = pointLights[ i ];
|
|
1235
|
+
getPointDirectLightIrradiance( pointLight, geometry, directLight );
|
|
1236
|
+
#ifdef USE_SHADOWMAP
|
|
1237
|
+
directLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
|
|
1238
|
+
#endif
|
|
1239
|
+
RE_Direct( directLight, geometry, material, reflectedLight );
|
|
1240
|
+
}
|
|
1241
|
+
#endif
|
|
1242
|
+
#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
|
|
1243
|
+
SpotLight spotLight;
|
|
1244
|
+
#pragma unroll_loop
|
|
1245
|
+
for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
|
|
1246
|
+
spotLight = spotLights[ i ];
|
|
1247
|
+
getSpotDirectLightIrradiance( spotLight, geometry, directLight );
|
|
1248
|
+
#ifdef USE_SHADOWMAP
|
|
1249
|
+
directLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;
|
|
1250
|
+
#endif
|
|
1251
|
+
RE_Direct( directLight, geometry, material, reflectedLight );
|
|
1252
|
+
}
|
|
1253
|
+
#endif
|
|
1254
|
+
#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
|
|
1255
|
+
DirectionalLight directionalLight;
|
|
1256
|
+
#pragma unroll_loop
|
|
1257
|
+
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
|
|
1258
|
+
directionalLight = directionalLights[ i ];
|
|
1259
|
+
getDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );
|
|
1260
|
+
#ifdef USE_SHADOWMAP
|
|
1261
|
+
directLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
|
|
1262
|
+
#endif
|
|
1263
|
+
RE_Direct( directLight, geometry, material, reflectedLight );
|
|
1264
|
+
}
|
|
1265
|
+
#endif
|
|
1266
|
+
#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
|
|
1267
|
+
RectAreaLight rectAreaLight;
|
|
1268
|
+
#pragma unroll_loop
|
|
1269
|
+
for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
|
|
1270
|
+
rectAreaLight = rectAreaLights[ i ];
|
|
1271
|
+
RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );
|
|
1272
|
+
}
|
|
1273
|
+
#endif
|
|
1274
|
+
#if defined( RE_IndirectDiffuse )
|
|
1275
|
+
vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
|
|
1276
|
+
#if ( NUM_HEMI_LIGHTS > 0 )
|
|
1277
|
+
#pragma unroll_loop
|
|
1278
|
+
for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
|
|
1279
|
+
irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );
|
|
1280
|
+
}
|
|
1281
|
+
#endif
|
|
1282
|
+
#endif
|
|
1283
|
+
#if defined( RE_IndirectSpecular )
|
|
1284
|
+
vec3 radiance = vec3( 0.0 );
|
|
1285
|
+
vec3 clearCoatRadiance = vec3( 0.0 );
|
|
1286
|
+
#endif
|
|
1287
|
+
`,lights_fragment_maps:`#if defined( RE_IndirectDiffuse )
|
|
1288
|
+
#ifdef USE_LIGHTMAP
|
|
1289
|
+
vec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;
|
|
1290
|
+
#ifndef PHYSICALLY_CORRECT_LIGHTS
|
|
1291
|
+
lightMapIrradiance *= PI;
|
|
1292
|
+
#endif
|
|
1293
|
+
irradiance += lightMapIrradiance;
|
|
1294
|
+
#endif
|
|
1295
|
+
#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )
|
|
1296
|
+
irradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );
|
|
1297
|
+
#endif
|
|
1298
|
+
#endif
|
|
1299
|
+
#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
|
|
1300
|
+
radiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );
|
|
1301
|
+
#ifndef STANDARD
|
|
1302
|
+
clearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );
|
|
1303
|
+
#endif
|
|
1304
|
+
#endif
|
|
1305
|
+
`,lights_fragment_end:`#if defined( RE_IndirectDiffuse )
|
|
1306
|
+
RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );
|
|
1307
|
+
#endif
|
|
1308
|
+
#if defined( RE_IndirectSpecular )
|
|
1309
|
+
RE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );
|
|
1310
|
+
#endif
|
|
1311
|
+
`,logdepthbuf_fragment:`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
|
|
1312
|
+
gl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;
|
|
1313
|
+
#endif`,logdepthbuf_pars_fragment:`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
|
|
1314
|
+
uniform float logDepthBufFC;
|
|
1315
|
+
varying float vFragDepth;
|
|
1316
|
+
#endif
|
|
1317
|
+
`,logdepthbuf_pars_vertex:`#ifdef USE_LOGDEPTHBUF
|
|
1318
|
+
#ifdef USE_LOGDEPTHBUF_EXT
|
|
1319
|
+
varying float vFragDepth;
|
|
1320
|
+
#else
|
|
1321
|
+
uniform float logDepthBufFC;
|
|
1322
|
+
#endif
|
|
1323
|
+
#endif
|
|
1324
|
+
`,logdepthbuf_vertex:`#ifdef USE_LOGDEPTHBUF
|
|
1325
|
+
#ifdef USE_LOGDEPTHBUF_EXT
|
|
1326
|
+
vFragDepth = 1.0 + gl_Position.w;
|
|
1327
|
+
#else
|
|
1328
|
+
gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;
|
|
1329
|
+
gl_Position.z *= gl_Position.w;
|
|
1330
|
+
#endif
|
|
1331
|
+
#endif
|
|
1332
|
+
`,map_fragment:`#ifdef USE_MAP
|
|
1333
|
+
vec4 texelColor = texture2D( map, vUv );
|
|
1334
|
+
texelColor = mapTexelToLinear( texelColor );
|
|
1335
|
+
diffuseColor *= texelColor;
|
|
1336
|
+
#endif
|
|
1337
|
+
`,map_pars_fragment:`#ifdef USE_MAP
|
|
1338
|
+
uniform sampler2D map;
|
|
1339
|
+
#endif
|
|
1340
|
+
`,map_particle_fragment:`#ifdef USE_MAP
|
|
1341
|
+
vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
|
|
1342
|
+
vec4 mapTexel = texture2D( map, uv );
|
|
1343
|
+
diffuseColor *= mapTexelToLinear( mapTexel );
|
|
1344
|
+
#endif
|
|
1345
|
+
`,map_particle_pars_fragment:`#ifdef USE_MAP
|
|
1346
|
+
uniform mat3 uvTransform;
|
|
1347
|
+
uniform sampler2D map;
|
|
1348
|
+
#endif
|
|
1349
|
+
`,metalnessmap_fragment:`float metalnessFactor = metalness;
|
|
1350
|
+
#ifdef USE_METALNESSMAP
|
|
1351
|
+
vec4 texelMetalness = texture2D( metalnessMap, vUv );
|
|
1352
|
+
metalnessFactor *= texelMetalness.b;
|
|
1353
|
+
#endif
|
|
1354
|
+
`,metalnessmap_pars_fragment:`#ifdef USE_METALNESSMAP
|
|
1355
|
+
uniform sampler2D metalnessMap;
|
|
1356
|
+
#endif`,morphnormal_vertex:`#ifdef USE_MORPHNORMALS
|
|
1357
|
+
objectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];
|
|
1358
|
+
objectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];
|
|
1359
|
+
objectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];
|
|
1360
|
+
objectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];
|
|
1361
|
+
#endif
|
|
1362
|
+
`,morphtarget_pars_vertex:`#ifdef USE_MORPHTARGETS
|
|
1363
|
+
#ifndef USE_MORPHNORMALS
|
|
1364
|
+
uniform float morphTargetInfluences[ 8 ];
|
|
1365
|
+
#else
|
|
1366
|
+
uniform float morphTargetInfluences[ 4 ];
|
|
1367
|
+
#endif
|
|
1368
|
+
#endif`,morphtarget_vertex:`#ifdef USE_MORPHTARGETS
|
|
1369
|
+
transformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];
|
|
1370
|
+
transformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];
|
|
1371
|
+
transformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];
|
|
1372
|
+
transformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];
|
|
1373
|
+
#ifndef USE_MORPHNORMALS
|
|
1374
|
+
transformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];
|
|
1375
|
+
transformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];
|
|
1376
|
+
transformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];
|
|
1377
|
+
transformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];
|
|
1378
|
+
#endif
|
|
1379
|
+
#endif
|
|
1380
|
+
`,normal_fragment_begin:`#ifdef FLAT_SHADED
|
|
1381
|
+
vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );
|
|
1382
|
+
vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );
|
|
1383
|
+
vec3 normal = normalize( cross( fdx, fdy ) );
|
|
1384
|
+
#else
|
|
1385
|
+
vec3 normal = normalize( vNormal );
|
|
1386
|
+
#ifdef DOUBLE_SIDED
|
|
1387
|
+
normal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );
|
|
1388
|
+
#endif
|
|
1389
|
+
#endif
|
|
1390
|
+
`,normal_fragment_maps:`#ifdef USE_NORMALMAP
|
|
1391
|
+
#ifdef OBJECTSPACE_NORMALMAP
|
|
1392
|
+
normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
|
|
1393
|
+
#ifdef FLIP_SIDED
|
|
1394
|
+
normal = - normal;
|
|
1395
|
+
#endif
|
|
1396
|
+
#ifdef DOUBLE_SIDED
|
|
1397
|
+
normal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );
|
|
1398
|
+
#endif
|
|
1399
|
+
normal = normalize( normalMatrix * normal );
|
|
1400
|
+
#else
|
|
1401
|
+
normal = perturbNormal2Arb( -vViewPosition, normal );
|
|
1402
|
+
#endif
|
|
1403
|
+
#elif defined( USE_BUMPMAP )
|
|
1404
|
+
normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );
|
|
1405
|
+
#endif
|
|
1406
|
+
`,normalmap_pars_fragment:`#ifdef USE_NORMALMAP
|
|
1407
|
+
uniform sampler2D normalMap;
|
|
1408
|
+
uniform vec2 normalScale;
|
|
1409
|
+
#ifdef OBJECTSPACE_NORMALMAP
|
|
1410
|
+
uniform mat3 normalMatrix;
|
|
1411
|
+
#else
|
|
1412
|
+
vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {
|
|
1413
|
+
vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );
|
|
1414
|
+
vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );
|
|
1415
|
+
vec2 st0 = dFdx( vUv.st );
|
|
1416
|
+
vec2 st1 = dFdy( vUv.st );
|
|
1417
|
+
float scale = sign( st1.t * st0.s - st0.t * st1.s );
|
|
1418
|
+
vec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );
|
|
1419
|
+
vec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );
|
|
1420
|
+
vec3 N = normalize( surf_norm );
|
|
1421
|
+
mat3 tsn = mat3( S, T, N );
|
|
1422
|
+
vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
|
|
1423
|
+
mapN.xy *= normalScale;
|
|
1424
|
+
mapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );
|
|
1425
|
+
return normalize( tsn * mapN );
|
|
1426
|
+
}
|
|
1427
|
+
#endif
|
|
1428
|
+
#endif
|
|
1429
|
+
`,packing:`vec3 packNormalToRGB( const in vec3 normal ) {
|
|
1430
|
+
return normalize( normal ) * 0.5 + 0.5;
|
|
1431
|
+
}
|
|
1432
|
+
vec3 unpackRGBToNormal( const in vec3 rgb ) {
|
|
1433
|
+
return 2.0 * rgb.xyz - 1.0;
|
|
1434
|
+
}
|
|
1435
|
+
const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;
|
|
1436
|
+
const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );
|
|
1437
|
+
const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );
|
|
1438
|
+
const float ShiftRight8 = 1. / 256.;
|
|
1439
|
+
vec4 packDepthToRGBA( const in float v ) {
|
|
1440
|
+
vec4 r = vec4( fract( v * PackFactors ), v );
|
|
1441
|
+
r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale;
|
|
1442
|
+
}
|
|
1443
|
+
float unpackRGBAToDepth( const in vec4 v ) {
|
|
1444
|
+
return dot( v, UnpackFactors );
|
|
1445
|
+
}
|
|
1446
|
+
float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
|
|
1447
|
+
return ( viewZ + near ) / ( near - far );
|
|
1448
|
+
}
|
|
1449
|
+
float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {
|
|
1450
|
+
return linearClipZ * ( near - far ) - near;
|
|
1451
|
+
}
|
|
1452
|
+
float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
|
|
1453
|
+
return (( near + viewZ ) * far ) / (( far - near ) * viewZ );
|
|
1454
|
+
}
|
|
1455
|
+
float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {
|
|
1456
|
+
return ( near * far ) / ( ( far - near ) * invClipZ - far );
|
|
1457
|
+
}
|
|
1458
|
+
`,premultiplied_alpha_fragment:`#ifdef PREMULTIPLIED_ALPHA
|
|
1459
|
+
gl_FragColor.rgb *= gl_FragColor.a;
|
|
1460
|
+
#endif
|
|
1461
|
+
`,project_vertex:`vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );
|
|
1462
|
+
gl_Position = projectionMatrix * mvPosition;
|
|
1463
|
+
`,dithering_fragment:`#if defined( DITHERING )
|
|
1464
|
+
gl_FragColor.rgb = dithering( gl_FragColor.rgb );
|
|
1465
|
+
#endif
|
|
1466
|
+
`,dithering_pars_fragment:`#if defined( DITHERING )
|
|
1467
|
+
vec3 dithering( vec3 color ) {
|
|
1468
|
+
float grid_position = rand( gl_FragCoord.xy );
|
|
1469
|
+
vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
|
|
1470
|
+
dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
|
|
1471
|
+
return color + dither_shift_RGB;
|
|
1472
|
+
}
|
|
1473
|
+
#endif
|
|
1474
|
+
`,roughnessmap_fragment:`float roughnessFactor = roughness;
|
|
1475
|
+
#ifdef USE_ROUGHNESSMAP
|
|
1476
|
+
vec4 texelRoughness = texture2D( roughnessMap, vUv );
|
|
1477
|
+
roughnessFactor *= texelRoughness.g;
|
|
1478
|
+
#endif
|
|
1479
|
+
`,roughnessmap_pars_fragment:`#ifdef USE_ROUGHNESSMAP
|
|
1480
|
+
uniform sampler2D roughnessMap;
|
|
1481
|
+
#endif`,shadowmap_pars_fragment:`#ifdef USE_SHADOWMAP
|
|
1482
|
+
#if NUM_DIR_LIGHTS > 0
|
|
1483
|
+
uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];
|
|
1484
|
+
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];
|
|
1485
|
+
#endif
|
|
1486
|
+
#if NUM_SPOT_LIGHTS > 0
|
|
1487
|
+
uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];
|
|
1488
|
+
varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];
|
|
1489
|
+
#endif
|
|
1490
|
+
#if NUM_POINT_LIGHTS > 0
|
|
1491
|
+
uniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];
|
|
1492
|
+
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];
|
|
1493
|
+
#endif
|
|
1494
|
+
float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
|
|
1495
|
+
return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );
|
|
1496
|
+
}
|
|
1497
|
+
float texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {
|
|
1498
|
+
const vec2 offset = vec2( 0.0, 1.0 );
|
|
1499
|
+
vec2 texelSize = vec2( 1.0 ) / size;
|
|
1500
|
+
vec2 centroidUV = floor( uv * size + 0.5 ) / size;
|
|
1501
|
+
float lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );
|
|
1502
|
+
float lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );
|
|
1503
|
+
float rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );
|
|
1504
|
+
float rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );
|
|
1505
|
+
vec2 f = fract( uv * size + 0.5 );
|
|
1506
|
+
float a = mix( lb, lt, f.y );
|
|
1507
|
+
float b = mix( rb, rt, f.y );
|
|
1508
|
+
float c = mix( a, b, f.x );
|
|
1509
|
+
return c;
|
|
1510
|
+
}
|
|
1511
|
+
float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
|
|
1512
|
+
float shadow = 1.0;
|
|
1513
|
+
shadowCoord.xyz /= shadowCoord.w;
|
|
1514
|
+
shadowCoord.z += shadowBias;
|
|
1515
|
+
bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );
|
|
1516
|
+
bool inFrustum = all( inFrustumVec );
|
|
1517
|
+
bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );
|
|
1518
|
+
bool frustumTest = all( frustumTestVec );
|
|
1519
|
+
if ( frustumTest ) {
|
|
1520
|
+
#if defined( SHADOWMAP_TYPE_PCF )
|
|
1521
|
+
vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
|
|
1522
|
+
float dx0 = - texelSize.x * shadowRadius;
|
|
1523
|
+
float dy0 = - texelSize.y * shadowRadius;
|
|
1524
|
+
float dx1 = + texelSize.x * shadowRadius;
|
|
1525
|
+
float dy1 = + texelSize.y * shadowRadius;
|
|
1526
|
+
shadow = (
|
|
1527
|
+
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
|
|
1528
|
+
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
|
|
1529
|
+
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
|
|
1530
|
+
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
|
|
1531
|
+
texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
|
|
1532
|
+
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
|
|
1533
|
+
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
|
|
1534
|
+
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
|
|
1535
|
+
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
|
|
1536
|
+
) * ( 1.0 / 9.0 );
|
|
1537
|
+
#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
|
|
1538
|
+
vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
|
|
1539
|
+
float dx0 = - texelSize.x * shadowRadius;
|
|
1540
|
+
float dy0 = - texelSize.y * shadowRadius;
|
|
1541
|
+
float dx1 = + texelSize.x * shadowRadius;
|
|
1542
|
+
float dy1 = + texelSize.y * shadowRadius;
|
|
1543
|
+
shadow = (
|
|
1544
|
+
texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
|
|
1545
|
+
texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
|
|
1546
|
+
texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
|
|
1547
|
+
texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
|
|
1548
|
+
texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +
|
|
1549
|
+
texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
|
|
1550
|
+
texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
|
|
1551
|
+
texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
|
|
1552
|
+
texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
|
|
1553
|
+
) * ( 1.0 / 9.0 );
|
|
1554
|
+
#else
|
|
1555
|
+
shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
|
|
1556
|
+
#endif
|
|
1557
|
+
}
|
|
1558
|
+
return shadow;
|
|
1559
|
+
}
|
|
1560
|
+
vec2 cubeToUV( vec3 v, float texelSizeY ) {
|
|
1561
|
+
vec3 absV = abs( v );
|
|
1562
|
+
float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
|
|
1563
|
+
absV *= scaleToCube;
|
|
1564
|
+
v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
|
|
1565
|
+
vec2 planar = v.xy;
|
|
1566
|
+
float almostATexel = 1.5 * texelSizeY;
|
|
1567
|
+
float almostOne = 1.0 - almostATexel;
|
|
1568
|
+
if ( absV.z >= almostOne ) {
|
|
1569
|
+
if ( v.z > 0.0 )
|
|
1570
|
+
planar.x = 4.0 - v.x;
|
|
1571
|
+
} else if ( absV.x >= almostOne ) {
|
|
1572
|
+
float signX = sign( v.x );
|
|
1573
|
+
planar.x = v.z * signX + 2.0 * signX;
|
|
1574
|
+
} else if ( absV.y >= almostOne ) {
|
|
1575
|
+
float signY = sign( v.y );
|
|
1576
|
+
planar.x = v.x + 2.0 * signY + 2.0;
|
|
1577
|
+
planar.y = v.z * signY - 2.0;
|
|
1578
|
+
}
|
|
1579
|
+
return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
|
|
1580
|
+
}
|
|
1581
|
+
float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
|
|
1582
|
+
vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
|
|
1583
|
+
vec3 lightToPosition = shadowCoord.xyz;
|
|
1584
|
+
float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;
|
|
1585
|
+
vec3 bd3D = normalize( lightToPosition );
|
|
1586
|
+
#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )
|
|
1587
|
+
vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
|
|
1588
|
+
return (
|
|
1589
|
+
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
|
|
1590
|
+
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
|
|
1591
|
+
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
|
|
1592
|
+
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
|
|
1593
|
+
texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
|
|
1594
|
+
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
|
|
1595
|
+
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
|
|
1596
|
+
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
|
|
1597
|
+
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
|
|
1598
|
+
) * ( 1.0 / 9.0 );
|
|
1599
|
+
#else
|
|
1600
|
+
return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
|
|
1601
|
+
#endif
|
|
1602
|
+
}
|
|
1603
|
+
#endif
|
|
1604
|
+
`,shadowmap_pars_vertex:`#ifdef USE_SHADOWMAP
|
|
1605
|
+
#if NUM_DIR_LIGHTS > 0
|
|
1606
|
+
uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];
|
|
1607
|
+
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];
|
|
1608
|
+
#endif
|
|
1609
|
+
#if NUM_SPOT_LIGHTS > 0
|
|
1610
|
+
uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];
|
|
1611
|
+
varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];
|
|
1612
|
+
#endif
|
|
1613
|
+
#if NUM_POINT_LIGHTS > 0
|
|
1614
|
+
uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];
|
|
1615
|
+
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];
|
|
1616
|
+
#endif
|
|
1617
|
+
#endif
|
|
1618
|
+
`,shadowmap_vertex:`#ifdef USE_SHADOWMAP
|
|
1619
|
+
#if NUM_DIR_LIGHTS > 0
|
|
1620
|
+
#pragma unroll_loop
|
|
1621
|
+
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
|
|
1622
|
+
vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;
|
|
1623
|
+
}
|
|
1624
|
+
#endif
|
|
1625
|
+
#if NUM_SPOT_LIGHTS > 0
|
|
1626
|
+
#pragma unroll_loop
|
|
1627
|
+
for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
|
|
1628
|
+
vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;
|
|
1629
|
+
}
|
|
1630
|
+
#endif
|
|
1631
|
+
#if NUM_POINT_LIGHTS > 0
|
|
1632
|
+
#pragma unroll_loop
|
|
1633
|
+
for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
|
|
1634
|
+
vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;
|
|
1635
|
+
}
|
|
1636
|
+
#endif
|
|
1637
|
+
#endif
|
|
1638
|
+
`,shadowmask_pars_fragment:`float getShadowMask() {
|
|
1639
|
+
float shadow = 1.0;
|
|
1640
|
+
#ifdef USE_SHADOWMAP
|
|
1641
|
+
#if NUM_DIR_LIGHTS > 0
|
|
1642
|
+
DirectionalLight directionalLight;
|
|
1643
|
+
#pragma unroll_loop
|
|
1644
|
+
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
|
|
1645
|
+
directionalLight = directionalLights[ i ];
|
|
1646
|
+
shadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
|
|
1647
|
+
}
|
|
1648
|
+
#endif
|
|
1649
|
+
#if NUM_SPOT_LIGHTS > 0
|
|
1650
|
+
SpotLight spotLight;
|
|
1651
|
+
#pragma unroll_loop
|
|
1652
|
+
for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
|
|
1653
|
+
spotLight = spotLights[ i ];
|
|
1654
|
+
shadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;
|
|
1655
|
+
}
|
|
1656
|
+
#endif
|
|
1657
|
+
#if NUM_POINT_LIGHTS > 0
|
|
1658
|
+
PointLight pointLight;
|
|
1659
|
+
#pragma unroll_loop
|
|
1660
|
+
for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
|
|
1661
|
+
pointLight = pointLights[ i ];
|
|
1662
|
+
shadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
|
|
1663
|
+
}
|
|
1664
|
+
#endif
|
|
1665
|
+
#endif
|
|
1666
|
+
return shadow;
|
|
1667
|
+
}
|
|
1668
|
+
`,skinbase_vertex:`#ifdef USE_SKINNING
|
|
1669
|
+
mat4 boneMatX = getBoneMatrix( skinIndex.x );
|
|
1670
|
+
mat4 boneMatY = getBoneMatrix( skinIndex.y );
|
|
1671
|
+
mat4 boneMatZ = getBoneMatrix( skinIndex.z );
|
|
1672
|
+
mat4 boneMatW = getBoneMatrix( skinIndex.w );
|
|
1673
|
+
#endif`,skinning_pars_vertex:`#ifdef USE_SKINNING
|
|
1674
|
+
uniform mat4 bindMatrix;
|
|
1675
|
+
uniform mat4 bindMatrixInverse;
|
|
1676
|
+
#ifdef BONE_TEXTURE
|
|
1677
|
+
uniform sampler2D boneTexture;
|
|
1678
|
+
uniform int boneTextureSize;
|
|
1679
|
+
mat4 getBoneMatrix( const in float i ) {
|
|
1680
|
+
float j = i * 4.0;
|
|
1681
|
+
float x = mod( j, float( boneTextureSize ) );
|
|
1682
|
+
float y = floor( j / float( boneTextureSize ) );
|
|
1683
|
+
float dx = 1.0 / float( boneTextureSize );
|
|
1684
|
+
float dy = 1.0 / float( boneTextureSize );
|
|
1685
|
+
y = dy * ( y + 0.5 );
|
|
1686
|
+
vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );
|
|
1687
|
+
vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );
|
|
1688
|
+
vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );
|
|
1689
|
+
vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );
|
|
1690
|
+
mat4 bone = mat4( v1, v2, v3, v4 );
|
|
1691
|
+
return bone;
|
|
1692
|
+
}
|
|
1693
|
+
#else
|
|
1694
|
+
uniform mat4 boneMatrices[ MAX_BONES ];
|
|
1695
|
+
mat4 getBoneMatrix( const in float i ) {
|
|
1696
|
+
mat4 bone = boneMatrices[ int(i) ];
|
|
1697
|
+
return bone;
|
|
1698
|
+
}
|
|
1699
|
+
#endif
|
|
1700
|
+
#endif
|
|
1701
|
+
`,skinning_vertex:`#ifdef USE_SKINNING
|
|
1702
|
+
vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
|
|
1703
|
+
vec4 skinned = vec4( 0.0 );
|
|
1704
|
+
skinned += boneMatX * skinVertex * skinWeight.x;
|
|
1705
|
+
skinned += boneMatY * skinVertex * skinWeight.y;
|
|
1706
|
+
skinned += boneMatZ * skinVertex * skinWeight.z;
|
|
1707
|
+
skinned += boneMatW * skinVertex * skinWeight.w;
|
|
1708
|
+
transformed = ( bindMatrixInverse * skinned ).xyz;
|
|
1709
|
+
#endif
|
|
1710
|
+
`,skinnormal_vertex:`#ifdef USE_SKINNING
|
|
1711
|
+
mat4 skinMatrix = mat4( 0.0 );
|
|
1712
|
+
skinMatrix += skinWeight.x * boneMatX;
|
|
1713
|
+
skinMatrix += skinWeight.y * boneMatY;
|
|
1714
|
+
skinMatrix += skinWeight.z * boneMatZ;
|
|
1715
|
+
skinMatrix += skinWeight.w * boneMatW;
|
|
1716
|
+
skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
|
|
1717
|
+
objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
|
|
1718
|
+
#endif
|
|
1719
|
+
`,specularmap_fragment:`float specularStrength;
|
|
1720
|
+
#ifdef USE_SPECULARMAP
|
|
1721
|
+
vec4 texelSpecular = texture2D( specularMap, vUv );
|
|
1722
|
+
specularStrength = texelSpecular.r;
|
|
1723
|
+
#else
|
|
1724
|
+
specularStrength = 1.0;
|
|
1725
|
+
#endif`,specularmap_pars_fragment:`#ifdef USE_SPECULARMAP
|
|
1726
|
+
uniform sampler2D specularMap;
|
|
1727
|
+
#endif`,tonemapping_fragment:`#if defined( TONE_MAPPING )
|
|
1728
|
+
gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
|
|
1729
|
+
#endif
|
|
1730
|
+
`,tonemapping_pars_fragment:`#ifndef saturate
|
|
1731
|
+
#define saturate(a) clamp( a, 0.0, 1.0 )
|
|
1732
|
+
#endif
|
|
1733
|
+
uniform float toneMappingExposure;
|
|
1734
|
+
uniform float toneMappingWhitePoint;
|
|
1735
|
+
vec3 LinearToneMapping( vec3 color ) {
|
|
1736
|
+
return toneMappingExposure * color;
|
|
1737
|
+
}
|
|
1738
|
+
vec3 ReinhardToneMapping( vec3 color ) {
|
|
1739
|
+
color *= toneMappingExposure;
|
|
1740
|
+
return saturate( color / ( vec3( 1.0 ) + color ) );
|
|
1741
|
+
}
|
|
1742
|
+
#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )
|
|
1743
|
+
vec3 Uncharted2ToneMapping( vec3 color ) {
|
|
1744
|
+
color *= toneMappingExposure;
|
|
1745
|
+
return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );
|
|
1746
|
+
}
|
|
1747
|
+
vec3 OptimizedCineonToneMapping( vec3 color ) {
|
|
1748
|
+
color *= toneMappingExposure;
|
|
1749
|
+
color = max( vec3( 0.0 ), color - 0.004 );
|
|
1750
|
+
return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
|
|
1751
|
+
}
|
|
1752
|
+
`,uv_pars_fragment:`#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )
|
|
1753
|
+
varying vec2 vUv;
|
|
1754
|
+
#endif`,uv_pars_vertex:`#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )
|
|
1755
|
+
varying vec2 vUv;
|
|
1756
|
+
uniform mat3 uvTransform;
|
|
1757
|
+
#endif
|
|
1758
|
+
`,uv_vertex:`#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )
|
|
1759
|
+
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
|
|
1760
|
+
#endif`,uv2_pars_fragment:`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
|
|
1761
|
+
varying vec2 vUv2;
|
|
1762
|
+
#endif`,uv2_pars_vertex:`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
|
|
1763
|
+
attribute vec2 uv2;
|
|
1764
|
+
varying vec2 vUv2;
|
|
1765
|
+
#endif`,uv2_vertex:`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
|
|
1766
|
+
vUv2 = uv2;
|
|
1767
|
+
#endif`,worldpos_vertex:`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )
|
|
1768
|
+
vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );
|
|
1769
|
+
#endif
|
|
1770
|
+
`,background_frag:`uniform sampler2D t2D;
|
|
1771
|
+
varying vec2 vUv;
|
|
1772
|
+
void main() {
|
|
1773
|
+
gl_FragColor = texture2D( t2D, vUv );
|
|
1774
|
+
}
|
|
1775
|
+
`,background_vert:`varying vec2 vUv;
|
|
1776
|
+
uniform mat3 uvTransform;
|
|
1777
|
+
void main() {
|
|
1778
|
+
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
|
|
1779
|
+
gl_Position = vec4( position, 1.0 );
|
|
1780
|
+
gl_Position.z = 1.0;
|
|
1781
|
+
}
|
|
1782
|
+
`,cube_frag:`uniform samplerCube tCube;
|
|
1783
|
+
uniform float tFlip;
|
|
1784
|
+
uniform float opacity;
|
|
1785
|
+
varying vec3 vWorldDirection;
|
|
1786
|
+
void main() {
|
|
1787
|
+
gl_FragColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
|
|
1788
|
+
gl_FragColor.a *= opacity;
|
|
1789
|
+
}
|
|
1790
|
+
`,cube_vert:`varying vec3 vWorldDirection;
|
|
1791
|
+
#include <common>
|
|
1792
|
+
void main() {
|
|
1793
|
+
vWorldDirection = transformDirection( position, modelMatrix );
|
|
1794
|
+
#include <begin_vertex>
|
|
1795
|
+
#include <project_vertex>
|
|
1796
|
+
gl_Position.z = gl_Position.w;
|
|
1797
|
+
}
|
|
1798
|
+
`,depth_frag:`#if DEPTH_PACKING == 3200
|
|
1799
|
+
uniform float opacity;
|
|
1800
|
+
#endif
|
|
1801
|
+
#include <common>
|
|
1802
|
+
#include <packing>
|
|
1803
|
+
#include <uv_pars_fragment>
|
|
1804
|
+
#include <map_pars_fragment>
|
|
1805
|
+
#include <alphamap_pars_fragment>
|
|
1806
|
+
#include <logdepthbuf_pars_fragment>
|
|
1807
|
+
#include <clipping_planes_pars_fragment>
|
|
1808
|
+
void main() {
|
|
1809
|
+
#include <clipping_planes_fragment>
|
|
1810
|
+
vec4 diffuseColor = vec4( 1.0 );
|
|
1811
|
+
#if DEPTH_PACKING == 3200
|
|
1812
|
+
diffuseColor.a = opacity;
|
|
1813
|
+
#endif
|
|
1814
|
+
#include <map_fragment>
|
|
1815
|
+
#include <alphamap_fragment>
|
|
1816
|
+
#include <alphatest_fragment>
|
|
1817
|
+
#include <logdepthbuf_fragment>
|
|
1818
|
+
#if DEPTH_PACKING == 3200
|
|
1819
|
+
gl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );
|
|
1820
|
+
#elif DEPTH_PACKING == 3201
|
|
1821
|
+
gl_FragColor = packDepthToRGBA( gl_FragCoord.z );
|
|
1822
|
+
#endif
|
|
1823
|
+
}
|
|
1824
|
+
`,depth_vert:`#include <common>
|
|
1825
|
+
#include <uv_pars_vertex>
|
|
1826
|
+
#include <displacementmap_pars_vertex>
|
|
1827
|
+
#include <morphtarget_pars_vertex>
|
|
1828
|
+
#include <skinning_pars_vertex>
|
|
1829
|
+
#include <logdepthbuf_pars_vertex>
|
|
1830
|
+
#include <clipping_planes_pars_vertex>
|
|
1831
|
+
void main() {
|
|
1832
|
+
#include <uv_vertex>
|
|
1833
|
+
#include <skinbase_vertex>
|
|
1834
|
+
#ifdef USE_DISPLACEMENTMAP
|
|
1835
|
+
#include <beginnormal_vertex>
|
|
1836
|
+
#include <morphnormal_vertex>
|
|
1837
|
+
#include <skinnormal_vertex>
|
|
1838
|
+
#endif
|
|
1839
|
+
#include <begin_vertex>
|
|
1840
|
+
#include <morphtarget_vertex>
|
|
1841
|
+
#include <skinning_vertex>
|
|
1842
|
+
#include <displacementmap_vertex>
|
|
1843
|
+
#include <project_vertex>
|
|
1844
|
+
#include <logdepthbuf_vertex>
|
|
1845
|
+
#include <clipping_planes_vertex>
|
|
1846
|
+
}
|
|
1847
|
+
`,distanceRGBA_frag:`#define DISTANCE
|
|
1848
|
+
uniform vec3 referencePosition;
|
|
1849
|
+
uniform float nearDistance;
|
|
1850
|
+
uniform float farDistance;
|
|
1851
|
+
varying vec3 vWorldPosition;
|
|
1852
|
+
#include <common>
|
|
1853
|
+
#include <packing>
|
|
1854
|
+
#include <uv_pars_fragment>
|
|
1855
|
+
#include <map_pars_fragment>
|
|
1856
|
+
#include <alphamap_pars_fragment>
|
|
1857
|
+
#include <clipping_planes_pars_fragment>
|
|
1858
|
+
void main () {
|
|
1859
|
+
#include <clipping_planes_fragment>
|
|
1860
|
+
vec4 diffuseColor = vec4( 1.0 );
|
|
1861
|
+
#include <map_fragment>
|
|
1862
|
+
#include <alphamap_fragment>
|
|
1863
|
+
#include <alphatest_fragment>
|
|
1864
|
+
float dist = length( vWorldPosition - referencePosition );
|
|
1865
|
+
dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
|
|
1866
|
+
dist = saturate( dist );
|
|
1867
|
+
gl_FragColor = packDepthToRGBA( dist );
|
|
1868
|
+
}
|
|
1869
|
+
`,distanceRGBA_vert:`#define DISTANCE
|
|
1870
|
+
varying vec3 vWorldPosition;
|
|
1871
|
+
#include <common>
|
|
1872
|
+
#include <uv_pars_vertex>
|
|
1873
|
+
#include <displacementmap_pars_vertex>
|
|
1874
|
+
#include <morphtarget_pars_vertex>
|
|
1875
|
+
#include <skinning_pars_vertex>
|
|
1876
|
+
#include <clipping_planes_pars_vertex>
|
|
1877
|
+
void main() {
|
|
1878
|
+
#include <uv_vertex>
|
|
1879
|
+
#include <skinbase_vertex>
|
|
1880
|
+
#ifdef USE_DISPLACEMENTMAP
|
|
1881
|
+
#include <beginnormal_vertex>
|
|
1882
|
+
#include <morphnormal_vertex>
|
|
1883
|
+
#include <skinnormal_vertex>
|
|
1884
|
+
#endif
|
|
1885
|
+
#include <begin_vertex>
|
|
1886
|
+
#include <morphtarget_vertex>
|
|
1887
|
+
#include <skinning_vertex>
|
|
1888
|
+
#include <displacementmap_vertex>
|
|
1889
|
+
#include <project_vertex>
|
|
1890
|
+
#include <worldpos_vertex>
|
|
1891
|
+
#include <clipping_planes_vertex>
|
|
1892
|
+
vWorldPosition = worldPosition.xyz;
|
|
1893
|
+
}
|
|
1894
|
+
`,equirect_frag:`uniform sampler2D tEquirect;
|
|
1895
|
+
varying vec3 vWorldDirection;
|
|
1896
|
+
#include <common>
|
|
1897
|
+
void main() {
|
|
1898
|
+
vec3 direction = normalize( vWorldDirection );
|
|
1899
|
+
vec2 sampleUV;
|
|
1900
|
+
sampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
|
|
1901
|
+
sampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;
|
|
1902
|
+
gl_FragColor = texture2D( tEquirect, sampleUV );
|
|
1903
|
+
}
|
|
1904
|
+
`,equirect_vert:`varying vec3 vWorldDirection;
|
|
1905
|
+
#include <common>
|
|
1906
|
+
void main() {
|
|
1907
|
+
vWorldDirection = transformDirection( position, modelMatrix );
|
|
1908
|
+
#include <begin_vertex>
|
|
1909
|
+
#include <project_vertex>
|
|
1910
|
+
}
|
|
1911
|
+
`,linedashed_frag:`uniform vec3 diffuse;
|
|
1912
|
+
uniform float opacity;
|
|
1913
|
+
uniform float dashSize;
|
|
1914
|
+
uniform float totalSize;
|
|
1915
|
+
varying float vLineDistance;
|
|
1916
|
+
#include <common>
|
|
1917
|
+
#include <color_pars_fragment>
|
|
1918
|
+
#include <fog_pars_fragment>
|
|
1919
|
+
#include <logdepthbuf_pars_fragment>
|
|
1920
|
+
#include <clipping_planes_pars_fragment>
|
|
1921
|
+
void main() {
|
|
1922
|
+
#include <clipping_planes_fragment>
|
|
1923
|
+
if ( mod( vLineDistance, totalSize ) > dashSize ) {
|
|
1924
|
+
discard;
|
|
1925
|
+
}
|
|
1926
|
+
vec3 outgoingLight = vec3( 0.0 );
|
|
1927
|
+
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
1928
|
+
#include <logdepthbuf_fragment>
|
|
1929
|
+
#include <color_fragment>
|
|
1930
|
+
outgoingLight = diffuseColor.rgb;
|
|
1931
|
+
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
|
|
1932
|
+
#include <premultiplied_alpha_fragment>
|
|
1933
|
+
#include <tonemapping_fragment>
|
|
1934
|
+
#include <encodings_fragment>
|
|
1935
|
+
#include <fog_fragment>
|
|
1936
|
+
}
|
|
1937
|
+
`,linedashed_vert:`uniform float scale;
|
|
1938
|
+
attribute float lineDistance;
|
|
1939
|
+
varying float vLineDistance;
|
|
1940
|
+
#include <common>
|
|
1941
|
+
#include <color_pars_vertex>
|
|
1942
|
+
#include <fog_pars_vertex>
|
|
1943
|
+
#include <logdepthbuf_pars_vertex>
|
|
1944
|
+
#include <clipping_planes_pars_vertex>
|
|
1945
|
+
void main() {
|
|
1946
|
+
#include <color_vertex>
|
|
1947
|
+
vLineDistance = scale * lineDistance;
|
|
1948
|
+
vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
|
|
1949
|
+
gl_Position = projectionMatrix * mvPosition;
|
|
1950
|
+
#include <logdepthbuf_vertex>
|
|
1951
|
+
#include <clipping_planes_vertex>
|
|
1952
|
+
#include <fog_vertex>
|
|
1953
|
+
}
|
|
1954
|
+
`,meshbasic_frag:`uniform vec3 diffuse;
|
|
1955
|
+
uniform float opacity;
|
|
1956
|
+
#ifndef FLAT_SHADED
|
|
1957
|
+
varying vec3 vNormal;
|
|
1958
|
+
#endif
|
|
1959
|
+
#include <common>
|
|
1960
|
+
#include <color_pars_fragment>
|
|
1961
|
+
#include <uv_pars_fragment>
|
|
1962
|
+
#include <uv2_pars_fragment>
|
|
1963
|
+
#include <map_pars_fragment>
|
|
1964
|
+
#include <alphamap_pars_fragment>
|
|
1965
|
+
#include <aomap_pars_fragment>
|
|
1966
|
+
#include <lightmap_pars_fragment>
|
|
1967
|
+
#include <envmap_pars_fragment>
|
|
1968
|
+
#include <fog_pars_fragment>
|
|
1969
|
+
#include <specularmap_pars_fragment>
|
|
1970
|
+
#include <logdepthbuf_pars_fragment>
|
|
1971
|
+
#include <clipping_planes_pars_fragment>
|
|
1972
|
+
void main() {
|
|
1973
|
+
#include <clipping_planes_fragment>
|
|
1974
|
+
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
1975
|
+
#include <logdepthbuf_fragment>
|
|
1976
|
+
#include <map_fragment>
|
|
1977
|
+
#include <color_fragment>
|
|
1978
|
+
#include <alphamap_fragment>
|
|
1979
|
+
#include <alphatest_fragment>
|
|
1980
|
+
#include <specularmap_fragment>
|
|
1981
|
+
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
|
|
1982
|
+
#ifdef USE_LIGHTMAP
|
|
1983
|
+
reflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;
|
|
1984
|
+
#else
|
|
1985
|
+
reflectedLight.indirectDiffuse += vec3( 1.0 );
|
|
1986
|
+
#endif
|
|
1987
|
+
#include <aomap_fragment>
|
|
1988
|
+
reflectedLight.indirectDiffuse *= diffuseColor.rgb;
|
|
1989
|
+
vec3 outgoingLight = reflectedLight.indirectDiffuse;
|
|
1990
|
+
#include <envmap_fragment>
|
|
1991
|
+
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
|
|
1992
|
+
#include <premultiplied_alpha_fragment>
|
|
1993
|
+
#include <tonemapping_fragment>
|
|
1994
|
+
#include <encodings_fragment>
|
|
1995
|
+
#include <fog_fragment>
|
|
1996
|
+
}
|
|
1997
|
+
`,meshbasic_vert:`#include <common>
|
|
1998
|
+
#include <uv_pars_vertex>
|
|
1999
|
+
#include <uv2_pars_vertex>
|
|
2000
|
+
#include <envmap_pars_vertex>
|
|
2001
|
+
#include <color_pars_vertex>
|
|
2002
|
+
#include <fog_pars_vertex>
|
|
2003
|
+
#include <morphtarget_pars_vertex>
|
|
2004
|
+
#include <skinning_pars_vertex>
|
|
2005
|
+
#include <logdepthbuf_pars_vertex>
|
|
2006
|
+
#include <clipping_planes_pars_vertex>
|
|
2007
|
+
void main() {
|
|
2008
|
+
#include <uv_vertex>
|
|
2009
|
+
#include <uv2_vertex>
|
|
2010
|
+
#include <color_vertex>
|
|
2011
|
+
#include <skinbase_vertex>
|
|
2012
|
+
#ifdef USE_ENVMAP
|
|
2013
|
+
#include <beginnormal_vertex>
|
|
2014
|
+
#include <morphnormal_vertex>
|
|
2015
|
+
#include <skinnormal_vertex>
|
|
2016
|
+
#include <defaultnormal_vertex>
|
|
2017
|
+
#endif
|
|
2018
|
+
#include <begin_vertex>
|
|
2019
|
+
#include <morphtarget_vertex>
|
|
2020
|
+
#include <skinning_vertex>
|
|
2021
|
+
#include <project_vertex>
|
|
2022
|
+
#include <logdepthbuf_vertex>
|
|
2023
|
+
#include <worldpos_vertex>
|
|
2024
|
+
#include <clipping_planes_vertex>
|
|
2025
|
+
#include <envmap_vertex>
|
|
2026
|
+
#include <fog_vertex>
|
|
2027
|
+
}
|
|
2028
|
+
`,meshlambert_frag:`uniform vec3 diffuse;
|
|
2029
|
+
uniform vec3 emissive;
|
|
2030
|
+
uniform float opacity;
|
|
2031
|
+
varying vec3 vLightFront;
|
|
2032
|
+
#ifdef DOUBLE_SIDED
|
|
2033
|
+
varying vec3 vLightBack;
|
|
2034
|
+
#endif
|
|
2035
|
+
#include <common>
|
|
2036
|
+
#include <packing>
|
|
2037
|
+
#include <dithering_pars_fragment>
|
|
2038
|
+
#include <color_pars_fragment>
|
|
2039
|
+
#include <uv_pars_fragment>
|
|
2040
|
+
#include <uv2_pars_fragment>
|
|
2041
|
+
#include <map_pars_fragment>
|
|
2042
|
+
#include <alphamap_pars_fragment>
|
|
2043
|
+
#include <aomap_pars_fragment>
|
|
2044
|
+
#include <lightmap_pars_fragment>
|
|
2045
|
+
#include <emissivemap_pars_fragment>
|
|
2046
|
+
#include <envmap_pars_fragment>
|
|
2047
|
+
#include <bsdfs>
|
|
2048
|
+
#include <lights_pars_begin>
|
|
2049
|
+
#include <fog_pars_fragment>
|
|
2050
|
+
#include <shadowmap_pars_fragment>
|
|
2051
|
+
#include <shadowmask_pars_fragment>
|
|
2052
|
+
#include <specularmap_pars_fragment>
|
|
2053
|
+
#include <logdepthbuf_pars_fragment>
|
|
2054
|
+
#include <clipping_planes_pars_fragment>
|
|
2055
|
+
void main() {
|
|
2056
|
+
#include <clipping_planes_fragment>
|
|
2057
|
+
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
2058
|
+
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
|
|
2059
|
+
vec3 totalEmissiveRadiance = emissive;
|
|
2060
|
+
#include <logdepthbuf_fragment>
|
|
2061
|
+
#include <map_fragment>
|
|
2062
|
+
#include <color_fragment>
|
|
2063
|
+
#include <alphamap_fragment>
|
|
2064
|
+
#include <alphatest_fragment>
|
|
2065
|
+
#include <specularmap_fragment>
|
|
2066
|
+
#include <emissivemap_fragment>
|
|
2067
|
+
reflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );
|
|
2068
|
+
#include <lightmap_fragment>
|
|
2069
|
+
reflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );
|
|
2070
|
+
#ifdef DOUBLE_SIDED
|
|
2071
|
+
reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;
|
|
2072
|
+
#else
|
|
2073
|
+
reflectedLight.directDiffuse = vLightFront;
|
|
2074
|
+
#endif
|
|
2075
|
+
reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();
|
|
2076
|
+
#include <aomap_fragment>
|
|
2077
|
+
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
|
|
2078
|
+
#include <envmap_fragment>
|
|
2079
|
+
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
|
|
2080
|
+
#include <tonemapping_fragment>
|
|
2081
|
+
#include <encodings_fragment>
|
|
2082
|
+
#include <fog_fragment>
|
|
2083
|
+
#include <premultiplied_alpha_fragment>
|
|
2084
|
+
#include <dithering_fragment>
|
|
2085
|
+
}
|
|
2086
|
+
`,meshlambert_vert:`#define LAMBERT
|
|
2087
|
+
varying vec3 vLightFront;
|
|
2088
|
+
#ifdef DOUBLE_SIDED
|
|
2089
|
+
varying vec3 vLightBack;
|
|
2090
|
+
#endif
|
|
2091
|
+
#include <common>
|
|
2092
|
+
#include <uv_pars_vertex>
|
|
2093
|
+
#include <uv2_pars_vertex>
|
|
2094
|
+
#include <envmap_pars_vertex>
|
|
2095
|
+
#include <bsdfs>
|
|
2096
|
+
#include <lights_pars_begin>
|
|
2097
|
+
#include <color_pars_vertex>
|
|
2098
|
+
#include <fog_pars_vertex>
|
|
2099
|
+
#include <morphtarget_pars_vertex>
|
|
2100
|
+
#include <skinning_pars_vertex>
|
|
2101
|
+
#include <shadowmap_pars_vertex>
|
|
2102
|
+
#include <logdepthbuf_pars_vertex>
|
|
2103
|
+
#include <clipping_planes_pars_vertex>
|
|
2104
|
+
void main() {
|
|
2105
|
+
#include <uv_vertex>
|
|
2106
|
+
#include <uv2_vertex>
|
|
2107
|
+
#include <color_vertex>
|
|
2108
|
+
#include <beginnormal_vertex>
|
|
2109
|
+
#include <morphnormal_vertex>
|
|
2110
|
+
#include <skinbase_vertex>
|
|
2111
|
+
#include <skinnormal_vertex>
|
|
2112
|
+
#include <defaultnormal_vertex>
|
|
2113
|
+
#include <begin_vertex>
|
|
2114
|
+
#include <morphtarget_vertex>
|
|
2115
|
+
#include <skinning_vertex>
|
|
2116
|
+
#include <project_vertex>
|
|
2117
|
+
#include <logdepthbuf_vertex>
|
|
2118
|
+
#include <clipping_planes_vertex>
|
|
2119
|
+
#include <worldpos_vertex>
|
|
2120
|
+
#include <envmap_vertex>
|
|
2121
|
+
#include <lights_lambert_vertex>
|
|
2122
|
+
#include <shadowmap_vertex>
|
|
2123
|
+
#include <fog_vertex>
|
|
2124
|
+
}
|
|
2125
|
+
`,meshmatcap_frag:`#define MATCAP
|
|
2126
|
+
uniform vec3 diffuse;
|
|
2127
|
+
uniform float opacity;
|
|
2128
|
+
uniform sampler2D matcap;
|
|
2129
|
+
varying vec3 vViewPosition;
|
|
2130
|
+
#ifndef FLAT_SHADED
|
|
2131
|
+
varying vec3 vNormal;
|
|
2132
|
+
#endif
|
|
2133
|
+
#include <common>
|
|
2134
|
+
#include <uv_pars_fragment>
|
|
2135
|
+
#include <map_pars_fragment>
|
|
2136
|
+
#include <alphamap_pars_fragment>
|
|
2137
|
+
#include <fog_pars_fragment>
|
|
2138
|
+
#include <bumpmap_pars_fragment>
|
|
2139
|
+
#include <normalmap_pars_fragment>
|
|
2140
|
+
#include <logdepthbuf_pars_fragment>
|
|
2141
|
+
#include <clipping_planes_pars_fragment>
|
|
2142
|
+
void main() {
|
|
2143
|
+
#include <clipping_planes_fragment>
|
|
2144
|
+
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
2145
|
+
#include <logdepthbuf_fragment>
|
|
2146
|
+
#include <map_fragment>
|
|
2147
|
+
#include <alphamap_fragment>
|
|
2148
|
+
#include <alphatest_fragment>
|
|
2149
|
+
#include <normal_fragment_begin>
|
|
2150
|
+
#include <normal_fragment_maps>
|
|
2151
|
+
vec3 viewDir = normalize( vViewPosition );
|
|
2152
|
+
vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
|
|
2153
|
+
vec3 y = cross( viewDir, x );
|
|
2154
|
+
vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
|
|
2155
|
+
vec4 matcapColor = texture2D( matcap, uv );
|
|
2156
|
+
matcapColor = matcapTexelToLinear( matcapColor );
|
|
2157
|
+
vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
|
|
2158
|
+
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
|
|
2159
|
+
#include <premultiplied_alpha_fragment>
|
|
2160
|
+
#include <tonemapping_fragment>
|
|
2161
|
+
#include <encodings_fragment>
|
|
2162
|
+
#include <fog_fragment>
|
|
2163
|
+
}
|
|
2164
|
+
`,meshmatcap_vert:`#define MATCAP
|
|
2165
|
+
varying vec3 vViewPosition;
|
|
2166
|
+
#ifndef FLAT_SHADED
|
|
2167
|
+
varying vec3 vNormal;
|
|
2168
|
+
#endif
|
|
2169
|
+
#include <common>
|
|
2170
|
+
#include <uv_pars_vertex>
|
|
2171
|
+
#include <displacementmap_pars_vertex>
|
|
2172
|
+
#include <fog_pars_vertex>
|
|
2173
|
+
#include <morphtarget_pars_vertex>
|
|
2174
|
+
#include <skinning_pars_vertex>
|
|
2175
|
+
#include <logdepthbuf_pars_vertex>
|
|
2176
|
+
#include <clipping_planes_pars_vertex>
|
|
2177
|
+
void main() {
|
|
2178
|
+
#include <uv_vertex>
|
|
2179
|
+
#include <beginnormal_vertex>
|
|
2180
|
+
#include <morphnormal_vertex>
|
|
2181
|
+
#include <skinbase_vertex>
|
|
2182
|
+
#include <skinnormal_vertex>
|
|
2183
|
+
#include <defaultnormal_vertex>
|
|
2184
|
+
#ifndef FLAT_SHADED
|
|
2185
|
+
vNormal = normalize( transformedNormal );
|
|
2186
|
+
#endif
|
|
2187
|
+
#include <begin_vertex>
|
|
2188
|
+
#include <morphtarget_vertex>
|
|
2189
|
+
#include <skinning_vertex>
|
|
2190
|
+
#include <displacementmap_vertex>
|
|
2191
|
+
#include <project_vertex>
|
|
2192
|
+
#include <logdepthbuf_vertex>
|
|
2193
|
+
#include <clipping_planes_vertex>
|
|
2194
|
+
#include <fog_vertex>
|
|
2195
|
+
vViewPosition = - mvPosition.xyz;
|
|
2196
|
+
}
|
|
2197
|
+
`,meshphong_frag:`#define PHONG
|
|
2198
|
+
uniform vec3 diffuse;
|
|
2199
|
+
uniform vec3 emissive;
|
|
2200
|
+
uniform vec3 specular;
|
|
2201
|
+
uniform float shininess;
|
|
2202
|
+
uniform float opacity;
|
|
2203
|
+
#include <common>
|
|
2204
|
+
#include <packing>
|
|
2205
|
+
#include <dithering_pars_fragment>
|
|
2206
|
+
#include <color_pars_fragment>
|
|
2207
|
+
#include <uv_pars_fragment>
|
|
2208
|
+
#include <uv2_pars_fragment>
|
|
2209
|
+
#include <map_pars_fragment>
|
|
2210
|
+
#include <alphamap_pars_fragment>
|
|
2211
|
+
#include <aomap_pars_fragment>
|
|
2212
|
+
#include <lightmap_pars_fragment>
|
|
2213
|
+
#include <emissivemap_pars_fragment>
|
|
2214
|
+
#include <envmap_pars_fragment>
|
|
2215
|
+
#include <gradientmap_pars_fragment>
|
|
2216
|
+
#include <fog_pars_fragment>
|
|
2217
|
+
#include <bsdfs>
|
|
2218
|
+
#include <lights_pars_begin>
|
|
2219
|
+
#include <lights_phong_pars_fragment>
|
|
2220
|
+
#include <shadowmap_pars_fragment>
|
|
2221
|
+
#include <bumpmap_pars_fragment>
|
|
2222
|
+
#include <normalmap_pars_fragment>
|
|
2223
|
+
#include <specularmap_pars_fragment>
|
|
2224
|
+
#include <logdepthbuf_pars_fragment>
|
|
2225
|
+
#include <clipping_planes_pars_fragment>
|
|
2226
|
+
void main() {
|
|
2227
|
+
#include <clipping_planes_fragment>
|
|
2228
|
+
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
2229
|
+
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
|
|
2230
|
+
vec3 totalEmissiveRadiance = emissive;
|
|
2231
|
+
#include <logdepthbuf_fragment>
|
|
2232
|
+
#include <map_fragment>
|
|
2233
|
+
#include <color_fragment>
|
|
2234
|
+
#include <alphamap_fragment>
|
|
2235
|
+
#include <alphatest_fragment>
|
|
2236
|
+
#include <specularmap_fragment>
|
|
2237
|
+
#include <normal_fragment_begin>
|
|
2238
|
+
#include <normal_fragment_maps>
|
|
2239
|
+
#include <emissivemap_fragment>
|
|
2240
|
+
#include <lights_phong_fragment>
|
|
2241
|
+
#include <lights_fragment_begin>
|
|
2242
|
+
#include <lights_fragment_maps>
|
|
2243
|
+
#include <lights_fragment_end>
|
|
2244
|
+
#include <aomap_fragment>
|
|
2245
|
+
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
|
|
2246
|
+
#include <envmap_fragment>
|
|
2247
|
+
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
|
|
2248
|
+
#include <tonemapping_fragment>
|
|
2249
|
+
#include <encodings_fragment>
|
|
2250
|
+
#include <fog_fragment>
|
|
2251
|
+
#include <premultiplied_alpha_fragment>
|
|
2252
|
+
#include <dithering_fragment>
|
|
2253
|
+
}
|
|
2254
|
+
`,meshphong_vert:`#define PHONG
|
|
2255
|
+
varying vec3 vViewPosition;
|
|
2256
|
+
#ifndef FLAT_SHADED
|
|
2257
|
+
varying vec3 vNormal;
|
|
2258
|
+
#endif
|
|
2259
|
+
#include <common>
|
|
2260
|
+
#include <uv_pars_vertex>
|
|
2261
|
+
#include <uv2_pars_vertex>
|
|
2262
|
+
#include <displacementmap_pars_vertex>
|
|
2263
|
+
#include <envmap_pars_vertex>
|
|
2264
|
+
#include <color_pars_vertex>
|
|
2265
|
+
#include <fog_pars_vertex>
|
|
2266
|
+
#include <morphtarget_pars_vertex>
|
|
2267
|
+
#include <skinning_pars_vertex>
|
|
2268
|
+
#include <shadowmap_pars_vertex>
|
|
2269
|
+
#include <logdepthbuf_pars_vertex>
|
|
2270
|
+
#include <clipping_planes_pars_vertex>
|
|
2271
|
+
void main() {
|
|
2272
|
+
#include <uv_vertex>
|
|
2273
|
+
#include <uv2_vertex>
|
|
2274
|
+
#include <color_vertex>
|
|
2275
|
+
#include <beginnormal_vertex>
|
|
2276
|
+
#include <morphnormal_vertex>
|
|
2277
|
+
#include <skinbase_vertex>
|
|
2278
|
+
#include <skinnormal_vertex>
|
|
2279
|
+
#include <defaultnormal_vertex>
|
|
2280
|
+
#ifndef FLAT_SHADED
|
|
2281
|
+
vNormal = normalize( transformedNormal );
|
|
2282
|
+
#endif
|
|
2283
|
+
#include <begin_vertex>
|
|
2284
|
+
#include <morphtarget_vertex>
|
|
2285
|
+
#include <skinning_vertex>
|
|
2286
|
+
#include <displacementmap_vertex>
|
|
2287
|
+
#include <project_vertex>
|
|
2288
|
+
#include <logdepthbuf_vertex>
|
|
2289
|
+
#include <clipping_planes_vertex>
|
|
2290
|
+
vViewPosition = - mvPosition.xyz;
|
|
2291
|
+
#include <worldpos_vertex>
|
|
2292
|
+
#include <envmap_vertex>
|
|
2293
|
+
#include <shadowmap_vertex>
|
|
2294
|
+
#include <fog_vertex>
|
|
2295
|
+
}
|
|
2296
|
+
`,meshphysical_frag:`#define PHYSICAL
|
|
2297
|
+
uniform vec3 diffuse;
|
|
2298
|
+
uniform vec3 emissive;
|
|
2299
|
+
uniform float roughness;
|
|
2300
|
+
uniform float metalness;
|
|
2301
|
+
uniform float opacity;
|
|
2302
|
+
#ifndef STANDARD
|
|
2303
|
+
uniform float clearCoat;
|
|
2304
|
+
uniform float clearCoatRoughness;
|
|
2305
|
+
#endif
|
|
2306
|
+
varying vec3 vViewPosition;
|
|
2307
|
+
#ifndef FLAT_SHADED
|
|
2308
|
+
varying vec3 vNormal;
|
|
2309
|
+
#endif
|
|
2310
|
+
#include <common>
|
|
2311
|
+
#include <packing>
|
|
2312
|
+
#include <dithering_pars_fragment>
|
|
2313
|
+
#include <color_pars_fragment>
|
|
2314
|
+
#include <uv_pars_fragment>
|
|
2315
|
+
#include <uv2_pars_fragment>
|
|
2316
|
+
#include <map_pars_fragment>
|
|
2317
|
+
#include <alphamap_pars_fragment>
|
|
2318
|
+
#include <aomap_pars_fragment>
|
|
2319
|
+
#include <lightmap_pars_fragment>
|
|
2320
|
+
#include <emissivemap_pars_fragment>
|
|
2321
|
+
#include <bsdfs>
|
|
2322
|
+
#include <cube_uv_reflection_fragment>
|
|
2323
|
+
#include <envmap_pars_fragment>
|
|
2324
|
+
#include <envmap_physical_pars_fragment>
|
|
2325
|
+
#include <fog_pars_fragment>
|
|
2326
|
+
#include <lights_pars_begin>
|
|
2327
|
+
#include <lights_physical_pars_fragment>
|
|
2328
|
+
#include <shadowmap_pars_fragment>
|
|
2329
|
+
#include <bumpmap_pars_fragment>
|
|
2330
|
+
#include <normalmap_pars_fragment>
|
|
2331
|
+
#include <roughnessmap_pars_fragment>
|
|
2332
|
+
#include <metalnessmap_pars_fragment>
|
|
2333
|
+
#include <logdepthbuf_pars_fragment>
|
|
2334
|
+
#include <clipping_planes_pars_fragment>
|
|
2335
|
+
void main() {
|
|
2336
|
+
#include <clipping_planes_fragment>
|
|
2337
|
+
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
2338
|
+
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
|
|
2339
|
+
vec3 totalEmissiveRadiance = emissive;
|
|
2340
|
+
#include <logdepthbuf_fragment>
|
|
2341
|
+
#include <map_fragment>
|
|
2342
|
+
#include <color_fragment>
|
|
2343
|
+
#include <alphamap_fragment>
|
|
2344
|
+
#include <alphatest_fragment>
|
|
2345
|
+
#include <roughnessmap_fragment>
|
|
2346
|
+
#include <metalnessmap_fragment>
|
|
2347
|
+
#include <normal_fragment_begin>
|
|
2348
|
+
#include <normal_fragment_maps>
|
|
2349
|
+
#include <emissivemap_fragment>
|
|
2350
|
+
#include <lights_physical_fragment>
|
|
2351
|
+
#include <lights_fragment_begin>
|
|
2352
|
+
#include <lights_fragment_maps>
|
|
2353
|
+
#include <lights_fragment_end>
|
|
2354
|
+
#include <aomap_fragment>
|
|
2355
|
+
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
|
|
2356
|
+
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
|
|
2357
|
+
#include <tonemapping_fragment>
|
|
2358
|
+
#include <encodings_fragment>
|
|
2359
|
+
#include <fog_fragment>
|
|
2360
|
+
#include <premultiplied_alpha_fragment>
|
|
2361
|
+
#include <dithering_fragment>
|
|
2362
|
+
}
|
|
2363
|
+
`,meshphysical_vert:`#define PHYSICAL
|
|
2364
|
+
varying vec3 vViewPosition;
|
|
2365
|
+
#ifndef FLAT_SHADED
|
|
2366
|
+
varying vec3 vNormal;
|
|
2367
|
+
#endif
|
|
2368
|
+
#include <common>
|
|
2369
|
+
#include <uv_pars_vertex>
|
|
2370
|
+
#include <uv2_pars_vertex>
|
|
2371
|
+
#include <displacementmap_pars_vertex>
|
|
2372
|
+
#include <color_pars_vertex>
|
|
2373
|
+
#include <fog_pars_vertex>
|
|
2374
|
+
#include <morphtarget_pars_vertex>
|
|
2375
|
+
#include <skinning_pars_vertex>
|
|
2376
|
+
#include <shadowmap_pars_vertex>
|
|
2377
|
+
#include <logdepthbuf_pars_vertex>
|
|
2378
|
+
#include <clipping_planes_pars_vertex>
|
|
2379
|
+
void main() {
|
|
2380
|
+
#include <uv_vertex>
|
|
2381
|
+
#include <uv2_vertex>
|
|
2382
|
+
#include <color_vertex>
|
|
2383
|
+
#include <beginnormal_vertex>
|
|
2384
|
+
#include <morphnormal_vertex>
|
|
2385
|
+
#include <skinbase_vertex>
|
|
2386
|
+
#include <skinnormal_vertex>
|
|
2387
|
+
#include <defaultnormal_vertex>
|
|
2388
|
+
#ifndef FLAT_SHADED
|
|
2389
|
+
vNormal = normalize( transformedNormal );
|
|
2390
|
+
#endif
|
|
2391
|
+
#include <begin_vertex>
|
|
2392
|
+
#include <morphtarget_vertex>
|
|
2393
|
+
#include <skinning_vertex>
|
|
2394
|
+
#include <displacementmap_vertex>
|
|
2395
|
+
#include <project_vertex>
|
|
2396
|
+
#include <logdepthbuf_vertex>
|
|
2397
|
+
#include <clipping_planes_vertex>
|
|
2398
|
+
vViewPosition = - mvPosition.xyz;
|
|
2399
|
+
#include <worldpos_vertex>
|
|
2400
|
+
#include <shadowmap_vertex>
|
|
2401
|
+
#include <fog_vertex>
|
|
2402
|
+
}
|
|
2403
|
+
`,normal_frag:`#define NORMAL
|
|
2404
|
+
uniform float opacity;
|
|
2405
|
+
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )
|
|
2406
|
+
varying vec3 vViewPosition;
|
|
2407
|
+
#endif
|
|
2408
|
+
#ifndef FLAT_SHADED
|
|
2409
|
+
varying vec3 vNormal;
|
|
2410
|
+
#endif
|
|
2411
|
+
#include <packing>
|
|
2412
|
+
#include <uv_pars_fragment>
|
|
2413
|
+
#include <bumpmap_pars_fragment>
|
|
2414
|
+
#include <normalmap_pars_fragment>
|
|
2415
|
+
#include <logdepthbuf_pars_fragment>
|
|
2416
|
+
void main() {
|
|
2417
|
+
#include <logdepthbuf_fragment>
|
|
2418
|
+
#include <normal_fragment_begin>
|
|
2419
|
+
#include <normal_fragment_maps>
|
|
2420
|
+
gl_FragColor = vec4( packNormalToRGB( normal ), opacity );
|
|
2421
|
+
}
|
|
2422
|
+
`,normal_vert:`#define NORMAL
|
|
2423
|
+
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )
|
|
2424
|
+
varying vec3 vViewPosition;
|
|
2425
|
+
#endif
|
|
2426
|
+
#ifndef FLAT_SHADED
|
|
2427
|
+
varying vec3 vNormal;
|
|
2428
|
+
#endif
|
|
2429
|
+
#include <uv_pars_vertex>
|
|
2430
|
+
#include <displacementmap_pars_vertex>
|
|
2431
|
+
#include <morphtarget_pars_vertex>
|
|
2432
|
+
#include <skinning_pars_vertex>
|
|
2433
|
+
#include <logdepthbuf_pars_vertex>
|
|
2434
|
+
void main() {
|
|
2435
|
+
#include <uv_vertex>
|
|
2436
|
+
#include <beginnormal_vertex>
|
|
2437
|
+
#include <morphnormal_vertex>
|
|
2438
|
+
#include <skinbase_vertex>
|
|
2439
|
+
#include <skinnormal_vertex>
|
|
2440
|
+
#include <defaultnormal_vertex>
|
|
2441
|
+
#ifndef FLAT_SHADED
|
|
2442
|
+
vNormal = normalize( transformedNormal );
|
|
2443
|
+
#endif
|
|
2444
|
+
#include <begin_vertex>
|
|
2445
|
+
#include <morphtarget_vertex>
|
|
2446
|
+
#include <skinning_vertex>
|
|
2447
|
+
#include <displacementmap_vertex>
|
|
2448
|
+
#include <project_vertex>
|
|
2449
|
+
#include <logdepthbuf_vertex>
|
|
2450
|
+
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )
|
|
2451
|
+
vViewPosition = - mvPosition.xyz;
|
|
2452
|
+
#endif
|
|
2453
|
+
}
|
|
2454
|
+
`,points_frag:`uniform vec3 diffuse;
|
|
2455
|
+
uniform float opacity;
|
|
2456
|
+
#include <common>
|
|
2457
|
+
#include <color_pars_fragment>
|
|
2458
|
+
#include <map_particle_pars_fragment>
|
|
2459
|
+
#include <fog_pars_fragment>
|
|
2460
|
+
#include <logdepthbuf_pars_fragment>
|
|
2461
|
+
#include <clipping_planes_pars_fragment>
|
|
2462
|
+
void main() {
|
|
2463
|
+
#include <clipping_planes_fragment>
|
|
2464
|
+
vec3 outgoingLight = vec3( 0.0 );
|
|
2465
|
+
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
2466
|
+
#include <logdepthbuf_fragment>
|
|
2467
|
+
#include <map_particle_fragment>
|
|
2468
|
+
#include <color_fragment>
|
|
2469
|
+
#include <alphatest_fragment>
|
|
2470
|
+
outgoingLight = diffuseColor.rgb;
|
|
2471
|
+
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
|
|
2472
|
+
#include <premultiplied_alpha_fragment>
|
|
2473
|
+
#include <tonemapping_fragment>
|
|
2474
|
+
#include <encodings_fragment>
|
|
2475
|
+
#include <fog_fragment>
|
|
2476
|
+
}
|
|
2477
|
+
`,points_vert:`uniform float size;
|
|
2478
|
+
uniform float scale;
|
|
2479
|
+
#include <common>
|
|
2480
|
+
#include <color_pars_vertex>
|
|
2481
|
+
#include <fog_pars_vertex>
|
|
2482
|
+
#include <morphtarget_pars_vertex>
|
|
2483
|
+
#include <logdepthbuf_pars_vertex>
|
|
2484
|
+
#include <clipping_planes_pars_vertex>
|
|
2485
|
+
void main() {
|
|
2486
|
+
#include <color_vertex>
|
|
2487
|
+
#include <begin_vertex>
|
|
2488
|
+
#include <morphtarget_vertex>
|
|
2489
|
+
#include <project_vertex>
|
|
2490
|
+
gl_PointSize = size;
|
|
2491
|
+
#ifdef USE_SIZEATTENUATION
|
|
2492
|
+
bool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );
|
|
2493
|
+
if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
|
|
2494
|
+
#endif
|
|
2495
|
+
#include <logdepthbuf_vertex>
|
|
2496
|
+
#include <clipping_planes_vertex>
|
|
2497
|
+
#include <worldpos_vertex>
|
|
2498
|
+
#include <fog_vertex>
|
|
2499
|
+
}
|
|
2500
|
+
`,shadow_frag:`uniform vec3 color;
|
|
2501
|
+
uniform float opacity;
|
|
2502
|
+
#include <common>
|
|
2503
|
+
#include <packing>
|
|
2504
|
+
#include <fog_pars_fragment>
|
|
2505
|
+
#include <bsdfs>
|
|
2506
|
+
#include <lights_pars_begin>
|
|
2507
|
+
#include <shadowmap_pars_fragment>
|
|
2508
|
+
#include <shadowmask_pars_fragment>
|
|
2509
|
+
void main() {
|
|
2510
|
+
gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
|
|
2511
|
+
#include <fog_fragment>
|
|
2512
|
+
}
|
|
2513
|
+
`,shadow_vert:`#include <fog_pars_vertex>
|
|
2514
|
+
#include <shadowmap_pars_vertex>
|
|
2515
|
+
void main() {
|
|
2516
|
+
#include <begin_vertex>
|
|
2517
|
+
#include <project_vertex>
|
|
2518
|
+
#include <worldpos_vertex>
|
|
2519
|
+
#include <shadowmap_vertex>
|
|
2520
|
+
#include <fog_vertex>
|
|
2521
|
+
}
|
|
2522
|
+
`,sprite_frag:`uniform vec3 diffuse;
|
|
2523
|
+
uniform float opacity;
|
|
2524
|
+
#include <common>
|
|
2525
|
+
#include <uv_pars_fragment>
|
|
2526
|
+
#include <map_pars_fragment>
|
|
2527
|
+
#include <fog_pars_fragment>
|
|
2528
|
+
#include <logdepthbuf_pars_fragment>
|
|
2529
|
+
#include <clipping_planes_pars_fragment>
|
|
2530
|
+
void main() {
|
|
2531
|
+
#include <clipping_planes_fragment>
|
|
2532
|
+
vec3 outgoingLight = vec3( 0.0 );
|
|
2533
|
+
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
2534
|
+
#include <logdepthbuf_fragment>
|
|
2535
|
+
#include <map_fragment>
|
|
2536
|
+
#include <alphatest_fragment>
|
|
2537
|
+
outgoingLight = diffuseColor.rgb;
|
|
2538
|
+
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
|
|
2539
|
+
#include <tonemapping_fragment>
|
|
2540
|
+
#include <encodings_fragment>
|
|
2541
|
+
#include <fog_fragment>
|
|
2542
|
+
}
|
|
2543
|
+
`,sprite_vert:`uniform float rotation;
|
|
2544
|
+
uniform vec2 center;
|
|
2545
|
+
#include <common>
|
|
2546
|
+
#include <uv_pars_vertex>
|
|
2547
|
+
#include <fog_pars_vertex>
|
|
2548
|
+
#include <logdepthbuf_pars_vertex>
|
|
2549
|
+
#include <clipping_planes_pars_vertex>
|
|
2550
|
+
void main() {
|
|
2551
|
+
#include <uv_vertex>
|
|
2552
|
+
vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
|
|
2553
|
+
vec2 scale;
|
|
2554
|
+
scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
|
|
2555
|
+
scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
|
|
2556
|
+
#ifndef USE_SIZEATTENUATION
|
|
2557
|
+
bool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );
|
|
2558
|
+
if ( isPerspective ) scale *= - mvPosition.z;
|
|
2559
|
+
#endif
|
|
2560
|
+
vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
|
|
2561
|
+
vec2 rotatedPosition;
|
|
2562
|
+
rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
|
|
2563
|
+
rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
|
|
2564
|
+
mvPosition.xy += rotatedPosition;
|
|
2565
|
+
gl_Position = projectionMatrix * mvPosition;
|
|
2566
|
+
#include <logdepthbuf_vertex>
|
|
2567
|
+
#include <clipping_planes_vertex>
|
|
2568
|
+
#include <fog_vertex>
|
|
2569
|
+
}
|
|
2570
|
+
`},_i={merge:function(t){for(var e={},i=0;i<t.length;i++){var n=this.clone(t[i]),r;for(r in n)e[r]=n[r]}return e},clone:function(t){var e={},i;for(i in t){e[i]={};for(var n in t[i]){var r=t[i][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture)?e[i][n]=r.clone():Array.isArray(r)?e[i][n]=r.slice():e[i][n]=r}}return e}},rh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object.assign(H.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this},setScalar:function(t){return this.b=this.g=this.r=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this},setRGB:function(t,e,i){return this.r=t,this.g=e,this.b=i,this},setHSL:function(){function t(e,i,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?e+6*(i-e)*n:.5>n?i:n<2/3?e+6*(i-e)*(2/3-n):e}return function(e,i,n){return e=Ee.euclideanModulo(e,1),i=Ee.clamp(i,0,1),n=Ee.clamp(n,0,1),i===0?this.r=this.g=this.b=n:(i=.5>=n?n*(1+i):n+i-n*i,n=2*n-i,this.r=t(n,i,e+1/3),this.g=t(n,i,e),this.b=t(n,i,e-1/3)),this}}(),setStyle:function(t){function e(s){s!==void 0&&1>parseFloat(s)&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n=i[2];switch(i[1]){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n)){n=parseFloat(i[1])/360;var r=parseInt(i[2],10)/100,o=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(n,r,o)}}}else if(i=/^#([A-Fa-f0-9]+)$/.exec(t)){if(i=i[1],n=i.length,n===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(n===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return t&&0<t.length&&(i=rh[t],i!==void 0?this.setHex(i):console.warn("THREE.Color: Unknown color "+t)),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return e===void 0&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){return e===void 0&&(e=2),e=0<e?1/e:1,this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},copySRGBToLinear:function(){function t(e){return .04045>e?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),copyLinearToSRGB:function(){function t(e){return .0031308>e?12.92*e:1.055*Math.pow(e,.41666)-.055}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){t===void 0&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e=this.r,i=this.g,n=this.b,r=Math.max(e,i,n),o=Math.min(e,i,n),s,a=(o+r)/2;if(o===r)o=s=0;else{var h=r-o;switch(o=.5>=a?h/(r+o):h/(2-r-o),r){case e:s=(i-n)/h+(i<n?6:0);break;case i:s=(n-e)/h+2;break;case n:s=(e-i)/h+4}s/=6}return t.h=s,t.s=o,t.l=a,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var t={};return function(e,i,n){return this.getHSL(t),t.h+=e,t.s+=i,t.l+=n,this.setHSL(t.h,t.s,t.l),this}}(),add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},lerpHSL:function(){var t={h:0,s:0,l:0},e={h:0,s:0,l:0};return function(i,n){this.getHSL(t),i.getHSL(e),i=Ee.lerp(t.h,e.h,n);var r=Ee.lerp(t.s,e.s,n);return n=Ee.lerp(t.l,e.l,n),this.setHSL(i,r,n),this}}(),equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return e===void 0&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var le={common:{diffuse:{value:new H(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new _t},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 H(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new H(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new _t}},sprite:{diffuse:{value:new H(15658734)},opacity:{value:1},center:{value:new $(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new _t}}},pn={basic:{uniforms:_i.merge([le.common,le.specularmap,le.envmap,le.aomap,le.lightmap,le.fog]),vertexShader:Ie.meshbasic_vert,fragmentShader:Ie.meshbasic_frag},lambert:{uniforms:_i.merge([le.common,le.specularmap,le.envmap,le.aomap,le.lightmap,le.emissivemap,le.fog,le.lights,{emissive:{value:new H(0)}}]),vertexShader:Ie.meshlambert_vert,fragmentShader:Ie.meshlambert_frag},phong:{uniforms:_i.merge([le.common,le.specularmap,le.envmap,le.aomap,le.lightmap,le.emissivemap,le.bumpmap,le.normalmap,le.displacementmap,le.gradientmap,le.fog,le.lights,{emissive:{value:new H(0)},specular:{value:new H(1118481)},shininess:{value:30}}]),vertexShader:Ie.meshphong_vert,fragmentShader:Ie.meshphong_frag},standard:{uniforms:_i.merge([le.common,le.envmap,le.aomap,le.lightmap,le.emissivemap,le.bumpmap,le.normalmap,le.displacementmap,le.roughnessmap,le.metalnessmap,le.fog,le.lights,{emissive:{value:new H(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Ie.meshphysical_vert,fragmentShader:Ie.meshphysical_frag},matcap:{uniforms:_i.merge([le.common,le.bumpmap,le.normalmap,le.displacementmap,le.fog,{matcap:{value:null}}]),vertexShader:Ie.meshmatcap_vert,fragmentShader:Ie.meshmatcap_frag},points:{uniforms:_i.merge([le.points,le.fog]),vertexShader:Ie.points_vert,fragmentShader:Ie.points_frag},dashed:{uniforms:_i.merge([le.common,le.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ie.linedashed_vert,fragmentShader:Ie.linedashed_frag},depth:{uniforms:_i.merge([le.common,le.displacementmap]),vertexShader:Ie.depth_vert,fragmentShader:Ie.depth_frag},normal:{uniforms:_i.merge([le.common,le.bumpmap,le.normalmap,le.displacementmap,{opacity:{value:1}}]),vertexShader:Ie.normal_vert,fragmentShader:Ie.normal_frag},sprite:{uniforms:_i.merge([le.sprite,le.fog]),vertexShader:Ie.sprite_vert,fragmentShader:Ie.sprite_frag},background:{uniforms:{uvTransform:{value:new _t},t2D:{value:null}},vertexShader:Ie.background_vert,fragmentShader:Ie.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ie.cube_vert,fragmentShader:Ie.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ie.equirect_vert,fragmentShader:Ie.equirect_frag},distanceRGBA:{uniforms:_i.merge([le.common,le.displacementmap,{referencePosition:{value:new M},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ie.distanceRGBA_vert,fragmentShader:Ie.distanceRGBA_frag},shadow:{uniforms:_i.merge([le.lights,le.fog,{color:{value:new H(0)},opacity:{value:1}}]),vertexShader:Ie.shadow_vert,fragmentShader:Ie.shadow_frag}};pn.physical={uniforms:_i.merge([pn.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:Ie.meshphysical_vert,fragmentShader:Ie.meshphysical_frag},Object.assign(O.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=Ee.clamp,r=t.elements;t=r[0];var o=r[4],s=r[8],a=r[1],h=r[5],l=r[9],c=r[2],u=r[6];return r=r[10],e=e||this._order,e==="XYZ"?(this._y=Math.asin(n(s,-1,1)),.99999>Math.abs(s)?(this._x=Math.atan2(-l,r),this._z=Math.atan2(-o,t)):(this._x=Math.atan2(u,h),this._z=0)):e==="YXZ"?(this._x=Math.asin(-n(l,-1,1)),.99999>Math.abs(l)?(this._y=Math.atan2(s,r),this._z=Math.atan2(a,h)):(this._y=Math.atan2(-c,t),this._z=0)):e==="ZXY"?(this._x=Math.asin(n(u,-1,1)),.99999>Math.abs(u)?(this._y=Math.atan2(-c,r),this._z=Math.atan2(-o,h)):(this._y=0,this._z=Math.atan2(a,t))):e==="ZYX"?(this._y=Math.asin(-n(c,-1,1)),.99999>Math.abs(c)?(this._x=Math.atan2(u,r),this._z=Math.atan2(a,t)):(this._x=0,this._z=Math.atan2(-o,h))):e==="YZX"?(this._z=Math.asin(n(a,-1,1)),.99999>Math.abs(a)?(this._x=Math.atan2(-l,h),this._y=Math.atan2(-c,t)):(this._x=0,this._y=Math.atan2(s,r))):e==="XZY"?(this._z=Math.asin(-n(o,-1,1)),.99999>Math.abs(o)?(this._x=Math.atan2(u,h),this._y=Math.atan2(s,t)):(this._x=Math.atan2(-l,r),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,i!==!1&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new gt;return function(e,i,n){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,i,n)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new at;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new M(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(X.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 oh=0;b.DefaultUp=new M(0,1,0),b.DefaultMatrixAutoUpdate=!0,b.prototype=Object.assign(Object.create(bt.prototype),{constructor:b,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new at;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new at;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new 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 gt;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new at,e=new gt,i=new M,n=new M;return function(r,o,s){r.isVector3?i.copy(r):i.set(r,o,s),r=this.parent,this.updateWorldMatrix(!0,!1),n.setFromMatrixPosition(this.matrixWorld),this.isCamera?e.lookAt(n,i,this.up):e.lookAt(i,n,this.up),this.quaternion.setFromRotationMatrix(e),r&&(e.extractRotation(r.matrixWorld),t.setFromRotationMatrix(e),this.quaternion.premultiply(t.inverse()))}}(),add:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.parent!==null&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}return e=this.children.indexOf(t),e!==-1&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(e,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var i=0,n=this.children.length;i<n;i++){var r=this.children[i].getObjectByProperty(t,e);if(r!==void 0)return r}},getWorldPosition:function(t){return t===void 0&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new 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 at),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,e),i}}(),getWorldScale:function(){var t=new M,e=new at;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(c,u){return c[u.uuid]===void 0&&(c[u.uuid]=u.toJSON(t)),u.uuid}function i(c){var u=[],d;for(d in c){var g=c[d];delete g.metadata,u.push(g)}return u}var n=t===void 0||typeof t=="string",r={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},r.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var o={};if(o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isMesh||this.isLine||this.isPoints){o.geometry=e(t.geometries,this.geometry);var s=this.geometry.parameters;if(s!==void 0&&s.shapes!==void 0)if(s=s.shapes,Array.isArray(s))for(var a=0,h=s.length;a<h;a++)e(t.shapes,s[a]);else e(t.shapes,s)}if(this.material!==void 0)if(Array.isArray(this.material)){for(s=[],a=0,h=this.material.length;a<h;a++)s.push(e(t.materials,this.material[a]));o.material=s}else o.material=e(t.materials,this.material);if(0<this.children.length)for(o.children=[],a=0;a<this.children.length;a++)o.children.push(this.children[a].toJSON(t).object);if(n){n=i(t.geometries),a=i(t.materials),h=i(t.textures);var l=i(t.images);s=i(t.shapes),0<n.length&&(r.geometries=n),0<a.length&&(r.materials=a),0<h.length&&(r.textures=h),0<l.length&&(r.images=l),0<s.length&&(r.shapes=s)}return r.object=o,r},clone:function(t){return new this.constructor().copy(this,t)},copy:function(t,e){if(e===void 0&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(e=0;e<t.children.length;e++)this.add(t.children[e].clone());return this}});var sh=0;F.prototype=Object.assign(Object.create(bt.prototype),{constructor:F,isGeometry:!0,applyMatrix:function(t){for(var e=new _t().getNormalMatrix(t),i=0,n=this.vertices.length;i<n;i++)this.vertices[i].applyMatrix4(t);for(i=0,n=this.faces.length;i<n;i++){t=this.faces[i],t.normal.applyMatrix3(e).normalize();for(var r=0,o=t.vertexNormals.length;r<o;r++)t.vertexNormals[r].applyMatrix3(e).normalize()}return this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this.normalsNeedUpdate=this.verticesNeedUpdate=!0,this},rotateX:function(){var t=new gt;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new gt;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new gt;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new gt;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new gt;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new b;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(w,S,P,G){var N=a===void 0?[]:[i.colors[w].clone(),i.colors[S].clone(),i.colors[P].clone()],q=s===void 0?[]:[new M().fromArray(s,3*w),new M().fromArray(s,3*S),new M().fromArray(s,3*P)];G=new O(w,S,P,q,N,G),i.faces.push(G),h!==void 0&&i.faceVertexUvs[0].push([new $().fromArray(h,2*w),new $().fromArray(h,2*S),new $().fromArray(h,2*P)]),l!==void 0&&i.faceVertexUvs[1].push([new $().fromArray(l,2*w),new $().fromArray(l,2*S),new $().fromArray(l,2*P)])}var i=this,n=t.index!==null?t.index.array:void 0,r=t.attributes,o=r.position.array,s=r.normal!==void 0?r.normal.array:void 0,a=r.color!==void 0?r.color.array:void 0,h=r.uv!==void 0?r.uv.array:void 0,l=r.uv2!==void 0?r.uv2.array:void 0;l!==void 0&&(this.faceVertexUvs[1]=[]);for(var c=r=0;r<o.length;r+=3,c+=2)i.vertices.push(new M().fromArray(o,r)),a!==void 0&&i.colors.push(new H().fromArray(a,r));var u=t.groups;if(0<u.length)for(r=0;r<u.length;r++){o=u[r];var d=o.start,g=o.count;for(c=d,d+=g;c<d;c+=3)n!==void 0?e(n[c],n[c+1],n[c+2],o.materialIndex):e(c,c+1,c+2,o.materialIndex)}else if(n!==void 0)for(r=0;r<n.length;r+=3)e(n[r],n[r+1],n[r+2]);else for(r=0;r<o.length/3;r+=3)e(r,r+1,r+2);return this.computeFaceNormals(),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){var t=new 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 gt;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 r=this.faces[i],o=this.vertices[r.a],s=this.vertices[r.b];t.subVectors(this.vertices[r.c],s),e.subVectors(o,s),t.cross(e),t.normalize(),r.normal.copy(t)}},computeVertexNormals:function(t){t===void 0&&(t=!0);var e,i=Array(this.vertices.length),n=0;for(e=this.vertices.length;n<e;n++)i[n]=new M;if(t){var r=new M,o=new M;for(t=0,n=this.faces.length;t<n;t++){e=this.faces[t];var s=this.vertices[e.a],a=this.vertices[e.b],h=this.vertices[e.c];r.subVectors(h,a),o.subVectors(s,a),r.cross(o),i[e.a].add(r),i[e.b].add(r),i[e.c].add(r)}}else for(this.computeFaceNormals(),t=0,n=this.faces.length;t<n;t++)e=this.faces[t],i[e.a].add(e.normal),i[e.b].add(e.normal),i[e.c].add(e.normal);for(n=0,e=this.vertices.length;n<e;n++)i[n].normalize();for(t=0,n=this.faces.length;t<n;t++)e=this.faces[t],s=e.vertexNormals,s.length===3?(s[0].copy(i[e.a]),s[1].copy(i[e.b]),s[2].copy(i[e.c])):(s[0]=i[e.a].clone(),s[1]=i[e.b].clone(),s[2]=i[e.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t;this.computeFaceNormals();var e=0;for(t=this.faces.length;e<t;e++){var i=this.faces[e],n=i.vertexNormals;n.length===3?(n[0].copy(i.normal),n[1].copy(i.normal),n[2].copy(i.normal)):(n[0]=i.normal.clone(),n[1]=i.normal.clone(),n[2]=i.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,i=0;for(e=this.faces.length;i<e;i++){var n=this.faces[i];n.__originalFaceNormal?n.__originalFaceNormal.copy(n.normal):n.__originalFaceNormal=n.normal.clone(),n.__originalVertexNormals||(n.__originalVertexNormals=[]);var r=0;for(t=n.vertexNormals.length;r<t;r++)n.__originalVertexNormals[r]?n.__originalVertexNormals[r].copy(n.vertexNormals[r]):n.__originalVertexNormals[r]=n.vertexNormals[r].clone()}var o=new F;for(o.faces=this.faces,r=0,t=this.morphTargets.length;r<t;r++){if(!this.morphNormals[r]){this.morphNormals[r]={},this.morphNormals[r].faceNormals=[],this.morphNormals[r].vertexNormals=[],n=this.morphNormals[r].faceNormals;var s=this.morphNormals[r].vertexNormals;for(i=0,e=this.faces.length;i<e;i++){var a=new M,h={a:new M,b:new M,c:new M};n.push(a),s.push(h)}}for(s=this.morphNormals[r],o.vertices=this.morphTargets[r].vertices,o.computeFaceNormals(),o.computeVertexNormals(),i=0,e=this.faces.length;i<e;i++)n=this.faces[i],a=s.faceNormals[i],h=s.vertexNormals[i],a.copy(n.normal),h.a.copy(n.vertexNormals[0]),h.b.copy(n.vertexNormals[1]),h.c.copy(n.vertexNormals[2])}for(i=0,e=this.faces.length;i<e;i++)n=this.faces[i],n.normal=n.__originalFaceNormal,n.vertexNormals=n.__originalVertexNormals},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new Rt),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new zt),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,r=this.vertices.length,o=this.vertices,s=t.vertices,a=this.faces,h=t.faces,l=this.faceVertexUvs[0],c=t.faceVertexUvs[0],u=this.colors,d=t.colors;i===void 0&&(i=0),e!==void 0&&(n=new _t().getNormalMatrix(e)),t=0;for(var g=s.length;t<g;t++){var w=s[t].clone();e!==void 0&&w.applyMatrix4(e),o.push(w)}for(t=0,g=d.length;t<g;t++)u.push(d[t].clone());for(t=0,g=h.length;t<g;t++){s=h[t];var S=s.vertexNormals;for(d=s.vertexColors,u=new O(s.a+r,s.b+r,s.c+r),u.normal.copy(s.normal),n!==void 0&&u.normal.applyMatrix3(n).normalize(),e=0,o=S.length;e<o;e++)w=S[e].clone(),n!==void 0&&w.applyMatrix3(n).normalize(),u.vertexNormals.push(w);for(u.color.copy(s.color),e=0,o=d.length;e<o;e++)w=d[e],u.vertexColors.push(w.clone());u.materialIndex=s.materialIndex+i,a.push(u)}for(t=0,g=c.length;t<g;t++)if(i=c[t],n=[],i!==void 0){for(e=0,o=i.length;e<o;e++)n.push(i[e].clone());l.push(n)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t={},e=[],i=[],n=Math.pow(10,4),r,o=0;for(r=this.vertices.length;o<r;o++){var s=this.vertices[o];s=Math.round(s.x*n)+"_"+Math.round(s.y*n)+"_"+Math.round(s.z*n),t[s]===void 0?(t[s]=o,e.push(this.vertices[o]),i[o]=e.length-1):i[o]=i[t[s]]}for(t=[],o=0,r=this.faces.length;o<r;o++)for(n=this.faces[o],n.a=i[n.a],n.b=i[n.b],n.c=i[n.c],n=[n.a,n.b,n.c],s=0;3>s;s++)if(n[s]===n[(s+1)%3]){t.push(o);break}for(o=t.length-1;0<=o;o--)for(n=t[o],this.faces.splice(n,1),i=0,r=this.faceVertexUvs.length;i<r;i++)this.faceVertexUvs[i].splice(n,1);return o=this.vertices.length-e.length,this.vertices=e,o},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new 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(h,l){return h.materialIndex-l.materialIndex});var n=this.faceVertexUvs[0],r=this.faceVertexUvs[1],o,s;for(n&&n.length===e&&(o=[]),r&&r.length===e&&(s=[]),i=0;i<e;i++){var a=t[i]._id;o&&o.push(n[a]),s&&s.push(r[a])}o&&(this.faceVertexUvs[0]=o),s&&(this.faceVertexUvs[1]=s)},toJSON:function(){function t(ot,T,A){return A?ot|1<<T:ot&~(1<<T)}function e(ot){var T=ot.x.toString()+ot.y.toString()+ot.z.toString();return l[T]!==void 0||(l[T]=h.length/3,h.push(ot.x,ot.y,ot.z)),l[T]}function i(ot){var T=ot.r.toString()+ot.g.toString()+ot.b.toString();return u[T]!==void 0||(u[T]=c.length,c.push(ot.getHex())),u[T]}function n(ot){var T=ot.x.toString()+ot.y.toString();return g[T]!==void 0||(g[T]=d.length/2,d.push(ot.x,ot.y)),g[T]}var r={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.parameters!==void 0){var o=this.parameters,s;for(s in o)o[s]!==void 0&&(r[s]=o[s]);return r}for(o=[],s=0;s<this.vertices.length;s++){var a=this.vertices[s];o.push(a.x,a.y,a.z)}a=[];var h=[],l={},c=[],u={},d=[],g={};for(s=0;s<this.faces.length;s++){var w=this.faces[s],S=this.faceVertexUvs[0][s]!==void 0,P=0<w.normal.length(),G=0<w.vertexNormals.length,N=w.color.r!==1||w.color.g!==1||w.color.b!==1,q=0<w.vertexColors.length,V=0;V=t(V,0,0),V=t(V,1,!0),V=t(V,2,!1),V=t(V,3,S),V=t(V,4,P),V=t(V,5,G),V=t(V,6,N),V=t(V,7,q),a.push(V),a.push(w.a,w.b,w.c),a.push(w.materialIndex),S&&(S=this.faceVertexUvs[0][s],a.push(n(S[0]),n(S[1]),n(S[2]))),P&&a.push(e(w.normal)),G&&(P=w.vertexNormals,a.push(e(P[0]),e(P[1]),e(P[2]))),N&&a.push(i(w.color)),q&&(w=w.vertexColors,a.push(i(w[0]),i(w[1]),i(w[2])))}return r.data={},r.data.vertices=o,r.data.normals=h,0<c.length&&(r.data.colors=c),0<d.length&&(r.data.uvs=[d]),r.data.faces=a,r},clone:function(){return new F().copy(this)},copy:function(t){var e,i,n;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var r=t.vertices,o=0;for(e=r.length;o<e;o++)this.vertices.push(r[o].clone());for(r=t.colors,o=0,e=r.length;o<e;o++)this.colors.push(r[o].clone());for(r=t.faces,o=0,e=r.length;o<e;o++)this.faces.push(r[o].clone());for(o=0,e=t.faceVertexUvs.length;o<e;o++){var s=t.faceVertexUvs[o];for(this.faceVertexUvs[o]===void 0&&(this.faceVertexUvs[o]=[]),r=0,i=s.length;r<i;r++){var a=s[r],h=[],l=0;for(n=a.length;l<n;l++)h.push(a[l].clone());this.faceVertexUvs[o].push(h)}}for(l=t.morphTargets,o=0,e=l.length;o<e;o++){if(n={},n.name=l[o].name,l[o].vertices!==void 0)for(n.vertices=[],r=0,i=l[o].vertices.length;r<i;r++)n.vertices.push(l[o].vertices[r].clone());if(l[o].normals!==void 0)for(n.normals=[],r=0,i=l[o].normals.length;r<i;r++)n.normals.push(l[o].normals[r].clone());this.morphTargets.push(n)}for(l=t.morphNormals,o=0,e=l.length;o<e;o++){if(n={},l[o].vertexNormals!==void 0)for(n.vertexNormals=[],r=0,i=l[o].vertexNormals.length;r<i;r++)s=l[o].vertexNormals[r],a={},a.a=s.a.clone(),a.b=s.b.clone(),a.c=s.c.clone(),n.vertexNormals.push(a);if(l[o].faceNormals!==void 0)for(n.faceNormals=[],r=0,i=l[o].faceNormals.length;r<i;r++)n.faceNormals.push(l[o].faceNormals[r].clone());this.morphNormals.push(n)}for(r=t.skinWeights,o=0,e=r.length;o<e;o++)this.skinWeights.push(r[o].clone());for(r=t.skinIndices,o=0,e=r.length;o<e;o++)this.skinIndices.push(r[o].clone());for(r=t.lineDistances,o=0,e=r.length;o<e;o++)this.lineDistances.push(r[o]);return o=t.boundingBox,o!==null&&(this.boundingBox=o.clone()),o=t.boundingSphere,o!==null&&(this.boundingSphere=o.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Y.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(Y.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=t!==void 0?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,r=this.itemSize;n<r;n++)this.array[t+n]=e.array[i+n];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),o=new H),e[i++]=o.r,e[i++]=o.g,e[i++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),o=new $),e[i++]=o.x,e[i++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),o=new M),e[i++]=o.x,e[i++]=o.y,e[i++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),o=new Z),e[i++]=o.x,e[i++]=o.y,e[i++]=o.z,e[i++]=o.w}return this},set:function(t,e){return e===void 0&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=r,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),pt.prototype=Object.create(Y.prototype),pt.prototype.constructor=pt,tt.prototype=Object.create(Y.prototype),tt.prototype.constructor=tt,At.prototype=Object.create(Y.prototype),At.prototype.constructor=At,xt.prototype=Object.create(Y.prototype),xt.prototype.constructor=xt,Gt.prototype=Object.create(Y.prototype),Gt.prototype.constructor=Gt,kt.prototype=Object.create(Y.prototype),kt.prototype.constructor=kt,ie.prototype=Object.create(Y.prototype),ie.prototype.constructor=ie,lt.prototype=Object.create(Y.prototype),lt.prototype.constructor=lt,Vt.prototype=Object.create(Y.prototype),Vt.prototype.constructor=Vt,Object.assign(Me.prototype,{computeGroups:function(t){var e=[],i=void 0;t=t.faces;for(var n=0;n<t.length;n++){var r=t[n];if(r.materialIndex!==i){i=r.materialIndex,o!==void 0&&(o.count=3*n-o.start,e.push(o));var o={start:3*n,materialIndex:i}}}o!==void 0&&(o.count=3*n-o.start,e.push(o)),this.groups=e},fromGeometry:function(t){var e=t.faces,i=t.vertices,n=t.faceVertexUvs,r=n[0]&&0<n[0].length,o=n[1]&&0<n[1].length,s=t.morphTargets,a=s.length;if(0<a){for(var h=[],l=0;l<a;l++)h[l]={name:s[l].name,data:[]};this.morphTargets.position=h}var c=t.morphNormals,u=c.length;if(0<u){var d=[];for(l=0;l<u;l++)d[l]={name:c[l].name,data:[]};this.morphTargets.normal=d}var g=t.skinIndices,w=t.skinWeights,S=g.length===i.length,P=w.length===i.length;for(0<i.length&&e.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),l=0;l<e.length;l++){var G=e[l];this.vertices.push(i[G.a],i[G.b],i[G.c]);var N=G.vertexNormals;for(N.length===3?this.normals.push(N[0],N[1],N[2]):(N=G.normal,this.normals.push(N,N,N)),N=G.vertexColors,N.length===3?this.colors.push(N[0],N[1],N[2]):(N=G.color,this.colors.push(N,N,N)),r===!0&&(N=n[0][l],N!==void 0?this.uvs.push(N[0],N[1],N[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",l),this.uvs.push(new $,new $,new $))),o===!0&&(N=n[1][l],N!==void 0?this.uvs2.push(N[0],N[1],N[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",l),this.uvs2.push(new $,new $,new $))),N=0;N<a;N++){var q=s[N].vertices;h[N].data.push(q[G.a],q[G.b],q[G.c])}for(N=0;N<u;N++)q=c[N].vertexNormals[l],d[N].data.push(q.a,q.b,q.c);S&&this.skinIndices.push(g[G.a],g[G.b],g[G.c]),P&&this.skinWeights.push(w[G.a],w[G.b],w[G.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 ah=1;Lt.prototype=Object.assign(Object.create(bt.prototype),{constructor:Lt,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(65535<gi(t)?ie:Gt)(t,1):this.index=t},addAttribute:function(t,e,i){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?t==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(t,new Y(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 _t().getNormalMatrix(t).applyToBufferAttribute(e),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},rotateX:function(){var t=new gt;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new gt;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new gt;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new gt;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new gt;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new b;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new 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 lt(3*e.vertices.length,3);var i=new lt(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 lt(e.lineDistances.length,1),this.addAttribute("lineDistance",t.copyArray(e.lineDistances))),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];e.push(r.x,r.y,r.z||0)}return this.addAttribute("position",new lt(e,3)),this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var i=e.__directGeometry;if(e.elementsNeedUpdate===!0&&(i=void 0,e.elementsNeedUpdate=!1),i===void 0)return this.fromGeometry(e);i.verticesNeedUpdate=e.verticesNeedUpdate,i.normalsNeedUpdate=e.normalsNeedUpdate,i.colorsNeedUpdate=e.colorsNeedUpdate,i.uvsNeedUpdate=e.uvsNeedUpdate,i.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=i}return e.verticesNeedUpdate===!0&&(i=this.attributes.position,i!==void 0&&(i.copyVector3sArray(e.vertices),i.needsUpdate=!0),e.verticesNeedUpdate=!1),e.normalsNeedUpdate===!0&&(i=this.attributes.normal,i!==void 0&&(i.copyVector3sArray(e.normals),i.needsUpdate=!0),e.normalsNeedUpdate=!1),e.colorsNeedUpdate===!0&&(i=this.attributes.color,i!==void 0&&(i.copyColorsArray(e.colors),i.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(i=this.attributes.uv,i!==void 0&&(i.copyVector2sArray(e.uvs),i.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(i=this.attributes.lineDistance,i!==void 0&&(i.copyArray(e.lineDistances),i.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=new Me().fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);this.addAttribute("position",new Y(e,3).copyVector3sArray(t.vertices)),0<t.normals.length&&(e=new Float32Array(3*t.normals.length),this.addAttribute("normal",new Y(e,3).copyVector3sArray(t.normals))),0<t.colors.length&&(e=new Float32Array(3*t.colors.length),this.addAttribute("color",new Y(e,3).copyColorsArray(t.colors))),0<t.uvs.length&&(e=new Float32Array(2*t.uvs.length),this.addAttribute("uv",new Y(e,2).copyVector2sArray(t.uvs))),0<t.uvs2.length&&(e=new Float32Array(2*t.uvs2.length),this.addAttribute("uv2",new Y(e,2).copyVector2sArray(t.uvs2))),this.groups=t.groups;for(var i in t.morphTargets){e=[];for(var n=t.morphTargets[i],r=0,o=n.length;r<o;r++){var s=n[r],a=new lt(3*s.data.length,3);a.name=s.name,e.push(a.copyVector3sArray(s.data))}this.morphAttributes[i]=e}return 0<t.skinIndices.length&&(i=new lt(4*t.skinIndices.length,4),this.addAttribute("skinIndex",i.copyVector4sArray(t.skinIndices))),0<t.skinWeights.length&&(i=new lt(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 Rt);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 Rt,e=new M;return function(){this.boundingSphere===null&&(this.boundingSphere=new zt);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var r=0,o=0,s=i.count;o<s;o++)e.x=i.getX(o),e.y=i.getY(o),e.z=i.getZ(o),r=Math.max(r,n.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes;if(e.position){var i=e.position.array;if(e.normal===void 0)this.addAttribute("normal",new Y(new Float32Array(i.length),3));else for(var n=e.normal.array,r=0,o=n.length;r<o;r++)n[r]=0;n=e.normal.array;var s=new M,a=new M,h=new M,l=new M,c=new M;if(t){var u=t.array;for(r=0,o=t.count;r<o;r+=3){t=3*u[r+0];var d=3*u[r+1],g=3*u[r+2];s.fromArray(i,t),a.fromArray(i,d),h.fromArray(i,g),l.subVectors(h,a),c.subVectors(s,a),l.cross(c),n[t]+=l.x,n[t+1]+=l.y,n[t+2]+=l.z,n[d]+=l.x,n[d+1]+=l.y,n[d+2]+=l.z,n[g]+=l.x,n[g+1]+=l.y,n[g+2]+=l.z}}else for(r=0,o=i.length;r<o;r+=9)s.fromArray(i,r),a.fromArray(i,r+3),h.fromArray(i,r+6),l.subVectors(h,a),c.subVectors(s,a),l.cross(c),n[r]=l.x,n[r+1]=l.y,n[r+2]=l.z,n[r+3]=l.x,n[r+4]=l.y,n[r+5]=l.z,n[r+6]=l.x,n[r+7]=l.y,n[r+8]=l.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){e===void 0&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var i=this.attributes,n;for(n in i)if(t.attributes[n]!==void 0){var r=i[n].array,o=t.attributes[n],s=o.array,a=0;for(o=o.itemSize*e;a<s.length;a++,o++)r[o]=s[a]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new 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 Lt,e=this.index.array,i=this.attributes,n;for(n in i){var r=i[n],o=r.array,s=r.itemSize,a=new o.constructor(e.length*s),h=0;r=0;for(var l=e.length;r<l;r++)for(var c=e[r]*s,u=0;u<s;u++)a[h++]=o[c++];t.addAttribute(n,new Y(a,s))}for(e=this.groups,r=0,l=e.length;r<l;r++)i=e[r],t.addGroup(i.start,i.count,i.materialIndex);return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),0<Object.keys(this.userData).length&&(t.userData=this.userData),this.parameters!==void 0){var e=this.parameters;for(r in e)e[r]!==void 0&&(t[r]=e[r]);return t}t.data={attributes:{}};var i=this.index;i!==null&&(e=Array.prototype.slice.call(i.array),t.data.index={type:i.array.constructor.name,array:e}),i=this.attributes;for(r in i){var n=i[r];e=Array.prototype.slice.call(n.array),t.data.attributes[r]={itemSize:n.itemSize,type:n.array.constructor.name,array:e,normalized:n.normalized}}var r=this.groups;return 0<r.length&&(t.data.groups=JSON.parse(JSON.stringify(r))),r=this.boundingSphere,r!==null&&(t.data.boundingSphere={center:r.center.toArray(),radius:r.radius}),t},clone:function(){return new Lt().copy(this)},copy:function(t){var e;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var i=t.index;i!==null&&this.setIndex(i.clone()),i=t.attributes;for(s in i)this.addAttribute(s,i[s].clone());var n=t.morphAttributes;for(s in n){var r=[],o=n[s];for(i=0,e=o.length;i<e;i++)r.push(o[i].clone());this.morphAttributes[s]=r}var s=t.groups;for(i=0,e=s.length;i<e;i++)n=s[i],this.addGroup(n.start,n.count,n.materialIndex);return s=t.boundingBox,s!==null&&(this.boundingBox=s.clone()),s=t.boundingSphere,s!==null&&(this.boundingSphere=s.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Fe.prototype=Object.create(F.prototype),Fe.prototype.constructor=Fe,vi.prototype=Object.create(Lt.prototype),vi.prototype.constructor=vi,Ti.prototype=Object.create(F.prototype),Ti.prototype.constructor=Ti,oi.prototype=Object.create(Lt.prototype),oi.prototype.constructor=oi;var hh=0;fe.prototype=Object.assign(Object.create(bt.prototype),{constructor:fe,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(t!==void 0)for(var e in t){var i=t[e];if(i===void 0)console.warn("THREE.Material: '"+e+"' parameter is undefined.");else if(e==="shading")console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===1;else{var n=this[e];n===void 0?console.warn("THREE."+this.type+": '"+e+"' is not a property of this material."):n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]=i}}},toJSON:function(t){function e(r){var o=[],s;for(s in r){var a=r[s];delete a.metadata,o.push(a)}return o}var i=t===void 0||typeof t=="string";i&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};return n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearCoat!==void 0&&(n.clearCoat=this.clearCoat),this.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity,this.combine!==void 0&&(n.combine=this.combine),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.size!==void 0&&(n.size=this.size),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.flatShading===!0&&(n.flatShading=this.flatShading),this.side!==0&&(n.side=this.side),this.vertexColors!==0&&(n.vertexColors=this.vertexColors),1>this.opacity&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),0<this.alphaTest&&(n.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),1<this.wireframeLinewidth&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.morphTargets===!0&&(n.morphTargets=!0),this.skinning===!0&&(n.skinning=!0),this.visible===!1&&(n.visible=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),i&&(i=e(t.textures),t=e(t.images),0<i.length&&(n.textures=i),0<t.length&&(n.images=t)),n},clone:function(){return new this.constructor().copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,i=null;if(e!==null){var n=e.length;i=Array(n);for(var r=0;r!==n;++r)i[r]=e[r].clone()}return this.clippingPlanes=i,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Je.prototype=Object.create(fe.prototype),Je.prototype.constructor=Je,Je.prototype.isShaderMaterial=!0,Je.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=_i.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},Je.prototype.toJSON=function(t){var e=fe.prototype.toJSON.call(this,t);e.uniforms={};for(var i in this.uniforms){var n=this.uniforms[i].value;e.uniforms[i]=n.isTexture?{type:"t",value:n.toJSON(t).uuid}:n.isColor?{type:"c",value:n.getHex()}:n.isVector2?{type:"v2",value:n.toArray()}:n.isVector3?{type:"v3",value:n.toArray()}:n.isVector4?{type:"v4",value:n.toArray()}:n.isMatrix4?{type:"m4",value:n.toArray()}:{value:n}}return 0<Object.keys(this.defines).length&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(Ri.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,r,o,s){t.copy(n).add(r).multiplyScalar(.5),e.copy(r).sub(n).normalize(),i.copy(this.origin).sub(t);var a=.5*n.distanceTo(r),h=-this.direction.dot(e),l=i.dot(this.direction),c=-i.dot(e),u=i.lengthSq(),d=Math.abs(1-h*h);if(0<d){n=h*c-l,r=h*l-c;var g=a*d;0<=n?r>=-g?r<=g?(a=1/d,n*=a,r*=a,h=n*(n+h*r+2*l)+r*(h*n+r+2*c)+u):(r=a,n=Math.max(0,-(h*r+l)),h=-n*n+r*(r+2*c)+u):(r=-a,n=Math.max(0,-(h*r+l)),h=-n*n+r*(r+2*c)+u):r<=-g?(n=Math.max(0,-(-h*a+l)),r=0<n?-a:Math.min(Math.max(-a,-c),a),h=-n*n+r*(r+2*c)+u):r<=g?(n=0,r=Math.min(Math.max(-a,-c),a),h=r*(r+2*c)+u):(n=Math.max(0,-(h*a+l)),r=0<n?a:Math.min(Math.max(-a,-c),a),h=-n*n+r*(r+2*c)+u)}else r=0<h?-a:a,n=Math.max(0,-(h*r+l)),h=-n*n+r*(r+2*c)+u;return o&&o.copy(this.direction).multiplyScalar(n).add(this.origin),s&&s.copy(e).multiplyScalar(r).add(t),h}}(),intersectSphere:function(){var t=new M;return function(e,i){t.subVectors(e.center,this.origin);var n=t.dot(this.direction),r=t.dot(t)-n*n;return e=e.radius*e.radius,r>e?null:(e=Math.sqrt(e-r),r=n-e,n+=e,0>r&&0>n?null:0>r?this.at(n,i):this.at(r,i))}}(),intersectsSphere:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);return e===0?t.distanceToPoint(this.origin)===0?0:null:(t=-(this.origin.dot(t.normal)+t.constant)/e,0<=t?t:null)},intersectPlane:function(t,e){return t=this.distanceToPlane(t),t===null?null:this.at(t,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return e===0||0>t.normal.dot(this.direction)*e},intersectBox:function(t,e){var i=1/this.direction.x,n=1/this.direction.y,r=1/this.direction.z,o=this.origin;if(0<=i){var s=(t.min.x-o.x)*i;i*=t.max.x-o.x}else s=(t.max.x-o.x)*i,i*=t.min.x-o.x;if(0<=n){var a=(t.min.y-o.y)*n;n*=t.max.y-o.y}else a=(t.max.y-o.y)*n,n*=t.min.y-o.y;return s>n||a>i||((a>s||s!==s)&&(s=a),(n<i||i!==i)&&(i=n),0<=r?(a=(t.min.z-o.z)*r,t=(t.max.z-o.z)*r):(a=(t.max.z-o.z)*r,t=(t.min.z-o.z)*r),s>t||a>i)?null:((a>s||s!==s)&&(s=a),(t<i||i!==i)&&(i=t),0>i?null:this.at(0<=s?s:i,e))},intersectsBox:function(){var t=new 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(r,o,s,a,h){if(e.subVectors(o,r),i.subVectors(s,r),n.crossVectors(e,i),o=this.direction.dot(n),0<o){if(a)return null;a=1}else if(0>o)a=-1,o=-o;else return null;return t.subVectors(this.origin,r),r=a*this.direction.dot(i.crossVectors(t,i)),0>r||(s=a*this.direction.dot(e.cross(t)),0>s||r+s>o)?null:(r=-a*t.dot(n),0>r?null:this.at(r/o,h))}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(be,{getNormal:function(){var t=new M;return function(e,i,n,r){return r===void 0&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new M),r.subVectors(n,i),t.subVectors(e,i),r.cross(t),e=r.lengthSq(),0<e?r.multiplyScalar(1/Math.sqrt(e)):r.set(0,0,0)}}(),getBarycoord:function(){var t=new M,e=new M,i=new M;return function(n,r,o,s,a){t.subVectors(s,r),e.subVectors(o,r),i.subVectors(n,r),n=t.dot(t),r=t.dot(e),o=t.dot(i);var h=e.dot(e);s=e.dot(i);var l=n*h-r*r;return a===void 0&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),a=new M),l===0?a.set(-2,-1,-1):(l=1/l,h=(h*o-r*s)*l,n=(n*s-r*o)*l,a.set(1-h-n,n,h))}}(),containsPoint:function(){var t=new M;return function(e,i,n,r){return be.getBarycoord(e,i,n,r,t),0<=t.x&&0<=t.y&&1>=t.x+t.y}}(),getUV:function(){var t=new M;return function(e,i,n,r,o,s,a,h){return this.getBarycoord(e,i,n,r,t),h.set(0,0),h.addScaledVector(o,t.x),h.addScaledVector(s,t.y),h.addScaledVector(a,t.z),h}}()}),Object.assign(be.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 be.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 be.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return be.containsPoint(t,this.a,this.b,this.c)},getUV:function(t,e,i,n,r){return be.getUV(t,this.a,this.b,this.c,e,i,n,r)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new M,e=new M,i=new M,n=new M,r=new M,o=new M;return function(s,a){a===void 0&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),a=new M);var h=this.a,l=this.b,c=this.c;t.subVectors(l,h),e.subVectors(c,h),n.subVectors(s,h);var u=t.dot(n),d=e.dot(n);if(0>=u&&0>=d)return a.copy(h);r.subVectors(s,l);var g=t.dot(r),w=e.dot(r);if(0<=g&&w<=g)return a.copy(l);var S=u*w-g*d;if(0>=S&&0<=u&&0>=g)return l=u/(u-g),a.copy(h).addScaledVector(t,l);o.subVectors(s,c),s=t.dot(o);var P=e.dot(o);return 0<=P&&s<=P?a.copy(c):(u=s*d-u*P,0>=u&&0<=d&&0>=P?(S=d/(d-P),a.copy(h).addScaledVector(e,S)):(d=g*P-s*w,0>=d&&0<=w-g&&0<=s-P?(i.subVectors(c,l),S=(w-g)/(w-g+(s-P)),a.copy(l).addScaledVector(i,S)):(c=1/(d+u+S),l=u*c,S*=c,a.copy(h).addScaledVector(t,l).addScaledVector(e,S))))}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Ve.prototype=Object.create(fe.prototype),Ve.prototype.constructor=Ve,Ve.prototype.isMeshBasicMaterial=!0,Ve.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},Ke.prototype=Object.assign(Object.create(b.prototype),{constructor:Ke,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return b.prototype.copy.call(this,t),this.drawMode=t.drawMode,t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t=this.geometry;if(t.isBufferGeometry){t=t.morphAttributes;var e=Object.keys(t);if(0<e.length){var i=t[e[0]];if(i!==void 0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++){var n=i[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}else if(i=t.morphTargets,i!==void 0&&0<i.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++)n=i[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t},raycast:function(){function t(P,G,N,q,V,ot,T,A){return(G.side===1?q.intersectTriangle(T,ot,V,!0,A):q.intersectTriangle(V,ot,T,G.side!==2,A))===null?null:(S.copy(A),S.applyMatrix4(P.matrixWorld),G=N.ray.origin.distanceTo(S),G<N.near||G>N.far?null:{distance:G,point:S.clone(),object:P})}function e(P,G,N,q,V,ot,T,A,et){return o.fromBufferAttribute(V,T),s.fromBufferAttribute(V,A),a.fromBufferAttribute(V,et),(P=t(P,G,N,q,o,s,a,w))&&(ot&&(u.fromBufferAttribute(ot,T),d.fromBufferAttribute(ot,A),g.fromBufferAttribute(ot,et),P.uv=be.getUV(w,o,s,a,u,d,g,new $)),ot=new O(T,A,et),be.getNormal(o,s,a,ot.normal),P.face=ot),P}var i=new gt,n=new Ri,r=new zt,o=new M,s=new M,a=new M,h=new M,l=new M,c=new M,u=new $,d=new $,g=new $,w=new M,S=new M;return function(P,G){var N=this.geometry,q=this.material,V=this.matrixWorld;if(q!==void 0&&(N.boundingSphere===null&&N.computeBoundingSphere(),r.copy(N.boundingSphere),r.applyMatrix4(V),P.ray.intersectsSphere(r)!==!1&&(i.getInverse(V),n.copy(P.ray).applyMatrix4(i),N.boundingBox===null||n.intersectsBox(N.boundingBox)!==!1))){if(N.isBufferGeometry){var ot=N.index,T=N.attributes.position,A=N.attributes.uv,et=N.groups;N=N.drawRange;var yt;if(ot!==null)if(Array.isArray(q)){var ft=0;for(yt=et.length;ft<yt;ft++){var st=et[ft],Ht=q[st.materialIndex];V=Math.max(st.start,N.start);var It=Math.min(st.start+st.count,N.start+N.count);for(st=V;st<It;st+=3){V=ot.getX(st);var $t=ot.getX(st+1),Xt=ot.getX(st+2);(V=e(this,Ht,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(st/3),G.push(V))}}}else for(V=Math.max(0,N.start),It=Math.min(ot.count,N.start+N.count),ft=V,yt=It;ft<yt;ft+=3)V=ot.getX(ft),$t=ot.getX(ft+1),Xt=ot.getX(ft+2),(V=e(this,q,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(ft/3),G.push(V));else if(T!==void 0)if(Array.isArray(q))for(ft=0,yt=et.length;ft<yt;ft++)for(st=et[ft],Ht=q[st.materialIndex],V=Math.max(st.start,N.start),It=Math.min(st.start+st.count,N.start+N.count),st=V;st<It;st+=3)V=st,$t=st+1,Xt=st+2,(V=e(this,Ht,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(st/3),G.push(V));else for(V=Math.max(0,N.start),It=Math.min(T.count,N.start+N.count),ft=V,yt=It;ft<yt;ft+=3)V=ft,$t=ft+1,Xt=ft+2,(V=e(this,q,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(ft/3),G.push(V))}else if(N.isGeometry){for(T=Array.isArray(q),A=N.vertices,et=N.faces,V=N.faceVertexUvs[0],0<V.length&&(ot=V),st=0,It=et.length;st<It;st++)if($t=et[st],V=T?q[$t.materialIndex]:q,V!==void 0){if(ft=A[$t.a],yt=A[$t.b],Ht=A[$t.c],V.morphTargets===!0){Xt=N.morphTargets;var Qt=this.morphTargetInfluences;o.set(0,0,0),s.set(0,0,0),a.set(0,0,0);for(var re=0,me=Xt.length;re<me;re++){var Ae=Qt[re];if(Ae!==0){var fi=Xt[re].vertices;o.addScaledVector(h.subVectors(fi[$t.a],ft),Ae),s.addScaledVector(l.subVectors(fi[$t.b],yt),Ae),a.addScaledVector(c.subVectors(fi[$t.c],Ht),Ae)}}o.add(ft),s.add(yt),a.add(Ht),ft=o,yt=s,Ht=a}(V=t(this,V,P,n,ft,yt,Ht,w))&&(ot&&ot[st]&&(Xt=ot[st],u.copy(Xt[0]),d.copy(Xt[1]),g.copy(Xt[2]),V.uv=be.getUV(w,ft,yt,Ht,u,d,g,new $)),V.face=$t,V.faceIndex=st,G.push(V))}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),_.prototype=Object.create(Ot.prototype),_.prototype.constructor=_,_.prototype.isCubeTexture=!0,Object.defineProperty(_.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),D.prototype=Object.create(Ot.prototype),D.prototype.constructor=D,D.prototype.isDataTexture3D=!0;var pa=new Ot,lh=new D,da=new _,fa=[],ma=[],ga=new Float32Array(16),va=new Float32Array(9),ya=new Float32Array(4);tr.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),J(e,t)},Nr.prototype.setValue=function(t,e,i){for(var n=this.seq,r=0,o=n.length;r!==o;++r){var s=n[r];s.setValue(t,e[s.id],i)}};var bs=/([\w\d_]+)(\])?(\[|\.)?/g;on.prototype.setValue=function(t,e,i){e=this.map[e],e!==void 0&&e.setValue(t,i,this.renderer)},on.prototype.setOptional=function(t,e,i){e=e[i],e!==void 0&&this.setValue(t,i,e)},on.upload=function(t,e,i,n){for(var r=0,o=e.length;r!==o;++r){var s=e[r],a=i[s.id];a.needsUpdate!==!1&&s.setValue(t,a.value,n)}},on.seqWithValue=function(t,e){for(var i=[],n=0,r=t.length;n!==r;++n){var o=t[n];o.id in e&&i.push(o)}return i};var ch=0,uh=0;Et.prototype=Object.create(fe.prototype),Et.prototype.constructor=Et,Et.prototype.isMeshDepthMaterial=!0,Et.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},vt.prototype=Object.create(fe.prototype),vt.prototype.constructor=vt,vt.prototype.isMeshDistanceMaterial=!0,vt.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pe.prototype=Object.assign(Object.create(b.prototype),{constructor:Pe,isGroup:!0}),Kt.prototype=Object.assign(Object.create(b.prototype),{constructor:Kt,isCamera:!0,copy:function(t,e){return b.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this},getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new M),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){b.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return new this.constructor().copy(this)}}),Bt.prototype=Object.assign(Object.create(Kt.prototype),{constructor:Bt,isPerspectiveCamera:!0,copy:function(t,e){return Kt.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){t=.5*this.getFilmHeight()/t,this.fov=2*Ee.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ee.DEG2RAD*this.fov);return .5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ee.RAD2DEG*Math.atan(Math.tan(.5*Ee.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,i,n,r,o){this.aspect=t/e,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ee.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,r=-.5*n,o=this.view;if(this.view!==null&&this.view.enabled){var s=o.fullWidth,a=o.fullHeight;r+=o.offsetX*n/s,e-=o.offsetY*i/a,n*=o.width/s,i*=o.height/a}o=this.filmOffset,o!==0&&(r+=t*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,e,e-i,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=b.prototype.toJSON.call(this,t),t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),te.prototype=Object.assign(Object.create(Bt.prototype),{constructor:te,isArrayCamera:!0});var _a=new M,xa=new M;Jt.prototype.isFogExp2=!0,Jt.prototype.clone=function(){return new Jt(this.color,this.density)},Jt.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},yi.prototype.isFog=!0,yi.prototype.clone=function(){return new yi(this.color,this.near,this.far)},yi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},qi.prototype=Object.assign(Object.create(b.prototype),{constructor:qi,copy:function(t,e){return b.prototype.copy.call(this,t,e),t.background!==null&&(this.background=t.background.clone()),t.fog!==null&&(this.fog=t.fog.clone()),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=b.prototype.toJSON.call(this,t);return this.background!==null&&(e.object.background=this.background.toJSON(t)),this.fog!==null&&(e.object.fog=this.fog.toJSON()),e}}),Object.defineProperty(Ge.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(Ge.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=t!==void 0?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.stride,i*=e.stride;for(var n=0,r=this.stride;n<r;n++)this.array[t+n]=e.array[i+n];return this},set:function(t,e){return e===void 0&&(e=0),this.array.set(t,e),this},clone:function(){return new this.constructor().copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Object.defineProperties(He.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(He.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this.data.array[t+3]=r,this}}),We.prototype=Object.create(fe.prototype),We.prototype.constructor=We,We.prototype.isSpriteMaterial=!0,We.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this};var Cr;ei.prototype=Object.assign(Object.create(b.prototype),{constructor:ei,isSprite:!0,raycast:function(){function t(g,w,S,P,G,N){r.subVectors(g,S).addScalar(.5).multiply(P),G!==void 0?(o.x=N*r.x-G*r.y,o.y=G*r.x+N*r.y):o.copy(r),g.copy(w),g.x+=o.x,g.y+=o.y,g.applyMatrix4(s)}var e=new M,i=new M,n=new M,r=new $,o=new $,s=new gt,a=new M,h=new M,l=new M,c=new $,u=new $,d=new $;return function(g,w){i.setFromMatrixScale(this.matrixWorld),s.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var S=this.material.rotation;if(S!==0)var P=Math.cos(S),G=Math.sin(S);S=this.center,t(a.set(-.5,-.5,0),n,S,i,G,P),t(h.set(.5,-.5,0),n,S,i,G,P),t(l.set(.5,.5,0),n,S,i,G,P),c.set(0,0),u.set(1,0),d.set(1,1);var N=g.ray.intersectTriangle(a,h,l,!1,e);N===null&&(t(h.set(-.5,.5,0),n,S,i,G,P),u.set(0,1),N=g.ray.intersectTriangle(a,l,h,!1,e),N===null)||(G=g.ray.origin.distanceTo(e),G<g.near||G>g.far||w.push({distance:G,point:e.clone(),uv:be.getUV(e,a,h,l,c,u,d,new $),face:null,object:this}))}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return b.prototype.copy.call(this,t),t.center!==void 0&&this.center.copy(t.center),this}}),ii.prototype=Object.assign(Object.create(b.prototype),{constructor:ii,copy:function(t){b.prototype.copy.call(this,t,!1),t=t.levels;for(var e=0,i=t.length;e<i;e++){var n=t[e];this.addLevel(n.object.clone(),n.distance)}return this},addLevel:function(t,e){e===void 0&&(e=0),e=Math.abs(e);for(var i=this.levels,n=0;n<i.length&&!(e<i[n].distance);n++);i.splice(n,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,i=1,n=e.length;i<n&&!(t<e[i].distance);i++);return e[i-1].object},raycast:function(){var t=new 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 r=1,o=n.length;r<o&&i>=n[r].distance;r++)n[r-1].object.visible=!1,n[r].object.visible=!0;for(;r<o;r++)n[r].object.visible=!1}}}(),toJSON:function(t){t=b.prototype.toJSON.call(this,t),t.object.levels=[];for(var e=this.levels,i=0,n=e.length;i<n;i++){var r=e[i];t.object.levels.push({object:r.object.uuid,distance:r.distance})}return t}}),Object.assign(ai.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new gt;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 gt,e=new gt;return function(){for(var i=this.bones,n=this.boneInverses,r=this.boneMatrices,o=this.boneTexture,s=0,a=i.length;s<a;s++)t.multiplyMatrices(i[s]?i[s].matrixWorld:e,n[s]),t.toArray(r,16*s);o!==void 0&&(o.needsUpdate=!0)}}(),clone:function(){return new ai(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,i=this.bones.length;e<i;e++){var n=this.bones[e];if(n.name===t)return n}}}),hi.prototype=Object.assign(Object.create(b.prototype),{constructor:hi,isBone:!0}),ke.prototype=Object.assign(Object.create(Ke.prototype),{constructor:ke,isSkinnedMesh:!0,initBones:function(){var t=[],e;if(this.geometry&&this.geometry.bones!==void 0){var i=0;for(e=this.geometry.bones.length;i<e;i++){var n=this.geometry.bones[i],r=new hi;t.push(r),r.name=n.name,r.position.fromArray(n.pos),r.quaternion.fromArray(n.rotq),n.scl!==void 0&&r.scale.fromArray(n.scl)}for(i=0,e=this.geometry.bones.length;i<e;i++)n=this.geometry.bones[i],n.parent!==-1&&n.parent!==null&&t[n.parent]!==void 0?t[n.parent].add(t[i]):this.add(t[i])}return this.updateMatrixWorld(!0),t},bind:function(t,e){this.skeleton=t,e===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t;if(this.geometry&&this.geometry.isGeometry)for(t=0;t<this.geometry.skinWeights.length;t++){var e=this.geometry.skinWeights[t],i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){e=new Z;var n=this.geometry.attributes.skinWeight;for(t=0;t<n.count;t++)e.x=n.getX(t),e.y=n.getY(t),e.z=n.getZ(t),e.w=n.getW(t),i=1/e.manhattanLength(),i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),n.setXYZW(t,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(t){Ke.prototype.updateMatrixWorld.call(this,t),this.bindMode==="attached"?this.bindMatrixInverse.getInverse(this.matrixWorld):this.bindMode==="detached"?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ne.prototype=Object.create(fe.prototype),Ne.prototype.constructor=Ne,Ne.prototype.isLineBasicMaterial=!0,Ne.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},qe.prototype=Object.assign(Object.create(b.prototype),{constructor:qe,isLine:!0,computeLineDistances:function(){var t=new M,e=new M;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,r=[0],o=1,s=n.count;o<s;o++)t.fromBufferAttribute(n,o-1),e.fromBufferAttribute(n,o),r[o]=r[o-1],r[o]+=t.distanceTo(e);i.addAttribute("lineDistance",new lt(r,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,r=i.lineDistances,r[0]=0,o=1,s=n.length;o<s;o++)r[o]=r[o-1],r[o]+=n[o-1].distanceTo(n[o]);return this}}(),raycast:function(){var t=new gt,e=new Ri,i=new zt;return function(n,r){var o=n.linePrecision,s=this.geometry,a=this.matrixWorld;if(s.boundingSphere===null&&s.computeBoundingSphere(),i.copy(s.boundingSphere),i.applyMatrix4(a),i.radius+=o,n.ray.intersectsSphere(i)!==!1){t.getInverse(a),e.copy(n.ray).applyMatrix4(t),o/=(this.scale.x+this.scale.y+this.scale.z)/3,o*=o;var h=new M,l=new M;a=new M;var c=new M,u=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var d=s.index,g=s.attributes.position.array;if(d!==null){d=d.array,s=0;for(var w=d.length-1;s<w;s+=u){var S=d[s+1];h.fromArray(g,3*d[s]),l.fromArray(g,3*S),S=e.distanceSqToSegment(h,l,c,a),S>o||(c.applyMatrix4(this.matrixWorld),S=n.ray.origin.distanceTo(c),S<n.near||S>n.far||r.push({distance:S,point:a.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}}else for(s=0,w=g.length/3-1;s<w;s+=u)h.fromArray(g,3*s),l.fromArray(g,3*s+3),S=e.distanceSqToSegment(h,l,c,a),S>o||(c.applyMatrix4(this.matrixWorld),S=n.ray.origin.distanceTo(c),S<n.near||S>n.far||r.push({distance:S,point:a.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}else if(s.isGeometry)for(h=s.vertices,l=h.length,s=0;s<l-1;s+=u)S=e.distanceSqToSegment(h[s],h[s+1],c,a),S>o||(c.applyMatrix4(this.matrixWorld),S=n.ray.origin.distanceTo(c),S<n.near||S>n.far||r.push({distance:S,point:a.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}}}(),copy:function(t){return b.prototype.copy.call(this,t),this.geometry.copy(t.geometry),this.material.copy(t.material),this},clone:function(){return new this.constructor().copy(this)}}),Re.prototype=Object.assign(Object.create(qe.prototype),{constructor:Re,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,r=[],o=0,s=n.count;o<s;o+=2)t.fromBufferAttribute(n,o),e.fromBufferAttribute(n,o+1),r[o]=o===0?0:r[o-1],r[o+1]=r[o]+t.distanceTo(e);i.addAttribute("lineDistance",new lt(r,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,r=i.lineDistances,o=0,s=n.length;o<s;o+=2)t.copy(n[o]),e.copy(n[o+1]),r[o]=o===0?0:r[o-1],r[o+1]=r[o]+t.distanceTo(e);return this}}()}),an.prototype=Object.assign(Object.create(qe.prototype),{constructor:an,isLineLoop:!0}),xi.prototype=Object.create(fe.prototype),xi.prototype.constructor=xi,xi.prototype.isPointsMaterial=!0,xi.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.morphTargets=t.morphTargets,this},nr.prototype=Object.assign(Object.create(b.prototype),{constructor:nr,isPoints:!0,raycast:function(){var t=new gt,e=new Ri,i=new zt;return function(n,r){function o(P,G){var N=e.distanceSqToPoint(P);N<c&&(e.closestPointToPoint(P,u),u.applyMatrix4(h),P=n.ray.origin.distanceTo(u),P<n.near||P>n.far||r.push({distance:P,distanceToRay:Math.sqrt(N),point:u.clone(),index:G,face:null,object:s}))}var s=this,a=this.geometry,h=this.matrixWorld,l=n.params.Points.threshold;if(a.boundingSphere===null&&a.computeBoundingSphere(),i.copy(a.boundingSphere),i.applyMatrix4(h),i.radius+=l,n.ray.intersectsSphere(i)!==!1){t.getInverse(h),e.copy(n.ray).applyMatrix4(t),l/=(this.scale.x+this.scale.y+this.scale.z)/3;var c=l*l;l=new M;var u=new M;if(a.isBufferGeometry){var d=a.index;if(a=a.attributes.position.array,d!==null){var g=d.array;d=0;for(var w=g.length;d<w;d++){var S=g[d];l.fromArray(a,3*S),o(l,S)}}else for(d=0,g=a.length/3;d<g;d++)l.fromArray(a,3*d),o(l,d)}else for(l=a.vertices,d=0,g=l.length;d<g;d++)o(l[d],d)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),os.prototype=Object.assign(Object.create(Ot.prototype),{constructor:os,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),rr.prototype=Object.create(Ot.prototype),rr.prototype.constructor=rr,rr.prototype.isCompressedTexture=!0,Ur.prototype=Object.create(Ot.prototype),Ur.prototype.constructor=Ur,Ur.prototype.isCanvasTexture=!0,Fr.prototype=Object.create(Ot.prototype),Fr.prototype.constructor=Fr,Fr.prototype.isDepthTexture=!0,or.prototype=Object.create(Lt.prototype),or.prototype.constructor=or,Gr.prototype=Object.create(F.prototype),Gr.prototype.constructor=Gr,sr.prototype=Object.create(Lt.prototype),sr.prototype.constructor=sr,Hr.prototype=Object.create(F.prototype),Hr.prototype.constructor=Hr,Di.prototype=Object.create(Lt.prototype),Di.prototype.constructor=Di,kr.prototype=Object.create(F.prototype),kr.prototype.constructor=kr,ar.prototype=Object.create(Di.prototype),ar.prototype.constructor=ar,Vr.prototype=Object.create(F.prototype),Vr.prototype.constructor=Vr,Dn.prototype=Object.create(Di.prototype),Dn.prototype.constructor=Dn,jr.prototype=Object.create(F.prototype),jr.prototype.constructor=jr,hr.prototype=Object.create(Di.prototype),hr.prototype.constructor=hr,Wr.prototype=Object.create(F.prototype),Wr.prototype.constructor=Wr,lr.prototype=Object.create(Di.prototype),lr.prototype.constructor=lr,Xr.prototype=Object.create(F.prototype),Xr.prototype.constructor=Xr,cr.prototype=Object.create(Lt.prototype),cr.prototype.constructor=cr,qr.prototype=Object.create(F.prototype),qr.prototype.constructor=qr,ur.prototype=Object.create(Lt.prototype),ur.prototype.constructor=ur,Yr.prototype=Object.create(F.prototype),Yr.prototype.constructor=Yr,pr.prototype=Object.create(Lt.prototype),pr.prototype.constructor=pr;var ph={triangulate:function(t,e,i){i=i||2;var n=e&&e.length,r=n?e[0]*i:t.length,o=Vs(t,0,r,i,!0),s=[];if(!o)return s;var a;if(n){var h=i;n=[];var l,c=0;for(l=e.length;c<l;c++){var u=e[c]*h,d=c<l-1?e[c+1]*h:t.length;u=Vs(t,u,d,h,!1),u===u.next&&(u.steiner=!0),n.push(th(u))}for(n.sort($a),c=0;c<n.length;c++)e=n[c],h=o,(h=Ka(e,h))&&(e=Ws(h,e),Zr(e,e.next)),o=Zr(o,o.next)}if(t.length>80*i){var g=a=t[0],w=n=t[1];for(h=i;h<r;h+=i)c=t[h],e=t[h+1],c<g&&(g=c),e<w&&(w=e),c>a&&(a=c),e>n&&(n=e);a=Math.max(a-g,n-w),a=a!==0?1/a:0}return Jr(o,s,i,g,w,a),s}},wn={area:function(t){for(var e=t.length,i=0,n=e-1,r=0;r<e;n=r++)i+=t[n].x*t[r].y-t[r].x*t[n].y;return .5*i},isClockWise:function(t){return 0>wn.area(t)},triangulateShape:function(t,e){var i=[],n=[],r=[];qs(t),Ys(i,t);var o=t.length;for(e.forEach(qs),t=0;t<e.length;t++)n.push(o),o+=e[t].length,Ys(i,e[t]);for(e=ph.triangulate(i,n),t=0;t<e.length;t+=3)r.push(e.slice(t,t+3));return r}};Nn.prototype=Object.create(F.prototype),Nn.prototype.constructor=Nn,Nn.prototype.toJSON=function(){var t=F.prototype.toJSON.call(this);return Zs(this.parameters.shapes,this.parameters.options,t)},hn.prototype=Object.create(Lt.prototype),hn.prototype.constructor=hn,hn.prototype.toJSON=function(){var t=Lt.prototype.toJSON.call(this);return Zs(this.parameters.shapes,this.parameters.options,t)};var dh={generateTopUV:function(t,e,i,n,r){t=e[3*n],n=e[3*n+1];var o=e[3*r];return r=e[3*r+1],[new $(e[3*i],e[3*i+1]),new $(t,n),new $(o,r)]},generateSideWallUV:function(t,e,i,n,r,o){t=e[3*i];var s=e[3*i+1];i=e[3*i+2];var a=e[3*n],h=e[3*n+1];n=e[3*n+2];var l=e[3*r],c=e[3*r+1];r=e[3*r+2];var u=e[3*o],d=e[3*o+1];return e=e[3*o+2],.01>Math.abs(s-h)?[new $(t,1-i),new $(a,1-n),new $(l,1-r),new $(u,1-e)]:[new $(s,1-i),new $(h,1-n),new $(c,1-r),new $(d,1-e)]}};Kr.prototype=Object.create(F.prototype),Kr.prototype.constructor=Kr,dr.prototype=Object.create(hn.prototype),dr.prototype.constructor=dr,to.prototype=Object.create(F.prototype),to.prototype.constructor=to,Bn.prototype=Object.create(Lt.prototype),Bn.prototype.constructor=Bn,eo.prototype=Object.create(F.prototype),eo.prototype.constructor=eo,fr.prototype=Object.create(Lt.prototype),fr.prototype.constructor=fr,io.prototype=Object.create(F.prototype),io.prototype.constructor=io,mr.prototype=Object.create(Lt.prototype),mr.prototype.constructor=mr,Un.prototype=Object.create(F.prototype),Un.prototype.constructor=Un,Un.prototype.toJSON=function(){var t=F.prototype.toJSON.call(this);return Js(this.parameters.shapes,t)},Fn.prototype=Object.create(Lt.prototype),Fn.prototype.constructor=Fn,Fn.prototype.toJSON=function(){var t=Lt.prototype.toJSON.call(this);return Js(this.parameters.shapes,t)},gr.prototype=Object.create(Lt.prototype),gr.prototype.constructor=gr,Gn.prototype=Object.create(F.prototype),Gn.prototype.constructor=Gn,vn.prototype=Object.create(Lt.prototype),vn.prototype.constructor=vn,no.prototype=Object.create(Gn.prototype),no.prototype.constructor=no,ro.prototype=Object.create(vn.prototype),ro.prototype.constructor=ro,oo.prototype=Object.create(F.prototype),oo.prototype.constructor=oo,vr.prototype=Object.create(Lt.prototype),vr.prototype.constructor=vr;var Ni=Object.freeze({WireframeGeometry:or,ParametricGeometry:Gr,ParametricBufferGeometry:sr,TetrahedronGeometry:kr,TetrahedronBufferGeometry:ar,OctahedronGeometry:Vr,OctahedronBufferGeometry:Dn,IcosahedronGeometry:jr,IcosahedronBufferGeometry:hr,DodecahedronGeometry:Wr,DodecahedronBufferGeometry:lr,PolyhedronGeometry:Hr,PolyhedronBufferGeometry:Di,TubeGeometry:Xr,TubeBufferGeometry:cr,TorusKnotGeometry:qr,TorusKnotBufferGeometry:ur,TorusGeometry:Yr,TorusBufferGeometry:pr,TextGeometry:Kr,TextBufferGeometry:dr,SphereGeometry:to,SphereBufferGeometry:Bn,RingGeometry:eo,RingBufferGeometry:fr,PlaneGeometry:Ti,PlaneBufferGeometry:oi,LatheGeometry:io,LatheBufferGeometry:mr,ShapeGeometry:Un,ShapeBufferGeometry:Fn,ExtrudeGeometry:Nn,ExtrudeBufferGeometry:hn,EdgesGeometry:gr,ConeGeometry:no,ConeBufferGeometry:ro,CylinderGeometry:Gn,CylinderBufferGeometry:vn,CircleGeometry:oo,CircleBufferGeometry:vr,BoxGeometry:Fe,BoxBufferGeometry:vi});Hn.prototype=Object.create(fe.prototype),Hn.prototype.constructor=Hn,Hn.prototype.isShadowMaterial=!0,Hn.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this},yr.prototype=Object.create(Je.prototype),yr.prototype.constructor=yr,yr.prototype.isRawShaderMaterial=!0,ln.prototype=Object.create(fe.prototype),ln.prototype.constructor=ln,ln.prototype.isMeshStandardMaterial=!0,ln.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},kn.prototype=Object.create(ln.prototype),kn.prototype.constructor=kn,kn.prototype.isMeshPhysicalMaterial=!0,kn.prototype.copy=function(t){return ln.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},Yi.prototype=Object.create(fe.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isMeshPhongMaterial=!0,Yi.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Vn.prototype=Object.create(Yi.prototype),Vn.prototype.constructor=Vn,Vn.prototype.isMeshToonMaterial=!0,Vn.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},jn.prototype=Object.create(fe.prototype),jn.prototype.constructor=jn,jn.prototype.isMeshNormalMaterial=!0,jn.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Wn.prototype=Object.create(fe.prototype),Wn.prototype.constructor=Wn,Wn.prototype.isMeshLambertMaterial=!0,Wn.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Xn.prototype=Object.create(fe.prototype),Xn.prototype.constructor=Xn,Xn.prototype.isMeshMatcapMaterial=!0,Xn.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},qn.prototype=Object.create(Ne.prototype),qn.prototype.constructor=qn,qn.prototype.isLineDashedMaterial=!0,qn.prototype.copy=function(t){return Ne.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var fh=Object.freeze({ShadowMaterial:Hn,SpriteMaterial:We,RawShaderMaterial:yr,ShaderMaterial:Je,PointsMaterial:xi,MeshPhysicalMaterial:kn,MeshStandardMaterial:ln,MeshPhongMaterial:Yi,MeshToonMaterial:Vn,MeshNormalMaterial:jn,MeshLambertMaterial:Wn,MeshDepthMaterial:Et,MeshDistanceMaterial:vt,MeshBasicMaterial:Ve,MeshMatcapMaterial:Xn,LineDashedMaterial:qn,LineBasicMaterial:Ne,Material:fe}),Ai={arraySlice:function(t,e,i){return Ai.isTypedArray(t)?new t.constructor(t.subarray(e,i!==void 0?i:t.length)):t.slice(e,i)},convertArray:function(t,e,i){return!t||!i&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,i=Array(e),n=0;n!==e;++n)i[n]=n;return i.sort(function(r,o){return t[r]-t[o]}),i},sortedArray:function(t,e,i){for(var n=t.length,r=new t.constructor(n),o=0,s=0;s!==n;++o)for(var a=i[o]*e,h=0;h!==e;++h)r[s++]=t[a+h];return r},flattenJSON:function(t,e,i,n){for(var r=1,o=t[0];o!==void 0&&o[n]===void 0;)o=t[r++];if(o!==void 0){var s=o[n];if(s!==void 0)if(Array.isArray(s))do s=o[n],s!==void 0&&(e.push(o.time),i.push.apply(i,s)),o=t[r++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[n],s!==void 0&&(e.push(o.time),s.toArray(i,i.length)),o=t[r++];while(o!==void 0);else do s=o[n],s!==void 0&&(e.push(o.time),i.push(s)),o=t[r++];while(o!==void 0)}}};Object.assign(Hi.prototype,{evaluate:function(t){var e=this.parameterPositions,i=this._cachedIndex,n=e[i],r=e[i-1];t:{e:{i:{n:if(!(t<n)){for(var o=i+2;;){if(n===void 0){if(t<r)break n;return this._cachedIndex=i=e.length,this.afterEnd_(i-1,t,r)}if(i===o)break;if(r=n,n=e[++i],t<n)break e}n=e.length;break i}if(t>=r)break t;for(o=e[1],t<o&&(i=2,r=o),o=i-2;;){if(r===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===o)break;if(n=r,r=e[--i-1],t>=r)break e}n=i,i=0}for(;i<n;)r=i+n>>>1,t<e[r]?n=r:i=r+1;if(n=e[i],r=e[i-1],r===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(n===void 0)return this._cachedIndex=i=e.length,this.afterEnd_(i-1,r,t)}this._cachedIndex=i,this.intervalChanged_(i,r,n)}return this.interpolate_(i,r,t,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){var e=this.resultBuffer,i=this.sampleValues,n=this.valueSize;t*=n;for(var r=0;r!==n;++r)e[r]=i[t+r];return e},interpolate_:function(){throw Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(Hi.prototype,{beforeStart_:Hi.prototype.copySampleValue_,afterEnd_:Hi.prototype.copySampleValue_}),Ao.prototype=Object.assign(Object.create(Hi.prototype),{constructor:Ao,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,r=t-2,o=t+1,s=n[r],a=n[o];if(s===void 0)switch(this.getSettings_().endingStart){case 2401:r=t,s=2*e-i;break;case 2402:r=n.length-2,s=e+n[r]-n[r+1];break;default:r=t,s=i}if(a===void 0)switch(this.getSettings_().endingEnd){case 2401:o=t,a=2*i-e;break;case 2402:o=1,a=i+n[1]-n[0];break;default:o=t-1,a=e}t=.5*(i-e),n=this.valueSize,this._weightPrev=t/(e-s),this._weightNext=t/(a-i),this._offsetPrev=r*n,this._offsetNext=o*n},interpolate_:function(t,e,i,n){var r=this.resultBuffer,o=this.sampleValues,s=this.valueSize;t*=s;var a=t-s,h=this._offsetPrev,l=this._offsetNext,c=this._weightPrev,u=this._weightNext,d=(i-e)/(n-e);for(i=d*d,n=i*d,e=-c*n+2*c*i-c*d,c=(1+c)*n+(-1.5-2*c)*i+(-.5+c)*d+1,d=(-1-u)*n+(1.5+u)*i+.5*d,u=u*n-u*i,i=0;i!==s;++i)r[i]=e*o[h+i]+c*o[a+i]+d*o[t+i]+u*o[l+i];return r}}),so.prototype=Object.assign(Object.create(Hi.prototype),{constructor:so,interpolate_:function(t,e,i,n){var r=this.resultBuffer,o=this.sampleValues,s=this.valueSize;t*=s;var a=t-s;for(e=(i-e)/(n-e),i=1-e,n=0;n!==s;++n)r[n]=o[a+n]*i+o[t+n]*e;return r}}),Lo.prototype=Object.assign(Object.create(Hi.prototype),{constructor:Lo,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(wi,{toJSON:function(t){var e=t.constructor;if(e.toJSON!==void 0)e=e.toJSON(t);else{e={name:t.name,times:Ai.convertArray(t.times,Array),values:Ai.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e}}),Object.assign(wi.prototype,{constructor:wi,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new Lo(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new so(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Ao(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){switch(t){case 2300:var e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(e===void 0){if(e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name,this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(e);return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(t!==0)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]+=t;return this},scale:function(t){if(t!==1)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]*=t;return this},trim:function(t,e){for(var i=this.times,n=i.length,r=0,o=n-1;r!==n&&i[r]<t;)++r;for(;o!==-1&&i[o]>e;)--o;return++o,(r!==0||o!==n)&&(r>=o&&(o=Math.max(o,1),r=o-1),t=this.getValueSize(),this.times=Ai.arraySlice(i,r,o),this.values=Ai.arraySlice(this.values,r*t,o*t)),this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var i=this.times;e=this.values;var n=i.length;n===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var r=null,o=0;o!==n;o++){var s=i[o];if(typeof s=="number"&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),t=!1;break}if(r!==null&&r>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,s,r),t=!1;break}r=s}if(e!==void 0&&Ai.isTypedArray(e)){for(o=0,i=e.length;o!==i;++o)if(n=e[o],isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,n),t=!1;break}}return t},optimize:function(){for(var t=this.times,e=this.values,i=this.getValueSize(),n=this.getInterpolation()===2302,r=1,o=t.length-1,s=1;s<o;++s){var a=!1,h=t[s];if(h!==t[s+1]&&(s!==1||h!==h[0]))if(n)a=!0;else{var l=s*i,c=l-i,u=l+i;for(h=0;h!==i;++h){var d=e[l+h];if(d!==e[c+h]||d!==e[u+h]){a=!0;break}}}if(a){if(s!==r)for(t[r]=t[s],a=s*i,l=r*i,h=0;h!==i;++h)e[l+h]=e[a+h];++r}}if(0<o){for(t[r]=t[o],a=o*i,l=r*i,h=0;h!==i;++h)e[l+h]=e[a+h];++r}return r!==t.length&&(this.times=Ai.arraySlice(t,0,r),this.values=Ai.arraySlice(e,0,r*i)),this}}),Ro.prototype=Object.assign(Object.create(wi.prototype),{constructor:Ro,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Co.prototype=Object.assign(Object.create(wi.prototype),{constructor:Co,ValueTypeName:"color"}),_r.prototype=Object.assign(Object.create(wi.prototype),{constructor:_r,ValueTypeName:"number"}),bo.prototype=Object.assign(Object.create(Hi.prototype),{constructor:bo,interpolate_:function(t,e,i,n){var r=this.resultBuffer,o=this.sampleValues,s=this.valueSize;for(t*=s,e=(i-e)/(n-e),i=t+s;t!==i;t+=4)at.slerpFlat(r,0,o,t-s,o,t,e);return r}}),ao.prototype=Object.assign(Object.create(wi.prototype),{constructor:ao,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new bo(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),Oo.prototype=Object.assign(Object.create(wi.prototype),{constructor:Oo,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),xr.prototype=Object.assign(Object.create(wi.prototype),{constructor:xr,ValueTypeName:"vector"}),Object.assign(ki,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),r=0,o=i.length;r!==o;++r)e.push(ih(i[r]).scale(n));return new ki(t.name,t.duration,e)},toJSON:function(t){var e=[],i=t.tracks;t={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid};for(var n=0,r=i.length;n!==r;++n)e.push(wi.toJSON(i[n]));return t},CreateFromMorphTargetSequence:function(t,e,i,n){for(var r=e.length,o=[],s=0;s<r;s++){var a=[],h=[];a.push((s+r-1)%r,s,(s+1)%r),h.push(0,1,0);var l=Ai.getKeyframeOrder(a);a=Ai.sortedArray(a,1,l),h=Ai.sortedArray(h,1,l),n||a[0]!==0||(a.push(r),h.push(h[0])),o.push(new _r(".morphTargetInfluences["+e[s].name+"]",a,h).scale(1/i))}return new ki(t,-1,o)},findByName:function(t,e){var i=t;for(Array.isArray(t)||(i=t.geometry&&t.geometry.animations||t.animations),t=0;t<i.length;t++)if(i[t].name===e)return i[t];return null},CreateClipsFromMorphTargetSequences:function(t,e,i){for(var n={},r=/^([\w-]*?)([\d]+)$/,o=0,s=t.length;o<s;o++){var a=t[o],h=a.name.match(r);if(h&&1<h.length){var l=h[1];(h=n[l])||(n[l]=h=[]),h.push(a)}}t=[];for(l in n)t.push(ki.CreateFromMorphTargetSequence(l,n[l],e,i));return t},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var i=function(S,P,G,N,q){if(G.length!==0){var V=[],ot=[];Ai.flattenJSON(G,V,ot,N),V.length!==0&&q.push(new S(P,V,ot))}},n=[],r=t.name||"default",o=t.length||-1,s=t.fps||30;t=t.hierarchy||[];for(var a=0;a<t.length;a++){var h=t[a].keys;if(h&&h.length!==0)if(h[0].morphTargets){o={};for(var l=0;l<h.length;l++)if(h[l].morphTargets)for(var c=0;c<h[l].morphTargets.length;c++)o[h[l].morphTargets[c]]=-1;for(var u in o){var d=[],g=[];for(c=0;c!==h[l].morphTargets.length;++c){var w=h[l];d.push(w.time),g.push(w.morphTarget===u?1:0)}n.push(new _r(".morphTargetInfluence["+u+"]",d,g))}o=o.length*(s||1)}else l=".bones["+e[a].name+"]",i(xr,l+".position",h,"pos",n),i(ao,l+".quaternion",h,"rot",n),i(xr,l+".scale",h,"scl",n)}return n.length===0?null:new ki(r,o,n)}}),Object.assign(ki.prototype,{resetDuration:function(){for(var t=0,e=0,i=this.tracks.length;e!==i;++e){var n=this.tracks[e];t=Math.max(t,n.times[n.times.length-1])}return this.duration=t,this},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},validate:function(){for(var t=!0,e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}});var Zn={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},Oi=new hs,tn={};Object.assign(Xi.prototype,{load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,o=Zn.get(t);if(o!==void 0)return r.manager.itemStart(t),setTimeout(function(){e&&e(o),r.manager.itemEnd(t)},0),o;if(tn[t]!==void 0)tn[t].push({onLoad:e,onProgress:i,onError:n});else{var s=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(s){i=s[1];var a=!!s[2];s=s[3],s=decodeURIComponent(s),a&&(s=atob(s));try{var h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":var l=new Uint8Array(s.length);for(a=0;a<s.length;a++)l[a]=s.charCodeAt(a);var c=h==="blob"?new Blob([l.buffer],{type:i}):l.buffer;break;case"document":c=new DOMParser().parseFromString(s,i);break;case"json":c=JSON.parse(s);break;default:c=s}setTimeout(function(){e&&e(c),r.manager.itemEnd(t)},0)}catch(d){setTimeout(function(){n&&n(d),r.manager.itemError(t),r.manager.itemEnd(t)},0)}}else{tn[t]=[],tn[t].push({onLoad:e,onProgress:i,onError:n});var u=new XMLHttpRequest;u.open("GET",t,!0),u.addEventListener("load",function(d){var g=this.response;Zn.add(t,g);var w=tn[t];if(delete tn[t],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var S=0,P=w.length;S<P;S++){var G=w[S];G.onLoad&&G.onLoad(g)}}else{for(S=0,P=w.length;S<P;S++)G=w[S],G.onError&&G.onError(d);r.manager.itemError(t)}r.manager.itemEnd(t)},!1),u.addEventListener("progress",function(d){for(var g=tn[t],w=0,S=g.length;w<S;w++){var P=g[w];P.onProgress&&P.onProgress(d)}},!1),u.addEventListener("error",function(d){var g=tn[t];delete tn[t];for(var w=0,S=g.length;w<S;w++){var P=g[w];P.onError&&P.onError(d)}r.manager.itemError(t),r.manager.itemEnd(t)},!1),u.addEventListener("abort",function(d){var g=tn[t];delete tn[t];for(var w=0,S=g.length;w<S;w++){var P=g[w];P.onError&&P.onError(d)}r.manager.itemError(t),r.manager.itemEnd(t)},!1),this.responseType!==void 0&&(u.responseType=this.responseType),this.withCredentials!==void 0&&(u.withCredentials=this.withCredentials),u.overrideMimeType&&u.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(a in this.requestHeader)u.setRequestHeader(a,this.requestHeader[a]);u.send(null)}return r.manager.itemStart(t),u}},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Qs.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(r.manager);o.setPath(r.path),o.load(t,function(s){e(r.parse(JSON.parse(s)))},i,n)},parse:function(t,e){for(var i=[],n=0;n<t.length;n++){var r=ki.parse(t[n]);i.push(r)}e(i)},setPath:function(t){return this.path=t,this}}),Object.assign($s.prototype,{load:function(t,e,i,n){function r(d){h.load(t[d],function(g){g=o._parser(g,!0),s[d]={width:g.width,height:g.height,format:g.format,mipmaps:g.mipmaps},l+=1,l===6&&(g.mipmapCount===1&&(a.minFilter=1006),a.format=g.format,a.needsUpdate=!0,e&&e(a))},i,n)}var o=this,s=[],a=new rr;a.image=s;var h=new Xi(this.manager);if(h.setPath(this.path),h.setResponseType("arraybuffer"),Array.isArray(t))for(var l=0,c=0,u=t.length;c<u;++c)r(c);else h.load(t,function(d){if(d=o._parser(d,!0),d.isCubemap)for(var g=d.mipmaps.length/d.mipmapCount,w=0;w<g;w++){s[w]={mipmaps:[]};for(var S=0;S<d.mipmapCount;S++)s[w].mipmaps.push(d.mipmaps[w*d.mipmapCount+S]),s[w].format=d.format,s[w].width=d.width,s[w].height=d.height}else a.image.width=d.width,a.image.height=d.height,a.mipmaps=d.mipmaps;d.mipmapCount===1&&(a.minFilter=1006),a.format=d.format,a.needsUpdate=!0,e&&e(a)},i,n);return a},setPath:function(t){return this.path=t,this}}),Object.assign(ls.prototype,{load:function(t,e,i,n){var r=this,o=new ct,s=new Xi(this.manager);return s.setResponseType("arraybuffer"),s.setPath(this.path),s.load(t,function(a){(a=r._parser(a))&&(a.image!==void 0?o.image=a.image:a.data!==void 0&&(o.image.width=a.width,o.image.height=a.height,o.image.data=a.data),o.wrapS=a.wrapS!==void 0?a.wrapS:1001,o.wrapT=a.wrapT!==void 0?a.wrapT:1001,o.magFilter=a.magFilter!==void 0?a.magFilter:1006,o.minFilter=a.minFilter!==void 0?a.minFilter:1008,o.anisotropy=a.anisotropy!==void 0?a.anisotropy:1,a.format!==void 0&&(o.format=a.format),a.type!==void 0&&(o.type=a.type),a.mipmaps!==void 0&&(o.mipmaps=a.mipmaps),a.mipmapCount===1&&(o.minFilter=1006),o.needsUpdate=!0,e&&e(o,a))},i,n),o},setPath:function(t){return this.path=t,this}}),Object.assign(ho.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function r(){h.removeEventListener("load",r,!1),h.removeEventListener("error",o,!1),Zn.add(t,this),e&&e(this),s.manager.itemEnd(t)}function o(l){h.removeEventListener("load",r,!1),h.removeEventListener("error",o,!1),n&&n(l),s.manager.itemError(t),s.manager.itemEnd(t)}t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var s=this,a=Zn.get(t);if(a!==void 0)return s.manager.itemStart(t),setTimeout(function(){e&&e(a),s.manager.itemEnd(t)},0),a;var h=document.createElementNS("http://www.w3.org/1999/xhtml","img");return h.addEventListener("load",r,!1),h.addEventListener("error",o,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(h.crossOrigin=this.crossOrigin),s.manager.itemStart(t),h.src=t,h},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(cs.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function r(h){s.load(t[h],function(l){o.images[h]=l,a++,a===6&&(o.needsUpdate=!0,e&&e(o))},void 0,n)}var o=new _,s=new ho(this.manager);s.setCrossOrigin(this.crossOrigin),s.setPath(this.path);var a=0;for(i=0;i<t.length;++i)r(i);return o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Io.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var r=new Ot,o=new ho(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(s){r.image=s,s=0<t.search(/\.jpe?g$/i)||t.search(/^data:image\/jpeg/)===0,r.format=s?1022:1023,r.needsUpdate=!0,e!==void 0&&e(r)},i,n),r},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(pe.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){return t=this.getUtoTmapping(t),this.getPoint(t,e)},getPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getSpacedPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(t===void 0&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e=[],i=this.getPoint(0),n,r=0;for(e.push(0),n=1;n<=t;n++){var o=this.getPoint(n/t);r+=o.distanceTo(i),e.push(r),i=o}return this.cacheArcLengths=e},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var i=this.getLengths(),n=i.length;e=e||t*i[n-1];for(var r=0,o=n-1,s;r<=o;)if(t=Math.floor(r+(o-r)/2),s=i[t]-e,0>s)r=t+1;else if(0<s)o=t-1;else{o=t;break}return t=o,i[t]===e?t/(n-1):(r=i[t],(t+(e-r)/(i[t+1]-r))/(n-1))},getTangent:function(t){var e=t-1e-4;return t+=1e-4,0>e&&(e=0),1<t&&(t=1),e=this.getPoint(e),this.getPoint(t).clone().sub(e).normalize()},getTangentAt:function(t){return t=this.getUtoTmapping(t),this.getTangent(t)},computeFrenetFrames:function(t,e){var i=new M,n=[],r=[],o=[],s=new M,a=new gt,h;for(h=0;h<=t;h++){var l=h/t;n[h]=this.getTangentAt(l),n[h].normalize()}r[0]=new M,o[0]=new M,h=Number.MAX_VALUE,l=Math.abs(n[0].x);var c=Math.abs(n[0].y),u=Math.abs(n[0].z);for(l<=h&&(h=l,i.set(1,0,0)),c<=h&&(h=c,i.set(0,1,0)),u<=h&&i.set(0,0,1),s.crossVectors(n[0],i).normalize(),r[0].crossVectors(n[0],s),o[0].crossVectors(n[0],r[0]),h=1;h<=t;h++)r[h]=r[h-1].clone(),o[h]=o[h-1].clone(),s.crossVectors(n[h-1],n[h]),s.length()>Number.EPSILON&&(s.normalize(),i=Math.acos(Ee.clamp(n[h-1].dot(n[h]),-1,1)),r[h].applyMatrix4(a.makeRotationAxis(s,i))),o[h].crossVectors(n[h],r[h]);if(e===!0)for(i=Math.acos(Ee.clamp(r[0].dot(r[t]),-1,1)),i/=t,0<n[0].dot(s.crossVectors(r[0],r[t]))&&(i=-i),h=1;h<=t;h++)r[h].applyMatrix4(a.makeRotationAxis(n[h],i*h)),o[h].crossVectors(n[h],r[h]);return{tangents:n,normals:r,binormals:o}},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Vi.prototype=Object.create(pe.prototype),Vi.prototype.constructor=Vi,Vi.prototype.isEllipseCurve=!0,Vi.prototype.getPoint=function(t,e){e=e||new $;for(var i=2*Math.PI,n=this.aEndAngle-this.aStartAngle,r=Math.abs(n)<Number.EPSILON;0>n;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=r?0:i),this.aClockwise!==!0||r||(n=n===i?-i:n-i),i=this.aStartAngle+t*n,t=this.aX+this.xRadius*Math.cos(i);var o=this.aY+this.yRadius*Math.sin(i);return this.aRotation!==0&&(i=Math.cos(this.aRotation),n=Math.sin(this.aRotation),r=t-this.aX,o-=this.aY,t=r*i-o*n+this.aX,o=r*n+o*i+this.aY),e.set(t,o)},Vi.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Vi.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Vi.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},wr.prototype=Object.create(Vi.prototype),wr.prototype.constructor=wr,wr.prototype.isArcCurve=!0;var Xo=new M,Os=new us,Is=new us,Ds=new us;Ei.prototype=Object.create(pe.prototype),Ei.prototype.constructor=Ei,Ei.prototype.isCatmullRomCurve3=!0,Ei.prototype.getPoint=function(t,e){e=e||new M;var i=this.points,n=i.length;t*=n-(this.closed?0:1);var r=Math.floor(t);if(t-=r,this.closed?r+=0<r?0:(Math.floor(Math.abs(r)/n)+1)*n:t===0&&r===n-1&&(r=n-2,t=1),this.closed||0<r)var o=i[(r-1)%n];else Xo.subVectors(i[0],i[1]).add(i[0]),o=Xo;var s=i[r%n],a=i[(r+1)%n];if(this.closed||r+2<n?i=i[(r+2)%n]:(Xo.subVectors(i[n-1],i[n-2]).add(i[n-1]),i=Xo),this.curveType==="centripetal"||this.curveType==="chordal"){var h=this.curveType==="chordal"?.5:.25;n=Math.pow(o.distanceToSquared(s),h),r=Math.pow(s.distanceToSquared(a),h),h=Math.pow(a.distanceToSquared(i),h),1e-4>r&&(r=1),1e-4>n&&(n=r),1e-4>h&&(h=r),Os.initNonuniformCatmullRom(o.x,s.x,a.x,i.x,n,r,h),Is.initNonuniformCatmullRom(o.y,s.y,a.y,i.y,n,r,h),Ds.initNonuniformCatmullRom(o.z,s.z,a.z,i.z,n,r,h)}else this.curveType==="catmullrom"&&(Os.initCatmullRom(o.x,s.x,a.x,i.x,this.tension),Is.initCatmullRom(o.y,s.y,a.y,i.y,this.tension),Ds.initCatmullRom(o.z,s.z,a.z,i.z,this.tension));return e.set(Os.calc(t),Is.calc(t),Ds.calc(t)),e},Ei.prototype.copy=function(t){pe.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Ei.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Ei.prototype.fromJSON=function(t){pe.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new M().fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Zi.prototype=Object.create(pe.prototype),Zi.prototype.constructor=Zi,Zi.prototype.isCubicBezierCurve=!0,Zi.prototype.getPoint=function(t,e){e=e||new $;var i=this.v0,n=this.v1,r=this.v2,o=this.v3;return e.set(co(t,i.x,n.x,r.x,o.x),co(t,i.y,n.y,r.y,o.y)),e},Zi.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Zi.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Zi.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},cn.prototype=Object.create(pe.prototype),cn.prototype.constructor=cn,cn.prototype.isCubicBezierCurve3=!0,cn.prototype.getPoint=function(t,e){e=e||new M;var i=this.v0,n=this.v1,r=this.v2,o=this.v3;return e.set(co(t,i.x,n.x,r.x,o.x),co(t,i.y,n.y,r.y,o.y),co(t,i.z,n.z,r.z,o.z)),e},cn.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},cn.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},cn.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},zi.prototype=Object.create(pe.prototype),zi.prototype.constructor=zi,zi.prototype.isLineCurve=!0,zi.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},zi.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},zi.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},zi.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},zi.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},zi.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Ji.prototype=Object.create(pe.prototype),Ji.prototype.constructor=Ji,Ji.prototype.isLineCurve3=!0,Ji.prototype.getPoint=function(t,e){return e=e||new M,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},Ji.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ji.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ji.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ji.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qi.prototype=Object.create(pe.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isQuadraticBezierCurve=!0,Qi.prototype.getPoint=function(t,e){e=e||new $;var i=this.v0,n=this.v1,r=this.v2;return e.set(lo(t,i.x,n.x,r.x),lo(t,i.y,n.y,r.y)),e},Qi.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qi.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qi.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},un.prototype=Object.create(pe.prototype),un.prototype.constructor=un,un.prototype.isQuadraticBezierCurve3=!0,un.prototype.getPoint=function(t,e){e=e||new M;var i=this.v0,n=this.v1,r=this.v2;return e.set(lo(t,i.x,n.x,r.x),lo(t,i.y,n.y,r.y),lo(t,i.z,n.z,r.z)),e},un.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},un.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},un.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$i.prototype=Object.create(pe.prototype),$i.prototype.constructor=$i,$i.prototype.isSplineCurve=!0,$i.prototype.getPoint=function(t,e){e=e||new $;var i=this.points,n=(i.length-1)*t;t=Math.floor(n),n-=t;var r=i[t===0?t:t-1],o=i[t],s=i[t>i.length-2?i.length-1:t+1];return i=i[t>i.length-3?i.length-1:t+2],e.set(Ks(n,r.x,o.x,s.x,i.x),Ks(n,r.y,o.y,s.y,i.y)),e},$i.prototype.copy=function(t){pe.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this},$i.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t},$i.prototype.fromJSON=function(t){pe.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new $().fromArray(n))}return this};var wa=Object.freeze({ArcCurve:wr,CatmullRomCurve3:Ei,CubicBezierCurve:Zi,CubicBezierCurve3:cn,EllipseCurve:Vi,LineCurve:zi,LineCurve3:Ji,QuadraticBezierCurve:Qi,QuadraticBezierCurve3:un,SplineCurve:$i});yn.prototype=Object.assign(Object.create(pe.prototype),{constructor:yn,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new zi(e,t))},getPoint:function(t){var e=t*this.getLength(),i=this.getCurveLengths();for(t=0;t<i.length;){if(i[t]>=e)return e=i[t]-e,t=this.curves[t],i=t.getLength(),t.getPointAt(i===0?0:1-e/i);t++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0,n=this.curves.length;i<n;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t},getSpacedPoints:function(t){t===void 0&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e=[],i,n=0,r=this.curves;n<r.length;n++){var o=r[n];o=o.getPoints(o&&o.isEllipseCurve?2*t:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?t*o.points.length:t);for(var s=0;s<o.length;s++){var a=o[s];i&&i.equals(a)||(e.push(a),i=a)}}return this.autoClose&&1<e.length&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},copy:function(t){pe.prototype.copy.call(this,t),this.curves=[];for(var e=0,i=t.curves.length;e<i;e++)this.curves.push(t.curves[e].clone());return this.autoClose=t.autoClose,this},toJSON:function(){var t=pe.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,i=this.curves.length;e<i;e++)t.curves.push(this.curves[e].toJSON());return t},fromJSON:function(t){pe.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,i=t.curves.length;e<i;e++){var n=t.curves[e];this.curves.push(new wa[n.type]().fromJSON(n))}return this}}),Ki.prototype=Object.assign(Object.create(yn.prototype),{constructor:Ki,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var i=new zi(this.currentPoint.clone(),new $(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){t=new Qi(this.currentPoint.clone(),new $(t,e),new $(i,n)),this.curves.push(t),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,r,o){t=new Zi(this.currentPoint.clone(),new $(t,e),new $(i,n),new $(r,o)),this.curves.push(t),this.currentPoint.set(r,o)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t);e=new $i(e),this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,r,o){this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,n,r,o)},absarc:function(t,e,i,n,r,o){this.absellipse(t,e,i,i,n,r,o)},ellipse:function(t,e,i,n,r,o,s,a){this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,n,r,o,s,a)},absellipse:function(t,e,i,n,r,o,s,a){t=new Vi(t,e,i,n,r,o,s,a),0<this.curves.length&&(e=t.getPoint(0),e.equals(this.currentPoint)||this.lineTo(e.x,e.y)),this.curves.push(t),t=t.getPoint(1),this.currentPoint.copy(t)},copy:function(t){return yn.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=yn.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return yn.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Pn.prototype=Object.assign(Object.create(Ki.prototype),{constructor:Pn,getPointsHoles:function(t){for(var e=[],i=0,n=this.holes.length;i<n;i++)e[i]=this.holes[i].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){Ki.prototype.copy.call(this,t),this.holes=[];for(var e=0,i=t.holes.length;e<i;e++)this.holes.push(t.holes[e].clone());return this},toJSON:function(){var t=Ki.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,i=this.holes.length;e<i;e++)t.holes.push(this.holes[e].toJSON());return t},fromJSON:function(t){Ki.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,i=t.holes.length;e<i;e++){var n=t.holes[e];this.holes.push(new Ki().fromJSON(n))}return this}}),ri.prototype=Object.assign(Object.create(b.prototype),{constructor:ri,isLight:!0,copy:function(t){return b.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){return t=b.prototype.toJSON.call(this,t),t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}),Do.prototype=Object.assign(Object.create(ri.prototype),{constructor:Do,isHemisphereLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Yn.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return new this.constructor().copy(this)},toJSON:function(){var t={};return this.bias!==0&&(t.bias=this.bias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),zo.prototype=Object.assign(Object.create(Yn.prototype),{constructor:zo,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*Ee.RAD2DEG*t.angle,n=this.mapSize.width/this.mapSize.height;t=t.distance||e.far,(i!==e.fov||n!==e.aspect||t!==e.far)&&(e.fov=i,e.aspect=n,e.far=t,e.updateProjectionMatrix())}}),No.prototype=Object.assign(Object.create(ri.prototype),{constructor:No,isSpotLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Bo.prototype=Object.assign(Object.create(ri.prototype),{constructor:Bo,isPointLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),uo.prototype=Object.assign(Object.create(Kt.prototype),{constructor:uo,isOrthographicCamera:!0,copy:function(t,e){return Kt.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this},setViewOffset:function(t,e,i,n,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,r=i-t;if(i+=t,t=n+e,e=n-e,this.view!==null&&this.view.enabled){i=this.zoom/(this.view.width/this.view.fullWidth),e=this.zoom/(this.view.height/this.view.fullHeight);var o=(this.right-this.left)/this.view.width;n=(this.top-this.bottom)/this.view.height,r+=this.view.offsetX/i*o,i=r+this.view.width/i*o,t-=this.view.offsetY/e*n,e=t-this.view.height/e*n}this.projectionMatrix.makeOrthographic(r,i,t,e,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=b.prototype.toJSON.call(this,t),t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}),Uo.prototype=Object.assign(Object.create(Yn.prototype),{constructor:Uo}),Fo.prototype=Object.assign(Object.create(ri.prototype),{constructor:Fo,isDirectionalLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Go.prototype=Object.assign(Object.create(ri.prototype),{constructor:Go,isAmbientLight:!0}),Ho.prototype=Object.assign(Object.create(ri.prototype),{constructor:Ho,isRectAreaLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){return t=ri.prototype.toJSON.call(this,t),t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(ko.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(r.manager);o.setPath(r.path),o.load(t,function(s){e(r.parse(JSON.parse(s)))},i,n)},parse:function(t){function e(s){return i[s]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",s),i[s]}var i=this.textures,n=new fh[t.type];if(t.uuid!==void 0&&(n.uuid=t.uuid),t.name!==void 0&&(n.name=t.name),t.color!==void 0&&n.color.setHex(t.color),t.roughness!==void 0&&(n.roughness=t.roughness),t.metalness!==void 0&&(n.metalness=t.metalness),t.emissive!==void 0&&n.emissive.setHex(t.emissive),t.specular!==void 0&&n.specular.setHex(t.specular),t.shininess!==void 0&&(n.shininess=t.shininess),t.clearCoat!==void 0&&(n.clearCoat=t.clearCoat),t.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=t.clearCoatRoughness),t.vertexColors!==void 0&&(n.vertexColors=t.vertexColors),t.fog!==void 0&&(n.fog=t.fog),t.flatShading!==void 0&&(n.flatShading=t.flatShading),t.blending!==void 0&&(n.blending=t.blending),t.combine!==void 0&&(n.combine=t.combine),t.side!==void 0&&(n.side=t.side),t.opacity!==void 0&&(n.opacity=t.opacity),t.transparent!==void 0&&(n.transparent=t.transparent),t.alphaTest!==void 0&&(n.alphaTest=t.alphaTest),t.depthTest!==void 0&&(n.depthTest=t.depthTest),t.depthWrite!==void 0&&(n.depthWrite=t.depthWrite),t.colorWrite!==void 0&&(n.colorWrite=t.colorWrite),t.wireframe!==void 0&&(n.wireframe=t.wireframe),t.wireframeLinewidth!==void 0&&(n.wireframeLinewidth=t.wireframeLinewidth),t.wireframeLinecap!==void 0&&(n.wireframeLinecap=t.wireframeLinecap),t.wireframeLinejoin!==void 0&&(n.wireframeLinejoin=t.wireframeLinejoin),t.rotation!==void 0&&(n.rotation=t.rotation),t.linewidth!==1&&(n.linewidth=t.linewidth),t.dashSize!==void 0&&(n.dashSize=t.dashSize),t.gapSize!==void 0&&(n.gapSize=t.gapSize),t.scale!==void 0&&(n.scale=t.scale),t.polygonOffset!==void 0&&(n.polygonOffset=t.polygonOffset),t.polygonOffsetFactor!==void 0&&(n.polygonOffsetFactor=t.polygonOffsetFactor),t.polygonOffsetUnits!==void 0&&(n.polygonOffsetUnits=t.polygonOffsetUnits),t.skinning!==void 0&&(n.skinning=t.skinning),t.morphTargets!==void 0&&(n.morphTargets=t.morphTargets),t.dithering!==void 0&&(n.dithering=t.dithering),t.visible!==void 0&&(n.visible=t.visible),t.userData!==void 0&&(n.userData=t.userData),t.uniforms!==void 0)for(var r in t.uniforms){var o=t.uniforms[r];switch(n.uniforms[r]={},o.type){case"t":n.uniforms[r].value=e(o.value);break;case"c":n.uniforms[r].value=new H().setHex(o.value);break;case"v2":n.uniforms[r].value=new $().fromArray(o.value);break;case"v3":n.uniforms[r].value=new M().fromArray(o.value);break;case"v4":n.uniforms[r].value=new Z().fromArray(o.value);break;case"m4":n.uniforms[r].value=new gt().fromArray(o.value);break;default:n.uniforms[r].value=o.value}}return t.defines!==void 0&&(n.defines=t.defines),t.vertexShader!==void 0&&(n.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(n.fragmentShader=t.fragmentShader),t.shading!==void 0&&(n.flatShading=t.shading===1),t.size!==void 0&&(n.size=t.size),t.sizeAttenuation!==void 0&&(n.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(n.map=e(t.map)),t.alphaMap!==void 0&&(n.alphaMap=e(t.alphaMap),n.transparent=!0),t.bumpMap!==void 0&&(n.bumpMap=e(t.bumpMap)),t.bumpScale!==void 0&&(n.bumpScale=t.bumpScale),t.normalMap!==void 0&&(n.normalMap=e(t.normalMap)),t.normalMapType!==void 0&&(n.normalMapType=t.normalMapType),t.normalScale!==void 0&&(r=t.normalScale,Array.isArray(r)===!1&&(r=[r,r]),n.normalScale=new $().fromArray(r)),t.displacementMap!==void 0&&(n.displacementMap=e(t.displacementMap)),t.displacementScale!==void 0&&(n.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(n.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(n.roughnessMap=e(t.roughnessMap)),t.metalnessMap!==void 0&&(n.metalnessMap=e(t.metalnessMap)),t.emissiveMap!==void 0&&(n.emissiveMap=e(t.emissiveMap)),t.emissiveIntensity!==void 0&&(n.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(n.specularMap=e(t.specularMap)),t.envMap!==void 0&&(n.envMap=e(t.envMap)),t.envMapIntensity!==void 0&&(n.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(n.reflectivity=t.reflectivity),t.lightMap!==void 0&&(n.lightMap=e(t.lightMap)),t.lightMapIntensity!==void 0&&(n.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(n.aoMap=e(t.aoMap)),t.aoMapIntensity!==void 0&&(n.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(n.gradientMap=e(t.gradientMap)),n},setPath:function(t){return this.path=t,this},setTextures:function(t){return this.textures=t,this}});var qo={decodeText:function(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);for(var e="",i=0,n=t.length;i<n;i++)e+=String.fromCharCode(t[i]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return e===-1?"./":t.substr(0,e+1)}};Object.assign(ps.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(r.manager);o.setPath(r.path),o.load(t,function(s){e(r.parse(JSON.parse(s)))},i,n)},parse:function(t){var e=new Lt,i=t.data.index;i!==void 0&&(i=new Ma[i.type](i.array),e.setIndex(new Y(i,1)));var n=t.data.attributes;for(o in n){var r=n[o];i=new Ma[r.type](r.array),e.addAttribute(o,new Y(i,r.itemSize,r.normalized))}var o=t.data.groups||t.data.drawcalls||t.data.offsets;if(o!==void 0)for(i=0,n=o.length;i!==n;++i)r=o[i],e.addGroup(r.start,r.count,r.materialIndex);return t=t.data.boundingSphere,t!==void 0&&(o=new M,t.center!==void 0&&o.fromArray(t.center),e.boundingSphere=new zt(o,t.radius)),e},setPath:function(t){return this.path=t,this}});var Ma={Int8Array,Uint8Array,Uint8ClampedArray:typeof Uint8ClampedArray<"u"?Uint8ClampedArray:Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};Mr.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,i=0,n=e.length;i<n;i+=2){var r=e[i+1];if(e[i].test(t))return r}return null}},Object.assign(Mr.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,i){for(var n=[],r=0;r<t.length;++r)n[r]=this.createMaterial(t[r],e,i);return n},createMaterial:function(){var t={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},e=new H,i=new Io,n=new ko;return function(r,o,s){function a(d,g,w,S,P){d=o+d;var G=Mr.Handlers.get(d);return G!==null?d=G.load(d):(i.setCrossOrigin(s),d=i.load(d)),g!==void 0&&(d.repeat.fromArray(g),g[0]!==1&&(d.wrapS=1e3),g[1]!==1&&(d.wrapT=1e3)),w!==void 0&&d.offset.fromArray(w),S!==void 0&&(S[0]==="repeat"&&(d.wrapS=1e3),S[0]==="mirror"&&(d.wrapS=1002),S[1]==="repeat"&&(d.wrapT=1e3),S[1]==="mirror"&&(d.wrapT=1002)),P!==void 0&&(d.anisotropy=P),g=Ee.generateUUID(),h[g]=d,g}var h={},l={uuid:Ee.generateUUID(),type:"MeshLambertMaterial"},c;for(c in r){var u=r[c];switch(c){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":l.name=u;break;case"blending":l.blending=t[u];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",c,"is no longer supported.");break;case"colorDiffuse":l.color=e.fromArray(u).getHex();break;case"colorSpecular":l.specular=e.fromArray(u).getHex();break;case"colorEmissive":l.emissive=e.fromArray(u).getHex();break;case"specularCoef":l.shininess=u;break;case"shading":u.toLowerCase()==="basic"&&(l.type="MeshBasicMaterial"),u.toLowerCase()==="phong"&&(l.type="MeshPhongMaterial"),u.toLowerCase()==="standard"&&(l.type="MeshStandardMaterial");break;case"mapDiffuse":l.map=a(u,r.mapDiffuseRepeat,r.mapDiffuseOffset,r.mapDiffuseWrap,r.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":l.emissiveMap=a(u,r.mapEmissiveRepeat,r.mapEmissiveOffset,r.mapEmissiveWrap,r.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":l.lightMap=a(u,r.mapLightRepeat,r.mapLightOffset,r.mapLightWrap,r.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":l.aoMap=a(u,r.mapAORepeat,r.mapAOOffset,r.mapAOWrap,r.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":l.bumpMap=a(u,r.mapBumpRepeat,r.mapBumpOffset,r.mapBumpWrap,r.mapBumpAnisotropy);break;case"mapBumpScale":l.bumpScale=u;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":l.normalMap=a(u,r.mapNormalRepeat,r.mapNormalOffset,r.mapNormalWrap,r.mapNormalAnisotropy);break;case"mapNormalFactor":l.normalScale=u;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":l.specularMap=a(u,r.mapSpecularRepeat,r.mapSpecularOffset,r.mapSpecularWrap,r.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":l.metalnessMap=a(u,r.mapMetalnessRepeat,r.mapMetalnessOffset,r.mapMetalnessWrap,r.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":l.roughnessMap=a(u,r.mapRoughnessRepeat,r.mapRoughnessOffset,r.mapRoughnessWrap,r.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":l.alphaMap=a(u,r.mapAlphaRepeat,r.mapAlphaOffset,r.mapAlphaWrap,r.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":l.side=1;break;case"doubleSided":l.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),l.opacity=u;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":l[c]=u;break;case"vertexColors":u===!0&&(l.vertexColors=2),u==="face"&&(l.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",c,u)}}return l.type==="MeshBasicMaterial"&&delete l.emissive,l.type!=="MeshPhongMaterial"&&delete l.specular,1>l.opacity&&(l.transparent=!0),n.setTextures(h),n.parse(l)}}()}),Object.assign(Vo.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var r=this,o=this.path===void 0?qo.extractUrlBase(t):this.path,s=new Xi(this.manager);s.setPath(this.path),s.setWithCredentials(this.withCredentials),s.load(t,function(a){a=JSON.parse(a);var h=a.metadata;if(h!==void 0&&(h=h.type,h!==void 0&&h.toLowerCase()==="object")){console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");return}a=r.parse(a,o),e(a.geometry,a.materials)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(){return function(t,e){t.data!==void 0&&(t=t.data),t.scale=t.scale!==void 0?1/t.scale:1;var i=new F,n=t,r,o,s,a=n.faces,h=n.vertices,l=n.normals,c=n.colors,u=n.scale,d=0;if(n.uvs!==void 0){for(r=0;r<n.uvs.length;r++)n.uvs[r].length&&d++;for(r=0;r<d;r++)i.faceVertexUvs[r]=[]}var g=0;for(s=h.length;g<s;)r=new M,r.x=h[g++]*u,r.y=h[g++]*u,r.z=h[g++]*u,i.vertices.push(r);for(g=0,s=a.length;g<s;){h=a[g++];var w=h&1,S=h&2;r=h&8;var P=h&16,G=h&32;if(u=h&64,h&=128,w){w=new O,w.a=a[g],w.b=a[g+1],w.c=a[g+3];var N=new O;if(N.a=a[g+1],N.b=a[g+2],N.c=a[g+3],g+=4,S&&(S=a[g++],w.materialIndex=S,N.materialIndex=S),S=i.faces.length,r)for(r=0;r<d;r++){var q=n.uvs[r];for(i.faceVertexUvs[r][S]=[],i.faceVertexUvs[r][S+1]=[],o=0;4>o;o++){var V=a[g++],ot=q[2*V];V=q[2*V+1],ot=new $(ot,V),o!==2&&i.faceVertexUvs[r][S].push(ot),o!==0&&i.faceVertexUvs[r][S+1].push(ot)}}if(P&&(P=3*a[g++],w.normal.set(l[P++],l[P++],l[P]),N.normal.copy(w.normal)),G)for(r=0;4>r;r++)P=3*a[g++],G=new M(l[P++],l[P++],l[P]),r!==2&&w.vertexNormals.push(G),r!==0&&N.vertexNormals.push(G);if(u&&(u=a[g++],u=c[u],w.color.setHex(u),N.color.setHex(u)),h)for(r=0;4>r;r++)u=a[g++],u=c[u],r!==2&&w.vertexColors.push(new H(u)),r!==0&&N.vertexColors.push(new H(u));i.faces.push(w),i.faces.push(N)}else{if(w=new O,w.a=a[g++],w.b=a[g++],w.c=a[g++],S&&(S=a[g++],w.materialIndex=S),S=i.faces.length,r)for(r=0;r<d;r++)for(q=n.uvs[r],i.faceVertexUvs[r][S]=[],o=0;3>o;o++)V=a[g++],ot=q[2*V],V=q[2*V+1],ot=new $(ot,V),i.faceVertexUvs[r][S].push(ot);if(P&&(P=3*a[g++],w.normal.set(l[P++],l[P++],l[P])),G)for(r=0;3>r;r++)P=3*a[g++],G=new M(l[P++],l[P++],l[P]),w.vertexNormals.push(G);if(u&&(u=a[g++],w.color.setHex(c[u])),h)for(r=0;3>r;r++)u=a[g++],w.vertexColors.push(new H(c[u]));i.faces.push(w)}}if(n=t,g=n.influencesPerVertex!==void 0?n.influencesPerVertex:2,n.skinWeights)for(s=0,a=n.skinWeights.length;s<a;s+=g)i.skinWeights.push(new Z(n.skinWeights[s],1<g?n.skinWeights[s+1]:0,2<g?n.skinWeights[s+2]:0,3<g?n.skinWeights[s+3]:0));if(n.skinIndices)for(s=0,a=n.skinIndices.length;s<a;s+=g)i.skinIndices.push(new Z(n.skinIndices[s],1<g?n.skinIndices[s+1]:0,2<g?n.skinIndices[s+2]:0,3<g?n.skinIndices[s+3]:0));if(i.bones=n.bones,i.bones&&0<i.bones.length&&(i.skinWeights.length!==i.skinIndices.length||i.skinIndices.length!==i.vertices.length)&&console.warn("When skinning, number of vertices ("+i.vertices.length+"), skinIndices ("+i.skinIndices.length+"), and skinWeights ("+i.skinWeights.length+") should match."),s=t,a=s.scale,s.morphTargets!==void 0)for(n=0,g=s.morphTargets.length;n<g;n++)for(i.morphTargets[n]={},i.morphTargets[n].name=s.morphTargets[n].name,i.morphTargets[n].vertices=[],l=i.morphTargets[n].vertices,c=s.morphTargets[n].vertices,d=0,h=c.length;d<h;d+=3)u=new M,u.x=c[d]*a,u.y=c[d+1]*a,u.z=c[d+2]*a,l.push(u);if(s.morphColors!==void 0&&0<s.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),a=i.faces,s=s.morphColors[0].colors,n=0,g=a.length;n<g;n++)a[n].color.fromArray(s,3*n);for(s=t,n=[],g=[],s.animation!==void 0&&g.push(s.animation),s.animations!==void 0&&(s.animations.length?g=g.concat(s.animations):g.push(s.animations)),s=0;s<g.length;s++)(a=ki.parseAnimation(g[s],i.bones))&&n.push(a);return i.morphTargets&&(g=ki.CreateClipsFromMorphTargetSequences(i.morphTargets,10),n=n.concat(g)),0<n.length&&(i.animations=n),i.computeFaceNormals(),i.computeBoundingSphere(),t.materials===void 0||t.materials.length===0?{geometry:i}:(t=Mr.prototype.initMaterials(t.materials,this.resourcePath||e,this.crossOrigin),{geometry:i,materials:t})}}()}),Object.assign(ds.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var r=this,o=this.path===void 0?qo.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||o,o=new Xi(r.manager),o.setPath(this.path),o.load(t,function(s){var a=null;try{a=JSON.parse(s)}catch(h){n!==void 0&&n(h),console.error("THREE:ObjectLoader: Can't parse "+t+".",h.message);return}s=a.metadata,s===void 0||s.type===void 0||s.type.toLowerCase()==="geometry"?console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead."):r.parse(a,e)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var i=this.parseShape(t.shapes);i=this.parseGeometries(t.geometries,i);var n=this.parseImages(t.images,function(){e!==void 0&&e(r)});n=this.parseTextures(t.textures,n),n=this.parseMaterials(t.materials,n);var r=this.parseObject(t.object,i,n);return t.animations&&(r.animations=this.parseAnimations(t.animations)),t.images!==void 0&&t.images.length!==0||e===void 0||e(r),r},parseShape:function(t){var e={};if(t!==void 0)for(var i=0,n=t.length;i<n;i++){var r=new Pn().fromJSON(t[i]);e[r.uuid]=r}return e},parseGeometries:function(t,e){var i={};if(t!==void 0)for(var n=new Vo,r=new ps,o=0,s=t.length;o<s;o++){var a=t[o];switch(a.type){case"PlaneGeometry":case"PlaneBufferGeometry":var h=new Ni[a.type](a.width,a.height,a.widthSegments,a.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":h=new Ni[a.type](a.width,a.height,a.depth,a.widthSegments,a.heightSegments,a.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":h=new Ni[a.type](a.radius,a.segments,a.thetaStart,a.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":h=new Ni[a.type](a.radiusTop,a.radiusBottom,a.height,a.radialSegments,a.heightSegments,a.openEnded,a.thetaStart,a.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":h=new Ni[a.type](a.radius,a.height,a.radialSegments,a.heightSegments,a.openEnded,a.thetaStart,a.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":h=new Ni[a.type](a.radius,a.widthSegments,a.heightSegments,a.phiStart,a.phiLength,a.thetaStart,a.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":h=new Ni[a.type](a.radius,a.detail);break;case"RingGeometry":case"RingBufferGeometry":h=new Ni[a.type](a.innerRadius,a.outerRadius,a.thetaSegments,a.phiSegments,a.thetaStart,a.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":h=new Ni[a.type](a.radius,a.tube,a.radialSegments,a.tubularSegments,a.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":h=new Ni[a.type](a.radius,a.tube,a.tubularSegments,a.radialSegments,a.p,a.q);break;case"LatheGeometry":case"LatheBufferGeometry":h=new Ni[a.type](a.points,a.segments,a.phiStart,a.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":h=new Ni[a.type](a.vertices,a.indices,a.radius,a.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":h=[];for(var l=0,c=a.shapes.length;l<c;l++){var u=e[a.shapes[l]];h.push(u)}h=new Ni[a.type](h,a.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(h=[],l=0,c=a.shapes.length;l<c;l++)u=e[a.shapes[l]],h.push(u);l=a.options.extrudePath,l!==void 0&&(a.options.extrudePath=new wa[l.type]().fromJSON(l)),h=new Ni[a.type](h,a.options);break;case"BufferGeometry":h=r.parse(a);break;case"Geometry":h=n.parse(a,this.resourcePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+a.type+'"');continue}h.uuid=a.uuid,a.name!==void 0&&(h.name=a.name),h.isBufferGeometry===!0&&a.userData!==void 0&&(h.userData=a.userData),i[a.uuid]=h}return i},parseMaterials:function(t,e){var i={},n={};if(t!==void 0){var r=new ko;r.setTextures(e),e=0;for(var o=t.length;e<o;e++){var s=t[e];if(s.type==="MultiMaterial"){for(var a=[],h=0;h<s.materials.length;h++){var l=s.materials[h];i[l.uuid]===void 0&&(i[l.uuid]=r.parse(l)),a.push(i[l.uuid])}n[s.uuid]=a}else n[s.uuid]=r.parse(s),i[s.uuid]=n[s.uuid]}}return n},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],r=ki.parse(n);n.uuid!==void 0&&(r.uuid=n.uuid),e.push(r)}return e},parseImages:function(t,e){function i(d){return n.manager.itemStart(d),o.load(d,function(){n.manager.itemEnd(d)},void 0,function(){n.manager.itemError(d),n.manager.itemEnd(d)})}var n=this,r={};if(t!==void 0&&0<t.length){e=new hs(e);var o=new ho(e);o.setCrossOrigin(this.crossOrigin),e=0;for(var s=t.length;e<s;e++){var a=t[e],h=a.url;if(Array.isArray(h)){r[a.uuid]=[];for(var l=0,c=h.length;l<c;l++){var u=h[l];u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(u)?u:n.resourcePath+u,r[a.uuid].push(i(u))}}else u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(a.url)?a.url:n.resourcePath+a.url,r[a.uuid]=i(u)}}return r},parseTextures:function(t,e){function i(h,l){return typeof h=="number"?h:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",h),l[h])}var n={};if(t!==void 0)for(var r=0,o=t.length;r<o;r++){var s=t[r];s.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),e[s.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",s.image);var a=Array.isArray(e[s.image])?new _(e[s.image]):new Ot(e[s.image]);a.needsUpdate=!0,a.uuid=s.uuid,s.name!==void 0&&(a.name=s.name),s.mapping!==void 0&&(a.mapping=i(s.mapping,mh)),s.offset!==void 0&&a.offset.fromArray(s.offset),s.repeat!==void 0&&a.repeat.fromArray(s.repeat),s.center!==void 0&&a.center.fromArray(s.center),s.rotation!==void 0&&(a.rotation=s.rotation),s.wrap!==void 0&&(a.wrapS=i(s.wrap[0],Ta),a.wrapT=i(s.wrap[1],Ta)),s.format!==void 0&&(a.format=s.format),s.minFilter!==void 0&&(a.minFilter=i(s.minFilter,Sa)),s.magFilter!==void 0&&(a.magFilter=i(s.magFilter,Sa)),s.anisotropy!==void 0&&(a.anisotropy=s.anisotropy),s.flipY!==void 0&&(a.flipY=s.flipY),n[s.uuid]=a}return n},parseObject:function(t,e,i){function n(l){return e[l]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",l),e[l]}function r(l){if(l!==void 0){if(Array.isArray(l)){for(var c=[],u=0,d=l.length;u<d;u++){var g=l[u];i[g]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",g),c.push(i[g])}return c}return i[l]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",l),i[l]}}switch(t.type){case"Scene":var o=new qi;t.background!==void 0&&Number.isInteger(t.background)&&(o.background=new H(t.background)),t.fog!==void 0&&(t.fog.type==="Fog"?o.fog=new yi(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(o.fog=new Jt(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":o=new Bt(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(o.focus=t.focus),t.zoom!==void 0&&(o.zoom=t.zoom),t.filmGauge!==void 0&&(o.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(o.filmOffset=t.filmOffset),t.view!==void 0&&(o.view=Object.assign({},t.view));break;case"OrthographicCamera":o=new uo(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(o.zoom=t.zoom),t.view!==void 0&&(o.view=Object.assign({},t.view));break;case"AmbientLight":o=new Go(t.color,t.intensity);break;case"DirectionalLight":o=new Fo(t.color,t.intensity);break;case"PointLight":o=new Bo(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":o=new Ho(t.color,t.intensity,t.width,t.height);break;case"SpotLight":o=new No(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":o=new Do(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":o=n(t.geometry);var s=r(t.material);o=o.bones&&0<o.bones.length?new ke(o,s):new Ke(o,s);break;case"LOD":o=new ii;break;case"Line":o=new qe(n(t.geometry),r(t.material),t.mode);break;case"LineLoop":o=new an(n(t.geometry),r(t.material));break;case"LineSegments":o=new Re(n(t.geometry),r(t.material));break;case"PointCloud":case"Points":o=new nr(n(t.geometry),r(t.material));break;case"Sprite":o=new ei(r(t.material));break;case"Group":o=new Pe;break;default:o=new b}if(o.uuid=t.uuid,t.name!==void 0&&(o.name=t.name),t.matrix!==void 0?(o.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=t.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(t.position!==void 0&&o.position.fromArray(t.position),t.rotation!==void 0&&o.rotation.fromArray(t.rotation),t.quaternion!==void 0&&o.quaternion.fromArray(t.quaternion),t.scale!==void 0&&o.scale.fromArray(t.scale)),t.castShadow!==void 0&&(o.castShadow=t.castShadow),t.receiveShadow!==void 0&&(o.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(o.shadow.bias=t.shadow.bias),t.shadow.radius!==void 0&&(o.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(o.visible=t.visible),t.frustumCulled!==void 0&&(o.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(o.renderOrder=t.renderOrder),t.userData!==void 0&&(o.userData=t.userData),t.layers!==void 0&&(o.layers.mask=t.layers),t.children!==void 0){s=t.children;for(var a=0;a<s.length;a++)o.add(this.parseObject(s[a],e,i))}if(t.type==="LOD")for(t=t.levels,s=0;s<t.length;s++){a=t[s];var h=o.getObjectByProperty("uuid",a.object);h!==void 0&&o.addLevel(h,a.distance)}return o}});var mh={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Ta={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Sa={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};fs.prototype={constructor:fs,setOptions:function(t){return this.options=t,this},load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,o=Zn.get(t);if(o!==void 0)return r.manager.itemStart(t),setTimeout(function(){e&&e(o),r.manager.itemEnd(t)},0),o;fetch(t).then(function(s){return s.blob()}).then(function(s){return createImageBitmap(s,r.options)}).then(function(s){Zn.add(t,s),e&&e(s),r.manager.itemEnd(t)}).catch(function(s){n&&n(s),r.manager.itemError(t),r.manager.itemEnd(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(ms.prototype,{moveTo:function(t,e){this.currentPath=new Ki,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,i,n){this.currentPath.quadraticCurveTo(t,e,i,n)},bezierCurveTo:function(t,e,i,n,r,o){this.currentPath.bezierCurveTo(t,e,i,n,r,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(P){for(var G=[],N=0,q=P.length;N<q;N++){var V=P[N],ot=new Pn;ot.curves=V.curves,G.push(ot)}return G}function n(P,G){for(var N=G.length,q=!1,V=N-1,ot=0;ot<N;V=ot++){var T=G[V],A=G[ot],et=A.x-T.x,yt=A.y-T.y;if(Math.abs(yt)>Number.EPSILON){if(0>yt&&(T=G[ot],et=-et,A=G[V],yt=-yt),!(P.y<T.y||P.y>A.y))if(P.y===T.y){if(P.x===T.x)return!0}else{if(V=yt*(P.x-T.x)-et*(P.y-T.y),V===0)return!0;0>V||(q=!q)}}else if(P.y===T.y&&(A.x<=P.x&&P.x<=T.x||T.x<=P.x&&P.x<=A.x))return!0}return q}var r=wn.isClockWise,o=this.subPaths;if(o.length===0)return[];if(e===!0)return i(o);if(e=[],o.length===1){var s=o[0],a=new Pn;return a.curves=s.curves,e.push(a),e}var h=!r(o[0].getPoints());h=t?!h:h,a=[];var l=[],c=[],u=0;l[u]=void 0,c[u]=[];for(var d=0,g=o.length;d<g;d++){s=o[d];var w=s.getPoints(),S=r(w);(S=t?!S:S)?(!h&&l[u]&&u++,l[u]={s:new Pn,p:w},l[u].s.curves=s.curves,h&&u++,c[u]=[]):c[u].push({h:s,p:w[0]})}if(!l[0])return i(o);if(1<l.length){for(d=!1,t=[],r=0,o=l.length;r<o;r++)a[r]=[];for(r=0,o=l.length;r<o;r++)for(s=c[r],S=0;S<s.length;S++){for(h=s[S],u=!0,w=0;w<l.length;w++)n(h.p,l[w].p)&&(r!==w&&t.push({froms:r,tos:w,hole:S}),u?(u=!1,a[w].push(h)):d=!0);u&&a[r].push(h)}0<t.length&&(d||(c=a))}for(d=0,r=l.length;d<r;d++)for(a=l[d].s,e.push(a),t=c[d],o=0,s=t.length;o<s;o++)a.holes.push(t[o].h);return e}}),Object.assign(gs.prototype,{isFont:!0,generateShapes:function(t,e){e===void 0&&(e=100);var i=[],n=e;e=this.data;var r=Array.from?Array.from(t):String(t).split("");n/=e.resolution;var o=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*n;t=[];for(var s=0,a=0,h=0;h<r.length;h++){var l=r[h];if(l===`
|
|
2571
|
+
`)s=0,a-=o;else{var c=n,u=s,d=a;if(l=e.glyphs[l]||e.glyphs["?"]){var g=new ms;if(l.o)for(var w=l._cachedOutline||(l._cachedOutline=l.o.split(" ")),S=0,P=w.length;S<P;)switch(w[S++]){case"m":var G=w[S++]*c+u,N=w[S++]*c+d;g.moveTo(G,N);break;case"l":G=w[S++]*c+u,N=w[S++]*c+d,g.lineTo(G,N);break;case"q":var q=w[S++]*c+u,V=w[S++]*c+d,ot=w[S++]*c+u,T=w[S++]*c+d;g.quadraticCurveTo(ot,T,q,V);break;case"b":q=w[S++]*c+u,V=w[S++]*c+d,ot=w[S++]*c+u,T=w[S++]*c+d,G=w[S++]*c+u,N=w[S++]*c+d,g.bezierCurveTo(ot,T,G,N,q,V)}c={offsetX:l.ha*c,path:g}}else c=void 0;s+=c.offsetX,t.push(c.path)}}for(e=0,r=t.length;e<r;e++)Array.prototype.push.apply(i,t[e].toShapes());return i}}),Object.assign(ta.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(this.manager);o.setPath(this.path),o.load(t,function(s){try{var a=JSON.parse(s)}catch{console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),a=JSON.parse(s.substring(65,s.length-2))}s=r.parse(a),e&&e(s)},i,n)},parse:function(t){return new gs(t)},setPath:function(t){return this.path=t,this}});var Yo,zs={getContext:function(){return Yo===void 0&&(Yo=new(window.AudioContext||window.webkitAudioContext)),Yo},setContext:function(t){Yo=t}};Object.assign(vs.prototype,{load:function(t,e,i,n){var r=new Xi(this.manager);r.setResponseType("arraybuffer"),r.setPath(this.path),r.load(t,function(o){o=o.slice(0),zs.getContext().decodeAudioData(o,function(s){e(s)})},i,n)},setPath:function(t){return this.path=t,this}}),Object.assign(ea.prototype,{update:function(){var t,e,i,n,r,o,s,a,h=new gt,l=new gt;return function(c){if(t!==this||e!==c.focus||i!==c.fov||n!==c.aspect*this.aspect||r!==c.near||o!==c.far||s!==c.zoom||a!==this.eyeSep){t=this,e=c.focus,i=c.fov,n=c.aspect*this.aspect,r=c.near,o=c.far,s=c.zoom;var u=c.projectionMatrix.clone();a=this.eyeSep/2;var d=a*r/e,g=r*Math.tan(Ee.DEG2RAD*i*.5)/s;l.elements[12]=-a,h.elements[12]=a;var w=-g*n+d,S=g*n+d;u.elements[0]=2*r/(S-w),u.elements[8]=(S+w)/(S-w),this.cameraL.projectionMatrix.copy(u),w=-g*n-d,S=g*n-d,u.elements[0]=2*r/(S-w),u.elements[8]=(S+w)/(S-w),this.cameraR.projectionMatrix.copy(u)}this.cameraL.matrixWorld.copy(c.matrixWorld).multiply(l),this.cameraR.matrixWorld.copy(c.matrixWorld).multiply(h)}}()}),po.prototype=Object.create(b.prototype),po.prototype.constructor=po,Object.assign(ys.prototype,{start:function(){this.oldTime=this.startTime=(typeof performance>"u"?Date:performance).now(),this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.autoStart=this.running=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=(typeof performance>"u"?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),_s.prototype=Object.assign(Object.create(b.prototype),{constructor:_s,getInput:function(){return this.gain},removeFilter:function(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this},getFilter:function(){return this.filter},setFilter:function(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this},updateMatrixWorld:function(){var t=new M,e=new at,i=new M,n=new M,r=new ys;return function(o){b.prototype.updateMatrixWorld.call(this,o),o=this.context.listener;var s=this.up;if(this.timeDelta=r.getDelta(),this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),o.positionX){var a=this.context.currentTime+this.timeDelta;o.positionX.linearRampToValueAtTime(t.x,a),o.positionY.linearRampToValueAtTime(t.y,a),o.positionZ.linearRampToValueAtTime(t.z,a),o.forwardX.linearRampToValueAtTime(n.x,a),o.forwardY.linearRampToValueAtTime(n.y,a),o.forwardZ.linearRampToValueAtTime(n.z,a),o.upX.linearRampToValueAtTime(s.x,a),o.upY.linearRampToValueAtTime(s.y,a),o.upZ.linearRampToValueAtTime(s.z,a)}else o.setPosition(t.x,t.y,t.z),o.setOrientation(n.x,n.y,n.z,s.x,s.y,s.z)}}()}),Tr.prototype=Object.assign(Object.create(b.prototype),{constructor:Tr,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setMediaElementSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(this.isPlaying===!0)console.warn("THREE.Audio: Audio is already playing.");else if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else{var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}},pause:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.isPlaying===!0&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.source.onended=null,this.offset=0,this.isPlaying=!1,this},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),this.isPlaying===!0?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.playbackRate=t,this.isPlaying===!0&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.loop=t,this.isPlaying===!0&&(this.source.loop=this.loop),this},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),xs.prototype=Object.assign(Object.create(Tr.prototype),{constructor:xs,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){return this.panner.refDistance=t,this},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){return this.panner.rolloffFactor=t,this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){return this.panner.distanceModel=t,this},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){return this.panner.maxDistance=t,this},setDirectionalCone:function(t,e,i){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=i,this},updateMatrixWorld:function(){var t=new M,e=new at,i=new M,n=new M;return function(r){if(b.prototype.updateMatrixWorld.call(this,r),r=this.panner,this.matrixWorld.decompose(t,e,i),n.set(0,0,1).applyQuaternion(e),r.positionX){var o=this.context.currentTime+this.listener.timeDelta;r.positionX.linearRampToValueAtTime(t.x,o),r.positionY.linearRampToValueAtTime(t.y,o),r.positionZ.linearRampToValueAtTime(t.z,o),r.orientationX.linearRampToValueAtTime(n.x,o),r.orientationY.linearRampToValueAtTime(n.y,o),r.orientationZ.linearRampToValueAtTime(n.z,o)}else r.setPosition(t.x,t.y,t.z),r.setOrientation(n.x,n.y,n.z)}}()}),Object.assign(ws.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),i=0;i<e.length;i++)t+=e[i];return t/e.length}}),Object.assign(Ms.prototype,{accumulate:function(t,e){var i=this.buffer,n=this.valueSize;t=t*n+n;var r=this.cumulativeWeight;if(r===0){for(r=0;r!==n;++r)i[t+r]=i[r];r=e}else r+=e,this._mixBufferRegion(i,t,0,e/r,n);this.cumulativeWeight=r},apply:function(t){var e=this.valueSize,i=this.buffer;t=t*e+e;var n=this.cumulativeWeight,r=this.binding;this.cumulativeWeight=0,1>n&&this._mixBufferRegion(i,t,3*e,1-n,e),n=e;for(var o=e+e;n!==o;++n)if(i[n]!==i[n+e]){r.setValue(i,t);break}},saveOriginalState:function(){var t=this.buffer,e=this.valueSize,i=3*e;this.binding.getValue(t,i);for(var n=e;n!==i;++n)t[n]=t[i+n%e];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(t,e,i,n,r){if(.5<=n)for(n=0;n!==r;++n)t[e+n]=t[i+n]},_slerp:function(t,e,i,n){at.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,r){for(var o=1-n,s=0;s!==r;++s){var a=e+s;t[a]=t[a]*o+t[i+s]*n}}}),Object.assign(ia.prototype,{getValue:function(t,e){this.bind();var i=this._bindings[this._targetGroup.nCachedObjects_];i!==void 0&&i.getValue(t,e)},setValue:function(t,e){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,r=i.length;n!==r;++n)i[n].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}),Object.assign(Pi,{Composite:ia,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new Pi.Composite(t,e,i):new Pi(t,e,i)},sanitizeNodeName:function(){var t=/[\[\]\.:\/]/g;return function(e){return e.replace(/\s/g,"_").replace(t,"")}}(),parseTrackName:function(){var t="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",e=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");t=/(WCOD+)?/.source.replace("WCOD",t);var i=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),n=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),r=new RegExp("^"+e+t+i+n+"$"),o=["material","materials","bones"];return function(s){var a=r.exec(s);if(!a)throw Error("PropertyBinding: Cannot parse trackName: "+s);a={nodeName:a[2],objectName:a[3],objectIndex:a[4],propertyName:a[5],propertyIndex:a[6]};var h=a.nodeName&&a.nodeName.lastIndexOf(".");if(h!==void 0&&h!==-1){var l=a.nodeName.substring(h+1);o.indexOf(l)!==-1&&(a.nodeName=a.nodeName.substring(0,h),a.objectName=l)}if(a.propertyName===null||a.propertyName.length===0)throw Error("PropertyBinding: can not parse propertyName from trackName: "+s);return a}}(),findNode:function(t,e){if(!e||e===""||e==="root"||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){var i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){var n=function(r){for(var o=0;o<r.length;o++){var s=r[o];if(s.name===e||s.uuid===e||(s=n(s.children)))return s}return null};if(t=n(t.children))return t}return null}}),Object.assign(Pi.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)t[e++]=i[n]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++]},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,i=e.objectName,n=e.propertyName,r=e.propertyIndex;if(t||(this.node=t=Pi.findNode(this.rootNode,e.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var o=e.objectIndex;switch(i){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}for(t=t.skeleton.bones,i=0;i<t.length;i++)if(t[i].name===o){o=i;break}break;default:if(t[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(o!==void 0){if(t[o]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[o]}}if(o=t[n],o===void 0)console.error("THREE.PropertyBinding: Trying to update property for track: "+e.nodeName+"."+n+" but it wasn't found.",t);else{if(e=this.Versioning.None,this.targetObject=t,t.needsUpdate!==void 0?e=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(e=this.Versioning.MatrixWorldNeedsUpdate),i=this.BindingType.Direct,r!==void 0){if(n==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}for(i=0;i<this.node.geometry.morphAttributes.position.length;i++)if(t.geometry.morphAttributes.position[i].name===r){r=i;break}}else{if(!t.geometry.morphTargets){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);return}for(i=0;i<this.node.geometry.morphTargets.length;i++)if(t.geometry.morphTargets[i].name===r){r=i;break}}}i=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=r}else o.fromArray!==void 0&&o.toArray!==void 0?(i=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(i=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=n;this.getValue=this.GetterByBindingType[i],this.setValue=this.SetterByBindingTypeAndVersioning[i][e]}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(Pi.prototype,{_getValue_unbound:Pi.prototype.getValue,_setValue_unbound:Pi.prototype.setValue}),Object.assign(na.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length,h=void 0,l=0,c=arguments.length;l!==c;++l){var u=arguments[l],d=u.uuid,g=n[d];if(g===void 0){g=e++,n[d]=g,t.push(u),d=0;for(var w=a;d!==w;++d)s[d].push(new Pi(u,r[d],o[d]))}else if(g<i){h=t[g];var S=--i;for(w=t[S],n[w.uuid]=g,t[g]=w,n[d]=S,t[S]=u,d=0,w=a;d!==w;++d){var P=s[d],G=P[g];P[g]=P[S],G===void 0&&(G=new Pi(u,r[d],o[d])),P[S]=G}}else t[g]!==h&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=i},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,i=this._indicesByUUID,n=this._bindings,r=n.length,o=0,s=arguments.length;o!==s;++o){var a=arguments[o],h=a.uuid,l=i[h];if(l!==void 0&&l>=e){var c=e++,u=t[c];for(i[u.uuid]=l,t[l]=u,i[h]=c,t[c]=a,a=0,h=r;a!==h;++a){u=n[a];var d=u[l];u[l]=u[c],u[c]=d}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,o=r.length,s=0,a=arguments.length;s!==a;++s){var h=arguments[s].uuid,l=n[h];if(l!==void 0)if(delete n[h],l<i){h=--i;var c=t[h],u=--e,d=t[u];for(n[c.uuid]=l,t[l]=c,n[d.uuid]=h,t[h]=d,t.pop(),c=0,d=o;c!==d;++c){var g=r[c],w=g[u];g[l]=g[h],g[h]=w,g.pop()}}else for(u=--e,d=t[u],n[d.uuid]=l,t[l]=d,t.pop(),c=0,d=o;c!==d;++c)g=r[c],g[l]=g[u],g.pop()}this.nCachedObjects_=i},subscribe_:function(t,e){var i=this._bindingsIndicesByPath,n=i[t],r=this._bindings;if(n!==void 0)return r[n];var o=this._paths,s=this._parsedPaths,a=this._objects,h=this.nCachedObjects_,l=Array(a.length);for(n=r.length,i[t]=n,o.push(t),s.push(e),r.push(l),i=h,n=a.length;i!==n;++i)l[i]=new Pi(a[i],t,e);return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){var n=this._paths,r=this._parsedPaths,o=this._bindings,s=o.length-1,a=o[s];e[t[s]]=i,o[i]=a,o.pop(),r[i]=r[s],r.pop(),n[i]=n[s],n.pop()}}}),Object.assign(ra.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,i){if(t.fadeOut(e),this.fadeIn(e),i){i=this._clip.duration;var n=t._clip.duration,r=i/n;t.warp(1,n/i,e),this.warp(r,1,e)}return this},crossFadeTo:function(t,e,i){return t.crossFadeFrom(this,e,i)},stopFading:function(){var t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,i){var n=this._mixer,r=n.time,o=this._timeScaleInterpolant,s=this.timeScale;return o===null&&(this._timeScaleInterpolant=o=n._lendControlInterpolant()),n=o.parameterPositions,o=o.sampleValues,n[0]=r,n[1]=r+i,o[0]=t/s,o[1]=e/s,this},stopWarping:function(){var t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,i,n){if(this.enabled){var r=this._startTime;if(r!==null){if(e=(t-r)*i,0>e||i===0)return;this._startTime=null,e*=i}if(e*=this._updateTimeScale(t),i=this._updateTime(e),t=this._updateWeight(t),0<t){e=this._interpolants,r=this._propertyBindings;for(var o=0,s=e.length;o!==s;++o)e[o].evaluate(i),r[o].accumulate(n,t)}}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var i=this._weightInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),n===0&&(this.enabled=!1))}}return this._effectiveWeight=e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var i=this._timeScaleInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e},_updateTime:function(t){var e=this.time+t,i=this._clip.duration,n=this.loop,r=this._loopCount,o=n===2202;if(t===0)return r===-1?e:o&&(r&1)===1?i-e:e;if(n===2200)t:{if(r===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1)),e>=i)e=i;else if(0>e)e=0;else break t;this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:0>t?-1:1})}else{if(r===-1&&(0<=t?(r=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),e>=i||0>e){n=Math.floor(e/i),e-=i*n,r+=Math.abs(n);var s=this.repetitions-r;0>=s?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=0<t?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<t?1:-1})):(s===1?(t=0>t,this._setEndings(t,!t,o)):this._setEndings(!1,!1,o),this._loopCount=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n}))}if(o&&(r&1)===1)return this.time=e,i-e}return this.time=e},_setEndings:function(t,e,i){var n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(n.endingStart=t?this.zeroSlopeAtStart?2401:2400:2402,n.endingEnd=e?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(t,e,i){var n=this._mixer,r=n.time,o=this._weightInterpolant;return o===null&&(this._weightInterpolant=o=n._lendControlInterpolant()),n=o.parameterPositions,o=o.sampleValues,n[0]=r,o[0]=e,n[1]=r+t,o[1]=i,this}}),Ts.prototype=Object.assign(Object.create(bt.prototype),{constructor:Ts,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,r=n.length,o=t._propertyBindings;t=t._interpolants;var s=i.uuid,a=this._bindingsByRootAndName,h=a[s];for(h===void 0&&(h={},a[s]=h),a=0;a!==r;++a){var l=n[a],c=l.name,u=h[c];if(u===void 0){if(u=o[a],u!==void 0){u._cacheIndex===null&&(++u.referenceCount,this._addInactiveBinding(u,s,c));continue}u=new Ms(Pi.create(i,c,e&&e._propertyBindings[a].binding.parsedPath),l.ValueTypeName,l.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,s,c)}o[a]=u,t[a].resultBuffer=u.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){var e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}for(e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];r.useCount++===0&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];--r.useCount===0&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){return t=t._cacheIndex,t!==null&&t<this._nActiveActions},_addInactiveAction:function(t,e,i){var n=this._actions,r=this._actionsByClip,o=r[e];o===void 0?(o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,r[e]=o):(e=o.knownActions,t._byClipCacheIndex=e.length,e.push(t)),t._cacheIndex=n.length,n.push(t),o.actionByRoot[i]=t},_removeInactiveAction:function(t){var e=this._actions,i=e[e.length-1],n=t._cacheIndex;i._cacheIndex=n,e[n]=i,e.pop(),t._cacheIndex=null,e=t._clip.uuid,i=this._actionsByClip,n=i[e];var r=n.knownActions,o=r[r.length-1],s=t._byClipCacheIndex;o._byClipCacheIndex=s,r[s]=o,r.pop(),t._byClipCacheIndex=null,delete n.actionByRoot[(t._localRoot||this._root).uuid],r.length===0&&delete i[e],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){t=t._propertyBindings;for(var e=0,i=t.length;e!==i;++e){var n=t[e];--n.referenceCount===0&&this._removeInactiveBinding(n)}},_lendAction:function(t){var e=this._actions,i=t._cacheIndex,n=this._nActiveActions++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackAction:function(t){var e=this._actions,i=t._cacheIndex,n=--this._nActiveActions,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_addInactiveBinding:function(t,e,i){var n=this._bindingsByRootAndName,r=n[e],o=this._bindings;r===void 0&&(r={},n[e]=r),r[i]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid;i=i.path;var r=this._bindingsByRootAndName,o=r[n],s=e[e.length-1];t=t._cacheIndex,s._cacheIndex=t,e[t]=s,e.pop(),delete o[i];t:{for(var a in o)break t;delete r[n]}},_lendBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=this._nActiveBindings++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=--this._nActiveBindings,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return i===void 0&&(i=new so(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),i.__cacheIndex=e,t[e]=i),i},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,i=t.__cacheIndex,n=--this._nActiveControlInterpolants,r=e[n];t.__cacheIndex=n,e[n]=t,r.__cacheIndex=i,e[i]=r},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var i=e||this._root,n=i.uuid;i=typeof t=="string"?ki.findByName(i,t):t,t=i!==null?i.uuid:t;var r=this._actionsByClip[t],o=null;if(r!==void 0){if(o=r.actionByRoot[n],o!==void 0)return o;o=r.knownActions[0],i===null&&(i=o._clip)}return i===null?null:(e=new ra(this,i,e),this._bindAction(e,o),this._addInactiveAction(e,t,n),e)},existingAction:function(t,e){var i=e||this._root;return e=i.uuid,i=typeof t=="string"?ki.findByName(i,t):t,t=this._actionsByClip[i?i.uuid:t],t!==void 0&&t.actionByRoot[e]||null},stopAllAction:function(){for(var t=this._actions,e=this._nActiveActions,i=this._bindings,n=this._nActiveBindings,r=this._nActiveBindings=this._nActiveActions=0;r!==e;++r)t[r].reset();for(r=0;r!==n;++r)i[r].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,i=this._nActiveActions,n=this.time+=t,r=Math.sign(t),o=this._accuIndex^=1,s=0;s!==i;++s)e[s]._update(n,t,r,o);for(t=this._bindings,e=this._nActiveBindings,s=0;s!==e;++s)t[s].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions;t=t.uuid;var i=this._actionsByClip,n=i[t];if(n!==void 0){n=n.knownActions;for(var r=0,o=n.length;r!==o;++r){var s=n[r];this._deactivateAction(s);var a=s._cacheIndex,h=e[e.length-1];s._cacheIndex=null,s._byClipCacheIndex=null,h._cacheIndex=a,e[a]=h,e.pop(),this._removeInactiveBindingsForAction(s)}delete i[t]}},uncacheRoot:function(t){t=t.uuid;var e=this._actionsByClip;for(n in e){var i=e[n].actionByRoot[t];i!==void 0&&(this._deactivateAction(i),this._removeInactiveAction(i))}var n=this._bindingsByRootAndName[t];if(n!==void 0)for(var r in n)t=n[r],t.restoreOriginalState(),this._removeInactiveBinding(t)},uncacheAction:function(t,e){t=this.existingAction(t,e),t!==null&&(this._deactivateAction(t),this._removeInactiveAction(t))}}),jo.prototype.clone=function(){return new jo(this.value.clone===void 0?this.value:this.value.clone())},Ss.prototype=Object.assign(Object.create(Lt.prototype),{constructor:Ss,isInstancedBufferGeometry:!0,copy:function(t){return Lt.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return new this.constructor().copy(this)}}),Es.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Es,isInstancedInterleavedBuffer:!0,copy:function(t){return Ge.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Ps.prototype=Object.assign(Object.create(Y.prototype),{constructor:Ps,isInstancedBufferAttribute:!0,copy:function(t){return Y.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(oa.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,i){return i=i||[],As(t,this,i,e),i.sort(sa),i},intersectObjects:function(t,e,i){if(i=i||[],Array.isArray(t)===!1)return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),i;for(var n=0,r=t.length;n<r;n++)As(t[n],this,i,e);return i.sort(sa),i}}),Object.assign(aa.prototype,{set:function(t,e,i){return this.radius=t,this.phi=e,this.theta=i,this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,i){return this.radius=Math.sqrt(t*t+e*e+i*i),this.radius===0?this.phi=this.theta=0:(this.theta=Math.atan2(t,i),this.phi=Math.acos(Ee.clamp(e/this.radius,-1,1))),this}}),Object.assign(ha.prototype,{set:function(t,e,i){return this.radius=t,this.theta=e,this.y=i,this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,i){return this.radius=Math.sqrt(t*t+i*i),this.theta=Math.atan2(t,i),this.y=e,this}}),Object.assign(Ls.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new $;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(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=Ee.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)}}),fo.prototype=Object.create(b.prototype),fo.prototype.constructor=fo,fo.prototype.isImmediateRenderObject=!0,mo.prototype=Object.create(Re.prototype),mo.prototype.constructor=mo,mo.prototype.update=function(){var t=new M,e=new M,i=new _t;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var r=this.object.matrixWorld,o=this.geometry.attributes.position,s=this.object.geometry;if(s&&s.isGeometry)for(var a=s.vertices,h=s.faces,l=s=0,c=h.length;l<c;l++)for(var u=h[l],d=0,g=u.vertexNormals.length;d<g;d++){var w=u.vertexNormals[d];t.copy(a[u[n[d]]]).applyMatrix4(r),e.copy(w).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(s,t.x,t.y,t.z),s+=1,o.setXYZ(s,e.x,e.y,e.z),s+=1}else if(s&&s.isBufferGeometry)for(n=s.attributes.position,a=s.attributes.normal,d=s=0,g=n.count;d<g;d++)t.set(n.getX(d),n.getY(d),n.getZ(d)).applyMatrix4(r),e.set(a.getX(d),a.getY(d),a.getZ(d)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(s,t.x,t.y,t.z),s+=1,o.setXYZ(s,e.x,e.y,e.z),s+=1;o.needsUpdate=!0}}(),Sr.prototype=Object.create(b.prototype),Sr.prototype.constructor=Sr,Sr.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Sr.prototype.update=function(){var t=new 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)}}(),Er.prototype=Object.create(Re.prototype),Er.prototype.constructor=Er,Er.prototype.updateMatrixWorld=function(){var t=new M,e=new gt,i=new gt;return function(n){var r=this.bones,o=this.geometry,s=o.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var a=0,h=0;a<r.length;a++){var l=r[a];l.parent&&l.parent.isBone&&(e.multiplyMatrices(i,l.matrixWorld),t.setFromMatrixPosition(e),s.setXYZ(h,t.x,t.y,t.z),e.multiplyMatrices(i,l.parent.matrixWorld),t.setFromMatrixPosition(e),s.setXYZ(h+1,t.x,t.y,t.z),h+=2)}o.getAttribute("position").needsUpdate=!0,b.prototype.updateMatrixWorld.call(this,n)}}(),Pr.prototype=Object.create(Ke.prototype),Pr.prototype.constructor=Pr,Pr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Pr.prototype.update=function(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Ar.prototype=Object.create(b.prototype),Ar.prototype.constructor=Ar,Ar.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Ar.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,i=this.line.geometry.attributes.position,n=i.array;n[0]=t,n[1]=-e,n[2]=0,n[3]=t,n[4]=e,n[5]=0,n[6]=-t,n[7]=e,n[8]=0,n[9]=-t,n[10]=-e,n[11]=0,n[12]=t,n[13]=-e,n[14]=0,i.needsUpdate=!0,this.color!==void 0?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Lr.prototype=Object.create(b.prototype),Lr.prototype.constructor=Lr,Lr.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Lr.prototype.update=function(){var t=new M,e=new H,i=new H;return function(){var n=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{var r=n.geometry.getAttribute("color");e.copy(this.light.color),i.copy(this.light.groundColor);for(var o=0,s=r.count;o<s;o++){var a=o<s/2?e:i;r.setXYZ(o,a.r,a.g,a.b)}r.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),go.prototype=Object.create(Re.prototype),go.prototype.constructor=go,Wo.prototype=Object.create(Re.prototype),Wo.prototype.constructor=Wo,vo.prototype=Object.create(Re.prototype),vo.prototype.constructor=vo,vo.prototype.update=function(){var t=new M,e=new M,i=new _t;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var n=this.object.matrixWorld,r=this.geometry.attributes.position,o=this.object.geometry,s=o.vertices;o=o.faces;for(var a=0,h=0,l=o.length;h<l;h++){var c=o[h],u=c.normal;t.copy(s[c.a]).add(s[c.b]).add(s[c.c]).divideScalar(3).applyMatrix4(n),e.copy(u).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),r.setXYZ(a,t.x,t.y,t.z),a+=1,r.setXYZ(a,e.x,e.y,e.z),a+=1}r.needsUpdate=!0}}(),Rr.prototype=Object.create(b.prototype),Rr.prototype.constructor=Rr,Rr.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Rr.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()}}(),yo.prototype=Object.create(Re.prototype),yo.prototype.constructor=yo,yo.prototype.update=function(){function t(o,s,a,h){if(n.set(s,a,h).unproject(r),o=i[o],o!==void 0)for(s=e.getAttribute("position"),a=0,h=o.length;a<h;a++)s.setXYZ(o[a],n.x,n.y,n.z)}var e,i,n=new M,r=new Kt;return function(){e=this.geometry,i=this.pointMap,r.projectionMatrix.copy(this.camera.projectionMatrix),t("c",0,0,-1),t("t",0,0,1),t("n1",-1,-1,-1),t("n2",1,-1,-1),t("n3",-1,1,-1),t("n4",1,1,-1),t("f1",-1,-1,1),t("f2",1,-1,1),t("f3",-1,1,1),t("f4",1,1,1),t("u1",.7,1.1,-1),t("u2",-.7,1.1,-1),t("u3",0,2,-1),t("cf1",-1,0,1),t("cf2",1,0,1),t("cf3",0,-1,1),t("cf4",0,1,1),t("cn1",-1,0,-1),t("cn2",1,0,-1),t("cn3",0,-1,-1),t("cn4",0,1,-1),e.getAttribute("position").needsUpdate=!0}}(),_n.prototype=Object.create(Re.prototype),_n.prototype.constructor=_n,_n.prototype.update=function(){var t=new Rt;return function(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&t.setFromObject(this.object),!t.isEmpty()){e=t.min;var i=t.max,n=this.geometry.attributes.position,r=n.array;r[0]=i.x,r[1]=i.y,r[2]=i.z,r[3]=e.x,r[4]=i.y,r[5]=i.z,r[6]=e.x,r[7]=e.y,r[8]=i.z,r[9]=i.x,r[10]=e.y,r[11]=i.z,r[12]=i.x,r[13]=i.y,r[14]=e.z,r[15]=e.x,r[16]=i.y,r[17]=e.z,r[18]=e.x,r[19]=e.y,r[20]=e.z,r[21]=i.x,r[22]=e.y,r[23]=e.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),_n.prototype.setFromObject=function(t){return this.object=t,this.update(),this},_n.prototype.copy=function(t){return Re.prototype.copy.call(this,t),this.object=t.object,this},_n.prototype.clone=function(){return new this.constructor().copy(this)},_o.prototype=Object.create(Re.prototype),_o.prototype.constructor=_o,_o.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),b.prototype.updateMatrixWorld.call(this,t))},xo.prototype=Object.create(qe.prototype),xo.prototype.constructor=xo,xo.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;1e-8>Math.abs(e)&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=0>e?1:0,this.lookAt(this.plane.normal),b.prototype.updateMatrixWorld.call(this,t)};var Zo,Ns;xn.prototype=Object.create(b.prototype),xn.prototype.constructor=xn,xn.prototype.setDirection=function(){var t=new 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))}}(),xn.prototype.setLength=function(t,e,i){e===void 0&&(e=.2*t),i===void 0&&(i=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()},xn.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},xn.prototype.copy=function(t){return b.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},xn.prototype.clone=function(){return new this.constructor().copy(this)},wo.prototype=Object.create(Re.prototype),wo.prototype.constructor=wo,pe.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(pe.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(yn.prototype,{createPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getPoints(t),this.createGeometry(t)},createSpacedPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getSpacedPoints(t),this.createGeometry(t)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new F,i=0,n=t.length;i<n;i++){var r=t[i];e.vertices.push(new M(r.x,r.y,r.z||0))}return e}}),Object.assign(Ki.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),ca.prototype=Object.create(Ei.prototype),ua.prototype=Object.create(Ei.prototype),Cs.prototype=Object.create(Ei.prototype),Object.assign(Cs.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),go.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Er.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Mr.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),qo.extractUrlBase(t)}}),Object.assign(Vo.prototype,{setTexturePath:function(t){return console.warn("THREE.JSONLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(ds.prototype,{setTexturePath:function(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(Ls.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(Rt.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(Ee,{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()."),Ee.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ee.ceilPowerOfTwo(t)}}),Object.assign(_t.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(gt.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,r,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,n,i,r,o)}}),mt.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},at.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(Ri.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(be.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(be,{barycoordFromPoint:function(t,e,i,n,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),be.getBarycoord(t,e,i,n,r)},normal:function(t,e,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),be.getNormal(t,e,i,n)}}),Object.assign(Pn.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Nn(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Un(this,t)}}),Object.assign($.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(Z.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(F.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(b.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(b.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(ii.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(ai.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(pe.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Bt.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(ri.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Y.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(Lt.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(Lt.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(hn.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(jo.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(fe.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new H}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===1}}}),Object.defineProperties(Yi.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(Je.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Ft.prototype,{clearTarget:function(t,e,i,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(t),this.clear(e,i,n)},animate:function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Ft.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Nt.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(ht.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Le.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}}),Tr.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return new vs().load(t,function(i){e.setBuffer(i)}),this},ws.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},po.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},An.crossOrigin=void 0,An.loadTexture=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var r=new Io;return r.setCrossOrigin(this.crossOrigin),t=r.load(t,i,void 0,n),e&&(t.mapping=e),t},An.loadTextureCube=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var r=new cs;return r.setCrossOrigin(this.crossOrigin),t=r.load(t,i,void 0,n),e&&(t.mapping=e),t},An.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},An.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},p.WebGLRenderTargetCube=Mt,p.WebGLRenderTarget=ht,p.WebGLRenderer=Ft,p.ShaderLib=pn,p.UniformsLib=le,p.UniformsUtils=_i,p.ShaderChunk=Ie,p.FogExp2=Jt,p.Fog=yi,p.Scene=qi,p.Sprite=ei,p.LOD=ii,p.SkinnedMesh=ke,p.Skeleton=ai,p.Bone=hi,p.Mesh=Ke,p.LineSegments=Re,p.LineLoop=an,p.Line=qe,p.Points=nr,p.Group=Pe,p.VideoTexture=os,p.DataTexture=ct,p.DataTexture3D=D,p.CompressedTexture=rr,p.CubeTexture=_,p.CanvasTexture=Ur,p.DepthTexture=Fr,p.Texture=Ot,p.AnimationLoader=Qs,p.CompressedTextureLoader=$s,p.DataTextureLoader=ls,p.CubeTextureLoader=cs,p.TextureLoader=Io,p.ObjectLoader=ds,p.MaterialLoader=ko,p.BufferGeometryLoader=ps,p.DefaultLoadingManager=Oi,p.LoadingManager=hs,p.JSONLoader=Vo,p.ImageLoader=ho,p.ImageBitmapLoader=fs,p.FontLoader=ta,p.FileLoader=Xi,p.Loader=Mr,p.LoaderUtils=qo,p.Cache=Zn,p.AudioLoader=vs,p.SpotLightShadow=zo,p.SpotLight=No,p.PointLight=Bo,p.RectAreaLight=Ho,p.HemisphereLight=Do,p.DirectionalLightShadow=Uo,p.DirectionalLight=Fo,p.AmbientLight=Go,p.LightShadow=Yn,p.Light=ri,p.StereoCamera=ea,p.PerspectiveCamera=Bt,p.OrthographicCamera=uo,p.CubeCamera=po,p.ArrayCamera=te,p.Camera=Kt,p.AudioListener=_s,p.PositionalAudio=xs,p.AudioContext=zs,p.AudioAnalyser=ws,p.Audio=Tr,p.VectorKeyframeTrack=xr,p.StringKeyframeTrack=Oo,p.QuaternionKeyframeTrack=ao,p.NumberKeyframeTrack=_r,p.ColorKeyframeTrack=Co,p.BooleanKeyframeTrack=Ro,p.PropertyMixer=Ms,p.PropertyBinding=Pi,p.KeyframeTrack=wi,p.AnimationUtils=Ai,p.AnimationObjectGroup=na,p.AnimationMixer=Ts,p.AnimationClip=ki,p.Uniform=jo,p.InstancedBufferGeometry=Ss,p.BufferGeometry=Lt,p.Geometry=F,p.InterleavedBufferAttribute=He,p.InstancedInterleavedBuffer=Es,p.InterleavedBuffer=Ge,p.InstancedBufferAttribute=Ps,p.Face3=O,p.Object3D=b,p.Raycaster=oa,p.Layers=X,p.EventDispatcher=bt,p.Clock=ys,p.QuaternionLinearInterpolant=bo,p.LinearInterpolant=so,p.DiscreteInterpolant=Lo,p.CubicInterpolant=Ao,p.Interpolant=Hi,p.Triangle=be,p.Math=Ee,p.Spherical=aa,p.Cylindrical=ha,p.Plane=mt,p.Frustum=K,p.Sphere=zt,p.Ray=Ri,p.Matrix4=gt,p.Matrix3=_t,p.Box3=Rt,p.Box2=Ls,p.Line3=Rs,p.Euler=x,p.Vector4=Z,p.Vector3=M,p.Vector2=$,p.Quaternion=at,p.Color=H,p.ImmediateRenderObject=fo,p.VertexNormalsHelper=mo,p.SpotLightHelper=Sr,p.SkeletonHelper=Er,p.PointLightHelper=Pr,p.RectAreaLightHelper=Ar,p.HemisphereLightHelper=Lr,p.GridHelper=go,p.PolarGridHelper=Wo,p.FaceNormalsHelper=vo,p.DirectionalLightHelper=Rr,p.CameraHelper=yo,p.BoxHelper=_n,p.Box3Helper=_o,p.PlaneHelper=xo,p.ArrowHelper=xn,p.AxesHelper=wo,p.Shape=Pn,p.Path=Ki,p.ShapePath=ms,p.Font=gs,p.CurvePath=yn,p.Curve=pe,p.ImageUtils=An,p.ShapeUtils=wn,p.WebGLUtils=ne,p.WireframeGeometry=or,p.ParametricGeometry=Gr,p.ParametricBufferGeometry=sr,p.TetrahedronGeometry=kr,p.TetrahedronBufferGeometry=ar,p.OctahedronGeometry=Vr,p.OctahedronBufferGeometry=Dn,p.IcosahedronGeometry=jr,p.IcosahedronBufferGeometry=hr,p.DodecahedronGeometry=Wr,p.DodecahedronBufferGeometry=lr,p.PolyhedronGeometry=Hr,p.PolyhedronBufferGeometry=Di,p.TubeGeometry=Xr,p.TubeBufferGeometry=cr,p.TorusKnotGeometry=qr,p.TorusKnotBufferGeometry=ur,p.TorusGeometry=Yr,p.TorusBufferGeometry=pr,p.TextGeometry=Kr,p.TextBufferGeometry=dr,p.SphereGeometry=to,p.SphereBufferGeometry=Bn,p.RingGeometry=eo,p.RingBufferGeometry=fr,p.PlaneGeometry=Ti,p.PlaneBufferGeometry=oi,p.LatheGeometry=io,p.LatheBufferGeometry=mr,p.ShapeGeometry=Un,p.ShapeBufferGeometry=Fn,p.ExtrudeGeometry=Nn,p.ExtrudeBufferGeometry=hn,p.EdgesGeometry=gr,p.ConeGeometry=no,p.ConeBufferGeometry=ro,p.CylinderGeometry=Gn,p.CylinderBufferGeometry=vn,p.CircleGeometry=oo,p.CircleBufferGeometry=vr,p.BoxGeometry=Fe,p.BoxBufferGeometry=vi,p.ShadowMaterial=Hn,p.SpriteMaterial=We,p.RawShaderMaterial=yr,p.ShaderMaterial=Je,p.PointsMaterial=xi,p.MeshPhysicalMaterial=kn,p.MeshStandardMaterial=ln,p.MeshPhongMaterial=Yi,p.MeshToonMaterial=Vn,p.MeshNormalMaterial=jn,p.MeshLambertMaterial=Wn,p.MeshDepthMaterial=Et,p.MeshDistanceMaterial=vt,p.MeshBasicMaterial=Ve,p.MeshMatcapMaterial=Xn,p.LineDashedMaterial=qn,p.LineBasicMaterial=Ne,p.Material=fe,p.Float64BufferAttribute=Vt,p.Float32BufferAttribute=lt,p.Uint32BufferAttribute=ie,p.Int32BufferAttribute=kt,p.Uint16BufferAttribute=Gt,p.Int16BufferAttribute=xt,p.Uint8ClampedBufferAttribute=At,p.Uint8BufferAttribute=tt,p.Int8BufferAttribute=pt,p.BufferAttribute=Y,p.ArcCurve=wr,p.CatmullRomCurve3=Ei,p.CubicBezierCurve=Zi,p.CubicBezierCurve3=cn,p.EllipseCurve=Vi,p.LineCurve=zi,p.LineCurve3=Ji,p.QuadraticBezierCurve=Qi,p.QuadraticBezierCurve3=un,p.SplineCurve=$i,p.REVISION="98",p.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},p.CullFaceNone=0,p.CullFaceBack=1,p.CullFaceFront=2,p.CullFaceFrontBack=3,p.FrontFaceDirectionCW=0,p.FrontFaceDirectionCCW=1,p.BasicShadowMap=0,p.PCFShadowMap=1,p.PCFSoftShadowMap=2,p.FrontSide=0,p.BackSide=1,p.DoubleSide=2,p.FlatShading=1,p.SmoothShading=2,p.NoColors=0,p.FaceColors=1,p.VertexColors=2,p.NoBlending=0,p.NormalBlending=1,p.AdditiveBlending=2,p.SubtractiveBlending=3,p.MultiplyBlending=4,p.CustomBlending=5,p.AddEquation=100,p.SubtractEquation=101,p.ReverseSubtractEquation=102,p.MinEquation=103,p.MaxEquation=104,p.ZeroFactor=200,p.OneFactor=201,p.SrcColorFactor=202,p.OneMinusSrcColorFactor=203,p.SrcAlphaFactor=204,p.OneMinusSrcAlphaFactor=205,p.DstAlphaFactor=206,p.OneMinusDstAlphaFactor=207,p.DstColorFactor=208,p.OneMinusDstColorFactor=209,p.SrcAlphaSaturateFactor=210,p.NeverDepth=0,p.AlwaysDepth=1,p.LessDepth=2,p.LessEqualDepth=3,p.EqualDepth=4,p.GreaterEqualDepth=5,p.GreaterDepth=6,p.NotEqualDepth=7,p.MultiplyOperation=0,p.MixOperation=1,p.AddOperation=2,p.NoToneMapping=0,p.LinearToneMapping=1,p.ReinhardToneMapping=2,p.Uncharted2ToneMapping=3,p.CineonToneMapping=4,p.UVMapping=300,p.CubeReflectionMapping=301,p.CubeRefractionMapping=302,p.EquirectangularReflectionMapping=303,p.EquirectangularRefractionMapping=304,p.SphericalReflectionMapping=305,p.CubeUVReflectionMapping=306,p.CubeUVRefractionMapping=307,p.RepeatWrapping=1e3,p.ClampToEdgeWrapping=1001,p.MirroredRepeatWrapping=1002,p.NearestFilter=1003,p.NearestMipMapNearestFilter=1004,p.NearestMipMapLinearFilter=1005,p.LinearFilter=1006,p.LinearMipMapNearestFilter=1007,p.LinearMipMapLinearFilter=1008,p.UnsignedByteType=1009,p.ByteType=1010,p.ShortType=1011,p.UnsignedShortType=1012,p.IntType=1013,p.UnsignedIntType=1014,p.FloatType=1015,p.HalfFloatType=1016,p.UnsignedShort4444Type=1017,p.UnsignedShort5551Type=1018,p.UnsignedShort565Type=1019,p.UnsignedInt248Type=1020,p.AlphaFormat=1021,p.RGBFormat=1022,p.RGBAFormat=1023,p.LuminanceFormat=1024,p.LuminanceAlphaFormat=1025,p.RGBEFormat=1023,p.DepthFormat=1026,p.DepthStencilFormat=1027,p.RedFormat=1028,p.RGB_S3TC_DXT1_Format=33776,p.RGBA_S3TC_DXT1_Format=33777,p.RGBA_S3TC_DXT3_Format=33778,p.RGBA_S3TC_DXT5_Format=33779,p.RGB_PVRTC_4BPPV1_Format=35840,p.RGB_PVRTC_2BPPV1_Format=35841,p.RGBA_PVRTC_4BPPV1_Format=35842,p.RGBA_PVRTC_2BPPV1_Format=35843,p.RGB_ETC1_Format=36196,p.RGBA_ASTC_4x4_Format=37808,p.RGBA_ASTC_5x4_Format=37809,p.RGBA_ASTC_5x5_Format=37810,p.RGBA_ASTC_6x5_Format=37811,p.RGBA_ASTC_6x6_Format=37812,p.RGBA_ASTC_8x5_Format=37813,p.RGBA_ASTC_8x6_Format=37814,p.RGBA_ASTC_8x8_Format=37815,p.RGBA_ASTC_10x5_Format=37816,p.RGBA_ASTC_10x6_Format=37817,p.RGBA_ASTC_10x8_Format=37818,p.RGBA_ASTC_10x10_Format=37819,p.RGBA_ASTC_12x10_Format=37820,p.RGBA_ASTC_12x12_Format=37821,p.LoopOnce=2200,p.LoopRepeat=2201,p.LoopPingPong=2202,p.InterpolateDiscrete=2300,p.InterpolateLinear=2301,p.InterpolateSmooth=2302,p.ZeroCurvatureEnding=2400,p.ZeroSlopeEnding=2401,p.WrapAroundEnding=2402,p.TrianglesDrawMode=0,p.TriangleStripDrawMode=1,p.TriangleFanDrawMode=2,p.LinearEncoding=3e3,p.sRGBEncoding=3001,p.GammaEncoding=3007,p.RGBEEncoding=3002,p.LogLuvEncoding=3003,p.RGBM7Encoding=3004,p.RGBM16Encoding=3005,p.RGBDEncoding=3006,p.BasicDepthPacking=3200,p.RGBADepthPacking=3201,p.TangentSpaceNormalMap=0,p.ObjectSpaceNormalMap=1,p.CubeGeometry=Fe,p.Face4=function(t,e,i,n,r,o,s){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new O(t,e,i,r,o,s)},p.LineStrip=0,p.LinePieces=1,p.MeshFaceMaterial=function(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t},p.MultiMaterial=function(t){return t===void 0&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t},p.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new nr(t,e)},p.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ei(t)},p.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new nr(t,e)},p.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new xi(t)},p.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new xi(t)},p.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new xi(t)},p.Vertex=function(t,e,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new M(t,e,i)},p.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Y(t,e).setDynamic(!0)},p.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new pt(t,e)},p.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new tt(t,e)},p.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new At(t,e)},p.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new xt(t,e)},p.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gt(t,e)},p.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new kt(t,e)},p.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new ie(t,e)},p.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new lt(t,e)},p.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Vt(t,e)},p.ClosedSplineCurve3=ca,p.SplineCurve3=ua,p.Spline=Cs,p.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new wo(t)},p.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new _n(t,e)},p.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Re(new gr(t.geometry),new Ne({color:e!==void 0?e:16777215}))},p.WireframeHelper=function(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Re(new or(t.geometry),new Ne({color:e!==void 0?e:16777215}))},p.XHRLoader=function(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Xi(t)},p.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new ls(t)},p.GeometryUtils={merge:function(t,e,i){if(console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh){e.matrixAutoUpdate&&e.updateMatrix();var n=e.matrix;e=e.geometry}t.merge(e,n,i)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},p.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}},p.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},p.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}},p.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(p,"__esModule",{value:!0})}),THREE.Sky=function(){var p=THREE.Sky.SkyShader,bt=new THREE.ShaderMaterial({fragmentShader:p.fragmentShader,vertexShader:p.vertexShader,uniforms:THREE.UniformsUtils.clone(p.uniforms),side:THREE.BackSide});THREE.Mesh.call(this,new THREE.BoxBufferGeometry(1,1,1),bt)},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
|
+
`),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(p){typeof module>"u"?window.charming=p:module.exports=p}(function(p,bt){bt=bt||{};var $=bt.tagName||"span",gt=bt.classPrefix!=null?bt.classPrefix:"char",at=1,M=function(_t){for(var Ot=_t.parentNode,Z=_t.nodeValue,ht=Z.length,Mt=-1;++Mt<ht;){var ct=document.createElement($);gt&&(ct.className=gt+at,at++),ct.appendChild(document.createTextNode(Z[Mt])),Ot.insertBefore(ct,_t)}Ot.removeChild(_t)};return function _t(Ot){for(var Z=[].slice.call(Ot.childNodes),ht=Z.length,Mt=-1;++Mt<ht;)_t(Z[Mt]);Ot.nodeType===Node.TEXT_NODE&&M(Ot)}(p),p});const Ja=[Fs,ks],Qa={continuation:null,mapModali:null,install(p){if(Ja.forEach((_t,Ot)=>{p.component(_t.name,_t)}),this.continuation){p.config.globalProperties.$continuation=this.continuation;return}let bt=Se.createApp(Gs),$=document.createElement("div"),gt=document.body;if(gt.appendChild($),this.loading=bt.mount($),p.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){p.config.globalProperties.$mapModali=this.mapModali;return}let at=Se.createApp(Hs),M=document.createElement("div");gt.appendChild(M),this.mapModali=at.mount(M),p.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};Fi.BimBackgroundPlate=ks,Fi.BimCutscenes=Gs,Fi.Button=Fs,Fi.MapModali=Hs,Fi.default=Qa,Object.defineProperties(Fi,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|