PageSourceSearch

https://klausen.com/wp-content/themes/klausen/assets/assets/js/vendors.js?ver=1787034336

js klausen.com collected 2026-10-06 13:13:31 UTC 1,101,378 bytes, 2 lines download raw bytes

vendor: 5,171 bytes, lines 1-2
1/*! For license information please see vendors.js.LICENSE.txt */
2(self.webpackChunkwebpacktemplate=self.webpackChunkwebpacktemplate||[]).push([["vendors"],{771:(t,e,n)=>{var i=Object.defineProperty,r=Object.defineProperties,s=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,h=(t,e,n)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;((t,e)=>{for(var n in(t=>{i(t,"__esModule",{value:!0})})(t),e)i(t,n,{get:e[n],enumerable:!0})})(e,{Atom:()=>Se,PointerProxy:()=>De,Ticker:()=>Re,getPointerParts:()=>Yt,isPointer:()=>Jt,isPrism:()=>ee,iterateAndCountTicks:()=>Be,iterateOver:()=>Pe,pointer:()=>Zt,pointerToPrism:()=>Me,prism:()=>Ee,val:()=>Te});var c=Array.isArray,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,p=u||d||Function("return this")(),f=p.Symbol,A=Object.prototype,g=A.hasOwnProperty,m=A.toString,_=f?f.toStringTag:void 0;var v=function(t){var e=g.call(t,_),n=t[_];try{t[_]=void 0;var i=!0}catch(t){}var r=m.call(t);return i&&(e?t[_]=n:delete t[_]),r},y=Object.prototype.toString;var E=function(t){return y.call(t)},x=f?f.toStringTag:void 0;var C=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":x&&x in Object(t)?v(t):E(t)};var b=function(t){return null!=t&&"object"==typeof t};var w=function(t){return"symbol"==typeof t||b(t)&&"[object Symbol]"==C(t)},S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,I=/^\w*$/;var M=function(t,e){if(c(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!w(t))||(I.test(t)||!S.test(t)||null!=e&&t in Object(e))};var T=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var B,R=function(t){if(!T(t))return!1;var e=C(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},P=p["__core-js_shared__"],D=(B=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"";var L=function(t){return!!D&&D in t},U=Function.prototype.toString;var N=function(t){if(null!=t){try{return U.call(t)}catch(t){}try{return t+""}catch(t){}}return""},O=/^\[object .+?Constructor\]$/,F=Function.prototype,k=Object.prototype,Q=F.toString,z=k.hasOwnProperty,G=RegExp("^"+Q.call(z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var H=function(t){return!(!T(t)||L(t))&&(R(t)?G:O).test(N(t))};var V=function(t,e){return null==t?void 0:t[e]};var j=function(t,e){var n=V(t,e);return H(n)?n:void 0},W=j(Object,"create");var q=function(){this.__data__=W?W(null):{},this.size=0};var X=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Y=Object.prototype.hasOwnProperty;var K=function(t){var e=this.__data__;if(W){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Y.call(e,t)?e[t]:void 0},Z=Object.prototype.hasOwnProperty;var J=function(t){var e=this.__data__;return W?void 0!==e[t]:Z.call(e,t)};var $=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=W&&void 0===e?"__lodash_hash_undefined__":e,this};function tt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}tt.prototype.clear=q,tt.prototype.delete=X,tt.prototype.get=K,tt.prototype.has=J,tt.prototype.set=$;var et=tt;var nt=function(){this.__data__=[],this.size=0};var it=function(t,e){return t===e||t!=t&&e!=e};var rt=function(t,e){for(var n=t.length;n--;)if(it(t[n][0],e))return n;return-1},st=Array.prototype.splice;var ot=function(t){var e=this.__data__,n=rt(e,t);return!(n<0)&&(n==e.length-1?e.pop():st.call(e,n,1),--this.size,!0)};var at=function(t){var e=this.__data__,n=rt(e,t);return n<0?void 0:e[n][1]};var lt=function(t){return rt(this.__data__,t)>-1};var ht=function(t,e){var n=this.__data__,i=rt(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};function ct(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}ct.prototype.clear=nt,ct.prototype.delete=ot,ct.prototype.get=at,ct.prototype.has=lt,ct.prototype.set=ht;var ut=ct,dt=j(p,"Map");var pt=function(){this.size=0,this.__data__={hash:new et,map:new(dt||ut),string:new et}};var ft=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var At=function(t,e){var n=t.__data__;return ft(e)?n["string"==typeof e?"string":"hash"]:n.map};var gt=function(t){var e=At(this,t).delete(t);return this.size-=e?1:0,e};var mt=function(t){return At(this,t).get(t)};var _t=function(t){return At(this,t).has(t)};var vt=function(t,e){var n=At(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this};function yt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}yt.prototype.clear=pt,yt.prototype.delete=gt,yt.prototype.get=mt,yt.prototype.has=_t,yt.prototype.set=vt;var Et=yt;function xt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);
2var o=t.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(xt.Cache||Et),n}xt.Cache=Et;var Ct=xt;var bt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wt=/\\(\\)?/g,St=function(t){var e=Ct(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(bt,(function(t,n,i,r){e.push(i?r.replace(wt,"$1"):n||t)})),e}));var It=function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r},Mt=f?f.prototype:void 0,Tt=Mt?Mt.toString:void 0;var Bt=function t(e){if("string"==typeof e)return e;if(c(e))return It(e,t)+"";if(w(e))return Tt?Tt.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n};var Rt=function(t){return null==t?"":Bt(t)};var Pt=function(t,e){return c(t)?t:M(t,e)?[t]:St(Rt(t))};var Dt=function(t){if("string"==typeof t||w(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Lt=function(t,e){for(var n=0,i=(e=Pt(e,t)).length;null!=t&&n<i;)t=t[Dt(e[n++])];return n&&n==i?t:void 0};var Ut=function(t,e,n){var i=null==t?void 0:Lt(t,e);return void 0===i?n:i};var Nt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object),Ot=Function.prototype,Ft=Object.prototype,kt=Ot.toString,Qt=Ft.hasOwnProperty,zt=kt.call(Object);var Gt=function(t){if(!b(t)||"[object Object]"!=C(t))return!1;var e=Nt(t);if(null===e)return!0;var n=Qt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&kt.call(n)==zt};var Ht=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},Vt=new WeakMap,jt=new WeakMap,Wt=Symbol("pointerMeta"),qt={get(t,e){if(e===Wt)return Vt.get(t);let n=jt.get(t);n||(n=new Map,jt.set(t,n));const i=n.get(e);if(void 0!==i)return i;const r=Vt.get(t),s=Kt({root:r.root,path:[...r.path,e]});return n.set(e,s),s}},Xt=t=>t[Wt],Yt=t=>{const{root:e,path:n}=Xt(t);return{root:e,path:n}};function Kt(t){var e;const n={root:t.root,path:null!=(e=t.path)?e:[]},i={};return Vt.set(i,n),new Proxy(i,qt)}var Zt=Kt,Jt=t=>t&&!!Xt(t);var $t=(t,e,n)=>{if(0===e.length)return n(t);if(Array.isArray(t)){let[i,...r]=e;i=parseInt(String(i),10),isNaN(i)&&(i=0);const s=t[i],o=$t(s,r,n);if(s===o)return t;const a=[...t];return a.splice(i,1,o),a}if("object"==typeof t&&null!==t){const[c,...u]=e,d=t[c],p=$t(d,u,n);if(d===p)return t;const f=(i=((t,e)=>{for(var n in e||(e={}))a.call(e,n)&&h(t,n,e[n]);if(o)for(var n of o(e))l.call(e,n)&&h(t,n,e[n]);return t})({},t),r(i,s({[c]:p})));return f}{const[t,...i]=e;return{[t]:$t(void 0,i,n)}}var i},te=class{constructor(){this._head=void 0}peek(){return this._head&&this._head.data}pop(){const t=this._head;if(t)return this._head=t.next,t.data}push(t){const e={next:this._head,data:t};this._head=e}};function ee(t){return!(!t||!t.isPrism||!0!==t.isPrism)}function ne(){const t=new te,e=()=>{};return{type:"Dataverse_discoveryMechanism",startIgnoringDependencies:()=>{t.push(e)},stopIgnoringDependencies:()=>{t.peek()!==e||t.pop()},reportResolutionStart:n=>{const i=t.peek();i&&i(n),t.push(e)},reportResolutionEnd:e=>{t.pop()},pushCollector:e=>{t.push(e)},popCollector:e=>{if(t.peek()!==e)throw new Error("Popped collector is not on top of the stack");t.pop()}}}var{startIgnoringDependencies:ie,stopIgnoringDependencies:re,reportResolutionEnd:se,reportResolutionStart:oe,pushCollector:ae,popCollector:le}=function(){const t="__dataverse_discoveryMechanism_sharedStack",e="undefined"!=typeof window?window:void 0!==n.g?n.g:{};if(e){const n=e[t];if(n&&"object"==typeof n&&"Dataverse_discoveryMechanism"===n.type)return n;{const n=ne();return e[t]=n,n}}return ne()}(),he=()=>{},ce={},ue=class{constructor(t){this._hotHandle=t,this._refs=new Map,this.isPrismScope=!0,this.subs={},this.effects=new Map,this.memos=new Map}ref(t,e){let n=this._refs.get(t);if(void 0!==n)return n;{const n={current:e};return this._refs.set(t,n),n}}effect(t,e,n){let i=this.effects.get(t);void 0===i&&(i={cleanup:he,deps:void 0},this.effects.set(t,i)),Ae(i.deps,n)&&(i.cleanup(),ie(),i.cleanup=pe(e,he).value,re(),i.deps=n)}memo(t,e,n){let i=this.memos.get(t);return void 0===i&&(i={cachedValue:null,deps:void 0},this.memos.set(t,i)),Ae(i.deps,n)&&(ie(),i.cachedValue=pe(e,void 0).value,re(),i.deps=n),i.cachedValue}state(t,e){const{value:n,setValue:i}=this.memo("state/"+t,(()=>{const t={current:e};return{value:t,setValue:e=>{t.current=e,this._hotHandle.forceStale()}}}),[]);return[n.current,i]}sub(t){return this.subs[t]||(this.subs[t]=new ue(this._hotHandle)),this.subs[t]}cleanupEffects(){for(const t of this.effects.values())pe(t.cleanup,void 0);this.effects.clear()}source(t,e){return this.effect("$$source/blah",(()=>t((()=>{this._hotHandle.forceStale()}))),[t]),e()}};function de(t){for(const e of Object.values(t.subs))de(e);t.cleanupEffects()}function pe(t,e){try{return{value:t(),ok:!0}}catch(t){return setTimeout((function(){throw t})),{value:e,ok:!1}}}var fe=new te;function Ae(t,e){if(void 0===t||void 0===e)return!0;const n=t.length;if(n!==e.length)return!0;for(let i=0;i<n;i++)if(t[i]!==e[i])return!0;return!1}function ge(t,e,n){const i=fe.peek();if(!i)throw new Error("prism.memo() is called outside of a prism() call.");return i.memo(t,e,n)}var me=t=>new class{constructor(t){this._fn=t,this.isPrism=!0,this._state={hot:!1,handle:void 0}}get isHot(){return this._state.hot}onChange(t,e,n=!1){const i=()=>{t.onThisOrNextTick(s)};let r=ce;const s=()=>{const t=this.getValue();t!==r&&(r=t,e(t))};return this._addDependent(i),n&&(r=this.getValue(),e(r)),()=>{this._removeDependent(i),t.offThisOrNextTick(s),t.offNextTick(s)}}onStale(t){const e=()=>t();return this._addDependent(e),()=>{this._removeDependent(e)}}keepHot(){return this.onStale((()=>{}))}_addDependent(t){this._state.hot||this._goHot(),this._state.handle.addDependent(t)}_goHot(){const t=new class{constructor(t,e){this._fn=t,this._prismInstance=e,this._didMarkDependentsAsStale=!1,this._isFresh=!1,this._cacheOfDendencyValues=new Map,this._dependents=new Set,this._dependencies=new Set,this._possiblyStaleDeps=new Set,this._scope=new ue(this),this._lastValue=void 0,this._forciblySetToStale=!1,this._reactToDependencyGoingStale=t=>{this._possiblyStaleDeps.add(t),this._markAsStale()};for(const t of this._dependencies)t._addDependent(this._reactToDependencyGoingStale);
2ie(),this.getValue(),re()}get hasDependents(){return this._dependents.size>0}removeDependent(t){this._dependents.delete(t)}addDependent(t){this._dependents.add(t)}destroy(){for(const t of this._dependencies)t._removeDependent(this._reactToDependencyGoingStale);de(this._scope)}getValue(){if(!this._isFresh){const t=this._recalculate();this._lastValue=t,this._isFresh=!0,this._didMarkDependentsAsStale=!1,this._forciblySetToStale=!1}return this._lastValue}_recalculate(){let t;if(!this._forciblySetToStale&&this._possiblyStaleDeps.size>0){let t=!1;ie();for(const e of this._possiblyStaleDeps)if(this._cacheOfDendencyValues.get(e)!==e.getValue()){t=!0;break}if(re(),this._possiblyStaleDeps.clear(),!t)return this._lastValue}const e=new Set;this._cacheOfDendencyValues.clear();const n=t=>{e.add(t),this._addDependency(t)};ae(n),fe.push(this._scope);try{t=this._fn()}catch(t){console.error(t)}finally{fe.pop()!==this._scope&&console.warn("The Prism hook stack has slipped. This is a bug.")}le(n);for(const t of this._dependencies)e.has(t)||this._removeDependency(t);this._dependencies=e,ie();for(const t of e)this._cacheOfDendencyValues.set(t,t.getValue());return re(),t}forceStale(){this._forciblySetToStale=!0,this._markAsStale()}_markAsStale(){if(!this._didMarkDependentsAsStale){this._didMarkDependentsAsStale=!0,this._isFresh=!1;for(const t of this._dependents)t(this._prismInstance)}}_addDependency(t){this._dependencies.has(t)||(this._dependencies.add(t),t._addDependent(this._reactToDependencyGoingStale))}_removeDependency(t){this._dependencies.has(t)&&(this._dependencies.delete(t),t._removeDependent(this._reactToDependencyGoingStale))}}(this._fn,this);this._state={hot:!0,handle:t}}_removeDependent(t){const e=this._state;if(!e.hot)return;const n=e.handle;n.removeDependent(t),n.hasDependents||(this._state={hot:!1,handle:void 0},n.destroy())}getValue(){oe(this);const t=this._state;let e;return e=t.hot?t.handle.getValue():function(t){const e=new _e;let n;fe.push(e);try{n=t()}catch(t){console.error(t)}finally{fe.pop()!==e&&console.warn("The Prism hook stack has slipped. This is a bug.")}return n}(this._fn),se(this),e}}(t),_e=class{effect(t,e,n){console.warn("prism.effect() does not run in cold prisms")}memo(t,e,n){return e()}state(t,e){return[e,()=>{}]}ref(t,e){return{current:e}}sub(t){return new _e}source(t,e){return e()}};me.ref=function(t,e){const n=fe.peek();if(!n)throw new Error("prism.ref() is called outside of a prism() call.");return n.ref(t,e)},me.effect=function(t,e,n){const i=fe.peek();if(!i)throw new Error("prism.effect() is called outside of a prism() call.");return i.effect(t,e,n)},me.memo=ge,me.ensurePrism=function(){if(!fe.peek())throw new Error("The parent function is called outside of a prism() call.")},me.state=function(t,e){const n=fe.peek();if(!n)throw new Error("prism.state() is called outside of a prism() call.");return n.state(t,e)},me.scope=function(t,e){const n=fe.peek();if(!n)throw new Error("prism.scope() is called outside of a prism() call.");const i=n.sub(t);fe.push(i);const r=pe(e,void 0).value;return fe.pop(),r},me.sub=function(t,e,n){return ge(t,(()=>me(e)),n).getValue()},me.inPrism=function(){return!!fe.peek()},me.source=function(t,e){const n=fe.peek();if(!n)throw new Error("prism.source() is called outside of a prism() call.");return n.source(t,e)};var ve,ye,Ee=me;(ye=ve||(ve={}))[ye.Dict=0]="Dict",ye[ye.Array=1]="Array",ye[ye.Other=2]="Other";var xe=t=>Array.isArray(t)?1:Gt(t)?0:2,Ce=(t,e,n=xe(t))=>0===n&&"string"==typeof e||1===n&&be(e)?t[e]:void 0,be=t=>{const e="number"==typeof t?t:parseInt(t,10);return!isNaN(e)&&e>=0&&e<1/0&&(0|e)===e},we=class{constructor(t,e){this._parent=t,this._path=e,this.children=new Map,this.identityChangeListeners=new Set}addIdentityChangeListener(t){this.identityChangeListeners.add(t)}removeIdentityChangeListener(t){this.identityChangeListeners.delete(t),this._checkForGC()}removeChild(t){this.children.delete(t),this._checkForGC()}getChild(t){return this.children.get(t)}getOrCreateChild(t){let e=this.children.get(t);return e||(e=e=new we(this,this._path.concat([t])),this.children.set(t,e)),e}_checkForGC(){this.identityChangeListeners.size>0||this.children.size>0||this._parent&&this._parent.removeChild(Ht(this._path))}},Se=class{constructor(t){this.$$isPointerToPrismProvider=!0,this.pointer=Zt({root:this,path:[]}),this.prism=this.pointerToPrism(this.pointer),this._onPointerValueChange=(t,e)=>{const{path:n}=Yt(t),i=this._getOrCreateScopeForPath(n);i.identityChangeListeners.add(e);return()=>{i.identityChangeListeners.delete(e)}},this._currentState=t,this._rootScope=new we(void 0,[])}set(t){const e=this._currentState;this._currentState=t,this._checkUpdates(this._rootScope,e,t)}get(){return this._currentState}getByPointer(t){const e=Jt(t)?t:t(this.pointer),n=Yt(e).path;return this._getIn(n)}_getIn(t){return 0===t.length?this.get():Ut(this.get(),t)}reduce(t){this.set(t(this.get()))}reduceByPointer(t,e){const n=Jt(t)?t:t(this.pointer),i=Yt(n).path,r=function(t,e,n){return 0===e.length?n(t):$t(t,e,n)}(this.get(),i,e);this.set(r)}setByPointer(t,e){this.reduceByPointer(t,(()=>e))}_checkUpdates(t,e,n){if(e===n)return;for(const e of t.identityChangeListeners)e(n);if(0===t.children.size)return;const i=xe(e),r=xe(n);if(2!==i||i!==r)for(const[s,o]of t.children){const t=Ce(e,s,i),a=Ce(n,s,r);this._checkUpdates(o,t,a)}}_getOrCreateScopeForPath(t){let e=this._rootScope;for(const n of t)e=e.getOrCreateChild(n);return e}pointerToPrism(t){const{path:e}=Yt(t),n=e=>this._onPointerValueChange(t,e),i=()=>this._getIn(e);return Ee((()=>Ee.source(n,i)))}},Ie=new WeakMap;var Me=t=>{const e=Xt(t);let n=Ie.get(e);if(!n){const r=e.root;if("object"!=typeof(i=r)||null===i||!0!==i.$$isPointerToPrismProvider)throw new Error("Cannot run pointerToPrism() on a pointer whose root is not an PointerToPrismProvider");n=r.pointerToPrism(t),Ie.set(e,n)}var i;return n},Te=t=>Jt(t)?Me(t).getValue():ee(t)?t.getValue():t;function*Be(t){let e;if(Jt(t))e=Me(t);else{if(!ee(t))throw new Error("Only pointers and prisms are supported");e=t}let n=0;const i=e.onStale((()=>{n++}));try{for(;;){const t=n;n=0,yield{value:e.getValue(),ticks:t}}}finally{i()}}var Re=class{constructor(t){this._conf=t,this._ticking=!1,this._dormant=!0,this._numberOfDormantTicks=0,this.__ticks=0,this._scheduledForThisOrNextTick=new Set,this._scheduledForNextTick=new Set,this._timeAtCurrentTick=0}get dormant(){return this._dormant}onThisOrNextTick(t){this._scheduledForThisOrNextTick.add(t),this._dormant&&this._goActive()}onNextTick(t){this._scheduledForNextTick.add(t),this._dormant&&this._goActive()}offThisOrNextTick(t){this._scheduledForThisOrNextTick.delete(t)}offNextTick(t){this._scheduledForNextTick.delete(t)}get time(){return this._ticking?this._timeAtCurrentTick:performance.now()}_goActive(){var t,e;this._dormant&&(this._dormant=!1,null==(e=null==(t=this._conf)?void 0:t.onActive)||e.call(t))}_goDormant(){var t,e;this._dormant||(this._dormant=!0,this._numberOfDormantTicks=0,null==(e=null==(t=this._conf)?void 0:t.onDormant)||e.call(t))}
2tick(t=performance.now()){if(this.__ticks++,!this._dormant&&0===this._scheduledForNextTick.size&&0===this._scheduledForThisOrNextTick.size&&(this._numberOfDormantTicks++,this._numberOfDormantTicks>=180))this._goDormant();else{this._ticking=!0,this._timeAtCurrentTick=t;for(const t of this._scheduledForNextTick)this._scheduledForThisOrNextTick.add(t);this._scheduledForNextTick.clear(),this._tick(0),this._ticking=!1}}_tick(t){const e=this.time;if(t>10&&console.warn("_tick() recursing for 10 times"),t>100)throw new Error("Maximum recursion limit for _tick()");const n=this._scheduledForThisOrNextTick;this._scheduledForThisOrNextTick=new Set;for(const t of n)t(e);if(this._scheduledForThisOrNextTick.size>0)return this._tick(t+1)}};function*Pe(t){let e;if(Jt(t))e=Me(t);else{if(!ee(t))throw new Error("Only pointers and prisms are supported");e=t}const n=new Re,i=e.onChange(n,(t=>{}));try{for(;;)n.tick(),yield e.getValue()}finally{i()}}var De=class{constructor(t){this.$$isPointerToPrismProvider=!0,this._currentPointerBox=new Se(t),this.pointer=Zt({root:this,path:[]})}setPointer(t){this._currentPointerBox.set(t)}pointerToPrism(t){const{path:e}=Xt(t);return Ee((()=>{const t=this._currentPointerBox.prism.getValue(),n=e.reduce(((t,e)=>t[e]),t);return Te(n)}))}}},92:(t,e,n)=>{"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}n.d(e,{i:()=>cn});var r,s,o,a,l,h,c,u,d,p,f,A,g,m=function(){return r||"undefined"!=typeof window&&(r=window.gsap)&&r.registerPlugin&&r},_=1,v=[],y=[],E=[],x=Date.now,C=function(t,e){return e},b=function(t,e){return~E.indexOf(t)&&E[E.indexOf(t)+1][e]},w=function(t){return!!~p.indexOf(t)},S=function(t,e,n,i,r){return t.addEventListener(e,n,{passive:!1!==i,capture:!!r})},I=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},M="scrollLeft",T="scrollTop",B=function(){return f&&f.isPressed||y.cache++},R=function(t,e){var n=function n(i){if(i||0===i){_&&(o.history.scrollRestoration="manual");var r=f&&f.isPressed;i=n.v=Math.round(i)||(f&&f.iOS?1:0),t(i),n.cacheID=y.cache,r&&C("ss",i)}else(e||y.cache!==n.cacheID||C("ref"))&&(n.cacheID=y.cache,n.v=t());return n.v+n.offset};return n.offset=0,t&&n},P={s:M,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:R((function(t){return arguments.length?o.scrollTo(t,D.sc()):o.pageXOffset||a[M]||l[M]||h[M]||0}))},D={s:T,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:P,sc:R((function(t){return arguments.length?o.scrollTo(P.sc(),t):o.pageYOffset||a[T]||l[T]||h[T]||
vendor: 44,127 bytes, line 2
20}))},L=function(t,e){return(e&&e._ctx&&e._ctx.selector||r.utils.toArray)(t)[0]||("string"==typeof t&&!1!==r.config().nullTargetWarn?console.warn("Element not found:",t):null)},U=function(t,e){var n=e.s,i=e.sc;w(t)&&(t=a.scrollingElement||l);var s=y.indexOf(t),o=i===D.sc?1:2;!~s&&(s=y.push(t)-1),y[s+o]||S(t,"scroll",B);var h=y[s+o],c=h||(y[s+o]=R(b(t,n),!0)||(w(t)?i:R((function(e){return arguments.length?t[n]=e:t[n]}))));return c.target=t,h||(c.smooth="smooth"===r.getProperty(t,"scrollBehavior")),c},N=function(t,e,n){var i=t,r=t,s=x(),o=s,a=e||50,l=Math.max(500,3*a),h=function(t,e){var l=x();e||l-s>a?(r=i,i=t,o=s,s=l):n?i+=t:i=r+(t-r)/(l-o)*(s-o)};return{update:h,reset:function(){r=i=n?0:i,o=s=0},getVelocity:function(t){var e=o,a=r,c=x();return(t||0===t)&&t!==i&&h(t),s===o||c-o>l?0:(i+(n?a:-a))/((n?c:s)-e)*1e3}}},O=function(t,e){return e&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},F=function(t){var e=Math.max.apply(Math,t),n=Math.min.apply(Math,t);return Math.abs(e)>=Math.abs(n)?e:n},k=function(){var t,e,n,i;(d=r.core.globals().ScrollTrigger)&&d.core&&(t=d.core,e=t.bridge||{},n=t._scrollers,i=t._proxies,n.push.apply(n,y),i.push.apply(i,E),y=n,E=i,C=function(t,n){return e[t](n)})},Q=function(t){return r=t||m(),!s&&r&&"undefined"!=typeof document&&document.body&&(o=window,a=document,l=a.documentElement,h=a.body,p=[o,a,l,h],r.utils.clamp,g=r.core.context||function(){},u="onpointerenter"in h?"pointer":"mouse",c=z.isTouch=o.matchMedia&&o.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in o||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,A=z.eventTypes=("ontouchstart"in l?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in l?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout((function(){return _=0}),500),k(),s=1),s};P.op=D,y.cache=0;var z=function(){function t(t){this.init(t)}var e,n,p;return t.prototype.init=function(t){s||Q(r)||console.warn("Please gsap.registerPlugin(Observer)"),d||k();var e=t.tolerance,n=t.dragMinimum,i=t.type,p=t.target,m=t.lineHeight,_=t.debounce,y=t.preventDefault,E=t.onStop,C=t.onStopDelay,b=t.ignore,M=t.wheelSpeed,T=t.event,R=t.onDragStart,z=t.onDragEnd,G=t.onDrag,H=t.onPress,V=t.onRelease,j=t.onRight,W=t.onLeft,q=t.onUp,X=t.onDown,Y=t.onChangeX,K=t.onChangeY,Z=t.onChange,J=t.onToggleX,$=t.onToggleY,tt=t.onHover,et=t.onHoverEnd,nt=t.onMove,it=t.ignoreCheck,rt=t.isNormalizer,st=t.onGestureStart,ot=t.onGestureEnd,at=t.onWheel,lt=t.onEnable,ht=t.onDisable,ct=t.onClick,ut=t.scrollSpeed,dt=t.capture,pt=t.allowClicks,ft=t.lockAxis,At=t.onLockAxis;this.target=p=L(p)||l,this.vars=t,b&&(b=r.utils.toArray(b)),e=e||1e-9,n=n||0,M=M||1,ut=ut||1,i=i||"wheel,touch,pointer",_=!1!==_,m||(m=parseFloat(o.getComputedStyle(h).lineHeight)||22);var gt,mt,_t,vt,yt,Et,xt,Ct=this,bt=0,wt=0,St=t.passive||!y&&!1!==t.passive,It=U(p,P),Mt=U(p,D),Tt=It(),Bt=Mt(),Rt=~i.indexOf("touch")&&!~i.indexOf("pointer")&&"pointerdown"===A[0],Pt=w(p),Dt=p.ownerDocument||a,Lt=[0,0,0],Ut=[0,0,0],Nt=0,Ot=function(){return Nt=x()},Ft=function(t,e){return(Ct.event=t)&&b&&function(t,e){for(var n=e.length;n--;)if(e[n]===t||e[n].contains(t))return!0;return!1}(t.target,b)||e&&Rt&&"touch"!==t.pointerType||it&&it(t,e)},kt=function(){var t=Ct.deltaX=F(Lt),n=Ct.deltaY=F(Ut),i=Math.abs(t)>=e,r=Math.abs(n)>=e;Z&&(i||r)&&Z(Ct,t,n,Lt,Ut),i&&(j&&Ct.deltaX>0&&j(Ct),W&&Ct.deltaX<0&&W(Ct),Y&&Y(Ct),J&&Ct.deltaX<0!=bt<0&&J(Ct),bt=Ct.deltaX,Lt[0]=Lt[1]=Lt[2]=0),r&&(X&&Ct.deltaY>0&&X(Ct),q&&Ct.deltaY<0&&q(Ct),K&&K(Ct),$&&Ct.deltaY<0!=wt<0&&$(Ct),wt=Ct.deltaY,Ut[0]=Ut[1]=Ut[2]=0),(vt||_t)&&(nt&&nt(Ct),_t&&(R&&1===_t&&R(Ct),G&&G(Ct),_t=0),vt=!1),Et&&!(Et=!1)&&At&&At(Ct),yt&&(at(Ct),yt=!1),gt=0},Qt=function(t,e,n){Lt[n]+=t,Ut[n]+=e,Ct._vx.update(t),Ct._vy.update(e),_?gt||(gt=requestAnimationFrame(kt)):kt()},zt=function(t,e){ft&&!xt&&(Ct.axis=xt=Math.abs(t)>Math.abs(e)?"x":"y",Et=!0),"y"!==xt&&(Lt[2]+=t,Ct._vx.update(t,!0)),"x"!==xt&&(Ut[2]+=e,Ct._vy.update(e,!0)),_?gt||(gt=requestAnimationFrame(kt)):kt()},Gt=function(t){if(!Ft(t,1)){var e=(t=O(t,y)).clientX,i=t.clientY,r=e-Ct.x,s=i-Ct.y,o=Ct.isDragging;Ct.x=e,Ct.y=i,(o||(r||s)&&(Math.abs(Ct.startX-e)>=n||Math.abs(Ct.startY-i)>=n))&&(_t||(_t=o?2:1),o||(Ct.isDragging=!0),zt(r,s))}},Ht=Ct.onPress=function(t){Ft(t,1)||t&&t.button||(Ct.axis=xt=null,mt.pause(),Ct.isPressed=!0,t=O(t),bt=wt=0,Ct.startX=Ct.x=t.clientX,Ct.startY=Ct.y=t.clientY,Ct._vx.reset(),Ct._vy.reset(),S(rt?p:Dt,A[1],Gt,St,!0),Ct.deltaX=Ct.deltaY=0,H&&H(Ct))},Vt=Ct.onRelease=function(t){if(!Ft(t,1)){I(rt?p:Dt,A[1],Gt,!0);var e=!isNaN(Ct.y-Ct.startY),n=Ct.isDragging,i=n&&(Math.abs(Ct.x-Ct.startX)>3||Math.abs(Ct.y-Ct.startY)>3),s=O(t);!i&&e&&(Ct._vx.reset(),Ct._vy.reset(),y&&pt&&r.delayedCall(.08,(function(){if(x()-Nt>300&&!t.defaultPrevented)if(t.target.click)t.target.click();else if(Dt.createEvent){var e=Dt.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,o,1,s.screenX,s.screenY,s.clientX,s.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(e)}}))),Ct.isDragging=Ct.isGesturing=Ct.isPressed=!1,E&&n&&!rt&&mt.restart(!0),_t&&kt(),z&&n&&z(Ct),V&&V(Ct,i)}},jt=function(t){return t.touches&&t.touches.length>1&&(Ct.isGesturing=!0)&&st(t,Ct.isDragging)},Wt=function(){return(Ct.isGesturing=!1)||ot(Ct)},qt=function(t){if(!Ft(t)){var e=It(),n=Mt();Qt((e-Tt)*ut,(n-Bt)*ut,1),Tt=e,Bt=n,E&&mt.restart(!0)}},Xt=function(t){if(!Ft(t)){t=O(t,y),at&&(yt=!0);var e=(1===t.deltaMode?m:2===t.deltaMode?o.innerHeight:1)*M;Qt(t.deltaX*e,t.deltaY*e,0),E&&!rt&&mt.restart(!0)}},Yt=function(t){if(!Ft(t)){var e=t.clientX,n=t.clientY,i=e-Ct.x,r=n-Ct.y;Ct.x=e,Ct.y=n,vt=!0,E&&mt.restart(!0),(i||r)&&zt(i,r)}},Kt=function(t){Ct.event=t,tt(Ct)},Zt=function(t){Ct.event=t,et(Ct)},Jt=function(t){return Ft(t)||O(t,y)&&ct(Ct)};mt=Ct._dc=r.delayedCall(C||.25,(function(){Ct._vx.reset(),Ct._vy.reset(),mt.pause(),E&&E(Ct)})).pause(),Ct.deltaX=Ct.deltaY=0,Ct._vx=N(0,50,!0),Ct._vy=N(0,50,!0),Ct.scrollX=It,Ct.scrollY=Mt,Ct.isDragging=Ct.isGesturing=Ct.isPressed=!1,g(this),Ct.enable=function(t){return Ct.isEnabled||(S(Pt?Dt:p,"scroll",B),i.indexOf("scroll")>=0&&S(Pt?Dt:p,"scroll",qt,St,dt),i.indexOf("wheel")>=0&&S(p,"wheel",Xt,St,dt),(i.indexOf("touch")>=0&&c||i.indexOf("pointer")>=0)&&(S(p,A[0],Ht,St,dt),S(Dt,A[2],Vt),S(Dt,A[3],Vt),pt&&S(p,"click",Ot,!0,!0),ct&&S(p,"click",Jt),st&&S(Dt,"gesturestart",jt),ot&&S(Dt,"gestureend",Wt),tt&&S(p,u+"enter",Kt),et&&S(p,u+"leave",Zt),nt&&S(p,u+"move",Yt)),Ct.isEnabled=!0,Ct.isDragging=Ct.isGesturing=Ct.isPressed=vt=_t=!1,Ct._vx.reset(),Ct._vy.reset(),Tt=It(),Bt=Mt(),t&&t.type&&Ht(t),lt&&lt(Ct)),Ct},Ct.disable=function(){Ct.isEnabled&&(v.filter((function(t){return t!==Ct&&w(t.target)})).length||I(Pt?Dt:p,"scroll",B),Ct.isPressed&&(Ct._vx.reset(),Ct._vy.reset(),I(rt?p:Dt,A[1],Gt,!0)),I(Pt?Dt:p,"scroll",qt,dt),I(p,"wheel",Xt,dt),I(p,A[0],Ht,dt),I(Dt,A[2],Vt),I(Dt,A[3],Vt),I(p,"click",Ot,!0),I(p,"click",Jt),I(Dt,"gesturestart",jt),I(Dt,"gestureend",Wt),I(p,u+"enter",Kt),I(p,u+"leave",Zt),I(p,u+"move",Yt),Ct.isEnabled=Ct.isPressed=Ct.isDragging=!1,ht&&ht(Ct))},Ct.kill=Ct.revert=function(){Ct.disable();var t=v.indexOf(Ct);t>=0&&v.splice(t,1),f===Ct&&(f=0)},v.push(Ct),rt&&w(p)&&(f=Ct),Ct.enable(T)},e=t,(n=[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}])&&i(e.prototype,n),p&&i(e,p),t}();z.version="3.14.2",z.create=function(t){return new z(t)},z.register=Q,z.getAll=function(){return v.slice()},z.getById=function(t){return v.filter((function(e){return e.vars.id===t}))[0]},m()&&r.registerPlugin(z);var G,H,V,j,W,q,X,Y,K,Z,J,$,tt,et,nt,it,rt,st,ot,at,lt,ht,ct,ut,dt,pt,ft,At,gt,mt,_t,vt,yt,Et,xt,Ct,bt,wt,St=1,It=Date.now,Mt=It(),Tt=0,Bt=0,Rt=function(t,e,n){var i=jt(t)&&("clamp("===t.substr(0,6)||t.indexOf("max")>-1);return n["_"+e+"Clamp"]=i,i?t.substr(6,t.length-7):t},Pt=function(t,e){return!e||jt(t)&&"clamp("===t.substr(0,6)?t:"clamp("+t+")"},Dt=function t(){return Bt&&requestAnimationFrame(t)},Lt=function(){return et=1},Ut=function(){return et=0},Nt=function(t){return t},Ot=function(t){return Math.round(1e5*t)/1e5||0},Ft=function(){return"undefined"!=typeof window},kt=function(){return G||Ft()&&(G=window.gsap)&&G.registerPlugin&&G},Qt=function(t){return!!~X.indexOf(t)},zt=function(t){return("Height"===t?_t:V["inner"+t])||W["client"+t]||q["client"+t]},Gt=function(t){return b(t,"getBoundingClientRect")||(Qt(t)?function(){return nn.width=V.innerWidth,nn.height=_t,nn}:function(){return fe(t)})},Ht=function(t,e){var n=e.s,i=e.d2,r=e.d,s=e.a;return Math.max(0,(n="scroll"+i)&&(s=b(t,n))?s()-Gt(t)()[r]:Qt(t)?(W[n]||q[n])-zt(i):t[n]-t["offset"+i])},Vt=function(t,e){for(var n=0;n<ot.length;n+=3)(!e||~e.indexOf(ot[n+1]))&&t(ot[n],ot[n+1],ot[n+2])},jt=function(t){return"string"==typeof t},Wt=function(t){return"function"==typeof t},qt=function(t){return"number"==typeof t},Xt=function(t){return"object"==typeof t},Yt=function(t,e,n){return t&&t.progress(e?0:1)&&n&&t.pause()},Kt=function(t,e){if(t.enabled){var n=t._ctx?t._ctx.add((function(){return e(t)})):e(t);n&&n.totalTime&&(t.callbackAnimation=n)}},Zt=Math.abs,Jt="left",$t="right",te="bottom",ee="width",ne="height",ie="Right",re="Left",se="Top",oe="Bottom",ae="padding",le="margin",he="Width",ce="Height",ue="px",de=function(t){return V.getComputedStyle(t)},pe=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},fe=function(t,e){var n=e&&"matrix(1, 0, 0, 1, 0, 0)"!==de(t)[nt]&&G.to(t,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),i=t.getBoundingClientRect();return n&&n.progress(0).kill(),i},Ae=function(t,e){var n=e.d2;return t["offset"+n]||t["client"+n]||0},ge=function(t){var e,n=[],i=t.labels,r=t.duration();for(e in i)n.push(i[e]/r);return n},me=function(t){var e=G.utils.snap(t),n=Array.isArray(t)&&t.slice(0).sort((function(t,e){return t-e}));return n?function(t,i,r){var s;if(void 0===r&&(r=.001),!i)return e(t);if(i>0){for(t-=r,s=0;s<n.length;s++)if(n[s]>=t)return n[s];return n[s-1]}for(s=n.length,t+=r;s--;)if(n[s]<=t)return n[s];return n[0]}:function(n,i,r){void 0===r&&(r=.001);var s=e(n);return!i||Math.abs(s-n)<r||s-n<0==i<0?s:e(i<0?n-t:n+t)}},_e=function(t,e,n,i){return n.split(",").forEach((function(n){return t(e,n,i)}))},ve=function(t,e,n,i,r){return t.addEventListener(e,n,{passive:!i,capture:!!r})},ye=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},Ee=function(t,e,n){(n=n&&n.wheelHandler)&&(t(e,"wheel",n),t(e,"touchmove",n))},xe={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},Ce={toggleActions:"play",anticipatePin:0},be={top:0,left:0,center:.5,bottom:1,right:1},we=function(t,e){if(jt(t)){var n=t.indexOf("="),i=~n?+(t.charAt(n-1)+1)*parseFloat(t.substr(n+1)):0;~n&&(t.indexOf("%")>n&&(i*=e/100),t=t.substr(0,n-1)),t=i+(t in be?be[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},Se=function(t,e,n,i,r,s,o,a){var l=r.startColor,h=r.endColor,c=r.fontSize,u=r.indent,d=r.fontWeight,p=j.createElement("div"),f=Qt(n)||"fixed"===b(n,"pinType"),A=-1!==t.indexOf("scroller"),g=f?q:n,m=-1!==t.indexOf("start"),_=m?l:h,v="border-color:"+_+";font-size:"+c+";color:"+_+";font-weight:"+d+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return v+="position:"+((A||a)&&f?"fixed;":"absolute;"),(A||a||!f)&&(v+=(i===D?$t:te)+":"+(s+parseFloat(u))+"px;"),o&&(v+="box-sizing:border-box;text-align:left;width:"+o.offsetWidth+"px;"),p._isStart=m,p.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),p.style.cssText=v,p.innerText=e||0===e?t+"-"+e:t,g.children[0]?g.insertBefore(p,g.children[0]):g.appendChild(p),p._offset=p["offset"+i.op.d2],Ie(p,0,i,m),p},Ie=function(t,e,n,i){var r={display:"block"},s=n[i?"os2":"p2"],o=n[i?"p2":"os2"];t._isFlipped=i,r[n.a+"Percent"]=i?-100:0,r[n.a]=i?"1px":0,r["border"+s+he]=1,r["border"+o+he]=0,r[n.p]=e+"px",G.set(t,r)},Me=[],Te={},Be=function(){return It()-Tt>34&&(xt||(xt=requestAnimationFrame(Ye)))},Re=function(){(!ct||!ct.isPressed||ct.startX>q.clientWidth)&&(y.cache++,ct?xt||(xt=requestAnimationFrame(Ye)):Ye(),Tt||Oe("scrollStart"),Tt=It())},Pe=function(){pt=V.innerWidth,dt=V.innerHeight},De=function(t){y.cache++,(!0===t||!tt&&!ht&&!j.fullscreenElement&&!j.webkitFullscreenElement&&(!ut||pt!==V.innerWidth||Math.abs(V.innerHeight-dt)>.25*V.innerHeight))&&Y.restart(!0)},Le={},Ue=[],Ne=function t(){return ye(cn,"scrollEnd",t)||We(!0)},Oe=function(t){return Le[t]&&Le[t].map((function(t){return t()}))||Ue},Fe=[],ke=function(t){for(var e=0;e<Fe.length;e+=5)(!t||Fe[e+4]&&Fe[e+4].query===t)&&(Fe[e].style.cssText=Fe[e+1],Fe[e].getBBox&&Fe[e].setAttribute("transform",Fe[e+2]||""),Fe[e+3].uncache=1)},Qe=function(){return y.forEach((function(t){return Wt(t)&&++t.cacheID&&(t.rec=t())}))},ze=function(t,e){var n;for(it=0;it<Me.length;it++)!(n=Me[it])||e&&n._ctx!==e||(t?n.kill(1):n.revert(!0,!0));vt=!0,e&&ke(e),e||Oe("revert")},Ge=function(t,e){y.cache++,(e||!Ct)&&y.forEach((function(t){return Wt(t)&&t.cacheID++&&(t.rec=0)})),jt(t)&&(V.history.scrollRestoration=gt=t)},He=0,Ve=function(){q.appendChild(mt),_t=!ct&&mt.offsetHeight||V.innerHeight,q.removeChild(mt)},je=function(t){return K(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach((function(e){return e.style.display=t?"none":"block"}))},We=function(t,e){if(W=j.documentElement,q=j.body,X=[V,j,W,q],!Tt||t||vt){Ve(),Ct=cn.isRefreshing=!0,vt||Qe();var n=Oe("refreshInit");at&&cn.sort(),e||ze(),y.forEach((function(t){Wt(t)&&(t.smooth&&(t.target.style.scrollBehavior="auto"),t(0))})),Me.slice(0).forEach((function(t){return t.refresh()})),vt=!1,Me.forEach((function(t){if(t._subPinOffset&&t.pin){var e=t.vars.horizontal?"offsetWidth":"offsetHeight",n=t.pin[e];t.revert(!0,1),t.adjustPinSpacing(t.pin[e]-n),t.refresh()}})),yt=1,je(!0),Me.forEach((function(t){var e=Ht(t.scroller,t._dir),n="max"===t.vars.end||t._endClamp&&t.end>e,i=t._startClamp&&t.start>=e;(n||i)&&t.setPositions(i?e-1:t.start,n?Math.max(i?e:t.start+1,e):t.end,!0)})),je(!1),yt=0,n.forEach((function(t){return t&&t.render&&t.render(-1)})),y.forEach((function(t){Wt(t)&&(t.smooth&&requestAnimationFrame((function(){return t.target.style.scrollBehavior="smooth"})),t.rec&&t(t.rec))})),Ge(gt,1),Y.pause(),He++,Ct=2,Ye(2),Me.forEach((function(t){return Wt(t.vars.onRefresh)&&t.vars.onRefresh(t)})),Ct=cn.isRefreshing=!1,Oe("refresh")}else ve(cn,"scrollEnd",Ne)},qe=0,Xe=1,Ye=function(t){if(2===t||!Ct&&!vt){cn.isUpdating=!0,wt&&wt.update(0);var e=Me.length,n=It(),i=n-Mt>=50,r=e&&Me[0].scroll();if(Xe=qe>r?-1:1,Ct||(qe=r),i&&(Tt&&!et&&n-Tt>200&&(Tt=0,Oe("scrollEnd")),J=Mt,Mt=n),Xe<0){for(it=e;it-- >0;)Me[it]&&Me[it].update(0,i);Xe=1}else for(it=0;it<e;it++)Me[it]&&Me[it].update(0,i);cn.isUpdating=!1}xt=0},Ke=[Jt,"top",te,$t,le+oe,le+ie,le+se,le+re,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],Ze=Ke.concat([ee,ne,"boxSizing","max"+he,"max"+ce,"position",le,ae,ae+se,ae+ie,ae+oe,ae+re]),Je=function(t,e,n,i){if(!t._gsap.swappedIn){for(var r,s=Ke.length,o=e.style,a=t.style;s--;)o[r=Ke[s]]=n[r];o.position="absolute"===n.position?"absolute":"relative","inline"===n.display&&(o.display="inline-block"),a[te]=a[$t]="auto",o.flexBasis=n.flexBasis||"auto",o.overflow="visible",o.boxSizing="border-box",o[ee]=Ae(t,P)+ue,o[ne]=Ae(t,D)+ue,o[ae]=a[le]=a.top=a[Jt]="0",tn(i),a[ee]=a["max"+he]=n[ee],a[ne]=a["max"+ce]=n[ne],a[ae]=n[ae],t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},$e=/([A-Z])/g,tn=function(t){if(t){var e,n,i=t.t.style,r=t.length,s=0;for((t.t._gsap||G.core.getCache(t.t)).uncache=1;s<r;s+=2)n=t[s+1],e=t[s],n?i[e]=n:i[e]&&i.removeProperty(e.replace($e,"-$1").toLowerCase())}},en=function(t){for(var e=Ze.length,n=t.style,i=[],r=0;r<e;r++)i.push(Ze[r],n[Ze[r]]);return i.t=t,i},nn={left:0,top:0},rn=function(t,e,n,i,r,s,o,a,l,h,c,u,d,p){Wt(t)&&(t=t(a)),jt(t)&&"max"===t.substr(0,3)&&(t=u+("="===t.charAt(4)?we("0"+t.substr(3),n):0));var f,A,g,m=d?d.time():0;if(d&&d.seek(0),isNaN(t)||(t=+t),qt(t))d&&(t=G.utils.mapRange(d.scrollTrigger.start,d.scrollTrigger.end,0,u,t)),o&&Ie(o,n,i,!0);else{Wt(e)&&(e=e(a));var _,v,y,E,x=(t||"0").split(" ");g=L(e,a)||q,(_=fe(g)||{})&&(_.left||_.top)||"none"!==de(g).display||(E=g.style.display,g.style.display="block",_=fe(g),E?g.style.display=E:g.style.removeProperty("display")),v=we(x[0],_[i.d]),y=we(x[1]||"0",n),t=_[i.p]-l[i.p]-h+v+r-y,o&&Ie(o,y,i,n-y<20||o._isStart&&y>20),n-=n-y}if(p&&(a[p]=t||-.001,t<0&&(t=0)),s){var C=t+n,b=s._isStart;f="scroll"+i.d2,Ie(s,C,i,b&&C>20||!b&&(c?Math.max(q[f],W[f]):s.parentNode[f])<=C+1),c&&(l=fe(o),c&&(s.style[i.op.p]=l[i.op.p]-i.op.m-s._offset+ue))}return d&&g&&(f=fe(g),d.seek(u),A=fe(g),d._caScrollDist=f[i.p]-A[i.p],t=t/d._caScrollDist*u),d&&d.seek(m),d?t:Math.round(t)},sn=/(webkit|moz|length|cssText|inset)/i,on=function(t,e,n,i){if(t.parentNode!==e){var r,s,o=t.style;if(e===q){for(r in t._stOrig=o.cssText,s=de(t))+r||sn.test(r)||!s[r]||"string"!=typeof o[r]||"0"===r||(o[r]=s[r]);o.top=n,o.left=i}else o.cssText=t._stOrig;G.core.getCache(t).uncache=1,e.appendChild(t)}},an=function(t,e,n){var i=e,r=i;return function(e){var s=Math.round(t());return s!==i&&s!==r&&Math.abs(s-i)>3&&Math.abs(s-r)>3&&(e=s,n&&n()),r=i,i=Math.round(e)}},ln=function(t,e,n){var i={};i[e.p]="+="+n,G.set(t,i)},hn=function(t,e){var n=U(t,e),i="_scroll"+e.p2,r=function e(r,s,o,a,l){var h=e.tween,c=s.onComplete,u={};o=o||n();var d=an(n,o,(function(){h.kill(),e.tween=0}));return l=a&&l||0,a=a||r-o,h&&h.kill(),s[i]=r,s.inherit=!1,s.modifiers=u,u[i]=function(){return d(o+a*h.ratio+l*h.ratio*h.ratio)},s.onUpdate=function(){y.cache++,e.tween&&Ye()},s.onComplete=function(){e.tween=0,c&&c.call(h)},h=e.tween=G.to(t,s)};return t[i]=n,n.wheelHandler=function(){return r.tween&&r.tween.kill()&&(r.tween=0)},ve(t,"wheel",n.wheelHandler),cn.isTouch&&ve(t,"touchmove",n.wheelHandler),r},cn=function(){function t(e,n){H||t.register(G)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),At(this),this.init(e,n)}return t.prototype.init=function(e,n){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),Bt){var i,r,s,o,a,l,h,c,u,d,p,f,A,g,m,_,v,x,C,w,S,I,M,T,B,R,N,O,F,k,Q,z,H,X,Y,$,nt,rt,st,ot,ht,ct,ut=e=pe(jt(e)||qt(e)||e.nodeType?{trigger:e}:e,Ce),dt=ut.onUpdate,pt=ut.toggleClass,ft=ut.id,At=ut.onToggle,gt=ut.onRefresh,mt=ut.scrub,_t=ut.trigger,vt=ut.pin,xt=ut.pinSpacing,Mt=ut.invalidateOnRefresh,Dt=ut.anticipatePin,Lt=ut.onScrubComplete,Ut=ut.onSnapComplete,Ft=ut.once,kt=ut.snap,Vt=ut.pinReparent,Jt=ut.pinSpacer,$t=ut.containerAnimation,te=ut.fastScrollEnd,_e=ut.preventOverlaps,Ee=e.horizontal||e.containerAnimation&&!1!==e.horizontal?P:D,be=!mt&&0!==mt,Ie=L(e.scroller||V),Be=G.core.getCache(Ie),Pe=Qt(Ie),Le="fixed"===("pinType"in e?e.pinType:b(Ie,"pinType")||Pe&&"fixed"),Ue=[e.onEnter,e.onLeave,e.onEnterBack,e.onLeaveBack],Oe=be&&e.toggleActions.split(" "),Fe="markers"in e?e.markers:Ce.markers,ke=Pe?0:parseFloat(de(Ie)["border"+Ee.p2+he])||0,Qe=this,ze=e.onRefreshInit&&function(){return e.onRefreshInit(Qe)},Ge=function(t,e,n){var i=n.d,r=n.d2,s=n.a;return(s=b(t,"getBoundingClientRect"))?function(){return s()[i]}:function(){return(e?zt(r):t["client"+r])||0}}(Ie,Pe,Ee),Ve=function(t,e){return!e||~E.indexOf(t)?Gt(t):function(){return nn}}(Ie,Pe),je=0,qe=0,Ye=0,Ke=U(Ie,Ee);if(Qe._startClamp=Qe._endClamp=!1,Qe._dir=Ee,Dt*=45,Qe.scroller=Ie,Qe.scroll=$t?$t.time.bind($t):Ke,o=Ke(),Qe.vars=e,n=n||e.animation,"refreshPriority"in e&&(at=1,-9999===e.refreshPriority&&(wt=Qe)),Be.tweenScroll=Be.tweenScroll||{top:hn(Ie,D),left:hn(Ie,P)},Qe.tweenTo=i=Be.tweenScroll[Ee.p],Qe.scrubDuration=function(t){(H=qt(t)&&t)?z?z.duration(t):z=G.to(n,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:H,paused:!0,onComplete:function(){return Lt&&Lt(Qe)}}):(z&&z.progress(1).kill(),z=0)},n&&(n.vars.lazy=!1,n._initted&&!Qe.isReverted||!1!==n.vars.immediateRender&&!1!==e.immediateRender&&n.duration()&&n.render(0,!0,!0),Qe.animation=n.pause(),n.scrollTrigger=Qe,Qe.scrubDuration(mt),k=0,ft||(ft=n.vars.id)),kt&&(Xt(kt)&&!kt.push||(kt={snapTo:kt}),"scrollBehavior"in q.style&&G.set(Pe?[q,W]:Ie,{scrollBehavior:"auto"}),y.forEach((function(t){return Wt(t)&&t.target===(Pe?j.scrollingElement||W:Ie)&&(t.smooth=!1)})),s=Wt(kt.snapTo)?kt.snapTo:"labels"===kt.snapTo?function(t){return function(e){return G.utils.snap(ge(t),e)}}(n):"labelsDirectional"===kt.snapTo?(ot=n,function(t,e){return me(ge(ot))(t,e.direction)}):!1!==kt.directional?function(t,e){return me(kt.snapTo)(t,It()-qe<500?0:e.direction)}:G.utils.snap(kt.snapTo),X=kt.duration||{min:.1,max:2},X=Xt(X)?Z(X.min,X.max):Z(X,X),Y=G.delayedCall(kt.delay||H/2||.1,(function(){var t=Ke(),e=It()-qe<500,r=i.tween;if(!(e||Math.abs(Qe.getVelocity())<10)||r||et||je===t)Qe.isActive&&je!==t&&Y.restart(!0);else{var o,a,c=(t-l)/g,u=n&&!be?n.totalProgress():c,d=e?0:(u-Q)/(It()-J)*1e3||0,p=G.utils.clamp(-c,1-c,Zt(d/2)*d/.185),f=c+(!1===kt.inertia?0:p),A=kt,m=A.onStart,_=A.onInterrupt,v=A.onComplete;if(o=s(f,Qe),qt(o)||(o=f),a=Math.max(0,Math.round(l+o*g)),t<=h&&t>=l&&a!==t){if(r&&!r._initted&&r.data<=Zt(a-t))return;!1===kt.inertia&&(p=o-c),i(a,{duration:X(Zt(.185*Math.max(Zt(f-u),Zt(o-u))/d/.05||0)),ease:kt.ease||"power3",data:Zt(a-t),onInterrupt:function(){return Y.restart(!0)&&_&&_(Qe)},onComplete:function(){Qe.update(),je=Ke(),n&&!be&&(z?z.resetTo("totalProgress",o,n._tTime/n._tDur):n.progress(o)),k=Q=n&&!be?n.totalProgress():Qe.progress,Ut&&Ut(Qe),v&&v(Qe)}},t,p*g,a-t-p*g),m&&m(Qe,i.tween)}}})).pause()),ft&&(Te[ft]=Qe),(st=(_t=Qe.trigger=L(_t||!0!==vt&&vt))&&_t._gsap&&_t._gsap.stRevert)&&(st=st(Qe)),vt=!0===vt?_t:L(vt),jt(pt)&&(pt={targets:_t,className:pt}),vt&&(!1===xt||xt===le||(xt=!(!xt&&vt.parentNode&&vt.parentNode.style&&"flex"===de(vt.parentNode).display)&&ae),Qe.pin=vt,(r=G.core.getCache(vt)).spacer?m=r.pinState:(Jt&&((Jt=L(Jt))&&!Jt.nodeType&&(Jt=Jt.current||Jt.nativeElement),r.spacerIsNative=!!Jt,Jt&&(r.spacerState=en(Jt))),r.spacer=x=Jt||j.createElement("div"),x.classList.add("pin-spacer"),ft&&x.classList.add("pin-spacer-"+ft),r.pinState=m=en(vt)),!1!==e.force3D&&G.set(vt,{force3D:!0}),Qe.spacer=x=r.spacer,F=de(vt),T=F[xt+Ee.os2],w=G.getProperty(vt),S=G.quickSetter(vt,Ee.a,ue),Je(vt,x,F),v=en(vt)),Fe){f=Xt(Fe)?pe(Fe,xe):xe,d=Se("scroller-start",ft,Ie,Ee,f,0),p=Se("scroller-end",ft,Ie,Ee,f,0,d),C=d["offset"+Ee.op.d2];var Ze=L(b(Ie,"content")||Ie);c=this.markerStart=Se("start",ft,Ze,Ee,f,C,0,$t),u=this.markerEnd=Se("end",ft,Ze,Ee,f,C,0,$t),$t&&(rt=G.quickSetter([c,u],Ee.a,ue)),Le||E.length&&!0===b(Ie,"fixedMarkers")||(ct=de(ht=Pe?q:Ie).position,ht.style.position="absolute"===ct||"fixed"===ct?ct:"relative",G.set([d,p],{force3D:!0}),R=G.quickSetter(d,Ee.a,ue),O=G.quickSetter(p,Ee.a,ue))}if($t){var $e=$t.vars.onUpdate,sn=$t.vars.onUpdateParams;$t.eventCallback("onUpdate",(function(){Qe.update(0,0,1),$e&&$e.apply($t,sn||[])}))}if(Qe.previous=function(){return Me[Me.indexOf(Qe)-1]},Qe.next=function(){return Me[Me.indexOf(Qe)+1]},Qe.revert=function(t,e){if(!e)return Qe.kill(!0);var i=!1!==t||!Qe.enabled,r=tt;i!==Qe.isReverted&&(i&&($=Math.max(Ke(),Qe.scroll.rec||0),Ye=Qe.progress,nt=n&&n.progress()),c&&[c,u,d,p].forEach((function(t){return t.style.display=i?"none":"block"})),i&&(tt=Qe,Qe.update(i)),!vt||Vt&&Qe.isActive||(i?function(t,e,n){tn(n);var i=t._gsap;if(i.spacerIsNative)tn(i.spacerState);else if(t._gsap.swappedIn){var r=e.parentNode;r&&(r.insertBefore(t,e),r.removeChild(e))}t._gsap.swappedIn=!1}(vt,x,m):Je(vt,x,de(vt),B)),i||Qe.update(i),tt=r,Qe.isReverted=i)},Qe.refresh=function(r,s,f,y){if(!tt&&Qe.enabled||s)if(vt&&r&&Tt)ve(t,"scrollEnd",Ne);else{!Ct&&ze&&ze(Qe),tt=Qe,i.tween&&!f&&(i.tween.kill(),i.tween=0),z&&z.pause(),Mt&&n&&(n.revert({kill:!1}).invalidate(),n.getChildren?n.getChildren(!0,!0,!1).forEach((function(t){return t.vars.immediateRender&&t.render(0,!0,!0)})):n.vars.immediateRender&&n.render(0,!0,!0)),Qe.isReverted||Qe.revert(!0,!0),Qe._subPinOffset=!1;var E,C,b,S,T,R,O,F,k,Q,H,V,X,K=Ge(),Z=Ve(),J=$t?$t.duration():Ht(Ie,Ee),et=g<=.01||!g,it=0,rt=y||0,st=Xt(f)?f.end:e.end,ot=e.endTrigger||_t,at=Xt(f)?f.start:e.start||(0!==e.start&&_t?vt?"0 0":"0 100%":0),ht=Qe.pinnedContainer=e.pinnedContainer&&L(e.pinnedContainer,Qe),ct=_t&&Math.max(0,Me.indexOf(Qe))||0,ut=ct;for(Fe&&Xt(f)&&(V=G.getProperty(d,Ee.p),X=G.getProperty(p,Ee.p));ut-- >0;)(R=Me[ut]).end||R.refresh(0,1)||(tt=Qe),!(O=R.pin)||O!==_t&&O!==vt&&O!==ht||R.isReverted||(Q||(Q=[]),Q.unshift(R),R.revert(!0,!0)),R!==Me[ut]&&(ct--,ut--);for(Wt(at)&&(at=at(Qe)),at=Rt(at,"start",Qe),l=rn(at,_t,K,Ee,Ke(),c,d,Qe,Z,ke,Le,J,$t,Qe._startClamp&&"_startClamp")||(vt?-.001:0),Wt(st)&&(st=st(Qe)),jt(st)&&!st.indexOf("+=")&&(~st.indexOf(" ")?st=(jt(at)?at.split(" ")[0]:"")+st:(it=we(st.substr(2),K),st=jt(at)?at:($t?G.utils.mapRange(0,$t.duration(),$t.scrollTrigger.start,$t.scrollTrigger.end,l):l)+it,ot=_t)),st=Rt(st,"end",Qe),h=Math.max(l,rn(st||(ot?"100% 0":J),ot,K,Ee,Ke()+it,u,p,Qe,Z,ke,Le,J,$t,Qe._endClamp&&"_endClamp"))||-.001,it=0,ut=ct;ut--;)(O=(R=Me[ut]||{}).pin)&&R.start-R._pinPush<=l&&!$t&&R.end>0&&(E=R.end-(Qe._startClamp?Math.max(0,R.start):R.start),(O===_t&&R.start-R._pinPush<l||O===ht)&&isNaN(at)&&(it+=E*(1-R.progress)),O===vt&&(rt+=E));if(l+=it,h+=it,Qe._startClamp&&(Qe._startClamp+=it),Qe._endClamp&&!Ct&&(Qe._endClamp=h||-.001,h=Math.min(h,Ht(Ie,Ee))),g=h-l||(l-=.01)&&.001,et&&(Ye=G.utils.clamp(0,1,G.utils.normalize(l,h,$))),Qe._pinPush=rt,c&&it&&((E={})[Ee.a]="+="+it,ht&&(E[Ee.p]="-="+Ke()),G.set([c,u],E)),!vt||yt&&Qe.end>=Ht(Ie,Ee)){if(_t&&Ke()&&!$t)for(C=_t.parentNode;C&&C!==q;)C._pinOffset&&(l-=C._pinOffset,h-=C._pinOffset),C=C.parentNode}else E=de(vt),S=Ee===D,b=Ke(),I=parseFloat(w(Ee.a))+rt,!J&&h>1&&(H={style:H=(Pe?j.scrollingElement||W:Ie).style,value:H["overflow"+Ee.a.toUpperCase()]},Pe&&"scroll"!==de(q)["overflow"+Ee.a.toUpperCase()]&&(H.style["overflow"+Ee.a.toUpperCase()]="scroll")),Je(vt,x,E),v=en(vt),C=fe(vt,!0),F=Le&&U(Ie,S?P:D)(),xt?((B=[xt+Ee.os2,g+rt+ue]).t=x,(ut=xt===ae?Ae(vt,Ee)+g+rt:0)&&(B.push(Ee.d,ut+ue),"auto"!==x.style.flexBasis&&(x.style.flexBasis=ut+ue)),tn(B),ht&&Me.forEach((function(t){t.pin===ht&&!1!==t.vars.pinSpacing&&(t._subPinOffset=!0)})),Le&&Ke($)):(ut=Ae(vt,Ee))&&"auto"!==x.style.flexBasis&&(x.style.flexBasis=ut+ue),Le&&((T={top:C.top+(S?b-l:F)+ue,left:C.left+(S?F:b-l)+ue,boxSizing:"border-box",position:"fixed"})[ee]=T["max"+he]=Math.ceil(C.width)+ue,T[ne]=T["max"+ce]=Math.ceil(C.height)+ue,T[le]=T[le+se]=T[le+ie]=T[le+oe]=T[le+re]="0",T[ae]=E[ae],T[ae+se]=E[ae+se],T[ae+ie]=E[ae+ie],T[ae+oe]=E[ae+oe],T[ae+re]=E[ae+re],_=function(t,e,n){for(var i,r=[],s=t.length,o=n?8:0;o<s;o+=2)i=t[o],r.push(i,i in e?e[i]:t[o+1]);return r.t=t.t,r}(m,T,Vt),Ct&&Ke(0)),n?(k=n._initted,lt(1),n.render(n.duration(),!0,!0),M=w(Ee.a)-I+g+rt,N=Math.abs(g-M)>1,Le&&N&&_.splice(_.length-2,2),n.render(0,!0,!0),k||n.invalidate(!0),n.parent||n.totalTime(n.totalTime()),lt(0)):M=g,H&&(H.value?H.style["overflow"+Ee.a.toUpperCase()]=H.value:H.style.removeProperty("overflow-"+Ee.a));Q&&Q.forEach((function(t){return t.revert(!1,!0)})),Qe.start=l,Qe.end=h,o=a=Ct?$:Ke(),$t||Ct||(o<$&&Ke($),Qe.scroll.rec=0),Qe.revert(!1,!0),qe=It(),Y&&(je=-1,Y.restart(!0)),tt=0,n&&be&&(n._initted||nt)&&n.progress()!==nt&&n.progress(nt||0,!0).render(n.time(),!0,!0),(et||Ye!==Qe.progress||$t||Mt||n&&!n._initted)&&(n&&!be&&(n._initted||Ye||!1!==n.vars.immediateRender)&&n.totalProgress($t&&l<-.001&&!Ye?G.utils.normalize(l,h,0):Ye,!0),Qe.progress=et||(o-l)/g===Ye?0:Ye),vt&&xt&&(x._pinOffset=Math.round(Qe.progress*M)),z&&z.invalidate(),isNaN(V)||(V-=G.getProperty(d,Ee.p),X-=G.getProperty(p,Ee.p),ln(d,Ee,V),ln(c,Ee,V-(y||0)),ln(p,Ee,X),ln(u,Ee,X-(y||0))),et&&!Ct&&Qe.update(),!gt||Ct||A||(A=!0,gt(Qe),A=!1)}},Qe.getVelocity=function(){return(Ke()-a)/(It()-J)*1e3||0},Qe.endAnimation=function(){Yt(Qe.callbackAnimation),n&&(z?z.progress(1):n.paused()?be||Yt(n,Qe.direction<0,1):Yt(n,n.reversed()))},Qe.labelToScroll=function(t){return n&&n.labels&&(l||Qe.refresh()||l)+n.labels[t]/n.duration()*g||0},Qe.getTrailing=function(t){var e=Me.indexOf(Qe),n=Qe.direction>0?Me.slice(0,e).reverse():Me.slice(e+1);return(jt(t)?n.filter((function(e){return e.vars.preventOverlaps===t})):n).filter((function(t){return Qe.direction>0?t.end<=l:t.start>=h}))},Qe.update=function(t,e,r){if(!$t||r||t){var s,c,u,p,f,A,m,y=!0===Ct?$:Qe.scroll(),E=t?0:(y-l)/g,C=E<0?0:E>1?1:E||0,b=Qe.progress;if(e&&(a=o,o=$t?Ke():y,kt&&(Q=k,k=n&&!be?n.totalProgress():C)),Dt&&vt&&!tt&&!St&&Tt&&(!C&&l<y+(y-a)/(It()-J)*Dt?C=1e-4:1===C&&h>y+(y-a)/(It()-J)*Dt&&(C=.9999)),C!==b&&Qe.enabled){if(p=(f=(s=Qe.isActive=!!C&&C<1)!==(!!b&&b<1))||!!C!=!!b,Qe.direction=C>b?1:-1,Qe.progress=C,p&&!tt&&(c=C&&!b?0:1===C?1:1===b?2:3,be&&(u=!f&&"none"!==Oe[c+1]&&Oe[c+1]||Oe[c],m=n&&("complete"===u||"reset"===u||u in n))),_e&&(f||m)&&(m||mt||!n)&&(Wt(_e)?_e(Qe):Qe.getTrailing(_e).forEach((function(t){return t.endAnimation()}))),be||(!z||tt||St?n&&n.totalProgress(C,!(!tt||!qe&&!t)):(z._dp._time-z._start!==z._time&&z.render(z._dp._time-z._start),z.resetTo?z.resetTo("totalProgress",C,n._tTime/n._tDur):(z.vars.totalProgress=C,z.invalidate().restart()))),vt)if(t&&xt&&(x.style[xt+Ee.os2]=T),Le){if(p){if(A=!t&&C>b&&h+1>y&&y+1>=Ht(Ie,Ee),Vt)if(t||!s&&!A)on(vt,x);else{var w=fe(vt,!0),B=y-l;on(vt,q,w.top+(Ee===D?B:0)+ue,w.left+(Ee===D?0:B)+ue)}tn(s||A?_:v),N&&C<1&&s||S(I+(1!==C||A?0:M))}}else S(Ot(I+M*C));kt&&!i.tween&&!tt&&!St&&Y.restart(!0),pt&&(f||Ft&&C&&(C<1||!Et))&&K(pt.targets).forEach((function(t){return t.classList[s||Ft?"add":"remove"](pt.className)})),dt&&!be&&!t&&dt(Qe),p&&!tt?(be&&(m&&("complete"===u?n.pause().totalProgress(1):"reset"===u?n.restart(!0).pause():"restart"===u?n.restart(!0):n[u]()),dt&&dt(Qe)),!f&&Et||(At&&f&&Kt(Qe,At),Ue[c]&&Kt(Qe,Ue[c]),Ft&&(1===C?Qe.kill(!1,1):Ue[c]=0),f||Ue[c=1===C?1:3]&&Kt(Qe,Ue[c])),te&&!s&&Math.abs(Qe.getVelocity())>(qt(te)?te:2500)&&(Yt(Qe.callbackAnimation),z?z.progress(1):Yt(n,"reverse"===u?1:!C,1))):be&&dt&&!tt&&dt(Qe)}if(O){var P=$t?y/$t.duration()*($t._caScrollDist||0):y;R(P+(d._isFlipped?1:0)),O(P)}rt&&rt(-y/$t.duration()*($t._caScrollDist||0))}},Qe.enable=function(e,n){Qe.enabled||(Qe.enabled=!0,ve(Ie,"resize",De),Pe||ve(Ie,"scroll",Re),ze&&ve(t,"refreshInit",ze),!1!==e&&(Qe.progress=Ye=0,o=a=je=Ke()),!1!==n&&Qe.refresh())},Qe.getTween=function(t){return t&&i?i.tween:z},Qe.setPositions=function(t,e,n,i){if($t){var r=$t.scrollTrigger,s=$t.duration(),o=r.end-r.start;t=r.start+o*t/s,e=r.start+o*e/s}Qe.refresh(!1,!1,{start:Pt(t,n&&!!Qe._startClamp),end:Pt(e,n&&!!Qe._endClamp)},i),Qe.update()},Qe.adjustPinSpacing=function(t){if(B&&t){var e=B.indexOf(Ee.d)+1;B[e]=parseFloat(B[e])+t+ue,B[1]=parseFloat(B[1])+t+ue,tn(B)}},Qe.disable=function(e,n){if(!1!==e&&Qe.revert(!0,!0),Qe.enabled&&(Qe.enabled=Qe.isActive=!1,n||z&&z.pause(),$=0,r&&(r.uncache=1),ze&&ye(t,"refreshInit",ze),Y&&(Y.pause(),i.tween&&i.tween.kill()&&(i.tween=0)),!Pe)){for(var s=Me.length;s--;)if(Me[s].scroller===Ie&&Me[s]!==Qe)return;ye(Ie,"resize",De),Pe||ye(Ie,"scroll",Re)}},Qe.kill=function(t,i){Qe.disable(t,i),z&&!i&&z.kill(),ft&&delete Te[ft];var s=Me.indexOf(Qe);s>=0&&Me.splice(s,1),s===it&&Xe>0&&it--,s=0,Me.forEach((function(t){return t.scroller===Qe.scroller&&(s=1)})),s||Ct||(Qe.scroll.rec=0),n&&(n.scrollTrigger=null,t&&n.revert({kill:!1}),i||n.kill()),c&&[c,u,d,p].forEach((function(t){return t.parentNode&&t.parentNode.removeChild(t)})),wt===Qe&&(wt=0),vt&&(r&&(r.uncache=1),s=0,Me.forEach((function(t){return t.pin===vt&&s++})),s||(r.spacer=0)),e.onKill&&e.onKill(Qe)},Me.push(Qe),Qe.enable(!1,!1),st&&st(Qe),n&&n.add&&!g){var an=Qe.update;Qe.update=function(){Qe.update=an,y.cache++,l||h||Qe.refresh()},G.delayedCall(.01,Qe.update),g=.01,l=h=0}else Qe.refresh();vt&&function(){if(bt!==He){var t=bt=He;requestAnimationFrame((function(){return t===He&&We(!0)}))}}()}else this.update=this.refresh=this.kill=Nt},t.register=function(e){return H||(G=e||kt(),Ft()&&window.document&&t.enable(),H=Bt),H},t.defaults=function(t){if(t)for(var e in t)Ce[e]=t[e];return Ce},t.disable=function(t,e){Bt=0,Me.forEach((function(n){return n[e?"kill":"disable"](t)})),ye(V,"wheel",Re),ye(j,"scroll",Re),clearInterval($),ye(j,"touchcancel",Nt),ye(q,"touchstart",Nt),_e(ye,j,"pointerdown,touchstart,mousedown",Lt),_e(ye,j,"pointerup,touchend,mouseup",Ut),Y.kill(),Vt(ye);for(var n=0;n<y.length;n+=3)Ee(ye,y[n],y[n+1]),Ee(ye,y[n],y[n+2])},t.enable=function(){if(V=window,j=document,W=j.documentElement,q=j.body,G&&(K=G.utils.toArray,Z=G.utils.clamp,At=G.core.context||Nt,lt=G.core.suppressOverwrites||Nt,gt=V.history.scrollRestoration||"auto",qe=V.pageYOffset||0,G.core.globals("ScrollTrigger",t),q)){Bt=1,(mt=document.createElement("div")).style.height="100vh",mt.style.position="absolute",Ve(),Dt(),z.register(G),t.isTouch=z.isTouch,ft=z.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),ut=1===z.isTouch,ve(V,"wheel",Re),X=[V,j,W,q],G.matchMedia?(t.matchMedia=function(t){var e,n=G.matchMedia();for(e in t)n.add(e,t[e]);return n},G.addEventListener("matchMediaInit",(function(){Qe(),ze()})),G.addEventListener("matchMediaRevert",(function(){return ke()})),G.addEventListener("matchMedia",(function(){We(0,1),Oe("matchMedia")})),G.matchMedia().add("(orientation: portrait)",(function(){return Pe(),Pe}))):console.warn("Requires GSAP 3.11.0 or later"),Pe(),ve(j,"scroll",Re);var e,n,i=q.hasAttribute("style"),r=q.style,s=r.borderTopStyle,o=G.core.Animation.prototype;for(o.revert||Object.defineProperty(o,"revert",{value:function(){return this.time(-.01,!0)}}),r.borderTopStyle="solid",e=fe(q),D.m=Math.round(e.top+D.sc())||0,P.m=Math.round(e.left+P.sc())||0,s?r.borderTopStyle=s:r.removeProperty("border-top-style"),i||(q.setAttribute("style",""),q.removeAttribute("style")),$=setInterval(Be,250),G.delayedCall(.5,(function(){return St=0})),ve(j,"touchcancel",Nt),ve(q,"touchstart",Nt),_e(ve,j,"pointerdown,touchstart,mousedown",Lt),_e(ve,j,"pointerup,touchend,mouseup",Ut),nt=G.utils.checkPrefix("transform"),Ze.push(nt),H=It(),Y=G.delayedCall(.2,We).pause(),ot=[j,"visibilitychange",function(){var t=V.innerWidth,e=V.innerHeight;j.hidden?(rt=t,st=e):rt===t&&st===e||De()},j,"DOMContentLoaded",We,V,"load",We,V,"resize",De],Vt(ve),Me.forEach((function(t){return t.enable(0,1)})),n=0;n<y.length;n+=3)Ee(ye,y[n],y[n+1]),Ee(ye,y[n],y[n+2])}},t.config=function(e){"limitCallbacks"in e&&(Et=!!e.limitCallbacks);var n=e.syncInterval;n&&clearInterval($)||($=n)&&setInterval(Be,n),"ignoreMobileResize"in e&&(ut=1===t.isTouch&&e.ignoreMobileResize),"autoRefreshEvents"in e&&(Vt(ye)||Vt(ve,e.autoRefreshEvents||"none"),ht=-1===(e.autoRefreshEvents+"").indexOf("resize"))},t.scrollerProxy=function(t,e){var n=L(t),i=y.indexOf(n),r=Qt(n);~i&&y.splice(i,r?6:2),e&&(r?E.unshift(V,e,q,e,W,e):E.unshift(n,e))},t.clearMatchMedia=function(t){Me.forEach((function(e){return e._ctx&&e._ctx.query===t&&e._ctx.kill(!0,!0)}))},t.isInViewport=function(t,e,n){var i=(jt(t)?L(t):t).getBoundingClientRect(),r=i[n?ee:ne]*e||0;return n?i.right-r>0&&i.left+r<V.innerWidth:i.bottom-r>0&&i.top+r<V.innerHeight},t.positionInViewport=function(t,e,n){jt(t)&&(t=L(t));var i=t.getBoundingClientRect(),r=i[n?ee:ne],s=null==e?r/2:e in be?be[e]*r:~e.indexOf("%")?parseFloat(e)*r/100:parseFloat(e)||0;return n?(i.left+s)/V.innerWidth:(i.top+s)/V.innerHeight},t.killAll=function(t){if(Me.slice(0).forEach((function(t){return"ScrollSmoother"!==t.vars.id&&t.kill()})),!0!==t){var e=Le.killAll||[];Le={},e.forEach((function(t){return t()}))}},t}();cn.version="3.14.2",cn.saveStyles=function(t){return t?K(t).forEach((function(t){if(t&&t.style){var e=Fe.indexOf(t);e>=0&&Fe.splice(e,5),Fe.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),G.core.getCache(t),At())}})):Fe},cn.revert=function(t,e){return ze(!t,e)},cn.create=function(t,e){return new cn(t,e)},cn.refresh=function(t){return t?De(!0):(H||cn.register())&&We(!0)},cn.update=function(t){return++y.cache&&Ye(!0===t?2:0)},cn.clearScrollMemory=Ge,cn.maxScroll=function(t,e){return Ht(t,e?P:D)},cn.getScrollFunc=function(t,e){return U(L(t),e?P:D)},cn.getById=function(t){return Te[t]},cn.getAll=function(){return Me.filter((function(t){return"ScrollSmoother"!==t.vars.id}))},cn.isScrolling=function(){return!!Tt},cn.snapDirectional=me,cn.addEventListener=function(t,e){var n=Le[t]||(Le[t]=[]);~n.indexOf(e)||n.push(e)},cn.removeEventListener=function(t,e){var n=Le[t],i=n&&n.indexOf(e);i>=0&&n.splice(i,1)},cn.batch=function(t,e){var n,i=[],r={},s=e.interval||.016,o=e.batchMax||1e9,a=function(t,e){var n=[],i=[],r=G.delayedCall(s,(function(){e(n,i),n=[],i=[]})).pause();return function(t){n.length||r.restart(!0),n.push(t.trigger),i.push(t),o<=n.length&&r.progress(1)}};for(n in e)r[n]="on"===n.substr(0,2)&&Wt(e[n])&&"onRefreshInit"!==n?a(0,e[n]):e[n];return Wt(o)&&(o=o(),ve(cn,"refresh",(function(){return o=e.batchMax()}))),K(t).forEach((function(t){var e={};for(n in r)e[n]=r[n];e.trigger=t,i.push(cn.create(e))})),i};var un,dn=function(t,e,n,i){return e>i?t(i):e<0&&t(0),n>i?(i-e)/(n-e):n<0?e/(e-n):1},pn=function t(e,n){!0===n?e.style.removeProperty("touch-action"):e.style.touchAction=!0===n?"auto":n?"pan-"+n+(z.isTouch?" pinch-zoom":""):"none",e===W&&t(q,n)},fn={auto:1,scroll:1},An=function(t){var e,n=t.event,i=t.target,r=t.axis,s=(n.changedTouches?n.changedTouches[0]:n).target,o=s._gsap||G.core.getCache(s),a=It();if(!o._isScrollT||a-o._isScrollT>2e3){for(;s&&s!==q&&(s.scrollHeight<=s.clientHeight&&s.scrollWidth<=s.clientWidth||!fn[(e=de(s)).overflowY]&&!fn[e.overflowX]);)s=s.parentNode;o._isScroll=s&&s!==i&&!Qt(s)&&(fn[(e=de(s)).overflowY]||fn[e.overflowX]),o._isScrollT=a}(o._isScroll||"x"===r)&&(n.stopPropagation(),n._gsapAllow=!0)},gn=function(t,e,n,i){return z.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:i=i&&An,onPress:i,onDrag:i,onScroll:i,onEnable:function(){return n&&ve(j,z.eventTypes[0],_n,!1,!0)},onDisable:function(){return ye(j,z.eventTypes[0],_n,!0)}})},mn=/(input|label|select|textarea)/i,_n=function(t){var e=mn.test(t.target.tagName);(e||un)&&(t._gsapAllow=!0,un=e)},vn=function(t){Xt(t)||(t={}),t.preventDefault=t.isNormalizer=t.allowClicks=!0,t.type||(t.type="wheel,touch"),t.debounce=!!t.debounce,t.id=t.id||"normalizer";var e,n,i,r,s,o,a,l,h=t,c=h.normalizeScrollX,u=h.momentum,d=h.allowNestedScroll,p=h.onRelease,f=L(t.target)||W,A=G.core.globals().ScrollSmoother,g=A&&A.get(),m=ft&&(t.content&&L(t.content)||g&&!1!==t.content&&!g.smooth()&&g.content()),_=U(f,D),v=U(f,P),E=1,x=(z.isTouch&&V.visualViewport?V.visualViewport.scale*V.visualViewport.width:V.outerWidth)/V.innerWidth,C=0,b=Wt(u)?function(){return u(e)}:function(){return u||2.8},w=gn(f,t.type,!0,d),S=function(){return r=!1},I=Nt,M=Nt,T=function(){n=Ht(f,D),M=Z(ft?1:0,n),c&&(I=Z(0,Ht(f,P))),i=He},B=function(){m._gsap.y=Ot(parseFloat(m._gsap.y)+_.offset)+"px",m.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(m._gsap.y)+", 0, 1)",_.offset=_.cacheID=0},R=function(){T(),s.isActive()&&s.vars.scrollY>n&&(_()>n?s.progress(1)&&_(n):s.resetTo("scrollY",n))};return m&&G.set(m,{y:"+=0"}),t.ignoreCheck=function(t){return ft&&"touchmove"===t.type&&function(){if(r){requestAnimationFrame(S);var t=Ot(e.deltaY/2),n=M(_.v-t);if(m&&n!==_.v+_.offset){_.offset=n-_.v;var i=Ot((parseFloat(m&&m._gsap.y)||0)-_.offset);m.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+i+", 0, 1)",m._gsap.y=i+"px",_.cacheID=y.cache,Ye()}return!0}_.offset&&B(),r=!0}()||E>1.05&&"touchstart"!==t.type||e.isGesturing||t.touches&&t.touches.length>1},t.onPress=function(){r=!1;var t=E;E=Ot((V.visualViewport&&V.visualViewport.scale||1)/x),s.pause(),t!==E&&pn(f,E>1.01||!c&&"x"),o=v(),a=_(),T(),i=He},t.onRelease=t.onGestureStart=function(t,e){if(_.offset&&B(),e){y.cache++;var i,r,o=b();c&&(r=(i=v())+.05*o*-t.velocityX/.227,o*=dn(v,i,r,Ht(f,P)),s.vars.scrollX=I(r)),r=(i=_())+.05*o*-t.velocityY/.227,o*=dn(_,i,r,Ht(f,D)),s.vars.scrollY=M(r),s.invalidate().duration(o).play(.01),(ft&&s.vars.scrollY>=n||i>=n-1)&&G.to({},{onUpdate:R,duration:o})}else l.restart(!0);p&&p(t)},t.onWheel=function(){s._ts&&s.pause(),It()-C>1e3&&(i=0,C=It())},t.onChange=function(t,e,n,r,s){if(He!==i&&T(),e&&c&&v(I(r[2]===e?o+(t.startX-t.x):v()+e-r[1])),n){_.offset&&B();var l=s[2]===n,h=l?a+t.startY-t.y:_()+n-s[1],u=M(h);l&&h!==u&&(a+=u-h),_(u)}(n||e)&&Ye()},t.onEnable=function(){pn(f,!c&&"x"),cn.addEventListener("refresh",R),ve(V,"resize",R),_.smooth&&(_.target.style.scrollBehavior="auto",_.smooth=v.smooth=!1),w.enable()},t.onDisable=function(){pn(f,!0),ye(V,"resize",R),cn.removeEventListener("refresh",R),w.kill()},t.lockAxis=!1!==t.lockAxis,(e=new z(t)).iOS=ft,ft&&!_()&&_(1),ft&&G.ticker.add(Nt),l=e._dc,s=G.to(e,{ease:"power4",paused:!0,inherit:!1,scrollX:c?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:an(_,_(),(function(){return s.pause()}))},onUpdate:Ye,onComplete:l.vars.onComplete}),e};cn.sort=function(t){if(Wt(t))return Me.sort(t);var e=V.pageYOffset||0;return cn.getAll().forEach((function(t){return t._sortY=t.trigger?e+t.trigger.getBoundingClientRect().top:t.start+V.innerHeight})),Me.sort(t||function(t,e){return-1e6*(t.vars.refreshPriority||0)+(t.vars.containerAnimation?1e6:t._sortY)-((e.vars.containerAnimation?1e6:e._sortY)+-1e6*(e.vars.refreshPriority||0))})},cn.observe=function(t){return new z(t)},cn.normalizeScroll=function(t){if(void 0===t)return ct;if(!0===t&&ct)return ct.enable();if(!1===t)return ct&&ct.kill(),void(ct=t);var e=t instanceof z?t:vn(t);return ct&&ct.target===e.target&&ct.kill(),Qt(e.target)&&(ct=e),e},cn.core={_getVelocityProp:N,_inputObserver:gn,_scrollers:y,_proxies:E,bridge:{ss:function(){Tt||Oe("scrollStart"),Tt=It()},ref:function(){return tt}}},kt()&&G.registerPlugin(cn)},358:(t,e,n)=>{"use strict";function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,{ZP:()=>Ji,p8:()=>Ji});var s,o,a,l,h,c,u,d,p,f,A,g,m,_,v,y={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},E={duration:.5,overwrite:!1,delay:0},x=1e8,C=1e-8,b=2*Math.PI,w=b/4,S=0,I=Math.sqrt,M=Math.cos,T=Math.sin,B=function(t){return"string"==typeof t},R=function(t){return"function"==typeof t},P=function(t){return"number"==typeof t},D=function(t){return void 0===t},L=function(t){return"object"==typeof t},U=function(t){return!1!==t},N=function(){return"undefined"!=typeof window},O=function(t){return R(t)||B(t)},F="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},k=Array.isArray,Q=/random\([^)]+\)/g,z=/,\s*/g,G=/(?:-?\.?\d|\.)+/gi,H=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,V=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,j=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,W=/[+-]=-?[.\d]+/,q=/[^,'"\[\]\s]+/gi,X=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Y={},K={},Z=function(t){return(K=It(t,Y))&&Tn},J=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},$=function(t,e){return!e&&console.warn(t)},tt=function(t,e){return t&&(Y[t]=e)&&K&&(K[t]=e)||Y},et=function(){return 0},nt={suppressEvents:!0,isStart:!0,kill:!1},it={suppressEvents:!0,kill:!1},rt={suppressEvents:!0},st={},ot=[],at={},lt={},ht={},ct=30,ut=[],dt="",pt=function(t){var e,n,i=t[0];if(L(i)||R(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(n=ut.length;n--&&!ut[n].targetTest(i););e=ut[n]}for(n=t.length;n--;)t[n]&&(t[n]._gsap||(t[n]._gsap=new Ge(t[n],e)))||t.splice(n,1);return t},ft=function(t){return t._gsap||pt(se(t))[0]._gsap},At=function(t,e,n){return(n=t[e])&&R(n)?t[e]():D(n)&&t.getAttribute&&t.getAttribute(e)||n},gt=function(t,e){return(t=t.split(",")).forEach(e)||t},mt=function(t){return Math.round(1e5*t)/1e5||0},_t=function(t){return Math.round(1e7*t)/1e7||0},vt=function(t,e){var n=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===n?t+i:"-"===n?t-i:"*"===n?t*i:t/i},yt=function(t,e){for(var n=e.length,i=0;t.indexOf(e[i])<0&&++i<n;);return i<n},Et=function(){var t,e,n=ot.length,i=ot.slice(0);for(at={},ot.length=0,t=0;t<n;t++)(e=i[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},xt=function(t){return!!(t._initted||t._startAt||t.add)}
vendor: 4,469 bytes, line 2
2,Ct=function(t,e,n,i){ot.length&&!o&&Et(),t.render(e,n,i||!!(o&&e<0&&xt(t))),ot.length&&!o&&Et()},bt=function(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(q).length<2?e:B(t)?t.trim():t},wt=function(t){return t},St=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},It=function(t,e){for(var n in e)t[n]=e[n];return t},Mt=function t(e,n){for(var i in n)"__proto__"!==i&&"constructor"!==i&&"prototype"!==i&&(e[i]=L(n[i])?t(e[i]||(e[i]={}),n[i]):n[i]);return e},Tt=function(t,e){var n,i={};for(n in t)n in e||(i[n]=t[n]);return i},Bt=function(t){var e,n=t.parent||l,i=t.keyframes?(e=k(t.keyframes),function(t,n){for(var i in n)i in t||"duration"===i&&e||"ease"===i||(t[i]=n[i])}):St;if(U(t.inherit))for(;n;)i(t,n.vars.defaults),n=n.parent||n._dp;return t},Rt=function(t,e,n,i,r){void 0===n&&(n="_first"),void 0===i&&(i="_last");var s,o=t[i];if(r)for(s=e[r];o&&o[r]>s;)o=o._prev;return o?(e._next=o._next,o._next=e):(e._next=t[n],t[n]=e),e._next?e._next._prev=e:t[i]=e,e._prev=o,e.parent=e._dp=t,e},Pt=function(t,e,n,i){void 0===n&&(n="_first"),void 0===i&&(i="_last");var r=e._prev,s=e._next;r?r._next=s:t[n]===e&&(t[n]=s),s?s._prev=r:t[i]===e&&(t[i]=r),e._next=e._prev=e.parent=null},Dt=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Lt=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var n=t;n;)n._dirty=1,n=n.parent;return t},Ut=function(t,e,n,i){return t._startAt&&(o?t._startAt.revert(it):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))},Nt=function t(e){return!e||e._ts&&t(e.parent)},Ot=function(t){return t._repeat?Ft(t._tTime,t=t.duration()+t._rDelay)*t:0},Ft=function(t,e){var n=Math.floor(t=_t(t/e));return t&&n===t?n-1:n},kt=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Qt=function(t){return t._end=_t(t._start+(t._tDur/Math.abs(t._ts||t._rts||C)||0))},zt=function(t,e){var n=t._dp;return n&&n.smoothChildTiming&&t._ts&&(t._start=_t(n._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Qt(t),n._dirty||Lt(n,t)),t},Gt=function(t,e){var n;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(n=kt(t.rawTime(),e),(!e._dur||te(0,e.totalDuration(),n)-e._tTime>C)&&e.render(n,!0)),Lt(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(n=t;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;t._zTime=-1e-8}},Ht=function(t,e,n,i){return e.parent&&Dt(e),e._start=_t((P(n)?n:n||t!==l?Zt(t,n,e):t._time)+e._delay),e._end=_t(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Rt(t,e,"_first","_last",t._sort?"_start":0),qt(e)||(t._recent=e),i||Gt(t,e),t._ts<0&&zt(t,t._tTime),t},Vt=function(t,e){return(Y.ScrollTrigger||J("scrollTrigger",e))&&Y.ScrollTrigger.create(e,t)},jt=function(t,e,n,i,r){return Ke(t,e,r),t._initted?!n&&t._pt&&!o&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&p!==Te.frame?(ot.push(t),t._lazy=[r,i],1):void 0:1},Wt=function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))},qt=function(t){var e=t.data;return"isFromStart"===e||"isStart"===e},Xt=function(t,e,n,i){var r=t._repeat,s=_t(e)||0,o=t._tTime/t._tDur;return o&&!i&&(t._time*=s/t._dur),t._dur=s,t._tDur=r?r<0?1e10:_t(s*(r+1)+t._rDelay*r):s,o>0&&!i&&zt(t,t._tTime=t._tDur*o),t.parent&&Qt(t),n||Lt(t.parent,t),t},Yt=function(t){return t instanceof Ve?Lt(t):Xt(t,t._dur)},Kt={_start:0,endTime:et,totalDuration:et},Zt=function t(e,n,i){var r,s,o,a=e.labels,l=e._recent||Kt,h=e.duration()>=x?l.endTime(!1):e._dur;return B(n)&&(isNaN(n)||n in a)?(s=n.charAt(0),o="%"===n.substr(-1),r=n.indexOf("="),"<"===s||">"===s?(r>=0&&(n=n.replace(/=/,"")),("<"===s?l._start:l.endTime(l._repeat>=0))+(parseFloat(n.substr(1))||0)*(o?(r<0?l:i).totalDuration()/100:1)):r<0?(n in a||(a[n]=h),a[n]):(s=parseFloat(n.charAt(r-1)+n.substr(r+1)),o&&i&&(s=s/100*(k(i)?i[0]:i).totalDuration()),r>1?t(e,n.substr(0,r-1),i)+s:h+s)):null==n?h:+n},Jt=function(t,e,n){var i,r,s=P(e[1]),o=(s?2:1)+(t<2?0:1),a=e[o];if(s&&(a.duration=e[1]),a.parent=n,t){for(i=a,r=n;r&&!("immediateRender"in i);)i=r.vars.defaults||{},r=U(r.vars.inherit)&&r.parent;a.immediateRender=U(i.immediateRender),t<2?a.runBackwards=1:a.startAt=e[o-1]}return new en(e[0],a,e[o+1])},$t=function(t,e){return t||0===t?e(t):e},te=function(t,e,n){return n<t?t:n>e?e:n},ee=function(t,e){return B(t)&&(e=X.exec(t))?e[1]:""},ne=[].slice,ie=function(t,e){return t&&L(t)&&"length"in t&&(!e&&!t.length||t.length-1 
vendor: 8,993 bytes, line 2
2in t&&L(t[0]))&&!t.nodeType&&t!==h},re=function(t,e,n){return void 0===n&&(n=[]),t.forEach((function(t){var i;return B(t)&&!e||ie(t,1)?(i=n).push.apply(i,se(t)):n.push(t)}))||n},se=function(t,e,n){return a&&!e&&a.selector?a.selector(t):!B(t)||n||!c&&Be()?k(t)?re(t,n):ie(t)?ne.call(t,0):t?[t]:[]:ne.call((e||u).querySelectorAll(t),0)},oe=function(t){return t=se(t)[0]||$("Invalid scope")||{},function(e){var n=t.current||t.nativeElement||t;return se(e,n.querySelectorAll?n:n===t?$("Invalid scope")||u.createElement("div"):t)}},ae=function(t){return t.sort((function(){return.5-Math.random()}))},le=function(t){if(R(t))return t;var e=L(t)?t:{each:t},n=Oe(e.ease),i=e.from||0,r=parseFloat(e.base)||0,s={},o=i>0&&i<1,a=isNaN(i)||o,l=e.axis,h=i,c=i;return B(i)?h=c={center:.5,edges:.5,end:1}[i]||0:!o&&a&&(h=i[0],c=i[1]),function(t,o,u){var d,p,f,A,g,m,_,v,y,E=(u||e).length,C=s[E];if(!C){if(!(y="auto"===e.grid?0:(e.grid||[1,x])[1])){for(_=-x;_<(_=u[y++].getBoundingClientRect().left)&&y<E;);y<E&&y--}for(C=s[E]=[],d=a?Math.min(y,E)*h-.5:i%y,p=y===x?0:a?E*c/y-.5:i/y|0,_=0,v=x,m=0;m<E;m++)f=m%y-d,A=p-(m/y|0),C[m]=g=l?Math.abs("y"===l?A:f):I(f*f+A*A),g>_&&(_=g),g<v&&(v=g);"random"===i&&ae(C),C.max=_-v,C.min=v,C.v=E=(parseFloat(e.amount)||parseFloat(e.each)*(y>E?E-1:l?"y"===l?E/y:y:Math.max(y,E/y))||0)*("edges"===i?-1:1),C.b=E<0?r-E:r,C.u=ee(e.amount||e.each)||0,n=n&&E<0?Ue(n):n}return E=(C[t]-C.min)/C.max||0,_t(C.b+(n?n(E):E)*C.v)+C.u}},he=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(n){var i=_t(Math.round(parseFloat(n)/t)*t*e);return(i-i%1)/e+(P(n)?0:ee(n))}},ce=function(t,e){var n,i,r=k(t);return!r&&L(t)&&(n=r=t.radius||x,t.values?(t=se(t.values),(i=!P(t[0]))&&(n*=n)):t=he(t.increment)),$t(e,r?R(t)?function(e){return i=t(e),Math.abs(i-e)<=n?i:e}:function(e){for(var r,s,o=parseFloat(i?e.x:e),a=parseFloat(i?e.y:0),l=x,h=0,c=t.length;c--;)(r=i?(r=t[c].x-o)*r+(s=t[c].y-a)*s:Math.abs(t[c]-o))<l&&(l=r,h=c);return h=!n||l<=n?t[h]:e,i||h===e||P(e)?h:h+ee(e)}:he(t))},ue=function(t,e,n,i){return $t(k(t)?!e:!0===n?!!(n=0):!i,(function(){return k(t)?t[~~(Math.random()*t.length)]:(n=n||1e-5)&&(i=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((t-n/2+Math.random()*(e-t+.99*n))/n)*n*i)/i}))},de=function(t,e,n){return $t(n,(function(n){return t[~~e(n)]}))},pe=function(t){return t.replace(Q,(function(t){var e=t.indexOf("[")+1,n=t.substring(e||7,e?t.indexOf("]"):t.length-1).split(z);return ue(e?n:+n[0],e?0:+n[1],+n[2]||1e-5)}))},fe=function(t,e,n,i,r){var s=e-t,o=i-n;return $t(r,(function(e){return n+((e-t)/s*o||0)}))},Ae=function(t,e,n){var i,r,s,o=t.labels,a=x;for(i in o)(r=o[i]-e)<0==!!n&&r&&a>(r=Math.abs(r))&&(s=i,a=r);return s},ge=function(t,e,n){var i,r,s,o=t.vars,l=o[e],h=a,c=t._ctx;if(l)return i=o[e+"Params"],r=o.callbackScope||t,n&&ot.length&&Et(),c&&(a=c),s=i?l.apply(r,i):l.call(r),a=h,s},me=function(t){return Dt(t),t.scrollTrigger&&t.scrollTrigger.kill(!!o),t.progress()<1&&ge(t,"onInterrupt"),t},_e=[],ve=function(t){if(t)if(t=!t.name&&t.default||t,N()||t.headless){var e=t.name,n=R(t),i=e&&!n&&t.init?function(){this._props=[]}:t,r={init:et,render:un,add:Xe,kill:pn,modifier:dn,rawVars:0},s={targetTest:0,get:0,getSetter:an,aliases:{},register:0};if(Be(),t!==i){if(lt[e])return;St(i,St(Tt(t,r),s)),It(i.prototype,It(r,Tt(t,s))),lt[i.prop=e]=i,t.targetTest&&(ut.push(i),st[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}tt(e,i),t.register&&t.register(Tn,i,gn)}else _e.push(t)},ye=255,Ee={aqua:[0,ye,ye],lime:[0,ye,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,ye],navy:[0,0,128],white:[ye,ye,ye],olive:[128,128,0],yellow:[ye,ye,0],orange:[ye,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[ye,0,0],pink:[ye,192,203],cyan:[0,ye,ye],transparent:[ye,ye,ye,0]},xe=function(t,e,n){return(6*(t+=t<0?1:t>1?-1:0)<1?e+(n-e)*t*6:t<.5?n:3*t<2?e+(n-e)*(2/3-t)*6:e)*ye+.5|0},Ce=function(t,e,n){var i,r,s,o,a,l,h,c,u,d,p=t?P(t)?[t>>16,t>>8&ye,t&ye]:0:Ee.black;if(!p){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),Ee[t])p=Ee[t];else if("#"===t.charAt(0)){if(t.length<6&&(i=t.charAt(1),r=t.charAt(2),s=t.charAt(3),t="#"+i+i+r+r+s+s+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(p=parseInt(t.substr(1,6),16))>>16,p>>8&ye,p&ye,parseInt(t.substr(7),16)/255];p=[(t=parseInt(t.substr(1),16))>>16,t>>8&ye,t&ye]}else if("hsl"===t.substr(0,3))if(p=d=t.match(G),e){if(~t.indexOf("="))return p=t.match(H),n&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,a=+p[1]/100,i=2*(l=+p[2]/100)-(r=l<=.5?l*(a+1):l+a-l*a),p.length>3&&(p[3]*=1),p[0]=xe(o+1/3,i,r),p[1]=xe(o,i,r),p[2]=xe(o-1/3,i,r);else p=t.match(G)||Ee.transparent;p=p.map(Number)}return e&&!d&&(i=p[0]/ye,r=p[1]/ye,s=p[2]/ye,l=((h=Math.max(i,r,s))+(c=Math.min(i,r,s)))/2,h===c?o=a=0:(u=h-c,a=l>.5?u/(2-h-c):u/(h+c),o=h===i?(r-s)/u+(r<s?6:0):h===r?(s-i)/u+2:(i-r)/u+4,o*=60),p[0]=~~(o+.5),p[1]=~~(100*a+.5),p[2]=~~(100*l+.5)),n&&p.length<4&&(p[3]=1),p},be=function(t){var e=[],n=[],i=-1;return t.split(Se).forEach((function(t){var r=t.match(V)||[];e.push.apply(e,r),n.push(i+=r.length+1)})),e.c=n,e},we=function(t,e,n){var i,r,s,o,a="",l=(t+a).match(Se),h=e?"hsla(":"rgba(",c=0;if(!l)return t;if(l=l.map((function(t){return(t=Ce(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),n&&(s=be(t),(i=n.c).join(a)!==s.c.join(a)))for(o=(r=t.replace(Se,"1").split(V)).length-1;c<o;c++)a+=r[c]+(~i.indexOf(c)?l.shift()||h+"0,0,0,0)":(s.length?s:l.length?l:n).shift());if(!r)for(o=(r=t.split(Se)).length-1;c<o;c++)a+=r[c]+l[c];return a+r[o]},Se=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Ee)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Ie=/hsl[a]?\(/,Me=function(t){var e,n=t.join(" ");if(Se.lastIndex=0,Se.test(n))return e=Ie.test(n),t[1]=we(t[1],e),t[0]=we(t[0],e,be(t[1])),!0},Te=function(){var t,e,n,i,r,s,o=Date.now,a=500,l=33,p=o(),f=p,g=1e3/240,m=g,_=[],v=function n(h){var c,u,d,A,v=o()-f,y=!0===h;if((v>a||v<0)&&(p+=v-l),((c=(d=(f+=v)-p)-m)>0||y)&&(A=++i.frame,r=d-1e3*i.time,i.time=d/=1e3,m+=c+(c>=g?4:g-c),u=1),y||(t=e(n)),u)for(s=0;s<_.length;s++)_[s](d,r,A,h)};return i={time:0,frame:0,tick:function(){v(!0)},deltaRatio:function(t){return r/(1e3/(t||60))},wake:function(){d&&(!c&&N()&&(h=c=window,u=h.document||{},Y.gsap=Tn,(h.gsapVersions||(h.gsapVersions=[])).push(Tn.version),Z(K||h.GreenSockGlobals||!h.gsap&&h||{}),_e.forEach(ve)),n="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,t&&i.sleep(),e=n||function(t){return setTimeout(t,m-1e3*i.time+1|0)},A=1,v(2))},sleep:function(){(n?cancelAnimationFrame:clearTimeout)(t),A=0,e=et},lagSmoothing:function(t,e){a=t||1/0,l=Math.min(e||33,a)},fps:function(t){g=1e3/(t||240),m=1e3*i.time+g},add:function(t,e,n){var r=e?function(e,n,s,o){t(e,n,s,o),i.remove(r)}:t;return i.remove(t),_[n?"unshift":"push"](r),Be(),r},remove:function(t,e){~(e=_.indexOf(t))&&_.splice(e,1)&&s>=e&&s--},_listeners:_}}(),Be=function(){return!A&&Te.wake()},Re={},Pe=/^[\d.\-M][\d.\-,\s]/,De=/["']/g,Le=function(t){for(var e,n,i,r={},s=t.substr(1,t.length-3).split(":"),o=s[0],a=1,l=s.length;a<l;a++)n=s[a],e=a!==l-1?n.lastIndexOf(","):n.length,i=n.substr(0,e),r[o]=isNaN(i)?i.replace(De,"").trim():+i,o=n.substr(e+1).trim();return r},Ue=function(t){return function(e){return 1-t(1-e)}},Ne=function t(e,n){for(var i,r=e._first;r;)r instanceof Ve?t(r,n):!r.vars.yoyoEase||r._yoyo&&r._repeat||r._yoyo===n||(r.timeline?t(r.timeline,n):(i=r._ease,r._ease=r._yEase,r._yEase=i,r._yoyo=n)),r=r._next},Oe=function(t,e){return t&&(R(t)?t:Re[t]||function(t){var e,n,i,r,s=(t+"").split("("),o=Re[s[0]];return o&&s.length>1&&o.config?o.config.apply(null,~t.indexOf("{")?[Le(s[1])]:(e=t,n=e.indexOf("(")+1,i=e.indexOf(")"),r=e.indexOf("(",n),e.substring(n,~r&&r<i?e.indexOf(")",i+1):i)).split(",").map(bt)):Re._CE&&Pe.test(t)?Re._CE("",t):o}(t))||e},Fe=function(t,e,n,i){void 0===n&&(n=function(t){return 1-e(1-t)}),void 0===i&&(i=function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var r,s={easeIn:e,easeOut:n,easeInOut:i};return gt(t,(function(t){for(var e in Re[t]=Y[t]=s,Re[r=t.toLowerCase()]=n,s)Re[r+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Re[t+"."+e]=s[e]})),s},ke=function(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}},Qe=function t(e,n,i){var r=n>=1?n:1,s=(i||(e?.3:.45))/(n<1?n:1),o=s/b*(Math.asin(1/r)||0),a=function(t){return 1===t?1:r*Math.pow(2,-10*t)*T((t-o)*s)+1},l="out"===e?a:"in"===e?function(t){return 1-a(1-t)}:ke(a);return s=b/s,l.config=function(n,i){return t(e,n,i)},l},ze=function t(e,n){void 0===n&&(n=1.70158);var i=function(t){return t?--t*t*((n+1)*t+n)+1:0},r="out"===e?i:"in"===e?function(t){return 1-i(1-t)}:ke(i);return r.config=function(n){return t(e,n)},r};gt("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var n=e<5?e+1:e;Fe(t+",Power"+(n-1),e?function(t){return Math.pow(t,n)}:function(t){return t},(function(t){return 1-Math.pow(1-t,n)}),(function(t){return t<.5?Math.pow(2*t,n)/2:1-Math.pow(2*(1-t),n)/2}))}
vendor: 1,694 bytes, line 2
2)),Re.Linear.easeNone=Re.none=Re.Linear.easeIn,Fe("Elastic",Qe("in"),Qe("out"),Qe()),g=7.5625,_=1/(m=2.75),Fe("Bounce",(function(t){return 1-v(1-t)}),v=function(t){return t<_?g*t*t:t<.7272727272727273?g*Math.pow(t-1.5/m,2)+.75:t<.9090909090909092?g*(t-=2.25/m)*t+.9375:g*Math.pow(t-2.625/m,2)+.984375}),Fe("Expo",(function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)})),Fe("Circ",(function(t){return-(I(1-t*t)-1)})),Fe("Sine",(function(t){return 1===t?1:1-M(t*w)})),Fe("Back",ze("in"),ze("out"),ze()),Re.SteppedEase=Re.steps=Y.SteppedEase={config:function(t,e){void 0===t&&(t=1);var n=1/t,i=t+(e?0:1),r=e?1:0;return function(t){return((i*te(0,.99999999,t)|0)+r)*n}}},E.ease=Re["quad.out"],gt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return dt+=t+","+t+"Params,"}));var Ge=function(t,e){this.id=S++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:At,this.set=e?e.getSetter:an},He=function(){function t(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Xt(this,+t.duration,1,1),this.data=t.data,a&&(this._ctx=a,a.data.push(this)),A||Te.wake()}var e=t.prototype;return e.delay=function(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},e.duration=function(t){return arguments.length?this.totalDuration(this._repeat>0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,Xt(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur}
vendor: 4,867 bytes, line 2
2,e.totalTime=function(t,e){if(Be(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(zt(this,t),!n._dp||n.parent||Gt(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t<this._tDur||this._ts<0&&t>0||!this._tDur&&!t)&&Ht(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===C||!this._initted&&this._dur&&t||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),Ct(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Ot(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Ot(this),e):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(t,e){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*n,e):this._repeat?Ft(this._tTime,n)+1:1},e.timeScale=function(t,e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===t)return this;var n=this.parent&&this._ts?kt(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,this.totalTime(te(-Math.abs(this._delay),this.totalDuration(),n),!1!==e),Qt(this),function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Be(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==C&&(this._tTime-=C)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=_t(t);var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&Ht(e,this,this._start-this._delay),this}return this._start},e.endTime=function(t){return this._start+(U(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?kt(e.rawTime(t),this):this._tTime:this._tTime},e.revert=function(t){void 0===t&&(t=rt);var e=o;return o=t,xt(this)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),o=e,this},e.globalTime=function(t){for(var e=this,n=arguments.length?t:e.rawTime();e;)n=e._start+n/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):n},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,Yt(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){if(arguments.length){var e=this._time;return this._rDelay=t,Yt(this),e?this.time(e):this}return this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(Zt(this,t),U(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,U(e)),this._dur||(this._zTime=-1e-8),this},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,n=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=n&&t<this.endTime(!0)-C))},e.eventCallback=function(t,e,n){var i=this.vars;return arguments.length>1?(e?(i[t]=e,n&&(i[t+"Params"]=n),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},e.then=function(t){var e=this,n=e._prom;return new Promise((function(i){var r=R(t)?t:wt,s=function(){var t=e.then;e.then=null,n&&n(),R(r)&&(r=r(e))&&(r.then||r===e)&&(e.then=t),i(r),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?s():e._prom=s}))},e.kill=function(){me(this)},t}();St(He.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom
vendor: 34,252 bytes, line 2
2:0,_ps:!1,_rts:1});var Ve=function(t){function e(e,n){var r;return void 0===e&&(e={}),(r=t.call(this,e)||this).labels={},r.smoothChildTiming=!!e.smoothChildTiming,r.autoRemoveChildren=!!e.autoRemoveChildren,r._sort=U(e.sortChildren),l&&Ht(e.parent||l,i(r),n),e.reversed&&r.reverse(),e.paused&&r.paused(!0),e.scrollTrigger&&Vt(i(r),e.scrollTrigger),r}r(e,t);var n=e.prototype;return n.to=function(t,e,n){return Jt(0,arguments,this),this},n.from=function(t,e,n){return Jt(1,arguments,this),this},n.fromTo=function(t,e,n,i){return Jt(2,arguments,this),this},n.set=function(t,e,n){return e.duration=0,e.parent=this,Bt(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new en(t,e,Zt(this,n),1),this},n.call=function(t,e,n){return Ht(this,en.delayedCall(0,t,e),n)},n.staggerTo=function(t,e,n,i,r,s,o){return n.duration=e,n.stagger=n.stagger||i,n.onComplete=s,n.onCompleteParams=o,n.parent=this,new en(t,n,Zt(this,r)),this},n.staggerFrom=function(t,e,n,i,r,s,o){return n.runBackwards=1,Bt(n).immediateRender=U(n.immediateRender),this.staggerTo(t,e,n,i,r,s,o)},n.staggerFromTo=function(t,e,n,i,r,s,o,a){return i.startAt=n,Bt(i).immediateRender=U(i.immediateRender),this.staggerTo(t,e,i,r,s,o,a)},n.render=function(t,e,n){var i,r,s,a,h,c,u,d,p,f,A,g,m=this._time,_=this._dirty?this.totalDuration():this._tDur,v=this._dur,y=t<=0?0:_t(t),E=this._zTime<0!=t<0&&(this._initted||!v);if(this!==l&&y>_&&t>=0&&(y=_),y!==this._tTime||n||E){if(m!==this._time&&v&&(y+=this._time-m,t+=this._time-m),i=y,p=this._start,c=!(d=this._ts),E&&(v||(m=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(A=this._yoyo,h=v+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*h+t,e,n);if(i=_t(y%h),y===_?(a=this._repeat,i=v):((a=~~(f=_t(y/h)))&&a===f&&(i=v,a--),i>v&&(i=v)),f=Ft(this._tTime,h),!m&&this._tTime&&f!==a&&this._tTime-f*h-this._dur<=0&&(f=a),A&&1&a&&(i=v-i,g=1),a!==f&&!this._lock){var x=A&&1&f,b=x===(A&&1&a);if(a<f&&(x=!x),m=x?0:y%v?v:y,this._lock=1,this.render(m||(g?0:_t(a*h)),e,!v)._lock=0,this._tTime=y,!e&&this.parent&&ge(this,"onRepeat"),this.vars.repeatRefresh&&!g&&(this.invalidate()._lock=1,f=a),m&&m!==this._time||c!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(v=this._dur,_=this._tDur,b&&(this._lock=2,m=x?v:-1e-4,this.render(m,!0),this.vars.repeatRefresh&&!g&&this.invalidate()),this._lock=0,!this._ts&&!c)return this;Ne(this,g)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(u=function(t,e,n){var i;if(n>e)for(i=t._first;i&&i._start<=n;){if("isPause"===i.data&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=n;){if("isPause"===i.data&&i._start<e)return i;i=i._prev}}(this,_t(m),_t(i)),u&&(y-=i-(i=u._start))),this._tTime=y,this._time=i,this._act=!d,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,m=0),!m&&y&&v&&!e&&!f&&(ge(this,"onStart"),this._tTime!==y))return this;if(i>=m&&t>=0)for(r=this._first;r;){if(s=r._next,(r._act||i>=r._start)&&r._ts&&u!==r){if(r.parent!==this)return this.render(t,e,n);if(r.render(r._ts>0?(i-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(i-r._start)*r._ts,e,n),i!==this._time||!this._ts&&!c){u=0,s&&(y+=this._zTime=-1e-8);break}}r=s}else{r=this._last;for(var w=t<0?t:i;r;){if(s=r._prev,(r._act||w<=r._end)&&r._ts&&u!==r){if(r.parent!==this)return this.render(t,e,n);if(r.render(r._ts>0?(w-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(w-r._start)*r._ts,e,n||o&&xt(r)),i!==this._time||!this._ts&&!c){u=0,s&&(y+=this._zTime=w?-1e-8:C);break}}r=s}}if(u&&!e&&(this.pause(),u.render(i>=m?0:-1e-8)._zTime=i>=m?1:-1,this._ts))return this._start=p,Qt(this),this.render(t,e,n);this._onUpdate&&!e&&ge(this,"onUpdate",!0),(y===_&&this._tTime>=this.totalDuration()||!y&&m)&&(p!==this._start&&Math.abs(d)===Math.abs(this._ts)||this._lock||((t||!v)&&(y===_&&this._ts>0||!y&&this._ts<0)&&Dt(this,1),e||t<0&&!m||!y&&!m&&_||(ge(this,y===_&&t>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(y<_&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(t,e){var n=this;if(P(e)||(e=Zt(this,e,t)),!(t instanceof He)){if(k(t))return t.forEach((function(t){return n.add(t,e)})),this;if(B(t))return this.addLabel(t,e);if(!R(t))return this;t=en.delayedCall(0,t)}return this!==t?Ht(this,t,e):this},n.getChildren=function(t,e,n,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===n&&(n=!0),void 0===i&&(i=-x);for(var r=[],s=this._first;s;)s._start>=i&&(s instanceof en?e&&r.push(s):(n&&r.push(s),t&&r.push.apply(r,s.getChildren(!0,e,n)))),s=s._next;return r},n.getById=function(t){for(var e=this.getChildren(1,1,1),n=e.length;n--;)if(e[n].vars.id===t)return e[n]},n.remove=function(t){return B(t)?this.removeLabel(t):R(t)?this.killTweensOf(t):(t.parent===this&&Pt(this,t),t===this._recent&&(this._recent=this._last),Lt(this))},n.totalTime=function(e,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=_t(Te.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,n),this._forcing=0,this):this._tTime},n.addLabel=function(t,e){return this.labels[t]=Zt(this,e),this},n.removeLabel=function(t){return delete this.labels[t],this},n.addPause=function(t,e,n){var i=en.delayedCall(0,e||et,n);return i.data="isPause",this._hasPause=1,Ht(this,i,Zt(this,t))},n.removePause=function(t){var e=this._first;for(t=Zt(this,t);e;)e._start===t&&"isPause"===e.data&&Dt(e),e=e._next},n.killTweensOf=function(t,e,n){for(var i=this.getTweensOf(t,n),r=i.length;r--;)je!==i[r]&&i[r].kill(t,e);return this},n.getTweensOf=function(t,e){for(var n,i=[],r=se(t),s=this._first,o=P(e);s;)s instanceof en?yt(s._targets,r)&&(o?(!je||s._initted&&s._ts)&&s.globalTime(0)<=e&&s.globalTime(s.totalDuration())>e:!e||s.isActive())&&i.push(s):(n=s.getTweensOf(r,e)).length&&i.push.apply(i,n),s=s._next;return i},n.tweenTo=function(t,e){e=e||{};var n,i=this,r=Zt(i,t),s=e,o=s.startAt,a=s.onStart,l=s.onStartParams,h=s.immediateRender,c=en.to(i,St({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:r,overwrite:"auto",duration:e.duration||Math.abs((r-(o&&"time"in o?o.time:i._time))/i.timeScale())||C,onStart:function(){if(i.pause(),!n){var t=e.duration||Math.abs((r-(o&&"time"in o?o.time:i._time))/i.timeScale());c._dur!==t&&Xt(c,t,0,1).render(c._time,!0,!0),n=1}a&&a.apply(c,l||[])}},e));return h?c.render(0):c},n.tweenFromTo=function(t,e,n){return this.tweenTo(e,St({startAt:{time:Zt(this,t)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(t){return void 0===t&&(t=this._time),Ae(this,Zt(this,t))},n.previousLabel=function(t){return void 0===t&&(t=this._time),Ae(this,Zt(this,t),1)},n.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+C)},n.shiftChildren=function(t,e,n){void 0===n&&(n=0);var i,r=this._first,s=this.labels;for(t=_t(t);r;)r._start>=n&&(r._start+=t,r._end+=t),r=r._next;if(e)for(i in s)s[i]>=n&&(s[i]+=t);return Lt(this)},n.invalidate=function(e){var n=this._first;for(this._lock=0;n;)n.invalidate(e),n=n._next;return t.prototype.invalidate.call(this,e)},n.clear=function(t){void 0===t&&(t=!0);for(var e,n=this._first;n;)e=n._next,this.remove(n),n=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Lt(this)},n.totalDuration=function(t){var e,n,i,r=0,s=this,o=s._last,a=x;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-t:t));if(s._dirty){for(i=s.parent;o;)e=o._prev,o._dirty&&o.totalDuration(),(n=o._start)>a&&s._sort&&o._ts&&!s._lock?(s._lock=1,Ht(s,o,n-o._delay,1)._lock=0):a=n,n<0&&o._ts&&(r-=n,(!i&&!s._dp||i&&i.smoothChildTiming)&&(s._start+=_t(n/s._ts),s._time-=n,s._tTime-=n),s.shiftChildren(-n,!1,-Infinity),a=0),o._end>r&&o._ts&&(r=o._end),o=e;Xt(s,s===l&&s._time>r?s._time:r,1,1),s._dirty=0}return s._tDur},e.updateRoot=function(t){if(l._ts&&(Ct(l,kt(t,l)),p=Te.frame),Te.frame>=ct){ct+=y.autoSleep||120;var e=l._first;if((!e||!e._ts)&&y.autoSleep&&Te._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Te.sleep()}}},e}(He);St(Ve.prototype,{_lock:0,_hasPause:0,_forcing:0});var je,We,qe=function(t,e,n,i,r,s,o){var a,l,h,c,u,d,p,f,A=new gn(this._pt,t,e,0,1,cn,null,r),g=0,m=0;for(A.b=n,A.e=i,n+="",(p=~(i+="").indexOf("random("))&&(i=pe(i)),s&&(s(f=[n,i],t,e),n=f[0],i=f[1]),l=n.match(j)||[];a=j.exec(i);)c=a[0],u=i.substring(g,a.index),h?h=(h+1)%5:"rgba("===u.substr(-5)&&(h=1),c!==l[m++]&&(d=parseFloat(l[m-1])||0,A._pt={_next:A._pt,p:u||1===m?u:",",s:d,c:"="===c.charAt(1)?vt(d,c)-d:parseFloat(c)-d,m:h&&h<4?Math.round:0},g=j.lastIndex);return A.c=g<i.length?i.substring(g,i.length):"",A.fp=o,(W.test(i)||p)&&(A.e=0),this._pt=A,A},Xe=function(t,e,n,i,r,s,o,a,l,h){R(i)&&(i=i(r||0,t,s));var c,u=t[e],d="get"!==n?n:R(u)?l?t[e.indexOf("set")||!R(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():u,p=R(u)?l?sn:rn:nn;if(B(i)&&(~i.indexOf("random(")&&(i=pe(i)),"="===i.charAt(1)&&((c=vt(d,i)+(ee(d)||0))||0===c)&&(i=c)),!h||d!==i||We)return isNaN(d*i)||""===i?(!u&&!(e in t)&&J(e,i),qe.call(this,t,e,d,i,p,a||y.stringFilter,l)):(c=new gn(this._pt,t,e,+d||0,i-(d||0),"boolean"==typeof u?hn:ln,0,p),l&&(c.fp=l),o&&c.modifier(o,this,t),this._pt=c)},Ye=function(t,e,n,i,r,s){var o,a,l,h;if(lt[t]&&!1!==(o=new lt[t]).init(r,o.rawVars?e[t]:function(t,e,n,i,r){if(R(t)&&(t=Je(t,r,e,n,i)),!L(t)||t.style&&t.nodeType||k(t)||F(t))return B(t)?Je(t,r,e,n,i):t;var s,o={};for(s in t)o[s]=Je(t[s],r,e,n,i);return o}(e[t],i,r,s,n),n,i,s)&&(n._pt=a=new gn(n._pt,r,t,0,1,o.render,o,0,o.priority),n!==f))for(l=n._ptLookup[n._targets.indexOf(r)],h=o._props.length;h--;)l[o._props[h]]=a;return o},Ke=function t(e,n,i){var r,a,h,c,u,d,p,f,A,g,m,_,v,y=e.vars,b=y.ease,w=y.startAt,S=y.immediateRender,I=y.lazy,M=y.onUpdate,T=y.runBackwards,B=y.yoyoEase,R=y.keyframes,P=y.autoRevert,D=e._dur,L=e._startAt,N=e._targets,O=e.parent,F=O&&"nested"===O.data?O.vars.targets:N,k="auto"===e._overwrite&&!s,Q=e.timeline;if(Q&&(!R||!b)&&(b="none"),e._ease=Oe(b,E.ease),e._yEase=B?Ue(Oe(!0===B?b:B,E.ease)):0,B&&e._yoyo&&!e._repeat&&(B=e._yEase,e._yEase=e._ease,e._ease=B),e._from=!Q&&!!y.runBackwards,!Q||R&&!y.stagger){if(_=(f=N[0]?ft(N[0]).harness:0)&&y[f.prop],r=Tt(y,st),L&&(L._zTime<0&&L.progress(1),n<0&&T&&S&&!P?L.render(-1,!0):L.revert(T&&D?it:nt),L._lazy=0),w){if(Dt(e._startAt=en.set(N,St({data:"isStart",overwrite:!1,parent:O,immediateRender:!0,lazy:!L&&U(I),startAt:null,delay:0,onUpdate:M&&function(){return ge(e,"onUpdate")},stagger:0},w))),e._startAt._dp=0,e._startAt._sat=e,n<0&&(o||!S&&!P)&&e._startAt.revert(it),S&&D&&n<=0&&i<=0)return void(n&&(e._zTime=n))}else if(T&&D&&!L)if(n&&(S=!1),h=St({overwrite:!1,data:"isFromStart",lazy:S&&!L&&U(I),immediateRender:S,stagger:0,parent:O},r),_&&(h[f.prop]=_),Dt(e._startAt=en.set(N,h)),e._startAt._dp=0,e._startAt._sat=e,n<0&&(o?e._startAt.revert(it):e._startAt.render(-1,!0)),e._zTime=n,S){if(!n)return}else t(e._startAt,C,C);for(e._pt=e._ptCache=0,I=D&&U(I)||I&&!D,a=0;a<N.length;a++){if(p=(u=N[a])._gsap||pt(N)[a]._gsap,e._ptLookup[a]=g={},at[p.id]&&ot.length&&Et(),m=F===N?a:F.indexOf(u),f&&!1!==(A=new f).init(u,_||r,e,m,F)&&(e._pt=c=new gn(e._pt,u,A.name,0,1,A.render,A,0,A.priority),A._props.forEach((function(t){g[t]=c})),A.priority&&(d=1)),!f||_)for(h in r)lt[h]&&(A=Ye(h,r,e,m,u,F))?A.priority&&(d=1):g[h]=c=Xe.call(e,u,h,"get",r[h],m,F,0,y.stringFilter);e._op&&e._op[a]&&e.kill(u,e._op[a]),k&&e._pt&&(je=e,l.killTweensOf(u,g,e.globalTime(n)),v=!e.parent,je=0),e._pt&&I&&(at[p.id]=1)}d&&An(e),e._onInit&&e._onInit(e)}e._onUpdate=M,e._initted=(!e._op||e._pt)&&!v,R&&n<=0&&Q.render(x,!0,!0)},Ze=function(t,e,n,i){var r,s,o=e.ease||i||"power1.inOut";if(k(e))s=n[t]||(n[t]=[]),e.forEach((function(t,n){return s.push({t:n/(e.length-1)*100,v:t,e:o})}));else for(r in e)s=n[r]||(n[r]=[]),"ease"===r||s.push({t:parseFloat(t),v:e[r],e:o})},Je=function(t,e,n,i,r){return R(t)?t.call(e,n,i,r):B(t)&&~t.indexOf("random(")?pe(t):t},$e=dt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",tn={};gt($e+",id,stagger,delay,duration,paused,scrollTrigger",(function(t){return tn[t]=1}));var en=function(t){function e(e,n,r,o){var a;"number"==typeof n&&(r.duration=n,n=r,r=null);var h,c,u,d,p,f,A,g,m=(a=t.call(this,o?n:Bt(n))||this).vars,_=m.duration,v=m.delay,E=m.immediateRender,x=m.stagger,C=m.overwrite,b=m.keyframes,w=m.defaults,S=m.scrollTrigger,I=m.yoyoEase,M=n.parent||l,T=(k(e)||F(e)?P(e[0]):"length"in n)?[e]:se(e);if(a._targets=T.length?pt(T):$("GSAP target "+e+" not found. https://gsap.com",!y.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=C,b||x||O(_)||O(v)){if(n=a.vars,(h=a.timeline=new Ve({data:"nested",defaults:w||{},targets:M&&"nested"===M.data?M.vars.targets:T})).kill(),h.parent=h._dp=i(a),h._start=0,x||O(_)||O(v)){if(d=T.length,A=x&&le(x),L(x))for(p in x)~$e.indexOf(p)&&(g||(g={}),g[p]=x[p]);for(c=0;c<d;c++)(u=Tt(n,tn)).stagger=0,I&&(u.yoyoEase=I),g&&It(u,g),f=T[c],u.duration=+Je(_,i(a),c,f,T),u.delay=(+Je(v,i(a),c,f,T)||0)-a._delay,!x&&1===d&&u.delay&&(a._delay=v=u.delay,a._start+=v,u.delay=0),h.to(f,u,A?A(c,f,T):0),h._ease=Re.none;h.duration()?_=v=0:a.timeline=0}else if(b){Bt(St(h.vars.defaults,{ease:"none"})),h._ease=Oe(b.ease||n.ease||"none");var B,R,D,N=0;if(k(b))b.forEach((function(t){return h.to(T,t,">")})),h.duration();else{for(p in u={},b)"ease"===p||"easeEach"===p||Ze(p,b[p],u,b.easeEach);for(p in u)for(B=u[p].sort((function(t,e){return t.t-e.t})),N=0,c=0;c<B.length;c++)(D={ease:(R=B[c]).e,duration:(R.t-(c?B[c-1].t:0))/100*_})[p]=R.v,h.to(T,D,N),N+=D.duration;h.duration()<_&&h.to({},{duration:_-h.duration()})}}_||a.duration(_=h.duration())}else a.timeline=0;return!0!==C||s||(je=i(a),l.killTweensOf(T),je=0),Ht(M,i(a),r),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(E||!_&&!b&&a._start===_t(M._time)&&U(E)&&Nt(i(a))&&"nested"!==M.data)&&(a._tTime=-1e-8,a.render(Math.max(0,-v)||0)),S&&Vt(i(a),S),a}r(e,t);var n=e.prototype;return n.render=function(t,e,n){var i,r,s,a,l,h,c,u,d,p=this._time,f=this._tDur,A=this._dur,g=t<0,m=t>f-C&&!g?f:t<C?0:t;if(A){if(m!==this._tTime||!t||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==g||this._lazy){if(i=m,u=this.timeline,this._repeat){if(a=A+this._rDelay,this._repeat<-1&&g)return this.totalTime(100*a+t,e,n);if(i=_t(m%a),m===f?(s=this._repeat,i=A):(s=~~(l=_t(m/a)))&&s===l?(i=A,s--):i>A&&(i=A),(h=this._yoyo&&1&s)&&(d=this._yEase,i=A-i),l=Ft(this._tTime,a),i===p&&!n&&this._initted&&s===l)return this._tTime=m,this;s!==l&&(u&&this._yEase&&Ne(u,h),this.vars.repeatRefresh&&!h&&!this._lock&&i!==a&&this._initted&&(this._lock=n=1,this.render(_t(a*s),!0).invalidate()._lock=0))}if(!this._initted){if(jt(this,g?t:i,n,e,m))return this._tTime=0,this;if(!(p===this._time||n&&this.vars.repeatRefresh&&s!==l))return this;if(A!==this._dur)return this.render(t,e,n)}if(this._tTime=m,this._time=i,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=c=(d||this._ease)(i/A),this._from&&(this.ratio=c=1-c),!p&&m&&!e&&!l&&(ge(this,"onStart"),this._tTime!==m))return this;for(r=this._pt;r;)r.r(c,r.d),r=r._next;u&&u.render(t<0?t:u._dur*u._ease(i/this._dur),e,n)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(g&&Ut(this,t,0,n),ge(this,"onUpdate")),this._repeat&&s!==l&&this.vars.onRepeat&&!e&&this.parent&&ge(this,"onRepeat"),m!==this._tDur&&m||this._tTime!==m||(g&&!this._onUpdate&&Ut(this,t,0,!0),(t||!A)&&(m===this._tDur&&this._ts>0||!m&&this._ts<0)&&Dt(this,1),e||g&&!p||!(m||p||h)||(ge(this,m===f?"onComplete":"onReverseComplete",!0),this._prom&&!(m<f&&this.timeScale()>0)&&this._prom()))}}else!function(t,e,n,i){var r,s,a,l=t.ratio,h=e<0||!e&&(!t._start&&Wt(t)&&(t._initted||!qt(t))||(t._ts<0||t._dp._ts<0)&&!qt(t))?0:1,c=t._rDelay,u=0;if(c&&t._repeat&&(u=te(0,t._tDur,e),s=Ft(u,c),t._yoyo&&1&s&&(h=1-h),s!==Ft(t._tTime,c)&&(l=1-h,t.vars.repeatRefresh&&t._initted&&t.invalidate())),h!==l||o||i||t._zTime===C||!e&&t._zTime){if(!t._initted&&jt(t,e,i,n,u))return;for(a=t._zTime,t._zTime=e||(n?C:0),n||(n=e&&!a),t.ratio=h,t._from&&(h=1-h),t._time=0,t._tTime=u,r=t._pt;r;)r.r(h,r.d),r=r._next;e<0&&Ut(t,e,0,!0),t._onUpdate&&!n&&ge(t,"onUpdate"),u&&t._repeat&&!n&&t.parent&&ge(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===h&&(h&&Dt(t,1),n||o||(ge(t,h?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,n);return this},n.targets=function(){return this._targets},n.invalidate=function(e){return(!e||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(e),t.prototype.invalidate.call(this,e)},n.resetTo=function(t,e,n,i,r){A||Te.wake(),this._ts||this.play();var s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ke(this,s),function(t,e,n,i,r,s,o,a){var l,h,c,u,d=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!d)for(d=t._ptCache[e]=[],c=t._ptLookup,u=t._targets.length;u--;){if((l=c[u][e])&&l.d&&l.d._pt)for(l=l.d._pt;l&&l.p!==e&&l.fp!==e;)l=l._next;if(!l)return We=1,t.vars[e]="+=0",Ke(t,o),We=0,a?$(e+" not eligible for reset"):1;d.push(l)}for(u=d.length;u--;)(l=(h=d[u])._pt||h).s=!i&&0!==i||r?l.s+(i||0)+s*l.c:i,l.c=n-l.s,h.e&&(h.e=mt(n)+ee(h.e)),h.b&&(h.b=l.s+ee(h.b))}(this,t,e,n,i,this._ease(s/this._dur),s,r)?this.resetTo(t,e,n,i,1):(zt(this,0),this.parent||Rt(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?me(this):this.scrollTrigger&&this.scrollTrigger.kill(!!o),this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,je&&!0!==je.vars.overwrite)._first||me(this),this.parent&&n!==this.timeline.totalDuration()&&Xt(this,this._dur*this.timeline._tDur/n,0,1),this}var i,r,s,a,l,h,c,u=this._targets,d=t?se(t):u,p=this._ptLookup,f=this._pt;if((!e||"all"===e)&&function(t,e){for(var n=t.length,i=n===e.length;i&&n--&&t[n]===e[n];);return n<0}(u,d))return"all"===e&&(this._pt=0),me(this);for(i=this._op=this._op||[],"all"!==e&&(B(e)&&(l={},gt(e,(function(t){return l[t]=1})),e=l),e=function(t,e){var n,i,r,s,o=t[0]?ft(t[0]).harness:0,a=o&&o.aliases;if(!a)return e;for(i in n=It({},e),a)if(i in n)for(r=(s=a[i].split(",")).length;r--;)n[s[r]]=n[i];return n}(u,e)),c=u.length;c--;)if(~d.indexOf(u[c]))for(l in r=p[c],"all"===e?(i[c]=e,a=r,s={}):(s=i[c]=i[c]||{},a=e),a)(h=r&&r[l])&&("kill"in h.d&&!0!==h.d.kill(l)||Pt(this,h,"_pt"),delete r[l]),"all"!==s&&(s[l]=1);return this._initted&&!this._pt&&f&&me(this),this},e.to=function(t,n){return new e(t,n,arguments[2])},e.from=function(t,e){return Jt(1,arguments)},e.delayedCall=function(t,n,i,r){return new e(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:n,onReverseComplete:n,onCompleteParams:i,onReverseCompleteParams:i,callbackScope:r})},e.fromTo=function(t,e,n){return Jt(2,arguments)},e.set=function(t,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new e(t,n)},e.killTweensOf=function(t,e,n){return l.killTweensOf(t,e,n)},e}(He);St(en.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),gt("staggerTo,staggerFrom,staggerFromTo",(function(t){en[t]=function(){var e=new Ve,n=ne.call(arguments,0);return n.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,n)}}));var nn=function(t,e,n){return t[e]=n},rn=function(t,e,n){return t[e](n)},sn=function(t,e,n,i){return t[e](i.fp,n)},on=function(t,e,n){return t.setAttribute(e,n)},an=function(t,e){return R(t[e])?rn:D(t[e])&&t.setAttribute?on:nn},ln=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},hn=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},cn=function(t,e){var n=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;n;)i=n.p+(n.m?n.m(n.s+n.c*t):Math.round(1e4*(n.s+n.c*t))/1e4)+i,n=n._next;i+=e.c}e.set(e.t,e.p,i,e)},un=function(t,e){for(var n=e._pt;n;)n.r(t,n.d),n=n._next},dn=function(t,e,n,i){for(var r,s=this._pt;s;)r=s._next,s.p===i&&s.modifier(t,e,n),s=r},pn=function(t){for(var e,n,i=this._pt;i;)n=i._next,i.p===t&&!i.op||i.op===t?Pt(this,i,"_pt"):i.dep||(e=1),i=n;return!e},fn=function(t,e,n,i){i.mSet(t,e,i.m.call(i.tween,n,i.mt),i)},An=function(t){for(var e,n,i,r,s=t._pt;s;){for(e=s._next,n=i;n&&n.pr>s.pr;)n=n._next;(s._prev=n?n._prev:r)?s._prev._next=s:i=s,(s._next=n)?n._prev=s:r=s,s=e}t._pt=i},gn=function(){function t(t,e,n,i,r,s,o,a,l){this.t=e,this.s=i,this.c=r,this.p=n,this.r=s||ln,this.d=o||this,this.set=a||nn,this.pr=l||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,n){this.mSet=this.mSet||this.set,this.set=fn,this.m=t,this.mt=n,this.tween=e},t}();gt(dt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(t){return st[t]=1})),Y.TweenMax=Y.TweenLite=en,Y.TimelineLite=Y.TimelineMax=Ve,l=new Ve({sortChildren:!1,defaults:E,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),y.stringFilter=Me;var mn=[],_n={},vn=[],yn=0,En=0,xn=function(t){return(_n[t]||vn).map((function(t){return t()}))},Cn=function(){var t=Date.now(),e=[];t-yn>2&&(xn("matchMediaInit"),mn.forEach((function(t){var n,i,r,s,o=t.queries,a=t.conditions;for(i in o)(n=h.matchMedia(o[i]).matches)&&(r=1),n!==a[i]&&(a[i]=n,s=1);s&&(t.revert(),r&&e.push(t))})),xn("matchMediaRevert"),e.forEach((function(t){return t.onMatch(t,(function(e){return t.add(null,e)}))})),yn=t,xn("matchMedia"))},bn=function(){function t(t,e){this.selector=e&&oe(e),this.data=[],this._r=[],this.isReverted=!1,this.id=En++,t&&this.add(t)}var e=t.prototype;return e.add=function(t,e,n){R(t)&&(n=e,e=t,t=R);var i=this,r=function(){var t,r=a,s=i.selector;return r&&r!==i&&r.data.push(i),n&&(i.selector=oe(n)),a=i,t=e.apply(i,arguments),R(t)&&i._r.push(t),a=r,i.selector=s,i.isReverted=!1,t};return i.last=r,t===R?r(i,(function(t){return i.add(null,t)})):t?i[t]=r:r},e.ignore=function(t){var e=a;a=null,t(this),a=e},e.getTweens=function(){var e=[];return this.data.forEach((function(n){return n instanceof t?e.push.apply(e,n.getTweens()):n instanceof en&&!(n.parent&&"nested"===n.parent.data)&&e.push(n)})),e},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(t,e){var n=this;if(t?function(){for(var e,i=n.getTweens(),r=n.data.length;r--;)"isFlip"===(e=n.data[r]).data&&(e.revert(),e.getChildren(!0,!0,!1).forEach((function(t){return i.splice(i.indexOf(t),1)})));for(i.map((function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t}})).sort((function(t,e){return e.g-t.g||-1/0})).forEach((function(e){return e.t.revert(t)})),r=n.data.length;r--;)(e=n.data[r])instanceof Ve?"nested"!==e.data&&(e.scrollTrigger&&e.scrollTrigger.revert(),e.kill()):!(e instanceof en)&&e.revert&&e.revert(t);n._r.forEach((function(e){return e(t,n)})),n.isReverted=!0}():this.data.forEach((function(t){return t.kill&&t.kill()})),this.clear(),e)for(var i=mn.length;i--;)mn[i].id===this.id&&mn.splice(i,1)},e.revert=function(t){this.kill(t||{})},t}(),wn=function(){function t(t){this.contexts=[],this.scope=t,a&&a.data.push(this)}var e=t.prototype;return e.add=function(t,e,n){L(t)||(t={matches:t});var i,r,s,o=new bn(0,n||this.scope),l=o.conditions={};for(r in a&&!o.selector&&(o.selector=a.selector),this.contexts.push(o),e=o.add("onMatch",e),o.queries=t,t)"all"===r?s=1:(i=h.matchMedia(t[r]))&&(mn.indexOf(o)<0&&mn.push(o),(l[r]=i.matches)&&(s=1),i.addListener?i.addListener(Cn):i.addEventListener("change",Cn));return s&&e(o,(function(t){return o.add(null,t)})),this},e.revert=function(t){this.kill(t||{})},e.kill=function(t){this.contexts.forEach((function(e){return e.kill(t,!0)}))},t}(),Sn={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach((function(t){return ve(t)}))},timeline:function(t){return new Ve(t)},getTweensOf:function(t,e){return l.getTweensOf(t,e)},getProperty:function(t,e,n,i){B(t)&&(t=se(t)[0]);var r=ft(t||{}).get,s=n?wt:bt;return"native"===n&&(n=""),t?e?s((lt[e]&&lt[e].get||r)(t,e,n,i)):function(e,n,i){return s((lt[e]&&lt[e].get||r)(t,e,n,i))}:t},quickSetter:function(t,e,n){if((t=se(t)).length>1){var i=t.map((function(t){return Tn.quickSetter(t,e,n)})),r=i.length;return function(t){for(var e=r;e--;)i[e](t)}}t=t[0]||{};var s=lt[e],o=ft(t),a=o.harness&&(o.harness.aliases||{})[e]||e,l=s?function(e){var i=new s;f._pt=0,i.init(t,n?e+n:e,f,0,[t]),i.render(1,i),f._pt&&un(1,f)}:o.set(t,a);return s?l:function(e){return l(t,a,n?e+n:e,o,1)}},quickTo:function(t,e,n){var i,r=Tn.to(t,St(((i={})[e]="+=0.1",i.paused=!0,i.stagger=0,i),n||{})),s=function(t,n,i){return r.resetTo(e,t,n,i)};return s.tween=r,s},isTweening:function(t){return l.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Oe(t.ease,E.ease)),Mt(E,t||{})},config:function(t){return Mt(y,t||{})},registerEffect:function(t){var e=t.name,n=t.effect,i=t.plugins,r=t.defaults,s=t.extendTimeline;(i||"").split(",").forEach((function(t){return t&&!lt[t]&&!Y[t]&&$(e+" effect requires "+t+" plugin.")})),ht[e]=function(t,e,i){return n(se(t),St(e||{},r),i)},s&&(Ve.prototype[e]=function(t,n,i){return this.add(ht[e](t,L(n)?n:(i=n)&&{},this),i)})},registerEase:function(t,e){Re[t]=Oe(e)},parseEase:function(t,e){return arguments.length?Oe(t,e):Re},getById:function(t){return l.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var n,i,r=new Ve(t);for(r.smoothChildTiming=U(t.smoothChildTiming),l.remove(r),r._dp=0,r._time=r._tTime=l._time,n=l._first;n;)i=n._next,!e&&!n._dur&&n instanceof en&&n.vars.onComplete===n._targets[0]||Ht(r,n,n._start-n._delay),n=i;return Ht(l,r,0),r},context:function(t,e){return t?new bn(t,e):a},matchMedia:function(t){return new wn(t)},matchMediaRefresh:function(){return mn.forEach((function(t){var e,n,i=t.conditions;for(n in i)i[n]&&(i[n]=!1,e=1);e&&t.revert()}))||Cn()},addEventListener:function(t,e){var n=_n[t]||(_n[t]=[]);~n.indexOf(e)||n.push(e)},removeEventListener:function(t,e){var n=_n[t],i=n&&n.indexOf(e);i>=0&&n.splice(i,1)},utils:{wrap:function t(e,n,i){var r=n-e;return k(e)?de(e,t(0,e.length),n):$t(i,(function(t){return(r+(t-e)%r)%r+e}))},wrapYoyo:function t(e,n,i){var r=n-e,s=2*r;return k(e)?de(e,t(0,e.length-1),n):$t(i,(function(t){return e+((t=(s+(t-e)%s)%s||0)>r?s-t:t)}))},distribute:le,random:ue,snap:ce,normalize:function(t,e,n){return fe(t,e,0,1,n)},getUnit:ee,clamp:function(t,e,n){return $t(n,(function(n){return te(t,e,n)}))},splitColor:Ce,toArray:se,selector:oe,mapRange:fe,pipe:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return e.reduce((function(t,e){return e(t)}),t)}},unitize:function(t,e){return function(n){return t(parseFloat(n))+(e||ee(n))}},interpolate:function t(e,n,i,r){var s=isNaN(e+n)?0:function(t){return(1-t)*e+t*n};if(!s){var o,a,l,h,c,u=B(e),d={};if(!0===i&&(r=1)&&(i=null),u)e={p:e},n={p:n};else if(k(e)&&!k(n)){for(l=[],h=e.length,c=h-2,a=1;a<h;a++)l.push(t(e[a-1],e[a]));h--,s=function(t){t*=h;var e=Math.min(c,~~t);return l[e](t-e)},i=n}else r||(e=It(k(e)?[]:{},e));if(!l){for(o in n)Xe.call(d,e,o,"get",n[o]);s=function(t){return un(t,d)||(u?e.p:e)}}}return $t(i,s)},shuffle:ae},install:Z,effects:ht,ticker:Te,updateRoot:Ve.updateRoot,plugins:lt,globalTimeline:l,core:{PropTween:gn,globals:tt,Tween:en,Timeline:Ve,Animation:He,getCache:ft,_removeLinkedListItem:Pt,reverting:function(){return o},context:function(t){return t&&a&&(a.data.push(t),t._ctx=a),a},suppressOverwrites:function(t){return s=t}}};gt("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return Sn[t]=en[t]})),Te.add(Ve.updateRoot),f=Sn.to({},{duration:0});var In=function(t,e){for(var n=t._pt;n&&n.p!==e&&n.op!==e&&n.fp!==e;)n=n._next;return n},Mn=function(t,e){return{name:t,headless:1,rawVars:1,init:function(t,n,i){i._onInit=function(t){var i,r;if(B(n)&&(i={},gt(n,(function(t){return i[t]=1})),n=i),e){for(r in i={},n)i[r]=e(n[r]);n=i}!function(t,e){var n,i,r,s=t._targets;for(n in e)for(i=s.length;i--;)(r=t._ptLookup[i][n])&&(r=r.d)&&(r._pt&&(r=In(r,n)),r&&r.modifier&&r.modifier(e[n],t,s[i],n))}(t,n)}}}},Tn=Sn.registerPlugin({name:"attr",init:function(t,e,n,i,r){var s,o,a;for(s in this.tween=n,e)a=t.getAttribute(s)||"",(o=this.add(t,"setAttribute",(a||0)+"",e[s],i,r,0,0,s)).op=s,o.b=a,this._props.push(s)},render:function(t,e){for(var n=e._pt;n;)o?n.set(n.t,n.p,n.b,n):n.r(t,n.d),n=n._next}},{name:"endArray",headless:1,init:function(t,e){for(var n=e.length;n--;)this.add(t,n,t[n]||0,e[n],0,0,0,0,0,1)}},Mn("roundProps",he),Mn("modifiers"),Mn("snap",ce))||Sn;en.version=Ve.version=Tn.version="3.14.2",d=1,N()&&Be();Re.Power0,Re.Power1,Re.Power2,Re.Power3,Re.Power4,Re.Linear,Re.Quad,Re.Cubic,Re.Quart,Re.Quint,Re.Strong,Re.Elastic,Re.Back,Re.SteppedEase,Re.Bounce,Re.Sine,Re.Expo,Re.Circ;var Bn,Rn,Pn,Dn,Ln,Un,Nn,On,Fn={},kn=180/Math.PI,Qn=Math.PI/180,zn=Math.atan2,Gn=/([A-Z])/g,Hn=/(left|right|width|margin|padding|x)/i,Vn=/[\s,\(]\S/,jn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Wn=function(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},qn=function(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},Xn=function(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)},Yn=function(t,e){return e.set(e.t,e.p,1===t?e.e:t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)},Kn=function(t,e){var n=e.s+e.c*t;e.set(e.t,e.p,~~(n+(n<0?-.5:.5))+e.u,e)},Zn=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},Jn=function(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)},$n=function(t,e,n){return t.style[e]=n},ti=function(t,e,n){return t.style.setProperty(e,n)},ei=function(t,e,n){return t._gsap[e]=n},ni=function(t,e,n){return t._gsap.scaleX=t._gsap.scaleY=n},ii=function(t,e,n,i,r){var s=t._gsap;s.scaleX=s.scaleY=n,s.renderTransform(r,s)},ri=function(t,e,n,i,r){var s=t._gsap;s[e]=n,s.renderTransform(r,s)},si="transform",oi=si+"Origin",ai=function t(e,n){var i=this,r=this.target,s=r.style,o=r._gsap;if(e in Fn&&s){if(this.tfm=this.tfm||{},"transform"===e)return jn.transform.split(",").forEach((function(e){return t.call(i,e,n)}));if(~(e=jn[e]||e).indexOf(",")?e.split(",").forEach((function(t){return i.tfm[t]=wi(r,t)})):this.tfm[e]=o.x?o[e]:wi(r,e),e===oi&&(this.tfm.zOrigin=o.zOrigin),this.props.indexOf(si)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(oi,n,"")),e=si}(s||n)&&this.props.push(e,n,s[e])},li=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},hi=function(){var t,e,n=this.props,i=this.target,r=i.style,s=i._gsap;for(t=0;t<n.length;t+=3)n[t+1]?2===n[t+1]?i[n[t]](n[t+2]):i[n[t]]=n[t+2]:n[t+2]?r[n[t]]=n[t+2]:r.removeProperty("--"===n[t].substr(0,2)?n[t]:n[t].replace(Gn,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)s[e]=this.tfm[e];s.svg&&(s.renderTransform(),i.setAttribute("data-svg-origin",this.svgo||"")),(t=Nn())&&t.isStart||r[si]||(li(r),s.zOrigin&&r[oi]&&(r[oi]+=" "+s.zOrigin+"px",s.zOrigin=0,s.renderTransform()),s.uncache=1)}},ci=function(t,e){var n={target:t,props:[],revert:hi,save:ai};return t._gsap||Tn.core.getCache(t),e&&t.style&&t.nodeType&&e.split(",").forEach((function(t){return n.save(t)})),n},ui=function(t,e){var n=Rn.createElementNS?Rn.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Rn.createElement(t);return n&&n.style?n:Rn.createElement(t)},di=function t(e,n,i){var r=getComputedStyle(e);return r[n]||r.getPropertyValue(n.replace(Gn,"-$1").toLowerCase())||r.getPropertyValue(n)||!i&&t(e,fi(n)||n,1)||""},pi="O,Moz,ms,Ms,Webkit".split(","),fi=function(t,e,n){var i=(e||Ln).style,r=5;if(t in i&&!n)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);r--&&!(pi[r]+t in i););return r<0?null:(3===r?"ms":r>=0?pi[r]:"")+t},Ai=function(){"undefined"!=typeof window&&window.document&&(Bn=window,Rn=Bn.document,Pn=Rn.documentElement,Ln=ui("div")||{style:{}},ui("div"),si=fi(si),oi=si+"Origin",Ln.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",On=!!fi("perspective"),Nn=Tn.core.reverting,Dn=1)},gi=function(t){var e,n=t.ownerSVGElement,i=ui("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=t.cloneNode(!0);r.style.display="block",i.appendChild(r),Pn.appendChild(i);try{e=r.getBBox()}catch(t){}return i.removeChild(r),Pn.removeChild(i),e},mi=function(t,e){for(var n=e.length;n--;)if(t.hasAttribute(e[n]))return t.getAttribute(e[n])},_i=function(t){var e,n;try{e=t.getBBox()}catch(i){e=gi(t),n=1}return e&&(e.width||e.height)||n||(e=gi(t)),!e||e.width||e.x||e.y?e:{x:+mi(t,["x","cx","x1"])||0,y:+mi(t,["y","cy","y1"])||0,width:0,height:0}},vi=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!_i(t))},yi=function(t,e){if(e){var n,i=t.style;e in Fn&&e!==oi&&(e=si),i.removeProperty?("ms"!==(n=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),i.removeProperty("--"===n?e:e.replace(Gn,"-$1").toLowerCase())):i.removeAttribute(e)}},Ei=function(t,e,n,i,r,s){var o=new gn(t._pt,e,n,0,1,s?Jn:Zn);return t._pt=o,o.b=i,o.e=r,t._props.push(n),o},xi={deg:1,rad:1,turn:1},Ci={grid:1,flex:1},bi=function t(e,n,i,r){var s,o,a,l,h=parseFloat(i)||0,c=(i+"").trim().substr((h+"").length)||"px",u=Ln.style,d=Hn.test(n),p="svg"===e.tagName.toLowerCase(),f=(p?"client":"offset")+(d?"Width":"Height"),A=100,g="px"===r,m="%"===r;if(r===c||!h||xi[r]||xi[c])return h;if("px"!==c&&!g&&(h=t(e,n,i,"px")),l=e.getCTM&&vi(e),(m||"%"===c)&&(Fn[n]||~n.indexOf("adius")))return s=l?e.getBBox()[d?"width":"height"]:e[f],mt(m?h/s*A:h/100*s);if(u[d?"width":"height"]=A+(g?c:r),o="rem"!==r&&~n.indexOf("adius")||"em"===r&&e.appendChild&&!p?e:e.parentNode,l&&(o=(e.ownerSVGElement||{}).parentNode),o&&o!==Rn&&o.appendChild||(o=Rn.body),(a=o._gsap)&&m&&a.width&&d&&a.time===Te.time&&!a.uncache)return mt(h/a.width*A);if(!m||"height"!==n&&"width"!==n)(m||"%"===c)&&!Ci[di(o,"display")]&&(u.position=di(e,"position")),o===e&&(u.position="static"),o.appendChild(Ln),s=Ln[f],o.removeChild(Ln),u.position="absolute";else{var _=e.style[n];e.style[n]=A+r,s=e[f],_?e.style[n]=_:yi(e,n)}return d&&m&&((a=ft(o)).time=Te.time,a.width=o[f]),mt(g?s*h/A:s&&h?A/s*h:0)},wi=function(t,e,n,i){var r;return Dn||Ai(),e in jn&&"transform"!==e&&~(e=jn[e]).indexOf(",")&&(e=e.split(",")[0]),Fn[e]&&"transform"!==e?(r=Ni(t,i),r="transformOrigin"!==e?r[e]:r.svg?r.origin:Oi(di(t,oi))+" "+r.zOrigin+"px"):(!(r=t.style[e])||"auto"===r||i||~(r+"").indexOf("calc("))&&(r=Ti[e]&&Ti[e](t,e,n)||di(t,e)||At(t,e)||("op
2acity"===e?1:0)),n&&!~(r+"").trim().indexOf(" ")?bi(t,e,r,n)+n:r},Si=function(t,e,n,i){if(!n||"none"===n){var r=fi(e,t,1),s=r&&di(t,r,1);s&&s!==n?(e=r,n=s):"borderColor"===e&&(n=di(t,"borderTopColor"))}var o,a,l,h,c,u,d,p,f,A,g,m=new gn(this._pt,t.style,e,0,1,cn),_=0,v=0;if(m.b=n,m.e=i,n+="","var(--"===(i+="").substring(0,6)&&(i=di(t,i.substring(4,i.indexOf(")")))),"auto"===i&&(u=t.style[e],t.style[e]=i,i=di(t,e)||i,u?t.style[e]=u:yi(t,e)),Me(o=[n,i]),i=o[1],l=(n=o[0]).match(V)||[],(i.match(V)||[]).length){for(;a=V.exec(i);)d=a[0],f=i.substring(_,a.index),c?c=(c+1)%5:"rgba("!==f.substr(-5)&&"hsla("!==f.substr(-5)||(c=1),d!==(u=l[v++]||"")&&(h=parseFloat(u)||0,g=u.substr((h+"").length),"="===d.charAt(1)&&(d=vt(h,d)+g),p=parseFloat(d),A=d.substr((p+"").length),_=V.lastIndex-A.length,A||(A=A||y.units[e]||g,_===i.length&&(i+=A,m.e+=A)),g!==A&&(h=bi(t,e,u,A)||0),m._pt={_next:m._pt,p:f||1===v?f:",",s:h,c:p-h,m:c&&c<4||"zIndex"===e?Math.round:0});m.c=_<i.length?i.substring(_,i.length):""}else m.r="display"===e&&"none"===i?Jn:Zn;return W.test(i)&&(m.e=0),this._pt=m,m},Ii={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Mi=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var n,i,r,s=e.t,o=s.style,a=e.u,l=s._gsap;if("all"===a||!0===a)o.cssText="",i=1;else for(r=(a=a.split(",")).length;--r>-1;)n=a[r],Fn[n]&&(i=1,n="transformOrigin"===n?oi:si),yi(s,n);i&&(yi(s,si),l&&(l.svg&&s.removeAttribute("transform"),o.scale=o.rotate=o.translate="none",Ni(s,1),l.uncache=1,li(o)))}},Ti={clearProps:function(t,e,n,i,r){if("isFromStart"!==r.data){var s=t._pt=new gn(t._pt,e,n,0,0,Mi);return s.u=i,s.pr=-10,s.tween=r,t._props.push(n),1}}},Bi=[1,0,0,1,0,0],Ri={},Pi=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},Di=function(t){var e=di(t,si);return Pi(e)?Bi:e.substr(7).match(H).map(mt)},Li=function(t,e){var n,i,r,s,o=t._gsap||ft(t),a=t.style,l=Di(t);return o.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(l=[(r=t.transform.baseVal.consolidate().matrix).a,r.b,r.c,r.d,r.e,r.f]).join(",")?Bi:l:(l!==Bi||t.offsetParent||t===Pn||o.svg||(r=a.display,a.display="block",(n=t.parentNode)&&(t.offsetParent||t.getBoundingClientRect().width)||(s=1,i=t.nextElementSibling,Pn.appendChild(t)),l=Di(t),r?a.display=r:yi(t,"display"),s&&(i?n.insertBefore(t,i):n?n.appendChild(t):Pn.removeChild(t))),e&&l.length>6?[l[0],l[1],l[4],l[5],l[12],l[13]]:l)},Ui=function(t,e,n,i,r,s){var o,a,l,h=t._gsap,c=r||Li(t,!0),u=h.xOrigin||0,d=h.yOrigin||0,p=h.xOffset||0,f=h.yOffset||0,A=c[0],g=c[1],m=c[2],_=c[3],v=c[4],y=c[5],E=e.split(" "),x=parseFloat(E[0])||0,C=parseFloat(E[1])||0;n?c!==Bi&&(a=A*_-g*m)&&(l=x*(-g/a)+C*(A/a)-(A*y-g*v)/a,x=x*(_/a)+C*(-m/a)+(m*y-_*v)/a,C=l):(x=(o=_i(t)).x+(~E[0].indexOf("%")?x/100*o.width:x),C=o.y+(~(E[1]||E[0]).indexOf("%")?C/100*o.height:C)),i||!1!==i&&h.smooth?(v=x-u,y=C-d,h.xOffset=p+(v*A+y*m)-v,h.yOffset=f+(v*g+y*_)-y):h.xOffset=h.yOffset=0,h.xOrigin=x,h.yOrigin=C,h.smooth=!!i,h.origin=e,h.originIsAbsolute=!!n,t.style[oi]="0px 0px",s&&(Ei(s,h,"xOrigin",u,x),Ei(s,h,"yOrigin",d,C),Ei(s,h,"xOffset",p,h.xOffset),Ei(s,h,"yOffset",f,h.yOffset)),t.setAttribute("data-svg-origin",x+" "+C)},Ni=function(t,e){var n=t._gsap||new Ge(t);if("x"in n&&!e&&!n.uncache)return n;var i,r,s,o,a,l,h,c,u,d,p,f,A,g,m,_,v,E,x,C,b,w,S,I,M,T,B,R,P,D,L,U,N=t.style,O=n.scaleX<0,F="px",k="deg",Q=getComputedStyle(t),z=di(t,oi)||"0";return i=r=s=l=h=c=u=d=p=0,o=a=1,n.svg=!(!t.getCTM||!vi(t)),Q.translate&&("none"===Q.translate&&"none"===Q.scale&&"none"===Q.rotate||(N[si]=("none"!==Q.translate?"translate3d("+(Q.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==Q.rotate?"rotate("+Q.rotate+") ":"")+("none"!==Q.scale?"scale("+Q.scale.split(" ").join(",")+") ":"")+("none"!==Q[si]?Q[si]:"")),N.scale=N.rotate=N.translate="none"),g=Li(t,n.svg),n.svg&&(n.uncache?(M=t.getBBox(),z=n.xOrigin-M.x+"px "+(n.yOrigin-M.y)+"px",I=""):I=!e&&t.getAttribute("data-svg-origin"),Ui(t,I||z,!!I||n.originIsAbsolute,!1!==n.smooth,g)),f=n.xOrigin||0,A=n.yOrigin||0,g!==Bi&&(E=g[0],x=g[1],C=g[2],b=g[3],i=w=g[4],r=S=g[5],6===g.length?(o=Math.sqrt(E*E+x*x),a=Math.sqrt(b*b+C*C),l=E||x?zn(x,E)*kn:0,(u=C||b?zn(C,b)*kn+l:0)&&(a*=Math.abs(Math.cos(u*Qn))),n.svg&&(i-=f-(f*E+A*C),r-=A-(f*x+A*b))):(U=g[6],D=g[7],B=g[8],R=g[9],P=g[10],L=g[11],i=g[12],r=g[13],s=g[14],h=(m=zn(U,P))*kn,m&&(I=w*(_=Math.cos(-m))+B*(v=Math.sin(-m)),M=S*_+R*v,T=U*_+P*v,B=w*-v+B*_,R=S*-v+R*_,P=U*-v+P*_,L=D*-v+L*_,w=I,S=M,U=T),c=(m=zn(-C,P))*kn,m&&(_=Math.cos(-m),L=b*(v=Math.sin(-m))+L*_,E=I=E*_-B*v,x=M=x*_-R*v,C=T=C*_-P*v),l=(m=zn(x,E))*kn,m&&(I=E*(_=Math.cos(m))+x*(v=Math.sin(m)),M=w*_+S*v,x=x*_-E*v,S=S*_-w*v,E=I,w=M),h&&Math.abs(h)+Math.abs(l)>359.9&&(h=l=0,c=180-c),o=mt(Math.sqrt(E*E+x*x+C*C)),a=mt(Math.sqrt(S*S+U*U)),m=zn(w,S),u=Math.abs(m)>2e-4?m*kn:0,p=L?1/(L<0?-L:L):0),n.svg&&(I=t.getAttribute("transform"),n.forceCSS=t.setAttribute("transform","")||!Pi(di(t,si)),I&&t.setAttribute("transform",I))),Math.abs(u)>90&&Math.abs(u)<270&&(O?(o*=-1,u+=l<=0?180:-180,l+=l<=0?180:-180):(a*=-1,u+=u<=0?180:-180)),e=e||n.uncache,n.x=i-((n.xPercent=i&&(!e&&n.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-i)?-50:0)))?t.offsetWidth*n.xPercent/100:0)+F,n.y=r-((n.yPercent=r&&(!e&&n.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-r)?-50:0)))?t.offsetHeight*n.yPercent/100:0)+F,n.z=s+F,n.scaleX=mt(o),n.scaleY=mt(a),n.rotation=mt(l)+k,n.rotationX=mt(h)+k,n.rotationY=mt(c)+k,n.skewX=u+k,n.skewY=d+k,n.transformPerspective=p+F,(n.zOrigin=parseFloat(z.split(" ")[2])||!e&&n.zOrigin||0)&&(N[oi]=Oi(z)),n.xOffset=n.yOffset=0,n.force3D=y.force3D,n.renderTransform=n.svg?Vi:On?Hi:ki,n.uncache=0,n},Oi=function(t){return(t=t.split(" "))[0]+" "+t[1]},Fi=function(t,e,n){var i=ee(e);return mt(parseFloat(e)+parseFloat(bi(t,"x",n+"px",i)))+i},ki=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Hi(t,e)},Qi="0deg",zi="0px",Gi=") ",Hi=function(t,e){var n=e||this,i=n.xPercent,r=n.yPercent,s=n.x,o=n.y,a=n.z,l=n.rotation,h=n.rotationY,c=n.rotationX,u=n.skewX,d=n.skewY,p=n.scaleX,f=n.scaleY,A=n.transformPerspective,g=n.force3D,m=n.target,_=n.zOrigin,v="",y="auto"===g&&t&&1!==t||!0===g;if(_&&(c!==Qi||h!==Qi)){var E,x=parseFloat(h)*Qn,C=Math.sin(x),b=Math.cos(x);x=parseFloat(c)*Qn,E=Math.cos(x),s=Fi(m,s,C*E*-_),o=Fi(m,o,-Math.sin(x)*-_),a=Fi(m,a,b*E*-_+_)}A!==zi&&(v+="perspective("+A+Gi),(i||r)&&(v+="translate("+i+"%, "+r+"%) "),(y||s!==zi||o!==zi||a!==zi)&&(v+=a!==zi||y?"translate3d("+s+", "+o+", "+a+") ":"translate("+s+", "+o+Gi),l!==Qi&&(v+="rotate("+l+Gi),h!==Qi&&(v+="rotateY("+h+Gi),c!==Qi&&(v+="rotateX("+c+Gi),u===Qi&&d===Qi||(v+="skew("+u+", "+d+Gi),1===p&&1===f||(v+="scale("+p+", "+f+Gi),m.style[si]=v||"translate(0, 0)"},Vi=function(t,e){var n,i,r,s,o,a=e||this,l=a.xPercent,h=a.yPercent,c=a.x,u=a.y,d=a.rotation,p=a.skewX,f=a.skewY,A=a.scaleX,g=a.scaleY,m=a.target,_=a.xOrigin,v=a.yOrigin,y=a.xOffset,E=a.yOffset,x=a.forceCSS,C=parseFloat(c),b=parseFloat(u);d=parseFloat(d),p=parseFloat(p),(f=parseFloat(f))&&(p+=f=parseFloat(f),d+=f),d||p?(d*=Qn,p*=Qn,n=Math.cos(d)*A,i=Math.sin(d)*A,r=Math.sin(d-p)*-g,s=Math.cos(d-p)*g,p&&(f*=Qn,o=Math.tan(p-f),r*=o=Math.sqrt(1+o*o),s*=o,f&&(o=Math.tan(f),n*=o=Math.sqrt(1+o*o),i*=o)),n=mt(n),i=mt(i),r=mt(r),s=mt(s)):(n=A,s=g,i=r=0),(C&&!~(c+"").indexOf("px")||b&&!~(u+"").indexOf("px"))&&(C=bi(m,"x",c,"px"),b=bi(m,"y",u,"px")),(_||v||y||E)&&(C=mt(C+_-(_*n+v*r)+y),b=mt(b+v-(_*i+v*s)+E)),(l||h)&&(o=m.getBBox(),C=mt(C+l/100*o.width),b=mt(b+h/100*o.height)),o="matrix("+n+","+i+","+r+","+s+","+C+","+b+")",m.setAttribute("transform",o),x&&(m.style[si]=o)},ji=function(t,e,n,i,r){var s,o,a=360,l=B(r),h=parseFloat(r)*(l&&~r.indexOf("rad")?kn:1)-i,c=i+h+"deg";return l&&("short"===(s=r.split("_")[1])&&(h%=a)!==h%180&&(h+=h<0?a:-360),"cw"===s&&h<0?h=(h+36e9)%a-~~(h/a)*a:"ccw"===s&&h>0&&(h=(h-36e9)%a-~~(h/a)*a)),t._pt=o=new gn(t._pt,e,n,i,h,qn),o.e=c,o.u="deg",t._props.push(n),o},Wi=function(t,e){for(var n in e)t[n]=e[n];return t},qi=function(t,e,n){var i,r,s,o,a,l,h,c=Wi({},n._gsap),u=n.style;for(r in c.svg?(s=n.getAttribute("transform"),n.setAttribute("transform",""),u[si]=e,i=Ni(n,1),yi(n,si),n.setAttribute("transform",s)):(s=getComputedStyle(n)[si],u[si]=e,i=Ni(n,1),u[si]=s),Fn)(s=c[r])!==(o=i[r])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(r)<0&&(a=ee(s)!==(h=ee(o))?bi(n,r,s,h):parseFloat(s),l=parseFloat(o),t._pt=new gn(t._pt,i,r,a,l-a,Wn),t._pt.u=h||0,t._props.push(r));Wi(i,c)};gt("padding,margin,Width,Radius",(function(t,e){var n="Top",i="Right",r="Bottom",s="Left",o=(e<3?[n,i,r,s]:[n+s,n+i,r+i,r+s]
vendor: 4,834 bytes, line 2
2).map((function(n){return e<2?t+n:"border"+n+t}));Ti[e>1?"border"+t:t]=function(t,e,n,i,r){var s,a;if(arguments.length<4)return s=o.map((function(e){return wi(t,e,n)})),5===(a=s.join(" ")).split(s[0]).length?s[0]:a;s=(i+"").split(" "),a={},o.forEach((function(t,e){return a[t]=s[e]=s[e]||s[(e-1)/2|0]})),t.init(e,a,r)}}));var Xi,Yi,Ki,Zi={name:"css",register:Ai,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,n,i,r){var s,o,a,l,h,c,u,d,p,f,A,g,m,_,v,E,x,C,b,w,S,I=this._props,M=t.style,T=n.vars.startAt;for(u in Dn||Ai(),this.styles=this.styles||ci(t),E=this.styles.props,this.tween=n,e)if("autoRound"!==u&&(o=e[u],!lt[u]||!Ye(u,e,n,i,t,r)))if(h=typeof o,c=Ti[u],"function"===h&&(h=typeof(o=o.call(n,i,t,r))),"string"===h&&~o.indexOf("random(")&&(o=pe(o)),c)c(this,t,u,o,n)&&(v=1);else if("--"===u.substr(0,2))s=(getComputedStyle(t).getPropertyValue(u)+"").trim(),o+="",Se.lastIndex=0,Se.test(s)||(d=ee(s),(p=ee(o))?d!==p&&(s=bi(t,u,s,p)+p):d&&(o+=d)),this.add(M,"setProperty",s,o,i,r,0,0,u),I.push(u),E.push(u,0,M[u]);else if("undefined"!==h){if(T&&u in T?(s="function"==typeof T[u]?T[u].call(n,i,t,r):T[u],B(s)&&~s.indexOf("random(")&&(s=pe(s)),ee(s+"")||"auto"===s||(s+=y.units[u]||ee(wi(t,u))||""),"="===(s+"").charAt(1)&&(s=wi(t,u))):s=wi(t,u),l=parseFloat(s),(f="string"===h&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),a=parseFloat(o),u in jn&&("autoAlpha"===u&&(1===l&&"hidden"===wi(t,"visibility")&&a&&(l=0),E.push("visibility",0,M.visibility),Ei(this,M,"visibility",l?"inherit":"hidden",a?"inherit":"hidden",!a)),"scale"!==u&&"transform"!==u&&~(u=jn[u]).indexOf(",")&&(u=u.split(",")[0])),A=u in Fn){if(this.styles.save(u),x=o,"string"===h&&"var(--"===o.substring(0,6)){if("calc("===(o=di(t,o.substring(4,o.indexOf(")")))).substring(0,5)){var R=t.style.perspective;t.style.perspective=o,o=di(t,"perspective"),R?t.style.perspective=R:yi(t,"perspective")}a=parseFloat(o)}if(g||((m=t._gsap).renderTransform&&!e.parseTransform||Ni(t,e.parseTransform),_=!1!==e.smoothOrigin&&m.smooth,(g=this._pt=new gn(this._pt,M,si,0,1,m.renderTransform,m,0,-1)).dep=1),"scale"===u)this._pt=new gn(this._pt,m,"scaleY",m.scaleY,(f?vt(m.scaleY,f+a):a)-m.scaleY||0,Wn),this._pt.u=0,I.push("scaleY",u),u+="X";else{if("transformOrigin"===u){E.push(oi,0,M[oi]),b=void 0,w=void 0,S=void 0,b=(C=o).split(" "),w=b[0],S=b[1]||"50%","top"!==w&&"bottom"!==w&&"left"!==S&&"right"!==S||(C=w,w=S,S=C),b[0]=Ii[w]||w,b[1]=Ii[S]||S,o=b.join(" "),m.svg?Ui(t,o,0,_,0,this):((p=parseFloat(o.split(" ")[2])||0)!==m.zOrigin&&Ei(this,m,"zOrigin",m.zOrigin,p),Ei(this,M,u,Oi(s),Oi(o)));continue}if("svgOrigin"===u){Ui(t,o,1,_,0,this);continue}if(u in Ri){ji(this,m,u,l,f?vt(l,f+o):o);continue}if("smoothOrigin"===u){Ei(this,m,"smooth",m.smooth,o);continue}if("force3D"===u){m[u]=o;continue}if("transform"===u){qi(this,o,t);continue}}}else u in M||(u=fi(u)||u);if(A||(a||0===a)&&(l||0===l)&&!Vn.test(o)&&u in M)a||(a=0),(d=(s+"").substr((l+"").length))!==(p=ee(o)||(u in y.units?y.units[u]:d))&&(l=bi(t,u,s,p)),this._pt=new gn(this._pt,A?m:M,u,l,(f?vt(l,f+a):a)-l,A||"px"!==p&&"zIndex"!==u||!1===e.autoRound?Wn:Kn),this._pt.u=p||0,A&&x!==o?(this._pt.b=s,this._pt.e=x,this._pt.r=Yn):d!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=Xn);else if(u in M)Si.call(this,t,u,s,f?f+o:o);else if(u in t)this.add(t,u,s||t[u],f?f+o:o,i,r);else if("parseTransform"!==u){J(u,o);continue}A||(u in M?E.push(u,0,M[u]):"function"==typeof t[u]?E.push(u,2,t[u]()):E.push(u,1,s||t[u])),I.push(u)}v&&An(this)},render:function(t,e){if(e.tween._time||!Nn())for(var n=e._pt;n;)n.r(t,n.d),n=n._next;else e.styles.revert()},get:wi,aliases:jn,getSetter:function(t,e,n){var i=jn[e];return i&&i.indexOf(",")<0&&(e=i),e in Fn&&e!==oi&&(t._gsap.x||wi(t,"x"))?n&&Un===n?"scale"===e?ni:ei:(Un=n||{})&&("scale"===e?ii:ri):t.style&&!D(t.style[e])?$n:~e.indexOf("-")?ti:an(t,e)},core:{_removeProperty:yi,_getMatrix:Li}};Tn.utils.checkPrefix=fi,Tn.core.getStyleSaver=ci,Ki=gt((Xi="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Yi="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){Fn[t]=1})),gt(Yi,(function(t){y.units[t]="deg",Ri[t]=1})),jn[Ki[13]]=Xi+","+Yi,gt("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(t){var e=t.split(":");jn[e[1]]=Ki[e[0]]})),gt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){y.units[t]="px"})),Tn.registerPlugin(Zi);var Ji=Tn.registerPlugin(Zi)||Tn;Ji.core.Tween},243:function(t,e){!function(t){"use strict";var e="1.9.4";function n(t){var e,n,i,r;for(n=1,i=arguments.length;n<i;n++)for(e in r=arguments[n])t[e]=r[e];return t}var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function r(t,e){var n=Array.prototype.slice;
vendor: 11,176 bytes, line 2
2if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var s=0;function o(t){return"_leaflet_id"in t||(t._leaflet_id=++s),t._leaflet_id}function a(t,e,n){var i,r,s,o;return o=function(){i=!1,r&&(s.apply(n,r),r=!1)},s=function(){i?r=arguments:(t.apply(n,arguments),setTimeout(o,e),i=!0)},s}function l(t,e,n){var i=e[1],r=e[0],s=i-r;return t===i&&n?t:((t-r)%s+s)%s+r}function h(){return!1}function c(t,e){if(!1===e)return t;var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return u(t).split(/\s+/)}function p(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function f(t,e,n){var i=[];for(var r in t)i.push(encodeURIComponent(n?r.toUpperCase():r)+"="+encodeURIComponent(t[r]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var A=/\{ *([\w_ -]+) *\}/g;function g(t,e){return t.replace(A,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i}))}var m=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function _(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function y(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var E=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-E));return E=e+n,window.setTimeout(t,n)}var C=window.requestAnimationFrame||y("RequestAnimationFrame")||x,b=window.cancelAnimationFrame||y("CancelAnimationFrame")||y("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function w(t,e,n){if(!n||C!==x)return C.call(window,r(t,e));t.call(e)}function S(t){t&&b.call(window,t)}var I={__proto__:null,extend:n,create:i,bind:r,get lastId(){return s},stamp:o,throttle:a,wrapNum:l,falseFn:h,formatNum:c,trim:u,splitWords:d,setOptions:p,getParamString:f,template:g,isArray:m,indexOf:_,emptyImageUrl:v,requestFn:C,cancelFn:b,requestAnimFrame:w,cancelAnimFrame:S};function M(){}function T(t){if("undefined"!=typeof L&&L&&L.Mixin){t=m(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}M.extend=function(t){var e=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},r=e.__super__=this.prototype,s=i(r);for(var o in s.constructor=e,e.prototype=s,this)Object.prototype.hasOwnProperty.call(this,o)&&"prototype"!==o&&"__super__"!==o&&(e[o]=this[o]);return t.statics&&n(e,t.statics),t.includes&&(T(t.includes),n.apply(null,[s].concat(t.includes))),n(s,t),delete s.statics,delete s.includes,s.options&&(s.options=r.options?i(r.options):{},n(s.options,t.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){r.callInitHooks&&r.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=s._initHooks.length;t<e;t++)s._initHooks[t].call(this)}},e},M.include=function(t){var e=this.prototype.options;return n(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},M.mergeOptions=function(t){return n(this.prototype.options,t),this},M.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var B={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var r=0,s=(t=d(t)).length;r<s;r++)this._on(t[r],e,n);return this},off:function(t,e,n){if(arguments.length)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else{t=d(t);for(var r=1===arguments.length,s=0,o=t.length;s<o;s++)r?this._off(t[s]):this._off(t[s],e,n)}else delete this._events;return this},_on:function(t,e,n,i){if("function"==typeof e){if(!1===this._listens(t,e,n)){n===this&&(n=void 0);var r={fn:e,ctx:n};i&&(r.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(r)}}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,n){var i,r,s;if(this._events&&(i=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var o=this._listens(t,e,n);if(!1!==o){var a=i[o];this._firingCount&&(a.fn=h,this._events[t]=i=i.slice()),i.splice(o,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)for(r=0,s=i.length;r<s;r++)i[r].fn=h;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var r=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var o=0,a=s.length;o<a;o++){var l=s[o],h=l.fn;l.once&&this.off(t,h,l.ctx),h.call(l.ctx||this,r)}this._firingCount--}}return i&&this._propagateEvent(r),this},listens:function(t,e,n,i){"string"!=typeof t&&console.warn('"string" type argument expected');var r=e;"function"!=typeof e&&(i=!!e,r=void 0,n=void 0);var s=this._events&&this._events[t];if(s&&s.length&&!1!==this._listens(t,r,n))return!0;if(i)for(var o in this._eventParents)if(this._eventParents[o].listens(t,e,n,i))return!0;return!1},_listens:function(t,e,n){if(!this._events)return!1;var i=this._events[t]||[];if(!e)return!!i.length;n===this&&(n=void 0);for(var r=0,s=i.length;r<s;r++)if(i[r].fn===e&&i[r].ctx===n)return r;return!1},once:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e,!0);else for(var r=0,s=(t=d(t)).length;r<s;r++)this._on(t[r],e,n,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[o(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[o(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};B.addEventListener=B.on,B.removeEventListener=B.clearAllEventListeners=B.off,B.addOneTimeEventListener=B.once,B.fireEvent=B.fire,B.hasEventListeners=B.listens;var R=M.extend(B);function P(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var D=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function U(t,e,n){return t instanceof P?t:m(t)?new P(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new P(t.x,t.y):new P(t,e,n)}function N(t,e){if(t)for(var n=e?[t,e]:t,i=0,r=n.length;i<r;i++)this.extend(n[i])}function O(t,e){return!t||t instanceof N?t:new N(t,e)}function F(t,e){if(t)for(var n=e?[t,e]:t,i=0,r=n.length;i<r;i++)this.extend(n[i])}function k(t,e){return t instanceof F?t:new F(t,e)}function Q(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function z(t,e,n){return t instanceof Q?t:m(t)&&"object"!=typeof t[0]?3===t.length?new Q(t[0],t[1],t[2]):2===t.length?new Q(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new Q(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new Q(t,e,n)}P.prototype={clone:function(){return new P(this.x,this.y)},add:function(t){return this.clone()._add(U(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(U(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new P(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new P(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=D(this.x),this.y=D(this.y),this},distanceTo:function(t){var e=(t=U(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=U(t)).x===this.x&&t.y===this.y},contains:function(t){return t=U(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},N.prototype={extend:function(t){var e,n;if(!t)return this;if(t instanceof P||"number"==typeof t[0]||"x"in t)e=n=U(t);else if(e=(t=O(t)).min,n=t.max,!e||!n)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=e.clone(),this.max=n.clone()),this},getCenter:function(t){return U((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return U(this.min.x,this.max.y)},getTopRight:function(){return U(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof P?U(t):O(t))instanceof N?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=O(t);var e=this.min,n=this.max,i=t.min,r=t.max,s=r.x>=e.x&&i.x<=n.x,o=r.y>=e.y&&i.y<=n.y;return s&&o},overlaps:function(t){t=O(t);var e=this.min,n=this.max,i=t.min,r=t.max,s=r.x>e.x&&i.x<n.x,o=r.y>e.y&&i.y<n.y;return s&&o},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,n=this.max,i=Math.abs(e.x-n.x)*t,r=Math.abs(e.y-n.y)*t;return O(U(e.x-i,e.y-r),U(n.x+i,n.y+r))},equals:function(t){return!!t&&(t=O(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},F.prototype={extend:function(t){var e,n,i=this._southWest,r=this._northEast;if(t instanceof Q)e=t,n=t;else{if(!(t instanceof F))return t?this.extend(z(t)||k(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||r?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),r.lat=Math.max(n.lat,r.lat),r.lng=Math.max(n.lng,r.lng)):(this._southWest=new Q(e.lat,e.lng),this._northEast=new Q(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,r=Math.abs(e.lng-n.lng)*t;return new F(new Q(e.lat-i,e.lng-r),new Q(n.lat+i,n.lng+r))},getCenter:function(){return new Q((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new Q(this.getNorth(),this.getWest())},getSouthEast:function(){return new Q(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat}
vendor: 2,435 bytes, line 2
2,getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof Q||"lat"in t?z(t):k(t);var e,n,i=this._southWest,r=this._northEast;return t instanceof F?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=r.lat&&e.lng>=i.lng&&n.lng<=r.lng},intersects:function(t){t=k(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=t.getNorthEast(),s=r.lat>=e.lat&&i.lat<=n.lat,o=r.lng>=e.lng&&i.lng<=n.lng;return s&&o},overlaps:function(t){t=k(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=t.getNorthEast(),s=r.lat>e.lat&&i.lat<n.lat,o=r.lng>e.lng&&i.lng<n.lng;return s&&o},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=k(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},Q.prototype={equals:function(t,e){return!!t&&(t=z(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return V.distance(this,z(t))},wrap:function(){return V.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return k([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new Q(this.lat,this.lng,this.alt)}};var G,H={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new N(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new Q(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,r=e.lng-n.lng;if(0===i&&0===r)return t;
vendor: 8,739 bytes, line 2
2var s=t.getSouthWest(),o=t.getNorthEast();return new F(new Q(s.lat-i,s.lng-r),new Q(o.lat-i,o.lng-r))}},V=n({},H,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,r=e.lat*n,s=Math.sin((e.lat-t.lat)*n/2),o=Math.sin((e.lng-t.lng)*n/2),a=s*s+Math.cos(i)*Math.cos(r)*o*o,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),j=6378137,W={R:j,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),r=Math.sin(i*e);return new P(this.R*t.lng*e,this.R*Math.log((1+r)/(1-r))/2)},unproject:function(t){var e=180/Math.PI;return new Q((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(G=j*Math.PI,new N([-G,-G],[G,G]))};function q(t,e,n,i){if(m(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function X(t,e,n,i){return new q(t,e,n,i)}q.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new P((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var Y=n({},V,{code:"EPSG:3857",projection:W,transformation:function(){var t=.5/(Math.PI*W.R);return X(t,.5,-t,.5)}()}),K=n({},Y,{code:"EPSG:900913"});function Z(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function J(t,e){var n,i,r,s,o,a,l="";for(n=0,r=t.length;n<r;n++){for(i=0,s=(o=t[n]).length;i<s;i++)l+=(i?"L":"M")+(a=o[i]).x+" "+a.y;l+=e?Ft.svg?"z":"x":""}return l||"M0 0"}var $,tt=document.documentElement.style,et="ActiveXObject"in window,nt=et&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),rt=Ot("webkit"),st=Ot("android"),ot=Ot("android 2")||Ot("android 3"),at=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=st&&Ot("Google")&&at<537&&!("AudioNode"in window),ht=!!window.opera,ct=!it&&Ot("chrome"),ut=Ot("gecko")&&!rt&&!ht&&!et,dt=!ct&&Ot("safari"),pt=Ot("phantom"),ft="OTransition"in tt,At=0===navigator.platform.indexOf("Win"),gt=et&&"transition"in tt,mt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!ot,_t="MozPerspective"in tt,vt=!window.L_DISABLE_3D&&(gt||mt||_t)&&!ft&&!pt,yt="undefined"!=typeof orientation||Ot("mobile"),Et=yt&&rt,xt=yt&&mt,Ct=!window.PointerEvent&&window.MSPointerEvent,bt=!(!window.PointerEvent&&!Ct),wt="ontouchstart"in window||!!window.TouchEvent,St=!window.L_NO_TOUCH&&(wt||bt),It=yt&&ht,Mt=yt&&ut,Tt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Bt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",h,e),window.removeEventListener("testPassiveEventSupport",h,e)}catch(t){}return t}(),Rt=!!document.createElement("canvas").getContext,Pt=!(!document.createElementNS||!Z("svg").createSVGRect),Dt=!!Pt&&(($=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===($.firstChild&&$.firstChild.namespaceURI)),Lt=!Pt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),Ut=0===navigator.platform.indexOf("Mac"),Nt=0===navigator.platform.indexOf("Linux");function Ot(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Ft={ie:et,ielt9:nt,edge:it,webkit:rt,android:st,android23:ot,androidStock:lt,opera:ht,chrome:ct,gecko:ut,safari:dt,phantom:pt,opera12:ft,win:At,ie3d:gt,webkit3d:mt,gecko3d:_t,any3d:vt,mobile:yt,mobileWebkit:Et,mobileWebkit3d:xt,msPointer:Ct,pointer:bt,touch:St,touchNative:wt,mobileOpera:It,mobileGecko:Mt,retina:Tt,passiveEvents:Bt,canvas:Rt,svg:Pt,vml:Lt,inlineSvg:Dt,mac:Ut,linux:Nt},kt=Ft.msPointer?"MSPointerDown":"pointerdown",Qt=Ft.msPointer?"MSPointerMove":"pointermove",zt=Ft.msPointer?"MSPointerUp":"pointerup",Gt=Ft.msPointer?"MSPointerCancel":"pointercancel",Ht={touchstart:kt,touchmove:Qt,touchend:zt,touchcancel:Gt},Vt={touchstart:te,touchmove:$t,touchend:$t,touchcancel:$t},jt={},Wt=!1;function qt(t,e,n){return"touchstart"===e&&Jt(),Vt[e]?(n=Vt[e].bind(this,n),t.addEventListener(Ht[e],n,!1),n):(console.warn("wrong event specified:",e),h)}function Xt(t,e,n){Ht[e]?t.removeEventListener(Ht[e],n,!1):console.warn("wrong event specified:",e)}function Yt(t){jt[t.pointerId]=t}function Kt(t){jt[t.pointerId]&&(jt[t.pointerId]=t)}function Zt(t){delete jt[t.pointerId]}function Jt(){Wt||(document.addEventListener(kt,Yt,!0),document.addEventListener(Qt,Kt,!0),document.addEventListener(zt,Zt,!0),document.addEventListener(Gt,Zt,!0),Wt=!0)}function $t(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],jt)e.touches.push(jt[n]);e.changedTouches=[e],t(e)}}function te(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Ye(e),$t(t,e)}function ee(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return t=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}var ne=200;function ie(t,e){t.addEventListener("dblclick",e);var n,i=0;function r(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var r=Ze(t);if(!r.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||r.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var s=Date.now();s-i<=ne?2==++n&&e(ee(t)):n=1,i=s}}}else n=t.detail}return t.addEventListener("click",r),{dblclick:e,simDblclick:r}}function re(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var se,oe,ae,le,he,ce=Ie(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ue=Ie(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===ue||"OTransition"===ue?ue+"End":"transitionend";function pe(t){return"string"==typeof t?document.getElementById(t):t}function fe(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function Ae(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ge(t){var e=t.parentNode;e&&e.removeChild(t)}function me(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function _e(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ve(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ye(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=be(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function Ee(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,r=n.length;i<r;i++)t.classList.add(n[i]);else if(!ye(t,e)){var s=be(t);Ce(t,(s?s+" ":"")+e)}}function xe(t,e){void 0!==t.classList?t.classList.remove(e):Ce(t,u((" "+be(t)+" ").replace(" "+e+" "," ")))}function Ce(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function be(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function we(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Se(t,e)}function Se(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}function Ie(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function Me(t,e,n){var i=e||new P(0,0);t.style[ce]=(Ft.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Te(t,e){t._leaflet_pos=e,Ft.any3d?Me(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Be(t){return t._leaflet_pos||new P(0,0)}if("onselectstart"in document)se=function(){ke(window,"selectstart",Ye)},oe=function(){ze(window,"selectstart",Ye)};else{var Re=Ie(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);se=function(){if(Re){var t=document.documentElement.style;ae=t[Re],t[Re]="none"}},oe=function(){Re&&(document.documentElement.style[Re]=ae,ae=void 0)}}function Pe(){ke(window,"dragstart",Ye)}function De(){ze(window,"dragstart",Ye)}function Le(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ue(),le=t,he=t.style.outlineStyle,t.style.outlineStyle="none",ke(window,"keydown",Ue))}function Ue(){le&&(le.style.outlineStyle=he,le=void 0,he=void 0,ze(window,"keydown",Ue))}function Ne(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Oe(t){var e=t.getBoundingClientRect();
vendor: 1,066 bytes, line 2
2return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Fe={__proto__:null,TRANSFORM:ce,TRANSITION:ue,TRANSITION_END:de,get:pe,getStyle:fe,create:Ae,remove:ge,empty:me,toFront:_e,toBack:ve,hasClass:ye,addClass:Ee,removeClass:xe,setClass:Ce,getClass:be,setOpacity:we,testProp:Ie,setTransform:Me,setPosition:Te,getPosition:Be,get disableTextSelection(){return se},get enableTextSelection(){return oe},disableImageDrag:Pe,enableImageDrag:De,preventOutline:Le,restoreOutline:Ue,getSizedParentNode:Ne,getScale:Oe};function ke(t,e,n,i){if(e&&"object"==typeof e)for(var r in e)Ve(t,r,e[r],n);else for(var s=0,o=(e=d(e)).length;s<o;s++)Ve(t,e[s],n,i);return this}var Qe="_leaflet_events";function ze(t,e,n,i){if(1===arguments.length)Ge(t),delete t[Qe];else if(e&&"object"==typeof e)for(var r in e)je(t,r,e[r],n);else if(e=d(e),2===arguments.length)Ge(t,(function(t){return-1!==_(e,t)}));else for(var s=0,o=e.length;s<o;s++)je(t,e[s],n,i);return this}function Ge(t,e){for(var n in t[Qe]){var i=n.split(/\d/)[0];e&&!e(i)||je(t,i,null,null,n)}}
vendor: 18,888 bytes, line 2
2var He={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ve(t,e,n,i){var r=e+o(n)+(i?"_"+o(i):"");if(t[Qe]&&t[Qe][r])return this;var s=function(e){return n.call(i||t,e||window.event)},a=s;!Ft.touchNative&&Ft.pointer&&0===e.indexOf("touch")?s=qt(t,e,s):Ft.touch&&"dblclick"===e?s=ie(t,s):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(He[e]||e,s,!!Ft.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(s=function(e){e=e||window.event,en(t,e)&&a(e)},t.addEventListener(He[e],s,!1)):t.addEventListener(e,a,!1):t.attachEvent("on"+e,s),t[Qe]=t[Qe]||{},t[Qe][r]=s}function je(t,e,n,i,r){r=r||e+o(n)+(i?"_"+o(i):"");var s=t[Qe]&&t[Qe][r];if(!s)return this;!Ft.touchNative&&Ft.pointer&&0===e.indexOf("touch")?Xt(t,e,s):Ft.touch&&"dblclick"===e?re(t,s):"removeEventListener"in t?t.removeEventListener(He[e]||e,s,!1):t.detachEvent("on"+e,s),t[Qe][r]=null}function We(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function qe(t){return Ve(t,"wheel",We),this}function Xe(t){return ke(t,"mousedown touchstart dblclick contextmenu",We),t._leaflet_disable_click=!0,this}function Ye(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ke(t){return Ye(t),We(t),this}function Ze(t){if(t.composedPath)return t.composedPath();for(var e=[],n=t.target;n;)e.push(n),n=n.parentNode;return e}function Je(t,e){if(!e)return new P(t.clientX,t.clientY);var n=Oe(e),i=n.boundingClientRect;return new P((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var $e=Ft.linux&&Ft.chrome?window.devicePixelRatio:Ft.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function tn(t){return Ft.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/$e:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function en(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var nn={__proto__:null,on:ke,off:ze,stopPropagation:We,disableScrollPropagation:qe,disableClickPropagation:Xe,preventDefault:Ye,stop:Ke,getPropagationPath:Ze,getMousePosition:Je,getWheelDelta:tn,isExternalTarget:en,addListener:ke,removeListener:ze},rn=R.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Be(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=w(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),Te(this._el,n),this.fire("step")},_complete:function(){S(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),sn=R.extend({options:{crs:Y,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=r(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(z(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ue&&Ft.any3d&&!Ft.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ke(this._proxy,de,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(z(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,i.pan&&i.pan.noMoveStart),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Ft.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Ft.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),r=this.getSize().divideBy(2),s=(t instanceof P?t:this.latLngToContainerPoint(t)).subtract(r).multiplyBy(1-1/i),o=this.containerPointToLatLng(r.add(s));return this.setView(o,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():k(t);var n=U(e.paddingTopLeft||e.padding||[0,0]),i=U(e.paddingBottomRight||e.padding||[0,0]),r=this.getBoundsZoom(t,!1,n.add(i));if((r="number"==typeof e.maxZoom?Math.min(e.maxZoom,r):r)===1/0)return{center:t.getCenter(),zoom:r};var s=i.subtract(n).divideBy(2),o=this.project(t.getSouthWest(),r),a=this.project(t.getNorthEast(),r);return{center:this.unproject(o.add(a).divideBy(2).add(s),r),zoom:r}},fitBounds:function(t,e){if(!(t=k(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=U(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new rn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){Ee(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!Ft.any3d)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),r=this.project(t),s=this.getSize(),o=this._zoom;t=z(t),e=void 0===e?o:e;var a=Math.max(s.x,s.y),l=a*this.getZoomScale(o,e),h=r.distanceTo(i)||1,c=1.42,u=c*c;function d(t){var e=(l*l-a*a+(t?-1:1)*u*u*h*h)/(2*(t?l:a)*u*h),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}function A(t){return p(t)/f(t)}var g=d(0);function m(t){return a*(f(g)/f(g+c*t))}function _(t){return a*(f(g)*A(g+c*t)-p(g))/u}function v(t){return 1-Math.pow(1-t,1.5)}var y=Date.now(),E=(d(1)-g)/c,x=n.duration?1e3*n.duration:1e3*E*.8;function C(){var n=(Date.now()-y)/x,s=v(n)*E;n<=1?(this._flyToFrame=w(C,this),this._move(this.unproject(i.add(r.subtract(i).multiplyBy(_(s)/h)),o),this.getScaleZoom(a/m(s),o),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),C.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return t=k(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,k(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=U((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=U(e.paddingBottomRight||e.padding||[0,0]),r=this.project(this.getCenter()),s=this.project(t),o=this.getPixelBounds(),a=O([o.min.add(n),o.max.subtract(i)]),l=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var h=s.subtract(a.getCenter()),c=a.extend(s).getSize().subtract(l);r.x+=h.x<0?-c.x:c.x,r.y+=h.y<0?-c.y:c.y,this.panTo(this.unproject(r),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),s=e.divideBy(2).round(),o=i.divideBy(2).round(),a=s.subtract(o);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=r(this._handleGeolocationResponse,this),i=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new Q(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var r=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(r,i.maxZoom):r)}var s={latlng:e,bounds:n,timestamp:t.timestamp};for(var o in t.coords)"number"==typeof t.coords[o]&&(s[o]=t.coords[o]);this.fire("locationfound",s)}},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ge(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(S(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ge(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=Ae("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new F(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=k(t),n=U(n||[0,0]);var i=this.getZoom()||0,r=this.getMinZoom(),s=this.getMaxZoom(),o=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),h=O(this.project(a,i),this.project(o,i)).getSize(),c=Ft.any3d?this.options.zoomSnap:1,u=l.x/h.x,d=l.y/h.y,p=e?Math.max(u,d):Math.min(u,d);return i=this.getScaleZoom(p,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(r,Math.min(s,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new P(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new N(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(z(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(U(t),e)},layerPointToLatLng:function(t){var e=U(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(z(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(z(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(k(t))},distance:function(t,e){return this.options.crs.distance(z(t),z(e))},containerPointToLayerPoint:function(t){return U(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return U(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(U(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(z(t)))},mouseEventToContainerPoint:function(t){return Je(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=pe(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");ke(e,"scroll",this._onScroll,this),this._containerId=o(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ft.any3d,Ee(t,"leaflet-container"+(Ft.touch?" leaflet-touch":"")+(Ft.retina?" leaflet-retina":"")+(Ft.ielt9?" leaflet-oldie":"")+(Ft.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=fe(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Te(this._mapPane,new P(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Ee(t.markerPane,"leaflet-zoom-hide"),Ee(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){Te(this._mapPane,new P(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r,n)._move(t,e)._moveEnd(r),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return S(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Te(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[o(this._container)]=this;var e=t?ze:ke;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Ft.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){S(this._resizeRequest),this._resizeRequest=w((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],r="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,a=!1;s;){if((n=this._targets[o(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(r&&!en(s,t))break;if(i.push(n),r)break}if(s===this._container)break;s=s.parentNode}return i.length||a||r||!this.listens(e,!0)||(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isCl
vendor: 1,885 bytes, line 2
2ickDisabled(e))){var n=t.type;"mousedown"===n&&Le(e),this._fireDOMEvent(t,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var r=n({},t);r.type="preclick",this._fireDOMEvent(r,r.type,i)}var s=this._findEventTargets(t,e);if(i){for(var o=[],a=0;a<i.length;a++)i[a].listens(e,!0)&&o.push(i[a]);s=o.concat(s)}if(s.length){"contextmenu"===e&&Ye(t);var l=s[0],h={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var c=l.getLatLng&&(!l._radius||l._radius<=10);h.containerPoint=c?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),h.layerPoint=this.containerPointToLayerPoint(h.containerPoint),h.latlng=c?l.getLatLng():this.layerPointToLatLng(h.layerPoint)}for(a=0;a<s.length;a++)if(s[a].fire(e,h,!0),h.originalEvent._stopped||!1===s[a].options.bubblingMouseEvents&&-1!==_(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Be(this._mapPane)||new P(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);
vendor: 102,308 bytes, line 2
2return O([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),r=this.getSize().divideBy(2),s=new N(i.subtract(r),i.add(r)),o=this._getBoundsOffset(s,n,e);return Math.abs(o.x)<=1&&Math.abs(o.y)<=1?t:this.unproject(i.add(o),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new N(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=O(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),r=i.min.subtract(t.min),s=i.max.subtract(t.max);return new P(this._rebound(r.x,-s.x),this._rebound(r.y,-s.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=Ft.any3d?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){xe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=Ae("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=ce,n=this._proxy.style[e];Me(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ge(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Me(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),r=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(r)||(w((function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,Ee(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&xe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function on(t,e){return new sn(t,e)}var an=M.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return Ee(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ge(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),ln=function(t){return new an(t)};sn.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=Ae("div",e+"control-container",this._container);function i(i,r){var s=e+i+" "+e+r;t[i+r]=Ae("div",s,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ge(this._controlCorners[t]);ge(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var hn=an.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return an.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(o(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){Ee(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(Ee(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):xe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return xe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=Ae("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Xe(e),qe(e);var i=this._section=Ae("section",t+"-list");n&&(this._map.on("click",this.collapse,this),ke(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var r=this._layersLink=Ae("a",t+"-toggle",e);r.href="#",r.title="Layers",r.setAttribute("role","button"),ke(r,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Ye(t),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=Ae("div",t+"-base",i),this._separator=Ae("div",t+"-separator",i),this._overlaysList=Ae("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&o(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(r((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;me(this._baseLayersList),me(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,r=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,r+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&r>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(o(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+o(this),i),this._layerControlInputs.push(e),e.layerId=o(t.layer),ke(e,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+t.name;var s=document.createElement("span");return n.appendChild(s),s.appendChild(e),s.appendChild(r),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t,e,n=this._layerControlInputs,i=[],r=[];this._handlingClick=!0;for(var s=n.length-1;s>=0;s--)t=n[s],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||r.push(e);for(s=0;s<r.length;s++)this._map.hasLayer(r[s])&&this._map.removeLayer(r[s]);for(s=0;s<i.length;s++)this._map.hasLayer(i[s])||this._map.addLayer(i[s]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,ke(t,"click",Ye),this.expand();var e=this;setTimeout((function(){ze(t,"click",Ye),e._preventClick=!1}))}}),cn=function(t,e,n){return new hn(t,e,n)},un=an.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=Ae("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,r){var s=Ae("a",n,i);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Xe(s),ke(s,"click",Ke),ke(s,"click",r,this),ke(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";xe(this._zoomInButton,e),xe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(Ee(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(Ee(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});sn.mergeOptions({zoomControl:!0}),sn.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new un,this.addControl(this.zoomControl))}));var dn=function(t){return new un(t)},pn=an.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=Ae("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=Ae("div",e,n)),t.imperial&&(this._iScale=Ae("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,r=3.2808399*t;r>5280?(e=r/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(r),this._updateScale(this._iScale,i+" ft",i/r))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),fn=function(t){return new pn(t)},An='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',gn=an.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ft.inlineSvg?An+" ":"")+"Leaflet</a>"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=Ae("div","leaflet-control-attribution"),Xe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});sn.mergeOptions({attributionControl:!0}),sn.addInitHook((function(){this.options.attributionControl&&(new gn).addTo(this)}));var mn=function(t){return new gn(t)};an.Layers=hn,an.Zoom=un,an.Scale=pn,an.Attribution=gn,ln.layers=cn,ln.zoom=dn,ln.scale=fn,ln.attribution=mn;var _n=M.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});_n.addTo=function(t,e){return t.addHandler(e,this),this};var vn={Events:B},yn=Ft.touch?"touchstart mousedown":"mousedown",En=R.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(ke(this._dragStartTarget,yn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(En._dragging===this&&this.finishDrag(!0),ze(this._dragStartTarget,yn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ye(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)En._dragging===this&&this.finishDrag();else if(!(En._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(En._dragging=this,this._preventOutline&&Le(this._element),Pe(),se(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ne(this._element);this._startPoint=new P(e.clientX,e.clientY),this._startPos=Be(this._element),this._parentScale=Oe(n);var i="mousedown"===t.type;ke(document,i?"mousemove":"touchmove",this._onMove,this),ke(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new P(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Ye(t),this._moved||(this.fire("dragstart"),this._moved=!0,Ee(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Ee(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Te(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){xe(document.body,"leaflet-dragging"),this._lastTarget&&(xe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),ze(document,"mousemove touchmove",this._onMove,this),ze(document,"mouseup touchend touchcancel",this._onUp,this),De(),oe();var e=this._moved&&this._moving;this._moving=!1,En._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function xn(t,e,n){var i,r,s,o,a,l,h,c,u,d=[1,4,2,8];for(r=0,h=t.length;r<h;r++)t[r]._code=Un(t[r],e);for(o=0;o<4;o++){for(c=d[o],i=[],r=0,s=(h=t.length)-1;r<h;s=r++)a=t[r],l=t[s],a._code&c?l._code&c||((u=Ln(l,a,c,e,n))._code=Un(u,e),i.push(u)):(l._code&c&&((u=Ln(l,a,c,e,n))._code=Un(u,e),i.push(u)),i.push(a));t=i}return t}function Cn(t,e){var n,i,r,s,o,a,l,h,c;if(!t||0===t.length)throw new Error("latlngs not passed");Fn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=z([0,0]),d=k(t);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(u=bn(t));var p=t.length,f=[];for(n=0;n<p;n++){var A=z(t[n]);f.push(e.project(z([A.lat-u.lat,A.lng-u.lng])))}for(a=l=h=0,n=0,i=p-1;n<p;i=n++)r=f[n],s=f[i],o=r.y*s.x-s.y*r.x,l+=(r.x+s.x)*o,h+=(r.y+s.y)*o,a+=3*o;c=0===a?f[0]:[l/a,h/a];var g=e.unproject(U(c));return z([g.lat+u.lat,g.lng+u.lng])}function bn(t){for(var e=0,n=0,i=0,r=0;r<t.length;r++){var s=z(t[r]);e+=s.lat,n+=s.lng,i++}return z([e/i,n/i])}var wn,Sn={__proto__:null,clipPolygon:xn,polygonCenter:Cn,centroid:bn};function In(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Bn(t=Pn(t,n),n)}function Mn(t,e,n){return Math.sqrt(On(t,e,n,!0))}function Tn(t,e,n){return On(t,e,n)}function Bn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Rn(t,i,e,0,n-1);var r,s=[];for(r=0;r<n;r++)i[r]&&s.push(t[r]);return s}function Rn(t,e,n,i,r){var s,o,a,l=0;for(o=i+1;o<=r-1;o++)(a=On(t[o],t[i],t[r],!0))>l&&(s=o,l=a);l>n&&(e[s]=1,Rn(t,e,n,i,s),Rn(t,e,n,s,r))}function Pn(t,e){for(var n=[t[0]],i=1,r=0,s=t.length;i<s;i++)Nn(t[i],t[r])>e&&(n.push(t[i]),r=i);return r<s-1&&n.push(t[s-1]),n}function Dn(t,e,n,i,r){var s,o,a,l=i?wn:Un(t,n),h=Un(e,n);for(wn=h;;){if(!(l|h))return[t,e];if(l&h)return!1;a=Un(o=Ln(t,e,s=l||h,n,r),n),s===l?(t=o,l=a):(e=o,h=a)}}function Ln(t,e,n,i,r){var s,o,a=e.x-t.x,l=e.y-t.y,h=i.min,c=i.max;return 8&n?(s=t.x+a*(c.y-t.y)/l,o=c.y):4&n?(s=t.x+a*(h.y-t.y)/l,o=h.y):2&n?(s=c.x,o=t.y+l*(c.x-t.x)/a):1&n&&(s=h.x,o=t.y+l*(h.x-t.x)/a),new P(s,o,r)}function Un(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function Nn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function On(t,e,n,i){var r,s=e.x,o=e.y,a=n.x-s,l=n.y-o,h=a*a+l*l;return h>0&&((r=((t.x-s)*a+(t.y-o)*l)/h)>1?(s=n.x,o=n.y):r>0&&(s+=a*r,o+=l*r)),a=t.x-s,l=t.y-o,i?a*a+l*l:new P(s,o)}function Fn(t){return!m(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function kn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Fn(t)}function Qn(t,e){var n,i,r,s,o,a,l,h;if(!t||0===t.length)throw new Error("latlngs not passed");Fn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=z([0,0]),u=k(t);u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(c=bn(t));var d=t.length,p=[];for(n=0;n<d;n++){var f=z(t[n]);p.push(e.project(z([f.lat-c.lat,f.lng-c.lng])))}for(n=0,i=0;n<d-1;n++)i+=p[n].distanceTo(p[n+1])/2;if(0===i)h=p[0];else for(n=0,s=0;n<d-1;n++)if(o=p[n],a=p[n+1],(s+=r=o.distanceTo(a))>i){l=(s-i)/r,h=[a.x-l*(a.x-o.x),a.y-l*(a.y-o.y)];break}var A=e.unproject(U(h));return z([A.lat+c.lat,A.lng+c.lng])}var zn={__proto__:null,simplify:In,pointToSegmentDistance:Mn,closestPointOnSegment:Tn,clipSegment:Dn,_getEdgeIntersection:Ln,_getBitCode:Un,_sqClosestPointOnSegment:On,isFlat:Fn,_flat:kn,polylineCenter:Qn},Gn={project:function(t){return new P(t.lng,t.lat)},unproject:function(t){return new Q(t.y,t.x)},bounds:new N([-180,-90],[180,90])},Hn={R:6378137,R_MINOR:6356752.314245179,bounds:new N([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,r=this.R_MINOR/n,s=Math.sqrt(1-r*r),o=s*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-o)/(1+o),s/2);return i=-n*Math.log(Math.max(a,1e-10)),new P(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,r=this.R_MINOR/i,s=Math.sqrt(1-r*r),o=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(o),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=h=Math.PI/2-2*Math.atan(o*e)-a;return new Q(a*n,t.x*n/i)}},Vn={__proto__:null,LonLat:Gn,Mercator:Hn,SphericalMercator:W},jn=n({},V,{code:"EPSG:3395",projection:Hn,transformation:function(){var t=.5/(Math.PI*Hn.R);return X(t,.5,-t,.5)}()}),Wn=n({},V,{code:"EPSG:4326",projection:Gn,transformation:X(1/180,1,-1/180,.5)}),qn=n({},H,{projection:Gn,transformation:X(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});H.Earth=V,H.EPSG3395=jn,H.EPSG3857=Y,H.EPSG900913=K,H.EPSG4326=Wn,H.Simple=qn;var Xn=R.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[o(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[o(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});sn.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=o(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=o(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return o(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?m(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[o(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=o(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var r=this._zoomBoundLayers[i].options;t=void 0===r.minZoom?t:Math.min(t,r.minZoom),e=void 0===r.maxZoom?e:Math.max(e,r.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Yn=Xn.extend({initialize:function(t,e){var n,i;if(p(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o(t)}}),Kn=function(t,e){return new Yn(t,e)},Zn=Yn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Yn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Yn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new F;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Jn=function(t,e){return new Zn(t,e)},$n=M.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var r=U(i),s=U("shadow"===e&&n.shadowAnchor||n.iconAnchor||r&&r.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),r&&(t.style.width=r.x+"px",t.style.height=r.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Ft.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function ti(t){return new $n(t)}var ei=$n.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof ei.imagePath&&(ei.imagePath=this._detectIconPath()),(this.options.imagePath||ei.imagePath)+$n.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,n){var i=e.exec(t);return i&&i[n]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=Ae("div","leaflet-default-icon-path",document.body),e=fe(t,"background-image")||fe(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),ni=_n.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new En(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Ee(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&xe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,r=this._marker.options.autoPanPadding,s=Be(e._icon),o=n.getPixelBounds(),a=n.getPixelOrigin(),l=O(o.min._subtract(a).add(r),o.max._subtract(a).subtract(r));if(!l.contains(s)){var h=U((Math.max(l.max.x,s.x)-l.max.x)/(o.max.x-l.max.x)-(Math.min(l.min.x,s.x)-l.min.x)/(o.min.x-l.min.x),(Math.max(l.max.y,s.y)-l.max.y)/(o.max.y-l.max.y)-(Math.min(l.min.y,s.y)-l.min.y)/(o.min.y-l.min.y)).multiplyBy(i);n.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),Te(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=w(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(S(this._panRequest),this._panRequest=w(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=Be(e._icon),r=e._map.layerPointToLatLng(i);n&&Te(n,i),e._latlng=r,t.latlng=r,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){S(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),ii=Xn.extend({options:{icon:new ei,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){p(this,e),this._latlng=z(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=z(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),Ee(n,e),t.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ke(n,"focus",this._panOnFocus,this);var r=t.icon.createShadow(this._shadow),s=!1;r!==this._shadow&&(this._removeShadow(),s=!0),r&&(Ee(r,e),r.alt=""),this._shadow=r,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),r&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ze(this._icon,"focus",this._panOnFocus,this),ge(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ge(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Te(this._icon,t),this._shadow&&Te(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(Ee(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ni)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ni(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&we(this._icon,t),this._shadow&&we(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,n=e.iconSize?U(e.iconSize):U(0,0),i=e.iconAnchor?U(e.iconAnchor):U(0,0);t.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function ri(t,e){return new ii(t,e)}var si=Xn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return p(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),oi=si.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=z(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=z(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return si.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new N(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ai(t,e){return new oi(t,e)}var li=oi.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),p(this,e),this._latlng=z(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new F(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:si.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===V.distance){var r=Math.PI/180,s=this._mRadius/V.R/r,o=n.project([e+s,t]),a=n.project([e-s,t]),l=o.add(a).divideBy(2),h=n.unproject(l).lat,c=Math.acos((Math.cos(s*r)-Math.sin(e*r)*Math.sin(h*r))/(Math.cos(e*r)*Math.cos(h*r)))/r;(isNaN(c)||0===c)&&(c=s/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([h,t-c]).x,this._radiusY=l.y-o.y}else{var u=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(u).x}this._updateBounds()}});function hi(t,e,n){return new li(t,e,n)}var ci=si.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,r=null,s=On,o=0,a=this._parts.length;o<a;o++)for(var l=this._parts[o],h=1,c=l.length;h<c;h++){var u=s(t,e=l[h-1],n=l[h],!0);u<i&&(i=u,r=s(t,e,n))}return r&&(r.distance=Math.sqrt(i)),r},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Qn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=z(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new F,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Fn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=Fn(t),i=0,r=t.length;i<r;i++)n?(e[i]=z(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new N;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new P(t,t);this._rawPxBounds&&(this._pxBounds=new N([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,n){var i,r,s=t[0]instanceof Q,o=t.length;if(s){for(r=[],i=0;i<o;i++)r[i]=this._map.latLngToLayerPoint(t[i]),n.extend(r[i]);e.push(r)}else for(i=0;i<o;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,r,s,o,a,l=this._parts;for(e=0,i=0,r=this._rings.length;e<r;e++)for(n=0,s=(a=this._rings[e]).length;n<s-1;n++)(o=Dn(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(o[0]),o[1]===a[n+1]&&n!==s-2||(l[i].push(o[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=In(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,r,s,o,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,s=this._parts.length;n<s;n++)for(i=0,r=(o=(a=this._parts[n]).length)-1;i<o;r=i++)if((e||0!==i)&&Mn(t,a[r],a[i])<=l)return!0;return!1}});function ui(t,e){return new ci(t,e)}ci._flat=kn;var di=ci.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Cn(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=ci.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof Q&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ci.prototype._setLatLngs.call(this,t),Fn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Fn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new P(e,e);if(t=new N(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,r=0,s=this._rings.length;r<s;r++)(i=xn(this._rings[r],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,r,s,o,a,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(r=0,a=this._parts.length;r<a;r++)for(s=0,o=(l=(e=this._parts[r]).length)-1;s<l;o=s++)n=e[s],i=e[o],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(h=!h);return h||ci.prototype._containsPoint.call(this,t,!0)}});function pi(t,e){return new di(t,e)}var fi=Zn.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,r=m(t)?t:t.features;if(r){for(e=0,n=r.length;e<n;e++)((i=r[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var o=Ai(t,s);return o?(o.feature=xi(t),o.defaultOptions=o.options,this.resetStyle(o),s.onEachFeature&&s.onEachFeature(t,o),this.addLayer(o)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function Ai(t,e){var n,i,r,s,o="Feature"===t.type?t.geometry:t,a=o?o.coordinates:null,l=[],h=e&&e.pointToLayer,c=e&&e.coordsToLatLng||mi;if(!a&&!o)return null;switch(o.type){case"Point":return gi(h,t,n=c(a),e);case"MultiPoint":for(r=0,s=a.length;r<s;r++)n=c(a[r]),l.push(gi(h,t,n,e));return new Zn(l);case"LineString":case"MultiLineString":return i=_i(a,"LineString"===o.type?0:1,c),new ci(i,e);case"Polygon":case"MultiPolygon":return i=_i(a,"Polygon"===o.type?1:2,c),new di(i,e);case"GeometryCollection":for(r=0,s=o.geometries.length;r<s;r++){var u=Ai({geometry:o.geometries[r],type:"Feature",properties:t.properties},e);u&&l.push(u)}return new Zn(l);case"FeatureCollection":for(r=0,s=o.features.length;r<s;r++){var d=Ai(o.features[r],e);d&&l.push(d)}return new Zn(l);default:throw new Error("Invalid GeoJSON object.")}}function gi(t,e,n,i){return t?t(e,n):new ii(n,i&&i.markersInheritOptions&&i)}function mi(t){return new Q(t[1],t[0],t[2])}function _i(t,e,n){for(var i,r=[],s=0,o=t.length;s<o;s++)i=e?_i(t[s],e-1,n):(n||mi)(t[s]),r.push(i);return r}function vi(t,e){return void 0!==(t=z(t)).alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function yi(t,e,n,i){for(var r=[],s=0,o=t.length;s<o;s++)r.push(e?yi(t[s],Fn(t[s])?0:e-1,n,i):vi(t[s],i));return!e&&n&&r.length>0&&r.push(r[0].slice()),r}function Ei(t,e){return t.feature?n({},t.feature,{geometry:e}):xi(e)}function xi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Ci={toGeoJSON:function(t){return Ei(this,{type:"Point",coordinates:vi(this.getLatLng(),t)})}};function bi(t,e){return new fi(t,e)}ii.include(Ci),li.include(Ci),oi.include(Ci),ci.include({toGeoJSON:function(t){var e=!Fn(this._latlngs);return Ei(this,{type:(e?"Multi":"")+"LineString",coordinates:yi(this._latlngs,e?1:0,!1,t)})}}),di.include({toGeoJSON:function(t){var e=!Fn(this._latlngs),n=e&&!Fn(this._latlngs[0]),i=yi(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),Ei(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Yn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),Ei(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var r=e.toGeoJSON(t);if(n)i.push(r.geometry);else{var s=xi(r);"FeatureCollection"===s.type?i.push.apply(i,s.features):i.push(s)}}})),n?Ei(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var wi=bi,Si=Xn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=k(e),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Ee(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ge(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&_e(this._image),this},bringToBack:function(){return this._map&&ve(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=k(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:Ae("img");Ee(e,"leaflet-image-layer"),this._zoomAnimated&&Ee(e,"leaflet-zoom-animated"),this.options.className&&Ee(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=r(this.fire,this,"load"),e.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Me(this._image,n,e)},_reset:function(){var t=this._image,e=new N(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();Te(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){we(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Ii=function(t,e,n){return new Si(t,e,n)},Mi=Si.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:Ae("video");if(Ee(e,"leaflet-image-layer"),this._zoomAnimated&&Ee(e,"leaflet-zoom-animated"),this.options.className&&Ee(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=r(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],s=0;s<n.length;s++)i.push(n[s].src);this._url=n.length>0?i:[e.src]}else{m(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var o=0;o<this._url.length;o++){var a=Ae("source");a.src=this._url[o],e.appendChild(a)}}}});function Ti(t,e,n){return new Mi(t,e,n)}var Bi=Si.extend({_initImage:function(){var t=this._image=this._url;Ee(t,"leaflet-image-layer"),this._zoomAnimated&&Ee(t,"leaflet-zoom-animated"),this.options.className&&Ee(t,this.options.className),t.onselectstart=h,t.onmousemove=h}});function Ri(t,e,n){return new Bi(t,e,n)}var Pi=Xn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof Q||m(t))?(this._latlng=z(t),p(this,e)):(p(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&we(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&we(this._container,1),this.bringToFront(),this.options.interactive&&(Ee(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(we(this._container,0),this._removeTimeout=setTimeout(r(ge,void 0,this._container),200)):ge(this._container),this.options.interactive&&(xe(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=z(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&_e(this._container),this},bringToBack:function(){return this._map&&ve(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Zn){e=null;var n=this._source._layers;for(var i in n)if(n[i]._map){e=n[i];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=U(this.options.offset),n=this._getAnchor();this._zoomAnimated?Te(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,r=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=r+"px"}},_getAnchor:function(){return[0,0]}});sn.include({_initOverlay:function(t,e,n,i){var r=e;return r instanceof t||(r=new t(i).setContent(e)),n&&r.setLatLng(n),r}}),Xn.include({_initOverlay:function(t,e,n,i){var r=n;return r instanceof t?(p(r,i),r._source=this):(r=e&&!i?e:new t(i,this)).setContent(n),r}});var Di=Pi.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Pi.prototype.openOn.call(this,t)},onAdd:function(t){Pi.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof si||this._source.on("preclick",We))},onRemove:function(t){Pi.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof si||this._source.off("preclick",We))},getEvents:function(){var t=Pi.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=Ae("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=Ae("div",t+"-content-wrapper",e);if(this._contentNode=Ae("div",t+"-content",n),Xe(e),qe(this._contentNode),ke(e,"contextmenu",We),this._tipContainer=Ae("div",t+"-tip-container",e),this._tip=Ae("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=Ae("a",t+"-close-button",e);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">&#215;</span>',ke(i,"click",(function(t){Ye(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,r=this.options.maxHeight,s="leaflet-popup-scrolled";r&&i>r?(e.height=r+"px",Ee(t,s)):xe(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Te(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(fe(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,r=new P(this._containerLeft,-n-this._containerBottom);r._add(Be(this._container));var s=t.layerPointToContainerPoint(r),o=U(this.options.autoPanPadding),a=U(this.options.autoPanPaddingTopLeft||o),l=U(this.options.autoPanPaddingBottomRight||o),h=t.getSize(),c=0,u=0;s.x+i+l.x>h.x&&(c=s.x+i-h.x+l.x),s.x-c-a.x<0&&(c=s.x-a.x),s.y+n+l.y>h.y&&(u=s.y+n-h.y+l.y),s.y-u-a.y<0&&(u=s.y-a.y),(c||u)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,u]))}},_getAnchor:function(){return U(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Li=function(t,e){return new Di(t,e)};sn.mergeOptions({closePopupOnClick:!0}),sn.include({openPopup:function(t,e,n){return this._initOverlay(Di,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Xn.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Di,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Zn||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ke(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof si?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Ui=Pi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Pi.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Pi.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Pi.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Ae("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+o(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,r=this._container,s=i.latLngToContainerPoint(i.getCenter()),o=i.layerPointToContainerPoint(t),a=this.options.direction,l=r.offsetWidth,h=r.offsetHeight,c=U(this.options.offset),u=this._getAnchor();"top"===a?(e=l/2,n=h):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=h/2):"right"===a?(e=0,n=h/2):"left"===a?(e=l,n=h/2):o.x<s.x?(a="right",e=0,n=h/2):(a="left",e=l+2*(c.x+u.x),n=h/2),t=t.subtract(U(e,n,!0)).add(c).add(u),xe(r,"leaflet-tooltip-right"),xe(r,"leaflet-tooltip-left"),xe(r,"leaflet-tooltip-top"),xe(r,"leaflet-tooltip-bottom"),Ee(r,"leaflet-tooltip-"+a),Te(r,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&we(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return U(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Ni=function(t,e){return new Ui(t,e)};sn.include({openTooltip:function(t,e,n){return this._initOverlay(Ui,t,e,n).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Xn.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ui,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Zn||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(ke(e,"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),ke(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",(function(){e._openOnceFlag=!1,e._openTooltip(t)}))}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Oi=$n.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(me(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=U(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Fi(t){return new Oi(t)}$n.Default=ei;var ki=Xn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ft.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ge(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(_e(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ve(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof P?t:new P(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),r=0,s=n.length;r<s;r++)e=n[r].style.zIndex,n[r]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ft.ielt9){we(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var r=this._tiles[i];if(r.current&&r.loaded){var s=Math.min(1,(t-r.loaded)/200);we(r.el,s),s<1?e=!0:(r.active?n=!0:this._onOpaqueTile(r),r.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(S(this._fadeFrame),this._fadeFrame=w(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=Ae("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(ge(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],r=this._map;return i||((i=this._levels[t]={}).el=Ae("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=r.project(r.unproject(r.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,r.getCenter(),r.getZoom()),h(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ge(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var r=Math.floor(t/2),s=Math.floor(e/2),o=n-1,a=new P(+r,+s);a.z=+o;var l=this._tileCoordsToKey(a),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),o>i&&this._retainParent(r,s,o,i))},_retainChildren:function(t,e,n,i){for(var r=2*t;r<2*t+2;r++)for(var s=2*e;s<2*e+2;s++){var o=new P(r,s);o.z=n+1;var a=this._tileCoordsToKey(o),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(r,s,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var r=Math.round(e);r=void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r<this.options.minZoom?void 0:this._clampZoom(r);var s=this.options.updateWhenZooming&&r!==this._tileZoom;i&&!s||(this._tileZoom=r,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==r&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),r=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();Ft.any3d?Me(t.el,r,i):Te(t.el,r)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,r=this._map.getPixelWorldBounds(this._tileZoom);r&&(this._globalTileRange=this._pxBoundsToTileRange(r)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),r=e.project(t,this._tileZoom).floor(),s=e.getSize().divideBy(2*i);return new N(r.subtract(s),r.add(s))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),r=this._pxBoundsToTileRange(i),s=r.getCenter(),o=[],a=this.options.keepBuffer,l=new N(r.getBottomLeft().subtract([a,-a]),r.getTopRight().add([a,-a]));if(!(isFinite(r.min.x)&&isFinite(r.min.y)&&isFinite(r.max.x)&&isFinite(r.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var c=this._tiles[h].coords;c.z===this._tileZoom&&l.contains(new P(c.x,c.y))||(this._tiles[h].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var u=r.min.y;u<=r.max.y;u++)for(var d=r.min.x;d<=r.max.x;d++){var p=new P(d,u);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:o.push(p)}}if(o.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==o.length){this._loading||(this._loading=!0,this.fire("loading"));var A=document.createDocumentFragment();for(d=0;d<o.length;d++)this._addTile(o[d],A);this._level.el.appendChild(A)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return k(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),r=i.add(n);return[e.unproject(i,t.z),e.unproject(r,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new F(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new P(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ge(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){Ee(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,Ft.ielt9&&this.options.opacity<1&&we(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&w(r(this._tileReady,this,t,null,s)),Te(s,n),this._tiles[i]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(we(n.el,0),S(this._fadeFrame),this._fadeFrame=w(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(Ee(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ft.ielt9||!this._map._fadeAnimated?w(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new P(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new N(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Qi(t){return new ki(t)}var zi=ki.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Ft.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return ke(n,"load",r(this._tileOnLoad,this,e,n)),ke(n,"error",r(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Ft.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return g(this._url,n(e,this.options))},_tileOnLoad:function(t,e){Ft.ielt9?setTimeout(r(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,!e.complete)){e.src=v;var n=this._tiles[t].coords;ge(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",v),ki.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==v))return ki.prototype._tileReady.call(this,t,e,n)}});function Gi(t,e){return new zi(t,e)}var Hi=zi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var r in e)r in this.options||(i[r]=e[r]);var s=(e=p(this,e)).detectRetina&&Ft.retina?2:1,o=this.getTileSize();i.width=o.x*s,i.height=o.y*s,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,zi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=O(n.project(e[0]),n.project(e[1])),r=i.min,s=i.max,o=(this._wmsVersion>=1.3&&this._crs===Wn?[r.y,r.x,s.y,s.x]:[r.x,r.y,s.x,s.y]).join(","),a=zi.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+o},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Vi(t,e){return new Hi(t,e)}zi.WMS=Hi,Gi.wms=Vi;var ji=Xn.extend({options:{padding:.1},initialize:function(t){p(this,t),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Ee(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),s=i.multiplyBy(-n).add(r).subtract(this._map._getNewPixelOrigin(t,e));Ft.any3d?Me(this._container,s,n):Te(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new N(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Wi=ji.extend({options:{tolerance:0},getEvents:function(){var t=ji.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ji.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ke(t,"mousemove",this._onMouseMove,this),ke(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ke(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){S(this._redrawRequest),delete this._ctx,ge(this._container),ze(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){ji.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Ft.retina?2:1;Te(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Ft.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ji.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[o(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[o(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),r=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;r.push(e)}t.options._dashArray=r}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||w(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new N,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,r,s,o=t._parts,a=o.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,r=o[n].length;i<r;i++)s=o[n][i],l[i?"lineTo":"moveTo"](s.x,s.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),r=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==r&&(n.save(),n.scale(1,r)),n.beginPath(),n.arc(e.x,e.y/r,i,0,2*Math.PI,!1),1!==r&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),r=this._drawFirst;r;r=r.next)(e=r.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(n=e);this._fireEvent(!!n&&[n],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(xe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,s=this._drawFirst;s;s=s.next)(n=s.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(Ee(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(r((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function qi(t){return Ft.canvas?new Wi(t):null}var Xi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Yi={_initContainer:function(){this._container=Ae("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ji.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Xi("shape");Ee(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Xi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ge(e),t.removeInteractiveTarget(e),delete this._layers[o(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,r=t._container;r.stroked=!!i.stroke,r.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Xi("stroke")),r.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=m(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(r.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Xi("fill")),r.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(r.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){_e(t._container)},_bringToBack:function(t){ve(t._container)}},Ki=Ft.vml?Xi:Z,Zi=ji.extend({_initContainer:function(){this._container=Ki("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ki("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ge(this._container),ze(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){ji.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Te(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Ki("path");t.options.className&&Ee(e,t.options.className),t.options.interactive&&Ee(e,"leaflet-interactive"),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ge(t._path),t.removeInteractiveTarget(t._path),delete this._layers[o(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,J(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",r=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,r)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){_e(t._path)},_bringToBack:function(t){ve(t._path)}});function Ji(t){return Ft.svg||Ft.vml?new Zi(t):null}Ft.vml&&Zi.include(Yi),sn.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&qi(t)||Ji(t)}});var $i=di.extend({initialize:function(t,e){di.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=k(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function tr(t,e){return new $i(t,e)}Zi.create=Ki,Zi.pointsToPath=J,fi.geometryToLayer=Ai,fi.coordsToLatLng=mi,fi.coordsToLatLngs=_i,fi.latLngToCoords=vi,fi.latLngsToCoords=yi,fi.getFeature=Ei,fi.asFeature=xi,sn.mergeOptions({boxZoom:!0});var er=_n.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){ze(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ge(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),se(),Pe(),this._startPoint=this._map.mouseEventToContainerPoint(t),ke(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=Ae("div","leaflet-zoom-box",this._container),Ee(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new N(this._point,this._startPoint),n=e.getSize();Te(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ge(this._box),xe(this._container,"leaflet-crosshair")),oe(),De(),ze(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0);var e=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});sn.addInitHook("addHandler","boxZoom",er),sn.mergeOptions({doubleClickZoom:!0});var nr=_n.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,r=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(r):e.setZoomAround(t.containerPoint,r)}});sn.addInitHook("addHandler","doubleClickZoom",nr),sn.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ir=_n.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new En(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}Ee(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){xe(this._map._container,"leaflet-grab"),xe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=k(this._map.options.maxBounds);this._offsetLimit=O(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,r=(i-e+n)%t+e-n,s=(i+e+n)%t-e-n,o=Math.abs(r+n)<Math.abs(s+n)?r:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=o},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var r=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,o=n.easeLinearity,a=r.multiplyBy(o/s),l=a.distanceTo([0,0]),h=Math.min(n.inertiaMaxSpeed,l),c=a.multiplyBy(h/l),u=h/(n.inertiaDeceleration*o),d=c.multiplyBy(-u/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),w((function(){e.panBy(d,{duration:u,easeLinearity:o,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});sn.addInitHook("addHandler","dragging",ir),sn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var rr=_n.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),ke(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),ze(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},r=this.keyCodes;for(e=0,n=r.left.length;e<n;e++)i[r.left[e]]=[-1*t,0];for(e=0,n=r.right.length;e<n;e++)i[r.right[e]]=[t,0];for(e=0,n=r.down.length;e<n;e++)i[r.down[e]]=[0,t];for(e=0,n=r.up.length;e<n;e++)i[r.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},r=this.keyCodes;for(e=0,n=r.zoomIn.length;e<n;e++)i[r.zoomIn[e]]=t;for(e=0,n=r.zoomOut.length;e<n;e++)i[r.zoomOut[e]]=-t},_addHooks:function(){ke(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){ze(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(e=this._panKeys[n],t.shiftKey&&(e=U(e).multiplyBy(3)),i.options.maxBounds&&(e=i._limitOffset(U(e),i.options.maxBounds)),i.options.worldCopyJump){var r=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(e)));i.panTo(r)}else i.panBy(e)}else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Ke(t)}}});sn.addInitHook("addHandler","keyboard",rr),sn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var sr=_n.extend({addHooks:function(){ke(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){ze(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=tn(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(r(this._performZoom,this),i),Ke(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),r=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,s=n?Math.ceil(r/n)*n:r,o=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,o&&("center"===t.options.scrollWheelZoom?t.setZoom(e+o):t.setZoomAround(this._lastMousePos,e+o))}});sn.addInitHook("addHandler","scrollWheelZoom",sr);var or=600;sn.mergeOptions({tapHold:Ft.touchNative&&Ft.safari&&Ft.mobile,tapTolerance:15});var ar=_n.extend({addHooks:function(){ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){ze(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new P(e.clientX,e.clientY),this._holdTimeout=setTimeout(r((function(){this._cancel(),this._isTapValid()&&(ke(document,"touchend",Ye),ke(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),or),ke(document,"touchend touchcancel contextmenu",this._cancel,this),ke(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){ze(document,"touchend",Ye),ze(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),ze(document,"touchend touchcancel contextmenu",this._cancel,this),ze(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new P(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});sn.addInitHook("addHandler","tapHold",ar),sn.mergeOptions({touchZoom:Ft.touch,bounceAtZoomLimits:!0});var lr=_n.extend({addHooks:function(){Ee(this._map._container,"leaflet-touch-zoom"),ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),ze(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),ke(document,"touchmove",this._onTouchMove,this),ke(document,"touchend touchcancel",this._onTouchEnd,this),Ye(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),s=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMin
2Zoom()&&s<1||this._zoom>e.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var o=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===o.x&&0===o.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),S(this._animRequest);var a=r(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=w(a,this,!0),Ye(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,S(this._animRequest),ze(document,"touchmove",this._onTouchMove,this),ze(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});sn.addInitHook("addHandler","touchZoom",lr),sn.BoxZoom=er,sn.DoubleClickZoom=nr,sn.Drag=ir,sn.Keyboard=rr,sn.ScrollWheelZoom=sr,sn.TapHold=ar,sn.TouchZoom=lr,t.Bounds=N,t.Browser=Ft,t.CRS=H,t.Canvas=Wi,t.Circle=li,t.CircleMarker=oi,t.Class=M,t.Control=an,t.DivIcon=Oi,t.DivOverlay=Pi,t.DomEvent=nn,t.DomUtil=Fe,t.Draggable=En,t.Evented=R,t.FeatureGroup=Zn,t.GeoJSON=fi,t.GridLayer=ki,t.Handler=_n,t.Icon=$n,t.ImageOverlay=Si,t.LatLng=Q,t.LatLngBounds=F,t.Layer=Xn,t.LayerGroup=Yn,t.LineUtil=zn,t.Map=sn,t.Marker=ii,t.Mixin=vn,t.Path=si,t.Point=P,t.PolyUtil=Sn,t.Polygon=di,t.Polyline=ci,t.Popup=Di,t.PosAnimation=rn,t.Projection=Vn,t.Rectangle=$i,t.Renderer=ji,t.SVG=Zi,t.SVGOverlay=Bi,t.TileLayer=zi,t.Tooltip=Ui,t.Transformation=q,t.Util=I,t.VideoOverlay=Mi,t.bind=r,t.bounds=O,t.canvas=qi,t.circle=hi,t.circleMarker=ai,t.control=ln,t.divIcon=Fi,t.extend=n,t.featureGroup=Jn,t.geoJSON=bi,t.geoJson=wi,t.gridLayer=Qi,t.icon=ti,t.imageOverlay=Ii,t.latLng=z,t.latLngBounds=k,t.layerGroup=Kn,t.map=on,t.marker=ri,t.point=U,t.polygon=pi,t.polyline=ui,t.popup=Li,t.rectangle=tr,t.setOptions=p,t.stamp=o,t.svg=Ji,t.svgOverlay=Ri,t.tileLayer=Gi,t.tooltip=Ni,t.transformation=X,t.version=e,t.videoOverlay=Ti;var hr=window.L;t.noConflict=function(){return window.L=hr,this},window.L=t}(e)},829:(t,e,n)=>{"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function r(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],i=!0,r=!1,s=void 0;try{for(var o,a=t[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,s=t}finally{try{i||null==a.return||a.return()}finally{if(r)throw s}}return n}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function d(t,e){return Object.getOwnPropertyNames(Object(t)).reduce((function(n,i){var r=Object.getOwnPropertyDescriptor(Object(t),i),s=Object.getOwnPropertyDescriptor(Object(e),i);return Object.defineProperty(n,i,s||r)}),{})}function p(t){return"string"==typeof t}function f(t){return Array.isArray(t)}function A(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=d(e);
vendor: 4,619 bytes, line 2
2return void 0!==n.types?t=n.types:void 0!==n.split&&(t=n.split),void 0!==t&&(n.types=(p(t)||f(t)?String(t):"").split(",").map((function(t){return String(t).trim()})).filter((function(t){return/((line)|(word)|(char))/i.test(t)}))),(n.absolute||n.position)&&(n.absolute=n.absolute||/absolute/.test(e.position)),n}function g(t){var e=p(t)||f(t)?String(t):"";return{none:!e,lines:/line/i.test(e),words:/word/i.test(e),chars:/char/i.test(e)}}function m(t){return null!==t&&"object"==typeof t}function _(t){return m(t)&&/^(1|3|11)$/.test(t.nodeType)}function v(t){return f(t)?t:null==t?[]:function(t){return m(t)&&function(t){return"number"==typeof t&&t>-1&&t%1==0}(t.length)}(t)?Array.prototype.slice.call(t):[t]}function y(t){var e=t;return p(t)&&(e=/^(#[a-z]\w+)$/.test(t.trim())?document.getElementById(t.trim().slice(1)):document.querySelectorAll(t)),v(e).reduce((function(t,e){return[].concat(h(t),h(v(e).filter(_)))}),[])}n.d(e,{Z:()=>nt}),function(){function t(){for(var t=arguments.length,e=0;e<t;e++){var n=e<0||arguments.length<=e?void 0:arguments[e];1===n.nodeType||11===n.nodeType?this.appendChild(n):this.appendChild(document.createTextNode(String(n)))}}function e(){for(;this.lastChild;)this.removeChild(this.lastChild);arguments.length&&this.append.apply(this,arguments)}function n(){for(var t=this.parentNode,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var r=n.length;if(t)for(r||t.removeChild(this);r--;){var s=n[r];"object"!=typeof s?s=this.ownerDocument.createTextNode(s):s.parentNode&&s.parentNode.removeChild(s),r?t.insertBefore(this.previousSibling,s):t.replaceChild(s,this)}}"undefined"!=typeof Element&&(Element.prototype.append||(Element.prototype.append=t,DocumentFragment.prototype.append=t),Element.prototype.replaceChildren||(Element.prototype.replaceChildren=e,DocumentFragment.prototype.replaceChildren=e),Element.prototype.replaceWith||(Element.prototype.replaceWith=n,DocumentFragment.prototype.replaceWith=n))}();var E=Object.entries,x="_splittype",C={},b=0;function w(t,e,n){if(!m(t))return console.warn("[data.set] owner is not an object"),null;var i=t[x]||(t[x]=++b),r=C[i]||(C[i]={});return void 0===n?e&&Object.getPrototypeOf(e)===Object.prototype&&(C[i]=a(a({},r),e)):void 0!==e&&(r[e]=n),n}function S(t,e){var n=m(t)?t[x]:null,i=n&&C[n]||{};return void 0===e?i:i[e]}function I(t){var e=t&&t[x];e&&(delete t[e],delete C[e])}var M="\\ud800-\\udfff",T="\\u0300-\\u036f\\ufe20-\\ufe23",B="\\u20d0-\\u20f0",R="\\ufe0e\\ufe0f",P="[".concat(M,"]"),D="[".concat(T).concat(B,"]"),L="\\ud83c[\\udffb-\\udfff]",U="(?:".concat(D,"|").concat(L,")"),N="[^".concat(M,"]"),O="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",k="\\u200d",Q="".concat(U,"?"),z="[".concat(R,"]?"),G=z+Q+("(?:"+k+"(?:"+[N,O,F].join("|")+")"+z+Q+")*"),H="(?:".concat(["".concat(N).concat(D,"?"),D,O,F,P].join("|"),"\n)"),V=RegExp("".concat(L,"(?=").concat(L,")|").concat(H).concat(G),"g"),j=RegExp("[".concat([k,M,T,B,R].join(""),"]"));function W(t){return j.test(t)}function q(t){return W(t)?function(t){return t.match(V)||[]}(t):function(t){return t.split("")}(t)}function X(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(t=null==(e=t)?"":String(e))&&p(t)&&!n&&W(t)?q(t):t.split(n)}function Y(t,e){var n=document.createElement(t);return e?(Object.keys(e).forEach((function(t){var i=e[t],r=p(i)?i.trim():i;null!==r&&""!==r&&("children"===t?n.append.apply(n,h(v(r))):n.setAttribute(t,r))})),n):n}var K={splitClass:"",lineClass:"line",wordClass:"word",charClass:"char",types:["lines","words","chars"],absolute:!1,tagName:"div"};function Z(t,e){var n,i=g((e=d(K,e)).types),r=e.tagName,s=t.nodeValue,o=document.createDocumentFragment(),a=[];return/^\s/.test(s)&&o.append(" "),n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return(t?String(t):"").trim().replace(/\s+/g," ").split(e)}(s).reduce((function(t,n,s,l){var c,u;return i.chars&&(u=X(n).map((function(t){var n=Y(r,{class:"".concat(e.splitClass," ").concat(e.charClass),style:"display: inline-block;",children:t});return w(n,"isChar",!0),a=[].concat(h(a),[n]),n}))),i.words||i.lines?(w(c=Y(r,{class:"".concat(e.wordClass," ").concat(e.splitClass),style:"display: inline-block; ".concat(i.words&&e.absolute?"position: relative;":""),children:i.chars?u:n}),{isWord:!0,isWordStart:!0,isWordEnd:!0}),o.appendChild(c)):u.forEach((function(t){o.appendChild(t)})),s<l.length-1&&o.append(" "),i.words?t.concat(c):t}),[]),/\s$/.test(s)&&o.append(" "),t.replaceWith(o),{words:n,chars:a}}function J(t,e){var n=t.nodeType,i={words:[],chars:[]};if(!/(1|3|11)/.test(n))return i;
2if(3===n&&/\S/.test(t.nodeValue))return Z(t,e);var r=v(t.childNodes);if(r.length&&(w(t,"isSplit",!0),!S(t).isRoot)){t.style.display="inline-block",t.style.position="relative";var s=t.nextSibling,o=t.previousSibling,a=t.textContent||"",l=s?s.textContent:" ",c=o?o.textContent:" ";w(t,{isWordEnd:/\s$/.test(a)||/^\s/.test(l),isWordStart:/^\s/.test(a)||/\s$/.test(c)})}return r.reduce((function(t,n){var i=J(n,e),r=i.words,s=i.chars;return{words:[].concat(h(t.words),h(r)),chars:[].concat(h(t.chars),h(s))}}),i)}function $(t){S(t).isWord?(I(t),t.replaceWith.apply(t,h(t.childNodes))):v(t.children).forEach((function(t){return $(t)}))}function tt(t,e,n){var i,r,s,o=g(e.types),a=e.tagName,h=t.getElementsByTagName("*"),c=[],u=[],d=null,p=[],f=t.parentElement,A=t.nextElementSibling,m=document.createDocumentFragment(),_=window.getComputedStyle(t),y=_.textAlign,E=.2*parseFloat(_.fontSize);return e.absolute&&(s={left:t.offsetLeft,top:t.offsetTop,width:t.offsetWidth},r=t.offsetWidth,i=t.offsetHeight,w(t,{cssWidth:t.style.width,cssHeight:t.style.height})),v(h).forEach((function(i){var r=i.parentElement===t,s=function(t,e,n,i){if(!n.absolute)return{top:e?t.offsetTop:null};var r=t.offsetParent,s=l(i,2),o=s[0],a=s[1],h=0,c=0;if(r&&r!==document.body){var u=r.getBoundingClientRect();h=u.x+o,c=u.y+a}var d=t.getBoundingClientRect(),p=d.width,f=d.height,A=d.x;return{width:p,height:f,top:d.y+a-c,left:A+o-h}}(i,r,e,n),a=s.width,h=s.height,p=s.top,f=s.left;/^br$/i.test(i.nodeName)||(o.lines&&r&&((null===d||p-d>=E)&&(d=p,c.push(u=[])),u.push(i)),e.absolute&&w(i,{top:p,left:f,width:a,height:h}))})),f&&f.removeChild(t),o.lines&&(p=c.map((function(t){var n=Y(a,{class:"".concat(e.splitClass," ").concat(e.lineClass),style:"display: block; text-align: ".concat(y,"; width: 100%;")});w(n,"isLine",!0);var i={height:0,top:1e4};return m.appendChild(n),t.forEach((function(t,e,r){var s=S(t),o=s.isWordEnd,a=s.top,l=s.height,h=r[e+1];i.height=Math.max(i.height,l),i.top=Math.min(i.top,a),n.appendChild(t),o&&S(h).isWordStart&&n.append(" ")})),e.absolute&&w(n,{height:i.height,top:i.top}),n})),o.words||$(m),t.replaceChildren(m)),e.absolute&&(t.style.width="".concat(t.style.width||r,"px"),t.style.height="".concat(i,"px"),v(h).forEach((function(t){var e=S(t),n=e.isLine,i=e.top,r=e.left,o=e.width,a=e.height,l=S(t.parentElement),h=!n&&l.isLine;t.style.top="".concat(h?i-l.top:i,"px"),t.style.left="".concat(n?s.left:r-(h?s.left:0),"px"),t.style.height="".concat(a,"px"),t.style.width="".concat(n?s.width:o,"px"),t.style.position="absolute"}))),f&&(A?f.insertBefore(t,A):f.appendChild(t)),p}var et=d(K,{}),nt=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.isSplit=!1,this.settings=d(et,A(n)),this.elements=y(e),this.split()}return r(t,null,[{key:"clearData",value:function(){Object.keys(C).forEach((function(t){delete C[t]}))}},{key:"setDefaults",value:function(t){return et=d(et,A(t)),K}},{key:"revert",value:function(t){y(t).forEach((function(t){var e=S(t),n=e.isSplit,i=e.html,r=e.cssWidth,s=e.cssHeight;n&&(t.innerHTML=i,t.style.width=r||"",t.style.height=s||"",I(t))}))}},{key:"create",value:function(e,n){return new t(e,n)}},{key:"data",get:function(){return C}},{key:"defaults",get:function(){return et},set:function(t){et=d(et,A(t))}}]),r(t,[{key:"split",value:function(t){var e=this;this.revert(),this.elements.forEach((function(t){w(t,"html",t.innerHTML)})),this.lines=[],this.words=[],this.chars=[];var n=[window.pageXOffset,window.pageYOffset];void 0!==t&&(this.settings=d(this.settings,A(t)));var i=g(this.settings.types);i.none||(this.elements.forEach((function(t){w(t,"isRoot",!0);var n=J(t,e.settings),i=n.words,r=n.chars;e.words=[].concat(h(e.words),h(i)),e.chars=[].concat(h(e.chars),h(r))})),this.elements.forEach((function(t){if(i.lines||e.settings.absolute){var r=tt(t,e.settings,n);e.lines=[].concat(h(e.lines),h(r))}})),this.isSplit=!0,window.scrollTo(n[0],n[1]),E(C).forEach((function(t){var e=l(t,2),n=e[0],i=e[1],r=i.isRoot,s=i.isSplit;r&&s||(C[n]=null,delete C[n])})))}},{key:"revert",value:function(){this.isSplit&&(this.lines=null,this.words=null,this.chars=null,this.isSplit=!1),t.revert(this.elements)}}]),t}()},251:(t,e,n)=>{"use strict";t=n.nmd(t);var i,r=Object.create,s=Object.defineProperty,o=Object.defineProperties,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,u=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,f=(t,e,n)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A=(t,e)=>{for(var n in e||(e={}))d.call(e,n)&&f(t,n,e[n]);if(c)for(var n of c(e))p.call(e,n)&&f(t,n,e[n]);return t},g=(t,e)=>o(t,l(e)),m=(t,e)=>function(){return e||(0,t[h(t)[0]])((e={exports:{}}).exports,e),e.exports},_=(t,e)=>{for(var n in e)s(t,n,{get:e[n],enumerable:!0})},v=(t,e,n,i)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let r of h(e))d.call(t,r)||r===n||s(t,r,{get:()=>e[r],enumerable:!(i=a(e,r))||i.enumerable});return t},y=(t,e,n)=>(n=null!=t?r(u(t)):{},v(!e&&t&&t.__esModule?n:s(n,"default",{value:t,enumerable:!0}),t)),E=(t,e,n)=>(f(t,"symbol"!=typeof e?e+"":e,n),n),x=m({"../node_modules/timing-function/lib/UnitBezier.js"(t,e){e.exports=function(){function t(t,e,n,i){this.set(t,e,n,i)}return t.prototype.set=function(t,e,n,i){this._cx=3*t,this._bx=3*(n-t)-this._cx,this._ax=1-this._cx-this._bx,this._cy=3*e,this._by=3*(i-e)-this._cy,this._ay=1-this._cy-this._by},t.epsilon=1e-6,t.prototype._sampleCurveX=function(t){return((this._ax*t+this._bx)*t+this._cx)*t},t.prototype._sampleCurveY=function(t){return((this._ay*t+this._by)*t+this._cy)*t},t.prototype._sampleCurveDerivativeX=function(t){return(3*this._ax*t+2*this._bx)*t+this._cx}
2,t.prototype._solveCurveX=function(t,e){var n,i,r,s,o,a;for(r=void 0,s=void 0,o=void 0,a=void 0,n=void 0,i=void 0,o=t,i=0;i<8;){if(a=this._sampleCurveX(o)-t,Math.abs(a)<e)return o;if(n=this._sampleCurveDerivativeX(o),Math.abs(n)<e)break;o-=a/n,i++}if((o=t)<(r=0))return r;if(o>(s=1))return s;for(;r<s;){if(a=this._sampleCurveX(o),Math.abs(a-t)<e)return o;t>a?r=o:s=o,o=.5*(s-r)+r}return o},t.prototype.solve=function(t,e){return this._sampleCurveY(this._solveCurveX(t,e))},t.prototype.solveSimple=function(t){return this._sampleCurveY(this._solveCurveX(t,1e-6))},t}()}}),C=m({"../node_modules/levenshtein-edit-distance/index.js"(t,e){var n,i;n=[],i=[],e.exports=function(t,e,r){var s,o,a,l,h,c,u,d;if(t===e)return 0;if(s=t.length,o=e.length,0===s)return o;if(0===o)return s;for(r&&(t=t.toLowerCase(),e=e.toLowerCase()),u=0;u<s;)i[u]=t.charCodeAt(u),n[u]=++u;for(d=0;d<o;)for(a=e.charCodeAt(d),l=h=d++,u=-1;++u<s;)c=a===i[u]?h:h+1,h=n[u],n[u]=l=h>l?c>l?l+1:c:c>h?h+1:c;return l}}}),b=m({"../node_modules/propose/propose.js"(t,e){var n=C();e.exports=function(){var t,e,i,r,s,o=0,a=arguments[0],l=arguments[1],h=l.length,c=arguments[2];c&&(r=c.threshold,s=c.ignoreCase),void 0===r&&(r=0);for(var u=0;u<h;++u)(t=(e=s?n(a,l[u],!0):n(a,l[u]))>a.length?1-e/l[u].length:1-e/a.length)>o&&(o=t,i=l[u]);return o>=r?i:null}}}),w=m({"../node_modules/fast-deep-equal/index.js"(t,e){e.exports=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var i,r,s;if(Array.isArray(e)){if((i=e.length)!=n.length)return!1;for(r=i;0!=r--;)if(!t(e[r],n[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((i=(s=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=i;0!=r--;){var o=s[r];if(!t(e[o],n[o]))return!1}return!0}return e!=e&&n!=n}}}),S={};_(S,{createRafDriver:()=>Ao,getProject:()=>al,notify:()=>co,onChange:()=>hl,types:()=>bo,val:()=>cl}),t.exports=(i=S,v(s({},"__esModule",{value:!0}),i));var I={};_(I,{createRafDriver:()=>Ao,getProject:()=>al,notify:()=>co,onChange:()=>hl,types:()=>bo,val:()=>cl});var M=n(771),T=new class{constructor(){E(this,"atom",new M.Atom({projects:{}}))}add(t,e){this.atom.setByPointer((e=>e.projects[t]),e)}get(t){return this.atom.get().projects[t]}has(t){return!!this.get(t)}},B=new WeakMap;function R(t){return B.get(t)}function P(t,e){B.set(t,e)}var D=[],L=Array.isArray,U="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,N="object"==typeof self&&self&&self.Object===Object&&self,O=U||N||Function("return this")(),F=O.Symbol,k=Object.prototype,Q=k.hasOwnProperty,z=k.toString,G=F?F.toStringTag:void 0;var H=function(t){var e=Q.call(t,G),n=t[G];try{t[G]=void 0;var i=!0}catch(t){}var r=z.call(t);return i&&(e?t[G]=n:delete t[G]),r},V=Object.prototype.toString;var j=function(t){return V.call(t)},W=F?F.toStringTag:void 0;var q=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":W&&W in Object(t)?H(t):j(t)};var X=function(t){return null!=t&&"object"==typeof t};var Y=function(t){return"symbol"==typeof t||X(t)&&"[object Symbol]"==q(t)},K=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/;var J=function(t,e){if(L(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Y(t))||(Z.test(t)||!K.test(t)||null!=e&&t in Object(e))};var $=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var tt,et=function(t){if(!$(t))return!1;var e=q(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},nt=O["__core-js_shared__"],it=(tt=/[^.]+$/.exec(nt&&nt.keys&&nt.keys.IE_PROTO||""))?"Symbol(src)_1."+tt:"";var rt=function(t){return!!it&&it in t},st=Function.prototype.toString;var ot=function(t){if(null!=t){try{return st.call(t)}catch(t){}try{return t+""}catch(t){}}return""},at=/^\[object .+?Constructor\]$/,lt=Function.prototype,ht=Object.prototype,ct=lt.toString,ut=ht.hasOwnProperty,dt=RegExp("^"+ct.call(ut).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var pt=function(t){return!(!$(t)||rt(t))&&(et(t)?dt:at).test(ot(t))};var ft=function(t,e){return null==t?void 0:t[e]};var At=function(t,e){var n=ft(t,e);return pt(n)?n:void 0},gt=At(Object,"create");var mt=function(){this.__data__=gt?gt(null):{},this.size=0};var _t=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},vt=Object.prototype.hasOwnProperty;var yt=function(t){var e=this.__data__;if(gt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return vt.call(e,t)?e[t]:void 0},Et=Object.prototype.hasOwnProperty;var xt=function(t){var e=this.__data__;return gt?void 0!==e[t]:Et.call(e,t)};var Ct=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=gt&&void 0===e?"__lodash_hash_undefined__":e,this};function bt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}bt.prototype.clear=mt,bt.prototype.delete=_t,bt.prototype.get=yt,bt.prototype.has=xt,bt.prototype.set=Ct;var wt=bt;var St=function(){this.__data__=[],this.size=0};var It=function(t,e){return t===e||t!=t&&e!=e};var Mt=function(t,e){for(var n=t.length;n--;)if(It(t[n][0],e))return n;return-1},Tt=Array.prototype.splice;var Bt=function(t){var e=this.__data__,n=Mt(e,t);return!(n<0)&&(n==e.length-1?e.pop():Tt.call(e,n,1),--this.size,!0)};var Rt=function(t){var e=this.__data__,n=Mt(e,t);return n<0?void 0:e[n][1]};var Pt=function(t){return Mt(this.__data__,t)>-1}
2;var Dt=function(t,e){var n=this.__data__,i=Mt(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};function Lt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Lt.prototype.clear=St,Lt.prototype.delete=Bt,Lt.prototype.get=Rt,Lt.prototype.has=Pt,Lt.prototype.set=Dt;var Ut=Lt,Nt=At(O,"Map");var Ot=function(){this.size=0,this.__data__={hash:new wt,map:new(Nt||Ut),string:new wt}};var Ft=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var kt=function(t,e){var n=t.__data__;return Ft(e)?n["string"==typeof e?"string":"hash"]:n.map};var Qt=function(t){var e=kt(this,t).delete(t);return this.size-=e?1:0,e};var zt=function(t){return kt(this,t).get(t)};var Gt=function(t){return kt(this,t).has(t)};var Ht=function(t,e){var n=kt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this};function Vt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Vt.prototype.clear=Ot,Vt.prototype.delete=Qt,Vt.prototype.get=zt,Vt.prototype.has=Gt,Vt.prototype.set=Ht;var jt=Vt;function Wt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=t.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(Wt.Cache||jt),n}Wt.Cache=jt;var qt=Wt;var Xt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yt=/\\(\\)?/g,Kt=function(t){var e=qt(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Xt,(function(t,n,i,r){e.push(i?r.replace(Yt,"$1"):n||t)})),e}));var Zt=function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r},Jt=F?F.prototype:void 0,$t=Jt?Jt.toString:void 0;var te=function t(e){if("string"==typeof e)return e;if(L(e))return Zt(e,t)+"";if(Y(e))return $t?$t.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n};var ee=function(t){return null==t?"":te(t)};var ne=function(t,e){return L(t)?t:J(t,e)?[t]:Kt(ee(t))};var ie=function(t){if("string"==typeof t||Y(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var re=function(t,e){for(var n=0,i=(e=ne(e,t)).length;null!=t&&n<i;)t=t[ie(e[n++])];return n&&n==i?t:void 0};var se=function(t,e,n){var i=null==t?void 0:re(t,e);return void 0===i?n:i};function oe(t,e){return 0===e.length?t:se(t,e)}var ae=class{constructor(){E(this,"_values",{})}get(t,e){if(this.has(t))return this._values[t];{const n=e();return this._values[t]=n,n}}has(t){return this._values.hasOwnProperty(t)}},le=n(771),he=function(){try{var t=At(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var ce=function(t,e,n){"__proto__"==e&&he?he(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},ue=Object.prototype.hasOwnProperty;var de=function(t,e,n){var i=t[e];ue.call(t,e)&&It(i,n)&&(void 0!==n||e in t)||ce(t,e,n)},pe=/^(?:0|[1-9]\d*)$/;var fe=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&pe.test(t))&&t>-1&&t%1==0&&t<e};var Ae=function(t,e,n,i){if(!$(t))return t;for(var r=-1,s=(e=ne(e,t)).length,o=s-1,a=t;null!=a&&++r<s;){var l=ie(e[r]),h=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(r!=o){var c=a[l];void 0===(h=i?i(c,l,a):void 0)&&(h=$(c)?c:fe(e[r+1])?[]:{})}de(a,l,h),a=a[l]}return t};var ge=function(t,e,n){return null==t?t:Ae(t,e,n)},me=new WeakMap;function _e(t){if(me.has(t))return me.get(t);const e="compound"===t.type?function(t){const e={};for(const[n,i]of Object.entries(t.props))e[n]=_e(i);return e}(t):"enum"===t.type?function(t){const e={$case:t.defaultCase};for(const[n,i]of Object.entries(t.cases))e[n]=_e(i);return e}(t):t.default;return me.set(t,e),e}var ve=n(771),ye=y(x());function Ee(t,e,n){return(0,ve.prism)((()=>{const i=(0,ve.val)(e),r=ve.prism.memo("driver",(()=>
2i?"BasicKeyframedTrack"===i.type?function(t,e,n){return(0,ve.prism)((()=>{let t=ve.prism.ref("state",{started:!1}),i=t.current;const r=n.getValue();return(!i.started||r<i.validFrom||i.validTo<=r)&&(t.current=i=function(t,e,n){const i=e.getValue();if(0===n.keyframes.length)return{started:!0,validFrom:-1/0,validTo:1/0,der:xe};let r=0;for(;;){const t=n.keyframes[r];if(!t)return Ce.error;const s=r===n.keyframes.length-1;if(i<t.position)return 0===r?Ce.beforeFirstKeyframe(t):Ce.error;if(t.position===i)return s?Ce.lastKeyframe(t):Ce.between(t,n.keyframes[r+1],e);if(r===n.keyframes.length-1)return Ce.lastKeyframe(t);{const s=r+1;if(n.keyframes[s].position<=i){r=s;continue}return Ce.between(t,n.keyframes[r+1],e)}}}(0,n,e)),i.der.getValue()}))}(0,i,n):(t.logger.error("Track type not yet supported."),(0,ve.prism)((()=>{}))):(0,ve.prism)((()=>{}))),[i]);return r.getValue()}))}var xe=(0,ve.prism)((()=>{}));var Ce={beforeFirstKeyframe:t=>({started:!0,validFrom:-1/0,validTo:t.position,der:(0,ve.prism)((()=>({left:t.value,progression:0})))}),lastKeyframe:t=>({started:!0,validFrom:t.position,validTo:1/0,der:(0,ve.prism)((()=>({left:t.value,progression:0})))}),between(t,e,n){if(!t.connectedRight)return{started:!0,validFrom:t.position,validTo:e.position,der:(0,ve.prism)((()=>({left:t.value,progression:0})))};const i=n=>(n-t.position)/(e.position-t.position);if(!t.type||"bezier"===t.type){const r=new ye.default(t.handles[2],t.handles[3],e.handles[0],e.handles[1]),s=(0,ve.prism)((()=>{const s=i(n.getValue()),o=r.solveSimple(s);return{left:t.value,right:e.value,progression:o}}));return{started:!0,validFrom:t.position,validTo:e.position,der:s}}const r=(0,ve.prism)((()=>{const r=i(n.getValue()),s=Math.floor(r);return{left:t.value,right:e.value,progression:s}}));return{started:!0,validFrom:t.position,validTo:e.position,der:r}},error:{started:!0,validFrom:-1/0,validTo:1/0,der:xe}};function be(t,e,n){const i=n.get(t);if(i&&i.override===e)return i.merged;const r=A({},t);for(const i of Object.keys(e)){const s=e[i],o=t[i];r[i]="object"==typeof s&&"object"==typeof o?be(o,s,n):void 0===s?o:s}return n.set(t,{override:e,merged:r}),r}function we(t,e){let n=t;for(const t of e)n=n[t];return n}var Se=n(771),Ie=n(771),Me=n(771),Te=/\s/;var Be=function(t){for(var e=t.length;e--&&Te.test(t.charAt(e)););return e},Re=/^\s+/;var Pe=function(t){return t?t.slice(0,Be(t)+1).replace(Re,""):t},De=/^[-+]0x[0-9a-f]+$/i,Le=/^0b[01]+$/i,Ue=/^0o[0-7]+$/i,Ne=parseInt;var Oe=function(t){if("number"==typeof t)return t;if(Y(t))return NaN;if($(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=$(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Pe(t);var n=Le.test(t);return n||Ue.test(t)?Ne(t.slice(2),n?2:8):De.test(t)?NaN:+t},Fe=1/0;var ke=function(t){return t?(t=Oe(t))===Fe||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};var Qe=function(t){var e=ke(t),n=e%1;return e==e?n?e-n:e:0};var ze=function(t){return t},Ge=At(O,"WeakMap"),He=Object.create,Ve=function(){function t(){}return function(e){if(!$(e))return{};if(He)return He(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var je=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e};var We=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););return t};var qe=function(t,e,n,i){var r=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=i?i(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),r?ce(n,a,l):de(n,a,l)}return n};var Xe=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var Ye=function(t){return null!=t&&Xe(t.length)&&!et(t)},Ke=Object.prototype;var Ze=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ke)};var Je=function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i};var $e=function(t){return X(t)&&"[object Arguments]"==q(t)},tn=Object.prototype,en=tn.hasOwnProperty,nn=tn.propertyIsEnumerable,rn=$e(function(){return arguments}
vendor: 6,252 bytes, line 2
2())?$e:function(t){return X(t)&&en.call(t,"callee")&&!nn.call(t,"callee")};var sn=function(){return!1},on=e&&!e.nodeType&&e,an=on&&t&&!t.nodeType&&t,ln=an&&an.exports===on?O.Buffer:void 0,hn=(ln?ln.isBuffer:void 0)||sn,cn={};cn["[object Float32Array]"]=cn["[object Float64Array]"]=cn["[object Int8Array]"]=cn["[object Int16Array]"]=cn["[object Int32Array]"]=cn["[object Uint8Array]"]=cn["[object Uint8ClampedArray]"]=cn["[object Uint16Array]"]=cn["[object Uint32Array]"]=!0,cn["[object Arguments]"]=cn["[object Array]"]=cn["[object ArrayBuffer]"]=cn["[object Boolean]"]=cn["[object DataView]"]=cn["[object Date]"]=cn["[object Error]"]=cn["[object Function]"]=cn["[object Map]"]=cn["[object Number]"]=cn["[object Object]"]=cn["[object RegExp]"]=cn["[object Set]"]=cn["[object String]"]=cn["[object WeakMap]"]=!1;var un=function(t){return X(t)&&Xe(t.length)&&!!cn[q(t)]};var dn=function(t){return function(e){return t(e)}},pn=e&&!e.nodeType&&e,fn=pn&&t&&!t.nodeType&&t,An=fn&&fn.exports===pn&&U.process,gn=function(){try{var t=fn&&fn.require&&fn.require("util").types;return t||An&&An.binding&&An.binding("util")}catch(t){}}(),mn=gn&&gn.isTypedArray,_n=mn?dn(mn):un,vn=Object.prototype.hasOwnProperty;var yn=function(t,e){var n=L(t),i=!n&&rn(t),r=!n&&!i&&hn(t),s=!n&&!i&&!r&&_n(t),o=n||i||r||s,a=o?Je(t.length,String):[],l=a.length;for(var h in t)!e&&!vn.call(t,h)||o&&("length"==h||r&&("offset"==h||"parent"==h)||s&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||fe(h,l))||a.push(h);return a};var En=function(t,e){return function(n){return t(e(n))}},xn=En(Object.keys,Object),Cn=Object.prototype.hasOwnProperty;var bn=function(t){if(!Ze(t))return xn(t);var e=[];for(var n in Object(t))Cn.call(t,n)&&"constructor"!=n&&e.push(n);return e};var wn=function(t){return Ye(t)?yn(t):bn(t)};var Sn=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},In=Object.prototype.hasOwnProperty;var Mn=function(t){if(!$(t))return Sn(t);var e=Ze(t),n=[];for(var i in t)("constructor"!=i||!e&&In.call(t,i))&&n.push(i);return n};var Tn=function(t){return Ye(t)?yn(t,!0):Mn(t)};var Bn=function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t},Rn=En(Object.getPrototypeOf,Object),Pn=Function.prototype,Dn=Object.prototype,Ln=Pn.toString,Un=Dn.hasOwnProperty,Nn=Ln.call(Object);var On=function(t){if(!X(t)||"[object Object]"!=q(t))return!1;var e=Rn(t);if(null===e)return!0;var n=Un.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ln.call(n)==Nn};var Fn=function(t,e,n){var i=-1,r=t.length;e<0&&(e=-e>r?0:r+e),(n=n>r?r:n)<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(r);++i<r;)s[i]=t[i+e];return s};var kn=function(t,e,n){var i=t.length;return n=void 0===n?i:n,!e&&n>=i?t:Fn(t,e,n)},Qn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var zn=function(t){return Qn.test(t)};var Gn=function(t){return t.split("")},Hn="\\ud800-\\udfff",Vn="["+Hn+"]",jn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Wn="\\ud83c[\\udffb-\\udfff]",qn="[^"+Hn+"]",Xn="(?:\\ud83c[\\udde6-\\uddff]){2}",Yn="[\\ud800-\\udbff][\\udc00-\\udfff]",Kn="(?:"+jn+"|"+Wn+")"+"?",Zn="[\\ufe0e\\ufe0f]?",Jn=Zn+Kn+("(?:\\u200d(?:"+[qn,Xn,Yn].join("|")+")"+Zn+Kn+")*"),$n="(?:"+[qn+jn+"?",jn,Xn,Yn,Vn].join("|")+")",ti=RegExp(Wn+"(?="+Wn+")|"+$n+Jn,"g");var ei=function(t){return t.match(ti)||[]};var ni=function(t){return zn(t)?ei(t):Gn(t)};var ii=function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t};var ri=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=Oe(n))==n?n:0),void 0!==e&&(e=(e=Oe(e))==e?e:0),ii(Oe(t),e,n)};var si=function(){this.__data__=new Ut,this.size=0};var oi=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};var ai=function(t){return this.__data__.get(t)};var li=function(t){return this.__data__.has(t)};var hi=function(t,e){var n=this.__data__;if(n instanceof Ut){var i=n.__data__;if(!Nt||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new jt(i)}return n.set(t,e),this.size=n.size,this};function ci(t){var e=this.__data__=new Ut(t);this.size=e.size}ci.prototype.clear=si,ci.prototype.delete=oi,ci.prototype.get=ai,ci.prototype.has=li,ci.prototype.set=hi;var ui=ci;var di=function(t,e){return t&&qe(e,wn(e),t)};var pi=function(t,e){return t&&qe(e,Tn(e),t)},fi=e&&!e.nodeType&&e,Ai=fi&&t&&!t.nodeType&&t,gi=Ai&&Ai.exports===fi?O.Buffer:void 0,mi=gi?gi.allocUnsafe:void 0;var _i=function(t,e){if(e)return t.slice();var n=t.length,i=mi?mi(n):new t.constructor(n);return t.copy(i),i};var vi=function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,s=[];++n<i;){var o=t[n];e(o,n,t)&&(s[r++]=o)}return s};var yi=function(){return[]},Ei=Object.prototype.propertyIsEnumerable,xi=Object.getOwnPropertySymbols,Ci=xi?function(t){return null==t?[]:(t=Object(t),vi(xi(t),(function(e){return Ei.call(t,e)})))}:yi;var bi=function(t,e){return qe(t,Ci(t),e)},wi=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Bn(e,Ci(t)),t=Rn(t);return e}:yi;var Si=function(t,e){return qe(t,wi(t),e)};var Ii=function(t,e,n){var i=e(t);return L(t)?i:Bn(i,n(t))};var Mi=function(t){return Ii(t,wn,Ci)};var Ti=function(t){return Ii(t,Tn,wi)},Bi=At(O,"DataView"),Ri=At(O,"Promise"),Pi=At(O,"Set"),Di="[object Map]",Li="[object Promise]",Ui="[object Set]",Ni="[object WeakMap]",Oi="[object DataView]",Fi=ot(Bi),ki=ot(Nt),Qi=ot(Ri),zi=ot(Pi),Gi=ot(Ge),Hi=q;(Bi&&Hi(new Bi(new ArrayBuffer(1)))!=Oi||Nt&&Hi(new Nt)!=Di||Ri&&Hi(Ri.resolve())!=Li||Pi&&Hi(new Pi)!=Ui||Ge&&Hi(new Ge)!=Ni)&&(Hi=function(t){var e=q(t),n="[object Object]"==e?t.constructor:void 0,i=n?ot(n):"";if(i)switch(i){case Fi:return Oi;case ki:return Di;case Qi:return Li;case zi:return Ui;case Gi:return Ni}return e});var Vi=Hi,ji=Object.prototype.hasOwnProperty;var Wi=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ji.call(t,"index")&&(n.index=t.index,n.input=t.input),n},qi=O.Uint8Array;var Xi=function(t){var e=new t.constructor(t.byteLength);return new qi(e).set(new qi(t)),e};var Yi=function(t,e){var n=e?Xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)},Ki=/\w*$/;var Zi=function(t){var e=new t.constructor(t.source,Ki.exec(t));return e.lastIndex=t.lastIndex,e}
vendor: 5,321 bytes, line 2
2,Ji=F?F.prototype:void 0,$i=Ji?Ji.valueOf:void 0;var tr=function(t){return $i?Object($i.call(t)):{}};var er=function(t,e){var n=e?Xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)};var nr=function(t,e,n){var i=t.constructor;switch(e){case"[object ArrayBuffer]":return Xi(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return Yi(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return er(t,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return Zi(t);case"[object Symbol]":return tr(t)}};var ir=function(t){return"function"!=typeof t.constructor||Ze(t)?{}:Ve(Rn(t))};var rr=function(t){return X(t)&&"[object Map]"==Vi(t)},sr=gn&&gn.isMap,or=sr?dn(sr):rr;var ar=function(t){return X(t)&&"[object Set]"==Vi(t)},lr=gn&&gn.isSet,hr=lr?dn(lr):ar,cr="[object Arguments]",ur="[object Function]",dr="[object Object]",pr={};pr[cr]=pr["[object Array]"]=pr["[object ArrayBuffer]"]=pr["[object DataView]"]=pr["[object Boolean]"]=pr["[object Date]"]=pr["[object Float32Array]"]=pr["[object Float64Array]"]=pr["[object Int8Array]"]=pr["[object Int16Array]"]=pr["[object Int32Array]"]=pr["[object Map]"]=pr["[object Number]"]=pr[dr]=pr["[object RegExp]"]=pr["[object Set]"]=pr["[object String]"]=pr["[object Symbol]"]=pr["[object Uint8Array]"]=pr["[object Uint8ClampedArray]"]=pr["[object Uint16Array]"]=pr["[object Uint32Array]"]=!0,pr["[object Error]"]=pr[ur]=pr["[object WeakMap]"]=!1;var fr=function t(e,n,i,r,s,o){var a,l=1&n,h=2&n,c=4&n;if(i&&(a=s?i(e,r,s,o):i(e)),void 0!==a)return a;if(!$(e))return e;var u=L(e);if(u){if(a=Wi(e),!l)return je(e,a)}else{var d=Vi(e),p=d==ur||"[object GeneratorFunction]"==d;if(hn(e))return _i(e,l);if(d==dr||d==cr||p&&!s){if(a=h||p?{}:ir(e),!l)return h?Si(e,pi(a,e)):bi(e,di(a,e))}else{if(!pr[d])return s?e:{};a=nr(e,d,l)}}o||(o=new ui);var f=o.get(e);if(f)return f;o.set(e,a),hr(e)?e.forEach((function(r){a.add(t(r,n,i,r,e,o))})):or(e)&&e.forEach((function(r,s){a.set(s,t(r,n,i,s,e,o))}));var A=u?void 0:(c?h?Ti:Mi:h?Tn:wn)(e);return We(A||e,(function(r,s){A&&(r=e[s=r]),de(a,s,t(r,n,i,s,e,o))})),a};var Ar=function(t){return fr(t,5)};var gr=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var mr=function(t){return this.__data__.has(t)};function _r(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new jt;++e<n;)this.add(t[e])}_r.prototype.add=_r.prototype.push=gr,_r.prototype.has=mr;var vr=_r;var yr=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1};var Er=function(t,e){return t.has(e)};var xr=function(t,e,n,i,r,s){var o=1&n,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var h=s.get(t),c=s.get(e);if(h&&c)return h==e&&c==t;var u=-1,d=!0,p=2&n?new vr:void 0;for(s.set(t,e),s.set(e,t);++u<a;){var f=t[u],A=e[u];if(i)var g=o?i(A,f,u,e,t,s):i(f,A,u,t,e,s);if(void 0!==g){if(g)continue;d=!1;break}if(p){if(!yr(e,(function(t,e){if(!Er(p,e)&&(f===t||r(f,t,n,i,s)))return p.push(e)}))){d=!1;break}}else if(f!==A&&!r(f,A,n,i,s)){d=!1;break}}return s.delete(t),s.delete(e),d};var Cr=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n};var br=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},wr=F?F.prototype:void 0,Sr=wr?wr.valueOf:void 0;var Ir=function(t,e,n,i,r,s,o){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!s(new qi(t),new qi(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return It(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=Cr;case"[object Set]":var l=1&i;if(a||(a=br),t.size!=e.size&&!l)return!1;var h=o.get(t);if(h)return h==e;i|=2,o.set(t,e);var c=xr(a(t),a(e),i,r,s,o);return o.delete(t),c;case"[object Symbol]":if(Sr)return Sr.call(t)==Sr.call(e)}return!1},Mr=Object.prototype.hasOwnProperty;var Tr=function(t,e,n,i,r,s){var o=1&n,a=Mi(t),l=a.length;if(l!=Mi(e).length&&!o)return!1;for(var h=l;h--;){var c=a[h];if(!(o?c in e:Mr.call(e,c)))return!1}var u=s.get(t),d=s.get(e);if(u&&d)return u==e&&d==t;var p=!0;s.set(t,e),s.set(e,t);for(var f=o;++h<l;){var A=t[c=a[h]],g=e[c];if(i)var m=o?i(g,A,c,e,t,s):i(A,g,c,t,e,s);if(!(void 0===m?A===g||r(A,g,n,i,s):m)){p=!1;break}f||(f="constructor"==c)}if(p&&!f){var _=t.constructor,v=e.constructor;_==v||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof v&&v instanceof v||(p=!1)}return s.delete(t),s.delete(e),p},Br="[object Arguments]",Rr="[object Array]",Pr="[object Object]",Dr=Object.prototype.hasOwnProperty;var Lr=function(t,e,n,i,r,s){var o=L(t),a=L(e),l=o?Rr:Vi(t),h=a?Rr:Vi(e),c=(l=l==Br?Pr:l)==Pr,u=(h=h==Br?Pr:h)==Pr,d=l==h;if(d&&hn(t)){if(!hn(e))return!1;o=!0,c=!1}if(d&&!c)return s||(s=new ui),o||_n(t)?xr(t,e,n,i,r,s):Ir(t,e,l,n,i,r,s);if(!(1&n)){var p=c&&Dr.call(t,"__wrapped__"),f=u&&Dr.call(e,"__wrapped__");
2if(p||f){var A=p?t.value():t,g=f?e.value():e;return s||(s=new ui),r(A,g,n,i,s)}}return!!d&&(s||(s=new ui),Tr(t,e,n,i,r,s))};var Ur=function t(e,n,i,r,s){return e===n||(null==e||null==n||!X(e)&&!X(n)?e!=e&&n!=n:Lr(e,n,i,r,t,s))};var Nr=function(t,e,n,i){var r=n.length,s=r,o=!i;if(null==t)return!s;for(t=Object(t);r--;){var a=n[r];if(o&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++r<s;){var l=(a=n[r])[0],h=t[l],c=a[1];if(o&&a[2]){if(void 0===h&&!(l in t))return!1}else{var u=new ui;if(i)var d=i(h,c,l,t,e,u);if(!(void 0===d?Ur(c,h,3,i,u):d))return!1}}return!0};var Or=function(t){return t==t&&!$(t)};var Fr=function(t){for(var e=wn(t),n=e.length;n--;){var i=e[n],r=t[i];e[n]=[i,r,Or(r)]}return e};var kr=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}};var Qr=function(t){var e=Fr(t);return 1==e.length&&e[0][2]?kr(e[0][0],e[0][1]):function(n){return n===t||Nr(n,t,e)}};var zr=function(t,e){return null!=t&&e in Object(t)};var Gr=function(t,e,n){for(var i=-1,r=(e=ne(e,t)).length,s=!1;++i<r;){var o=ie(e[i]);if(!(s=null!=t&&n(t,o)))break;t=t[o]}return s||++i!=r?s:!!(r=null==t?0:t.length)&&Xe(r)&&fe(o,r)&&(L(t)||rn(t))};var Hr=function(t,e){return null!=t&&Gr(t,e,zr)};var Vr=function(t,e){return J(t)&&Or(e)?kr(ie(t),e):function(n){var i=se(n,t);return void 0===i&&i===e?Hr(n,t):Ur(e,i,3)}};var jr=function(t){return function(e){return null==e?void 0:e[t]}};var Wr=function(t){return function(e){return re(e,t)}};var qr=function(t){return J(t)?jr(ie(t)):Wr(t)};var Xr=function(t){return"function"==typeof t?t:null==t?ze:"object"==typeof t?L(t)?Vr(t[0],t[1]):Qr(t):qr(t)};var Yr=function(t){return function(e,n,i){for(var r=-1,s=Object(e),o=i(e),a=o.length;a--;){var l=o[t?a:++r];if(!1===n(s[l],l,s))break}return e}}();var Kr=function(t,e){return t&&Yr(t,e,wn)},Zr=function(){return O.Date.now()},Jr=Math.max,$r=Math.min;var ts=function(t,e,n){var i,r,s,o,a,l,h=0,c=!1,u=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var n=i,s=r;return i=r=void 0,h=e,o=t.apply(s,n)}function f(t){var n=t-l;return void 0===l||n>=e||n<0||u&&t-h>=s}function A(){var t=Zr();if(f(t))return g(t);a=setTimeout(A,function(t){var n=e-(t-l);return u?$r(n,s-(t-h)):n}(t))}function g(t){return a=void 0,d&&i?p(t):(i=r=void 0,o)}function m(){var t=Zr(),n=f(t);if(i=arguments,r=this,l=t,n){if(void 0===a)return function(t){return h=t,a=setTimeout(A,e),c?p(t):o}(l);if(u)return clearTimeout(a),a=setTimeout(A,e),p(l)}return void 0===a&&(a=setTimeout(A,e)),o}return e=Oe(e)||0,$(n)&&(c=!!n.leading,s=(u="maxWait"in n)?Jr(Oe(n.maxWait)||0,e):s,d="trailing"in n?!!n.trailing:d),m.cancel=function(){void 0!==a&&clearTimeout(a),h=0,i=l=r=a=void 0},m.flush=function(){return void 0===a?o:g(Zr())},m};var es=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};var ns=function(t,e){return e.length<2?t:re(t,Fn(e,0,-1))};var is=function(t){return"number"==typeof t&&t==Qe(t)};var rs=function(t,e){var n={};return e=Xr(e,3),Kr(t,(function(t,i,r){ce(n,i,e(t,i,r))})),n};var ss=function(t,e){return e=ne(e,t),null==(t=ns(t,e))||delete t[ie(es(e))]},os=Math.floor;var as=function(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=os(e/2))&&(t+=t)}while(e);return n},ls=jr("length"),hs="\\ud800-\\udfff",cs="["+hs+"]",us="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ds="\\ud83c[\\udffb-\\udfff]",ps="[^"+hs+"]",fs="(?:\\ud83c[\\udde6-\\uddff]){2}",As="[\\ud800-\\udbff][\\udc00-\\udfff]",gs="(?:"+us+"|"+ds+")"+"?",ms="[\\ufe0e\\ufe0f]?",_s=ms+gs+("(?:\\u200d(?:"+[ps,fs,As].join("|")+")"+ms+gs+")*"),vs="(?:"+[ps+us+"?",us,fs,As,cs].join("|")+")",ys=RegExp(ds+"(?="+ds+")|"+vs+_s,"g");var Es=function(t){for(var e=ys.lastIndex=0;ys.test(t);)++e;return e};var xs=function(t){return zn(t)?Es(t):ls(t)},Cs=Math.ceil;var bs=function(t,e){var n=(e=void 0===e?" ":te(e)).length;if(n<2)return n?as(e,t):e;var i=as(e,Cs(t/xs(e)));return zn(e)?kn(ni(i),0,t).join(""):i.slice(0,t)};var ws=function(t,e,n){t=ee(t);var i=(e=Qe(e))?xs(t):0;return e&&i<e?bs(e-i,n)+t:t};var Ss=function(t,e){return null==t||ss(t,e)};function Is(t){const e=new WeakMap;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}function Ms(t){return"compound"===t.type||"enum"===t.type}function Ts(t,e){if(!t)return;const[n,...i]=e;if(void 0===n)return t;if(!Ms(t))return;return Ts("enum"===t.type?t.cases[n]:t.props[n],i)}var Bs=Is((t=>{if("enum"===t.type)throw new Error("Not implemented yet for enums");for(const e in t.props){const n=t.props[e];if(!Ms(n))return!0;
2if(Bs(n))return!0}return!1}));function Rs(t){return function(e,n){return t(e,n())}}var Ps={_hmm:Ds(524),_todo:Ds(522),_error:Ds(521),errorDev:Ds(529),errorPublic:Ds(545),_kapow:Ds(268),_warn:Ds(265),warnDev:Ds(273),warnPublic:Ds(289),_debug:Ds(137),debugDev:Ds(145),_trace:Ds(73),traceDev:Ds(81)};function Ds(t){return Object.freeze({audience:Ls(t,8)?"internal":Ls(t,16)?"dev":"public",category:Ls(t,4)?"troubleshooting":Ls(t,2)?"todo":"general",level:Ls(t,512)?512:Ls(t,256)?256:Ls(t,128)?128:64})}function Ls(t,e){return(t&e)===e}function Us(t,e){return(32==(32&e)||(16==(16&e)?t.dev:8==(8&e)&&t.internal))&&t.min<=e}var Ns={loggingConsoleStyle:!0,loggerConsoleStyle:!0,includes:Object.freeze({internal:!1,dev:!1,min:256}),filtered:function(){},include:function(){return{}},create:null,creatExt:null,named(t,e,n){return this.create({names:[...t.names,{name:e,key:n}]})},style:{bold:void 0,italic:void 0,cssMemo:new Map([["",""]]),collapseOnRE:/[a-z- ]+/g,color:void 0,collapsed(t){if(t.length<5)return t;const e=t.replace(this.collapseOnRE,"");return this.cssMemo.has(e)||this.cssMemo.set(e,this.css(t)),e},css(t){var e,n,i,r;const s=this.cssMemo.get(t);if(s)return s;let o="color:".concat(null!=(n=null==(e=this.color)?void 0:e.call(this,t))?n:"hsl(".concat((t.charCodeAt(0)+t.charCodeAt(t.length-1))%360,", 100%, 60%)"));return(null==(i=this.bold)?void 0:i.test(t))&&(o+=";font-weight:600"),(null==(r=this.italic)?void 0:r.test(t))&&(o+=";font-style:italic"),this.cssMemo.set(t,o),o}}};function Os(t=console,e={}){const n=g(A({},Ns),{includes:A({},Ns.includes)}),i={styled:Qs.bind(n,t),noStyle:zs.bind(n,t)},r=ks.bind(n);function s(){return n.loggingConsoleStyle&&n.loggerConsoleStyle?i.styled:i.noStyle}return n.create=s(),{configureLogger(t){var e;"console"===t?(n.loggerConsoleStyle=Ns.loggerConsoleStyle,n.create=s()):"console"===t.type?(n.loggerConsoleStyle=null!=(e=t.style)?e:Ns.loggerConsoleStyle,n.create=s()):"keyed"===t.type?(n.creatExt=e=>t.keyed(e.names),n.create=r):"named"===t.type&&(n.creatExt=Fs.bind(null,t.named),n.create=r)},configureLogging(t){var e,i,r,o,a;n.includes.dev=null!=(e=t.dev)?e:Ns.includes.dev,n.includes.internal=null!=(i=t.internal)?i:Ns.includes.internal,n.includes.min=null!=(r=t.min)?r:Ns.includes.min,n.include=null!=(o=t.include)?o:Ns.include,n.loggingConsoleStyle=null!=(a=t.consoleStyle)?a:Ns.loggingConsoleStyle,n.create=s()},getLogger:()=>n.create({names:[]})}}function Fs(t,e){const n=[];for(let{name:t,key:i}of e.names)n.push(null==i?t:"".concat(t," (").concat(i,")"));return t(n)}function ks(t){const e=A(A({},this.includes),this.include(t)),n=this.filtered,i=this.named.bind(this,t),r=this.creatExt(t),s=Us(e,524),o=Us(e,522),a=Us(e,521),l=Us(e,529),h=Us(e,545),c=Us(e,265),u=Us(e,268),d=Us(e,273),p=Us(e,289),f=Us(e,137),g=Us(e,145),m=Us(e,73),_=Us(e,81),v=s?r.error.bind(r,Ps._hmm):n.bind(t,524),y=o?r.error.bind(r,Ps._todo):n.bind(t,522),E=a?r.error.bind(r,Ps._error):n.bind(t,521),x=l?r.error.bind(r,Ps.errorDev):n.bind(t,529),C=h?r.error.bind(r,Ps.errorPublic):n.bind(t,545),b=u?r.warn.bind(r,Ps._kapow):n.bind(t,268),w=c?r.warn.bind(r,Ps._warn):n.bind(t,265),S=d?r.warn.bind(r,Ps.warnDev):n.bind(t,273),I=p?r.warn.bind(r,Ps.warnPublic):n.bind(t,273),M=f?r.debug.bind(r,Ps._debug):n.bind(t,137),T=g?r.debug.bind(r,Ps.debugDev):n.bind(t,145),B=m?r.trace.bind(r,Ps._trace):n.bind(t,73),R=_?r.trace.bind(r,Ps.traceDev):n.bind(t,81),P={_hmm:v,_todo:y,_error:E,errorDev:x,errorPublic:C,_kapow:b,_warn:w,warnDev:S,warnPublic:I,_debug:M,debugDev:T,_trace:B,traceDev:R,lazy:{_hmm:s?Rs(v):v,_todo:o?Rs(y):y,_error:a?Rs(E):E,errorDev:l?Rs(x):x,errorPublic:h?Rs(C):C,_kapow:u?Rs(b):b,_warn:c?Rs(w):w,warnDev:d?Rs(S):S,warnPublic:p?Rs(I):I,_debug:f?Rs(M):M,debugDev:g?Rs(T):T,_trace:m?Rs(B):B,traceDev:_?Rs(R):R},named:i,utilFor:{internal:()=>({debug:P._debug,error:P._error,warn:P._warn,trace:P._trace,named:(t,e)=>P.named(t,e).utilFor.internal()}),dev:()=>({debug:P.debugDev,error:P.errorDev,warn:P.warnDev,trace:P.traceDev,named:(t,e)=>P.named(t,e).utilFor.dev()}),public:()=>({error:P.errorPublic,warn:P.warnPublic,debug(t,e){P._warn('(public "debug" filtered out) '.concat(t),e)},trace(t,e){P._warn('(public "trace" filtered out) '.concat(t),e)},named:(t,e)=>P.named(t,e).utilFor.public()})}};return P}function Qs(t,e){const n=A(A({},this.includes),this.include(e)),i=[];let r="";for(let t=0;t<e.names.length;t++){const{name:n,key:s}=e.names[t];if(r+=" %c".concat(n),i.push(this.style.css(n)),null!=s){const t="%c#".concat(s);r+=t,i.push(this.style.css(t))}}const s=this.filtered,o=this.named.bind(this,e),a=[r,...i];return Gs(s,e,n,t,a,function(t){const e=t.slice(0);for(let t=1;t<e.length;t++)e[t]+=";background-color:#e0005a;padding:2px;color:white";return e}(a),o)}function zs(t,e){const n=A(A({},this.includes),this.include(e));let i="";for(let t=0;t<e.names.length;t++){const{name:n,key:r}=e.names[t];i+=" ".concat(n),null!=r&&(i+="#".concat(r))}const r=[i];return Gs(this.filtered,e,n,t,r,r,this.named.bind(this,e))}function Gs(t,e,n,i,r,s,o){const a=Us(n,524),l=Us(n,522),h=Us(n,521),c=Us(n,529),u=Us(n,545),d=Us(n,265),p=Us(n,268),f=Us(n,273),A=Us(n,289),g=Us(n,137),m=Us(n,145),_=Us(n,73),v=Us(n,81),y=a?i.error.bind(i,...r):t.bind(e,524),E=l?i.error.bind(i,...r):t.bind(e,522),x=h?i.error.bind(i,...r):t.bind(e,521),C=c?i.error.bind(i,...r):t.bind(e,529),b=u?i.error.bind(i,...r):t.bind(e,545),w=p?i.warn.bind(i,...s):t.bind(e,268),S=d?i.warn.bind(i,...r):t.bind(e,265),I=f?i.warn.bind(i,...r):t.bind(e,273),M=A?i.warn.bind(i,...r):t.bind(e,273),T=g?i.info.bind(i,...r):t.bind(e,137),B=m?i.info.bind(i,...r):t.bind(e,145),R=_?i.debug.bind(i,...r):t.bind(e,73),P=v?i.debug.bind(i,...r):t.bind(e,81),D={_hmm:y,_todo:E,_error:x,errorDev:C,errorPublic:b,_kapow:w,_warn:S,warnDev:I,warnPublic:M,_debug:T,debugDev:B,_trace:R,traceDev:P,lazy:{_hmm:a?Rs(y):y,_todo:l?Rs(E):E,_error:h?Rs(x):x,errorDev:c?Rs(C):C,errorPublic:u?Rs(b):b,_k
2apow:p?Rs(w):w,_warn:d?Rs(S):S,warnDev:f?Rs(I):I,warnPublic:A?Rs(M):M,_debug:g?Rs(T):T,debugDev:m?Rs(B):B,_trace:_?Rs(R):R,traceDev:v?Rs(P):P},named:o,utilFor:{internal:()=>({debug:D._debug,error:D._error,warn:D._warn,trace:D._trace,named:(t,e)=>D.named(t,e).utilFor.internal()}),dev:()=>({debug:D.debugDev,error:D.errorDev,warn:D.warnDev,trace:D.traceDev,named:(t,e)=>D.named(t,e).utilFor.dev()}),public:()=>({error:D.errorPublic,warn:D.warnPublic,debug(t,e){D._warn('(public "debug" filtered out) '.concat(t),e)},trace(t,e){D._warn('(public "trace" filtered out) '.concat(t),e)},named:(t,e)=>D.named(t,e).utilFor.public()})}};return D}var Hs=Os(console,{_debug:function(){},_error:function(){}});Hs.configureLogging({dev:!0,min:64});var Vs=Hs.getLogger().named("Theatre.js (default logger)").utilFor.dev(),js=new WeakMap;function Ws(t,e,n){for(const[i,r]of Object.entries(e.props))if(!Ms(r)){const e=[...t,i];n.set(JSON.stringify(e),n.size),qs(e,r,n)}for(const[i,r]of Object.entries(e.props))if(Ms(r)){const e=[...t,i];n.set(JSON.stringify(e),n.size),qs(e,r,n)}}function qs(t,e,n){if("compound"===e.type)Ws(t,e,n);else{if("enum"===e.type)throw new Error("Enums aren't supported yet");n.set(JSON.stringify(t),n.size)}}function Xs(t){return"object"==typeof t&&null!==t&&0===Object.keys(t).length}function Ys(t){try{return JSON.parse(t)}catch(e){return void Vs.warn("property ".concat(JSON.stringify(t)," cannot be parsed. Skipping."))}}var Ks=n(771),Zs=Is((t=>JSON.stringify(t)));y(b());var Js=class extends Error{},$s=class extends Js{},to=n(771),eo=n(771),no=n(771),io=n(771);function ro(){let t,e;const n=new Promise(((n,r)=>{t=t=>{n(t),i.status="resolved"},e=t=>{r(t),i.status="rejected"}})),i={resolve:t,reject:e,promise:n,status:"pending"};return i}var so=()=>{},oo=n(771),ao=n(771),lo="__TheatreJS_CoreBundle",ho=t=>(...e)=>{var n;switch(t){case"success":case"info":Vs.debug(e.slice(0,2).join("\n"));break;case"warning":Vs.warn(e.slice(0,2).join("\n"))}return"undefined"!=typeof window?null==(n=window.__TheatreJS_Notifications)?void 0:n.notify[t](...e):void 0},co={warning:ho("warning"),success:ho("success"),info:ho("info"),error:ho("error")};"undefined"!=typeof window&&(window.addEventListener("error",(t=>{co.error("An error occurred","<pre>".concat(t.message,"</pre>\n\nSee **console** for details."))})),window.addEventListener("unhandledrejection",(t=>{co.error("An error occurred","<pre>".concat(t.reason,"</pre>\n\nSee **console** for details."))})));var uo,po=n(771),fo=0;function Ao(t){var e;const n=new po.Ticker({onActive(){var e;null==(e=null==t?void 0:t.start)||e.call(t)},onDormant(){var e;null==(e=null==t?void 0:t.stop)||e.call(t)}}),i={tick:t=>{n.tick(t)},id:fo++,name:null!=(e=null==t?void 0:t.name)?e:"CustomRafDriver-".concat(fo),type:"Theatre_RafDriver_PublicAPI"};return P(i,{type:"Theatre_RafDriver_PrivateAPI",publicApi:i,ticker:n,start:null==t?void 0:t.start,stop:null==t?void 0:t.stop}),i}function go(){return uo||function(t){if(uo)throw new Error("`setCoreRafDriver()` is already called.");const e=R(t);uo=e}(function(){let t=null;const e=Ao({name:"DefaultCoreRafDriver",start:()=>{if("undefined"!=typeof window){const n=i=>{e.tick(i),t=window.requestAnimationFrame(n)};t=window.requestAnimationFrame(n)}else e.tick(0),setTimeout((()=>e.tick(1)),0)},stop:()=>{"undefined"!=typeof window&&null!==t&&window.cancelAnimationFrame(t)}});return e}()),uo}function mo(){return go().ticker}vo("Theatre_Project"),vo("Theatre_Sheet"),vo("Theatre_SheetTemplate");var _o=vo("Theatre_SheetObject");vo("Theatre_Sequence"),vo("Theatre_SheetObjectTemplate"),vo("Theatre_Project_PublicAPI"),vo("Theatre_Sheet_PublicAPI"),vo("Theatre_SheetObject_PublicAPI");function vo(t){return e=>"object"==typeof e&&!!e&&e.type===t}var yo=class{constructor(t){this._fps=t}formatSubUnitForGrid(t){const e=t%1,n=1/this._fps;return Math.round(e/n)+"f"}formatFullUnitForGrid(t){let e=t,n="";if(e>=Co){n+=Math.floor(e/Co)+"h",e%=Co}if(e>=xo){n+=Math.floor(e/xo)+"m",e%=xo}if(e>=Eo){n+=Math.floor(e/Eo)+"s",e%=Eo}const i=1/this._fps;if(e>=i){n+=Math.floor(e/i)+"f",e%=i}return 0===n.length?"0s":n}formatForPlayhead(t){let e=t,n="";if(e>=Co){const t=Math.floor(e/Co);n+=ws(t.toString(),2,"0")+"h",e%=Co}if(e>=xo){const t=Math.floor(e/xo);n+=ws(t.toString(),2,"0")+"m",e%=xo}else n.length>0&&(n+="00m");if(e>=Eo){const t=Math.floor(e/Eo);n+=ws(t.toString(),2,"0")+"s",e%=Eo}else n+="00s";const i=1/this._fps;
2if(e>=i){const t=Math.round(e/i);n+=ws(t.toString(),2,"0")+"f",e%=i}else if(e/i>.98){n+=ws(1..toString(),2,"0")+"f",e%=i}else n+="00f";return 0===n.length?"00s00f":n}formatBasic(t){return t.toFixed(2)+"s"}},Eo=1,xo=60*Eo,Co=60*xo,bo={};function wo(t,e){return t.length<=e?t:t.substr(0,e-3)+"..."}_(bo,{boolean:()=>Wo,compound:()=>Lo,file:()=>Uo,image:()=>Oo,number:()=>ko,rgba:()=>Ho,string:()=>Yo,stringLiteral:()=>Zo});var So=t=>"string"==typeof t?'string("'.concat(wo(t,10),'")'):"number"==typeof t?"number(".concat(wo(String(t),10),")"):null===t?"null":void 0===t?"undefined":"boolean"==typeof t?String(t):Array.isArray(t)?"array":"object"==typeof t?"object":"unknown";function Io(t){return g(A({},t),{toString(){return function(t,{removeAlphaIfOpaque:e=!1}={}){const n=(255*t.a|256).toString(16).slice(1),i=(255*t.r|256).toString(16).slice(1)+(255*t.g|256).toString(16).slice(1)+(255*t.b|256).toString(16).slice(1)+(e&&"ff"===n?"":n);return"#".concat(i)}(this,{removeAlphaIfOpaque:!0})}})}function Mo(t){function e(t){return t>=.0031308?1.055*t**(1/2.4)-.055:12.92*t}return function(t){return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,ri(e,0,1)])))}({r:e(t.r),g:e(t.g),b:e(t.b),a:t.a})}function To(t){function e(t){return t>=.04045?((t+.055)/1.055)**2.4:t/12.92}return{r:e(t.r),g:e(t.g),b:e(t.b),a:t.a}}function Bo(t){let e=.4122214708*t.r+.5363325363*t.g+.0514459929*t.b,n=.2119034982*t.r+.6806995451*t.g+.1073969566*t.b,i=.0883024619*t.r+.2817188376*t.g+.6299787005*t.b,r=Math.cbrt(e),s=Math.cbrt(n),o=Math.cbrt(i);return{L:.2104542553*r+.793617785*s-.0040720468*o,a:1.9779984951*r-2.428592205*s+.4505937099*o,b:.0259040371*r+.7827717662*s-.808675766*o,alpha:t.a}}var Ro=Symbol("TheatrePropType_Basic");function Po(t){return"object"==typeof t&&!!t&&"TheatrePropType"===t[Ro]}function Do(t){if("number"==typeof t)return ko(t);if("boolean"==typeof t)return Wo(t);if("string"==typeof t)return Yo(t);if("object"==typeof t&&t){if(Po(t))return t;if(On(t))return Lo(t);throw new $s("This value is not a valid prop type: ".concat(So(t)))}throw new $s("This value is not a valid prop type: ".concat(So(t)))}var Lo=(t,e={})=>{const n=function(t){const e={};for(const n of Object.keys(t)){const i=t[n];Po(i)?e[n]=i:e[n]=Do(i)}return e}(t),i=new WeakMap;return{type:"compound",props:n,valueType:null,[Ro]:"TheatrePropType",label:e.label,default:rs(n,(t=>t.default)),deserializeAndSanitize:t=>{if("object"!=typeof t||!t)return;if(i.has(t))return i.get(t);const e={};let r=!1;for(const[i,s]of Object.entries(n))if(Object.prototype.hasOwnProperty.call(t,i)){const n=s.deserializeAndSanitize(t[i]);null!=n&&(r=!0,e[i]=n)}return i.set(t,e),r?e:void 0}}},Uo=(t,e={})=>{return{type:"file",default:{type:"file",id:t},valueType:null,[Ro]:"TheatrePropType",label:e.label,interpolate:(t,n,i)=>{var r;return{type:"file",id:(null!=(r=e.interpolate)?r:Xo)(t.id,n.id,i)}},deserializeAndSanitize:No}},No=t=>{if(!t)return;let e=!0;return"string"==typeof t.id||[null,void 0].includes(t.id)||(e=!1),"file"!==t.type&&(e=!1),e?t:void 0},Oo=(t,e={})=>{return{type:"image",default:{type:"image",id:t},valueType:null,[Ro]:"TheatrePropType",label:e.label,interpolate:(t,n,i)=>{var r;return{type:"image",id:(null!=(r=e.interpolate)?r:Xo)(t.id,n.id,i)}},deserializeAndSanitize:Fo}},Fo=t=>{if(!t)return;let e=!0;return"string"==typeof t.id||[null,void 0].includes(t.id)||(e=!1),"image"!==t.type&&(e=!1),e?t:void 0},ko=(t,e={})=>{var n;return g(A({type:"number",valueType:0,default:t,[Ro]:"TheatrePropType"},e||{}),{label:e.label,nudgeFn:null!=(n=e.nudgeFn)?n:Jo,nudgeMultiplier:"number"==typeof e.nudgeMultiplier?e.nudgeMultiplier:void 0,interpolate:Go,deserializeAndSanitize:Qo(e.range)})},Qo=t=>t?e=>{if("number"==typeof e&&isFinite(e))return ri(e,t[0],t[1])}:zo,zo=t=>"number"==typeof t&&isFinite(t)?t:void 0,Go=(t,e,n)=>t+n*(e-t),Ho=(t={r:0,g:0,b:0,a:1},e={})=>{const n={};for(const e of["r","g","b","a"])n[e]=Math.min(Math.max(t[e],0),1);return{type:"rgba",valueType:null,default:Io(n),[Ro]:"TheatrePropType",label:e.label,interpolate:jo,deserializeAndSanitize:Vo}},Vo=t=>{if(!t)return;let e=!0;for(const n of["r","g","b","a"])Object.prototype.hasOwnProperty.call(t,n)&&"number"==typeof t[n]||(e=!1);if(!e)return;const n={};for(const e of["r","g","b","a"])n[e]=Math.min(Math.max(t[e],0),1);return Io(n)},jo=(t,e,n)=>{const i=Bo(To(t)),r=Bo(To(e));return Io(Mo(function(t){let e=t.L+.3963377774*t.a+.2158037573*t.b,n=t.L-.1055613458*t.a-.0638541728*t.b,i=t.L-.0894841775*t.a-1.291485548*t.b,r=e*e*e,s=n*n*n,o=i*i*i;return{r:4.0767416621*r-3.3077115913*s+.2309699292*o,g:-1.2684380046*r+2.6097574011*s-.3413193965*o,b:-.0041960863*r-.7034186147*s+1.707614701*o,a:t.alpha}}({L:(1-n)*i.L+n*r.L,a:(1-n)*i.a+n*r.a,b:(1-n)*i.b+n*r.b,alpha:(1-n)*i.alpha+n*r.alpha})))},Wo=(t,e={})=>{var n;return{type:"boolean",default:t,valueType:null,[Ro]:"TheatrePropType",label:e.label,interpolate:null!=(n=e.interpolate)?n:Xo,deserializeAndSanitize:qo}},qo=t=>"boolean"==typeof t?t:void 0;function Xo(t){return t}var Yo=(t,e={})=>{var n;return{type:"string",default:t,valueType:null,[Ro]:"TheatrePropType",label:e.label,interpolate:null!=(n=e.interpolate)?n:Xo,deserializeAndSanitize:Ko}};function Ko(t){return"string"==typeof t?t:void 0}function Zo(t,e,n={}){var i,r;return{type:"stringLiteral",default:t,valuesAndLabels:A({},e),[Ro]:"TheatrePropType",valueType:null,as:null!=(i=n.as)?i:"menu",label:n.label,interpolate:null!=(r=n.interpolate)?r:Xo,deserializeAndSanitize(t){if("string"==typeof t)return Object.prototype.hasOwnProperty.call(e,t)?t:void 0}}}var Jo=({config:t,deltaX:e,deltaFraction:n,magnitude:i})=>{var r;const{range:s}=t;return t.nudgeMultiplier||!s||s.includes(1/0)||s.includes(-1/0)?e*i*(null!=(r=t.nudgeMultiplier)?r:1):n*(s[1]-s[0])*i};function $o(t,e){const n=t.replace(/^[\s\/]*/,"").replace(/[\s\/]*$/,"").replace(/\s*\/\s*/g," / ");return n}y(w());var ta,ea,na=n(771),ia=t=>"number"==typeof t&&isFinite(t)&&t>0?t:10,ra=t=>"number"==typeof t&&is(t)&&t>=1&&t<=1e3?t:30,sa=n(771),oa=n(771),aa=t=>new Promise((e=>setTimeout(e,t)));function la(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ha(t){return!!t&&!!t[Wa]}function ca(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===qa}(t)||Array.isArray(t)||!!t[ja]||!!t.constructor[ja]||Aa(t)||ga(t))}function ua(t,e,n){void 0===n&&(n=!1),0===da(t)?(n?Object.keys:Xa)(t).forEach((function(i){n&&"symbol"==typeof i||e(i,t[i],t)})):t.forEach((function(n,i){return e(i,n,t)}))}function da(t){var e=t[Wa];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Aa(t)?2:ga(t)?3:0}function pa(t,e){return 2===da(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function fa(t,e,n){var i=da(t);2===i?t.set(e,n):3===i?(t.delete(e),t.add(n)):t[e]=n}function Aa(t){return za&&t instanceof Map}function ga(t){return Ga&&t instanceof Set}function ma(t){return t.o||t.t}function _a(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Ya(t);delete e[Wa];for(var n=Xa(e),i=0;i<n.length;i++){var r=n[i],s=e[r];
vendor: 6,055 bytes, line 2
2!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(e[r]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function va(t,e){return void 0===e&&(e=!1),Ea(t)||ha(t)||!ca(t)||(da(t)>1&&(t.set=t.add=t.clear=t.delete=ya),Object.freeze(t),e&&ua(t,(function(t,e){return va(e,!0)}),!0)),t}function ya(){la(2)}function Ea(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function xa(t){var e=Ka[t];return e||la(18,t),e}function Ca(){return ea}function ba(t,e){e&&(xa("Patches"),t.u=[],t.s=[],t.v=e)}function wa(t){Sa(t),t.p.forEach(Ma),t.p=null}function Sa(t){t===ea&&(ea=t.l)}function Ia(t){return ea={p:[],l:ea,h:t,m:!0,_:0}}function Ma(t){var e=t[Wa];0===e.i||1===e.i?e.j():e.O=!0}function Ta(t,e){e._=e.p.length;var n=e.p[0],i=void 0!==t&&t!==n;return e.h.g||xa("ES5").S(e,t,i),i?(n[Wa].P&&(wa(e),la(4)),ca(t)&&(t=Ba(e,t),e.l||Pa(e,t)),e.u&&xa("Patches").M(n[Wa],t,e.u,e.s)):t=Ba(e,n,[]),wa(e),e.u&&e.v(e.u,e.s),t!==Va?t:void 0}function Ba(t,e,n){if(Ea(e))return e;var i=e[Wa];if(!i)return ua(e,(function(r,s){return Ra(t,i,e,r,s,n)}),!0),e;if(i.A!==t)return e;if(!i.P)return Pa(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var r=4===i.i||5===i.i?i.o=_a(i.k):i.o;ua(3===i.i?new Set(r):r,(function(e,s){return Ra(t,i,r,e,s,n)})),Pa(t,r,!1),n&&t.u&&xa("Patches").R(i,n,t.u,t.s)}return i.o}function Ra(t,e,n,i,r,s){if(ha(r)){var o=Ba(t,r,s&&e&&3!==e.i&&!pa(e.D,i)?s.concat(i):void 0);if(fa(n,i,o),!ha(o))return;t.m=!1}if(ca(r)&&!Ea(r)){if(!t.h.F&&t._<1)return;Ba(t,r),e&&e.A.l||Pa(t,r)}}function Pa(t,e,n){void 0===n&&(n=!1),t.h.F&&t.m&&va(e,n)}function Da(t,e){var n=t[Wa];return(n?ma(n):t)[e]}function La(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var i=Object.getOwnPropertyDescriptor(n,e);if(i)return i;n=Object.getPrototypeOf(n)}}function Ua(t){t.P||(t.P=!0,t.l&&Ua(t.l))}function Na(t){t.o||(t.o=_a(t.t))}function Oa(t,e,n){var i=Aa(e)?xa("MapSet").N(e,n):ga(e)?xa("MapSet").T(e,n):t.g?function(t,e){var n=Array.isArray(t),i={i:n?1:0,A:e?e.A:Ca(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},r=i,s=Za;n&&(r=[i],s=Ja);var o=Proxy.revocable(r,s),a=o.revoke,l=o.proxy;return i.k=l,i.j=a,l}(e,n):xa("ES5").J(e,n);return(n?n.A:Ca()).p.push(i),i}function Fa(t){return ha(t)||la(22,t),function t(e){if(!ca(e))return e;var n,i=e[Wa],r=da(e);if(i){if(!i.P&&(i.i<4||!xa("ES5").K(i)))return i.t;i.I=!0,n=ka(e,r),i.I=!1}else n=ka(e,r);return ua(n,(function(e,r){i&&function(t,e){return 2===da(t)?t.get(e):t[e]}(i.t,e)===r||fa(n,e,t(r))})),3===r?new Set(n):n}(t)}function ka(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return _a(t)}var Qa="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),za="undefined"!=typeof Map,Ga="undefined"!=typeof Set,Ha="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Va=Qa?Symbol.for("immer-nothing"):((ta={})["immer-nothing"]=!0,ta),ja=Qa?Symbol.for("immer-draftable"):"__$immer_draftable",Wa=Qa?Symbol.for("immer-state"):"__$immer_state",qa=""+Object.prototype.constructor,Xa="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ya=Object.getOwnPropertyDescriptors||function(t){var e={};return Xa(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},Ka={},Za={get:function(t,e){if(e===Wa)return t;var n,i,r,s=ma(t);if(!pa(s,e))return n=t,(r=La(s,e))?"value"in r?r.value:null===(i=r.get)||void 0===i?void 0:i.call(n.k):void 0;var o=s[e];return t.I||!ca(o)?o:o===Da(t.t,e)?(Na(t),t.o[e]=Oa(t.A.h,o,t)):o},has:function(t,e){return e in ma(t)},ownKeys:function(t){return Reflect.ownKeys(ma(t))},set:function(t,e,n){var i=La(ma(t),e);if(null==i?void 0:i.set)return i.set.call(t.k,n),!0;if(!t.P){var r=Da(ma(t),e),s=null==r?void 0:r[Wa];if(s&&s.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}(n,r)&&(void 0!==n||pa(t.t,e)))return!0;Na(t),Ua(t)}return t.o[e]===n&&"number"!=typeof n&&(void 0!==n||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==Da(t.t,e)||e in t.t?(t.D[e]=!1,Na(t),Ua(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=ma(t),i=Reflect.getOwnPropertyDescriptor(n,e);return i?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:i.enumerable,value:n[e]}:i},defineProperty:function(){la(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){la(12)}},Ja={};ua(Za,(function(t,e){Ja[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Ja.deleteProperty=function(t,e){return Za.deleteProperty.call(this,t[0],e)},Ja.set=function(t,e,n){return Za.set.call(this,t[0],e,n,t[0])};var $a=new(function(){function t(t){var e=this;this.g=Ha,this.F=!0,this.produce=function(t,n,i){if("function"==typeof t&&"function"!=typeof n){var r=n;n=t;var s=e;return function(t){var e=this;void 0===t&&(t=r);for(var i=arguments.length,o=Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return s.produce(t,(function(t){var i;return(i=n).call.apply(i,[e,t].concat(o))}))}}var o;if("function"!=typeof n&&la(6),void 0!==i&&"function"!=typeof i&&la(7),ca(t)){var a=Ia(e),l=Oa(e,t,void 0),h=!0;try{o=n(l),h=!1}finally{h?wa(a):Sa(a)}return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return ba(a,i),Ta(t,a)}),(function(t){throw wa(a),t})):(ba(a,i),Ta(o,a))}if(!t||"object"!=typeof t){if((o=n(t))===Va)return;return void 0===o&&(o=t),e.F&&va(o,!0),o}la(21,t)},this.produceWithPatches=function(t,n){return"function"==typeof t?function(n){for(var i=arguments.length,r=Array(i>1?i-1:0),s=1;s<i;s++)r[s-1]=arguments[s];return e.produceWithPatches(n,(function(e){return t.apply(void 0,[e].concat(r))}))}:[e.produce(t,n,(function(t,e){i=t,r=e})),i,r];var i,r},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}
2var e=t.prototype;return e.createDraft=function(t){ca(t)||la(8),ha(t)&&(t=Fa(t));var e=Ia(this),n=Oa(this,t,void 0);return n[Wa].C=!0,Sa(e),n},e.finishDraft=function(t,e){var n=(t&&t[Wa]).A;return ba(n,e),Ta(void 0,n)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!Ha&&la(20),this.g=t},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var i=e[n];if(0===i.path.length&&"replace"===i.op){t=i.value;break}}var r=xa("Patches").$;return ha(t)?r(t,e):this.produce(t,(function(t){return r(t,e.slice(n+1))}))},t}()),tl=($a.produce,$a.produceWithPatches.bind($a),$a.setAutoFreeze.bind($a),$a.setUseProxies.bind($a),$a.applyPatches.bind($a),$a.createDraft.bind($a),$a.finishDraft.bind($a),{currentProjectStateDefinitionVersion:"0.4.0"});async function el(t,e,n){await aa(0),t.transaction((({drafts:t})=>{var i;const r=e.address.projectId;function s(){t.ephemeral.coreByProject[r].loadingState={type:"loaded"}}t.ephemeral.coreByProject[r]={lastExportedObject:null,loadingState:{type:"loading"}},t.ahistoric.coreByProject[r]={ahistoricStuff:""};const o=null==(ha(a=t.historic)||la(23,a),i=a[Wa].t)?void 0:i.coreByProject[e.address.projectId];var a,l,h;o?n&&-1==o.revisionHistory.indexOf(n.revisionHistory[0])?(l=n,t.ephemeral.coreByProject[r].loadingState={type:"browserStateIsNotBasedOnDiskState",onDiskState:l}):s():n?(h=n,t.ephemeral.coreByProject[r].loadingState={type:"loaded"},t.historic.coreByProject[r]=h):(t.ephemeral.coreByProject[r].loadingState={type:"loaded"},t.historic.coreByProject[r]={sheetsById:{},definitionVersion:tl.currentProjectStateDefinitionVersion,revisionHistory:[]})}))}function nl(){}function il(t){var e,n;const i=(null==(e=null==t?void 0:t.logging)?void 0:e.internal)?null!=(n=t.logging.min)?n:256:1/0,r=i<=512,s=Os(void 0,{_debug:i<=128?console.debug.bind(console,"_coreLogger(TheatreInternalLogger) debug"):nl,_error:r?console.error.bind(console,"_coreLogger(TheatreInternalLogger) error"):nl});if(t){const{logger:e,logging:n}=t;e&&s.configureLogger(e),n?s.configureLogging(n):s.configureLogging({dev:!1})}return s.getLogger().named("Theatre")}var rl=class{get type(){return"Theatre_Project_PublicAPI"}constructor(t,e={}){P(this,new class{constructor(t,e={},n){var i;this.config=e,this.publicApi=n,E(this,"pointers"),E(this,"_pointerProxies"),E(this,"address"),E(this,"_studioReadyDeferred"),E(this,"_assetStorageReadyDeferred"),E(this,"_readyPromise"),E(this,"_sheetTemplates",new oa.Atom({})),E(this,"sheetTemplatesP",this._sheetTemplates.pointer),E(this,"_studio"),E(this,"assetStorage"),E(this,"type","Theatre_Project"),E(this,"_logger"),this._logger=il({logging:{dev:!0}}).named("Project",t),this._logger.traceDev("creating project"),this.address={projectId:t};const r=new oa.Atom({ahistoric:{ahistoricStuff:""},historic:null!=(i=e.state)?i:{sheetsById:{},definitionVersion:tl.currentProjectStateDefinitionVersion,revisionHistory:[]},ephemeral:{loadingState:{type:"loaded"},lastExportedObject:null}});this._assetStorageReadyDeferred=ro(),this.assetStorage={getAssetUrl:t=>{var n;return"".concat(null==(n=e.assets)?void 0:n.baseUrl,"/").concat(t)},createAsset:()=>{throw new Error("Please wait for Project.ready to use assets.")}},this._pointerProxies={historic:new sa.PointerProxy(r.pointer.historic),ahistoric:new sa.PointerProxy(r.pointer.ahistoric),ephemeral:new sa.PointerProxy(r.pointer.ephemeral)},this.pointers={historic:this._pointerProxies.historic.pointer,ahistoric:this._pointerProxies.ahistoric.pointer,ephemeral:this._pointerProxies.ephemeral.pointer},T.add(t,this),this._studioReadyDeferred=ro(),this._readyPromise=Promise.all([this._studioReadyDeferred.promise,this._assetStorageReadyDeferred.promise]).then((()=>{})),e.state?setTimeout((()=>{this._studio||(this._studioReadyDeferred.resolve(void 0),this._assetStorageReadyDeferred.resolve(void 0),this._logger._trace("ready deferred resolved with no state"))}),0):"undefined"==typeof window?console.error('Argument config.state in Theatre.getProject("'.concat(t,'", config) is empty. ')+"You can safely ignore this message if you're developing a Next.js/Remix project in development mode. But if you are shipping to your end-users, then you need to set config.state, otherwise your project's state will be empty and nothing will animate. Learn more at https://www.theatrejs.com/docs/latest/manual/
2projects#state"):setTimeout((()=>{if(!this._studio)throw new Error('Argument config.state in Theatre.getProject("'.concat(t,'", config) is empty. This is fine ')+"while you are using @theatre/core along with @theatre/studio. But since @theatre/studio "+'is not loaded, the state of project "'.concat(t,'" will be empty.\n\n')+"To fix this, you need to add @theatre/studio into the bundle and export the project's state. Learn how to do that at https://www.theatrejs.com/docs/latest/manual/projects#state\n")}),1e3)}attachToStudio(t){if(this._studio){if(this._studio!==t)throw new Error("Project ".concat(this.address.projectId," is already attached to studio ").concat(this._studio.address.studioId));console.warn("Project ".concat(this.address.projectId," is already attached to studio ").concat(this._studio.address.studioId))}else this._studio=t,t.initialized.then((async()=>{var e;await el(t,this,this.config.state),this._pointerProxies.historic.setPointer(t.atomP.historic.coreByProject[this.address.projectId]),this._pointerProxies.ahistoric.setPointer(t.atomP.ahistoric.coreByProject[this.address.projectId]),this._pointerProxies.ephemeral.setPointer(t.atomP.ephemeral.coreByProject[this.address.projectId]),await t.createAssetStorage(this,null==(e=this.config.assets)?void 0:e.baseUrl).then((t=>{this.assetStorage=t,this._assetStorageReadyDeferred.resolve(void 0)})),this._studioReadyDeferred.resolve(void 0)})).catch((t=>{throw console.error(t),t}))}get isAttachedToStudio(){return!!this._studio}get ready(){return this._readyPromise}isReady(){return"resolved"===this._studioReadyDeferred.status&&"resolved"===this._assetStorageReadyDeferred.status}getOrCreateSheet(t,e="default"){let n=this._sheetTemplates.get()[t];return n||(n=new class{constructor(t,e){this.project=t,E(this,"type","Theatre_SheetTemplate"),E(this,"address"),E(this,"_instances",new Ks.Atom({})),E(this,"instancesP",this._instances.pointer),E(this,"_objectTemplates",new Ks.Atom({})),E(this,"objectTemplatesP",this._objectTemplates.pointer),this.address=g(A({},t.address),{sheetId:e})}getInstance(t){let e=this._instances.get()[t];return e||(e=new class{constructor(t,e){this.template=t,this.instanceId=e,E(this,"_objects",new na.Atom({})),E(this,"_sequence"),E(this,"address"),E(this,"publicApi"),E(this,"project"),E(this,"objectsP",this._objects.pointer),E(this,"type","Theatre_Sheet"),E(this,"_logger"),this._logger=t.project._logger.named("Sheet",e),this._logger._trace("creating sheet"),this.project=t.project,this.address=g(A({},t.address),{sheetInstanceId:this.instanceId}),this.publicApi=new class{get type(){return"Theatre_Sheet_PublicAPI"}constructor(t){P(this,t)}object(t,e,n){const i=R(this),r=$o(t),s=i.getObject(r),o=null==n?void 0:n.__actions__THIS_API_IS_UNSTABLE_AND_WILL_CHANGE_IN_THE_NEXT_VERSION;if(s)return o&&s.template._temp_setActions(o),s.publicApi;{const t=Lo(e);return i.createObject(r,null,t,o).publicApi}}__experimental_getExistingObject(t){const e=R(this),n=$o(t),i=e.getObject(n);return null==i?void 0:i.publicApi}get sequence(){return R(this).getSequence().publicApi}get project(){return R(this).project.publicApi}get address(){return A({},R(this).address)}detachObject(t){const e=R(this),n=$o(t,'sheet.deleteObject("'.concat(t,'")'));if(!e.getObject(n))return co.warning("Couldn't delete object \"".concat(n,'"'),'There is no object with key "'.concat(n,'".\n\nTo fix this, make sure you are calling `sheet.deleteObject("').concat(n,'")` with the correct key.')),void console.warn('Object key "'.concat(n,'" does not exist.'));e.deleteObject(n)}}(this)}createObject(t,e,n,i={}){const r=this.template.getObjectTemplate(t,e,n,i).createInstance(this,e,n);return this._objects.setByPointer((e=>e[t]),r),r}getObject(t){return this._objects.get()[t]}deleteObject(t){this._objects.reduce((e=>{const n=A({},e);return delete n[t],n}))}getSequence(){if(!this._sequence){const t=(0,na.prism)((()=>{const t=(0,na.val)(this.project.pointers.historic.sheetsById[this.address.sheetId].sequence.length);return ia(t)})),e=(0,na.prism)((()=>{const t=(0,na.val)(this.project.pointers.historic.sheetsById[this.address.sheetId].sequence.subUnitsPerUnit);return ra(t)}));this._sequence=new class{constructor(t,e,n,i,r){this._project=t,this._sheet=e,this._lengthD=n,this._subUnitsPerUnitD=i,E(this,"address"),E(this,"publicApi"),E(this,"_playbackControllerBox"),E(this,"_prismOfStatePointer"),E(this,"_positionD"),E(this,"_positionFormatterD"),E(this,"_playableRangeD"),E(this,"pointer",(0,no.pointer)({root:this,path:[]})),E(this,"$$isPointerToPrismProvider",!0),E(this,"_logger"),E(this,"closestGridPosition",(t=>{const e=1/this.subUnitsPerUnit;return parseFloat((Math.round(t/e)*e).toFixed(3))})),this._logger=t._logger.named("Sheet",e.address.sheetId).named("Instance",e.address.sheetInstanceId),this.address=g(A({},this._sheet.address),{sequenceName:"default"}),this.publicApi=new class{get type(){return"Theatre_Sequence_PublicAPI"}constructor(t){P(this,t)}play(t){const e=R(this);if(e._project.isReady()){const n=(null==t?void 0:t.rafDriver)?R(t.rafDriver).ticker:mo();return e.play(null!=t?t:{},n)}{const t=ro();return t.resolve(!0),t.promise}}pause(){R(this).pause()}get position(){return R(this).position}set position(t){R(this).position=t}__experimental_getKeyframes(t){return R(this).getKeyframesOfSimpleProp(t)}async attachAudio(t){const{audioContext:e,destinationNode:n,decodedBuffer:i,gainNode:r}=await async function(t){function e(){if(t.audioContext)return Promise.resolve(t.audioContext);const e=new AudioContext;return"running"===e.state||"undefined"==typeof window?Promise.resolve(e):new Promise((t=>{const n=()=>{e.resume().catch((t=>{console.error(t)}))},i=["mousedown","keydown","touchstart"],r={capture:!0,passive:!1};
2i.forEach((t=>{window.addEventListener(t,n,r)})),e.addEventListener("statechange",(()=>{"running"===e.state&&(i.forEach((t=>{window.removeEventListener(t,n,r)})),t(e))}))}))}async function n(){if(t.source instanceof AudioBuffer)return t.source;const e=ro();if("string"!=typeof t.source)throw new Error("Error validating arguments to sequence.attachAudio(). args.source must either be a string or an instance of AudioBuffer.");let n,r,s;try{n=await fetch(t.source)}catch(e){throw console.error(e),new Error("Could not fetch '".concat(t.source,"'. Network error logged above."))}try{r=await n.arrayBuffer()}catch(e){throw console.error(e),new Error("Could not read '".concat(t.source,"' as an arrayBuffer."))}(await i).decodeAudioData(r,e.resolve,e.reject);try{s=await e.promise}catch(e){throw console.error(e),new Error("Could not decode ".concat(t.source," as an audio file."))}return s}const i=e(),r=n(),[s,o]=await Promise.all([i,r]),a=t.destinationNode||s.destination,l=s.createGain();return l.connect(a),{audioContext:s,decodedBuffer:o,gainNode:l,destinationNode:a}}(t),s=new class{constructor(t,e,n){this._decodedBuffer=t,this._audioContext=e,this._nodeDestination=n,E(this,"_mainGain"),E(this,"_state",new ao.Atom({position:0,playing:!1})),E(this,"statePointer"),E(this,"_stopPlayCallback",so),this.statePointer=this._state.pointer,this._mainGain=this._audioContext.createGain(),this._mainGain.connect(this._nodeDestination)}playDynamicRange(t,e){const n=ro();let i;this._playing&&this.pause(),this._playing=!0;const r=()=>{null==i||i(),i=this._loopInRange(t.getValue(),e).stop},s=t.onStale(r);return r(),this._stopPlayCallback=()=>{null==i||i(),s(),n.resolve(!1)},n.promise}_loopInRange(t,e){let n=this.getCurrentPosition();const i=t[1]-t[0];(n<t[0]||n>t[1]||n===t[1])&&this._updatePositionInState(t[0]),n=this.getCurrentPosition();const r=this._audioContext.createBufferSource();r.buffer=this._decodedBuffer,r.connect(this._mainGain),r.playbackRate.value=1,r.loop=!0,r.loopStart=t[0],r.loopEnd=t[1];const s=e.time;let o=n-t[0];r.start(0,n);const a=e=>{let n=(Math.max(e-s,0)/1e3*1+o)/i%1*i;this._updatePositionInState(n+t[0]),l()},l=()=>e.onNextTick(a);return e.onThisOrNextTick(a),{stop:()=>{r.stop(),r.disconnect(),e.offThisOrNextTick(a),e.offNextTick(a)}}}get _playing(){return this._state.get().playing}set _playing(t){this._state.setByPointer((t=>t.playing),t)}destroy(){}pause(){this._stopPlayCallback(),this._playing=!1,this._stopPlayCallback=so}gotoPosition(t){this._updatePositionInState(t)}_updatePositionInState(t){this._state.reduce((e=>g(A({},e),{position:t})))}getCurrentPosition(){return this._state.get().position}play(t,e,n,i,r){this._playing&&this.pause(),this._playing=!0;let s=this.getCurrentPosition();const o=e[1]-e[0];if("normal"!==i)throw new $s('Audio-controlled sequences can only be played in the "normal" direction. '+"'".concat(i,"' given."));(s<e[0]||s>e[1]||s===e[1])&&this._updatePositionInState(e[0]),s=this.getCurrentPosition();const a=ro(),l=this._audioContext.createBufferSource();l.buffer=this._decodedBuffer,l.connect(this._mainGain),l.playbackRate.value=n,t>1e3&&(co.warning("Can't play sequences with audio more than 1000 times","The sequence will still play, but only 1000 times. The `iterationCount: ".concat(t,"` provided to `sequence.play()`\nis too high for a sequence with audio.\n\nTo fix this, either set `iterationCount` to a lower value, or remove the audio from the sequence."),[{url:"https://www.theatrejs.com/docs/latest/manual/audio",title:"Using Audio"},{url:"https://www.theatrejs.com/docs/latest/api/core#sequence.attachaudio",title:"Audio API"}]),t=1e3),t>1&&(l.loop=!0,l.loopStart=e[0],l.loopEnd=e[1]);const h=r.time;let c=s-e[0];const u=o*t;l.start(0,s,u-c);const d=t=>{const i=Math.max(t-h,0)/1e3,r=Math.min(i*n+c,u);if(r!==u){let t=r/o%1*o;this._updatePositionInState(t+e[0]),f()}else this._updatePositionInState(e[1]),this._playing=!1,p(),a.resolve(!0)},p=()=>{l.stop(),l.disconnect()};this._stopPlayCallback=()=>{p(),r.offThisOrNextTick(d),r.offNextTick(d),this._playing&&a.resolve(!1)};const f=()=>r.onNextTick(d);return r.onThisOrNextTick(d),a.promise}}(i,e,r);return R(this).replacePlaybackController(s),{audioContext:e,destinationNode:n,decodedBuffer:i,gainNode:r}}get pointer(){return R(this).pointer}}(this),this._playbackControllerBox=new eo.Atom(null!=r?r:new class{constructor(){E(this,"_stopPlayCallback",so),E(this,"_state",new oo.Atom({position:0,playing:!1})),E(this,"statePointer"),this.statePointer=this._state.pointer}destroy(){}pause(){this._stopPlayCallback(),this.playing=!1,this._stopPlayCallback=so}gotoPosition(t){this._updatePositionInState(t)}_updatePositionInState(t){this._state.setByPointer((t=>t.position),t)}getCurrentPosition(){return this._state.get().position}get playing(){return this._state.get().playing}set playing(t){this._state.setByPointer((t=>t.playing),t)}play(t,e,n,i,r){this.playing&&this.pause(),this.playing=!0;const s=e[1]-e[0];{const t=this.getCurrentPosition();t<e[0]||t>e[1]?"normal"===i||"alternate"===i?this._updatePositionInState(e[0]):"reverse"!==i&&"alternateRever
2se"!==i||this._updatePositionInState(e[1]):"normal"===i||"alternate"===i?t===e[1]&&this._updatePositionInState(e[0]):t===e[0]&&this._updatePositionInState(e[1])}const o=ro(),a=r.time,l=s*t;let h=this.getCurrentPosition()-e[0];"reverse"!==i&&"alternateReverse"!==i||(h=e[1]-this.getCurrentPosition());const c=r=>{const c=Math.max(r-a,0)/1e3,d=Math.min(c*n+h,l);if(d!==l){const t=Math.floor(d/s);let n=d/s%1*s;if("normal"!==i)if("reverse"===i)n=s-n;else{const e=t%2==0;"alternate"===i?e||(n=s-n):e&&(n=s-n)}this._updatePositionInState(n+e[0]),u()}else{if("normal"===i)this._updatePositionInState(e[1]);else if("reverse"===i)this._updatePositionInState(e[0]);else{const n=(t-1)%2==0;"alternate"===i?n?this._updatePositionInState(e[1]):this._updatePositionInState(e[0]):n?this._updatePositionInState(e[0]):this._updatePositionInState(e[1])}this.playing=!1,o.resolve(!0)}};this._stopPlayCallback=()=>{r.offThisOrNextTick(c),r.offNextTick(c),this.playing&&o.resolve(!1)};const u=()=>r.onNextTick(c);return r.onThisOrNextTick(c),o.promise}playDynamicRange(t,e){this.playing&&this.pause(),this.playing=!0;const n=ro(),i=t.keepHot();n.promise.then(i,i);let r=e.time;const s=e=>{const n=Math.max(e-r,0);r=e;const i=n/1e3,s=this.getCurrentPosition(),a=t.getValue();if(s<a[0]||s>a[1])this.gotoPosition(a[0]);else{let t=s+i;t>a[1]&&(t=a[0]+(t-a[1])),this.gotoPosition(t)}o()};this._stopPlayCallback=()=>{e.offThisOrNextTick(s),e.offNextTick(s),n.resolve(!1)};const o=()=>e.onNextTick(s);return e.onThisOrNextTick(s),n.promise}}),this._prismOfStatePointer=(0,io.prism)((()=>this._playbackControllerBox.prism.getValue().statePointer)),this._positionD=(0,io.prism)((()=>{const t=this._prismOfStatePointer.getValue();return(0,io.val)(t.position)})),this._positionFormatterD=(0,io.prism)((()=>{const t=(0,io.val)(this._subUnitsPerUnitD);return new yo(t)}))}get type(){return"Theatre_Sequence"}pointerToPrism(t){const{path:e}=(0,to.getPointerParts)(t);if(0===e.length)return(0,io.prism)((()=>({length:(0,io.val)(this.pointer.length),playing:(0,io.val)(this.pointer.playing),position:(0,io.val)(this.pointer.position),subUnitsPerUnit:(0,io.val)(this.pointer.subUnitsPerUnit)})));if(e.length>1)return(0,io.prism)((()=>{}));const[n]=e;return"length"===n?this._lengthD:"subUnitsPerUnit"===n?this._subUnitsPerUnitD:"position"===n?this._positionD:"playing"===n?(0,io.prism)((()=>(0,io.val)(this._prismOfStatePointer.getValue().playing))):(0,io.prism)((()=>{}))}getKeyframesOfSimpleProp(t){const{path:e,root:n}=(0,to.getPointerParts)(t);if(!_o(n))throw new $s("Argument prop must be a pointer to a SheetObject property");const i=(0,io.val)(this._project.pointers.historic.sheetsById[this._sheet.address.sheetId].sequence.tracksByObject[n.address.objectKey]);if(!i)return[];const{trackData:r,trackIdByPropPath:s}=i,o=s[Zs(e)];if(!o)return[];const a=r[o];return a?a.keyframes:[]}get positionFormatter(){return this._positionFormatterD.getValue()}get prismOfStatePointer(){return this._prismOfStatePointer}get length(){return this._lengthD.getValue()}get positionPrism(){return this._positionD}get position(){return this._playbackControllerBox.get().getCurrentPosition()}get subUnitsPerUnit(){return this._subUnitsPerUnitD.getValue()}get positionSnappedToGrid(){return this.closestGridPosition(this.position)}set position(t){let e=t;this.pause(),e>this.length&&(e=this.length);const n=this.length;this._playbackControllerBox.get().gotoPosition(e>n?n:e)}getDurationCold(){return this._lengthD.getValue()}get playing(){return(0,io.val)(this._playbackControllerBox.get().statePointer.playing)}_makeRangeFromSequenceTemplate(){return(0,io.prism)((()=>[0,(0,io.val)(this._lengthD)]))}playDynamicRange(t,e){return this._playbackControllerBox.get().playDynamicRange(t,e)}async play(t,e){const n=this.length,i=t&&t.range?t.range:[0,n],r=t&&"number"==typeof t.iterationCount?t.iterationCount:1,s=t&&void 0!==t.rate?t.rate:1,o=t&&t.direction?t.direction:"normal";return await this._play(r,[i[0],i[1]],s,o,e)}_play(t,e,n,i,r){return this._playbackControllerBox.get().play(t,e,n,i,r)}pause(){this._playbackControllerBox.get().pause()}replacePlaybackController(t){this.pause();const e=this._playbackControllerBox.get();this._playbackControllerBox.set(t);const n=e.getCurrentPosition();
2e.destroy(),t.gotoPosition(n)}}(this.template.project,this,t,e)}return this._sequence}}(this,t),this._instances.setByPointer((e=>e[t]),e)),e}getObjectTemplate(t,e,n,i){let r=this._objectTemplates.get()[t];return r||(r=new class{constructor(t,e,n,i,r){this.sheetTemplate=t,E(this,"address"),E(this,"type","Theatre_SheetObjectTemplate"),E(this,"_config"),E(this,"_temp_actions_atom"),E(this,"_cache",new ae),E(this,"project"),E(this,"pointerToSheetState"),E(this,"pointerToStaticOverrides"),this.address=g(A({},t.address),{objectKey:e}),this._config=new le.Atom(i),this._temp_actions_atom=new le.Atom(r),this.project=t.project,this.pointerToSheetState=this.sheetTemplate.project.pointers.historic.sheetsById[this.address.sheetId],this.pointerToStaticOverrides=this.pointerToSheetState.staticOverrides.byObject[this.address.objectKey]}get staticConfig(){return this._config.get()}get configPointer(){return this._config.pointer}get _temp_actions(){return this._temp_actions_atom.get()}get _temp_actionsPointer(){return this._temp_actions_atom.pointer}createInstance(t,e,n){return this._config.set(n),new class{constructor(t,e,n){this.sheet=t,this.template=e,this.nativeObject=n,E(this,"$$isPointerToPrismProvider",!0),E(this,"address"),E(this,"publicApi"),E(this,"_initialValue",new Ie.Atom({})),E(this,"_cache",new ae),E(this,"_logger"),E(this,"_internalUtilCtx"),this._logger=t._logger.named("SheetObject",e.address.objectKey),this._logger._trace("creating object"),this._internalUtilCtx={logger:this._logger.utilFor.internal()},this.address=g(A({},e.address),{sheetInstanceId:t.address.sheetInstanceId}),this.publicApi=new class{constructor(t){E(this,"_cache",new ae),E(this,"_keepHotUntapDebounce"),P(this,t)}get type(){return"Theatre_SheetObject_PublicAPI"}get props(){return R(this).propsP}get sheet(){return R(this).sheet.publicApi}get project(){return R(this).sheet.project.publicApi}get address(){return A({},R(this).address)}_valuesPrism(){return this._cache.get("_valuesPrism",(()=>{const t=R(this);return(0,Me.prism)((()=>(0,Me.val)(t.getValues().getValue())))}))}onValuesChange(t,e){return hl(this._valuesPrism(),t,e)}get value(){const t=this._valuesPrism();if(!t.isHot){null!=this._keepHotUntapDebounce&&this._keepHotUntapDebounce.flush();const e=t.keepHot();this._keepHotUntapDebounce=ts((()=>{e(),this._keepHotUntapDebounce=void 0}),5e3)}return this._keepHotUntapDebounce&&this._keepHotUntapDebounce(),t.getValue()}set initialValue(t){R(this).setInitialValue(t)}}(this)}get type(){return"Theatre_SheetObject"}getValues(){return this._cache.get("getValues()",(()=>(0,Ie.prism)((()=>{const t=be((0,Ie.val)(this.template.getDefaultValues()),(0,Ie.val)(this._initialValue.pointer),Ie.prism.memo("withInitialCache",(()=>new WeakMap),[]));let e,n=be(t,(0,Ie.val)(this.template.getStaticValues()),Ie.prism.memo("withStatics",(()=>new WeakMap),[]));{const t=Ie.prism.memo("seq",(()=>this.getSequencedValues()),[]),i=Ie.prism.memo("withSeqsCache",(()=>new WeakMap),[]);e=(0,Ie.val)((0,Ie.val)(t)),n=be(n,e,i)}return((t,e)=>{const n=Se.prism.memo(t,(()=>new Se.Atom(e)),[]);return n.set(e),n})("finalAtom",n).pointer}))))}getValueByPointer(t){const e=(0,Ie.val)(this.getValues()),{path:n}=(0,Ie.getPointerParts)(t);return(0,Ie.val)(we(e,n))}pointerToPrism(t){const{path:e}=(0,Ie.getPointerParts)(t);return(0,Ie.prism)((()=>{const t=(0,Ie.val)(this.getValues());return(0,Ie.val)(we(t,e))}))}getSequencedValues(){return(0,Ie.prism)((()=>{const t=Ie.prism.memo("tracksToProcess",(()=>this.template.getArrayOfValidSequenceTracks()),[]),e=(0,Ie.val)(t),n=new Ie.Atom({}),i=(0,Ie.val)(this.template.configPointer);return Ie.prism.effect("processTracks",(()=>{const t=[];for(const{trackId:r,pathToProp:s}of e){const e=this._trackIdToPrism(r),o=Ts(i,s),a=o.deserializeAndSanitize,l=o.interpolate,h=()=>{const t=e.getValue();if(!t)return n.setByPointer((t=>we(t,s)),void 0);const i=a(t.left),r=void 0===i?o.default:i;if(void 0===t.right)return n.setByPointer((t=>we(t,s)),r);const h=a(t.right),c=void 0===h?o.default:h;return n.setByPointer((t=>we(t,s)),l(r,c,t.progression))},c=e.onStale(h);h(),t.push(c)}return()=>{for(const e of t)e()}}),[i,...e]),n.pointer}))}_trackIdToPrism(t){const e=this.template.project.pointers.historic.sheetsById[this.address.sheetId].sequence.tracksByObject[this.address.objectKey].trackData[t],n=this.sheet.getSequence().positionPrism;return Ee(this._internalUtilCtx,e,n)}get propsP(){return this._cache.get("propsP",(()=>(0,Ie.pointer)({root:this,path:[]})))}validateValue(t,e){}setInitialValue(t){this.validateValue(this.propsP,t),this._initialValue.set(t)}}(t,this,e)}reconfigure(t){this._config.set(t)}_temp_setActions(t){this._temp_actions_atom.set(t)}getDefaultValues(){return this._cache.get("getDefaultValues()",(()=>(0,le.prism)((()=>function(t){return _e(t)}((0,le.val)(this.configPointer))))))}getStaticValues(){return this._cache.get("getStaticValues",(()=>(0,le.prism)((()=>{var t;const e=null!=(t=(0,le.val)(this.pointerToStaticOverrides))?t:{};return(0,le.val)(this.configPointer).deserializeAndSanitize(e)||{}}))))}getArrayOfValidSequenceTracks(){return this._cache.get("getArrayOfValidSequenceTracks",(()=>(0,le.prism)((()=>{const t=this.project.pointers.historic.sheetsById[this.address.sheetId],e=(0,le.val)(t.sequence.tracksByObject[this.address.objectKey].trackIdByPropPath);if(!e)return D;const n=[];if(!e)return D;const i=(0,le.val)(this.configPointer),r=Object.entries(e);for(const[t,e]of r){const r=Ys(t);if(!r)continue;const s=Ts(i,r);s&&!Ms(s)&&n.push({pathToProp:r,trackId:e})}const s=function(t){const e=js.get(t);if(e)return e;const n=new Map;return js.set(t,n),Ws([],t,n),n}(i);return n.sort(((t,e)=>{const n=t.pathToProp,i=e.pathToProp;return s.get(JSON.stringify(n))>s.get(JSON.stringify(i))?1:-1})),0===n.length?D:n}))))}getMapOfValidSequenceTracks_forStudio(){return this._cache.get("getMapOfValidSequenceTracks_forStudio",(()=>(0,le.prism)((()=>{const t=(0,le.val)(this.getArrayOfValidSequenceTracks());let e={};for(const{pathToProp:n,trackId:i}of t)ge(e,n,i);return e}))))}getStaticButNotSequencedOverrides(){return this._cache.get("getStaticButNotSequencedOverrides",(()=>(0,le.prism)((()=>{const t=(0,le.val)(this.getStaticValues()),e=(0,le.val)(this.getArrayOfValidSequenceTracks()),n=Ar(t);for(const{pathToProp:t}of e){Ss(n,t);let e=t.slice(0,-1);for(;e.length>0&&Xs(oe(n,e));)Ss(n,e),e=e.slice(0,-1)}return Xs(n)?void 0:n}))))}getDefaultsAtPointer(t){const{path:e}=(0,le.getPointerParts)(t);return oe(this.getDefaultValues().getValue(),e)}}(this,t,e,n,i),this._objectTemplates.setByPointer((e=>e[t]),r)),r}}(this,t),this._sheetTemplates.reduce((e=>g(A({},e),{[t]:n})))),n.getInstance(e)}}(t,e,this))}get ready(){return R(this).ready}get isReady(){return R(this).isReady()}get address(){return A({},R(this).address)}getAssetUrl(t){if(this.isReady)return t.id?R(this).assetStorage.getAssetUrl(t.id):void 0;console.error("Calling `project.getAssetUrl()` before `project.ready` is resolved, will always return `undefined`. Either use `project.ready.then(() => project.getAssetUrl())` or `await project.ready` before calling `project.getAssetUrl()`.")}sheet(t,e="default"){const n=$o(t);return R(this).getOrCreateSheet(n,e).publicApi}},sl=(y(w()),n(771)),ol=n(771);function al(t,e={}){const n=T.get(t);if(n)return n.publicApi;const i=il().named("Project",t);return e.state?(ll(t,e.state),i._debug("deep validated config.state on disk")):i._debug("no config.state"),new rl(t,e)}var ll=(t,e)=>{((t,e)=>{if(Array.isArray(e)||null==e||e.definitionVersion!==tl.currentProjectStateDefinitionVersion)throw new $s("Error validating conf.state in Theatre.getProject(".concat(JSON.stringify(t),", conf). The state seems to be formatted in a way that is unreadable to Theatre.js. Read more at https://www.theatrejs.com/docs/latest/manual/
2projects#state"))})(t,e)};function hl(t,e,n){const i=n?R(n).ticker:mo();if((0,sl.isPointer)(t)){return(0,ol.pointerToPrism)(t).onChange(i,e,!0)}if((0,ol.isPrism)(t))return t.onChange(i,e,!0);throw new Error("Called onChange(p) where p is neither a pointer nor a prism.")}function cl(t){if((0,sl.isPointer)(t))return(0,ol.pointerToPrism)(t).getValue();throw new Error("Called val(p) where p is not a pointer.")}!function(){if("undefined"==typeof window)return;const t=window[lo];if(void 0!==t)throw"object"==typeof t&&t&&"string"==typeof t.version?new Error("It seems that the module '@theatre/core' is loaded more than once. This could have two possible causes:\n1. You might have two separate versions of Theatre.js in node_modules.\n2. Or this might be a bundling misconfiguration, in case you're using a bundler like Webpack/ESBuild/Rollup.\n\nNote that it **is okay** to import '@theatre/core' multiple times. But those imports should point to the same module."):new Error("The variable window.".concat(lo," seems to be already set by a module other than @theatre/core."));const e=new class{constructor(){E(this,"_studio")}get type(){return"Theatre_CoreBundle"}get version(){return"0.7.2"}getBitsForStudio(t,e){if(this._studio)throw new Error("@theatre/core is already attached to @theatre/studio");this._studio=t,e({projectsP:T.atom.pointer.projects,privateAPI:R,coreExports:I,getCoreRafDriver:go})}};window[lo]=e;const n=window.__TheatreJS_StudioBundle;n&&null!==n&&"Theatre_StudioBundle"===n.type&&n.registerCoreBundle(e)}()},172:(t,e,n)=>{"use strict";function i(t,e,n){return Math.max(t,Math.min(e,n))}n.d(e,{Z:()=>h});class r{advance(t){if(!this.isRunning)return;let e=!1;if(this.lerp)this.value=(n=this.value,r=this.to,s=60*this.lerp,o=t,function(t,e,n){return(1-n)*t+n*e}(n,r,1-Math.exp(-s*o))),Math.round(this.value)===this.to&&(this.value=this.to,e=!0);else{this.currentTime+=t;const n=i(0,this.currentTime/this.duration,1);e=n>=1;const r=e?1:this.easing(n);this.value=this.from+(this.to-this.from)*r}var n,r,s,o;this.onUpdate?.(this.value,e),e&&this.stop()}stop(){this.isRunning=!1}fromTo(t,e,{lerp:n=.1,duration:i=1,easing:r=(t=>t),onStart:s,onUpdate:o}){this.from=this.value=t,this.to=e,this.lerp=n,this.duration=i,this.easing=r,this.currentTime=0,this.isRunning=!0,s?.(),this.onUpdate=o}}class s{constructor({wrapper:t,content:e,autoResize:n=!0,debounce:i=250}={}){this.wrapper=t,this.content=e,n&&(this.debouncedResize=function(t,e){let n;return function(){let i=arguments,r=this;clearTimeout(n),n=setTimeout((function(){t.apply(r,i)}),e)}}(this.resize,i),this.wrapper===window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){this.wrapperResizeObserver?.disconnect(),this.contentResizeObserver?.disconnect(),window.removeEventListener("resize",this.debouncedResize,!1)}resize=()=>{this.onWrapperResize(),this.onContentResize()};onWrapperResize=()=>{this.wrapper===window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)};onContentResize=()=>{this.wrapper===window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)};get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}}class o{constructor(){this.events={}}emit(t,...e){let n=this.events[t]||[];for(let t=0,i=n.length;t<i;t++)n[t](...e)}on(t,e){return this.events[t]?.push(e)||(this.events[t]=[e]),()=>{this.events[t]=this.events[t]?.filter((t=>e!==t))}}off(t,e){this.events[t]=this.events[t]?.filter((t=>e!==t))}destroy(){this.events={}}}const a=100/6;class l{constructor(t,{wheelMultiplier:e=1,touchMultiplier:n=1}){this.element=t,this.wheelMultiplier=e,this.touchMultiplier=n,this.touchStart={x:null,y:null},this.emitter=new o,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,{passive:!1}),this.element.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.element.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.element.addEventListener("touchend",this.onTouchEnd,{passive:!1})}on(t,e){return this.emitter.on(t,e)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,{passive:!1}),this.element.removeEventListener("touchstart",this.onTouchStart,{passive:!1}),this.element.removeEventListener("touchmove",this.onTouchMove,{passive:!1}),this.element.removeEventListener("touchend",this.onTouchEnd,{passive:!1})}onTouchStart=t=>{const{clientX:e,clientY:n}=t.targetTouches?t.targetTouches[0]:t;this.touchStart.x=e,this.touchStart.y=n,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:t})};onTouchMove=t=>{const{clientX:e,clientY:n}=t.targetTouches?t.targetTouches[0]:t,i=-(e-this.touchStart.x)*this.touchMultiplier,r=-(n-this.touchStart.y)*this.touchMultiplier;this.touchStart.x=e,this.touchStart.y=n,this.lastDelta={x:i,y:r},this.emitter.emit("scroll",{deltaX:i,deltaY:r,event:t})};onTouchEnd=t=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:t})};onWheel=t=>{let{deltaX:e,deltaY:n,deltaMode:i}=t;e*=1===i?a:2===i?this.windowWidth:1,n*=1===i?a:2===i?this.windowHeight:1,e*=this.wheelMultiplier,n*=this.wheelMultiplier,this.emitter.emit("scroll",{deltaX:e,deltaY:n,event:t})};onWindowResize=()=>{this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight}}class h{constructor({wrapper:t=window,content:e=document.documentElement,wheelEventsTarget:n=t,eventsTarget:i=n,smoothWheel:a=!0,syncTouch:h=!1,syncTouchLerp:c=.075,touchInertiaMultiplier:u=35,duration:d,easing:p=(t=>Math.min(1,1.001-Math.pow(2,-10*t))),lerp:f=!d&&.1,infinite:A=!1,orientation:g="vertical",gestureOrientation:m="vertical",touchMultiplier:_=1,wheelMultiplier:v=1,autoResize:y=!0,__experimental__naiveDimensions:E=!1}={}){this.__isSmooth=!1,this.__isScrolling=!1,this.__isStopped=!1,this.__isLocked=!1,this.onVirtualScroll=({deltaX:t,deltaY:e,event:n})=>{if(n.ctrlKey)return;const i=n.type.includes("touch"),r=n.type.includes("wheel");if(this.options.syncTouch&&i&&"touchstart"===n.type&&!this.isStopped&&!this.isLocked)return void this.reset();const s=0===t&&0===e,o="vertical"===this.options.gestureOrientation&&0===e||"horizontal"===this.options.gestureOrientation&&0===t;if(s||o)return;let a=n.composedPath();if(a=a.slice(0,a.indexOf(this.rootElement)),a.find((t=>{var e,n,s,o,a;return(null===(e=t.hasAttribute)||void 0===e?void 0:e.call(t,"data-lenis-prevent"))||i&&(null===(n=t.hasAttribute)||void 0===n?void 0:n.call(t,"data-lenis-prevent-touch"))||r&&(null===(s=t.hasAttribute)||void 0===s?void 0:s.call(t,"data-lenis-prevent-wheel"))||(null===(o=t.classList)||void 0===o?void 0:o.contains("lenis"))&&!(null===(a=t.classList)||void 0===a?void 0:a.contains("lenis-stopped"))})))return;if(this.isStopped||this.isLocked)return void n.preventDefault();if(this.isSmooth=this.options.syncTouch&&i||this.options.smoothWheel&&r,!this.isSmooth)return this.isScrolling=!1,void this.animate.stop();n.preventDefault();let l=e;"both"===this.options.gestureOrientation?l=Math.abs(e)>Math.abs(t)?e:t:"horizontal"===this.options.gestureOrientation&&(l=t);const h=i&&this.options.syncTouch,c=i&&"touchend"===n.type&&Math.abs(l)>5;
vendor: 6,586 bytes, line 2
2c&&(l=this.velocity*this.options.touchInertiaMultiplier),this.scrollTo(this.targetScroll+l,Object.assign({programmatic:!1},h?{lerp:c?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}))},this.onNativeScroll=()=>{if(!this.__preventNextScrollEvent&&!this.isScrolling){const t=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.velocity=0,this.direction=Math.sign(this.animatedScroll-t),this.emit()}},window.lenisVersion="1.0.42",t!==document.documentElement&&t!==document.body||(t=window),this.options={wrapper:t,content:e,wheelEventsTarget:n,eventsTarget:i,smoothWheel:a,syncTouch:h,syncTouchLerp:c,touchInertiaMultiplier:u,duration:d,easing:p,lerp:f,infinite:A,gestureOrientation:m,orientation:g,touchMultiplier:_,wheelMultiplier:v,autoResize:y,__experimental__naiveDimensions:E},this.animate=new r,this.emitter=new o,this.dimensions=new s({wrapper:t,content:e,autoResize:y}),this.toggleClassName("lenis",!0),this.velocity=0,this.isLocked=!1,this.isStopped=!1,this.isSmooth=h||a,this.isScrolling=!1,this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.virtualScroll=new l(i,{touchMultiplier:_,wheelMultiplier:v}),this.virtualScroll.on("scroll",this.onVirtualScroll)}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.toggleClassName("lenis",!1),this.toggleClassName("lenis-smooth",!1),this.toggleClassName("lenis-scrolling",!1),this.toggleClassName("lenis-stopped",!1),this.toggleClassName("lenis-locked",!1)}on(t,e){return this.emitter.on(t,e)}off(t,e){return this.emitter.off(t,e)}setScroll(t){this.isHorizontal?this.rootElement.scrollLeft=t:this.rootElement.scrollTop=t}resize(){this.dimensions.resize()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.velocity=0,this.animate.stop()}start(){this.isStopped&&(this.isStopped=!1,this.reset())}stop(){this.isStopped||(this.isStopped=!0,this.animate.stop(),this.reset())}raf(t){const e=t-(this.time||t);this.time=t,this.animate.advance(.001*e)}scrollTo(t,{offset:e=0,immediate:n=!1,lock:r=!1,duration:s=this.options.duration,easing:o=this.options.easing,lerp:a=!s&&this.options.lerp,onComplete:l,force:h=!1,programmatic:c=!0}={}){if(!this.isStopped&&!this.isLocked||h){if(["top","left","start"].includes(t))t=0;else if(["bottom","right","end"].includes(t))t=this.limit;else{let n;if("string"==typeof t?n=document.querySelector(t):(null==t?void 0:t.nodeType)&&(n=t),n){if(this.options.wrapper!==window){const t=this.options.wrapper.getBoundingClientRect();e-=this.isHorizontal?t.left:t.top}const i=n.getBoundingClientRect();t=(this.isHorizontal?i.left:i.top)+this.animatedScroll}}if("number"==typeof t){if(t+=e,t=Math.round(t),this.options.infinite?c&&(this.targetScroll=this.animatedScroll=this.scroll):t=i(0,t,this.limit),n)return this.animatedScroll=this.targetScroll=t,this.setScroll(this.scroll),this.reset(),void(null==l||l(this));if(!c){if(t===this.targetScroll)return;this.targetScroll=t}this.animate.fromTo(this.animatedScroll,t,{duration:s,easing:o,lerp:a,onStart:()=>{r&&(this.isLocked=!0),this.isScrolling=!0},onUpdate:(t,e)=>{this.isScrolling=!0,this.velocity=t-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=t,this.setScroll(this.scroll),c&&(this.targetScroll=t),e||this.emit(),e&&(this.reset(),this.emit(),null==l||l(this),this.__preventNextScrollEvent=!0,requestAnimationFrame((()=>{delete this.__preventNextScrollEvent})))}})}}}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.__experimental__naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return"horizontal"===this.options.orientation}get actualScroll(){return this.isHorizontal?this.rootElement.scrollLeft:this.rootElement.scrollTop}get scroll(){return this.options.infinite?(this.animatedScroll%(t=this.limit)+t)%t:this.animatedScroll;var t}get progress(){return 0===this.limit?1:this.scroll/this.limit}get isSmooth(){return this.__isSmooth}set isSmooth(t){this.__isSmooth!==t&&(this.__isSmooth=t,this.toggleClassName("lenis-smooth",t))}get isScrolling(){return this.__isScrolling}set isScrolling(t){this.__isScrolling!==t&&(this.__isScrolling=t,this.toggleClassName("lenis-scrolling",t))}get isStopped(){return this.__isStopped}set isStopped(t){this.__isStopped!==t&&(this.__isStopped=t,this.toggleClassName("lenis-stopped",t))}get isLocked(){return this.__isLocked}set isLocked(t){this.__isLocked!==t&&(this.__isLocked=t,this.toggleClassName("lenis-locked",t))}get className(){let t="lenis";return this.isStopped&&(t+=" lenis-stopped"),this.isLocked&&(t+=" lenis-locked"),this.isScrolling&&(t+=" lenis-scrolling"),this.isSmooth&&(t+=" lenis-smooth"),t}toggleClassName(t,e){this.rootElement.classList.toggle(t,e),this.emitter.emit("className change",this)}}},250:(t,e,n)=>{"use strict";n.d(e,{$V:()=>Da,$YQ:()=>_o,BFQ:()=>jt,BG$:()=>oe,BVF:()=>z,Bf4:()=>ct,Bgp:()=>rt,BtG:()=>rs,CaW:()=>Zt,CdI:()=>tt,CtA:()=>Gt,Cy:()=>F,D1R:()=>yt,D67:()=>ze,D9w:()=>Qt,Djp:()=>se,DvJ:()=>jr,E2K:()=>Ht,EB7:()=>fo,EJi:()=>Co,EcG:()=>Ua,EoG:()=>$,F1y:()=>Ge,F5T:()=>Ar,FIo:()=>Eo,FM8:()=>En,FUD:()=>de,GG6:()=>ce,GUF:()=>Ne,Gih:()=>ue,H7L:()=>Je,HdW:()=>_e,HkE:()=>ya,Hy8:()=>D,I3e:()=>pn,IEO:()=>ws,ILR:()=>qt,IOt:()=>Pe,Ilk:()=>dr,JOQ:()=>zs,JQ4:()=>St,JUT:()=>Wn,Jjb:()=>We,KI_:()=>Ue,KhW:()=>M,Kj0:()=>Hr,Kz5:()=>wt,LSk:()=>Ye,LY2:()=>nt,LgZ:()=>R,LsT:()=>bt,Ltg:()=>Gn,Lun:()=>So,M$G:()=>He,M5h:()=>v,M6v:()=>X,M8C:()=>yn,N$j:()=>bs,N4l:()=>_,NDo:()=>Z,NKc:()=>Q,NMF:()=>Ce,NYV:()=>ae,NiX:()=>ls,Ns1:()=>Y,O4K:()=>an,O5A:()=>tn,O78:()=>je,ORg:()=>st,OTo:()=>Lt,OdW:()=>Ms,OoA:()=>ft,Ox3:()=>ga,PA7:()=>De,PMe:()=>la,Pa4:()=>Cn,PeU:()=>o,QO2:()=>me,QRU:()=>va,Qey:()=>ln,QmN:()=>s,ROQ:()=>mo,Rhp:()=>qr,RlZ:()=>N,RsA:()=>r,S2y:()=>l,S9g:()=>Ri,SPe:()=>Os,SUY:()=>Ea,Se2:()=>G,Sm8:()=>w,SvJ:()=>fe,Syv:()=>xe,T6w:()=>qe,T95:()=>xt,TUv:()=>Cs,TlE:()=>yr,Tme:()=>qi,TyD:()=>At,UCm:()=>Ut,USm:()=>Bi,UY4:()=>oo,UZH:()=>i,UlW:()=>Te,Vdb:()=>L,Vkp:()=>Sn,VzW:()=>It,WMw:()=>m,Wbm:()=>x,Wid:()=>xo,Wl3:()=>d,Wpd:()=>U,WwZ:()=>Me,Xaj:()=>y,YBo:()=>bo,YGz:()=>et,YLQ:()=>gt,ZAu:()=>os,ZK6:()=>sn,ZTh:()=>ye,ZXd:()=>
2La,Z_g:()=>Ao,Zen:()=>Ve,Zp0:()=>ma,Zr5:()=>H,ZzF:()=>qn,_12:()=>yo,_AM:()=>Xt,_C8:()=>Po,_Li:()=>p,_RZ:()=>Ke,_fP:()=>xn,_iA:()=>h,_wr:()=>O,a$l:()=>Cr,aCh:()=>Le,aH4:()=>mt,aLr:()=>ui,aNw:()=>Yo,av9:()=>zt,bGH:()=>E,bdR:()=>g,blk:()=>so,brP:()=>Ft,bsb:()=>Ae,c8b:()=>S,cLu:()=>Mt,cM7:()=>rn,cPb:()=>es,cac:()=>$e,cek:()=>pa,dSO:()=>ht,dUE:()=>ko,dVD:()=>Dt,dZ3:()=>it,dd2:()=>Vn,dpR:()=>ea,dwf:()=>Wr,dwk:()=>u,eD:()=>j,eaV:()=>Kt,ehD:()=>f,ejS:()=>ro,ekQ:()=>te,epp:()=>Rn,f2y:()=>ge,fSK:()=>P,fY$:()=>at,fto:()=>Jt,g8_:()=>ut,ghN:()=>I,gi4:()=>re,hEm:()=>kt,hH6:()=>Jo,iAb:()=>Ct,iKG:()=>fa,iLg:()=>zo,iMs:()=>Ba,iUV:()=>Ma,iWC:()=>T,iWj:()=>js,iiP:()=>pe,irR:()=>Bt,j17:()=>Fe,jFi:()=>A,jZA:()=>ne,jes:()=>k,jyz:()=>Kr,k0A:()=>Tt,k74:()=>B,kB5:()=>ps,ksN:()=>W,l0P:()=>$t,l6D:()=>Oe,lCJ:()=>xr,lGU:()=>Ee,lRF:()=>wo,lb7:()=>Ts,m7l:()=>Vo,mSO:()=>Re,nls:()=>Ws,ntZ:()=>c,oAp:()=>ss,oDz:()=>Xr,p3g:()=>jn,pBf:()=>hn,pKu:()=>he,ptH:()=>ee,qVC:()=>go,qhX:()=>K,qkB:()=>Ot,qlB:()=>Er,qyh:()=>vt,rDY:()=>Yr,rOj:()=>C,r_:()=>b,rpg:()=>dt,tQZ:()=>Pt,tm_:()=>a,u9r:()=>Rr,uL9:()=>J,uWy:()=>pt,v3W:()=>Wt,vBJ:()=>gr,vCF:()=>V,vCx:()=>Yt,vUy:()=>on,vpT:()=>us,vuL:()=>ve,vxC:()=>lt,w$m:()=>q,wJv:()=>Rt,wem:()=>_t,wk1:()=>Nt,woe:()=>uo,wuA:()=>Vt,x12:()=>to,xEZ:()=>zn,xJs:()=>le,xnb:()=>vo,xoQ:()=>Qe,xsS:()=>cs,y2t:()=>ie,yC1:()=>Ho,yGw:()=>yi,ybr:()=>hs,ywz:()=>Et,z$h:()=>Be,zHn:()=>vi});const i="181",r={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},s={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},o=0,a=1,l=2,h=1,c=2,u=3,d=0,p=1,f=2,A=0,g=1,m=2,_=3,v=4,y=5,E=100,x=101,C=102,b=103,w=104,S=200,I=201,M=202,T=203,B=204,R=205,P=206,D=207,L=208,U=209,N=210,O=211,F=212,k=213,Q=214,z=0,G=1,H=2,V=3,j=4,W=5,q=6,X=7,Y=0,K=1,Z=2,J=0,$=1,tt=2,et=3,nt=4,it=5,rt=6,st=7,ot="attached",at=301,lt=302,ht=303,ct=304,ut=306,dt=1e3,pt=1001,ft=1002,At=1003,gt=1004,mt=1005,_t=1006,vt=1007,yt=1008,Et=1009,xt=1010,Ct=1011,bt=1012,wt=1013,St=1014,It=1015,Mt=1016,Tt=1017,Bt=1018,Rt=1020,Pt=35902,Dt=35899,Lt=1021,Ut=1022,Nt=1023,Ot=1026,Ft=1027,kt=1028,Qt=1029,zt=1030,Gt=1031,Ht=1033,Vt=33776,jt=33777,Wt=33778,qt=33779,Xt=35840,Yt=35841,Kt=35842,Zt=35843,Jt=36196,$t=37492,te=37496,ee=37808,ne=37809,ie=37810,re=37811,se=37812,oe=37813,ae=37814,le=37815,he=37816,ce=37817,ue=37818,de=37819,pe=37820,fe=37821,Ae=36492,ge=36494,me=36495,_e=36283,ve=36284,ye=36285,Ee=36286,xe=2300,Ce=2301,be=2302,we=2400,Se=2401,Ie=2402,Me=0,Te=1,Be=2,Re=3201,Pe=0,De=1,Le="",Ue="srgb",Ne="srgb-linear",Oe="linear",Fe="srgb",ke=7680,Qe=512,ze=513,Ge=514,He=515,Ve=516,je=517,We=518,qe=519,Xe=35044,Ye="300 es",Ke=2e3,Ze=2001;function Je(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;function $e(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function tn(){const t=$e("canvas");return t.style.display="block",t}const en={};let nn=null;function rn(...t){const e="THREE."+t.shift();nn?nn("log",e,...t):console.log(e,...t)}function sn(...t){const e="THREE."+t.shift();nn?nn("warn",e,...t):console.warn(e,...t)}function on(...t){const e="THREE."+t.shift();nn?nn("error",e,...t):console.error(e,...t)}function an(...t){const e=t.join(" ");e in en||(en[e]=!0,sn(...t))}function ln(t,e,n){return new Promise((function(i,r){setTimeout((function s(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:r();break;case t.TIMEOUT_EXPIRED:setTimeout(s,n);break;default:i()}}),n)}))}class hn{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)}hasEventListener(t,e){const n=this._listeners;return void 0!==n&&(void 0!==n[t]&&-1!==n[t].indexOf(e))}removeEventListener(t,e){const n=this._listeners;if(void 0===n)return;const i=n[t];if(void 0!==i){const t=i.indexOf(e);-1!==t&&i.splice(t,1)}}dispatchEvent(t){const e=this._listeners;if(void 0===e)return;const n=e[t.type];if(void 0!==n){t.target=this;const e=n.slice(0);for(let n=0,i=e.length;n<i;n++)e[n].call(this,t);t.target=null}}}const cn=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","5
25","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let un=1234567;const dn=Math.PI/180,pn=180/Math.PI;function fn(){const t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(cn[255&t]+cn[t>>8&255]+cn[t>>16&255]+cn[t>>24&255]+"-"+cn[255&e]+cn[e>>8&255]+"-"+cn[e>>16&15|64]+cn[e>>24&255]+"-"+cn[63&n|128]+cn[n>>8&255]+"-"+cn[n>>16&255]+cn[n>>24&255]+cn[255&i]+cn[i>>8&255]+cn[i>>16&255]+cn[i>>24&255]).toLowerCase()}function An(t,e,n){return Math.max(e,Math.min(n,t))}function gn(t,e){return(t%e+e)%e}function mn(t,e,n){return(1-n)*t+n*e}function _n(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function vn(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(4294967295*t);case Uint16Array:return Math.round(65535*t);case Uint8Array:return Math.round(255*t);case Int32Array:return Math.round(2147483647*t);case Int16Array:return Math.round(32767*t);case Int8Array:return Math.round(127*t);default:throw new Error("Invalid component type.")}}const yn={DEG2RAD:dn,RAD2DEG:pn,generateUUID:fn,clamp:An,euclideanModulo:gn,mapLinear:function(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)},inverseLerp:function(t,e,n){return t!==e?(n-t)/(e-t):0},lerp:mn,damp:function(t,e,n,i){return mn(t,e,1-Math.exp(-n*i))},pingpong:function(t,e=1){return e-Math.abs(gn(t,2*e)-e)},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*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())},seededRandom:function(t){void 0!==t&&(un=t);let e=un+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296},degToRad:function(t){return t*dn},radToDeg:function(t){return t*pn},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},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))},setQuaternionFromProperEuler:function(t,e,n,i,r){const s=Math.cos,o=Math.sin,a=s(n/2),l=o(n/2),h=s((e+i)/2),c=o((e+i)/2),u=s((e-i)/2),d=o((e-i)/2),p=s((i-e)/2),f=o((i-e)/2);switch(r){case"XYX":t.set(a*c,l*u,l*d,a*h);break;case"YZY":t.set(l*d,a*c,l*u,a*h);break;case"ZXZ":t.set(l*u,l*d,a*c,a*h);break;case"XZX":t.set(a*c,l*f,l*p,a*h);break;case"YXY":t.set(l*p,a*c,l*f,a*h);break;case"ZYZ":t.set(l*f,l*p,a*c,a*h);break;default:sn("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}},normalize:vn,denormalize:_n};class En{constructor(t=0,e=0){En.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=An(this.x,t.x,e.x),this.y=An(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=An(this.x,t,e),this.y=An(this.y,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(An(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}
vendor: 10,452 bytes, line 2
2round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(An(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,s=this.y-t.y;return this.x=r*n-s*i+t.x,this.y=r*i+s*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class xn{constructor(t=0,e=0,n=0,i=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,r,s,o){let a=n[i+0],l=n[i+1],h=n[i+2],c=n[i+3],u=r[s+0],d=r[s+1],p=r[s+2],f=r[s+3];if(o<=0)return t[e+0]=a,t[e+1]=l,t[e+2]=h,void(t[e+3]=c);if(o>=1)return t[e+0]=u,t[e+1]=d,t[e+2]=p,void(t[e+3]=f);if(c!==f||a!==u||l!==d||h!==p){let t=a*u+l*d+h*p+c*f;t<0&&(u=-u,d=-d,p=-p,f=-f,t=-t);let e=1-o;if(t<.9995){const n=Math.acos(t),i=Math.sin(n);e=Math.sin(e*n)/i,a=a*e+u*(o=Math.sin(o*n)/i),l=l*e+d*o,h=h*e+p*o,c=c*e+f*o}else{a=a*e+u*o,l=l*e+d*o,h=h*e+p*o,c=c*e+f*o;const t=1/Math.sqrt(a*a+l*l+h*h+c*c);a*=t,l*=t,h*=t,c*=t}}t[e]=a,t[e+1]=l,t[e+2]=h,t[e+3]=c}static multiplyQuaternionsFlat(t,e,n,i,r,s){const o=n[i],a=n[i+1],l=n[i+2],h=n[i+3],c=r[s],u=r[s+1],d=r[s+2],p=r[s+3];return t[e]=o*p+h*c+a*d-l*u,t[e+1]=a*p+h*u+l*c-o*d,t[e+2]=l*p+h*d+o*u-a*c,t[e+3]=h*p-o*c-a*u-l*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const n=t._x,i=t._y,r=t._z,s=t._order,o=Math.cos,a=Math.sin,l=o(n/2),h=o(i/2),c=o(r/2),u=a(n/2),d=a(i/2),p=a(r/2);switch(s){case"XYZ":this._x=u*h*c+l*d*p,this._y=l*d*c-u*h*p,this._z=l*h*p+u*d*c,this._w=l*h*c-u*d*p;break;case"YXZ":this._x=u*h*c+l*d*p,this._y=l*d*c-u*h*p,this._z=l*h*p-u*d*c,this._w=l*h*c+u*d*p;break;case"ZXY":this._x=u*h*c-l*d*p,this._y=l*d*c+u*h*p,this._z=l*h*p+u*d*c,this._w=l*h*c-u*d*p;break;case"ZYX":this._x=u*h*c-l*d*p,this._y=l*d*c+u*h*p,this._z=l*h*p-u*d*c,this._w=l*h*c+u*d*p;break;case"YZX":this._x=u*h*c+l*d*p,this._y=l*d*c+u*h*p,this._z=l*h*p-u*d*c,this._w=l*h*c-u*d*p;break;case"XZY":this._x=u*h*c-l*d*p,this._y=l*d*c-u*h*p,this._z=l*h*p+u*d*c,this._w=l*h*c+u*d*p;break;default:sn("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!0===e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,n=e[0],i=e[4],r=e[8],s=e[1],o=e[5],a=e[9],l=e[2],h=e[6],c=e[10],u=n+o+c;if(u>0){const t=.5/Math.sqrt(u+1);this._w=.25/t,this._x=(h-a)*t,this._y=(r-l)*t,this._z=(s-i)*t}else if(n>o&&n>c){const t=2*Math.sqrt(1+n-o-c);this._w=(h-a)/t,this._x=.25*t,this._y=(i+s)/t,this._z=(r+l)/t}else if(o>c){const t=2*Math.sqrt(1+o-n-c);this._w=(r-l)/t,this._x=(i+s)/t,this._y=.25*t,this._z=(a+h)/t}else{const t=2*Math.sqrt(1+c-n-o);this._w=(s-i)/t,this._x=(r+l)/t,this._y=(a+h)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<1e-8?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(An(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(0===n)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,s=t._w,o=e._x,a=e._y,l=e._z,h=e._w;return this._x=n*h+s*o+i*l-r*a,this._y=i*h+s*a+r*o-n*l,this._z=r*h+s*l+n*a-i*o,this._w=s*h-n*o-i*a-r*l,this._onChangeCallback(),this}slerp(t,e){if(e<=0)return this;if(e>=1)return this.copy(t);let n=t._x,i=t._y,r=t._z,s=t._w,o=this.dot(t);o<0&&(n=-n,i=-i,r=-r,s=-s,o=-o);let a=1-e;if(o<.9995){const t=Math.acos(o),l=Math.sin(t);a=Math.sin(a*t)/l,e=Math.sin(e*t)/l,this._x=this._x*a+n*e,this._y=this._y*a+i*e,this._z=this._z*a+r*e,this._w=this._w*a+s*e,this._onChangeCallback()}else this._x=this._x*a+n*e,this._y=this._y*a+i*e,this._z=this._z*a+r*e,this._w=this._w*a+s*e,this.normalize();return this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(t),i*Math.cos(t),r*Math.sin(e),r*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Cn{constructor(t=0,e=0,n=0){Cn.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return void 0===n&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(wn.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(wn.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.elements,s=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*s,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*s,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*s,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,o=t.z,a=t.w,l=2*(s*i-o*n),h=2*(o*e-r*i),c=2*(r*n-s*e);return this.x=e+a*l+s*c-o*h,this.y=n+a*h+o*l-r*c,this.z=i+a*c+r*h-s*l,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(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(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(t,e){return this.x=An(this.x,t.x,e.x),this.y=An(this.y,t.y,e.y),this.z=An(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=An(this.x,t,e),this.y=An(this.y,t,e),this.z=An(this.z,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(An(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}
vendor: 5,301 bytes, line 2
2round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(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(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=i*a-r*o,this.y=r*s-n*a,this.z=n*o-i*s,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return bn.copy(this).projectOnVector(t),this.sub(bn)}reflect(t){return this.sub(bn.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(An(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){const i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=2*Math.random()-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const bn=new Cn,wn=new xn;class Sn{constructor(t,e,n,i,r,s,o,a,l){Sn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==t&&this.set(t,e,n,i,r,s,o,a,l)}set(t,e,n,i,r,s,o,a,l){const h=this.elements;return h[0]=t,h[1]=i,h[2]=o,h[3]=e,h[4]=r,h[5]=a,h[6]=n,h[7]=s,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],o=n[3],a=n[6],l=n[1],h=n[4],c=n[7],u=n[2],d=n[5],p=n[8],f=i[0],A=i[3],g=i[6],m=i[1],_=i[4],v=i[7],y=i[2],E=i[5],x=i[8];return r[0]=s*f+o*m+a*y,r[3]=s*A+o*_+a*E,r[6]=s*g+o*v+a*x,r[1]=l*f+h*m+c*y,r[4]=l*A+h*_+c*E,r[7]=l*g+h*v+c*x,r[2]=u*f+d*m+p*y,r[5]=u*A+d*_+p*E,r[8]=u*g+d*v+p*x,this}multiplyScalar(t){const 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(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],l=t[7],h=t[8];return e*s*h-e*o*l-n*r*h+n*o*a+i*r*l-i*s*a}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],l=t[7],h=t[8],c=h*s-o*l,u=o*a-h*r,d=l*r-s*a,p=e*c+n*u+i*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return t[0]=c*f,t[1]=(i*l-h*n)*f,t[2]=(o*n-i*s)*f,t[3]=u*f,t[4]=(h*e-i*a)*f,t[5]=(i*r-o*e)*f,t[6]=d*f,t[7]=(n*a-l*e)*f,t[8]=(s*e-n*r)*f,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const 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(t,e,n,i,r,s,o){const a=Math.cos(r),l=Math.sin(r);
vendor: 3,249 bytes, line 2
2return this.set(n*a,n*l,-n*(a*s+l*o)+s+t,-i*l,i*a,-i*(-l*s+a*o)+o+e,0,0,1),this}scale(t,e){return this.premultiply(In.makeScale(t,e)),this}rotate(t){return this.premultiply(In.makeRotation(-t)),this}translate(t,e){return this.premultiply(In.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<9;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}const In=new Sn,Mn=(new Sn).set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Tn=(new Sn).set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function Bn(){const t={enabled:!0,workingColorSpace:Ne,spaces:{},convert:function(t,e,n){return!1!==this.enabled&&e!==n&&e&&n?(this.spaces[e].transfer===Fe&&(t.r=Pn(t.r),t.g=Pn(t.g),t.b=Pn(t.b)),this.spaces[e].primaries!==this.spaces[n].primaries&&(t.applyMatrix3(this.spaces[e].toXYZ),t.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===Fe&&(t.r=Dn(t.r),t.g=Dn(t.g),t.b=Dn(t.b)),t):t},workingToColorSpace:function(t,e){return this.convert(t,this.workingColorSpace,e)},colorSpaceToWorking:function(t,e){return this.convert(t,e,this.workingColorSpace)},getPrimaries:function(t){return this.spaces[t].primaries},getTransfer:function(t){return t===Le?Oe:this.spaces[t].transfer},getToneMappingMode:function(t){return this.spaces[t].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(t,e=this.workingColorSpace){return t.fromArray(this.spaces[e].luminanceCoefficients)},define:function(t){Object.assign(this.spaces,t)},_getMatrix:function(t,e,n){return t.copy(this.spaces[e].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(t){return this.spaces[t].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(t=this.workingColorSpace){return this.spaces[t].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(e,n){return an("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),t.workingToColorSpace(e,n)},toWorkingColorSpace:function(e,n){return an("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),t.colorSpaceToWorking(e,n)}},e=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],i=[.3127,.329];return t.define({[Ne]:{primaries:e,whitePoint:i,transfer:Oe,toXYZ:Mn,fromXYZ:Tn,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:Ue},outputColorSpaceConfig:{drawingBufferColorSpace:Ue}},[Ue]:{primaries:e,whitePoint:i,transfer:Fe,toXYZ:Mn,fromXYZ:Tn,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:Ue}}}),t}const Rn=Bn();function Pn(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}
vendor: 34,829 bytes, line 2
2function Dn(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}let Ln;class Un{static getDataURL(t,e="image/png"){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let n;if(t instanceof HTMLCanvasElement)n=t;else{void 0===Ln&&(Ln=$e("canvas")),Ln.width=t.width,Ln.height=t.height;const e=Ln.getContext("2d");t instanceof ImageData?e.putImageData(t,0,0):e.drawImage(t,0,0,t.width,t.height),n=Ln}return n.toDataURL(e)}static sRGBToLinear(t){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const e=$e("canvas");e.width=t.width,e.height=t.height;const n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);const i=n.getImageData(0,0,t.width,t.height),r=i.data;for(let t=0;t<r.length;t++)r[t]=255*Pn(r[t]/255);return n.putImageData(i,0,0),e}if(t.data){const e=t.data.slice(0);for(let t=0;t<e.length;t++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[t]=Math.floor(255*Pn(e[t]/255)):e[t]=Pn(e[t]);return{data:e,width:t.width,height:t.height}}return sn("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}let Nn=0;class On{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Nn++}),this.uuid=fn(),this.data=t,this.dataReady=!0,this.version=0}getSize(t){const e=this.data;return"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement?t.set(e.videoWidth,e.videoHeight,0):e instanceof VideoFrame?t.set(e.displayHeight,e.displayWidth,0):null!==e?t.set(e.width,e.height,e.depth||0):t.set(0,0,0),t}set needsUpdate(t){!0===t&&this.version++}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.images[this.uuid])return t.images[this.uuid];const n={uuid:this.uuid,url:""},i=this.data;if(null!==i){let t;if(Array.isArray(i)){t=[];for(let e=0,n=i.length;e<n;e++)i[e].isDataTexture?t.push(Fn(i[e].image)):t.push(Fn(i[e]))}else t=Fn(i);n.url=t}return e||(t.images[this.uuid]=n),n}}function Fn(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?Un.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(sn("Texture: Unable to serialize Texture."),{})}let kn=0;const Qn=new Cn;class zn extends hn{constructor(t=zn.DEFAULT_IMAGE,e=zn.DEFAULT_MAPPING,n=pt,i=pt,r=_t,s=yt,o=Nt,a=Et,l=zn.DEFAULT_ANISOTROPY,h=Le){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:kn++}),this.uuid=fn(),this.name="",this.source=new On(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=s,this.anisotropy=l,this.format=o,this.internalFormat=null,this.type=a,this.offset=new En(0,0),this.repeat=new En(1,1),this.center=new En(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Sn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(Qn).x}get height(){return this.source.getSize(Qn).y}get depth(){return this.source.getSize(Qn).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return(new this.constructor).copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,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.internalFormat=t.internalFormat,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.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(const e in t){const n=t[e];if(void 0===n){sn(`Texture.setValues(): parameter '${e}' has value of undefined.`);continue}const i=this[e];void 0!==i?i&&n&&i.isVector2&&n.isVector2||i&&n&&i.isVector3&&n.isVector3||i&&n&&i.isMatrix3&&n.isMatrix3?i.copy(n):this[e]=n:sn(`Texture.setValues(): property '${e}' does not exist.`)}}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,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,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case dt:t.x=t.x-Math.floor(t.x);break;case pt:t.x=t.x<0?0:1;break;case ft:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case dt:t.y=t.y-Math.floor(t.y);break;case pt:t.y=t.y<0?0:1;break;case ft:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){!0===t&&this.pmremVersion++}}zn.DEFAULT_IMAGE=null,zn.DEFAULT_MAPPING=300,zn.DEFAULT_ANISOTROPY=1;class Gn{constructor(t=0,e=0,n=0,i=1){Gn.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(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 new Error("index is out of range: "+t)}return this}getComponent(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 new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(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(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(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(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}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=this.w,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*e+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*e+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*e+s[7]*n+s[11]*i+s[15]*r,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,r;const s=.01,o=.1,a=t.elements,l=a[0],h=a[4],c=a[8],u=a[1],d=a[5],p=a[9],f=a[2],A=a[6],g=a[10];if(Math.abs(h-u)<s&&Math.abs(c-f)<s&&Math.abs(p-A)<s){if(Math.abs(h+u)<o&&Math.abs(c+f)<o&&Math.abs(p+A)<o&&Math.abs(l+d+g-3)<o)return this.set(1,0,0,0),this;e=Math.PI;const t=(l+1)/2,a=(d+1)/2,m=(g+1)/2,_=(h+u)/4,v=(c+f)/4,y=(p+A)/4;return t>a&&t>m?t<s?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(t),i=_/n,r=v/n):a>m?a<s?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(a),n=_/i,r=y/i):m<s?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(m),n=v/r,i=y/r),this.set(n,i,r,e),this}let m=Math.sqrt((A-p)*(A-p)+(c-f)*(c-f)+(u-h)*(u-h));return Math.abs(m)<.001&&(m=1),this.x=(A-p)/m,this.y=(c-f)/m,this.z=(u-h)/m,this.w=Math.acos((l+d+g-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(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(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(t,e){return this.x=An(this.x,t.x,e.x),this.y=An(this.y,t.y,e.y),this.z=An(this.z,t.z,e.z),this.w=An(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=An(this.x,t,e),this.y=An(this.y,t,e),this.z=An(this.z,t,e),this.w=An(this.w,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(An(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(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(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Hn extends hn{constructor(t=1,e=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:_t,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=n.depth,this.scissor=new Gn(0,0,t,e),this.scissorTest=!1,this.viewport=new Gn(0,0,t,e);const i={width:t,height:e,depth:n.depth},r=new zn(i);this.textures=[];const s=n.count;for(let t=0;t<s;t++)this.textures[t]=r.clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(t={}){const e={minFilter:_t,generateMipmaps:!1,flipY:!1,internalFormat:null};void 0!==t.mapping&&(e.mapping=t.mapping),void 0!==t.wrapS&&(e.wrapS=t.wrapS),void 0!==t.wrapT&&(e.wrapT=t.wrapT),void 0!==t.wrapR&&(e.wrapR=t.wrapR),void 0!==t.magFilter&&(e.magFilter=t.magFilter),void 0!==t.minFilter&&(e.minFilter=t.minFilter),void 0!==t.format&&(e.format=t.format),void 0!==t.type&&(e.type=t.type),void 0!==t.anisotropy&&(e.anisotropy=t.anisotropy),void 0!==t.colorSpace&&(e.colorSpace=t.colorSpace),void 0!==t.flipY&&(e.flipY=t.flipY),void 0!==t.generateMipmaps&&(e.generateMipmaps=t.generateMipmaps),void 0!==t.internalFormat&&(e.internalFormat=t.internalFormat);for(let t=0;t<this.textures.length;t++){this.textures[t].setValues(e)}}get texture(){return this.textures[0]}set texture(t){this.textures[0]=t}set depthTexture(t){null!==this._depthTexture&&(this._depthTexture.renderTarget=null),null!==t&&(t.renderTarget=this),this._depthTexture=t}get depthTexture(){return this._depthTexture}setSize(t,e,n=1){if(this.width!==t||this.height!==e||this.depth!==n){this.width=t,this.height=e,this.depth=n;for(let i=0,r=this.textures.length;i<r;i++)this.textures[i].image.width=t,this.textures[i].image.height=e,this.textures[i].image.depth=n,!0!==this.textures[i].isData3DTexture&&(this.textures[i].isArrayTexture=this.textures[i].image.depth>1);this.dispose()}this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return(new this.constructor).copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.textures.length=0;for(let e=0,n=t.textures.length;e<n;e++){this.textures[e]=t.textures[e].clone(),this.textures[e].isRenderTargetTexture=!0,this.textures[e].renderTarget=this;const n=Object.assign({},t.textures[e].image);this.textures[e].source=new On(n)}return this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.resolveDepthBuffer=t.resolveDepthBuffer,this.resolveStencilBuffer=t.resolveStencilBuffer,null!==t.depthTexture&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Vn extends Hn{constructor(t=1,e=1,n={}){super(t,e,n),this.isWebGLRenderTarget=!0}}class jn extends zn{constructor(t=null,e=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=At,this.minFilter=At,this.wrapR=pt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class Wn extends zn{constructor(t=null,e=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=At,this.minFilter=At,this.wrapR=pt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class qn{constructor(t=new Cn(1/0,1/0,1/0),e=new Cn(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e+=3)this.expandByPoint(Yn.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,n=t.count;e<n;e++)this.expandByPoint(Yn.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const n=Yn.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return(new this.constructor).copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);const n=t.geometry;if(void 0!==n){const i=n.getAttribute("position");if(!0===e&&void 0!==i&&!0!==t.isInstancedMesh)for(let e=0,n=i.count;e<n;e++)!0===t.isMesh?t.getVertexPosition(e,Yn):Yn.fromBufferAttribute(i,e),Yn.applyMatrix4(t.matrixWorld),this.expandByPoint(Yn);else void 0!==t.boundingBox?(null===t.boundingBox&&t.computeBoundingBox(),Kn.copy(t.boundingBox)):(null===n.boundingBox&&n.computeBoundingBox(),Kn.copy(n.boundingBox)),Kn.applyMatrix4(t.matrixWorld),this.union(Kn)}const i=t.children;for(let t=0,n=i.length;t<n;t++)this.expandByObject(i[t],e);return this}containsPoint(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(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(t,e){return 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(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(t){return this.clampPoint(t.center,Yn),Yn.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(ii),ri.subVectors(this.max,ii),Zn.subVectors(t.a,ii),Jn.subVectors(t.b,ii),$n.subVectors(t.c,ii),ti.subVectors(Jn,Zn),ei.subVectors($n,Jn),ni.subVectors(Zn,$n);let e=[0,-ti.z,ti.y,0,-ei.z,ei.y,0,-ni.z,ni.y,ti.z,0,-ti.x,ei.z,0,-ei.x,ni.z,0,-ni.x,-ti.y,ti.x,0,-ei.y,ei.x,0,-ni.y,ni.x,0];return!!ai(e,Zn,Jn,$n,ri)&&(e=[1,0,0,0,1,0,0,0,1],!!ai(e,Zn,Jn,$n,ri)&&(si.crossVectors(ti,ei),e=[si.x,si.y,si.z],ai(e,Zn,Jn,$n,ri)))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,Yn).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(Yn).length()),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(Xn[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Xn[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Xn[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Xn[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Xn[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Xn[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Xn[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Xn[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Xn)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(t){return this.min.fromArray(t.min),this.max.fromArray(t.max),this}}const Xn=[new Cn,new Cn,new Cn,new Cn,new Cn,new Cn,new Cn,new Cn],Yn=new Cn,Kn=new qn,Zn=new Cn,Jn=new Cn,$n=new Cn,ti=new Cn,ei=new Cn,ni=new Cn,ii=new Cn,ri=new Cn,si=new Cn,oi=new Cn;function ai(t,e,n,i,r){for(let s=0,o=t.length-3;s<=o;s+=3){oi.fromArray(t,s);const o=r.x*Math.abs(oi.x)+r.y*Math.abs(oi.y)+r.z*Math.abs(oi.z),a=e.dot(oi),l=n.dot(oi),h=i.dot(oi);if(Math.max(-Math.max(a,l,h),Math.min(a,l,h))>o)return!1}return!0}const li=new qn,hi=new Cn,ci=new Cn;class ui{constructor(t=new Cn,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const n=this.center;void 0!==e?n.copy(e):li.setFromPoints(t).getCenter(n);let i=0;for(let e=0,r=t.length;e<r;e++)i=Math.max(i,n.distanceToSquared(t[e]));return this.radius=Math.sqrt(i),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){const n=this.center.distanceToSquared(t);return e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;hi.subVectors(t,this.center);const e=hi.lengthSq();if(e>this.radius*this.radius){const t=Math.sqrt(e),n=.5*(t-this.radius);this.center.addScaledVector(hi,n/t),this.radius+=n}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(!0===this.center.equals(t.center)?this.radius=Math.max(this.radius,t.radius):(ci.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(hi.copy(t.center).add(ci)),this.expandByPoint(hi.copy(t.center).sub(ci))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(t){return this.radius=t.radius,this.center.fromArray(t.center),this}}const di=new Cn,pi=new Cn,fi=new Cn,Ai=new Cn,gi=new Cn,mi=new Cn,_i=new Cn;class vi{constructor(t=new Cn,e=new Cn(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,di)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=di.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(di.copy(this.origin).addScaledVector(this.direction,e),di.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){pi.copy(t).add(e).multiplyScalar(.5),fi.copy(e).sub(t).normalize(),Ai.copy(this.origin).sub(pi);const r=.5*t.distanceTo(e),s=-this.direction.dot(fi),o=Ai.dot(this.direction),a=-Ai.dot(fi),l=Ai.lengthSq(),h=Math.abs(1-s*s);let c,u,d,p;if(h>0)if(c=s*a-o,u=s*o-a,p=r*h,c>=0)if(u>=-p)if(u<=p){const t=1/h;c*=t,u*=t,d=c*(c+s*u+2*o)+u*(s*c+u+2*a)+l}else u=r,c=Math.max(0,-(s*u+o)),d=-c*c+u*(u+2*a)+l;else u=-r,c=Math.max(0,-(s*u+o)),d=-c*c+u*(u+2*a)+l;else u<=-p?(c=Math.max(0,-(-s*r+o)),u=c>0?-r:Math.min(Math.max(-r,-a),r),d=-c*c+u*(u+2*a)+l):u<=p?(c=0,u=Math.min(Math.max(-r,-a),r),d=u*(u+2*a)+l):(c=Math.max(0,-(s*r+o)),u=c>0?r:Math.min(Math.max(-r,-a),r),d=-c*c+u*(u+2*a)+l);else u=s>0?-r:r,c=Math.max(0,-(s*u+o)),d=-c*c+u*(u+2*a)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,c),i&&i.copy(pi).addScaledVector(fi,u),d}intersectSphere(t,e){di.subVectors(t.center,this.origin);const n=di.dot(this.direction),i=di.dot(di)-n*n,r=t.radius*t.radius;if(i>r)return null;const s=Math.sqrt(r-i),o=n-s,a=n+s;return a<0?null:o<0?this.at(a,e):this.at(o,e)}intersectsSphere(t){return!(t.radius<0)&&this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){const n=this.distanceToPlane(t);return null===n?null:this.at(n,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);if(0===e)return!0;return t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,r,s,o,a;const l=1/this.direction.x,h=1/this.direction.y,c=1/this.direction.z,u=this.origin;return l>=0?(n=(t.min.x-u.x)*l,i=(t.max.x-u.x)*l):(n=(t.max.x-u.x)*l,i=(t.min.x-u.x)*l),h>=0?(r=(t.min.y-u.y)*h,s=(t.max.y-u.y)*h):(r=(t.max.y-u.y)*h,s=(t.min.y-u.y)*h),n>s||r>i?null:((r>n||isNaN(n))&&(n=r),(s<i||isNaN(i))&&(i=s),c>=0?(o=(t.min.z-u.z)*c,a=(t.max.z-u.z)*c):(o=(t.max.z-u.z)*c,a=(t.min.z-u.z)*c),n>a||o>i?null:((o>n||n!=n)&&(n=o),(a<i||i!=i)&&(i=a),i<0?null:this.at(n>=0?n:i,e)))}intersectsBox(t){return null!==this.intersectBox(t,di)}intersectTriangle(t,e,n,i,r){gi.subVectors(e,t),mi.subVectors(n,t),_i.crossVectors(gi,mi);let s,o=this.direction.dot(_i);if(o>0){if(i)return null;s=1}else{if(!(o<0))return null;s=-1,o=-o}Ai.subVectors(this.origin,t);const a=s*this.direction.dot(mi.crossVectors(Ai,mi));if(a<0)return null;const l=s*this.direction.dot(gi.cross(Ai));if(l<0)return null;if(a+l>o)return null;const h=-s*Ai.dot(_i);return h<0?null:this.at(h/o,r)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class yi{constructor(t,e,n,i,r,s,o,a,l,h,c,u,d,p,f,A){yi.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==t&&this.set(t,e,n,i,r,s,o,a,l,h,c,u,d,p,f,A)}set(t,e,n,i,r,s,o,a,l,h,c,u,d,p,f,A){const g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=i,g[1]=r,g[5]=s,g[9]=o,g[13]=a,g[2]=l,g[6]=h,g[10]=c,g[14]=u,g[3]=d,g[7]=p,g[11]=f,g[15]=A,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new yi).fromArray(this.elements)}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){const e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,n=t.elements,i=1/Ei.setFromMatrixColumn(t,0).length(),r=1/Ei.setFromMatrixColumn(t,1).length(),s=1/Ei.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=0,e[8]=n[8]*s,e[9]=n[9]*s,e[10]=n[10]*s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,n=t.x,i=t.y,r=t.z,s=Math.cos(n),o=Math.sin(n),a=Math.cos(i),l=Math.sin(i),h=Math.cos(r),c=Math.sin(r);if("XYZ"===t.order){const t=s*h,n=s*c,i=o*h,r=o*c;e[0]=a*h,e[4]=-a*c,e[8]=l,e[1]=n+i*l,e[5]=t-r*l,e[9]=-o*a,e[2]=r-t*l,e[6]=i+n*l,e[10]=s*a}else if("YXZ"===t.order){const t=a*h,n=a*c,i=l*h,r=l*c;e[0]=t+r*o,e[4]=i*o-n,e[8]=s*l,e[1]=s*c,e[5]=s*h,e[9]=-o,e[2]=n*o-i,e[6]=r+t*o,e[10]=s*a}else if("ZXY"===t.order){const t=a*h,n=a*c,i=l*h,r=l*c;e[0]=t-r*o,e[4]=-s*c,e[8]=i+n*o,e[1]=n+i*o,e[5]=s*h,e[9]=r-t*o,e[2]=-s*l,e[6]=o,e[10]=s*a}else if("ZYX"===t.order){const t=s*h,n=s*c,i=o*h,r=o*c;e[0]=a*h,e[4]=i*l-n,e[8]=t*l+r,e[1]=a*c,e[5]=r*l+t,e[9]=n*l-i,e[2]=-l,e[6]=o*a,e[10]=s*a}else if("YZX"===t.order){const t=s*a,n=s*l,i=o*a,r=o*l;e[0]=a*h,e[4]=r-t*c,e[8]=i*c+n,e[1]=c,e[5]=s*h,e[9]=-o*h,e[2]=-l*h,e[6]=n*c+i,e[10]=t-r*c}else if("XZY"===t.order){const t=s*a,n=s*l,i=o*a,r=o*l;e[0]=a*h,e[4]=-c,e[8]=l*h,e[1]=t*c+r,e[5]=s*h,e[9]=n*c-i,e[2]=i*c-n,e[6]=o*h,e[10]=r*c+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(t){return this.compose(Ci,t,bi)}lookAt(t,e,n){const i=this.elements;return Ii.subVectors(t,e),0===Ii.lengthSq()&&(Ii.z=1),Ii.normalize(),wi.crossVectors(n,Ii),0===wi.lengthSq()&&(1===Math.abs(n.z)?Ii.x+=1e-4:Ii.z+=1e-4,Ii.normalize(),wi.crossVectors(n,Ii)),wi.normalize(),Si.crossVectors(Ii,wi),i[0]=wi.x,i[4]=Si.x,i[8]=Ii.x,i[1]=wi.y,i[5]=Si.y,i[9]=Ii.y,i[2]=wi.z,i[6]=Si.z,i[10]=Ii.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],o=n[4],a=n[8],l=n[12],h=n[1],c=n[5],u=n[9],d=n[13],p=n[2],f=n[6],A=n[10],g=n[14],m=n[3],_=n[7],v=n[11],y=n[15],E=i[0],x=i[4],C=i[8],b=i[12],w=i[1],S=i[5],I=i[9],M=i[13],T=i[2],B=i[6],R=i[10],P=i[14],D=i[3],L=i[7],U=i[11],N=i[15];return r[0]=s*E+o*w+a*T+l*D,r[4]=s*x+o*S+a*B+l*L,r[8]=s*C+o*I+a*R+l*U,r[12]=s*b+o*M+a*P+l*N,r[1]=h*E+c*w+u*T+d*D,r[5]=h*x+c*S+u*B+d*L,r[9]=h*C+c*I+u*R+d*U,r[13]=h*b+c*M+u*P+d*N,r[2]=p*E+f*w+A*T+g*D,r[6]=p*x+f*S+A*B+g*L,r[10]=p*C+f*I+A*R+g*U,r[14]=p*b+f*M+A*P+g*N,r[3]=m*E+_*w+v*T+y*D,r[7]=m*x+_*S+v*B+y*L,r[11]=m*C+_*I+v*R+y*U,r[15]=m*b+_*M+v*P+y*N,this}multiplyScalar(t){const 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}determinant(){const t=this.elements,e=t[0],n=t[4],i=t[8],r=t[12],s=t[1],o=t[5],a=t[9],l=t[13],h=t[2],c=t[6],u=t[10],d=t[14];return t[3]*(+r*a*c-i*l*c-r*o*u+n*l*u+i*o*d-n*a*d)+t[7]*(+e*a*d-e*l*u+r*s*u-i*s*d+i*l*h-r*a*h)+t[11]*(+e*l*c-e*o*d-r*s*c+n*s*d+r*o*h-n*l*h)+t[15]*(-i*o*h-e*a*c+e*o*u+i*s*c-n*s*u+n*a*h)}transpose(){const t=this.elements;let e;return e=t[1],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(t,e,n){const i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],l=t[7],h=t[8],c=t[9],u=t[10],d=t[11],p=t[12],f=t[13],A=t[14],g=t[15],m=c*A*l-f*u*l+f*a*d-o*A*d-c*a*g+o*u*g,_=p*u*l-h*A*l-p*a*d+s*A*d+h*a*g-s*u*g,v=h*f*l-p*c*l+p*o*d-s*f*d-h*o*g+s*c*g,y=p*c*a-h*f*a-p*o*u+s*f*u+h*o*A-s*c*A,E=e*m+n*_+i*v+r*y;if(0===E)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const x=1/E;return t[0]=m*x,t[1]=(f*u*r-c*A*r-f*i*d+n*A*d+c*i*g-n*u*g)*x,t[2]=(o*A*r-f*a*r+f*i*l-n*A*l-o*i*g+n*a*g)*x,t[3]=(c*a*r-o*u*r-c*i*l+n*u*l+o*i*d-n*a*d)*x,t[4]=_*x,t[5]=(h*A*r-p*u*r+p*i*d-e*A*d-h*i*g+e*u*g)*x,t[6]=(p*a*r-s*A*r-p*i*l+e*A*l+s*i*g-e*a*g)*x,t[7]=(s*u*r-h*a*r+h*i*l-e*u*l-s*i*d+e*a*d)*x,t[8]=v*x,t[9]=(p*c*r-h*f*r-p*n*d+e*f*d+h*n*g-e*c*g)*x,t[10]=(s*f*r-p*o*r+p*n*l-e*f*l-s*n*g+e*o*g)*x,t[11]=(h*o*r-s*c*r-h*n*l+e*c*l+s*n*d-e*o*d)*x,t[12]=y*x,t[13]=(h*f*i-p*c*i+p*n*u-e*f*u-h*n*A+e*c*A)*x,t[14]=(p*o*i-s*f*i-p*n*a+e*f*a+s*n*A-e*o*A)*x,t[15]=(s*c*i-h*o*i+h*n*a-e*c*a-s*n*u+e*o*u)*x,this}scale(t){const e=this.elements,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=i,e[8]*=r,e[1]*=n,e[5]*=i,e[9]*=r,e[2]*=n,e[6]*=i,e[10]*=r,e[3]*=n,e[7]*=i,e[11]*=r,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),r=1-n,s=t.x,o=t.y,a=t.z,l=r*s,h=r*o;return this.set(l*s+n,l*o-i*a,l*a+i*o,0,l*o+i*a,h*o+n,h*a-i*s,0,l*a-i*o,h*a+i*s,r*a*a+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,r,s){return this.set(1,n,r,0,t,1,s,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){const i=this.elements,r=e._x,s=e._y,o=e._z,a=e._w,l=r+r,h=s+s,c=o+o,u=r*l,d=r*h,p=r*c,f=s*h,A=s*c,g=o*c,m=a*l,_=a*h,v=a*c,y=n.x,E=n.y,x=n.z;return i[0]=(1-(f+g))*y,i[1]=(d+v)*y,i[2]=(p-_)*y,i[3]=0,i[4]=(d-v)*E,i[5]=(1-(u+g))*E,i[6]=(A+m)*E,i[7]=0,i[8]=(p+_)*x,i[9]=(A-m)*x,i[10]=(1-(u+f))*x,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){const i=this.elements;let r=Ei.set(i[0],i[1],i[2]).length();const s=Ei.set(i[4],i[5],i[6]).length(),o=Ei.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],xi.copy(this);const a=1/r,l=1/s,h=1/o;return xi.elements[0]*=a,xi.elements[1]*=a,xi.elements[2]*=a,xi.elements[4]*=l,xi.elements[5]*=l,xi.elements[6]*=l,xi.elements[8]*=h,xi.elements[9]*=h,xi.elements[10]*=h,e.setFromRotationMatrix(xi),n.x=r,n.y=s,n.z=o,this}makePerspective(t,e,n,i,r,s,o=Ke,a=!1){const l=this.elements,h=2*r/(e-t),c=2*r/(n-i),u=(e+t)/(e-t),d=(n+i)/(n-i);let p,f;if(a)p=r/(s-r),f=s*r/(s-r);else if(o===Ke)p=-(s+r)/(s-r),f=-2*s*r/(s-r);else{if(o!==Ze)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);p=-s/(s-r),f=-s*r/(s-r)}return l[0]=h,l[4]=0,l[8]=u,l[12]=0,l[1]=0,l[5]=c,l[9]=d,l[13]=0,l[2]=0,l[6]=0,l[10
vendor: 9,467 bytes, line 2
2]=p,l[14]=f,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(t,e,n,i,r,s,o=Ke,a=!1){const l=this.elements,h=2/(e-t),c=2/(n-i),u=-(e+t)/(e-t),d=-(n+i)/(n-i);let p,f;if(a)p=1/(s-r),f=s/(s-r);else if(o===Ke)p=-2/(s-r),f=-(s+r)/(s-r);else{if(o!==Ze)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);p=-1/(s-r),f=-r/(s-r)}return l[0]=h,l[4]=0,l[8]=0,l[12]=u,l[1]=0,l[5]=c,l[9]=0,l[13]=d,l[2]=0,l[6]=0,l[10]=p,l[14]=f,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<16;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}const Ei=new Cn,xi=new yi,Ci=new Cn(0,0,0),bi=new Cn(1,1,1),wi=new Cn,Si=new Cn,Ii=new Cn,Mi=new yi,Ti=new xn;class Bi{constructor(t=0,e=0,n=0,i=Bi.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){const i=t.elements,r=i[0],s=i[4],o=i[8],a=i[1],l=i[5],h=i[9],c=i[2],u=i[6],d=i[10];switch(e){case"XYZ":this._y=Math.asin(An(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-h,d),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-An(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(o,d),this._z=Math.atan2(a,l)):(this._y=Math.atan2(-c,r),this._z=0);break;case"ZXY":this._x=Math.asin(An(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-c,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(a,r));break;case"ZYX":this._y=Math.asin(-An(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(a,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(An(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-c,r)):(this._x=0,this._y=Math.atan2(o,d));break;case"XZY":this._z=Math.asin(-An(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-h,d),this._y=0);break;default:sn("Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===n&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return Mi.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Mi,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return Ti.setFromEuler(this),this.setFromQuaternion(Ti,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Bi.DEFAULT_ORDER="XYZ";class Ri{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return 0!=(this.mask&t.mask)}isEnabled(t){return 0!=(this.mask&(1<<t|0))}}let Pi=0;const Di=new Cn,Li=new xn,Ui=new yi,Ni=new Cn,Oi=new Cn,Fi=new Cn,ki=new xn,Qi=new Cn(1,0,0),zi=new Cn(0,1,0),Gi=new Cn(0,0,1),Hi={type:"added"},Vi={type:"removed"},ji={type:"childadded",child:null},Wi={type:"childremoved",child:null};class qi extends hn{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Pi++}),this.uuid=fn(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=qi.DEFAULT_UP.clone();const t=new Cn,e=new Bi,n=new xn,i=new Cn(1,1,1);e._onChange((function(){n.setFromEuler(e,!1)})),n._onChange((function(){e.setFromQuaternion(n,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:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new yi},normalMatrix:{value:new Sn}}),this.matrix=new yi,this.matrixWorld=new yi,this.matrixAutoUpdate=qi.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=qi.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Ri,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return Li.setFromAxisAngle(t,e),this.quaternion.multiply(Li),this}rotateOnWorldAxis(t,e){return Li.setFromAxisAngle(t,e),this.quaternion.premultiply(Li),this}rotateX(t){return this.rotateOnAxis(Qi,t)}rotateY(t){return this.rotateOnAxis(zi,t)}rotateZ(t){return this.rotateOnAxis(Gi,t)}translateOnAxis(t,e){return Di.copy(t).applyQuaternion(this.quaternion),this.position.add(Di.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(Qi,t)}translateY(t){return this.translateOnAxis(zi,t)}translateZ(t){return this.translateOnAxis(Gi,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Ui.copy(this.matrixWorld).invert())}lookAt(t,e,n){t.isVector3?Ni.copy(t):Ni.set(t,e,n);const i=this.parent;this.updateWorldMatrix(!0,!1),Oi.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ui.lookAt(Oi,Ni,this.up):Ui.lookAt(Ni,Oi,this.up),this.quaternion.setFromRotationMatrix(Ui),i&&(Ui.extractRotation(i.matrixWorld),Li.setFromRotationMatrix(Ui),this.quaternion.premultiply(Li.invert()))}add(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return t===this?(on("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(Hi),ji.child=t,this.dispatchEvent(ji),ji.child=null):on("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}const e=this.children.indexOf(t);return-1!==e&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(Vi),Wi.child=t,this.dispatchEvent(Wi),Wi.child=null),this}removeFromParent(){const t=this.parent;return null!==t&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),Ui.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),Ui.multiply(t.parent.matrixWorld)),t.applyMatrix4(Ui),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Hi),ji.child=t,this.dispatchEvent(ji),ji.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,i=this.children.length;n<i;n++){const i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}}getObjectsByProperty(t,e,n=[]){this[t]===e&&n.push(this);const i=this.children;for(let r=0,s=i.length;r<s;r++)i[r].getObjectsByProperty(t,e,n);return n}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Oi,t,Fi),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Oi,ki,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverse(t)}traverseVisible(t){if(!1===this.visible)return;t(this);const e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverseVisible(t)}traverseAncestors(t){const e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix
vendor: 8,293 bytes, line 2
2):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let n=0,i=e.length;n<i;n++){e[n].updateMatrixWorld(t)}}updateWorldMatrix(t,e){const n=this.parent;if(!0===t&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),!0===e){const t=this.children;for(let e=0,n=t.length;e<n;e++){t[e].updateWorldMatrix(!1,!0)}}}toJSON(t){const e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const i={};function r(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),!0===this.castShadow&&(i.castShadow=!0),!0===this.receiveShadow&&(i.receiveShadow=!0),!1===this.visible&&(i.visible=!1),!1===this.frustumCulled&&(i.frustumCulled=!1),0!==this.renderOrder&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map((t=>({...t,boundingBox:t.boundingBox?t.boundingBox.toJSON():void 0,boundingSphere:t.boundingSphere?t.boundingSphere.toJSON():void 0}))),i.instanceInfo=this._instanceInfo.map((t=>({...t}))),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(t),i.indirectTexture=this._indirectTexture.toJSON(t),null!==this._colorsTexture&&(i.colorsTexture=this._colorsTexture.toJSON(t)),null!==this.boundingSphere&&(i.boundingSphere=this.boundingSphere.toJSON()),null!==this.boundingBox&&(i.boundingBox=this.boundingBox.toJSON())),this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const n=e.shapes;if(Array.isArray(n))for(let e=0,i=n.length;e<i;e++){const i=n[e];r(t.shapes,i)}else r(t.shapes,n)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(r(t.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const e=[];for(let n=0,i=this.material.length;n<i;n++)e.push(r(t.materials,this.material[n]));i.material=e}else i.material=r(t.materials,this.material);if(this.children.length>0){i.children=[];for(let e=0;e<this.children.length;e++)i.children.push(this.children[e].toJSON(t).object)}if(this.animations.length>0){i.animations=[];for(let e=0;e<this.animations.length;e++){const n=this.animations[e];i.animations.push(r(t.animations,n))}}if(e){const e=s(t.geometries),i=s(t.materials),r=s(t.textures),o=s(t.images),a=s(t.shapes),l=s(t.skeletons),h=s(t.animations),c=s(t.nodes);e.length>0&&(n.geometries=e),i.length>0&&(n.materials=i),r.length>0&&(n.textures=r),o.length>0&&(n.images=o),a.length>0&&(n.shapes=a),l.length>0&&(n.skeletons=l),h.length>0&&(n.animations=h),c.length>0&&(n.nodes=c)}return n.object=i,n;function s(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,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.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,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.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e<t.children.length;e++){const n=t.children[e];this.add(n.clone())}return this}}qi.DEFAULT_UP=new Cn(0,1,0),qi.DEFAULT_MATRIX_AUTO_UPDATE=!0,qi.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Xi=new Cn,Yi=new Cn,Ki=new Cn,Zi=new Cn,Ji=new Cn,$i=new Cn,tr=new Cn,er=new Cn,nr=new Cn,ir=new Cn,rr=new Gn,sr=new Gn,or=new Gn;class ar{constructor(t=new Cn,e=new Cn,n=new Cn){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,i){i.subVectors(n,e),Xi.subVectors(t,e),i.cross(Xi);const r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(t,e,n,i,r){Xi.subVectors(i,e),Yi.subVectors(n,e),Ki.subVectors(t,e);const s=Xi.dot(Xi),o=Xi.dot(Yi),a=Xi.dot(Ki),l=Yi.dot(Yi),h=Yi.dot(Ki),c=s*l-o*o;if(0===c)return r.set(0,0,0),null;const u=1/c,d=(l*a-o*h)*u,p=(s*h-o*a)*u;return r.set(1-d-p,p,d)}static containsPoint(t,e,n,i){return null!==this.getBarycoord(t,e,n,i,Zi)&&(Zi.x>=0&&Zi.y>=0&&Zi.x+Zi.y<=1)}static getInterpolation(t,e,n,i,r,s,o,a){return null===this.getBarycoord(t,e,n,i,Zi)?(a.x=0,a.y=0,"z"in a&&(a.z=0),"w"in a&&(a.w=0),null):(a.setScalar(0),a.addScaledVector(r,Zi.x),a.addScaledVector(s,Zi.y),a.addScaledVector(o,Zi.z),a)}static getInterpolatedAttribute(t,e,n,i,r,s){return rr.setScalar(0),sr.setScalar(0),or.setScalar(0),rr.fromBufferAttribute(t,e),sr.fromBufferAttribute(t,n),or.fromBufferAttribute(t,i),s.setScalar(0),s.addScaledVector(rr,r.x),s.addScaledVector(sr,r.y),s.addScaledVector(or,r.z),s}static isFrontFacing(t,e,n,i){return Xi.subVectors(n,e),Yi.subVectors(t,e),Xi.cross(Yi).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return Xi.subVectors(this.c,this.b),Yi.subVectors(this.a,this.b),.5*Xi.cross(Yi).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return ar.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return ar.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,i,r){return ar.getInterpolation(t,this.a,this.b,this.c,e,n,i,r)}containsPoint(t){return ar.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return ar.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const n=this.a,i=this.b,r=this.c;let s,o;Ji.subVectors(i,n),$i.subVectors(r,n),er.subVectors(t,n);const a=Ji.dot(er),l=$i.dot(er);if(a<=0&&l<=0)return e.copy(n);nr.subVectors(t,i);const h=Ji.dot(nr),c=$i.dot(nr);if(h>=0&&c<=h)return e.copy(i);const u=a*c-h*l;if(u<=0&&a>=0&&h<=0)return s=a/(a-h),e.copy(n).addScaledVector(Ji,s);ir.subVectors(t,r);const d=Ji.dot(ir),p=$i.dot(ir);if(p>=0&&d<=p)return e.copy(r);const f=d*l-a*p;if(f<=0&&l>=0&&p<=0)return o=l/(l-p),e.copy(n).addScaledVector($i,o);const A=h*p-d*c;if(A<=0&&c-h>
vendor: 9,851 bytes, line 2
2=0&&d-p>=0)return tr.subVectors(r,i),o=(c-h)/(c-h+(d-p)),e.copy(i).addScaledVector(tr,o);const g=1/(A+f+u);return s=f*g,o=u*g,e.copy(n).addScaledVector(Ji,s).addScaledVector($i,o)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const lr={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},hr={h:0,s:0,l:0},cr={h:0,s:0,l:0};function ur(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}class dr{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,n)}set(t,e,n){if(void 0===e&&void 0===n){const e=t;e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e)}else this.setRGB(t,e,n);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Ue){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Rn.colorSpaceToWorking(this,e),this}setRGB(t,e,n,i=Rn.workingColorSpace){return this.r=t,this.g=e,this.b=n,Rn.colorSpaceToWorking(this,i),this}setHSL(t,e,n,i=Rn.workingColorSpace){if(t=gn(t,1),e=An(e,0,1),n=An(n,0,1),0===e)this.r=this.g=this.b=n;else{const i=n<=.5?n*(1+e):n+e-n*e,r=2*n-i;this.r=ur(r,i,t+1/3),this.g=ur(r,i,t),this.b=ur(r,i,t-1/3)}return Rn.colorSpaceToWorking(this,i),this}setStyle(t,e=Ue){function n(e){void 0!==e&&parseFloat(e)<1&&sn("Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(t)){let r;const s=i[1],o=i[2];switch(s){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,e);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,e);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,e);break;default:sn("Color: Unknown color model "+t)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(t)){const n=i[1],r=n.length;if(3===r)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,e);if(6===r)return this.setHex(parseInt(n,16),e);sn("Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=Ue){const n=lr[t.toLowerCase()];return void 0!==n?this.setHex(n,e):sn("Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Pn(t.r),this.g=Pn(t.g),this.b=Pn(t.b),this}copyLinearToSRGB(t){return this.r=Dn(t.r),this.g=Dn(t.g),this.b=Dn(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Ue){return Rn.workingToColorSpace(pr.copy(this),t),65536*Math.round(An(255*pr.r,0,255))+256*Math.round(An(255*pr.g,0,255))+Math.round(An(255*pr.b,0,255))}getHexString(t=Ue){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Rn.workingColorSpace){Rn.workingToColorSpace(pr.copy(this),e);const n=pr.r,i=pr.g,r=pr.b,s=Math.max(n,i,r),o=Math.min(n,i,r);let a,l;const h=(o+s)/2;if(o===s)a=0,l=0;else{const t=s-o;switch(l=h<=.5?t/(s+o):t/(2-s-o),s){case n:a=(i-r)/t+(i<r?6:0);break;case i:a=(r-n)/t+2;break;case r:a=(n-i)/t+4}a/=6}return t.h=a,t.s=l,t.l=h,t}getRGB(t,e=Rn.workingColorSpace){return Rn.workingToColorSpace(pr.copy(this),e),t.r=pr.r,t.g=pr.g,t.b=pr.b,t}getStyle(t=Ue){Rn.workingToColorSpace(pr.copy(this),t);const e=pr.r,n=pr.g,i=pr.b;return t!==Ue?`color(${t} ${e.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(255*e)},${Math.round(255*n)},${Math.round(255*i)})`}offsetHSL(t,e,n){return this.getHSL(hr),this.setHSL(hr.h+t,hr.s+e,hr.l+n)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(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(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(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}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(hr),t.getHSL(cr);const n=mn(hr.h,cr.h,e),i=mn(hr.s,cr.s,e),r=mn(hr.l,cr.l,e);return this.setHSL(n,i,r),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,n=this.g,i=this.b,r=t.elements;return this.r=r[0]*e+r[3]*n+r[6]*i,this.g=r[1]*e+r[4]*n+r[7]*i,this.b=r[2]*e+r[5]*n+r[8]*i,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const pr=new dr;dr.NAMES=lr;let fr=0;class Ar extends hn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:fr++}),this.uuid=fn(),this.name="",this.type="Material",this.blending=g,this.side=d,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=B,this.blendDst=R,this.blendEquation=E,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new dr(0,0,0),this.blendAlpha=0,this.depthFunc=V,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=ke,this.stencilZFail=ke,this.stencilZPass=ke,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(const e in t){const n=t[e];if(void 0===n){sn(`Material: parameter '${e}' has value of undefined.`);continue}const i=this[e];void 0!==i?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n:sn(`Material: '${e}' is not a property of THREE.${this.type}.`)}}toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};function i(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}
vendor: 5,642 bytes, line 2
2if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(t).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(t).uuid),void 0!==this.dispersion&&(n.dispersion=this.dispersion),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.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,n.lightMapIntensity=this.lightMapIntensity),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.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapRotation&&(n.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==g&&(n.blending=this.blending),this.side!==d&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),this.blendSrc!==B&&(n.blendSrc=this.blendSrc),this.blendDst!==R&&(n.blendDst=this.blendDst),this.blendEquation!==E&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&
vendor: 5,868 bytes, line 2
2(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==V&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==ke&&(n.stencilFail=this.stencilFail),this.stencilZFail!==ke&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==ke&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),e){const e=i(t.textures),r=i(t.images);e.length>0&&(n.textures=e),r.length>0&&(n.images=r)}return n}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,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.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let n=null;if(null!==e){const t=e.length;n=new Array(t);for(let i=0;i!==t;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,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.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}}class gr extends Ar{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new dr(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Bi,this.combine=Y,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(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.envMapRotation.copy(t.envMapRotation),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.fog=t.fog,this}}const mr=new Cn,_r=new En;let vr=0;class yr{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:vr++}),this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=n,this.usage=Xe,this.updateRanges=[],this.gpuType=It,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(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.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;
vendor: 5,420 bytes, line 2
2for(let i=0,r=this.itemSize;i<r;i++)this.array[t+i]=e.array[n+i];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(2===this.itemSize)for(let e=0,n=this.count;e<n;e++)_r.fromBufferAttribute(this,e),_r.applyMatrix3(t),this.setXY(e,_r.x,_r.y);else if(3===this.itemSize)for(let e=0,n=this.count;e<n;e++)mr.fromBufferAttribute(this,e),mr.applyMatrix3(t),this.setXYZ(e,mr.x,mr.y,mr.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)mr.fromBufferAttribute(this,e),mr.applyMatrix4(t),this.setXYZ(e,mr.x,mr.y,mr.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)mr.fromBufferAttribute(this,e),mr.applyNormalMatrix(t),this.setXYZ(e,mr.x,mr.y,mr.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)mr.fromBufferAttribute(this,e),mr.transformDirection(t),this.setXYZ(e,mr.x,mr.y,mr.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let n=this.array[t*this.itemSize+e];return this.normalized&&(n=_n(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=vn(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=_n(e,this.array)),e}setX(t,e){return this.normalized&&(e=vn(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=_n(e,this.array)),e}setY(t,e){return this.normalized&&(e=vn(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=_n(e,this.array)),e}setZ(t,e){return this.normalized&&(e=vn(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=_n(e,this.array)),e}setW(t,e){return this.normalized&&(e=vn(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=vn(e,this.array),n=vn(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,i){return t*=this.itemSize,this.normalized&&(e=vn(e,this.array),n=vn(n,this.array),i=vn(i,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,e,n,i,r){return t*=this.itemSize,this.normalized&&(e=vn(e,this.array),n=vn(n,this.array),i=vn(i,this.array),r=vn(r,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=r,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(t.name=this.name),this.usage!==Xe&&(t.usage=this.usage),t}}class Er extends yr{constructor(t,e,n){super(new Uint16Array(t),e,n)}}class xr extends yr{constructor(t,e,n){super(new Uint32Array(t),e,n)}}class Cr extends yr{constructor(t,e,n){super(new Float32Array(t),e,n)}}let br=0;const wr=new yi,Sr=new qi,Ir=new Cn,Mr=new qn,Tr=new qn,Br=new Cn;class Rr extends hn{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:br++}),this.uuid=fn(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(Je(t)?xr:Er)(t,1):this.index=t,this}setIndirect(t){return this.indirect=t,this}getIndirect(){return this.indirect}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return void 0!==this.attributes[t]}addGroup(t,e,n=0){this.groups.push({start:t,count:e,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){const e=this.attributes.position;void 0!==e&&(e.applyMatrix4(t),e.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const e=(new Sn).getNormalMatrix(t);n.applyNormalMatrix(e),n.needsUpdate=!0}const i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(t),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(t){return wr.makeRotationFromQuaternion(t),this.applyMatrix4(wr),this}rotateX(t){return wr.makeRotationX(t),this.applyMatrix4(wr),this}rotateY(t){return wr.makeRotationY(t),this.applyMatrix4(wr),this}rotateZ(t){return wr.makeRotationZ(t),this.applyMatrix4(wr),this}translate(t,e,n){return wr.makeTranslation(t,e,n),this.applyMatrix4(wr),this}scale(t,e,n){return wr.makeScale(t,e,n),this.applyMatrix4(wr),this}lookAt(t){return Sr.lookAt(t),Sr.updateMatrix(),this.applyMatrix4(Sr.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ir).negate(),this.translate(Ir.x,Ir.y,Ir.z),this}setFromPoints(t){const e=this.getAttribute("position");if(void 0===e){const e=[];for(let n=0,i=t.length;n<i;n++){const i=t[n];e.push(i.x,i.y,i.z||0)}this.setAttribute("position",new Cr(e,3))}else{const n=Math.min(t.length,e.count);for(let i=0;i<n;i++){const n=t[i];e.setXYZ(i,n.x,n.y,n.z||0)}t.length>e.count&&sn("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),e.needsUpdate=!0}return this}
vendor: 5,873 bytes, line 2
2computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new qn);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return on("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),void this.boundingBox.set(new Cn(-1/0,-1/0,-1/0),new Cn(1/0,1/0,1/0));if(void 0!==t){if(this.boundingBox.setFromBufferAttribute(t),e)for(let t=0,n=e.length;t<n;t++){const n=e[t];Mr.setFromBufferAttribute(n),this.morphTargetsRelative?(Br.addVectors(this.boundingBox.min,Mr.min),this.boundingBox.expandByPoint(Br),Br.addVectors(this.boundingBox.max,Mr.max),this.boundingBox.expandByPoint(Br)):(this.boundingBox.expandByPoint(Mr.min),this.boundingBox.expandByPoint(Mr.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&on('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new ui);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return on("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),void this.boundingSphere.set(new Cn,1/0);if(t){const n=this.boundingSphere.center;if(Mr.setFromBufferAttribute(t),e)for(let t=0,n=e.length;t<n;t++){const n=e[t];Tr.setFromBufferAttribute(n),this.morphTargetsRelative?(Br.addVectors(Mr.min,Tr.min),Mr.expandByPoint(Br),Br.addVectors(Mr.max,Tr.max),Mr.expandByPoint(Br)):(Mr.expandByPoint(Tr.min),Mr.expandByPoint(Tr.max))}Mr.getCenter(n);let i=0;for(let e=0,r=t.count;e<r;e++)Br.fromBufferAttribute(t,e),i=Math.max(i,n.distanceToSquared(Br));if(e)for(let r=0,s=e.length;r<s;r++){const s=e[r],o=this.morphTargetsRelative;for(let e=0,r=s.count;e<r;e++)Br.fromBufferAttribute(s,e),o&&(Ir.fromBufferAttribute(t,e),Br.add(Ir)),i=Math.max(i,n.distanceToSquared(Br))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&on('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const t=this.index,e=this.attributes;if(null===t||void 0===e.position||void 0===e.normal||void 0===e.uv)return void on("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.position,i=e.normal,r=e.uv;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new yr(new Float32Array(4*n.count),4));const s=this.getAttribute("tangent"),o=[],a=[];for(let t=0;t<n.count;t++)o[t]=new Cn,a[t]=new Cn;const l=new Cn,h=new Cn,c=new Cn,u=new En,d=new En,p=new En,f=new Cn,A=new Cn;function g(t,e,i){l.fromBufferAttribute(n,t),h.fromBufferAttribute(n,e),c.fromBufferAttribute(n,i),u.fromBufferAttribute(r,t),d.fromBufferAttribute(r,e),p.fromBufferAttribute(r,i),h.sub(l),c.sub(l),d.sub(u),p.sub(u);const s=1/(d.x*p.y-p.x*d.y);isFinite(s)&&(f.copy(h).multiplyScalar(p.y).addScaledVector(c,-d.y).multiplyScalar(s),A.copy(c).multiplyScalar(d.x).addScaledVector(h,-p.x).multiplyScalar(s),o[t].add(f),o[e].add(f),o[i].add(f),a[t].add(A),a[e].add(A),a[i].add(A))}let m=this.groups;0===m.length&&(m=[{start:0,count:t.count}]);for(let e=0,n=m.length;e<n;++e){const n=m[e],i=n.start;for(let e=i,r=i+n.count;e<r;e+=3)g(t.getX(e+0),t.getX(e+1),t.getX(e+2))}const _=new Cn,v=new Cn,y=new Cn,E=new Cn;function x(t){y.fromBufferAttribute(i,t),E.copy(y);const e=o[t];_.copy(e),_.sub(y.multiplyScalar(y.dot(e))).normalize(),v.crossVectors(E,e);const n=v.dot(a[t])<0?-1:1;s.setXYZW(t,_.x,_.y,_.z,n)}for(let e=0,n=m.length;e<n;++e){const n=m[e],i=n.start;for(let e=i,r=i+n.count;e<r;e+=3)x(t.getX(e+0)),x(t.getX(e+1)),x(t.getX(e+2))}}computeVertexNormals(){const t=this.index,e=this.getAttribute("position");if(void 0!==e){let n=this.getAttribute("normal");if(void 0===n)n=new yr(new Float32Array(3*e.count),3),this.setAttribute("normal",n);else for(let t=0,e=n.count;t<e;t++)n.setXYZ(t,0,0,0);const i=new Cn,r=new Cn,s=new Cn,o=new Cn,a=new Cn,l=new Cn,h=new Cn,c=new Cn;if(t)for(let u=0,d=t.count;u<d;u+=3){const d=t.getX(u+0),p=t.getX(u+1),f=t.getX(u+2);i.fromBufferAttribute(e,d),r.fromBufferAttribute(e,p),s.fromBufferAttribute(e,f),h.subVectors(s,r),c.subVectors(i,r),h.cross(c),o.fromBufferAttribute(n,d),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),o.add(h),a.add(h),l.add(h),n.setXYZ(d,o.x,o.y,o.z),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(f,l.x,l.y,l.z)}else for(let t=0,o=e.count;t<o;t+=3)i.fromBufferAttribute(e,t+0),r.fromBufferAttribute(e,t+1),s.fromBufferAttribute(e,t+2),h.subVectors(s,r),c.subVectors(i,r),h.cross(c),n.setXYZ(t+0,h.x,h.y,h.z),n.setXYZ(t+1,h.x,h.y,h.z),n.setXYZ(t+2,h.x,h.y,h.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)Br.fromBufferAttribute(t,e),Br.normalize(),t.setXYZ(e,Br.x,Br.y,Br.z)}toNonIndexed(){function t(t,e){const n=t.array,i=t.itemSize,r=t.normalized,s=new n.constructor(e.length*i);let o=0,a=0;for(let r=0,l=e.length;r<l;r++){o=t.isInterleavedBufferAttribute?e[r]*t.data.stride+t.offset:e[r]*i;for(let t=0;t<i;t++)s[a++]=n[o++]}return new yr(s,i,r)}if(null===this.index)return sn("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new Rr,n=this.index.array,i=this.attributes;for(const r in i){const s=t(i[r],n);e.setAttribute(r,s)}const r=this.morphAttributes;for(const i in r){const s=[],o=r[i];for(let e=0,i=o.length;e<i;e++){const i=t(o[e],n);s.push(i)}e.morphAttributes[i]=s}e.morphTargetsRelative=this.morphTargetsRelative;const s=this.groups;for(let t=0,n=s.length;t<n;t++){const n=s[t];e.addGroup(n.start,n.count,n.materialIndex)}return e}toJSON(){const t={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};
vendor: 5,167 bytes, line 2
2if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),void 0!==this.parameters){const e=this.parameters;for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const n=this.attributes;for(const e in n){const i=n[e];t.data.attributes[e]=i.toJSON(t.data)}const i={};let r=!1;for(const e in this.morphAttributes){const n=this.morphAttributes[e],s=[];for(let e=0,i=n.length;e<i;e++){const i=n[e];s.push(i.toJSON(t.data))}s.length>0&&(i[e]=s,r=!0)}r&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const o=this.boundingSphere;return null!==o&&(t.data.boundingSphere=o.toJSON()),t}clone(){return(new this.constructor).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const n=t.index;null!==n&&this.setIndex(n.clone());const i=t.attributes;for(const t in i){const n=i[t];this.setAttribute(t,n.clone(e))}const r=t.morphAttributes;for(const t in r){const n=[],i=r[t];for(let t=0,r=i.length;t<r;t++)n.push(i[t].clone(e));this.morphAttributes[t]=n}this.morphTargetsRelative=t.morphTargetsRelative;const s=t.groups;for(let t=0,e=s.length;t<e;t++){const e=s[t];this.addGroup(e.start,e.count,e.materialIndex)}const o=t.boundingBox;null!==o&&(this.boundingBox=o.clone());const a=t.boundingSphere;return null!==a&&(this.boundingSphere=a.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const Pr=new yi,Dr=new vi,Lr=new ui,Ur=new Cn,Nr=new Cn,Or=new Cn,Fr=new Cn,kr=new Cn,Qr=new Cn,zr=new Cn,Gr=new Cn;class Hr extends qi{constructor(t=new Rr,e=new gr){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;t<e;t++){const e=n[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[e]=t}}}}getVertexPosition(t,e){const n=this.geometry,i=n.attributes.position,r=n.morphAttributes.position,s=n.morphTargetsRelative;e.fromBufferAttribute(i,t);const o=this.morphTargetInfluences;if(r&&o){Qr.set(0,0,0);for(let n=0,i=r.length;n<i;n++){const i=o[n],a=r[n];0!==i&&(kr.fromBufferAttribute(a,t),s?Qr.addScaledVector(kr,i):Qr.addScaledVector(kr.sub(e),i))}e.add(Qr)}return e}raycast(t,e){const n=this.geometry,i=this.material,r=this.matrixWorld;if(void 0!==i){if(null===n.boundingSphere&&n.computeBoundingSphere(),Lr.copy(n.boundingSphere),Lr.applyMatrix4(r),Dr.copy(t.ray).recast(t.near),!1===Lr.containsPoint(Dr.origin)){if(null===Dr.intersectSphere(Lr,Ur))return;if(Dr.origin.distanceToSquared(Ur)>(t.far-t.near)**2)return}Pr.copy(r).invert(),Dr.copy(t.ray).applyMatrix4(Pr),null!==n.boundingBox&&!1===Dr.intersectsBox(n.boundingBox)||this._computeIntersections(t,e,Dr)}}_computeIntersections(t,e,n){let i;const r=this.geometry,s=this.material,o=r.index,a=r.attributes.position,l=r.attributes.uv,h=r.attributes.uv1,c=r.attributes.normal,u=r.groups,d=r.drawRange;if(null!==o)if(Array.isArray(s))for(let r=0,a=u.length;r<a;r++){const a=u[r],p=s[a.materialIndex];for(let r=Math.max(a.start,d.start),s=Math.min(o.count,Math.min(a.start+a.count,d.start+d.count));r<s;r+=3){i=Vr(this,p,t,n,l,h,c,o.getX(r),o.getX(r+1),o.getX(r+2)),i&&(i.faceIndex=Math.floor(r/3),i.face.materialIndex=a.materialIndex,e.push(i))}}else{for(let r=Math.max(0,d.start),a=Math.min(o.count,d.start+d.count);r<a;r+=3){i=Vr(this,s,t,n,l,h,c,o.getX(r),o.getX(r+1),o.getX(r+2)),i&&(i.faceIndex=Math.floor(r/3),e.push(i))}}else if(void 0!==a)if(Array.isArray(s))for(let r=0,o=u.length;r<o;r++){const o=u[r],p=s[o.materialIndex];for(let r=Math.max(o.start,d.start),s=Math.min(a.count,Math.min(o.start+o.count,d.start+d.count));r<s;r+=3){i=Vr(this,p,t,n,l,h,c,r,r+1,r+2),i&&(i.faceIndex=Math.floor(r/3),i.face.materialIndex=o.materialIndex,e.push(i))}}else{for(let r=Math.max(0,d.start),o=Math.min(a.count,d.start+d.count);r<o;r+=3){i=Vr(this,s,t,n,l,h,c,r,r+1,r+2),i&&(i.faceIndex=Math.floor(r/3),e.push(i))}}}}function Vr(t,e,n,i,r,s,o,a,l,h){t.getVertexPosition(a,Nr),t.getVertexPosition(l,Or),t.getVertexPosition(h,Fr);const c=function(t,e,n,i,r,s,o,a){let l;if(l=e.side===p?i.intersectTriangle(o,s,r,!0,a):i.intersectTriangle(r,s,o,e.side===d,a),null===l)return null;
vendor: 6,205 bytes, line 2
2Gr.copy(a),Gr.applyMatrix4(t.matrixWorld);const h=n.ray.origin.distanceTo(Gr);return h<n.near||h>n.far?null:{distance:h,point:Gr.clone(),object:t}}(t,e,n,i,Nr,Or,Fr,zr);if(c){const t=new Cn;ar.getBarycoord(zr,Nr,Or,Fr,t),r&&(c.uv=ar.getInterpolatedAttribute(r,a,l,h,t,new En)),s&&(c.uv1=ar.getInterpolatedAttribute(s,a,l,h,t,new En)),o&&(c.normal=ar.getInterpolatedAttribute(o,a,l,h,t,new Cn),c.normal.dot(i.direction)>0&&c.normal.multiplyScalar(-1));const e={a,b:l,c:h,normal:new Cn,materialIndex:0};ar.getNormal(Nr,Or,Fr,e.normal),c.face=e,c.barycoord=t}return c}class jr extends Rr{constructor(t=1,e=1,n=1,i=1,r=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:r,depthSegments:s};const o=this;i=Math.floor(i),r=Math.floor(r),s=Math.floor(s);const a=[],l=[],h=[],c=[];let u=0,d=0;function p(t,e,n,i,r,s,p,f,A,g,m){const _=s/A,v=p/g,y=s/2,E=p/2,x=f/2,C=A+1,b=g+1;let w=0,S=0;const I=new Cn;for(let s=0;s<b;s++){const o=s*v-E;for(let a=0;a<C;a++){const u=a*_-y;I[t]=u*i,I[e]=o*r,I[n]=x,l.push(I.x,I.y,I.z),I[t]=0,I[e]=0,I[n]=f>0?1:-1,h.push(I.x,I.y,I.z),c.push(a/A),c.push(1-s/g),w+=1}}for(let t=0;t<g;t++)for(let e=0;e<A;e++){const n=u+e+C*t,i=u+e+C*(t+1),r=u+(e+1)+C*(t+1),s=u+(e+1)+C*t;a.push(n,i,s),a.push(i,r,s),S+=6}o.addGroup(d,S,m),d+=S,u+=w}p("z","y","x",-1,-1,n,e,t,s,r,0),p("z","y","x",1,-1,n,e,-t,s,r,1),p("x","z","y",1,1,t,n,e,i,s,2),p("x","z","y",1,-1,t,n,-e,i,s,3),p("x","y","z",1,-1,t,e,n,i,r,4),p("x","y","z",-1,-1,t,e,-n,i,r,5),this.setIndex(a),this.setAttribute("position",new Cr(l,3)),this.setAttribute("normal",new Cr(h,3)),this.setAttribute("uv",new Cr(c,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new jr(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}}function Wr(t){const e={};for(const n in t){e[n]={};for(const i in t[n]){const r=t[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(sn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[n][i]=null):e[n][i]=r.clone():Array.isArray(r)?e[n][i]=r.slice():e[n][i]=r}}return e}function qr(t){const e={};for(let n=0;n<t.length;n++){const i=Wr(t[n]);for(const t in i)e[t]=i[t]}return e}function Xr(t){const e=t.getRenderTarget();return null===e?t.outputColorSpace:!0===e.isXRRenderTarget?e.texture.colorSpace:Rn.workingColorSpace}const Yr={clone:Wr,merge:qr};class Kr extends Ar{constructor(t){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==t&&this.setValues(t)}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Wr(t.uniforms),this.uniformsGroups=function(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n].clone());return e}(t.uniformsGroups),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.fog=t.fog,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){const e=super.toJSON(t);e.glslVersion=this.glslVersion,e.uniforms={};for(const n in this.uniforms){const i=this.uniforms[n].value;i&&i.isTexture?e.uniforms[n]={type:"t",value:i.toJSON(t).uuid}:i&&i.isColor?e.uniforms[n]={type:"c",value:i.getHex()}:i&&i.isVector2?e.uniforms[n]={type:"v2",value:i.toArray()}:i&&i.isVector3?e.uniforms[n]={type:"v3",value:i.toArray()}:i&&i.isVector4?e.uniforms[n]={type:"v4",value:i.toArray()}:i&&i.isMatrix3?e.uniforms[n]={type:"m3",value:i.toArray()}:i&&i.isMatrix4?e.uniforms[n]={type:"m4",value:i.toArray()}:e.uniforms[n]={value:i}}Object.keys(this.defines).length>0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const n={};for(const t in this.extensions)!0===this.extensions[t]&&(n[t]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}}class Zr extends qi{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new yi,this.projectionMatrix=new yi,this.projectionMatrixInverse=new yi,this.coordinateSystem=Ke,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}const Jr=new Cn,$r=new En,ts=new En;class es extends Zr{constructor(t=50,e=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(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=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*pn*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*dn*this.fov);return.5*this.getFilmHeight()/t}
vendor: 4,159 bytes, line 2
2getEffectiveFOV(){return 2*pn*Math.atan(Math.tan(.5*dn*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,e,n){Jr.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Jr.x,Jr.y).multiplyScalar(-t/Jr.z),Jr.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Jr.x,Jr.y).multiplyScalar(-t/Jr.z)}getViewSize(t,e){return this.getViewBounds(t,$r,ts),e.subVectors(ts,$r)}setViewOffset(t,e,n,i,r,s){this.aspect=t/e,null===this.view&&(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=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*dn*this.fov)/this.zoom,n=2*e,i=this.aspect*n,r=-.5*i;const s=this.view;if(null!==this.view&&this.view.enabled){const t=s.fullWidth,o=s.fullHeight;r+=s.offsetX*i/t,e-=s.offsetY*n/o,i*=s.width/t,n*=s.height/o}const o=this.filmOffset;0!==o&&(r+=t*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,e,e-n,t,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}const ns=-90;class is extends qi{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new es(ns,1,t,e);i.layers=this.layers,this.add(i);const r=new es(ns,1,t,e);r.layers=this.layers,this.add(r);const s=new es(ns,1,t,e);s.layers=this.layers,this.add(s);const o=new es(ns,1,t,e);o.layers=this.layers,this.add(o);const a=new es(ns,1,t,e);a.layers=this.layers,this.add(a);const l=new es(ns,1,t,e);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[n,i,r,s,o,a]=e;for(const t of e)this.remove(t);if(t===Ke)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),a.up.set(0,1,0),a.lookAt(0,0,-1);else{if(t!==Ze)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),a.up.set(0,-1,0),a.lookAt(0,0,-1)}for(const t of e)this.add(t),t.updateMatrixWorld()}update(t,e){null===this.parent&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[r,s,o,a,l,h]=this.children,c=t.getRenderTarget(),u=t.getActiveCubeFace(),d=t.getActiveMipmapLevel(),p=t.xr.enabled;t.xr.enabled=!1;const f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0,i),t.render(e,r),t.setRenderTarget(n,1,i),t.render(e,s),t.setRenderTarget(n,2,i),t.render(e,o),t.setRenderTarget(n,3,i),t.render(e,a),t.setRenderTarget(n,4,i),t.render(e,l),n.texture.generateMipmaps=f,t.setRenderTarget(n,5,i),t.render(e,h),t.setRenderTarget(c,u,d),t.xr.enabled=p,n.texture.needsPMREMUpdate=!0}}class rs extends zn{constructor(t=[],e=at,n,i,r,s,o,a,l,h){super(t,e,n,i,r,s,o,a,l,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class ss extends Vn{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1},i=[n,n,n,n,n,n];this.texture=new rs(i),this._setTextureOptions(e),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace
vendor: 12,097 bytes, line 2
2=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},i=new jr(5,5,5),r=new Kr({name:"CubemapFromEquirect",uniforms:Wr(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:p,blending:A});r.uniforms.tEquirect.value=e;const s=new Hr(i,r),o=e.minFilter;e.minFilter===yt&&(e.minFilter=_t);return new is(1,10,this).update(t,s),e.minFilter=o,s.geometry.dispose(),s.material.dispose(),this}clear(t,e=!0,n=!0,i=!0){const r=t.getRenderTarget();for(let r=0;r<6;r++)t.setRenderTarget(this,r),t.clear(e,n,i);t.setRenderTarget(r)}}class os extends qi{constructor(){super(),this.isGroup=!0,this.type="Group"}}const as={type:"move"};class ls{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new os,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new os,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Cn,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Cn),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new os,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Cn,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Cn),this._grip}dispatchEvent(t){return null!==this._targetRay&&this._targetRay.dispatchEvent(t),null!==this._grip&&this._grip.dispatchEvent(t),null!==this._hand&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){const e=this._hand;if(e)for(const n of t.hand.values())this._getHandJoint(e,n)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(t,e,n){let i=null,r=null,s=null;const o=this._targetRay,a=this._grip,l=this._hand;if(t&&"visible-blurred"!==e.session.visibilityState){if(l&&t.hand){s=!0;for(const i of t.hand.values()){const t=e.getJointPose(i,n),r=this._getHandJoint(l,i);null!==t&&(r.matrix.fromArray(t.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.matrixWorldNeedsUpdate=!0,r.jointRadius=t.radius),r.visible=null!==t}const i=l.joints["index-finger-tip"],r=l.joints["thumb-tip"],o=i.position.distanceTo(r.position),a=.02,h=.005;l.inputState.pinching&&o>a+h?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&o<=a-h&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==a&&t.gripSpace&&(r=e.getPose(t.gripSpace,n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1));null!==o&&(i=e.getPose(t.targetRaySpace,n),null===i&&null!==r&&(i=r),null!==i&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(as)))}return null!==o&&(o.visible=null!==i),null!==a&&(a.visible=null!==r),null!==l&&(l.visible=null!==s),this}_getHandJoint(t,e){if(void 0===t.joints[e.jointName]){const n=new os;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class hs{constructor(t,e=1,n=1e3){this.isFog=!0,this.name="",this.color=new dr(t),this.near=e,this.far=n}clone(){return new hs(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class cs extends qi{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Bi,this.environmentIntensity=1,this.environmentRotation=new Bi,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}}class us{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=Xe,this.updateRanges=[],this.version=0,this.uuid=fn()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,n){t*=this.stride,n*=e.stride;for(let i=0,r=this.stride;i<r;i++)this.array[t+i]=e.array[n+i];return this}set(t,e=0){return this.array.set(t,e),this}clone(t){void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=fn()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const e=new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(e,this.stride);return n.setUsage(this.usage),n}onUpload(t){return this.onUploadCallback=t,this}toJSON(t){return void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=fn()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const ds=new Cn;class ps{constructor(t,e,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=t,this.itemSize=e,this.offset=n,this.normalized=i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let e=0,n=this.data.count;e<n;e++)ds.fromBufferAttribute(this,e),ds.applyMatrix4(t),this.setXYZ(e,ds.x,ds.y,ds.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)ds.fromBufferAttribute(this,e),ds.applyNormalMatrix(t),this.setXYZ(e,ds.x,ds.y,ds.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)ds.fromBufferAttribute(this,e),ds.transformDirection(t),this.setXYZ(e,ds.x,ds.y,ds.z);return this}getComponent(t,e){let n=this.array[t*this.data.stride+this.offset+e];return this.normalized&&(n=_n(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=vn(n,this.array)),this.data.array[t*this.data.stride+this.offset+e]=n,this}setX(t,e){return this.normalized&&(e=vn(e,this.array)),this.data.array[t*this.data.stride+this.offset]=e,this}setY(t,e){return this.normalized&&(e=vn(e,this.array)),this.data.array[t*this.data.stride+this.offset+1]=e,this}setZ(t,e){return this.normalized&&(e=vn(e,this.array)),this.data.array[t*this.data.stride+this.offset+2]=e,this}setW(t,e){return this.normalized&&(e=vn(e,this.array)),this.data.array[t*this.data.stride+this.offset+3]=e,this}getX(t){let e=this.data.array[t*this.data.stride+this.offset];return this.normalized&&(e=_n(e,this.array)),e}getY(t){let e=this.data.array[t*this.data.stride+this.offset+1];return this.normalized&&(e=_n(e,this.array)),e}getZ(t){let e=this.data.array[t*this.data.stride+this.offset+2];return this.normalized&&(e=_n(e,this.array)),e}getW(t){let e=this.data.array[t*this.data.stride+this.offset+3];return this.normalized&&(e=_n(e,this.array)),e}setXY(t,e,n){return t=t*this.data.stride+this.offset,this.normalized&&(e=vn(e,this.array),n=vn(n,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=n,this}setXYZ(t,e,n,i){return t=t*this.data.stride+this.offset,this.normalized&&(e=vn(e,this.array),n=vn(n,this.array),i=vn(i,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=i,this}setXYZW(t,e,n,i,r){return t=t*this.data.stride+this.offset,this.normalized&&(e=vn(e,this.array),n=vn(n,this.array),i=vn(i,this.array),r=vn(r,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=i,this.data.array[t+3]=r,this}clone(t){if(void 0===t){rn("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let e=0;e<this.count;e++){const n=e*this.data.stride+this.offset;for(let e=0;e<this.itemSize;e++)t.push(this.data.array[n+e])}return new yr(new this.array.constructor(t),this.itemSize,this.normalized)}return void 0===t.interleavedBuffers&&(t.interleavedBuffers={}),void 0===t.interleavedBuffers[this.data.uuid]&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new ps(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(void 0===t){rn("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let e=0;e<this.count;e++){const n=e*this.data.stride+this.offset;for(let e=0;e<this.itemSize;e++)t.push(this.data.array[n+e])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}return void 0===t.interleavedBuffers&&(t.interleavedBuffers={}),void 0===t.interleavedBuffers[this.data.uuid]&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}const fs=new Cn,As=new Gn,gs=new Gn,ms=new Cn,_s=new yi,vs=new Cn,ys=new ui,Es=new yi,xs=new vi;class Cs extends Hr{constructor(t,e){super(t,e),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=ot,this.bindMatrix=new yi,this.bindMatrixInverse=new yi,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const t=this.geometry;
vendor: 15,866 bytes, line 2
2null===this.boundingBox&&(this.boundingBox=new qn),this.boundingBox.makeEmpty();const e=t.getAttribute("position");for(let t=0;t<e.count;t++)this.getVertexPosition(t,vs),this.boundingBox.expandByPoint(vs)}computeBoundingSphere(){const t=this.geometry;null===this.boundingSphere&&(this.boundingSphere=new ui),this.boundingSphere.makeEmpty();const e=t.getAttribute("position");for(let t=0;t<e.count;t++)this.getVertexPosition(t,vs),this.boundingSphere.expandByPoint(vs)}copy(t,e){return super.copy(t,e),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this}raycast(t,e){const n=this.material,i=this.matrixWorld;void 0!==n&&(null===this.boundingSphere&&this.computeBoundingSphere(),ys.copy(this.boundingSphere),ys.applyMatrix4(i),!1!==t.ray.intersectsSphere(ys)&&(Es.copy(i).invert(),xs.copy(t.ray).applyMatrix4(Es),null!==this.boundingBox&&!1===xs.intersectsBox(this.boundingBox)||this._computeIntersections(t,e,xs)))}getVertexPosition(t,e){return super.getVertexPosition(t,e),this.applyBoneTransform(t,e),e}bind(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.copy(e).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const t=new Gn,e=this.geometry.attributes.skinWeight;for(let n=0,i=e.count;n<i;n++){t.fromBufferAttribute(e,n);const i=1/t.manhattanLength();i!==1/0?t.multiplyScalar(i):t.set(1,0,0,0),e.setXYZW(n,t.x,t.y,t.z,t.w)}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.bindMode===ot?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():sn("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(t,e){const n=this.skeleton,i=this.geometry;As.fromBufferAttribute(i.attributes.skinIndex,t),gs.fromBufferAttribute(i.attributes.skinWeight,t),fs.copy(e).applyMatrix4(this.bindMatrix),e.set(0,0,0);for(let t=0;t<4;t++){const i=gs.getComponent(t);if(0!==i){const r=As.getComponent(t);_s.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),e.addScaledVector(ms.copy(fs).applyMatrix4(_s),i)}}return e.applyMatrix4(this.bindMatrixInverse)}}class bs extends qi{constructor(){super(),this.isBone=!0,this.type="Bone"}}class ws extends zn{constructor(t=null,e=1,n=1,i,r,s,o,a,l=At,h=At,c,u){super(null,s,o,a,l,h,i,r,c,u),this.isDataTexture=!0,this.image={data:t,width:e,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Ss=new yi,Is=new yi;class Ms{constructor(t=[],e=[]){this.uuid=fn(),this.bones=t.slice(0),this.boneInverses=e,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const t=this.bones,e=this.boneInverses;if(this.boneMatrices=new Float32Array(16*t.length),0===e.length)this.calculateInverses();else if(t.length!==e.length){sn("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let t=0,e=this.bones.length;t<e;t++)this.boneInverses.push(new yi)}}calculateInverses(){this.boneInverses.length=0;for(let t=0,e=this.bones.length;t<e;t++){const e=new yi;this.bones[t]&&e.copy(this.bones[t].matrixWorld).invert(),this.boneInverses.push(e)}}pose(){for(let t=0,e=this.bones.length;t<e;t++){const e=this.bones[t];e&&e.matrixWorld.copy(this.boneInverses[t]).invert()}for(let t=0,e=this.bones.length;t<e;t++){const e=this.bones[t];e&&(e.parent&&e.parent.isBone?(e.matrix.copy(e.parent.matrixWorld).invert(),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))}}update(){const t=this.bones,e=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let i=0,r=t.length;i<r;i++){const r=t[i]?t[i].matrixWorld:Is;Ss.multiplyMatrices(r,e[i]),Ss.toArray(n,16*i)}null!==i&&(i.needsUpdate=!0)}clone(){return new Ms(this.bones,this.boneInverses)}computeBoneTexture(){let t=Math.sqrt(4*this.bones.length);t=4*Math.ceil(t/4),t=Math.max(t,4);const e=new Float32Array(t*t*4);e.set(this.boneMatrices);const n=new ws(e,t,t,Nt,It);return n.needsUpdate=!0,this.boneMatrices=e,this.boneTexture=n,this}getBoneByName(t){for(let e=0,n=this.bones.length;e<n;e++){const n=this.bones[e];if(n.name===t)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(t,e){this.uuid=t.uuid;for(let n=0,i=t.bones.length;n<i;n++){const i=t.bones[n];let r=e[i];void 0===r&&(sn("Skeleton: No bone found with UUID:",i),r=new bs),this.bones.push(r),this.boneInverses.push((new yi).fromArray(t.boneInverses[n]))}return this.init(),this}toJSON(){const t={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};t.uuid=this.uuid;const e=this.bones,n=this.boneInverses;for(let i=0,r=e.length;i<r;i++){const r=e[i];t.bones.push(r.uuid);const s=n[i];t.boneInverses.push(s.toArray())}return t}}class Ts extends yr{constructor(t,e,n,i=1){super(t,e,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}toJSON(){const t=super.toJSON();return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}}const Bs=new yi,Rs=new yi,Ps=[],Ds=new qn,Ls=new yi,Us=new Hr,Ns=new ui;class Os extends Hr{constructor(t,e,n){super(t,e),this.isInstancedMesh=!0,this.instanceMatrix=new Ts(new Float32Array(16*n),16),this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let t=0;t<n;t++)this.setMatrixAt(t,Ls)}computeBoundingBox(){const t=this.geometry,e=this.count;null===this.boundingBox&&(this.boundingBox=new qn),null===t.boundingBox&&t.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<e;n++)this.getMatrixAt(n,Bs),Ds.copy(t.boundingBox).applyMatrix4(Bs),this.boundingBox.union(Ds)}computeBoundingSphere(){const t=this.geometry,e=this.count;null===this.boundingSphere&&(this.boundingSphere=new ui),null===t.boundingSphere&&t.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<e;n++)this.getMatrixAt(n,Bs),Ns.copy(t.boundingSphere).applyMatrix4(Bs),this.boundingSphere.union(Ns)}copy(t,e){return super.copy(t,e),this.instanceMatrix.copy(t.instanceMatrix),null!==t.morphTexture&&(this.morphTexture=t.morphTexture.clone()),null!==t.instanceColor&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this}getColorAt(t,e){e.fromArray(this.instanceColor.array,3*t)}getMatrixAt(t,e){e.fromArray(this.instanceMatrix.array,16*t)}getMorphAt(t,e){const n=e.morphTargetInfluences,i=this.morphTexture.source.data.data,r=t*(n.length+1)+1;for(let t=0;t<n.length;t++)n[t]=i[r+t]}raycast(t,e){const n=this.matrixWorld,i=this.count;if(Us.geometry=this.geometry,Us.material=this.material,void 0!==Us.material&&(null===this.boundingSphere&&this.computeBoundingSphere(),Ns.copy(this.boundingSphere),Ns.applyMatrix4(n),!1!==t.ray.intersectsSphere(Ns)))for(let r=0;r<i;r++){this.getMatrixAt(r,Bs),Rs.multiplyMatrices(n,Bs),Us.matrixWorld=Rs,Us.raycast(t,Ps);for(let t=0,n=Ps.length;t<n;t++){const n=Ps[t];n.instanceId=r,n.object=this,e.push(n)}Ps.length=0}}setColorAt(t,e){null===this.instanceColor&&(this.instanceColor=new Ts(new Float32Array(3*this.instanceMatrix.count).fill(1),3)),e.toArray(this.instanceColor.array,3*t)}setMatrixAt(t,e){e.toArray(this.instanceMatrix.array,16*t)}setMorphAt(t,e){const n=e.morphTargetInfluences,i=n.length+1;null===this.morphTexture&&(this.morphTexture=new ws(new Float32Array(i*this.count),i,this.count,kt,It));const r=this.morphTexture.source.data.data;let s=0;for(let t=0;t<n.length;t++)s+=n[t];const o=this.geometry.morphTargetsRelative?1:1-s,a=i*t;r[a]=o,r.set(n,a+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),null!==this.morphTexture&&(this.morphTexture.dispose(),this.morphTexture=null)}}const Fs=new Cn,ks=new Cn,Qs=new Sn;class zs{constructor(t=new Cn(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){const i=Fs.subVectors(n,e).cross(ks.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const n=t.delta(Fs),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const r=-(t.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:e.copy(t.start).addScaledVector(n,r)}intersectsLine(t){const e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const n=e||Qs.getNormalMatrix(t),i=this.coplanarPoint(Fs).applyMatrix4(t),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const Gs=new ui,Hs=new En(.5,.5),Vs=new Cn;class js{constructor(t=new zs,e=new zs,n=new zs,i=new zs,r=new zs,s=new zs){this.planes=[t,e,n,i,r,s]}set(t,e,n,i,r,s){const o=this.planes;return o[0].copy(t),o[1].copy(e),o[2].copy(n),o[3].copy(i),o[4].copy(r),o[5].copy(s),this}copy(t){const e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t,e=Ke,n=!1){const i=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],h=r[4],c=r[5],u=r[6],d=r[7],p=r[8],f=r[9],A=r[10],g=r[11],m=r[12],_=r[13],v=r[14],y=r[15];if(i[0].setComponents(l-s,d-h,g-p,y-m).normalize(),i[1].setComponents(l+s,d+h,g+p,y+m).normalize(),i[2].setComponents(l+o,d+c,g+f,y+_).normalize(),i[3].setComponents(l-o,d-c,g-f,y-_).normalize(),n)i[4].setComponents(a,u,A,v).normalize(),i[5].setComponents(l-a,d-u,g-A,y-v).normalize();else if(i[4].setComponents(l-a,d-u,g-A,y-v).normalize(),e===Ke)i[5].setComponents(l+a,d+u,g+A,y+v).normalize();else{if(e!==Ze)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);i[5].setComponents(a,u,A,v).normalize()}return this}intersectsObject(t){if(void 0!==t.boundingSphere)null===t.boundingSphere&&t.computeBoundingSphere(),Gs.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),Gs.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(Gs)}intersectsSprite(t){Gs.center.set(0,0,0);const e=Hs.distanceTo(t.center);return Gs.radius=.7071067811865476+e,Gs.applyMatrix4(t.matrixWorld),this.intersectsSphere(Gs)}intersectsSphere(t){const e=this.planes,n=t.center,i=-t.radius;for(let t=0;t<6;t++){if(e[t].distanceToPoint(n)<i)return!1}return!0}intersectsBox(t){const e=this.planes;for(let n=0;n<6;n++){const i=e[n];if(Vs.x=i.normal.x>0?t.max.x:t.min.x,Vs.y=i.normal.y>0?t.max.y:t.min.y,Vs.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(Vs)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}class Ws extends Ar{constructor(t){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new dr(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.fog=t.fog,this}}const qs=new Cn,Xs=new Cn,Ys=new yi,Ks=new vi,Zs=new ui,Js=new Cn,$s=new Cn;class to extends qi{constructor(t=new Rr,e=new Ws){super(),this.isLine=!0,this.type="Line",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[0];for(let t=1,i=e.count;t<i;t++)qs.fromBufferAttribute(e,t-1),Xs.fromBufferAttribute(e,t),n[t]=n[t-1],n[t]+=qs.distanceTo(Xs);t.setAttribute("lineDistance",new Cr(n,1))}else sn("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(t,e){const n=this.geometry,i=this.matrixWorld,r=t.params.Line.threshold,s=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Zs.copy(n.boundingSphere),Zs.applyMatrix4(i),Zs.radius+=r,!1===t.ray.intersectsSphere(Zs))return;Ys.copy(i).invert(),Ks.copy(t.ray).applyMatrix4(Ys);const o=r/((this.scale.x+this.scale.y+this.scale.z)/3),a=o*o,l=this.isLineSegments?2:1,h=n.index,c=n.attributes.position;if(null!==h){const n=Math.max(0,s.start),i=Math.min(h.count,s.start+s.count);for(let r=n,s=i-1;r<s;r+=l){const n=h.getX(r),i=h.getX(r+1),s=eo(this,t,Ks,a,n,i,r);s&&e.push(s)}if(this.isLineLoop){const r=h.getX(i-1),s=h.getX(n),o=eo(this,t,Ks,a,r,s,i-1);o&&e.push(o)}}else{const n=Math.max(0,s.start),i=Math.min(c.count,s.start+s.count);for(let r=n,s=i-1;r<s;r+=l){const n=eo(this,t,Ks,a,r,r+1,r);n&&e.push(n)}if(this.isLineLoop){const r=eo(this,t,Ks,a,i-1,n,i-1);r&&e.push(r)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;t<e;t++){const e=n[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[e]=t}}}}}function eo(t,e,n,i,r,s,o){const a=t.geometry.attributes.position;qs.fromBufferAttribute(a,r),Xs.fromBufferAttribute(a,s);if(n.distanceSqToSegment(qs,Xs,Js,$s)>i)return;Js.applyMatrix4(t.matrixWorld);const l=e.ray.origin.distanceTo(Js);return l<e.near||l>e.far?void 0:{distance:l,point:$s.clone().applyMatrix4(t.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:t}}const no=new Cn,io=new Cn;class ro extends to{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let t=0,i=e.count;t<i;t+=2)no.fromBufferAttribute(e,t),io.fromBufferAttribute(e,t+1),n[t]=0===t?0:n[t-1],n[t+1]=n[t]+no.distanceTo(io);t.setAttribute("lineDistance",new Cr(n,1))}else sn("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class so extends to{constructor(t,e){super(t,e),this.isLineLoop=!0,this.type="LineLoop"}}class oo extends Ar{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new dr(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}}const ao=new yi,lo=new vi,ho=new ui,co=new Cn;
vendor: 16,384 bytes, line 2
2class uo extends qi{constructor(t=new Rr,e=new oo){super(),this.isPoints=!0,this.type="Points",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}raycast(t,e){const n=this.geometry,i=this.matrixWorld,r=t.params.Points.threshold,s=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),ho.copy(n.boundingSphere),ho.applyMatrix4(i),ho.radius+=r,!1===t.ray.intersectsSphere(ho))return;ao.copy(i).invert(),lo.copy(t.ray).applyMatrix4(ao);const o=r/((this.scale.x+this.scale.y+this.scale.z)/3),a=o*o,l=n.index,h=n.attributes.position;if(null!==l){for(let n=Math.max(0,s.start),r=Math.min(l.count,s.start+s.count);n<r;n++){const r=l.getX(n);co.fromBufferAttribute(h,r),po(co,r,a,i,t,e,this)}}else{for(let n=Math.max(0,s.start),r=Math.min(h.count,s.start+s.count);n<r;n++)co.fromBufferAttribute(h,n),po(co,n,a,i,t,e,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;t<e;t++){const e=n[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[e]=t}}}}}function po(t,e,n,i,r,s,o){const a=lo.distanceSqToPoint(t);if(a<n){const n=new Cn;lo.closestPointToPoint(t,n),n.applyMatrix4(i);const l=r.ray.origin.distanceTo(n);if(l<r.near||l>r.far)return;s.push({distance:l,distanceToRay:Math.sqrt(a),point:n,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class fo extends zn{constructor(t,e,n,i,r,s,o,a,l,h,c,u){super(null,s,o,a,l,h,i,r,c,u),this.isCompressedTexture=!0,this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class Ao extends fo{constructor(t,e,n,i,r,s){super(t,e,n,r,s),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=pt,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class go extends fo{constructor(t,e,n){super(void 0,t[0].width,t[0].height,e,n,at),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class mo extends zn{constructor(t,e,n,i,r,s,o,a,l){super(t,e,n,i,r,s,o,a,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class _o extends zn{constructor(t,e,n=St,i,r,s,o=At,a=At,l,h=Ot,c=1){if(h!==Ot&&h!==Ft)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");super({width:t,height:e,depth:c},i,r,s,o,a,h,n,l),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(t){return super.copy(t),this.source=new On(Object.assign({},t.image)),this.compareFunction=t.compareFunction,this}toJSON(t){const e=super.toJSON(t);return null!==this.compareFunction&&(e.compareFunction=this.compareFunction),e}}class vo extends zn{constructor(t=null){super(),this.sourceTexture=t,this.isExternalTexture=!0}copy(t){return super.copy(t),this.sourceTexture=t.sourceTexture,this}}class yo extends Rr{constructor(t=1,e=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:i};const r=t/2,s=e/2,o=Math.floor(n),a=Math.floor(i),l=o+1,h=a+1,c=t/o,u=e/a,d=[],p=[],f=[],A=[];for(let t=0;t<h;t++){const e=t*u-s;for(let n=0;n<l;n++){const i=n*c-r;p.push(i,-e,0),f.push(0,0,1),A.push(n/o),A.push(1-t/a)}}for(let t=0;t<a;t++)for(let e=0;e<o;e++){const n=e+l*t,i=e+l*(t+1),r=e+1+l*(t+1),s=e+1+l*t;d.push(n,i,s),d.push(i,r,s)}this.setIndex(d),this.setAttribute("position",new Cr(p,3)),this.setAttribute("normal",new Cr(f,3)),this.setAttribute("uv",new Cr(A,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new yo(t.width,t.height,t.widthSegments,t.heightSegments)}}class Eo extends Kr{constructor(t){super(t),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class xo extends Ar{constructor(t){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new dr(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new dr(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Pe,this.normalScale=new En(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Bi,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(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.envMapRotation.copy(t.envMapRotation),this.envMapIntensity=t.envMapIntensity,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class Co extends xo{constructor(t){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new En(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return An(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new dr(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new dr(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new dr(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(t)}get anisotropy(){return this._anisotropy}set anisotropy(t){this._anisotropy>0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.dispersion=t.dispersion,this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class bo extends Ar{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new dr(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new dr(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Pe,this.normalScale=new En(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Bi,this.combine=Y,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(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.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.envMapRotation.copy(t.envMapRotation),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.flatShading=t.flatShading,this.fog=t.fog,this}}class wo extends Ar{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,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}}class So extends Ar{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}function Io(t,e){return t&&t.constructor!==e?"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t):t}function Mo(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function To(t){const e=t.length,n=new Array(e);for(let t=0;t!==e;++t)n[t]=t;return n.sort((function(e,n){return t[e]-t[n]})),n}function Bo(t,e,n){const i=t.length,r=new t.constructor(i);for(let s=0,o=0;o!==i;++s){const i=n[s]*e;for(let n=0;n!==e;++n)r[o++]=t[i+n]}return r}function Ro(t,e,n,i){let r=1,s=t[0];for(;void 0!==s&&void 0===s[i];)s=t[r++];if(void 0===s)return;let o=s[i];if(void 0!==o)if(Array.isArray(o))do{o=s[i],void 0!==o&&(e.push(s.time),n.push(...o)),s=t[r++]}while(void 0!==s);else if(void 0!==o.toArray)do{o=s[i],void 0!==o&&(e.push(s.time),o.toArray(n,n.length)),s=t[r++]}while(void 0!==s);else do{o=s[i],void 0!==o&&(e.push(s.time),n.push(o)),s=t[r++]}while(void 0!==s)}class Po{constructor(t,e,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new e.constructor(n),this.sampleValues=e,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let n=this._cachedIndex,i=e[n],r=e[n-1];t:{e:{let s;n:{i:if(!(t<i)){for(let s=n+2;;){if(void 0===i){if(t<r)break i;return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===s)break;if(r=i,i=e[++n],t<i)break e}s=e.length;break n}if(t>=r)break t;{const o=e[1];t<o&&(n=2,r=o);for(let s=n-2;;){if(void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(n===s)break;if(i=r,r=e[--n-1],t>=r)break e}s=n,n=0}}for(;n<s;){const i=n+s>>>1;t<e[i]?s=i:n=i+1}if(i=e[n],r=e[n-1],void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===i)return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,t,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){const e=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=t*i;for(let t=0;t!==i;++t)e[t]=n[r+t];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class Do extends Po{constructor(t,e,n,i){super(t,e,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:we,endingEnd:we}}intervalChanged_(t,e,n){const i=this.parameterPositions;let r=t-2,s=t+1,o=i[r],a=i[s];if(void 0===o)switch(this.getSettings_().endingStart){case Se:r=t,o=2*e-n;break;case Ie:r=i.length-2,o=e+i[r]-i[r+1];break;default:r=t,o=n}if(void 0===a)switch(this.getSettings_().endingEnd){case Se:s=t,a=2*n-e;break;case Ie:s=1,a=n+i[1]-i[0];break;default:s=t-1,a=e}const l=.5*(n-e),h=this.valueSize;this._weightPrev=l/(e-o),this._weightNext=l/(a-n),this._offsetPrev=r*h,this._offsetNext=s*h}interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=t*o,l=a-o,h=this._offsetPrev,c=this._offsetNext,u=this._weightPrev,d=this._weightNext,p=(n-e)/(i-e),f=p*p,A=f*p,g=-u*A+2*u*f-u*p,m=(1+u)*A+(-1.5-2*u)*f+(-.5+u)*p+1,_=(-1-d)*A+(1.5+d)*f+.5*p,v=d*A-d*f;for(let t=0;t!==o;++t)r[t]=g*s[h+t]+m*s[l+t]+_*s[a+t]+v*s[c+t];return r}}class Lo extends Po{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=t*o,l=a-o,h=(n-e)/(i-e),c=1-h;for(let t=0;t!==o;++t)r[t]=s[l+t]*c+s[a+t]*h;return r}}class Uo extends Po{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t){return this.copySampleValue_(t-1)}}class No{constructor(t,e,n,i){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Io(e,this.TimeBufferType),this.values=Io(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(t){const e=t.constructor;let n;if(e.toJSON!==this.toJSON)n=e.toJSON(t);else{n={name:t.name,times:Io(t.times,Array),values:Io(t.values,Array)};const e=t.getInterpolation();e!==t.DefaultInterpolation&&(n.interpolation=e)}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new Uo(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new Lo(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new Do(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case xe:e=this.InterpolantFactoryMethodDiscrete;break;case Ce:e=this.InterpolantFactoryMethodLinear;break;case be:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){const e="unsupported interpolation for "+this.ValueTypeN
vendor: 18,127 bytes, line 2
2ame+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(e);this.setInterpolation(this.DefaultInterpolation)}return sn("KeyframeTrack:",e),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return xe;case this.InterpolantFactoryMethodLinear:return Ce;case this.InterpolantFactoryMethodSmooth:return be}}getValueSize(){return this.values.length/this.times.length}shift(t){if(0!==t){const e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]+=t}return this}scale(t){if(1!==t){const e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]*=t}return this}trim(t,e){const n=this.times,i=n.length;let r=0,s=i-1;for(;r!==i&&n[r]<t;)++r;for(;-1!==s&&n[s]>e;)--s;if(++s,0!==r||s!==i){r>=s&&(s=Math.max(s,1),r=s-1);const t=this.getValueSize();this.times=n.slice(r,s),this.values=this.values.slice(r*t,s*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(on("KeyframeTrack: Invalid value size in track.",this),t=!1);const n=this.times,i=this.values,r=n.length;0===r&&(on("KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let e=0;e!==r;e++){const i=n[e];if("number"==typeof i&&isNaN(i)){on("KeyframeTrack: Time is not a valid number.",this,e,i),t=!1;break}if(null!==s&&s>i){on("KeyframeTrack: Out of order keys.",this,e,i,s),t=!1;break}s=i}if(void 0!==i&&Mo(i))for(let e=0,n=i.length;e!==n;++e){const n=i[e];if(isNaN(n)){on("KeyframeTrack: Value is not a valid number.",this,e,n),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===be,r=t.length-1;let s=1;for(let o=1;o<r;++o){let r=!1;const a=t[o];if(a!==t[o+1]&&(1!==o||a!==t[0]))if(i)r=!0;else{const t=o*n,i=t-n,s=t+n;for(let o=0;o!==n;++o){const n=e[t+o];if(n!==e[i+o]||n!==e[s+o]){r=!0;break}}}if(r){if(o!==s){t[s]=t[o];const i=o*n,r=s*n;for(let t=0;t!==n;++t)e[r+t]=e[i+t]}++s}}if(r>0){t[s]=t[r];for(let t=r*n,i=s*n,o=0;o!==n;++o)e[i+o]=e[t+o];++s}return s!==t.length?(this.times=t.slice(0,s),this.values=e.slice(0,s*n)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),n=new(0,this.constructor)(this.name,t,e);return n.createInterpolant=this.createInterpolant,n}}No.prototype.ValueTypeName="",No.prototype.TimeBufferType=Float32Array,No.prototype.ValueBufferType=Float32Array,No.prototype.DefaultInterpolation=Ce;class Oo extends No{constructor(t,e,n){super(t,e,n)}}Oo.prototype.ValueTypeName="bool",Oo.prototype.ValueBufferType=Array,Oo.prototype.DefaultInterpolation=xe,Oo.prototype.InterpolantFactoryMethodLinear=void 0,Oo.prototype.InterpolantFactoryMethodSmooth=void 0;class Fo extends No{constructor(t,e,n,i){super(t,e,n,i)}}Fo.prototype.ValueTypeName="color";class ko extends No{constructor(t,e,n,i){super(t,e,n,i)}}ko.prototype.ValueTypeName="number";class Qo extends Po{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=(n-e)/(i-e);let l=t*o;for(let t=l+o;l!==t;l+=4)xn.slerpFlat(r,0,s,l-o,s,l,a);return r}}class zo extends No{constructor(t,e,n,i){super(t,e,n,i)}InterpolantFactoryMethodLinear(t){return new Qo(this.times,this.values,this.getValueSize(),t)}}zo.prototype.ValueTypeName="quaternion",zo.prototype.InterpolantFactoryMethodSmooth=void 0;class Go extends No{constructor(t,e,n){super(t,e,n)}}Go.prototype.ValueTypeName="string",Go.prototype.ValueBufferType=Array,Go.prototype.DefaultInterpolation=xe,Go.prototype.InterpolantFactoryMethodLinear=void 0,Go.prototype.InterpolantFactoryMethodSmooth=void 0;class Ho extends No{constructor(t,e,n,i){super(t,e,n,i)}}Ho.prototype.ValueTypeName="vector";class Vo{constructor(t="",e=-1,n=[],i=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=i,this.uuid=fn(),this.userData={},this.duration<0&&this.resetDuration()}static parse(t){const e=[],n=t.tracks,i=1/(t.fps||1);for(let t=0,r=n.length;t!==r;++t)e.push(jo(n[t]).scale(i));const r=new this(t.name,t.duration,e,t.blendMode);return r.uuid=t.uuid,r.userData=JSON.parse(t.userData||"{}"),r}static toJSON(t){const e=[],n=t.tracks,i={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode,userData:JSON.stringify(t.userData)};for(let t=0,i=n.length;t!==i;++t)e.push(No.toJSON(n[t]));return i}static CreateFromMorphTargetSequence(t,e,n,i){const r=e.length,s=[];for(let t=0;t<r;t++){let o=[],a=[];o.push((t+r-1)%r,t,(t+1)%r),a.push(0,1,0);const l=To(o);o=Bo(o,1,l),a=Bo(a,1,l),i||0!==o[0]||(o.push(r),a.push(a[0])),s.push(new ko(".morphTargetInfluences["+e[t].name+"]",o,a).scale(1/n))}return new this(t,-1,s)}static findByName(t,e){let n=t;if(!Array.isArray(t)){const e=t;n=e.geometry&&e.geometry.animations||e.animations}for(let t=0;t<n.length;t++)if(n[t].name===e)return n[t];return null}static CreateClipsFromMorphTargetSequences(t,e,n){const i={},r=/^([\w-]*?)([\d]+)$/;for(let e=0,n=t.length;e<n;e++){const n=t[e],s=n.name.match(r);if(s&&s.length>1){const t=s[1];let e=i[t];e||(i[t]=e=[]),e.push(n)}}const s=[];for(const t in i)s.push(this.CreateFromMorphTargetSequence(t,i[t],e,n));return s}static parseAnimation(t,e){if(sn("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!t)return on("AnimationClip: No animation in JSONLoader data."),null;const n=function(t,e,n,i,r){if(0!==n.length){const s=[],o=[];Ro(n,s,o,i),0!==s.length&&r.push(new t(e,s,o))}},i=[],r=t.name||"default",s=t.fps||30,o=t.blendMode;let a=t.length||-1;const l=t.hierarchy||[];for(let t=0;t<l.length;t++){const r=l[t].keys;if(r&&0!==r.length)if(r[0].morphTargets){const t={};let e;for(e=0;e<r.length;e++)if(r[e].morphTargets)for(let n=0;n<r[e].morphTargets.length;n++)t[r[e].morphTargets[n]]=-1;for(const n in t){const t=[],s=[];for(let i=0;i!==r[e].morphTargets.length;++i){const i=r[e];t.push(i.time),s.push(i.morphTarget===n?1:0)}i.push(new ko(".morphTargetInfluence["+n+"]",t,s))}a=t.length*s}else{const s=".bones["+e[t].name+"]";n(Ho,s+".position",r,"pos",i),n(zo,s+".quaternion",r,"rot",i),n(Ho,s+".scale",r,"scl",i)}}if(0===i.length)return null;return new this(r,a,i,o)}resetDuration(){let t=0;for(let e=0,n=this.tracks.length;e!==n;++e){const n=this.tracks[e];t=Math.max(t,n.times[n.times.length-1])}return this.duration=t,this}trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this}validate(){let t=!0;for(let e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t}optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}clone(){const t=[];for(let e=0;e<this.tracks.length;e++)t.push(this.tracks[e].clone());const e=new this.constructor(this.name,this.duration,t,this.blendMode);return e.userData=JSON.parse(JSON.stringify(this.userData)),e}toJSON(){return this.constructor.toJSON(this)}}function jo(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ko;case"vector":case"vector2":case"vector3":case"vector4":return Ho;case"color":return Fo;case"quaternion":return zo;case"bool":case"boolean":return Oo;case"string":return Go}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}(t.type);if(void 0===t.times){const e=[],n=[];Ro(t.keys,e,n,"value"),t.times=e,t.values=n}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}const Wo={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};class qo{constructor(t,e,n){const i=this;let r,s=!1,o=0,a=0;const l=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this._abortController=null,this.itemStart=function(t){a++,!1===s&&void 0!==i.onStart&&i.onStart(t,o,a),s=!0},this.itemEnd=function(t){o++,void 0!==i.onProgress&&i.onProgress(t,o,a),o===a&&(s=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(t){void 0!==i.onError&&i.onError(t)},this.resolveURL=function(t){return r?r(t):t},this.setURLModifier=function(t){return r=t,this},this.addHandler=function(t,e){return l.push(t,e),this},this.removeHandler=function(t){const e=l.indexOf(t);return-1!==e&&l.splice(e,2),this},this.getHandler=function(t){for(let e=0,n=l.length;e<n;e+=2){const n=l[e],i=l[e+1];if(n.global&&(n.lastIndex=0),n.test(t))return i}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}const Xo=new qo;class Yo{constructor(t){this.manager=void 0!==t?t:Xo,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){const n=this;return new Promise((function(i,r){n.load(t,i,e,r)}))}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}abort(){return this}}Yo.DEFAULT_MATERIAL_NAME="__DEFAULT";const Ko={};class Zo extends Error{constructor(t,e){super(t),this.response=e}}class Jo extends Yo{constructor(t){super(t),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(t,e,n,i){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=Wo.get(`file:${t}`);if(void 0!==r)return this.manager.itemStart(t),setTimeout((()=>{e&&e(r),this.manager.itemEnd(t)}),0),r;if(void 0!==Ko[t])return void Ko[t].push({onLoad:e,onProgress:n,onError:i});Ko[t]=[],Ko[t].push({onLoad:e,onProgress:n,onError:i});const s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:"function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),o=this.mimeType,a=this.responseType;fetch(s).then((e=>{if(200===e.status||0===e.status){if(0===e.status&&sn("FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===e.body||void 0===e.body.getReader)return e;const n=Ko[t],i=e.body.getReader(),r=e.headers.get("X-File-Size")||e.headers.get("Content-Length"),s=r?parseInt(r):0,o=0!==s;let a=0;const l=new ReadableStream({start(t){!function e(){i.read().then((({done:i,value:r})=>{if(i)t.close();else{a+=r.byteLength;const i=new ProgressEvent("progress",{lengthComputable:o,loaded:a,total:s});for(let t=0,e=n.length;t<e;t++){const e=n[t];e.onProgress&&e.onProgress(i)}t.enqueue(r),e()}}),(e=>{t.error(e)}))}()}});return new Response(l)}throw new Zo(`fetch for "${e.url}" responded with ${e.status}: ${e.statusText}`,e)})).then((t=>{switch(a){case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"document":return t.text().then((t=>(new DOMParser).parseFromString(t,o)));case"json":return t.json();default:if(""===o)return t.text();{const e=/charset="?([^;"\s]*)"?/i.exec(o),n=e&&e[1]?e[1].toLowerCase():void 0,i=new TextDecoder(n);return t.arrayBuffer().then((t=>i.decode(t)))}}})).then((e=>{Wo.add(`file:${t}`,e);const n=Ko[t];delete Ko[t];for(let t=0,i=n.length;t<i;t++){const i=n[t];i.onLoad&&i.onLoad(e)}})).catch((e=>{const n=Ko[t];if(void 0===n)throw this.manager.itemError(t),e;delete Ko[t];for(let t=0,i=n.length;t<i;t++){const i=n[t];i.onError&&i.onError(e)}this.manager.itemError(t)})).finally((()=>{this.manager.itemEnd(t)})),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}const $o=new WeakMap;class ta extends Yo{constructor(t){super(t)}load(t,e,n,i){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=this,s=Wo.get(`image:${t}`);if(void 0!==s){if(!0===s.complete)r.manager.itemStart(t),setTimeout((function(){e&&e(s),r.manager.itemEnd(t)}),0);else{let t=$o.get(s);void 0===t&&(t=[],$o.set(s,t)),t.push({onLoad:e,onError:i})}return s}const o=$e("img");function a(){h(),e&&e(this);const n=$o.get(this)||[];for(let t=0;t<n.length;t++){const e=n[t];e.onLoad&&e.onLoad(this)}$o.delete(this),r.manager.itemEnd(t)}function l(e){h(),i&&i(e),Wo.remove(`image:${t}`);const n=$o.get(this)||[];for(let t=0;t<n.length;t++){const i=n[t];i.onError&&i.onError(e)}$o.delete(this),r.manager.itemError(t),r.manager.itemEnd(t)}function h(){o.removeEventListener("load",a,!1),o.removeEventListener("error",l,!1)}return o.addEventListener("load",a,!1),o.addEventListener("error",l,!1),"data:"!==t.slice(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),Wo.add(`image:${t}`,o),r.manager.itemStart(t),o.src=t,o}}class ea extends Yo{constructor(t){super(t)}load(t,e,n,i){const r=new zn,s=new ta(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(t,(function(t){r.image=t,r.needsUpdate=!0,void 0!==e&&e(r)}),n,i),r}}class na extends qi{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new dr(t),this.intensity=e}dispose(){}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),void 0!==this.target&&(e.object.target=this.target.uuid),e}}const ia=new yi,ra=new Cn,sa=new Cn;class oa{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new En(512,512),this.mapType=Et,this.map=null,this.mapPass=null,this.matrix=new yi,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new js,this._frameExtents=new En(1,1),this._viewportCount=1,this._viewports=[new Gn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;ra.setFromMatrixPosition(t.matrixWorld),e.position.copy(ra),sa.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(sa),e.updateMatrixWorld(),ia.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ia,e.coordinateSystem,e.reversedDepth),e.reversedDepth?n.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(ia)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.intensity=t.intensity,this.bias=t.bias,this.radius=t.radius,this.autoUpdate=t.autoUpdate,this.needsUpdate=t.needsUpdate,this.normalBias=t.normalBias,this.blurSamples=t.blurSamples,this.mapSize.copy(t.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const t={};return 1!==this.intensity&&(t.intensity=this.intensity),0!==this.bias&&(t.bias=this.bias),0!==this.normalBias&&(t.normalBias=this.normalBias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}class aa extends oa{constructor(){super(new es(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(t){const e=this.camera,n=2*pn*t.angle*this.focus,i=this.mapSize.width/this.mapSize.height*this.aspect,r=t.distance||e.far;n===e.fov&&i===e.aspect&&r===e.far||(e.fov=n,e.aspect=i,e.far=r,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}}class la extends na{constructor(t,e,n=0,i=Math.PI/3,r=0,s=2){super(t,e),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(qi.DEFAULT_UP),this.updateMatrix(),this.target=new qi,this.distance=n,this.angle=i,this.penumbra=r,this.decay=s,this.map=null,this.shadow=new aa}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),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}}const ha=new yi,ca=new Cn,ua=new Cn;class da extends oa{constructor(){super(new es(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new En(4,2),this._viewportCount=6,this._viewports=[new Gn(2,1,1,1),new Gn(0,1,1,1),new Gn(3,1,1,1),new Gn(1,1,1,1),new Gn(3,0,1,1),new Gn(1,0,1,1)],this._cubeDirections=[new Cn(1,0,0),new Cn(-1,0,0),new Cn(0,0,1),new Cn(0,0,-1),new Cn(0,1,0),new Cn(0,-1,0)],this._cubeUps=[new Cn(0,1,0),new Cn(0,1,0),new Cn(0,1,0),new Cn(0,1,0),new Cn(0,0,1),new Cn(0,0,-1)]}updateMatrices(t,e=0){const n=this.camera,i=this.matrix,r=t.distance||n.far;r!==n.far&&(n.far=r,n.updateProjectionMatrix()),ca.setFromMatrixPosition(t.matrixWorld),n.position.copy(ca),ua.copy(n.position),ua.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(ua),n.updateMatrixWorld(),i.makeTranslation(-ca.x,-ca.y,-ca.z),ha.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ha,n.coordinateSystem,n.reversedDepth)}}class pa extends na{constructor(t,e,n=0,i=2){super(t,e),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new da}get power(){return 4*this.intensity*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}class fa extends Zr{constructor(t=-1,e=1,n=1,i=-1,r=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="Orthogra
2phicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=i,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(t,e){return super.copy(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=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,n,i,r,s){null===this.view&&(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=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-t,s=n+t,o=i+e,a=i-e;if(null!==this.view&&this.view.enabled){const t=(this.right-this.left)/this.view.fullWidth/this.zoom,e=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=t*this.view.offsetX,s=r+t*this.view.width,o-=e*this.view.offsetY,a=o-e*this.view.height}this.projectionMatrix.makeOrthographic(r,s,o,a,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}class Aa extends oa{constructor(){super(new fa(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class ga extends na{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(qi.DEFAULT_UP),this.updateMatrix(),this.target=new qi,this.shadow=new Aa}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class ma{static extractUrlBase(t){const e=t.lastIndexOf("/");return-1===e?"./":t.slice(0,e+1)}static resolveURL(t,e){return"string"!=typeof t||""===t?"":(/^https?:\/\//i.test(e)&&/^\//.test(t)&&(e=e.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(t)||/^data:.*,.*$/i.test(t)||/^blob:.*$/i.test(t)?t:e+t)}}const _a=new WeakMap;class va extends Yo{constructor(t){super(t),this.isImageBitmapLoader=!0,"undefined"==typeof createImageBitmap&&sn("ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&sn("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(t){return this.options=t,this}load(t,e,n,i){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=this,s=Wo.get(`image-bitmap:${t}`);if(void 0!==s)return r.manager.itemStart(t),s.then?void s.then((n=>{if(!0!==_a.has(s))return e&&e(n),r.manager.itemEnd(t),n;i&&i(_a.get(s)),r.manager.itemError(t),r.manager.itemEnd(t)})):(setTimeout((function(){e&&e(s),r.manager.itemEnd(t)}),0),s);const o={};o.credentials="anonymous"===this.crossOrigin?"same-origin":"include",o.headers=this.requestHeader,o.signal="function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const a=fetch(t,o).then((function(t){return t.blob()})).then((function(t){return createImageBitmap(t,Object.assign(r.options,{colorSpaceConversion:"none"}))})).then((function(n){return Wo.add(`image-bitmap:${t}`,n),e&&e(n),r.manager.itemEnd(t),n})).catch((function(e){i&&i(e),_a.set(a,e),Wo.remove(`image-bitmap:${t}`),r.manager.itemError(t),r.manager.itemEnd(t)}));Wo.add(`image-bitmap:${t}`,a),r.manager.itemStart(t)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}class ya extends es{constructor(t=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=t}}class Ea{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=performance.now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}const xa="\\[\\]\\.:\\/",Ca=new RegExp("["+xa+"]","g"),ba="[^"+xa+"]",wa="[^"+xa.replace("\\.","")+"]",S
vendor: 4,330 bytes, line 2
2a=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",ba)+/(WCOD+)?/.source.replace("WCOD",wa)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",ba)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",ba)+"$"),Ia=["material","materials","bones","map"];class Ma{constructor(t,e,n){this.path=e,this.parsedPath=n||Ma.parseTrackName(e),this.node=Ma.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new Ma.Composite(t,e,n):new Ma(t,e,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Ca,"")}static parseTrackName(t){const e=Sa.exec(t);if(null===e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==i&&-1!==i){const t=n.nodeName.substring(i+1);-1!==Ia.indexOf(t)&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=t)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(void 0===e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){const n=function(t){for(let i=0;i<t.length;i++){const r=t[i];if(r.name===e||r.uuid===e)return r;const s=n(r.children);if(s)return s}return null},i=n(t.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)t[e++]=n[i]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=t[e++]}_setValue_array_setNeedsUpdate(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node;const e=this.parsedPath,n=e.objectName,i=e.propertyName;let r=e.propertyIndex;if(t||(t=Ma.findNode(this.rootNode,e.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void sn("PropertyBinding: No target node found for track: "+this.path+".");if(n){let i=e.objectIndex;switch(n){case"materials":if(!t.material)return void on("PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void on("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void on("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(let e=0;e<t.length;e++)if(t[e].name===i){i=e;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material)return void on("PropertyBinding: Can not bind to material as no
2de does not have a material.",this);if(!t.material.map)return void on("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);t=t.material.map;break;default:if(void 0===t[n])return void on("PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==i){if(void 0===t[i])return void on("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[i]}}const s=t[i];if(void 0===s){return void on("PropertyBinding: Trying to update property for track: "+e.nodeName+"."+i+" but it wasn't found.",t)}let o=this.Versioning.None;this.targetObject=t,!0===t.isMaterial?o=this.Versioning.NeedsUpdate:!0===t.isObject3D&&(o=this.Versioning.MatrixWorldNeedsUpdate);let a=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===i){if(!t.geometry)return void on("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!t.geometry.morphAttributes)return void on("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==t.morphTargetDictionary[r]&&(r=t.morphTargetDictionary[r])}a=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=r}else void 0!==s.fromArray&&void 0!==s.toArray?(a=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(a=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=i;this.getValue=this.GetterByBindingType[a],this.setValue=this.SetterByBindingTypeAndVersioning[a][o]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Ma.Composite=class{constructor(t,e,n){const i=n||Ma.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}getValue(t,e){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];void 0!==i&&i.getValue(t,e)}setValue(t,e){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(t,e)}bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},Ma.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Ma.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Ma.prototype.GetterByBindingType=[Ma.prototype._getValue_direct,Ma.prototype._getValue_array,Ma.prototype._getValue_arrayElement,Ma.prototype._getValue_toArray],Ma.prototype.SetterByBindingTypeAndVersioning=[[Ma.prototype._setValue_direct,Ma.prototype._setValue_direct_setNeedsUpdate,Ma.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Ma.prototype._setValue_array,Ma.prototype._setValue_array_setNeedsUpdate,Ma.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Ma.prototype._setValue_arrayElement,Ma.prototype._setValue_arrayElement_setNeedsUpdate,Ma.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Ma.prototype._setValue_fromArray,Ma.prototype._setValue_fromArray_setNeedsUpdate,Ma.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];new Float32Array(1);const Ta=new yi;class Ba{constructor(t,e,n=0,i=1/0){this.ray=new vi(t,e),this.near=n,this.far=i,this.camera=null,this.layers=new Ri,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(t,e){this.ray.set(t,e)}setFromCamera(t,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(),this.camera=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),this.camera=e):on("Raycaster: Unsupported camera type: "+e.type)}setFromXRController(t){return Ta.identity().extractRotation(t.matrixWorld),this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(Ta),this}intersectObject(t,e=!0,n=[]){return Pa(t,this,n,e),n.sort(Ra),n}intersectObjects(t,e=!0,n=[]){for(let i=0,r=t.length;i<r;i++)Pa(t[i],this,n,e);return n.sort(Ra),n}}function Ra(t,e){return t.distance-e.distance}function Pa(t,e,n,i){let r=!0;
vendor: 5,667 bytes, line 2
2if(t.layers.test(e.layers)){!1===t.raycast(e,n)&&(r=!1)}if(!0===r&&!0===i){const i=t.children;for(let t=0,r=i.length;t<r;t++)Pa(i[t],e,n,!0)}}class Da{constructor(t=1,e=0,n=0){this.radius=t,this.phi=e,this.theta=n}set(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this}makeSafe(){const t=1e-6;return this.phi=An(this.phi,t,Math.PI-t),this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,e,n){return this.radius=Math.sqrt(t*t+e*e+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t,n),this.phi=Math.acos(An(e/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}class La extends hn{constructor(t,e=null){super(),this.object=t,this.domElement=e,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(t){void 0!==t?(null!==this.domElement&&this.disconnect(),this.domElement=t):sn("Controls: connect() now requires an element.")}disconnect(){}dispose(){}update(){}}function Ua(t,e,n,i){const r=function(t){switch(t){case Et:case xt:return{byteLength:1,components:1};case bt:case Ct:case Mt:return{byteLength:2,components:1};case Tt:case Bt:return{byteLength:2,components:4};case St:case wt:case It:return{byteLength:4,components:1};case Pt:case Dt:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}(i);switch(n){case Lt:return t*e;case kt:case Qt:return t*e/r.components*r.byteLength;case zt:case Gt:return t*e*2/r.components*r.byteLength;case Ut:return t*e*3/r.components*r.byteLength;case Nt:case Ht:return t*e*4/r.components*r.byteLength;case Vt:case jt:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Wt:case qt:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case Yt:case Zt:return Math.max(t,16)*Math.max(e,8)/4;case Xt:case Kt:return Math.max(t,8)*Math.max(e,8)/2;case Jt:case $t:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case te:case ee:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case ne:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case ie:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case re:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case se:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case oe:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case ae:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case le:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case he:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case ce:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case ue:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case de:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case pe:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case fe:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case Ae:case ge:case me:return Math.ceil(t/4)*Math.ceil(e/4)*16;case _e:case ve:return Math.ceil(t/4)*Math.ceil(e/4)*8;case ye:case Ee:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:i}})),"undefined"!=typeof window&&(window.__THREE__?sn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=i)},477:(t,e,n)=>{"use strict";n.d(e,{CP7:()=>Qe,anP:()=>I});var i=n(250);function r(){let t=null,e=!1,n=null,i=null;function r(e,s){n(e,s),i=t.requestAnimationFrame(r)}return{start:function(){!0!==e&&null!==n&&(i=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(t){n=t},setContext:function(e){t=e}}}function s(t){const e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);const i=e.get(n);i&&(t.deleteBuffer(i.buffer),e.delete(n))},update:function(n,i){if(n.isInterleavedBufferAttribute&&(n=n.data),n.isGLBufferAttribute){const t=e.get(n);return void((!t||t.version<n.version)&&e.set(n,{buffer:n.buffer,type:n.type,bytesPerElement:n.elementSize,version:n.version}))}const r=e.get(n);if(void 0===r)e.set(n,function(e,n){const i=e.array,r=e.usage,s=i.byteLength,o=t.createBuffer();let a;if(t.bindBuffer(n,o),t.bufferData(n,i,r),e.onUploadCallback(),i instanceof Float32Array)a=t.FLOAT;else if("undefined"!=typeof Float16Array&&i instanceof Float16Array)a=t.HALF_FLOAT;else if(i instanceof Uint16Array)a=e.isFloat16BufferAttribute?t.HALF_FLOAT:t.UNSIGNED_SHORT;else if(i instanceof Int16Array)a=t.SHORT;else if(i instanceof Uint32Array)a=t.UNSIGNED_INT;else if(i instanceof Int32Array)a=t.INT;else if(i instanceof Int8Array)a=t.BYTE;else if(i instanceof Uint8Array)a=t.UNSIGNED_BYTE;else{if(!(i instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+i);a=t.UNSIGNED_BYTE}return{buffer:o,type:a,bytesPerElement:i.BYTES_PER_ELEMENT,version:e.version,size:s}}(n,i));else if(r.version<n.version){if(r.size!==n.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");!function(e,n,i){const r=n.array,s=n.updateRanges;if(t.bindBuffer(i,e),0===s.length)t.bufferSubData(i,0,r);else{s.sort(((t,e)=>t.start-e.start));let e=0;for(let t=1;t<s.length;t++){const n=s[e],i=s[t];i.start<=n.start+n.count+1?n.count=Math.max(n.count,i.start+i.count-n.start):(++e,s[e]=i)}s.length=e+1;for(let e=0,n=s.length;e<n;e++){const n=s[e];t.bufferSubData(i,n.start*r.BYTES_PER_ELEMENT,r,n.start,n.count)}
2n.clearUpdateRanges()}n.onUploadCallback()}(r.buffer,n,i),r.version=n.version}}}}const o={alphahash_fragment:"#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",alphahash_pars_fragment:"#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif",alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",batching_pars_vertex:"#ifdef USE_BATCHING\n\t#if ! defined( GL_ANGLE_multi_draw )\n\t#define gl_DrawID _gl_DrawID\n\tuniform int _gl_DrawID;\n\t#endif\n\tuniform highp sampler2D batchingTexture;\n\tuniform highp usampler2D batchingIdTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n\tfloat getIndirectIndex( const in int i ) {\n\t\tint size = textureSize( batchingIdTexture, 0 ).x;\n\t\tint x = i % size;\n\t\tint y = i / size;\n\t\treturn float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n\t}\n#endif\n#ifdef USE_BATCHING_COLOR\n\tuniform sampler2D batchingColorTexture;\n\tvec3 getBatchingColor( const in float i ) {\n\t\tint size = textureSize( batchingColorTexture, 0 ).x;\n\t\tint j = int( i );\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\treturn texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb
vendor: 3,216 bytes, line 2
2;\n\t}\n#endif",batching_vertex:"#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif",begin_vertex:"vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660,  0.0556434,\n\t\t-1.5371385,  1.8760108, -0.2040259,\n\t\t-0.4985314,  0.0415560,  1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
vendor: 11,188 bytes, line 2
2\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );
vendor: 4,976 bytes, line 2
2\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n\t\temissiveColor = sRGBTransferEOTF( emissiveColor );\n\t#endif\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"vec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferEOTF( in vec4 value ) {\n\treturn 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 );\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn 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 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );
vendor: 6,915 bytes, line 2
2\n\t\t\treflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}
vendor: 5,966 bytes, line 2
2\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;
vendor: 4,722 bytes, line 2
2\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"uniform sampler2D dfgLUT;\nstruct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n    float x2 = x * x;\n    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alph
vendor: 3,492 bytes, line 2
2aB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x >
vendor: 23,699 bytes, line 2
2 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transpose( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 uv = vec2( roughness, dotNV );\n\treturn texture2D( dfgLUT, uv ).rg;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nvec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 dfgV = DFGApprox( vec3(0.0, 0.0, 1.0), vec3(sqrt(1.0 - dotNV * dotNV), 0.0, dotNV), material.roughness );\n\tvec2 dfgL = DFGApprox( vec3(0.0, 0.0, 1.0), vec3(sqrt(1.0 - dotNL * dotNL), 0.0, dotNL), material.roughness );\n\tvec3 FssEss_V = material.specularColor * dfgV.x + material.specularF90 * dfgV.y;\n\tvec3 FssEss_L = material.specularColor * dfgL.x + material.specularF90 * dfgL.y;\n\tfloat Ess_V = dfgV.x + dfgV.y;\n\tfloat Ess_L = dfgL.x + dfgL.y;\n\tfloat Ems_V = 1.0 - Ess_V;\n\tfloat Ems_L = 1.0 - Ess_L;\n\tvec3 Favg = material.specularColor + ( 1.0 - material.specularColor ) * 0.047619;\n\tvec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg * Favg + EPSILON );\n\tfloat compensationFactor = Ems_V * Ems_L;\n\tvec3 multiScatter = Fms * compensationFactor;\n\treturn singleScatter + multiScatter;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphinstance_vertex:"#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );
vendor: 4,597 bytes, line 2
2\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 25
vendor: 7,335 bytes, line 2
25.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\tfloat depth = unpackRGBAToDepth( texture2D( depths, uv ) );\n\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\treturn step( depth, compare );\n\t\t#else\n\t\t\treturn step( compare, depth );\n\t\t#endif\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow( sampler2D shadow, vec2 uv, float compare ) {\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\tfloat hard_shadow = step( distribution.x, compare );\n\t\t#else\n\t\t\tfloat hard_shadow = step( compare, distribution.x );\n\t\t#endif\n\t\tif ( hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;
vendor: 11,346 bytes, line 2
2\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\t\n\t\tfloat lightToPositionLength = length( lightToPosition );\n\t\tif ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\t\tdp += shadowBias;\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t\t) * ( 1.0 / 9.0 );\n\t\t\t#else\n\t\t\t\tshadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;
vendor: 2,005 bytes, line 2
2\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);
vendor: 9,105 bytes, line 2
2\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak < StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t#else\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;
vendor: 5,728 bytes, line 2
2\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
vendor: 25,681 bytes, line 2
2\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",depth_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\tfloat fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];\n\t#else\n\t\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;\n\t#endif\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;
vendor: 11,562 bytes, line 2
2\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix[ 3 ];\n\tvec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}"},
2a={common:{diffuse:{value:new i.Ilk(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new i.Vkp}
vendor: 8,487 bytes, line 2
2,alphaMap:{value:null},alphaMapTransform:{value:new i.Vkp},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new i.Vkp}},envmap:{envMap:{value:null},envMapRotation:{value:new i.Vkp},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new i.Vkp}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new i.Vkp}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new i.Vkp},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new i.Vkp},normalScale:{value:new i.FM8(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new i.Vkp},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new i.Vkp}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new i.Vkp}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new i.Vkp}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new i.Ilk(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new i.Ilk(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new i.Vkp},alphaTest:{value:0},uvTransform:{value:new i.Vkp}},sprite:{diffuse:{value:new i.Ilk(16777215)},opacity:{value:1},center:{value:new i.FM8(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new i.Vkp},alphaMap:{value:null},alphaMapTransform:{value:new i.Vkp},alphaTest:{value:0}}},l={basic:{uniforms:(0,i.Rhp)([a.common,a.specularmap,a.envmap,a.aomap,a.lightmap,a.fog]),vertexShader:o.meshbasic_vert,fragmentShader:o.meshbasic_frag},lambert:{uniforms:(0,i.Rhp)([a.common,a.specularmap,a.envmap,a.aomap,a.lightmap,a.emissivemap,a.bumpmap,a.normalmap,a.displacementmap,a.fog,a.lights,{emissive:{value:new i.Ilk(0)}}]),vertexShader:o.meshlambert_vert,fragmentShader:o.meshlambert_frag},phong:{uniforms:(0,i.Rhp)([a.common,a.specularmap,a.envmap,a.aomap,a.lightmap,a.emissivemap,a.bumpmap,a.normalmap,a.displacementmap,a.fog,a.lights,{emissive:{value:new i.Ilk(0)},specular:{value:new i.Ilk(1118481)},shininess:{value:30}}]),vertexShader:o.meshphong_vert,fragmentShader:o.meshphong_frag},standard:{uniforms:(0,i.Rhp)([a.common,a.envmap,a.aomap,a.lightmap,a.emissivemap,a.bumpmap,a.normalmap,a.displacementmap,a.roughnessmap,a.metalnessmap,a.fog,a.lights,{emissive:{value:new i.Ilk(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:o.meshphysical_vert,fragmentShader:o.meshphysical_frag},toon:{uniforms:(0,i.Rhp)([a.common,a.aomap,a.lightmap,a.emissivemap,a.bumpmap,a.normalmap,a.displacementmap,a.gradientmap,a.fog,a.lights,{emissive:{value:new i.Ilk(0)}}]),vertexShader:o.meshtoon_vert,fragmentShader:o.meshtoon_frag},matcap:{uniforms:(0,i.Rhp)([a.common,a.bumpmap,a.normalmap,a.displacementmap,a.fog,{matcap:{value:null}}]),vertexShader:o.meshmatcap_vert,fragmentShader:o.meshmatcap_frag},points:{uniforms:(0,i.Rhp)([a.points,a.fog]),vertexShader:o.points_vert,fragmentShader:o.points_frag},dashed:{uniforms:(0,i.Rhp)([a.common,a.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:o.linedashed_vert,fragmentShader:o.linedashed_frag},depth:{uniforms:(0,i.Rhp)([a.common,a.displacementmap]),vertexShader:o.depth_vert,fragmentShader:o.depth_frag},normal:{uniforms:(0,i.Rhp)([a.common,a.bumpmap,a.normalmap,a.displacementmap,{opacity:{value:1}}]),vertexShader:o.meshnormal_vert,fragmentShader:o.meshnormal_frag},sprite:{uniforms:(0,i.Rhp)([a.sprite,a.fog]),vertexShader:o.sprite_vert,fragmentShader:o.sprite_frag},background:{uniforms:{uvTransform:{value:new i.Vkp},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:o.background_vert,fragmentShader:o.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new i.Vkp}},vertexShader:o.backgroundCube_vert,fragmentShader:o.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:o.cube_vert,fragmentShader:o.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:o.equirect_vert,fragmentShader:o.equirect_frag},distanceRGBA:{uniforms:(0,i.Rhp)([a.common,a.displacementmap,{referencePosition:{value:new i.Pa4},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:o.distanceRGBA_vert,fragmentShader:o.distanceRGBA_frag},shadow:{uniforms:(0,i.Rhp)([a.lights,a.fog,{color:{value:new i.Ilk(0)},opacity:{value:1}}]),vertexShader:o.shadow_vert,fragmentShader:o.shadow_frag}};l.physical={uniforms:(0,i.Rhp)([l.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new i.Vkp},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new i.Vkp},clearcoatNormalScale:{value:new i.FM8(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new i.Vkp},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new i.Vkp},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new i.Vkp},sheen:{value:0},sheenColor:{value:new i.Ilk(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new i.Vkp},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new i.Vkp},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new i.Vkp},transmissionSamplerSize:{value:new i.FM8},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new i.Vkp},attenuationDistance:{value:0},attenuationColor:{value:new i.Ilk(0)},specularColor:{value:new i.Ilk(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new i.Vkp},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new i.Vkp},anisotropyVector:{value:new i.FM8},anisotropyMap:{value:null},anisotropyMapTransform:{value:new i.Vkp}}]),vertexShader:o.meshphysical_vert,fragmentShader:o.meshphysical_frag};const h={r:0,b:0,g:0},c=new i.USm,u=new i.yGw;function d(t,e,n,r,s,o,a){const d=new i.Ilk(0);let p,f,A=!0===o?0:1,g=null,m=0,_=null;function v(t){let i=!0===t.isScene?t.background:null;if(i&&i.isTexture){i=(t.backgroundBlurriness>0?n:e).get(i)}return i}function y(e,n){e.getRGB(h,(0,i.oDz)(t)),r.buffers.color.setClear(h.r,h.g,h.b,n,a)}return{getClearColor:function(){return d},setClearColor:function(t,e=1){d.set(t),A=e,y(d,A)},getClearAlpha:function(){return A},setClearAlpha:function(t){A=t,y(d,A)},render:function(e){let n=!1;const i=v(e);null===i?y(d,A):i&&i.isColor&&(y(i,1),n=!0);const s=t.xr.getEnvironmentBlendMode();"additive"===s?r.buffers.color.setClear(0,0,0,1,a):"alpha-blend"===s&&r.buffers.color.setClear(0,0,0,0,a),(t.autoClear||n)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))},addToRenderList:function(e,n){const r=v(n);
vendor: 7,211 bytes, line 2
2r&&(r.isCubeTexture||r.mapping===i.g8_)?(void 0===f&&(f=new i.Kj0(new i.DvJ(1,1,1),new i.jyz({name:"BackgroundCubeMaterial",uniforms:(0,i.dwf)(l.backgroundCube.uniforms),vertexShader:l.backgroundCube.vertexShader,fragmentShader:l.backgroundCube.fragmentShader,side:i._Li,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),f.geometry.deleteAttribute("normal"),f.geometry.deleteAttribute("uv"),f.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(f.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(f)),c.copy(n.backgroundRotation),c.x*=-1,c.y*=-1,c.z*=-1,r.isCubeTexture&&!1===r.isRenderTargetTexture&&(c.y*=-1,c.z*=-1),f.material.uniforms.envMap.value=r,f.material.uniforms.flipEnvMap.value=r.isCubeTexture&&!1===r.isRenderTargetTexture?-1:1,f.material.uniforms.backgroundBlurriness.value=n.backgroundBlurriness,f.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,f.material.uniforms.backgroundRotation.value.setFromMatrix4(u.makeRotationFromEuler(c)),f.material.toneMapped=i.epp.getTransfer(r.colorSpace)!==i.j17,g===r&&m===r.version&&_===t.toneMapping||(f.material.needsUpdate=!0,g=r,m=r.version,_=t.toneMapping),f.layers.enableAll(),e.unshift(f,f.geometry,f.material,0,0,null)):r&&r.isTexture&&(void 0===p&&(p=new i.Kj0(new i._12(2,2),new i.jyz({name:"BackgroundMaterial",uniforms:(0,i.dwf)(l.background.uniforms),vertexShader:l.background.vertexShader,fragmentShader:l.background.fragmentShader,side:i.Wl3,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),p.geometry.deleteAttribute("normal"),Object.defineProperty(p.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(p)),p.material.uniforms.t2D.value=r,p.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,p.material.toneMapped=i.epp.getTransfer(r.colorSpace)!==i.j17,!0===r.matrixAutoUpdate&&r.updateMatrix(),p.material.uniforms.uvTransform.value.copy(r.matrix),g===r&&m===r.version&&_===t.toneMapping||(p.material.needsUpdate=!0,g=r,m=r.version,_=t.toneMapping),p.layers.enableAll(),e.unshift(p,p.geometry,p.material,0,0,null))},dispose:function(){void 0!==f&&(f.geometry.dispose(),f.material.dispose(),f=void 0),void 0!==p&&(p.geometry.dispose(),p.material.dispose(),p=void 0)}}}function p(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),r={},s=c(null);let o=s,a=!1;function l(e){return t.bindVertexArray(e)}function h(e){return t.deleteVertexArray(e)}function c(t){const e=[],i=[],r=[];for(let t=0;t<n;t++)e[t]=0,i[t]=0,r[t]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:e,enabledAttributes:i,attributeDivisors:r,object:t,attributes:{},index:null}}function u(){const t=o.newAttributes;for(let e=0,n=t.length;e<n;e++)t[e]=0}function d(t){p(t,0)}function p(e,n){const i=o.newAttributes,r=o.enabledAttributes,s=o.attributeDivisors;i[e]=1,0===r[e]&&(t.enableVertexAttribArray(e),r[e]=1),s[e]!==n&&(t.vertexAttribDivisor(e,n),s[e]=n)}function f(){const e=o.newAttributes,n=o.enabledAttributes;for(let i=0,r=n.length;i<r;i++)n[i]!==e[i]&&(t.disableVertexAttribArray(i),n[i]=0)}function A(e,n,i,r,s,o,a){!0===a?t.vertexAttribIPointer(e,n,i,s,o):t.vertexAttribPointer(e,n,i,r,s,o)}function g(){m(),a=!0,o!==s&&(o=s,l(o.object))}function m(){s.geometry=null,s.program=null,s.wireframe=!1}return{setup:function(n,s,h,g,m){let _=!1;const v=function(e,n,i){const s=!0===i.wireframe;let o=r[e.id];void 0===o&&(o={},r[e.id]=o);let a=o[n.id];void 0===a&&(a={},o[n.id]=a);let l=a[s];void 0===l&&(l=c(t.createVertexArray()),a[s]=l);return l}(g,h,s);o!==v&&(o=v,l(o.object)),_=function(t,e,n,i){const r=o.attributes,s=e.attributes;let a=0;const l=n.getAttributes();for(const e in l){if(l[e].location>=0){const n=r[e];let i=s[e];if(void 0===i&&("instanceMatrix"===e&&t.instanceMatrix&&(i=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(i=t.instanceColor)),void 0===n)return!0;if(n.attribute!==i)return!0;if(i&&n.data!==i.data)return!0;a++}}return o.attributesNum!==a||o.index!==i}(n,g,h,m),_&&function(t,e,n,i){const r={},s=e.attributes;let a=0;const l=n.getAttributes();for(const e in l){if(l[e].location>=0){let n=s[e];void 0===n&&("instanceMatrix"===e&&t.instanceMatrix&&(n=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(n=t.instanceColor));const i={};i.attribute=n,n&&n.data&&(i.data=n.data),r[e]=i,a++}}o.attributes=r,o.attributesNum=a,o.index=i}(n,g,h,m),null!==m&&e.update(m,t.ELEMENT_ARRAY_BUFFER),(_||a)&&(a=!1,function(n,r,s,o){u();const a=o.attributes,l=s.getAttributes(),h=r.defaultAttributeValues;for(const r in l){const s=l[r];if(s.location>=0){let l=a[r];if(void 0===l&&("instanceMatrix"===r&&n.instanceMatrix&&(l=n.instanceMatrix),"instanceColor"===r&&n.instanceColor&&(l=n.instanceColor)),void 0!==l){const r=l.normalized,a=l.itemSize,h=e.get(l);if(void 0===h)continue;const c=h.buffer,u=h.type,f=h.bytesPerElement,g=u===t.INT||u===t.UNSIGNED_INT||l.gpuType===i.Kz5;if(l.isInterleavedBufferAttribute){const e=l.data,i=e.stride,h=l.offset;if(e.isInstancedInterleavedBuffer){for(let t=0;t<s.locationSize;t++)p(s.location+t,e.meshPerAttribute);!0!==n.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=e.meshPerAttribute*e.count)}else for(let t=0;t<s.locationSize;t++)d(s.location+t);t.bindBuffer(t.ARRAY_BUFFER,c);for(let t=0;t<s.locationSize;t++)A(s.location+t,a/s.locationSize,u,r,i*f,(h+a/s.locationSize*t)*f,g)}else{if(l.isInstancedBufferAttribute){for(let t=0;t<s.locationSize;t++)p(s.location+t,l.meshPerAttribute);!0!==n.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=l.meshPerAttribute*l.count)}else for(let t=0;t<s.locationSize;t++)d(s.location+t);t.bindBuffer(t.ARRAY_BUFFER,c);for(let t=0;t<s.locationSize;t++)A(s.location+t,a/s.locationSize,u,r,a*f,a/s.locationSize*t*f,g)}}else if(void 0!==h){const e=h[r];if(void 0!==e)switch(e.length){case 2:t.vertexAttrib2fv(s.location,e);break;case 3:t.vertexAttrib3fv(s.location,e);break;case 4:t.vertexAttrib4fv(s.location,e);break;default:t.vertexAttrib1fv(s.location,e)}}}}f()}(n,s,h,g),null!==m&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(m).buffer))},reset:g,resetDefaultState:m,dispose:function(){g();for(const t in r){const e=r[t];for(const t in e){const n=e[t];for(const t in n)h(n[t].object),delete n[t];delete e[t]}delete r[t]}},releaseStatesOfGeometry:function(t){if(void 0===r[t.id])return;const e=r[t.id];for(const t in e){const n=e[t];for(const t in n)h(n[t].object),delete n[t];delete e[t]}delete r[t.id]},releaseStatesOfProgram:function(t){for(const e in r){const n=r[e];if(void 0===n[t.id])continue;const i=n[t.id];for(const t in i)h(i[t].object),delete i[t];delete n[t.id]}},initAttributes:u,enableAttribute:d,disableUnusedAttributes:f}}function f(t,e,n){let i;function r(e,r,s){0!==s&&(t.drawArraysInstanced(i,e,r,s),n.update(r,i,s))}this.setMode=function(t){i=t},this.render=function(e,r){t.drawArrays(i,e,r),n.update(r,i,1)},this.renderInstances=r,this.renderMultiDraw=function(t,r,s){if(0===s)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(i,t,0,r,0,s);let o=0;for(let t=0;t<s;t++)o+=r[t];n.update(o,i,1)},this.renderMultiDrawInstances=function(t,s,o,a){if(0===o)return;const l=e.get("WEBGL_multi_draw");if(null===l)for(let e=0;e<t.length;e++)r(t[e],s[e],a[e]);
vendor: 10,804 bytes, line 2
2else{l.multiDrawArraysInstancedWEBGL(i,t,0,s,0,a,0,o);let e=0;for(let t=0;t<o;t++)e+=s[t]*a[t];n.update(e,i,1)}}}function A(t,e,n,r){let s;function o(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let a=void 0!==n.precision?n.precision:"highp";const l=o(a);l!==a&&((0,i.ZK6)("WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const h=!0===n.logarithmicDepthBuffer,c=!0===n.reversedDepthBuffer&&e.has("EXT_clip_control"),u=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),d=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function(){if(void 0!==s)return s;if(!0===e.has("EXT_texture_filter_anisotropic")){const n=e.get("EXT_texture_filter_anisotropic");s=t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else s=0;return s},getMaxPrecision:o,textureFormatReadable:function(e){return e===i.wk1||r.convert(e)===t.getParameter(t.IMPLEMENTATION_COLOR_READ_FORMAT)},textureTypeReadable:function(n){const s=n===i.cLu&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(n!==i.ywz&&r.convert(n)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_TYPE)&&n!==i.VzW&&!s)},precision:a,logarithmicDepthBuffer:h,reversedDepthBuffer:c,maxTextures:u,maxVertexTextures:d,maxTextureSize:t.getParameter(t.MAX_TEXTURE_SIZE),maxCubemapSize:t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),maxAttributes:t.getParameter(t.MAX_VERTEX_ATTRIBS),maxVertexUniforms:t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),maxVaryings:t.getParameter(t.MAX_VARYING_VECTORS),maxFragmentUniforms:t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),vertexTextures:d>0,maxSamples:t.getParameter(t.MAX_SAMPLES)}}function g(t){const e=this;let n=null,r=0,s=!1,o=!1;const a=new i.JOQ,l=new i.Vkp,h={value:null,needsUpdate:!1};function c(t,n,i,r){const s=null!==t?t.length:0;let o=null;if(0!==s){if(o=h.value,!0!==r||null===o){const e=i+4*s,r=n.matrixWorldInverse;l.getNormalMatrix(r),(null===o||o.length<e)&&(o=new Float32Array(e));for(let e=0,n=i;e!==s;++e,n+=4)a.copy(t[e]).applyMatrix4(r,l),a.normal.toArray(o,n),o[n+3]=a.constant}h.value=o,h.needsUpdate=!0}return e.numPlanes=s,e.numIntersection=0,o}this.uniform=h,this.numPlanes=0,this.numIntersection=0,this.init=function(t,e){const n=0!==t.length||e||0!==r||s;return s=e,r=t.length,n},this.beginShadows=function(){o=!0,c(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(t,e){n=c(t,e,0)},this.setState=function(i,a,l){const u=i.clippingPlanes,d=i.clipIntersection,p=i.clipShadows,f=t.get(i);if(!s||null===u||0===u.length||o&&!p)o?c(null):function(){h.value!==n&&(h.value=n,h.needsUpdate=r>0);e.numPlanes=r,e.numIntersection=0}();else{const t=o?0:r,e=4*t;let i=f.clippingState||null;h.value=i,i=c(u,a,e,l);for(let t=0;t!==e;++t)i[t]=n[t];f.clippingState=i,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=t}}}function m(t){let e=new WeakMap;function n(t,e){return e===i.dSO?t.mapping=i.fY$:e===i.Bf4&&(t.mapping=i.vxC),t}function r(t){const n=t.target;n.removeEventListener("dispose",r);const i=e.get(n);void 0!==i&&(e.delete(n),i.dispose())}return{get:function(s){if(s&&s.isTexture){const o=s.mapping;if(o===i.dSO||o===i.Bf4){if(e.has(s)){return n(e.get(s).texture,s.mapping)}{const o=s.image;if(o&&o.height>0){const a=new i.oAp(o.height);return a.fromEquirectangularTexture(t,s),e.set(s,a),s.addEventListener("dispose",r),n(a.texture,s.mapping)}return null}}}return s},dispose:function(){e=new WeakMap}}}const _=[.125,.215,.35,.446,.526,.582],v=20,y=new i.iKG,E=new i.Ilk;let x=null,C=0,b=0,w=!1;const S=new i.Pa4;class I{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(t,e=0,n=.1,i=100,r={}){const{size:s=256,position:o=S}=r;x=this._renderer.getRenderTarget(),C=this._renderer.getActiveCubeFace(),b=this._renderer.getActiveMipmapLevel(),w=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(s);const a=this._allocateTargets();return a.depthBuffer=!0,this._sceneToCubeUV(t,n,i,a,o),e>0&&this._blur(a,0,0,e),this._applyPMREM(a),this._cleanup(a),a}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=R(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=B(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose(),null!==this._backgroundBox&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._ggxMaterial&&this._ggxMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let t=0;t<this._lodMeshes.length;t++)this._lodMeshes[t].geometry.dispose()}_cleanup(t){this._renderer.setRenderTarget(x,C,b),this._renderer.xr.enabled=w,t.scissorTest=!1,T(t,0,0,t.width,t.height)}_fromTexture(t,e){t.mapping===i.fY$||t.mapping===i.vxC?this._setSize(0===t.image.length?16:t.image[0].width||t.image[0].image.width):this._setSize(t.image.width/4),x=this._renderer.getRenderTarget(),C=this._renderer.getActiveCubeFace(),b=this._renderer.getActiveMipmapLevel(),w=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=e||this._allocateTargets();return this._textureToCubeUV(t,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const t=3*Math.max(this._cubeSize,112),e=4*this._cubeSize,n={magFilter:i.wem,minFilter:i.wem,generateMipmaps:!1,type:i.cLu,format:i.wk1,colorSpace:i.GUF,depthBuffer:!1},r=M(t,e,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==t||this._pingPongRenderTarget.height!==e){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=M(t,e,n);const{_lodMax:r}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=function(t){const e=[],n=[],r=[];let s=t;const o=t-4+1+_.length;for(let a=0;a<o;a++){const o=Math.pow(2,s);e.push(o);let l=1/o;a>t-4?l=_[a-t+4-1]:0===a&&(l=0),n.push(l);const h=1/(o-2),c=-h,u=1+h,d=[c,c,u,c,u,u,c,c,u,u,c,u],p=6,f=6,A=3,g=2,m=1,v=new Float32Array(A*f*p),y=new Float32Array(g*f*p),E=new Float32Array(m*f*p);for(let t=0;t<p;t++){const e=t%3*2/3-1,n=t>2?0:-1,i=[e,n,0,e+2/3,n,0,e+2/3,n+1,0,e,n,0,e+2/3,n+1,0,e,n+1,0];v.set(i,A*f*t),y.set(d,g*f*t);const r=[t,t,t,t,t,t];E.set(r,m*f*t)}const x=new i.u9r;x.setAttribute("position",new i.TlE(v,A)),x.setAttribute("uv",new i.TlE(y,g)),x.setAttribute("faceIndex",new i.TlE(E,m)),r.push(new i.Kj0(x,null)),s>4&&s--}return{lodMeshes:r,sizeLods:e,sigmas:n}}(r)),this._blurMaterial=function(t,e,n){const r=new Float32Array(v),s=new i.Pa4(0,1,0),o=new i.jyz({name:"SphericalGaussianBlur",defines:{n:v,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:P(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:i.jFi,depthTest:!1,depthWrite:!1});return o}(r,t,e),this._ggxMaterial=function(t,e,n){const r=new i.jyz({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:256,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:P(),fragmentShader:'\n\n\t\t\tprecision highp float;\n\t\t\tprecision highp int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform float roughness;\n\t\t\tuniform float mipInt;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\t#define PI 3.14159265359\n\n\t\t\t// Van der Corput radical inverse\n\t\t\tfloat radicalInverse_VdC(uint bits) {\n\t\t\t\tbits = (bits << 16u) | (bits >> 16u);\n\t\t\t\tbits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);\n\t\t\t\tbits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);\n\t\t\t\tbits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);\n\t\t\t\tbits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);\n\t\t\t\treturn float(bits) * 2.3283064365386963e-10; // / 0x100000000\n\t\t\t}\n\n\t\t\t// Hammersley sequence\n\t\t\tvec2 hammersley(uint i, uint N) {\n\t\t\t\treturn vec2(float(i) / float(N), radicalInverse_VdC(i));\n\t\t\t}\n\n\t\t\t// GGX VNDF importance sampling (Eric Heitz 2018)\n\t\t\t// "Sampling the GGX Distribution of Visible Normals"\n\t\t\t// https://jcgt.org/published/0007/04/01/\n\t\t\tvec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) {\
2n\t\t\t\tfloat alpha = roughness * roughness;\n\n\t\t\t\t// Section 3.2: Transform view direction to hemisphere configuration\n\t\t\t\tvec3 Vh = normalize(vec3(alpha * V.x, alpha * V.y, V.z));\n\n\t\t\t\t// Section 4.1: Orthonormal basis\n\t\t\t\tfloat lensq = Vh.x * Vh.x + Vh.y * Vh.y;\n\t\t\t\tvec3 T1 = lensq > 0.0 ? vec3(-Vh.y, Vh.x, 0.0) / sqrt(lensq) : vec3(1.0, 0.0, 0.0);\n\t\t\t\tvec3 T2 = cross(Vh, T1);\n\n\t\t\t\t// Section 4.2: Parameterization of projected area\n\t\t\t\tfloat r = sqrt(Xi.x);\n\t\t\t\tfloat phi = 2.0 * PI * Xi.y;\n\t\t\t\tfloat t1 = r * cos(phi);\n\t\t\t\tfloat t2 = r * sin(phi);\n\t\t\t\tfloat s = 0.5 * (1.0 + Vh.z);\n\t\t\t\tt2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2;\n\n\t\t\t\t// Section 4.3: Reprojection onto hemisphere\n\t\t\t\tvec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * Vh;\n\n\t\t\t\t// Section 3.4: Transform back to ellipsoid configuration\n\t\t\t\treturn normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z)));\n\t\t\t}\n\n\t\t\tvoid main() {\n\t\t\t\tvec3 N = normalize(vOutputDirection);\n\t\t\t\tvec3 V = N; // Assume view direction equals normal for pre-filtering\n\n\t\t\t\tvec3 prefilteredColor = vec3(0.0);\n\t\t\t\tfloat totalWeight = 0.0;\n\n\t\t\t\t// For very low roughness, just sample the environment directly\n\t\t\t\tif (roughness < 0.001) {\n\t\t\t\t\tgl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Tangent space basis for VNDF sampling\n\t\t\t\tvec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\n\t\t\t\tvec3 tangent = normalize(cross(up, N));\n\t\t\t\tvec3 bitangent = cross(N, tangent);\n\n\t\t\t\tfor(uint i = 0u; i < uint(GGX_SAMPLES); i++) {\n\t\t\t\t\tvec2 Xi = hammersley(i, uint(GGX_SAMPLES));\n\n\t\t\t\t\t// For PMREM, V = N, so in tangent space V is always (0, 0, 1)\n\t\t\t\t\tvec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness);\n\n\t\t\t\t\t// Transform H back to world space\n\t\t\t\t\tvec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z);\n\t\t\t\t\tvec3 L = normalize(2.0 * dot(V, H) * H - V);\n\n\t\t\t\t\tfloat NdotL = max(dot(N, L), 0.0);\n\n\t\t\t\t\tif(NdotL > 0.0) {\n\t\t\t\t\t\t// Sample environment at fixed mip level\n\t\t\t\t\t\t// VNDF importance sampling handles the distribution filtering\n\t\t\t\t\t\tvec3 sampleColor = bilinearCubeUV(envMap, L, mipInt);\n\n\t\t\t\t\t\t// Weight by NdotL for the split-sum approximation\n\t\t\t\t\t\t// VNDF PDF naturally accounts for the visible microfacet distribution\n\t\t\t\t\t\tprefilteredColor += sampleColor * NdotL;\n\t\t\t\t\t\ttotalWeight += NdotL;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (totalWeight > 0.0) {\n\t\t\t\t\tprefilteredColor = prefilteredColor / totalWeight;\n\t\t\t\t}\n\n\t\t\t\tgl_FragColor = vec4(prefilteredColor, 1.0);\n\t\t\t}\n\t\t',blending:i.jFi,depthTest:!1,depthWrite:!1});return r}(r,t,e)}return r}_compileMaterial(t){const e=new i.Kj0(new i.u9r,t);this._renderer.compile(e,y)}_sceneToCubeUV(t,e,n,r,s){const o=new i.cPb(90,1,e,n),a=[1,-1,1,1,1,1],l=[1,1,1,-1,-1,-1],h=this._renderer,c=h.autoClear,u=h.toneMapping;h.getClearColor(E),h.toneMapping=i.uL9,h.autoClear=!1;h.state.buffers.depth.getReversed()&&(h.setRenderTarget(r),h.clearDepth(),h.setRenderTarget(null)),null===this._backgroundBox&&(this._backgroundBox=new i.Kj0(new i.DvJ,new i.vBJ({name:"PMREM.Backgroun
2d",side:i._Li,depthWrite:!1,depthTest:!1})));const d=this._backgroundBox,p=d.material;let f=!1;const A=t.background;A?A.isColor&&(p.color.copy(A),t.background=null,f=!0):(p.color.copy(E),f=!0);for(let e=0;e<6;e++){const n=e%3;0===n?(o.up.set(0,a[e],0),o.position.set(s.x,s.y,s.z),o.lookAt(s.x+l[e],s.y,s.z)):1===n?(o.up.set(0,0,a[e]),o.position.set(s.x,s.y,s.z),o.lookAt(s.x,s.y+l[e],s.z)):(o.up.set(0,a[e],0),o.position.set(s.x,s.y,s.z),o.lookAt(s.x,s.y,s.z+l[e]));const i=this._cubeSize;T(r,n*i,e>2?i:0,i,i),h.setRenderTarget(r),f&&h.render(d,o),h.render(t,o)}h.toneMapping=u,h.autoClear=c,t.background=A}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===i.fY$||t.mapping===i.vxC;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=R()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=B());const s=r?this._cubemapMaterial:this._equirectMaterial,o=this._lodMeshes[0];o.material=s;s.uniforms.envMap.value=t;const a=this._cubeSize;T(e,0,0,3*a,2*a),n.setRenderTarget(e),n.render(o,y)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const i=this._lodMeshes.length;for(let e=1;e<i;e++)this._applyGGXFilter(t,e-1,e);e.autoClear=n}_applyGGXFilter(t,e,n){const i=this._renderer,r=this._pingPongRenderTarget,s=this._ggxMaterial,o=this._lodMeshes[n];o.material=s;const a=s.uniforms,l=n/(this._lodMeshes.length-1),h=e/(this._lodMeshes.length-1),c=Math.sqrt(l*l-h*h)*(.05+.95*l),{_lodMax:u}=this,d=this._sizeLods[n],p=3*d*(n>u-4?n-u+4:0),f=4*(this._cubeSize-d);a.envMap.value=t.texture,a.roughness.value=c,a.mipInt.value=u-e,T(r,p,f,3*d,2*d),i.setRenderTarget(r),i.render(o,y),a.envMap.value=r.texture,a.roughness.value=0,a.mipInt.value=u-n,T(t,p,f,3*d,2*d),i.setRenderTarget(t),i.render(o,y)}_blur(t,e,n,i,r){const s=this._pingPongRenderTarget;this._halfBlur(t,s,e,n,i,"latitudinal",r),this._halfBlur(s,t,n,n,i,"longitudinal",r)}_halfBlur(t,e,n,r,s,o,a){const l=this._renderer,h=this._blurMaterial;"latitudinal"!==o&&"longitudinal"!==o&&(0,i.vUy)("blur direction must be either latitudinal or longitudinal!");const c=this._lodMeshes[r];c.material=h;const u=h.uniforms,d=this._sizeLods[n]-1,p=isFinite(s)?Math.PI/(2*d):2*Math.PI/39,f=s/p,A=isFinite(s)?1+Math.floor(3*f):v;A>v&&(0,i.ZK6)(`sigmaRadians, ${s}, is too large and will clip, as it requested ${A} samples when the maximum is set to 20`);const g=[];let m=0;for(let t=0;t<v;++t){const e=t/f,n=Math.exp(-e*e/2);g.push(n),0===t?m+=n:t<A&&(m+=2*n)}for(let t=0;t<g.length;t++)g[t]=g[t]/m;u.envMap.value=t.texture,u.samples.value=A,u.weights.value=g,u.latitudinal.value="latitudinal"===o,a&&(u.poleAxis.value=a);const{_lodMax:_}=this;u.dTheta.value=p,u.mipInt.value=_-n;const E=this._sizeLods[r];T(e,3*E*(r>_-4?r-_+4:0),4*(this._cubeSize-E),3*E,2*E),l.setRenderTarget(e),l.render(c,y)}}function M(t,e,n){const r=new i.dd2(t,e,n);return r.texture.mapping=i.g8_,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function T(t,e,n,i,r){t.viewport.set(e,n,i,r),t.scissor.set(e,n,i,r)}function B(){return new i.jyz({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:P(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:i.jFi,depthTest:!1,depthWrite:!1})}function R(){return new i.jyz({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:P(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:i.jFi,depthTest:!1,depthWrite:!1})}function P(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function D(t){let e=new WeakMap,n=null;function r(t){const n=t.target;n.removeEventListener("dispose",r);const i=e.get(n);void 0!==i&&(e.delete(n),i.dispose())}return{get:function(s){if(s&&s.isTexture){const o=s.mapping,a=o===i.dSO||o===i.Bf4,l=o===i.fY$||o===i.vxC;if(a||l){let i=e.get(s);const o=void 0!==i?i.texture.pmremVersion:0;if(s.isRenderTargetTexture&&s.pmremVersion!==o)return null===n&&(n=new I(t)),i=a?n.fromEquirectangular(s,i):n.fromCubemap(s,i),i.texture.pmremVersion=s.pmremVersion,e.set(s,i),i.texture;if(void 0!==i)return i.texture;{const o=s.image;return a&&o&&o.height>0||l&&o&&function(t){let e=0;const n=6;for(let i=0;i<n;i++)void 0!==t[i]&&e++;return e===n}(o)?(null===n&&(n=new I(t)),i=a?n.fromEquirectangular(s):n.fromCubemap(s),i.texture.pmremVersion=s.pmremVersion,e.set(s,i),s.addEventListener("dispose",r),i.texture):null}}}return s},dispose:function(){e=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function L(t){const e={};
vendor: 5,108 bytes, line 2
2function n(n){if(void 0!==e[n])return e[n];const i=t.getExtension(n);return e[n]=i,i}return{has:function(t){return null!==n(t)},init:function(){n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance"),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture"),n("WEBGL_render_shared_exponent")},get:function(t){const e=n(t);return null===e&&(0,i.O4K)("WebGLRenderer: "+t+" extension not supported."),e}}}function U(t,e,n,r){const s={},o=new WeakMap;function a(t){const i=t.target;null!==i.index&&e.remove(i.index);for(const t in i.attributes)e.remove(i.attributes[t]);i.removeEventListener("dispose",a),delete s[i.id];const l=o.get(i);l&&(e.remove(l),o.delete(i)),r.releaseStatesOfGeometry(i),!0===i.isInstancedBufferGeometry&&delete i._maxInstanceCount,n.memory.geometries--}function l(t){const n=[],r=t.index,s=t.attributes.position;let a=0;if(null!==r){const t=r.array;a=r.version;for(let e=0,i=t.length;e<i;e+=3){const i=t[e+0],r=t[e+1],s=t[e+2];n.push(i,r,r,s,s,i)}}else{if(void 0===s)return;{const t=s.array;a=s.version;for(let e=0,i=t.length/3-1;e<i;e+=3){const t=e+0,i=e+1,r=e+2;n.push(t,i,i,r,r,t)}}}const l=new((0,i.H7L)(n)?i.lCJ:i.qlB)(n,1);l.version=a;const h=o.get(t);h&&e.remove(h),o.set(t,l)}return{get:function(t,e){return!0===s[e.id]||(e.addEventListener("dispose",a),s[e.id]=!0,n.memory.geometries++),e},update:function(n){const i=n.attributes;for(const n in i)e.update(i[n],t.ARRAY_BUFFER)},getWireframeAttribute:function(t){const e=o.get(t);if(e){const n=t.index;null!==n&&e.version<n.version&&l(t)}else l(t);return o.get(t)}}}function N(t,e,n){let i,r,s;function o(e,o,a){0!==a&&(t.drawElementsInstanced(i,o,r,e*s,a),n.update(o,i,a))}this.setMode=function(t){i=t},this.setIndex=function(t){r=t.type,s=t.bytesPerElement},this.render=function(e,o){t.drawElements(i,o,r,e*s),n.update(o,i,1)},this.renderInstances=o,this.renderMultiDraw=function(t,s,o){if(0===o)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(i,s,0,r,t,0,o);let a=0;for(let t=0;t<o;t++)a+=s[t];n.update(a,i,1)},this.renderMultiDrawInstances=function(t,a,l,h){if(0===l)return;const c=e.get("WEBGL_multi_draw");if(null===c)for(let e=0;e<t.length;e++)o(t[e]/s,a[e],h[e]);else{c.multiDrawElementsInstancedWEBGL(i,a,0,r,t,0,h,0,l);let e=0;for(let t=0;t<l;t++)e+=a[t]*h[t];n.update(e,i,1)}}}function O(t){const 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.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,s){switch(e.calls++,r){case t.TRIANGLES:e.triangles+=s*(n/3);break;case t.LINES:e.lines+=s*(n/2);break;case t.LINE_STRIP:e.lines+=s*(n-1);break;case t.LINE_LOOP:e.lines+=s*n;break;case t.POINTS:e.points+=s*n;break;default:(0,i.vUy)("WebGLInfo: Unknown draw mode:",r)}}}}function F(t,e,n){const r=new WeakMap,s=new i.Ltg;return{update:function(o,a,l){const h=o.morphTargetInfluences,c=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,u=void 0!==c?c.length:0;let d=r.get(a);if(void 0===d||d.count!==u){void 0!==d&&d.texture.dispose();const p=void 0!==a.morphAttributes.position,f=void 0!==a.morphAttributes.normal,A=void 0!==a.morphAttributes.color,g=a.morphAttributes.position||[],m=a.morphAttributes.normal||[],_=a.morphAttributes.color||[];let v=0;!0===p&&(v=1),!0===f&&(v=2),!0===A&&(v=3);let y=a.attributes.position.count*v,E=1;y>e.maxTextureSize&&(E=Math.ceil(y/e.maxTextureSize),y=e.maxTextureSize);const x=new Float32Array(y*E*4*u),C=new i.p3g(x,y,E,u);C.type=i.VzW,C.needsUpdate=!0;const b=4*v;for(let S=0;S<u;S++){const I=g[S],M=m[S],T=_[S],B=y*E*4*S;for(let R=0;R<I.count;R++){const P=R*b;!0===p&&(s.fromBufferAttribute(I,R),x[B+P+0]=s.x,x[B+P+1]=s.y,x[B+P+2]=s.z,x[B+P+3]=0),!0===f&&(s.fromBufferAttribute(M,R),x[B+P+4]=s.x,x[B+P+5]=s.y,x[B+P+6]=s.z,x[B+P+7]=0),!0===A&&(s.fromBufferAttribute(T,R),x[B+P+8]=s.x,x[B+P+9]=s.y,x[B+P+10]=s.z,x[B+P+11]=4===T.itemSize?s.w:1)}}function w(){C.dispose(),r.delete(a),a.removeEventListener("dispose",w)}d={count:u,texture:C,size:new i.FM8(y,E)},r.set(a,d),a.addEventListener("dispose",w)}if(!0===o.isInstancedMesh&&null!==o.morphTexture)l.getUniforms().setValue(t,"morphTexture",o.morphTexture,n);else{let D=0;for(let U=0;U<h.length;U++)D+=h[U];const L=a.morphTargetsRelative?1:1-D;l.getUniforms().setValue(t,"morphTargetBaseInfluence",L),l.getUniforms().setValue(t,"morphTargetInfluences",h)}l.getUniforms().setValue(t,"morphTargetsTexture",d.texture,n),l.getUniforms().setValue(t,"morphTargetsTextureSize",d.size)}}}function k(t,e,n,i){let r=new WeakMap;function s(t){const e=t.target;e.removeEventListener("dispose",s),n.remove(e.instanceMatrix),null!==e.instanceColor&&n.remove(e.instanceColor)}return{update:function(o){const a=i.render.frame,l=o.geometry,h=e.get(o,l);if(r.get(h)!==a&&(e.update(h),r.set(h,a)),o.isInstancedMesh&&(!1===o.hasEventListener("dispose",s)&&o.addEventListener("dispose",s),r.get(o)!==a&&(n.update(o.instanceMatrix,t.ARRAY_BUFFER),null!==o.instanceColor&&n.update(o.instanceColor,t.ARRAY_BUFFER),r.set(o,a))),o.isSkinnedMesh){const t=o.skeleton;
vendor: 8,696 bytes, line 2
2r.get(t)!==a&&(t.update(),r.set(t,a))}return h},dispose:function(){r=new WeakMap}}}const Q=new i.xEZ,z=new i.$YQ(1,1),G=new i.p3g,H=new i.JUT,V=new i.BtG,j=[],W=[],q=new Float32Array(16),X=new Float32Array(9),Y=new Float32Array(4);function K(t,e,n){const i=t[0];if(i<=0||i>0)return t;const r=e*n;let s=j[r];if(void 0===s&&(s=new Float32Array(r),j[r]=s),0!==e){i.toArray(s,0);for(let i=1,r=0;i!==e;++i)r+=n,t[i].toArray(s,r)}return s}function Z(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n<i;n++)if(t[n]!==e[n])return!1;return!0}function J(t,e){for(let n=0,i=e.length;n<i;n++)t[n]=e[n]}function $(t,e){let n=W[e];void 0===n&&(n=new Int32Array(e),W[e]=n);for(let i=0;i!==e;++i)n[i]=t.allocateTextureUnit();return n}function tt(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function et(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y||(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Z(n,e))return;t.uniform2fv(this.addr,e),J(n,e)}}function nt(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(void 0!==e.r)n[0]===e.r&&n[1]===e.g&&n[2]===e.b||(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(Z(n,e))return;t.uniform3fv(this.addr,e),J(n,e)}}function it(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Z(n,e))return;t.uniform4fv(this.addr,e),J(n,e)}}function rt(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(Z(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),J(n,e)}else{if(Z(n,i))return;Y.set(i),t.uniformMatrix2fv(this.addr,!1,Y),J(n,i)}}function st(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(Z(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),J(n,e)}else{if(Z(n,i))return;X.set(i),t.uniformMatrix3fv(this.addr,!1,X),J(n,i)}}function ot(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(Z(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),J(n,e)}else{if(Z(n,i))return;q.set(i),t.uniformMatrix4fv(this.addr,!1,q),J(n,i)}}function at(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function lt(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y||(t.uniform2i(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Z(n,e))return;t.uniform2iv(this.addr,e),J(n,e)}}function ht(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3i(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(Z(n,e))return;t.uniform3iv(this.addr,e),J(n,e)}}function ct(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4i(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Z(n,e))return;t.uniform4iv(this.addr,e),J(n,e)}}function ut(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function dt(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y||(t.uniform2ui(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Z(n,e))return;t.uniform2uiv(this.addr,e),J(n,e)}}function pt(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3ui(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(Z(n,e))return;t.uniform3uiv(this.addr,e),J(n,e)}}function ft(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4ui(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Z(n,e))return;t.uniform4uiv(this.addr,e),J(n,e)}}function At(t,e,n){const r=this.cache,s=n.allocateTextureUnit();let o;r[0]!==s&&(t.uniform1i(this.addr,s),r[0]=s),this.type===t.SAMPLER_2D_SHADOW?(z.compareFunction=i.M$G,o=z):o=Q,n.setTexture2D(e||o,s)}function gt(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(e||H,r)}function mt(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(e||V,r)}function _t(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(e||G,r)}function vt(t,e){t.uniform1fv(this.addr,e)}function yt(t,e){const n=K(e,this.size,2);t.uniform2fv(this.addr,n)}function Et(t,e){const n=K(e,this.size,3);t.uniform3fv(this.addr,n)}function xt(t,e){const n=K(e,this.size,4);t.uniform4fv(this.addr,n)}function Ct(t,e){const n=K(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function bt(t,e){const n=K(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function wt(t,e){const n=K(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function St(t,e){t.uniform1iv(this.addr,e)}function It(t,e){t.uniform2iv(this.addr,e)}function Mt(t,e){t.uniform3iv(this.addr,e)}function Tt(t,e){t.uniform4iv(this.addr,e)}function Bt(t,e){t.uniform1uiv(this.addr,e)}function Rt(t,e){t.uniform2uiv(this.addr,e)}function Pt(t,e){t.uniform3uiv(this.addr,e)}function Dt(t,e){t.uniform4uiv(this.addr,e)}function Lt(t,e,n){const i=this.cache,r=e.length,s=$(n,r);Z(i,s)||(t.uniform1iv(this.addr,s),J(i,s));for(let t=0;t!==r;++t)n.setTexture2D(e[t]||Q,s[t])}function Ut(t,e,n){const i=this.cache,r=e.length,s=$(n,r);Z(i,s)||(t.uniform1iv(this.addr,s),J(i,s));for(let t=0;t!==r;++t)n.setTexture3D(e[t]||H,s[t])}function Nt(t,e,n){const i=this.cache,r=e.length,s=$(n,r);Z(i,s)||(t.uniform1iv(this.addr,s),J(i,s));for(let t=0;t!==r;++t)n.setTextureCube(e[t]||V,s[t])}function Ot(t,e,n){const i=this.cache,r=e.length,s=$(n,r);Z(i,s)||(t.uniform1iv(this.addr,s),J(i,s));for(let t=0;t!==r;++t)n.setTexture2DArray(e[t]||G,s[t])}class Ft{constructor(t,e,n){this.id=t,this.addr=n,this.cache=[],this.type=e.type,this.setValue=function(t){switch(t){case 5126:return tt;case 35664:return et;case 35665:return nt;case 35666:return it;case 35674:return rt;case 35675:return st;case 35676:return ot;case 5124:case 35670:return at;case 35667:case 35671:return lt;case 35668:case 35672:return ht;case 35669:case 35673:return ct;case 5125:return ut;case 36294:return dt;case 36295:return pt;case 36296:return ft;case 35678:case 36198:case 36298:case 36306:case 35682:return At;case 35679:case 36299:case 36307:return gt;case 35680:case 36300:case 36308:case 36293:return mt;case 36289:case 36303:case 36311:case 36292:return _t}}(e.type)}}class kt{constructor(t,e,n){this.id=t,this.addr=n,this.cache=[],this.type=e.type,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return vt;case 35664:return yt;case 35665:return Et;case 35666:return xt;case 35674:return Ct;case 35675:return bt;case 35676:return wt;case 5124:case 35670:return St;case 35667:case 35671:return It;case 35668:case 35672:return Mt;case 35669:case 35673:return Tt;case 5125:return Bt;case 36294:return Rt;case 36295:return Pt;case 36296:return Dt;case 35678:case 36198:case 36298:case 36306:case 35682:return Lt;case 35679:case 36299:case 36307:return Ut;case 35680:case 36300:case 36308:case 36293:return Nt;case 36289:case 36303:case 36311:case 36292:return Ot}}(e.type)}}class Qt{constructor(t){this.id=t,this.seq=[],this.map={}}setValue(t,e,n){const i=this.seq;for(let r=0,s=i.length;r!==s;++r){const s=i[r];s.setValue(t,e[s.id],n)}}}const zt=/(\w+)(\])?(\[|\.)?/g;function Gt(t,e){t.seq.push(e),t.map[e.id]=e}function Ht(t,e,n){const i=t.name,r=i.length;for(zt.lastIndex=0;;){const s=zt.exec(i),o=zt.lastIndex;let a=s[1];const l="]"===s[2],h=s[3];if(l&&(a|=0),void 0===h||"["===h&&o+2===r){Gt(n,void 0===h?new Ft(a,t,e):new kt(a,t,e));break}{let t=n.map[a];void 0===t&&(t=new Qt(a),Gt(n,t)),n=t}}}class Vt{constructor(t,e){this.seq=[],this.map={};const n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const n=t.getActiveUniform(e,i);Ht(n,t.getUniformLocation(e,n.name),this)}}setValue(t,e,n,i){const r=this.map[e];void 0!==r&&r.setValue(t,n,i)}setOptional(t,e,n){const i=e[n];void 0!==i&&this.setValue(t,n,i)}static upload(t,e,n,i){for(let r=0,s=e.length;r!==s;++r){const s=e[r],o=n[s.id];!1!==o.needsUpdate&&s.setValue(t,o.value,i)}}static seqWithValue(t,e){const n=[];for(let i=0,r=t.length;i!==r;++i){const r=t[i];r.id in e&&n.push(r)}return n}}function jt(t,e,n){const i=t.createShader(e);return t.shaderSource(i,n),t.compileShader(i),i}const Wt=37297;let qt=0;const Xt=new i.Vkp;function Yt(t,e,n){const i=t.getShaderParameter(e,t.COMPILE_STATUS),r=(t.getShaderInfoLog(e)||"").trim();if(i&&""===r)return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const i=parseInt(s[1]);return n.toUpperCase()+"\n\n"+r+"\n\n"+function(t,e){const n=t.split("\n"),i=[],r=Math.max(e-6,0),s=Math.min(e+6,n.length);for(let t=r;t<s;t++){const r=t+1;i.push(`${r===e?">":" "} ${r}: ${n[t]}`)}return i.join("\n")}(t.getShaderSource(e),i)}return r}
vendor: 4,500 bytes, line 2
2function Kt(t,e){const n=function(t){i.epp._getMatrix(Xt,i.epp.workingColorSpace,t);const e=`mat3( ${Xt.elements.map((t=>t.toFixed(4)))} )`;switch(i.epp.getTransfer(t)){case i.l6D:return[e,"LinearTransferOETF"];case i.j17:return[e,"sRGBTransferOETF"];default:return(0,i.ZK6)("WebGLProgram: Unsupported color space: ",t),[e,"LinearTransferOETF"]}}(e);return[`vec4 ${t}( vec4 value ) {`,`\treturn ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,"}"].join("\n")}function Zt(t,e){let n;switch(e){case i.EoG:n="Linear";break;case i.CdI:n="Reinhard";break;case i.YGz:n="Cineon";break;case i.LY2:n="ACESFilmic";break;case i.Bgp:n="AgX";break;case i.ORg:n="Neutral";break;case i.dZ3:n="Custom";break;default:(0,i.ZK6)("WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}const Jt=new i.Pa4;function $t(){i.epp.getLuminanceCoefficients(Jt);return["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${Jt.x.toFixed(4)}, ${Jt.y.toFixed(4)}, ${Jt.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")}function te(t){return""!==t}function ee(t,e){const n=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function ne(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const ie=/^[ \t]*#include +<([\w\d./]+)>/gm;function re(t){return t.replace(ie,oe)}const se=new Map;function oe(t,e){let n=o[e];if(void 0===n){const t=se.get(e);if(void 0===t)throw new Error("Can not resolve #include <"+e+">");n=o[t],(0,i.ZK6)('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,t)}return re(n)}const ae=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function le(t){return t.replace(ae,he)}function he(t,e,n,i){let r="";for(let t=parseInt(e);t<parseInt(n);t++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+t+" ]").replace(/UNROLLED_LOOP_INDEX/g,t);return r}function ce(t){let e=`precision ${t.precision} float;\n\tprecision ${t.precision} int;\n\tprecision ${t.precision} sampler2D;\n\tprecision ${t.precision} samplerCube;\n\tprecision ${t.precision} sampler3D;\n\tprecision ${t.precision} sampler2DArray;\n\tprecision ${t.precision} sampler2DShadow;\n\tprecision ${t.precision} samplerCubeShadow;\n\tprecision ${t.precision} sampler2DArrayShadow;\n\tprecision ${t.precision} isampler2D;\n\tprecision ${t.precision} isampler3D;\n\tprecision ${t.precision} isamplerCube;\n\tprecision ${t.precision} isampler2DArray;\n\tprecision ${t.precision} usampler2D;\n\tprecision ${t.precision} usampler3D;\n\tprecision ${t.precision} usamplerCube;\n\tprecision ${t.precision} usampler2DArray;\n\t`;return"highp"===t.precision?e+="\n#define HIGH_PRECISION":"mediump"===t.precision?e+="\n#define MEDIUM_PRECISION":"lowp"===t.precision&&(e+="\n#define LOW_PRECISION"),e}function ue(t,e,n,r){const s=t.getContext(),a=n.defines;let l=n.vertexShader,h=n.fragmentShader;const c=function(t){let e="SHADOWMAP_TYPE_BASIC";return t.shadowMapType===i._iA?e="SHADOWMAP_TYPE_PCF":t.shadowMapType===i.ntZ?e="SHADOWMAP_TYPE_PCF_SOFT":t.shadowMapType===i.dwk&&(e="SHADOWMAP_TYPE_VSM"),e}(n),u=function(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case i.fY$:case i.vxC:e="ENVMAP_TYPE_CUBE";break;case i.g8_:e="ENVMAP_TYPE_CUBE_UV"}return e}(n),d=function(t){let e="ENVMAP_MODE_REFLECTION";t.envMap&&t.envMapMode===i.vxC&&(e="ENVMAP_MODE_REFRACTION");return e}(n),p=function(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case i.Ns1:e="ENVMAP_BLENDING_MULTIPLY";break;case i.qhX:e="ENVMAP_BLENDING_MIX";break;case i.NDo:e="ENVMAP_BLENDING_ADD"}return e}(n),f=function(t){const e=t.envMapCubeUVHeight;if(null===e)return null;const n=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:i,maxMip:n}}
vendor: 6,217 bytes, line 2
2(n),A=function(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(te).join("\n")}(n),g=function(t){const e=[];for(const n in t){const i=t[n];!1!==i&&e.push("#define "+n+" "+i)}return e.join("\n")}(a),m=s.createProgram();let _,v,y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(_=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,g].filter(te).join("\n"),_.length>0&&(_+="\n"),v=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,g].filter(te).join("\n"),v.length>0&&(v+="\n")):(_=[ce(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,g,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+d:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+c:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","\tuniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(te).join("\n"),v=[ce(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,g,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alph
vendor: 4,324 bytes, line 2
2aToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",n.envMap?"#define "+p:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+c:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",n.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==i.uL9?"#define TONE_MAPPING":"",n.toneMapping!==i.uL9?o.tonemapping_pars_fragment:"",n.toneMapping!==i.uL9?Zt("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",o.colorspace_pars_fragment,Kt("linearToOutputTexel",n.outputColorSpace),$t(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(te).join("\n")),l=re(l),l=ee(l,n),l=ne(l,n),h=re(h),h=ee(h,n),h=ne(h,n),l=le(l),h=le(h),!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",_=[A,"#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+_,v=["#define varying in",n.glslVersion===i.LSk?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===i.LSk?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+v);const E=y+_+l,x=y+v+h,C=jt(s,s.VERTEX_SHADER,E),b=jt(s,s.FRAGMENT_SHADER,x);function w(e){if(t.debug.checkShaderErrors){const n=s.getProgramInfoLog(m)||"",r=s.getShaderInfoLog(C)||"",o=s.getShaderInfoLog(b)||"",a=n.trim(),l=r.trim(),h=o.trim();let c=!0,u=!0;if(!1===s.getProgramParameter(m,s.LINK_STATUS))if(c=!1,"function"==typeof t.debug.onSha
vendor: 9,540 bytes, line 2
2derError)t.debug.onShaderError(s,m,C,b);else{const t=Yt(s,C,"vertex"),n=Yt(s,b,"fragment");(0,i.vUy)("THREE.WebGLProgram: Shader Error "+s.getError()+" - VALIDATE_STATUS "+s.getProgramParameter(m,s.VALIDATE_STATUS)+"\n\nMaterial Name: "+e.name+"\nMaterial Type: "+e.type+"\n\nProgram Info Log: "+a+"\n"+t+"\n"+n)}else""!==a?(0,i.ZK6)("WebGLProgram: Program Info Log:",a):""!==l&&""!==h||(u=!1);u&&(e.diagnostics={runnable:c,programLog:a,vertexShader:{log:l,prefix:_},fragmentShader:{log:h,prefix:v}})}s.deleteShader(C),s.deleteShader(b),S=new Vt(s,m),I=function(t,e){const n={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const i=t.getActiveAttrib(e,r),s=i.name;let o=1;i.type===t.FLOAT_MAT2&&(o=2),i.type===t.FLOAT_MAT3&&(o=3),i.type===t.FLOAT_MAT4&&(o=4),n[s]={type:i.type,location:t.getAttribLocation(e,s),locationSize:o}}return n}(s,m)}let S,I;s.attachShader(m,C),s.attachShader(m,b),void 0!==n.index0AttributeName?s.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&s.bindAttribLocation(m,0,"position"),s.linkProgram(m),this.getUniforms=function(){return void 0===S&&w(this),S},this.getAttributes=function(){return void 0===I&&w(this),I};let M=!1===n.rendererExtensionParallelShaderCompile;return this.isReady=function(){return!1===M&&(M=s.getProgramParameter(m,Wt)),M},this.destroy=function(){r.releaseStatesOfProgram(this),s.deleteProgram(m),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=qt++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=C,this.fragmentShader=b,this}let de=0;class pe{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){const e=t.vertexShader,n=t.fragmentShader,i=this._getShaderStage(e),r=this._getShaderStage(n),s=this._getShaderCacheForMaterial(t);return!1===s.has(i)&&(s.add(i),i.usedTimes++),!1===s.has(r)&&(s.add(r),r.usedTimes++),this}remove(t){const e=this.materialCache.get(t);for(const t of e)t.usedTimes--,0===t.usedTimes&&this.shaderCache.delete(t.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){const e=this.materialCache;let n=e.get(t);return void 0===n&&(n=new Set,e.set(t,n)),n}_getShaderStage(t){const e=this.shaderCache;let n=e.get(t);return void 0===n&&(n=new fe(t),e.set(t,n)),n}}class fe{constructor(t){this.id=de++,this.code=t,this.usedTimes=0}}function Ae(t,e,n,r,s,o,a){const h=new i.S9g,c=new pe,u=new Set,d=[],p=s.logarithmicDepthBuffer,f=s.vertexTextures;let A=s.precision;const g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function m(t){return u.add(t),0===t?"uv":`uv${t}`}return{getParameters:function(o,h,d,_,v){const y=_.fog,E=v.geometry,x=o.isMeshStandardMaterial?_.environment:null,C=(o.isMeshStandardMaterial?n:e).get(o.envMap||x),b=C&&C.mapping===i.g8_?C.image.height:null,w=g[o.type];null!==o.precision&&(A=s.getMaxPrecision(o.precision),A!==o.precision&&(0,i.ZK6)("WebGLProgram.getParameters:",o.precision,"not supported, using",A,"instead."));const S=E.morphAttributes.position||E.morphAttributes.normal||E.morphAttributes.color,I=void 0!==S?S.length:0;let M,T,B,R,P=0;if(void 0!==E.morphAttributes.position&&(P=1),void 0!==E.morphAttributes.normal&&(P=2),void 0!==E.morphAttributes.color&&(P=3),w){const t=l[w];M=t.vertexShader,T=t.fragmentShader}else M=o.vertexShader,T=o.fragmentShader,c.update(o),B=c.getVertexShaderID(o),R=c.getFragmentShaderID(o);const D=t.getRenderTarget(),L=t.state.buffers.depth.getReversed(),U=!0===v.isInstancedMesh,N=!0===v.isBatchedMesh,O=!!o.map,F=!!o.matcap,k=!!C,Q=!!o.aoMap,z=!!o.lightMap,G=!!o.bumpMap,H=!!o.normalMap,V=!!o.displacementMap,j=!!o.emissiveMap,W=!!o.metalnessMap,q=!!o.roughnessMap,X=o.anisotropy>0,Y=o.clearcoat>0,K=o.dispersion>0,Z=o.iridescence>0,J=o.sheen>0,$=o.transmission>0,tt=X&&!!o.anisotropyMap,et=Y&&!!o.clearcoatMap,nt=Y&&!!o.clearcoatNormalMap,it=Y&&!!o.clearcoatRoughnessMap,rt=Z&&!!o.iridescenceMap,st=Z&&!!o.iridescenceThicknessMap,ot=J&&!!o.sheenColorMap,at=J&&!!o.sheenRoughnessMap,lt=!!o.specularMap,ht=!!o.specularColorMap,ct=!!o.specularIntensityMap,ut=$&&!!o.transmissionMap,dt=$&&!!o.thicknessMap,pt=!!o.gradientMap,ft=!!o.alphaMap,At=o.alphaTest>0,gt=!!o.alphaHash,mt=!!o.extensions;let _t=i.uL9;o.toneMapped&&(null!==D&&!0!==D.isXRRenderTarget||(_t=t.toneMapping));const vt={shaderID:w,shaderType:o.type,shaderName:o.name,vertexShader:M,fragmentShader:T,defines:o.defines,customVertexShaderID:B,customFragmentShaderID:R,isRawShaderMaterial:!0===o.isRawShaderMaterial,glslVersion:o.glslVersion,precision:A,batching:N,batchingColor:N&&null!==v._colorsTexture,instancing:U,instancingColor:U&&null!==v.instanceColor,instancingMorph:U&&null!==v.morphTexture,supportsVertexTextures:f,outputColorSpace:null===D?t.outputColorSpace:!0===D.isXRRenderTarget?D.texture.colorSpace:i.GUF,alphaToCoverage:!!o.alphaToCoverage,map:O,matcap:F,envMap:k,envMapMode:k&&C.mapping,envMapCubeUVHeight:b,aoMap:Q,lightMap:z,bumpMap:G,normalMap:H,displacementMap:f&&V,emissiveMap:j,normalMapObjectSpace:H&&o.normalMapType===i.PA7,normalMapTangentSpace:H&&o.normalMapType===i.IOt,metalnessMap:W,roughnessMap:q,anisotropy:X,anisotropyMap:tt,clearcoat:Y,clearcoatMap:et,clearcoatNormalMap:nt,clearcoatRoughnessMap:it,dispersion:K,iridescence:Z,iridescenceMap:rt,iridescenceThicknessMap:st,sheen:J,sheenColorMap:ot,sheenRoughnessMap:at,specularMap:lt,specularColorMap:ht,specularIntensityMap:ct,transmission:$,transmissionMap:ut,thicknessMap:dt,gradientMap:pt,opaque:!1===o.transparent&&o.blending===i.bdR&&!1===o.alphaToCoverage,alphaMap:ft,alphaTest:At,alphaHash:gt,combine:o.combine,mapUv:O&&m(o.map.channel),aoMapUv:Q&&m(o.aoMap.channel),lightMapUv:z&&m(o.lightMap.channel),bumpMapUv:G&&m(o.bumpMap.channel),normalMapUv:H&&m(o.normalMap.channel),displacementMapUv:V&&m(o.displacementMap.channel),emissiveMapUv:j&&m(o.emissiveMap.channel),metalnessMapUv:W&&m(o.metalnessMap.channel),roughnessMapUv:q&&m(o.roughnessMap.channel),anisotropyMapUv:tt&&m(o.anisotropyMap.channel),clearcoatMapUv:et&&m(o.clearcoatMap.channel),clearcoatNormalMapUv:nt&&m(o.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:it&&m(o.clearcoatRoughnessMap.channel),iridescenceMapUv:rt&&m(o.iridescenceMap.channel),iridescenceThicknessMapUv:st&&m(o.iridescenceThicknessMap.channel),sheenColorMapUv:ot&&m(o.sheenColorMap.channel),sheenRoughnessMapUv:at&&m(o.sheenRoughnessMap.channel),specularMapUv:lt&&m(o.specularMap.channel),specularColorMapUv:ht&&m(o.specularColorMap.channel),specularIntensityMapUv:ct&&m(o.specularIntensityMap.channel),transmissionMapUv:ut&&m(o.transmissionMap.channel),thicknessMapUv:dt&&m(o.thicknessMap.channel),alphaMapUv:ft&&m(o.alphaMap.channel),vertexTangents:!!E.attributes.tangent&&(H||X),vertexColors:o.vertexColors,vertexAlphas:!0===o.vertexColors&&!!E.attributes.color&&4===E.attributes.color.itemSize,pointsUvs:!0===v.isPoints&&!!E.attributes.uv&&(O||ft),fog:!!y,useFog:!0===o.fog,fogExp2:!!y&&y.isFogExp2,flatShading:!0===o.flatShading&&!1===o.wireframe,sizeAttenuation:!0===o.sizeAttenuation,logarithmicDepthBuffer:p,reversedDepthBuffer:L,skinning:!0===v.isSkinnedMesh,morphTargets:void 0!==E.morphAttributes.position,morphNormals:void 0!==E.morphAttributes.normal,morphColors:void 0!==E.morphAttributes.color,morphTargetsCount:I,morphTextureStride:P,numDirLights:h.directional.length,numPointLights:h.point.length,numSpotLights:h.spot.length,numSpotLightMaps:h.spotLightMap.length,numRectAreaLights:h.rectArea.length,numHemiLights:h.hemi.length,numDirLightShadows:h.directionalShadowMap.length,numPointLightShadows:h.pointShadowMap.length,numSpotLightShadows:h.spotShadowMap.length,numSpotLightShadowsWithMaps:h.numSpotLightShadowsWithMaps,numLightProbes:h.numLightProbes,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:o.dithering,shadowMapEnabled:t.shadowMap.enabled&&d.length>0,shadowMapType:t.shadowMap.type,toneMapping:_t,decodeVideoTexture:O&&!0===o.map.isVideoTexture&&i.epp.getTransfer(o.map.colorSpace)===i.j17,decodeVideoTextureEmissive:j&&!0===o.emissiveMap.isVideoTexture&&i.epp.getTransfer(o.emissiveMap.colorSpace)===i.j17,premultipliedAlpha:o.premultipliedAlpha,doubleSided:o.side===i.ehD,flipSided:o.side===i._Li,useDepthPacking:o.depthPacking>=0,depthPacking:o.depthPacking||0,index0AttributeName:o.index0AttributeName,extensionClipCullDistance:mt&&!0===o.extensions.clipCullDistance&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(mt&&!0===o.extensions.multiDraw||N)&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:o.customProgramCacheKey()};return vt.vertexUv1s=u.has(1),vt.vertexUv2s=u.has(2),vt.vertexUv3s=u.has(3),u.clear(),vt},getProgramCacheKey:function(e){const n=[];if(e.shaderID?n.push(e.shaderID):(n.push(e.customVertexShaderID),n.push(e.customFragmentShaderID)),void 0!==e.defines)for(const t in e.defines)n.push(t),n.push(e.defines[t]);return!1===e.isRawShaderMaterial&&(!function(t,e){t.push(e.precision),t.push(e.outputColorSpace),t.push(e.envMapMode),t.pu
vendor: 11,817 bytes, line 2
2sh(e.envMapCubeUVHeight),t.push(e.mapUv),t.push(e.alphaMapUv),t.push(e.lightMapUv),t.push(e.aoMapUv),t.push(e.bumpMapUv),t.push(e.normalMapUv),t.push(e.displacementMapUv),t.push(e.emissiveMapUv),t.push(e.metalnessMapUv),t.push(e.roughnessMapUv),t.push(e.anisotropyMapUv),t.push(e.clearcoatMapUv),t.push(e.clearcoatNormalMapUv),t.push(e.clearcoatRoughnessMapUv),t.push(e.iridescenceMapUv),t.push(e.iridescenceThicknessMapUv),t.push(e.sheenColorMapUv),t.push(e.sheenRoughnessMapUv),t.push(e.specularMapUv),t.push(e.specularColorMapUv),t.push(e.specularIntensityMapUv),t.push(e.transmissionMapUv),t.push(e.thicknessMapUv),t.push(e.combine),t.push(e.fogExp2),t.push(e.sizeAttenuation),t.push(e.morphTargetsCount),t.push(e.morphAttributeCount),t.push(e.numDirLights),t.push(e.numPointLights),t.push(e.numSpotLights),t.push(e.numSpotLightMaps),t.push(e.numHemiLights),t.push(e.numRectAreaLights),t.push(e.numDirLightShadows),t.push(e.numPointLightShadows),t.push(e.numSpotLightShadows),t.push(e.numSpotLightShadowsWithMaps),t.push(e.numLightProbes),t.push(e.shadowMapType),t.push(e.toneMapping),t.push(e.numClippingPlanes),t.push(e.numClipIntersection),t.push(e.depthPacking)}(n,e),function(t,e){h.disableAll(),e.supportsVertexTextures&&h.enable(0);e.instancing&&h.enable(1);e.instancingColor&&h.enable(2);e.instancingMorph&&h.enable(3);e.matcap&&h.enable(4);e.envMap&&h.enable(5);e.normalMapObjectSpace&&h.enable(6);e.normalMapTangentSpace&&h.enable(7);e.clearcoat&&h.enable(8);e.iridescence&&h.enable(9);e.alphaTest&&h.enable(10);e.vertexColors&&h.enable(11);e.vertexAlphas&&h.enable(12);e.vertexUv1s&&h.enable(13);e.vertexUv2s&&h.enable(14);e.vertexUv3s&&h.enable(15);e.vertexTangents&&h.enable(16);e.anisotropy&&h.enable(17);e.alphaHash&&h.enable(18);e.batching&&h.enable(19);e.dispersion&&h.enable(20);e.batchingColor&&h.enable(21);e.gradientMap&&h.enable(22);t.push(h.mask),h.disableAll(),e.fog&&h.enable(0);e.useFog&&h.enable(1);e.flatShading&&h.enable(2);e.logarithmicDepthBuffer&&h.enable(3);e.reversedDepthBuffer&&h.enable(4);e.skinning&&h.enable(5);e.morphTargets&&h.enable(6);e.morphNormals&&h.enable(7);e.morphColors&&h.enable(8);e.premultipliedAlpha&&h.enable(9);e.shadowMapEnabled&&h.enable(10);e.doubleSided&&h.enable(11);e.flipSided&&h.enable(12);e.useDepthPacking&&h.enable(13);e.dithering&&h.enable(14);e.transmission&&h.enable(15);e.sheen&&h.enable(16);e.opaque&&h.enable(17);e.pointsUvs&&h.enable(18);e.decodeVideoTexture&&h.enable(19);e.decodeVideoTextureEmissive&&h.enable(20);e.alphaToCoverage&&h.enable(21);t.push(h.mask)}(n,e),n.push(t.outputColorSpace)),n.push(e.customProgramCacheKey),n.join()},getUniforms:function(t){const e=g[t.type];let n;if(e){const t=l[e];n=i.rDY.clone(t.uniforms)}else n=t.uniforms;return n},acquireProgram:function(e,n){let i;for(let t=0,e=d.length;t<e;t++){const e=d[t];if(e.cacheKey===n){i=e,++i.usedTimes;break}}return void 0===i&&(i=new ue(t,n,e,o),d.push(i)),i},releaseProgram:function(t){if(0==--t.usedTimes){const e=d.indexOf(t);d[e]=d[d.length-1],d.pop(),t.destroy()}},releaseShaderCache:function(t){c.remove(t)},programs:d,dispose:function(){c.dispose()}}}function ge(){let t=new WeakMap;return{has:function(e){return t.has(e)},get:function(e){let n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,i){t.get(e)[n]=i},dispose:function(){t=new WeakMap}}}function me(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder: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 _e(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function ve(){const t=[];let e=0;const n=[],i=[],r=[];function s(n,i,r,s,o,a){let l=t[e];return void 0===l?(l={id:n.id,object:n,geometry:i,material:r,groupOrder:s,renderOrder:n.renderOrder,z:o,group:a},t[e]=l):(l.id=n.id,l.object=n,l.geometry=i,l.material=r,l.groupOrder=s,l.renderOrder=n.renderOrder,l.z=o,l.group=a),e++,l}return{opaque:n,transmissive:i,transparent:r,init:function(){e=0,n.length=0,i.length=0,r.length=0},push:function(t,e,o,a,l,h){const c=s(t,e,o,a,l,h);o.transmission>0?i.push(c):!0===o.transparent?r.push(c):n.push(c)},unshift:function(t,e,o,a,l,h){const c=s(t,e,o,a,l,h);o.transmission>0?i.unshift(c):!0===o.transparent?r.unshift(c):n.unshift(c)},finish:function(){for(let n=e,i=t.length;n<i;n++){const e=t[n];if(null===e.id)break;e.id=null,e.object=null,e.geometry=null,e.material=null,e.group=null}},sort:function(t,e){n.length>1&&n.sort(t||me),i.length>1&&i.sort(e||_e),r.length>1&&r.sort(e||_e)}}}function ye(){let t=new WeakMap;return{get:function(e,n){const i=t.get(e);let r;return void 0===i?(r=new ve,t.set(e,[r])):n>=i.length?(r=new ve,i.push(r)):r=i[n],r},dispose:function(){t=new WeakMap}}}function Ee(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new i.Pa4,color:new i.Ilk};break;case"SpotLight":n={position:new i.Pa4,direction:new i.Pa4,color:new i.Ilk,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new i.Pa4,color:new i.Ilk,distance:0,decay:0};break;case"HemisphereLight":n={direction:new i.Pa4,skyColor:new i.Ilk,groundColor:new i.Ilk};break;case"RectAreaLight":n={color:new i.Ilk,position:new i.Pa4,halfWidth:new i.Pa4,halfHeight:new i.Pa4}}return t[e.id]=n,n}}}let xe=0;function Ce(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function be(t){const e=new Ee,n=function(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new i.FM8};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new i.FM8,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=n,n}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let t=0;t<9;t++)r.probe.push(new i.Pa4);const s=new i.Pa4,o=new i.yGw,l=new i.yGw;return{setup:function(i){let s=0,o=0,l=0;for(let t=0;t<9;t++)r.probe[t].set(0,0,0);let h=0,c=0,u=0,d=0,p=0,f=0,A=0,g=0,m=0,_=0,v=0;i.sort(Ce);for(let t=0,a=i.length;t<a;t++){const a=i[t],y=a.color,E=a.intensity,x=a.distance,C=a.shadow&&a.shadow.map?a.shadow.map.texture:null;if(a.isAmbientLight)s+=y.r*E,o+=y.g*E,l+=y.b*E;else if(a.isLightProbe){for(let t=0;t<9;t++)r.probe[t].addScaledVector(a.sh.coefficients[t],E);v++}else if(a.isDirectionalLight){const t=e.get(a);if(t.color.copy(a.color).multiplyScalar(a.intensity),a.castShadow){const t=a.shadow,e=n.get(a);e.shadowIntensity=t.intensity,e.shadowBias=t.bias,e.shadowNormalBias=t.normalBias,e.shadowRadius=t.radius,e.shadowMapSize=t.mapSize,r.directionalShadow[h]=e,r.directionalShadowMap[h]=C,r.directionalShadowMatrix[h]=a.shadow.matrix,f++}r.directional[h]=t,h++}else if(a.isSpotLight){const t=e.get(a);t.position.setFromMatrixPosition(a.matrixWorld),t.color.copy(y).multiplyScalar(E),t.distance=x,t.coneCos=Math.cos(a.angle),t.penumbraCos=Math.cos(a.angle*(1-a.penumbra)),t.decay=a.decay,r.spot[u]=t;const i=a.shadow;if(a.map&&(r.spotLightMap[m]=a.map,m++,i.updateMatrices(a),a.castShadow&&_++),r.spotLightMatrix[u]=i.matrix,a.castShadow){const t=n.get(a);t.shadowIntensity=i.intensity,t.shadowBias=i.bias,t.shadowNormalBias=i.normalBias,t.shadowRadius=i.radius,t.shadowMapSize=i.mapSize,r.spotShadow[u]=t,r.spotShadowMap[u]=C,g++}u++}else if(a.isRectAreaLight){const t=e.get(a);t.color.copy(y).multiplyScalar(E),t.halfWidth.set(.5*a.width,0,0),t.halfHeight.set(0,.5*a.height,0),r.rectArea[d]=t,d++}else if(a.isPointLight){const t=e.get(a);if(t.color.copy(a.color).multiplyScalar(a.intensity),t.distance=a.distance,t.decay=a.decay,a.castShadow){const t=a.shadow,e=n.get(a);e.shadowIntensity=t.intensity,e.shadowBias=t.bias,e.shadowNormalBias=t.normalBias,e.shadowRadius=t.radius,e.shadowMapSize=t.mapSize,e.shadowCameraNear=t.camera.near,e.shadowCameraFar=t.camera.far,r.pointShadow[c]=e,r.pointShadowMap[c]=C,r.pointShadowMatrix[c]=a.shadow.matrix,A++}r.point[c]=t,c++}else if(a.isHemisphereLight){const t=e.get(a);t.skyColor.copy(a.color).multiplyScalar(E),t.groundColor.copy(a.groundColor).multiplyScalar(E),r.hemi[p]=t,p++}}d>0&&(!0===t.has("OES_texture_float_linear")?(r.rectAreaLTC1=a.LTC_FLOAT_1,r.rectAreaLTC2=a.LTC_FLOAT_2):(r.rectAreaLTC1=a.LTC_HALF_1,r.rectAreaLTC2=a.LTC_HALF_2)),r.ambient[0]=s,r.ambient[1]=o,r.ambient[2]=l;const y=r.hash;y.directionalLength===h&&y.pointLength===c&&y.spotLength===u&&y.rectAreaLength===d&&y.hemiLength===p&&y.numDirectionalShadows===f&&y.numPointShadows===A&&y.numSpotShadows===g&&y.numSpotMaps===m&&y.numLightProbes===v||(r.directional.length=h,r.spot.length=u,r.rectArea.length=d,r.point.length=c,r.hemi.length=p,r.directionalShadow.length=f,r.directionalShadowMap.length=f,r.pointShadow.length=A,r.pointShadowMap.length=A,r.spotShadow.length=g,r.spotShadowMap.length=g,r.directionalShadowMatrix.length=f,r.pointShadowMatrix.length=A,r.spotLightMatrix.length=g+m-_,r.spotLightMap.length=m,r.numSpotLightShadowsWithMaps=_,r.numLightProbes=v,y.directionalLength=h,y.pointLength=c,y.spotLength=u,y.rectAreaLength=d,y.hemiLength=p,y.numDirectionalShadows=f,y.numPointShadows=A,y.numSpotShadows=g,y.numSpotMaps=m,y.numLightProbes=v,r.version=xe++)},setupView:function(t,e){let n=0,i=0,a=0,h=0,c=0;const u=e.matrixWorldInverse;for(let e=0,d=t.length;e<d;e++){const d=t[e];if(d.isDirectionalLight){const t=r.directional[n];t.direction.setFromMatrixPosition(d.matrixWorld),s.setFromMatrixPosition(d.target.matrixWorld),t.direction.sub(s),t.direction.transformDirection(u),n++}else if(d.isSpotLight){const t=r.spot[a];t.position.setFromMatrixPosition(d.matrixWorld),t.position.applyMatrix4(u),t.direction.setFromMatrixPosition(d.matrixWorld),s.setFromMatrixPosition(d.target.matrixWorld),t.direction.sub(s),t.direction.transformDirection(u),a++}else if(d.isRectAreaLight){const t=r.rectArea[h];t.position.setFromMatrixPosition(d.matrixWorld),t.position.applyMatrix4(u),l.identity(),o.copy(d.matrixWorld),o.premultiply(u),l.extractRotation(o),t.halfWidth.set(.5*d.width,0,0),t.halfHeight.set(0,.5*d.height,0),t.halfWidth.applyMatrix4(l),t.halfHeight.applyMatrix4(l),h++}else if(d.isPointLight){const t=r.point[i];t.position.setFromMatrixPosition(d.matrixWorld),t.position.applyMatrix4(u),i++}else if(d.isHemisphereLight){const t=r.hemi[c];t.direction.setFromMatrixPosition(d.matrixWorld),t.direction.transformDirection(u),c++}}},state:r}}function we(t){const e=new be(t),n=[],i=[];const r={lightsArray:n,shadowsArray:i,camera:null,lights:e,transmissionRenderTarget:{}};return{init:function(t){r.camera=t,n.length=0,i.length=0},state:r,setupLights:function(){e.setup(n)},setupLightsView:function(t){e.setupView(n,t)},pushLight:function(t){n.push(t)},pushShadow:function(t){i.push(t)}}}function Se(t){let e=new WeakMap;return{get:function(n,i=0){const r=e.get(n);let s;return void 0===r?(s=new we(t),e.set(n,[s])):i>=r.length?(s=new we(t),r.push(s)):s=r[i],s},dispose:function(){e=new WeakMap}}}function Ie(t,e,n){let r=new i.iWj;const s=new i.FM8,o=new i.FM8,a=new i.Ltg,l=new i.lRF({depthPacking:i.mSO}),h=new i.Lun,c={},u=n.maxTextureSize,d={[i.Wl3]:i._Li,[i._Li]:i.Wl3,[i.ehD]:i.ehD}
vendor: 9,721 bytes, line 2
2,p=new i.jyz({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new i.FM8},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),f=p.clone();f.defines.HORIZONTAL_PASS=1;const A=new i.u9r;A.setAttribute("position",new i.TlE(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const g=new i.Kj0(A,p),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=i._iA;let _=this.type;function v(n,r){const o=e.update(g);p.defines.VSM_SAMPLES!==n.blurSamples&&(p.defines.VSM_SAMPLES=n.blurSamples,f.defines.VSM_SAMPLES=n.blurSamples,p.needsUpdate=!0,f.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new i.dd2(s.x,s.y)),p.uniforms.shadow_pass.value=n.map.texture,p.uniforms.resolution.value=n.mapSize,p.uniforms.radius.value=n.radius,t.setRenderTarget(n.mapPass),t.clear(),t.renderBufferDirect(r,null,o,p,g,null),f.uniforms.shadow_pass.value=n.mapPass.texture,f.uniforms.resolution.value=n.mapSize,f.uniforms.radius.value=n.radius,t.setRenderTarget(n.map),t.clear(),t.renderBufferDirect(r,null,o,f,g,null)}function y(e,n,r,s){let o=null;const a=!0===r.isPointLight?e.customDistanceMaterial:e.customDepthMaterial;if(void 0!==a)o=a;else if(o=!0===r.isPointLight?h:l,t.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0||!0===n.alphaToCoverage){const t=o.uuid,e=n.uuid;let i=c[t];void 0===i&&(i={},c[t]=i);let r=i[e];void 0===r&&(r=o.clone(),i[e]=r,n.addEventListener("dispose",x)),o=r}if(o.visible=n.visible,o.wireframe=n.wireframe,s===i.dwk?o.side=null!==n.shadowSide?n.shadowSide:n.side:o.side=null!==n.shadowSide?n.shadowSide:d[n.side],o.alphaMap=n.alphaMap,o.alphaTest=!0===n.alphaToCoverage?.5:n.alphaTest,o.map=n.map,o.clipShadows=n.clipShadows,o.clippingPlanes=n.clippingPlanes,o.clipIntersection=n.clipIntersection,o.displacementMap=n.displacementMap,o.displacementScale=n.displacementScale,o.displacementBias=n.displacementBias,o.wireframeLinewidth=n.wireframeLinewidth,o.linewidth=n.linewidth,!0===r.isPointLight&&!0===o.isMeshDistanceMaterial){t.properties.get(o).light=r}return o}function E(n,s,o,a,l){if(!1===n.visible)return;if(n.layers.test(s.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&l===i.dwk)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const i=e.update(n),r=n.material;if(Array.isArray(r)){const e=i.groups;for(let h=0,c=e.length;h<c;h++){const c=e[h],u=r[c.materialIndex];if(u&&u.visible){const e=y(n,u,a,l);n.onBeforeShadow(t,n,s,o,i,e,c),t.renderBufferDirect(o,null,i,e,n,c),n.onAfterShadow(t,n,s,o,i,e,c)}}}else if(r.visible){const e=y(n,r,a,l);n.onBeforeShadow(t,n,s,o,i,e,null),t.renderBufferDirect(o,null,i,e,n,null),n.onAfterShadow(t,n,s,o,i,e,null)}}const h=n.children;for(let t=0,e=h.length;t<e;t++)E(h[t],s,o,a,l)}function x(t){t.target.removeEventListener("dispose",x);for(const e in c){const n=c[e],i=t.target.uuid;if(i in n){n[i].dispose(),delete n[i]}}}this.render=function(e,n,l){if(!1===m.enabled)return;if(!1===m.autoUpdate&&!1===m.needsUpdate)return;if(0===e.length)return;const h=t.getRenderTarget(),c=t.getActiveCubeFace(),d=t.getActiveMipmapLevel(),p=t.state;p.setBlending(i.jFi),!0===p.buffers.depth.getReversed()?p.buffers.color.setClear(0,0,0,0):p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);const f=_!==i.dwk&&this.type===i.dwk,A=_===i.dwk&&this.type!==i.dwk;for(let h=0,c=e.length;h<c;h++){const c=e[h],d=c.shadow;if(void 0===d){(0,i.ZK6)("WebGLShadowMap:",c,"has no shadow.");continue}if(!1===d.autoUpdate&&!1===d.needsUpdate)continue;s.copy(d.mapSize);const g=d.getFrameExtents();if(s.multiply(g),o.copy(d.mapSize),(s.x>u||s.y>u)&&(s.x>u&&(o.x=Math.floor(u/g.x),s.x=o.x*g.x,d.mapSize.x=o.x),s.y>u&&(o.y=Math.floor(u/g.y),s.y=o.y*g.y,d.mapSize.y=o.y)),null===d.map||!0===f||!0===A){const t=this.type!==i.dwk?{minFilter:i.TyD,magFilter:i.TyD}:{};null!==d.map&&d.map.dispose(),d.map=new i.dd2(s.x,s.y,t),d.map.texture.name=c.name+".shadowMap",d.camera.updateProjectionMatrix()}t.setRenderTarget(d.map),t.clear();const m=d.getViewportCount();for(let t=0;t<m;t++){const e=d.getViewport(t);a.set(o.x*e.x,o.y*e.y,o.x*e.z,o.y*e.w),p.viewport(a),d.updateMatrices(c,t),r=d.getFrustum(),E(n,l,d.camera,c,this.type)}!0!==d.isPointLightShadow&&this.type===i.dwk&&v(d,l),d.needsUpdate=!1}_=this.type,m.needsUpdate=!1,t.setRenderTarget(h,c,d)}}const Me={[i.BVF]:i.Se2,[i.Zr5]:i.w$m,[i.eD]:i.M6v,[i.vCF]:i.ksN,[i.Se2]:i.BVF,[i.w$m]:i.Zr5,[i.M6v]:i.eD,[i.ksN]:i.vCF};function Te(t,e){const n=new function(){let e=!1;const n=new i.Ltg;let r=null;const s=new i.Ltg(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,i,r,o,a){!0===a&&(e*=o,i*=o,r*=o),n.set(e,i,r,o),!1===s.equals(n)&&(t.clearColor(e,i,r,o),s.copy(n))},reset:function(){e=!1,r=null,s.set(-1,0,0,0)}}},r=new function(){let n=!1,r=!1,s=null,o=null,a=null;return{setReversed:function(t){if(r!==t){const n=e.get("EXT_clip_control");t?n.clipControlEXT(n.LOWER_LEFT_EXT,n.ZERO_TO_ONE_EXT):n.clipControlEXT(n.LOWER_LEFT_EXT,n.NEGATIVE_ONE_TO_ONE_EXT),r=t;const i=a;a=null,this.setClear(i)}},getReversed:function(){return r},setTest:function(e){e?z(t.DEPTH_TEST):G(t.DEPTH_TEST)},setMask:function(e){s===e||n||(t.depthMask(e),s=e)},setFunc:function(e){if(r&&(e=Me[e]),o!==e){switch(e){case i.BVF:t.depthFunc(t.NEVER);break;case i.Se2:t.depthFunc(t.ALWAYS);break;case i.Zr5:t.depthFunc(t.LESS);break;case i.vCF:t.depthFunc(t.LEQUAL);break;case i.eD:t.depthFunc(t.EQUAL);break;case i.ksN:t.depthFunc(t.GEQUAL);break;case i.w$m:t.depthFunc(t.GREATER);break;case i.M6v:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}o=e}},setLocked:function(t){n=t},setClear:function(e){a!==e&&(r&&(e=1-e),t.clearDepth(e),a=e)},reset:function(){n=!1,s=null,o=null,a=null,r=!1}}},s=new function(){let e=!1,n=null,i=null,r=null,s=null,o=null,a=null,l=null,h=null;return{setTest:function(n){e||(n?z(t.STENCIL_TEST):G(t.STENCIL_TEST))},setMask:function(i){n===i||e||(t.stencilMask(i),n=i)},setFunc:function(e,n,o){i===e&&r===n&&s===o||(t.stencilFunc(e,n,o),i=e,r=n,s=o)},setOp:function(e,n,i){o===e&&a===n&&l===i||(t.stencilOp(e,n,i),o=e,a=n,l=i)},setLocked:function(t){e=t},setClear:function(e){h!==e&&(t.clearStencil(e),h=e)},reset:function(){e=!1,n=null,i=null,r=null,s=null,o=null,a=null,l=null,h=null}}},o=new WeakMap,a=new WeakMap;let l={},h={},c=new WeakMap,u=[],d=null,p=!1,f=null,A=null,g=null,m=null,_=null,v=null,y=null,E=new i.Ilk(0,0,0),x=0,C=!1,b=null,w=null,S=null,I=null,M=null;const T=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let B=!1,R=0;const P=t.getParameter(t.VERSION);-1!==P.indexOf("WebGL")?(R=parseFloat(/^WebGL (\d)/.exec(P)[1]),B=R>=1):-1!==P.indexOf("OpenGL ES")&&(R=parseFloat(/^OpenGL ES (\d)/.exec(P)[1]),B=R>=2);let D=null,L={};const U=t.getParameter(t.SCISSOR_BOX),N=t.getParameter(t.VIEWPORT),O=(new i.Ltg).fromArray(U),F=(new i.Ltg).fromArray(N);function k(e,n,i,r){const s=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let o=0;o<i;o++)e===t.TEXTURE_3D||e===t.TEXTURE_2D_ARRAY?t.texImage3D(n,0,t.RGBA,1,1,r,0,t.RGBA,t.UNSIGNED_BYTE,s):t.texImage2D(n+o,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,s);return o}const Q={};function z(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function G(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}Q[t.TEXTURE_2D]=k(t.TEXTURE_2D,t.TEXTURE_2D,1),Q[t.TEXTURE_CUBE_MAP]=k(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),Q[t.TEXTURE_2D_ARRAY]=k(t.TEXTURE_2D_ARRAY,t.TEXTURE_2D_ARRAY,1,1),Q[t.TEXTURE_3D]=k(t.TEXTURE_3D,t.TEXTURE_3D,1,1),n.setClear(0,0,0,1),r.setClear(1),s.setClear(0),z(t.DEPTH_TEST),r.setFunc(i.vCF),W(!1),q(i.tm_),z(t.CULL_FACE),j(i.jFi);const H={[i.bGH]:t.FUNC_ADD,[i.Wbm]:t.FUNC_SUBTRACT,[i.rOj]:t.FUNC_REVERSE_SUBTRACT};H[i.r_]=t.MIN,H[i.Sm8]=t.MAX;const V={[i.c8b]:t.ZERO,[i.ghN]:t.ONE,[i.KhW]:t.SRC_COLOR,[i.k74]:t.SRC_ALPHA,[i.RlZ]:t.SRC_ALPHA_SATURATE,[i.Vdb]:t.DST_COLOR,[i.fSK]:t.DST_ALPHA,[i.iWC]:t.ONE_MINUS_SRC_COLOR,[i.LgZ]:t.ONE_MINUS_SRC_ALPHA,[i.Wpd]:t.ONE_MINUS_DST_COLOR,[i.Hy8]:t.ONE_MINUS_DST_ALPHA,[i._wr]:t.CONSTANT_COLOR,[i.Cy]:t.ONE_MINUS_CONSTANT_COLOR,[i.jes]:t.CONSTANT_ALPHA,[i.NKc]:t.ONE_MINUS_CONSTANT_ALPHA};function j(e,n,r,s,o,a,l,h,c,u){if(e!==i.jFi){if(!1===p&&(z(t.BLEND),p=!0),e===i.Xaj)o=o||n,a=a||r,l=l||s,n===A&&o===_||(t.blendEquationSeparate(H[n],H[o]),A=n,_=o
vendor: 5,180 bytes, line 2
2),r===g&&s===m&&a===v&&l===y||(t.blendFuncSeparate(V[r],V[s],V[a],V[l]),g=r,m=s,v=a,y=l),!1!==h.equals(E)&&c===x||(t.blendColor(h.r,h.g,h.b,c),E.copy(h),x=c),f=e,C=!1;else if(e!==f||u!==C){if(A===i.bGH&&_===i.bGH||(t.blendEquation(t.FUNC_ADD),A=i.bGH,_=i.bGH),u)switch(e){case i.bdR:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case i.WMw:t.blendFunc(t.ONE,t.ONE);break;case i.N4l:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case i.M5h:t.blendFuncSeparate(t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ZERO,t.ONE);break;default:(0,i.vUy)("WebGLState: Invalid blending: ",e)}else switch(e){case i.bdR:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case i.WMw:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE,t.ONE,t.ONE);break;case i.N4l:(0,i.vUy)("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case i.M5h:(0,i.vUy)("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:(0,i.vUy)("WebGLState: Invalid blending: ",e)}g=null,m=null,v=null,y=null,E.set(0,0,0),x=0,f=e,C=u}}else!0===p&&(G(t.BLEND),p=!1)}function W(e){b!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),b=e)}function q(e){e!==i.PeU?(z(t.CULL_FACE),e!==w&&(e===i.tm_?t.cullFace(t.BACK):e===i.S2y?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):G(t.CULL_FACE),w=e}function X(e,n,i){e?(z(t.POLYGON_OFFSET_FILL),I===n&&M===i||(t.polygonOffset(n,i),I=n,M=i)):G(t.POLYGON_OFFSET_FILL)}return{buffers:{color:n,depth:r,stencil:s},enable:z,disable:G,bindFramebuffer:function(e,n){return h[e]!==n&&(t.bindFramebuffer(e,n),h[e]=n,e===t.DRAW_FRAMEBUFFER&&(h[t.FRAMEBUFFER]=n),e===t.FRAMEBUFFER&&(h[t.DRAW_FRAMEBUFFER]=n),!0)},drawBuffers:function(e,n){let i=u,r=!1;if(e){i=c.get(n),void 0===i&&(i=[],c.set(n,i));const s=e.textures;if(i.length!==s.length||i[0]!==t.COLOR_ATTACHMENT0){for(let e=0,n=s.length;e<n;e++)i[e]=t.COLOR_ATTACHMENT0+e;i.length=s.length,r=!0}}else i[0]!==t.BACK&&(i[0]=t.BACK,r=!0);r&&t.drawBuffers(i)},useProgram:function(e){return d!==e&&(t.useProgram(e),d=e,!0)},setBlending:j,setMaterial:function(e,o){e.side===i.ehD?G(t.CULL_FACE):z(t.CULL_FACE);let a=e.side===i._Li;o&&(a=!a),W(a),e.blending===i.bdR&&!1===e.transparent?j(i.jFi):j(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.blendColor,e.blendAlpha,e.premultipliedAlpha),r.setFunc(e.depthFunc),r.setTest(e.depthTest),r.setMask(e.depthWrite),n.setMask(e.colorWrite);const l=e.stencilWrite;s.setTest(l),l&&(s.setMask(e.stencilWriteMask),s.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),s.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),X(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?z(t.SAMPLE_ALPHA_TO_COVERAGE):G(t.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided:W,setCullFace:q,setLineWidth:function(e){e!==S&&(B&&t.lineWidth(e),S=e)},setPolygonOffset:X,setScissorTest:function(e){e?z(t.SCISSOR_TEST):G(t.SCISSOR_TEST)},activeTexture:function(e){void 0===e&&(e=t.TEXTURE0+T-1),D!==e&&(t.activeTexture(e),D=e)},bindTexture:function(e,n,i){void 0===i&&(i=null===D?t.TEXTURE0+T-1:D);let r=L[i];void 0===r&&(r={type:void 0,texture:void 0},L[i]=r),r.type===e&&r.texture===n||(D!==i&&(t.activeTexture(i),D=i),t.bindTexture(e,n||Q[e]),r.type=e,r.texture=n)},unbindTexture:function(){const e=L[D];void 0!==e&&void 0!==e.type&&(t.bindTexture(e.type,null),e.type=void 0,e.texture=void 0)},compressedTexImage2D:function(){try{t.compressedTexImage2D(...arguments)}catch(t){t("WebGLState:",t)}},compressedTexImage3D:function(){try{t.compressedTexImage3D(...arguments)}catch(t){t("WebGLState:",t)}},texImage2D:function(){try{t.texImage2D(...arguments)}catch(t){t("WebGLState:",t)}},texImage3D:function(){try{t.texImage3D(...arguments)}catch(t){t("WebGLState:",t)}},updateUBOMapping:function(e,n){let i=a.get(n);void 0===i&&(i=new WeakMap,a.set(n,i));let r=i.get(e);void 0===r&&(r=t.getUniformBlockIndex(n,e.name),i.set(e,r))},uniformBlockBinding:function(e,n){const i=a.get(n).get(e);o.get(n)!==i&&(t.uniformBlockBinding(n,i,e.__bindingPointIndex),o.set(n,i))},texStorage2D:function(){try{t.texStorage2D(...arguments)}catch(t){t("WebGLState:",t)}},texStorage3D:function(){try{t.texStorage3D(...arguments)}catch(t){t("WebGLState:",t)}},texSubImage2D:function(){try{t.texSubImage2D(...arguments)}catch(t){t("WebGLState:",t)}},texSubImage3D:function(){try{t.texSubImage3D(...arguments)}catch(t){t("WebGLState:",t)}},compressedTexSubImage2D:function(){try{t.compressedTexSubImage2D(...arguments)}catch(t){t("WebGLState:",t)}},compressedTexSubImage3D:function(){try{t.compressedTexSubImage3D(...arguments)}catch(t){t("WebGLState:",t)}},scissor:function(e){!1===O.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),O.copy(e))},viewport:function(e){!1===F.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),F.copy(e))},reset:function(){t.disable(t.BLEND),t.disable(t.CULL_FACE),t.disable(t.DEPTH_TEST),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SCISSOR_TEST),t.disable(t.STENCIL_TEST),t.disable(t.SAMPLE_ALPHA_TO_COVERAGE),t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ZERO),t.blendFuncSeparate(t.ONE,t.ZERO,t.ONE,t.ZERO),t.blendColor
vendor: 5,055 bytes, line 2
2(0,0,0,0),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(t.LESS),r.setReversed(!1),t.clearDepth(1),t.stencilMask(4294967295),t.stencilFunc(t.ALWAYS,0,4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.clearStencil(0),t.cullFace(t.BACK),t.frontFace(t.CCW),t.polygonOffset(0,0),t.activeTexture(t.TEXTURE0),t.bindFramebuffer(t.FRAMEBUFFER,null),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),t.bindFramebuffer(t.READ_FRAMEBUFFER,null),t.useProgram(null),t.lineWidth(1),t.scissor(0,0,t.canvas.width,t.canvas.height),t.viewport(0,0,t.canvas.width,t.canvas.height),l={},D=null,L={},h={},c=new WeakMap,u=[],d=null,p=!1,f=null,A=null,g=null,m=null,_=null,v=null,y=null,E=new i.Ilk(0,0,0),x=0,C=!1,b=null,w=null,S=null,I=null,M=null,O.set(0,0,t.canvas.width,t.canvas.height),F.set(0,0,t.canvas.width,t.canvas.height),n.reset(),r.reset(),s.reset()}}}function Be(t,e,n,r,s,o,a){const l=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,h="undefined"!=typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),c=new i.FM8,u=new WeakMap;let d;const p=new WeakMap;let f=!1;try{f="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(t){}function A(t,e){return f?new OffscreenCanvas(t,e):(0,i.cac)("canvas")}function g(t,e,n){let r=1;const s=V(t);if((s.width>n||s.height>n)&&(r=n/Math.max(s.width,s.height)),r<1){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof VideoFrame&&t instanceof VideoFrame){const n=Math.floor(r*s.width),o=Math.floor(r*s.height);void 0===d&&(d=A(n,o));const a=e?A(n,o):d;a.width=n,a.height=o;return a.getContext("2d").drawImage(t,0,0,n,o),(0,i.ZK6)("WebGLRenderer: Texture has been resized from ("+s.width+"x"+s.height+") to ("+n+"x"+o+")."),a}return"data"in t&&(0,i.ZK6)("WebGLRenderer: Image in DataTexture is too big ("+s.width+"x"+s.height+")."),t}return t}function m(t){return t.generateMipmaps}function _(e){t.generateMipmap(e)}function v(e){return e.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:e.isWebGL3DRenderTarget?t.TEXTURE_3D:e.isWebGLArrayRenderTarget||e.isCompressedArrayTexture?t.TEXTURE_2D_ARRAY:t.TEXTURE_2D}function y(n,r,s,o,a=!1){if(null!==n){if(void 0!==t[n])return t[n];(0,i.ZK6)("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let l=r;if(r===t.RED&&(s===t.FLOAT&&(l=t.R32F),s===t.HALF_FLOAT&&(l=t.R16F),s===t.UNSIGNED_BYTE&&(l=t.R8)),r===t.RED_INTEGER&&(s===t.UNSIGNED_BYTE&&(l=t.R8UI),s===t.UNSIGNED_SHORT&&(l=t.R16UI),s===t.UNSIGNED_INT&&(l=t.R32UI),s===t.BYTE&&(l=t.R8I),s===t.SHORT&&(l=t.R16I),s===t.INT&&(l=t.R32I)),r===t.RG&&(s===t.FLOAT&&(l=t.RG32F),s===t.HALF_FLOAT&&(l=t.RG16F),s===t.UNSIGNED_BYTE&&(l=t.RG8)),r===t.RG_INTEGER&&(s===t.UNSIGNED_BYTE&&(l=t.RG8UI),s===t.UNSIGNED_SHORT&&(l=t.RG16UI),s===t.UNSIGNED_INT&&(l=t.RG32UI),s===t.BYTE&&(l=t.RG8I),s===t.SHORT&&(l=t.RG16I),s===t.INT&&(l=t.RG32I)),r===t.RGB_INTEGER&&(s===t.UNSIGNED_BYTE&&(l=t.RGB8UI),s===t.UNSIGNED_SHORT&&(l=t.RGB16UI),s===t.UNSIGNED_INT&&(l=t.RGB32UI),s===t.BYTE&&(l=t.RGB8I),s===t.SHORT&&(l=t.RGB16I),s===t.INT&&(l=t.RGB32I)),r===t.RGBA_INTEGER&&(s===t.UNSIGNED_BYTE&&(l=t.RGBA8UI),s===t.UNSIGNED_SHORT&&(l=t.RGBA16UI),s===t.UNSIGNED_INT&&(l=t.RGBA32UI),s===t.BYTE&&(l=t.RGBA8I),s===t.SHORT&&(l=t.RGBA16I),s===t.INT&&(l=t.RGBA32I)),r===t.RGB&&(s===t.UNSIGNED_INT_5_9_9_9_REV&&(l=t.RGB9_E5),s===t.UNSIGNED_INT_10F_11F_11F_REV&&(l=t.R11F_G11F_B10F)),r===t.RGBA){const e=a?i.l6D:i.epp.getTransfer(o);s===t.FLOAT&&(l=t.RGBA32F),s===t.HALF_FLOAT&&(l=t.RGBA16F),s===t.UNSIGNED_BYTE&&(l=e===i.j17?t.SRGB8_ALPHA8:t.RGBA8),s===t.UNSIGNED_SHORT_4_4_4_4&&(l=t.RGBA4),s===t.UNSIGNED_SHORT_5_5_5_1&&(l=t.RGB5_A1)}return l!==t.R16F&&l!==t.R32F&&l!==t.RG16F&&l!==t.RG32F&&l!==t.RGBA16F&&l!==t.RGBA32F||e.get("EXT_color_buffer_float"),l}function E(e,n){let r;return e?null===n||n===i.JQ4||n===i.wJv?r=t.DEPTH24_STENCIL8:n===i.VzW?r=t.DEPTH32F_STENCIL8:n===i.LsT&&(r=t.DEPTH24_STENCIL8,(0,i.ZK6)("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===n||n===i.JQ4||n===i.wJv?r=t.DEPTH_COMPONENT24:n===i.VzW?r=t.DEPTH_COMPONENT32F:n===i.LsT&&(r=t.DEPTH_COMPONENT16),r}function x(t,e){return!0===m(t)||t.isFramebufferTexture&&t.minFilter!==i.TyD&&t.minFilter!==i.wem?Math.log2(Math.max(e.width,e.height))+1:void 0!==t.mipmaps&&t.mipmaps.length>0?t.mipmaps.length:t.isCompressedTexture&&Array.isArray(t.image)?e.mipmaps.length:1}function C(t){const e=t.target;e.removeEventListener("dispose",C),function(t){const e=r.get(t);if(void 0===e.__webglInit)return;const n=t.source,i=p.get(n);if(i){const r=i[e.__cacheKey];r.usedTimes--,0===r.usedTimes&&w(t),0===Object.keys(i).length&&p.delete(n)}r.remove(t)}(e),e.isVideoTexture&&u.delete(e)}function b(e){const n=e.target;n.removeEventListener("dispose",b),function(e){const n=r.get(e);e.depthTexture&&(e.depthTexture.dispose(),r.remove(e.depthTexture));
vendor: 7,168 bytes, line 2
2if(e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++){if(Array.isArray(n.__webglFramebuffer[e]))for(let i=0;i<n.__webglFramebuffer[e].length;i++)t.deleteFramebuffer(n.__webglFramebuffer[e][i]);else t.deleteFramebuffer(n.__webglFramebuffer[e]);n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[e])}else{if(Array.isArray(n.__webglFramebuffer))for(let e=0;e<n.__webglFramebuffer.length;e++)t.deleteFramebuffer(n.__webglFramebuffer[e]);else t.deleteFramebuffer(n.__webglFramebuffer);if(n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer),n.__webglMultisampledFramebuffer&&t.deleteFramebuffer(n.__webglMultisampledFramebuffer),n.__webglColorRenderbuffer)for(let e=0;e<n.__webglColorRenderbuffer.length;e++)n.__webglColorRenderbuffer[e]&&t.deleteRenderbuffer(n.__webglColorRenderbuffer[e]);n.__webglDepthRenderbuffer&&t.deleteRenderbuffer(n.__webglDepthRenderbuffer)}const i=e.textures;for(let e=0,n=i.length;e<n;e++){const n=r.get(i[e]);n.__webglTexture&&(t.deleteTexture(n.__webglTexture),a.memory.textures--),r.remove(i[e])}r.remove(e)}(n)}function w(e){const n=r.get(e);t.deleteTexture(n.__webglTexture);const i=e.source;delete p.get(i)[n.__cacheKey],a.memory.textures--}let S=0;function I(e,s){const o=r.get(e);if(e.isVideoTexture&&function(t){const e=a.render.frame;u.get(t)!==e&&(u.set(t,e),t.update())}(e),!1===e.isRenderTargetTexture&&!0!==e.isExternalTexture&&e.version>0&&o.__version!==e.version){const t=e.image;if(null===t)(0,i.ZK6)("WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==t.complete)return void L(o,e,s);(0,i.ZK6)("WebGLRenderer: Texture marked for update but image is incomplete")}}else e.isExternalTexture&&(o.__webglTexture=e.sourceTexture?e.sourceTexture:null);n.bindTexture(t.TEXTURE_2D,o.__webglTexture,t.TEXTURE0+s)}const M={[i.rpg]:t.REPEAT,[i.uWy]:t.CLAMP_TO_EDGE,[i.OoA]:t.MIRRORED_REPEAT},T={[i.TyD]:t.NEAREST,[i.YLQ]:t.NEAREST_MIPMAP_NEAREST,[i.aH4]:t.NEAREST_MIPMAP_LINEAR,[i.wem]:t.LINEAR,[i.qyh]:t.LINEAR_MIPMAP_NEAREST,[i.D1R]:t.LINEAR_MIPMAP_LINEAR},B={[i.xoQ]:t.NEVER,[i.T6w]:t.ALWAYS,[i.D67]:t.LESS,[i.M$G]:t.LEQUAL,[i.F1y]:t.EQUAL,[i.Jjb]:t.GEQUAL,[i.Zen]:t.GREATER,[i.O78]:t.NOTEQUAL};function R(n,o){if(o.type!==i.VzW||!1!==e.has("OES_texture_float_linear")||o.magFilter!==i.wem&&o.magFilter!==i.qyh&&o.magFilter!==i.aH4&&o.magFilter!==i.D1R&&o.minFilter!==i.wem&&o.minFilter!==i.qyh&&o.minFilter!==i.aH4&&o.minFilter!==i.D1R||(0,i.ZK6)("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(n,t.TEXTURE_WRAP_S,M[o.wrapS]),t.texParameteri(n,t.TEXTURE_WRAP_T,M[o.wrapT]),n!==t.TEXTURE_3D&&n!==t.TEXTURE_2D_ARRAY||t.texParameteri(n,t.TEXTURE_WRAP_R,M[o.wrapR]),t.texParameteri(n,t.TEXTURE_MAG_FILTER,T[o.magFilter]),t.texParameteri(n,t.TEXTURE_MIN_FILTER,T[o.minFilter]),o.compareFunction&&(t.texParameteri(n,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(n,t.TEXTURE_COMPARE_FUNC,B[o.compareFunction])),!0===e.has("EXT_texture_filter_anisotropic")){if(o.magFilter===i.TyD)return;if(o.minFilter!==i.aH4&&o.minFilter!==i.D1R)return;if(o.type===i.VzW&&!1===e.has("OES_texture_float_linear"))return;if(o.anisotropy>1||r.get(o).__currentAnisotropy){const i=e.get("EXT_texture_filter_anisotropic");t.texParameterf(n,i.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,s.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy}}}function P(e,n){let i=!1;void 0===e.__webglInit&&(e.__webglInit=!0,n.addEventListener("dispose",C));const r=n.source;let s=p.get(r);void 0===s&&(s={},p.set(r,s));const o=function(t){const e=[];return e.push(t.wrapS),e.push(t.wrapT),e.push(t.wrapR||0),e.push(t.magFilter),e.push(t.minFilter),e.push(t.anisotropy),e.push(t.internalFormat),e.push(t.format),e.push(t.type),e.push(t.generateMipmaps),e.push(t.premultiplyAlpha),e.push(t.flipY),e.push(t.unpackAlignment),e.push(t.colorSpace),e.join()}(n);if(o!==e.__cacheKey){void 0===s[o]&&(s[o]={texture:t.createTexture(),usedTimes:0},a.memory.textures++,i=!0),s[o].usedTimes++;const r=s[e.__cacheKey];void 0!==r&&(s[e.__cacheKey].usedTimes--,0===r.usedTimes&&w(n)),e.__cacheKey=o,e.__webglTexture=s[o].texture}return i}function D(t,e,n){return Math.floor(Math.floor(t/n)/e)}function L(e,a,l){let h=t.TEXTURE_2D;(a.isDataArrayTexture||a.isCompressedArrayTexture)&&(h=t.TEXTURE_2D_ARRAY),a.isData3DTexture&&(h=t.TEXTURE_3D);const c=P(e,a),u=a.source;n.bindTexture(h,e.__webglTexture,t.TEXTURE0+l);const d=r.get(u);if(u.version!==d.__version||!0===c){n.activeTexture(t.TEXTURE0+l);const e=i.epp.getPrimaries(i.epp.workingColorSpace),r=a.colorSpace===i.aCh?null:i.epp.getPrimaries(a.colorSpace),p=a.colorSpace===i.aCh||e===r?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,a.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,a.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,p);let f=g(a.image,!1,s.maxTextureSize);f=H(a,f);const A=o.convert(a.format,a.colorSpace),v=o.convert(a.type);let C,b=y(a.internalFormat,A,v,a.colorSpace,a.isVideoTexture);R(h,a);const w=a.mipmaps,S=!0!==a.isVideoTexture,I=void 0===d.__version||!0===c,M=u.dataReady,T=x(a,f);if(a.isDepthTexture)b=E(a.format===i.brP,a.type),I&&(S?n.texStorage2D(t.TEXTURE_2D,1,b,f.width,f.height):n.texImage2D(t.TEXTURE_2D,0,b,f.width,f.height,0,A,v,null));else if(a.isDataTexture)if(w.length>0){S&&I&&n.texStorage2D(t.TEXTURE_2D,T,b,w[0].width,w[0].height);for(let e=0,i=w.length;e<i;e++)C=w[e],S?M&&n.texSubImage2D(t.TEXTURE_2D,e,0,0,C.width,C.height,A,v,C.data):n.texImage2D(t.TEXTURE_2D,e,b,C.width,C.height,0,A,v,C.data);a.generateMipmaps=!1}else S?(I&&n.texStorage2D(t.TEXTURE_2D,T,b,f.width,f.height),M&&function(e,i,r,s){const o=e.updateRanges;if(0===o.length)n.texSubImage2D(t.TEXTURE_2D,0,0,0,i.width,i.height,r,s,i.data);else{o.sort(((t,e)=>t.start-e.start));let a=0;for(let t=1;t<o.length;t++){const e=o[a],n=o[t],r=e.start+e.count,s=D(n.start,i.width,4),l=D(e.start,i.width,4);n.start<=r+1&&s===l&&D(n.start+n.count-1,i.width,4)===s?e.count=Math.max(e.count,n.start+n.count-e.start):(++a,o[a]=n)}o.length=a+1;const l=t.getParameter(t.UNPACK_ROW_LENGTH),h=t.getParameter(t.UNPACK_SKIP_PIXELS),c=t.getParameter(t.UNPACK_SKIP_ROWS);t.pixelStorei(t.UNPACK_ROW_LENGTH,i.width);for(let e=0,a=o.length;e<a;e++){const a=o[e],l=Math.floor(a.start/4),h=Math.ceil(a.count/4),c=l%i.width,u=Math.floor(l/i.width),d=h,p=1;t.pixelStorei(t.UNPACK_SKIP_PIXELS,c),t.pixelStorei(t.UNPACK_SKIP_ROWS,u),n.texSubImage2D(t.TEXTURE_2D,0,c,u,d,p,r,s,i.data)}e.clearUpdateRanges(),t.pixelStorei(t.UNPACK_ROW_LENGTH,l),t.pixelStorei(t.UNPACK_SKIP_PIXELS,h),t.pixelStorei(t.UNPACK_SKIP_ROWS,c)}}(a,f,A,v)):n.texImage2D(t.TEXTURE_2D,0,b,f.width,f.height,0,A,v,f.data);else if(a.isCompressedTexture)if(a.isCompressedArrayTexture){S&&I&&n.texStorage3D(t.TEXTURE_2D_ARRAY,T,b,w[0].width,w[0].height,f.depth);for(let e=0,r=w.length;e<r;e++)if(C=w[e],a.format!==i.wk1)if(null!==A)if(S){if(M)if(a.layerUpdates.size>0){const r=(0,i.EcG)(C.width,C.height,a.format,a.type);for(const i of a.layerUpdates){const s=C.data.subarray(i*r/C.data.BYTES_PER_ELEMENT,(i+1)
vendor: 7,422 bytes, line 2
2*r/C.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,e,0,0,i,C.width,C.height,1,A,s)}a.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,e,0,0,0,C.width,C.height,f.depth,A,C.data)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,e,b,C.width,C.height,f.depth,0,C.data,0,0);else(0,i.ZK6)("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else S?M&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,e,0,0,0,C.width,C.height,f.depth,A,v,C.data):n.texImage3D(t.TEXTURE_2D_ARRAY,e,b,C.width,C.height,f.depth,0,A,v,C.data)}else{S&&I&&n.texStorage2D(t.TEXTURE_2D,T,b,w[0].width,w[0].height);for(let e=0,r=w.length;e<r;e++)C=w[e],a.format!==i.wk1?null!==A?S?M&&n.compressedTexSubImage2D(t.TEXTURE_2D,e,0,0,C.width,C.height,A,C.data):n.compressedTexImage2D(t.TEXTURE_2D,e,b,C.width,C.height,0,C.data):(0,i.ZK6)("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):S?M&&n.texSubImage2D(t.TEXTURE_2D,e,0,0,C.width,C.height,A,v,C.data):n.texImage2D(t.TEXTURE_2D,e,b,C.width,C.height,0,A,v,C.data)}else if(a.isDataArrayTexture)if(S){if(I&&n.texStorage3D(t.TEXTURE_2D_ARRAY,T,b,f.width,f.height,f.depth),M)if(a.layerUpdates.size>0){const e=(0,i.EcG)(f.width,f.height,a.format,a.type);for(const i of a.layerUpdates){const r=f.data.subarray(i*e/f.data.BYTES_PER_ELEMENT,(i+1)*e/f.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,i,f.width,f.height,1,A,v,r)}a.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,f.width,f.height,f.depth,A,v,f.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,b,f.width,f.height,f.depth,0,A,v,f.data);else if(a.isData3DTexture)S?(I&&n.texStorage3D(t.TEXTURE_3D,T,b,f.width,f.height,f.depth),M&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,f.width,f.height,f.depth,A,v,f.data)):n.texImage3D(t.TEXTURE_3D,0,b,f.width,f.height,f.depth,0,A,v,f.data);else if(a.isFramebufferTexture){if(I)if(S)n.texStorage2D(t.TEXTURE_2D,T,b,f.width,f.height);else{let e=f.width,i=f.height;for(let r=0;r<T;r++)n.texImage2D(t.TEXTURE_2D,r,b,e,i,0,A,v,null),e>>=1,i>>=1}}else if(w.length>0){if(S&&I){const e=V(w[0]);n.texStorage2D(t.TEXTURE_2D,T,b,e.width,e.height)}for(let e=0,i=w.length;e<i;e++)C=w[e],S?M&&n.texSubImage2D(t.TEXTURE_2D,e,0,0,A,v,C):n.texImage2D(t.TEXTURE_2D,e,b,A,v,C);a.generateMipmaps=!1}else if(S){if(I){const e=V(f);n.texStorage2D(t.TEXTURE_2D,T,b,e.width,e.height)}M&&n.texSubImage2D(t.TEXTURE_2D,0,0,0,A,v,f)}else n.texImage2D(t.TEXTURE_2D,0,b,A,v,f);m(a)&&_(h),d.__version=u.version,a.onUpdate&&a.onUpdate(a)}e.__version=a.version}function U(e,i,s,a,h,c){const u=o.convert(s.format,s.colorSpace),d=o.convert(s.type),p=y(s.internalFormat,u,d,s.colorSpace),f=r.get(i),A=r.get(s);if(A.__renderTarget=i,!f.__hasExternalTextures){const e=Math.max(1,i.width>>c),r=Math.max(1,i.height>>c);h===t.TEXTURE_3D||h===t.TEXTURE_2D_ARRAY?n.texImage3D(h,c,p,e,r,i.depth,0,u,d,null):n.texImage2D(h,c,p,e,r,0,u,d,null)}n.bindFramebuffer(t.FRAMEBUFFER,e),G(i)?l.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,a,h,A.__webglTexture,0,z(i)):(h===t.TEXTURE_2D||h>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&h<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,a,h,A.__webglTexture,c),n.bindFramebuffer(t.FRAMEBUFFER,null)}function N(e,n,i){if(t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer){const r=n.depthTexture,s=r&&r.isDepthTexture?r.type:null,o=E(n.stencilBuffer,s),a=n.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,h=z(n);G(n)?l.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,h,o,n.width,n.height):i?t.renderbufferStorageMultisample(t.RENDERBUFFER,h,o,n.width,n.height):t.renderbufferStorage(t.RENDERBUFFER,o,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,a,t.RENDERBUFFER,e)}else{const e=n.textures;for(let r=0;r<e.length;r++){const s=e[r],a=o.convert(s.format,s.colorSpace),h=o.convert(s.type),c=y(s.internalFormat,a,h,s.colorSpace),u=z(n);i&&!1===G(n)?t.renderbufferStorageMultisample(t.RENDERBUFFER,u,c,n.width,n.height):G(n)?l.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,u,c,n.width,n.height):t.renderbufferStorage(t.RENDERBUFFER,c,n.width,n.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function O(e,s){if(s&&s.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(t.FRAMEBUFFER,e),!s.depthTexture||!s.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const o=r.get(s.depthTexture);o.__renderTarget=s,o.__webglTexture&&s.depthTexture.image.width===s.width&&s.depthTexture.image.height===s.height||(s.depthTexture.image.width=s.width,s.depthTexture.image.height=s.height,s.depthTexture.needsUpdate=!0),I(s.depthTexture,0);const a=o.__webglTexture,h=z(s);if(s.depthTexture.format===i.qkB)G(s)?l.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,a,0,h):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,a,0);else{if(s.depthTexture.format!==i.brP)throw new Error("Unknown depthTexture format");G(s)?l.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,a,0,h):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,a,0)}}function F(e){const i=r.get(e),s=!0===e.isWebGLCubeRenderTarget;if(i.__boundDepthTexture!==e.depthTexture){const t=e.depthTexture;if(i.__depthDisposeCallback&&i.__depthDisposeCallback(),t){const e=()=>{delete i.__boundDepthTexture,delete i.__depthDisposeCallback,t.removeEventListener("dispose",e)};t.addEventListener("dispose",e),i.__depthDisposeCallback=e}i.__boundDepthTexture=t}if(e.depthTexture&&!i.__autoAllocateDepthBuffer){if(s)throw new Error("target.depthTexture not supported in Cube render targets");const t=e.texture.mipmaps;t&&t.length>0?O(i.__webglFramebuffer[0],e):O(i.__webglFramebuffer,e)}else if(s){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)if(n.bindFramebuffer(t.FRAMEBUFFER,i.__webglFramebuffer[r]),void 0===i.__webglDepthbuffer[r])i.__webglDepthbuffer[r]=t.createRenderbuffer(),N(i.__webglDepthbuffer[r],e,!1);else{const n=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,s=i.__webglDepthbuffer[r];t.bindRenderbuffer(t.RENDERBUFFER,s),t.framebufferRenderbuffer(t.FRAMEBUFFER,n,t.RENDERBUFFER,s)}}else{const r=e.texture.mipmaps;if(r&&r.length>0?n.bindFramebuffer(t.FRAMEBUFFER,i.__webglFramebuffer[0]):n.bindFramebuffer(t.FRAMEBUFFER,i.__webglFramebuffer),void 0===i.__webglDepthbuffer)i.__webglDepthbuffer=t.createRenderbuffer(),N(i.__webglDepthbuffer,e,!1);else{const n=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,r=i.__webglDepthbuffer;t.bindRenderbuffer(t.RENDERBUFFER,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,n,t.RENDERBUFFER,r)}}n.bindFramebuffer(t.FRAMEBUFFER,null)}const k=[],Q=[];function z(t){return Math.min(s.maxSamples,t.samples)}function G(t){const n=r.get(t);return t.samples>0&&!0===e.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function H(t,e){const n=t.colorSpace,r=t.format,s=t.type;return!0===t.isCompressedTexture||!0===t.isVideoTexture||n!==i.GUF&&n!==i.aCh&&(i.epp.getTransfer(n)===i.j17?r===i.wk1&&s===i.ywz||(0,i.ZK6)("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):(0,i.vUy)("WebGLTextures: Unsupported texture color space:",n)),e}function V(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?(c.width=t.naturalWi
vendor: 1,267 bytes, line 2
2dth||t.width,c.height=t.naturalHeight||t.height):"undefined"!=typeof VideoFrame&&t instanceof VideoFrame?(c.width=t.displayWidth,c.height=t.displayHeight):(c.width=t.width,c.height=t.height),c}this.allocateTextureUnit=function(){const t=S;return t>=s.maxTextures&&(0,i.ZK6)("WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+s.maxTextures),S+=1,t},this.resetTextureUnits=function(){S=0},this.setTexture2D=I,this.setTexture2DArray=function(e,i){const s=r.get(e);!1===e.isRenderTargetTexture&&e.version>0&&s.__version!==e.version?L(s,e,i):(e.isExternalTexture&&(s.__webglTexture=e.sourceTexture?e.sourceTexture:null),n.bindTexture(t.TEXTURE_2D_ARRAY,s.__webglTexture,t.TEXTURE0+i))},this.setTexture3D=function(e,i){const s=r.get(e);!1===e.isRenderTargetTexture&&e.version>0&&s.__version!==e.version?L(s,e,i):n.bindTexture(t.TEXTURE_3D,s.__webglTexture,t.TEXTURE0+i)},this.setTextureCube=function(e,a){const l=r.get(e);e.version>0&&l.__version!==e.version?function(e,a,l){if(6!==a.image.length)return;const h=P(e,a),c=a.source;n.bindTexture(t.TEXTURE_CUBE_MAP,e.__webglTexture,t.TEXTURE0+l);const u=r.get(c);if(c.version!==u.__version||!0===h){n.activeTexture(t.TEXTURE0+l);const e=i.epp.getPrimaries(i.epp.workingColorSpace),r=a.colorSpace
vendor: 22,276 bytes, line 2
2===i.aCh?null:i.epp.getPrimaries(a.colorSpace),d=a.colorSpace===i.aCh||e===r?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,a.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,a.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);const p=a.isCompressedTexture||a.image[0].isCompressedTexture,f=a.image[0]&&a.image[0].isDataTexture,A=[];for(let t=0;t<6;t++)A[t]=p||f?f?a.image[t].image:a.image[t]:g(a.image[t],!0,s.maxCubemapSize),A[t]=H(a,A[t]);const v=A[0],E=o.convert(a.format,a.colorSpace),C=o.convert(a.type),b=y(a.internalFormat,E,C,a.colorSpace),w=!0!==a.isVideoTexture,S=void 0===u.__version||!0===h,I=c.dataReady;let M,T=x(a,v);if(R(t.TEXTURE_CUBE_MAP,a),p){w&&S&&n.texStorage2D(t.TEXTURE_CUBE_MAP,T,b,v.width,v.height);for(let e=0;e<6;e++){M=A[e].mipmaps;for(let r=0;r<M.length;r++){const s=M[r];a.format!==i.wk1?null!==E?w?I&&n.compressedTexSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,r,0,0,s.width,s.height,E,s.data):n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,r,b,s.width,s.height,0,s.data):(0,i.ZK6)("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):w?I&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,r,0,0,s.width,s.height,E,C,s.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,r,b,s.width,s.height,0,E,C,s.data)}}}else{if(M=a.mipmaps,w&&S){M.length>0&&T++;const e=V(A[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,T,b,e.width,e.height)}for(let e=0;e<6;e++)if(f){w?I&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,0,0,A[e].width,A[e].height,E,C,A[e].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,b,A[e].width,A[e].height,0,E,C,A[e].data);for(let i=0;i<M.length;i++){const r=M[i].image[e].image;w?I&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,i+1,0,0,r.width,r.height,E,C,r.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,i+1,b,r.width,r.height,0,E,C,r.data)}}else{w?I&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,0,0,E,C,A[e]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,b,E,C,A[e]);for(let i=0;i<M.length;i++){const r=M[i];w?I&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,i+1,0,0,E,C,r.image[e]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,i+1,b,E,C,r.image[e])}}}m(a)&&_(t.TEXTURE_CUBE_MAP),u.__version=c.version,a.onUpdate&&a.onUpdate(a)}e.__version=a.version}(l,e,a):n.bindTexture(t.TEXTURE_CUBE_MAP,l.__webglTexture,t.TEXTURE0+a)},this.rebindTextures=function(e,n,i){const s=r.get(e);void 0!==n&&U(s.__webglFramebuffer,e,e.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),void 0!==i&&F(e)},this.setupRenderTarget=function(e){const i=e.texture,s=r.get(e),l=r.get(i);e.addEventListener("dispose",b);const h=e.textures,c=!0===e.isWebGLCubeRenderTarget,u=h.length>1;if(u||(void 0===l.__webglTexture&&(l.__webglTexture=t.createTexture()),l.__version=i.version,a.memory.textures++),c){s.__webglFramebuffer=[];for(let e=0;e<6;e++)if(i.mipmaps&&i.mipmaps.length>0){s.__webglFramebuffer[e]=[];for(let n=0;n<i.mipmaps.length;n++)s.__webglFramebuffer[e][n]=t.createFramebuffer()}else s.__webglFramebuffer[e]=t.createFramebuffer()}else{if(i.mipmaps&&i.mipmaps.length>0){s.__webglFramebuffer=[];for(let e=0;e<i.mipmaps.length;e++)s.__webglFramebuffer[e]=t.createFramebuffer()}else s.__webglFramebuffer=t.createFramebuffer();if(u)for(let e=0,n=h.length;e<n;e++){const n=r.get(h[e]);void 0===n.__webglTexture&&(n.__webglTexture=t.createTexture(),a.memory.textures++)}if(e.samples>0&&!1===G(e)){s.__webglMultisampledFramebuffer=t.createFramebuffer(),s.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,s.__webglMultisampledFramebuffer);for(let n=0;n<h.length;n++){const i=h[n];s.__webglColorRenderbuffer[n]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,s.__webglColorRenderbuffer[n]);const r=o.convert(i.format,i.colorSpace),a=o.convert(i.type),l=y(i.internalFormat,r,a,i.colorSpace,!0===e.isXRRenderTarget),c=z(e);t.renderbufferStorageMultisample(t.RENDERBUFFER,c,l,e.width,e.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+n,t.RENDERBUFFER,s.__webglColorRenderbuffer[n])}t.bindRenderbuffer(t.RENDERBUFFER,null),e.depthBuffer&&(s.__webglDepthRenderbuffer=t.createRenderbuffer(),N(s.__webglDepthRenderbuffer,e,!0)),n.bindFramebuffer(t.FRAMEBUFFER,null)}}if(c){n.bindTexture(t.TEXTURE_CUBE_MAP,l.__webglTexture),R(t.TEXTURE_CUBE_MAP,i);for(let n=0;n<6;n++)if(i.mipmaps&&i.mipmaps.length>0)for(let r=0;r<i.mipmaps.length;r++)U(s.__webglFramebuffer[n][r],e,i,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+n,r);else U(s.__webglFramebuffer[n],e,i,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+n,0);m(i)&&_(t.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(u){for(let i=0,o=h.length;i<o;i++){const o=h[i],a=r.get(o);let l=t.TEXTURE_2D;(e.isWebGL3DRenderTarget||e.isWebGLArrayRenderTarget)&&(l=e.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY),n.bindTexture(l,a.__webglTexture),R(l,o),U(s.__webglFramebuffer,e,o,t.COLOR_ATTACHMENT0+i,l,0),m(o)&&_(l)}n.unbindTexture()}else{let r=t.TEXTURE_2D;if((e.isWebGL3DRenderTarget||e.isWebGLArrayRenderTarget)&&(r=e.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY),n.bindTexture(r,l.__webglTexture),R(r,i),i.mipmaps&&i.mipmaps.length>0)for(let n=0;n<i.mipmaps.length;n++)U(s.__webglFramebuffer[n],e,i,t.COLOR_ATTACHMENT0,r,n);else U(s.__webglFramebuffer,e,i,t.COLOR_ATTACHMENT0,r,0);m(i)&&_(r),n.unbindTexture()}e.depthBuffer&&F(e)},this.updateRenderTargetMipmap=function(t){const e=t.textures;for(let i=0,s=e.length;i<s;i++){const s=e[i];if(m(s)){const e=v(t),i=r.get(s).__webglTexture;n.bindTexture(e,i),_(e),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(e){if(e.samples>0)if(!1===G(e)){const i=e.textures,s=e.width,o=e.height;let a=t.COLOR_BUFFER_BIT;const l=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,c=r.get(e),u=i.length>1;if(u)for(let e=0;e<i.length;e++)n.bindFramebuffer(t.FRAMEBUFFER,c.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+e,t.RENDERBUFFER,null),n.bindFramebuffer(t.FRAMEBUFFER,c.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+e,t.TEXTURE_2D,null,0);n.bindFramebuffer(t.READ_FRAMEBUFFER,c.__webglMultisampledFramebuffer);const d=e.texture.mipmaps;d&&d.length>0?n.bindFramebuffer(t.DRAW_FRAMEBUFFER,c.__webglFramebuffer[0]):n.bindFramebuffer(t.DRAW_FRAMEBUFFER,c.__webglFramebuffer);for(let n=0;n<i.length;n++){if(e.resolveDepthBuffer&&(e.depthBuffer&&(a|=t.DEPTH_BUFFER_BIT),e.stencilBuffer&&e.resolveStencilBuffer&&(a|=t.STENCIL_BUFFER_BIT)),u){t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,c.__webglColorRenderbuffer[n]);const e=r.get(i[n]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0)}t.blitFramebuffer(0,0,s,o,0,0,s,o,a,t.NEAREST),!0===h&&(k.length=0,Q.length=0,k.push(t.COLOR_ATTACHMENT0+n),e.depthBuffer&&!1===e.resolveDepthBuffer&&(k.push(l),Q.push(l),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,Q)),t.invalidateFramebuffer(t.READ_FRAMEBUFFER,k))}if(n.bindFramebuffer(t.READ_FRAMEBUFFER,null),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),u)for(let e=0;e<i.length;e++){n.bindFramebuffer(t.FRAMEBUFFER,c.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+e,t.RENDERBUFFER,c.__webglColorRenderbuffer[e]);const s=r.get(i[e]).__webglTexture;n.bindFramebuffer(t.FRAMEBUFFER,c.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+e,t.TEXTURE_2D,s,0)}n.bindFramebuffer(t.DRAW_FRAMEBUFFER,c.__webglMultisampledFramebuffer)}else if(e.depthBuffer&&!1===e.resolveDepthBuffer&&h){const n=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,[n])}},this.setupDepthRenderbuffer=F,this.setupFrameBufferTexture=U,this.useMultisampledRTT=G}function Re(t,e){return{convert:function(n,r=i.aCh){let s;const o=i.epp.getTransfer(r);if(n===i.ywz)return t.UNSIGNED_BYTE;if(n===i.k0A)return t.UNSIGNED_SHORT_4_4_4_4;if(n===i.irR)return t.UNSIGNED_SHORT_5_5_5_1;if(n===i.tQZ)return t.UNSIGNED_INT_5_9_9_9_REV;if(n===i.dVD)return t.UNSIGNED_INT_10F_11F_11F_REV;if(n===i.T95)return t.BYTE;if(n===i.iAb)return t.SHORT;if(n===i.LsT)return t.UNSIGNED_SHORT;if(n===i.Kz5)return t.INT;if(n===i.JQ4)return t.UNSIGNED_INT;if(n===i.VzW)return t.FLOAT;if(n===i.cLu)return t.HALF_FLOAT;if(n===i.OTo)return t.ALPHA;if(n===i.UCm)return t.RGB;if(n===i.wk1)return t.RGBA;if(n===i.qkB)return t.DEPTH_COMPONENT;if(n===i.brP)return t.DEPTH_STENCIL;if(n===i.hEm)return t.RED;if(n===i.D9w)return t.RED_INTEGER;if(n===i.av9)return t.RG;if(n===i.CtA)return t.RG_INTEGER;if(n===i.E2K)return t.RGBA_INTEGER;if(n===i.wuA||n===i.BFQ||n===i.v3W||n===i.ILR)if(o===i.j17){if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),null===s)return null;if(n===i.wuA)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===i.BFQ)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===i.v3W)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===i.ILR)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(s=e.get("WEBGL_compressed_texture_s3tc"),null===s)return null;if(n===i.wuA)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===i.BFQ)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===i.v3W)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===i.ILR)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===i._AM||n===i.vCx||n===i.eaV||n===i.CaW){if(s=e.get("WEBGL_compressed_texture_pvrtc"),null===s)return null;if(n===i._AM)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===i.vCx)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===i.eaV)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===i.CaW)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===i.fto||n===i.l0P||n===i.ekQ){if(s=e.get("WEBGL_compressed_texture_etc"),null===s)return null;if(n===i.fto||n===i.l0P)return o===i.j17?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===i.ekQ)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}if(n===i.ptH||n===i.jZA||n===i.y2t||n===i.gi4||n===i.Djp||n===i.BG$||n===i.NYV||n===i.xJs||n===i.pKu||n===i.GG6||n===i.Gih||n===i.FUD||n===i.iiP||n===i.SvJ){if(s=e.get("WEBGL_compressed_texture_astc"),null===s)return null;if(n===i.ptH)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===i.jZA)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===i.y2t)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===i.gi4)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===i.Djp)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===i.BG$)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===i.NYV)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===i.xJs)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===i.pKu)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===i.GG6)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===i.Gih)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===i.FUD)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===i.iiP)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===i.SvJ)return o===i.j17?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===i.bsb||n===i.f2y||n===i.QO2){if(s=e.get("EXT_texture_compression_bptc"),null===s)return null;if(n===i.bsb)return o===i.j17?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===i.f2y)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===i.QO2)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}if(n===i.HdW||n===i.vuL||n===i.ZTh||n===i.lGU){if(s=e.get("EXT_texture_compression_rgtc"),null===s)return null;if(n===i.HdW)return s.COMPRESSED_RED_RGTC1_EXT;if(n===i.vuL)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===i.ZTh)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===i.lGU)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return n===i.wJv?t.UNSIGNED_INT_24_8:void 0!==t[n]?t[n]:null}}}class Pe{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e){if(null===this.texture){const n=new i.xnb(t.texture);t.depthNear===e.depthNear&&t.depthFar===e.depthFar||(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=n}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new i.jyz({vertexShader:"\nvoid main() {\n\n\tgl_Position = vec4( position, 1.0 );\n\n}",fragmentShader:"\nuniform sampler2DArray depthColor;\nuniform float depthWidth;\nuniform float depthHeight;\n\nvoid main() {\n\n\tvec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );\n\n\tif ( coord.x >= 1.0 ) {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;\n\n\t} else {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;\n\n\t}\n\n}",uniforms:{depthColor:{value:this.texture},depthWidth:{value:e.z},depthHeight:{value:e.w}}});this.mesh=new i.Kj0(new i._12(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class De extends i.pBf{constructor(t,e){super();const n=this;let s=null,o=1,a=null,l="local-floor",h=1,c=null,u=null,d=null,p=null,f=null,A=null;const g="undefined"!=typeof XRWebGLBinding,m=new Pe,_={},v=e.getContextAttributes();let y=null,E=null;const x=[],C=[],b=new i.FM8;let w=null;const S=new i.cPb;S.viewport=new i.Ltg;const I=new i.cPb;I.viewport=new i.Ltg;const M=[S,I],T=new i.HkE;let B=null,R=null;function P(t){const e=C.indexOf(t.inputSource);if(-1===e)return;const n=x[e];void 0!==n&&(n.update(t.inputSource,t.frame,c||a),n.dispatchEvent({type:t.type,data:t.inputSource}))}function D(){s.removeEventListener("select",P),s.removeEventListener("selectstart",P),s.removeEventListener("selectend",P),s.removeEventListener("squeeze",P),s.removeEventListener("squeezestart",P),s.removeEventListener("squeezeend",P),s.removeEventListener("end",D),s.removeEventListener("inputsourceschange",L);for(let t=0;t<x.length;t++){const e=C[t];null!==e&&(C[t]=null,x[t].disconnect(e))}B=null,R=null,m.reset();for(const t in _)delete _[t];t.setRenderTarget(y),f=null,p=null,d=null,s=null,E=null,k.stop(),n.isPresenting=!1,t.setPixelRatio(w),t.setSize(b.width,b.height,!1),n.dispatchEvent({type:"sessionend"})}function L(t){for(let e=0;e<t.removed.length;e++){const n=t.removed[e],i=C.indexOf(n);i>=0&&(C[i]=null,x[i].disconnect(n))}for(let e=0;e<t.added.length;e++){const n=t.added[e];let i=C.indexOf(n);if(-1===i){for(let t=0;t<x.length;t++){if(t>=C.length){C.push(n),i=t;break}if(null===C[t]){C[t]=n,i=t;break}}if(-1===i)break}const r=x[i];r&&r.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(t){let e=x[t];return void 0===e&&(e=new i.NiX,x[t]=e),e.getTargetRaySpace()},this.getControllerGrip=function(t){let e=x[t];return void 0===e&&(e=new i.NiX,x[t]=e),e.getGripSpace()},this.getHand=function(t){let e=x[t];return void 0===e&&(e=new i.NiX,x[t]=e),e.getHandSpace()},this.setFramebufferScaleFactor=function(t){o=t,!0===n.isPresenting&&(0,i.ZK6)("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(t){l=t,!0===n.isPresenting&&(0,i.ZK6)("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||a},this.setReferenceSpace=function(t){c=t},this.getBaseLayer=function(){return null!==p?p:f},this.getBinding=function(){return null===d&&g&&(d=new XRWebGLBinding(s,e)),d},this.getFrame=function(){return A},this.getSession=function(){return s},this.setSession=async function(r){if(s=r,null!==s){y=t.getRenderTarget(),s.addEventListener("select",P),s.addEventListener("selectstart",P),s.addEventListener("selectend",P),s.addEventListener("squeeze",P),s.addEventListener("squeezestart",P),s.addEventListener("squeezeend",P),s.addEventListener("end",D),s.addEventListener("inputsourceschange",L),!0!==v.xrCompatible&&await e.makeXRCompatible(),w=t.getPixelRatio(),t.getSize(b);if(g&&"createProjectionLayer"in XRWebGLBinding.prototype){let n=null,r=null,a=null;v.depth&&(a=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,n=v.stencil?i.brP:i.qkB,r=v.stencil?i.wJv:i.JQ4);const l={colorFormat:e.RGBA8,depthFormat:a,scaleFactor:o};d=this.getBinding(),p=d.createProjectionLayer(l),s.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),E=new i.dd2(p.textureWidth,p.textureHeight,{format:i.wk1,type:i.ywz,depthTexture:new i.$YQ(p.textureWidth,p.textureHeight,r,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===p.ignoreDepthValues,resolveStencilBuffer:!1===p.ignoreDepthValues})}else{const n={antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:o};f=new XRWebGLLayer(s,e,n),s.updateRenderState({baseLayer:f}),t.setPixelRatio(1),t.setSize(f.framebufferWidth,f.framebufferHeight,!1),E=new i.dd2(f.framebufferWidth,f.framebufferHeight,{format:i.wk1,type:i.ywz,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil,resolveDepthBuffer:!1===f.ignoreDepthValues,resolveStencilBuffer:!1===f.ignoreDepthValues})}E.isXRRenderTarget=!0,this.setFoveation(h),c=null,a=await s.requestReferenceSpace(l),k.setContext(s),k.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==s)return s.environmentBlendMode},this.getDepthTexture=function(){return m.getDepthTexture()};const U=new i.Pa4,N=new i.Pa4;function O(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.copy(t.matrixWorld).invert()}this.updateCamera=function(t){if(null===s)return;let e=t.near,n=t.far;null!==m.texture&&(m.depthNear>0&&(e=m.depthNear),m.depthFar>0&&(n=m.depthFar)),T.near=I.near=S.near=e,T.far=I.far=S.far=n,B===T.near&&R===T.far||(s.updateRenderState({depthNear:T.near,depthFar:T.far}),B=T.near,R=T.far),T.layers.mask=6|t.layers.mask,S.layers.mask=3&T.layers.mask,I.layers.mask=5&T.layers.mask;const r=t.parent,o=T.cameras;O(T,r);for(let t=0;t<o.length;t++)O(o[t],r);2===o.length?function(t,e,n){U.setFromMatrixPosition(e.matrixWorld),N.setFromMatrixPosition(n.matrixWorld);const i=U.distanceTo(N),r=e.projectionMatrix.elements,s=n.projectionMatrix.elements,o=r[14]/(r[10]-1),a=r[14]/(r[10]+1),l=(r[9]+1)/r[5],h=(r[9]-1)/r[5],c=(r[8]-1)/r[0],u=(s[8]+1)/s[0],d=o*c,p=o*u,f=i/(-c+u),A=f*-c;if(e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(A),t.translateZ(f),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.copy(t.matrixWorld).invert(),-1===r[10])t.projectionMatrix.copy(e.projectionMatrix),t.projectionMatrixInverse.copy(e.projectionMatrixInverse);else{const e=o+f,n=a+f,r=d-A,s=p+(i-A),c=l*a/n*e,u=h*a/n*e;t.projectionMatrix.makePerspective(r,s,c,u,e,n),t.projectionMatrixInverse.copy(t.projectionMatrix).invert()}}(T,S,I):T.projectionMatrix.copy(S.projectionMatrix),function(t,e,n){null===n?t.matrix.copy(e.matrixWorld):(t.matrix.copy(n.matrixWorld),t.matrix.invert(),t.matrix.multiply(e.matrixWorld));t.matrix.decompose(t.position,t.quaternion,t.scale),t.updateMatrixWorld(!0),t.projectionMatrix.copy(e.projectionMatrix),t.projectionMatrixInverse.copy(e.projectionMatrixInverse),t.isPerspectiveCamera&&(t.fov=2*i.I3e*Math.atan(1/t.projectionMatrix.elements[5]),t.zoom=1)}(t,T,r)},this.getCamera=function(){return T},this.getFoveation=function(){if(null!==p||null!==f)return h},this.setFoveation=function(t){h=t,null!==p&&(p.fixedFoveation=t),null!==f&&void 0!==f.fixedFoveation&&(f.fixedFoveation=t)},this.hasDepthSensing=function(){return null!==m.texture},this.getDepthSensingMesh=function(){return m.getMesh(T)},this.getCameraTexture=function(t){return _[t]};let F=null;const k=new r;k.setAnimationLoop((function(e,r){if(u=r.getViewerPose(c||a),A=r,null!==u){const e=u.views;null!==f&&(t.setRenderTargetFramebuffer(E,f.framebuffer),t.setRenderTarget(E));let r=!1;e.length!==T.cameras.length&&(T.cameras.length=0,r=!0);for(let n=0;n<e.length;n++){const s=e[n];let o=null;if(null!==f)o=f.getViewport(s);else{const e=d.getViewSubImage(p,s);o=e.viewport,0===n&&(t.setRenderTargetTextures(E,e.colorTexture,e.depthStencilTexture),t.setRenderTarget(E))}let a=M[n];void 0===a&&(a=new i.cPb,a.layers.enable(n),a.viewport=new i.Ltg,M[n]=a),a.matrix.fromArray(s.transform.matrix),a.matrix.decompose(a.position,a.quaternion,a.scale),a.projectionMatrix.fromArray(s.projectionMatrix),a.projectionMatrixInverse.copy(a.projectionMatrix).invert(),a.viewport.set(o.x,o.y,o.width,o.height),0===n&&(T.matrix.copy(a.matrix),T.matrix.decompose(T.position,T.quaternion,T.scale)),!0===r&&T.cameras.push(a)}const o=s.enabledFeatures;if(o&&o.includes("depth-sensing")&&"gpu-optimized"==s.depthUsage&&g){d=n.getBinding();const t=d.getDepthInformation(e[0]);t&&t.isValid&&t.texture&&m.init(t,s.renderState)}if(o&&o.includes("camera-access")&&g){t.state.unbindTexture(),d=n.getBinding();for(let t=0;t<e.length;t++){const n=e[t].camera;if(n){let t=_[n];t||(t=new i.xnb,_[n]=t);const e=d.getCameraImage(n);t.sourceTexture=e}}}}for(let t=0;t<x.length;t++){const e=C[t],n=x[t];null!==e&&void 0!==n&&n.update(e,r,c||a)}F&&F(e,r),r.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:r}),A=null})),this.setAnimationLoop=function(t){F=t},this.dispose=function(){}}}const Le=new i.USm,Ue=new i.yGw;function Ne(t,e){function n(t,e){!0===t.matrixAutoUpdate&&t.updateMatrix(),e.value.copy(t.matrix)}function r(t,r){t.opacity.value=r.opacity,r.color&&t.diffuse.value.copy(r.color),r.emissive&&t.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),r.map&&(t.map.value=r.map,n(r.map,t.mapTransform)),r.alphaMap&&(t.alphaMap.value=r.alphaMap,n(r.alphaMap,t.alphaMapTransform)),r.bumpMap&&(t.bumpMap.value=r.bumpMap,n(r.bumpMap,t.bumpMapTransform),t.bumpScale.value=r.bumpScale,r.side===i._Li&&(t.bumpScale.value*=-1)),r.normalMap&&(t.normalMap.value=r.normalMap,n(r.
vendor: 1,179 bytes, line 2
2normalMap,t.normalMapTransform),t.normalScale.value.copy(r.normalScale),r.side===i._Li&&t.normalScale.value.negate()),r.displacementMap&&(t.displacementMap.value=r.displacementMap,n(r.displacementMap,t.displacementMapTransform),t.displacementScale.value=r.displacementScale,t.displacementBias.value=r.displacementBias),r.emissiveMap&&(t.emissiveMap.value=r.emissiveMap,n(r.emissiveMap,t.emissiveMapTransform)),r.specularMap&&(t.specularMap.value=r.specularMap,n(r.specularMap,t.specularMapTransform)),r.alphaTest>0&&(t.alphaTest.value=r.alphaTest);const s=e.get(r),o=s.envMap,a=s.envMapRotation;o&&(t.envMap.value=o,Le.copy(a),Le.x*=-1,Le.y*=-1,Le.z*=-1,o.isCubeTexture&&!1===o.isRenderTargetTexture&&(Le.y*=-1,Le.z*=-1),t.envMapRotation.value.setFromMatrix4(Ue.makeRotationFromEuler(Le)),t.flipEnvMap.value=o.isCubeTexture&&!1===o.isRenderTargetTexture?-1:1,t.reflectivity.value=r.reflectivity,t.ior.value=r.ior,t.refractionRatio.value=r.refractionRatio),r.lightMap&&(t.lightMap.value=r.lightMap,t.lightMapIntensity.value=r.lightMapIntensity,n(r.lightMap,t.lightMapTransform)),r.aoMap&&(t.aoMap.value=r.aoMap,t.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,t.aoMapTransform))}
vendor: 4,096 bytes, line 2
2return{refreshFogUniforms:function(e,n){n.color.getRGB(e.fogColor.value,(0,i.oDz)(t)),n.isFog?(e.fogNear.value=n.near,e.fogFar.value=n.far):n.isFogExp2&&(e.fogDensity.value=n.density)},refreshMaterialUniforms:function(t,s,o,a,l){s.isMeshBasicMaterial||s.isMeshLambertMaterial?r(t,s):s.isMeshToonMaterial?(r(t,s),function(t,e){e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(t,s)):s.isMeshPhongMaterial?(r(t,s),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4)}(t,s)):s.isMeshStandardMaterial?(r(t,s),function(t,e){t.metalness.value=e.metalness,e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap,n(e.metalnessMap,t.metalnessMapTransform));t.roughness.value=e.roughness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap,n(e.roughnessMap,t.roughnessMapTransform));e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}(t,s),s.isMeshPhysicalMaterial&&function(t,e,r){t.ior.value=e.ior,e.sheen>0&&(t.sheenColor.value.copy(e.sheenColor).multiplyScalar(e.sheen),t.sheenRoughness.value=e.sheenRoughness,e.sheenColorMap&&(t.sheenColorMap.value=e.sheenColorMap,n(e.sheenColorMap,t.sheenColorMapTransform)),e.sheenRoughnessMap&&(t.sheenRoughnessMap.value=e.sheenRoughnessMap,n(e.sheenRoughnessMap,t.sheenRoughnessMapTransform)));e.clearcoat>0&&(t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.clearcoatMap&&(t.clearcoatMap.value=e.clearcoatMap,n(e.clearcoatMap,t.clearcoatMapTransform)),e.clearcoatRoughnessMap&&(t.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap,n(e.clearcoatRoughnessMap,t.clearcoatRoughnessMapTransform)),e.clearcoatNormalMap&&(t.clearcoatNormalMap.value=e.clearcoatNormalMap,n(e.clearcoatNormalMap,t.clearcoatNormalMapTransform),t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),e.side===i._Li&&t.clearcoatNormalScale.value.negate()));e.dispersion>0&&(t.dispersion.value=e.dispersion);e.iridescence>0&&(t.iridescence.value=e.iridescence,t.iridescenceIOR.value=e.iridescenceIOR,t.iridescenceThicknessMinimum.value=e.iridescenceThicknessRange[0],t.iridescenceThicknessMaximum.value=e.iridescenceThicknessRange[1],e.iridescenceMap&&(t.iridescenceMap.value=e.iridescenceMap,n(e.iridescenceMap,t.iridescenceMapTransform)),e.iridescenceThicknessMap&&(t.iridescenceThicknessMap.value=e.iridescenceThicknessMap,n(e.iridescenceThicknessMap,t.iridescenceThicknessMapTransform)));e.transmission>0&&(t.transmission.value=e.transmission,t.transmissionSamplerMap.value=r.texture,t.transmissionSamplerSize.value.set(r.width,r.height),e.transmissionMap&&(t.transmissionMap.value=e.transmissionMap,n(e.transmissionMap,t.transmissionMapTransform)),t.thickness.value=e.thickness,e.thicknessMap&&(t.thicknessMap.value=e.thicknessMap,n(e.thicknessMap,t.thicknessMapTransform)),t.attenuationDistance.value=e.attenuationDistance,t.attenuationColor.value.copy(e.attenuationColor));e.anisotropy>0&&(t.anisotropyVector.value.set(e.anisotropy*Math.cos(e.anisotropyRotation),e.anisotropy*Math.sin(e.anisotropyRotation)),e.anisotropyMap&&(t.anisotropyMap.value=e.anisotropyMap,n(e.anisotropyMap,t.anisotropyMapTransform)));t.specularIntensity.value=e.specularIntensity,t.specularColor.value.copy(e.specularColor),e.specularColorMap&&(t.specularColorMap.value=e.specularColorMap,n(e.specularColorMap,t.specularColorMapTransform));e.specularIntensityMap&&(t.specularIntensityMap.value=e.specularIntensityMap,n(e.specularIntensityMap,t.specularIntensityMapTransform))}(t,s,l)):s.isMeshMatcapMaterial?(r(t,s),function(t,e){e.matcap&&(t.matcap.value=e.matcap)}(t,s)):s.isMeshDepthMaterial?r(t,s):s.isMeshDistanceMaterial?(r(t,s),function(t,n){const i=e.get(n).light;t.referencePosition.value.setFromMatrixPosition(i.matrixWorld),t.nearDistance.value=i.shadow.camera.near,t.farDistance.value=i.shadow.camera.far}(t,s)):s.isMeshNormalMaterial?r(t,s):s.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,e.map&&(t.map.value=e.map,n(e.map,t.mapTransform))}(t,s),s.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}
vendor: 3,895 bytes, line 2
2(t,s)):s.isPointsMaterial?function(t,e,i,r){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*i,t.scale.value=.5*r,e.map&&(t.map.value=e.map,n(e.map,t.uvTransform));e.alphaMap&&(t.alphaMap.value=e.alphaMap,n(e.alphaMap,t.alphaMapTransform));e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,s,o,a):s.isSpriteMaterial?function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,e.map&&(t.map.value=e.map,n(e.map,t.mapTransform));e.alphaMap&&(t.alphaMap.value=e.alphaMap,n(e.alphaMap,t.alphaMapTransform));e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,s):s.isShadowMaterial?(t.color.value.copy(s.color),t.opacity.value=s.opacity):s.isShaderMaterial&&(s.uniformsNeedUpdate=!1)}}}function Oe(t,e,n,r){let s={},o={},a=[];const l=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function h(t,e,n,i){const r=t.value,s=e+"_"+n;if(void 0===i[s])return i[s]="number"==typeof r||"boolean"==typeof r?r:r.clone(),!0;{const t=i[s];if("number"==typeof r||"boolean"==typeof r){if(t!==r)return i[s]=r,!0}else if(!1===t.equals(r))return t.copy(r),!0}return!1}function c(t){const e={boundary:0,storage:0};return"number"==typeof t||"boolean"==typeof t?(e.boundary=4,e.storage=4):t.isVector2?(e.boundary=8,e.storage=8):t.isVector3||t.isColor?(e.boundary=16,e.storage=12):t.isVector4?(e.boundary=16,e.storage=16):t.isMatrix3?(e.boundary=48,e.storage=48):t.isMatrix4?(e.boundary=64,e.storage=64):t.isTexture?(0,i.ZK6)("WebGLRenderer: Texture samplers can not be part of an uniforms group."):(0,i.ZK6)("WebGLRenderer: Unsupported uniform value type.",t),e}function u(e){const n=e.target;n.removeEventListener("dispose",u);const i=a.indexOf(n.__bindingPointIndex);a.splice(i,1),t.deleteBuffer(s[n.id]),delete s[n.id],delete o[n.id]}return{bind:function(t,e){const n=e.program;r.uniformBlockBinding(t,n)},update:function(n,d){let p=s[n.id];void 0===p&&(!function(t){const e=t.uniforms;let n=0;const i=16;for(let t=0,r=e.length;t<r;t++){const r=Array.isArray(e[t])?e[t]:[e[t]];for(let t=0,e=r.length;t<e;t++){const e=r[t],s=Array.isArray(e.value)?e.value:[e.value];for(let t=0,r=s.length;t<r;t++){const r=c(s[t]),o=n%i,a=o%r.boundary,l=o+a;n+=a,0!==l&&i-l<r.storage&&(n+=i-l),e.__data=new Float32Array(r.storage/Float32Array.BYTES_PER_ELEMENT),e.__offset=n,n+=r.storage}}}const r=n%i;r>0&&(n+=i-r);t.__size=n,t.__cache={}}(n),p=function(e){const n=function(){for(let t=0;t<l;t++)if(-1===a.indexOf(t))return a.push(t),t;return(0,i.vUy)("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}();e.__bindingPointIndex=n;const r=t.createBuffer(),s=e.__size,o=e.usage;return t.bindBuffer(t.UNIFORM_BUFFER,r),t.bufferData(t.UNIFORM_BUFFER,s,o),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,n,r),r}(n),s[n.id]=p,n.addEventListener("dispose",u));const f=d.program;r.updateUBOMapping(n,f);const A=e.render.frame;o[n.id]!==A&&(!function(e){const n=s[e.id],i=e.uniforms,r=e.__cache;t.bindBuffer(t.UNIFORM_BUFFER,n);for(let e=0,n=i.length;e<n;e++){const n=Array.isArray(i[e])?i[e]:[i[e]];for(let i=0,s=n.length;i<s;i++){const s=n[i];if(!0===h(s,e,i,r)){const e=s.__offset,n=Array.isArray(s.value)?s.value:[s.value];let i=0;for(let r=0;r<n.length;r++){const o=n[r],a=c(o);"number"==typeof o||"boolean"==typeof o?(s.__data[0]=o,t.bufferSubData(t.UNIFORM_BUFFER,e+i,s.__data)):o.isMatrix3?(s.__data[0]=o.elements[0],s.__data[1]=o.elements[1],s.__data[2]=o.elements[2],s.__data[3]=0,s.__data[4]=o.elements[3],s.__data[5]=o.elements[4],s.__data[6]=o.elements[5],s.__data[7]=0,s.__data[8]=o.elements[6],s.__data[9]=o.elements[7],s.__data[10]=o.elements[8],s.__data[11]=0):(o.toArray(s.__data,i),i+=a.storage/Float32Array.BYTES_PER_ELEMENT)}t.bufferSubData(t.UNIFORM_BUFFER,e,s.__data)}}}t.bindBuffer(t.UNIFORM_BUFFER,null)}(n),o[n.id]=A)},dispose:function(){for(const e in s)t.deleteBuffer(s[e]);a=[],s={},o={}}}}const Fe
vendor: 11,603 bytes, line 2
2=new Uint16Array([11481,15204,11534,15171,11808,15015,12385,14843,12894,14716,13396,14600,13693,14483,13976,14366,14237,14171,14405,13961,14511,13770,14605,13598,14687,13444,14760,13305,14822,13066,14876,12857,14923,12675,14963,12517,14997,12379,15025,12230,15049,12023,15070,11843,15086,11687,15100,11551,15111,11433,15120,11330,15127,11217,15132,11060,15135,10922,15138,10801,15139,10695,15139,10600,13012,14923,13020,14917,13064,14886,13176,14800,13349,14666,13513,14526,13724,14398,13960,14230,14200,14020,14383,13827,14488,13651,14583,13491,14667,13348,14740,13132,14803,12908,14856,12713,14901,12542,14938,12394,14968,12241,14992,12017,15010,11822,15024,11654,15034,11507,15041,11380,15044,11269,15044,11081,15042,10913,15037,10764,15031,10635,15023,10520,15014,10419,15003,10330,13657,14676,13658,14673,13670,14660,13698,14622,13750,14547,13834,14442,13956,14317,14112,14093,14291,13889,14407,13704,14499,13538,14586,13389,14664,13201,14733,12966,14792,12758,14842,12577,14882,12418,14915,12272,14940,12033,14959,11826,14972,11646,14980,11490,14983,11355,14983,11212,14979,11008,14971,10830,14961,10675,14950,10540,14936,10420,14923,10315,14909,10204,14894,10041,14089,14460,14090,14459,14096,14452,14112,14431,14141,14388,14186,14305,14252,14130,14341,13941,14399,13756,14467,13585,14539,13430,14610,13272,14677,13026,14737,12808,14790,12617,14833,12449,14869,12303,14896,12065,14916,11845,14929,11655,14937,11490,14939,11347,14936,11184,14930,10970,14921,10783,14912,10621,14900,10480,14885,10356,14867,10247,14848,10062,14827,9894,14805,9745,14400,14208,14400,14206,14402,14198,14406,14174,14415,14122,14427,14035,14444,13913,14469,13767,14504,13613,14548,13463,14598,13324,14651,13082,14704,12858,14752,12658,14795,12483,14831,12330,14860,12106,14881,11875,14895,11675,14903,11501,14905,11351,14903,11178,14900,10953,14892,10757,14880,10589,14865,10442,14847,10313,14827,10162,14805,9965,14782,9792,14757,9642,14731,9507,14562,13883,14562,13883,14563,13877,14566,13862,14570,13830,14576,13773,14584,13689,14595,13582,14613,13461,14637,13336,14668,13120,14704,12897,14741,12695,14776,12516,14808,12358,14835,12150,14856,11910,14870,11701,14878,11519,14882,11361,14884,11187,14880,10951,14871,10748,14858,10572,14842,10418,14823,10286,14801,10099,14777,9897,14751,9722,14725,9567,14696,9430,14666,9309,14702,13604,14702,13604,14702,13600,14703,13591,14705,13570,14707,13533,14709,13477,14712,13400,14718,13305,14727,13106,14743,12907,14762,12716,14784,12539,14807,12380,14827,12190,14844,11943,14855,11727,14863,11539,14870,11376,14871,11204,14868,10960,14858,10748,14845,10565,14829,10406,14809,10269,14786,10058,14761,9852,14734,9671,14705,9512,14674,9374,14641,9253,14608,9076,14821,13366,14821,13365,14821,13364,14821,13358,14821,13344,14821,13320,14819,13252,14817,13145,14815,13011,14814,12858,14817,12698,14823,12539,14832,12389,14841,12214,14850,11968,14856,11750,14861,11558,14866,11390,14867,11226,14862,10972,14853,10754,14840,10565,14823,10401,14803,10259,14780,10032,14754,9820,14725,9635,14694,9473,14661,9333,14627,9203,14593,8988,14557,8798,14923,13014,14922,13014,14922,13012,14922,13004,14920,12987,14919,12957,14915,12907,14909,12834,14902,12738,14894,12623,14888,12498,14883,12370,14880,12203,14878,11970,14875,11759,14873,11569,14874,11401,14872,11243,14865,10986,14855,10762,14842,10568,14825,10401,14804,10255,14781,10017,14754,9799,14725,9611,14692,9445,14658,9301,14623,9139,14587,8920,14548,8729,14509,8562,15008,12672,15008,12672,15008,12671,15007,12667,15005,12656,15001,12637,14997,12605,14989,12556,14978,12490,14966,12407,14953,12313,14940,12136,14927,11934,14914,11742,14903,11563,14896,11401,14889,11247,14879,10992,14866,10767,14851,10570,14833,10400,14812,10252,14789,10007,14761,9784,14731,9592,14698,9424,14663,9279,14627,9088,14588,8868,14548,8676,14508,8508,14467,8360,15080,12386,15080,12386,15079,12385,15078,12383,15076,12378,15072,12367,15066,12347,15057,12315,15045,12253,15030,12138,15012,11998,14993,11845,14972,11685,14951,11530,14935,11383,14920,11228,14904,10981,14887,10762,14870,10567,14850,10397,14827,10248,14803,9997,14774,9771,14743,9578,14710,9407,14674,9259,14637,9048,14596,8826,14555,8632,14514,8464,14471,8317,14427,8182,15139,12008,15139,12008,15138,12008,15137,12007,15135,12003,15130,11990,15124,11969,15115,11929,15102,11872,15086,11794,15064,11693,15041,11581,15013,11459,14987,11336,14966,11170,14944,10944,14921,10738,14898,10552,14875,10387,14850,10239,14824,9983,14794,9758,14762,9563,14728,9392,14692,9244,14653,9014,14611,8791,14569,8597,14526,8427,14481,8281,14436,8110,14391,7885,15188,11617,15188,11617,15187,11617,15186,11618,15183,11617,15179,11612,15173,11601,15163,11581,15150,11546,15133,11495,15110,11427,15083,11346,15051,11246,15024,11057,14996,10868,14967,10687,14938,10517,14911,10362,14882,10206,14853,9956,14821,9737,14787,9543,14752,9375,14715,9228,14675,8980,14632,8760,14589,8565,14544,8395,14498,8248,14451,8049,14404,7824,14357,7630,15228,11298,15228,11298,15227,11299,15226,11301,15223,11303,15219,11302,15213,11299,15204,11290,15191,11271,15174,11217,15150,11129,15119,11015,15087,10886,15057,10744,15024,10599,14990,10455,14957,10318,14924,10143,14891,9911,14856,9701,14820,9516,14782,9352,14744,9200,14703,8946,14659,8725,14615,8533,14568,8366,14521,8220,14472,7992,14423,7770,14374,7578,14315,7408,15260,10819,15260,10819,15259,10822,15258,10826,15256,10832,15251,10836,15246,10841,15237,10838,15225,10821,15207,10788,15183,10734,15151,10660,15120,10571,15087,10469,15049,10359,15012,10249,14974,10041,14937,9837,14900,9647,14860,9475,14820,9320,14779,9147,14736,8902,14691,8688,14646,8499,14598,8335,14549,8189,14499,7940,14448,7720,14397,7529,14347,7363,14256,7218,15285,10410,15285,10411,15285,10413,15284,10418,15282,10425,15278,10434,15272,10442,15264,10449,15252,10445,15235,10433,15210,10403,15179,10358,15149,10301,15113,10218,15073,10059,15033,9894,14991,9726,14951,9565,14909,9413,14865,9273,14822,9073,14777,8845,14730,8641,14682,8459,14633,8300,14583,8129,14531,7883,14479,7670,14426,7482,14373,7321,14305,7176,14201,6939,15305,9939,15305,9940,15305,9945,15304,9955,15302,9967,15298,9989,15293,10010,15286,10033,15274,10044,15258,10045,15233,10022,15205,9975,15174,9903,15136,9808,15095,9697,15053,9578,15009,9451,14965,9327,14918,9198,14871,8973,14825,8766,14775,8579,14725,8408,14675,8259,14622,8058,14569,7821,14515,7615,14460,7435,14405,7276,14350,7108,14256,6866,14149,6653,15321,9444,15321,9445,15321,9448,15320,9458,15317,9470,15314,9490,15310,9515,15302,9540,15292,9562,15276,9579,15251,9577,15226,9559,15195,9519,15156,9463,15116,9389,15071,9304,15025,9208,14978,9023,14927,8838,14878,8661,14827,8496,14774,8344,14722,8206,14667,7973,14612,7749,14556,7555,14499,7382,14443,7229,14385,7025,14322,6791,14210,6588,14100,6409,15333,8920,15333,8921,15332,8927,15332,8943,15329,8965,15326,9002,15322,9048,15316,9106,15307,9162,15291,9204,15267,9221,15244,9221,15212,9196,15175,9134,15133,9043,15088,8930,15040,8801,14990,8665,14938,8526,14886,8391,14830,8261,14775,8087,14719,7866,14661,7664,14603,7482,14544,7322,14485,7178,14426,6936,14367,6713,14281,6517,14166,6348,14054,6198,15341,8360,15341,8361,15341,8366,15341,8379,15339,8399,15336,8431,15332,8473,15326,8527,15318,8585,15302,8632,15281,8670,15258,8690,15227,8690,15191,8664,15149,8612,15104,8543,15055,8456,15001,8360,14948,8259,14892,8122,14834,7923,14776,7734,14716,7558,14656,7397,14595,7250,14534,7070,14472,6835,14410,6628,14350,6443,14243,6283,14125,6135,14010,5889,15348,7715,15348,7717,15348,7725,15347,7745,15345,7780,15343,7836,15339,7905,15334,8e3,15326,8103,15310,8193,15293,8239,15270,8270,15240,8287,15204,8283,15163,8260,15118,8223,15067,8143,15014,8014,14958,7873,14899,7723,14839,7573,14778,7430,14715,7293,14652,7164,14588,6931,14524,6720,14460,6531,14396,6362,14330,6210,14207,6015,14086,5781,13969,5576,15352,7114,15352,7116,15352,7128,15352,7159,15350,7195,15348,7237,15345,7299,15340,7374,15332,7457,15317,7544,15301,7633,15280,7703,15251,7754,15216,7775,15176,7767,15131,7733,15079,7670,15026,7588,14967,7492,14906,7387,14844,7278,14779,7171,14714,6965,14648,6770,14581,6587,14515,6420,14448,6269,14382,6123,14299,5881,14172,5665,14049,5477,13929,5310,15355,6329,15355,6330,15355,6339,15355,6362,15353,6410,15351,6472,15349,6572,15344,6688,15337,6835,15323,6985,15309,7142,15287,7220,15260,7277,15226,7310,15188,7326,15142,7318,15090,7285,15036,7239,14976,7177,14914,7045,14849,6892,14782,6736,14714,6581,14645,6433,14576,6293,14506,6164,14438,5946,14369,5733,14270,5540,14140,5369,14014,5216,13892,5043,15357,5483,15357,5484,15357,5496,15357,5528,15356,5597,15354,5692,15351,5835,15347,6011,15339,6195,15328,6317,15314,6446,15293,6566,15268,6668,15235,6746,15197,6796,15152,6811,15101,6790,15046,6748,14985,6673,14921,6583,14854,6479,14785,6371,14714,6259,14643,6149,14571,5946,14499,5750,14428,5567,14358,5401,14242,5250,14109,5111,13980,4870,13856,4657,15359,4555,15359,4557,15358,4573,15358,4633,15357,4715,15355,4841,15353,5061,15349,5216,15342,5391,15331,5577,15318,5770,15299,5967,15274,6150,15243,6223,15206,6280,15161,6310,15111,6317,15055,6300,14994,6262,14928,6208,14860,6141,14788,5994,14715,5838,14641,5684,14566,5529,14492,5384,14418,5247,14346,5121,14216,4892,14079,4682,13948,4496,13822,4330,15359,3498,15359,3501,15359,3520,15359,3598,15358,3719,15356,3860,15355,4137,15351,4305,15344,4563,15334,4809,15321,5116,15303,5273,15280,5418,15250,5547,15214,5653,15170,5722,15120,5761,15064,5763,15002,5733,14935,5673,14865,5597,14792,5504,14716,5400,14640,5294,14563,5185,14486,5041,14410,4841,14335,4655,14191,4482,14051,4325,13918,4183,13790,4012,15360,2282,15360,2285,15360,2306,15360,2401,15359,2547,15357,2748,15355,3103,15352,3349,15345,3675,15336,4020,15324,4272,15307,4496,15285,4716,15255,4908,15220,5086,15178,5170,15128,5214,15072,5234,15010,5231,14943,5206,14871,5166,14796,5102,14718,4971,14639,4833,14559,4687,14480,4541,14402,4401,14315,4268,14167,4142,14025,3958,13888,3747,13759,3556,15360,923,15360,925,15360,946,15360,1052,15359,1214,15357,1494,15356,1892,15352,2274,15346,2663,15338,3099,15326,3393,15309,3679,15288,3980,15260,4183,15226,4325,15185,4437,15136,4517,15080,4570,15018,4591,14950,4581,14877,4545,14800,4485,14720,4411,14638,4325,14556,4231,14475,4136,14395,3988,14297,3803,14145,3628,13999,3465,13861,3314,13729,3177,15360,263,15360,264,15360,272,15360,325,15359,407,15358,548,15356,780,15352,1144,15347,1580,15339,2099,15328,2425,15312,2795,15292,3133,15264,3329,15232,3517,15191,3689,15143,3819,15088,3923,15025,3978,14956,3999,14882,3979,14804,3931,14722,3855,14639,3756,14554,3645,14470,3529,14388,3409,14279,3289,14124,3173,13975,3055,13834,2848,13701,2658,15360,49,15360,49,15360,52,15360,75,15359,111,15358,201,15356,283,15353,519,15348,726,15340,1045,15329,1415,15314,1795,15295,2173,15269,2410,15237,2649,15197,2866,15150,3054,15095,3140,15032,3196,14963,3228,14888,3236,14808,3224,14725,3191,14639,3146,14553,3088,14466,2976,14382,2836,14262,2692,14103,2549,13952,2409,13808,2278,13674,2154,15360,4,15360,4,15360,4,15360,13,15359,33,15358,59,15357,112,15353,199,15348,302,15341,456,15331,628,15316,827,15297,1082,15272,1332,15241,1601,15202,1851,15156,2069,15101,2172,15039,2256,14970,2314,14894,2348,14813,2358,14728,2344,14640,2311,14551,2263,14463,2203,14376,2133,14247,2059,14084,1915,13930,1761,13784,1609,13648,1464,15360,0,15360,0,15360,0,15360,3,15359,18,15358,26,15357,53,15354,80,15348,97,15341,165,15332,238,15318,326,15299,427,15275,529,15245,654,15207,771,15161,885,15108,994,15046,1089,14976,1170,14900,1229,14817,1266,14731,1284,14641,1282,14550,1260,14460,1223,14370,1174,14232,1116,14066,1050,13909,981,13761,910,13623,839]);let 
vendor: 7,455 bytes, line 2
2ke=null;class Qe{constructor(t={}){const{canvas:e=(0,i.O5A)(),context:n=null,depth:o=!0,stencil:a=!1,alpha:l=!1,antialias:h=!1,premultipliedAlpha:c=!0,preserveDrawingBuffer:u=!1,powerPreference:_="default",failIfMajorPerformanceCaveat:v=!1,reversedDepthBuffer:y=!1}=t;let E;if(this.isWebGLRenderer=!0,null!==n){if("undefined"!=typeof WebGLRenderingContext&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");E=n.getContextAttributes().alpha}else E=l;const x=new Set([i.E2K,i.CtA,i.D9w]),C=new Set([i.ywz,i.JQ4,i.LsT,i.wJv,i.k0A,i.irR]),b=new Uint32Array(4),w=new Int32Array(4);let S=null,I=null;const M=[],T=[];this.domElement=e,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=i.uL9,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const B=this;let R=!1;this._outputColorSpace=i.KI_;let P=0,Q=0,z=null,G=-1,H=null;const V=new i.Ltg,j=new i.Ltg;let W=null;const q=new i.Ilk(0);let X=0,Y=e.width,K=e.height,Z=1,J=null,$=null;const tt=new i.Ltg(0,0,Y,K),et=new i.Ltg(0,0,Y,K);let nt=!1;const it=new i.iWj;let rt=!1,st=!1;const ot=new i.yGw,at=new i.Pa4,lt=new i.Ltg,ht={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let ct=!1;function ut(){return null===z?Z:1}let dt,pt,ft,At,gt,mt,_t,vt,yt,Et,xt,Ct,bt,wt,St,It,Mt,Tt,Bt,Rt,Pt,Dt,Lt,Ut,Nt=n;function Ot(t,n){return e.getContext(t,n)}try{const t={alpha:!0,depth:o,stencil:a,antialias:h,premultipliedAlpha:c,preserveDrawingBuffer:u,powerPreference:_,failIfMajorPerformanceCaveat:v};if("setAttribute"in e&&e.setAttribute("data-engine",`three.js r${i.UZH}`),e.addEventListener("webglcontextlost",Qt,!1),e.addEventListener("webglcontextrestored",zt,!1),e.addEventListener("webglcontextcreationerror",Gt,!1),null===Nt){const e="webgl2";if(Nt=Ot(e,t),null===Nt)throw Ot(e)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(t){throw t("WebGLRenderer: "+t.message),t}function Ft(){dt=new L(Nt),dt.init(),Dt=new Re(Nt,dt),pt=new A(Nt,dt,t,Dt),ft=new Te(Nt,dt),pt.reversedDepthBuffer&&y&&ft.buffers.depth.setReversed(!0),At=new O(Nt),gt=new ge,mt=new Be(Nt,dt,ft,gt,pt,Dt,At),_t=new m(B),vt=new D(B),yt=new s(Nt),Lt=new p(Nt,yt),Et=new U(Nt,yt,At,Lt),xt=new k(Nt,Et,yt,At),Bt=new F(Nt,pt,mt),It=new g(gt),Ct=new Ae(B,_t,vt,dt,pt,Lt,It),bt=new Ne(B,gt),wt=new ye,St=new Se(dt),Tt=new d(B,_t,vt,ft,xt,E,c),Mt=new Ie(B,xt,pt),Ut=new Oe(Nt,At,pt,ft),Rt=new f(Nt,dt,At),Pt=new N(Nt,dt,At),At.programs=Ct.programs,B.capabilities=pt,B.extensions=dt,B.properties=gt,B.renderLists=wt,B.shadowMap=Mt,B.state=ft,B.info=At}Ft();const kt=new De(B,Nt);function Qt(t){t.preventDefault(),(0,i.cM7)("WebGLRenderer: Context Lost."),R=!0}function zt(){(0,i.cM7)("WebGLRenderer: Context Restored."),R=!1;const t=At.autoReset,e=Mt.enabled,n=Mt.autoUpdate,r=Mt.needsUpdate,s=Mt.type;Ft(),At.autoReset=t,Mt.enabled=e,Mt.autoUpdate=n,Mt.needsUpdate=r,Mt.type=s}function Gt(t){(0,i.vUy)("WebGLRenderer: A WebGL context could not be created. Reason: ",t.statusMessage)}function Ht(t){const e=t.target;e.removeEventListener("dispose",Ht),function(t){(function(t){const e=gt.get(t).programs;void 0!==e&&(e.forEach((function(t){Ct.releaseProgram(t)})),t.isShaderMaterial&&Ct.releaseShaderCache(t))})(t),gt.remove(t)}(e)}function jt(t,e,n){!0===t.transparent&&t.side===i.ehD&&!1===t.forceSinglePass?(t.side=i._Li,t.needsUpdate=!0,ee(t,e,n),t.side=i.Wl3,t.needsUpdate=!0,ee(t,e,n),t.side=i.ehD):ee(t,e,n)}this.xr=kt,this.getContext=function(){return Nt},this.getContextAttributes=function(){return Nt.getContextAttributes()},this.forceContextLoss=function(){const t=dt.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){const t=dt.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(t){void 0!==t&&(Z=t,this.setSize(Y,K,!1))},this.getSize=function(t){return t.set(Y,K)},this.setSize=function(t,n,r=!0){kt.isPresenting?(0,i.ZK6)("WebGLRenderer: Can't change size while VR device is presenting."):(Y=t,K=n,e.width=Math.floor(t*Z),e.height=Math.floor(n*Z),!0===r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(t){return t.set(Y*Z,K*Z).floor()},this.setDrawingBufferSize=function(t,n,i){Y=t,K=n,Z=i,e.width=Math.floor(t*i),e.height=Math.floor(n*i),this.setViewport(0,0,t,n)},this.getCurrentViewport=function(t){return t.copy(V)},this.getViewport=function(t){return t.copy(tt)},this.setViewport=function(t,e,n,i){t.isVector4?tt.set(t.x,t.y,t.z,t.w):tt.set(t,e,n,i),ft.viewport(V.copy(tt).multiplyScalar(Z).round())},this.getScissor=function(t){return t.copy(et)},this.setScissor=function(t,e,n,i){t.isVector4?et.set(t.x,t.y,t.z,t.w):et.set(t,e,n,i),ft.scissor(j.copy(et).multiplyScalar(Z).round())},this.getScissorTest=function(){return nt},this.setScissorTest=function(t){ft.setScissorTest(nt=t)},this.setOpaqueSort=function(t){J=t},this.setTransparentSort=function(t){$=t},this.getClearColor=function(t){return t.copy(Tt.getClearColor())},this.setClearColor=function(){Tt.setClearColor(...arguments)},this.getClearAlpha=function(){return Tt.getClearAlpha()},this.setClearAlpha=function(){Tt.setClearAlpha(...arguments)},this.clear=function(t=!0,e=!0,n=!0){let i=0;if(t){let t=!1;if(null!==z){const e=z.texture.format;t=x.has(e)}if(t){const t=z.texture.type,e=C.has(t),n=Tt.getClearColor(),i=Tt.getClearAlpha(),r=n.r,s=n.g,o=n.b;e?(b[0]=r,b[1]=s,b[2]=o,b[3]=i,Nt.clearBufferuiv(Nt.COLOR,0,b)):(w[0]=r,w[1]=s,w[2]=o,w[3]=i,Nt.clearBufferiv(Nt.COLOR,0,w))}else i|=Nt.COLOR_BUFFER_BIT}e&&(i|=Nt.DEPTH_BUFFER_BIT),n&&(i|=Nt.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),Nt.clear(i)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){e.removeEventListener("webglcontextlost",Qt,!1),e.removeEventListener("webglcontextrestored",zt,!1),e.removeEventListener("webglcontextcreationerror",Gt,!1),Tt.dispose(),wt.dispose(),St.dispose(),gt.dispose(),_t.dispose(),vt.dispose(),xt.dispose(),Lt.dispose(),Ut.dispose(),Ct.dispose(),kt.dispose(),kt.removeEventListener("sessionstart",qt),kt.removeEventListener("sessionend",Xt),Yt.stop()},this.renderBufferDirect=function(t,e,n,r,s,o){null===e&&(e=ht);const a=s.isMesh&&s.matrixWorld.determinant()<0,l=function(t,e,n,r,s){!0!==e.isScene&&(e=ht);mt.resetTextureUnits();const o=e.fog,a=r.isMeshStandardMaterial?e.environment:null,l=null===z?B.outputColorSpace:!0===z.isXRRenderTarget?z.texture.colorSpace:i.GUF,h=(r.isMeshStandardMaterial?vt:_t).get(r.envMap||a),c=!0===r.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,u=!!n.attributes.tangent&&(!!r.normalMap||r.anisotropy>0),d=!!n.morphAttributes.position,p=!!n.morphAttributes.normal,f=!!n.morphAttributes.color;let A=i.uL9;r.toneMapped&&(null!==z&&!0!==z.isXRRenderTarget||(A=B.toneMapping));const g=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,m=void 0!==g?g.length:0,_=gt.get(r),v=I.state.lights;if(!0===rt&&(!0===st||t!==H)){const e=t===H&&r.id===G;It.setState(r,t,e)}let y=!1;r.version===_.__version?_.needsLights&&_.lightsStateVersion!==v.state.ver
vendor: 4,733 bytes, line 2
2sion||_.outputColorSpace!==l||s.isBatchedMesh&&!1===_.batching?y=!0:s.isBatchedMesh||!0!==_.batching?s.isBatchedMesh&&!0===_.batchingColor&&null===s.colorTexture||s.isBatchedMesh&&!1===_.batchingColor&&null!==s.colorTexture||s.isInstancedMesh&&!1===_.instancing?y=!0:s.isInstancedMesh||!0!==_.instancing?s.isSkinnedMesh&&!1===_.skinning?y=!0:s.isSkinnedMesh||!0!==_.skinning?s.isInstancedMesh&&!0===_.instancingColor&&null===s.instanceColor||s.isInstancedMesh&&!1===_.instancingColor&&null!==s.instanceColor||s.isInstancedMesh&&!0===_.instancingMorph&&null===s.morphTexture||s.isInstancedMesh&&!1===_.instancingMorph&&null!==s.morphTexture||_.envMap!==h||!0===r.fog&&_.fog!==o?y=!0:void 0===_.numClippingPlanes||_.numClippingPlanes===It.numPlanes&&_.numIntersection===It.numIntersection?(_.vertexAlphas!==c||_.vertexTangents!==u||_.morphTargets!==d||_.morphNormals!==p||_.morphColors!==f||_.toneMapping!==A||_.morphTargetsCount!==m)&&(y=!0):y=!0:y=!0:y=!0:y=!0:(y=!0,_.__version=r.version);let E=_.currentProgram;!0===y&&(E=ee(r,e,s));let x=!1,C=!1,b=!1;const w=E.getUniforms(),S=_.uniforms;ft.useProgram(E.program)&&(x=!0,C=!0,b=!0);r.id!==G&&(G=r.id,C=!0);if(x||H!==t){ft.buffers.depth.getReversed()&&!0!==t.reversedDepth&&(t._reversedDepth=!0,t.updateProjectionMatrix()),w.setValue(Nt,"projectionMatrix",t.projectionMatrix),w.setValue(Nt,"viewMatrix",t.matrixWorldInverse);const e=w.map.cameraPosition;void 0!==e&&e.setValue(Nt,at.setFromMatrixPosition(t.matrixWorld)),pt.logarithmicDepthBuffer&&w.setValue(Nt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&w.setValue(Nt,"isOrthographic",!0===t.isOrthographicCamera),H!==t&&(H=t,C=!0,b=!0)}if(s.isSkinnedMesh){w.setOptional(Nt,s,"bindMatrix"),w.setOptional(Nt,s,"bindMatrixInverse");const t=s.skeleton;t&&(null===t.boneTexture&&t.computeBoneTexture(),w.setValue(Nt,"boneTexture",t.boneTexture,mt))}s.isBatchedMesh&&(w.setOptional(Nt,s,"batchingTexture"),w.setValue(Nt,"batchingTexture",s._matricesTexture,mt),w.setOptional(Nt,s,"batchingIdTexture"),w.setValue(Nt,"batchingIdTexture",s._indirectTexture,mt),w.setOptional(Nt,s,"batchingColorTexture"),null!==s._colorsTexture&&w.setValue(Nt,"batchingColorTexture",s._colorsTexture,mt));const M=n.morphAttributes;void 0===M.position&&void 0===M.normal&&void 0===M.color||Bt.update(s,n,E);(C||_.receiveShadow!==s.receiveShadow)&&(_.receiveShadow=s.receiveShadow,w.setValue(Nt,"receiveShadow",s.receiveShadow));r.isMeshGouraudMaterial&&null!==r.envMap&&(S.envMap.value=h,S.flipEnvMap.value=h.isCubeTexture&&!1===h.isRenderTargetTexture?-1:1);r.isMeshStandardMaterial&&null===r.envMap&&null!==e.environment&&(S.envMapIntensity.value=e.environmentIntensity);void 0!==S.dfgLUT&&(S.dfgLUT.value=(null===ke&&(ke=new i.IEO(Fe,32,32,i.av9,i.cLu),ke.minFilter=i.wem,ke.magFilter=i.wem,ke.wrapS=i.uWy,ke.wrapT=i.uWy,ke.generateMipmaps=!1,ke.needsUpdate=!0),ke));C&&(w.setValue(Nt,"toneMappingExposure",B.toneMappingExposure),_.needsLights&&(R=b,(T=S).ambientLightColor.needsUpdate=R,T.lightProbe.needsUpdate=R,T.directionalLights.needsUpdate=R,T.directionalLightShadows.needsUpdate=R,T.pointLights.needsUpdate=R,T.pointLightShadows.needsUpdate=R,T.spotLights.needsUpdate=R,T.spotLightShadows.needsUpdate=R,T.rectAreaLights.needsUpdate=R,T.hemisphereLights.needsUpdate=R),o&&!0===r.fog&&bt.refreshFogUniforms(S,o),bt.refreshMaterialUniforms(S,r,Z,K,I.state.transmissionRenderTarget[t.id]),Vt.upload(Nt,ne(_),S,mt));var T,R;r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(Vt.upload(Nt,ne(_),S,mt),r.uniformsNeedUpdate=!1);r.isSpriteMaterial&&w.setValue(Nt,"center",s.center);if(w.setValue(Nt,"modelViewMatrix",s.modelViewMatrix),w.setValue(Nt,"normalMatrix",s.normalMatrix),w.setValue(Nt,"modelMatrix",s.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){const t=r.uniformsGroups;for(let e=0,n=t.length;e<n;e++){const n=t[e];Ut.update(n,E),Ut.bind(n,E)}}return E}(t,e,n,r,s);ft.setMaterial(r,a);let h=n.index,c=1;if(!0===r.wireframe){if(h=Et.getWireframeAttribute(n),void 0===h)return;c=2}const u=n.drawRange,d=n.attributes.position;let p=u.start*c,f=(u.start+u.count)*c;null!==o&&(p=Math.max(p,o.start*c),f=Math.min(f,(o.start+o.count)*c)),null!==h?(p=Math.max(p,0),f=Math.min(f,h.count)):null!=d&&(p=Math.max(p,0),f=Math.min(f,d.count));const A=f-p;if(A<0||A===1/0)return;let g;Lt.setup(s,r,l,n,h);let m=Rt;if(null!==h&&(g=yt.get(h),m=Pt,m.setIndex(g)),s.isMesh)!0===r.wireframe?(ft.setLineWidth(r.wireframeLinewidth*ut()),m.setMode(Nt.LINES)):m.setMode(Nt.TRIANGLES);else if(s.isLine){let t=r.linewidth;void 0===t&&(t=1),ft.setLineWidth(t*ut()),s.isLineSegments?m.setMode(Nt.LINES):s.isLineLoop?m.
vendor: 5,591 bytes, line 2
2setMode(Nt.LINE_LOOP):m.setMode(Nt.LINE_STRIP)}else s.isPoints?m.setMode(Nt.POINTS):s.isSprite&&m.setMode(Nt.TRIANGLES);if(s.isBatchedMesh)if(null!==s._multiDrawInstances)(0,i.O4K)("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),m.renderMultiDrawInstances(s._multiDrawStarts,s._multiDrawCounts,s._multiDrawCount,s._multiDrawInstances);else if(dt.get("WEBGL_multi_draw"))m.renderMultiDraw(s._multiDrawStarts,s._multiDrawCounts,s._multiDrawCount);else{const t=s._multiDrawStarts,e=s._multiDrawCounts,n=s._multiDrawCount,i=h?yt.get(h).bytesPerElement:1,o=gt.get(r).currentProgram.getUniforms();for(let r=0;r<n;r++)o.setValue(Nt,"_gl_DrawID",r),m.render(t[r]/i,e[r])}else if(s.isInstancedMesh)m.renderInstances(p,A,s.count);else if(n.isInstancedBufferGeometry){const t=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,e=Math.min(n.instanceCount,t);m.renderInstances(p,A,e)}else m.render(p,A)},this.compile=function(t,e,n=null){null===n&&(n=t),I=St.get(n),I.init(e),T.push(I),n.traverseVisible((function(t){t.isLight&&t.layers.test(e.layers)&&(I.pushLight(t),t.castShadow&&I.pushShadow(t))})),t!==n&&t.traverseVisible((function(t){t.isLight&&t.layers.test(e.layers)&&(I.pushLight(t),t.castShadow&&I.pushShadow(t))})),I.setupLights();const i=new Set;return t.traverse((function(t){if(!(t.isMesh||t.isPoints||t.isLine||t.isSprite))return;const e=t.material;if(e)if(Array.isArray(e))for(let r=0;r<e.length;r++){const s=e[r];jt(s,n,t),i.add(s)}else jt(e,n,t),i.add(e)})),I=T.pop(),i},this.compileAsync=function(t,e,n=null){const i=this.compile(t,e,n);return new Promise((e=>{function n(){i.forEach((function(t){gt.get(t).currentProgram.isReady()&&i.delete(t)})),0!==i.size?setTimeout(n,10):e(t)}null!==dt.get("KHR_parallel_shader_compile")?n():setTimeout(n,10)}))};let Wt=null;function qt(){Yt.stop()}function Xt(){Yt.start()}const Yt=new r;function Kt(t,e,n,i){if(!1===t.visible)return;if(t.layers.test(e.layers))if(t.isGroup)n=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(e);else if(t.isLight)I.pushLight(t),t.castShadow&&I.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||it.intersectsSprite(t)){i&&lt.setFromMatrixPosition(t.matrixWorld).applyMatrix4(ot);const e=xt.update(t),r=t.material;r.visible&&S.push(t,e,r,n,lt.z,null)}}else if((t.isMesh||t.isLine||t.isPoints)&&(!t.frustumCulled||it.intersectsObject(t))){const e=xt.update(t),r=t.material;if(i&&(void 0!==t.boundingSphere?(null===t.boundingSphere&&t.computeBoundingSphere(),lt.copy(t.boundingSphere.center)):(null===e.boundingSphere&&e.computeBoundingSphere(),lt.copy(e.boundingSphere.center)),lt.applyMatrix4(t.matrixWorld).applyMatrix4(ot)),Array.isArray(r)){const i=e.groups;for(let s=0,o=i.length;s<o;s++){const o=i[s],a=r[o.materialIndex];a&&a.visible&&S.push(t,e,a,n,lt.z,o)}}else r.visible&&S.push(t,e,r,n,lt.z,null)}const r=t.children;for(let t=0,s=r.length;t<s;t++)Kt(r[t],e,n,i)}function Zt(t,e,n,i){const{opaque:r,transmissive:s,transparent:o}=t;I.setupLightsView(n),!0===rt&&It.setGlobalState(B.clippingPlanes,n),i&&ft.viewport(V.copy(i)),r.length>0&&$t(r,e,n),s.length>0&&$t(s,e,n),o.length>0&&$t(o,e,n),ft.buffers.depth.setTest(!0),ft.buffers.depth.setMask(!0),ft.buffers.color.setMask(!0),ft.setPolygonOffset(!1)}function Jt(t,e,n,r){if(null!==(!0===n.isScene?n.overrideMaterial:null))return;void 0===I.state.transmissionRenderTarget[r.id]&&(I.state.transmissionRenderTarget[r.id]=new i.dd2(1,1,{generateMipmaps:!0,type:dt.has("EXT_color_buffer_half_float")||dt.has("EXT_color_buffer_float")?i.cLu:i.ywz,minFilter:i.D1R,samples:4,stencilBuffer:a,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:i.epp.workingColorSpace}));const s=I.state.transmissionRenderTarget[r.id],o=r.viewport||V;s.setSize(o.z*B.transmissionResolutionScale,o.w*B.transmissionResolutionScale);const l=B.getRenderTarget(),h=B.getActiveCubeFace(),c=B.getActiveMipmapLevel();B.setRenderTarget(s),B.getClearColor(q),X=B.getClearAlpha(),X<1&&B.setClearColor(16777215,.5),B.clear(),ct&&Tt.render(n);const u=B.toneMapping;B.toneMapping=i.uL9;const d=r.viewport;if(void 0!==r.viewport&&(r.viewport=void 0),I.setupLightsView(r),!0===rt&&It.setGlobalState(B.clippingPlanes,r),$t(t,n,r),mt.updateMultisampleRenderTarget(s),mt.updateRenderTargetMipmap(s),!1===dt.has("WEBGL_multisampled_render_to_texture")){let t=!1;for(let s=0,o=e.length;s<o;s++){const o=e[s],{object:a,geometry:l,material:h,group:c}=o;if(h.side===i.ehD&&a.layers.test(r.layers)){const e=h.side;h.side=i._Li,h.needsUpdate=!0,te(a,n,r,l,h,c),h.side=e,h.needsUpdate=!0,t=!0}}!0===t&&(mt.updateMultisampleRenderTarget(s),mt.updateRenderTargetMipmap(s))}B.setRenderTarget(l,h,c),B.setClearColor(q,X),void 0!==d&&(r.viewport=d),B.toneMapping=u}function $t(t,e,n){const i=!0===e.isScene?e.overrideMaterial:null;for(let r=0,s=t.length;r<s;r++){const s=t[r],{object:o,geometry:a,group:l}=s;let h=s.material;!0===h.allowOverride&&null!==i&&(h=i),o.layers.test(n.layers)&&te(o,e,n,a,h,l)}}function te(t,e,n,r,s,o){t.onBeforeRender(B,e,n,r,s,o),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),s.onBeforeRender(B,e,n,r,t,o),!0===s.transparent&&s.side===i.ehD&&!1===s.forceSinglePass?(s.side=i._Li,s.needsUpdate=!0,B.renderBufferDirect(n,e,r,s,t,o),s.side=i.Wl3,s.needsUpdate=!0,B.renderBufferDirect(n,e,r,s,t,o),s.side=i.ehD):B.renderBufferDirect(n,e,r,s,t,o),t.onAfterRender(B,e,n,r,s,o)}function ee(t,e,n){!0!==e.isScene&&(e=ht);const i=gt.get(t),r=I.state.lights,s=I.state.shadowsArray,o=r.state.ver
vendor: 3,328 bytes, line 2
2sion,a=Ct.getParameters(t,r.state,s,e,n),l=Ct.getProgramCacheKey(a);let h=i.programs;i.environment=t.isMeshStandardMaterial?e.environment:null,i.fog=e.fog,i.envMap=(t.isMeshStandardMaterial?vt:_t).get(t.envMap||i.environment),i.envMapRotation=null!==i.environment&&null===t.envMap?e.environmentRotation:t.envMapRotation,void 0===h&&(t.addEventListener("dispose",Ht),h=new Map,i.programs=h);let c=h.get(l);if(void 0!==c){if(i.currentProgram===c&&i.lightsStateVersion===o)return ie(t,a),c}else a.uniforms=Ct.getUniforms(t),t.onBeforeCompile(a,B),c=Ct.acquireProgram(a,l),h.set(l,c),i.uniforms=a.uniforms;const u=i.uniforms;return(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(u.clippingPlanes=It.uniform),ie(t,a),i.needsLights=function(t){return t.isMeshLambertMaterial||t.isMeshToonMaterial||t.isMeshPhongMaterial||t.isMeshStandardMaterial||t.isShadowMaterial||t.isShaderMaterial&&!0===t.lights}(t),i.lightsStateVersion=o,i.needsLights&&(u.ambientLightColor.value=r.state.ambient,u.lightProbe.value=r.state.probe,u.directionalLights.value=r.state.directional,u.directionalLightShadows.value=r.state.directionalShadow,u.spotLights.value=r.state.spot,u.spotLightShadows.value=r.state.spotShadow,u.rectAreaLights.value=r.state.rectArea,u.ltc_1.value=r.state.rectAreaLTC1,u.ltc_2.value=r.state.rectAreaLTC2,u.pointLights.value=r.state.point,u.pointLightShadows.value=r.state.pointShadow,u.hemisphereLights.value=r.state.hemi,u.directionalShadowMap.value=r.state.directionalShadowMap,u.directionalShadowMatrix.value=r.state.directionalShadowMatrix,u.spotShadowMap.value=r.state.spotShadowMap,u.spotLightMatrix.value=r.state.spotLightMatrix,u.spotLightMap.value=r.state.spotLightMap,u.pointShadowMap.value=r.state.pointShadowMap,u.pointShadowMatrix.value=r.state.pointShadowMatrix),i.currentProgram=c,i.uniformsList=null,c}function ne(t){if(null===t.uniformsList){const e=t.currentProgram.getUniforms();t.uniformsList=Vt.seqWithValue(e.seq,t.uniforms)}return t.uniformsList}function ie(t,e){const n=gt.get(t);n.outputColorSpace=e.outputColorSpace,n.batching=e.batching,n.batchingColor=e.batchingColor,n.instancing=e.instancing,n.instancingColor=e.instancingColor,n.instancingMorph=e.instancingMorph,n.skinning=e.skinning,n.morphTargets=e.morphTargets,n.morphNormals=e.morphNormals,n.morphColors=e.morphColors,n.morphTargetsCount=e.morphTargetsCount,n.numClippingPlanes=e.numClippingPlanes,n.numIntersection=e.numClipIntersection,n.vertexAlphas=e.vertexAlphas,n.vertexTangents=e.vertexTangents,n.toneMapping=e.toneMapping}Yt.setAnimationLoop((function(t){Wt&&Wt(t)})),"undefined"!=typeof self&&Yt.setContext(self),this.setAnimationLoop=function(t){Wt=t,kt.setAnimationLoop(t),null===t?Yt.stop():Yt.start()},kt.addEventListener("sessionstart",qt),kt.addEventListener("sessionend",Xt),this.render=function(t,e){if(void 0!==e&&!0!==e.isCamera)return void(0,i.vUy)("WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===R)return;if(!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),null===e.parent&&!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),!0===kt.enabled&&!0===kt.isPresenting&&(!0===kt.cameraAutoUpdate&&kt.updateCamera(e),e=kt.getCamera()),!0===t.isScene&&t.onBeforeRender(B,t,e,z),I=St.get(t,T.length),I.init(e),T.push(I),ot.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),it.
vendor: 10,401 bytes, line 2
2setFromProjectionMatrix(ot,i._RZ,e.reversedDepth),st=this.localClippingEnabled,rt=It.init(this.clippingPlanes,st),S=wt.get(t,M.length),S.init(),M.push(S),!0===kt.enabled&&!0===kt.isPresenting){const t=B.xr.getDepthSensingMesh();null!==t&&Kt(t,e,-1/0,B.sortObjects)}Kt(t,e,0,B.sortObjects),S.finish(),!0===B.sortObjects&&S.sort(J,$),ct=!1===kt.enabled||!1===kt.isPresenting||!1===kt.hasDepthSensing(),ct&&Tt.addToRenderList(S,t),this.info.render.frame++,!0===rt&&It.beginShadows();const n=I.state.shadowsArray;Mt.render(n,t,e),!0===rt&&It.endShadows(),!0===this.info.autoReset&&this.info.reset();const r=S.opaque,s=S.transmissive;if(I.setupLights(),e.isArrayCamera){const n=e.cameras;if(s.length>0)for(let e=0,i=n.length;e<i;e++){Jt(r,s,t,n[e])}ct&&Tt.render(t);for(let e=0,i=n.length;e<i;e++){const i=n[e];Zt(S,t,i,i.viewport)}}else s.length>0&&Jt(r,s,t,e),ct&&Tt.render(t),Zt(S,t,e);null!==z&&0===Q&&(mt.updateMultisampleRenderTarget(z),mt.updateRenderTargetMipmap(z)),!0===t.isScene&&t.onAfterRender(B,t,e),Lt.resetDefaultState(),G=-1,H=null,T.pop(),T.length>0?(I=T[T.length-1],!0===rt&&It.setGlobalState(B.clippingPlanes,I.state.camera)):I=null,M.pop(),S=M.length>0?M[M.length-1]:null},this.getActiveCubeFace=function(){return P},this.getActiveMipmapLevel=function(){return Q},this.getRenderTarget=function(){return z},this.setRenderTargetTextures=function(t,e,n){const i=gt.get(t);i.__autoAllocateDepthBuffer=!1===t.resolveDepthBuffer,!1===i.__autoAllocateDepthBuffer&&(i.__useRenderToTexture=!1),gt.get(t.texture).__webglTexture=e,gt.get(t.depthTexture).__webglTexture=i.__autoAllocateDepthBuffer?void 0:n,i.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(t,e){const n=gt.get(t);n.__webglFramebuffer=e,n.__useDefaultFramebuffer=void 0===e};const re=Nt.createFramebuffer();this.setRenderTarget=function(t,e=0,n=0){z=t,P=e,Q=n;let i=!0,r=null,s=!1,o=!1;if(t){const a=gt.get(t);if(void 0!==a.__useDefaultFramebuffer)ft.bindFramebuffer(Nt.FRAMEBUFFER,null),i=!1;else if(void 0===a.__webglFramebuffer)mt.setupRenderTarget(t);else if(a.__hasExternalTextures)mt.rebindTextures(t,gt.get(t.texture).__webglTexture,gt.get(t.depthTexture).__webglTexture);else if(t.depthBuffer){const e=t.depthTexture;if(a.__boundDepthTexture!==e){if(null!==e&&gt.has(e)&&(t.width!==e.image.width||t.height!==e.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");mt.setupDepthRenderbuffer(t)}}const l=t.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(o=!0);const h=gt.get(t).__webglFramebuffer;t.isWebGLCubeRenderTarget?(r=Array.isArray(h[e])?h[e][n]:h[e],s=!0):r=t.samples>0&&!1===mt.useMultisampledRTT(t)?gt.get(t).__webglMultisampledFramebuffer:Array.isArray(h)?h[n]:h,V.copy(t.viewport),j.copy(t.scissor),W=t.scissorTest}else V.copy(tt).multiplyScalar(Z).floor(),j.copy(et).multiplyScalar(Z).floor(),W=nt;0!==n&&(r=re);if(ft.bindFramebuffer(Nt.FRAMEBUFFER,r)&&i&&ft.drawBuffers(t,r),ft.viewport(V),ft.scissor(j),ft.setScissorTest(W),s){const i=gt.get(t.texture);Nt.framebufferTexture2D(Nt.FRAMEBUFFER,Nt.COLOR_ATTACHMENT0,Nt.TEXTURE_CUBE_MAP_POSITIVE_X+e,i.__webglTexture,n)}else if(o){const i=e;for(let e=0;e<t.textures.length;e++){const r=gt.get(t.textures[e]);Nt.framebufferTextureLayer(Nt.FRAMEBUFFER,Nt.COLOR_ATTACHMENT0+e,r.__webglTexture,n,i)}}else if(null!==t&&0!==n){const e=gt.get(t.texture);Nt.framebufferTexture2D(Nt.FRAMEBUFFER,Nt.COLOR_ATTACHMENT0,Nt.TEXTURE_2D,e.__webglTexture,n)}G=-1},this.readRenderTargetPixels=function(t,e,n,r,s,o,a,l=0){if(!t||!t.isWebGLRenderTarget)return void(0,i.vUy)("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let h=gt.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==a&&(h=h[a]),h){ft.bindFramebuffer(Nt.FRAMEBUFFER,h);try{const a=t.textures[l],h=a.format,c=a.type;if(!pt.textureFormatReadable(h))return void(0,i.vUy)("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!pt.textureTypeReadable(c))return void(0,i.vUy)("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");e>=0&&e<=t.width-r&&n>=0&&n<=t.height-s&&(t.textures.length>1&&Nt.readBuffer(Nt.COLOR_ATTACHMENT0+l),Nt.readPixels(e,n,r,s,Dt.convert(h),Dt.convert(c),o))}finally{const t=null!==z?gt.get(z).__webglFramebuffer:null;ft.bindFramebuffer(Nt.FRAMEBUFFER,t)}}},this.readRenderTargetPixelsAsync=async function(t,e,n,r,s,o,a,l=0){if(!t||!t.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let h=gt.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==a&&(h=h[a]),h){if(e>=0&&e<=t.width-r&&n>=0&&n<=t.height-s){ft.bindFramebuffer(Nt.FRAMEBUFFER,h);const a=t.textures[l],c=a.format,u=a.type;if(!pt.textureFormatReadable(c))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!pt.textureTypeReadable(u))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const d=Nt.createBuffer();Nt.bindBuffer(Nt.PIXEL_PACK_BUFFER,d),Nt.bufferData(Nt.PIXEL_PACK_BUFFER,o.byteLength,Nt.STREAM_READ),t.textures.length>1&&Nt.readBuffer(Nt.COLOR_ATTACHMENT0+l),Nt.readPixels(e,n,r,s,Dt.convert(c),Dt.convert(u),0);const p=null!==z?gt.get(z).__webglFramebuffer:null;ft.bindFramebuffer(Nt.FRAMEBUFFER,p);const f=Nt.fenceSync(Nt.SYNC_GPU_COMMANDS_COMPLETE,0);return Nt.flush(),await(0,i.Qey)(Nt,f,4),Nt.bindBuffer(Nt.PIXEL_PACK_BUFFER,d),Nt.getBufferSubData(Nt.PIXEL_PACK_BUFFER,0,o),Nt.deleteBuffer(d),Nt.deleteSync(f),o}throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(t,e=null,n=0){const i=Math.pow(2,-n),r=Math.floor(t.image.width*i),s=Math.floor(t.image.height*i),o=null!==e?e.x:0,a=null!==e?e.y:0;mt.setTexture2D(t,0),Nt.copyTexSubImage2D(Nt.TEXTURE_2D,n,0,0,o,a,r,s),ft.unbindTexture()};const se=Nt.createFramebuffer(),oe=Nt.createFramebuffer();this.copyTextureToTexture=function(t,e,n=null,r=null,s=0,o=null){let a,l,h,c,u,d,p,f,A;null===o&&(0!==s?((0,i.O4K)("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),o=s,s=0):o=0);const g=t.isCompressedTexture?t.mipmaps[o]:t.image;if(null!==n)a=n.max.x-n.min.x,l=n.max.y-n.min.y,h=n.isBox3?n.max.z-n.min.z:1,c=n.min.x,u=n.min.y,d=n.isBox3?n.min.z:0;else{const e=Math.pow(2,-s);a=Math.floor(g.width*e),l=Math.floor(g.height*e),h=t.isDataArrayTexture?g.depth:t.isData3DTexture?Math.floor(g.depth*e):1,c=0,u=0,d=0}null!==r?(p=r.x,f=r.y,A=r.z):(p=0,f=0,A=0);const m=Dt.convert(e.format),_=Dt.convert(e.type);let v;e.isData3DTexture?(mt.setTexture3D(e,0),v=Nt.TEXTURE_3D):e.isDataArrayTexture||e.isCompressedArrayTexture?(mt.setTexture2DArray(e,0),v=Nt.TEXTURE_2D_ARRAY):(mt.setTexture2D(e,0),v=Nt.TEXTURE_2D),Nt.pixelStorei(Nt.UNPACK_FLIP_Y_WEBGL,e.flipY),Nt.pixelStorei(Nt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha),Nt.pixelStorei(Nt.UNPACK_ALIGNMENT,e.unpackAlignment);const y=Nt.getParameter(Nt.UNPACK_ROW_LENGTH),E=Nt.getParameter(Nt.UNPACK_IMAGE_HEIGHT),x=Nt.getParameter(Nt.UNPACK_SKIP_PIXELS),C=Nt.getParameter(Nt.UNPACK_SKIP_ROWS),b=Nt.getParameter(Nt.UNPACK_SKIP_IMAGES);Nt.pixelStorei(Nt.UNPACK_ROW_LENGTH,g.width),Nt.pixelStorei(Nt.UNPACK_IMAGE_HEIGHT,g.height),Nt.pixelStorei(Nt.UNPACK_SKIP_PIXELS,c),Nt.pixelStorei(Nt.UNPACK_SKIP_ROWS,u),Nt.pixelStorei(Nt.UNPACK_SKIP_IMAGES,d);const w=t.isDataArrayTexture||t.isData3DTexture,S=e.isDataArrayTexture||e.isData3DTexture;if(t.isDepthTexture){const n=gt.get(t),i=gt.get(e),r=gt.get(n.__renderTarget),g=gt.get(i.__renderTarget);ft.bindFramebuffer(Nt.READ_FRAMEBUFFER,r.__webglFramebuffer),ft.bindFramebuffer(Nt.DRAW_FRAMEBUFFER,g.__webglFramebuffer);for(let n=0;n<h;n++)w&&(Nt.framebufferTextureLayer(Nt.READ_FRAMEBUFFER,Nt.COLOR_ATTACHMENT0,gt.get(t).__webglTexture,s,d+n),Nt.framebufferTextureLayer(Nt.DRAW_FRAMEBUFFER,Nt.COLOR_ATTACHMENT0,gt.get(e).__webglTexture,o,A+n)),Nt.blitFramebuffer(c,u,a,l,p,f,a,l,Nt.DEPTH_BUFFER_BIT,Nt.NEAREST);ft.bindFramebuffer(Nt.READ_FRAMEBUFFER,null),ft.bindFramebuffer(Nt.DRAW_FRAMEBUFFER,null)}else if(0!==s||t.isRenderTargetTexture||gt.has(t)){const n=gt.get(t),i=gt.get(e);ft.bindFramebuffer(Nt.READ_FRAMEBUFFER,se),ft.bindFramebuffer(Nt.DRAW_FRAMEBUFFER,oe);for(let t=0;t<h;t++)w?Nt.framebufferTextureLayer(Nt.READ_FRAMEBUFFER,Nt.COLOR_ATTACHMENT0,n.__webglTexture,s,d+t):Nt.framebufferTexture2D(Nt.READ_FRAMEBUFFER,Nt.COLOR_ATTACHMENT0,Nt.TEXTURE_2D,n.__webglTexture,s),S?Nt.framebufferTextureLayer(Nt.DRAW_FRAMEBUFFER,Nt.COLOR_ATTACHMENT0,i.__webglTexture,o,A+t):Nt.framebufferTexture2D(Nt.DRAW_FRAMEBUFFER,Nt.COLOR_ATTACHMENT0,Nt.TEXTURE_2D,i.__webglTexture,o),0!==s?Nt.blitFramebuffer(c,u,a,l,p,f,a,l,Nt.COLOR_BUFFER_BIT,Nt.NEAREST):S?Nt.copyTexSubImage3D(v,o,p,f,A+t,c,u,a,l):Nt.copyTexSubImage2D(v,o,p,f,c,u,a,l);ft.bindFramebuffer(Nt.READ_FRAMEBUFFER,null),ft.bindFramebuffer(Nt.DRAW_FRAMEBUFFER,null)}else S?t.isDataTexture||t.isData3DTexture?Nt.texSubImage3D(v,o,p,f,A,a,l,h,m,_,g.data):e.isCompressedArrayTexture?Nt.compressedTexSubImage3D(v,o,p,f,A,a,l,h,m,g.data):Nt.texSubImage3D(v,o,p,f,A,a,l,h,m,_,g):t.isDataTexture?Nt.texSubImage2D(Nt.TEXTURE_2D,o,p,f,a,l,m,_,g.data):t.isCompressedTexture?Nt.compressedTexSubImage2D(Nt.TEXTURE_2D,o,p,f,g.width,g.height,m,g.data):Nt.texSubImage2D(Nt.TEXTURE_2D,o,p,f,a,l,m,_,g);Nt.pixelStorei(Nt.UNPACK_ROW_LENGTH,y),Nt.pixelStorei(Nt.UNPACK_IMAGE_HEIGHT,E),Nt.pixelStorei(Nt.UNPACK_SKIP_PIXELS,x),Nt.pixelStorei(Nt.UNPACK_SKIP_ROWS,C),Nt.pixelStorei(Nt.UNPACK_SKIP_IMAGES,b),0===o&&e.generateMipmaps&&Nt.generateMipmap(v),ft.unbindTexture()},this.initRenderTarget=function(t){void 0===gt.get(t).__webglFramebuffer&&mt.setupRenderTarget(t)},this.initTexture=function(t){t.isCubeTexture?mt.setTextureCube(t,0):t.isData3DTexture?mt.setTexture3D(t,0):t.isDataArrayTexture||t.isCompressedArrayTexture?mt.setTexture2DArray(t,0):mt.setTexture2D(t,0),ft.unbindTexture()},this.resetState=function(){P=0,Q=0,z=null,ft.reset(),Lt.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return i._RZ}get outputColorSpace(){return this._outputColorSpace}
vendor: 18,726 bytes, line 2
2set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=i.epp._getDrawingBufferColorSpace(t),e.unpackColorSpace=i.epp._getUnpackColorSpace()}}},365:(t,e,n)=>{"use strict";n.d(e,{z:()=>E});var i=n(250);const r={type:"change"},s={type:"start"},o={type:"end"},a=new i.zHn,l=new i.JOQ,h=Math.cos(70*i.M8C.DEG2RAD),c=new i.Pa4,u=2*Math.PI,d=-1,p=0,f=1,A=2,g=3,m=4,_=5,v=6,y=1e-6;class E extends i.ZXd{constructor(t,e=null){super(t,e),this.state=d,this.target=new i.Pa4,this.cursor=new i.Pa4,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:i.RsA.ROTATE,MIDDLE:i.RsA.DOLLY,RIGHT:i.RsA.PAN},this.touches={ONE:i.QmN.ROTATE,TWO:i.QmN.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new i.Pa4,this._lastQuaternion=new i._fP,this._lastTargetPosition=new i.Pa4,this._quat=(new i._fP).setFromUnitVectors(t.up,new i.Pa4(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new i.$V,this._sphericalDelta=new i.$V,this._scale=1,this._panOffset=new i.Pa4,this._rotateStart=new i.FM8,this._rotateEnd=new i.FM8,this._rotateDelta=new i.FM8,this._panStart=new i.FM8,this._panEnd=new i.FM8,this._panDelta=new i.FM8,this._dollyStart=new i.FM8,this._dollyEnd=new i.FM8,this._dollyDelta=new i.FM8,this._dollyDirection=new i.Pa4,this._mouse=new i.FM8,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=C.bind(this),this._onPointerDown=x.bind(this),this._onPointerUp=b.bind(this),this._onContextMenu=R.bind(this),this._onMouseWheel=I.bind(this),this._onKeyDown=M.bind(this),this._onTouchStart=T.bind(this),this._onTouchMove=B.bind(this),this._onMouseDown=w.bind(this),this._onMouseMove=S.bind(this),this._interceptControlDown=P.bind(this),this._interceptControlUp=D.bind(this),null!==this.domElement&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1});this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents();this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}stopListenToKeyEvents(){null!==this._domElementKeyEvents&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(r),this.update(),this.state=d}update(t=null){const e=this.object.position;c.copy(e).sub(this.target),c.applyQuaternion(this._quat),this._spherical.setFromVector3(c),this.autoRotate&&this.state===d&&this._rotateLeft(this._getAutoRotationAngle(t)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,s=this.maxAzimuthAngle;isFinite(n)&&isFinite(s)&&(n<-Math.PI?n+=u:n>Math.PI&&(n-=u),s<-Math.PI?s+=u:s>Math.PI&&(s-=u),this._spherical.theta=n<=s?Math.max(n,Math.min(s,this._spherical.theta)):this._spherical.theta>(n+s)/2?Math.max(n,this._spherical.theta):Math.min(s,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),!0===this.enableDamping?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let o=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const t=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),o=t!=this._spherical.radius}if(c.setFromSpherical(this._spherical),c.applyQuaternion(this._quatInverse),e.copy(this.target).add(c),this.object.lookAt(this.target),!0===this.enableDamping?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let t=null;if(this.object.isPerspectiveCamera){const e=c.length();t=this._clampDistance(e*this._scale);const n=e-t;this.object.position.addScaledVector(this._dollyDirection,n),this.object.updateMatrixWorld(),o=!!n}else if(this.object.isOrthographicCamera){const e=new i.Pa4(this._mouse.x,this._mouse.y,0);e.unproject(this.object);const n=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),o=n!==this.object.zoom;const r=new i.Pa4(this._mouse.x,this._mouse.y,0);r.unproject(this.object),this.object.position.sub(r).add(e),this.object.updateMatrixWorld(),t=c.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;null!==t&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(t).add(this.object.position):(a.origin.copy(this.object.position),a.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(a.direction))<h?this.object.lookAt(this.target):(l.setFromNormalAndCoplanarPoint(this.object.up,this.target),a.intersectPlane(l,this.target))))}else if(this.object.isOrthographicCamera){const t=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),t!==this.object.zoom&&(this.object.updateProjectionMatrix(),o=!0)}return this._scale=1,this._performCursorZoom=!1,!!(o||this._lastPosition.distanceToSquared(this.object.position)>y||8*(1-this._lastQuaternion.dot(this.object.quaternion))>y||this._lastTargetPosition.distanceToSquared(this.target)>y)&&(this.dispatchEvent(r),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0)}_getAutoRotationAngle(t){return null!==t?u/60*this.autoRotateSpeed*t:u/60/60*this.autoRotateSpeed}_getZoomScale(t){const e=Math.abs(.01*t);return Math.pow(.95,this.zoomSpeed*e)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,e){c.setFromMatrixColumn(e,0),c.multiplyScalar(-t),this._panOffset.add(c)}_panUp(t,e){!0===this.screenSpacePanning?c.setFromMatrixColumn(e,1):(c.setFromMatrixColumn(e,0),c.crossVectors(this.object.up,c)),c.multiplyScalar(t),this._panOffset.add(c)}_pan(t,e){const n=this.domElement;if(this.object.isPerspectiveCamera){const i=this.object.position;c.copy(i).sub(this.target);let r=c.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*r/n.clientHeight,this.object.matrix),this._panUp(2*e*r/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(e*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,e){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),i=t-n.left,r=e-n.top,s=n.width,o=n.height;this._mouse.x=i/s*2-1,this._mouse.y=-r/o*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(u*this._rotateDelta.x/e.clientHeight),this._rotateUp(u*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(t){this._panEnd.set(t.clientX,t.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let e=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(u*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),e=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-u*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),e=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(u*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),e=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-u*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),e=!0}e&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(1===this._pointers.length)this._rotateStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),n=.5*(t.pageX+e.x),i=.5*(t.pageY+e.y);this._rotateStart.set(n,i)}}_handleTouchStartPan(t){if(1===this._pointers.length)this._panStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),n=.5*(t.pageX+e.x),i=.5*(t.pageY+e.y);this._panStart.set(n,i)}}_handleTouchStartDolly(t){const e=this._getSecondPointerPosition(t),n=t.pageX-e.x,i=t.pageY-e.y,r=Math.sqrt(n*n+i*i);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(1==this._pointers.length)this._rotateEnd.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),n=.5*(t.pageX+e.x),i=.5*(t.pageY+e.y);this._rotateEnd.set(n,i)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(u*this._rotateDelta.x/e.clientHeight),this._rotateUp(u*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(1===this._pointers.length)this._panEnd.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),n=.5*(t.pageX+e.x),i=.5*(t.pageY+e.y);this._panEnd.set(n,i)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const e=this._getSecondPointerPosition(t),n=t.pageX-e.x,i=t.pageY-e.y,r=Math.sqrt(n*n+i*i);this._dollyEnd.set(0,r),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const s=.5*(t.pageX+e.x),o=.5*(t.pageY+e.y);this._updateZoomParameters(s,o)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId)return void this._pointers.splice(e,1)}_isTrackingPointer(t){for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId)return!0;return!1}_trackPointer(t){let e=this._pointerPositions[t.pointerId];void 0===e&&(e=new i.FM8,this._pointerPositions[t.pointerId]=e),e.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const e=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[e]}_customWheelEvent(t){const e=t.deltaMode,n={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(e){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100}return t.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}}function x(t){!1!==this.enabled&&(0===this._pointers.length&&(this.domElement.setPointerCapture(t.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),this._isTrackingPointer(t)||(this._addPointer(t),"touch"===t.pointerType?this._onTouchStart(t):this._onMouseDown(t)))}function C(t){!1!==this.enabled&&("touch"===t.pointerType?this._onTouchMove(t):this._onMouseMove(t))}function b(t){switch(this._removePointer(t),this._pointers.length){case 0:this.domElement.releasePointerCapture(t.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(o),this.state=d;break;case 1:const e=this._pointers[0],n=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:n.x,pageY:n.y})}}function w(t){let e;switch(t.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case i.RsA.DOLLY:if(!1===this.enableZoom)return;this._handleMouseDownDolly(t),this.state=f;break;case i.RsA.ROTATE:if(t.ctrlKey||t.metaKey||t.shiftKey){if(!1===this.enablePan)return;this._handleMouseDownPan(t),this.state=A}else{if(!1===this.enableRotate)return;this._handleMouseDownRotate(t),this.state=p}break;case i.RsA.PAN:if(t.ctrlKey||t.metaKey||t.shiftKey){if(!1===this.enableRotate)return;this._handleMouseDownRotate(t),this.state=p}else{if(!1===this.enablePan)return;this._handleMouseDownPan(t),this.state=A}break;default:this.state=d}this.state!==d&&this.dispatchEvent(s)}function S(t){switch(this.state){case p:if(!1===this.enableRotate)return;this._handleMouseMoveRotate(t);break;case f:if(!1===this.enableZoom)return;this._handleMouseMoveDolly(t);break;case A:if(!1===this.enablePan)return;this._handleMouseMovePan(t)}}function I(t){!1!==this.enabled&&!1!==this.enableZoom&&this.state===d&&(t.preventDefault(),this.dispatchEvent(s),this._handleMouseWheel(this._customWheelEvent(t)),this.dispatchEvent(o))}function M(t){!1!==this.enabled&&this._handleKeyDown(t)}function T(t){switch(this._trackPointer(t),this._pointers.length){case 1:switch(this.touches.ONE){case i.QmN.ROTATE:if(!1===this.enableRotate)return;this._handleTouchStartRotate(t),this.state=g;break;case i.QmN.PAN:if(!1===this.enablePan)return;this._handleTouchStartPan(t),this.state=m;break;default:this.state=d}break;case 2:switch(this.touches.TWO){case i.QmN.DOLLY_PAN:if(!1===this.enableZoom&&!1===this.enablePan)return;this._handleTouchStartDollyPan(t),this.state=_;break;case i.QmN.DOLLY_ROTATE:if(!1===this.enableZoom&&!1===this.enableRotate)return;this._handleTouchStartDollyRotate(t),this.state=v;break;default:this.state=d}break;default:this.state=d}this.state!==d&&this.dispatchEvent(s)}function B(t){switch(this._trackPointer(t),this.state){case g:if(!1===this.enableRotate)return;this._handleTouchMoveRotate(t),this.update();break;case m:if(!1===this.enablePan)return;this._handleTouchMovePan(t),this.update();break;case _:if(!1===this.enableZoom&&!1===this.enablePan)return;this._handleTouchMoveDollyPan(t),this.update();break;case v:if(!1===this.enableZoom&&!1===this.enableRotate)return;this._handleTouchMoveDollyRotate(t),this.update();break;default:this.state=d}}function R(t){!1!==this.enabled&&t.preventDefault()}
2function P(t){if("Control"===t.key){this._controlActive=!0;this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0})}}function D(t){if("Control"===t.key){this._controlActive=!1;this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0})}}},516:(t,e,n)=>{"use strict";n.d(e,{C:()=>r});var i=n(250);class r extends i.xsS{constructor(){super();const t=new i.DvJ;t.deleteAttribute("uv");const e=new i.Wid({side:i._Li}),n=new i.Wid,r=new i.cek(16777215,900,28,2);r.position.set(.418,16.199,.3),this.add(r);const o=new i.Kj0(t,e);o.position.set(-.757,13.219,.717),o.scale.set(31.713,28.305,28.591),this.add(o);const a=new i.SPe(t,n,6),l=new i.Tme;l.position.set(-10.906,2.009,1.846),l.rotation.set(0,-.195,0),l.scale.set(2.328,7.905,4.651),l.updateMatrix(),a.setMatrixAt(0,l.matrix),l.position.set(-5.607,-.754,-.758),l.rotation.set(0,.994,0),l.scale.set(1.97,1.534,3.955),l.updateMatrix(),a.setMatrixAt(1,l.matrix),l.position.set(6.167,.857,7.803),l.rotation.set(0,.561,0),l.scale.set(3.927,6.285,3.687),l.updateMatrix(),a.setMatrixAt(2,l.matrix),l.position.set(-2.017,.018,6.124),l.rotation.set(0,.333,0),l.scale.set(2.002,4.566,2.064),l.updateMatrix(),a.setMatrixAt(3,l.matrix),l.position.set(2.291,-.756,-2.621),l.rotation.set(0,-.286,0),l.scale.set(1.546,1.552,1.496),l.updateMatrix(),a.setMatrixAt(4,l.matrix),l.position.set(-2.193,-.369,-5.547),l.rotation.set(0,.516,0),l.scale.set(3.875,3.487,2.986),l.updateMatrix(),a.setMatrixAt(5,l.matrix),this.add(a);const h=new i.Kj0(t,s(50));h.position.set(-16.116,14.37,8.208),h.scale.set(.1,2.428,2.739),this.add(h);const c=new i.Kj0(t,s(50));c.position.set(-16.109,18.021,-8.207),c.scale.set(.1,2.425,2.751),this.add(c);const u=new i.Kj0(t,s(17));u.position.set(14.904,12.198,-1.832),u.scale.set(.15,4.265,6.331),this.add(u);const d=new i.Kj0(t,s(43));d.position.set(-.462,8.89,14.52),d.scale.set(4.38,5.441,.088),this.add(d);const p=new i.Kj0(t,s(20));p.position.set(3.235,11.486,-12.541),p.scale.set(2.5,2,.1),this.add(p);const f=new i.Kj0(t,s(100));f.position.set(0,20,0),f.scale.set(1,.1,1),this.add(f)}dispose(){const t=new Set;this.traverse((e=>{e.isMesh&&(t.add(e.geometry),t.add(e.material))}));for(const e of t)e.dispose()}}function s(t){return new i.YBo({color:0,emissive:16777215,emissiveIntensity:t})}},854:(t,e,n)=>{"use strict";n.d(e,{_:()=>s});var i=n(250);const r=new WeakMap;class s extends i.aNw{constructor(t){super(t),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(t){return this.decoderPath=t,this}setDecoderConfig(t){return this.decoderConfig=t,this}setWorkerLimit(t){return this.workerLimit=t,this}load(t,e,n,r){const s=new i.hH6(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,(t=>{this.parse(t,e,r)}),n,r)}parse(t,e,n=(()=>{})){this.decodeDracoFile(t,e,null,null,i.KI_,n).catch(n)}decodeDracoFile(t,e,n,r,s=i.GUF,o=(()=>{})){const a={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n,vertexColorSpace:s};return this.decodeGeometry(t,a).then(e).catch(o)}decodeGeometry(t,e){const n=JSON.stringify(e);if(r.has(t)){const e=r.get(t);if(e.key===n)return e.promise;if(0===t.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let i;const s=this.workerNextTaskID++,o=t.byteLength,a=this._getWorker(s,o).then((n=>(i=n,new Promise(((n,r)=>{i._callbacks[s]={resolve:n,reject:r},i.postMessage({type:"decode",id:s,taskConfig:e,buffer:t},[t])}))))).then((t=>this._createGeometry(t.geometry)));return a.catch((()=>!0)).then((()=>{i&&s&&this._releaseTask(i,s)})),r.set(t,{key:n,promise:a}),a}_createGeometry(t){const e=new i.u9r;t.index&&e.setIndex(new i.TlE(t.index.array,1));for(let n=0;n<t.attributes.length;n++){const{name:r,array:s,itemSize:o,stride:a,vertexColorSpace:l}=t.attributes[n];let h;if(o===a)h=new i.TlE(s,o);else{const t=new i.vpT(s,a);
vendor: 8,631 bytes, line 2
2h=new i.kB5(t,o,0)}"color"===r&&(this._assignVertexColorSpace(h,l),h.normalized=s instanceof Float32Array==!1),e.setAttribute(r,h)}return e}_assignVertexColorSpace(t,e){if(e!==i.KI_)return;const n=new i.Ilk;for(let e=0,r=t.count;e<r;e++)n.fromBufferAttribute(t,e),i.epp.colorSpaceToWorking(n,i.KI_),t.setXYZ(e,n.r,n.g,n.b)}_loadLibrary(t,e){const n=new i.hH6(this.manager);return n.setPath(this.decoderPath),n.setResponseType(e),n.setWithCredentials(this.withCredentials),new Promise(((e,i)=>{n.load(t,e,void 0,i)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const t="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,e=[];return t?e.push(this._loadLibrary("draco_decoder.js","text")):(e.push(this._loadLibrary("draco_wasm_wrapper.js","text")),e.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(e).then((e=>{const n=e[0];t||(this.decoderConfig.wasmBinary=e[1]);const i=o.toString(),r=["/* draco decoder */",n,"","/* worker */",i.substring(i.indexOf("{")+1,i.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([r]))})),this.decoderPending}_getWorker(t,e){return this._initDecoder().then((()=>{if(this.workerPool.length<this.workerLimit){const t=new Worker(this.workerSourceURL);t._callbacks={},t._taskCosts={},t._taskLoad=0,t.postMessage({type:"init",decoderConfig:this.decoderConfig}),t.onmessage=function(e){const n=e.data;switch(n.type){case"decode":t._callbacks[n.id].resolve(n);break;case"error":t._callbacks[n.id].reject(n);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+n.type+'"')}},this.workerPool.push(t)}else this.workerPool.sort((function(t,e){return t._taskLoad>e._taskLoad?-1:1}));const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[t]=e,n._taskLoad+=e,n}))}_releaseTask(t,e){t._taskLoad-=t._taskCosts[e],delete t._callbacks[e],delete t._taskCosts[e]}debug(){console.log("Task load: ",this.workerPool.map((t=>t._taskLoad)))}dispose(){for(let t=0;t<this.workerPool.length;++t)this.workerPool[t].terminate();return this.workerPool.length=0,""!==this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),this}}function o(){let t,e;function n(t,e,n,i,r,s){const o=n.num_points(),a=s.num_components(),l=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32}}(t,r),h=a*r.BYTES_PER_ELEMENT,c=4*Math.ceil(h/4),u=c/r.BYTES_PER_ELEMENT,d=o*h,p=o*c,f=t._malloc(d);e.GetAttributeDataArrayForAllPoints(n,s,l,d,f);const A=new r(t.HEAPF32.buffer,f,d/r.BYTES_PER_ELEMENT);let g;if(h===c)g=A.slice();else{g=new r(p/r.BYTES_PER_ELEMENT);let t=0;for(let e=0,n=A.length;e<n;e++){for(let n=0;n<a;n++)g[t+n]=A[e*a+n];t+=u}}return t._free(f),{name:i,count:o,itemSize:a,array:g,stride:u}}onmessage=function(i){const r=i.data;switch(r.type){case"init":t=r.decoderConfig,e=new Promise((function(e){t.onModuleLoaded=function(t){e({draco:t})},DracoDecoderModule(t)}));break;case"decode":const i=r.buffer,s=r.taskConfig;e.then((t=>{const e=t.draco,o=new e.Decoder;try{const t=function(t,e,i,r){const s=r.attributeIDs,o=r.attributeTypes;let a,l;const h=e.GetEncodedGeometryType(i);if(h===t.TRIANGULAR_MESH)a=new t.Mesh,l=e.DecodeArrayToMesh(i,i.byteLength,a);else{if(h!==t.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");a=new t.PointCloud,l=e.DecodeArrayToPointCloud(i,i.byteLength,a)}if(!l.ok()||0===a.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+l.error_msg());const c={index:null,attributes:[]};for(const i in s){const l=self[o[i]];let h,u;if(r.useUniqueIDs)u=s[i],h=e.GetAttributeByUniqueId(a,u);else{if(u=e.GetAttributeId(a,t[s[i]]),-1===u)continue;h=e.GetAttribute(a,u)}const d=n(t,e,a,i,l,h);"color"===i&&(d.vertexColorSpace=r.vertexColorSpace),c.attributes.push(d)}h===t.TRIANGULAR_MESH&&(c.index=function(t,e,n){const i=n.num_faces(),r=3*i,s=4*r,o=t._malloc(s);e.GetTrianglesUInt32Array(n,s,o);const a=new Uint32Array(t.HEAPF32.buffer,o,r).slice();return t._free(o),{array:a,itemSize:1}}(t,e,a));return t.destroy(a),c}(e,o,new Int8Array(i),s),a=t.attributes.map((t=>t.array.buffer));t.index&&a.push(t.index.array.buffer),self.postMessage({type:"decode",id:r.id,geometry:t},a)}catch(t){console.error(t),self.postMessage({type:"error",id:r.id,error:t.message})}finally{e.destroy(o)}}))}}}},867:(t,e,n)=>{"use strict";n.d(e,{E:()=>s});var i=n(250);function r(t,e){if(e===i.WwZ)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===i.z$h||e===i.UlW){let n=t.getIndex();if(null===n){const e=[],i=t.getAttribute("position");if(void 0===i)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t;for(let t=0;t<i.count;t++)e.push(t);t.setIndex(e),n=t.getIndex()}const r=n.count-2,s=[];if(e===i.z$h)for(let t=1;t<=r;t++)s.push(n.getX(0)),s.push(n.getX(t)),s.push(n.getX(t+1));else for(let t=0;t<r;t++)t%2==0?(s.push(n.getX(t)),s.push(n.getX(t+1)),s.push(n.getX(t+2))):(s.push(n.getX(t+2)),s.push(n.getX(t+1)),s.push(n.getX(t)));s.length/3!==r&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const o=t.clone();return o.setIndex(s),o.clearGroups(),o}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),t}class s extends i.aNw{constructor(t){super(t),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(t){return new u(t)})),this.register((function(t){return new d(t)})),this.register((function(t){return new E(t)})),this.register((function(t){return new x(t)})),this.register((function(t){return new C(t)})),this.register((function(t){return new f(t)})),this.register((function(t){return new A(t)})),this.register((function(t){return new g(t)})),this.register((function(t){return new m(t)})),this.register((function(t){return new c(t)})),this.register((function(t){return new _(t)})),this.register((function(t){return new p(t)})),this.register((function(t){return new y(t)})),this.register((function(t){return new v(t)})),this.register((function(t){return new l(t)})),this.register((function(t){return new b(t)})),this.register((function(t){return new w(t)}))}load(t,e,n,r){const s=this;let o;if(""!==this.resourcePath)o=this.resourcePath;else if(""!==this.path){const e=i.Zp0.extractUrlBase(t);o=i.Zp0.resolveURL(e,this.path)}else o=i.Zp0.extractUrlBase(t);this.manager.itemStart(t);const a=function(e){r?r(e):console.error(e),s.manager.itemError(t),s.manager.itemEnd(t)},l=new i.hH6(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(t,(function(n){try{s.parse(n,o,(function(n){e(n),s.manager.itemEnd(t)}),a)}catch(t){a(t)}}),n,a)}setDRACOLoader(t){return this.dracoLoader=t,this}setKTX2Loader(t){return this.ktx2Loader=t,this}setMeshoptDecoder(t){return this.meshoptDecoder=t,this}register(t){return-1===this.pluginCallbacks.indexOf(t)&&this.pluginCallbacks.push(t),this}unregister(t){return-1!==this.pluginCallbacks.indexOf(t)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,e,n,i){let r;const s={},o={},l=new TextDecoder;if("string"==typeof t)r=JSON.parse(t);else if(t instanceof ArrayBuffer){if(l.decode(new Uint8Array(t,0,4))===S){try{s[a.KHR_BINARY_GLTF]=new T(t)}catch(t){return void(i&&i(t))}r=JSON.parse(s[a.KHR_BINARY_GLTF].content)}else r=JSON.parse(l.decode(t))}else r=t;if(void 0===r.asset||r.asset.version[0]<2)return void(i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const c=new tt(r,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let t=0;t<this.pluginCallbacks.length;t++){const e=this.pluginCallbacks[t](c);e.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),o[e.name]=e,s[e.name]=!0}if(r.extensionsUsed)for(let t=0;t<r.extensionsUsed.length;++t){const e=r.extensionsUsed[t],n=r.extensionsRequired||[];switch(e){case a.KHR_MATERIALS_UNLIT:s[e]=new h;break;case a.KHR_DRACO_MESH_COMPRESSION:s[e]=new B(r,this.dracoLoader);break;case a.KHR_TEXTURE_TRANSFORM:s[e]=new R;break;
vendor: 22,945 bytes, line 2
2case a.KHR_MESH_QUANTIZATION:s[e]=new P;break;default:n.indexOf(e)>=0&&void 0===o[e]&&console.warn('THREE.GLTFLoader: Unknown extension "'+e+'".')}}c.setExtensions(s),c.setPlugins(o),c.parse(n,i)}parseAsync(t,e){const n=this;return new Promise((function(i,r){n.parse(t,e,i,r)}))}}function o(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const a={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class l{constructor(t){this.parser=t,this.name=a.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let n=0,i=e.length;n<i;n++){const i=e[n];i.extensions&&i.extensions[this.name]&&void 0!==i.extensions[this.name].light&&t._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(t){const e=this.parser,n="light:"+t;let r=e.cache.get(n);if(r)return r;const s=e.json,o=((s.extensions&&s.extensions[this.name]||{}).lights||[])[t];let a;const l=new i.Ilk(16777215);void 0!==o.color&&l.setRGB(o.color[0],o.color[1],o.color[2],i.GUF);const h=void 0!==o.range?o.range:0;switch(o.type){case"directional":a=new i.Ox3(l),a.target.position.set(0,0,-1),a.add(a.target);break;case"point":a=new i.cek(l),a.distance=h;break;case"spot":a=new i.PMe(l),a.distance=h,o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,a.angle=o.spot.outerConeAngle,a.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,a.target.position.set(0,0,-1),a.add(a.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return a.position.set(0,0,0),X(a,o),void 0!==o.intensity&&(a.intensity=o.intensity),a.name=e.createUniqueName(o.name||"light_"+t),r=Promise.resolve(a),e.cache.add(n,r),r}getDependency(t,e){if("light"===t)return this._loadLight(e)}createNodeAttachment(t){const e=this,n=this.parser,i=n.json.nodes[t],r=(i.extensions&&i.extensions[this.name]||{}).light;return void 0===r?null:this._loadLight(r).then((function(t){return n._getNodeRef(e.cache,r,t)}))}}class h{constructor(){this.name=a.KHR_MATERIALS_UNLIT}getMaterialType(){return i.vBJ}extendParams(t,e,n){const r=[];t.color=new i.Ilk(1,1,1),t.opacity=1;const s=e.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const e=s.baseColorFactor;t.color.setRGB(e[0],e[1],e[2],i.GUF),t.opacity=e[3]}void 0!==s.baseColorTexture&&r.push(n.assignTexture(t,"map",s.baseColorTexture,i.KI_))}return Promise.all(r)}}class c{constructor(t){this.parser=t,this.name=a.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const i=n.extensions[this.name].emissiveStrength;return void 0!==i&&(e.emissiveIntensity=i),Promise.resolve()}}class u{constructor(t){this.parser=t,this.name=a.KHR_MATERIALS_CLEARCOAT}getMaterialType(t){const e=this.parser.json.materials[t];return e.extensions&&e.extensions[this.name]?i.EJi:null}extendMaterialParams(t,e){const n=this.parser,r=n.json.materials[t];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];if(void 0!==o.clearcoatFactor&&(e.clearcoat=o.clearcoatFactor),void 0!==o.clearcoatTexture&&s.push(n.assignTexture(e,"clearcoatMap",o.clearcoatTexture)),void 0!==o.clearcoatRoughnessFactor&&(e.clearcoatRoughness=o.clearcoatRoughnessFactor),void 0!==o.clearcoatRoughnessTexture&&s.push(n.assignTexture(e,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),void 0!==o.clearcoatNormalTexture&&(s.push(n.assignTexture(e,"clearcoatNormalMap",o.clearcoatNormalTexture)),void 0!==o.clearcoatNormalTexture.scale)){const t=o.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new i.FM8(t,t)}return Promise.all(s)}}class d{constructor(t){this.parser=t,this.name=a.KHR_MATERIALS_DISPERSION}getMaterialType(t){const e=this.parser.json.materials[t];return e.extensions&&e.extensions[this.name]?i.EJi:null}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const i=n.extensions[this.name];return e.dispersion=void 0!==i.dispersion?i.dispersion:0,Promise.resolve()}}class p{constructor(t){this.parser=t,this.name=a.KHR_MATERIALS_IRIDESCENCE}getMaterialType(t){const e=this.parser.json.materials[t];return e.extensions&&e.extensions[this.name]?i.EJi:null}extendMaterialParams(t,e){const n=this.parser,i=n.json.materials[t];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return void 0!==s.iridescenceFactor&&(e.iridescence=s.iridescenceFactor),void 0!==s.iridescenceTexture&&r.push(n.assignTexture(e,"iridescenceMap",s.iridescenceTexture)),void 0!==s.iridescenceIor&&(e.iridescenceIOR=s.iridescenceIor),void 0===e.iridescenceThicknessRange&&(e.iridescenceThicknessRange=[100,400]),void 0!==s.iridescenceThicknessMinimum&&(e.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),void 0!==s.iridescenceThicknessMaximum&&(e.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),void 0!==s.iridescenceThicknessTexture&&r.push(n.assignTexture(e,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(r)}}class f{constructor(t){this.parser=t,this.name=a.KHR_MATERIALS_SHEEN}getMaterialType(t){const e=this.parser.json.materials[t];return e.extensions&&e.extensions[this.name]?i.EJi:null}extendMaterialParams(t,e){const n=this.parser,r=n.json.materials[t];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[];e.sheenColor=new i.Ilk(0,0,0),e.sheenRoughness=0,e.sheen=1;const o=r.extensions[this.name];if(void 0!==o.sheenColorFactor){const t=o.sheenColorFactor;e.sheenColor.setRGB(t[0],t[1],t[2],i.GUF)}return void 0!==o.sheenRoughnessFactor&&(e.sheenRoughness=o.sheenRoughnessFactor),void 0!==o.sheenColorTexture&&s.push(n.assignTexture(e,"sheenColorMap",o.sheenColorTexture,i.KI_)),void 0!==o.sheenRoughnessTexture&&s.push(n.assignTexture(e,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(s)}}class A{constructor(t){this.parser=t,this.name=a.KHR_MATERIALS_TRANSMISSION}getMaterialType(t){const e=this.parser.json.materials[t];return e.extensions&&e.extensions[this.name]?i.EJi:null}extendMaterialParams(t,e){const n=this.parser,i=n.json.materials[t];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return void 0!==s.transmissionFactor&&(e.transmission=s.transmissionFactor),void 0!==s.transmissionTexture&&r.push(n.assignTexture(e,"transmissionMap",s.transmissionTexture)),Promise.all(r)}}class g{constructor(t){this.parser=t,this.name=a.KHR_MATERIALS_VOLUME}getMaterialType(t){const e=this.parser.json.materials[t];return e.extensions&&e.extensions[this.name]?i.EJi:null}extendMaterialParams(t,e){const n=this.parser,r=n.json.materials[t];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];e.thickness=void 0!==o.thicknessFactor?o.thicknessFactor:0,void 0!==o.thicknessTexture&&s.push(n.assignTexture(e,"thicknessMap",o.thicknessTexture)),e.attenuationDistance=o.attenuationDistance||1/0;const a=o.attenuationColor||[1,1,1];return e.attenuationColor=(new i.Ilk).setRGB(a[0],a[1],a[2],i.GUF),Promise.all(s)}}class m{constructor(t){this.parser=t,this.name=a.KHR_MATERIALS_IOR}getMaterialType(t){const e=this.parser.json.materials[t];return e.extensions&&e.extensions[this.name]?i.EJi:null}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const i=n.extensions[this.name];return e.ior=void 0!==i.ior?i.ior:1.5,Promise.resolve()}}class _{constructor(t){this.parser=t,this.name=a.KHR_MATERIALS_SPECULAR}getMaterialType(t){const e=this.parser.json.materials[t];return e.extensions&&e.extensions[this.name]?i.EJi:null}extendMaterialParams(t,e){const n=this.parser,r=n.json.materials[t];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];e.specularIntensity=void 0!==o.specularFactor?o.specularFactor:1,void 0!==o.specularTexture&&s.push(n.assignTexture(e,"specularIntensityMap",o.specularTexture));const a=o.specularColorFactor||[1,1,1];return e.specularColor=(new i.Ilk).setRGB(a[0],a[1],a[2],i.GUF),void 0!==o.specularColorTexture&&s.push(n.assignTexture(e,"specularColorMap",o.specularColorTexture,i.KI_)),Promise.all(s)}}class v{constructor(t){this.parser=t,this.name=a.EXT_MATERIALS_BUMP}getMaterialType(t){const e=this.parser.json.materials[t];return e.extensions&&e.extensions[this.name]?i.EJi:null}extendMaterialParams(t,e){const n=this.parser,i=n.json.materials[t];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return e.bumpScale=void 0!==s.bumpFactor?s.bumpFactor:1,void 0!==s.bumpTexture&&r.push(n.assignTexture(e,"bumpMap",s.bumpTexture)),Promise.all(r)}}class y{constructor(t){this.parser=t,this.name=a.KHR_MATERIALS_ANISOTROPY}getMaterialType(t){const e=this.parser.json.materials[t];return e.extensions&&e.extensions[this.name]?i.EJi:null}extendMaterialParams(t,e){const n=this.parser,i=n.json.materials[t];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return void 0!==s.anisotropyStrength&&(e.anisotropy=s.anisotropyStrength),void 0!==s.anisotropyRotation&&(e.anisotropyRotation=s.anisotropyRotation),void 0!==s.anisotropyTexture&&r.push(n.assignTexture(e,"anisotropyMap",s.anisotropyTexture)),Promise.all(r)}}class E{constructor(t){this.parser=t,this.name=a.KHR_TEXTURE_BASISU}loadTexture(t){const e=this.parser,n=e.json,i=n.textures[t];if(!i.extensions||!i.extensions[this.name])return null;const r=i.extensions[this.name],s=e.options.ktx2Loader;if(!s){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,r.source,s)}}class x{constructor(t){this.parser=t,this.name=a.EXT_TEXTURE_WEBP}loadTexture(t){const e=this.name,n=this.parser,i=n.json,r=i.textures[t];if(!r.extensions||!r.extensions[e])return null;const s=r.extensions[e],o=i.images[s.source];let a=n.textureLoader;if(o.uri){const t=n.options.manager.getHandler(o.uri);null!==t&&(a=t)}return n.loadTextureImage(t,s.source,a)}}class C{constructor(t){this.parser=t,this.name=a.EXT_TEXTURE_AVIF}loadTexture(t){const e=this.name,n=this.parser,i=n.json,r=i.textures[t];if(!r.extensions||!r.extensions[e])return null;const s=r.extensions[e],o=i.images[s.source];let a=n.textureLoader;if(o.uri){const t=n.options.manager.getHandler(o.uri);null!==t&&(a=t)}return n.loadTextureImage(t,s.source,a)}}class b{constructor(t){this.name=a.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const e=this.parser.json,n=e.bufferViews[t];if(n.extensions&&n.extensions[this.name]){const t=n.extensions[this.name],i=this.parser.getDependency("buffer",t.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then((function(e){const n=t.byteOffset||0,i=t.byteLength||0,s=t.count,o=t.byteStride,a=new Uint8Array(e,n,i);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(s,o,a,t.mode,t.filter).then((function(t){return t.buffer})):r.ready.then((function(){const e=new ArrayBuffer(s*o);return r.decodeGltfBuffer(new Uint8Array(e),s,o,a,t.mode,t.filter),e}))}))}return null}}class w{constructor(t){this.name=a.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,n=e.nodes[t];if(!n.extensions||!n.extensions[this.name]||void 0===n.mesh)return null;const r=e.meshes[n.mesh];for(const t of r.primitives)if(t.mode!==N.TRIANGLES&&t.mode!==N.TRIANGLE_STRIP&&t.mode!==N.TRIANGLE_FAN&&void 0!==t.mode)return null;const s=n.extensions[this.name].attributes,o=[],a={};for(const t in s)o.push(this.parser.getDependency("accessor",s[t]).then((e=>(a[t]=e,a[t]))));return o.length<1?null:(o.push(this.parser.createNodeMesh(t)),Promise.all(o).then((t=>{const e=t.pop(),n=e.isGroup?e.children:[e],r=t[0].count,s=[];for(const t of n){const e=new i.yGw,n=new i.Pa4,o=new i._fP,l=new i.Pa4(1,1,1),h=new i.SPe(t.geometry,t.material,r);for(let t=0;t<r;t++)a.TRANSLATION&&n.fromBufferAttribute(a.TRANSLATION,t),a.ROTATION&&o.fromBufferAttribute(a.ROTATION,t),a.SCALE&&l.fromBufferAttribute(a.SCALE,t),h.setMatrixAt(t,e.compose(n,o,l));for(const e in a)if("_COLOR_0"===e){const t=a[e];h.instanceColor=new i.lb7(t.array,t.itemSize,t.normalized)}else"TRANSLATION"!==e&&"ROTATION"!==e&&"SCALE"!==e&&t.geometry.setAttribute(e,a[e]);i.Tme.prototype.copy.call(h,t),this.parser.assignFinalMaterial(h),s.push(h)}return e.isGroup?(e.clear(),e.add(...s),e):s[0]})))}}const S="glTF",I=1313821514,M=5130562;class T{constructor(t){this.name=a.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(t,0,12),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(t.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==S)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const i=this.header.length-12,r=new DataView(t,12);let s=0;for(;s<i;){const e=r.getUint32(s,!0);s+=4;const i=r.getUint32(s,!0);if(s+=4,i===I){const i=new Uint8Array(t,12+s,e);this.content=n.decode(i)}else if(i===M){const n=12+s;this.body=t.slice(n,n+e)}s+=e}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class B{constructor(t,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=a.KHR_DRACO_MESH_COMPRESSION,this.json=t,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(t,e){const n=this.json,r=this.dracoLoader,s=t.extensions[this.name].bufferView,o=t.extensions[this.name].attributes,a={},l={},h={};for(const t in o){const e=z[t]||t.toLowerCase();a[e]=o[t]}for(const e in t.attributes){const i=z[e]||e.toLowerCase();if(void 0!==o[e]){const r=n.accessors[t.attributes[e]],s=O[r.componentType];h[i]=s.name,l[i]=!0===r.normalized}}return e.getDependency("bufferView",s).then((function(t){return new Promise((function(e,n){r.decodeDracoFile(t,(function(t){for(const e in t.attributes){const n=t.attributes[e],i=l[e];void 0!==i&&(n.normalized=i)}e(t)}),a,h,i.GUF,n)}))}))}}class R{constructor(){this.name=a.KHR_TEXTURE_TRANSFORM}extendTexture(t,e){return void 0!==e.texCoord&&e.texCoord!==t.channel||void 0!==e.offset||void 0!==e.rotation||void 0!==e.scale?(t=t.clone(),void 0!==e.texCoord&&(t.channel=e.texCoord),void 0!==e.offset&&t.offset.fromArray(e.offset),void 0!==e.rotation&&(t.rotation=e.rotation),void 0!==e.scale&&t.repeat.fromArray(e.scale),t.needsUpdate=!0,t):t}}class P{constructor(){this.name=a.KHR_MESH_QUANTIZATION}}class D extends i._C8{constructor(t,e,n,i){super(t,e,n,i)}copySampleValue_(t){const e=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=t*i*3+i;for(let t=0;t!==i;t++)e[t]=n[r+t];return e}interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=2*o,l=3*o,h=i-e,c=(n-e)/h,u=c*c,d=u*c,p=t*l,f=p-l,A=-2*d+3*u,g=d-u,m=1-A,_=g-u+c;for(let t=0;t!==o;t++){const e=s[f+t+o],n=s[f+t+a]*h,i=s[p+t+o],l=s[p+t]*h;r[t]=m*e+_*n+A*i+g*l}return r}}const L=new i._fP;class U extends D{interpolate_(t,e,n,i){const r=super.interpolate_(t,e,n,i);return L.fromArray(r).normalize().toArray(r),r}}const N={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},O={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},F={9728:i.TyD,9729:i.wem,9984:i.YLQ,9985:i.qyh,9986:i.aH4,9987:i.D1R},k={33071:i.uWy,33648:i.OoA,10497:i.rpg},Q={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},z={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},G={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},H={CUBICSPLINE:void 0,LINEAR:i.NMF,STEP:i.Syv},V="OPAQUE",j="MASK",W="BLEND";function q(t,e,n){for(const i in n.extensions)void 0===t[i]&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=n.extensions[i])}function X(t,e){void 0!==e.extras&&("object"==typeof e.extras?Object.assign(t.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function Y(t,e){if(t.updateMorphTargets(),void 0!==e.weights)for(let n=0,i=e.weights.length;n<i;n++)t.morphTargetInfluences[n]=e.weights[n];if(e.extras&&Array.isArray(e.extras.targetNames)){const n=e.extras.targetNames;if(t.morphTargetInfluences.length===n.length){t.morphTargetDictionary={};for(let e=0,i=n.length;e<i;e++)t.morphTargetDictionary[n[e]]=e}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function K(t){let e;const n=t.extensions&&t.extensions[a.KHR_DRACO_MESH_COMPRESSION];if(e=n?"draco:"+n.bufferView+":"+n.indices+":"+Z(n.attributes):t.indices+":"+Z(t.attributes)+":"+t.mode,void 0!==t.targets)for(let n=0,i=t.targets.length;n<i;n++)e+=":"+Z(t.targets[n]);return e}function Z(t){let e="";const n=Object.keys(t).sort();for(let i=0,r=n.length;i<r;i++)e+=n[i]+":"+t[n[i]]+";";return e}function J(t){switch(t){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}const $=new i.yGw;class tt{constructor(t={},e={}){this.json=t,this.extensions={},this.plugins={},this.options=e,this.cache=new o,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,r=-1,s=!1,a=-1;if("undefined"!=typeof navigator){const t=navigator.userAgent;n=!0===/^((?!chrome|android).)*safari/i.test(t);const e=t.match(/Version\/(\d+)/);r=n&&e?parseInt(e[1],10):-1,s=t.indexOf("Firefox")>-1,a=s?t.match(/Firefox\/([0-9]+)\./)[1]:-1}"undefined"==typeof createImageBitmap||n&&r<17||s&&a<98?this.textureLoader=new i.dpR(this.options.manager):this.textureLoader=new i.QRU(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new i.hH6(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const n=this,i=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll((function(t){return t._markDefs&&t._markDefs()})),Promise.all(this._invokeAll((function(t){return t.beforeRoot&&t.beforeRoot()}))).then((function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])})).then((function(e){const s={scene:e[0][i.scene||0],scenes:e[0],animations:e[1],cameras:e[2],asset:i.asset,parser:n,userData:{}};return q(r,s,i),X(s,i),Promise.all(n._invokeAll((function(t){return t.afterRoot&&t.afterRoot(s)}))).then((function(){for(const t of s.scenes)t.updateMatrixWorld();t(s)}))})).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[];for(let n=0,i=e.length;n<i;n++){const i=e[n].joints;for(let e=0,n=i.length;e<n;e++)t[i[e]].isBone=!0}for(let e=0,i=t.length;e<i;e++){const i=t[e];void 0!==i.mesh&&(this._addNodeRef(this.meshCache,i.mesh),void 0!==i.skin&&(n[i.mesh].isSkinnedMesh=!0)),void 0!==i.camera&&this._addNodeRef(this.cameraCache,i.camera)}}_addNodeRef(t,e){void 0!==e&&(void 0===t.refs[e]&&(t.refs[e]=t.uses[e]=0),t.refs[e]++)}_getNodeRef(t,e,n){if(t.refs[e]<=1)return n;const i=n.clone(),r=(t,e)=>{const n=this.associations.get(t);null!=n&&this.associations.set(e,n);for(const[n,i]of t.children.entries())r(i,e.children[n])};return r(n,i),i.name+="_instance_"+t.uses[e]++,i}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let n=0;n<e.length;n++){const i=t(e[n]);if(i)return i}return null}_invokeAll(t){const e=Object.values(this.plugins);e.unshift(this);const n=[];for(let i=0;i<e.length;i++){const r=t(e[i]);r&&n.push(r)}return n}getDependency(t,e){const n=t+":"+e;let i=this.cache.get(n);if(!i){switch(t){case"scene":i=this.loadScene(e);break;case"node":i=this._invokeOne((function(t){return t.loadNode&&t.loadNode(e)}));break;case"mesh":i=this._invokeOne((function(t){return t.loadMesh&&t.loadMesh(e)}));break;case"accessor":i=this.loadAccessor(e);break;case"bufferView":i=this._invokeOne((function(t){return t.loadBufferView&&t.loadBufferView(e)}));break;case"buffer":i=this.loadBuffer(e);break;case"material":i=this._invokeOne((function(t){return t.loadMaterial&&t.loadMaterial(e)}));break;case"texture":i=this._invokeOne((function(t){return t.loadTexture&&t.loadTexture(e)}));break;case"skin":i=this.loadSkin(e);break;case"animation":i=this._invokeOne((function(t){return t.loadAnimation&&t.loadAnimation(e)}));break;case"camera":i=this.loadCamera(e);break;default:if(i=this._invokeOne((function(n){return n!=this&&n.getDependency&&n.getDependency(t,e)})),!i)throw new Error("Unknown type: "+t)}this.cache.add(n,i)}return i}getDependencies(t){let e=this.cache.get(t);if(!e){const n=this,i=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(i.map((function(e,i){return n.getDependency(t,i)}
vendor: 17,864 bytes, line 2
2))),this.cache.add(t,e)}return e}loadBuffer(t){const e=this.json.buffers[t],n=this.fileLoader;if(e.type&&"arraybuffer"!==e.type)throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(void 0===e.uri&&0===t)return Promise.resolve(this.extensions[a.KHR_BINARY_GLTF].body);const r=this.options;return new Promise((function(t,s){n.load(i.Zp0.resolveURL(e.uri,r.path),t,void 0,(function(){s(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))}))}))}loadBufferView(t){const e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then((function(t){const n=e.byteLength||0,i=e.byteOffset||0;return t.slice(i,i+n)}))}loadAccessor(t){const e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse){const t=Q[r.type],e=O[r.componentType],n=!0===r.normalized,s=new e(r.count*t);return Promise.resolve(new i.TlE(s,t,n))}const s=[];return void 0!==r.bufferView?s.push(this.getDependency("bufferView",r.bufferView)):s.push(null),void 0!==r.sparse&&(s.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(s).then((function(t){const s=t[0],o=Q[r.type],a=O[r.componentType],l=a.BYTES_PER_ELEMENT,h=l*o,c=r.byteOffset||0,u=void 0!==r.bufferView?n.bufferViews[r.bufferView].byteStride:void 0,d=!0===r.normalized;let p,f;if(u&&u!==h){const t=Math.floor(c/u),n="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+t+":"+r.count;let h=e.cache.get(n);h||(p=new a(s,t*u,r.count*u/l),h=new i.vpT(p,u/l),e.cache.add(n,h)),f=new i.kB5(h,o,c%u/l,d)}else p=null===s?new a(r.count*o):new a(s,c,r.count*o),f=new i.TlE(p,o,d);if(void 0!==r.sparse){const e=Q.SCALAR,n=O[r.sparse.indices.componentType],l=r.sparse.indices.byteOffset||0,h=r.sparse.values.byteOffset||0,c=new n(t[1],l,r.sparse.count*e),u=new a(t[2],h,r.sparse.count*o);null!==s&&(f=new i.TlE(f.array.slice(),f.itemSize,f.normalized)),f.normalized=!1;for(let t=0,e=c.length;t<e;t++){const e=c[t];if(f.setX(e,u[t*o]),o>=2&&f.setY(e,u[t*o+1]),o>=3&&f.setZ(e,u[t*o+2]),o>=4&&f.setW(e,u[t*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}f.normalized=d}return f}))}loadTexture(t){const e=this.json,n=this.options,i=e.textures[t].source,r=e.images[i];let s=this.textureLoader;if(r.uri){const t=n.manager.getHandler(r.uri);null!==t&&(s=t)}return this.loadTextureImage(t,i,s)}loadTextureImage(t,e,n){const r=this,s=this.json,o=s.textures[t],a=s.images[e],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const h=this.loadImageSource(e,n).then((function(e){e.flipY=!1,e.name=o.name||a.name||"",""===e.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(e.name=a.uri);const n=(s.samplers||{})[o.sampler]||{};return e.magFilter=F[n.magFilter]||i.wem,e.minFilter=F[n.minFilter]||i.D1R,e.wrapS=k[n.wrapS]||i.rpg,e.wrapT=k[n.wrapT]||i.rpg,e.generateMipmaps=!e.isCompressedTexture&&e.minFilter!==i.TyD&&e.minFilter!==i.wem,r.associations.set(e,{textures:t}),e})).catch((function(){return null}));return this.textureCache[l]=h,h}loadImageSource(t,e){const n=this,r=this.json,s=this.options;if(void 0!==this.sourceCache[t])return this.sourceCache[t].then((t=>t.clone()));const o=r.images[t],a=self.URL||self.webkitURL;let l=o.uri||"",h=!1;if(void 0!==o.bufferView)l=n.getDependency("bufferView",o.bufferView).then((function(t){h=!0;const e=new Blob([t],{type:o.mimeType});return l=a.createObjectURL(e),l}));else if(void 0===o.uri)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const c=Promise.resolve(l).then((function(t){return new Promise((function(n,r){let o=n;!0===e.isImageBitmapLoader&&(o=function(t){const e=new i.xEZ(t);e.needsUpdate=!0,n(e)}),e.load(i.Zp0.resolveURL(t,s.path),o,void 0,r)}))})).then((function(t){var e;return!0===h&&a.revokeObjectURL(l),X(t,o),t.userData.mimeType=o.mimeType||((e=o.uri).search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/)?"image/jpeg":e.search(/\.webp($|\?)/i)>0||0===e.search(/^data\:image\/webp/)?"image/webp":e.search(/\.ktx2($|\?)/i)>0||0===e.search(/^data\:image\/ktx2/)?"image/ktx2":"image/png"),t})).catch((function(t){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),t}));return this.sourceCache[t]=c,c}assignTexture(t,e,n,i){const r=this;return this.getDependency("texture",n.index).then((function(s){if(!s)return null;if(void 0!==n.texCoord&&n.texCoord>0&&((s=s.clone()).channel=n.texCoord),r.extensions[a.KHR_TEXTURE_TRANSFORM]){const t=void 0!==n.extensions?n.extensions[a.KHR_TEXTURE_TRANSFORM]:void 0;if(t){const e=r.associations.get(s);s=r.extensions[a.KHR_TEXTURE_TRANSFORM].extendTexture(s,t),r.associations.set(s,e)}}return void 0!==i&&(s.colorSpace=i),t[e]=s,s}))}assignFinalMaterial(t){const e=t.geometry;let n=t.material;const r=void 0===e.attributes.tangent,s=void 0!==e.attributes.color,o=void 0===e.attributes.normal;if(t.isPoints){const t="PointsMaterial:"+n.uuid;let e=this.cache.get(t);e||(e=new i.UY4,i.F5T.prototype.copy.call(e,n),e.color.copy(n.color),e.map=n.map,e.sizeAttenuation=!1,this.cache.add(t,e)),n=e}else if(t.isLine){const t="LineBasicMaterial:"+n.uuid;let e=this.cache.get(t);e||(e=new i.nls,i.F5T.prototype.copy.call(e,n),e.color.copy(n.color),e.map=n.map,this.cache.add(t,e)),n=e}if(r||s||o){let t="ClonedMaterial:"+n.uuid+":";r&&(t+="derivative-tangents:"),s&&(t+="vertex-colors:"),o&&(t+="flat-shading:");let e=this.cache.get(t);e||(e=n.clone(),s&&(e.vertexColors=!0),o&&(e.flatShading=!0),r&&(e.normalScale&&(e.normalScale.y*=-1),e.clearcoatNormalScale&&(e.clearcoatNormalScale.y*=-1)),this.cache.add(t,e),this.associations.set(e,this.associations.get(n))),n=e}t.material=n}getMaterialType(){return i.Wid}loadMaterial(t){const e=this,n=this.json,r=this.extensions,s=n.materials[t];let o;const l={},h=[];if((s.extensions||{})[a.KHR_MATERIALS_UNLIT]){const t=r[a.KHR_MATERIALS_UNLIT];o=t.getMaterialType(),h.push(t.extendParams(l,s,e))}else{const n=s.pbrMetallicRoughness||{};if(l.color=new i.Ilk(1,1,1),l.opacity=1,Array.isArray(n.baseColorFactor)){const t=n.baseColorFactor;l.color.setRGB(t[0],t[1],t[2],i.GUF),l.opacity=t[3]}void 0!==n.baseColorTexture&&h.push(e.assignTexture(l,"map",n.baseColorTexture,i.KI_)),l.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,l.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(h.push(e.assignTexture(l,"metalnessMap",n.metallicRoughnessTexture)),h.push(e.assignTexture(l,"roughnessMap",n.metallicRoughnessTexture))),o=this._invokeOne((function(e){return e.getMaterialType&&e.getMaterialType(t)})),h.push(Promise.all(this._invokeAll((function(e){return e.extendMaterialParams&&e.extendMaterialParams(t,l)}))))}!0===s.doubleSided&&(l.side=i.ehD);const c=s.alphaMode||V;if(c===W?(l.transparent=!0,l.depthWrite=!1):(l.transparent=!1,c===j&&(l.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==i.vBJ&&(h.push(e.assignTexture(l,"normalMap",s.normalTexture)),l.normalScale=new i.FM8(1,1),void 0!==s.normalTexture.scale)){const t=s.normalTexture.scale;l.normalScale.set(t,t)}if(void 0!==s.occlusionTexture&&o!==i.vBJ&&(h.push(e.assignTexture(l,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(l.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==i.vBJ){const t=s.emissiveFactor;l.emissive=(new i.Ilk).setRGB(t[0],t[1],t[2],i.GUF)}return void 0!==s.emissiveTexture&&o!==i.vBJ&&h.push(e.assignTexture(l,"emissiveMap",s.emissiveTexture,i.KI_)),Promise.all(h).then((function(){const n=new o(l);return s.name&&(n.name=s.name),X(n,s),e.associations.set(n,{materials:t}),s.extensions&&q(r,n,s),n}))}createUniqueName(t){const e=i.iUV.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,n=this.extensions,r=this.primitiveCache;function s(t){return n[a.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(t,e).then((function(n){return et(n,t,e)}))}const o=[];for(let n=0,l=t.length;n<l;n++){const l=t[n],h=K(l),c=r[h];if(c)o.push(c.promise);else{let t;t=l.extensions&&l.extensions[a.KHR_DRACO_MESH_COMPRESSION]?s(l):et(new i.u9r,l,e),r[h]={primitive:l,promise:t},o.push(t)}}return Promise.all(o)}loadMesh(t){const e=this,n=this.json,s=this.extensions,o=n.meshes[t],a=o.primitives,l=[];for(let t=0,e=a.length;t<e;t++){const e=void 0===a[t].material?(void 0===(h=this.cache).DefaultMaterial&&(h.DefaultMaterial=new i.Wid({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:i.Wl3})),h.DefaultMaterial):this.getDependency("material",a[t].material);l.push(e)}var h;return l.push(e.loadGeometries(a)),Promise.all(l).then((function(n){const l=n.slice(0,n.length-1),h=n[n.length-1],c=[];for(let n=0,u=h.length;n<u;n++){const u=h[n],d=a[n];let p;const f=l[n];if(d.mode===N.TRIANGLES||d.mode===N.TRIANGLE_STRIP||d.mode===N.TRIANGLE_FAN||void 0===d.mode)p=!0===o.isSkinnedMesh?new i.TUv(u,f):new i.Kj0(u,f),!0===p.isSkinnedMesh&&p.normalizeSkinWeights(),d.mode===N.TRIANGLE_STRIP?p.geometry=r(p.geometry,i.UlW):d.mode===N.TRIANGLE_FAN&&(p.geometry=r(p.geometry,i.z$h));else if(d.mode===N.LINES)p=new i.ejS(u,f);else if(d.mode===N.LINE_STRIP)p=new i.x12(u,f);else if(d.mode===N.LINE_LOOP)p=new i.blk(u,f);else{if(d.mode!==N.POINTS)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+d.mode);p=new i.woe(u,f)}Object.keys(p.geometry.morphAttributes).length>0&&Y(p,o),p.name=e.createUniqueName(o.name||"mesh_"+t),X(p,o),d.extensions&&q(s,p,d),e.assignFinalMaterial(p),c.push(p)}for(let n=0,i=c.length;n<i;n++)e.associations.set(c[n],{meshes:t,primitives:n});if(1===c.length)return o.extensions&&q(s,c[0],o),c[0];const u=new i.ZAu;o.extensions&&q(s,u,o),e.associations.set(u,{meshes:t});for(let t=0,e=c.length;t<e;t++)u.add(c[t]);return u}))}loadCamera(t){let e;const n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new i.cPb(i.M8C.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new i.iKG(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(e.name=this.createUniqueName(n.name)),X(e,n),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(t){const e=this.json.skins[t],n=[];for(let t=0,i=e.joints.length;t<i;t++)n.push(this._loadNodeShallow(e.joints[t]));return void 0!==e.inverseBindMatrices?n.push(this.getDependency("accessor",e.inverseBindMatrices)):n.push(null),Promise.all(n).then((function(t){const n=t.pop(),r=t,s=[],o=[];for(let t=0,a=r.length;t<a;t++){const a=r[t];if(a){s.push(a);const e=new i.yGw;null!==n&&e.fromArray(n.array,16*t),o.push(e)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[t])}return new i.OdW(s,o)}))}loadAnimation(t){const e=this.json,n=this,r=e.animations[t],s=r.name?r.name:"animation_"+t,o=[],a=[],l=[],h=[],c=[];for(let t=0,e=r.channels.length;t<e;t++){const e=r.channels[t],n=r.samplers[e.sampler],i=e.target,s=i.node,u=void 0!==r.parameters?r.parameters[n.input]:n.input,d=void 0!==r.parameters?r.parameters[n.output]:n.output;void 0!==i.node&&(o.push(this.getDependency("node",s)),a.push(this.getDependency("accessor",u)),l.push(this.getDependency("accessor",d)),h.push(n),c.push(i))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l),Promise.all(h),Promise.all(c)]).then((function(t){const e=t[0],o=t[1],a=t[2],l=t[3],h=t[4],c=[];for(let t=0,i=e.length;t<i;t++){const i=e[t],r=o[t],s=a[t],u=l[t],d=h[t];if(void 0===i)continue;i.updateMatrix&&i.updateMatrix();const p=n._createAnimationTracks(i,r,s,u,d);if(p)for(let t=0;t<p.length;t++)c.push(p[t])}const u=new i.m7l(s,void 0,c);return X(u,r),u}))}createNodeMesh(t){const e=this.json,n=this,i=e.nodes[t];return void 0===i.mesh?null:n.getDependency("mesh",i.mesh).then((function(t){const e=n._getNodeRef(n.meshCache,i.mesh,t);return void 0!==i.weights&&e.traverse((function(t){if(t.isMesh)for(let e=0,n=i.weights.length;e<n;e++)t.morphTargetInfluences[e]=i.weights[e]})),e}))}loadNode(t){const e=this,n=this.json.nodes[t],i=e._loadNodeShallow(t),r=[],s=n.children||[];for(let t=0,n=s.length;t<n;t++)r.push(e.getDependency("node",s[t]));const o=void 0===n.skin?Promise.resolve(null):e.getDependency("skin",n.skin);return Promise.all([i,Promise.all(r),o]).then((function(t){const e=t[0],n=t[1],i=t[2];null!==i&&e.traverse((function(t){t.isSkinnedMesh&&t.bind(i,$)}));for(let t=0,i=n.length;t<i;t++)e.add(n[t]);return e}))}_loadNodeShallow(t){const e=this.json,n=this.extensions,r=this;if(void 0!==this.nodeCache[t])return this.nodeCache[t];const s=e.nodes[t],o=s.name?r.createUniqueName(s.name):"",a=[],l=r._invokeOne((function(e){return e.createNodeMesh&&e.createNodeMesh(t)}));return l&&a.push(l),void 0!==s.camera&&a.push(r.getDependency("camera",s.camera).then((function(t){return r._getNodeRef(r.cameraCache,s.camera,t)}))),r._invokeAll((function(e){return e.createNodeAttachment&&e.createNodeAttachment(t)})).forEach((function(t){a.push(t)})),this.nodeCache[t]=Promise.all(a).then((function(e){let a;if(a=!0===s.isBone?new i.N$j:e.length>1?new i.ZAu:1===e.length?e[0]:new i.Tme,a!==e[0])for(let t=0,n=e.length;t<n;t++)a.add(e[t]);if(s.name&&(a.userData.name=s.name,a.name=o),X(a,s),s.extensions&&q(n,a,s),void 0!==s.matrix){const t=new i.yGw;t.fromArray(s.matrix),a.applyMatrix4(t)}else void 0!==s.translation&&a.position.fromArray(s.translation),void 0!==s.rotation&&a.quaternion.fromArray(s.rotation),void 0!==s.scale&&a.scale.fromArray(s.scale);if(r.associations.has(a)){if(void 0!==s.mesh&&r.meshCache.refs[s.mesh]>1){const t=r.associations.get(a);r.associations.set(a,{...t})}}else r.associations.set(a,{});return r.associations.get(a).nodes=t,a})),this.nodeCache[t]}loadScene(t){const e=this.extensions,n=this.json.scenes[t],r=this,s=new i.ZAu;n.name&&(s.name=r.createUniqueName(n.name)),X(s,n),n.extensions&&q(e,s,n);const o=n.nodes||[],a=[];for(let t=0,e=o.length;t<e;t++)a.push(r.getDependency("node",o[t]));return Promise.all(a).then((function(t){for(let e=0,n=t.length;e<n;e++)s.add(t[e]);return r.associations=(t=>{const e=new Map;for(const[t,n]of r.associations)(t instanceof i.F5T||t instanceof i.xEZ)&&e.set(t,n);return t.traverse((t=>{const n=r.associations.get(t);null!=n&&e.set(t,n)})),e})(s),s}))}_createAnimationTracks(t,e,n,r,s){const o=[],a=t.name?t.name:t.uuid,l=[];let h;switch(G[s.path]===G.weights?t.traverse((function(t){t.morphTargetInfluences&&l.push(t.name?t.name:t.uuid)})):l.push(a),G[s.path]){case G.weights:h=i.dUE;break;case G.rotation:h=i.iLg;break;case G.translation:case G.scale:h=i.yC1;break;default:if(1===n.itemSize)h=i.dUE;else h=i.yC1}const c=void 0!==r.interpolation?H[r.interpolation]:i.NMF,u=this._getArrayFromAccessor(n);for(let t=0,n=l.length;t<n;t++){const n=new h(l[t]+"."+G[s.path],e.array,u,c);"CUBICSPLINE"===r.interpolation&&this._createCubicSplineTrackInterpolant(n),o.push(n)}return o}_getArrayFromAccessor(t){let e=t.array;if(t.normalized){const t=J(e.constructor),n=new Float32Array(e.length);for(let i=0,r=e.length;i<r;i++)n[i]=e[i]*t;e=n}return e}_createCubicSplineTrackInterpolant(t){t.createInterpolant=function(t){return new(this instanceof i.iLg?U:D)(this.times,this.values,this.getValueSize()/3,t)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function et(t,e,n){const r=e.attributes,s=[];function o(e,i){return n.getDependency("accessor",e).then((function(e){t.setAttribute(i,e)}))}for(const e in r){const n=z[e]||e.toLowerCase();n in t.attributes||s.push(o(r[e],n))}if(void 0!==e.indices&&!t.index){const i=n.getDependency("accessor",e.indices).then((function(e){t.setIndex(e)}));s.push(i)}return i.epp.workingColorSpace!==i.GUF&&"COLOR_0"in r&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${i.epp.workingColorSpace}" not supported.`),X(t,e),function(t,e,n){const r=e.attributes,s=new i.ZzF;if(void 0===r.POSITION)return;{const t=n.json.accessors[r.POSITION],e=t.min,o=t.max;if(void 0===e||void 0===o)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(s.set(new i.Pa4(e[0],e[1],e[2]),new i.Pa4(o[0],o[1],o[2])),t.normalized){const e=J(O[t.componentType]);s.min.multiplyScalar(e),s.max.multiplyScalar(e)}}const o=e.targets;if(void 0!==o){const t=new i.Pa4,e=new i.Pa4;for(let i=0,r=o.length;i<r;i++){const r=o[i];if(void 0!==r.POSITION){const i=n.json.accessors[r.POSITION],s=i.min,o=i.max;if(void 0!==s&&void 0!==o){if(e.setX(Math.max(Math.abs(s[0]),Math.abs(o[0]))),e.setY(Math.max(Math.abs(s[1]),Math.abs(o[1]))),e.setZ(Math.max(Math.abs(s[2]),Math.abs(o[2]))),i.normalized){const t=J(O[i.componentType]);e.multiplyScalar(t)}t.max(e)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}s.expandByVector(t)}t.boundingBox=s;const a=new i.aLr;s.getCenter(a.center),a.radius=s.min.distanceTo(s.max)/2,t.boundingSphere=a}(t,e,n),Promise.all(s).then((function(){return void 0!==e.targets?function(t,e,n){let i=!1,r=!1,s=!1;for(let t=0,n=e.length;t<n;t++){const n=e[t];if(void 0!==n.POSITION&&(i=!0),void 0!==n.NORMAL&&(r=!0),void 0!==n.COLOR_0&&(s=!0),i&&r&&s)break}if(!i&&!r&&!s)return Promise.resolve(t);const o=[],a=[],l=[];for(let h=0,c=e.length;h<c;h++){const c=e[h];if(i){const e=void 0!==c.POSITION?n.getDependency("accessor",c.POSITION):t.attributes.position;o.push(e)}if(r){const e=void 0!==c.NORMAL?n.getDependency("accessor",c.NORMAL):t.attributes.normal;a.push(e)}if(s){const e=void 0!==c.COLOR_0?n.getDependency("accessor",c.COLOR_0):t.attributes.color;l.push(e)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l)]).then((function(e){const n=e[0],o=e[1],a=e[2];return i&&(t.morphAttributes.position=n),r&&(t.morphAttributes.normal=o),s&&(t.morphAttributes.color=a),t.morphTargetsRelative=!0,t}))}(t,e.targets,n):t}))}},666:(t,e,n)=>{"use strict";n.d(e,{a:()=>T});var i=n(250);
vendor: 3,134 bytes, line 2
2class r{constructor(t=4){this.pool=t,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0,this.workerCreator=null}_initWorker(t){if(!this.workers[t]){const e=this.workerCreator();e.addEventListener("message",this._onMessage.bind(this,t)),this.workers[t]=e}}_getIdleWorker(){for(let t=0;t<this.pool;t++)if(!(this.workerStatus&1<<t))return t;return-1}_onMessage(t,e){const n=this.workersResolve[t];if(n&&n(e),this.queue.length){const{resolve:e,msg:n,transfer:i}=this.queue.shift();this.workersResolve[t]=e,this.workers[t].postMessage(n,i)}else this.workerStatus^=1<<t}setWorkerCreator(t){this.workerCreator=t}setWorkerLimit(t){this.pool=t}postMessage(t,e){return new Promise((n=>{const i=this._getIdleWorker();-1!==i?(this._initWorker(i),this.workerStatus|=1<<i,this.workersResolve[i]=n,this.workers[i].postMessage(t,e)):this.queue.push({resolve:n,msg:t,transfer:e})}))}dispose(){this.workers.forEach((t=>t.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const s=2,o=0,a=1,l=10,h=1000054e3,c=1000054001,u=1000054004,d=1000054005,p=1000066e3,f=1000066004;class A{constructor(t,e,n,i){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(t.buffer,t.byteOffset+e,n),this._littleEndian=i,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_nextInt32(){const t=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint8Array(t){const e=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._offset,t);return this._offset+=t,e}_skip(t){return this._offset+=t,this}_scan(t,e=0){const n=this._offset;let i=0;for(;this._dataView.getUint8(this._offset)!==e&&i<t;)i++,this._offset++;return i<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,i)}}new Uint8Array([0]);const g=[171,75,84,88,32,50,48,187,13,10,26,10];function m(t){return(new TextDecoder).decode(t)}let _,v,y;const E={env:{emscripten_notify_memory_growth:function(t){y=new Uint8Array(v.exports.memory.buffer)}}};class x{init(){return _||(_="undefined"!=typeof fetch?fetch("data:application/wasm;base64,"+C).then((t=>t.arrayBuffer())).then((t=>WebAssembly.instantiate(t,E))).then(this._init):WebAssembly.instantiate(Buffer.from(C,"base64"),E).then(this._init),_)}_init(t){v=t.instance,E.env.emscripten_notify_memory_growth(0)}decode(t,e=0){if(!v)throw new Error("ZSTDDecoder: Await .init() before decoding.");const n=t.byteLength,i=v.exports.malloc(n);y.set(t,i),e=e||Number(v.exports.ZSTD_findDecompressedSize(i,n));const r=v.exports.malloc(e),s=v.exports.ZSTD_decompress(r,e,i,n),o=y.slice(r,r+s);return v.exports.free(i),v.exports.free(r),o}}const C="
vendor: 19,971 bytes, line 2
2AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0AACIDNgIAIAJBfmoiBEEBTQRAIARBAWtFBEAgACABLQACQRB0IANyIgM2AgALIAAgAS0AAUEIdCADajYCAAsgASACakF/ai0AACIBRQRAIABBADYCBEFsDwsgAEEoIAEQFCACQQN0ams2AgQgAgsWACAAIAEpAAA3AAAgACABKQAINwAICy8BAX8gAUECdEGgHWooAgAgACgCAEEgIAEgACgCBGprQR9xdnEhAiAAIAEQASACCyEAIAFCz9bTvtLHq9lCfiAAfEIfiUKHla+vmLbem55/fgsdAQF/IAAoAgggACgCDEYEfyAAKAIEQSBGBUEACwuCBAEDfyACQYDAAE8EQCAAIAEgAhBnIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAkEBSARAIAAhAgwBCyAAQQNxRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADTw0BIAJBA3ENAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0EIAVBAmohBQNAIAIgB0kEQCANIAJBAXRqQQA7AQAgAkEBaiECDAELCyAGIA5LQQAgBiAFQQN1aiIHIAxLG0UEQCAHKAAAIAVBB3EiBXYhBAwCCyAEQQJ2IQQLIAYhBwsCfyALQX9qIAQgAEF/anEiBiAAQQF0QX9qIgggCWsiEUkNABogBCAIcSIEQQAgESAEIABIG2shBiALCyEIIA0gAkEBdGogBkF/aiIEOwEAIAlBASAGayAEIAZBAUgbayEJA0AgCSAASARAIABBAXUhACALQX9qIQsMAQsLAn8gByAOS0EAIAcgBSAIaiIFQQN1aiIGIAxLG0UEQCAFQQdxDAELIAUgDCIGIAdrQQN0awshBSACQQFqIQIgBEUhCCAGKAAAIAVBH3F2IQQMAQsLQWwgCUEBRyAFQSBKcg0BGiABIAJBf2o2AgAgBiAFQQdqQQN1aiADawwBC0FQCyEAIApBEGokACAACwkAQQFBBSAAGwsMACAAIAEoAAA2AAALqgMBCn8jAEHwAGsiCiQAIAJBAWohDiAAQQhqIQtBgIAEIAVBf2p0QRB1IQxBACECQQEhBkEBIAV0IglBf2oiDyEIA0AgAiAORkUEQAJAIAEgAkEBdCINai8BACIHQf//A0YEQCALIAhBA3RqIAI2AgQgCEF/aiEIQQEhBwwBCyAGQQAgDCAHQRB0QRB1ShshBgsgCiANaiAHOwEAIAJBAWohAgwBCwsgACAFNgIEIAAgBjYCACAJQQN2IAlBAXZqQQNqIQxBACEAQQAhBkEAIQIDQCAGIA5GBEADQAJAIAAgCUYNACAKIAsgAEEDdGoiASgCBCIGQQF0aiICIAIvAQAiAkEBajsBACABIAUgAhAUayIIOgADIAEgAiAIQf8BcXQgCWs7AQAgASAEIAZBAnQiAmooAgA6AAIgASACIANqKAIANgIEIABBAWohAAwBCwsFIAEgBkEBdGouAQAhDUEAIQcDQCAHIA1ORQRAIAsgAkEDdGogBjYCBANAIAIgDGogD3EiAiAISw0ACyAHQQFqIQcMAQsLIAZBAWohBgwBCwsgCkHwAGokAAsjAEIAIAEQCSAAhUKHla+vmLbem55/fkLj3MqV/M7y9YV/fAsQACAAQn43AwggACABNgIACyQBAX8gAARAIAEoAgQiAgRAIAEoAgggACACEQEADwsgABAmCwsfACAAIAEgAi8BABAINgIAIAEQBBogACACQQRqNgIEC0oBAX9BoCAoAgAiASAAaiIAQX9MBEBBiCBBMDYCAEF/DwsCQCAAPwBBEHRNDQAgABBmDQBBiCBBMDYCAEF/DwtBoCAgADYCACABC9cBAQh/Qbp/IQoCQCACKAIEIgggAigCACIJaiIOIAEgAGtLDQBBbCEKIAkgBCADKAIAIgtrSw0AIAAgCWoiBCACKAIIIgxrIQ0gACABQWBqIg8gCyAJQQAQKSADIAkgC2o2AgACQAJAIAwgBCAFa00EQCANIQUMAQsgDCAEIAZrSw0CIAcgDSAFayIAaiIBIAhqIAdNBEAgBCABIAgQDxoMAgsgBCABQQAgAGsQDyEBIAIgACAIaiIINgIEIAEgAGshBAsgBCAPIAUgCEEBECkLIA4hCgsgCgubAgEBfyMAQYABayINJAAgDSADNgJ8AkAgAkEDSwRAQX8hCQwBCwJAAkACQAJAIAJBAWsOAwADAgELIAZFBEBBuH8hCQwEC0FsIQkgBS0AACICIANLDQMgACAHIAJBAnQiAmooAgAgAiAIaigCABA7IAEgADYCAEEBIQkMAwsgASAJNgIAQQAhCQwCCyAKRQRAQWwhCQwCC0EAIQkgC0UgDEEZSHINAUEIIAR0QQhqIQBBACECA0AgAiAATw0CIAJBQGshAgwAAAsAC0FsIQkgDSANQfwAaiANQfgAaiAFIAYQFSICEAMNACANKAJ4IgMgBEsNACAAIA0gDSgCfCAHIAggAxAYIAEgADYCACACIQkLIA1BgAFqJAAgCQsLACAAIAEgAhALGgsQACAALwAAIAAtAAJBEHRyCy8AAn9BuH8gAUEISQ0AGkFyIAAoAAQiAEF3Sw0AGkG4fyAAQQhqIgAgACABSxsLCwkAIAAgATsAAAsDAAELigYBBX8gACAAKAIAIgVBfnE2AgBBACAAIAVBAXZqQYQgKAIAIgQgAEYbIQECQAJAIAAoAgQiAkUNACACKAIAIgNBAXENACACQQhqIgUgA0EBdkF4aiIDQQggA0EISxtnQR9zQQJ0QYAfaiIDKAIARgRAIAMgAigCDDYCAAsgAigCCCIDBEAgAyACKAIMNgIECyACKAIMIgMEQCADIAIoAgg2AgALIAIgAigCACAAKAIAQX5xajYCAEGEICEAAkACQCABRQ0AIAEgAjYCBCABKAIAIgNBAXENASADQQF2QXhqIgNBCCADQQhLG2dBH3NBAnRBgB9qIgMoAgAgAUEIakYEQCADIAEoAgw2AgALIAEoAggiAwRAIAMgASgCDDYCBAsgASgCDCIDBEAgAyABKAIINgIAQYQgKAIAIQQLIAIgAigCACABKAIAQX5xajYCACABIARGDQAgASABKAIAQQF2akEEaiEACyAAIAI2AgALIAIoAgBBAXZBeGoiAEEIIABBCEsbZ0Efc0ECdEGAH2oiASgCACEAIAEgBTYCACACIAA2AgwgAkEANgIIIABFDQEgACAFNgIADwsCQCABRQ0AIAEoAgAiAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAigCACABQQhqRgRAIAIgASgCDDYCAAsgASgCCCICBEAgAiABKAIMNgIECyABKAIMIgIEQCACIAEoAgg2AgBBhCAoAgAhBAsgACAAKAIAIAEoAgBBfnFqIgI2AgACQCABIARHBEAgASABKAIAQQF2aiAANgIEIAAoAgAhAgwBC0GEICAANgIACyACQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgIoAgAhASACIABBCGoiAjYCACAAIAE2AgwgAEEANgIIIAFFDQEgASACNgIADwsgBUEBdkF4aiIBQQggAUEISxtnQR9zQQJ0QYAfaiICKAIAIQEgAiAAQQhqIgI2AgAgACABNgIMIABBADYCCCABRQ0AIAEgAjYCAAsLDgAgAARAIABBeGoQJQsLgAIBA38CQCAAQQ9qQXhxQYQgKAIAKAIAQQF2ayICEB1Bf0YNAAJAQYQgKAIAIgAoAgAiAUEBcQ0AIAFBAXZBeGoiAUEIIAFBCEsbZ0Efc0ECdEGAH2oiASgCACAAQQhqRgRAIAEgACgCDDYCAAsgACgCCCIBBEAgASAAKAIMNgIECyAAKAIMIgFFDQAgASAAKAIINgIAC0EBIQEgACAAKAIAIAJBAXRqIgI2AgAgAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAygCACECIAMgAEEIaiIDNgIAIAAgAjYCDCAAQQA2AgggAkUNACACIAM2AgALIAELtwIBA38CQAJAIABBASAAGyICEDgiAA0AAkACQEGEICgCACIARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAggBhsiBzcDCCAAIAdCgIAIIAdCgIAIVBs+AhALIAMLWwEBf0G4fyEDIAIQFiICIAFNBH8gACACakF/ai0AACIAQQNxQQJ0QaAeaigCACACaiAAQQZ2IgFBAnRBsB5qKAIAaiAAQSBxIgBFaiABRSAAQQV2cWoFQbh/CwsdACAAKAKQ4gEQWiAAQQA2AqDiASAAQgA3A5DiAQu1AwEFfyMAQZACayIKJABBuH8hBgJAIAVFDQAgBCwAACIIQf8BcSEHAkAgCEF/TARAIAdBgn9qQQF2IgggBU8NAkFsIQYgB0GBf2oiBUGAAk8NAiAEQQFqIQdBACEGA0AgBiAFTwRAIAUhBiAIIQcMAwUgACAGaiAHIAZBAXZqIgQtAABBBHY6AAAgACAGQQFyaiAELQAAQQ9xOgAAIAZBAmohBgwBCwAACwALIAcgBU8NASAAIARBAWogByAKEFMiBhADDQELIAYhBEEAIQYgAUEAQTQQECEJQQAhBQNAIAQgBkcEQCAAIAZqIggtAAAiAUELSwRAQWwhBgwDBSAJIAFBAnRqIgEgASgCAEEBajYCACAGQQFqIQZBASAILQAAdEEBdSAFaiEFDAILAAsLQWwhBiAFRQ0AIAUQFEEBaiIBQQxLDQAgAyABNgIAQQFBASABdCAFayIDEBQiAXQgA0cNACAAIARqIAFBAWoiADoAACAJIABBAnRqIgAgACgCAEEBajYCACAJKAIEIgBBAkkgAEEBcXINACACIARBAWo2AgAgB0EBaiEGCyAKQZACaiQAIAYLxhEBDH8jAEHwAGsiBSQAQWwhCwJAIANBCkkNACACLwAAIQogAi8AAiEJIAIvAAQhByAFQQhqIAQQDgJAIAMgByAJIApqakEGaiIMSQ0AIAUtAAohCCAFQdgAaiACQQZqIgIgChAGIgsQAw0BIAVBQGsgAiAKaiICIAkQBiILEAMNASAFQShqIAIgCWoiAiAHEAYiCxADDQEgBUEQaiACIAdqIAMgDGsQBiILEAMNASAAIAFqIg9BfWohECAEQQRqIQZBASELIAAgAUEDakECdiIDaiIMIANqIgIgA2oiDiEDIAIhBCAMIQcDQCALIAMgEElxBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgCS0AAyELIAcgBiAFQUBrIAgQAkECdGoiCS8BADsAACAFQUBrIAktAAIQASAJLQADIQogBCAGIAVBKGogCBACQQJ0aiIJLwEAOwAAIAVBKGogCS0AAhABIAktAAMhCSADIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgDS0AAyENIAAgC2oiCyAGIAVB2ABqIAgQAkECdGoiAC8BADsAACAFQdgAaiAALQACEAEgAC0AAyEAIAcgCmoiCiAGIAVBQGsgCBACQQJ0aiIHLwEAOwAAIAVBQGsgBy0AAhABIActAAMhByAEIAlqIgkgBiAFQShqIAgQAkECdGoiBC8BADsAACAFQShqIAQtAAIQASAELQADIQQgAyANaiIDIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgACALaiEAIAcgCmohByAEIAlqIQQgAyANLQADaiEDIAVB2ABqEA0gBUFAaxANciAFQShqEA1yIAVBEGoQDXJFIQsMAQsLIAQgDksgByACS3INAEFsIQsgACAMSw0BIAxBfWohCQNAQQAgACAJSSAFQdgAahAEGwRAIAAgBiAFQdgAaiAIEAJBAnRqIgovAQA7AAAgBUHYAGogCi0AAhABIAAgCi0AA2oiACAGIAVB2ABqIAgQAkECdGoiCi8BADsAACAFQdgAaiAKLQACEAEgACAKLQADaiEADAEFIAxBfmohCgNAIAVB2ABqEAQgACAKS3JFBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgACAJLQADaiEADAELCwNAIAAgCk0EQCAAIAYgBUHYAGogCBACQQJ0aiIJLwEAOwAAIAVB2ABqIAktAAIQASAAIAktAANqIQAMAQsLAkAgACAMTw0AIAAgBiAFQdgAaiAIEAIiAEECdGoiDC0AADoAACAMLQADQQFGBEAgBUHYAGogDC0AAhABDAELIAUoAlxBH0sNACAFQdgAaiAGIABBAnRqLQACEAEgBSgCXEEhSQ0AIAVBIDYCXAsgAkF9aiEMA0BBACAHIAxJIAVBQGsQBBsEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiIAIAYgBUFAayAIEAJBAnRqIgcvAQA7AAAgBUFAayAHLQACEAEgACAHLQADaiEHDAEFIAJBfmohDANAIAVBQGsQBCAHIAxLckUEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwNAIAcgDE0EQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwJAIAcgAk8NACAHIAYgBUFAayAIEAIiAEECdGoiAi0AADoAACACLQADQQFGBEAgBUFAayACLQACEAEMAQsgBSgCREEfSw0AIAVBQGsgBiAAQQJ0ai0AAhABIAUoAkRBIUkNACAFQSA2AkQLIA5BfWohAgNAQQAgBCACSSAFQShqEAQbBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2oiACAGIAVBKGogCBACQQJ0aiIELwEAOwAAIAVBKGogBC0AAhABIAAgBC0AA2ohBAwBBSAOQX5qIQIDQCAFQShqEAQgBCACS3JFBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsDQCAEIAJNBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsCQCAEIA5PDQAgBCAGIAVBKGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBKGogAi0AAhABDAELIAUoAixBH0sNACAFQShqIAYgAEECdGotAAIQASAFKAIsQSFJDQAgBUEgNgIsCwNAQQAgAyAQSSAFQRBqEAQbBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2oiACAGIAVBEGogCBACQQJ0aiICLwEAOwAAIAVBEGogAi0AAhABIAAgAi0AA2ohAwwBBSAPQX5qIQIDQCAFQRBqEAQgAyACS3JFBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsDQCADIAJNBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsCQCADIA9PDQAgAyAGIAVBEGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBEGogAi0AAhABDAELIAUoAhRBH0sNACAFQRBqIAYgAEECdGotAAIQASAFKAIUQSFJDQAgBUEgNgIUCyABQWwgBUHYAGoQCiAFQUBrEApxIAVBKGoQCnEgBUEQahAKcRshCwwJCwAACwALAAALAAsAAAsACwAACwALQWwhCwsgBUHwAGokACALC7UEAQ5/IwBBEGsiBiQAIAZBBGogABAOQVQhBQJAIARB3AtJDQAgBi0ABCEHIANB8ARqQQBB7AAQECEIIAdBDEsNACADQdwJaiIJIAggBkEIaiAGQQxqIAEgAhAxIhAQA0UEQCAGKAIMIgQgB0sNASADQdwFaiEPIANBpAVqIREgAEEEaiESIANBqAVqIQEgBCEFA0AgBSICQX9qIQUgCCACQQJ0aigCAEUNAAsgAkEBaiEOQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgASALaiAKNgIAIAVBAWohBSAKIAxqIQoMAQsLIAEgCjYCAEEAIQUgBigCCCELA0AgBSALRkUEQCABIAUgCWotAAAiDEECdGoiDSANKAIAIg1BAWo2AgAgDyANQQF0aiINIAw6AAEgDSAFOgAAIAVBAWohBQwBCwtBACEBIANBADYCqAUgBEF/cyAHaiEJQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgAyALaiABNgIAIAwgBSAJanQgAWohASAFQQFqIQUMAQsLIAcgBEEBaiIBIAJrIgRrQQFqIQgDQEEBIQUgBCAIT0UEQANAIAUgDk9FBEAgBUECdCIJIAMgBEE0bGpqIAMgCWooAgAgBHY2AgAgBUEBaiEFDAELCyAEQQFqIQQMAQsLIBIgByAPIAogESADIAIgARBkIAZBAToABSAGIAc6AAYgACAGKAIENgIACyAQIQULIAZBEGokACAFC8ENAQt/IwBB8ABrIgUkAEFsIQkCQCADQQpJDQAgAi8AACEKIAIvAAIhDCACLwAEIQYgBUEIaiAEEA4CQCADIAYgCiAMampBBmoiDUkNACAFLQAKIQcgBUHYAGogAkEGaiICIAoQBiIJEAMNASAFQUBrIAIgCmoiAiAMEAYiCRADDQEgBUEoaiACIAxqIgIgBhAGIgkQAw0BIAVBEGogAiAGaiADIA1rEAYiCRADDQEgACABaiIOQX1qIQ8gBEEEaiEGQQEhCSAAIAFBA2pBAnYiAmoiCiACaiIMIAJqIg0hAyAMIQQgCiECA0AgCSADIA9JcQRAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAACAGIAVBQGsgBxACQQF0aiIILQAAIQsgBUFAayAILQABEAEgAiALOgAAIAYgBUEoaiAHEAJBAXRqIggtAAAhCyAFQShqIAgtAAEQASAEIAs6AAAgBiAFQRBqIAcQAkEBdGoiCC0AACELIAVBEGogCC0AARABIAMgCzoAACAGIAVB2ABqIAcQAkEBdGoiCC0AACELIAVB2ABqIAgtAAEQASAAIAs6AAEgBiAFQUBrIAcQAkEBdGoiCC0AACELIAVBQGsgCC0AARABIAIgCzoAASAGIAVBKGogBxACQQF0aiIILQAAIQsgBUEoaiAILQABEAEgBCALOgABIAYgBUEQaiAHEAJBAXRqIggtAAAhCyAFQRBqIAgtAAEQASADIAs6AAEgA0ECaiEDIARBAmohBCACQQJqIQIgAEECaiEAIAkgBUHYAGoQDUVxIAVBQGsQDUVxIAVBKGoQDUVxIAVBEGoQDUVxIQkMAQsLIAQgDUsgAiAMS3INAEFsIQkgACAKSw0BIApBfWohCQNAIAVB2ABqEAQgACAJT3JFBEAgBiAFQdgAaiAHEAJBAXRqIggtAAAhCyAFQdgAaiAILQABEAEgACALOgAAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAASAAQQJqIQAMAQsLA0AgBUHYAGoQBCAAIApPckUEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCwNAIAAgCkkEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCyAMQX1qIQADQCAFQUBrEAQgAiAAT3JFBEAgBiAFQUBrIAcQAkEBdGoiCi0AACEJIAVBQGsgCi0AARABIAIgCToAACAGIAVBQGsgBxACQQF0aiIKLQAAIQkgBUFAayAKLQABEAEgAiAJOgABIAJBAmohAgwBCwsDQCAFQUBrEAQgAiAMT3JFBEAgBiAFQUBrIAcQAkEBdGoiAC0AACEKIAVBQGsgAC0AARABIAIgCjoAACACQQFqIQIMAQsLA0AgAiAMSQRAIAYgBUFAayAHEAJBAXRqIgAtAAAhCiAFQUBrIAAtAAEQASACIAo6AAAgAkEBaiECDAELCyANQX1qIQADQCAFQShqEAQgBCAAT3JFBEAgBiAFQShqIAcQAkEBdGoiAi0AACEKIAVBKGogAi0AARABIAQgCjoAACAGIAVBKGogBxACQQF0aiICLQAAIQogBUEoaiACLQABEAEgBCAKOgABIARBAmohBAwBCwsDQCAFQShqEAQgBCANT3JFBEAgBiAFQShqIAcQAkEBdGoiAC0AACECIAVBKGogAC0AARABIAQgAjoAACAEQQFqIQQMAQsLA0AgBCANSQRAIAYgBUEoaiAHEAJBAXRqIgAtAAAhAiAFQShqIAAtAAEQASAEIAI6AAAgBEEBaiEEDAELCwNAIAVBEGoQBCADIA9PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIAYgBUEQaiAHEAJBAXRqIgAtAAAhAiAFQRBqIAAtAAEQASADIAI6AAEgA0ECaiEDDAELCwNAIAVBEGoQBCADIA5PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIANBAWohAwwBCwsDQCADIA5JBEAgBiAFQRBqIAcQAkEBdGoiAC0AACECIAVBEGogAC0AARABIAMgAjoAACADQQFqIQMMAQsLIAFBbCAFQdgAahAKIAVBQGsQCnEgBUEoahAKcSAFQRBqEApxGyEJDAELQWwhCQsgBUHwAGokACAJC8oCAQR/IwBBIGsiBSQAIAUgBBAOIAUtAAIhByAFQQhqIAIgAxAGIgIQA0UEQCAEQQRqIQIgACABaiIDQX1qIQQDQCAFQQhqEAQgACAET3JFBEAgAiAFQQhqIAcQAkEBdGoiBi0AACEIIAVBCGogBi0AARABIAAgCDoAACACIAVBCGogBxACQQF0aiIGLQAAIQggBUEIaiAGLQABEAEgACAIOgABIABBAmohAAwBCwsDQCAFQQhqEAQgACADT3JFBEAgAiAFQQhqIAcQAkEBdGoiBC0AACEGIAVBCGogBC0AARABIAAgBjoAACAAQQFqIQAMAQsLA0AgACADT0UEQCACIAVBCGogBxACQQF0aiIELQAAIQYgBUEIaiAELQABEAEgACAGOgAAIABBAWohAAwBCwsgAUFsIAVBCGoQChshAgsgBUEgaiQAIAILtgMBCX8jAEEQayIGJAAgBkEANgIMIAZBADYCCEFUIQQCQAJAIANBQGsiDCADIAZBCGogBkEMaiABIAIQMSICEAMNACAGQQRqIAAQDiAGKAIMIgcgBi0ABEEBaksNASAAQQRqIQogBkEAOgAFIAYgBzoABiAAIAYoAgQ2AgAgB0EBaiEJQQEhBANAIAQgCUkEQCADIARBAnRqIgEoAgAhACABIAU2AgAgACAEQX9qdCAFaiEFIARBAWohBAwBCwsgB0EBaiEHQQAhBSAGKAIIIQkDQCAFIAlGDQEgAyAFIAxqLQAAIgRBAnRqIgBBASAEdEEBdSILIAAoAgAiAWoiADYCACAHIARrIQhBACEEAkAgC0EDTQRAA0AgBCALRg0CIAogASAEakEBdGoiACAIOgABIAAgBToAACAEQQFqIQQMAAALAAsDQCABIABPDQEgCiABQQF0aiIEIAg6AAEgBCAFOgAAIAQgCDoAAyAEIAU6AAIgBCAIOgAFIAQgBToABCAEIAg6AAcgBCAFOgAGIAFBBGohAQwAAAsACyAFQQFqIQUMAAALAAsgAiEECyAGQRBqJAAgBAutAQECfwJAQYQgKAIAIABHIAAoAgBBAXYiAyABa0F4aiICQXhxQQhHcgR/IAIFIAMQJ0UNASACQQhqC0EQSQ0AIAAgACgCACICQQFxIAAgAWpBD2pBeHEiASAAa0EBdHI2AgAgASAANgIEIAEgASgCAEEBcSAAIAJBAXZqIAFrIgJBAXRyNgIAQYQgIAEgAkH/////B3FqQQRqQYQgKAIAIABGGyABNgIAIAEQJQsLygIBBX8CQAJAAkAgAEEIIABBCEsbZ0EfcyAAaUEBR2oiAUEESSAAIAF2cg0AIAFBAnRB/B5qKAIAIgJFDQADQCACQXhqIgMoAgBBAXZBeGoiBSAATwRAIAIgBUEIIAVBCEsbZ0Efc0ECdEGAH2oiASgCAEYEQCABIAIoAgQ2AgALDAMLIARBHksNASAEQQFqIQQgAigCBCICDQALC0EAIQMgAUEgTw0BA0AgAUECdEGAH2ooAgAiAkUEQCABQR5LIQIgAUEBaiEBIAJFDQEMAwsLIAIgAkF4aiIDKAIAQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgBGBEAgASACKAIENgIACwsgAigCACIBBEAgASACKAIENgIECyACKAIEIgEEQCABIAIoAgA2AgALIAMgAygCAEEBcjYCACADIAAQNwsgAwvhCwINfwV+IwBB8ABrIgckACAHIAAoAvDhASIINgJcIAEgAmohDSAIIAAoAoDiAWohDwJAAkAgBUUEQCABIQQMAQsgACgCxOABIRAgACgCwOABIREgACgCvOABIQ4gAEEBNgKM4QFBACEIA0AgCEEDRwRAIAcgCEECdCICaiAAIAJqQazQAWooAgA2AkQgCEEBaiEIDAELC0FsIQwgB0EYaiADIAQQBhADDQEgB0EsaiAHQRhqIAAoAgAQEyAHQTRqIAdBGGogACgCCBATIAdBPGogB0EYaiAAKAIEEBMgDUFgaiESIAEhBEEAIQwDQCAHKAIwIAcoAixBA3RqKQIAIhRCEIinQf8BcSEIIAcoAkAgBygCPEEDdGopAgAiFUIQiKdB/wFxIQsgBygCOCAHKAI0QQN0aikCACIWQiCIpyEJIBVCIIghFyAUQiCIpyECAkAgFkIQiKdB/wFxIgNBAk8EQAJAIAZFIANBGUlyRQRAIAkgB0EYaiADQSAgBygCHGsiCiAKIANLGyIKEAUgAyAKayIDdGohCSAHQRhqEAQaIANFDQEgB0EYaiADEAUgCWohCQwBCyAHQRhqIAMQBSAJaiEJIAdBGGoQBBoLIAcpAkQhGCAHIAk2AkQgByAYNwNIDAELAkAgA0UEQCACBEAgBygCRCEJDAMLIAcoAkghCQwBCwJAAkAgB0EYakEBEAUgCSACRWpqIgNBA0YEQCAHKAJEQX9qIgMgA0VqIQkMAQsgA0ECdCAHaigCRCIJIAlFaiEJIANBAUYNAQsgByAHKAJINgJMCwsgByAHKAJENgJIIAcgCTYCRAsgF6chAyALBEAgB0EYaiALEAUgA2ohAwsgCCALakEUTwRAIAdBGGoQBBoLIAgEQCAHQRhqIAgQBSACaiECCyAHQRhqEAQaIAcgB0EYaiAUQhiIp0H/AXEQCCAUp0H//wNxajYCLCAHIAdBGGogFUIYiKdB/wFxEAggFadB//8DcWo2AjwgB0EYahAEGiAHIAdBGGogFkIYiKdB/wFxEAggFqdB//8DcWo2AjQgByACNgJgIAcoAlwhCiAHIAk2AmggByADNgJkAkACQAJAIAQgAiADaiILaiASSw0AIAIgCmoiEyAPSw0AIA0gBGsgC0Egak8NAQsgByAHKQNoNwMQIAcgBykDYDcDCCAEIA0gB0EIaiAHQdwAaiAPIA4gESAQEB4hCwwBCyACIARqIQggBCAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWo
vendor: 19,007 bytes, line 2
2hCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgCCAJSxsoAgAhDSAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogB0EoaiAfQhiIp0H/AXEQCCEOIAdB8ABqIARBBHRqIgsgCSANaiAIazYCDCALIAg2AgggCyADNgIEIAsgAjYCACAHIA4gH6dB//8DcWo2AkQgBEEBaiEEDAELCyAEIBdIDQEgEkFgaiEYIAdB4ABqIRogB0HkAGohGyABIQMDQCAHQShqEARBAksgBCAFTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEIIAcoAkggBygCREEDdGopAgAiH0IgiKchCSAeQiCIISAgHUIgiKchDAJAIB9CEIinQf8BcSICQQJPBEACQCAGRSACQRlJckUEQCAJIAdBKGogAkEgIAcoAixrIgogCiACSxsiChAFIAIgCmsiAnRqIQkgB0EoahAEGiACRQ0BIAdBKGogAhAFIAlqIQkMAQsgB0EoaiACEAUgCWohCSAHQShqEAQaCyAHKQJUISEgByAJNgJUIAcgITcDWAwBCwJAIAJFBEAgDARAIAcoAlQhCQwDCyAHKAJYIQkMAQsCQAJAIAdBKGpBARAFIAkgDEVqaiICQQNGBEAgBygCVEF/aiICIAJFaiEJDAELIAJBAnQgB2ooAlQiCSAJRWohCSACQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAk2AlQLICCnIRQgCARAIAdBKGogCBAFIBRqIRQLIAggC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgDGohDAsgB0EoahAEGiAHIAcoAmggDGoiGSAUajYCaCAbIBogCSAZSxsoAgAhHCAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogByAHQShqIB9CGIinQf8BcRAIIB+nQf//A3FqNgJEIAcgB0HwAGogBEEDcUEEdGoiDSkDCCIdNwPIASAHIA0pAwAiHjcDwAECQAJAAkAgBygCvAEiDiAepyICaiIWIBNLDQAgAyAHKALEASIKIAJqIgtqIBhLDQAgEiADayALQSBqTw0BCyAHIAcpA8gBNwMQIAcgBykDwAE3AwggAyASIAdBCGogB0G8AWogEyAPIBUgERAeIQsMAQsgAiADaiEIIAMgDhAHIAJBEU8EQCADQRBqIQIDQCACIA5BEGoiDhAHIAJBEGoiAiAISQ0ACwsgCCAdpyIOayECIAcgFjYCvAEgDiAIIA9rSwRAIA4gCCAVa0sEQEFsIQsMAgsgESACIA9rIgJqIhYgCmogEU0EQCAIIBYgChAPGgwCCyAIIBZBACACaxAPIQggByACIApqIgo2AsQBIAggAmshCCAPIQILIA5BEE8EQCAIIApqIQoDQCAIIAIQByACQRBqIQIgCEEQaiIIIApJDQALDAELAkAgDkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgDkECdCIKQcAeaigCAGoiAhAXIAIgCkHgHmooAgBrIQIgBygCxAEhCgwBCyAIIAIQDAsgCkEJSQ0AIAggCmohCiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAKSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAKSQ0ACwsgCxADBEAgCyEQDAQFIA0gDDYCACANIBkgHGogCWs2AgwgDSAJNgIIIA0gFDYCBCAEQQFqIQQgAyALaiEDDAILAAsLIAQgBUgNASAEIBdrIQtBACEEA0AgCyAFSARAIAcgB0HwAGogC0EDcUEEdGoiAikDCCIdNwPIASAHIAIpAwAiHjcDwAECQAJAAkAgBygCvAEiDCAepyICaiIKIBNLDQAgAyAHKALEASIJIAJqIhBqIBhLDQAgEiADayAQQSBqTw0BCyAHIAcpA8gBNwMgIAcgBykDwAE3AxggAyASIAdBGGogB0G8AWogEyAPIBUgERAeIRAMAQsgAiADaiEIIAMgDBAHIAJBEU8EQCADQRBqIQIDQCACIAxBEGoiDBAHIAJBEGoiAiAISQ0ACwsgCCAdpyIGayECIAcgCjYCvAEgBiAIIA9rSwRAIAYgCCAVa0sEQEFsIRAMAgsgESACIA9rIgJqIgwgCWogEU0EQCAIIAwgCRAPGgwCCyAIIAxBACACaxAPIQggByACIAlqIgk2AsQBIAggAmshCCAPIQILIAZBEE8EQCAIIAlqIQYDQCAIIAIQByACQRBqIQIgCEEQaiIIIAZJDQALDAELAkAgBkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgBkECdCIGQcAeaigCAGoiAhAXIAIgBkHgHmooAgBrIQIgBygCxAEhCQwBCyAIIAIQDAsgCUEJSQ0AIAggCWohBiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAGSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAGSQ0ACwsgEBADDQMgC0EBaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoiBCACIARrEBUiBRADDQAgAygCfCIGQSNLDQAgAygCeCIHQQpPDQAgACADIAZBwBBB0BEgBxAYIAQgBWoiBEEMaiIFIAJLDQAgAiAFayEFQQAhAgNAIAJBA0cEQCAEKAAAIgZBf2ogBU8NAiAAIAJBAnRqQZzQAWogBjYCACACQQFqIQIgBEEEaiEEDAELCyAEIAFrIQgLIANBgAFqJAAgCAtGAQN/IABBCGohAyAAKAIEIQJBACEAA0AgACACdkUEQCABIAMgAEEDdGotAAJBFktqIQEgAEEBaiEADAELCyABQQggAmt0C4YDAQV/Qbh/IQcCQCADRQ0AIAItAAAiBEUEQCABQQA2AgBBAUG4fyADQQFGGw8LAn8gAkEBaiIFIARBGHRBGHUiBkF/Sg0AGiAGQX9GBEAgA0EDSA0CIAUvAABBgP4BaiEEIAJBA2oMAQsgA0ECSA0BIAItAAEgBEEIdHJBgIB+aiEEIAJBAmoLIQUgASAENgIAIAVBAWoiASACIANqIgNLDQBBbCEHIABBEGogACAFLQAAIgVBBnZBI0EJIAEgAyABa0HAEEHQEUHwEiAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBmCBqIABBCGogBUEEdkEDcUEfQQggASABIAZqIAgbIgEgAyABa0GAC0GADEGAFyAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBoDBqIABBBGogBUECdkEDcUE0QQkgASABIAZqIAgbIgEgAyABa0GADUHgDkGQGSAAKAKM4QEgACgCnOIBIAQQHyIAEAMNACAAIAFqIAJrIQcLIAcLrQMBCn8jAEGABGsiCCQAAn9BUiACQf8BSw0AGkFUIANBDEsNABogAkEBaiELIABBBGohCUGAgAQgA0F/anRBEHUhCkEAIQJBASEEQQEgA3QiB0F/aiIMIQUDQCACIAtGRQRAAkAgASACQQF0Ig1qLwEAIgZB//8DRgRAIAkgBUECdGogAjoAAiAFQX9qIQVBASEGDAELIARBACAKIAZBEHRBEHVKGyEECyAIIA1qIAY7AQAgAkEBaiECDAELCyAAIAQ7AQIgACADOwEAIAdBA3YgB0EBdmpBA2ohBkEAIQRBACECA0AgBCALRkUEQCABIARBAXRqLgEAIQpBACEAA0AgACAKTkUEQCAJIAJBAnRqIAQ6AAIDQCACIAZqIAxxIgIgBUsNAAsgAEEBaiEADAELCyAEQQFqIQQMAQsLQX8gAg0AGkEAIQIDfyACIAdGBH9BAAUgCCAJIAJBAnRqIgAtAAJBAXRqIgEgAS8BACIBQQFqOwEAIAAgAyABEBRrIgU6AAMgACABIAVB/wFxdCAHazsBACACQQFqIQIMAQsLCyEFIAhBgARqJAAgBQvjBgEIf0FsIQcCQCACQQNJDQACQAJAAkACQCABLQAAIgNBA3EiCUEBaw4DAwEAAgsgACgCiOEBDQBBYg8LIAJBBUkNAkEDIQYgASgAACEFAn8CQAJAIANBAnZBA3EiCEF+aiIEQQFNBEAgBEEBaw0BDAILIAVBDnZB/wdxIQQgBUEEdkH/B3EhAyAIRQwCCyAFQRJ2IQRBBCEGIAVBBHZB//8AcSEDQQAMAQsgBUEEdkH//w9xIgNBgIAISw0DIAEtAARBCnQgBUEWdnIhBEEFIQZBAAshBSAEIAZqIgogAksNAgJAIANBgQZJDQAgACgCnOIBRQ0AQQAhAgNAIAJBg4ABSw0BIAJBQGshAgwAAAsACwJ/IAlBA0YEQCABIAZqIQEgAEHw4gFqIQIgACgCDCEGIAUEQCACIAMgASAEIAYQXwwCCyACIAMgASAEIAYQXQwBCyAAQbjQAWohAiABIAZqIQEgAEHw4gFqIQYgAEGo0ABqIQggBQRAIAggBiADIAEgBCACEF4MAQsgCCAGIAMgASAEIAIQXAsQAw0CIAAgAzYCgOIBIABBATYCiOEBIAAgAEHw4gFqNgLw4QEgCUECRgRAIAAgAEGo0ABqNgIMCyAAIANqIgBBiOMBakIANwAAIABBgOMBakIANwAAIABB+OIBakIANwAAIABB8OIBakIANwAAIAoPCwJ/AkACQAJAIANBAnZBA3FBf2oiBEECSw0AIARBAWsOAgACAQtBASEEIANBA3YMAgtBAiEEIAEvAABBBHYMAQtBAyEEIAEQIUEEdgsiAyAEaiIFQSBqIAJLBEAgBSACSw0CIABB8OIBaiABIARqIAMQCyEBIAAgAzYCgOIBIAAgATYC8OEBIAEgA2oiAEIANwAYIABCADcAECAAQgA3AAggAEIANwAAIAUPCyAAIAM2AoDiASAAIAEgBGo2AvDhASAFDwsCfwJAAkACQCADQQJ2QQNxQX9qIgRBAksNACAEQQFrDgIAAgELQQEhByADQQN2DAILQQIhByABLwAAQQR2DAELIAJBBEkgARAhIgJBj4CAAUtyDQFBAyEHIAJBBHYLIQIgAEHw4gFqIAEgB2otAAAgAkEgahAQIQEgACACNgKA4gEgACABNgLw4QEgB0EBaiEHCyAHC0sAIABC+erQ0OfJoeThADcDICAAQgA3AxggAELP1tO+0ser2UI3AxAgAELW64Lu6v2J9eAANwMIIABCADcDACAAQShqQQBBKBAQGgviAgICfwV+IABBKGoiASAAKAJIaiECAn4gACkDACIDQiBaBEAgACkDECIEQgeJIAApAwgiBUIBiXwgACkDGCIGQgyJfCAAKQMgIgdCEol8IAUQGSAEEBkgBhAZIAcQGQwBCyAAKQMYQsXP2bLx5brqJ3wLIAN8IQMDQCABQQhqIgAgAk0EQEIAIAEpAAAQCSADhUIbiUKHla+vmLbem55/fkLj3MqV/M7y9YV/fCEDIAAhAQwBCwsCQCABQQRqIgAgAksEQCABIQAMAQsgASgAAK1Ch5Wvr5i23puef34gA4VCF4lCz9bTvtLHq9lCfkL5893xmfaZqxZ8IQMLA0AgACACSQRAIAAxAABCxc/ZsvHluuonfiADhUILiUKHla+vmLbem55/fiEDIABBAWohAAwBCwsgA0IhiCADhULP1tO+0ser2UJ+IgNCHYggA4VC+fPd8Zn2masWfiIDQiCIIAOFC+8CAgJ/BH4gACAAKQMAIAKtfDcDAAJAAkAgACgCSCIDIAJqIgRBH00EQCABRQ0BIAAgA2pBKGogASACECAgACgCSCACaiEEDAELIAEgAmohAgJ/IAMEQCAAQShqIgQgA2ogAUEgIANrECAgACAAKQMIIAQpAAAQCTcDCCAAIAApAxAgACkAMBAJNwMQIAAgACkDGCAAKQA4EAk3AxggACAAKQMgIABBQGspAAAQCTcDICAAKAJIIQMgAEEANgJIIAEgA2tBIGohAQsgAUEgaiACTQsEQCACQWBqIQMgACkDICEFIAApAxghBiAAKQMQIQcgACkDCCEIA0AgCCABKQAAEAkhCCAHIAEpAAgQCSEHIAYgASkAEBAJIQYgBSABKQAYEAkhBSABQSBqIgEgA00NAAsgACAFNwMgIAAgBjcDGCAAIAc3AxAgACAINwMICyABIAJPDQEgAEEoaiABIAIgAWsiBBAgCyAAIAQ2AkgLCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQEBogAwVBun8LCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQCxogAwVBun8LC6gCAQZ/IwBBEGsiByQAIABB2OABaikDAEKAgIAQViEIQbh/IQUCQCAEQf//B0sNACAAIAMgBBBCIgUQAyIGDQAgACgCnOIBIQkgACAHQQxqIAMgAyAFaiAGGyIKIARBACAFIAYbayIGEEAiAxADBEAgAyEFDAELIAcoAgwhBCABRQRAQbp/IQUgBEEASg0BCyAGIANrIQUgAyAKaiEDAkAgCQRAIABBADYCnOIBDAELAkACQAJAIARBBUgNACAAQdjgAWopAwBCgICACFgNAAwBCyAAQQA2ApziAQwBCyAAKAIIED8hBiAAQQA2ApziASAGQRRPDQELIAAgASACIAMgBSAEIAgQOSEFDAELIAAgASACIAMgBSAEIAgQOiEFCyAHQRBqJAAgBQtnACAAQdDgAWogASACIAAoAuzhARAuIgEQAwRAIAEPC0G4fyECAkAgAQ0AIABB7OABaigCACIBBEBBYCECIAAoApjiASABRw0BC0EAIQIgAEHw4AFqKAIARQ0AIABBkOEBahBDCyACCycBAX8QVyIERQRAQUAPCyAEIAAgASACIAMgBBBLEE8hACAEEFYgAAs/AQF/AkACQAJAIAAoAqDiAUEBaiIBQQJLDQAgAUEBaw4CAAECCyAAEDBBAA8LIABBADYCoOIBCyAAKAKU4gELvAMCB38BfiMAQRBrIgkkAEG4fyEGAkAgBCgCACIIQQVBCSAAKALs4QEiBRtJDQAgAygCACIHQQFBBSAFGyAFEC8iBRADBEAgBSEGDAELIAggBUEDakkNACAAIAcgBRBJIgYQAw0AIAEgAmohCiAAQZDhAWohCyAIIAVrIQIgBSAHaiEHIAEhBQNAIAcgAiAJECwiBhADDQEgAkF9aiICIAZJBEBBuH8hBgwCCyAJKAIAIghBAksEQEFsIQYMAgsgB0EDaiEHAn8CQAJAAkAgCEEBaw4CAgABCyAAIAUgCiAFayAHIAYQSAwCCyAFIAogBWsgByAGEEcMAQsgBSAKIAVrIActAAAgCSgCCBBGCyIIEAMEQCAIIQYMAgsgACgC8OABBEAgCyAFIAgQRQsgAiAGayECIAYgB2ohByAFIAhqIQUgCSgCBEUNAAsgACkD0OABIgxCf1IEQEFsIQYgDCAFIAFrrFINAQsgACgC8OABBEBBaiEGIAJBBEkNASALEEQhDCAHKAAAIAynRw0BIAdBBGohByACQXxqIQILIAMgBzYCACAEIAI2AgAgBSABayEGCyAJQRBqJAAgBgsuACAAECsCf0EAQQAQAw0AGiABRSACRXJFBEBBYiAAIAEgAhA9EAMNARoLQQALCzcAIAEEQCAAIAAoAsTgASABKAIEIAEoAghqRzYCnOIBCyAAECtBABADIAFFckUEQCAAIAEQWwsL0QIBB38jAEEQayIGJAAgBiAENgIIIAYgAzYCDCAFBEAgBSgCBCEKIAUoAgghCQsgASEIAkACQANAIAAoAuzhARAWIQsCQANAIAQgC0kNASADKAAAQXBxQdDUtMIBRgRAIAMgBBAiIgcQAw0EIAQgB2shBCADIAdqIQMMAQsLIAYgAzYCDCAGIAQ2AggCQCAFBEAgACAFEE5BACEHQQAQA0UNAQwFCyAAIAogCRBNIgcQAw0ECyAAIAgQUCAMQQFHQQAgACAIIAIgBkEMaiAGQQhqEEwiByIDa0EAIAMQAxtBCkdyRQRAQbh/IQcMBAsgBxADDQMgAiAHayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQMgVBuH8LC78DAQN/IwBBIGsiBSQAIAVBCGogAiADEAYiAhADRQRAIAAgAWoiB0F9aiEGIAUgBBAOIARBBGohAiAFLQACIQMDQEEAIAAgBkkgBUEIahAEGwRAIAAgAiAFQQhqIAMQAkECdGoiBC8BADsAACAFQQhqIAQtAAIQASAAIAQtAANqIgQgAiAFQQhqIAMQAkECdGoiAC8BADsAACAFQQhqIAAtAAIQASAEIAAtAANqIQAMAQUgB0F+aiEEA0AgBUEIahAEIAAgBEtyRQRAIAAgAiAFQQhqIAMQAkECdGoiBi8BADsAACAFQQhqIAYtAAIQASAAIAYtAANqIQAMAQsLA0AgACAES0UEQCAAIAIgBUEIaiADEAJBAnRqIgYvAQA7AAAgBUEIaiAGLQACEAEgACAGLQADaiEADAELCwJAIAAgB08NACAAIAIgBUEIaiADEAIiA0ECdGoiAC0AADoAACAALQADQQFGBEAgBUEIaiAALQACEAEMAQsgBSgCDEEfSw0AIAVBCGogAiADQQJ0ai0AAhABIAUoAgxBIUkNACAFQSA2AgwLIAFBbCAFQQhqEAobIQILCwsgBUEgaiQAIAILkgIBBH8jAEFAaiIJJAAgCSADQTQQCyEDAkAgBEECSA0AIAMgBEECdGooAgAhCSADQTxqIAgQIyADQQE6AD8gAyACOgA+QQAhBCADKAI8IQoDQCAEIAlGDQEgACAEQQJ0aiAKNgEAIARBAWohBAwAAAsAC0EAIQkDQCAGIAlGRQRAIAMgBSAJQQF0aiIKLQABIgtBAnRqIgwoAgAhBCADQTxqIAotAABBCHQgCGpB//8DcRAjIANBAjoAPyADIAcgC2siCiACajoAPiAEQQEgASAKa3RqIQogAygCPCELA0AgACAEQQJ0aiALNgEAIARBAWoiBCAKSQ0ACyAMIAo2AgAgCUEBaiEJDAELCyADQUBrJAALowIBCX8jAEHQAGsiCSQAIAlBEGogBUE0EAsaIAcgBmshDyAHIAFrIRADQAJAIAMgCkcEQEEBIAEgByACIApBAXRqIgYtAAEiDGsiCGsiC3QhDSAGLQAAIQ4gCUEQaiAMQQJ0aiIMKAIAIQYgCyAPTwRAIAAgBkECdGogCyAIIAUgCEE0bGogCCAQaiIIQQEgCEEBShsiCCACIAQgCEECdGooAgAiCEEBdGogAyAIayAHIA4QYyAGIA1qIQgMAgsgCUEMaiAOECMgCUEBOgAPIAkgCDoADiAGIA1qIQggCSgCDCELA0AgBiAITw0CIAAgBkECdGogCzYBACAGQQFqIQYMAAALAAsgCUHQAGokAA8LIAwgCDYCACAKQQFqIQoMAAALAAs0ACAAIAMgBCAFEDYiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQNAVBuH8LCyMAIAA/AEEQdGtB//8DakEQdkAAQX9GBEBBAA8LQQAQAEEBCzsBAX8gAgRAA0AgACABIAJBgCAgAkGAIEkbIgMQCyEAIAFBgCBqIQEgAEGAIGohACACIANrIgINAAsLCwYAIAAQAwsLqBUJAEGICAsNAQAAAAEAAAACAAAAAgBBoAgLswYBAAAAAQAAAAIAAAACAAAAJgAAAIIAAAAhBQAASgAAAGcIAAAmAAAAwAEAAIAAAABJBQAASgAAAL4IAAApAAAALAIAAIAAAABJBQAASgAAAL4IAAAvAAAAygIAAIAAAACKBQAASgAAAIQJAAA1AAAAcwMAAIAAAACdBQAASgAAAKAJAAA9AAAAgQMAAIAAAADrBQAASwAAAD4KAABEAAAAngMAAIAAAABNBgAASwAAAKoKAABLAAAAswMAAIAAAADBBgAATQAAAB8NAABNAAAAUwQAAIAAAAAjCAAAUQAAAKYPAABUAAAAmQQAAIAAAABLCQAAVwAAALESAABYAAAA2gQAAIAAAABvCQAAXQAAACMUAABUAAAARQUAAIAAAABUCgAAagAAAIwUAABqAAAArwUAAIAAAAB2CQAAfAAAAE4QAAB8AAAA0gIAAIAAAABjBwAAkQAAAJAHAACSAAAAAAAAAAEAAAABAAAABQAAAA0AAAAdAAAAPQAAAH0AAAD9AAAA/QEAAP0DAAD9BwAA/Q8AAP0fAAD9PwAA/X8AAP3/AAD9/wEA/f8DAP3/BwD9/w8A/f8fAP3/PwD9/38A/f//AP3//wH9//8D/f//B/3//w/9//8f/f//P/3//38AAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACUAAAAnAAAAKQAAACsAAAAvAAAAMwAAADsAAABDAAAAUwAAAGMAAACDAAAAAwEAAAMCAAADBAAAAwgAAAMQAAADIAAAA0AAAAOAAAADAAEAQeAPC1EBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAQcQQC4sBAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABIAAAAUAAAAFgAAABgAAAAcAAAAIAAAACgAAAAwAAAAQAAAAIAAAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAQAAAAIAAAAAAAQBBkBIL5gQBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAAAEAAAAEAAAACAAAAAAAAAABAAEBBgAAAAAAAAQAAAAAEAAABAAAAAAgAAAFAQAAAAAAAAUDAAAAAAAABQQAAAAAAAAFBgAAAAAAAAUHAAAAAAAABQkAAAAAAAAFCgAAAAAAAAUMAAAAAAAABg4AAAAAAAEFEAAAAAAAAQUUAAAAAAABBRYAAAAAAAIFHAAAAAAAAwUgAAAAAAAEBTAAAAAgAAYFQAAAAAAABwWAAAAAAAAIBgABAAAAAAoGAAQAAAAADAYAEAAAIAAABAAAAAAAAAAEAQAAAAAAAAUCAAAAIAAABQQAAAAAAAAFBQAAACAAAAUHAAAAAAAABQgAAAAgAAAFCgAAAAAAAAULAAAAAAAABg0AAAAgAAEFEAAAAAAAAQUSAAAAIAABBRYAAAAAAAIFGAAAACAAAwUgAAAAAAADBSgAAAAAAAYEQAAAABAABgRAAAAAIAAHBYAAAAAAAAkGAAIAAAAACwYACAAAMAAABAAAAAAQAAAEAQAAACAAAAUCAAAAIAAABQMAAAAgAAAFBQAAACAAAAUGAAAAIAAABQgAAAAgAAAFCQAAACAAAAULAAAAIAAABQwAAAAAAAAGDwAAACAAAQUSAAAAIAABBRQAAAAgAAIFGAAAACAAAgUcAAAAIAADBSgAAAAgAAQFMAAAAAAAEAYAAAEAAAAPBgCAAAAAAA4GAEAAAAAADQYAIABBgBcLhwIBAAEBBQAAAAAAAAUAAAAAAAAGBD0AAAAAAAkF/QEAAAAADwX9fwAAAAAVBf3/HwAAAAMFBQAAAAAABwR9AAAAAAAMBf0PAAAAABIF/f8DAAAAFwX9/38AAAAFBR0AAAAAAAgE/QAAAAAADgX9PwAAAAAUBf3/DwAAAAIFAQAAABAABwR9AAAAAAALBf0HAAAAABEF/f8BAAAAFgX9/z8AAAAEBQ0AAAAQAAgE/QAAAAAADQX9HwAAAAATBf3/BwAAAAEFAQAAABAABgQ9AAAAAAAKBf0DAAAAABAF/f8AAAAAHAX9//8PAAAbBf3//wcAABoF/f//AwAAGQX9//8BAAAYBf3//wBBkBkLhgQBAAEBBgAAAAAAAAYDAAAAAAAABAQAAAAgAAAFBQAAAAAAAAUGAAAAAAAABQgAAAAAAAAFCQAAAAAAAAULAAAAAAAABg0AAAAAAAAGEAAAAAAAAAYTAAAAAAAABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",
2b="display-p3",w="display-p3-linear",S=(i.j17,i.l6D,i.l6D,i.epp.space
vendor: 15,690 bytes, line 2
2s[i.KI_],i.KI_,new WeakMap);let I,M=0;class T extends i.aNw{constructor(t){super(t),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new r,this.workerSourceURL="",this.workerConfig=null,"undefined"!=typeof MSC_TRANSCODER&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(t){return this.transcoderPath=t,this}setWorkerLimit(t){return this.workerPool.setWorkerLimit(t),this}async detectSupportAsync(t){return console.warn('KTX2Loader: "detectSupportAsync()" has been deprecated. Use "detectSupport()" and "await renderer.init();" when creating the renderer.'),await t.init(),this.detectSupport(t)}detectSupport(t){return!0===t.isWebGPURenderer?this.workerConfig={astcSupported:t.hasFeature("texture-compression-astc"),astcHDRSupported:!1,etc1Supported:t.hasFeature("texture-compression-etc1"),etc2Supported:t.hasFeature("texture-compression-etc2"),dxtSupported:t.hasFeature("texture-compression-s3tc"),bptcSupported:t.hasFeature("texture-compression-bc"),pvrtcSupported:t.hasFeature("texture-compression-pvrtc")}:(this.workerConfig={astcSupported:t.extensions.has("WEBGL_compressed_texture_astc"),astcHDRSupported:t.extensions.has("WEBGL_compressed_texture_astc")&&t.extensions.get("WEBGL_compressed_texture_astc").getSupportedProfiles().includes("hdr"),etc1Supported:t.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:t.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:t.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:t.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:t.extensions.has("WEBGL_compressed_texture_pvrtc")||t.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},"undefined"!=typeof navigator&&navigator.platform.indexOf("Linux")>=0&&navigator.userAgent.indexOf("Firefox")>=0&&this.workerConfig.astcSupported&&this.workerConfig.etc2Supported&&this.workerConfig.bptcSupported&&this.workerConfig.dxtSupported&&(this.workerConfig.astcSupported=!1,this.workerConfig.etc2Supported=!1)),this}init(){if(!this.transcoderPending){const t=new i.hH6(this.manager);t.setPath(this.transcoderPath),t.setWithCredentials(this.withCredentials);const e=t.loadAsync("basis_transcoder.js"),n=new i.hH6(this.manager);n.setPath(this.transcoderPath),n.setResponseType("arraybuffer"),n.setWithCredentials(this.withCredentials);const r=n.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([e,r]).then((([t,e])=>{const n=T.BasisWorker.toString(),i=["/* constants */","let _EngineFormat = "+JSON.stringify(T.EngineFormat),"let _EngineType = "+JSON.stringify(T.EngineType),"let _TranscoderFormat = "+JSON.stringify(T.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(T.BasisFormat),"/* basis_transcoder.js */",t,"/* worker */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i])),this.transcoderBinary=e,this.workerPool.setWorkerCreator((()=>{const t=new Worker(this.workerSourceURL),e=this.transcoderBinary.slice(0);return t.postMessage({type:"init",config:this.workerConfig,transcoderBinary:e},[e]),t}))})),M>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),M++}return this.transcoderPending}load(t,e,n,r){if(null===this.workerConfig)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const s=new i.hH6(this.manager);s.setPath(this.path),s.setCrossOrigin(this.crossOrigin),s.setWithCredentials(this.withCredentials),s.setRequestHeader(this.requestHeader),s.setResponseType("arraybuffer"),s.load(t,(t=>{this.parse(t,e,r)}),n,r)}parse(t,e,n){if(null===this.workerConfig)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");if(S.has(t)){return S.get(t).promise.then(e).catch(n)}this._createTexture(t).then((t=>e?e(t):null)).catch(n)}_createTextureFrom(t,e){const{type:n,error:r,data:{faces:s,width:o,height:a,format:l,type:h,dfdFlags:c}}=t;if("error"===n)return Promise.reject(r);let u;if(6===e.faceCount)u=new i.qVC(s,l,h);else{const t=s[0].mipmaps;u=e.layerCount>1?new i.Z_g(t,o,a,e.layerCount,l,h):new i.EB7(t,o,a,l,h)}return u.minFilter=1===s[0].mipmaps.length?i.wem:i.D1R,u.magFilter=i.wem,u.generateMipmaps=!1,u.needsUpdate=!0,u.colorSpace=D(e),u.premultiplyAlpha=!!(1&c),u}async _createTexture(t,e={}){const n=function(t){const e=new Uint8Array(t.buffer,t.byteOffset,g.length);if(e[0]!==g[0]||e[1]!==g[1]||e[2]!==g[2]||e[3]!==g[3]||e[4]!==g[4]||e[5]!==g[5]||e[6]!==g[6]||e[7]!==g[7]||e[8]!==g[8]||e[9]!==g[9]||e[10]!==g[10]||e[11]!==g[11])throw new Error("Missing KTX 2.0 identifier.");const n={vkFormat:0,typeSize:1,pixelWidth:0,pixelHeight:0,pixelDepth:0,layerCount:0,faceCount:1,levelCount:0,supercompressionScheme:0,levels:[],dataFormatDescriptor:[{vendorId:0,descriptorType:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],keyValue:{},globalData:null},i=17*Uint32Array.BYTES_PER_ELEMENT,r=new A(t,g.length,i,!0);n.vkFormat=r._nextUint32(),n.typeSize=r._nextUint32(),n.pixelWidth=r._nextUint32(),n.pixelHeight=r._nextUint32(),n.pixelDepth=r._nextUint32(),n.layerCount=r._nextUint32(),n.faceCount=r._nextUint32(),n.levelCount=r._nextUint32(),n.supercompressionScheme=r._nextUint32();const s=r._nextUint32(),o=r._nextUint32(),a=r._nextUint32(),l=r._nextUint32(),h=r._nextUint64(),c=r._nextUint64(),u=3*Math.max(n.levelCount,1)*8,d=new A(t,g.length+i,u,!0);for(let e=0,i=Math.max(n.levelCount,1);e<i;e++)n.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+d._nextUint64(),d._nextUint64()),uncompressedByteLength:d._nextUint64()});const p=new A(t,s,o,!0);p._skip(4);const f=p._nextUint16(),_=p._nextUint16(),v=p._nextUint16(),y=p._nextUint16(),E={vendorId:f,descriptorType:_,versionNumber:v,colorModel:p._nextUint8(),colorPrimaries:p._nextUint8(),transferFunction:p._nextUint8(),flags:p._nextUint8(),texelBlockDimension:[p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8()],bytesPlane:[p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8()],samples:[]},x=(y/4-6)/4;for(let t=0;t<x;t++){const e={bitOffset:p._nextUint16(),bitLength:p._nextUint8(),channelType:p._nextUint8(),samplePosition:[p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8()],sampleLower:Number.NEGATIVE_INFINITY,sampleUpper:Number.POSITIVE_INFINITY};64&e.channelType?(e.sampleLower=p._nextInt32(),e.sampleUpper=p._nextInt32()):(e.sampleLower=p._nextUint32(),e.sampleUpper=p._nextUint32()),E.samples[t]=e}n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(E);const C=new A(t,a,l,!0);for(;C._offset<l;){const t=C._nextUint32(),e=C._scan(t),i=m(e);if(n.keyValue[i]=C._nextUint8Array(t-e.byteLength-1),i.match(/^ktx/i)){const t=m(n.keyValue[i]);n.keyValue[i]=t.substring(0,t.lastIndexOf("\0"))}C._skip(t%4?4-t%4:0)}if(c<=0)return n;const b=new A(t,h,c,!0),w=b._nextUint16(),S=b._nextUint16(),I=b._nextUint32(),M=b._nextUint32(),T=b._nextUint32(),B=b._nextUint32(),R=[];for(let t=0,e=Math.max(n.levelCount,1);t<e;t++)R.push({imageFlags:b._nextUint32(),rgbSliceByteOffset:b._nextUint32(),rgbSliceByteLength:b._nextUint32(),alphaSliceByteOffset:b._nextUint32(),alphaSliceByteLength:b._nextUint32()});const P=h+b._offset,D=P+I,L=D+M,U=L+T,N=new Uint8Array(t.buffer,t.byteOffset+P,I),O=new Uint8Array(t.buffer,t.byteOffset+D,M),F=new Uint8Array(t.buffer,t.byteOffset+L,T),k=new Uint8Array(t.buffer,t.byteOffset+U,B);return n.globalData={endpointCount:w,selectorCount:S,imageDescs:R,endpointsData:N,selectorsData:O,tablesData:F,extendedData:k},n}(new Uint8Array(t)),r=n.vkFormat===p&&167===n.dataFormatDescriptor[0].colorModel;if(!(0===n.vkFormat||r&&!this.workerConfig.astcHDRSupported))return async function(t){const{vkFormat:e}=t;if(void 0===R[e])throw new Error("THREE.KTX2Loader: Unsupported vkFormat: "+e);void 0===P[e]&&console.warn('THREE.KTX2Loader: Missing ".type" for vkFormat: '+e);let n;2===t.supercompressionScheme&&(I||(I=new Promise((async t=>{const e=new x;await e.init(),t(e)}))),n=await I);const r=[];for(let s=0;s<t.levels.length;s++){const o=Math.max(1,t.pixelWidth>>s),a=Math.max(1,t.pixelHeight>>s),l=t.pixelDepth?Math.max(1,t.pixelDepth>>s):0,h=t.levels[s];let c,u;if(0===t.supercompressionScheme)c=h.levelData;else{if(2!==t.supercompressionScheme)throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");c=n.decode(h.levelData,h.uncompressedByteLength)}u=P[e]===i.VzW?new Float32Array(c.buffer,c.byteOffset,c.byteLength/Float32Array.BYTES_PER_ELEMENT):P[e]===i.cLu?new Uint16Array(c.buffer,c.byteOffset,c.byteLength/Uint16Array.BYTES_PER_ELEMENT):P[e]===i.tQZ||P[e]===i.dVD?new Uint32Array(c.buffer,c.byteOffset,c.byteLength/Uint32Array.BYTES_PER_ELEMENT):c,r.push({data:u,width:o,height:a,depth:l})}const s=0===t.levelCount||r.length>1;let o;if(B.has(R[e]))o=0===t.pixelDepth?new i.IEO(r[0].data,t.pixelWidth,t.pixelHeight):new i.JUT(r[0].data,t.pixelWidth,t.pixelHeight,t.pixelDepth),o.minFilter=s?i.YLQ:i.TyD,o.magFilter=i.TyD,o.generateMipmaps=0===t.levelCount;else{if(t.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");o=new i.EB7(r,t.pixelWidth,t.pixelHeight),o.minFilter=s?i.D1R:i.wem,o.magFilter=i.wem}return o.mipmaps=r,o.type=P[e],o.format=R[e],o.colorSpace=D(t),o.needsUpdate=!0,Promise.resolve(o)}(n);const s=e,o=this.init().then((()=>this.workerPool.postMessage({type:"transcode",buffer:t,taskConfig:s},[t]))).then((t=>this._createTextureFrom(t.data,n)));return S.set(t,{promise:o}),o}dispose(){this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),M--}}T.BasisFormat={ETC1S:0,UASTC:1,UASTC_HDR:2},T.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16,BC6H:22,RGB_HALF:24,RGBA_HALF:25},T.EngineFormat={RGBAFormat:i.wk1,RGBA_ASTC_4x4_Format:i.ptH,RGB_BPTC_UNSIGNED_Format:i.QO2,RGBA_BPTC_Format:i.bsb,RGBA_ETC2_EAC_Format:i.ekQ,RGBA_PVRTC_4BPPV1_Format:i.eaV,RGBA_S3TC_DXT5_Format:i.ILR,RGB_ETC1_Format:i.fto,RGB_ETC2_Format:i.l0P,RGB_PVRTC_4BPPV1_Format:i._AM,RGBA_S3TC_DXT1_Format:i.BFQ},T.EngineType={UnsignedByteType:i.ywz,HalfFloatType:i.cLu,FloatType:i.VzW},T.BasisWorker=function(){let t,e,n;const i=_EngineFormat,r=_EngineType,s=_TranscoderFormat,o=_BasisFormat;self.addEventListener("message",(function(i){const s=i.data;switch(s.type){case"init":t=s.config,a=s.transcoderBinary,e=new Promise((t=>{n={wasmBinary:a,onRuntimeInitialized:t},BASIS(n)})).then((()=>{n.initializeBasis(),void 0===n.KTX2File&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")}));break;case"transcode":e.then((()=>{try{const{faces:e,buffers:i,width:a,height:u,hasAlpha:d,format:p,type:f,dfdFlags:A}=function(e){const i=new n.KTX2File(new Uint8Array(e));function s(){i.close(),i.delete()}if(!i.isValid())throw s(),new Error("THREE.KTX2Loader:\tInvalid or unsupported .ktx2 file");let a;if(i.isUASTC())a=o.UASTC;else if(i.isETC1S())a=o.ETC1S;else{if(!i.isHDR())throw new Error("THREE.KTX2Loader: Unknown Basis encoding");a=o.UASTC_HDR}const u=i.getWidth(),d=i.getHeight(),p=i.getLayers()||1,f=i.getLevels(),A=i.getFaces(),g=i.getHasAlpha(),m=i.getDFDFlags(),{transcoderFormat:_,engineFormat:v,engineType:y}=function(e,n,i,r){const s=l[e];for(let o=0;o<s.length;o++){const a=s[o];if(a.if&&!t[a.if])continue;if(!a.basisFormat.includes(e))continue;if(r&&a.transcoderFormat.length<2)continue;if(a.needsPowerOfTwo&&(!h(n)||!h(i)))continue;return{transcoderFormat:a.transcoderFormat[r?1:0],engineFormat:a.engineFormat[r?1:0],engineType:a.engineType[0]}}throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.")}(a,u,d,g);if(!u||!d||!f)throw s(),new Error("THREE.KTX2Loader:\tInvalid texture");if(!i.startTranscoding())throw s(),new Error("THREE.KTX2Loader: .startTranscoding failed");const E=[],x=[];for(let t=0;t<A;t++){const e=[];for(let n=0;n<f;n++){const o=[];let a,l;for(let e=0;e<p;e++){const h=i.getImageLevelInfo(n,e,t);0!==t||0!==n||0!==e||h.origWidth%4==0&&h.origHeight%4==0||console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."),f>1?(a=h.origWidth,l=h.origHeight):(a=h.width,l=h.height);let c=new Uint8Array(i.getImageTranscodedSizeInBytes(n,e,0,_));const u=i.transcodeImage(c,n,e,t,_,0,-1,-1);if(y===r.HalfFloatType&&(c=new Uint16Array(c.buffer,c.byteOffset,c.byteLength/Uint16Array.BYTES_PER_ELEMENT)),!u)throw s(),new Error("THREE.KTX2Loader: .transcodeImage failed.");o.push(c)}const h=c(o);e.push({data:h,width:a,height:l}),x.push(h.buffer)}E.push({mipmaps:e,width:u,height:d,format:v,type:y})}return s(),{faces:E,buffers:x,width:u,height:d,hasAlpha:g,dfdFlags:m,format:v,type:y}}(s.buffer);self.postMessage({type:"transcode",id:s.id,data:{faces:e,width:a,height:u,hasAlpha:d,format:p,type:f,dfdFlags:A}},i)}catch(t){console.error(t),self.postMessage({type:"error",id:s.id,error:t.message})}}))}var a}));const a=[{if:"astcSupported",basisFormat:[o.UASTC],transcoderFormat:[s.ASTC_4x4,s.ASTC_4x4],engineFormat:[i.RGBA_ASTC_4x4_Format,i.RGBA_ASTC_4x4_Format],engineType:[r.UnsignedByteType],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.BC7_M5,s.BC7_M5],engineFormat:[i.RGBA_BPTC_Format,i.RGBA_BPTC_Format],engineType:[r.UnsignedByteType],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.BC1,s.BC3],engineFormat:[i.RGBA_S3TC_DXT1_Format,i.RGBA_S3TC_DXT5_Format],engineType:[r.UnsignedByteType],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.ETC1,s.ETC2],engineFormat:[i.RGB_ETC2_Format,i.RGBA_ETC2_EAC_Format],engineType:[r.UnsignedByteType],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.ETC1],engineFormat:[i.RGB_ETC1_Format],engineType:[r.UnsignedByteType],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.PVRTC1_4_RGB,s.PVRTC1_4_RGBA],engineFormat:[i.RGB_PVRTC_4BPPV1_Format,i.RGBA_PVRTC_4BPPV1_Format],engineType:[r.UnsignedByteType],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0},{if:"bptcSupported",basisFormat:[o.UASTC_HDR],transcoderFormat:[s.BC6H],engineFormat:[i.RGB_BPTC_UNSIGNED_Format],engineType:[r.HalfFloatType],priorityHDR:1,needsPowerOfTwo:!1},{basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.RGBA32,s.RGBA32],engineFormat:[i.RGBAFormat,i.RGBAFormat],engineType:[r.UnsignedByteType,r.UnsignedByteType],priorityETC1S:100,priorityUASTC:100,needsPowerOfTwo:!1},{basisFormat:[o.UASTC_HDR],transcoderFormat:[s.RGBA_HALF],engineFormat:[i.RGBAFormat],engineType:[r.HalfFloatType],priorityHDR:100,needsPowerOfTwo:!1}],l={[o.ETC1S]:a.filter((t=>t.basisFormat.includes(o.ETC1S))).sort(((t,e)=>t.priorityETC1S-e.priorityETC1S)),[o.UASTC]:a.filter((t=>t.basisFormat.includes(o.UASTC))).sort(((t,e)=>t.priorityUASTC-e.priorityUASTC)),[o.UASTC_HDR]:a.filter((t=>t.basisFormat.includes(o.UASTC_HDR))).sort(((t,e)=>t.priorityHDR-e.priorityHDR))};function h(t){return t<=2||0==(t&t-1)&&0!==t}function c(t){if(1===t.length)return t[0];let e=0;for(let n=0;n<t.length;n++){e+=t[n].byteLength}const n=new Uint8Array(e);let i=0;for(let e=0;e<t.length;e++){const r=t[e];n.set(r,i),i+=r.byteLength}return n}};
2const B=new Set([i.wk1,i.UCm,i.av9,i.hEm]),R={109:i.wk1,103:i.av9,100:i.hEm,97:i.wk1,83:i.av9,76:i.hEm,43:i.wk1,37:i.wk1,22:i.av9,16:i.av9,15:i.hEm,9:i.hEm,123:i.UCm,122:i.UCm,152:i.ekQ,148:i.l0P,[p]:i.ptH,158:i.ptH,157:i.ptH,[f]:i.Djp,166:i.Djp,165:i.Djp,134:i.BFQ,133:i.BFQ,132:i.wuA,131:i.wuA,138:i.v3W,137:i.v3W,140:i.vuL,139:i.HdW,142:i.lGU,141:i.ZTh,146:i.bsb,145:i.bsb,[d]:i.eaV,[c]:i.eaV,[u]:i.CaW,[h]:i.CaW},P={109:i.VzW,103:i.VzW,100:i.VzW,97:i.cLu,83:i.cLu,76:i.cLu,43:i.ywz,37:i.ywz,22:i.ywz,16:i.ywz,15:i.ywz,9:i.ywz,123:i.tQZ,122:i.dVD,152:i.ywz,148:i.ywz,[p]:i.cLu,158:i.ywz,157:i.ywz,[f]:i.cLu,166:i.ywz,165:i.ywz,134:i.ywz,133:i.ywz,132:i.ywz,131:i.ywz,138:i.ywz,137:i.ywz,140:i.ywz,139:i.ywz,142:i.ywz,141:i.ywz,146:i.ywz,145:i.ywz,[d]:i.ywz,[c]:i.ywz,[u]:i.ywz,[h]:i.ywz};function D(t){const e=t.dataFormatDescriptor[0];return e.colorPrimaries===a?e.transferFunction===s?i.KI_:i.GUF:e.colorPrimaries===l?e.transferFunction===s?b:w:(e.colorPrimaries===o||console.warn(`THREE.KTX2Loader: Unsupported color primaries, "${e.colorPrimaries}"`),i.aCh)}},786:(t,e,n)=>{"use strict";n.d(e,{x:()=>h});var i=n(250),r=n(154),s=n(531),o=n(304);class a extends o.w{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,n){const i=t.getContext(),r=t.state;let s,o;r.buffers.color.setMask(!1),r.buffers.depth.setMask(!1),r.buffers.color.setLocked(!0),r.buffers.depth.setLocked(!0),this.inverse?(s=0,o=1):(s=1,o=0),r.buffers.stencil.setTest(!0),r.buffers.stencil.setOp(i.REPLACE,i.REPLACE,i.REPLACE),r.buffers.stencil.setFunc(i.ALWAYS,s,4294967295),r.buffers.stencil.setClear(o),r.buffers.stencil.setLocked(!0),t.setRenderTarget(n),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),r.buffers.color.setLocked(!1),r.buffers.depth.setLocked(!1),r.buffers.color.setMask(!0),r.buffers.depth.setMask(!0),r.buffers.stencil.setLocked(!1),r.buffers.stencil.setFunc(i.EQUAL,1,4294967295),r.buffers.stencil.setOp(i.KEEP,i.KEEP,i.KEEP),r.buffers.stencil.setLocked(!0)}}class l extends o.w{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class h{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const n=t.getSize(new i.FM8);this._width=n.width,this._height=n.height,(e=new i.dd2(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:i.cLu})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new s.T(r.C),this.copyPass.material.blending=i.jFi,this.clock=new i.SUY}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e<this.passes.length;e++)if(this.passes[e].enabled)return!1;return!0}render(t){void 0===t&&(t=this.clock.getDelta());const e=this.renderer.getRenderTarget();let n=!1;for(let e=0,i=this.passes.length;e<i;e++){const i=this.passes[e];if(!1!==i.enabled){if(i.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(e),i.render(this.renderer,this.writeBuffer,this.readBuffer,t,n),i.needsSwap){if(n){const e=this.renderer.getContext(),n=this.renderer.state.buffers.stencil;n.setFunc(e.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,t),n.setFunc(e.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==a&&(i instanceof a?n=!0:i instanceof l&&(n=!1))}}this.renderer.setRenderTarget(e)}reset(t){if(void 0===t){const e=this.renderer.getSize(new i.FM8);this._pixelRatio=this.renderer.getPixelRatio(),this._width=e.width,this._height=e.height,(t=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=t,this.renderTarget2=t.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(t,e){this._width=t,this._height=e;const n=this._width*this._pixelRatio,i=this._height*this._pixelRatio;this.renderTarget1.setSize(n,i),this.renderTarget2.setSize(n,i);for(let t=0;t<this.passes.length;t++)this.passes[t].setSize(n,i)}setPixelRatio(t){this._pixelRatio=t,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}},503:(t,e,n)=>{"use strict";n.d(e,{v:()=>o});var i=n(250),r=n(304);const s={name:"OutputShader",uniforms:{tDiffuse:{value:null},toneMappingExposure:{value:1}},vertexShader:"\n\t\tprecision highp float;\n\n\t\tuniform mat4 modelViewMatrix;\n\t\tuniform mat4 projectionMatrix;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tprecision highp float;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\t#include <tonemapping_pars_fragment>\n\t\t#include <colorspace_pars_fragment>\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tgl_FragColor = texture2D( tDiffuse, vUv );\n\n\t\t\t// tone mapping\n\n\t\t\t#ifdef LINEAR_TONE_MAPPING\n\n\t\t\t\tgl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb );\n\n\t\t\t#elif defined( REINHARD_TONE_MAPPING )\n\n\t\t\t\tgl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb );\n\n\t\t\t#elif defined( CINEON_TONE_MAPPING )\n\n\t\t\t\tgl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb );\n\n\t\t\t#elif defined( ACES_FILMIC_TONE_MAPPING )\n\n\t\t\t\tgl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb );\n\n\t\t\t#elif defined( AGX_TONE_MAPPING )\n\n\t\t\t\tgl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb );\n\n\t\t\t#elif defined( NEUTRAL_TONE_MAPPING )\n\n\t\t\t\tgl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb );\n\n\t\t\t#elif defined( CUSTOM_TONE_MAPPING )\n\n\t\t\t\tgl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb );\n\n\t\t\t#endif\n\n\t\t\t// color space\n\n\t\t\t#ifdef SRGB_TRANSFER\n\n\t\t\t\tgl_FragColor = sRGBTransferOETF( gl_FragColor );\n\n\t\t\t#endif\n\n\t\t}"};class o extends r.w{constructor(){super(),this.uniforms=i.rDY.clone(s.uniforms),this.material=new i.FIo({name:s.name,uniforms:this.uniforms,vertexShader:s.vertexShader,fragmentShader:s.fragmentShader}
2),this._fsQuad=new r.T(this.material),this._outputColorSpace=null,this._toneMapping=null}render(t,e,n){this.uniforms.tDiffuse.value=n.texture,this.uniforms.toneMappingExposure.value=t.toneMappingExposure,this._outputColorSpace===t.outputColorSpace&&this._toneMapping===t.toneMapping||(this._outputColorSpace=t.outputColorSpace,this._toneMapping=t.toneMapping,this.material.defines={},i.epp.getTransfer(this._outputColorSpace)===i.j17&&(this.material.defines.SRGB_TRANSFER=""),this._toneMapping===i.EoG?this.material.defines.LINEAR_TONE_MAPPING="":this._toneMapping===i.CdI?this.material.defines.REINHARD_TONE_MAPPING="":this._toneMapping===i.YGz?this.material.defines.CINEON_TONE_MAPPING="":this._toneMapping===i.LY2?this.material.defines.ACES_FILMIC_TONE_MAPPING="":this._toneMapping===i.Bgp?this.material.defines.AGX_TONE_MAPPING="":this._toneMapping===i.ORg?this.material.defines.NEUTRAL_TONE_MAPPING="":this._toneMapping===i.dZ3&&(this.material.defines.CUSTOM_TONE_MAPPING=""),this.material.needsUpdate=!0),!0===this.renderToScreen?(t.setRenderTarget(null),this._fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this._fsQuad.render(t))}dispose(){this.material.dispose(),this._fsQuad.dispose()}}},304:(t,e,n)=>{"use strict";n.d(e,{T:()=>l,w:()=>r});var i=n(250);class r{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const s=new i.iKG(-1,1,1,-1,0,1);class o extends i.u9r{constructor(){super(),this.setAttribute("position",new i.a$l([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new i.a$l([0,2,0,0,2,0],2))}}const a=new o;class l{constructor(t){this._mesh=new i.Kj0(a,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,s)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}},458:(t,e,n)=>{"use strict";n.d(e,{C:()=>s});var i=n(250),r=n(304);class s extends r.w{constructor(t,e,n=null,r=null,s=null){super(),this.scene=t,this.camera=e,this.overrideMaterial=n,this.clearColor=r,this.clearAlpha=s,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new i.Ilk}render(t,e,n){const i=t.autoClear;let r,s;t.autoClear=!1,null!==this.overrideMaterial&&(s=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),null!==this.clearColor&&(t.getClearColor(this._oldClearColor),t.setClearColor(this.clearColor,t.getClearAlpha())),null!==this.clearAlpha&&(r=t.getClearAlpha(),t.setClearAlpha(this.clearAlpha)),1==this.clearDepth&&t.clearDepth(),t.setRenderTarget(this.renderToScreen?null:n),!0===this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),t.render(this.scene,this.camera),null!==this.clearColor&&t.setClearColor(this._oldClearColor),null!==this.clearAlpha&&t.setClearAlpha(r),null!==this.overrideMaterial&&(this.scene.overrideMaterial=s),t.autoClear=i}}},531:(t,e,n)=>{"use strict";n.d(e,{T:()=>s});var i=n(250),r=n(304);class s extends r.w{constructor(t,e="tDiffuse"){super(),this.textureID=e,this.uniforms=null,this.material=null,t instanceof i.jyz?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=i.rDY.clone(t.uniforms),this.material=new i.jyz({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this._fsQuad=new r.T(this.material)}render(t,e,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this._fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this._fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this._fsQuad.render(t))}dispose(){this.material.dispose(),this._fsQuad.dispose()}}},484:(t,e,n)=>{"use strict";n.d(e,{m:()=>a});var i=n(250),r=n(304),s=n(154);const o={name:"LuminosityHighPassShader",uniforms:{tDiffuse:{value:null},luminosityThreshold:{value:1},smoothWidth:{value:1},defaultColor:{value:new i.Ilk(0)},defaultOpacity:{value:0}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform vec3 defaultColor;\n\t\tuniform float defaultOpacity;\n\t\tuniform float luminosityThreshold;\n\t\tuniform float smoothWidth;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\n\t\t\tfloat v = luminance( texel.xyz );\n\n\t\t\tvec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );\n\n\t\t\tfloat alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );\n\n\t\t\tgl_FragColor = mix( outputColor, texel, alpha );\n\n\t\t}"};class a extends r.w{constructor(t,e=1,n,a){super(),this.strength=e,this.radius=n,this.threshold=a,this.resolution=void 0!==t?new i.FM8(t.x,t.y):new i.FM8(256,256),this.clearColor=new i.Ilk(0,0,0),this.needsSwap=!1,this.renderTargetsHorizontal=[],this.renderTargetsVertical=[],this.nMips=5;let l=Math.round(this.resolution.x/2),h=Math.round(this.resolution.y/2);this.renderTargetBright=new i.dd2(l,h,{type:i.cLu}),this.renderTargetBright.texture.name="UnrealBloomPass.bright",this.renderTargetBright.texture.generateMipmaps=!1;for(let t=0;t<this.nMips;t++){const e=new i.dd2(l,h,{type:i.cLu});e.texture.name="UnrealBloomPass.h"+t,e.texture.generateMipmaps=!1,this.renderTargetsHorizontal.push(e);const n=new i.dd2(l,h,{type:i.cLu});n.texture.name="UnrealBloomPass.v"+t,n.texture.generateMipmaps=!1,this.renderTargetsVertical.push(n),l=Math.round(l/2),h=Math.round(h/2)}const c=o;this.highPassUniforms=i.rDY.clone(c.uniforms),this.highPassUniforms.luminosityThreshold.value=a,this.highPassUniforms.smoothWidth.value=.01,this.materialHighPassFilter=new i.jyz({uniforms:this.highPassUniforms,vertexShader:c.vertexShader,fragmentShader:c.fragmentShader}),this.separableBlurMaterials=[];
vendor: 7,063 bytes, line 2
2const u=[6,10,14,18,22];l=Math.round(this.resolution.x/2),h=Math.round(this.resolution.y/2);for(let t=0;t<this.nMips;t++)this.separableBlurMaterials.push(this._getSeparableBlurMaterial(u[t])),this.separableBlurMaterials[t].uniforms.invSize.value=new i.FM8(1/l,1/h),l=Math.round(l/2),h=Math.round(h/2);this.compositeMaterial=this._getCompositeMaterial(this.nMips),this.compositeMaterial.uniforms.blurTexture1.value=this.renderTargetsVertical[0].texture,this.compositeMaterial.uniforms.blurTexture2.value=this.renderTargetsVertical[1].texture,this.compositeMaterial.uniforms.blurTexture3.value=this.renderTargetsVertical[2].texture,this.compositeMaterial.uniforms.blurTexture4.value=this.renderTargetsVertical[3].texture,this.compositeMaterial.uniforms.blurTexture5.value=this.renderTargetsVertical[4].texture,this.compositeMaterial.uniforms.bloomStrength.value=e,this.compositeMaterial.uniforms.bloomRadius.value=.1;this.compositeMaterial.uniforms.bloomFactors.value=[1,.8,.6,.4,.2],this.bloomTintColors=[new i.Pa4(1,1,1),new i.Pa4(1,1,1),new i.Pa4(1,1,1),new i.Pa4(1,1,1),new i.Pa4(1,1,1)],this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,this.copyUniforms=i.rDY.clone(s.C.uniforms),this.blendMaterial=new i.jyz({uniforms:this.copyUniforms,vertexShader:s.C.vertexShader,fragmentShader:s.C.fragmentShader,blending:i.WMw,depthTest:!1,depthWrite:!1,transparent:!0}),this._oldClearColor=new i.Ilk,this._oldClearAlpha=1,this._basic=new i.vBJ,this._fsQuad=new r.T(null)}dispose(){for(let t=0;t<this.renderTargetsHorizontal.length;t++)this.renderTargetsHorizontal[t].dispose();for(let t=0;t<this.renderTargetsVertical.length;t++)this.renderTargetsVertical[t].dispose();this.renderTargetBright.dispose();for(let t=0;t<this.separableBlurMaterials.length;t++)this.separableBlurMaterials[t].dispose();this.compositeMaterial.dispose(),this.blendMaterial.dispose(),this._basic.dispose(),this._fsQuad.dispose()}setSize(t,e){let n=Math.round(t/2),r=Math.round(e/2);this.renderTargetBright.setSize(n,r);for(let t=0;t<this.nMips;t++)this.renderTargetsHorizontal[t].setSize(n,r),this.renderTargetsVertical[t].setSize(n,r),this.separableBlurMaterials[t].uniforms.invSize.value=new i.FM8(1/n,1/r),n=Math.round(n/2),r=Math.round(r/2)}render(t,e,n,i,r){t.getClearColor(this._oldClearColor),this._oldClearAlpha=t.getClearAlpha();const s=t.autoClear;t.autoClear=!1,t.setClearColor(this.clearColor,0),r&&t.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this._fsQuad.material=this._basic,this._basic.map=n.texture,t.setRenderTarget(null),t.clear(),this._fsQuad.render(t)),this.highPassUniforms.tDiffuse.value=n.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this._fsQuad.material=this.materialHighPassFilter,t.setRenderTarget(this.renderTargetBright),t.clear(),this._fsQuad.render(t);let o=this.renderTargetBright;for(let e=0;e<this.nMips;e++)this._fsQuad.material=this.separableBlurMaterials[e],this.separableBlurMaterials[e].uniforms.colorTexture.value=o.texture,this.separableBlurMaterials[e].uniforms.direction.value=a.BlurDirectionX,t.setRenderTarget(this.renderTargetsHorizontal[e]),t.clear(),this._fsQuad.render(t),this.separableBlurMaterials[e].uniforms.colorTexture.value=this.renderTargetsHorizontal[e].texture,this.separableBlurMaterials[e].uniforms.direction.value=a.BlurDirectionY,t.setRenderTarget(this.renderTargetsVertical[e]),t.clear(),this._fsQuad.render(t),o=this.renderTargetsVertical[e];this._fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,t.setRenderTarget(this.renderTargetsHorizontal[0]),t.clear(),this._fsQuad.render(t),this._fsQuad.material=this.blendMaterial,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,r&&t.state.buffers.stencil.setTest(!0),this.renderToScreen?(t.setRenderTarget(null),this._fsQuad.render(t)):(t.setRenderTarget(n),this._fsQuad.render(t)),t.setClearColor(this._oldClearColor,this._oldClearAlpha),t.autoClear=s}_getSeparableBlurMaterial(t){const e=[],n=t/3;for(let i=0;i<t;i++)e.push(.39894*Math.exp(-.5*i*i/(n*n))/n);return new i.jyz({defines:{KERNEL_RADIUS:t},uniforms:{colorTexture:{value:null},invSize:{value:new i.FM8(.5,.5)},direction:{value:new i.FM8(.5,.5)},gaussianCoefficients:{value:e}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"#include <common>\n\t\t\t\tvarying vec2 vUv;\n\t\t\t\tuniform sampler2D colorTexture;\n\t\t\t\tuniform vec2 invSize;\n\t\t\t\tuniform vec2 direction;\n\t\t\t\tuniform float gaussianCoefficients[KERNEL_RADIUS];\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tfloat weightSum = gaussianCoefficients[0];\n\t\t\t\t\tvec3 diffuseSum = texture2D( colorTexture, vUv ).rgb * weightSum;\n\t\t\t\t\tfor( int i = 1; i < KERNEL_RADIUS; i ++ ) {\n\t\t\t\t\t\tfloat x = float(i);\n\t\t\t\t\t\tfloat w = gaussianCoefficients[i];\n\t\t\t\t\t\tvec2 uvOffset = direction * invSize * x;\n\t\t\t\t\t\tvec3 sample1 = texture2D( colorTexture, vUv + uvOffset ).rgb;\n\t\t\t\t\t\tvec3 sample2 = texture2D( colorTexture, vUv - uvOffset ).rgb;\n\t\t\t\t\t\tdiffuseSum += ( sample1 + sample2 ) * w;\n\t\t\t\t\t}\n\t\t\t\t\tgl_FragColor = vec4( diffuseSum, 1.0 );\n\t\t\t\t}"})}_getCompositeMaterial(t){return new i.jyz({defines:{NUM_MIPS:t},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\n\t\t\t\tuniform sampler2D blurTexture1;\n\t\t\t\tuniform sampler2D blurTexture2;\n\t\t\t\tuniform sampler2D blurTexture3;\n\t\t\t\tuniform sampler2D blurTexture4;\n\t\t\t\tuniform sampler2D blurTexture5;\n\t\t\t\tuniform float bloomStrength;\n\t\t\t\tuniform float bloomRadius;\n\t\t\t\tuniform float bloomFactors[NUM_MIPS];\n\t\t\t\tuniform vec3 bloomTintColors[NUM_MIPS];\n\n\t\t\t\tfloat lerpBloomFactor(const in float factor) {\n\t\t\t\t\tfloat mirrorFactor = 1.2 - factor;\n\t\t\t\t\treturn mix(factor, mirrorFactor, bloomRadius);\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tgl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0
2) * texture2D(blurTexture5, vUv) );\n\t\t\t\t}"})}}a.BlurDirectionX=new i.FM8(1,0),a.BlurDirectionY=new i.FM8(0,1)},154:(t,e,n)=>{"use strict";n.d(e,{C:()=>i});const i={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"}},185:(t,e,n)=>{"use strict";n.d(e,{C:()=>i});const i={name:"FXAAShader",uniforms:{tDiffuse:{value:null},resolution:{value:new(n(250).FM8)(1/1024,1/512)}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform vec2 resolution;\n\t\tvarying vec2 vUv;\n\n\t\t#define EDGE_STEP_COUNT 6\n\t\t#define EDGE_GUESS 8.0\n\t\t#define EDGE_STEPS 1.0, 1.5, 2.0, 2.0, 2.0, 4.0\n\t\tconst float edgeSteps[EDGE_STEP_COUNT] = float[EDGE_STEP_COUNT]( EDGE_STEPS );\n\n\t\tfloat _ContrastThreshold = 0.0312;\n\t\tfloat _RelativeThreshold = 0.063;\n\t\tfloat _SubpixelBlending = 1.0;\n\n\t\tvec4 Sample( sampler2D  tex2D, vec2 uv ) {\n\n\t\t\treturn texture( tex2D, uv );\n\n\t\t}\n\n\t\tfloat SampleLuminance( sampler2D tex2D, vec2 uv ) {\n\n\t\t\treturn dot( Sample( tex2D, uv ).rgb, vec3( 0.3, 0.59, 0.11 ) );\n\n\t\t}\n\n\t\tfloat SampleLuminance( sampler2D tex2D, vec2 texSize, vec2 uv, float uOffset, float vOffset ) {\n\n\t\t\tuv += texSize * vec2(uOffset, vOffset);\n\t\t\treturn SampleLuminance(tex2D, uv);\n\n\t\t}\n\n\t\tstruct LuminanceData {\n\n\t\t\tfloat m, n, e, s, w;\n\t\t\tfloat ne, nw, se, sw;\n\t\t\tfloat highest, lowest, contrast;\n\n\t\t};\n\n\t\tLuminanceData SampleLuminanceNeighborhood( sampler2D tex2D, vec2 texSize, vec2 uv ) {\n\n\t\t\tLuminanceData l;\n\t\t\tl.m = SampleLuminance( tex2D, uv );\n\t\t\tl.n = SampleLuminance( tex2D, texSize, uv,  0.0,  1.0 );\n\t\t\tl.e = SampleLuminance( tex2D, texSize, uv,  1.0,  0.0 );\n\t\t\tl.s = SampleLuminance( tex2D, texSize, uv,  0.0, -1.0 );\n\t\t\tl.w = SampleLuminance( tex2D, texSize, uv, -1.0,  0.0 );\n\n\t\t\tl.ne = SampleLuminance( tex2D, texSize, uv,  1.0,  1.0 );\n\t\t\tl.nw = SampleLuminance( tex2D, texSize, uv, -1.0,  1.0 );\n\t\t\tl.se = SampleLuminance( tex2D, texSize, uv,  1.0, -1.0 );\n\t\t\tl.sw = SampleLuminance( tex2D, texSize, uv, -1.0, -1.0 );\n\n\t\t\tl.highest = max( max( max( max( l.n, l.e ), l.s ), l.w ), l.m );\n\t\t\tl.lowest = min( min( min( min( l.n, l.e ), l.s ), l.w ), l.m );\n\t\t\tl.contrast = l.highest - l.lowest;\n\t\t\treturn l;\n\n\t\t}\n\n\t\tbool ShouldSkipPixel( LuminanceData l ) {\n\n\t\t\tfloat threshold = max( _ContrastThreshold, _RelativeThreshold * l.highest );\n\t\t\treturn l.contrast < threshold;\n\n\t\t}\n\n\t\tfloat DeterminePixelBlendFactor( LuminanceData l ) {\n\n\t\t\tfloat f = 2.0 * ( l.n + l.e + l.s + l.w );\n\t\t\tf += l.ne + l.nw + l.se + l.sw;\n\t\t\tf *= 1.0 / 12.0;\n\t\t\tf = abs( f - l.m );\n\t\t\tf = clamp( f / l.contrast, 0.0, 1.0 );\n\n\t\t\tfloat blendFactor = smoothstep( 0.0, 1.0, f );\n\t\t\treturn blendFactor * blendFactor * _SubpixelBlending;\n\n\t\t}\n\n\t\tstruct EdgeData {\n\n\t\t\tbool isHorizontal;\n\t\t\tfloat pixelStep;\n\t\t\tfloat oppositeLuminance, gradient;\n\n\t\t};\n\n\t\tEdgeData DetermineEdge( vec2 texSize, LuminanceData l ) {\n\n\t\t\tEdgeData e;\n\t\t\tfloat horizontal =\n\t\t\t\tabs( l.n + l.s - 2.0 * l.m ) * 2.0 +\n\t\t\t\tabs( l.ne + l.se - 2.0 * l.e ) +\n\t\t\t\tabs( l.nw + l.sw - 2.0 * l.w );\n\t\t\tfloat vertical =\n\t\t\t\tabs( l.e + l.w - 2.0 * l.m ) * 2.0 +\n\t\t\t\tabs( l.ne + l.nw - 2.0 * l.n ) +\n\t\t\t\tabs( l.se + l.sw - 2.0 * l.s );\n\t\t\te.isHorizontal = horizontal >= vertical;\n\n\t\t\tfloat pLuminance = e.isHorizontal ? l.n : l.e;\n\t\t\tfloat nLuminance = e.isHorizontal ? l.s : l.w;\n\t\t\tfloat pGradient = abs( pLuminance - l.m );\n\t\t\tfloat nGradient = abs( nLuminance - l.m );\n\n\t\t\te.pixelStep = e.isHorizontal ? texSize.y : texSize.x;\n\n\t\t\tif (pGradient < nGradient) {\n\n\t\t\t\te.pixelStep = -e.pixelStep;\n\t\t\t\te.oppositeLuminance = nLuminance;\n\t\t\t\te.gradient = nGradient;\n\n\t\t\t} else {\n\n\t\t\t\te.oppositeLuminance = pLuminance;\n\t\t\t\te.gradient = pGradient;\n\n\t\t\t}\n\n\t\t\treturn e;\n\n\t\t}\n\n\t\tfloat DetermineEdgeBlendFactor( sampler2D  tex2D, vec2 texSize, LuminanceData l, EdgeData e, vec2 uv ) {\n\n\t\t\tvec2 uvEdge = uv;\n\t\t\tvec2 edgeStep;\n\t\t\tif (e.isHorizontal) {\n\n\t\t\t\tuvEdge.y += e.pixelStep * 0.5;\n\t\t\t\tedgeStep = vec2( texSize.x, 0.0 );\n\n\t\t\t} else {\n\n\t\t\t\tuvEdge.x += e.pixelStep * 0.5;\n\t\t\t\tedgeStep = vec2( 0.0, texSize.y );\n\n\t\t\t}\n\n\t\t\tfloat edgeLuminance = ( l.m + e.oppositeLuminance ) * 0.5;\n\t\t\tfloat gradientThreshold = e.gradient * 0.25;\n\n\t\t\tvec2 puv = uvEdge + edgeStep * edgeSteps[0];\n\t\t\tfloat pLuminanceDelta = SampleLuminance( tex2D, puv ) - edgeLuminance;\n\t\t\tbool pAtEnd = abs( pLuminanceDelta ) >= gradientThreshold;\n\n\t\t\tfor ( int i = 1; i < EDGE_STEP_COUNT && !pAtEnd; i++ ) {\n\n\t\t\t\tpuv += edgeStep * edgeSteps[i];\n\t\t\t\tpLuminanceDelta = SampleLuminance( tex2D, puv ) - edgeLuminance;\n\t\t\t\tpAtEnd = abs( pLuminanceDelta ) >= gradientThreshold;\n\n\t\t\t}\n\n\t\t\tif ( !pAtEnd ) {\n\n\t\t\t\tpuv += edgeStep * EDGE_GUESS;\n\n\t\t\t}\n\n\t\t\tvec2 nuv = uvEdge - edgeStep * edgeSteps[0];\n\t\t\tfloat nLuminanceDelta = SampleLuminance( tex2D, nuv ) - edgeLuminance;\n\t\t\tbool nAtEnd = abs( nLuminanceDelta ) >= gradientThreshold;\n\n\t\t\tfor ( int i = 1; i < EDGE_STEP_COUNT && !nAtEnd; i++ ) {\n\n\t\t\t\tnuv -= edgeStep * edgeSteps[i];\n\t\t\t\tnLuminanceDelta = SampleLuminance( tex2D, nuv ) - edgeLuminance;\n\t\t\t\tnAtEnd = abs( nLuminanceDelta ) >= gradientThreshold;\n\n\t\t\t}\n\n\t\t\tif ( !nAtEnd ) {\n\n\t\t\t\tnuv -= edgeStep * EDGE_GUESS;\n\n\t\t\t}\n\n\t\t\tfloat pDistance, nDistance;\n\t\t\tif ( e.isHorizontal ) {\n\n\t\t\t\tpDistance = puv.x - uv.x;\n\t\t\t\tnDistance = uv.x - nuv.x;\n\n\t\t\t} else {\n\n\t\t\t\tpDistance = puv.y - uv.y;\n\t\t\t\tnDistance = uv.y - nuv.y;\n\n\t\t\t}\n\n\t\t\tfloat shortestDistance;\n\t\t\tbool deltaSign;\n\t\t\tif ( pDistance <= nDistance ) {\n\n\t\t\t\tshortestDistance = pDistance;\n\t\t\t\tdeltaSign = pLuminanceDelta >= 0.0;\n\n\t\t\t} else {\n\n\t\t\t\tshortestDistance = nDistance;\n\t\t\t\tdeltaSign = nLuminanceDelta >= 0.0;\n\n\t\t\t}\n\n\t\t\tif ( deltaSign == ( l.m - edgeLuminance >= 0.0 ) ) {\n\n\t\t\t\treturn 0.0;\n\n\t\t\t}\n\n\t\t\treturn 0.5 - shortestDistance / ( pDistance + nDistance );\n\n\t\t}\n\n\t\tvec4 ApplyFXAA( sampler2D  tex2D, vec2 texSize, vec2 uv ) {\n\n\t\t\tLuminanceData luminance = SampleLuminanceNeighborhood( tex2D, texSize, uv );\n\t\t\tif ( ShouldSkipPixel( luminance ) ) {\n\n\t\t\t\treturn Sample( tex2D, uv );\n\n\t\t\t}\n\n\t\t\tfloat pixelBlend = DeterminePixelBlendFactor( luminance );\n\t\t\tEdgeData edge = DetermineEdge( texSize, luminance );\n\t\t\tfloat edgeBlend = DetermineEdgeBlendFactor( tex2D, texSize, luminance, edge, uv );\n\t\t\tfloat finalBlend = max( pixelBlend, edgeBlend );\n\n\t\t\tif (edge.isHorizontal) {\n\n\t\t\t\tuv.y += edge.pixelStep * finalBlend;\n\n\t\t\t} else {\n\n\t\t\t\tuv.x += edge.pixelStep * finalBlend;\n\n\t\t\t}\n\n\t\t\treturn Sample( tex2D, uv );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tgl_FragColor = ApplyFXAA( tDiffuse, resolution.xy, vUv );\n\n\t\t}"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.